nocc_webmail/webmail/ckeditor5/ckeditor.js.map
2022-01-03 15:03:38 +01:00

1 line
No EOL
992 KiB
XML
Raw Permalink Blame History

This file contains invisible Unicode characters

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

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

{"version":3,"file":"ckeditor.js","sources":["webpack://ClassicEditor/ckeditor.js"],"sourcesContent":["/*!\n * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n(function(t){t[\"en\"]=Object.assign(t[\"en\"]||{},{a:\"Image toolbar\",b:\"Media toolbar\",c:\"Table toolbar\",d:\"Special characters\",e:\"leftwards double arrow\",f:\"rightwards double arrow\",g:\"upwards double arrow\",h:\"downwards double arrow\",i:\"leftwards dashed arrow\",j:\"rightwards dashed arrow\",k:\"upwards dashed arrow\",l:\"downwards dashed arrow\",m:\"leftwards arrow to bar\",n:\"rightwards arrow to bar\",o:\"upwards arrow to bar\",p:\"downwards arrow to bar\",q:\"up down arrow with base\",r:\"back with leftwards arrow above\",s:\"end with leftwards arrow above\",t:\"on with exclamation mark with left right arrow above\",u:\"soon with rightwards arrow above\",v:\"top with upwards arrow above\",w:\"Dollar sign\",x:\"Euro sign\",y:\"Yen sign\",z:\"Pound sign\",aa:\"Cent sign\",ab:\"Euro-currency sign\",ac:\"Colon sign\",ad:\"Cruzeiro sign\",ae:\"French franc sign\",af:\"Lira sign\",ag:\"Currency sign\",ah:\"Bitcoin sign\",ai:\"Mill sign\",aj:\"Naira sign\",ak:\"Peseta sign\",al:\"Rupee sign\",am:\"Won sign\",an:\"New sheqel sign\",ao:\"Dong sign\",ap:\"Kip sign\",aq:\"Tugrik sign\",ar:\"Drachma sign\",as:\"German penny sign\",at:\"Peso sign\",au:\"Guarani sign\",av:\"Austral sign\",aw:\"Hryvnia sign\",ax:\"Cedi sign\",ay:\"Livre tournois sign\",az:\"Spesmilo sign\",ba:\"Tenge sign\",bb:\"Indian rupee sign\",bc:\"Turkish lira sign\",bd:\"Nordic mark sign\",be:\"Manat sign\",bf:\"Ruble sign\",bg:\"Latin capital letter a with macron\",bh:\"Latin small letter a with macron\",bi:\"Latin capital letter a with breve\",bj:\"Latin small letter a with breve\",bk:\"Latin capital letter a with ogonek\",bl:\"Latin small letter a with ogonek\",bm:\"Latin capital letter c with acute\",bn:\"Latin small letter c with acute\",bo:\"Latin capital letter c with circumflex\",bp:\"Latin small letter c with circumflex\",bq:\"Latin capital letter c with dot above\",br:\"Latin small letter c with dot above\",bs:\"Latin capital letter c with caron\",bt:\"Latin small letter c with caron\",bu:\"Latin capital letter d with caron\",bv:\"Latin small letter d with caron\",bw:\"Latin capital letter d with stroke\",bx:\"Latin small letter d with stroke\",by:\"Latin capital letter e with macron\",bz:\"Latin small letter e with macron\",ca:\"Latin capital letter e with breve\",cb:\"Latin small letter e with breve\",cc:\"Latin capital letter e with dot above\",cd:\"Latin small letter e with dot above\",ce:\"Latin capital letter e with ogonek\",cf:\"Latin small letter e with ogonek\",cg:\"Latin capital letter e with caron\",ch:\"Latin small letter e with caron\",ci:\"Latin capital letter g with circumflex\",cj:\"Latin small letter g with circumflex\",ck:\"Latin capital letter g with breve\",cl:\"Latin small letter g with breve\",cm:\"Latin capital letter g with dot above\",cn:\"Latin small letter g with dot above\",co:\"Latin capital letter g with cedilla\",cp:\"Latin small letter g with cedilla\",cq:\"Latin capital letter h with circumflex\",cr:\"Latin small letter h with circumflex\",cs:\"Latin capital letter h with stroke\",ct:\"Latin small letter h with stroke\",cu:\"Latin capital letter i with tilde\",cv:\"Latin small letter i with tilde\",cw:\"Latin capital letter i with macron\",cx:\"Latin small letter i with macron\",cy:\"Latin capital letter i with breve\",cz:\"Latin small letter i with breve\",da:\"Latin capital letter i with ogonek\",db:\"Latin small letter i with ogonek\",dc:\"Latin capital letter i with dot above\",dd:\"Latin small letter dotless i\",de:\"Latin capital ligature ij\",df:\"Latin small ligature ij\",dg:\"Latin capital letter j with circumflex\",dh:\"Latin small letter j with circumflex\",di:\"Latin capital letter k with cedilla\",dj:\"Latin small letter k with cedilla\",dk:\"Latin small letter kra\",dl:\"Latin capital letter l with acute\",dm:\"Latin small letter l with acute\",dn:\"Latin capital letter l with cedilla\",do:\"Latin small letter l with cedilla\",dp:\"Latin capital letter l with caron\",dq:\"Latin small letter l with caron\",dr:\"Latin capital letter l with middle dot\",ds:\"Latin small letter l with middle dot\",dt:\"Latin capital letter l with stroke\",du:\"Latin small letter l with stroke\",dv:\"Latin capital letter n with acute\",dw:\"Latin small letter n with acute\",dx:\"Latin capital letter n with cedilla\",dy:\"Latin small letter n with cedilla\",dz:\"Latin capital letter n with caron\",ea:\"Latin small letter n with caron\",eb:\"Latin small letter n preceded by apostrophe\",ec:\"Latin capital letter eng\",ed:\"Latin small letter eng\",ee:\"Latin capital letter o with macron\",ef:\"Latin small letter o with macron\",eg:\"Latin capital letter o with breve\",eh:\"Latin small letter o with breve\",ei:\"Latin capital letter o with double acute\",ej:\"Latin small letter o with double acute\",ek:\"Latin capital ligature oe\",el:\"Latin small ligature oe\",em:\"Latin capital letter r with acute\",en:\"Latin small letter r with acute\",eo:\"Latin capital letter r with cedilla\",ep:\"Latin small letter r with cedilla\",eq:\"Latin capital letter r with caron\",er:\"Latin small letter r with caron\",es:\"Latin capital letter s with acute\",et:\"Latin small letter s with acute\",eu:\"Latin capital letter s with circumflex\",ev:\"Latin small letter s with circumflex\",ew:\"Latin capital letter s with cedilla\",ex:\"Latin small letter s with cedilla\",ey:\"Latin capital letter s with caron\",ez:\"Latin small letter s with caron\",fa:\"Latin capital letter t with cedilla\",fb:\"Latin small letter t with cedilla\",fc:\"Latin capital letter t with caron\",fd:\"Latin small letter t with caron\",fe:\"Latin capital letter t with stroke\",ff:\"Latin small letter t with stroke\",fg:\"Latin capital letter u with tilde\",fh:\"Latin small letter u with tilde\",fi:\"Latin capital letter u with macron\",fj:\"Latin small letter u with macron\",fk:\"Latin capital letter u with breve\",fl:\"Latin small letter u with breve\",fm:\"Latin capital letter u with ring above\",fn:\"Latin small letter u with ring above\",fo:\"Latin capital letter u with double acute\",fp:\"Latin small letter u with double acute\",fq:\"Latin capital letter u with ogonek\",fr:\"Latin small letter u with ogonek\",fs:\"Latin capital letter w with circumflex\",ft:\"Latin small letter w with circumflex\",fu:\"Latin capital letter y with circumflex\",fv:\"Latin small letter y with circumflex\",fw:\"Latin capital letter y with diaeresis\",fx:\"Latin capital letter z with acute\",fy:\"Latin small letter z with acute\",fz:\"Latin capital letter z with dot above\",ga:\"Latin small letter z with dot above\",gb:\"Latin capital letter z with caron\",gc:\"Latin small letter z with caron\",gd:\"Latin small letter long s\",ge:\"Less-than sign\",gf:\"Greater-than sign\",gg:\"Less-than or equal to\",gh:\"Greater-than or equal to\",gi:\"En dash\",gj:\"Em dash\",gk:\"Macron\",gl:\"Overline\",gm:\"Degree sign\",gn:\"Minus sign\",go:\"Plus-minus sign\",gp:\"Division sign\",gq:\"Fraction slash\",gr:\"Multiplication sign\",gs:\"Latin small letter f with hook\",gt:\"Integral\",gu:\"N-ary summation\",gv:\"Infinity\",gw:\"Square root\",gx:\"Tilde operator\",gy:\"Approximately equal to\",gz:\"Almost equal to\",ha:\"Not equal to\",hb:\"Identical to\",hc:\"Element of\",hd:\"Not an element of\",he:\"Contains as member\",hf:\"N-ary product\",hg:\"Logical and\",hh:\"Logical or\",hi:\"Not sign\",hj:\"Intersection\",hk:\"Union\",hl:\"Partial differential\",hm:\"For all\",hn:\"There exists\",ho:\"Empty set\",hp:\"Nabla\",hq:\"Asterisk operator\",hr:\"Proportional to\",hs:\"Angle\",ht:\"Vulgar fraction one quarter\",hu:\"Vulgar fraction one half\",hv:\"Vulgar fraction three quarters\",hw:\"Single left-pointing angle quotation mark\",hx:\"Single right-pointing angle quotation mark\",hy:\"Left-pointing double angle quotation mark\",hz:\"Right-pointing double angle quotation mark\",ia:\"Left single quotation mark\",ib:\"Right single quotation mark\",ic:\"Left double quotation mark\",id:\"Right double quotation mark\",ie:\"Single low-9 quotation mark\",if:\"Double low-9 quotation mark\",ig:\"Inverted exclamation mark\",ih:\"Inverted question mark\",ii:\"Two dot leader\",ij:\"Horizontal ellipsis\",ik:\"Double dagger\",il:\"Per mille sign\",im:\"Per ten thousand sign\",in:\"Double exclamation mark\",io:\"Question exclamation mark\",ip:\"Exclamation question mark\",iq:\"Double question mark\",ir:\"Copyright sign\",is:\"Registered sign\",it:\"Trade mark sign\",iu:\"Section sign\",iv:\"Paragraph sign\",iw:\"Reversed paragraph sign\",ix:\"Words: %0\",iy:\"Characters: %0\",iz:\"Block quote\",ja:\"Choose heading\",jb:\"Heading\",jc:\"media widget\",jd:\"Bold\",je:\"Italic\",jf:\"Code\",jg:\"Strikethrough\",jh:\"Subscript\",ji:\"Superscript\",jj:\"Underline\",jk:\"image widget\",jl:\"Enter image caption\",jm:\"Full size image\",jn:\"Side image\",jo:\"Left aligned image\",jp:\"Centered image\",jq:\"Right aligned image\",jr:\"Insert image\",js:\"Upload failed\",jt:\"Widget toolbar\",ju:\"Table properties\",jv:\"Cell properties\",jw:\"To-do List\",jx:\"Remove Format\",jy:\"Page break\",jz:\"Horizontal line\",ka:\"Yellow marker\",kb:\"Green marker\",kc:\"Pink marker\",kd:\"Blue marker\",ke:\"Red pen\",kf:\"Green pen\",kg:\"Remove highlight\",kh:\"Highlight\",ki:\"Text highlight toolbar\",kj:\"Upload in progress\",kk:\"Character categories\",kl:\"Font Family\",km:\"Default\",kn:\"Font Size\",ko:\"Tiny\",kp:\"Small\",kq:\"Big\",kr:\"Huge\",ks:\"Change image text alternative\",kt:\"Dropdown toolbar\",ku:\"Rich Text Editor\",kv:\"None\",kw:\"Solid\",kx:\"Dotted\",ky:\"Dashed\",kz:\"Double\",la:\"Groove\",lb:\"Ridge\",lc:\"Inset\",ld:\"Outset\",le:'The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".',lf:'The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".',lg:\"Black\",lh:\"Dim grey\",li:\"Grey\",lj:\"Light grey\",lk:\"White\",ll:\"Red\",lm:\"Orange\",ln:\"Yellow\",lo:\"Light green\",lp:\"Green\",lq:\"Aquamarine\",lr:\"Turquoise\",ls:\"Light blue\",lt:\"Blue\",lu:\"Purple\",lv:\"Save\",lw:\"Cancel\",lx:\"Text alternative\",ly:\"Editor toolbar\",lz:\"Show more items\",ma:\"%0 of %1\",mb:\"Previous\",mc:\"Next\",md:\"Undo\",me:\"Redo\",mf:\"Border\",mg:\"Style\",mh:\"Width\",mi:\"Color\",mj:\"Background\",mk:\"Dimensions\",ml:\"Height\",mm:\"Padding\",mn:\"Table cell text alignment\",mo:\"Horizontal text alignment toolbar\",mp:\"Vertical text alignment toolbar\",mq:\"Align cell text to the left\",mr:\"Align cell text to the center\",ms:\"Align cell text to the right\",mt:\"Justify cell text\",mu:\"Align cell text to the top\",mv:\"Align cell text to the middle\",mw:\"Align cell text to the bottom\",mx:\"Remove color\",my:\"Alignment\",mz:\"Table alignment toolbar\",na:\"Align table to the left\",nb:\"Center table\",nc:\"Align table to the right\",nd:\"Paragraph\",ne:\"Heading 1\",nf:\"Heading 2\",ng:\"Heading 3\",nh:\"Heading 4\",ni:\"Heading 5\",nj:\"Heading 6\",nk:\"Rich Text Editor, %0\",nl:\"Font Color\",nm:\"Font Background Color\",nn:\"Insert code block\",no:\"Align left\",np:\"Align right\",nq:\"Align center\",nr:\"Justify\",ns:\"Text alignment\",nt:\"Text alignment toolbar\",nu:\"Insert table\",nv:\"Header column\",nw:\"Insert column left\",nx:\"Insert column right\",ny:\"Delete column\",nz:\"Column\",oa:\"Header row\",ob:\"Insert row below\",oc:\"Insert row above\",od:\"Delete row\",oe:\"Row\",of:\"Merge cell up\",og:\"Merge cell right\",oh:\"Merge cell down\",oi:\"Merge cell left\",oj:\"Split cell vertically\",ok:\"Split cell horizontally\",ol:\"Merge cells\",om:\"Insert media\",on:\"The URL must not be empty.\",oo:\"This media URL is not supported.\",op:\"Numbered List\",oq:\"Bulleted List\",or:\"Link\",os:\"Increase indent\",ot:\"Decrease indent\",ou:\"Document colors\",ov:\"Plain text\",ow:\"Open in a new tab\",ox:\"Downloadable\",oy:\"Unlink\",oz:\"Edit link\",pa:\"Open link in new tab\",pb:\"This link has no URL\",pc:\"Link URL\",pd:\"Paste the media URL in the input.\",pe:\"Tip: Paste the URL into the content to embed faster.\",pf:\"Media URL\"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));(function t(e,i){if(typeof exports===\"object\"&&typeof module===\"object\")module.exports=i();else if(typeof define===\"function\"&&define.amd)define([],i);else if(typeof exports===\"object\")exports[\"ClassicEditor\"]=i();else e[\"ClassicEditor\"]=i()})(window,(function(){return function(t){var e={};function i(n){if(e[n]){return e[n].exports}var o=e[n]={i:n,l:false,exports:{}};t[n].call(o.exports,o,o.exports,i);o.l=true;return o.exports}i.m=t;i.c=e;i.d=function(t,e,n){if(!i.o(t,e)){Object.defineProperty(t,e,{enumerable:true,get:n})}};i.r=function(t){if(typeof Symbol!==\"undefined\"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"})}Object.defineProperty(t,\"__esModule\",{value:true})};i.t=function(t,e){if(e&1)t=i(t);if(e&8)return t;if(e&4&&typeof t===\"object\"&&t&&t.__esModule)return t;var n=Object.create(null);i.r(n);Object.defineProperty(n,\"default\",{enumerable:true,value:t});if(e&2&&typeof t!=\"string\")for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n};i.n=function(t){var e=t&&t.__esModule?function e(){return t[\"default\"]}:function e(){return t};i.d(e,\"a\",e);return e};i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};i.p=\"\";return i(i.s=142)}([function(t,e,i){\"use strict\";i.d(e,\"b\",(function(){return o}));i.d(e,\"a\",(function(){return r}));const n=\"https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html\";class o extends Error{constructor(t,e,i){t=r(t);if(i){t+=\" \"+JSON.stringify(i)}super(t);this.name=\"CKEditorError\";this.context=e;this.data=i}is(t){return t===\"CKEditorError\"}static rethrowUnexpectedError(t,e){if(t.is&&t.is(\"CKEditorError\")){throw t}const i=new o(t.message,e);i.stack=t.stack;throw i}}function r(t){const e=t.match(/^([^:]+):/);if(!e){return t}return t+` Read more: ${n}#error-${e[1]}\\n`}},function(t,e,i){\"use strict\";var n=function t(){var e;return function t(){if(typeof e===\"undefined\"){e=Boolean(window&&document&&document.all&&!window.atob)}return e}}();var o=function t(){var e={};return function t(i){if(typeof e[i]===\"undefined\"){var n=document.querySelector(i);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement){try{n=n.contentDocument.head}catch(t){n=null}}e[i]=n}return e[i]}}();var r=[];function s(t){var e=-1;for(var i=0;i<r.length;i++){if(r[i].identifier===t){e=i;break}}return e}function a(t,e){var i={};var n=[];for(var o=0;o<t.length;o++){var a=t[o];var c=e.base?a[0]+e.base:a[0];var l=i[c]||0;var d=\"\".concat(c,\" \").concat(l);i[c]=l+1;var u=s(d);var h={css:a[1],media:a[2],sourceMap:a[3]};if(u!==-1){r[u].references++;r[u].updater(h)}else{r.push({identifier:d,updater:g(h,e),references:1})}n.push(d)}return n}function c(t){var e=document.createElement(\"style\");var n=t.attributes||{};if(typeof n.nonce===\"undefined\"){var r=true?i.nc:undefined;if(r){n.nonce=r}}Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])}));if(typeof t.insert===\"function\"){t.insert(e)}else{var s=o(t.insert||\"head\");if(!s){throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\")}s.appendChild(e)}return e}function l(t){if(t.parentNode===null){return false}t.parentNode.removeChild(t)}var d=function t(){var e=[];return function t(i,n){e[i]=n;return e.filter(Boolean).join(\"\\n\")}}();function u(t,e,i,n){var o=i?\"\":n.media?\"@media \".concat(n.media,\" {\").concat(n.css,\"}\"):n.css;if(t.styleSheet){t.styleSheet.cssText=d(e,o)}else{var r=document.createTextNode(o);var s=t.childNodes;if(s[e]){t.removeChild(s[e])}if(s.length){t.insertBefore(r,s[e])}else{t.appendChild(r)}}}function h(t,e,i){var n=i.css;var o=i.media;var r=i.sourceMap;if(o){t.setAttribute(\"media\",o)}else{t.removeAttribute(\"media\")}if(r&&btoa){n+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r)))),\" */\")}if(t.styleSheet){t.styleSheet.cssText=n}else{while(t.firstChild){t.removeChild(t.firstChild)}t.appendChild(document.createTextNode(n))}}var f=null;var m=0;function g(t,e){var i;var n;var o;if(e.singleton){var r=m++;i=f||(f=c(e));n=u.bind(null,i,r,false);o=u.bind(null,i,r,true)}else{i=c(e);n=h.bind(null,i,e);o=function t(){l(i)}}n(t);return function e(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap){return}n(t=i)}else{o()}}}t.exports=function(t,e){e=e||{};if(!e.singleton&&typeof e.singleton!==\"boolean\"){e.singleton=n()}t=t||[];var i=a(t,e);return function t(n){n=n||[];if(Object.prototype.toString.call(n)!==\"[object Array]\"){return}for(var o=0;o<i.length;o++){var c=i[o];var l=s(c);r[l].references--}var d=a(n,e);for(var u=0;u<i.length;u++){var h=i[u];var f=s(h);if(r[f].references===0){r[f].updater();r.splice(f,1)}}i=d}}},,function(t,e,i){\"use strict\";var n=i(7);var o=typeof self==\"object\"&&self&&self.Object===Object&&self;var r=n[\"a\"]||o||Function(\"return this\")();e[\"a\"]=r},function(t,e,i){\"use strict\";(function(t){var n=i(3);var o=i(15);var r=typeof exports==\"object\"&&exports&&!exports.nodeType&&exports;var s=r&&typeof t==\"object\"&&t&&!t.nodeType&&t;var a=s&&s.exports===r;var c=a?n[\"a\"].Buffer:undefined;var l=c?c.isBuffer:undefined;var d=l||o[\"a\"];e[\"a\"]=d}).call(this,i(9)(t))},function(t,e,i){\"use strict\";(function(t){var n=i(7);var o=typeof exports==\"object\"&&exports&&!exports.nodeType&&exports;var r=o&&typeof t==\"object\"&&t&&!t.nodeType&&t;var s=r&&r.exports===o;var a=s&&n[\"a\"].process;var c=function(){try{var t=r&&r.require&&r.require(\"util\").types;if(t){return t}return a&&a.binding&&a.binding(\"util\")}catch(t){}}();e[\"a\"]=c}).call(this,i(9)(t))},function(t,e,i){\"use strict\";(function(t){var e=i(0);const n=\"18.0.0\";const o=typeof window===\"object\"?window:t;if(o.CKEDITOR_VERSION){throw new e[\"b\"](\"ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated.\",null)}else{o.CKEDITOR_VERSION=n}}).call(this,i(10))},function(t,e,i){\"use strict\";(function(t){var i=typeof t==\"object\"&&t&&t.Object===Object&&t;e[\"a\"]=i}).call(this,i(10))},function(t,e,i){\"use strict\";(function(t){var n=i(3);var o=typeof exports==\"object\"&&exports&&!exports.nodeType&&exports;var r=o&&typeof t==\"object\"&&t&&!t.nodeType&&t;var s=r&&r.exports===o;var a=s?n[\"a\"].Buffer:undefined,c=a?a.allocUnsafe:undefined;function l(t,e){if(e){return t.slice()}var i=t.length,n=c?c(i):new t.constructor(i);t.copy(n);return n}e[\"a\"]=l}).call(this,i(9)(t))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);if(!e.children)e.children=[];Object.defineProperty(e,\"loaded\",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,\"id\",{enumerable:true,get:function(){return e.i}});Object.defineProperty(e,\"exports\",{enumerable:true});e.webpackPolyfill=1}return e}},function(t,e){var i;i=function(){return this}();try{i=i||new Function(\"return this\")()}catch(t){if(typeof window===\"object\")i=window}t.exports=i},function(t,e,i){var n=i(1);var o=i(49);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e,i){var n=i(1);var o=i(96);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e,i){var n=i(1);var o=i(134);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e,i){var n=i(1);var o=i(135);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e,i){\"use strict\";function n(){return false}e[\"a\"]=n},function(t){t.exports=JSON.parse('{\"ar\":{\"latex\":\"LaTeX\",\"cancel\":\"إلغاء\",\"accept\":\"موا<D988>?ق\",\"manual\":\"الدليل\",\"insert_math\":\"إدراج صيغة رياضية - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"ca\":{\"latex\":\"LaTeX\",\"cancel\":\"Cancel·lar\",\"accept\":\"Acceptar\",\"manual\":\"Manual\",\"insert_math\":\"Inserir fórmula matemàtica - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"cs\":{\"latex\":\"LaTeX\",\"cancel\":\"Storno\",\"accept\":\"OK\",\"manual\":\"Příru<EFBFBD>?ka\",\"insert_math\":\"Vložit matematický vzorec - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"da\":{\"latex\":\"LaTeX\",\"cancel\":\"Annuller\",\"accept\":\"OK\",\"manual\":\"Brugervejledning\",\"insert_math\":\"Indsæt matematisk formel - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"de\":{\"latex\":\"LaTeX\",\"cancel\":\"Abbrechen\",\"accept\":\"OK\",\"manual\":\"Handbuch\",\"insert_math\":\"Mathematische Formel einfügen - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"en\":{\"latex\":\"LaTeX\",\"cancel\":\"Cancel\",\"accept\":\"OK\",\"manual\":\"Manual\",\"insert_math\":\"Insert a math equation - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"es\":{\"latex\":\"LaTeX\",\"cancel\":\"Cancelar\",\"accept\":\"Aceptar\",\"manual\":\"Manual\",\"insert_math\":\"Insertar fórmula matemática - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"et\":{\"latex\":\"LaTeX\",\"cancel\":\"Loobu\",\"accept\":\"OK\",\"manual\":\"Käsiraamat\",\"insert_math\":\"Lisa matemaatiline valem WIRIS\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"eu\":{\"latex\":\"LaTeX\",\"cancel\":\"Ezeztatu\",\"accept\":\"Onartu\",\"manual\":\"Gida\",\"insert_math\":\"Txertatu matematikako formula - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"fi\":{\"latex\":\"LaTeX\",\"cancel\":\"Peruuta\",\"accept\":\"OK\",\"manual\":\"Manual\",\"insert_math\":\"Liitä matemaattinen kaava - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"fr\":{\"latex\":\"LaTeX\",\"cancel\":\"Annuler\",\"accept\":\"OK\",\"manual\":\"Manuel\",\"insert_math\":\"Insérer une formule mathématique - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"gl\":{\"latex\":\"LaTeX\",\"cancel\":\"Cancelar\",\"accept\":\"Aceptar\",\"manual\":\"Manual\",\"insert_math\":\"Inserir fórmula matemática - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"he\":{\"latex\":\"LaTeX\",\"cancel\":\"ביטול\",\"accept\":\"<EFBFBD>?ישור\",\"manual\":\"מדריך\",\"insert_math\":\"הוסף נוסחה מתמטית - MathType\",\"insert_chem\":\"הוספת כתיבה כימית - ChemType\",\"minimize\":\"מזערי\",\"maximize\":\"מרבי\",\"fullscreen\":\"מסך מל<EFBFBD>?\",\"exit_fullscreen\":\"יצי<EFBFBD>?ה ממצב מסך מל<EFBFBD>?\",\"close\":\"סגירה\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"ה<EFBFBD>?<EFBFBD>? לצ<EFBFBD>?ת? שינויי<EFBFBD>? <EFBFBD>?שר בוצעו ימחקו.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" <EFBFBD>?יננה פונקציה\",\"exception_invalid_date_format\":\"תסדיר ת<EFBFBD>?ריך <EFBFBD>?ינו תקין : \",\"exception_casting\":\"ל<EFBFBD>? ניתן להמיר \",\"exception_casting_to\":\" ל \"},\"hr\":{\"latex\":\"LaTeX\",\"cancel\":\"Poništi\",\"accept\":\"U redu\",\"manual\":\"Priru<EFBFBD>?nik\",\"insert_math\":\"Umetnite matemati<EFBFBD>?ku formulu - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"hu\":{\"latex\":\"LaTeX\",\"cancel\":\"Mégsem\",\"accept\":\"OK\",\"manual\":\"Kézikönyv\",\"insert_math\":\"Matematikai képlet beszúrása - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"it\":{\"latex\":\"LaTeX\",\"cancel\":\"Annulla\",\"accept\":\"Accetta\",\"manual\":\"Manuale\",\"insert_math\":\"Inserisci una formula matematica - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"ja\":{\"latex\":\"LaTeX\",\"cancel\":\"\",\"accept\":\"OK\",\"manual\":\"\",\"insert_math\":\"<EFBFBD>? - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"ko\":{\"latex\":\"LaTeX\",\"cancel\":\"\",\"accept\":\"<EFBFBD>?<EFBFBD>\",\"manual\":\"\",\"insert_math\":\" <EFBFBD>? - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"nl\":{\"latex\":\"LaTeX\",\"cancel\":\"Annuleren\",\"accept\":\"OK\",\"manual\":\"Handleiding\",\"insert_math\":\"Wiskundige formule invoegen - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"no\":{\"latex\":\"LaTeX\",\"cancel\":\"Avbryt\",\"accept\":\"OK\",\"manual\":\"Håndbok\",\"insert_math\":\"Sett inn matematikkformel - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"pl\":{\"latex\":\"LaTeX\",\"cancel\":\"Anuluj\",\"accept\":\"OK\",\"manual\":\"Instrukcja\",\"insert_math\":\"Wstaw formułę matematyczną - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"pt\":{\"latex\":\"LaTeX\",\"cancel\":\"Cancelar\",\"accept\":\"OK\",\"manual\":\"Manual\",\"insert_math\":\"Inserir fórmula matemática - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"pt_br\":{\"latex\":\"LaTeX\",\"cancel\":\"Cancelar\",\"accept\":\"OK\",\"manual\":\"Manual\",\"insert_math\":\"Inserir fórmula matemática - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"ru\":{\"latex\":\"LaTeX\",\"cancel\":\"отмена\",\"accept\":\"OK\",\"manual\":\"вручную\",\"insert_math\":\"В<EFBFBD>?тавить математиче<EFBFBD>?кую формулу: WIRIS\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"sv\":{\"latex\":\"LaTeX\",\"cancel\":\"Avbryt\",\"accept\":\"OK\",\"manual\":\"Bruksanvisning\",\"insert_math\":\"Infoga matematisk formel - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"tr\":{\"latex\":\"LaTeX\",\"cancel\":\"Vazgeç\",\"accept\":\"Tamam\",\"manual\":\"Kılavuz\",\"insert_math\":\"Matematik formülü ekle - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"zh\":{\"latex\":\"LaTeX\",\"cancel\":\"<EFBFBD>?<EFBFBD>\",\"accept\":\"\",\"manual\":\"\",\"insert_math\":\"<EFBFBD>?<EFBFBD><EFBFBD>? - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"el\":{\"latex\":\"LaTeX\",\"cancel\":\"Άκυ<EFBFBD>?ο\",\"accept\":\"ΟΚ\",\"manual\":\"Χει<EFBFBD>?οκίνητα\",\"insert_math\":\"Εισαγωγή μαθηματικο<EFBFBD>? τ<EFBFBD>?που - MathType\",\"insert_chem\":\"Insert a chemistry formula - ChemType\",\"minimize\":\"Minimize\",\"maximize\":\"Maximize\",\"fullscreen\":\"Full-screen\",\"exit_fullscreen\":\"Exit full-screen\",\"close\":\"Close\",\"mathtype\":\"MathType\",\"title_modalwindow\":\"MathType modal window\",\"close_modal_warning\":\"Are you sure you want to leave? The changes you made will be lost.\",\"latex_name_label\":\"Latex Formula\",\"browser_no_compatible\":\"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.\",\"error_convert_accessibility\":\"Error converting from MathML to accessible text.\",\"exception_cross_site\":\"Cross site scripting is only allowed for HTTP.\",\"exception_high_surrogate\":\"High surrogate not followed by low surrogate in fixedCharCodeAt()\",\"exception_string_length\":\"Invalid string. Length must be a multiple of 4\",\"exception_key_nonobject\":\"Object.keys called on non-object\",\"exception_null_or_undefined\":\" this is null or not defined\",\"exception_not_function\":\" is not a function\",\"exception_invalid_date_format\":\"Invalid date format : \",\"exception_casting\":\"Cannot cast \",\"exception_casting_to\":\" to \"},\"\":{}}')},function(t,e,i){var n=i(1);var o=i(18);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-placeholder:before,.ck .ck-placeholder:before{content:attr(data-placeholder);pointer-events:none}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-placeholder:before,.ck .ck-placeholder:before{cursor:text;color:var(--ck-color-engine-placeholder-text)}\"},function(t,e,i){var n=i(1);var o=i(20);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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:calc(var(--ck-z-default) + 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-base-error:#db3700;--ck-color-focus-border:#1f89e5;--ck-color-focus-outer-shadow:#bcdefb;--ck-color-focus-disabled-shadow:rgba(119,186,248,0.3);--ck-color-focus-error-shadow:rgba(255,64,31,0.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,0.15);--ck-color-shadow-drop-active:rgba(0,0,0,0.2);--ck-color-shadow-inner:rgba(0,0,0,0.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-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-hover-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-hover-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-switch-button-off-background:#b0b0b0;--ck-color-switch-button-off-hover-background:#a3a3a3;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#579e3d;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,0.1);--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-error-border:var(--ck-color-base-error);--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-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-base-active);--ck-color-list-button-on-background-focus:var(--ck-color-base-active-focus);--ck-color-list-button-on-text: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:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,177,255,0.1);--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-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}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}: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-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--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(t,e,i){var n=i(1);var o=i(22);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.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-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}\"},function(t,e,i){var n=i(1);var o=i(24);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}\"},function(t,e,i){var n=i(1);var o=i(26);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(28);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.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}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{top:100%;bottom:auto}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}:root{--ck-dropdown-arrow-size:calc(0.5*var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.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__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}\"},function(t,e,i){var n=i(1);var o=i(30);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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 :not([fill]){fill:currentColor}\"},function(t,e,i){var n=i(1);var o=i(32);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:\"\";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.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{transition:opacity .2s ease-in-out .2s;border-style:solid;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-left-color:transparent;border-bottom-color:var(--ck-color-tooltip-background);border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.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-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}'},function(t,e,i){var n=i(1);var o=i(34);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.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:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button:focus:not(:hover) .ck-tooltip,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):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-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;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;-webkit-appearance:none}.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}.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}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.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-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] 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)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-right:calc(-1*var(--ck-spacing-small));margin-left:var(--ck-spacing-small)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.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):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-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-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-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(t,e,i){var n=i(1);var o=i(36);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{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{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;padding:calc(0.2*var(--ck-line-height-base)*var(--ck-font-size-base)) calc(0.4*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(1.2*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}\"},function(t,e,i){var n=i(1);var o=i(38);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:1.3846153847em}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(2*var(--ck-spacing-large))}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(2*var(--ck-spacing-large))}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(0.5*var(--ck-border-radius))}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var(--ck-switch-button-translation))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(-1*var(--ck-switch-button-translation)))}\"},function(t,e,i){var n=i(1);var o=i(40);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-toolbar-dropdown .ck.ck-toolbar .ck.ck-toolbar__items{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(t,e,i){var n=i(1);var o=i(42);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}\"},function(t,e,i){var n=i(1);var o=i(44);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.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 .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;margin-top:0;margin-bottom:0;background:var(--ck-color-toolbar-border)}.ck.ck-toolbar>.ck-toolbar__items>*{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>*,.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{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>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}\"},function(t,e,i){var n=i(1);var o=i(46);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(48);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:5px solid #ccc}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}\"},function(t,e){t.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}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}\"},function(t,e,i){var n=i(1);var o=i(51);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-resizer-size:10px;--ck-resizer-border-width:1px;--ck-resizer-border-radius:2px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-tooltip-offset:10px;--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2}.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.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 .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .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-focus-background)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle .ck-widget__selection-handle:hover,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-read-only .ck-widget{--ck-widget-outline-thickness:0}\"},function(t,e,i){var n=i(1);var o=i(53);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-labeled-input .ck-labeled-input__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-input .ck-labeled-input__status_error{color:var(--ck-color-base-error)}\"},function(t,e,i){var n=i(1);var o=i(55);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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:box-shadow .2s ease-in-out,border .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)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),var(--ck-inner-shadow)}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}\"},function(t,e,i){var n=i(1);var o=i(57);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-input{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-input{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}[dir=ltr] .ck.ck-text-alternative-form>:not(:first-child),[dir=rtl] .ck.ck-text-alternative-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-text-alternative-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-text-alternative-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-text-alternative-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-text-alternative-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-text-alternative-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-text-alternative-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}\"},function(t,e,i){var n=i(1);var o=i(59);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.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-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 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-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color: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-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);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))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{right:25%;margin-right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{left:25%;margin-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_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{right:25%;margin-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_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}'},function(t,e,i){var n=i(1);var o=i(61);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}\"},function(t,e,i){var n=i(1);var o=i(63);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{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);border-radius:var(--ck-border-radius);width:100%;height:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}\"},function(t,e,i){var n=i(1);var o=i(65);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image>img{display:block;margin:0 auto;max-width:100%;min-width:50px}\"},function(t,e,i){var n=i(1);var o=i(67);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}\"},function(t,e,i){var n=i(1);var o=i(69);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(71);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\"},function(t,e,i){var n=i(1);var o=i(73);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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:20px;--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:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);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:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}'},function(t,e,i){var n=i(1);var o=i(75);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports='.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:\"\";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}'},function(t,e,i){var n=i(1);var o=i(77);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}\"},function(t,e,i){var n=i(1);var o=i(79);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-input{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}[dir=ltr] .ck.ck-link-form>:not(:first-child),[dir=rtl] .ck.ck-link-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin-left:0}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}\"},function(t,e,i){var n=i(1);var o=i(81);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.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-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 .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:focus{outline:none}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{min-width:0;max-width:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):last-of-type{border-right:1px solid var(--ck-color-base-border)}}\"},function(t,e,i){var n=i(1);var o=i(83);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports='.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*=\"google.com/maps\"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(3*var(--ck-spacing-standard));background:var(--ck-color-base-foreground)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{min-width:var(--ck-media-embed-placeholder-icon-size);height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);background-position:50%;background-size:cover}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{width:100%;height:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);white-space:nowrap;text-align:center;font-style:italic;text-overflow:ellipsis}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*=\"open.spotify.com\"]{max-width:300px;max-height:380px}.ck-media__wrapper[data-oembed-url*=\"google.com/maps\"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMDAzLjc4IDEuNjFoNDkuNjIxYzEuNjk0IDAgMy4xOS0uNzk4IDQuMTQ2LTIuMDM3eiIgZmlsbD0iIzVjODhjNSIvPjxwYXRoIGQ9Ik0yMjYuNzQyIDIyMi45ODhjLTkuMjY2IDAtMTYuNzc3IDcuMTctMTYuNzc3IDE2LjAxNC4wMDcgMi43NjIuNjYzIDUuNDc0IDIuMDkzIDcuODc1LjQzLjcwMy44MyAxLjQwOCAxLjE5IDIuMTA3LjMzMy41MDIuNjUgMS4wMDUuOTUgMS41MDguMzQzLjQ3Ny42NzMuOTU3Ljk4OCAxLjQ0IDEuMzEgMS43NjkgMi41IDMuNTAyIDMuNjM3IDUuMTY4Ljc5MyAxLjI3NSAxLjY4MyAyLjY0IDIuNDY2IDMuOTkgMi4zNjMgNC4wOTQgNC4wMDcgOC4wOTIgNC42IDEzLjkxNHYuMDEyYy4xODIuNDEyLjUxNi42NjYuODc5LjY2Ny40MDMtLjAwMS43NjgtLjMxNC45My0uNzk5LjYwMy01Ljc1NiAyLjIzOC05LjcyOSA0LjU4NS0xMy43OTQuNzgyLTEuMzUgMS42NzMtMi43MTUgMi40NjUtMy45OSAxLjEzNy0xLjY2NiAyLjMyOC0zLjQgMy42MzgtNS4xNjkuMzE1LS40ODIuNjQ1LS45NjIuOTg4LTEuNDM5LjMtLjUwMy42MTctMS4wMDYuOTUtMS41MDguMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0eiIgZmlsbD0iI2RkNGIzZSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48ZWxsaXBzZSByeT0iNS41NjQiIHJ4PSI1LjgyOCIgY3k9IjIzOS4wMDIiIGN4PSIyMjYuNzQyIiBmaWxsPSIjODAyZDI3IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0xOTAuMzAxIDIzNy4yODNjLTQuNjcgMC04LjQ1NyAzLjg1My04LjQ1NyA4LjYwNnMzLjc4NiA4LjYwNyA4LjQ1NyA4LjYwN2MzLjA0MyAwIDQuODA2LS45NTggNi4zMzctMi41MTYgMS41My0xLjU1NyAyLjA4Ny0zLjkxMyAyLjA4Ny02LjI5IDAtLjM2Mi0uMDIzLS43MjItLjA2NC0xLjA3OWgtOC4yNTd2My4wNDNoNC44NWMtLjE5Ny43NTktLjUzMSAxLjQ1LTEuMDU4IDEuOTg2LS45NDIuOTU4LTIuMDI4IDEuNTQ4LTMuOTAxIDEuNTQ4LTIuODc2IDAtNS4yMDgtMi4zNzItNS4yMDgtNS4yOTkgMC0yLjkyNiAyLjMzMi01LjI5OSA1LjIwOC01LjI5OSAxLjM5OSAwIDIuNjE4LjQwNyAzLjU4NCAxLjI5M2wyLjM4MS0yLjM4YzAtLjAwMi0uMDAzLS4wMDQtLjAwNC0uMDA1LTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTV6bTQuNDMgNS42NmwuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxNS4xODQgMjUxLjkyOWwtNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMjMzIDUuMjMzIDAgMDAuNDQ5LTIuMTIzdi0zMS4xNjVjLS40NjkuNjc1LS45MzQgMS4zNDktMS4zODIgMi4wMDUtLjc5MiAxLjI3NS0xLjY4MiAyLjY0LTIuNDY1IDMuOTktMi4zNDcgNC4wNjUtMy45ODIgOC4wMzgtNC41ODUgMTMuNzk0LS4xNjIuNDg1LS41MjcuNzk4LS45My43OTktLjM2My0uMDAxLS42OTctLjI1NS0uODc5LS42Njd2LS4wMTJjLS41OTMtNS44MjItMi4yMzctOS44Mi00LjYtMTMuOTE0LS43ODMtMS4zNS0xLjY3My0yLjcxNS0yLjQ2Ni0zLjk5LTEuMTM3LTEuNjY2LTIuMzI3LTMuNC0zLjYzNy01LjE2OWwtLjAwMi0uMDAzeiIgZmlsbD0iI2MzYzNjMyIvPjxwYXRoIGQ9Ik0yMTIuOTgzIDI0OC40OTVsLTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAwNS4yMzggNS4yMzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYuMjc1IDEzNi4yNzUgMCAwMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAwLS45ODktMS40NCAzNS4xMjcgMzUuMTI3IDAgMDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OXoiIGZpbGw9IiNmZGRjNGYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxMS45OTggMjYxLjA4M2wtNi4xNTIgNi4xNTEgMjQuMjY0IDI0LjI2NGguNzgxYTUuMjI3IDUuMjI3IDAgMDA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*=\"facebook.com\"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c8,#b900b4,#f50000)}.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OXptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OXoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzN6bTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1ek00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*=\"instagram.com\"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*=\"twitter.com\"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}'},function(t,e,i){var n=i(1);var o=i(85);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-input{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-input{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}.ck.ck-media-form{padding:var(--ck-spacing-standard)}.ck.ck-media-form:focus{outline:none}[dir=ltr] .ck.ck-media-form>:not(:first-child),[dir=rtl] .ck.ck-media-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-media-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-media-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-media-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-media-form .ck-labeled-input .ck-labeled-input__error{white-space:normal}.ck.ck-media-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-media-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-media-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-media-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-media-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}\"},function(t,e,i){var n=i(1);var o=i(87);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}\"},function(t,e,i){var n=i(1);var o=i(89);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\":root{--ck-color-table-focused-cell-background:rgba(158,207,250,0.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}\"},function(t,e,i){var n=i(1);var o=i(91);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2);padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{width:var(--ck-insert-table-dropdown-box-width);height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);border:1px solid var(--ck-color-base-border);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-color-focus-border);background:var(--ck-color-focus-outer-shadow)}\"},function(t,e,i){var n=i(1);var o=i(93);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\":root{--ck-table-selected-cell-background:#cee5fd}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{background-color:var(--ck-table-selected-cell-background)!important;caret-color:transparent;outline:unset;box-shadow:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget_selected{outline:unset}\"},function(t,e,i){var n=i(1);var o=i(95);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border-color:#bfbfbf}.ck-content .table table th{font-weight:700;background:hsla(0,0%,0%,5%)}\"},function(t,e){t.exports=\".ck-content code{background-color:hsla(0,0%,78%,.3);padding:.15em;border-radius:2px}\"},function(t,e,i){var n=i(1);var o=i(98);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-left-radius:unset;border-bottom-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-radius:0}.ck-rounded-corners [dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow,[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:unset;border-bottom-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-right-radius:unset;border-bottom-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-left-color:var(--ck-color-split-button-hover-border)}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-right-color:var(--ck-color-split-button-hover-border)}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}\"},function(t,e,i){var n=i(1);var o=i(100);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck-content pre{padding:1em;color:#353535;background:hsla(0,0%,78%,.3);border:1px solid #c4c4c4;border-radius:2px;text-align:left;direction:ltr;tab-size:4;white-space:pre-wrap;font-style:normal;min-width:200px}.ck-content pre code{background:unset;padding:0;border-radius:0}.ck.ck-editor__editable pre{position:relative}.ck.ck-editor__editable pre[data-language]:after{content:attr(data-language);position:absolute}:root{--ck-color-code-block-label-background:#757575}.ck.ck-editor__editable pre[data-language]:after{top:-1px;right:10px;background:var(--ck-color-code-block-label-background);font-size:10px;font-family:var(--ck-font-face);line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);color:#fff;white-space:nowrap}.ck.ck-code-block-dropdown .ck-dropdown__panel{max-height:250px;overflow-y:auto;overflow-x:hidden}\"},function(t,e,i){var n=i(1);var o=i(102);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{width:var(--ck-color-grid-tile-size);height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{display:none;color:var(--ck-color-color-grid-check-icon)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}\"},function(t,e,i){var n=i(1);var o=i(104);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck .ck-button.ck-color-table__remove-color{display:flex;align-items:center;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}\"},function(t,e,i){var n=i(1);var o=i(106);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".text-tiny{font-size:.7em}.text-small{font-size:.85em}.text-big{font-size:1.4em}.text-huge{font-size:1.8em}\"},function(t,e,i){var n=i(1);var o=i(108);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\":root{--ck-highlight-marker-yellow:#fdfd77;--ck-highlight-marker-green:#63f963;--ck-highlight-marker-pink:#fc7999;--ck-highlight-marker-blue:#72cdfd;--ck-highlight-pen-red:#e91313;--ck-highlight-pen-green:#180}.ck-content .marker-yellow{background-color:var(--ck-highlight-marker-yellow)}.ck-content .marker-green{background-color:var(--ck-highlight-marker-green)}.ck-content .marker-pink{background-color:var(--ck-highlight-marker-pink)}.ck-content .marker-blue{background-color:var(--ck-highlight-marker-blue)}.ck-content .pen-red{color:var(--ck-highlight-pen-red);background-color:transparent}.ck-content .pen-green{color:var(--ck-highlight-pen-green);background-color:transparent}\"},function(t,e,i){var n=i(1);var o=i(110);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck-editor__editable .ck-horizontal-line{overflow:hidden}.ck-content hr{border:solid #5e5e5e;border-width:1px 0 0;margin:0}.ck-editor__editable .ck-horizontal-line{padding:5px 0}\"},function(t,e,i){var n=i(1);var o=i(112);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0;outline:1px solid var(--ck-color-resizer)}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all;width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nesw-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nesw-resize}\"},function(t,e,i){var n=i(1);var o=i(114);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}\"},function(module,__webpack_exports__,__webpack_require__){\"use strict\";var md5;var _unused_webpack_default_export=md5;(function(){var HxOverrides=function(){};HxOverrides.__name__=true;HxOverrides.dateStr=function(t){var e=t.getMonth()+1;var i=t.getDate();var n=t.getHours();var o=t.getMinutes();var r=t.getSeconds();return t.getFullYear()+\"-\"+(e<10?\"0\"+e:\"\"+e)+\"-\"+(i<10?\"0\"+i:\"\"+i)+\" \"+(n<10?\"0\"+n:\"\"+n)+\":\"+(o<10?\"0\"+o:\"\"+o)+\":\"+(r<10?\"0\"+r:\"\"+r)};HxOverrides.strDate=function(t){switch(t.length){case 8:var e=t.split(\":\");var i=new Date;i.setTime(0);i.setUTCHours(e[0]);i.setUTCMinutes(e[1]);i.setUTCSeconds(e[2]);return i;case 10:var e=t.split(\"-\");return new Date(e[0],e[1]-1,e[2],0,0,0);case 19:var e=t.split(\" \");var n=e[0].split(\"-\");var o=e[1].split(\":\");return new Date(n[0],n[1]-1,n[2],o[0],o[1],o[2]);default:throw\"Invalid date format : \"+t}};HxOverrides.cca=function(t,e){var i=t.charCodeAt(e);if(i!=i)return undefined;return i};HxOverrides.substr=function(t,e,i){if(e!=null&&e!=0&&i!=null&&i<0)return\"\";if(i==null)i=t.length;if(e<0){e=t.length+e;if(e<0)e=0}else if(i<0)i=t.length+i-e;return t.substr(e,i)};HxOverrides.remove=function(t,e){var i=0;var n=t.length;while(i<n){if(t[i]==e){t.splice(i,1);return true}i++}return false};HxOverrides.iter=function(t){return{cur:0,arr:t,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var IntIter=function(t,e){this.min=t;this.max=e};IntIter.__name__=true;IntIter.prototype={next:function(){return this.min++},hasNext:function(){return this.min<this.max},__class__:IntIter};var Std=function(){};Std.__name__=true;Std[\"is\"]=function(t,e){return js.Boot.__instanceof(t,e)};Std.string=function(t){return js.Boot.__string_rec(t,\"\")};Std[\"int\"]=function(t){return t|0};Std.parseInt=function(t){var e=parseInt(t,10);if(e==0&&(HxOverrides.cca(t,1)==120||HxOverrides.cca(t,1)==88))e=parseInt(t);if(isNaN(e))return null;return e};Std.parseFloat=function(t){return parseFloat(t)};Std.random=function(t){return Math.floor(Math.random()*t)};var com=com||{};if(!com.wiris)com.wiris={};if(!com.wiris.js)com.wiris.js={};com.wiris.js.JsPluginTools=function(){this.tryReady()};com.wiris.js.JsPluginTools.__name__=true;com.wiris.js.JsPluginTools.main=function(){var t;t=com.wiris.js.JsPluginTools.getInstance();haxe.Timer.delay($bind(t,t.tryReady),100)};com.wiris.js.JsPluginTools.getInstance=function(){if(com.wiris.js.JsPluginTools.instance==null)com.wiris.js.JsPluginTools.instance=new com.wiris.js.JsPluginTools;return com.wiris.js.JsPluginTools.instance};com.wiris.js.JsPluginTools.bypassEncapsulation=function(){if(window.com==null)window.com={};if(window.com.wiris==null)window.com.wiris={};if(window.com.wiris.js==null)window.com.wiris.js={};if(window.com.wiris.js.JsPluginTools==null)window.com.wiris.js.JsPluginTools=com.wiris.js.JsPluginTools.getInstance()};com.wiris.js.JsPluginTools.prototype={md5encode:function(t){return haxe.Md5.encode(t)},doLoad:function(){this.ready=true;com.wiris.js.JsPluginTools.instance=this;com.wiris.js.JsPluginTools.bypassEncapsulation()},tryReady:function(){this.ready=false;if(js.Lib.document.readyState){this.doLoad();this.ready=true}if(!this.ready)haxe.Timer.delay($bind(this,this.tryReady),100)},__class__:com.wiris.js.JsPluginTools};var haxe=haxe||{};haxe.Log=function(){};haxe.Log.__name__=true;haxe.Log.trace=function(t,e){js.Boot.__trace(t,e)};haxe.Log.clear=function(){js.Boot.__clear_trace()};haxe.Md5=function(){};haxe.Md5.__name__=true;haxe.Md5.encode=function(t){return(new haxe.Md5).doEncode(t)};haxe.Md5.prototype={doEncode:function(t){var e=this.str2blks(t);var i=1732584193;var n=-271733879;var o=-1732584194;var r=271733878;var s;var a=0;while(a<e.length){var c=i;var l=n;var d=o;var u=r;s=0;i=this.ff(i,n,o,r,e[a],7,-680876936);r=this.ff(r,i,n,o,e[a+1],12,-389564586);o=this.ff(o,r,i,n,e[a+2],17,606105819);n=this.ff(n,o,r,i,e[a+3],22,-1044525330);i=this.ff(i,n,o,r,e[a+4],7,-176418897);r=this.ff(r,i,n,o,e[a+5],12,1200080426);o=this.ff(o,r,i,n,e[a+6],17,-1473231341);n=this.ff(n,o,r,i,e[a+7],22,-45705983);i=this.ff(i,n,o,r,e[a+8],7,1770035416);r=this.ff(r,i,n,o,e[a+9],12,-1958414417);o=this.ff(o,r,i,n,e[a+10],17,-42063);n=this.ff(n,o,r,i,e[a+11],22,-1990404162);i=this.ff(i,n,o,r,e[a+12],7,1804603682);r=this.ff(r,i,n,o,e[a+13],12,-40341101);o=this.ff(o,r,i,n,e[a+14],17,-1502002290);n=this.ff(n,o,r,i,e[a+15],22,1236535329);i=this.gg(i,n,o,r,e[a+1],5,-165796510);r=this.gg(r,i,n,o,e[a+6],9,-1069501632);o=this.gg(o,r,i,n,e[a+11],14,643717713);n=this.gg(n,o,r,i,e[a],20,-373897302);i=this.gg(i,n,o,r,e[a+5],5,-701558691);r=this.gg(r,i,n,o,e[a+10],9,38016083);o=this.gg(o,r,i,n,e[a+15],14,-660478335);n=this.gg(n,o,r,i,e[a+4],20,-405537848);i=this.gg(i,n,o,r,e[a+9],5,568446438);r=this.gg(r,i,n,o,e[a+14],9,-1019803690);o=this.gg(o,r,i,n,e[a+3],14,-187363961);n=this.gg(n,o,r,i,e[a+8],20,1163531501);i=this.gg(i,n,o,r,e[a+13],5,-1444681467);r=this.gg(r,i,n,o,e[a+2],9,-51403784);o=this.gg(o,r,i,n,e[a+7],14,1735328473);n=this.gg(n,o,r,i,e[a+12],20,-1926607734);i=this.hh(i,n,o,r,e[a+5],4,-378558);r=this.hh(r,i,n,o,e[a+8],11,-2022574463);o=this.hh(o,r,i,n,e[a+11],16,1839030562);n=this.hh(n,o,r,i,e[a+14],23,-35309556);i=this.hh(i,n,o,r,e[a+1],4,-1530992060);r=this.hh(r,i,n,o,e[a+4],11,1272893353);o=this.hh(o,r,i,n,e[a+7],16,-155497632);n=this.hh(n,o,r,i,e[a+10],23,-1094730640);i=this.hh(i,n,o,r,e[a+13],4,681279174);r=this.hh(r,i,n,o,e[a],11,-358537222);o=this.hh(o,r,i,n,e[a+3],16,-722521979);n=this.hh(n,o,r,i,e[a+6],23,76029189);i=this.hh(i,n,o,r,e[a+9],4,-640364487);r=this.hh(r,i,n,o,e[a+12],11,-421815835);o=this.hh(o,r,i,n,e[a+15],16,530742520);n=this.hh(n,o,r,i,e[a+2],23,-995338651);i=this.ii(i,n,o,r,e[a],6,-198630844);r=this.ii(r,i,n,o,e[a+7],10,1126891415);o=this.ii(o,r,i,n,e[a+14],15,-1416354905);n=this.ii(n,o,r,i,e[a+5],21,-57434055);i=this.ii(i,n,o,r,e[a+12],6,1700485571);r=this.ii(r,i,n,o,e[a+3],10,-1894986606);o=this.ii(o,r,i,n,e[a+10],15,-1051523);n=this.ii(n,o,r,i,e[a+1],21,-2054922799);i=this.ii(i,n,o,r,e[a+8],6,1873313359);r=this.ii(r,i,n,o,e[a+15],10,-30611744);o=this.ii(o,r,i,n,e[a+6],15,-1560198380);n=this.ii(n,o,r,i,e[a+13],21,1309151649);i=this.ii(i,n,o,r,e[a+4],6,-145523070);r=this.ii(r,i,n,o,e[a+11],10,-1120210379);o=this.ii(o,r,i,n,e[a+2],15,718787259);n=this.ii(n,o,r,i,e[a+9],21,-343485551);i=this.addme(i,c);n=this.addme(n,l);o=this.addme(o,d);r=this.addme(r,u);a+=16}return this.rhex(i)+this.rhex(n)+this.rhex(o)+this.rhex(r)},ii:function(t,e,i,n,o,r,s){return this.cmn(this.bitXOR(i,this.bitOR(e,~n)),t,e,o,r,s)},hh:function(t,e,i,n,o,r,s){return this.cmn(this.bitXOR(this.bitXOR(e,i),n),t,e,o,r,s)},gg:function(t,e,i,n,o,r,s){return this.cmn(this.bitOR(this.bitAND(e,n),this.bitAND(i,~n)),t,e,o,r,s)},ff:function(t,e,i,n,o,r,s){return this.cmn(this.bitOR(this.bitAND(e,i),this.bitAND(~e,n)),t,e,o,r,s)},cmn:function(t,e,i,n,o,r){return this.addme(this.rol(this.addme(this.addme(e,t),this.addme(n,r)),o),i)},rol:function(t,e){return t<<e|t>>>32-e},str2blks:function(t){var e=(t.length+8>>6)+1;var i=new Array;var n=0,o=e*16;while(n<o){var r=n++;i[r]=0}var r=0;while(r<t.length){i[r>>2]|=HxOverrides.cca(t,r)<<(t.length*8+r)%4*8;r++}i[r>>2]|=128<<(t.length*8+r)%4*8;var s=t.length*8;var a=e*16-2;i[a]=s&255;i[a]|=(s>>>8&255)<<8;i[a]|=(s>>>16&255)<<16;i[a]|=(s>>>24&255)<<24;return i},rhex:function(t){var e=\"\";var i=\"0123456789abcdef\";var n=0;while(n<4){var o=n++;e+=i.charAt(t>>o*8+4&15)+i.charAt(t>>o*8&15)}return e},addme:function(t,e){var i=(t&65535)+(e&65535);var n=(t>>16)+(e>>16)+(i>>16);return n<<16|i&65535},bitAND:function(t,e){var i=t&1&(e&1);var n=t>>>1&e>>>1;return n<<1|i},bitXOR:function(t,e){var i=t&1^e&1;var n=t>>>1^e>>>1;return n<<1|i},bitOR:function(t,e){var i=t&1|e&1;var n=t>>>1|e>>>1;return n<<1|i},__class__:haxe.Md5};haxe.Timer=function(t){var e=this;this.id=window.setInterval((function(){e.run()}),t)};haxe.Timer.__name__=true;haxe.Timer.delay=function(t,e){var i=new haxe.Timer(e);i.run=function(){i.stop();t()};return i};haxe.Timer.measure=function(t,e){var i=haxe.Timer.stamp();var n=t();haxe.Log.trace(haxe.Timer.stamp()-i+\"s\",e);return n};haxe.Timer.stamp=function(){return(new Date).getTime()/1e3};haxe.Timer.prototype={run:function(){},stop:function(){if(this.id==null)return;window.clearInterval(this.id);this.id=null},__class__:haxe.Timer};var js=js||{};js.Boot=function(){};js.Boot.__name__=true;js.Boot.__unhtml=function(t){return t.split(\"&\").join(\"&amp;\").split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\")};js.Boot.__trace=function(t,e){var i=e!=null?e.fileName+\":\"+e.lineNumber+\": \":\"\";i+=js.Boot.__string_rec(t,\"\");var n;if(typeof document!=\"undefined\"&&(n=document.getElementById(\"haxe:trace\"))!=null)n.innerHTML+=js.Boot.__unhtml(i)+\"<br/>\";else if(typeof console!=\"undefined\"&&console.log!=null)console.log(i)};js.Boot.__clear_trace=function(){var t=document.getElementById(\"haxe:trace\");if(t!=null)t.innerHTML=\"\"};js.Boot.isClass=function(t){return t.__name__};js.Boot.isEnum=function(t){return t.__ename__};js.Boot.getClass=function(t){return t.__class__};js.Boot.__string_rec=function(t,e){if(t==null)return\"null\";if(e.length>=5)return\"<...>\";var i=typeof t;if(i==\"function\"&&(t.__name__||t.__ename__))i=\"object\";switch(i){case\"object\":if(t instanceof Array){if(t.__enum__){if(t.length==2)return t[0];var n=t[0]+\"(\";e+=\"\\t\";var o=2,r=t.length;while(o<r){var s=o++;if(s!=2)n+=\",\"+js.Boot.__string_rec(t[s],e);else n+=js.Boot.__string_rec(t[s],e)}return n+\")\"}var a=t.length;var s;var n=\"[\";e+=\"\\t\";var r=0;while(r<a){var c=r++;n+=(c>0?\",\":\"\")+js.Boot.__string_rec(t[c],e)}n+=\"]\";return n}var l;try{l=t.toString}catch(t){return\"???\"}if(l!=null&&l!=Object.toString){var d=t.toString();if(d!=\"[object Object]\")return d}var u=null;var n=\"{\\n\";e+=\"\\t\";var h=t.hasOwnProperty!=null;for(var u in t){if(h&&!t.hasOwnProperty(u)){continue}if(u==\"prototype\"||u==\"__class__\"||u==\"__super__\"||u==\"__interfaces__\"||u==\"__properties__\"){continue}if(n.length!=2)n+=\", \\n\";n+=e+u+\" : \"+js.Boot.__string_rec(t[u],e)}e=e.substring(1);n+=\"\\n\"+e+\"}\";return n;case\"function\":return\"<function>\";case\"string\":return t;default:return String(t)}};js.Boot.__interfLoop=function(t,e){if(t==null)return false;if(t==e)return true;var i=t.__interfaces__;if(i!=null){var n=0,o=i.length;while(n<o){var r=n++;var s=i[r];if(s==e||js.Boot.__interfLoop(s,e))return true}}return js.Boot.__interfLoop(t.__super__,e)};js.Boot.__instanceof=function(t,e){try{if(t instanceof e){if(e==Array)return t.__enum__==null;return true}if(js.Boot.__interfLoop(t.__class__,e))return true}catch(t){if(e==null)return false}switch(e){case Int:return Math.ceil(t%2147483648)===t;case Float:return typeof t==\"number\";case Bool:return t===true||t===false;case String:return typeof t==\"string\";case Dynamic:return true;default:if(t==null)return false;if(e==Class&&t.__name__!=null)return true;else null;if(e==Enum&&t.__ename__!=null)return true;else null;return t.__enum__==e}};js.Boot.__cast=function(t,e){if(js.Boot.__instanceof(t,e))return t;else throw\"Cannot cast \"+Std.string(t)+\" to \"+Std.string(e)};js.Lib=function(){};js.Lib.__name__=true;js.Lib.debug=function(){debugger};js.Lib.alert=function(t){alert(js.Boot.__string_rec(t,\"\"))};js.Lib.eval=function(code){return eval(code)};js.Lib.setErrorHandler=function(t){js.Lib.onerror=t};var $_;function $bind(t,e){var i=function(){return i.method.apply(i.scope,arguments)};i.scope=t;i.method=e;return i}if(Array.prototype.indexOf)HxOverrides.remove=function(t,e){var i=t.indexOf(e);if(i==-1)return false;t.splice(i,1);return true};else null;Math.__name__=[\"Math\"];Math.NaN=Number.NaN;Math.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Math.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Math.isFinite=function(t){return isFinite(t)};Math.isNaN=function(t){return isNaN(t)};String.prototype.__class__=String;String.__name__=true;Array.prototype.__class__=Array;Array.__name__=true;Date.prototype.__class__=Date;Date.__name__=[\"Date\"];var Int={__name__:[\"Int\"]};var Dynamic={__name__:[\"Dynamic\"]};var Float=Number;Float.__name__=[\"Float\"];var Bool=Boolean;Bool.__ename__=[\"Bool\"];var Class={__name__:[\"Class\"]};var Enum={};var Void={__ename__:[\"Void\"]};if(typeof document!=\"undefined\")js.Lib.document=document;if(typeof window!=\"undefined\"){js.Lib.window=window;js.Lib.window.onerror=function(t,e,i){var n=js.Lib.onerror;if(n==null)return false;return n(t,[e+\":\"+i])}}com.wiris.js.JsPluginTools.main();delete Array.prototype.__class__})();(function(){var HxOverrides=function(){};HxOverrides.__name__=true;HxOverrides.dateStr=function(t){var e=t.getMonth()+1;var i=t.getDate();var n=t.getHours();var o=t.getMinutes();var r=t.getSeconds();return t.getFullYear()+\"-\"+(e<10?\"0\"+e:\"\"+e)+\"-\"+(i<10?\"0\"+i:\"\"+i)+\" \"+(n<10?\"0\"+n:\"\"+n)+\":\"+(o<10?\"0\"+o:\"\"+o)+\":\"+(r<10?\"0\"+r:\"\"+r)};HxOverrides.strDate=function(t){switch(t.length){case 8:var e=t.split(\":\");var i=new Date;i.setTime(0);i.setUTCHours(e[0]);i.setUTCMinutes(e[1]);i.setUTCSeconds(e[2]);return i;case 10:var e=t.split(\"-\");return new Date(e[0],e[1]-1,e[2],0,0,0);case 19:var e=t.split(\" \");var n=e[0].split(\"-\");var o=e[1].split(\":\");return new Date(n[0],n[1]-1,n[2],o[0],o[1],o[2]);default:throw\"Invalid date format : \"+t}};HxOverrides.cca=function(t,e){var i=t.charCodeAt(e);if(i!=i)return undefined;return i};HxOverrides.substr=function(t,e,i){if(e!=null&&e!=0&&i!=null&&i<0)return\"\";if(i==null)i=t.length;if(e<0){e=t.length+e;if(e<0)e=0}else if(i<0)i=t.length+i-e;return t.substr(e,i)};HxOverrides.remove=function(t,e){var i=0;var n=t.length;while(i<n){if(t[i]==e){t.splice(i,1);return true}i++}return false};HxOverrides.iter=function(t){return{cur:0,arr:t,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var IntIter=function(t,e){this.min=t;this.max=e};IntIter.__name__=true;IntIter.prototype={next:function(){return this.min++},hasNext:function(){return this.min<this.max},__class__:IntIter};var Std=function(){};Std.__name__=true;Std[\"is\"]=function(t,e){return js.Boot.__instanceof(t,e)};Std.string=function(t){return js.Boot.__string_rec(t,\"\")};Std[\"int\"]=function(t){return t|0};Std.parseInt=function(t){var e=parseInt(t,10);if(e==0&&(HxOverrides.cca(t,1)==120||HxOverrides.cca(t,1)==88))e=parseInt(t);if(isNaN(e))return null;return e};Std.parseFloat=function(t){return parseFloat(t)};Std.random=function(t){return Math.floor(Math.random()*t)};var com=com||{};if(!com.wiris)com.wiris={};if(!com.wiris.js)com.wiris.js={};com.wiris.js.JsPluginTools=function(){this.tryReady()};com.wiris.js.JsPluginTools.__name__=true;com.wiris.js.JsPluginTools.main=function(){var t;t=com.wiris.js.JsPluginTools.getInstance();haxe.Timer.delay($bind(t,t.tryReady),100)};com.wiris.js.JsPluginTools.getInstance=function(){if(com.wiris.js.JsPluginTools.instance==null)com.wiris.js.JsPluginTools.instance=new com.wiris.js.JsPluginTools;return com.wiris.js.JsPluginTools.instance};com.wiris.js.JsPluginTools.bypassEncapsulation=function(){if(window.com==null)window.com={};if(window.com.wiris==null)window.com.wiris={};if(window.com.wiris.js==null)window.com.wiris.js={};if(window.com.wiris.js.JsPluginTools==null)window.com.wiris.js.JsPluginTools=com.wiris.js.JsPluginTools.getInstance()};com.wiris.js.JsPluginTools.prototype={md5encode:function(t){return haxe.Md5.encode(t)},doLoad:function(){this.ready=true;com.wiris.js.JsPluginTools.instance=this;com.wiris.js.JsPluginTools.bypassEncapsulation()},tryReady:function(){this.ready=false;if(js.Lib.document.readyState){this.doLoad();this.ready=true}if(!this.ready)haxe.Timer.delay($bind(this,this.tryReady),100)},__class__:com.wiris.js.JsPluginTools};var haxe=haxe||{};haxe.Log=function(){};haxe.Log.__name__=true;haxe.Log.trace=function(t,e){js.Boot.__trace(t,e)};haxe.Log.clear=function(){js.Boot.__clear_trace()};haxe.Md5=function(){};haxe.Md5.__name__=true;haxe.Md5.encode=function(t){return(new haxe.Md5).doEncode(t)};haxe.Md5.prototype={doEncode:function(t){var e=this.str2blks(t);var i=1732584193;var n=-271733879;var o=-1732584194;var r=271733878;var s;var a=0;while(a<e.length){var c=i;var l=n;var d=o;var u=r;s=0;i=this.ff(i,n,o,r,e[a],7,-680876936);r=this.ff(r,i,n,o,e[a+1],12,-389564586);o=this.ff(o,r,i,n,e[a+2],17,606105819);n=this.ff(n,o,r,i,e[a+3],22,-1044525330);i=this.ff(i,n,o,r,e[a+4],7,-176418897);r=this.ff(r,i,n,o,e[a+5],12,1200080426);o=this.ff(o,r,i,n,e[a+6],17,-1473231341);n=this.ff(n,o,r,i,e[a+7],22,-45705983);i=this.ff(i,n,o,r,e[a+8],7,1770035416);r=this.ff(r,i,n,o,e[a+9],12,-1958414417);o=this.ff(o,r,i,n,e[a+10],17,-42063);n=this.ff(n,o,r,i,e[a+11],22,-1990404162);i=this.ff(i,n,o,r,e[a+12],7,1804603682);r=this.ff(r,i,n,o,e[a+13],12,-40341101);o=this.ff(o,r,i,n,e[a+14],17,-1502002290);n=this.ff(n,o,r,i,e[a+15],22,1236535329);i=this.gg(i,n,o,r,e[a+1],5,-165796510);r=this.gg(r,i,n,o,e[a+6],9,-1069501632);o=this.gg(o,r,i,n,e[a+11],14,643717713);n=this.gg(n,o,r,i,e[a],20,-373897302);i=this.gg(i,n,o,r,e[a+5],5,-701558691);r=this.gg(r,i,n,o,e[a+10],9,38016083);o=this.gg(o,r,i,n,e[a+15],14,-660478335);n=this.gg(n,o,r,i,e[a+4],20,-405537848);i=this.gg(i,n,o,r,e[a+9],5,568446438);r=this.gg(r,i,n,o,e[a+14],9,-1019803690);o=this.gg(o,r,i,n,e[a+3],14,-187363961);n=this.gg(n,o,r,i,e[a+8],20,1163531501);i=this.gg(i,n,o,r,e[a+13],5,-1444681467);r=this.gg(r,i,n,o,e[a+2],9,-51403784);o=this.gg(o,r,i,n,e[a+7],14,1735328473);n=this.gg(n,o,r,i,e[a+12],20,-1926607734);i=this.hh(i,n,o,r,e[a+5],4,-378558);r=this.hh(r,i,n,o,e[a+8],11,-2022574463);o=this.hh(o,r,i,n,e[a+11],16,1839030562);n=this.hh(n,o,r,i,e[a+14],23,-35309556);i=this.hh(i,n,o,r,e[a+1],4,-1530992060);r=this.hh(r,i,n,o,e[a+4],11,1272893353);o=this.hh(o,r,i,n,e[a+7],16,-155497632);n=this.hh(n,o,r,i,e[a+10],23,-1094730640);i=this.hh(i,n,o,r,e[a+13],4,681279174);r=this.hh(r,i,n,o,e[a],11,-358537222);o=this.hh(o,r,i,n,e[a+3],16,-722521979);n=this.hh(n,o,r,i,e[a+6],23,76029189);i=this.hh(i,n,o,r,e[a+9],4,-640364487);r=this.hh(r,i,n,o,e[a+12],11,-421815835);o=this.hh(o,r,i,n,e[a+15],16,530742520);n=this.hh(n,o,r,i,e[a+2],23,-995338651);i=this.ii(i,n,o,r,e[a],6,-198630844);r=this.ii(r,i,n,o,e[a+7],10,1126891415);o=this.ii(o,r,i,n,e[a+14],15,-1416354905);n=this.ii(n,o,r,i,e[a+5],21,-57434055);i=this.ii(i,n,o,r,e[a+12],6,1700485571);r=this.ii(r,i,n,o,e[a+3],10,-1894986606);o=this.ii(o,r,i,n,e[a+10],15,-1051523);n=this.ii(n,o,r,i,e[a+1],21,-2054922799);i=this.ii(i,n,o,r,e[a+8],6,1873313359);r=this.ii(r,i,n,o,e[a+15],10,-30611744);o=this.ii(o,r,i,n,e[a+6],15,-1560198380);n=this.ii(n,o,r,i,e[a+13],21,1309151649);i=this.ii(i,n,o,r,e[a+4],6,-145523070);r=this.ii(r,i,n,o,e[a+11],10,-1120210379);o=this.ii(o,r,i,n,e[a+2],15,718787259);n=this.ii(n,o,r,i,e[a+9],21,-343485551);i=this.addme(i,c);n=this.addme(n,l);o=this.addme(o,d);r=this.addme(r,u);a+=16}return this.rhex(i)+this.rhex(n)+this.rhex(o)+this.rhex(r)},ii:function(t,e,i,n,o,r,s){return this.cmn(this.bitXOR(i,this.bitOR(e,~n)),t,e,o,r,s)},hh:function(t,e,i,n,o,r,s){return this.cmn(this.bitXOR(this.bitXOR(e,i),n),t,e,o,r,s)},gg:function(t,e,i,n,o,r,s){return this.cmn(this.bitOR(this.bitAND(e,n),this.bitAND(i,~n)),t,e,o,r,s)},ff:function(t,e,i,n,o,r,s){return this.cmn(this.bitOR(this.bitAND(e,i),this.bitAND(~e,n)),t,e,o,r,s)},cmn:function(t,e,i,n,o,r){return this.addme(this.rol(this.addme(this.addme(e,t),this.addme(n,r)),o),i)},rol:function(t,e){return t<<e|t>>>32-e},str2blks:function(t){var e=(t.length+8>>6)+1;var i=new Array;var n=0,o=e*16;while(n<o){var r=n++;i[r]=0}var r=0;while(r<t.length){i[r>>2]|=HxOverrides.cca(t,r)<<(t.length*8+r)%4*8;r++}i[r>>2]|=128<<(t.length*8+r)%4*8;var s=t.length*8;var a=e*16-2;i[a]=s&255;i[a]|=(s>>>8&255)<<8;i[a]|=(s>>>16&255)<<16;i[a]|=(s>>>24&255)<<24;return i},rhex:function(t){var e=\"\";var i=\"0123456789abcdef\";var n=0;while(n<4){var o=n++;e+=i.charAt(t>>o*8+4&15)+i.charAt(t>>o*8&15)}return e},addme:function(t,e){var i=(t&65535)+(e&65535);var n=(t>>16)+(e>>16)+(i>>16);return n<<16|i&65535},bitAND:function(t,e){var i=t&1&(e&1);var n=t>>>1&e>>>1;return n<<1|i},bitXOR:function(t,e){var i=t&1^e&1;var n=t>>>1^e>>>1;return n<<1|i},bitOR:function(t,e){var i=t&1|e&1;var n=t>>>1|e>>>1;return n<<1|i},__class__:haxe.Md5};haxe.Timer=function(t){var e=this;this.id=window.setInterval((function(){e.run()}),t)};haxe.Timer.__name__=true;haxe.Timer.delay=function(t,e){var i=new haxe.Timer(e);i.run=function(){i.stop();t()};return i};haxe.Timer.measure=function(t,e){var i=haxe.Timer.stamp();var n=t();haxe.Log.trace(haxe.Timer.stamp()-i+\"s\",e);return n};haxe.Timer.stamp=function(){return(new Date).getTime()/1e3};haxe.Timer.prototype={run:function(){},stop:function(){if(this.id==null)return;window.clearInterval(this.id);this.id=null},__class__:haxe.Timer};var js=js||{};js.Boot=function(){};js.Boot.__name__=true;js.Boot.__unhtml=function(t){return t.split(\"&\").join(\"&amp;\").split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\")};js.Boot.__trace=function(t,e){var i=e!=null?e.fileName+\":\"+e.lineNumber+\": \":\"\";i+=js.Boot.__string_rec(t,\"\");var n;if(typeof document!=\"undefined\"&&(n=document.getElementById(\"haxe:trace\"))!=null)n.innerHTML+=js.Boot.__unhtml(i)+\"<br/>\";else if(typeof console!=\"undefined\"&&console.log!=null)console.log(i)};js.Boot.__clear_trace=function(){var t=document.getElementById(\"haxe:trace\");if(t!=null)t.innerHTML=\"\"};js.Boot.isClass=function(t){return t.__name__};js.Boot.isEnum=function(t){return t.__ename__};js.Boot.getClass=function(t){return t.__class__};js.Boot.__string_rec=function(t,e){if(t==null)return\"null\";if(e.length>=5)return\"<...>\";var i=typeof t;if(i==\"function\"&&(t.__name__||t.__ename__))i=\"object\";switch(i){case\"object\":if(t instanceof Array){if(t.__enum__){if(t.length==2)return t[0];var n=t[0]+\"(\";e+=\"\\t\";var o=2,r=t.length;while(o<r){var s=o++;if(s!=2)n+=\",\"+js.Boot.__string_rec(t[s],e);else n+=js.Boot.__string_rec(t[s],e)}return n+\")\"}var a=t.length;var s;var n=\"[\";e+=\"\\t\";var r=0;while(r<a){var c=r++;n+=(c>0?\",\":\"\")+js.Boot.__string_rec(t[c],e)}n+=\"]\";return n}var l;try{l=t.toString}catch(t){return\"???\"}if(l!=null&&l!=Object.toString){var d=t.toString();if(d!=\"[object Object]\")return d}var u=null;var n=\"{\\n\";e+=\"\\t\";var h=t.hasOwnProperty!=null;for(var u in t){if(h&&!t.hasOwnProperty(u)){continue}if(u==\"prototype\"||u==\"__class__\"||u==\"__super__\"||u==\"__interfaces__\"||u==\"__properties__\"){continue}if(n.length!=2)n+=\", \\n\";n+=e+u+\" : \"+js.Boot.__string_rec(t[u],e)}e=e.substring(1);n+=\"\\n\"+e+\"}\";return n;case\"function\":return\"<function>\";case\"string\":return t;default:return String(t)}};js.Boot.__interfLoop=function(t,e){if(t==null)return false;if(t==e)return true;var i=t.__interfaces__;if(i!=null){var n=0,o=i.length;while(n<o){var r=n++;var s=i[r];if(s==e||js.Boot.__interfLoop(s,e))return true}}return js.Boot.__interfLoop(t.__super__,e)};js.Boot.__instanceof=function(t,e){try{if(t instanceof e){if(e==Array)return t.__enum__==null;return true}if(js.Boot.__interfLoop(t.__class__,e))return true}catch(t){if(e==null)return false}switch(e){case Int:return Math.ceil(t%2147483648)===t;case Float:return typeof t==\"number\";case Bool:return t===true||t===false;case String:return typeof t==\"string\";case Dynamic:return true;default:if(t==null)return false;if(e==Class&&t.__name__!=null)return true;else null;if(e==Enum&&t.__ename__!=null)return true;else null;return t.__enum__==e}};js.Boot.__cast=function(t,e){if(js.Boot.__instanceof(t,e))return t;else throw\"Cannot cast \"+Std.string(t)+\" to \"+Std.string(e)};js.Lib=function(){};js.Lib.__name__=true;js.Lib.debug=function(){debugger};js.Lib.alert=function(t){alert(js.Boot.__string_rec(t,\"\"))};js.Lib.eval=function(code){return eval(code)};js.Lib.setErrorHandler=function(t){js.Lib.onerror=t};var $_;function $bind(t,e){var i=function(){return i.method.apply(i.scope,arguments)};i.scope=t;i.method=e;return i}if(Array.prototype.indexOf)HxOverrides.remove=function(t,e){var i=t.indexOf(e);if(i==-1)return false;t.splice(i,1);return true};else null;Math.__name__=[\"Math\"];Math.NaN=Number.NaN;Math.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Math.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Math.isFinite=function(t){return isFinite(t)};Math.isNaN=function(t){return isNaN(t)};String.prototype.__class__=String;String.__name__=true;Array.prototype.__class__=Array;Array.__name__=true;Date.prototype.__class__=Date;Date.__name__=[\"Date\"];var Int={__name__:[\"Int\"]};var Dynamic={__name__:[\"Dynamic\"]};var Float=Number;Float.__name__=[\"Float\"];var Bool=Boolean;Bool.__ename__=[\"Bool\"];var Class={__name__:[\"Class\"]};var Enum={};var Void={__ename__:[\"Void\"]};if(typeof document!=\"undefined\")js.Lib.document=document;if(typeof window!=\"undefined\"){js.Lib.window=window;js.Lib.window.onerror=function(t,e,i){var n=js.Lib.onerror;if(n==null)return false;return n(t,[e+\":\"+i])}}com.wiris.js.JsPluginTools.main()})();delete Array.prototype.__class__},function(t,e,i){var n=i(1);var o=i(117);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".wrs_modal_overlay{position:fixed;font-family:arial,sans-serif;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.8);z-index:999998;opacity:.65;pointer-events:auto}.wrs_modal_overlay.wrs_modal_android,.wrs_modal_overlay.wrs_modal_ios{visibility:hidden;display:none}.wrs_modal_overlay.wrs_modal_ios.moodle{position:fixed}.wrs_modal_overlay.wrs_modal_desktop.wrs_stack{background:transparent;display:none}.wrs_modal_overlay.wrs_modal_desktop.wrs_maximized{background:rgba(0,0,0,.8)}.wrs_modal_overlay.wrs_modal_desktop.wrs_closed,.wrs_modal_overlay.wrs_modal_desktop.wrs_minimized{background:transparent;display:none}.wrs_modal_title{color:#fff;padding:5px 0 5px 10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;text-align:left}.wrs_modal_close_button{background-repeat:no-repeat}.wrs_modal_close_button,.wrs_modal_minimize_button{float:right;cursor:pointer;color:#fff;padding:5px 10px 5px 0;margin:10px 7px 0 0}.wrs_modal_minimize_button{top:inherit}.wrs_modal_stack_button{float:right;cursor:pointer;color:#fff;margin:10px 7px 0 0;padding:5px 10px 5px 0;top:inherit}.wrs_modal_stack_button.wrs_minimized,.wrs_modal_stack_button.wrs_stack{visibility:hidden;margin:0;padding:0}.wrs_modal_maximize_button{float:right;cursor:pointer;color:#fff;margin:10px 7px 0 0;padding:5px 10px 5px 0;top:inherit}.wrs_modal_maximize_button.wrs_maximized{visibility:hidden;margin:0;padding:0}.wrs_modal_wrapper{display:block}.wrs_modal_title_bar{display:block;background-color:#778e9a}.wrs_modal_dialogContainer{border:none;background:#fafafa;z-index:999999}.wrs_modal_dialogContainer.wrs_modal_desktop{font-size:14px}.wrs_modal_dialogContainer.wrs_modal_desktop.wrs_maximized{position:fixed}.wrs_modal_dialogContainer.wrs_modal_desktop.wrs_minimized{position:fixed;top:inherit;margin:0 10px 0 0}.wrs_modal_dialogContainer.wrs_closed{visibility:hidden;display:none;opacity:0}.wrs_modal_dialogContainer.wrs_modal_desktop.wrs_stack{position:fixed;bottom:0;right:0;box-shadow:0 2px 8px rgba(0,0,0,.5)}.wrs_modal_dialogContainer.wrs_drag,.wrs_modal_dialogContainer.wrs_modal_desktop.wrs_drag{box-shadow:0 2px 8px rgba(0,0,0,.5)}.wrs_modal_dialogContainer.wrs_modal_android{width:99%;height:99%}.wrs_modal_dialogContainer.wrs_modal_android,.wrs_modal_dialogContainer.wrs_modal_ios{margin:auto;overflow:hidden;transform:translate(50%,-50%);top:50%;right:50%!important;position:fixed}.wrs_modal_dialogContainer.wrs_modal_ios{width:100%;height:100%}.wrs_content_container.wrs_minimized{display:none}.wrs_content_container.wrs_modal_android{width:100%;flex-grow:1;display:flex;flex-direction:column}.wrs_content_container.wrs_modal_android>div:first-child,.wrs_content_container.wrs_modal_desktop>div:first-child,.wrs_content_container.wrs_modal_ios>div:first-child{flex-grow:1}.wrs_modal_wrapper.wrs_modal_android{margin:auto;display:flex;flex-direction:column;height:100%;width:100%}.wrs_content_container.wrs_modal_desktop,.wrs_content_container.wrs_modal_ios{width:100%;flex-grow:1;display:flex;flex-direction:column}.wrs_modal_wrapper.wrs_modal_ios{margin:auto;display:flex;flex-direction:column;height:100%;width:100%}.wrs_virtual_keyboard{height:100%;width:100%;top:0;left:50%;transform:translate(-50%)}@media (orientation:portrait){.wrs_modal_dialogContainer.wrs_modal_mobile{width:100vmin;height:100vmin;margin:auto;border-width:0}.wrs_modal_wrapper.wrs_modal_mobile{width:100vmin;height:100vmin;margin:auto}}@media (orientation:landscape){.wrs_modal_dialogContainer.wrs_modal_mobile{width:100vmin;height:100vmin;margin:auto;border-width:0}.wrs_modal_wrapper.wrs_modal_mobile{width:100vmin;height:100vmin;margin:auto}}.wrs_modal_dialogContainer.wrs_modal_badStock,.wrs_modal_wrapper.wrs_modal_badStock{width:100%;height:280px;margin:0 auto;border-width:0}.wrs_noselect{-khtml-user-select:none}.wrs_bottom_right_resizer,.wrs_noselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.wrs_bottom_right_resizer{width:10px;height:10px;color:#778e9a;position:absolute;right:4px;bottom:8px;cursor:se-resize}.wrs_bottom_left_resizer{width:15px;height:15px;color:#778e9a;position:absolute;left:0;top:0;cursor:se-resize}.wrs_modal_controls{height:42px;margin:3px 0;overflow:hidden;line-height:normal}.wrs_modal_links{margin:10px auto 0;font-family:arial,sans-serif;padding:6px;display:inline;float:right;text-align:right}.wrs_modal_links>a{text-decoration:none;color:#778e9a;font-size:16px}.wrs_modal_button_cancel,.wrs_modal_button_cancel:active,.wrs_modal_button_cancel:focus,.wrs_modal_button_cancel:hover,.wrs_modal_button_cancel:visited{min-width:80px;font-size:14px;border-radius:3px;border:1px solid #778e9a;padding:6px 8px;margin:10px auto 0 5px;cursor:pointer;font-family:arial,sans-serif;background-color:#ddd;height:32px}.wrs_modal_button_accept,.wrs_modal_button_accept:active,.wrs_modal_button_accept:focus,.wrs_modal_button_accept:hover,.wrs_modal_button_accept:visited{min-width:80px;font-size:14px;border-radius:3px;border:1px solid #778e9a;padding:6px 8px;margin:10px 5px 0 auto;color:#fff;background:#778e9a;cursor:pointer;font-family:arial,sans-serif;height:32px}.wrs_editor_vertical_bar{height:20px;float:right;background:none;width:20px;cursor:pointer}.wrs_modal_buttons_container{display:inline;float:left}.wrs_modal_buttons_container.wrs_modalAndroid{padding-left:6px}.wrs_modal_buttons_container.wrs_modalDesktop{padding-left:0}.wrs_modal_buttons_container>button{line-height:normal;background-image:none}.wrs_modal_wrapper{margin:6px;display:flex;flex-direction:column}.wrs_modal_wrapper.wrs_modal_desktop.wrs_minimized{display:none}@media only screen and (max-device-width:480px) and (orientation:portrait){#wrs_modal_wrapper{width:140%}}.wrs_popupmessage_overlay_envolture{display:none;width:100%}.wrs_popupmessage_overlay{position:absolute;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);z-index:4;cursor:pointer}.wrs_popupmessage_panel{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;background:#fff;max-width:500px;width:75%;border-radius:2px;padding:20px;font-family:sans-serif;font-size:15px;text-align:left;color:#2e2e2e;z-index:5;max-height:75%;overflow:auto}.wrs_popupmessage_button_area{margin:10px 0 0}.wrs_panelContainer *{border:0}.wrs_button_cancel,.wrs_button_cancel:active,.wrs_button_cancel:focus,.wrs_button_cancel:hover,.wrs_button_cancel:visited{min-width:80px;font-size:14px;border-radius:3px;border:1px solid #778e9a;padding:6px 8px;margin:10px auto 0 5px;cursor:pointer;font-family:arial,sans-serif;background-color:#ddd;background-image:none;height:32px}.wrs_button_accept,.wrs_button_accept:active,.wrs_button_accept:focus,.wrs_button_accept:hover,.wrs_button_accept:visited{min-width:80px;font-size:14px;border-radius:3px;border:1px solid #778e9a;padding:6px 8px;margin:10px 5px 0 auto;color:#fff;background:#778e9a;cursor:pointer;font-family:arial,sans-serif;height:32px}.wrs_editor button{box-shadow:none}.wrs_editor .wrs_header button{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.wrs_modal_overlay.wrs_modal_desktop.wrs_stack.wrs_overlay_active{display:block}.wrs_toolbar tr:focus,.wrs_toolbar tr:hover{background:none}.wrs_modal_rtl .wrs_modal_button_cancel{margin-right:5px;margin-left:0}.wrs_modal_rtl .wrs_modal_button_accept{margin-right:0;margin-left:5px}.wrs_modal_rtl .wrs_button_cancel{margin-right:5px;margin-left:0}.wrs_modal_rtl .wrs_button_accept{margin-right:0;margin-left:5px}\"},function(t,e,i){var n=i(1);var o=i(119);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports='.ck-content .page-break{position:relative;clear:both;padding:5px 0;display:flex;align-items:center;justify-content:center}.ck-content .page-break:after{content:\"\";position:absolute;border-bottom:2px dashed #c4c4c4;width:100%}.ck-content .page-break__label{position:relative;z-index:1;padding:.3em .6em;display:block;text-transform:uppercase;border:1px solid #c4c4c4;border-radius:2px;font-family:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;font-size:.75em;font-weight:700;color:#333;background:#fff;box-shadow:2px 2px 1px rgba(0,0,0,.15);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media print{.ck-content .page-break{padding:0}.ck-content .page-break:after{display:none}}'},function(t,e,i){var n=i(1);var o=i(121);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-character-grid .ck-character-grid__tiles{display:grid;grid-template-columns:repeat(10,1fr)}:root{--ck-character-grid-tile-size:24px}.ck.ck-character-grid{overflow-y:auto;overflow-x:hidden;width:350px;max-height:200px}.ck.ck-character-grid .ck-character-grid__tiles{margin:var(--ck-spacing-standard);grid-gap:var(--ck-spacing-standard)}.ck.ck-character-grid .ck-character-grid__tile{width:var(--ck-character-grid-tile-size);height:var(--ck-character-grid-tile-size);min-width:var(--ck-character-grid-tile-size);min-height:var(--ck-character-grid-tile-size);font-size:1.2em;padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-character-grid .ck-character-grid__tile:focus:not(.ck-disabled),.ck.ck-character-grid .ck-character-grid__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-character-grid .ck-character-grid__tile .ck-button__label{line-height:var(--ck-character-grid-tile-size);width:100%;text-align:center}\"},function(t,e,i){var n=i(1);var o=i(123);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-character-info{display:flex;justify-content:space-between;padding:var(--ck-spacing-small) var(--ck-spacing-standard);border-top:1px solid var(--ck-color-base-border)}.ck.ck-character-info>*{text-transform:uppercase;font-size:var(--ck-font-size-small)}.ck.ck-character-info .ck-character-info__name{max-width:280px;text-overflow:ellipsis;overflow:hidden}.ck.ck-character-info .ck-character-info__code{opacity:.6}\"},function(t,e,i){var n=i(1);var o=i(125);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-special-characters-navigation{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ck-color-base-border);padding:var(--ck-spacing-standard)}[dir=ltr] .ck.ck-special-characters-navigation{padding-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-special-characters-navigation{padding-right:var(--ck-spacing-large)}.ck.ck-special-characters-navigation>.ck-label{max-width:160px;text-overflow:ellipsis;overflow:hidden}.ck.ck-special-characters-navigation>.ck-dropdown .ck-dropdown__panel{max-height:250px;overflow-y:auto;overflow-x:hidden}\"},function(t,e,i){var n=i(1);var o=i(127);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-labeled-view .ck-labeled-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-view .ck-labeled-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-view>.ck.ck-label{width:100%;text-overflow:ellipsis;overflow:hidden}\"},function(t,e,i){var n=i(1);var o=i(129);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-input-color{width:100%;display:flex}.ck.ck-input-color>input.ck.ck-input-text{min-width:auto;flex-grow:1}.ck.ck-input-color>input.ck.ck-input-text:active,.ck.ck-input-color>input.ck.ck-input-text:focus{z-index:var(--ck-z-default)}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{position:relative;overflow:hidden}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{position:absolute;display:block}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:-1px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview{width:20px;height:20px;border:1px solid var(--ck-color-input-border)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{top:-30%;left:50%;height:150%;width:8%;background:red;border-radius:2px;transform:rotate(45deg);transform-origin:50%}.ck.ck-input-color .ck.ck-input-color__remove-color{width:100%;border-bottom:1px solid var(--ck-color-input-border);padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:0;margin-left:var(--ck-spacing-standard)}\"},function(t,e,i){var n=i(1);var o=i(131);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{width:100%;min-width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}\"},function(t,e,i){var n=i(1);var o=i(133);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\":root{--ck-table-form-header-height:38px}.ck.ck-form__header{padding:0 var(--ck-spacing-large);height:var(--ck-table-form-header-height);line-height:var(--ck-table-form-header-height);border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-form__header .ck-form__header__label{font-weight:700}\"},function(t,e){t.exports=\".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}\"},function(t,e){t.exports='.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-view{display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{flex-grow:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{flex-wrap:wrap;align-items:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-view{display:flex;flex-direction:column-reverse;align-items:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-view{position:relative}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status{position:absolute;left:50%;bottom:calc(-1*var(--ck-table-properties-error-arrow-size));transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status:after{content:\"\";position:absolute;top:calc(-1*var(--ck-table-properties-error-arrow-size));left:50%;transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style{width:80px;min-width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{width:50px;min-width:50px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-view>.ck-label{font-size:10px;text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:start;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status,.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);padding:var(--ck-spacing-small) var(--ck-spacing-medium);min-width:var(--ck-table-properties-min-error-width);text-align:center}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status:after{border-left:var(--ck-table-properties-error-arrow-size) solid transparent;border-bottom:var(--ck-table-properties-error-arrow-size) solid var(--ck-color-base-error);border-right:var(--ck-table-properties-error-arrow-size) solid transparent;border-top:0 solid transparent}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}'},function(t,e,i){var n=i(1);var o=i(137);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{flex-grow:0}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{padding:0;width:35%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none}\"},function(t,e,i){var n=i(1);var o=i(139);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=\".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{flex-wrap:wrap;flex-basis:0;align-content:baseline}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}\"},function(t,e,i){var n=i(1);var o=i(141);o=o.__esModule?o.default:o;if(typeof o===\"string\"){o=[[t.i,o,\"\"]]}var r={injectType:\"singletonStyleTag\"};r.insert=\"head\";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;display:inline-block;position:relative;width:var(--ck-todo-list-checkmark-size);height:var(--ck-todo-list-checkmark-size);vertical-align:middle;border:0;left:-25px;margin-right:-15px;right:0;margin-left:0}.ck-content .todo-list .todo-list__label>input:before{display:block;position:absolute;box-sizing:border-box;content:\"\";width:100%;height:100%;border:1px solid #333;border-radius:2px;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out}.ck-content .todo-list .todo-list__label>input:after{display:block;position:absolute;box-sizing:content-box;pointer-events:none;content:\"\";left:calc(var(--ck-todo-list-checkmark-size)/3);top:calc(var(--ck-todo-list-checkmark-size)/5.3);width:calc(var(--ck-todo-list-checkmark-size)/5.3);height:calc(var(--ck-todo-list-checkmark-size)/2.6);border-left:0 solid transparent;border-bottom:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-right:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-top:0 solid transparent;transform:rotate(45deg)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-right:0;right:-25px;margin-left:-15px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}'},function(t,e,i){\"use strict\";i.r(e);i.d(e,\"default\",(function(){return eR}));var n=i(3);var o=n[\"a\"].Symbol;var r=o;var s=Object.prototype;var a=s.hasOwnProperty;var c=s.toString;var l=r?r.toStringTag:undefined;function d(t){var e=a.call(t,l),i=t[l];try{t[l]=undefined;var n=true}catch(t){}var o=c.call(t);if(n){if(e){t[l]=i}else{delete t[l]}}return o}var u=d;var h=Object.prototype;var f=h.toString;function m(t){return f.call(t)}var g=m;var p=\"[object Null]\",b=\"[object Undefined]\";var w=r?r.toStringTag:undefined;function _(t){if(t==null){return t===undefined?b:p}return w&&w in Object(t)?u(t):g(t)}var k=_;function v(t,e){return function(i){return t(e(i))}}var y=v;var x=y(Object.getPrototypeOf,Object);var A=x;function C(t){return t!=null&&typeof t==\"object\"}var T=C;var E=\"[object Object]\";var M=Function.prototype,P=Object.prototype;var S=M.toString;var I=P.hasOwnProperty;var N=S.call(Object);function O(t){if(!T(t)||k(t)!=E){return false}var e=A(t);if(e===null){return true}var i=I.call(e,\"constructor\")&&e.constructor;return typeof i==\"function\"&&i instanceof i&&S.call(i)==N}var L=O;function z(){this.__data__=[];this.size=0}var R=z;function j(t,e){return t===e||t!==t&&e!==e}var D=j;function B(t,e){var i=t.length;while(i--){if(D(t[i][0],e)){return i}}return-1}var V=B;var F=Array.prototype;var H=F.splice;function W(t){var e=this.__data__,i=V(e,t);if(i<0){return false}var n=e.length-1;if(i==n){e.pop()}else{H.call(e,i,1)}--this.size;return true}var U=W;function q(t){var e=this.__data__,i=V(e,t);return i<0?undefined:e[i][1]}var $=q;function Y(t){return V(this.__data__,t)>-1}var G=Y;function J(t,e){var i=this.__data__,n=V(i,t);if(n<0){++this.size;i.push([t,e])}else{i[n][1]=e}return this}var X=J;function Q(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}Q.prototype.clear=R;Q.prototype[\"delete\"]=U;Q.prototype.get=$;Q.prototype.has=G;Q.prototype.set=X;var K=Q;function Z(){this.__data__=new K;this.size=0}var tt=Z;function et(t){var e=this.__data__,i=e[\"delete\"](t);this.size=e.size;return i}var it=et;function nt(t){return this.__data__.get(t)}var ot=nt;function rt(t){return this.__data__.has(t)}var st=rt;function at(t){var e=typeof t;return t!=null&&(e==\"object\"||e==\"function\")}var ct=at;var lt=\"[object AsyncFunction]\",dt=\"[object Function]\",ut=\"[object GeneratorFunction]\",ht=\"[object Proxy]\";function ft(t){if(!ct(t)){return false}var e=k(t);return e==dt||e==ut||e==lt||e==ht}var mt=ft;var gt=n[\"a\"][\"__core-js_shared__\"];var pt=gt;var bt=function(){var t=/[^.]+$/.exec(pt&&pt.keys&&pt.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}();function wt(t){return!!bt&&bt in t}var _t=wt;var kt=Function.prototype;var vt=kt.toString;function yt(t){if(t!=null){try{return vt.call(t)}catch(t){}try{return t+\"\"}catch(t){}}return\"\"}var xt=yt;var At=/[\\\\^$.*+?()[\\]{}|]/g;var Ct=/^\\[object .+?Constructor\\]$/;var Tt=Function.prototype,Et=Object.prototype;var Mt=Tt.toString;var Pt=Et.hasOwnProperty;var St=RegExp(\"^\"+Mt.call(Pt).replace(At,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");function It(t){if(!ct(t)||_t(t)){return false}var e=mt(t)?St:Ct;return e.test(xt(t))}var Nt=It;function Ot(t,e){return t==null?undefined:t[e]}var Lt=Ot;function zt(t,e){var i=Lt(t,e);return Nt(i)?i:undefined}var Rt=zt;var jt=Rt(n[\"a\"],\"Map\");var Dt=jt;var Bt=Rt(Object,\"create\");var Vt=Bt;function Ft(){this.__data__=Vt?Vt(null):{};this.size=0}var Ht=Ft;function Wt(t){var e=this.has(t)&&delete this.__data__[t];this.size-=e?1:0;return e}var Ut=Wt;var qt=\"__lodash_hash_undefined__\";var $t=Object.prototype;var Yt=$t.hasOwnProperty;function Gt(t){var e=this.__data__;if(Vt){var i=e[t];return i===qt?undefined:i}return Yt.call(e,t)?e[t]:undefined}var Jt=Gt;var Xt=Object.prototype;var Qt=Xt.hasOwnProperty;function Kt(t){var e=this.__data__;return Vt?e[t]!==undefined:Qt.call(e,t)}var Zt=Kt;var te=\"__lodash_hash_undefined__\";function ee(t,e){var i=this.__data__;this.size+=this.has(t)?0:1;i[t]=Vt&&e===undefined?te:e;return this}var ie=ee;function ne(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}ne.prototype.clear=Ht;ne.prototype[\"delete\"]=Ut;ne.prototype.get=Jt;ne.prototype.has=Zt;ne.prototype.set=ie;var oe=ne;function re(){this.size=0;this.__data__={hash:new oe,map:new(Dt||K),string:new oe}}var se=re;function ae(t){var e=typeof t;return e==\"string\"||e==\"number\"||e==\"symbol\"||e==\"boolean\"?t!==\"__proto__\":t===null}var ce=ae;function le(t,e){var i=t.__data__;return ce(e)?i[typeof e==\"string\"?\"string\":\"hash\"]:i.map}var de=le;function ue(t){var e=de(this,t)[\"delete\"](t);this.size-=e?1:0;return e}var he=ue;function fe(t){return de(this,t).get(t)}var me=fe;function ge(t){return de(this,t).has(t)}var pe=ge;function be(t,e){var i=de(this,t),n=i.size;i.set(t,e);this.size+=i.size==n?0:1;return this}var we=be;function _e(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e<i){var n=t[e];this.set(n[0],n[1])}}_e.prototype.clear=se;_e.prototype[\"delete\"]=he;_e.prototype.get=me;_e.prototype.has=pe;_e.prototype.set=we;var ke=_e;var ve=200;function ye(t,e){var i=this.__data__;if(i instanceof K){var n=i.__data__;if(!Dt||n.length<ve-1){n.push([t,e]);this.size=++i.size;return this}i=this.__data__=new ke(n)}i.set(t,e);this.size=i.size;return this}var xe=ye;function Ae(t){var e=this.__data__=new K(t);this.size=e.size}Ae.prototype.clear=tt;Ae.prototype[\"delete\"]=it;Ae.prototype.get=ot;Ae.prototype.has=st;Ae.prototype.set=xe;var Ce=Ae;function Te(t,e){var i=-1,n=t==null?0:t.length;while(++i<n){if(e(t[i],i,t)===false){break}}return t}var Ee=Te;var Me=function(){try{var t=Rt(Object,\"defineProperty\");t({},\"\",{});return t}catch(t){}}();var Pe=Me;function Se(t,e,i){if(e==\"__proto__\"&&Pe){Pe(t,e,{configurable:true,enumerable:true,value:i,writable:true})}else{t[e]=i}}var Ie=Se;var Ne=Object.prototype;var Oe=Ne.hasOwnProperty;function Le(t,e,i){var n=t[e];if(!(Oe.call(t,e)&&D(n,i))||i===undefined&&!(e in t)){Ie(t,e,i)}}var ze=Le;function Re(t,e,i,n){var o=!i;i||(i={});var r=-1,s=e.length;while(++r<s){var a=e[r];var c=n?n(i[a],t[a],a,i,t):undefined;if(c===undefined){c=t[a]}if(o){Ie(i,a,c)}else{ze(i,a,c)}}return i}var je=Re;function De(t,e){var i=-1,n=Array(t);while(++i<t){n[i]=e(i)}return n}var Be=De;var Ve=\"[object Arguments]\";function Fe(t){return T(t)&&k(t)==Ve}var He=Fe;var We=Object.prototype;var Ue=We.hasOwnProperty;var qe=We.propertyIsEnumerable;var $e=He(function(){return arguments}())?He:function(t){return T(t)&&Ue.call(t,\"callee\")&&!qe.call(t,\"callee\")};var Ye=$e;var Ge=Array.isArray;var Je=Ge;var Xe=i(4);var Qe=9007199254740991;var Ke=/^(?:0|[1-9]\\d*)$/;function Ze(t,e){var i=typeof t;e=e==null?Qe:e;return!!e&&(i==\"number\"||i!=\"symbol\"&&Ke.test(t))&&(t>-1&&t%1==0&&t<e)}var ti=Ze;var ei=9007199254740991;function ii(t){return typeof t==\"number\"&&t>-1&&t%1==0&&t<=ei}var ni=ii;var oi=\"[object Arguments]\",ri=\"[object Array]\",si=\"[object Boolean]\",ai=\"[object Date]\",ci=\"[object Error]\",li=\"[object Function]\",di=\"[object Map]\",ui=\"[object Number]\",hi=\"[object Object]\",fi=\"[object RegExp]\",mi=\"[object Set]\",gi=\"[object String]\",pi=\"[object WeakMap]\";var bi=\"[object ArrayBuffer]\",wi=\"[object DataView]\",_i=\"[object Float32Array]\",ki=\"[object Float64Array]\",vi=\"[object Int8Array]\",yi=\"[object Int16Array]\",xi=\"[object Int32Array]\",Ai=\"[object Uint8Array]\",Ci=\"[object Uint8ClampedArray]\",Ti=\"[object Uint16Array]\",Ei=\"[object Uint32Array]\";var Mi={};Mi[_i]=Mi[ki]=Mi[vi]=Mi[yi]=Mi[xi]=Mi[Ai]=Mi[Ci]=Mi[Ti]=Mi[Ei]=true;Mi[oi]=Mi[ri]=Mi[bi]=Mi[si]=Mi[wi]=Mi[ai]=Mi[ci]=Mi[li]=Mi[di]=Mi[ui]=Mi[hi]=Mi[fi]=Mi[mi]=Mi[gi]=Mi[pi]=false;function Pi(t){return T(t)&&ni(t.length)&&!!Mi[k(t)]}var Si=Pi;function Ii(t){return function(e){return t(e)}}var Ni=Ii;var Oi=i(5);var Li=Oi[\"a\"]&&Oi[\"a\"].isTypedArray;var zi=Li?Ni(Li):Si;var Ri=zi;var ji=Object.prototype;var Di=ji.hasOwnProperty;function Bi(t,e){var i=Je(t),n=!i&&Ye(t),o=!i&&!n&&Object(Xe[\"a\"])(t),r=!i&&!n&&!o&&Ri(t),s=i||n||o||r,a=s?Be(t.length,String):[],c=a.length;for(var l in t){if((e||Di.call(t,l))&&!(s&&(l==\"length\"||o&&(l==\"offset\"||l==\"parent\")||r&&(l==\"buffer\"||l==\"byteLength\"||l==\"byteOffset\")||ti(l,c)))){a.push(l)}}return a}var Vi=Bi;var Fi=Object.prototype;function Hi(t){var e=t&&t.constructor,i=typeof e==\"function\"&&e.prototype||Fi;return t===i}var Wi=Hi;var Ui=y(Object.keys,Object);var qi=Ui;var $i=Object.prototype;var Yi=$i.hasOwnProperty;function Gi(t){if(!Wi(t)){return qi(t)}var e=[];for(var i in Object(t)){if(Yi.call(t,i)&&i!=\"constructor\"){e.push(i)}}return e}var Ji=Gi;function Xi(t){return t!=null&&ni(t.length)&&!mt(t)}var Qi=Xi;function Ki(t){return Qi(t)?Vi(t):Ji(t)}var Zi=Ki;function tn(t,e){return t&&je(e,Zi(e),t)}var en=tn;function nn(t){var e=[];if(t!=null){for(var i in Object(t)){e.push(i)}}return e}var on=nn;var rn=Object.prototype;var sn=rn.hasOwnProperty;function an(t){if(!ct(t)){return on(t)}var e=Wi(t),i=[];for(var n in t){if(!(n==\"constructor\"&&(e||!sn.call(t,n)))){i.push(n)}}return i}var cn=an;function ln(t){return Qi(t)?Vi(t,true):cn(t)}var dn=ln;function un(t,e){return t&&je(e,dn(e),t)}var hn=un;var fn=i(8);function mn(t,e){var i=-1,n=t.length;e||(e=Array(n));while(++i<n){e[i]=t[i]}return e}var gn=mn;function pn(t,e){var i=-1,n=t==null?0:t.length,o=0,r=[];while(++i<n){var s=t[i];if(e(s,i,t)){r[o++]=s}}return r}var bn=pn;function wn(){return[]}var _n=wn;var kn=Object.prototype;var vn=kn.propertyIsEnumerable;var yn=Object.getOwnPropertySymbols;var xn=!yn?_n:function(t){if(t==null){return[]}t=Object(t);return bn(yn(t),(function(e){return vn.call(t,e)}))};var An=xn;function Cn(t,e){return je(t,An(t),e)}var Tn=Cn;function En(t,e){var i=-1,n=e.length,o=t.length;while(++i<n){t[o+i]=e[i]}return t}var Mn=En;var Pn=Object.getOwnPropertySymbols;var Sn=!Pn?_n:function(t){var e=[];while(t){Mn(e,An(t));t=A(t)}return e};var In=Sn;function Nn(t,e){return je(t,In(t),e)}var On=Nn;function Ln(t,e,i){var n=e(t);return Je(t)?n:Mn(n,i(t))}var zn=Ln;function Rn(t){return zn(t,Zi,An)}var jn=Rn;function Dn(t){return zn(t,dn,In)}var Bn=Dn;var Vn=Rt(n[\"a\"],\"DataView\");var Fn=Vn;var Hn=Rt(n[\"a\"],\"Promise\");var Wn=Hn;var Un=Rt(n[\"a\"],\"Set\");var qn=Un;var $n=Rt(n[\"a\"],\"WeakMap\");var Yn=$n;var Gn=\"[object Map]\",Jn=\"[object Object]\",Xn=\"[object Promise]\",Qn=\"[object Set]\",Kn=\"[object WeakMap]\";var Zn=\"[object DataView]\";var to=xt(Fn),eo=xt(Dt),io=xt(Wn),no=xt(qn),oo=xt(Yn);var ro=k;if(Fn&&ro(new Fn(new ArrayBuffer(1)))!=Zn||Dt&&ro(new Dt)!=Gn||Wn&&ro(Wn.resolve())!=Xn||qn&&ro(new qn)!=Qn||Yn&&ro(new Yn)!=Kn){ro=function(t){var e=k(t),i=e==Jn?t.constructor:undefined,n=i?xt(i):\"\";if(n){switch(n){case to:return Zn;case eo:return Gn;case io:return Xn;case no:return Qn;case oo:return Kn}}return e}}var so=ro;var ao=Object.prototype;var co=ao.hasOwnProperty;function lo(t){var e=t.length,i=new t.constructor(e);if(e&&typeof t[0]==\"string\"&&co.call(t,\"index\")){i.index=t.index;i.input=t.input}return i}var uo=lo;var ho=n[\"a\"].Uint8Array;var fo=ho;function mo(t){var e=new t.constructor(t.byteLength);new fo(e).set(new fo(t));return e}var go=mo;function po(t,e){var i=e?go(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}var bo=po;var wo=/\\w*$/;function _o(t){var e=new t.constructor(t.source,wo.exec(t));e.lastIndex=t.lastIndex;return e}var ko=_o;var vo=r?r.prototype:undefined,yo=vo?vo.valueOf:undefined;function xo(t){return yo?Object(yo.call(t)):{}}var Ao=xo;function Co(t,e){var i=e?go(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}var To=Co;var Eo=\"[object Boolean]\",Mo=\"[object Date]\",Po=\"[object Map]\",So=\"[object Number]\",Io=\"[object RegExp]\",No=\"[object Set]\",Oo=\"[object String]\",Lo=\"[object Symbol]\";var zo=\"[object ArrayBuffer]\",Ro=\"[object DataView]\",jo=\"[object Float32Array]\",Do=\"[object Float64Array]\",Bo=\"[object Int8Array]\",Vo=\"[object Int16Array]\",Fo=\"[object Int32Array]\",Ho=\"[object Uint8Array]\",Wo=\"[object Uint8ClampedArray]\",Uo=\"[object Uint16Array]\",qo=\"[object Uint32Array]\";function $o(t,e,i){var n=t.constructor;switch(e){case zo:return go(t);case Eo:case Mo:return new n(+t);case Ro:return bo(t,i);case jo:case Do:case Bo:case Vo:case Fo:case Ho:case Wo:case Uo:case qo:return To(t,i);case Po:return new n;case So:case Oo:return new n(t);case Io:return ko(t);case No:return new n;case Lo:return Ao(t)}}var Yo=$o;var Go=Object.create;var Jo=function(){function t(){}return function(e){if(!ct(e)){return{}}if(Go){return Go(e)}t.prototype=e;var i=new t;t.prototype=undefined;return i}}();var Xo=Jo;function Qo(t){return typeof t.constructor==\"function\"&&!Wi(t)?Xo(A(t)):{}}var Ko=Qo;var Zo=\"[object Map]\";function tr(t){return T(t)&&so(t)==Zo}var er=tr;var ir=Oi[\"a\"]&&Oi[\"a\"].isMap;var nr=ir?Ni(ir):er;var or=nr;var rr=\"[object Set]\";function sr(t){return T(t)&&so(t)==rr}var ar=sr;var cr=Oi[\"a\"]&&Oi[\"a\"].isSet;var lr=cr?Ni(cr):ar;var dr=lr;var ur=1,hr=2,fr=4;var mr=\"[object Arguments]\",gr=\"[object Array]\",pr=\"[object Boolean]\",br=\"[object Date]\",wr=\"[object Error]\",_r=\"[object Function]\",kr=\"[object GeneratorFunction]\",vr=\"[object Map]\",yr=\"[object Number]\",xr=\"[object Object]\",Ar=\"[object RegExp]\",Cr=\"[object Set]\",Tr=\"[object String]\",Er=\"[object Symbol]\",Mr=\"[object WeakMap]\";var Pr=\"[object ArrayBuffer]\",Sr=\"[object DataView]\",Ir=\"[object Float32Array]\",Nr=\"[object Float64Array]\",Or=\"[object Int8Array]\",Lr=\"[object Int16Array]\",zr=\"[object Int32Array]\",Rr=\"[object Uint8Array]\",jr=\"[object Uint8ClampedArray]\",Dr=\"[object Uint16Array]\",Br=\"[object Uint32Array]\";var Vr={};Vr[mr]=Vr[gr]=Vr[Pr]=Vr[Sr]=Vr[pr]=Vr[br]=Vr[Ir]=Vr[Nr]=Vr[Or]=Vr[Lr]=Vr[zr]=Vr[vr]=Vr[yr]=Vr[xr]=Vr[Ar]=Vr[Cr]=Vr[Tr]=Vr[Er]=Vr[Rr]=Vr[jr]=Vr[Dr]=Vr[Br]=true;Vr[wr]=Vr[_r]=Vr[Mr]=false;function Fr(t,e,i,n,o,r){var s,a=e&ur,c=e&hr,l=e&fr;if(i){s=o?i(t,n,o,r):i(t)}if(s!==undefined){return s}if(!ct(t)){return t}var d=Je(t);if(d){s=uo(t);if(!a){return gn(t,s)}}else{var u=so(t),h=u==_r||u==kr;if(Object(Xe[\"a\"])(t)){return Object(fn[\"a\"])(t,a)}if(u==xr||u==mr||h&&!o){s=c||h?{}:Ko(t);if(!a){return c?On(t,hn(s,t)):Tn(t,en(s,t))}}else{if(!Vr[u]){return o?t:{}}s=Yo(t,u,a)}}r||(r=new Ce);var f=r.get(t);if(f){return f}r.set(t,s);if(dr(t)){t.forEach((function(n){s.add(Fr(n,e,i,n,t,r))}))}else if(or(t)){t.forEach((function(n,o){s.set(o,Fr(n,e,i,o,t,r))}))}var m=l?c?Bn:jn:c?keysIn:Zi;var g=d?undefined:m(t);Ee(g||t,(function(n,o){if(g){o=n;n=t[o]}ze(s,o,Fr(n,e,i,o,t,r))}));return s}var Hr=Fr;var Wr=1,Ur=4;function qr(t,e){e=typeof e==\"function\"?e:undefined;return Hr(t,Wr|Ur,e)}var $r=qr;function Yr(t){return T(t)&&t.nodeType===1&&!L(t)}var Gr=Yr;class Jr{constructor(t,e){this._config={};if(e){this.define(Xr(e))}if(t){this._setObjectToTarget(this._config,t)}}set(t,e){this._setToTarget(this._config,t,e)}define(t,e){const i=true;this._setToTarget(this._config,t,e,i)}get(t){return this._getFromSource(this._config,t)}*names(){for(const t of Object.keys(this._config)){yield t}}_setToTarget(t,e,i,n=false){if(L(e)){this._setObjectToTarget(t,e,n);return}const o=e.split(\".\");e=o.pop();for(const e of o){if(!L(t[e])){t[e]={}}t=t[e]}if(L(i)){if(!L(t[e])){t[e]={}}t=t[e];this._setObjectToTarget(t,i,n);return}if(n&&typeof t[e]!=\"undefined\"){return}t[e]=i}_getFromSource(t,e){const i=e.split(\".\");e=i.pop();for(const e of i){if(!L(t[e])){t=null;break}t=t[e]}return t?Xr(t[e]):undefined}_setObjectToTarget(t,e,i){Object.keys(e).forEach(n=>{this._setToTarget(t,n,e[n],i)})}}function Xr(t){return $r(t,Qr)}function Qr(t){return Gr(t)?t:undefined}function Kr(){return function t(){t.called=true}}var Zr=Kr;class ts{constructor(t,e){this.source=t;this.name=e;this.path=[];this.stop=Zr();this.off=Zr()}}const es=new Array(256).fill().map((t,e)=>(\"0\"+e.toString(16)).slice(-2));function is(){const t=Math.random()*4294967296>>>0;const e=Math.random()*4294967296>>>0;const i=Math.random()*4294967296>>>0;const n=Math.random()*4294967296>>>0;return\"e\"+es[t>>0&255]+es[t>>8&255]+es[t>>16&255]+es[t>>24&255]+es[e>>0&255]+es[e>>8&255]+es[e>>16&255]+es[e>>24&255]+es[i>>0&255]+es[i>>8&255]+es[i>>16&255]+es[i>>24&255]+es[n>>0&255]+es[n>>8&255]+es[n>>16&255]+es[n>>24&255]}const ns={get(t){if(typeof t!=\"number\"){return this[t]||this.normal}else{return t}},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};var os=ns;var rs=i(6);var ss=i(0);const as=Symbol(\"listeningTo\");const cs=Symbol(\"emitterId\");const ls={on(t,e,i={}){this.listenTo(this,t,e,i)},once(t,e,i){let n=false;const o=function(t,...i){if(!n){n=true;t.off();e.call(this,t,...i)}};this.listenTo(this,t,o,i)},off(t,e){this.stopListening(this,t,e)},listenTo(t,e,i,n={}){let o,r;if(!this[as]){this[as]={}}const s=this[as];if(!fs(t)){hs(t)}const a=fs(t);if(!(o=s[a])){o=s[a]={emitter:t,callbacks:{}}}if(!(r=o.callbacks[e])){r=o.callbacks[e]=[]}r.push(i);ps(t,e);const c=bs(t,e);const l=os.get(n.priority);const d={callback:i,priority:l};for(const t of c){let e=false;for(let i=0;i<t.length;i++){if(t[i].priority<l){t.splice(i,0,d);e=true;break}}if(!e){t.push(d)}}},stopListening(t,e,i){const n=this[as];let o=t&&fs(t);const r=n&&o&&n[o];const s=r&&e&&r.callbacks[e];if(!n||t&&!r||e&&!s){return}if(i){ks(t,e,i)}else if(s){while(i=s.pop()){ks(t,e,i)}delete r.callbacks[e]}else if(r){for(e in r.callbacks){this.stopListening(t,e)}delete n[o]}else{for(o in n){this.stopListening(n[o].emitter)}delete this[as]}},fire(t,...e){try{const i=t instanceof ts?t:new ts(this,t);const n=i.name;let o=ws(this,n);i.path.push(this);if(o){const t=[i,...e];o=Array.from(o);for(let e=0;e<o.length;e++){o[e].callback.apply(this,t);if(i.off.called){delete i.off.called;ks(this,n,o[e].callback)}if(i.stop.called){break}}}if(this._delegations){const t=this._delegations.get(n);const o=this._delegations.get(\"*\");if(t){_s(t,i,e)}if(o){_s(o,i,e)}}return i.return}catch(t){ss[\"b\"].rethrowUnexpectedError(t,this)}},delegate(...t){return{to:(e,i)=>{if(!this._delegations){this._delegations=new Map}t.forEach(t=>{const n=this._delegations.get(t);if(!n){this._delegations.set(t,new Map([[e,i]]))}else{n.set(e,i)}})}}},stopDelegating(t,e){if(!this._delegations){return}if(!t){this._delegations.clear()}else if(!e){this._delegations.delete(t)}else{const i=this._delegations.get(t);if(i){i.delete(e)}}}};var ds=ls;function us(t,e){if(t[as]&&t[as][e]){return t[as][e].emitter}return null}function hs(t,e){if(!t[cs]){t[cs]=e||is()}}function fs(t){return t[cs]}function ms(t){if(!t._events){Object.defineProperty(t,\"_events\",{value:{}})}return t._events}function gs(){return{callbacks:[],childEvents:[]}}function ps(t,e){const i=ms(t);if(i[e]){return}let n=e;let o=null;const r=[];while(n!==\"\"){if(i[n]){break}i[n]=gs();r.push(i[n]);if(o){i[n].childEvents.push(o)}o=n;n=n.substr(0,n.lastIndexOf(\":\"))}if(n!==\"\"){for(const t of r){t.callbacks=i[n].callbacks.slice()}i[n].childEvents.push(o)}}function bs(t,e){const i=ms(t)[e];if(!i){return[]}let n=[i.callbacks];for(let e=0;e<i.childEvents.length;e++){const o=bs(t,i.childEvents[e]);n=n.concat(o)}return n}function ws(t,e){let i;if(!t._events||!(i=t._events[e])||!i.callbacks.length){if(e.indexOf(\":\")>-1){return ws(t,e.substr(0,e.lastIndexOf(\":\")))}else{return null}}return i.callbacks}function _s(t,e,i){for(let[n,o]of t){if(!o){o=e.name}else if(typeof o==\"function\"){o=o(e.name)}const t=new ts(e.source,o);t.path=[...e.path];n.fire(t,...i)}}function ks(t,e,i){const n=bs(t,e);for(const t of n){for(let e=0;e<t.length;e++){if(t[e].callback==i){t.splice(e,1);e--}}}}function vs(t,...e){e.forEach(e=>{Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)).forEach(i=>{if(i in t.prototype){return}const n=Object.getOwnPropertyDescriptor(e,i);n.enumerable=false;Object.defineProperty(t.prototype,i,n)})})}class ys{constructor(t={}){this._items=[];this._itemMap=new Map;this._idProperty=t.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(t,e){let i;const n=this._idProperty;if(n in t){i=t[n];if(typeof i!=\"string\"){throw new ss[\"b\"](\"collection-add-invalid-id\",this)}if(this.get(i)){throw new ss[\"b\"](\"collection-add-item-already-exists\",this)}}else{t[n]=i=is()}if(e===undefined){e=this._items.length}else if(e>this._items.length||e<0){throw new ss[\"b\"](\"collection-add-item-invalid-index\",this)}this._items.splice(e,0,t);this._itemMap.set(i,t);this.fire(\"add\",t,e);return this}get(t){let e;if(typeof t==\"string\"){e=this._itemMap.get(t)}else if(typeof t==\"number\"){e=this._items[t]}else{throw new ss[\"b\"](\"collection-get-invalid-arg: Index or id must be given.\",this)}return e||null}has(t){if(typeof t==\"string\"){return this._itemMap.has(t)}else{const e=this._idProperty;const i=t[e];return this._itemMap.has(i)}}getIndex(t){let e;if(typeof t==\"string\"){e=this._itemMap.get(t)}else{e=t}return this._items.indexOf(e)}remove(t){let e,i,n;let o=false;const r=this._idProperty;if(typeof t==\"string\"){i=t;n=this._itemMap.get(i);o=!n;if(n){e=this._items.indexOf(n)}}else if(typeof t==\"number\"){e=t;n=this._items[e];o=!n;if(n){i=n[r]}}else{n=t;i=n[r];e=this._items.indexOf(n);o=e==-1||!this._itemMap.get(i)}if(o){throw new ss[\"b\"](\"collection-remove-404: Item not found.\",this)}this._items.splice(e,1);this._itemMap.delete(i);const s=this._bindToInternalToExternalMap.get(n);this._bindToInternalToExternalMap.delete(n);this._bindToExternalToInternalMap.delete(s);this.fire(\"remove\",n,e);return n}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){if(this._bindToCollection){this.stopListening(this._bindToCollection);this._bindToCollection=null}while(this.length){this.remove(0)}}bindTo(t){if(this._bindToCollection){throw new ss[\"b\"](\"collection-bind-to-rebind: The collection cannot be bound more than once.\",this)}this._bindToCollection=t;return{as:t=>{this._setUpBindToBinding(e=>new t(e))},using:t=>{if(typeof t==\"function\"){this._setUpBindToBinding(e=>t(e))}else{this._setUpBindToBinding(e=>e[t])}}}}_setUpBindToBinding(t){const e=this._bindToCollection;const i=(i,n,o)=>{const r=e._bindToCollection==this;const s=e._bindToInternalToExternalMap.get(n);if(r&&s){this._bindToExternalToInternalMap.set(n,s);this._bindToInternalToExternalMap.set(s,n)}else{const i=t(n);if(!i){this._skippedIndexesFromExternal.push(o);return}let r=o;for(const t of this._skippedIndexesFromExternal){if(o>t){r--}}for(const t of e._skippedIndexesFromExternal){if(r>=t){r++}}this._bindToExternalToInternalMap.set(n,i);this._bindToInternalToExternalMap.set(i,n);this.add(i,r);for(let t=0;t<e._skippedIndexesFromExternal.length;t++){if(r<=e._skippedIndexesFromExternal[t]){e._skippedIndexesFromExternal[t]++}}}};for(const t of e){i(null,t,e.getIndex(t))}this.listenTo(e,\"add\",i);this.listenTo(e,\"remove\",(t,e,i)=>{const n=this._bindToExternalToInternalMap.get(e);if(n){this.remove(n)}this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((t,e)=>{if(i<e){t.push(e-1)}if(i>e){t.push(e)}return t},[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}vs(ys,ds);class xs{constructor(t,e=[],i=[]){this._context=t;this._plugins=new Map;this._availablePlugins=new Map;for(const t of e){if(t.pluginName){this._availablePlugins.set(t.pluginName,t)}}this._contextPlugins=new Map;for(const[t,e]of i){this._contextPlugins.set(t,e);this._contextPlugins.set(e,t);if(t.pluginName){this._availablePlugins.set(t.pluginName,t)}}}*[Symbol.iterator](){for(const t of this._plugins){if(typeof t[0]==\"function\"){yield t}}}get(t){const e=this._plugins.get(t);if(!e){const e=\"plugincollection-plugin-not-loaded: The requested plugin is not loaded.\";let i=t;if(typeof t==\"function\"){i=t.pluginName||t.name}throw new ss[\"b\"](e,this._context,{plugin:i})}return e}has(t){return this._plugins.has(t)}init(t,e=[]){const i=this;const n=this._context;const o=new Set;const r=[];const s=m(t);const a=m(e);const c=f(t);if(c){const t=\"plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.\";console.error(Object(ss[\"a\"])(t),{plugins:c});return Promise.reject(new ss[\"b\"](t,n,{plugins:c}))}return Promise.all(s.map(l)).then(()=>d(r,\"init\")).then(()=>d(r,\"afterInit\")).then(()=>r);function l(t){if(a.includes(t)){return}if(i._plugins.has(t)||o.has(t)){return}return u(t).catch(e=>{console.error(Object(ss[\"a\"])(\"plugincollection-load: It was not possible to load the plugin.\"),{plugin:t});throw e})}function d(t,e){return t.reduce((t,n)=>{if(!n[e]){return t}if(i._contextPlugins.has(n)){return t}return t.then(n[e].bind(n))},Promise.resolve())}function u(t){return new Promise(s=>{o.add(t);if(t.requires){t.requires.forEach(i=>{const o=h(i);if(t.isContextPlugin&&!o.isContextPlugin){throw new ss[\"b\"](\"plugincollection-context-required: Context plugin can not require plugin which is not a context plugin\",null,{plugin:o.name,requiredBy:t.name})}if(e.includes(o)){throw new ss[\"b\"](\"plugincollection-required: Cannot load a plugin because one of its dependencies is listed in\"+\"the `removePlugins` option.\",n,{plugin:o.name,requiredBy:t.name})}l(o)})}const a=i._contextPlugins.get(t)||new t(n);i._add(t,a);r.push(a);s()})}function h(t){if(typeof t==\"function\"){return t}return i._availablePlugins.get(t)}function f(t){const e=[];for(const i of t){if(!h(i)){e.push(i)}}return e.length?e:null}function m(t){return t.map(t=>h(t)).filter(t=>!!t)}}destroy(){const t=[];for(const[,e]of this){if(typeof e.destroy==\"function\"&&!this._contextPlugins.has(e)){t.push(e.destroy())}}return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const i=t.pluginName;if(!i){return}if(this._plugins.has(i)){throw new ss[\"b\"](\"plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.\",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:t})}this._plugins.set(i,e)}}vs(xs,ds);if(!window.CKEDITOR_TRANSLATIONS){window.CKEDITOR_TRANSLATIONS={}}function As(t,e){const i=window.CKEDITOR_TRANSLATIONS[t]||(window.CKEDITOR_TRANSLATIONS[t]={});Object.assign(i,e)}function Cs(t,e){const i=Ms();if(i===1){t=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]}if(i===0||!Es(t,e)){return e.replace(/ \\[context: [^\\]]+\\]$/,\"\")}const n=window.CKEDITOR_TRANSLATIONS[t];return n[e].replace(/ \\[context: [^\\]]+\\]$/,\"\")}function Ts(){window.CKEDITOR_TRANSLATIONS={}}function Es(t,e){return t in window.CKEDITOR_TRANSLATIONS&&e in window.CKEDITOR_TRANSLATIONS[t]}function Ms(){return Object.keys(window.CKEDITOR_TRANSLATIONS).length}const Ps=[\"ar\",\"fa\",\"he\",\"ku\",\"ug\"];class Ss{constructor(t={}){this.uiLanguage=t.uiLanguage||\"en\";this.contentLanguage=t.contentLanguage||this.uiLanguage;this.uiLanguageDirection=Is(this.uiLanguage);this.contentLanguageDirection=Is(this.contentLanguage);this.t=(...t)=>this._t(...t)}get language(){console.warn(\"locale-deprecated-language-property: \"+\"The Locale#language property has been deprecated and will be removed in the near future. \"+\"Please use #uiLanguage and #contentLanguage properties instead.\");return this.uiLanguage}_t(t,e){let i=Cs(this.uiLanguage,t);if(e){i=i.replace(/%(\\d+)/g,(t,i)=>i<e.length?e[i]:t)}return i}}function Is(t){return Ps.includes(t)?\"rtl\":\"ltr\"}class Ns{constructor(t){this.config=new Jr(t,this.constructor.defaultConfig);const e=this.constructor.builtinPlugins;this.config.define(\"plugins\",e);this.plugins=new xs(this,e);const i=this.config.get(\"language\")||{};this.locale=new Ss({uiLanguage:typeof i===\"string\"?i:i.ui,contentLanguage:this.config.get(\"language.content\")});this.t=this.locale.t;this.editors=new ys;this._contextOwner=null}initPlugins(){const t=this.config.get(\"plugins\")||[];for(const e of t){if(typeof e!=\"function\"){throw new ss[\"b\"](\"context-initplugins-constructor-only: Only a constructor function is allowed as a context plugin.\",null,{Plugin:e})}if(e.isContextPlugin!==true){throw new ss[\"b\"](\"context-initplugins-invalid-plugin: Only a plugin marked as a context plugin is allowed to be used with a context.\",null,{Plugin:e})}}return this.plugins.init(t)}destroy(){return Promise.all(Array.from(this.editors,t=>t.destroy())).then(()=>this.plugins.destroy())}_addEditor(t,e){if(this._contextOwner){throw new ss[\"b\"](\"context-addEditor-private-context: Cannot add multiple editors to the context which is created by the editor.\")}this.editors.add(t);if(e){this._contextOwner=t}}_removeEditor(t){if(this.editors.has(t)){this.editors.remove(t)}if(this._contextOwner===t){return this.destroy()}return Promise.resolve()}_getEditorConfig(){const t={};for(const e of this.config.names()){if(![\"plugins\",\"removePlugins\",\"extraPlugins\"].includes(e)){t[e]=this.config.get(e)}}return t}static create(t){return new Promise(e=>{const i=new this(t);e(i.initPlugins().then(()=>i))})}}function Os(t,e){const i=Math.min(t.length,e.length);for(let n=0;n<i;n++){if(t[n]!=e[n]){return n}}if(t.length==e.length){return\"same\"}else if(t.length<e.length){return\"prefix\"}else{return\"extension\"}}var Ls=4;function zs(t){return Hr(t,Ls)}var Rs=zs;class js{constructor(t){this.document=t;this.parent=null}get index(){let t;if(!this.parent){return null}if((t=this.parent.getChildIndex(this))==-1){throw new ss[\"b\"](\"view-node-not-found-in-parent: The node's parent does not contain this node.\",this)}return t}get nextSibling(){const t=this.index;return t!==null&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return t!==null&&this.parent.getChild(t-1)||null}get root(){let t=this;while(t.parent){t=t.parent}return t}isAttached(){return this.root.is(\"rootElement\")}getPath(){const t=[];let e=this;while(e.parent){t.unshift(e.index);e=e.parent}return t}getAncestors(t={includeSelf:false,parentFirst:false}){const e=[];let i=t.includeSelf?this:this.parent;while(i){e[t.parentFirst?\"push\":\"unshift\"](i);i=i.parent}return e}getCommonAncestor(t,e={}){const i=this.getAncestors(e);const n=t.getAncestors(e);let o=0;while(i[o]==n[o]&&i[o]){o++}return o===0?null:i[o-1]}isBefore(t){if(this==t){return false}if(this.root!==t.root){return false}const e=this.getPath();const i=t.getPath();const n=Os(e,i);switch(n){case\"prefix\":return true;case\"extension\":return false;default:return e[n]<i[n]}}isAfter(t){if(this==t){return false}if(this.root!==t.root){return false}return!this.isBefore(t)}_remove(){this.parent._removeChildren(this.index)}_fireChange(t,e){this.fire(\"change:\"+t,e);if(this.parent){this.parent._fireChange(t,e)}}toJSON(){const t=Rs(this);delete t.parent;return t}is(t){return t==\"node\"||t==\"view:node\"}}vs(js,ds);class Ds extends js{constructor(t,e){super(t);this._textData=e}is(t){return t==\"text\"||t==\"view:text\"||super.is(t)}get data(){return this._textData}get _data(){return this.data}set _data(t){this._fireChange(\"text\",this);this._textData=t}isSimilar(t){if(!(t instanceof Ds)){return false}return this===t||this.data===t.data}_clone(){return new Ds(this.document,this.data)}}class Bs{constructor(t,e,i){this.textNode=t;if(e<0||e>t.data.length){throw new ss[\"b\"](\"view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.\",this)}if(i<0||e+i>t.data.length){throw new ss[\"b\"](\"view-textproxy-wrong-length: Given length value is incorrect.\",this)}this.data=t.data.substring(e,e+i);this.offsetInText=e}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(t){return t==\"textProxy\"||t==\"view:textProxy\"}getAncestors(t={includeSelf:false,parentFirst:false}){const e=[];let i=t.includeSelf?this.textNode:this.parent;while(i!==null){e[t.parentFirst?\"push\":\"unshift\"](i);i=i.parent}return e}}function Vs(t){const e=new Map;for(const i in t){e.set(i,t[i])}return e}function Fs(t){return!!(t&&t[Symbol.iterator])}function Hs(t){if(Fs(t)){return new Map(t)}else{return Vs(t)}}class Ws{constructor(...t){this._patterns=[];this.add(...t)}add(...t){for(let e of t){if(typeof e==\"string\"||e instanceof RegExp){e={name:e}}if(e.classes&&(typeof e.classes==\"string\"||e.classes instanceof RegExp)){e.classes=[e.classes]}this._patterns.push(e)}}match(...t){for(const e of t){for(const t of this._patterns){const i=Us(e,t);if(i){return{element:e,pattern:t,match:i}}}}return null}matchAll(...t){const e=[];for(const i of t){for(const t of this._patterns){const n=Us(i,t);if(n){e.push({element:i,pattern:t,match:n})}}}return e.length>0?e:null}getElementName(){if(this._patterns.length!==1){return null}const t=this._patterns[0];const e=t.name;return typeof t!=\"function\"&&e&&!(e instanceof RegExp)?e:null}}function Us(t,e){if(typeof e==\"function\"){return e(t)}const i={};if(e.name){i.name=qs(e.name,t.name);if(!i.name){return null}}if(e.attributes){i.attributes=$s(e.attributes,t);if(!i.attributes){return null}}if(e.classes){i.classes=Ys(e.classes,t);if(!i.classes){return false}}if(e.styles){i.styles=Gs(e.styles,t);if(!i.styles){return false}}return i}function qs(t,e){if(t instanceof RegExp){return t.test(e)}return t===e}function $s(t,e){const i=[];for(const n in t){const o=t[n];if(e.hasAttribute(n)){const t=e.getAttribute(n);if(o===true){i.push(n)}else if(o instanceof RegExp){if(o.test(t)){i.push(n)}else{return null}}else if(t===o){i.push(n)}else{return null}}else{return null}}return i}function Ys(t,e){const i=[];for(const n of t){if(n instanceof RegExp){const t=e.getClassNames();for(const e of t){if(n.test(e)){i.push(e)}}if(i.length===0){return null}}else if(e.hasClass(n)){i.push(n)}else{return null}}return i}function Gs(t,e){const i=[];for(const n in t){const o=t[n];if(e.hasStyle(n)){const t=e.getStyle(n);if(o instanceof RegExp){if(o.test(t)){i.push(n)}else{return null}}else if(t===o){i.push(n)}else{return null}}else{return null}}return i}var Js=\"[object Symbol]\";function Xs(t){return typeof t==\"symbol\"||T(t)&&k(t)==Js}var Qs=Xs;var Ks=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Zs=/^\\w*$/;function ta(t,e){if(Je(t)){return false}var i=typeof t;if(i==\"number\"||i==\"symbol\"||i==\"boolean\"||t==null||Qs(t)){return true}return Zs.test(t)||!Ks.test(t)||e!=null&&t in Object(e)}var ea=ta;var ia=\"Expected a function\";function na(t,e){if(typeof t!=\"function\"||e!=null&&typeof e!=\"function\"){throw new TypeError(ia)}var i=function(){var n=arguments,o=e?e.apply(this,n):n[0],r=i.cache;if(r.has(o)){return r.get(o)}var s=t.apply(this,n);i.cache=r.set(o,s)||r;return s};i.cache=new(na.Cache||ke);return i}na.Cache=ke;var oa=na;var ra=500;function sa(t){var e=oa(t,(function(t){if(i.size===ra){i.clear()}return t}));var i=e.cache;return e}var aa=sa;var ca=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;var la=/\\\\(\\\\)?/g;var da=aa((function(t){var e=[];if(t.charCodeAt(0)===46){e.push(\"\")}t.replace(ca,(function(t,i,n,o){e.push(n?o.replace(la,\"$1\"):i||t)}));return e}));var ua=da;function ha(t,e){var i=-1,n=t==null?0:t.length,o=Array(n);while(++i<n){o[i]=e(t[i],i,t)}return o}var fa=ha;var ma=1/0;var ga=r?r.prototype:undefined,pa=ga?ga.toString:undefined;function ba(t){if(typeof t==\"string\"){return t}if(Je(t)){return fa(t,ba)+\"\"}if(Qs(t)){return pa?pa.call(t):\"\"}var e=t+\"\";return e==\"0\"&&1/t==-ma?\"-0\":e}var wa=ba;function _a(t){return t==null?\"\":wa(t)}var ka=_a;function va(t,e){if(Je(t)){return t}return ea(t,e)?[t]:ua(ka(t))}var ya=va;function xa(t){var e=t==null?0:t.length;return e?t[e-1]:undefined}var Aa=xa;var Ca=1/0;function Ta(t){if(typeof t==\"string\"||Qs(t)){return t}var e=t+\"\";return e==\"0\"&&1/t==-Ca?\"-0\":e}var Ea=Ta;function Ma(t,e){e=ya(e,t);var i=0,n=e.length;while(t!=null&&i<n){t=t[Ea(e[i++])]}return i&&i==n?t:undefined}var Pa=Ma;function Sa(t,e,i){var n=-1,o=t.length;if(e<0){e=-e>o?0:o+e}i=i>o?o:i;if(i<0){i+=o}o=e>i?0:i-e>>>0;e>>>=0;var r=Array(o);while(++n<o){r[n]=t[n+e]}return r}var Ia=Sa;function Na(t,e){return e.length<2?t:Pa(t,Ia(e,0,-1))}var Oa=Na;function La(t,e){e=ya(e,t);t=Oa(t,e);return t==null||delete t[Ea(Aa(e))]}var za=La;function Ra(t,e){return t==null?true:za(t,e)}var ja=Ra;function Da(t,e,i){var n=t==null?undefined:Pa(t,e);return n===undefined?i:n}var Ba=Da;function Va(t,e,i){if(i!==undefined&&!D(t[e],i)||i===undefined&&!(e in t)){Ie(t,e,i)}}var Fa=Va;function Ha(t){return function(e,i,n){var o=-1,r=Object(e),s=n(e),a=s.length;while(a--){var c=s[t?a:++o];if(i(r[c],c,r)===false){break}}return e}}var Wa=Ha;var Ua=Wa();var qa=Ua;function $a(t){return T(t)&&Qi(t)}var Ya=$a;function Ga(t,e){if(e===\"constructor\"&&typeof t[e]===\"function\"){return}if(e==\"__proto__\"){return}return t[e]}var Ja=Ga;function Xa(t){return je(t,dn(t))}var Qa=Xa;function Ka(t,e,i,n,o,r,s){var a=Ja(t,i),c=Ja(e,i),l=s.get(c);if(l){Fa(t,i,l);return}var d=r?r(a,c,i+\"\",t,e,s):undefined;var u=d===undefined;if(u){var h=Je(c),f=!h&&Object(Xe[\"a\"])(c),m=!h&&!f&&Ri(c);d=c;if(h||f||m){if(Je(a)){d=a}else if(Ya(a)){d=gn(a)}else if(f){u=false;d=Object(fn[\"a\"])(c,true)}else if(m){u=false;d=To(c,true)}else{d=[]}}else if(L(c)||Ye(c)){d=a;if(Ye(a)){d=Qa(a)}else if(!ct(a)||mt(a)){d=Ko(c)}}else{u=false}}if(u){s.set(c,d);o(d,c,n,r,s);s[\"delete\"](c)}Fa(t,i,d)}var Za=Ka;function tc(t,e,i,n,o){if(t===e){return}qa(e,(function(r,s){o||(o=new Ce);if(ct(r)){Za(t,e,s,i,tc,n,o)}else{var a=n?n(Ja(t,s),r,s+\"\",t,e,o):undefined;if(a===undefined){a=r}Fa(t,s,a)}}),dn)}var ec=tc;function ic(t){return t}var nc=ic;function oc(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}var rc=oc;var sc=Math.max;function ac(t,e,i){e=sc(e===undefined?t.length-1:e,0);return function(){var n=arguments,o=-1,r=sc(n.length-e,0),s=Array(r);while(++o<r){s[o]=n[e+o]}o=-1;var a=Array(e+1);while(++o<e){a[o]=n[o]}a[e]=i(s);return rc(t,this,a)}}var cc=ac;function lc(t){return function(){return t}}var dc=lc;var uc=!Pe?nc:function(t,e){return Pe(t,\"toString\",{configurable:true,enumerable:false,value:dc(e),writable:true})};var hc=uc;var fc=800,mc=16;var gc=Date.now;function pc(t){var e=0,i=0;return function(){var n=gc(),o=mc-(n-i);i=n;if(o>0){if(++e>=fc){return arguments[0]}}else{e=0}return t.apply(undefined,arguments)}}var bc=pc;var wc=bc(hc);var _c=wc;function kc(t,e){return _c(cc(t,e,nc),t+\"\")}var vc=kc;function yc(t,e,i){if(!ct(i)){return false}var n=typeof e;if(n==\"number\"?Qi(i)&&ti(e,i.length):n==\"string\"&&e in i){return D(i[e],t)}return false}var xc=yc;function Ac(t){return vc((function(e,i){var n=-1,o=i.length,r=o>1?i[o-1]:undefined,s=o>2?i[2]:undefined;r=t.length>3&&typeof r==\"function\"?(o--,r):undefined;if(s&&xc(i[0],i[1],s)){r=o<3?undefined:r;o=1}e=Object(e);while(++n<o){var a=i[n];if(a){t(e,a,n,r)}}return e}))}var Cc=Ac;var Tc=Cc((function(t,e,i){ec(t,e,i)}));var Ec=Tc;function Mc(t,e,i,n){if(!ct(t)){return t}e=ya(e,t);var o=-1,r=e.length,s=r-1,a=t;while(a!=null&&++o<r){var c=Ea(e[o]),l=i;if(o!=s){var d=a[c];l=n?n(d,c,a):undefined;if(l===undefined){l=ct(d)?d:ti(e[o+1])?[]:{}}}ze(a,c,l);a=a[c]}return t}var Pc=Mc;function Sc(t,e,i){return t==null?t:Pc(t,e,i)}var Ic=Sc;class Nc{constructor(t){this._styles={};this._styleProcessor=t}get isEmpty(){const t=Object.entries(this._styles);const e=Array.from(t);return!e.length}get size(){if(this.isEmpty){return 0}return this.getStyleNames().length}setTo(t){this.clear();const e=Array.from(Lc(t).entries());for(const[t,i]of e){this._styleProcessor.toNormalizedForm(t,i,this._styles)}}has(t){if(this.isEmpty){return false}const e=this._styleProcessor.getReducedForm(t,this._styles);const i=e.find(([e])=>e===t);return Array.isArray(i)}set(t,e){if(ct(t)){for(const[e,i]of Object.entries(t)){this._styleProcessor.toNormalizedForm(e,i,this._styles)}}else{this._styleProcessor.toNormalizedForm(t,e,this._styles)}}remove(t){const e=zc(t);ja(this._styles,e);delete this._styles[t];this._cleanEmptyObjectsOnPath(e)}getNormalized(t){return this._styleProcessor.getNormalized(t,this._styles)}toString(){if(this.isEmpty){return\"\"}return this._getStylesEntries().map(t=>t.join(\":\")).sort().join(\";\")+\";\"}getAsString(t){if(this.isEmpty){return}if(this._styles[t]&&!ct(this._styles[t])){return this._styles[t]}const e=this._styleProcessor.getReducedForm(t,this._styles);const i=e.find(([e])=>e===t);if(Array.isArray(i)){return i[1]}}getStyleNames(){if(this.isEmpty){return[]}const t=this._getStylesEntries();return t.map(([t])=>t)}clear(){this._styles={}}_getStylesEntries(){const t=[];const e=Object.keys(this._styles);for(const i of e){t.push(...this._styleProcessor.getReducedForm(i,this._styles))}return t}_cleanEmptyObjectsOnPath(t){const e=t.split(\".\");const i=e.length>1;if(!i){return}const n=e.splice(0,e.length-1).join(\".\");const o=Ba(this._styles,n);if(!o){return}const r=!Array.from(Object.keys(o)).length;if(r){this.remove(n)}}}class Oc{constructor(){this._normalizers=new Map;this._extractors=new Map;this._reducers=new Map;this._consumables=new Map}toNormalizedForm(t,e,i){if(ct(e)){Rc(i,zc(t),e);return}if(this._normalizers.has(t)){const n=this._normalizers.get(t);const{path:o,value:r}=n(e);Rc(i,o,r)}else{Rc(i,t,e)}}getNormalized(t,e){if(!t){return Ec({},e)}if(e[t]!==undefined){return e[t]}if(this._extractors.has(t)){const i=this._extractors.get(t);if(typeof i===\"string\"){return Ba(e,i)}const n=i(t,e);if(n){return n}}return Ba(e,zc(t))}getReducedForm(t,e){const i=this.getNormalized(t,e);if(i===undefined){return[]}if(this._reducers.has(t)){const e=this._reducers.get(t);return e(i)}return[[t,i]]}getRelatedStyles(t){return this._consumables.get(t)||[]}setNormalizer(t,e){this._normalizers.set(t,e)}setExtractor(t,e){this._extractors.set(t,e)}setReducer(t,e){this._reducers.set(t,e)}setStyleRelation(t,e){this._mapStyleNames(t,e);for(const i of e){this._mapStyleNames(i,[t])}}_mapStyleNames(t,e){if(!this._consumables.has(t)){this._consumables.set(t,[])}this._consumables.get(t).push(...e)}}function Lc(t){let e=null;let i=0;let n=0;let o=null;const r=new Map;if(t===\"\"){return r}if(t.charAt(t.length-1)!=\";\"){t=t+\";\"}for(let s=0;s<t.length;s++){const a=t.charAt(s);if(e===null){switch(a){case\":\":if(!o){o=t.substr(i,s-i);n=s+1}break;case'\"':case\"'\":e=a;break;case\";\":{const e=t.substr(n,s-n);if(o){r.set(o.trim(),e.trim())}o=null;i=s+1;break}}}else if(a===e){e=null}}return r}function zc(t){return t.replace(\"-\",\".\")}function Rc(t,e,i){let n=i;if(ct(i)){n=Ec({},Ba(t,e),i)}Ic(t,e,n)}class jc extends js{constructor(t,e,i,n){super(t);this.name=e;this._attrs=Dc(i);this._children=[];if(n){this._insertChild(0,n)}this._classes=new Set;if(this._attrs.has(\"class\")){const t=this._attrs.get(\"class\");Bc(this._classes,t);this._attrs.delete(\"class\")}this._styles=new Nc(this.document.stylesProcessor);if(this._attrs.has(\"style\")){this._styles.setTo(this._attrs.get(\"style\"));this._attrs.delete(\"style\")}this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return this._children.length===0}is(t,e=null){const i=t.replace(/^view:/,\"\");if(!e){return i==\"element\"||i==this.name||super.is(t)}else{return i==\"element\"&&e==this.name}}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){if(this._classes.size>0){yield\"class\"}if(!this._styles.isEmpty){yield\"style\"}yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries();if(this._classes.size>0){yield[\"class\",this.getAttribute(\"class\")]}if(!this._styles.isEmpty){yield[\"style\",this.getAttribute(\"style\")]}}getAttribute(t){if(t==\"class\"){if(this._classes.size>0){return[...this._classes].join(\" \")}return undefined}if(t==\"style\"){const t=this._styles.toString();return t==\"\"?undefined:t}return this._attrs.get(t)}hasAttribute(t){if(t==\"class\"){return this._classes.size>0}if(t==\"style\"){return!this._styles.isEmpty}return this._attrs.has(t)}isSimilar(t){if(!(t instanceof jc)){return false}if(this===t){return true}if(this.name!=t.name){return false}if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size){return false}for(const[e,i]of this._attrs){if(!t._attrs.has(e)||t._attrs.get(e)!==i){return false}}for(const e of this._classes){if(!t._classes.has(e)){return false}}for(const e of this._styles.getStyleNames()){if(!t._styles.has(e)||t._styles.getAsString(e)!==this._styles.getAsString(e)){return false}}return true}hasClass(...t){for(const e of t){if(!this._classes.has(e)){return false}}return true}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.getAsString(t)}getNormalizedStyle(t){return this._styles.getNormalized(t)}getStyleNames(){return this._styles.getStyleNames()}hasStyle(...t){for(const e of t){if(!this._styles.has(e)){return false}}return true}findAncestor(...t){const e=new Ws(...t);let i=this.parent;while(i){if(e.match(i)){return i}i=i.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(\",\");const e=this._styles.toString();const i=Array.from(this._attrs).map(t=>`${t[0]}=\"${t[1]}\"`).sort().join(\" \");return this.name+(t==\"\"?\"\":` class=\"${t}\"`)+(!e?\"\":` style=\"${e}\"`)+(i==\"\"?\"\":` ${i}`)}_clone(t=false){const e=[];if(t){for(const i of this.getChildren()){e.push(i._clone(t))}}const i=new this.constructor(this.document,this.name,this._attrs,e);i._classes=new Set(this._classes);i._styles.set(this._styles.getNormalized());i._customProperties=new Map(this._customProperties);i.getFillerOffset=this.getFillerOffset;return i}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange(\"children\",this);let i=0;const n=Vc(this.document,e);for(const e of n){if(e.parent!==null){e._remove()}e.parent=this;e.document=this.document;this._children.splice(t,0,e);t++;i++}return i}_removeChildren(t,e=1){this._fireChange(\"children\",this);for(let i=t;i<t+e;i++){this._children[i].parent=null}return this._children.splice(t,e)}_setAttribute(t,e){e=String(e);this._fireChange(\"attributes\",this);if(t==\"class\"){Bc(this._classes,e)}else if(t==\"style\"){this._styles.setTo(e)}else{this._attrs.set(t,e)}}_removeAttribute(t){this._fireChange(\"attributes\",this);if(t==\"class\"){if(this._classes.size>0){this._classes.clear();return true}return false}if(t==\"style\"){if(!this._styles.isEmpty){this._styles.clear();return true}return false}return this._attrs.delete(t)}_addClass(t){this._fireChange(\"attributes\",this);t=Array.isArray(t)?t:[t];t.forEach(t=>this._classes.add(t))}_removeClass(t){this._fireChange(\"attributes\",this);t=Array.isArray(t)?t:[t];t.forEach(t=>this._classes.delete(t))}_setStyle(t,e){this._fireChange(\"attributes\",this);this._styles.set(t,e)}_removeStyle(t){this._fireChange(\"attributes\",this);t=Array.isArray(t)?t:[t];t.forEach(t=>this._styles.remove(t))}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function Dc(t){t=Hs(t);for(const[e,i]of t){if(i===null){t.delete(e)}else if(typeof i!=\"string\"){t.set(e,String(i))}}return t}function Bc(t,e){const i=e.split(/\\s+/);t.clear();i.forEach(e=>t.add(e))}function Vc(t,e){if(typeof e==\"string\"){return[new Ds(t,e)]}if(!Fs(e)){e=[e]}return Array.from(e).map(e=>{if(typeof e==\"string\"){return new Ds(t,e)}if(e instanceof Bs){return new Ds(t,e.data)}return e})}class Fc extends jc{constructor(t,e,i,n){super(t,e,i,n);this.getFillerOffset=Hc}is(t,e=null){const i=t&&t.replace(/^view:/,\"\");if(!e){return i==\"containerElement\"||super.is(t)}else{return i==\"containerElement\"&&e==this.name||super.is(t,e)}}}function Hc(){const t=[...this.getChildren()];const e=t[this.childCount-1];if(e&&e.is(\"element\",\"br\")){return this.childCount}for(const e of t){if(!e.is(\"uiElement\")){return null}}return this.childCount}var Wc=Cc((function(t,e){je(e,dn(e),t)}));var Uc=Wc;const qc=Symbol(\"observableProperties\");const $c=Symbol(\"boundObservables\");const Yc=Symbol(\"boundProperties\");const Gc={set(t,e){if(ct(t)){Object.keys(t).forEach(e=>{this.set(e,t[e])},this);return}Xc(this);const i=this[qc];if(t in this&&!i.has(t)){throw new ss[\"b\"](\"observable-set-cannot-override: Cannot override an existing property.\",this)}Object.defineProperty(this,t,{enumerable:true,configurable:true,get(){return i.get(t)},set(e){const n=i.get(t);let o=this.fire(\"set:\"+t,t,e,n);if(o===undefined){o=e}if(n!==o||!i.has(t)){i.set(t,o);this.fire(\"change:\"+t,t,o,n)}}});this[t]=e},bind(...t){if(!t.length||!tl(t)){throw new ss[\"b\"](\"observable-bind-wrong-properties: All properties must be strings.\",this)}if(new Set(t).size!==t.length){throw new ss[\"b\"](\"observable-bind-duplicate-properties: Properties must be unique.\",this)}Xc(this);const e=this[Yc];t.forEach(t=>{if(e.has(t)){throw new ss[\"b\"](\"observable-bind-rebind: Cannot bind the same property more than once.\",this)}});const i=new Map;t.forEach(t=>{const n={property:t,to:[]};e.set(t,n);i.set(t,n)});return{to:Qc,toMany:Kc,_observable:this,_bindProperties:t,_to:[],_bindings:i}},unbind(...t){if(!(qc in this)){return}const e=this[Yc];const i=this[$c];if(t.length){if(!tl(t)){throw new ss[\"b\"](\"observable-unbind-wrong-properties: Properties must be strings.\",this)}t.forEach(t=>{const n=e.get(t);if(!n){return}let o,r,s,a;n.to.forEach(t=>{o=t[0];r=t[1];s=i.get(o);a=s[r];a.delete(n);if(!a.size){delete s[r]}if(!Object.keys(s).length){i.delete(o);this.stopListening(o,\"change\")}});e.delete(t)})}else{i.forEach((t,e)=>{this.stopListening(e,\"change\")});i.clear();e.clear()}},decorate(t){const e=this[t];if(!e){throw new ss[\"b\"](\"observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.\",this,{object:this,methodName:t})}this.on(t,(t,i)=>{t.return=e.apply(this,i)});this[t]=function(...e){return this.fire(t,e)}}};Uc(Gc,ds);var Jc=Gc;function Xc(t){if(qc in t){return}Object.defineProperty(t,qc,{value:new Map});Object.defineProperty(t,$c,{value:new Map});Object.defineProperty(t,Yc,{value:new Map})}function Qc(...t){const e=el(...t);const i=Array.from(this._bindings.keys());const n=i.length;if(!e.callback&&e.to.length>1){throw new ss[\"b\"](\"observable-bind-to-no-callback: Binding multiple observables only possible with callback.\",this)}if(n>1&&e.callback){throw new ss[\"b\"](\"observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.\",this)}e.to.forEach(t=>{if(t.properties.length&&t.properties.length!==n){throw new ss[\"b\"](\"observable-bind-to-properties-length: The number of properties must match.\",this)}if(!t.properties.length){t.properties=this._bindProperties}});this._to=e.to;if(e.callback){this._bindings.get(i[0]).callback=e.callback}rl(this._observable,this._to);nl(this);this._bindProperties.forEach(t=>{ol(this._observable,t)})}function Kc(t,e,i){if(this._bindings.size>1){throw new ss[\"b\"](\"observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().\",this)}this.to(...Zc(t,e),i)}function Zc(t,e){const i=t.map(t=>[t,e]);return Array.prototype.concat.apply([],i)}function tl(t){return t.every(t=>typeof t==\"string\")}function el(...t){if(!t.length){throw new ss[\"b\"](\"observable-bind-to-parse-error: Invalid argument syntax in `to()`.\",null)}const e={to:[]};let i;if(typeof t[t.length-1]==\"function\"){e.callback=t.pop()}t.forEach(t=>{if(typeof t==\"string\"){i.properties.push(t)}else if(typeof t==\"object\"){i={observable:t,properties:[]};e.to.push(i)}else{throw new ss[\"b\"](\"observable-bind-to-parse-error: Invalid argument syntax in `to()`.\",null)}});return e}function il(t,e,i,n){const o=t[$c];const r=o.get(i);const s=r||{};if(!s[n]){s[n]=new Set}s[n].add(e);if(!r){o.set(i,s)}}function nl(t){let e;t._bindings.forEach((i,n)=>{t._to.forEach(o=>{e=o.properties[i.callback?0:t._bindProperties.indexOf(n)];i.to.push([o.observable,e]);il(t._observable,i,o.observable,e)})})}function ol(t,e){const i=t[Yc];const n=i.get(e);let o;if(n.callback){o=n.callback.apply(t,n.to.map(t=>t[0][t[1]]))}else{o=n.to[0];o=o[0][o[1]]}if(t.hasOwnProperty(e)){t[e]=o}else{t.set(e,o)}}function rl(t,e){e.forEach(e=>{const i=t[$c];let n;if(!i.get(e.observable)){t.listenTo(e.observable,\"change\",(o,r)=>{n=i.get(e.observable)[r];if(n){n.forEach(e=>{ol(t,e.property)})}})}})}class sl extends Fc{constructor(t,e,i,n){super(t,e,i,n);this.set(\"isReadOnly\",false);this.set(\"isFocused\",false);this.bind(\"isReadOnly\").to(t);this.bind(\"isFocused\").to(t,\"isFocused\",e=>e&&t.selection.editableElement==this);this.listenTo(t.selection,\"change\",()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this})}is(t,e=null){const i=t&&t.replace(/^view:/,\"\");if(!e){return i==\"editableElement\"||super.is(t)}else{return i==\"editableElement\"&&e==this.name||super.is(t,e)}}destroy(){this.stopListening()}}vs(sl,Jc);const al=Symbol(\"rootName\");class cl extends sl{constructor(t,e){super(t,e);this.rootName=\"main\"}is(t,e=null){const i=t.replace(/^view:/,\"\");if(!e){return i==\"rootElement\"||super.is(t)}else{return i==\"rootElement\"&&e==this.name||super.is(t,e)}}get rootName(){return this.getCustomProperty(al)}set rootName(t){this._setCustomProperty(al,t)}set _name(t){this.name=t}}class ll{constructor(t={}){if(!t.boundaries&&!t.startPosition){throw new ss[\"b\"](\"view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.\",null)}if(t.direction&&t.direction!=\"forward\"&&t.direction!=\"backward\"){throw new ss[\"b\"](\"view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.\",t.startPosition,{direction:t.direction})}this.boundaries=t.boundaries||null;if(t.startPosition){this.position=dl._createAt(t.startPosition)}else{this.position=dl._createAt(t.boundaries[t.direction==\"backward\"?\"end\":\"start\"])}this.direction=t.direction||\"forward\";this.singleCharacters=!!t.singleCharacters;this.shallow=!!t.shallow;this.ignoreElementEnd=!!t.ignoreElementEnd;this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null;this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(t){let e,i,n;do{n=this.position;({done:e,value:i}=this.next())}while(!e&&t(i));if(!e){this.position=n}}next(){if(this.direction==\"forward\"){return this._next()}else{return this._previous()}}_next(){let t=this.position.clone();const e=this.position;const i=t.parent;if(i.parent===null&&t.offset===i.childCount){return{done:true}}if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset){return{done:true}}let n;if(i instanceof Ds){if(t.isAtEnd){this.position=dl._createAfter(i);return this._next()}n=i.data[t.offset]}else{n=i.getChild(t.offset)}if(n instanceof jc){if(!this.shallow){t=new dl(n,0)}else{t.offset++}this.position=t;return this._formatReturnValue(\"elementStart\",n,e,t,1)}else if(n instanceof Ds){if(this.singleCharacters){t=new dl(n,0);this.position=t;return this._next()}else{let i=n.data.length;let o;if(n==this._boundaryEndParent){i=this.boundaries.end.offset;o=new Bs(n,0,i);t=dl._createAfter(o)}else{o=new Bs(n,0,n.data.length);t.offset++}this.position=t;return this._formatReturnValue(\"text\",o,e,t,i)}}else if(typeof n==\"string\"){let n;if(this.singleCharacters){n=1}else{const e=i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length;n=e-t.offset}const o=new Bs(i,t.offset,n);t.offset+=n;this.position=t;return this._formatReturnValue(\"text\",o,e,t,n)}else{t=dl._createAfter(i);this.position=t;if(this.ignoreElementEnd){return this._next()}else{return this._formatReturnValue(\"elementEnd\",i,e,t)}}}_previous(){let t=this.position.clone();const e=this.position;const i=t.parent;if(i.parent===null&&t.offset===0){return{done:true}}if(i==this._boundaryStartParent&&t.offset==this.boundaries.start.offset){return{done:true}}let n;if(i instanceof Ds){if(t.isAtStart){this.position=dl._createBefore(i);return this._previous()}n=i.data[t.offset-1]}else{n=i.getChild(t.offset-1)}if(n instanceof jc){if(!this.shallow){t=new dl(n,n.childCount);this.position=t;if(this.ignoreElementEnd){return this._previous()}else{return this._formatReturnValue(\"elementEnd\",n,e,t)}}else{t.offset--;this.position=t;return this._formatReturnValue(\"elementStart\",n,e,t,1)}}else if(n instanceof Ds){if(this.singleCharacters){t=new dl(n,n.data.length);this.position=t;return this._previous()}else{let i=n.data.length;let o;if(n==this._boundaryStartParent){const e=this.boundaries.start.offset;o=new Bs(n,e,n.data.length-e);i=o.data.length;t=dl._createBefore(o)}else{o=new Bs(n,0,n.data.length);t.offset--}this.position=t;return this._formatReturnValue(\"text\",o,e,t,i)}}else if(typeof n==\"string\"){let n;if(!this.singleCharacters){const e=i===this._boundaryStartParent?this.boundaries.start.offset:0;n=t.offset-e}else{n=1}t.offset-=n;const o=new Bs(i,t.offset,n);this.position=t;return this._formatReturnValue(\"text\",o,e,t,n)}else{t=dl._createBefore(i);this.position=t;return this._formatReturnValue(\"elementStart\",i,e,t,1)}}_formatReturnValue(t,e,i,n,o){if(e instanceof Bs){if(e.offsetInText+e.data.length==e.textNode.data.length){if(this.direction==\"forward\"&&!(this.boundaries&&this.boundaries.end.isEqual(this.position))){n=dl._createAfter(e.textNode);this.position=n}else{i=dl._createAfter(e.textNode)}}if(e.offsetInText===0){if(this.direction==\"backward\"&&!(this.boundaries&&this.boundaries.start.isEqual(this.position))){n=dl._createBefore(e.textNode);this.position=n}else{i=dl._createBefore(e.textNode)}}}return{done:false,value:{type:t,item:e,previousPosition:i,nextPosition:n,length:o}}}}class dl{constructor(t,e){this.parent=t;this.offset=e}get nodeAfter(){if(this.parent.is(\"text\")){return null}return this.parent.getChild(this.offset)||null}get nodeBefore(){if(this.parent.is(\"text\")){return null}return this.parent.getChild(this.offset-1)||null}get isAtStart(){return this.offset===0}get isAtEnd(){const t=this.parent.is(\"text\")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;while(!(t instanceof sl)){if(t.parent){t=t.parent}else{return null}}return t}getShiftedBy(t){const e=dl._createAt(this);const i=e.offset+t;e.offset=i<0?0:i;return e}getLastMatchingPosition(t,e={}){e.startPosition=this;const i=new ll(e);i.skip(t);return i.position}getAncestors(){if(this.parent.is(\"documentFragment\")){return[this.parent]}else{return this.parent.getAncestors({includeSelf:true})}}getCommonAncestor(t){const e=this.getAncestors();const i=t.getAncestors();let n=0;while(e[n]==i[n]&&e[n]){n++}return n===0?null:e[n-1]}is(t){return t==\"position\"||t==\"view:position\"}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return this.compareWith(t)==\"before\"}isAfter(t){return this.compareWith(t)==\"after\"}compareWith(t){if(this.root!==t.root){return\"different\"}if(this.isEqual(t)){return\"same\"}const e=this.parent.is(\"node\")?this.parent.getPath():[];const i=t.parent.is(\"node\")?t.parent.getPath():[];e.push(this.offset);i.push(t.offset);const n=Os(e,i);switch(n){case\"prefix\":return\"before\";case\"extension\":return\"after\";default:return e[n]<i[n]?\"before\":\"after\"}}getWalker(t={}){t.startPosition=this;return new ll(t)}clone(){return new dl(this.parent,this.offset)}static _createAt(t,e){if(t instanceof dl){return new this(t.parent,t.offset)}else{const i=t;if(e==\"end\"){e=i.is(\"text\")?i.data.length:i.childCount}else if(e==\"before\"){return this._createBefore(i)}else if(e==\"after\"){return this._createAfter(i)}else if(e!==0&&!e){throw new ss[\"b\"](\"view-createPositionAt-offset-required: \"+\"View#createPositionAt() requires the offset when the first parameter is a view item.\",i)}return new dl(i,e)}}static _createAfter(t){if(t.is(\"textProxy\")){return new dl(t.textNode,t.offsetInText+t.data.length)}if(!t.parent){throw new ss[\"b\"](\"view-position-after-root: You can not make position after root.\",t,{root:t})}return new dl(t.parent,t.index+1)}static _createBefore(t){if(t.is(\"textProxy\")){return new dl(t.textNode,t.offsetInText)}if(!t.parent){throw new ss[\"b\"](\"view-position-before-root: You can not make position before root.\",t,{root:t})}return new dl(t.parent,t.index)}}class ul{constructor(t,e=null){this.start=t.clone();this.end=e?e.clone():t.clone()}*[Symbol.iterator](){yield*new ll({boundaries:this,ignoreElementEnd:true})}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 t=this.start.getLastMatchingPosition(hl,{direction:\"backward\"});let e=this.end.getLastMatchingPosition(hl);if(t.parent.is(\"text\")&&t.isAtStart){t=dl._createBefore(t.parent)}if(e.parent.is(\"text\")&&e.isAtEnd){e=dl._createAfter(e.parent)}return new ul(t,e)}getTrimmed(){let t=this.start.getLastMatchingPosition(hl);if(t.isAfter(this.end)||t.isEqual(this.end)){return new ul(t,t)}let e=this.end.getLastMatchingPosition(hl,{direction:\"backward\"});const i=t.nodeAfter;const n=e.nodeBefore;if(i&&i.is(\"text\")){t=new dl(i,0)}if(n&&n.is(\"text\")){e=new dl(n,n.data.length)}return new ul(t,e)}isEqual(t){return this==t||this.start.isEqual(t.start)&&this.end.isEqual(t.end)}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=false){if(t.isCollapsed){e=false}const i=this.containsPosition(t.start)||e&&this.start.isEqual(t.start);const n=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return i&&n}getDifference(t){const e=[];if(this.isIntersecting(t)){if(this.containsPosition(t.start)){e.push(new ul(this.start,t.start))}if(this.containsPosition(t.end)){e.push(new ul(t.end,this.end))}}else{e.push(this.clone())}return e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start;let i=this.end;if(this.containsPosition(t.start)){e=t.start}if(this.containsPosition(t.end)){i=t.end}return new ul(e,i)}return null}getWalker(t={}){t.boundaries=this;return new ll(t)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed){return null}let t=this.start.nodeAfter;let e=this.end.nodeBefore;if(this.start.parent.is(\"text\")&&this.start.isAtEnd&&this.start.parent.nextSibling){t=this.start.parent.nextSibling}if(this.end.parent.is(\"text\")&&this.end.isAtStart&&this.end.parent.previousSibling){e=this.end.parent.previousSibling}if(t&&t.is(\"element\")&&t===e){return t}return null}clone(){return new ul(this.start,this.end)}*getItems(t={}){t.boundaries=this;t.ignoreElementEnd=true;const e=new ll(t);for(const t of e){yield t.item}}*getPositions(t={}){t.boundaries=this;const e=new ll(t);yield e.position;for(const t of e){yield t.nextPosition}}is(t){return t==\"range\"||t==\"view:range\"}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}static _createFromParentsAndOffsets(t,e,i,n){return new this(new dl(t,e),new dl(i,n))}static _createFromPositionAndShift(t,e){const i=t;const n=t.getShiftedBy(e);return e>0?new this(i,n):new this(n,i)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is(\"textProxy\")?t.offsetSize:1;return this._createFromPositionAndShift(dl._createBefore(t),e)}}function hl(t){if(t.item.is(\"attributeElement\")||t.item.is(\"uiElement\")){return true}return false}function fl(t){let e=0;for(const i of t){e++}return e}class ml{constructor(t=null,e,i){this._ranges=[];this._lastRangeBackward=false;this._isFake=false;this._fakeSelectionLabel=\"\";this.setTo(t,e,i)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length){return null}const t=this._ranges[this._ranges.length-1];const e=this._lastRangeBackward?t.end:t.start;return e.clone()}get focus(){if(!this._ranges.length){return null}const t=this._ranges[this._ranges.length-1];const e=this._lastRangeBackward?t.start:t.end;return e.clone()}get isCollapsed(){return this.rangeCount===1&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){if(this.anchor){return this.anchor.editableElement}return null}*getRanges(){for(const t of this._ranges){yield t.clone()}}getFirstRange(){let t=null;for(const e of this._ranges){if(!t||e.start.isBefore(t.start)){t=e}}return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges){if(!t||e.end.isAfter(t.end)){t=e}}return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake){return false}if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel){return false}if(this.rangeCount!=t.rangeCount){return false}else if(this.rangeCount===0){return true}if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus)){return false}for(const e of this._ranges){let i=false;for(const n of t._ranges){if(e.isEqual(n)){i=true;break}}if(!i){return false}}return true}isSimilar(t){if(this.isBackward!=t.isBackward){return false}const e=fl(this.getRanges());const i=fl(t.getRanges());if(e!=i){return false}if(e==0){return true}for(let e of this.getRanges()){e=e.getTrimmed();let i=false;for(let n of t.getRanges()){n=n.getTrimmed();if(e.start.isEqual(n.start)&&e.end.isEqual(n.end)){i=true;break}}if(!i){return false}}return true}getSelectedElement(){if(this.rangeCount!==1){return null}return this.getFirstRange().getContainedElement()}setTo(t,e,i){if(t===null){this._setRanges([]);this._setFakeOptions(e)}else if(t instanceof ml||t instanceof gl){this._setRanges(t.getRanges(),t.isBackward);this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel})}else if(t instanceof ul){this._setRanges([t],e&&e.backward);this._setFakeOptions(e)}else if(t instanceof dl){this._setRanges([new ul(t)]);this._setFakeOptions(e)}else if(t instanceof js){const n=!!i&&!!i.backward;let o;if(e===undefined){throw new ss[\"b\"](\"view-selection-setTo-required-second-parameter: \"+\"selection.setTo requires the second parameter when the first parameter is a node.\",this)}else if(e==\"in\"){o=ul._createIn(t)}else if(e==\"on\"){o=ul._createOn(t)}else{o=new ul(dl._createAt(t,e))}this._setRanges([o],n);this._setFakeOptions(i)}else if(Fs(t)){this._setRanges(t,e&&e.backward);this._setFakeOptions(e)}else{throw new ss[\"b\"](\"view-selection-setTo-not-selectable: Cannot set selection to given place.\",this)}this.fire(\"change\")}setFocus(t,e){if(this.anchor===null){throw new ss[\"b\"](\"view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.\",this)}const i=dl._createAt(t,e);if(i.compareWith(this.focus)==\"same\"){return}const n=this.anchor;this._ranges.pop();if(i.compareWith(n)==\"before\"){this._addRange(new ul(i,n),true)}else{this._addRange(new ul(n,i))}this.fire(\"change\")}is(t){return t==\"selection\"||t==\"view:selection\"}_setRanges(t,e=false){t=Array.from(t);this._ranges=[];for(const e of t){this._addRange(e)}this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake;this._fakeSelectionLabel=t.fake?t.label||\"\":\"\"}_addRange(t,e=false){if(!(t instanceof ul)){throw new ss[\"b\"](\"view-selection-add-range-not-range: \"+\"Selection range set to an object that is not an instance of view.Range\",this)}this._pushRange(t);this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges){if(t.isIntersecting(e)){throw new ss[\"b\"](\"view-selection-range-intersects: Trying to add a range that intersects with another range from selection.\",this,{addedRange:t,intersectingRange:e})}}this._ranges.push(new ul(t.start,t.end))}}vs(ml,ds);class gl{constructor(t=null,e,i){this._selection=new ml;this._selection.delegate(\"change\").to(this);this._selection.setTo(t,e,i)}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(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}is(t){return t==\"selection\"||t==\"documentSelection\"||t==\"view:selection\"||t==\"view:documentSelection\"}_setTo(t,e,i){this._selection.setTo(t,e,i)}_setFocus(t,e){this._selection.setFocus(t,e)}}vs(gl,ds);class pl{constructor(t){this.selection=new gl;this.roots=new ys({idProperty:\"rootName\"});this.stylesProcessor=t;this.set(\"isReadOnly\",false);this.set(\"isFocused\",false);this.set(\"isComposing\",false);this._postFixers=new Set}getRoot(t=\"main\"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map(t=>t.destroy());this.stopListening()}_callPostFixers(t){let e=false;do{for(const i of this._postFixers){e=i(t);if(e){break}}}while(e)}}vs(pl,Jc);const bl=10;class wl extends jc{constructor(t,e,i,n){super(t,e,i,n);this.getFillerOffset=_l;this._priority=bl;this._id=null;this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(this.id===null){throw new ss[\"b\"](\"attribute-element-get-elements-with-same-id-no-id: \"+\"Cannot get elements with the same id for an attribute element without id.\",this)}return new Set(this._clonesGroup)}is(t,e=null){const i=t&&t.replace(/^view:/,\"\");if(!e){return i==\"attributeElement\"||super.is(t)}else{return i==\"attributeElement\"&&e==this.name||super.is(t,e)}}isSimilar(t){if(this.id!==null||t.id!==null){return this.id===t.id}return super.isSimilar(t)&&this.priority==t.priority}_clone(t){const e=super._clone(t);e._priority=this._priority;e._id=this._id;return e}}wl.DEFAULT_PRIORITY=bl;function _l(){if(kl(this)){return null}let t=this.parent;while(t&&t.is(\"attributeElement\")){if(kl(t)>1){return null}t=t.parent}if(!t||kl(t)>1){return null}return this.childCount}function kl(t){return Array.from(t.getChildren()).filter(t=>!t.is(\"uiElement\")).length}class vl extends jc{constructor(t,e,i,n){super(t,e,i,n);this.getFillerOffset=yl}is(t,e=null){const i=t.replace(/^view:/,\"\");if(!e){return i==\"emptyElement\"||super.is(t)}else{return i==\"emptyElement\"&&e==this.name||super.is(t,e)}}_insertChild(t,e){if(e&&(e instanceof js||Array.from(e).length>0)){throw new ss[\"b\"](\"view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.\",[this,e])}}}function yl(){return null}const xl=navigator.userAgent.toLowerCase();const Al={isMac:Tl(xl),isEdge:El(xl),isGecko:Ml(xl),isSafari:Pl(xl),isAndroid:Sl(xl),features:{isRegExpUnicodePropertySupported:Il()}};var Cl=Al;function Tl(t){return t.indexOf(\"macintosh\")>-1}function El(t){return!!t.match(/edge\\/(\\d+.?\\d*)/)}function Ml(t){return!!t.match(/gecko\\/\\d+/)}function Pl(t){return t.indexOf(\" applewebkit/\")>-1&&t.indexOf(\"chrome\")===-1}function Sl(t){return t.indexOf(\"android\")>-1}function Il(){let t=false;try{t=\"ć\".search(new RegExp(\"[\\\\p{L}]\",\"u\"))===0}catch(t){}return t}const Nl={\"⌘\":\"ctrl\",\"⇧\":\"shift\",\"⌥\":\"alt\"};const Ol={ctrl:\"⌘\",shift:\"⇧\",alt:\"⌥\"};const Ll=Dl();function zl(t){let e;if(typeof t==\"string\"){e=Ll[t.toLowerCase()];if(!e){throw new ss[\"b\"](\"keyboard-unknown-key: Unknown key name.\",null,{key:t})}}else{e=t.keyCode+(t.altKey?Ll.alt:0)+(t.ctrlKey?Ll.ctrl:0)+(t.shiftKey?Ll.shift:0)}return e}function Rl(t){if(typeof t==\"string\"){t=Bl(t)}return t.map(t=>typeof t==\"string\"?zl(t):t).reduce((t,e)=>e+t,0)}function jl(t){if(!Cl.isMac){return t}return Bl(t).map(t=>Ol[t.toLowerCase()]||t).reduce((t,e)=>{if(t.slice(-1)in Nl){return t+e}else{return t+\"+\"+e}})}function Dl(){const t={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 e=65;e<=90;e++){const i=String.fromCharCode(e);t[i.toLowerCase()]=e}for(let e=48;e<=57;e++){t[e-48]=e}for(let e=112;e<=123;e++){t[\"f\"+(e-111)]=e}return t}function Bl(t){return t.split(/\\s*\\+\\s*/)}class Vl extends jc{constructor(t,e,i,n){super(t,e,i,n);this.getFillerOffset=Hl}is(t,e=null){const i=t.replace(/^view:/,\"\");if(!e){return i==\"uiElement\"||super.is(t)}else{return i==\"uiElement\"&&e==this.name||super.is(t,e)}}_insertChild(t,e){if(e&&(e instanceof js||Array.from(e).length>0)){throw new ss[\"b\"](\"view-uielement-cannot-add: Cannot add child nodes to UIElement instance.\",this)}}render(t){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys()){e.setAttribute(t,this.getAttribute(t))}return e}}function Fl(t){t.document.on(\"keydown\",(e,i)=>Wl(e,i,t.domConverter))}function Hl(){return null}function Wl(t,e,i){if(e.keyCode==Ll.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection();const n=t.rangeCount==1&&t.getRangeAt(0).collapsed;if(n||e.shiftKey){const e=t.focusNode;const o=t.focusOffset;const r=i.domPositionToView(e,o);if(r===null){return}let s=false;const a=r.getLastMatchingPosition(t=>{if(t.item.is(\"uiElement\")){s=true}if(t.item.is(\"uiElement\")||t.item.is(\"attributeElement\")){return true}return false});if(s){const e=i.viewPositionToDom(a);if(n){t.collapse(e.parent,e.offset)}else{t.extend(e.parent,e.offset)}}}}}class Ul{constructor(t,e){this.document=t;this._children=[];if(e){this._insertChild(0,e)}}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return this.childCount===0}get root(){return this}get parent(){return null}is(t){return t==\"documentFragment\"||t==\"view:documentFragment\"}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange(\"children\",this);let i=0;const n=ql(this.document,e);for(const e of n){if(e.parent!==null){e._remove()}e.parent=this;this._children.splice(t,0,e);t++;i++}return i}_removeChildren(t,e=1){this._fireChange(\"children\",this);for(let i=t;i<t+e;i++){this._children[i].parent=null}return this._children.splice(t,e)}_fireChange(t,e){this.fire(\"change:\"+t,e)}}vs(Ul,ds);function ql(t,e){if(typeof e==\"string\"){return[new Ds(t,e)]}if(!Fs(e)){e=[e]}return Array.from(e).map(e=>{if(typeof e==\"string\"){return new Ds(t,e)}if(e instanceof Bs){return new Ds(t,e.data)}return e})}class $l{constructor(t){this.document=t;this._cloneGroups=new Map}setSelection(t,e,i){this.document.selection._setTo(t,e,i)}setSelectionFocus(t,e){this.document.selection._setFocus(t,e)}createText(t){return new Ds(this.document,t)}createAttributeElement(t,e,i={}){const n=new wl(this.document,t,e);if(i.priority){n._priority=i.priority}if(i.id){n._id=i.id}return n}createContainerElement(t,e){return new Fc(this.document,t,e)}createEditableElement(t,e){const i=new sl(this.document,t,e);i._document=this.document;return i}createEmptyElement(t,e){return new vl(this.document,t,e)}createUIElement(t,e,i){const n=new Vl(this.document,t,e);if(i){n.render=i}return n}setAttribute(t,e,i){i._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,i){if(L(t)&&i===undefined){i=e}i._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,i){i._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}breakAttributes(t){if(t instanceof dl){return this._breakAttributes(t)}else{return this._breakAttributesRange(t)}}breakContainer(t){const e=t.parent;if(!e.is(\"containerElement\")){throw new ss[\"b\"](\"view-writer-break-non-container-element: Trying to break an element which is not a container element.\",this.document)}if(!e.parent){throw new ss[\"b\"](\"view-writer-break-root: Trying to break root element.\",this.document)}if(t.isAtStart){return dl._createBefore(e)}else if(!t.isAtEnd){const i=e._clone(false);this.insert(dl._createAfter(e),i);const n=new ul(t,dl._createAt(e,\"end\"));const o=new dl(i,0);this.move(n,o)}return dl._createAfter(e)}mergeAttributes(t){const e=t.offset;const i=t.parent;if(i.is(\"text\")){return t}if(i.is(\"attributeElement\")&&i.childCount===0){const t=i.parent;const e=i.index;i._remove();this._removeFromClonedElementsGroup(i);return this.mergeAttributes(new dl(t,e))}const n=i.getChild(e-1);const o=i.getChild(e);if(!n||!o){return t}if(n.is(\"text\")&&o.is(\"text\")){return Kl(n,o)}else if(n.is(\"attributeElement\")&&o.is(\"attributeElement\")&&n.isSimilar(o)){const t=n.childCount;n._appendChild(o.getChildren());o._remove();this._removeFromClonedElementsGroup(o);return this.mergeAttributes(new dl(n,t))}return t}mergeContainers(t){const e=t.nodeBefore;const i=t.nodeAfter;if(!e||!i||!e.is(\"containerElement\")||!i.is(\"containerElement\")){throw new ss[\"b\"](\"view-writer-merge-containers-invalid-position: \"+\"Element before and after given position cannot be merged.\",this.document)}const n=e.getChild(e.childCount-1);const o=n instanceof Ds?dl._createAt(n,\"end\"):dl._createAt(e,\"end\");this.move(ul._createIn(i),dl._createAt(e,\"end\"));this.remove(ul._createOn(i));return o}insert(t,e){e=Fs(e)?[...e]:[e];Zl(e,this.document);const i=Gl(t);if(!i){throw new ss[\"b\"](\"view-writer-invalid-position-container\",this.document)}const n=this._breakAttributes(t,true);const o=i._insertChild(n.offset,e);for(const t of e){this._addToClonedElementsGroup(t)}const r=n.getShiftedBy(o);const s=this.mergeAttributes(n);if(o===0){return new ul(s,s)}else{if(!s.isEqual(n)){r.offset--}const t=this.mergeAttributes(r);return new ul(s,t)}}remove(t){const e=t instanceof ul?t:ul._createOn(t);id(e,this.document);if(e.isCollapsed){return new Ul(this.document)}const{start:i,end:n}=this._breakAttributesRange(e,true);const o=i.parent;const r=n.offset-i.offset;const s=o._removeChildren(i.offset,r);for(const t of s){this._removeFromClonedElementsGroup(t)}const a=this.mergeAttributes(i);e.start=a;e.end=a.clone();return new Ul(this.document,s)}clear(t,e){id(t,this.document);const i=t.getWalker({direction:\"backward\",ignoreElementEnd:true});for(const n of i){const i=n.item;let o;if(i.is(\"element\")&&e.isSimilar(i)){o=ul._createOn(i)}else if(!n.nextPosition.isAfter(t.start)&&i.is(\"textProxy\")){const t=i.getAncestors().find(t=>t.is(\"element\")&&e.isSimilar(t));if(t){o=ul._createIn(t)}}if(o){if(o.end.isAfter(t.end)){o.end=t.end}if(o.start.isBefore(t.start)){o.start=t.start}this.remove(o)}}}move(t,e){let i;if(e.isAfter(t.end)){e=this._breakAttributes(e,true);const n=e.parent;const o=n.childCount;t=this._breakAttributesRange(t,true);i=this.remove(t);e.offset+=n.childCount-o}else{i=this.remove(t)}return this.insert(e,i)}wrap(t,e){if(!(e instanceof wl)){throw new ss[\"b\"](\"view-writer-wrap-invalid-attribute\",this.document)}id(t,this.document);if(!t.isCollapsed){return this._wrapRange(t,e)}else{let i=t.start;if(i.parent.is(\"element\")&&!Yl(i.parent)){i=i.getLastMatchingPosition(t=>t.item.is(\"uiElement\"))}i=this._wrapPosition(i,e);const n=this.document.selection;if(n.isCollapsed&&n.getFirstPosition().isEqual(t.start)){this.setSelection(i)}return new ul(i)}}unwrap(t,e){if(!(e instanceof wl)){throw new ss[\"b\"](\"view-writer-unwrap-invalid-attribute\",this.document)}id(t,this.document);if(t.isCollapsed){return t}const{start:i,end:n}=this._breakAttributesRange(t,true);const o=i.parent;const r=this._unwrapChildren(o,i.offset,n.offset,e);const s=this.mergeAttributes(r.start);if(!s.isEqual(r.start)){r.end.offset--}const a=this.mergeAttributes(r.end);return new ul(s,a)}rename(t,e){const i=new Fc(this.document,t,e.getAttributes());this.insert(dl._createAfter(e),i);this.move(ul._createIn(e),dl._createAt(i,0));this.remove(ul._createOn(e));return i}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return dl._createAt(t,e)}createPositionAfter(t){return dl._createAfter(t)}createPositionBefore(t){return dl._createBefore(t)}createRange(t,e){return new ul(t,e)}createRangeOn(t){return ul._createOn(t)}createRangeIn(t){return ul._createIn(t)}createSelection(t,e,i){return new ml(t,e,i)}_wrapChildren(t,e,i,n){let o=e;const r=[];while(o<i){const e=t.getChild(o);const i=e.is(\"text\");const s=e.is(\"attributeElement\");const a=e.is(\"emptyElement\");const c=e.is(\"uiElement\");if(s&&this._wrapAttributeElement(n,e)){r.push(new dl(t,o))}else if(i||a||c||s&&Jl(n,e)){const i=n._clone();e._remove();i._appendChild(e);t._insertChild(o,i);this._addToClonedElementsGroup(i);r.push(new dl(t,o))}else if(s){this._wrapChildren(e,0,e.childCount,n)}o++}let s=0;for(const t of r){t.offset-=s;if(t.offset==e){continue}const n=this.mergeAttributes(t);if(!n.isEqual(t)){s++;i--}}return ul._createFromParentsAndOffsets(t,e,t,i)}_unwrapChildren(t,e,i,n){let o=e;const r=[];while(o<i){const e=t.getChild(o);if(!e.is(\"attributeElement\")){o++;continue}if(e.isSimilar(n)){const n=e.getChildren();const s=e.childCount;e._remove();t._insertChild(o,n);this._removeFromClonedElementsGroup(e);r.push(new dl(t,o),new dl(t,o+s));o+=s;i+=s-1;continue}if(this._unwrapAttributeElement(n,e)){r.push(new dl(t,o),new dl(t,o+1));o++;continue}this._unwrapChildren(e,0,e.childCount,n);o++}let s=0;for(const t of r){t.offset-=s;if(t.offset==e||t.offset==i){continue}const n=this.mergeAttributes(t);if(!n.isEqual(t)){s++;i--}}return ul._createFromParentsAndOffsets(t,e,t,i)}_wrapRange(t,e){const{start:i,end:n}=this._breakAttributesRange(t,true);const o=i.parent;const r=this._wrapChildren(o,i.offset,n.offset,e);const s=this.mergeAttributes(r.start);if(!s.isEqual(r.start)){r.end.offset--}const a=this.mergeAttributes(r.end);return new ul(s,a)}_wrapPosition(t,e){if(e.isSimilar(t.parent)){return Xl(t.clone())}if(t.parent.is(\"text\")){t=Ql(t)}const i=this.createAttributeElement();i._priority=Number.POSITIVE_INFINITY;i.isSimilar=()=>false;t.parent._insertChild(t.offset,i);const n=new ul(t,t.getShiftedBy(1));this.wrap(n,e);const o=new dl(i.parent,i.index);i._remove();const r=o.nodeBefore;const s=o.nodeAfter;if(r instanceof Ds&&s instanceof Ds){return Kl(r,s)}return Xl(o)}_wrapAttributeElement(t,e){if(!nd(t,e)){return false}if(t.name!==e.name||t.priority!==e.priority){return false}for(const i of t.getAttributeKeys()){if(i===\"class\"||i===\"style\"){continue}if(e.hasAttribute(i)&&e.getAttribute(i)!==t.getAttribute(i)){return false}}for(const i of t.getStyleNames()){if(e.hasStyle(i)&&e.getStyle(i)!==t.getStyle(i)){return false}}for(const i of t.getAttributeKeys()){if(i===\"class\"||i===\"style\"){continue}if(!e.hasAttribute(i)){this.setAttribute(i,t.getAttribute(i),e)}}for(const i of t.getStyleNames()){if(!e.hasStyle(i)){this.setStyle(i,t.getStyle(i),e)}}for(const i of t.getClassNames()){if(!e.hasClass(i)){this.addClass(i,e)}}return true}_unwrapAttributeElement(t,e){if(!nd(t,e)){return false}if(t.name!==e.name||t.priority!==e.priority){return false}for(const i of t.getAttributeKeys()){if(i===\"class\"||i===\"style\"){continue}if(!e.hasAttribute(i)||e.getAttribute(i)!==t.getAttribute(i)){return false}}if(!e.hasClass(...t.getClassNames())){return false}for(const i of t.getStyleNames()){if(!e.hasStyle(i)||e.getStyle(i)!==t.getStyle(i)){return false}}for(const i of t.getAttributeKeys()){if(i===\"class\"||i===\"style\"){continue}this.removeAttribute(i,e)}this.removeClass(Array.from(t.getClassNames()),e);this.removeStyle(Array.from(t.getStyleNames()),e);return true}_breakAttributesRange(t,e=false){const i=t.start;const n=t.end;id(t,this.document);if(t.isCollapsed){const i=this._breakAttributes(t.start,e);return new ul(i,i)}const o=this._breakAttributes(n,e);const r=o.parent.childCount;const s=this._breakAttributes(i,e);o.offset+=o.parent.childCount-r;return new ul(s,o)}_breakAttributes(t,e=false){const i=t.offset;const n=t.parent;if(t.parent.is(\"emptyElement\")){throw new ss[\"b\"](\"view-writer-cannot-break-empty-element\",this.document)}if(t.parent.is(\"uiElement\")){throw new ss[\"b\"](\"view-writer-cannot-break-ui-element\",this.document)}if(!e&&n.is(\"text\")&&ed(n.parent)){return t.clone()}if(ed(n)){return t.clone()}if(n.is(\"text\")){return this._breakAttributes(Ql(t),e)}const o=n.childCount;if(i==o){const t=new dl(n.parent,n.index+1);return this._breakAttributes(t,e)}else{if(i===0){const t=new dl(n.parent,n.index);return this._breakAttributes(t,e)}else{const t=n.index+1;const o=n._clone();n.parent._insertChild(t,o);this._addToClonedElementsGroup(o);const r=n.childCount-i;const s=n._removeChildren(i,r);o._appendChild(s);const a=new dl(n.parent,t);return this._breakAttributes(a,e)}}}_addToClonedElementsGroup(t){if(!t.root.is(\"rootElement\")){return}if(t.is(\"element\")){for(const e of t.getChildren()){this._addToClonedElementsGroup(e)}}const e=t.id;if(!e){return}let i=this._cloneGroups.get(e);if(!i){i=new Set;this._cloneGroups.set(e,i)}i.add(t);t._clonesGroup=i}_removeFromClonedElementsGroup(t){if(t.is(\"element\")){for(const e of t.getChildren()){this._removeFromClonedElementsGroup(e)}}const e=t.id;if(!e){return}const i=this._cloneGroups.get(e);if(!i){return}i.delete(t)}}function Yl(t){return Array.from(t.getChildren()).some(t=>!t.is(\"uiElement\"))}function Gl(t){let e=t.parent;while(!ed(e)){if(!e){return undefined}e=e.parent}return e}function Jl(t,e){if(t.priority<e.priority){return true}else if(t.priority>e.priority){return false}return t.getIdentity()<e.getIdentity()}function Xl(t){const e=t.nodeBefore;if(e&&e.is(\"text\")){return new dl(e,e.data.length)}const i=t.nodeAfter;if(i&&i.is(\"text\")){return new dl(i,0)}return t}function Ql(t){if(t.offset==t.parent.data.length){return new dl(t.parent.parent,t.parent.index+1)}if(t.offset===0){return new dl(t.parent.parent,t.parent.index)}const e=t.parent.data.slice(t.offset);t.parent._data=t.parent.data.slice(0,t.offset);t.parent.parent._insertChild(t.parent.index+1,new Ds(t.root.document,e));return new dl(t.parent.parent,t.parent.index+1)}function Kl(t,e){const i=t.data.length;t._data+=e.data;e._remove();return new dl(t,i)}function Zl(t,e){for(const i of t){if(!td.some(t=>i instanceof t)){throw new ss[\"b\"](\"view-writer-insert-invalid-node\",e)}if(!i.is(\"text\")){Zl(i.getChildren(),e)}}}const td=[Ds,wl,Fc,vl,Vl];function ed(t){return t&&(t.is(\"containerElement\")||t.is(\"documentFragment\"))}function id(t,e){const i=Gl(t.start);const n=Gl(t.end);if(!i||!n||i!==n){throw new ss[\"b\"](\"view-writer-invalid-range-container\",e)}}function nd(t,e){return t.id===null&&e.id===null}function od(t){return Object.prototype.toString.call(t)==\"[object Text]\"}const rd=t=>t.createTextNode(\" \");const sd=t=>{const e=t.createElement(\"br\");e.dataset.ckeFiller=true;return e};const ad=7;const cd=(()=>{let t=\"\";for(let e=0;e<ad;e++){t+=\"\"}return t})();function ld(t){return od(t)&&t.data.substr(0,ad)===cd}function dd(t){return t.data.length==ad&&ld(t)}function ud(t){if(ld(t)){return t.data.slice(ad)}else{return t.data}}function hd(t){t.document.on(\"keydown\",fd)}function fd(t,e){if(e.keyCode==Ll.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(t.rangeCount==1&&t.getRangeAt(0).collapsed){const e=t.getRangeAt(0).startContainer;const i=t.getRangeAt(0).startOffset;if(ld(e)&&i<=ad){t.collapse(e,0)}}}}function md(t,e,i,n=false){i=i||function(t,e){return t===e};if(!Array.isArray(t)){t=Array.from(t)}if(!Array.isArray(e)){e=Array.from(e)}const o=gd(t,e,i);return n?_d(o,e.length):wd(e,o)}function gd(t,e,i){const n=pd(t,e,i);if(n===-1){return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1}}const o=bd(t,n);const r=bd(e,n);const s=pd(o,r,i);const a=t.length-s;const c=e.length-s;return{firstIndex:n,lastIndexOld:a,lastIndexNew:c}}function pd(t,e,i){for(let n=0;n<Math.max(t.length,e.length);n++){if(t[n]===undefined||e[n]===undefined||!i(t[n],e[n])){return n}}return-1}function bd(t,e){return t.slice(e).reverse()}function wd(t,e){const i=[];const{firstIndex:n,lastIndexOld:o,lastIndexNew:r}=e;if(r-n>0){i.push({index:n,type:\"insert\",values:t.slice(n,r)})}if(o-n>0){i.push({index:n+(r-n),type:\"delete\",howMany:o-n})}return i}function _d(t,e){const{firstIndex:i,lastIndexOld:n,lastIndexNew:o}=t;if(i===-1){return Array(e).fill(\"equal\")}let r=[];if(i>0){r=r.concat(Array(i).fill(\"equal\"))}if(o-i>0){r=r.concat(Array(o-i).fill(\"insert\"))}if(n-i>0){r=r.concat(Array(n-i).fill(\"delete\"))}if(o<e){r=r.concat(Array(e-o).fill(\"equal\"))}return r}function kd(t,e,i){i=i||function(t,e){return t===e};const n=t.length;const o=e.length;if(n>200||o>200||n+o>300){return kd.fastDiff(t,e,i,true)}let r,s;if(o<n){const i=t;t=e;e=i;r=\"delete\";s=\"insert\"}else{r=\"insert\";s=\"delete\"}const a=t.length;const c=e.length;const l=c-a;const d={};const u={};function h(n){const o=(u[n-1]!==undefined?u[n-1]:-1)+1;const l=u[n+1]!==undefined?u[n+1]:-1;const h=o>l?-1:1;if(d[n+h]){d[n]=d[n+h].slice(0)}if(!d[n]){d[n]=[]}d[n].push(o>l?r:s);let f=Math.max(o,l);let m=f-n;while(m<a&&f<c&&i(t[m],e[f])){m++;f++;d[n].push(\"equal\")}return f}let f=0;let m;do{for(m=-f;m<l;m++){u[m]=h(m)}for(m=l+f;m>l;m--){u[m]=h(m)}u[l]=h(l);f++}while(u[l]!==c);return d[l].slice(1)}kd.fastDiff=md;function vd(t,e,i){t.insertBefore(i,t.childNodes[e]||null)}function yd(t){const e=t.parentNode;if(e){e.removeChild(t)}}function xd(t){if(t){if(t.defaultView){return t instanceof t.defaultView.Document}else if(t.ownerDocument&&t.ownerDocument.defaultView){return t instanceof t.ownerDocument.defaultView.Node}}return false}class Ad{constructor(t,e){this.domDocuments=new Set;this.domConverter=t;this.markedAttributes=new Set;this.markedChildren=new Set;this.markedTexts=new Set;this.selection=e;this.isFocused=false;this._inlineFiller=null;this._fakeSelectionContainer=null}markToSync(t,e){if(t===\"text\"){if(this.domConverter.mapViewToDom(e.parent)){this.markedTexts.add(e)}}else{if(!this.domConverter.mapViewToDom(e)){return}if(t===\"attributes\"){this.markedAttributes.add(e)}else if(t===\"children\"){this.markedChildren.add(e)}else{throw new ss[\"b\"](\"view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.\",this)}}}render(){let t;for(const t of this.markedChildren){this._updateChildrenMappings(t)}if(this._inlineFiller&&!this._isSelectionInInlineFiller()){this._removeInlineFiller()}if(this._inlineFiller){t=this._getInlineFillerPosition()}else if(this._needsInlineFillerAtSelection()){t=this.selection.getFirstPosition();this.markedChildren.add(t.parent)}for(const t of this.markedAttributes){this._updateAttrs(t)}for(const e of this.markedChildren){this._updateChildren(e,{inlineFillerPosition:t})}for(const e of this.markedTexts){if(!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)){this._updateText(e,{inlineFillerPosition:t})}}if(t){const e=this.domConverter.viewPositionToDom(t);const i=e.parent.ownerDocument;if(!ld(e.parent)){this._inlineFiller=Td(i,e.parent,e.offset)}else{this._inlineFiller=e.parent}}else{this._inlineFiller=null}this._updateSelection();this._updateFocus();this.markedTexts.clear();this.markedAttributes.clear();this.markedChildren.clear()}_updateChildrenMappings(t){const e=this.domConverter.mapViewToDom(t);if(!e){return}const i=this.domConverter.mapViewToDom(t).childNodes;const n=Array.from(this.domConverter.viewChildrenToDom(t,e.ownerDocument,{withChildren:false}));const o=this._diffNodeLists(i,n);const r=this._findReplaceActions(o,i,n);if(r.indexOf(\"replace\")!==-1){const e={equal:0,insert:0,delete:0};for(const o of r){if(o===\"replace\"){const o=e.equal+e.insert;const r=e.equal+e.delete;const s=t.getChild(o);if(s&&!s.is(\"uiElement\")){this._updateElementMappings(s,i[r])}yd(n[o]);e.equal++}else{e[o]++}}}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e);this.domConverter.bindElements(e,t);this.markedChildren.add(t);this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();if(t.parent.is(\"text\")){return dl._createBefore(this.selection.getFirstPosition().parent)}else{return t}}_isSelectionInInlineFiller(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed){return false}const t=this.selection.getFirstPosition();const e=this.domConverter.viewPositionToDom(t);if(e&&od(e.parent)&&ld(e.parent)){return true}return false}_removeInlineFiller(){const t=this._inlineFiller;if(!ld(t)){throw new ss[\"b\"](\"view-renderer-filler-was-lost: The inline filler node was lost.\",this)}if(dd(t)){t.parentNode.removeChild(t)}else{t.data=t.data.substr(ad)}this._inlineFiller=null}_needsInlineFillerAtSelection(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed){return false}const t=this.selection.getFirstPosition();const e=t.parent;const i=t.offset;if(!this.domConverter.mapViewToDom(e.root)){return false}if(!e.is(\"element\")){return false}if(!Cd(e)){return false}if(i===e.getFillerOffset()){return false}const n=t.nodeBefore;const o=t.nodeAfter;if(n instanceof Ds||o instanceof Ds){return false}return true}_updateText(t,e){const i=this.domConverter.findCorrespondingDomText(t);const n=this.domConverter.viewToDom(t,i.ownerDocument);const o=i.data;let r=n.data;const s=e.inlineFillerPosition;if(s&&s.parent==t.parent&&s.offset==t.index){r=cd+r}if(o!=r){const t=md(o,r);for(const e of t){if(e.type===\"insert\"){i.insertData(e.index,e.values.join(\"\"))}else{i.deleteData(e.index,e.howMany)}}}}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e){return}const i=Array.from(e.attributes).map(t=>t.name);const n=t.getAttributeKeys();for(const i of n){e.setAttribute(i,t.getAttribute(i))}for(const n of i){if(!t.hasAttribute(n)){e.removeAttribute(n)}}}_updateChildren(t,e){const i=this.domConverter.mapViewToDom(t);if(!i){return}const n=e.inlineFillerPosition;const o=this.domConverter.mapViewToDom(t).childNodes;const r=Array.from(this.domConverter.viewChildrenToDom(t,i.ownerDocument,{bind:true,inlineFillerPosition:n}));if(n&&n.parent===t){Td(i.ownerDocument,r,n.offset)}const s=this._diffNodeLists(o,r);let a=0;const c=new Set;for(const t of s){if(t===\"delete\"){c.add(o[a]);yd(o[a])}else if(t===\"equal\"){a++}}a=0;for(const t of s){if(t===\"insert\"){vd(i,a,r[a]);a++}else if(t===\"equal\"){this._markDescendantTextToSync(this.domConverter.domToView(r[a]));a++}}for(const t of c){if(!t.parentNode){this.domConverter.unbindDomElement(t)}}}_diffNodeLists(t,e){t=Sd(t,this._fakeSelectionContainer);return kd(t,e,Md.bind(null,this.domConverter))}_findReplaceActions(t,e,i){if(t.indexOf(\"insert\")===-1||t.indexOf(\"delete\")===-1){return t}let n=[];let o=[];let r=[];const s={equal:0,insert:0,delete:0};for(const a of t){if(a===\"insert\"){r.push(i[s.equal+s.insert])}else if(a===\"delete\"){o.push(e[s.equal+s.delete])}else{n=n.concat(kd(o,r,Ed).map(t=>t===\"equal\"?\"replace\":t));n.push(\"equal\");o=[];r=[]}s[a]++}return n.concat(kd(o,r,Ed).map(t=>t===\"equal\"?\"replace\":t))}_markDescendantTextToSync(t){if(!t){return}if(t.is(\"text\")){this.markedTexts.add(t)}else if(t.is(\"element\")){for(const e of t.getChildren()){this._markDescendantTextToSync(e)}}}_updateSelection(){if(this.selection.rangeCount===0){this._removeDomSelection();this._removeFakeSelection();return}const t=this.domConverter.mapViewToDom(this.selection.editableElement);if(!this.isFocused||!t){return}if(this.selection.isFake){this._updateFakeSelection(t)}else{this._removeFakeSelection();this._updateDomSelection(t)}}_updateFakeSelection(t){const e=t.ownerDocument;if(!this._fakeSelectionContainer){this._fakeSelectionContainer=Id(e)}const i=this._fakeSelectionContainer;this.domConverter.bindFakeSelection(i,this.selection);if(!this._fakeSelectionNeedsUpdate(t)){return}if(!i.parentElement||i.parentElement!=t){t.appendChild(i)}i.textContent=this.selection.fakeSelectionLabel||\" \";const n=e.getSelection();const o=e.createRange();n.removeAllRanges();o.selectNodeContents(i);n.addRange(o)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e)){return}const i=this.domConverter.viewPositionToDom(this.selection.anchor);const n=this.domConverter.viewPositionToDom(this.selection.focus);t.focus();e.collapse(i.parent,i.offset);e.extend(n.parent,n.offset);if(Cl.isGecko){Pd(n,e)}}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t)){return true}const e=t&&this.domConverter.domSelectionToView(t);if(e&&this.selection.isEqual(e)){return false}if(!this.selection.isCollapsed&&this.selection.isSimilar(e)){return false}return true}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer;const i=t.ownerDocument.getSelection();if(!e||e.parentElement!==t){return true}if(i.anchorNode!==e&&!e.contains(i.anchorNode)){return true}return e.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const t of this.domDocuments){const e=t.getSelection();if(e.rangeCount){const e=t.activeElement;const i=this.domConverter.mapDomToView(e);if(e&&i){t.getSelection().removeAllRanges()}}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;if(t){t.remove()}}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;if(t){this.domConverter.focus(t)}}}}vs(Ad,Jc);function Cd(t){if(t.getAttribute(\"contenteditable\")==\"false\"){return false}const e=t.findAncestor(t=>t.hasAttribute(\"contenteditable\"));return!e||e.getAttribute(\"contenteditable\")==\"true\"}function Td(t,e,i){const n=e instanceof Array?e:e.childNodes;const o=n[i];if(od(o)){o.data=cd+o.data;return o}else{const o=t.createTextNode(cd);if(Array.isArray(e)){n.splice(i,0,o)}else{vd(e,i,o)}return o}}function Ed(t,e){return xd(t)&&xd(e)&&!od(t)&&!od(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function Md(t,e,i){if(e===i){return true}else if(od(e)&&od(i)){return e.data===i.data}else if(t.isBlockFiller(e)&&t.isBlockFiller(i)){return true}return false}function Pd(t,e){const i=t.parent;if(i.nodeType!=Node.ELEMENT_NODE||t.offset!=i.childNodes.length-1){return}const n=i.childNodes[t.offset];if(n&&n.tagName==\"BR\"){e.addRange(e.getRangeAt(0))}}function Sd(t,e){const i=Array.from(t);if(i.length==0||!e){return i}const n=i[i.length-1];if(n==e){i.pop()}return i}function Id(t){const e=t.createElement(\"div\");Object.assign(e.style,{position:\"fixed\",top:0,left:\"-9999px\",width:\"42px\"});e.textContent=\" \";return e}var Nd={window:window,document:document};function Od(t){let e=0;while(t.previousSibling){t=t.previousSibling;e++}return e}function Ld(t){const e=[];while(t&&t.nodeType!=Node.DOCUMENT_NODE){e.unshift(t);t=t.parentNode}return e}function zd(t,e){const i=Ld(t);const n=Ld(e);let o=0;while(i[o]==n[o]&&i[o]){o++}return o===0?null:i[o-1]}const Rd=sd(document);class jd{constructor(t,e={}){this.document=t;this.blockFillerMode=e.blockFillerMode||\"br\";this.preElements=[\"pre\"];this.blockElements=[\"p\",\"div\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"li\",\"dd\",\"dt\",\"figcaption\"];this._blockFiller=this.blockFillerMode==\"br\"?sd:rd;this._domToViewMapping=new WeakMap;this._viewToDomMapping=new WeakMap;this._fakeSelectionMapping=new WeakMap}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new ml(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e);this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t);this._viewToDomMapping.delete(e);for(const e of Array.from(t.childNodes)){this.unbindDomElement(e)}}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e);this._viewToDomMapping.set(e,t)}viewToDom(t,e,i={}){if(t.is(\"text\")){const i=this._processDataFromViewText(t);return e.createTextNode(i)}else{if(this.mapViewToDom(t)){return this.mapViewToDom(t)}let n;if(t.is(\"documentFragment\")){n=e.createDocumentFragment();if(i.bind){this.bindDocumentFragments(n,t)}}else if(t.is(\"uiElement\")){n=t.render(e);if(i.bind){this.bindElements(n,t)}return n}else{if(t.hasAttribute(\"xmlns\")){n=e.createElementNS(t.getAttribute(\"xmlns\"),t.name)}else{n=e.createElement(t.name)}if(i.bind){this.bindElements(n,t)}for(const e of t.getAttributeKeys()){n.setAttribute(e,t.getAttribute(e))}}if(i.withChildren||i.withChildren===undefined){for(const o of this.viewChildrenToDom(t,e,i)){n.appendChild(o)}}return n}}*viewChildrenToDom(t,e,i={}){const n=t.getFillerOffset&&t.getFillerOffset();let o=0;for(const r of t.getChildren()){if(n===o){yield this._blockFiller(e)}yield this.viewToDom(r,e,i);o++}if(n===o){yield this._blockFiller(e)}}viewRangeToDom(t){const e=this.viewPositionToDom(t.start);const i=this.viewPositionToDom(t.end);const n=document.createRange();n.setStart(e.parent,e.offset);n.setEnd(i.parent,i.offset);return n}viewPositionToDom(t){const e=t.parent;if(e.is(\"text\")){const i=this.findCorrespondingDomText(e);if(!i){return null}let n=t.offset;if(ld(i)){n+=ad}return{parent:i,offset:n}}else{let i,n,o;if(t.offset===0){i=this.mapViewToDom(e);if(!i){return null}o=i.childNodes[0]}else{const e=t.nodeBefore;n=e.is(\"text\")?this.findCorrespondingDomText(e):this.mapViewToDom(t.nodeBefore);if(!n){return null}i=n.parentNode;o=n.nextSibling}if(od(o)&&ld(o)){return{parent:o,offset:ad}}const r=n?Od(n)+1:0;return{parent:i,offset:r}}}domToView(t,e={}){if(this.isBlockFiller(t,this.blockFillerMode)){return null}const i=this.getParentUIElement(t,this._domToViewMapping);if(i){return i}if(od(t)){if(dd(t)){return null}else{const e=this._processDataFromDomText(t);return e===\"\"?null:new Ds(this.document,e)}}else if(this.isComment(t)){return null}else{if(this.mapDomToView(t)){return this.mapDomToView(t)}let i;if(this.isDocumentFragment(t)){i=new Ul(this.document);if(e.bind){this.bindDocumentFragments(t,i)}}else{const n=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();i=new jc(this.document,n);if(e.bind){this.bindElements(t,i)}const o=t.attributes;for(let t=o.length-1;t>=0;t--){i._setAttribute(o[t].name,o[t].value)}}if(e.withChildren||e.withChildren===undefined){for(const n of this.domChildrenToView(t,e)){i._appendChild(n)}}return i}}*domChildrenToView(t,e={}){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];const o=this.domToView(n,e);if(o!==null){yield o}}}domSelectionToView(t){if(t.rangeCount===1){let e=t.getRangeAt(0).startContainer;if(od(e)){e=e.parentNode}const i=this.fakeSelectionToView(e);if(i){return i}}const e=this.isDomSelectionBackward(t);const i=[];for(let e=0;e<t.rangeCount;e++){const n=t.getRangeAt(e);const o=this.domRangeToView(n);if(o){i.push(o)}}return new ml(i,{backward:e})}domRangeToView(t){const e=this.domPositionToView(t.startContainer,t.startOffset);const i=this.domPositionToView(t.endContainer,t.endOffset);if(e&&i){return new ul(e,i)}return null}domPositionToView(t,e){if(this.isBlockFiller(t,this.blockFillerMode)){return this.domPositionToView(t.parentNode,Od(t))}const i=this.mapDomToView(t);if(i&&i.is(\"uiElement\")){return dl._createBefore(i)}if(od(t)){if(dd(t)){return this.domPositionToView(t.parentNode,Od(t))}const i=this.findCorrespondingViewText(t);let n=e;if(!i){return null}if(ld(t)){n-=ad;n=n<0?0:n}return new dl(i,n)}else{if(e===0){const e=this.mapDomToView(t);if(e){return new dl(e,0)}}else{const i=t.childNodes[e-1];const n=od(i)?this.findCorrespondingViewText(i):this.mapDomToView(i);if(n&&n.parent){return new dl(n.parent,n.index+1)}}return null}}mapDomToView(t){return this.getParentUIElement(t)||this._domToViewMapping.get(t)}findCorrespondingViewText(t){if(dd(t)){return null}const e=this.getParentUIElement(t);if(e){return e}const i=t.previousSibling;if(i){if(!this.isElement(i)){return null}const t=this.mapDomToView(i);if(t){const e=t.nextSibling;if(e instanceof Ds){return t.nextSibling}else{return null}}}else{const e=this.mapDomToView(t.parentNode);if(e){const t=e.getChild(0);if(t instanceof Ds){return t}else{return null}}}return null}mapViewToDom(t){return this._viewToDomMapping.get(t)}findCorrespondingDomText(t){const e=t.previousSibling;if(e&&this.mapViewToDom(e)){return this.mapViewToDom(e).nextSibling}if(!e&&t.parent&&this.mapViewToDom(t.parent)){return this.mapViewToDom(t.parent).childNodes[0]}return null}focus(t){const e=this.mapViewToDom(t);if(e&&e.ownerDocument.activeElement!==e){const{scrollX:t,scrollY:i}=Nd.window;const n=[];Bd(e,t=>{const{scrollLeft:e,scrollTop:i}=t;n.push([e,i])});e.focus();Bd(e,t=>{const[e,i]=n.shift();t.scrollLeft=e;t.scrollTop=i});Nd.window.scrollTo(t,i)}}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(t){return t&&t.nodeType==Node.COMMENT_NODE}isBlockFiller(t){if(this.blockFillerMode==\"br\"){return t.isEqualNode(Rd)}if(t.tagName===\"BR\"&&Fd(t,this.blockElements)&&t.parentNode.childNodes.length===1){return true}return Vd(t,this.blockElements)}isDomSelectionBackward(t){if(t.isCollapsed){return false}const e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset);e.setEnd(t.focusNode,t.focusOffset);const i=e.collapsed;e.detach();return i}getParentUIElement(t){const e=Ld(t);e.pop();while(e.length){const t=e.pop();const i=this._domToViewMapping.get(t);if(i&&i.is(\"uiElement\")){return i}}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}_isDomSelectionPositionCorrect(t,e){if(od(t)&&ld(t)&&e<ad){return false}if(this.isElement(t)&&ld(t.childNodes[e])){return false}const i=this.mapDomToView(t);if(i&&i.is(\"uiElement\")){return false}return true}_processDataFromViewText(t){let e=t.data;if(t.getAncestors().some(t=>this.preElements.includes(t.name))){return e}if(e.charAt(0)==\" \"){const i=this._getTouchingViewTextNode(t,false);const n=i&&this._nodeEndsWithSpace(i);if(n||!i){e=\" \"+e.substr(1)}}if(e.charAt(e.length-1)==\" \"){const i=this._getTouchingViewTextNode(t,true);if(e.charAt(e.length-2)==\" \"||!i||i.data.charAt(0)==\" \"){e=e.substr(0,e.length-1)+\" \"}}return e.replace(/ {2}/g,\"  \")}_nodeEndsWithSpace(t){if(t.getAncestors().some(t=>this.preElements.includes(t.name))){return false}const e=this._processDataFromViewText(t);return e.charAt(e.length-1)==\" \"}_processDataFromDomText(t){let e=t.data;if(Dd(t,this.preElements)){return ud(t)}e=e.replace(/[ \\n\\t\\r]{1,}/g,\" \");const i=this._getTouchingInlineDomNode(t,false);const n=this._getTouchingInlineDomNode(t,true);const o=this._checkShouldLeftTrimDomText(i);const r=this._checkShouldRightTrimDomText(t,n);if(o){e=e.replace(/^ /,\"\")}if(r){e=e.replace(/ $/,\"\")}e=ud(new Text(e));e=e.replace(/ \\u00A0/g,\" \");if(/( |\\u00A0)\\u00A0$/.test(e)||!n||n.data&&n.data.charAt(0)==\" \"){e=e.replace(/\\u00A0$/,\" \")}if(o){e=e.replace(/^\\u00A0/,\" \")}return e}_checkShouldLeftTrimDomText(t){if(!t){return true}if(Gr(t)){return true}return/[^\\S\\u00A0]/.test(t.data.charAt(t.data.length-1))}_checkShouldRightTrimDomText(t,e){if(e){return false}return!ld(t)}_getTouchingViewTextNode(t,e){const i=new ll({startPosition:e?dl._createAfter(t):dl._createBefore(t),direction:e?\"forward\":\"backward\"});for(const t of i){if(t.item.is(\"containerElement\")){return null}else if(t.item.is(\"br\")){return null}else if(t.item.is(\"textProxy\")){return t.item}}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode){return null}const i=e?\"nextNode\":\"previousNode\";const n=t.ownerDocument;const o=Ld(t)[0];const r=n.createTreeWalker(o,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode(t){if(od(t)){return NodeFilter.FILTER_ACCEPT}if(t.tagName==\"BR\"){return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP}});r.currentNode=t;const s=r[i]();if(s!==null){const e=zd(t,s);if(e&&!Dd(t,this.blockElements,e)&&!Dd(s,this.blockElements,e)){return s}}return null}}function Dd(t,e,i){let n=Ld(t);if(i){n=n.slice(n.indexOf(i)+1)}return n.some(t=>t.tagName&&e.includes(t.tagName.toLowerCase()))}function Bd(t,e){while(t&&t!=Nd.document){e(t);t=t.parentNode}}function Vd(t,e){const i=od(t)&&t.data==\" \";return i&&Fd(t,e)&&t.parentNode.childNodes.length===1}function Fd(t,e){const i=t.parentNode;return i&&i.tagName&&e.includes(i.tagName.toLowerCase())}function Hd(t){const e=Object.prototype.toString.apply(t);if(e==\"[object Window]\"){return true}if(e==\"[object global]\"){return true}return false}const Wd=Uc({},ds,{listenTo(t,...e){if(xd(t)||Hd(t)){const i=this._getProxyEmitter(t)||new qd(t);i.attach(...e);t=i}ds.listenTo.call(this,t,...e)},stopListening(t,e,i){if(xd(t)||Hd(t)){const e=this._getProxyEmitter(t);if(!e){return}t=e}ds.stopListening.call(this,t,e,i);if(t instanceof qd){t.detach(e)}},_getProxyEmitter(t){return us(this,$d(t))}});var Ud=Wd;class qd{constructor(t){hs(this,$d(t));this._domNode=t}}Uc(qd.prototype,ds,{attach(t,e,i={}){if(this._domListeners&&this._domListeners[t]){return}const n=this._createDomListener(t,!!i.useCapture);this._domNode.addEventListener(t,n,!!i.useCapture);if(!this._domListeners){this._domListeners={}}this._domListeners[t]=n},detach(t){let e;if(this._domListeners[t]&&(!(e=this._events[t])||!e.callbacks.length)){this._domListeners[t].removeListener()}},_createDomListener(t,e){const i=e=>{this.fire(t,e)};i.removeListener=()=>{this._domNode.removeEventListener(t,i,e);delete this._domListeners[t]};return i}});function $d(t){return t[\"data-ck-expando\"]||(t[\"data-ck-expando\"]=is())}class Yd{constructor(t){this.view=t;this.document=t.document;this.isEnabled=false}enable(){this.isEnabled=true}disable(){this.isEnabled=false}destroy(){this.disable();this.stopListening()}}vs(Yd,Ud);var Gd=\"__lodash_hash_undefined__\";function Jd(t){this.__data__.set(t,Gd);return this}var Xd=Jd;function Qd(t){return this.__data__.has(t)}var Kd=Qd;function Zd(t){var e=-1,i=t==null?0:t.length;this.__data__=new ke;while(++e<i){this.add(t[e])}}Zd.prototype.add=Zd.prototype.push=Xd;Zd.prototype.has=Kd;var tu=Zd;function eu(t,e){var i=-1,n=t==null?0:t.length;while(++i<n){if(e(t[i],i,t)){return true}}return false}var iu=eu;function nu(t,e){return t.has(e)}var ou=nu;var ru=1,su=2;function au(t,e,i,n,o,r){var s=i&ru,a=t.length,c=e.length;if(a!=c&&!(s&&c>a)){return false}var l=r.get(t);if(l&&r.get(e)){return l==e}var d=-1,u=true,h=i&su?new tu:undefined;r.set(t,e);r.set(e,t);while(++d<a){var f=t[d],m=e[d];if(n){var g=s?n(m,f,d,e,t,r):n(f,m,d,t,e,r)}if(g!==undefined){if(g){continue}u=false;break}if(h){if(!iu(e,(function(t,e){if(!ou(h,e)&&(f===t||o(f,t,i,n,r))){return h.push(e)}}))){u=false;break}}else if(!(f===m||o(f,m,i,n,r))){u=false;break}}r[\"delete\"](t);r[\"delete\"](e);return u}var cu=au;function lu(t){var e=-1,i=Array(t.size);t.forEach((function(t,n){i[++e]=[n,t]}));return i}var du=lu;function uu(t){var e=-1,i=Array(t.size);t.forEach((function(t){i[++e]=t}));return i}var hu=uu;var fu=1,mu=2;var gu=\"[object Boolean]\",pu=\"[object Date]\",bu=\"[object Error]\",wu=\"[object Map]\",_u=\"[object Number]\",ku=\"[object RegExp]\",vu=\"[object Set]\",yu=\"[object String]\",xu=\"[object Symbol]\";var Au=\"[object ArrayBuffer]\",Cu=\"[object DataView]\";var Tu=r?r.prototype:undefined,Eu=Tu?Tu.valueOf:undefined;function Mu(t,e,i,n,o,r,s){switch(i){case Cu:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset){return false}t=t.buffer;e=e.buffer;case Au:if(t.byteLength!=e.byteLength||!r(new fo(t),new fo(e))){return false}return true;case gu:case pu:case _u:return D(+t,+e);case bu:return t.name==e.name&&t.message==e.message;case ku:case yu:return t==e+\"\";case wu:var a=du;case vu:var c=n&fu;a||(a=hu);if(t.size!=e.size&&!c){return false}var l=s.get(t);if(l){return l==e}n|=mu;s.set(t,e);var d=cu(a(t),a(e),n,o,r,s);s[\"delete\"](t);return d;case xu:if(Eu){return Eu.call(t)==Eu.call(e)}}return false}var Pu=Mu;var Su=1;var Iu=Object.prototype;var Nu=Iu.hasOwnProperty;function Ou(t,e,i,n,o,r){var s=i&Su,a=jn(t),c=a.length,l=jn(e),d=l.length;if(c!=d&&!s){return false}var u=c;while(u--){var h=a[u];if(!(s?h in e:Nu.call(e,h))){return false}}var f=r.get(t);if(f&&r.get(e)){return f==e}var m=true;r.set(t,e);r.set(e,t);var g=s;while(++u<c){h=a[u];var p=t[h],b=e[h];if(n){var w=s?n(b,p,h,e,t,r):n(p,b,h,t,e,r)}if(!(w===undefined?p===b||o(p,b,i,n,r):w)){m=false;break}g||(g=h==\"constructor\")}if(m&&!g){var _=t.constructor,k=e.constructor;if(_!=k&&(\"constructor\"in t&&\"constructor\"in e)&&!(typeof _==\"function\"&&_ instanceof _&&typeof k==\"function\"&&k instanceof k)){m=false}}r[\"delete\"](t);r[\"delete\"](e);return m}var Lu=Ou;var zu=1;var Ru=\"[object Arguments]\",ju=\"[object Array]\",Du=\"[object Object]\";var Bu=Object.prototype;var Vu=Bu.hasOwnProperty;function Fu(t,e,i,n,o,r){var s=Je(t),a=Je(e),c=s?ju:so(t),l=a?ju:so(e);c=c==Ru?Du:c;l=l==Ru?Du:l;var d=c==Du,u=l==Du,h=c==l;if(h&&Object(Xe[\"a\"])(t)){if(!Object(Xe[\"a\"])(e)){return false}s=true;d=false}if(h&&!d){r||(r=new Ce);return s||Ri(t)?cu(t,e,i,n,o,r):Pu(t,e,c,i,n,o,r)}if(!(i&zu)){var f=d&&Vu.call(t,\"__wrapped__\"),m=u&&Vu.call(e,\"__wrapped__\");if(f||m){var g=f?t.value():t,p=m?e.value():e;r||(r=new Ce);return o(g,p,i,n,r)}}if(!h){return false}r||(r=new Ce);return Lu(t,e,i,n,o,r)}var Hu=Fu;function Wu(t,e,i,n,o){if(t===e){return true}if(t==null||e==null||!T(t)&&!T(e)){return t!==t&&e!==e}return Hu(t,e,i,n,Wu,o)}var Uu=Wu;function qu(t,e,i){i=typeof i==\"function\"?i:undefined;var n=i?i(t,e):undefined;return n===undefined?Uu(t,e,undefined,i):!!n}var $u=qu;class Yu extends Yd{constructor(t){super(t);this._config={childList:true,characterData:true,characterDataOldValue:true,subtree:true};this.domConverter=t.domConverter;this.renderer=t._renderer;this._domElements=[];this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(t){this._domElements.push(t);if(this.isEnabled){this._mutationObserver.observe(t,this._config)}}enable(){super.enable();for(const t of this._domElements){this._mutationObserver.observe(t,this._config)}}disable(){super.disable();this._mutationObserver.disconnect()}destroy(){super.destroy();this._mutationObserver.disconnect()}_onMutations(t){if(t.length===0){return}const e=this.domConverter;const i=new Map;const n=new Set;for(const i of t){if(i.type===\"childList\"){const t=e.mapDomToView(i.target);if(t&&t.is(\"uiElement\")){continue}if(t&&!this._isBogusBrMutation(i)){n.add(t)}}}for(const o of t){const t=e.mapDomToView(o.target);if(t&&t.is(\"uiElement\")){continue}if(o.type===\"characterData\"){const t=e.findCorrespondingViewText(o.target);if(t&&!n.has(t.parent)){i.set(t,{type:\"text\",oldText:t.data,newText:ud(o.target),node:t})}else if(!t&&ld(o.target)){n.add(e.mapDomToView(o.target.parentNode))}}}const o=[];for(const t of i.values()){this.renderer.markToSync(\"text\",t.node);o.push(t)}for(const t of n){const i=e.mapViewToDom(t);const n=Array.from(t.getChildren());const r=Array.from(e.domChildrenToView(i,{withChildren:false}));if(!$u(n,r,a)){this.renderer.markToSync(\"children\",t);o.push({type:\"children\",oldChildren:n,newChildren:r,node:t})}}const r=t[0].target.ownerDocument.getSelection();let s=null;if(r&&r.anchorNode){const t=e.domPositionToView(r.anchorNode,r.anchorOffset);const i=e.domPositionToView(r.focusNode,r.focusOffset);if(t&&i){s=new ml(t);s.setFocus(i)}}if(o.length){this.document.fire(\"mutations\",o,s);this.view.forceRender()}function a(t,e){if(Array.isArray(t)){return}if(t===e){return true}else if(t.is(\"text\")&&e.is(\"text\")){return t.data===e.data}return false}}_isBogusBrMutation(t){let e=null;if(t.nextSibling===null&&t.removedNodes.length===0&&t.addedNodes.length==1){e=this.domConverter.domToView(t.addedNodes[0],{withChildren:false})}return e&&e.is(\"element\",\"br\")}}class Gu{constructor(t,e,i){this.view=t;this.document=t.document;this.domEvent=e;this.domTarget=e.target;Uc(this,i)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Ju extends Yd{constructor(t){super(t);this.useCapture=false}observe(t){const e=typeof this.domEventType==\"string\"?[this.domEventType]:this.domEventType;e.forEach(e=>{this.listenTo(t,e,(t,e)=>{if(this.isEnabled){this.onDomEvent(e)}},{useCapture:this.useCapture})})}fire(t,e,i){if(this.isEnabled){this.document.fire(t,new Gu(this.view,e,i))}}}class Xu extends Ju{constructor(t){super(t);this.domEventType=[\"keydown\",\"keyup\"]}onDomEvent(t){this.fire(t.type,t,{keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,get keystroke(){return zl(this)}})}}var Qu=function(){return n[\"a\"].Date.now()};var Ku=Qu;var Zu=0/0;var th=/^\\s+|\\s+$/g;var eh=/^[-+]0x[0-9a-f]+$/i;var ih=/^0b[01]+$/i;var nh=/^0o[0-7]+$/i;var oh=parseInt;function rh(t){if(typeof t==\"number\"){return t}if(Qs(t)){return Zu}if(ct(t)){var e=typeof t.valueOf==\"function\"?t.valueOf():t;t=ct(e)?e+\"\":e}if(typeof t!=\"string\"){return t===0?t:+t}t=t.replace(th,\"\");var i=ih.test(t);return i||nh.test(t)?oh(t.slice(2),i?2:8):eh.test(t)?Zu:+t}var sh=rh;var ah=\"Expected a function\";var ch=Math.max,lh=Math.min;function dh(t,e,i){var n,o,r,s,a,c,l=0,d=false,u=false,h=true;if(typeof t!=\"function\"){throw new TypeError(ah)}e=sh(e)||0;if(ct(i)){d=!!i.leading;u=\"maxWait\"in i;r=u?ch(sh(i.maxWait)||0,e):r;h=\"trailing\"in i?!!i.trailing:h}function f(e){var i=n,r=o;n=o=undefined;l=e;s=t.apply(r,i);return s}function m(t){l=t;a=setTimeout(b,e);return d?f(t):s}function g(t){var i=t-c,n=t-l,o=e-i;return u?lh(o,r-n):o}function p(t){var i=t-c,n=t-l;return c===undefined||i>=e||i<0||u&&n>=r}function b(){var t=Ku();if(p(t)){return w(t)}a=setTimeout(b,g(t))}function w(t){a=undefined;if(h&&n){return f(t)}n=o=undefined;return s}function _(){if(a!==undefined){clearTimeout(a)}l=0;n=c=o=a=undefined}function k(){return a===undefined?s:w(Ku())}function v(){var t=Ku(),i=p(t);n=arguments;o=this;c=t;if(i){if(a===undefined){return m(c)}if(u){clearTimeout(a);a=setTimeout(b,e);return f(c)}}if(a===undefined){a=setTimeout(b,e)}return s}v.cancel=_;v.flush=k;return v}var uh=dh;class hh extends Yd{constructor(t){super(t);this._fireSelectionChangeDoneDebounced=uh(t=>this.document.fire(\"selectionChangeDone\",t),200)}observe(){const t=this.document;t.on(\"keydown\",(e,i)=>{const n=t.selection;if(n.isFake&&fh(i.keyCode)&&this.isEnabled){i.preventDefault();this._handleSelectionMove(i.keyCode)}},{priority:\"lowest\"})}destroy(){super.destroy();this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection;const i=new ml(e.getRanges(),{backward:e.isBackward,fake:false});if(t==Ll.arrowleft||t==Ll.arrowup){i.setTo(i.getFirstPosition())}if(t==Ll.arrowright||t==Ll.arrowdown){i.setTo(i.getLastPosition())}const n={oldSelection:e,newSelection:i,domSelection:null};this.document.fire(\"selectionChange\",n);this._fireSelectionChangeDoneDebounced(n)}}function fh(t){return t==Ll.arrowright||t==Ll.arrowleft||t==Ll.arrowup||t==Ll.arrowdown}class mh extends Yd{constructor(t){super(t);this.mutationObserver=t.getObserver(Yu);this.selection=this.document.selection;this.domConverter=t.domConverter;this._documents=new WeakSet;this._fireSelectionChangeDoneDebounced=uh(t=>this.document.fire(\"selectionChangeDone\",t),200);this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3);this._loopbackCounter=0}observe(t){const e=t.ownerDocument;if(this._documents.has(e)){return}this.listenTo(e,\"selectionchange\",()=>{this._handleSelectionChange(e)});this._documents.add(e)}destroy(){super.destroy();clearInterval(this._clearInfiniteLoopInterval);this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(t){if(!this.isEnabled){return}this.mutationObserver.flush();const e=t.defaultView.getSelection();const i=this.domConverter.domSelectionToView(e);if(i.rangeCount==0){return}if(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(e)){return}if(++this._loopbackCounter>60){return}if(this.selection.isSimilar(i)){this.view.forceRender()}else{const t={oldSelection:this.selection,newSelection:i,domSelection:e};this.document.fire(\"selectionChange\",t);this._fireSelectionChangeDoneDebounced(t)}}_clearInfiniteLoop(){this._loopbackCounter=0}}class gh extends Ju{constructor(t){super(t);this.domEventType=[\"focus\",\"blur\"];this.useCapture=true;const e=this.document;e.on(\"focus\",()=>{e.isFocused=true;this._renderTimeoutId=setTimeout(()=>t.forceRender(),50)});e.on(\"blur\",(i,n)=>{const o=e.selection.editableElement;if(o===null||o===n.target){e.isFocused=false;t.forceRender()}})}onDomEvent(t){this.fire(t.type,t)}destroy(){if(this._renderTimeoutId){clearTimeout(this._renderTimeoutId)}super.destroy()}}class ph extends Ju{constructor(t){super(t);this.domEventType=[\"compositionstart\",\"compositionupdate\",\"compositionend\"];const e=this.document;e.on(\"compositionstart\",()=>{e.isComposing=true});e.on(\"compositionend\",()=>{e.isComposing=false})}onDomEvent(t){this.fire(t.type,t)}}class bh extends Ju{constructor(t){super(t);this.domEventType=[\"beforeinput\"]}onDomEvent(t){this.fire(t.type,t)}}function wh(t){return Object.prototype.toString.apply(t)==\"[object Range]\"}function _h(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const kh=[\"top\",\"right\",\"bottom\",\"left\",\"width\",\"height\"];class vh{constructor(t){const e=wh(t);Object.defineProperty(this,\"_source\",{value:t._source||t,writable:true,enumerable:false});if(Gr(t)||e){if(e){yh(this,vh.getDomRangeRects(t)[0])}else{yh(this,t.getBoundingClientRect())}}else if(Hd(t)){const{innerWidth:e,innerHeight:i}=t;yh(this,{top:0,right:e,bottom:i,left:0,width:e,height:i})}else{yh(this,t)}}clone(){return new vh(this)}moveTo(t,e){this.top=e;this.right=t+this.width;this.bottom=e+this.height;this.left=t;return this}moveBy(t,e){this.top+=e;this.right+=t;this.left+=t;this.bottom+=e;return this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left)};e.width=e.right-e.left;e.height=e.bottom-e.top;if(e.width<0||e.height<0){return null}else{return new vh(e)}}getIntersectionArea(t){const e=this.getIntersection(t);if(e){return e.getArea()}else{return 0}}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(!xh(t)){let i=t.parentNode||t.commonAncestorContainer;while(i&&!xh(i)){const t=new vh(i);const n=e.getIntersection(t);if(n){if(n.getArea()<e.getArea()){e=n}}else{return null}i=i.parentNode}}return e}isEqual(t){for(const e of kh){if(this[e]!==t[e]){return false}}return true}contains(t){const e=this.getIntersection(t);return!!(e&&e.isEqual(t))}excludeScrollbarsAndBorders(){const t=this._source;let e,i,n;if(Hd(t)){e=t.innerWidth-t.document.documentElement.clientWidth;i=t.innerHeight-t.document.documentElement.clientHeight;n=t.getComputedStyle(t.document.documentElement).direction}else{const o=_h(this._source);e=t.offsetWidth-t.clientWidth-o.left-o.right;i=t.offsetHeight-t.clientHeight-o.top-o.bottom;n=t.ownerDocument.defaultView.getComputedStyle(t).direction;this.left+=o.left;this.top+=o.top;this.right-=o.right;this.bottom-=o.bottom;this.width=this.right-this.left;this.height=this.bottom-this.top}this.width-=e;if(n===\"ltr\"){this.right-=e}else{this.left+=e}this.height-=i;this.bottom-=i;return this}static getDomRangeRects(t){const e=[];const i=Array.from(t.getClientRects());if(i.length){for(const t of i){e.push(new vh(t))}}else{let i=t.startContainer;if(od(i)){i=i.parentNode}const n=new vh(i.getBoundingClientRect());n.right=n.left;n.width=0;e.push(n)}return e}}function yh(t,e){for(const i of kh){t[i]=e[i]}}function xh(t){if(!Gr(t)){return false}return t===t.ownerDocument.body}const Ah={};function Ch({target:t,viewportOffset:e=0}){const i=Oh(t);let n=i;let o=null;while(n){let r;if(n==i){r=Lh(t)}else{r=Lh(o)}Mh(r,()=>zh(t,n));const s=zh(t,n);Eh(n,s,e);if(n.parent!=n){o=n.frameElement;n=n.parent;if(!o){return}}else{n=null}}}function Th(t){const e=Lh(t);Mh(e,()=>new vh(t))}Object.assign(Ah,{scrollViewportToShowTarget:Ch,scrollAncestorsToShowTarget:Th});function Eh(t,e,i){const n=e.clone().moveBy(0,i);const o=e.clone().moveBy(0,-i);const r=new vh(t).excludeScrollbarsAndBorders();const s=[o,n];if(!s.every(t=>r.contains(t))){let{scrollX:s,scrollY:a}=t;if(Sh(o,r)){a-=r.top-e.top+i}else if(Ph(n,r)){a+=e.bottom-r.bottom+i}if(Ih(e,r)){s-=r.left-e.left+i}else if(Nh(e,r)){s+=e.right-r.right+i}t.scrollTo(s,a)}}function Mh(t,e){const i=Oh(t);let n,o;while(t!=i.document.body){o=e();n=new vh(t).excludeScrollbarsAndBorders();if(!n.contains(o)){if(Sh(o,n)){t.scrollTop-=n.top-o.top}else if(Ph(o,n)){t.scrollTop+=o.bottom-n.bottom}if(Ih(o,n)){t.scrollLeft-=n.left-o.left}else if(Nh(o,n)){t.scrollLeft+=o.right-n.right}}t=t.parentNode}}function Ph(t,e){return t.bottom>e.bottom}function Sh(t,e){return t.top<e.top}function Ih(t,e){return t.left<e.left}function Nh(t,e){return t.right>e.right}function Oh(t){if(wh(t)){return t.startContainer.ownerDocument.defaultView}else{return t.ownerDocument.defaultView}}function Lh(t){if(wh(t)){let e=t.commonAncestorContainer;if(od(e)){e=e.parentNode}return e}else{return t.parentNode}}function zh(t,e){const i=Oh(t);const n=new vh(t);if(i===e){return n}else{let t=i;while(t!=e){const e=t.frameElement;const i=new vh(e).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top);t=t.parent}}return n}class Rh{constructor(t){this.document=new pl(t);this.domConverter=new jd(this.document);this.domRoots=new Map;this.set(\"isRenderingInProgress\",false);this._renderer=new Ad(this.domConverter,this.document.selection);this._renderer.bind(\"isFocused\").to(this.document);this._initialDomRootAttributes=new WeakMap;this._observers=new Map;this._ongoingChange=false;this._postFixersInProgress=false;this._renderingDisabled=false;this._hasChangedSinceTheLastRendering=false;this._writer=new $l(this.document);this.addObserver(Yu);this.addObserver(mh);this.addObserver(gh);this.addObserver(Xu);this.addObserver(hh);this.addObserver(ph);if(Cl.isAndroid){this.addObserver(bh)}hd(this);Fl(this);this.on(\"render\",()=>{this._render();this.document.fire(\"layoutChanged\");this._hasChangedSinceTheLastRendering=false});this.listenTo(this.document.selection,\"change\",()=>{this._hasChangedSinceTheLastRendering=true})}attachDomRoot(t,e=\"main\"){const i=this.document.getRoot(e);i._name=t.tagName.toLowerCase();const n={};for(const{name:e,value:o}of Array.from(t.attributes)){n[e]=o;if(e===\"class\"){this._writer.addClass(o.split(\" \"),i)}else{this._writer.setAttribute(e,o,i)}}this._initialDomRootAttributes.set(t,n);const o=()=>{this._writer.setAttribute(\"contenteditable\",!i.isReadOnly,i);if(i.isReadOnly){this._writer.addClass(\"ck-read-only\",i)}else{this._writer.removeClass(\"ck-read-only\",i)}};o();this.domRoots.set(e,t);this.domConverter.bindElements(t,i);this._renderer.markToSync(\"children\",i);this._renderer.markToSync(\"attributes\",i);this._renderer.domDocuments.add(t.ownerDocument);i.on(\"change:children\",(t,e)=>this._renderer.markToSync(\"children\",e));i.on(\"change:attributes\",(t,e)=>this._renderer.markToSync(\"attributes\",e));i.on(\"change:text\",(t,e)=>this._renderer.markToSync(\"text\",e));i.on(\"change:isReadOnly\",()=>this.change(o));i.on(\"change\",()=>{this._hasChangedSinceTheLastRendering=true});for(const i of this._observers.values()){i.observe(t,e)}}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach(({name:t})=>e.removeAttribute(t));const i=this._initialDomRootAttributes.get(e);for(const t in i){e.setAttribute(t,i[t])}this.domRoots.delete(t);this.domConverter.unbindDomElement(e)}getDomRoot(t=\"main\"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e){return e}e=new t(this);this._observers.set(t,e);for(const[t,i]of this.domRoots){e.observe(i,t)}e.enable();return e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values()){t.disable()}}enableObservers(){for(const t of this._observers.values()){t.enable()}}scrollToTheSelection(){const t=this.document.selection.getFirstRange();if(t){Ch({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;if(t){this.domConverter.focus(t);this.forceRender()}else{}}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress){throw new ss[\"b\"](\"cannot-change-view-tree: \"+\"Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. \"+\"This may cause some unexpected behavior and inconsistency between the DOM and the view.\",this)}try{if(this._ongoingChange){return t(this._writer)}this._ongoingChange=true;const e=t(this._writer);this._ongoingChange=false;if(!this._renderingDisabled&&this._hasChangedSinceTheLastRendering){this._postFixersInProgress=true;this.document._callPostFixers(this._writer);this._postFixersInProgress=false;this.fire(\"render\")}return e}catch(t){ss[\"b\"].rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=true;this.change(()=>{})}destroy(){for(const t of this._observers.values()){t.destroy()}this.document.destroy();this.stopListening()}createPositionAt(t,e){return dl._createAt(t,e)}createPositionAfter(t){return dl._createAfter(t)}createPositionBefore(t){return dl._createBefore(t)}createRange(t,e){return new ul(t,e)}createRangeOn(t){return ul._createOn(t)}createRangeIn(t){return ul._createIn(t)}createSelection(t,e,i){return new ml(t,e,i)}_disableRendering(t){this._renderingDisabled=t;if(t==false){this.change(()=>{})}}_render(){this.isRenderingInProgress=true;this.disableObservers();this._renderer.render();this.enableObservers();this.isRenderingInProgress=false}}vs(Rh,Jc);class jh{constructor(t){this.parent=null;this._attrs=Hs(t)}get index(){let t;if(!this.parent){return null}if((t=this.parent.getChildIndex(this))===null){throw new ss[\"b\"](\"model-node-not-found-in-parent: The node's parent does not contain this node.\",this)}return t}get startOffset(){let t;if(!this.parent){return null}if((t=this.parent.getChildStartOffset(this))===null){throw new ss[\"b\"](\"model-node-not-found-in-parent: The node's parent does not contain this node.\",this)}return t}get offsetSize(){return 1}get endOffset(){if(!this.parent){return null}return this.startOffset+this.offsetSize}get nextSibling(){const t=this.index;return t!==null&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return t!==null&&this.parent.getChild(t-1)||null}get root(){let t=this;while(t.parent){t=t.parent}return t}isAttached(){return this.root.is(\"rootElement\")}getPath(){const t=[];let e=this;while(e.parent){t.unshift(e.startOffset);e=e.parent}return t}getAncestors(t={includeSelf:false,parentFirst:false}){const e=[];let i=t.includeSelf?this:this.parent;while(i){e[t.parentFirst?\"push\":\"unshift\"](i);i=i.parent}return e}getCommonAncestor(t,e={}){const i=this.getAncestors(e);const n=t.getAncestors(e);let o=0;while(i[o]==n[o]&&i[o]){o++}return o===0?null:i[o-1]}isBefore(t){if(this==t){return false}if(this.root!==t.root){return false}const e=this.getPath();const i=t.getPath();const n=Os(e,i);switch(n){case\"prefix\":return true;case\"extension\":return false;default:return e[n]<i[n]}}isAfter(t){if(this==t){return false}if(this.root!==t.root){return false}return!this.isBefore(t)}hasAttribute(t){return this._attrs.has(t)}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const t={};if(this._attrs.size){t.attributes=Array.from(this._attrs).reduce((t,e)=>{t[e[0]]=e[1];return t},{})}return t}is(t){return t==\"node\"||t==\"model:node\"}_clone(){return new jh(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=Hs(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}class Dh extends jh{constructor(t,e){super(e);this._data=t||\"\"}get offsetSize(){return this.data.length}get data(){return this._data}is(t){return t==\"text\"||t==\"model:text\"||super.is(t)}toJSON(){const t=super.toJSON();t.data=this.data;return t}_clone(){return new Dh(this.data,this.getAttributes())}static fromJSON(t){return new Dh(t.data,t.attributes)}}class Bh{constructor(t,e,i){this.textNode=t;if(e<0||e>t.offsetSize){throw new ss[\"b\"](\"model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.\",this)}if(i<0||e+i>t.offsetSize){throw new ss[\"b\"](\"model-textproxy-wrong-length: Given length value is incorrect.\",this)}this.data=t.data.substring(e,e+i);this.offsetInText=e}get startOffset(){return this.textNode.startOffset!==null?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return this.startOffset!==null?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}is(t){return t==\"textProxy\"||t==\"model:textProxy\"}getPath(){const t=this.textNode.getPath();if(t.length>0){t[t.length-1]+=this.offsetInText}return t}getAncestors(t={includeSelf:false,parentFirst:false}){const e=[];let i=t.includeSelf?this:this.parent;while(i){e[t.parentFirst?\"push\":\"unshift\"](i);i=i.parent}return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Vh{constructor(t){this._nodes=[];if(t){this._insertNodes(0,t)}}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((t,e)=>t+e.offsetSize,0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return e==-1?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return e===null?null:this._nodes.slice(0,e).reduce((t,e)=>t+e.offsetSize,0)}indexToOffset(t){if(t==this._nodes.length){return this.maxOffset}const e=this._nodes[t];if(!e){throw new ss[\"b\"](\"model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.\",this)}return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const i of this._nodes){if(t>=e&&t<e+i.offsetSize){return this.getNodeIndex(i)}e+=i.offsetSize}if(e!=t){throw new ss[\"b\"](\"model-nodelist-offset-out-of-bounds: Given offset cannot be found in the node list.\",this,{offset:t,nodeList:this})}return this.length}_insertNodes(t,e){for(const t of e){if(!(t instanceof jh)){throw new ss[\"b\"](\"model-nodelist-insertNodes-not-node: Trying to insert an object which is not a Node instance.\",this)}}this._nodes.splice(t,0,...e)}_removeNodes(t,e=1){return this._nodes.splice(t,e)}toJSON(){return this._nodes.map(t=>t.toJSON())}}class Fh extends jh{constructor(t,e,i){super(e);this.name=t;this._children=new Vh;if(i){this._insertChild(0,i)}}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return this.childCount===0}is(t,e=null){const i=t.replace(/^model:/,\"\");if(!e){return i==\"element\"||i==this.name||super.is(t)}else{return i==\"element\"&&e==this.name}}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const i of t){e=e.getChild(e.offsetToIndex(i))}return e}toJSON(){const t=super.toJSON();t.name=this.name;if(this._children.length>0){t.children=[];for(const e of this._children){t.children.push(e.toJSON())}}return t}_clone(t=false){const e=t?Array.from(this._children).map(t=>t._clone(true)):null;return new Fh(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const i=Hh(e);for(const t of i){if(t.parent!==null){t._remove()}t.parent=this}this._children._insertNodes(t,i)}_removeChildren(t,e=1){const i=this._children._removeNodes(t,e);for(const t of i){t.parent=null}return i}static fromJSON(t){let e=null;if(t.children){e=[];for(const i of t.children){if(i.name){e.push(Fh.fromJSON(i))}else{e.push(Dh.fromJSON(i))}}}return new Fh(t.name,t.attributes,e)}}function Hh(t){if(typeof t==\"string\"){return[new Dh(t)]}if(!Fs(t)){t=[t]}return Array.from(t).map(t=>{if(typeof t==\"string\"){return new Dh(t)}if(t instanceof Bh){return new Dh(t.data,t.getAttributes())}return t})}class Wh{constructor(t={}){if(!t.boundaries&&!t.startPosition){throw new ss[\"b\"](\"model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.\",null)}const e=t.direction||\"forward\";if(e!=\"forward\"&&e!=\"backward\"){throw new ss[\"b\"](\"model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.\",t,{direction:e})}this.direction=e;this.boundaries=t.boundaries||null;if(t.startPosition){this.position=t.startPosition.clone()}else{this.position=qh._createAt(this.boundaries[this.direction==\"backward\"?\"end\":\"start\"])}this.position.stickiness=\"toNone\";this.singleCharacters=!!t.singleCharacters;this.shallow=!!t.shallow;this.ignoreElementEnd=!!t.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(t){let e,i,n,o;do{n=this.position;o=this._visitedParent;({done:e,value:i}=this.next())}while(!e&&t(i));if(!e){this.position=n;this._visitedParent=o}}next(){if(this.direction==\"forward\"){return this._next()}else{return this._previous()}}_next(){const t=this.position;const e=this.position.clone();const i=this._visitedParent;if(i.parent===null&&e.offset===i.maxOffset){return{done:true}}if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset){return{done:true}}const n=e.textNode?e.textNode:e.nodeAfter;if(n instanceof Fh){if(!this.shallow){e.path.push(0);this._visitedParent=n}else{e.offset++}this.position=e;return Uh(\"elementStart\",n,t,e,1)}else if(n instanceof Dh){let o;if(this.singleCharacters){o=1}else{let t=n.endOffset;if(this._boundaryEndParent==i&&this.boundaries.end.offset<t){t=this.boundaries.end.offset}o=t-e.offset}const r=e.offset-n.startOffset;const s=new Bh(n,r,o);e.offset+=o;this.position=e;return Uh(\"text\",s,t,e,o)}else{e.path.pop();e.offset++;this.position=e;this._visitedParent=i.parent;if(this.ignoreElementEnd){return this._next()}else{return Uh(\"elementEnd\",i,t,e)}}}_previous(){const t=this.position;const e=this.position.clone();const i=this._visitedParent;if(i.parent===null&&e.offset===0){return{done:true}}if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset){return{done:true}}const n=e.textNode?e.textNode:e.nodeBefore;if(n instanceof Fh){e.offset--;if(!this.shallow){e.path.push(n.maxOffset);this.position=e;this._visitedParent=n;if(this.ignoreElementEnd){return this._previous()}else{return Uh(\"elementEnd\",n,t,e)}}else{this.position=e;return Uh(\"elementStart\",n,t,e,1)}}else if(n instanceof Dh){let o;if(this.singleCharacters){o=1}else{let t=n.startOffset;if(this._boundaryStartParent==i&&this.boundaries.start.offset>t){t=this.boundaries.start.offset}o=e.offset-t}const r=e.offset-n.startOffset;const s=new Bh(n,r-o,o);e.offset-=o;this.position=e;return Uh(\"text\",s,t,e,o)}else{e.path.pop();this.position=e;this._visitedParent=i.parent;return Uh(\"elementStart\",i,t,e,1)}}}function Uh(t,e,i,n,o){return{done:false,value:{type:t,item:e,previousPosition:i,nextPosition:n,length:o}}}class qh{constructor(t,e,i=\"toNone\"){if(!t.is(\"element\")&&!t.is(\"documentFragment\")){throw new ss[\"b\"](\"model-position-root-invalid: Position root invalid.\",t)}if(!(e instanceof Array)||e.length===0){throw new ss[\"b\"](\"model-position-path-incorrect-format: Position path must be an array with at least one item.\",t,{path:e})}e=t.getPath().concat(e);t=t.root;this.root=t;this.path=e;this.stickiness=i}get offset(){return Aa(this.path)}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;e<this.path.length-1;e++){t=t.getChild(t.offsetToIndex(this.path[e]));if(!t){throw new ss[\"b\"](\"model-position-path-incorrect: The position's path is incorrect.\",this,{position:this})}}if(t.is(\"text\")){throw new ss[\"b\"](\"model-position-path-incorrect: The position's path is incorrect.\",this,{position:this})}return t}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){const t=this.parent.getChild(this.index);return t instanceof Dh&&t.startOffset<this.offset?t:null}get nodeAfter(){return this.textNode===null?this.parent.getChild(this.index):null}get nodeBefore(){return this.textNode===null?this.parent.getChild(this.index-1):null}get isAtStart(){return this.offset===0}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(t){if(this.root!=t.root){return\"different\"}const e=Os(this.path,t.path);switch(e){case\"same\":return\"same\";case\"prefix\":return\"before\";case\"extension\":return\"after\";default:return this.path[e]<t.path[e]?\"before\":\"after\"}}getLastMatchingPosition(t,e={}){e.startPosition=this;const i=new Wh(e);i.skip(t);return i.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){if(this.parent.is(\"documentFragment\")){return[this.parent]}else{return this.parent.getAncestors({includeSelf:true})}}getCommonPath(t){if(this.root!=t.root){return[]}const e=Os(this.path,t.path);const i=typeof e==\"string\"?Math.min(this.path.length,t.path.length):e;return this.path.slice(0,i)}getCommonAncestor(t){const e=this.getAncestors();const i=t.getAncestors();let n=0;while(e[n]==i[n]&&e[n]){n++}return n===0?null:e[n-1]}getShiftedBy(t){const e=this.clone();const i=e.offset+t;e.offset=i<0?0:i;return e}isAfter(t){return this.compareWith(t)==\"after\"}isBefore(t){return this.compareWith(t)==\"before\"}isEqual(t){return this.compareWith(t)==\"same\"}isTouching(t){let e=null;let i=null;const n=this.compareWith(t);switch(n){case\"same\":return true;case\"before\":e=qh._createAt(this);i=qh._createAt(t);break;case\"after\":e=qh._createAt(t);i=qh._createAt(this);break;default:return false}let o=e.parent;while(e.path.length+i.path.length){if(e.isEqual(i)){return true}if(e.path.length>i.path.length){if(e.offset!==o.maxOffset){return false}e.path=e.path.slice(0,-1);o=o.parent;e.offset++}else{if(i.offset!==0){return false}i.path=i.path.slice(0,-1)}}}is(t){return t==\"position\"||t==\"model:position\"}hasSameParentAs(t){if(this.root!==t.root){return false}const e=this.getParentPath();const i=t.getParentPath();return Os(e,i)==\"same\"}getTransformedByOperation(t){let e;switch(t.type){case\"insert\":e=this._getTransformedByInsertOperation(t);break;case\"move\":case\"remove\":case\"reinsert\":e=this._getTransformedByMoveOperation(t);break;case\"split\":e=this._getTransformedBySplitOperation(t);break;case\"merge\":e=this._getTransformedByMergeOperation(t);break;default:e=qh._createAt(this);break}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;const i=e.containsPosition(this)||e.start.isEqual(this)&&this.stickiness==\"toNext\";if(i){return this._getCombined(t.splitPosition,t.moveTargetPosition)}else{if(t.graveyardPosition){return this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1)}else{return this._getTransformedByInsertion(t.insertionPosition,1)}}}_getTransformedByMergeOperation(t){const e=t.movedRange;const i=e.containsPosition(this)||e.start.isEqual(this);let n;if(i){n=this._getCombined(t.sourcePosition,t.targetPosition);if(t.sourcePosition.isBefore(t.targetPosition)){n=n._getTransformedByDeletion(t.deletionPosition,1)}}else if(this.isEqual(t.deletionPosition)){n=qh._createAt(t.deletionPosition)}else{n=this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1)}return n}_getTransformedByDeletion(t,e){const i=qh._createAt(this);if(this.root!=t.root){return i}if(Os(t.getParentPath(),this.getParentPath())==\"same\"){if(t.offset<this.offset){if(t.offset+e>this.offset){return null}else{i.offset-=e}}}else if(Os(t.getParentPath(),this.getParentPath())==\"prefix\"){const n=t.path.length-1;if(t.offset<=this.path[n]){if(t.offset+e>this.path[n]){return null}else{i.path[n]-=e}}}return i}_getTransformedByInsertion(t,e){const i=qh._createAt(this);if(this.root!=t.root){return i}if(Os(t.getParentPath(),this.getParentPath())==\"same\"){if(t.offset<this.offset||t.offset==this.offset&&this.stickiness!=\"toPrevious\"){i.offset+=e}}else if(Os(t.getParentPath(),this.getParentPath())==\"prefix\"){const n=t.path.length-1;if(t.offset<=this.path[n]){i.path[n]+=e}}return i}_getTransformedByMove(t,e,i){e=e._getTransformedByDeletion(t,i);if(t.isEqual(e)){return qh._createAt(this)}const n=this._getTransformedByDeletion(t,i);const o=n===null||t.isEqual(this)&&this.stickiness==\"toNext\"||t.getShiftedBy(i).isEqual(this)&&this.stickiness==\"toPrevious\";if(o){return this._getCombined(t,e)}else{return n._getTransformedByInsertion(e,i)}}_getCombined(t,e){const i=t.path.length-1;const n=qh._createAt(e);n.stickiness=this.stickiness;n.offset=n.offset+this.path[i]-t.offset;n.path=n.path.concat(this.path.slice(i+1));return n}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(t,e,i=\"toNone\"){if(t instanceof qh){return new qh(t.root,t.path,t.stickiness)}else{const n=t;if(e==\"end\"){e=n.maxOffset}else if(e==\"before\"){return this._createBefore(n,i)}else if(e==\"after\"){return this._createAfter(n,i)}else if(e!==0&&!e){throw new ss[\"b\"](\"model-createPositionAt-offset-required: \"+\"Model#createPositionAt() requires the offset when the first parameter is a model item.\",[this,t])}if(!n.is(\"element\")&&!n.is(\"documentFragment\")){throw new ss[\"b\"](\"model-position-parent-incorrect: Position parent have to be a element or document fragment.\",[this,t])}const o=n.getPath();o.push(e);return new this(n.root,o,i)}}static _createAfter(t,e){if(!t.parent){throw new ss[\"b\"](\"model-position-after-root: You cannot make a position after root.\",[this,t],{root:t})}return this._createAt(t.parent,t.endOffset,e)}static _createBefore(t,e){if(!t.parent){throw new ss[\"b\"](\"model-position-before-root: You cannot make a position before root.\",t,{root:t})}return this._createAt(t.parent,t.startOffset,e)}static fromJSON(t,e){if(t.root===\"$graveyard\"){const i=new qh(e.graveyard,t.path);i.stickiness=t.stickiness;return i}if(!e.getRoot(t.root)){throw new ss[\"b\"](\"model-position-fromjson-no-root: Cannot create position for document. Root with specified name does not exist.\",e,{rootName:t.root})}return new qh(e.getRoot(t.root),t.path,t.stickiness)}}class $h{constructor(t,e=null){this.start=qh._createAt(t);this.end=e?qh._createAt(e):qh._createAt(t);this.start.stickiness=this.isCollapsed?\"toNone\":\"toNext\";this.end.stickiness=this.isCollapsed?\"toNone\":\"toPrevious\"}*[Symbol.iterator](){yield*new Wh({boundaries:this,ignoreElementEnd:true})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){const t=this.start.getParentPath();const e=this.end.getParentPath();return Os(t,e)==\"same\"}get root(){return this.start.root}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=false){if(t.isCollapsed){e=false}const i=this.containsPosition(t.start)||e&&this.start.isEqual(t.start);const n=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return i&&n}containsItem(t){const e=qh._createBefore(t);return this.containsPosition(e)||this.start.isEqual(e)}is(t){return t==\"range\"||t==\"model:range\"}isEqual(t){return this.start.isEqual(t.start)&&this.end.isEqual(t.end)}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}getDifference(t){const e=[];if(this.isIntersecting(t)){if(this.containsPosition(t.start)){e.push(new $h(this.start,t.start))}if(this.containsPosition(t.end)){e.push(new $h(t.end,this.end))}}else{e.push(new $h(this.start,this.end))}return e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start;let i=this.end;if(this.containsPosition(t.start)){e=t.start}if(this.containsPosition(t.end)){i=t.end}return new $h(e,i)}return null}getMinimalFlatRanges(){const t=[];const e=this.start.getCommonPath(this.end).length;const i=qh._createAt(this.start);let n=i.parent;while(i.path.length>e+1){const e=n.maxOffset-i.offset;if(e!==0){t.push(new $h(i,i.getShiftedBy(e)))}i.path=i.path.slice(0,-1);i.offset++;n=n.parent}while(i.path.length<=this.end.path.length){const e=this.end.path[i.path.length-1];const n=e-i.offset;if(n!==0){t.push(new $h(i,i.getShiftedBy(n)))}i.offset=e;i.path.push(0)}return t}getWalker(t={}){t.boundaries=this;return new Wh(t)}*getItems(t={}){t.boundaries=this;t.ignoreElementEnd=true;const e=new Wh(t);for(const t of e){yield t.item}}*getPositions(t={}){t.boundaries=this;const e=new Wh(t);yield e.position;for(const t of e){yield t.nextPosition}}getTransformedByOperation(t){switch(t.type){case\"insert\":return this._getTransformedByInsertOperation(t);case\"move\":case\"remove\":case\"reinsert\":return this._getTransformedByMoveOperation(t);case\"split\":return[this._getTransformedBySplitOperation(t)];case\"merge\":return[this._getTransformedByMergeOperation(t)]}return[new $h(this.start,this.end)]}getTransformedByOperations(t){const e=[new $h(this.start,this.end)];for(const i of t){for(let t=0;t<e.length;t++){const n=e[t].getTransformedByOperation(i);e.splice(t,1,...n);t+=n.length-1}}for(let t=0;t<e.length;t++){const i=e[t];for(let n=t+1;n<e.length;n++){const t=e[n];if(i.containsRange(t)||t.containsRange(i)||i.isEqual(t)){e.splice(n,1)}}}return e}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed){return null}const t=this.start.nodeAfter;const e=this.end.nodeBefore;if(t&&t.is(\"element\")&&t===e){return t}return null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(t,e=false){return this._getTransformedByInsertion(t.position,t.howMany,e)}_getTransformedByMoveOperation(t,e=false){const i=t.sourcePosition;const n=t.howMany;const o=t.targetPosition;return this._getTransformedByMove(i,o,n,e)}_getTransformedBySplitOperation(t){const e=this.start._getTransformedBySplitOperation(t);let i=this.end._getTransformedBySplitOperation(t);if(this.end.isEqual(t.insertionPosition)){i=this.end.getShiftedBy(1)}if(e.root!=i.root){i=this.end.getShiftedBy(-1)}return new $h(e,i)}_getTransformedByMergeOperation(t){if(this.start.isEqual(t.targetPosition)&&this.end.isEqual(t.deletionPosition)){return new $h(this.start)}let e=this.start._getTransformedByMergeOperation(t);let i=this.end._getTransformedByMergeOperation(t);if(e.root!=i.root){i=this.end.getShiftedBy(-1)}if(e.isAfter(i)){if(t.sourcePosition.isBefore(t.targetPosition)){e=qh._createAt(i);e.offset=0}else{if(!t.deletionPosition.isEqual(e)){i=t.deletionPosition}e=t.targetPosition}return new $h(e,i)}return new $h(e,i)}_getTransformedByInsertion(t,e,i=false){if(i&&this.containsPosition(t)){return[new $h(this.start,t),new $h(t.getShiftedBy(e),this.end._getTransformedByInsertion(t,e))]}else{const i=new $h(this.start,this.end);i.start=i.start._getTransformedByInsertion(t,e);i.end=i.end._getTransformedByInsertion(t,e);return[i]}}_getTransformedByMove(t,e,i,n=false){if(this.isCollapsed){const n=this.start._getTransformedByMove(t,e,i);return[new $h(n)]}const o=$h._createFromPositionAndShift(t,i);const r=e._getTransformedByDeletion(t,i);if(this.containsPosition(e)&&!n){if(o.containsPosition(this.start)||o.containsPosition(this.end)){const n=this.start._getTransformedByMove(t,e,i);const o=this.end._getTransformedByMove(t,e,i);return[new $h(n,o)]}}let s;const a=this.getDifference(o);let c=null;const l=this.getIntersection(o);if(a.length==1){c=new $h(a[0].start._getTransformedByDeletion(t,i),a[0].end._getTransformedByDeletion(t,i))}else if(a.length==2){c=new $h(this.start,this.end._getTransformedByDeletion(t,i))}if(c){s=c._getTransformedByInsertion(r,i,l!==null||n)}else{s=[]}if(l){const t=new $h(l.start._getCombined(o.start,r),l.end._getCombined(o.start,r));if(s.length==2){s.splice(1,0,t)}else{s.push(t)}}return s}_getTransformedByDeletion(t,e){let i=this.start._getTransformedByDeletion(t,e);let n=this.end._getTransformedByDeletion(t,e);if(i==null&&n==null){return null}if(i==null){i=t}if(n==null){n=t}return new $h(i,n)}static _createFromPositionAndShift(t,e){const i=t;const n=t.getShiftedBy(e);return e>0?new this(i,n):new this(n,i)}static _createIn(t){return new this(qh._createAt(t,0),qh._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(qh._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(t.length===0){throw new ss[\"b\"](\"range-create-from-ranges-empty-array: At least one range has to be passed.\",null)}else if(t.length==1){return t[0].clone()}const e=t[0];t.sort((t,e)=>t.start.isAfter(e.start)?1:-1);const i=t.indexOf(e);const n=new this(e.start,e.end);if(i>0){for(let e=i-1;true;e++){if(t[e].end.isEqual(n.start)){n.start=qh._createAt(t[e].start)}else{break}}}for(let e=i+1;e<t.length;e++){if(t[e].start.isEqual(n.end)){n.end=qh._createAt(t[e].end)}else{break}}return n}static fromJSON(t,e){return new this(qh.fromJSON(t.start,e),qh.fromJSON(t.end,e))}}class Yh{constructor(){this._modelToViewMapping=new WeakMap;this._viewToModelMapping=new WeakMap;this._viewToModelLengthCallbacks=new Map;this._markerNameToElements=new Map;this._elementToMarkerNames=new Map;this._unboundMarkerNames=new Set;this.on(\"modelToViewPosition\",(t,e)=>{if(e.viewPosition){return}const i=this._modelToViewMapping.get(e.modelPosition.parent);e.viewPosition=this._findPositionIn(i,e.modelPosition.offset)},{priority:\"low\"});this.on(\"viewToModelPosition\",(t,e)=>{if(e.modelPosition){return}const i=this.findMappedViewAncestor(e.viewPosition);const n=this._viewToModelMapping.get(i);const o=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,i);e.modelPosition=qh._createAt(n,o)},{priority:\"low\"})}bindElements(t,e){this._modelToViewMapping.set(t,e);this._viewToModelMapping.set(e,t)}unbindViewElement(t){const e=this.toModelElement(t);this._viewToModelMapping.delete(t);if(this._elementToMarkerNames.has(t)){for(const e of this._elementToMarkerNames.get(t)){this._unboundMarkerNames.add(e)}}if(this._modelToViewMapping.get(e)==t){this._modelToViewMapping.delete(e)}}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t);if(this._viewToModelMapping.get(e)==t){this._viewToModelMapping.delete(e)}}bindElementToMarker(t,e){const i=this._markerNameToElements.get(e)||new Set;i.add(t);const n=this._elementToMarkerNames.get(t)||new Set;n.add(e);this._markerNameToElements.set(e,i);this._elementToMarkerNames.set(t,n)}unbindElementFromMarkerName(t,e){const i=this._markerNameToElements.get(e);if(i){i.delete(t);if(i.size==0){this._markerNameToElements.delete(e)}}const n=this._elementToMarkerNames.get(t);if(n){n.delete(e);if(n.size==0){this._elementToMarkerNames.delete(t)}}}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);this._unboundMarkerNames.clear();return t}clearBindings(){this._modelToViewMapping=new WeakMap;this._viewToModelMapping=new WeakMap;this._markerNameToElements=new Map;this._elementToMarkerNames=new Map;this._unboundMarkerNames=new Set}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new $h(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new ul(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};this.fire(\"viewToModelPosition\",e);return e.modelPosition}toViewPosition(t,e={isPhantom:false}){const i={modelPosition:t,mapper:this,isPhantom:e.isPhantom};this.fire(\"modelToViewPosition\",i);return i.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e){return null}const i=new Set;for(const t of e){if(t.is(\"attributeElement\")){for(const e of t.getElementsWithSameId()){i.add(e)}}else{i.add(t)}}return i}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;while(!this._viewToModelMapping.has(e)){e=e.parent}return e}_toModelOffset(t,e,i){if(i!=t){const n=this._toModelOffset(t.parent,t.index,i);const o=this._toModelOffset(t,e,t);return n+o}if(t.is(\"text\")){return e}let n=0;for(let i=0;i<e;i++){n+=this.getModelLength(t.getChild(i))}return n}getModelLength(t){if(this._viewToModelLengthCallbacks.get(t.name)){const e=this._viewToModelLengthCallbacks.get(t.name);return e(t)}else if(this._viewToModelMapping.has(t)){return 1}else if(t.is(\"text\")){return t.data.length}else if(t.is(\"uiElement\")){return 0}else{let e=0;for(const i of t.getChildren()){e+=this.getModelLength(i)}return e}}_findPositionIn(t,e){let i;let n=0;let o=0;let r=0;if(t.is(\"text\")){return new dl(t,e)}while(o<e){i=t.getChild(r);n=this.getModelLength(i);o+=n;r++}if(o==e){return this._moveViewPositionToTextNode(new dl(t,r))}else{return this._findPositionIn(i,e-(o-n))}}_moveViewPositionToTextNode(t){const e=t.nodeBefore;const i=t.nodeAfter;if(e instanceof Ds){return new dl(e,e.data.length)}else if(i instanceof Ds){return new dl(i,0)}return t}}vs(Yh,ds);class Gh{constructor(){this._consumable=new Map;this._textProxyRegistry=new Map}add(t,e){e=Jh(e);if(t instanceof Bh){t=this._getSymbolForTextProxy(t)}if(!this._consumable.has(t)){this._consumable.set(t,new Map)}this._consumable.get(t).set(e,true)}consume(t,e){e=Jh(e);if(t instanceof Bh){t=this._getSymbolForTextProxy(t)}if(this.test(t,e)){this._consumable.get(t).set(e,false);return true}else{return false}}test(t,e){e=Jh(e);if(t instanceof Bh){t=this._getSymbolForTextProxy(t)}const i=this._consumable.get(t);if(i===undefined){return null}const n=i.get(e);if(n===undefined){return null}return n}revert(t,e){e=Jh(e);if(t instanceof Bh){t=this._getSymbolForTextProxy(t)}const i=this.test(t,e);if(i===false){this._consumable.get(t).set(e,true);return true}else if(i===true){return false}return null}_getSymbolForTextProxy(t){let e=null;const i=this._textProxyRegistry.get(t.startOffset);if(i){const n=i.get(t.endOffset);if(n){e=n.get(t.parent)}}if(!e){e=this._addSymbolForTextProxy(t.startOffset,t.endOffset,t.parent)}return e}_addSymbolForTextProxy(t,e,i){const n=Symbol(\"textProxySymbol\");let o,r;o=this._textProxyRegistry.get(t);if(!o){o=new Map;this._textProxyRegistry.set(t,o)}r=o.get(e);if(!r){r=new Map;o.set(e,r)}r.set(i,n);return n}}function Jh(t){const e=t.split(\":\");return e.length>1?e[0]+\":\"+e[1]:e[0]}class Xh{constructor(t){this.conversionApi=Uc({dispatcher:this},t)}convertChanges(t,e,i){for(const e of t.getMarkersToRemove()){this.convertMarkerRemove(e.name,e.range,i)}for(const e of t.getChanges()){if(e.type==\"insert\"){this.convertInsert($h._createFromPositionAndShift(e.position,e.length),i)}else if(e.type==\"remove\"){this.convertRemove(e.position,e.length,e.name,i)}else{this.convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,i)}}for(const t of this.conversionApi.mapper.flushUnboundMarkerNames()){const n=e.get(t).getRange();this.convertMarkerRemove(t,n,i);this.convertMarkerAdd(t,n,i)}for(const e of t.getMarkersToAdd()){this.convertMarkerAdd(e.name,e.range,i)}}convertInsert(t,e){this.conversionApi.writer=e;this.conversionApi.consumable=this._createInsertConsumable(t);for(const e of t){const t=e.item;const i=$h._createFromPositionAndShift(e.previousPosition,e.length);const n={item:t,range:i};this._testAndFire(\"insert\",n);for(const e of t.getAttributeKeys()){n.attributeKey=e;n.attributeOldValue=null;n.attributeNewValue=t.getAttribute(e);this._testAndFire(`attribute:${e}`,n)}}this._clearConversionApi()}convertRemove(t,e,i,n){this.conversionApi.writer=n;this.fire(\"remove:\"+i,{position:t,length:e},this.conversionApi);this._clearConversionApi()}convertAttribute(t,e,i,n,o){this.conversionApi.writer=o;this.conversionApi.consumable=this._createConsumableForRange(t,`attribute:${e}`);for(const o of t){const t=o.item;const r=$h._createFromPositionAndShift(o.previousPosition,o.length);const s={item:t,range:r,attributeKey:e,attributeOldValue:i,attributeNewValue:n};this._testAndFire(`attribute:${e}`,s)}this._clearConversionApi()}convertSelection(t,e,i){const n=Array.from(e.getMarkersAtPosition(t.getFirstPosition()));this.conversionApi.writer=i;this.conversionApi.consumable=this._createSelectionConsumable(t,n);this.fire(\"selection\",{selection:t},this.conversionApi);if(!t.isCollapsed){return}for(const e of n){const i=e.getRange();if(!Qh(t.getFirstPosition(),e,this.conversionApi.mapper)){continue}const n={item:t,markerName:e.name,markerRange:i};if(this.conversionApi.consumable.test(t,\"addMarker:\"+e.name)){this.fire(\"addMarker:\"+e.name,n,this.conversionApi)}}for(const e of t.getAttributeKeys()){const i={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};if(this.conversionApi.consumable.test(t,\"attribute:\"+i.attributeKey)){this.fire(\"attribute:\"+i.attributeKey+\":$text\",i,this.conversionApi)}}this._clearConversionApi()}convertMarkerAdd(t,e,i){if(!e.root.document||e.root.rootName==\"$graveyard\"){return}this.conversionApi.writer=i;const n=\"addMarker:\"+t;const o=new Gh;o.add(e,n);this.conversionApi.consumable=o;this.fire(n,{markerName:t,markerRange:e},this.conversionApi);if(!o.test(e,n)){return}this.conversionApi.consumable=this._createConsumableForRange(e,n);for(const i of e.getItems()){if(!this.conversionApi.consumable.test(i,n)){continue}const o={item:i,range:$h._createOn(i),markerName:t,markerRange:e};this.fire(n,o,this.conversionApi)}this._clearConversionApi()}convertMarkerRemove(t,e,i){if(!e.root.document||e.root.rootName==\"$graveyard\"){return}this.conversionApi.writer=i;this.fire(\"removeMarker:\"+t,{markerName:t,markerRange:e},this.conversionApi);this._clearConversionApi()}_createInsertConsumable(t){const e=new Gh;for(const i of t){const t=i.item;e.add(t,\"insert\");for(const i of t.getAttributeKeys()){e.add(t,\"attribute:\"+i)}}return e}_createConsumableForRange(t,e){const i=new Gh;for(const n of t.getItems()){i.add(n,e)}return i}_createSelectionConsumable(t,e){const i=new Gh;i.add(t,\"selection\");for(const n of e){i.add(t,\"addMarker:\"+n.name)}for(const e of t.getAttributeKeys()){i.add(t,\"attribute:\"+e)}return i}_testAndFire(t,e){if(!this.conversionApi.consumable.test(e.item,t)){return}const i=e.item.name||\"$text\";this.fire(t+\":\"+i,e,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer;delete this.conversionApi.consumable}}vs(Xh,ds);function Qh(t,e,i){const n=e.getRange();const o=Array.from(t.getAncestors());o.shift();o.reverse();const r=o.some(t=>{if(n.containsItem(t)){const e=i.toViewElement(t);return!!e.getCustomProperty(\"addHighlight\")}});return!r}class Kh{constructor(t,e,i){this._lastRangeBackward=false;this._ranges=[];this._attrs=new Map;if(t){this.setTo(t,e,i)}}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.end}return null}get isCollapsed(){const t=this._ranges.length;if(t===1){return this._ranges[0].isCollapsed}else{return false}}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(t){if(this.rangeCount!=t.rangeCount){return false}else if(this.rangeCount===0){return true}if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus)){return false}for(const e of this._ranges){let i=false;for(const n of t._ranges){if(e.isEqual(n)){i=true;break}}if(!i){return false}}return true}*getRanges(){for(const t of this._ranges){yield new $h(t.start,t.end)}}getFirstRange(){let t=null;for(const e of this._ranges){if(!t||e.start.isBefore(t.start)){t=e}}return t?new $h(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges){if(!t||e.end.isAfter(t.end)){t=e}}return t?new $h(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(t,e,i){if(t===null){this._setRanges([])}else if(t instanceof Kh){this._setRanges(t.getRanges(),t.isBackward)}else if(t&&typeof t.getRanges==\"function\"){this._setRanges(t.getRanges(),t.isBackward)}else if(t instanceof $h){this._setRanges([t],!!e&&!!e.backward)}else if(t instanceof qh){this._setRanges([new $h(t)])}else if(t instanceof jh){const n=!!i&&!!i.backward;let o;if(e==\"in\"){o=$h._createIn(t)}else if(e==\"on\"){o=$h._createOn(t)}else if(e!==undefined){o=new $h(qh._createAt(t,e))}else{throw new ss[\"b\"](\"model-selection-setTo-required-second-parameter: \"+\"selection.setTo requires the second parameter when the first parameter is a node.\",[this,t])}this._setRanges([o],n)}else if(Fs(t)){this._setRanges(t,e&&!!e.backward)}else{throw new ss[\"b\"](\"model-selection-setTo-not-selectable: Cannot set the selection to the given place.\",[this,t])}}_setRanges(t,e=false){t=Array.from(t);const i=t.some(e=>{if(!(e instanceof $h)){throw new ss[\"b\"](\"model-selection-set-ranges-not-range: \"+\"Selection range set to an object that is not an instance of model.Range.\",[this,t])}return this._ranges.every(t=>!t.isEqual(e))});if(t.length===this._ranges.length&&!i){return}this._removeAllRanges();for(const e of t){this._pushRange(e)}this._lastRangeBackward=!!e;this.fire(\"change:range\",{directChange:true})}setFocus(t,e){if(this.anchor===null){throw new ss[\"b\"](\"model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.\",[this,t])}const i=qh._createAt(t,e);if(i.compareWith(this.focus)==\"same\"){return}const n=this.anchor;if(this._ranges.length){this._popRange()}if(i.compareWith(n)==\"before\"){this._pushRange(new $h(i,n));this._lastRangeBackward=true}else{this._pushRange(new $h(n,i));this._lastRangeBackward=false}this.fire(\"change:range\",{directChange:true})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){if(this.hasAttribute(t)){this._attrs.delete(t);this.fire(\"change:attribute\",{attributeKeys:[t],directChange:true})}}setAttribute(t,e){if(this.getAttribute(t)!==e){this._attrs.set(t,e);this.fire(\"change:attribute\",{attributeKeys:[t],directChange:true})}}getSelectedElement(){if(this.rangeCount!==1){return null}return this.getFirstRange().getContainedElement()}is(t){return t==\"selection\"||t==\"model:selection\"}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const i=ef(e.start,t);if(i&&nf(i,e)){yield i}for(const i of e.getWalker()){const n=i.item;if(i.type==\"elementEnd\"&&tf(n,t,e)){yield n}}const n=ef(e.end,t);if(n&&!e.end.isTouching(qh._createAt(n,0))&&nf(n,e)){yield n}}}containsEntireContent(t=this.anchor.root){const e=qh._createAt(t,0);const i=qh._createAt(t,\"end\");return e.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t);this._ranges.push(new $h(t.start,t.end))}_checkRange(t){for(let e=0;e<this._ranges.length;e++){if(t.isIntersecting(this._ranges[e])){throw new ss[\"b\"](\"model-selection-range-intersects: Trying to add a range that intersects with another range in the selection.\",[this,t],{addedRange:t,intersectingRange:this._ranges[e]})}}}_removeAllRanges(){while(this._ranges.length>0){this._popRange()}}_popRange(){this._ranges.pop()}}vs(Kh,ds);function Zh(t,e){if(e.has(t)){return false}e.add(t);return t.root.document.model.schema.isBlock(t)&&t.parent}function tf(t,e,i){return Zh(t,e)&&nf(t,i)}function ef(t,e){const i=t.parent;const n=i.root.document.model.schema;const o=t.parent.getAncestors({parentFirst:true,includeSelf:true});let r=false;const s=o.find(t=>{if(r){return false}r=n.isLimit(t);return!r&&Zh(t,e)});o.forEach(t=>e.add(t));return s}function nf(t,e){const i=of(t);if(!i){return true}const n=e.containsRange($h._createOn(i),true);return!n}function of(t){const e=t.root.document.model.schema;let i=t.parent;while(i){if(e.isBlock(i)){return i}i=i.parent}}class rf extends $h{constructor(t,e){super(t,e);sf.call(this)}detach(){this.stopListening()}is(t){return t==\"liveRange\"||t==\"model:liveRange\"||super.is(t)}toRange(){return new $h(this.start,this.end)}static fromRange(t){return new rf(t.start,t.end)}}function sf(){this.listenTo(this.root.document.model,\"applyOperation\",(t,e)=>{const i=e[0];if(!i.isDocumentOperation){return}af.call(this,i)},{priority:\"low\"})}function af(t){const e=this.getTransformedByOperation(t);const i=$h._createFromRanges(e);const n=!i.isEqual(this);const o=cf(this,t);let r=null;if(n){if(i.root.rootName==\"$graveyard\"){if(t.type==\"remove\"){r=t.sourcePosition}else{r=t.deletionPosition}}const e=this.toRange();this.start=i.start;this.end=i.end;this.fire(\"change:range\",e,{deletionPosition:r})}else if(o){this.fire(\"change:content\",this.toRange(),{deletionPosition:r})}}function cf(t,e){switch(e.type){case\"insert\":return t.containsPosition(e.position);case\"move\":case\"remove\":case\"reinsert\":case\"merge\":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case\"split\":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return false}vs(rf,ds);const lf=\"selection:\";class df{constructor(t){this._selection=new uf(t);this._selection.delegate(\"change:range\").to(this);this._selection.delegate(\"change:attribute\").to(this);this._selection.delegate(\"change:marker\").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 markers(){return this._selection.markers}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(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection._updateMarkers();this._selection._updateAttributes(false)}is(t){return t==\"selection\"||t==\"model:selection\"||t==\"documentSelection\"||t==\"model:documentSelection\"}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(t,e,i){this._selection.setTo(t,e,i)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return lf+t}static _isStoreAttributeKey(t){return t.startsWith(lf)}}vs(df,ds);class uf extends Kh{constructor(t){super();this.markers=new ys({idProperty:\"name\"});this._model=t.model;this._document=t;this._attributePriority=new Map;this._fixGraveyardRangesData=[];this._hasChangedRange=false;this._overriddenGravityRegister=new Set;this.listenTo(this._model,\"applyOperation\",(t,e)=>{const i=e[0];if(!i.isDocumentOperation||i.type==\"marker\"||i.type==\"rename\"||i.type==\"noop\"){return}while(this._fixGraveyardRangesData.length){const{liveRange:t,sourcePosition:e}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(t,e)}if(this._hasChangedRange){this._hasChangedRange=false;this.fire(\"change:range\",{directChange:false})}},{priority:\"lowest\"});this.on(\"change:range\",()=>{for(const t of this.getRanges()){if(!this._document._validateSelectionRange(t)){throw new ss[\"b\"](\"document-selection-wrong-position: Range from document selection starts or ends at incorrect position.\",this,{range:t})}}});this.listenTo(this._model.markers,\"update\",()=>this._updateMarkers());this.listenTo(this._document,\"change\",(t,e)=>{ff(this._model,e)})}get isCollapsed(){const t=this._ranges.length;return t===0?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 this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let t=0;t<this._ranges.length;t++){this._ranges[t].detach()}this.stopListening()}*getRanges(){if(this._ranges.length){yield*super.getRanges()}else{yield this._document._getDefaultRange()}}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(t,e,i){super.setTo(t,e,i);this._updateAttributes(true);this._updateMarkers()}setFocus(t,e){super.setFocus(t,e);this._updateAttributes(true);this._updateMarkers()}setAttribute(t,e){if(this._setAttribute(t,e)){const e=[t];this.fire(\"change:attribute\",{attributeKeys:e,directChange:true})}}removeAttribute(t){if(this._removeAttribute(t)){const e=[t];this.fire(\"change:attribute\",{attributeKeys:e,directChange:true})}}overrideGravity(){const t=is();this._overriddenGravityRegister.add(t);if(this._overriddenGravityRegister.size===1){this._updateAttributes(true)}return t}restoreGravity(t){if(!this._overriddenGravityRegister.has(t)){throw new ss[\"b\"](\"document-selection-gravity-wrong-restore: Attempting to restore the selection gravity for an unknown UID.\",this,{uid:t})}this._overriddenGravityRegister.delete(t);if(!this.isGravityOverridden){this._updateAttributes(true)}}_popRange(){this._ranges.pop().detach()}_pushRange(t){const e=this._prepareRange(t);if(e){this._ranges.push(e)}}_prepareRange(t){this._checkRange(t);if(t.root==this._document.graveyard){return}const e=rf.fromRange(t);e.on(\"change:range\",(t,i,n)=>{this._hasChangedRange=true;if(e.root==this._document.graveyard){this._fixGraveyardRangesData.push({liveRange:e,sourcePosition:n.deletionPosition})}});return e}_updateMarkers(){const t=[];let e=false;for(const e of this._model.markers){const i=e.getRange();for(const n of this.getRanges()){if(i.containsRange(n,!n.isCollapsed)){t.push(e)}}}const i=Array.from(this.markers);for(const i of t){if(!this.markers.has(i)){this.markers.add(i);e=true}}for(const i of Array.from(this.markers)){if(!t.includes(i)){this.markers.remove(i);e=true}}if(e){this.fire(\"change:marker\",{oldMarkers:i,directChange:false})}}_updateAttributes(t){const e=Hs(this._getSurroundingAttributes());const i=Hs(this.getAttributes());if(t){this._attributePriority=new Map;this._attrs=new Map}else{for(const[t,e]of this._attributePriority){if(e==\"low\"){this._attrs.delete(t);this._attributePriority.delete(t)}}}this._setAttributesTo(e);const n=[];for(const[t,e]of this.getAttributes()){if(!i.has(t)||i.get(t)!==e){n.push(t)}}for(const[t]of i){if(!this.hasAttribute(t)){n.push(t)}}if(n.length>0){this.fire(\"change:attribute\",{attributeKeys:n,directChange:false})}}_setAttribute(t,e,i=true){const n=i?\"normal\":\"low\";if(n==\"low\"&&this._attributePriority.get(t)==\"normal\"){return false}const o=super.getAttribute(t);if(o===e){return false}this._attrs.set(t,e);this._attributePriority.set(t,n);return true}_removeAttribute(t,e=true){const i=e?\"normal\":\"low\";if(i==\"low\"&&this._attributePriority.get(t)==\"normal\"){return false}this._attributePriority.set(t,i);if(!super.hasAttribute(t)){return false}this._attrs.delete(t);return true}_setAttributesTo(t){const e=new Set;for(const[e,i]of this.getAttributes()){if(t.get(e)===i){continue}this._removeAttribute(e,false)}for(const[i,n]of t){const t=this._setAttribute(i,n,false);if(t){e.add(i)}}return e}*_getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty){for(const e of t.getAttributeKeys()){if(e.startsWith(lf)){const i=e.substr(lf.length);yield[i,t.getAttribute(e)]}}}}_getSurroundingAttributes(){const t=this.getFirstPosition();const e=this._model.schema;let i=null;if(!this.isCollapsed){const t=this.getFirstRange();for(const n of t){if(n.item.is(\"element\")&&e.isObject(n.item)){break}if(n.type==\"text\"){i=n.item.getAttributes();break}}}else{const e=t.textNode?t.textNode:t.nodeBefore;const n=t.textNode?t.textNode:t.nodeAfter;if(!this.isGravityOverridden){i=hf(e)}if(!i){i=hf(n)}if(!this.isGravityOverridden&&!i){let t=e;while(t&&!i){t=t.previousSibling;i=hf(t)}}if(!i){let t=n;while(t&&!i){t=t.nextSibling;i=hf(t)}}if(!i){i=this._getStoredAttributes()}}return i}_fixGraveyardSelection(t,e){const i=e.clone();const n=this._model.schema.getNearestSelectionRange(i);const o=this._ranges.indexOf(t);this._ranges.splice(o,1);t.detach();if(n){const t=this._prepareRange(n);this._ranges.splice(o,0,t)}}}function hf(t){if(t instanceof Bh||t instanceof Dh){return t.getAttributes()}return null}function ff(t,e){const i=t.document.differ;for(const n of i.getChanges()){if(n.type!=\"insert\"){continue}const i=n.position.parent;const o=n.length===i.maxOffset;if(o){t.enqueueChange(e,t=>{const e=Array.from(i.getAttributeKeys()).filter(t=>t.startsWith(lf));for(const n of e){t.removeAttribute(n,i)}})}}}class mf{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers){t(e)}return this}}var gf=1,pf=4;function bf(t){return Hr(t,gf|pf)}var wf=bf;class _f extends mf{elementToElement(t){return this.add(Lf(t))}attributeToElement(t){return this.add(zf(t))}attributeToAttribute(t){return this.add(Rf(t))}markerToElement(t){return this.add(jf(t))}markerToHighlight(t){return this.add(Df(t))}}function kf(){return(t,e,i)=>{if(!i.consumable.consume(e.item,\"insert\")){return}const n=i.writer;const o=i.mapper.toViewPosition(e.range.start);const r=n.createText(e.item.data);n.insert(o,r)}}function vf(){return(t,e,i)=>{const n=i.mapper.toViewPosition(e.position);const o=e.position.getShiftedBy(e.length);const r=i.mapper.toViewPosition(o,{isPhantom:true});const s=i.writer.createRange(n,r);const a=i.writer.remove(s.getTrimmed());for(const t of i.writer.createRangeIn(a).getItems()){i.mapper.unbindViewElement(t)}}}function yf(t,e){const i=t.createAttributeElement(\"span\",e.attributes);if(e.classes){i._addClass(e.classes)}if(e.priority){i._priority=e.priority}i._id=e.id;return i}function xf(){return(t,e,i)=>{const n=e.selection;if(n.isCollapsed){return}if(!i.consumable.consume(n,\"selection\")){return}const o=[];for(const t of n.getRanges()){const e=i.mapper.toViewRange(t);o.push(e)}i.writer.setSelection(o,{backward:n.isBackward})}}function Af(){return(t,e,i)=>{const n=e.selection;if(!n.isCollapsed){return}if(!i.consumable.consume(n,\"selection\")){return}const o=i.writer;const r=n.getFirstPosition();const s=i.mapper.toViewPosition(r);const a=o.breakAttributes(s);o.setSelection(a)}}function Cf(){return(t,e,i)=>{const n=i.writer;const o=n.document.selection;for(const t of o.getRanges()){if(t.isCollapsed){if(t.end.parent.isAttached()){i.writer.mergeAttributes(t.start)}}}n.setSelection(null)}}function Tf(t){return(e,i,n)=>{const o=t(i.attributeOldValue,n.writer);const r=t(i.attributeNewValue,n.writer);if(!o&&!r){return}if(!n.consumable.consume(i.item,e.name)){return}const s=n.writer;const a=s.document.selection;if(i.item instanceof Kh||i.item instanceof df){s.wrap(a.getFirstRange(),r)}else{let t=n.mapper.toViewRange(i.range);if(i.attributeOldValue!==null&&o){t=s.unwrap(t,o)}if(i.attributeNewValue!==null&&r){s.wrap(t,r)}}}}function Ef(t){return(e,i,n)=>{const o=t(i.item,n.writer);if(!o){return}if(!n.consumable.consume(i.item,\"insert\")){return}const r=n.mapper.toViewPosition(i.range.start);n.mapper.bindElements(i.item,o);n.writer.insert(r,o)}}function Mf(t){return(e,i,n)=>{i.isOpening=true;const o=t(i,n.writer);i.isOpening=false;const r=t(i,n.writer);if(!o||!r){return}const s=i.markerRange;if(s.isCollapsed&&!n.consumable.consume(s,e.name)){return}for(const t of s){if(!n.consumable.consume(t.item,e.name)){return}}const a=n.mapper;const c=n.writer;c.insert(a.toViewPosition(s.start),o);n.mapper.bindElementToMarker(o,i.markerName);if(!s.isCollapsed){c.insert(a.toViewPosition(s.end),r);n.mapper.bindElementToMarker(r,i.markerName)}e.stop()}}function Pf(){return(t,e,i)=>{const n=i.mapper.markerNameToElements(e.markerName);if(!n){return}for(const t of n){i.mapper.unbindElementFromMarkerName(t,e.markerName);i.writer.clear(i.writer.createRangeOn(t),t)}i.writer.clearClonedElementsGroup(e.markerName);t.stop()}}function Sf(t){return(e,i,n)=>{const o=t(i.attributeOldValue,i);const r=t(i.attributeNewValue,i);if(!o&&!r){return}if(!n.consumable.consume(i.item,e.name)){return}const s=n.mapper.toViewElement(i.item);const a=n.writer;if(!s){throw new ss[\"b\"](\"conversion-attribute-to-attribute-on-text: \"+\"Trying to convert text node's attribute with attribute-to-attribute converter.\",[i,n])}if(i.attributeOldValue!==null&&o){if(o.key==\"class\"){const t=Array.isArray(o.value)?o.value:[o.value];for(const e of t){a.removeClass(e,s)}}else if(o.key==\"style\"){const t=Object.keys(o.value);for(const e of t){a.removeStyle(e,s)}}else{a.removeAttribute(o.key,s)}}if(i.attributeNewValue!==null&&r){if(r.key==\"class\"){const t=Array.isArray(r.value)?r.value:[r.value];for(const e of t){a.addClass(e,s)}}else if(r.key==\"style\"){const t=Object.keys(r.value);for(const e of t){a.setStyle(e,r.value[e],s)}}else{a.setAttribute(r.key,r.value,s)}}}}function If(t){return(e,i,n)=>{if(!i.item){return}if(!(i.item instanceof Kh||i.item instanceof df)&&!i.item.is(\"textProxy\")){return}const o=Wf(t,i,n);if(!o){return}if(!n.consumable.consume(i.item,e.name)){return}const r=n.writer;const s=yf(r,o);const a=r.document.selection;if(i.item instanceof Kh||i.item instanceof df){r.wrap(a.getFirstRange(),s,a)}else{const t=n.mapper.toViewRange(i.range);const e=r.wrap(t,s);for(const t of e.getItems()){if(t.is(\"attributeElement\")&&t.isSimilar(s)){n.mapper.bindElementToMarker(t,i.markerName);break}}}}}function Nf(t){return(e,i,n)=>{if(!i.item){return}if(!(i.item instanceof Fh)){return}const o=Wf(t,i,n);if(!o){return}if(!n.consumable.test(i.item,e.name)){return}const r=n.mapper.toViewElement(i.item);if(r&&r.getCustomProperty(\"addHighlight\")){n.consumable.consume(i.item,e.name);for(const t of $h._createIn(i.item)){n.consumable.consume(t.item,e.name)}r.getCustomProperty(\"addHighlight\")(r,o,n.writer);n.mapper.bindElementToMarker(r,i.markerName)}}}function Of(t){return(e,i,n)=>{if(i.markerRange.isCollapsed){return}const o=Wf(t,i,n);if(!o){return}const r=yf(n.writer,o);const s=n.mapper.markerNameToElements(i.markerName);if(!s){return}for(const t of s){n.mapper.unbindElementFromMarkerName(t,i.markerName);if(t.is(\"attributeElement\")){n.writer.unwrap(n.writer.createRangeOn(t),r)}else{t.getCustomProperty(\"removeHighlight\")(t,o.id,n.writer)}}n.writer.clearClonedElementsGroup(i.markerName);e.stop()}}function Lf(t){t=wf(t);t.view=Bf(t.view,\"container\");return e=>{e.on(\"insert:\"+t.model,Ef(t.view),{priority:t.converterPriority||\"normal\"})}}function zf(t){t=wf(t);const e=t.model.key?t.model.key:t.model;let i=\"attribute:\"+e;if(t.model.name){i+=\":\"+t.model.name}if(t.model.values){for(const e of t.model.values){t.view[e]=Bf(t.view[e],\"attribute\")}}else{t.view=Bf(t.view,\"attribute\")}const n=Ff(t);return e=>{e.on(i,Tf(n),{priority:t.converterPriority||\"normal\"})}}function Rf(t){t=wf(t);const e=t.model.key?t.model.key:t.model;let i=\"attribute:\"+e;if(t.model.name){i+=\":\"+t.model.name}if(t.model.values){for(const e of t.model.values){t.view[e]=Hf(t.view[e])}}else{t.view=Hf(t.view)}const n=Ff(t);return e=>{e.on(i,Sf(n),{priority:t.converterPriority||\"normal\"})}}function jf(t){t=wf(t);t.view=Bf(t.view,\"ui\");return e=>{e.on(\"addMarker:\"+t.model,Mf(t.view),{priority:t.converterPriority||\"normal\"});e.on(\"removeMarker:\"+t.model,Pf(t.view),{priority:t.converterPriority||\"normal\"})}}function Df(t){return e=>{e.on(\"addMarker:\"+t.model,If(t.view),{priority:t.converterPriority||\"normal\"});e.on(\"addMarker:\"+t.model,Nf(t.view),{priority:t.converterPriority||\"normal\"});e.on(\"removeMarker:\"+t.model,Of(t.view),{priority:t.converterPriority||\"normal\"})}}function Bf(t,e){if(typeof t==\"function\"){return t}return(i,n)=>Vf(t,n,e)}function Vf(t,e,i){if(typeof t==\"string\"){t={name:t}}let n;const o=Object.assign({},t.attributes);if(i==\"container\"){n=e.createContainerElement(t.name,o)}else if(i==\"attribute\"){const i={priority:t.priority||wl.DEFAULT_PRIORITY};n=e.createAttributeElement(t.name,o,i)}else{n=e.createUIElement(t.name,o)}if(t.styles){const i=Object.keys(t.styles);for(const o of i){e.setStyle(o,t.styles[o],n)}}if(t.classes){const i=t.classes;if(typeof i==\"string\"){e.addClass(i,n)}else{for(const t of i){e.addClass(t,n)}}}return n}function Ff(t){if(t.model.values){return(e,i)=>{const n=t.view[e];if(n){return n(e,i)}return null}}else{return t.view}}function Hf(t){if(typeof t==\"string\"){return e=>({key:t,value:e})}else if(typeof t==\"object\"){if(t.value){return()=>t}else{return e=>({key:t.key,value:e})}}else{return t}}function Wf(t,e,i){const n=typeof t==\"function\"?t(e,i):t;if(!n){return null}if(!n.priority){n.priority=10}if(!n.id){n.id=e.markerName}return n}class Uf extends mf{elementToElement(t){return this.add(Gf(t))}elementToAttribute(t){return this.add(Jf(t))}attributeToAttribute(t){return this.add(Xf(t))}elementToMarker(t){return this.add(Qf(t))}}function qf(){return(t,e,i)=>{if(!e.modelRange&&i.consumable.consume(e.viewItem,{name:true})){const{modelRange:t,modelCursor:n}=i.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t;e.modelCursor=n}}}function $f(){return(t,e,i)=>{if(i.schema.checkChild(e.modelCursor,\"$text\")){if(i.consumable.consume(e.viewItem)){const t=i.writer.createText(e.viewItem.data);i.writer.insert(t,e.modelCursor);e.modelRange=$h._createFromPositionAndShift(e.modelCursor,t.offsetSize);e.modelCursor=e.modelRange.end}}}}function Yf(t,e){return(i,n)=>{const o=n.newSelection;const r=new Kh;const s=[];for(const t of o.getRanges()){s.push(e.toModelRange(t))}r.setTo(s,{backward:o.isBackward});if(!r.isEqual(t.document.selection)){t.change(t=>{t.setSelection(r)})}}}function Gf(t){t=wf(t);const e=Zf(t);const i=Kf(t.view);const n=i?\"element:\"+i:\"element\";return i=>{i.on(n,e,{priority:t.converterPriority||\"normal\"})}}function Jf(t){t=wf(t);im(t);const e=nm(t,false);const i=Kf(t.view);const n=i?\"element:\"+i:\"element\";return i=>{i.on(n,e,{priority:t.converterPriority||\"low\"})}}function Xf(t){t=wf(t);let e=null;if(typeof t.view==\"string\"||t.view.key){e=em(t)}im(t,e);const i=nm(t,true);return e=>{e.on(\"element\",i,{priority:t.converterPriority||\"low\"})}}function Qf(t){t=wf(t);sm(t);return Gf(t)}function Kf(t){if(typeof t==\"string\"){return t}if(typeof t==\"object\"&&typeof t.name==\"string\"){return t.name}return null}function Zf(t){const e=t.view?new Ws(t.view):null;return(i,n,o)=>{let r={};if(e){const t=e.match(n.viewItem);if(!t){return}r=t.match}r.name=true;const s=tm(t.model,n.viewItem,o.writer);if(!s){return}if(!o.consumable.test(n.viewItem,r)){return}const a=o.splitToAllowedParent(s,n.modelCursor);if(!a){return}o.writer.insert(s,a.position);o.convertChildren(n.viewItem,o.writer.createPositionAt(s,0));o.consumable.consume(n.viewItem,r);const c=o.getSplitParts(s);n.modelRange=new $h(o.writer.createPositionBefore(s),o.writer.createPositionAfter(c[c.length-1]));if(a.cursorParent){n.modelCursor=o.writer.createPositionAt(a.cursorParent,0)}else{n.modelCursor=n.modelRange.end}}}function tm(t,e,i){if(t instanceof Function){return t(e,i)}else{return i.createElement(t)}}function em(t){if(typeof t.view==\"string\"){t.view={key:t.view}}const e=t.view.key;let i;if(e==\"class\"||e==\"style\"){const n=e==\"class\"?\"classes\":\"styles\";i={[n]:t.view.value}}else{const n=typeof t.view.value==\"undefined\"?/[\\s\\S]*/:t.view.value;i={attributes:{[e]:n}}}if(t.view.name){i.name=t.view.name}t.view=i;return e}function im(t,e=null){const i=e===null?true:t=>t.getAttribute(e);const n=typeof t.model!=\"object\"?t.model:t.model.key;const o=typeof t.model!=\"object\"||typeof t.model.value==\"undefined\"?i:t.model.value;t.model={key:n,value:o}}function nm(t,e){const i=new Ws(t.view);return(n,o,r)=>{const s=i.match(o.viewItem);if(!s){return}const a=t.model.key;const c=typeof t.model.value==\"function\"?t.model.value(o.viewItem):t.model.value;if(c===null){return}if(om(t.view,o.viewItem)){s.match.name=true}else{delete s.match.name}if(!r.consumable.test(o.viewItem,s.match)){return}if(!o.modelRange){o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor))}const l=rm(o.modelRange,{key:a,value:c},e,r);if(l){r.consumable.consume(o.viewItem,s.match)}}}function om(t,e){const i=typeof t==\"function\"?t(e):t;if(typeof i==\"object\"&&!Kf(i)){return false}return!i.classes&&!i.attributes&&!i.styles}function rm(t,e,i,n){let o=false;for(const r of Array.from(t.getItems({shallow:i}))){if(n.schema.checkAttribute(r,e.key)){n.writer.setAttribute(e.key,e.value,r);o=true}}return o}function sm(t){const e=t.model;t.model=(t,i)=>{const n=typeof e==\"string\"?e:e(t);return i.createElement(\"$marker\",{\"data-name\":n})}}class am{constructor(t,e){this.model=t;this.view=new Rh(e);this.mapper=new Yh;this.downcastDispatcher=new Xh({mapper:this.mapper});const i=this.model.document;const n=i.selection;const o=this.model.markers;this.listenTo(this.model,\"_beforeChanges\",()=>{this.view._disableRendering(true)},{priority:\"highest\"});this.listenTo(this.model,\"_afterChanges\",()=>{this.view._disableRendering(false)},{priority:\"lowest\"});this.listenTo(i,\"change\",()=>{this.view.change(t=>{this.downcastDispatcher.convertChanges(i.differ,o,t);this.downcastDispatcher.convertSelection(n,o,t)})},{priority:\"low\"});this.listenTo(this.view.document,\"selectionChange\",Yf(this.model,this.mapper));this.downcastDispatcher.on(\"insert:$text\",kf(),{priority:\"lowest\"});this.downcastDispatcher.on(\"remove\",vf(),{priority:\"low\"});this.downcastDispatcher.on(\"selection\",Cf(),{priority:\"low\"});this.downcastDispatcher.on(\"selection\",xf(),{priority:\"low\"});this.downcastDispatcher.on(\"selection\",Af(),{priority:\"low\"});this.view.document.roots.bindTo(this.model.document.roots).using(t=>{if(t.rootName==\"$graveyard\"){return null}const e=new cl(this.view.document,t.name);e.rootName=t.rootName;this.mapper.bindElements(t,e);return e})}destroy(){this.view.destroy();this.stopListening()}}vs(am,Jc);class cm{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const i=this.get(t);if(!i){throw new ss[\"b\"](\"commandcollection-command-not-found: Command does not exist.\",this,{commandName:t})}i.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands()){t.destroy()}}}class lm{constructor(){this._consumables=new Map}add(t,e){let i;if(t.is(\"text\")||t.is(\"documentFragment\")){this._consumables.set(t,true);return}if(!this._consumables.has(t)){i=new dm(t);this._consumables.set(t,i)}else{i=this._consumables.get(t)}i.add(e)}test(t,e){const i=this._consumables.get(t);if(i===undefined){return null}if(t.is(\"text\")||t.is(\"documentFragment\")){return i}return i.test(e)}consume(t,e){if(this.test(t,e)){if(t.is(\"text\")||t.is(\"documentFragment\")){this._consumables.set(t,false)}else{this._consumables.get(t).consume(e)}return true}return false}revert(t,e){const i=this._consumables.get(t);if(i!==undefined){if(t.is(\"text\")||t.is(\"documentFragment\")){this._consumables.set(t,true)}else{i.revert(e)}}}static consumablesFromElement(t){const e={element:t,name:true,attributes:[],classes:[],styles:[]};const i=t.getAttributeKeys();for(const t of i){if(t==\"style\"||t==\"class\"){continue}e.attributes.push(t)}const n=t.getClassNames();for(const t of n){e.classes.push(t)}const o=t.getStyleNames();for(const t of o){e.styles.push(t)}return e}static createFrom(t,e){if(!e){e=new lm(t)}if(t.is(\"text\")){e.add(t);return e}if(t.is(\"element\")){e.add(t,lm.consumablesFromElement(t))}if(t.is(\"documentFragment\")){e.add(t)}for(const i of t.getChildren()){e=lm.createFrom(i,e)}return e}}class dm{constructor(t){this.element=t;this._canConsumeName=null;this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){if(t.name){this._canConsumeName=true}for(const e in this._consumables){if(e in t){this._add(e,t[e])}}}test(t){if(t.name&&!this._canConsumeName){return this._canConsumeName}for(const e in this._consumables){if(e in t){const i=this._test(e,t[e]);if(i!==true){return i}}}return true}consume(t){if(t.name){this._canConsumeName=false}for(const e in this._consumables){if(e in t){this._consume(e,t[e])}}}revert(t){if(t.name){this._canConsumeName=true}for(const e in this._consumables){if(e in t){this._revert(e,t[e])}}}_add(t,e){const i=Je(e)?e:[e];const n=this._consumables[t];for(const e of i){if(t===\"attributes\"&&(e===\"class\"||e===\"style\")){throw new ss[\"b\"](\"viewconsumable-invalid-attribute: Classes and styles should be handled separately.\",this)}n.set(e,true);if(t===\"styles\"){for(const t of this.element.document.stylesProcessor.getRelatedStyles(e)){n.set(t,true)}}}}_test(t,e){const i=Je(e)?e:[e];const n=this._consumables[t];for(const e of i){if(t===\"attributes\"&&(e===\"class\"||e===\"style\")){const t=e==\"class\"?\"classes\":\"styles\";const i=this._test(t,[...this._consumables[t].keys()]);if(i!==true){return i}}else{const t=n.get(e);if(t===undefined){return null}if(!t){return false}}}return true}_consume(t,e){const i=Je(e)?e:[e];const n=this._consumables[t];for(const e of i){if(t===\"attributes\"&&(e===\"class\"||e===\"style\")){const t=e==\"class\"?\"classes\":\"styles\";this._consume(t,[...this._consumables[t].keys()])}else{n.set(e,false);if(t==\"styles\"){for(const t of this.element.document.stylesProcessor.getRelatedStyles(e)){n.set(t,false)}}}}}_revert(t,e){const i=Je(e)?e:[e];const n=this._consumables[t];for(const e of i){if(t===\"attributes\"&&(e===\"class\"||e===\"style\")){const t=e==\"class\"?\"classes\":\"styles\";this._revert(t,[...this._consumables[t].keys()])}else{const t=n.get(e);if(t===false){n.set(e,true)}}}}}class um{constructor(){this._sourceDefinitions={};this._attributeProperties={};this.decorate(\"checkChild\");this.decorate(\"checkAttribute\");this.on(\"checkAttribute\",(t,e)=>{e[0]=new hm(e[0])},{priority:\"highest\"});this.on(\"checkChild\",(t,e)=>{e[0]=new hm(e[0]);e[1]=this.getDefinition(e[1])},{priority:\"highest\"})}register(t,e){if(this._sourceDefinitions[t]){throw new ss[\"b\"](\"schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.\",this,{itemName:t})}this._sourceDefinitions[t]=[Object.assign({},e)];this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t]){throw new ss[\"b\"](\"schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.\",this,{itemName:t})}this._sourceDefinitions[t].push(Object.assign({},e));this._clearCache()}getDefinitions(){if(!this._compiledDefinitions){this._compile()}return this._compiledDefinitions}getDefinition(t){let e;if(typeof t==\"string\"){e=t}else if(t.is&&(t.is(\"text\")||t.is(\"textProxy\"))){e=\"$text\"}else{e=t.name}return this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!!(e&&e.isBlock)}isLimit(t){const e=this.getDefinition(t);if(!e){return false}return!!(e.isLimit||e.isObject)}isObject(t){const e=this.getDefinition(t);return!!(e&&e.isObject)}isInline(t){const e=this.getDefinition(t);return!!(e&&e.isInline)}checkChild(t,e){if(!e){return false}return this._checkContextMatch(e,t)}checkAttribute(t,e){const i=this.getDefinition(t.last);if(!i){return false}return i.allowAttributes.includes(e)}checkMerge(t,e=null){if(t instanceof qh){const e=t.nodeBefore;const i=t.nodeAfter;if(!(e instanceof Fh)){throw new ss[\"b\"](\"schema-check-merge-no-element-before: The node before the merge position must be an element.\",this)}if(!(i instanceof Fh)){throw new ss[\"b\"](\"schema-check-merge-no-element-after: The node after the merge position must be an element.\",this)}return this.checkMerge(e,i)}for(const i of e.getChildren()){if(!this.checkChild(t,i)){return false}}return true}addChildCheck(t){this.on(\"checkChild\",(e,[i,n])=>{if(!n){return}const o=t(i,n);if(typeof o==\"boolean\"){e.stop();e.return=o}},{priority:\"high\"})}addAttributeCheck(t){this.on(\"checkAttribute\",(e,[i,n])=>{const o=t(i,n);if(typeof o==\"boolean\"){e.stop();e.return=o}},{priority:\"high\"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;if(t instanceof qh){e=t.parent}else{const i=t instanceof $h?[t]:Array.from(t.getRanges());e=i.reduce((t,e)=>{const i=e.getCommonAncestor();if(!t){return i}return t.getCommonAncestor(i,{includeSelf:true})},null)}while(!this.isLimit(e)){if(e.parent){e=e.parent}else{break}}return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const i=t.getFirstPosition();const n=[...i.getAncestors(),new Dh(\"\",t.getAttributes())];return this.checkAttribute(n,e)}else{const i=t.getRanges();for(const t of i){for(const i of t){if(this.checkAttribute(i.item,e)){return true}}}}return false}*getValidRanges(t,e){t=Em(t);for(const i of t){yield*this._getValidRangesForRange(i,e)}}getNearestSelectionRange(t,e=\"both\"){if(this.checkChild(t,\"$text\")){return new $h(t)}let i,n;const o=t.getAncestors().reverse().find(t=>this.isLimit(t))||t.root;if(e==\"both\"||e==\"backward\"){i=new Wh({boundaries:$h._createIn(o),startPosition:t,direction:\"backward\"})}if(e==\"both\"||e==\"forward\"){n=new Wh({boundaries:$h._createIn(o),startPosition:t})}for(const t of Tm(i,n)){const e=t.walker==i?\"elementEnd\":\"elementStart\";const n=t.value;if(n.type==e&&this.isObject(n.item)){return $h._createOn(n.item)}if(this.checkChild(n.nextPosition,\"$text\")){return new $h(n.nextPosition)}}return null}findAllowedParent(t,e){let i=t.parent;while(i){if(this.checkChild(i,e)){return i}if(this.isLimit(i)){return null}i=i.parent}return null}removeDisallowedAttributes(t,e){for(const i of t){if(i.is(\"text\")){Mm(this,i,e)}else{const t=$h._createIn(i);const n=t.getPositions();for(const t of n){const i=t.nodeBefore||t.parent;Mm(this,i,e)}}}}createContext(t){return new hm(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={};const e=this._sourceDefinitions;const i=Object.keys(e);for(const n of i){t[n]=fm(e[n],n)}for(const e of i){mm(t,e)}for(const e of i){gm(t,e)}for(const e of i){pm(t,e);bm(t,e)}for(const e of i){wm(t,e);_m(t,e)}this._compiledDefinitions=t}_checkContextMatch(t,e,i=e.length-1){const n=e.getItem(i);if(t.allowIn.includes(n.name)){if(i==0){return true}else{const t=this.getDefinition(n);return this._checkContextMatch(t,e,i-1)}}else{return false}}*_getValidRangesForRange(t,e){let i=t.start;let n=t.start;for(const o of t.getItems({shallow:true})){if(o.is(\"element\")){yield*this._getValidRangesForRange($h._createIn(o),e)}if(!this.checkAttribute(o,e)){if(!i.isEqual(n)){yield new $h(i,n)}i=qh._createAfter(o)}n=qh._createAfter(o)}if(!i.isEqual(n)){yield new $h(i,n)}}}vs(um,Jc);class hm{constructor(t){if(t instanceof hm){return t}if(typeof t==\"string\"){t=[t]}else if(!Array.isArray(t)){t=t.getAncestors({includeSelf:true})}if(t[0]&&typeof t[0]!=\"string\"&&t[0].is(\"documentFragment\")){t.shift()}this._items=t.map(Cm)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new hm([t]);e._items=[...this._items,...e._items];return e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map(t=>t.name)}endsWith(t){return Array.from(this.getNames()).join(\" \").endsWith(t)}startsWith(t){return Array.from(this.getNames()).join(\" \").startsWith(t)}}function fm(t,e){const i={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};km(t,i);vm(t,i,\"allowIn\");vm(t,i,\"allowContentOf\");vm(t,i,\"allowWhere\");vm(t,i,\"allowAttributes\");vm(t,i,\"allowAttributesOf\");vm(t,i,\"inheritTypesFrom\");ym(t,i);return i}function mm(t,e){for(const i of t[e].allowContentOf){if(t[i]){const n=xm(t,i);n.forEach(t=>{t.allowIn.push(e)})}}delete t[e].allowContentOf}function gm(t,e){for(const i of t[e].allowWhere){const n=t[i];if(n){const i=n.allowIn;t[e].allowIn.push(...i)}}delete t[e].allowWhere}function pm(t,e){for(const i of t[e].allowAttributesOf){const n=t[i];if(n){const i=n.allowAttributes;t[e].allowAttributes.push(...i)}}delete t[e].allowAttributesOf}function bm(t,e){const i=t[e];for(const e of i.inheritTypesFrom){const n=t[e];if(n){const t=Object.keys(n).filter(t=>t.startsWith(\"is\"));for(const e of t){if(!(e in i)){i[e]=n[e]}}}}delete i.inheritTypesFrom}function wm(t,e){const i=t[e];const n=i.allowIn.filter(e=>t[e]);i.allowIn=Array.from(new Set(n))}function _m(t,e){const i=t[e];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function km(t,e){for(const i of t){const t=Object.keys(i).filter(t=>t.startsWith(\"is\"));for(const n of t){e[n]=i[n]}}}function vm(t,e,i){for(const n of t){if(typeof n[i]==\"string\"){e[i].push(n[i])}else if(Array.isArray(n[i])){e[i].push(...n[i])}}}function ym(t,e){for(const i of t){const t=i.inheritAllFrom;if(t){e.allowContentOf.push(t);e.allowWhere.push(t);e.allowAttributesOf.push(t);e.inheritTypesFrom.push(t)}}}function xm(t,e){const i=t[e];return Am(t).filter(t=>t.allowIn.includes(i.name))}function Am(t){return Object.keys(t).map(e=>t[e])}function Cm(t){if(typeof t==\"string\"){return{name:t,*getAttributeKeys(){},getAttribute(){}}}else{return{name:t.is(\"element\")?t.name:\"$text\",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute(e){return t.getAttribute(e)}}}}function*Tm(t,e){let i=false;while(!i){i=true;if(t){const e=t.next();if(!e.done){i=false;yield{walker:t,value:e.value}}}if(e){const t=e.next();if(!t.done){i=false;yield{walker:e,value:t.value}}}}}function*Em(t){for(const e of t){yield*e.getMinimalFlatRanges()}}function Mm(t,e,i){for(const n of e.getAttributeKeys()){if(!t.checkAttribute(e,n)){i.removeAttribute(n,e)}}}class Pm{constructor(t={}){this._splitParts=new Map;this._modelCursor=null;this.conversionApi=Object.assign({},t);this.conversionApi.convertItem=this._convertItem.bind(this);this.conversionApi.convertChildren=this._convertChildren.bind(this);this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this);this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(t,e,i=[\"$root\"]){this.fire(\"viewCleanup\",t);this._modelCursor=Im(i,e);this.conversionApi.writer=e;this.conversionApi.consumable=lm.createFrom(t);this.conversionApi.store={};const{modelRange:n}=this._convertItem(t,this._modelCursor);const o=e.createDocumentFragment();if(n){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren())){e.append(t,o)}o.markers=Sm(o,e)}this._modelCursor=null;this._splitParts.clear();this.conversionApi.writer=null;this.conversionApi.store=null;return o}_convertItem(t,e){const i=Object.assign({viewItem:t,modelCursor:e,modelRange:null});if(t.is(\"element\")){this.fire(\"element:\"+t.name,i,this.conversionApi)}else if(t.is(\"text\")){this.fire(\"text\",i,this.conversionApi)}else{this.fire(\"documentFragment\",i,this.conversionApi)}if(i.modelRange&&!(i.modelRange instanceof $h)){throw new ss[\"b\"](\"view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.\",this)}return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(t,e){const i=new $h(e);let n=e;for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,n);if(t.modelRange instanceof $h){i.end=t.modelRange.end;n=t.modelCursor}}return{modelRange:i,modelCursor:n}}_splitToAllowedParent(t,e){const i=this.conversionApi.schema.findAllowedParent(e,t);if(!i){return null}if(i===e.parent){return{position:e}}if(this._modelCursor.parent.getAncestors().includes(i)){return null}const n=this.conversionApi.writer.split(e,i);const o=[];for(const t of n.range.getWalker()){if(t.type==\"elementEnd\"){o.push(t.item)}else{const e=o.pop();const i=t.item;this._registerSplitPair(e,i)}}return{position:n.position,cursorParent:n.range.end.parent}}_registerSplitPair(t,e){if(!this._splitParts.has(t)){this._splitParts.set(t,[t])}const i=this._splitParts.get(t);this._splitParts.set(e,i);i.push(e)}_getSplitParts(t){let e;if(!this._splitParts.has(t)){e=[t]}else{e=this._splitParts.get(t)}return e}_removeEmptyElements(){let t=false;for(const e of this._splitParts.keys()){if(e.isEmpty){this.conversionApi.writer.remove(e);this._splitParts.delete(e);t=true}}if(t){this._removeEmptyElements()}}}vs(Pm,ds);function Sm(t,e){const i=new Set;const n=new Map;const o=$h._createIn(t).getItems();for(const t of o){if(t.name==\"$marker\"){i.add(t)}}for(const t of i){const i=t.getAttribute(\"data-name\");const o=e.createPositionBefore(t);if(!n.has(i)){n.set(i,new $h(o.clone()))}else{n.get(i).end=o.clone()}e.remove(t)}return n}function Im(t,e){let i;for(const n of new hm(t)){const t={};for(const e of n.getAttributeKeys()){t[e]=n.getAttribute(e)}const o=e.createElement(n.name,t);if(i){e.append(o,i)}i=qh._createAt(o,0)}return i}class Nm{constructor(t,e){this.model=t;this.stylesProcessor=e;this.processor;this.mapper=new Yh;this.downcastDispatcher=new Xh({mapper:this.mapper});this.downcastDispatcher.on(\"insert:$text\",kf(),{priority:\"lowest\"});this.upcastDispatcher=new Pm({schema:t.schema});this.viewDocument=new pl(e);this._viewWriter=new $l(this.viewDocument);this.upcastDispatcher.on(\"text\",$f(),{priority:\"lowest\"});this.upcastDispatcher.on(\"element\",qf(),{priority:\"lowest\"});this.upcastDispatcher.on(\"documentFragment\",qf(),{priority:\"lowest\"});this.decorate(\"init\");this.on(\"init\",()=>{this.fire(\"ready\")},{priority:\"lowest\"})}get(t){const{rootName:e=\"main\",trim:i=\"empty\"}=t||{};if(!this._checkIfRootsExists([e])){throw new ss[\"b\"](\"datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.\",this)}const n=this.model.document.getRoot(e);if(i===\"empty\"&&!this.model.hasContent(n,{ignoreWhitespaces:true})){return\"\"}return this.stringify(n)}stringify(t){const e=this.toView(t);return this.processor.toData(e)}toView(t){const e=this.viewDocument;const i=this._viewWriter;this.mapper.clearBindings();const n=$h._createIn(t);const o=new Ul(e);this.mapper.bindElements(t,o);this.downcastDispatcher.convertInsert(n,i);if(!t.is(\"documentFragment\")){const e=Om(t);for(const[t,n]of e){this.downcastDispatcher.convertMarkerAdd(t,n,i)}}return o}init(t){if(this.model.document.version){throw new ss[\"b\"](\"datacontroller-init-document-not-empty: Trying to set initial data to not empty document.\",this)}let e={};if(typeof t===\"string\"){e.main=t}else{e=t}if(!this._checkIfRootsExists(Object.keys(e))){throw new ss[\"b\"](\"datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.\",this)}this.model.enqueueChange(\"transparent\",t=>{for(const i of Object.keys(e)){const n=this.model.document.getRoot(i);t.insert(this.parse(e[i],n),n,0)}});return Promise.resolve()}set(t){let e={};if(typeof t===\"string\"){e.main=t}else{e=t}if(!this._checkIfRootsExists(Object.keys(e))){throw new ss[\"b\"](\"datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.\",this)}this.model.enqueueChange(\"transparent\",t=>{t.setSelection(null);t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const i of Object.keys(e)){const n=this.model.document.getRoot(i);t.remove(t.createRangeIn(n));t.insert(this.parse(e[i],n),n,0)}})}parse(t,e=\"$root\"){const i=this.processor.toView(t);return this.toModel(i,e)}toModel(t,e=\"$root\"){return this.model.change(i=>this.upcastDispatcher.convert(t,i,e))}addStyleProcessorRules(t){t(this.stylesProcessor)}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t){if(!this.model.document.getRootNames().includes(e)){return false}}return true}}vs(Nm,Jc);function Om(t){const e=[];const i=t.root.document;if(!i){return[]}const n=$h._createIn(t);for(const t of i.model.markers){const i=n.getIntersection(t.getRange());if(i){e.push([t.name,i])}}return e}class Lm{constructor(t,e){this._helpers=new Map;this._downcast=Array.isArray(t)?t:[t];this._createConversionHelpers({name:\"downcast\",dispatchers:this._downcast,isDowncast:true});this._upcast=Array.isArray(e)?e:[e];this._createConversionHelpers({name:\"upcast\",dispatchers:this._upcast,isDowncast:false})}addAlias(t,e){const i=this._downcast.includes(e);const n=this._upcast.includes(e);if(!n&&!i){throw new ss[\"b\"](\"conversion-add-alias-dispatcher-not-registered: \"+\"Trying to register and alias for a dispatcher that nas not been registered.\",this)}this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:i})}for(t){if(!this._helpers.has(t)){throw new ss[\"b\"](\"conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.\",this)}return this._helpers.get(t)}elementToElement(t){this.for(\"downcast\").elementToElement(t);for(const{model:e,view:i}of zm(t)){this.for(\"upcast\").elementToElement({model:e,view:i,converterPriority:t.converterPriority})}}attributeToElement(t){this.for(\"downcast\").attributeToElement(t);for(const{model:e,view:i}of zm(t)){this.for(\"upcast\").elementToAttribute({view:i,model:e,converterPriority:t.converterPriority})}}attributeToAttribute(t){this.for(\"downcast\").attributeToAttribute(t);for(const{model:e,view:i}of zm(t)){this.for(\"upcast\").attributeToAttribute({view:i,model:e})}}_createConversionHelpers({name:t,dispatchers:e,isDowncast:i}){if(this._helpers.has(t)){throw new ss[\"b\"](\"conversion-group-exists: Trying to register a group name that has already been registered.\",this)}const n=i?new _f(e):new Uf(e);this._helpers.set(t,n)}}function*zm(t){if(t.model.values){for(const e of t.model.values){const i={key:t.model.key,value:e};const n=t.view[e];const o=t.upcastAlso?t.upcastAlso[e]:undefined;yield*Rm(i,n,o)}}else{yield*Rm(t.model,t.view,t.upcastAlso)}}function*Rm(t,e,i){yield{model:t,view:e};if(i){i=Array.isArray(i)?i:[i];for(const e of i){yield{model:t,view:e}}}}class jm{constructor(t=\"default\"){this.operations=[];this.type=t}get baseVersion(){for(const t of this.operations){if(t.baseVersion!==null){return t.baseVersion}}return null}addOperation(t){t.batch=this;this.operations.push(t);return t}}class Dm{constructor(t){this.baseVersion=t;this.isDocumentOperation=this.baseVersion!==null;this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);t.__className=this.constructor.className;delete t.batch;delete t.isDocumentOperation;return t}static get className(){return\"Operation\"}static fromJSON(t){return new this(t.baseVersion)}}class Bm{constructor(t){this.markers=new Map;this._children=new Vh;if(t){this._insertChild(0,t)}}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return this.childCount===0}get root(){return this}get parent(){return null}is(t){return t==\"documentFragment\"||t==\"model:documentFragment\"}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const i of t){e=e.getChild(e.offsetToIndex(i))}return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children){t.push(e.toJSON())}return t}static fromJSON(t){const e=[];for(const i of t){if(i.name){e.push(Fh.fromJSON(i))}else{e.push(Dh.fromJSON(i))}}return new Bm(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const i=Vm(e);for(const t of i){if(t.parent!==null){t._remove()}t.parent=this}this._children._insertNodes(t,i)}_removeChildren(t,e=1){const i=this._children._removeNodes(t,e);for(const t of i){t.parent=null}return i}}function Vm(t){if(typeof t==\"string\"){return[new Dh(t)]}if(!Fs(t)){t=[t]}return Array.from(t).map(t=>{if(typeof t==\"string\"){return new Dh(t)}if(t instanceof Bh){return new Dh(t.data,t.getAttributes())}return t})}function Fm(t,e){e=qm(e);const i=e.reduce((t,e)=>t+e.offsetSize,0);const n=t.parent;Ym(t);const o=t.index;n._insertChild(o,e);$m(n,o+e.length);$m(n,o);return new $h(t,t.getShiftedBy(i))}function Hm(t){if(!t.isFlat){throw new ss[\"b\"](\"operation-utils-remove-range-not-flat: \"+\"Trying to remove a range which starts and ends in different element.\",this)}const e=t.start.parent;Ym(t.start);Ym(t.end);const i=e._removeChildren(t.start.index,t.end.index-t.start.index);$m(e,t.start.index);return i}function Wm(t,e){if(!t.isFlat){throw new ss[\"b\"](\"operation-utils-move-range-not-flat: \"+\"Trying to move a range which starts and ends in different element.\",this)}const i=Hm(t);e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset);return Fm(e,i)}function Um(t,e,i){Ym(t.start);Ym(t.end);for(const n of t.getItems({shallow:true})){const t=n.is(\"textProxy\")?n.textNode:n;if(i!==null){t._setAttribute(e,i)}else{t._removeAttribute(e)}$m(t.parent,t.index)}$m(t.end.parent,t.end.index)}function qm(t){const e=[];if(!(t instanceof Array)){t=[t]}for(let i=0;i<t.length;i++){if(typeof t[i]==\"string\"){e.push(new Dh(t[i]))}else if(t[i]instanceof Bh){e.push(new Dh(t[i].data,t[i].getAttributes()))}else if(t[i]instanceof Bm||t[i]instanceof Vh){for(const n of t[i]){e.push(n)}}else if(t[i]instanceof jh){e.push(t[i])}}for(let t=1;t<e.length;t++){const i=e[t];const n=e[t-1];if(i instanceof Dh&&n instanceof Dh&&Gm(i,n)){e.splice(t-1,2,new Dh(n.data+i.data,n.getAttributes()));t--}}return e}function $m(t,e){const i=t.getChild(e-1);const n=t.getChild(e);if(i&&n&&i.is(\"text\")&&n.is(\"text\")&&Gm(i,n)){const o=new Dh(i.data+n.data,i.getAttributes());t._removeChildren(e-1,2);t._insertChild(e-1,o)}}function Ym(t){const e=t.textNode;const i=t.parent;if(e){const n=t.offset-e.startOffset;const o=e.index;i._removeChildren(o,1);const r=new Dh(e.data.substr(0,n),e.getAttributes());const s=new Dh(e.data.substr(n),e.getAttributes());i._insertChild(o,[r,s])}}function Gm(t,e){const i=t.getAttributes();const n=e.getAttributes();for(const t of i){if(t[1]!==e.getAttribute(t[0])){return false}n.next()}return n.next().done}function Jm(t,e){return Uu(t,e)}var Xm=Jm;class Qm extends Dm{constructor(t,e,i,n,o){super(o);this.range=t.clone();this.key=e;this.oldValue=i===undefined?null:i;this.newValue=n===undefined?null:n}get type(){if(this.oldValue===null){return\"addAttribute\"}else if(this.newValue===null){return\"removeAttribute\"}else{return\"changeAttribute\"}}clone(){return new Qm(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Qm(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const t=super.toJSON();t.range=this.range.toJSON();return t}_validate(){if(!this.range.isFlat){throw new ss[\"b\"](\"attribute-operation-range-not-flat: The range to change is not flat.\",this)}for(const t of this.range.getItems({shallow:true})){if(this.oldValue!==null&&!Xm(t.getAttribute(this.key),this.oldValue)){throw new ss[\"b\"](\"attribute-operation-wrong-old-value: Changed node has different attribute value than operation's \"+\"old attribute value.\",this,{item:t,key:this.key,value:this.oldValue})}if(this.oldValue===null&&this.newValue!==null&&t.hasAttribute(this.key)){throw new ss[\"b\"](\"attribute-operation-attribute-exists: The attribute with given key already exists.\",this,{node:t,key:this.key})}}}_execute(){if(!Xm(this.oldValue,this.newValue)){Um(this.range,this.key,this.newValue)}}static get className(){return\"AttributeOperation\"}static fromJSON(t,e){return new Qm($h.fromJSON(t.range,e),t.key,t.oldValue,t.newValue,t.baseVersion)}}class Km extends Dm{constructor(t,e){super(null);this.sourcePosition=t.clone();this.howMany=e}get type(){return\"detach\"}toJSON(){const t=super.toJSON();t.sourcePosition=this.sourcePosition.toJSON();return t}_validate(){if(this.sourcePosition.root.document){throw new ss[\"b\"](\"detach-operation-on-document-node: Cannot detach document node.\",this)}}_execute(){Hm($h._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return\"DetachOperation\"}}class Zm extends Dm{constructor(t,e,i,n){super(n);this.sourcePosition=t.clone();this.sourcePosition.stickiness=\"toNext\";this.howMany=e;this.targetPosition=i.clone();this.targetPosition.stickiness=\"toNone\"}get type(){if(this.targetPosition.root.rootName==\"$graveyard\"){return\"remove\"}else if(this.sourcePosition.root.rootName==\"$graveyard\"){return\"reinsert\"}return\"move\"}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const t=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new this.constructor(this.getMovedRangeStart(),this.howMany,t,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent;const e=this.targetPosition.parent;const i=this.sourcePosition.offset;const n=this.targetPosition.offset;if(i+this.howMany>t.maxOffset){throw new ss[\"b\"](\"move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.\",this)}else if(t===e&&i<n&&n<i+this.howMany){throw new ss[\"b\"](\"move-operation-range-into-itself: Trying to move a range of nodes to the inside of that range.\",this)}else if(this.sourcePosition.root==this.targetPosition.root){if(Os(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())==\"prefix\"){const t=this.sourcePosition.path.length-1;if(this.targetPosition.path[t]>=i&&this.targetPosition.path[t]<i+this.howMany){throw new ss[\"b\"](\"move-operation-node-into-itself: Trying to move a range of nodes into one of nodes from that range.\",this)}}}}_execute(){Wm($h._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const t=super.toJSON();t.sourcePosition=this.sourcePosition.toJSON();t.targetPosition=this.targetPosition.toJSON();return t}static get className(){return\"MoveOperation\"}static fromJSON(t,e){const i=qh.fromJSON(t.sourcePosition,e);const n=qh.fromJSON(t.targetPosition,e);return new this(i,t.howMany,n,t.baseVersion)}}class tg extends Dm{constructor(t,e,i){super(i);this.position=t.clone();this.position.stickiness=\"toNone\";this.nodes=new Vh(qm(e));this.shouldReceiveAttributes=false}get type(){return\"insert\"}get howMany(){return this.nodes.maxOffset}clone(){const t=new Vh([...this.nodes].map(t=>t._clone(true)));const e=new tg(this.position,t,this.baseVersion);e.shouldReceiveAttributes=this.shouldReceiveAttributes;return e}getReversed(){const t=this.position.root.document.graveyard;const e=new qh(t,[0]);return new Zm(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffset<this.position.offset){throw new ss[\"b\"](\"insert-operation-position-invalid: Insertion position is invalid.\",this)}}_execute(){const t=this.nodes;this.nodes=new Vh([...t].map(t=>t._clone(true)));Fm(this.position,t)}toJSON(){const t=super.toJSON();t.position=this.position.toJSON();t.nodes=this.nodes.toJSON();return t}static get className(){return\"InsertOperation\"}static fromJSON(t,e){const i=[];for(const e of t.nodes){if(e.name){i.push(Fh.fromJSON(e))}else{i.push(Dh.fromJSON(e))}}const n=new tg(qh.fromJSON(t.position,e),i,t.baseVersion);n.shouldReceiveAttributes=t.shouldReceiveAttributes;return n}}class eg extends Dm{constructor(t,e,i,n,o,r){super(r);this.name=t;this.oldRange=e?e.clone():null;this.newRange=i?i.clone():null;this.affectsData=o;this._markers=n}get type(){return\"marker\"}clone(){return new eg(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new eg(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const t=this.newRange?\"_set\":\"_remove\";this._markers[t](this.name,this.newRange,true,this.affectsData)}toJSON(){const t=super.toJSON();if(this.oldRange){t.oldRange=this.oldRange.toJSON()}if(this.newRange){t.newRange=this.newRange.toJSON()}delete t._markers;return t}static get className(){return\"MarkerOperation\"}static fromJSON(t,e){return new eg(t.name,t.oldRange?$h.fromJSON(t.oldRange,e):null,t.newRange?$h.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}class ig extends Dm{constructor(t,e,i,n){super(n);this.position=t;this.position.stickiness=\"toNext\";this.oldName=e;this.newName=i}get type(){return\"rename\"}clone(){return new ig(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new ig(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof Fh)){throw new ss[\"b\"](\"rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.\",this)}else if(t.name!==this.oldName){throw new ss[\"b\"](\"rename-operation-wrong-name: Element to change has different name than operation's old name.\",this)}}_execute(){const t=this.position.nodeAfter;t.name=this.newName}toJSON(){const t=super.toJSON();t.position=this.position.toJSON();return t}static get className(){return\"RenameOperation\"}static fromJSON(t,e){return new ig(qh.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}class ng extends Dm{constructor(t,e,i,n,o){super(o);this.root=t;this.key=e;this.oldValue=i;this.newValue=n}get type(){if(this.oldValue===null){return\"addRootAttribute\"}else if(this.newValue===null){return\"removeRootAttribute\"}else{return\"changeRootAttribute\"}}clone(){return new ng(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new ng(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is(\"documentFragment\")){throw new ss[\"b\"](\"rootattribute-operation-not-a-root: The element to change is not a root element.\",this,{root:this.root,key:this.key})}if(this.oldValue!==null&&this.root.getAttribute(this.key)!==this.oldValue){throw new ss[\"b\"](\"rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation's \"+\"old attribute value.\",this,{root:this.root,key:this.key})}if(this.oldValue===null&&this.newValue!==null&&this.root.hasAttribute(this.key)){throw new ss[\"b\"](\"rootattribute-operation-attribute-exists: The attribute with given key already exists.\",this,{root:this.root,key:this.key})}}_execute(){if(this.newValue!==null){this.root._setAttribute(this.key,this.newValue)}else{this.root._removeAttribute(this.key)}}toJSON(){const t=super.toJSON();t.root=this.root.toJSON();return t}static get className(){return\"RootAttributeOperation\"}static fromJSON(t,e){if(!e.getRoot(t.root)){throw new ss[\"b\"](\"rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.\",this,{rootName:t.root})}return new ng(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class og extends Dm{constructor(t,e,i,n,o){super(o);this.sourcePosition=t.clone();this.sourcePosition.stickiness=\"toPrevious\";this.howMany=e;this.targetPosition=i.clone();this.targetPosition.stickiness=\"toNext\";this.graveyardPosition=n.clone()}get type(){return\"merge\"}get deletionPosition(){return new qh(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new $h(this.sourcePosition,t)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this);const e=this.sourcePosition.path.slice(0,-1);const i=new qh(this.sourcePosition.root,e)._getTransformedByMergeOperation(this);const n=new rg(t,this.howMany,this.graveyardPosition,this.baseVersion+1);n.insertionPosition=i;return n}_validate(){const t=this.sourcePosition.parent;const e=this.targetPosition.parent;if(!t.parent){throw new ss[\"b\"](\"merge-operation-source-position-invalid: Merge source position is invalid.\",this)}else if(!e.parent){throw new ss[\"b\"](\"merge-operation-target-position-invalid: Merge target position is invalid.\",this)}else if(this.howMany!=t.maxOffset){throw new ss[\"b\"](\"merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.\",this)}}_execute(){const t=this.sourcePosition.parent;const e=$h._createIn(t);Wm(e,this.targetPosition);Wm($h._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();t.sourcePosition=t.sourcePosition.toJSON();t.targetPosition=t.targetPosition.toJSON();t.graveyardPosition=t.graveyardPosition.toJSON();return t}static get className(){return\"MergeOperation\"}static fromJSON(t,e){const i=qh.fromJSON(t.sourcePosition,e);const n=qh.fromJSON(t.targetPosition,e);const o=qh.fromJSON(t.graveyardPosition,e);return new this(i,t.howMany,n,o,t.baseVersion)}}class rg extends Dm{constructor(t,e,i,n){super(n);this.splitPosition=t.clone();this.splitPosition.stickiness=\"toNext\";this.howMany=e;this.insertionPosition=rg.getInsertionPosition(t);this.insertionPosition.stickiness=\"toNone\";this.graveyardPosition=i?i.clone():null;if(this.graveyardPosition){this.graveyardPosition.stickiness=\"toNext\"}}get type(){return\"split\"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();t.push(0);return new qh(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new $h(this.splitPosition,t)}clone(){const t=new this.constructor(this.splitPosition,this.howMany,this.graveyardPosition,this.baseVersion);t.insertionPosition=this.insertionPosition;return t}getReversed(){const t=this.splitPosition.root.document.graveyard;const e=new qh(t,[0]);return new og(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent;const e=this.splitPosition.offset;if(!t||t.maxOffset<e){throw new ss[\"b\"](\"split-operation-position-invalid: Split position is invalid.\",this)}else if(!t.parent){throw new ss[\"b\"](\"split-operation-split-in-root: Cannot split root element.\",this)}else if(this.howMany!=t.maxOffset-this.splitPosition.offset){throw new ss[\"b\"](\"split-operation-how-many-invalid: Split operation specifies wrong number of nodes to move.\",this)}else if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter){throw new ss[\"b\"](\"split-operation-graveyard-position-invalid: Graveyard position invalid.\",this)}}_execute(){const t=this.splitPosition.parent;if(this.graveyardPosition){Wm($h._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition)}else{const e=t._clone();Fm(this.insertionPosition,e)}const e=new $h(qh._createAt(t,this.splitPosition.offset),qh._createAt(t,t.maxOffset));Wm(e,this.moveTargetPosition)}toJSON(){const t=super.toJSON();t.splitPosition=this.splitPosition.toJSON();t.insertionPosition=this.insertionPosition.toJSON();if(this.graveyardPosition){t.graveyardPosition=this.graveyardPosition.toJSON()}return t}static get className(){return\"SplitOperation\"}static getInsertionPosition(t){const e=t.path.slice(0,-1);e[e.length-1]++;return new qh(t.root,e)}static fromJSON(t,e){const i=qh.fromJSON(t.splitPosition,e);const n=qh.fromJSON(t.insertionPosition,e);const o=t.graveyardPosition?qh.fromJSON(t.graveyardPosition,e):null;const r=new this(i,t.howMany,o,t.baseVersion);r.insertionPosition=n;return r}}class sg extends Fh{constructor(t,e,i=\"main\"){super(e);this._document=t;this.rootName=i}get document(){return this._document}is(t,e){const i=t.replace(\"model:\",\"\");if(!e){return i==\"rootElement\"||super.is(t)}else{return i==\"rootElement\"&&e==this.name||super.is(t,e)}}toJSON(){return this.rootName}}class ag{constructor(t,e){this.model=t;this.batch=e}createText(t,e){return new Dh(t,e)}createElement(t,e){return new Fh(t,e)}createDocumentFragment(){return new Bm}insert(t,e,i=0){this._assertWriterUsedCorrectly();if(t instanceof Dh&&t.data==\"\"){return}const n=qh._createAt(e,i);if(t.parent){if(hg(t.root,n.root)){this.move($h._createOn(t),n);return}else{if(t.root.document){throw new ss[\"b\"](\"model-writer-insert-forbidden-move: \"+\"Cannot move a node from a document to a different tree. \"+\"It is forbidden to move a node that was already in a document outside of it.\",this)}else{this.remove(t)}}}const o=n.root.document?n.root.document.version:null;const r=new tg(n,t,o);if(t instanceof Dh){r.shouldReceiveAttributes=true}this.batch.addOperation(r);this.model.applyOperation(r);if(t instanceof Bm){for(const[e,i]of t.markers){const t=qh._createAt(i.root,0);const o=new $h(i.start._getCombined(t,n),i.end._getCombined(t,n));const r={range:o,usingOperation:true,affectsData:true};if(this.model.markers.has(e)){this.updateMarker(e,r)}else{this.addMarker(e,r)}}}}insertText(t,e,i,n){if(e instanceof Bm||e instanceof Fh||e instanceof qh){this.insert(this.createText(t),e,i)}else{this.insert(this.createText(t,e),i,n)}}insertElement(t,e,i,n){if(e instanceof Bm||e instanceof Fh||e instanceof qh){this.insert(this.createElement(t),e,i)}else{this.insert(this.createElement(t,e),i,n)}}append(t,e){this.insert(t,e,\"end\")}appendText(t,e,i){if(e instanceof Bm||e instanceof Fh){this.insert(this.createText(t),e,\"end\")}else{this.insert(this.createText(t,e),i,\"end\")}}appendElement(t,e,i){if(e instanceof Bm||e instanceof Fh){this.insert(this.createElement(t),e,\"end\")}else{this.insert(this.createElement(t,e),i,\"end\")}}setAttribute(t,e,i){this._assertWriterUsedCorrectly();if(i instanceof $h){const n=i.getMinimalFlatRanges();for(const i of n){cg(this,t,e,i)}}else{lg(this,t,e,i)}}setAttributes(t,e){for(const[i,n]of Hs(t)){this.setAttribute(i,n,e)}}removeAttribute(t,e){this._assertWriterUsedCorrectly();if(e instanceof $h){const i=e.getMinimalFlatRanges();for(const e of i){cg(this,t,null,e)}}else{lg(this,t,null,e)}}clearAttributes(t){this._assertWriterUsedCorrectly();const e=t=>{for(const e of t.getAttributeKeys()){this.removeAttribute(e,t)}};if(!(t instanceof $h)){e(t)}else{for(const i of t.getItems()){e(i)}}}move(t,e,i){this._assertWriterUsedCorrectly();if(!(t instanceof $h)){throw new ss[\"b\"](\"writer-move-invalid-range: Invalid range to move.\",this)}if(!t.isFlat){throw new ss[\"b\"](\"writer-move-range-not-flat: Range to move is not flat.\",this)}const n=qh._createAt(e,i);if(n.isEqual(t.start)){return}this._addOperationForAffectedMarkers(\"move\",t);if(!hg(t.root,n.root)){throw new ss[\"b\"](\"writer-move-different-document: Range is going to be moved between different documents.\",this)}const o=t.root.document?t.root.document.version:null;const r=new Zm(t.start,t.end.offset-t.start.offset,n,o);this.batch.addOperation(r);this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=t instanceof $h?t:$h._createOn(t);const i=e.getMinimalFlatRanges().reverse();for(const t of i){this._addOperationForAffectedMarkers(\"move\",t);ug(t.start,t.end.offset-t.start.offset,this.batch,this.model)}}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore;const i=t.nodeAfter;this._addOperationForAffectedMarkers(\"merge\",t);if(!(e instanceof Fh)){throw new ss[\"b\"](\"writer-merge-no-element-before: Node before merge position must be an element.\",this)}if(!(i instanceof Fh)){throw new ss[\"b\"](\"writer-merge-no-element-after: Node after merge position must be an element.\",this)}if(!t.root.document){this._mergeDetached(t)}else{this._merge(t)}}createPositionFromPath(t,e,i){return this.model.createPositionFromPath(t,e,i)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(t,e,i){return this.model.createSelection(t,e,i)}_mergeDetached(t){const e=t.nodeBefore;const i=t.nodeAfter;this.move($h._createIn(i),qh._createAt(e,\"end\"));this.remove(i)}_merge(t){const e=qh._createAt(t.nodeBefore,\"end\");const i=qh._createAt(t.nodeAfter,0);const n=t.root.document.graveyard;const o=new qh(n,[0]);const r=t.root.document.version;const s=new og(i,t.nodeAfter.maxOffset,e,o,r);this.batch.addOperation(s);this.model.applyOperation(s)}rename(t,e){this._assertWriterUsedCorrectly();if(!(t instanceof Fh)){throw new ss[\"b\"](\"writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.\",this)}const i=t.root.document?t.root.document.version:null;const n=new ig(qh._createBefore(t),t.name,e,i);this.batch.addOperation(n);this.model.applyOperation(n)}split(t,e){this._assertWriterUsedCorrectly();let i=t.parent;if(!i.parent){throw new ss[\"b\"](\"writer-split-element-no-parent: Element with no parent can not be split.\",this)}if(!e){e=i.parent}if(!t.parent.getAncestors({includeSelf:true}).includes(e)){throw new ss[\"b\"](\"writer-split-invalid-limit-element: Limit element is not a position ancestor.\",this)}let n,o;do{const e=i.root.document?i.root.document.version:null;const r=i.maxOffset-t.offset;const s=new rg(t,r,null,e);this.batch.addOperation(s);this.model.applyOperation(s);if(!n&&!o){n=i;o=t.parent.nextSibling}t=this.createPositionAfter(t.parent);i=t.parent}while(i!==e);return{position:t,range:new $h(qh._createAt(n,\"end\"),qh._createAt(o,0))}}wrap(t,e){this._assertWriterUsedCorrectly();if(!t.isFlat){throw new ss[\"b\"](\"writer-wrap-range-not-flat: Range to wrap is not flat.\",this)}const i=e instanceof Fh?e:new Fh(e);if(i.childCount>0){throw new ss[\"b\"](\"writer-wrap-element-not-empty: Element to wrap with is not empty.\",this)}if(i.parent!==null){throw new ss[\"b\"](\"writer-wrap-element-attached: Element to wrap with is already attached to tree model.\",this)}this.insert(i,t.start);const n=new $h(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(n,qh._createAt(i,0))}unwrap(t){this._assertWriterUsedCorrectly();if(t.parent===null){throw new ss[\"b\"](\"writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.\",this)}this.move($h._createIn(t),this.createPositionAfter(t));this.remove(t)}addMarker(t,e){this._assertWriterUsedCorrectly();if(!e||typeof e.usingOperation!=\"boolean\"){throw new ss[\"b\"](\"writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.\",this)}const i=e.usingOperation;const n=e.range;const o=e.affectsData===undefined?false:e.affectsData;if(this.model.markers.has(t)){throw new ss[\"b\"](\"writer-addMarker-marker-exists: Marker with provided name already exists.\",this)}if(!n){throw new ss[\"b\"](\"writer-addMarker-no-range: Range parameter is required when adding a new marker.\",this)}if(!i){return this.model.markers._set(t,n,i,o)}dg(this,t,null,n,o);return this.model.markers.get(t)}updateMarker(t,e){this._assertWriterUsedCorrectly();const i=typeof t==\"string\"?t:t.name;const n=this.model.markers.get(i);if(!n){throw new ss[\"b\"](\"writer-updateMarker-marker-not-exists: Marker with provided name does not exists.\",this)}if(!e){this.model.markers._refresh(n);return}const o=typeof e.usingOperation==\"boolean\";const r=typeof e.affectsData==\"boolean\";const s=r?e.affectsData:n.affectsData;if(!o&&!e.range&&!r){throw new ss[\"b\"](\"writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.\",this)}const a=n.getRange();const c=e.range?e.range:a;if(o&&e.usingOperation!==n.managedUsingOperations){if(e.usingOperation){dg(this,i,null,c,s)}else{dg(this,i,a,null,s);this.model.markers._set(i,c,undefined,s)}return}if(n.managedUsingOperations){dg(this,i,a,c,s)}else{this.model.markers._set(i,c,undefined,s)}}removeMarker(t){this._assertWriterUsedCorrectly();const e=typeof t==\"string\"?t:t.name;if(!this.model.markers.has(e)){throw new ss[\"b\"](\"writer-removeMarker-no-marker: Trying to remove marker which does not exist.\",this)}const i=this.model.markers.get(e);if(!i.managedUsingOperations){this.model.markers._remove(e);return}const n=i.getRange();dg(this,e,n,null,i.affectsData)}setSelection(t,e,i){this._assertWriterUsedCorrectly();this.model.document.selection._setTo(t,e,i)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly();this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){this._assertWriterUsedCorrectly();if(typeof t===\"string\"){this._setSelectionAttribute(t,e)}else{for(const[e,i]of Hs(t)){this._setSelectionAttribute(e,i)}}}removeSelectionAttribute(t){this._assertWriterUsedCorrectly();if(typeof t===\"string\"){this._removeSelectionAttribute(t)}else{for(const e of t){this._removeSelectionAttribute(e)}}}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const n=df._getStoreAttributeKey(t);this.setAttribute(n,e,i.anchor.parent)}i._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const i=df._getStoreAttributeKey(t);this.removeAttribute(i,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this){throw new ss[\"b\"](\"writer-incorrect-use: Trying to use a writer outside the change() block.\",this)}}_addOperationForAffectedMarkers(t,e){for(const i of this.model.markers){if(!i.managedUsingOperations){continue}const n=i.getRange();let o=false;if(t==\"move\"){o=e.containsPosition(n.start)||e.start.isEqual(n.start)||e.containsPosition(n.end)||e.end.isEqual(n.end)}else{const t=e.nodeBefore;const i=e.nodeAfter;const r=n.start.parent==t&&n.start.isAtEnd;const s=n.end.parent==i&&n.end.offset==0;const a=n.end.nodeAfter==i;const c=n.start.nodeAfter==i;o=r||s||a||c}if(o){this.updateMarker(i.name,{range:n})}}}}function cg(t,e,i,n){const o=t.model;const r=o.document;let s=n.start;let a;let c;let l;for(const t of n.getWalker({shallow:true})){l=t.item.getAttribute(e);if(a&&c!=l){if(c!=i){d()}s=a}a=t.nextPosition;c=l}if(a instanceof qh&&a!=s&&c!=i){d()}function d(){const n=new $h(s,a);const l=n.root.document?r.version:null;const d=new Qm(n,e,c,i,l);t.batch.addOperation(d);o.applyOperation(d)}}function lg(t,e,i,n){const o=t.model;const r=o.document;const s=n.getAttribute(e);let a,c;if(s!=i){const l=n.root===n;if(l){const t=n.document?r.version:null;c=new ng(n,e,s,i,t)}else{a=new $h(qh._createBefore(n),t.createPositionAfter(n));const o=a.root.document?r.version:null;c=new Qm(a,e,s,i,o)}t.batch.addOperation(c);o.applyOperation(c)}}function dg(t,e,i,n,o){const r=t.model;const s=r.document;const a=new eg(e,i,n,r.markers,o,s.version);t.batch.addOperation(a);r.applyOperation(a)}function ug(t,e,i,n){let o;if(t.root.document){const i=n.document;const r=new qh(i.graveyard,[0]);o=new Zm(t,e,r,i.version)}else{o=new Km(t,e)}i.addOperation(o);n.applyOperation(o)}function hg(t,e){if(t===e){return true}if(t instanceof sg&&e instanceof sg){return true}return false}class fg{constructor(t){this._markerCollection=t;this._changesInElement=new Map;this._elementSnapshots=new Map;this._changedMarkers=new Map;this._changeCount=0;this._cachedChanges=null;this._cachedChangesWithGraveyard=null}get isEmpty(){return this._changesInElement.size==0&&this._changedMarkers.size==0}refreshItem(t){if(this._isInInsertedElement(t.parent)){return}this._markRemove(t.parent,t.startOffset,t.offsetSize);this._markInsert(t.parent,t.startOffset,t.offsetSize);const e=$h._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}this._cachedChanges=null}bufferOperation(t){switch(t.type){case\"insert\":{if(this._isInInsertedElement(t.position.parent)){return}this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break}case\"addAttribute\":case\"removeAttribute\":case\"changeAttribute\":{for(const e of t.range.getItems({shallow:true})){if(this._isInInsertedElement(e.parent)){continue}this._markAttribute(e)}break}case\"remove\":case\"move\":case\"reinsert\":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition)){return}const e=this._isInInsertedElement(t.sourcePosition.parent);const i=this._isInInsertedElement(t.targetPosition.parent);if(!e){this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany)}if(!i){this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany)}break}case\"rename\":{if(this._isInInsertedElement(t.position.parent)){return}this._markRemove(t.position.parent,t.position.offset,1);this._markInsert(t.position.parent,t.position.offset,1);const e=$h._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}break}case\"split\":{const e=t.splitPosition.parent;if(!this._isInInsertedElement(e)){this._markRemove(e,t.splitPosition.offset,t.howMany)}if(!this._isInInsertedElement(t.insertionPosition.parent)){this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1)}if(t.graveyardPosition){this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1)}break}case\"merge\":{const e=t.sourcePosition.parent;if(!this._isInInsertedElement(e.parent)){this._markRemove(e.parent,e.startOffset,1)}const i=t.graveyardPosition.parent;this._markInsert(i,t.graveyardPosition.offset,1);const n=t.targetPosition.parent;if(!this._isInInsertedElement(n)){this._markInsert(n,t.targetPosition.offset,e.maxOffset)}break}}this._cachedChanges=null}bufferMarkerChange(t,e,i,n){const o=this._changedMarkers.get(t);if(!o){this._changedMarkers.set(t,{oldRange:e,newRange:i,affectsData:n})}else{o.newRange=i;o.affectsData=n;if(o.oldRange==null&&o.newRange==null){this._changedMarkers.delete(t)}}}getMarkersToRemove(){const t=[];for(const[e,i]of this._changedMarkers){if(i.oldRange!=null){t.push({name:e,range:i.oldRange})}}return t}getMarkersToAdd(){const t=[];for(const[e,i]of this._changedMarkers){if(i.newRange!=null){t.push({name:e,range:i.newRange})}}return t}getChangedMarkers(){return Array.from(this._changedMarkers).map(t=>({name:t[0],data:{oldRange:t[1].oldRange,newRange:t[1].newRange}}))}hasDataChanges(){for(const[,t]of this._changedMarkers){if(t.affectsData){return true}}return this._changesInElement.size>0}getChanges(t={includeChangesInGraveyard:false}){if(this._cachedChanges){if(t.includeChangesInGraveyard){return this._cachedChangesWithGraveyard.slice()}else{return this._cachedChanges.slice()}}const e=[];for(const t of this._changesInElement.keys()){const i=this._changesInElement.get(t).sort((t,e)=>{if(t.offset===e.offset){if(t.type!=e.type){return t.type==\"remove\"?-1:1}return 0}return t.offset<e.offset?-1:1});const n=this._elementSnapshots.get(t);const o=mg(t.getChildren());const r=gg(n.length,i);let s=0;let a=0;for(const i of r){if(i===\"i\"){e.push(this._getInsertDiff(t,s,o[s].name));s++}else if(i===\"r\"){e.push(this._getRemoveDiff(t,s,n[a].name));a++}else if(i===\"a\"){const i=o[s].attributes;const r=n[a].attributes;let c;if(o[s].name==\"$text\"){c=new $h(qh._createAt(t,s),qh._createAt(t,s+1))}else{const e=t.offsetToIndex(s);c=new $h(qh._createAt(t,s),qh._createAt(t.getChild(e),0))}e.push(...this._getAttributesDiff(c,r,i));s++;a++}else{s++;a++}}}e.sort((t,e)=>{if(t.position.root!=e.position.root){return t.position.root.rootName<e.position.root.rootName?-1:1}if(t.position.isEqual(e.position)){return t.changeCount-e.changeCount}return t.position.isBefore(e.position)?-1:1});for(let t=1;t<e.length;t++){const i=e[t-1];const n=e[t];const o=i.type==\"remove\"&&n.type==\"remove\"&&i.name==\"$text\"&&n.name==\"$text\"&&i.position.isEqual(n.position);const r=i.type==\"insert\"&&n.type==\"insert\"&&i.name==\"$text\"&&n.name==\"$text\"&&i.position.parent==n.position.parent&&i.position.offset+i.length==n.position.offset;const s=i.type==\"attribute\"&&n.type==\"attribute\"&&i.position.parent==n.position.parent&&i.range.isFlat&&n.range.isFlat&&i.position.offset+i.length==n.position.offset&&i.attributeKey==n.attributeKey&&i.attributeOldValue==n.attributeOldValue&&i.attributeNewValue==n.attributeNewValue;if(o||r||s){e[t-1].length++;if(s){e[t-1].range.end=e[t-1].range.end.getShiftedBy(1)}e.splice(t,1);t--}}for(const t of e){delete t.changeCount;if(t.type==\"attribute\"){delete t.position;delete t.length}}this._changeCount=0;this._cachedChangesWithGraveyard=e.slice();this._cachedChanges=e.slice().filter(pg);if(t.includeChangesInGraveyard){return this._cachedChangesWithGraveyard}else{return this._cachedChanges}}reset(){this._changesInElement.clear();this._elementSnapshots.clear();this._changedMarkers.clear();this._cachedChanges=null}_markInsert(t,e,i){const n={type:\"insert\",offset:e,howMany:i,count:this._changeCount++};this._markChange(t,n)}_markRemove(t,e,i){const n={type:\"remove\",offset:e,howMany:i,count:this._changeCount++};this._markChange(t,n);this._removeAllNestedChanges(t,e,i)}_markAttribute(t){const e={type:\"attribute\",offset:t.startOffset,howMany:t.offsetSize,count:this._changeCount++};this._markChange(t.parent,e)}_markChange(t,e){this._makeSnapshot(t);const i=this._getChangesForElement(t);this._handleChange(e,i);i.push(e);for(let t=0;t<i.length;t++){if(i[t].howMany<1){i.splice(t,1);t--}}}_getChangesForElement(t){let e;if(this._changesInElement.has(t)){e=this._changesInElement.get(t)}else{e=[];this._changesInElement.set(t,e)}return e}_makeSnapshot(t){if(!this._elementSnapshots.has(t)){this._elementSnapshots.set(t,mg(t.getChildren()))}}_handleChange(t,e){t.nodesToHandle=t.howMany;for(const i of e){const n=t.offset+t.howMany;const o=i.offset+i.howMany;if(t.type==\"insert\"){if(i.type==\"insert\"){if(t.offset<=i.offset){i.offset+=t.howMany}else if(t.offset<o){i.howMany+=t.nodesToHandle;t.nodesToHandle=0}}if(i.type==\"remove\"){if(t.offset<i.offset){i.offset+=t.howMany}}if(i.type==\"attribute\"){if(t.offset<=i.offset){i.offset+=t.howMany}else if(t.offset<o){const o=i.howMany;i.howMany=t.offset-i.offset;e.unshift({type:\"attribute\",offset:n,howMany:o-i.howMany,count:this._changeCount++})}}}if(t.type==\"remove\"){if(i.type==\"insert\"){if(n<=i.offset){i.offset-=t.howMany}else if(n<=o){if(t.offset<i.offset){const e=n-i.offset;i.offset=t.offset;i.howMany-=e;t.nodesToHandle-=e}else{i.howMany-=t.nodesToHandle;t.nodesToHandle=0}}else{if(t.offset<=i.offset){t.nodesToHandle-=i.howMany;i.howMany=0}else if(t.offset<o){const e=o-t.offset;i.howMany-=e;t.nodesToHandle-=e}}}if(i.type==\"remove\"){if(n<=i.offset){i.offset-=t.howMany}else if(t.offset<i.offset){t.nodesToHandle+=i.howMany;i.howMany=0}}if(i.type==\"attribute\"){if(n<=i.offset){i.offset-=t.howMany}else if(t.offset<i.offset){const e=n-i.offset;i.offset=t.offset;i.howMany-=e}else if(t.offset<o){if(n<=o){const n=i.howMany;i.howMany=t.offset-i.offset;const o=n-i.howMany-t.nodesToHandle;e.unshift({type:\"attribute\",offset:t.offset,howMany:o,count:this._changeCount++})}else{i.howMany-=o-t.offset}}}}if(t.type==\"attribute\"){if(i.type==\"insert\"){if(t.offset<i.offset&&n>i.offset){if(n>o){const t={type:\"attribute\",offset:o,howMany:n-o,count:this._changeCount++};this._handleChange(t,e);e.push(t)}t.nodesToHandle=i.offset-t.offset;t.howMany=t.nodesToHandle}else if(t.offset>=i.offset&&t.offset<o){if(n>o){t.nodesToHandle=n-o;t.offset=o}else{t.nodesToHandle=0}}}if(i.type==\"remove\"){if(t.offset<i.offset&&n>i.offset){const o={type:\"attribute\",offset:i.offset,howMany:n-i.offset,count:this._changeCount++};this._handleChange(o,e);e.push(o);t.nodesToHandle=i.offset-t.offset;t.howMany=t.nodesToHandle}}if(i.type==\"attribute\"){if(t.offset>=i.offset&&n<=o){t.nodesToHandle=0;t.howMany=0;t.offset=0}else if(t.offset<=i.offset&&n>=o){i.howMany=0}}}}t.howMany=t.nodesToHandle;delete t.nodesToHandle}_getInsertDiff(t,e,i){return{type:\"insert\",position:qh._createAt(t,e),name:i,length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,i){return{type:\"remove\",position:qh._createAt(t,e),name:i,length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,i){const n=[];i=new Map(i);for(const[o,r]of e){const e=i.has(o)?i.get(o):null;if(e!==r){n.push({type:\"attribute\",position:t.start,range:t.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++})}i.delete(o)}for(const[e,o]of i){n.push({type:\"attribute\",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++})}return n}_isInInsertedElement(t){const e=t.parent;if(!e){return false}const i=this._changesInElement.get(e);const n=t.startOffset;if(i){for(const t of i){if(t.type==\"insert\"&&n>=t.offset&&n<t.offset+t.howMany){return true}}}return this._isInInsertedElement(e)}_removeAllNestedChanges(t,e,i){const n=new $h(qh._createAt(t,e),qh._createAt(t,e+i));for(const t of n.getItems({shallow:true})){if(t.is(\"element\")){this._elementSnapshots.delete(t);this._changesInElement.delete(t);this._removeAllNestedChanges(t,0,t.maxOffset)}}}}function mg(t){const e=[];for(const i of t){if(i.is(\"text\")){for(let t=0;t<i.data.length;t++){e.push({name:\"$text\",attributes:new Map(i.getAttributes())})}}else{e.push({name:i.name,attributes:new Map(i.getAttributes())})}}return e}function gg(t,e){const i=[];let n=0;let o=0;for(const t of e){if(t.offset>n){for(let e=0;e<t.offset-n;e++){i.push(\"e\")}o+=t.offset-n}if(t.type==\"insert\"){for(let e=0;e<t.howMany;e++){i.push(\"i\")}n=t.offset+t.howMany}else if(t.type==\"remove\"){for(let e=0;e<t.howMany;e++){i.push(\"r\")}n=t.offset;o+=t.howMany}else{i.push(...\"a\".repeat(t.howMany).split(\"\"));n=t.offset+t.howMany;o+=t.howMany}}if(o<t){for(let e=0;e<t-o-n;e++){i.push(\"e\")}}return i}function pg(t){const e=t.position&&t.position.root.rootName==\"$graveyard\";const i=t.range&&t.range.root.rootName==\"$graveyard\";return!e&&!i}class bg{constructor(){this._operations=[];this._undoPairs=new Map;this._undoneOperations=new Set}addOperation(t){if(this._operations.includes(t)){return}this._operations.push(t)}getOperations(t=0,e=Number.POSITIVE_INFINITY){if(t<0){return[]}return this._operations.slice(t,e)}getOperation(t){return this._operations[t]}setOperationAsUndone(t,e){this._undoPairs.set(e,t);this._undoneOperations.add(t)}isUndoingOperation(t){return this._undoPairs.has(t)}isUndoneOperation(t){return this._undoneOperations.has(t)}getUndoneOperation(t){return this._undoPairs.get(t)}}function wg(t){return!!t&&t.length==1&&/[\\u0300-\\u036f\\u1ab0-\\u1aff\\u1dc0-\\u1dff\\u20d0-\\u20ff\\ufe20-\\ufe2f]/.test(t)}function _g(t){return!!t&&t.length==1&&/[\\ud800-\\udbff]/.test(t)}function kg(t){return!!t&&t.length==1&&/[\\udc00-\\udfff]/.test(t)}function vg(t,e){return _g(t.charAt(e-1))&&kg(t.charAt(e))}function yg(t,e){return wg(t.charAt(e))}const xg=\"$graveyard\";class Ag{constructor(t){this.model=t;this.version=0;this.history=new bg(this);this.selection=new df(this);this.roots=new ys({idProperty:\"rootName\"});this.differ=new fg(t.markers);this._postFixers=new Set;this._hasSelectionChangedFromTheLastChangeBlock=false;this.createRoot(\"$root\",xg);this.listenTo(t,\"applyOperation\",(t,e)=>{const i=e[0];if(i.isDocumentOperation&&i.baseVersion!==this.version){throw new ss[\"b\"](\"model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.\",this,{operation:i})}},{priority:\"highest\"});this.listenTo(t,\"applyOperation\",(t,e)=>{const i=e[0];if(i.isDocumentOperation){this.differ.bufferOperation(i)}},{priority:\"high\"});this.listenTo(t,\"applyOperation\",(t,e)=>{const i=e[0];if(i.isDocumentOperation){this.version++;this.history.addOperation(i)}},{priority:\"low\"});this.listenTo(this.selection,\"change\",()=>{this._hasSelectionChangedFromTheLastChangeBlock=true});this.listenTo(t.markers,\"update\",(t,e,i,n)=>{this.differ.bufferMarkerChange(e.name,i,n,e.affectsData);if(i===null){e.on(\"change\",(t,i)=>{this.differ.bufferMarkerChange(e.name,i,e.getRange(),e.affectsData)})}})}get graveyard(){return this.getRoot(xg)}createRoot(t=\"$root\",e=\"main\"){if(this.roots.get(e)){throw new ss[\"b\"](\"model-document-createRoot-name-exists: Root with specified name already exists.\",this,{name:e})}const i=new sg(this,t,e);this.roots.add(i);return i}destroy(){this.selection.destroy();this.stopListening()}getRoot(t=\"main\"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,t=>t.rootName).filter(t=>t!=xg)}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=Rs(this);t.selection=\"[engine.model.DocumentSelection]\";t.model=\"[engine.model.Model]\";return t}_handleChangeBlock(t){if(this._hasDocumentChangedFromTheLastChangeBlock()){this._callPostFixers(t);this.selection.refresh();if(this.differ.hasDataChanges()){this.fire(\"change:data\",t.batch)}else{this.fire(\"change\",t.batch)}this.selection.refresh();this.differ.reset()}this._hasSelectionChangedFromTheLastChangeBlock=false}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const t of this.roots){if(t!==this.graveyard){return t}}return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot();const e=this.model;const i=e.schema;const n=e.createPositionFromPath(t,[0]);const o=i.getNearestSelectionRange(n);return o||e.createRange(n)}_validateSelectionRange(t){return Cg(t.start)&&Cg(t.end)}_callPostFixers(t){let e=false;do{for(const i of this._postFixers){this.selection.refresh();e=i(t);if(e){break}}}while(e)}}vs(Ag,ds);function Cg(t){const e=t.textNode;if(e){const i=e.data;const n=t.offset-e.startOffset;return!vg(i,n)&&!yg(i,n)}return true}class Tg{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){return this._markers.has(t)}get(t){return this._markers.get(t)||null}_set(t,e,i=false,n=false){const o=t instanceof Eg?t.name:t;const r=this._markers.get(o);if(r){const t=r.getRange();let s=false;if(!t.isEqual(e)){r._attachLiveRange(rf.fromRange(e));s=true}if(i!=r.managedUsingOperations){r._managedUsingOperations=i;s=true}if(typeof n===\"boolean\"&&n!=r.affectsData){r._affectsData=n;s=true}if(s){this.fire(\"update:\"+o,r,t,e)}return r}const s=rf.fromRange(e);const a=new Eg(o,s,i,n);this._markers.set(o,a);this.fire(\"update:\"+o,a,null,e);return a}_remove(t){const e=t instanceof Eg?t.name:t;const i=this._markers.get(e);if(i){this._markers.delete(e);this.fire(\"update:\"+e,i,i.getRange(),null);this._destroyMarker(i);return true}return false}_refresh(t){const e=t instanceof Eg?t.name:t;const i=this._markers.get(e);if(!i){throw new ss[\"b\"](\"markercollection-refresh-marker-not-exists: Marker with provided name does not exists.\",this)}const n=i.getRange();this.fire(\"update:\"+e,i,n,n,i.managedUsingOperations,i.affectsData)}*getMarkersAtPosition(t){for(const e of this){if(e.getRange().containsPosition(t)){yield e}}}*getMarkersIntersectingRange(t){for(const e of this){if(e.getRange().getIntersection(t)!==null){yield e}}}destroy(){for(const t of this._markers.values()){this._destroyMarker(t)}this._markers=null;this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values()){if(e.name.startsWith(t+\":\")){yield e}}}_destroyMarker(t){t.stopListening();t._detachLiveRange()}}vs(Tg,ds);class Eg{constructor(t,e,i,n){this.name=t;this._liveRange=this._attachLiveRange(e);this._managedUsingOperations=i;this._affectsData=n}get managedUsingOperations(){if(!this._liveRange){throw new ss[\"b\"](\"marker-destroyed: Cannot use a destroyed marker instance.\",this)}return this._managedUsingOperations}get affectsData(){if(!this._liveRange){throw new ss[\"b\"](\"marker-destroyed: Cannot use a destroyed marker instance.\",this)}return this._affectsData}getStart(){if(!this._liveRange){throw new ss[\"b\"](\"marker-destroyed: Cannot use a destroyed marker instance.\",this)}return this._liveRange.start.clone()}getEnd(){if(!this._liveRange){throw new ss[\"b\"](\"marker-destroyed: Cannot use a destroyed marker instance.\",this)}return this._liveRange.end.clone()}getRange(){if(!this._liveRange){throw new ss[\"b\"](\"marker-destroyed: Cannot use a destroyed marker instance.\",this)}return this._liveRange.toRange()}is(t){return t==\"marker\"||t==\"model:marker\"}_attachLiveRange(t){if(this._liveRange){this._detachLiveRange()}t.delegate(\"change:range\").to(this);t.delegate(\"change:content\").to(this);this._liveRange=t;return t}_detachLiveRange(){this._liveRange.stopDelegating(\"change:range\",this);this._liveRange.stopDelegating(\"change:content\",this);this._liveRange.detach();this._liveRange=null}}vs(Eg,ds);class Mg extends Dm{get type(){return\"noop\"}clone(){return new Mg(this.baseVersion)}getReversed(){return new Mg(this.baseVersion+1)}_execute(){}static get className(){return\"NoOperation\"}}const Pg={};Pg[Qm.className]=Qm;Pg[tg.className]=tg;Pg[eg.className]=eg;Pg[Zm.className]=Zm;Pg[Mg.className]=Mg;Pg[Dm.className]=Dm;Pg[ig.className]=ig;Pg[ng.className]=ng;Pg[rg.className]=rg;Pg[og.className]=og;class Sg{static fromJSON(t,e){return Pg[t.__className].fromJSON(t,e)}}class Ig extends qh{constructor(t,e,i=\"toNone\"){super(t,e,i);if(!this.root.is(\"rootElement\")){throw new ss[\"b\"](\"model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.\",t)}Ng.call(this)}detach(){this.stopListening()}is(t){return t==\"livePosition\"||t==\"model:livePosition\"||super.is(t)}toPosition(){return new qh(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,e){return new this(t.root,t.path.slice(),e?e:t.stickiness)}}function Ng(){this.listenTo(this.root.document.model,\"applyOperation\",(t,e)=>{const i=e[0];if(!i.isDocumentOperation){return}Og.call(this,i)},{priority:\"low\"})}function Og(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path;this.root=e.root;this.fire(\"change\",t)}}vs(Ig,ds);function Lg(t,e,i,n){return t.change(o=>{let r;if(!i){r=t.document.selection}else if(i instanceof Kh||i instanceof df){r=i}else{r=o.createSelection(i,n)}if(!r.isCollapsed){t.deleteContent(r,{doNotAutoparagraph:true})}const s=new zg(t,o,r.anchor);let a;if(e.is(\"documentFragment\")){a=e.getChildren()}else{a=[e]}s.handleNodes(a,{isFirst:true,isLast:true});const c=s.getSelectionRange();if(c){if(r instanceof df){o.setSelection(c)}else{r.setTo(c)}}else{}const l=s.getAffectedRange()||t.createRange(r.anchor);s.destroy();return l})}class zg{constructor(t,e,i){this.model=t;this.writer=e;this.position=i;this.canMergeWith=new Set([this.position.parent]);this.schema=t.schema;this._filterAttributesOf=[];this._affectedStart=null;this._affectedEnd=null}handleNodes(t,e){t=Array.from(t);for(let i=0;i<t.length;i++){const n=t[i];this._handleNode(n,{isFirst:i===0&&e.isFirst,isLast:i===t.length-1&&e.isLast})}this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer);this._filterAttributesOf=[]}getSelectionRange(){if(this.nodeToSelect){return $h._createOn(this.nodeToSelect)}return this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){if(!this._affectedStart){return null}return new $h(this._affectedStart,this._affectedEnd)}destroy(){if(this._affectedStart){this._affectedStart.detach()}if(this._affectedEnd){this._affectedEnd.detach()}}_handleNode(t,e){if(this.schema.isObject(t)){this._handleObject(t,e);return}const i=this._checkAndSplitToAllowedPosition(t,e);if(!i){this._handleDisallowedNode(t,e);return}this._insert(t);this._mergeSiblingsOf(t,e)}_handleObject(t,e){if(this._checkAndSplitToAllowedPosition(t)){this._insert(t)}else{this._tryAutoparagraphing(t,e)}}_handleDisallowedNode(t,e){if(t.is(\"element\")){this.handleNodes(t.getChildren(),e)}else{this._tryAutoparagraphing(t,e)}}_insert(t){if(!this.schema.checkChild(this.position,t)){throw new ss[\"b\"](\"insertcontent-wrong-position: Given node cannot be inserted on the given position.\",this,{node:t,position:this.position})}const e=Ig.fromPosition(this.position,\"toNext\");this._setAffectedBoundaries(this.position);this.writer.insert(t,this.position);this.position=e.toPosition();e.detach();if(this.schema.isObject(t)&&!this.schema.checkChild(this.position,\"$text\")){this.nodeToSelect=t}else{this.nodeToSelect=null}this._filterAttributesOf.push(t)}_setAffectedBoundaries(t){if(!this._affectedStart){this._affectedStart=Ig.fromPosition(t,\"toPrevious\")}if(!this._affectedEnd||this._affectedEnd.isBefore(t)){if(this._affectedEnd){this._affectedEnd.detach()}this._affectedEnd=Ig.fromPosition(t,\"toNext\")}}_mergeSiblingsOf(t,e){if(!(t instanceof Fh)){return}const i=this._canMergeLeft(t,e);const n=this._canMergeRight(t,e);const o=Ig._createBefore(t);o.stickiness=\"toNext\";const r=Ig._createAfter(t);r.stickiness=\"toNext\";if(i){const t=Ig.fromPosition(this.position);t.stickiness=\"toNext\";if(this._affectedStart.isEqual(o)){this._affectedStart.detach();this._affectedStart=Ig._createAt(o.nodeBefore,\"end\",\"toPrevious\")}this.writer.merge(o);if(o.isEqual(this._affectedEnd)&&e.isLast){this._affectedEnd.detach();this._affectedEnd=Ig._createAt(o.nodeBefore,\"end\",\"toNext\")}this.position=t.toPosition();t.detach()}if(n){if(!this.position.isEqual(r)){throw new ss[\"b\"](\"insertcontent-invalid-insertion-position\",this)}this.position=qh._createAt(r.nodeBefore,\"end\");const t=Ig.fromPosition(this.position,\"toPrevious\");if(this._affectedEnd.isEqual(r)){this._affectedEnd.detach();this._affectedEnd=Ig._createAt(r.nodeBefore,\"end\",\"toNext\")}this.writer.merge(r);if(r.getShiftedBy(-1).isEqual(this._affectedStart)&&e.isFirst){this._affectedStart.detach();this._affectedStart=Ig._createAt(r.nodeBefore,0,\"toPrevious\")}this.position=t.toPosition();t.detach()}if(i||n){this._filterAttributesOf.push(this.position.parent)}o.detach();r.detach()}_canMergeLeft(t,e){const i=t.previousSibling;return e.isFirst&&i instanceof Fh&&this.canMergeWith.has(i)&&this.model.schema.checkMerge(i,t)}_canMergeRight(t,e){const i=t.nextSibling;return e.isLast&&i instanceof Fh&&this.canMergeWith.has(i)&&this.model.schema.checkMerge(t,i)}_tryAutoparagraphing(t,e){const i=this.writer.createElement(\"paragraph\");if(this._getAllowedIn(i,this.position.parent)&&this.schema.checkChild(i,t)){i._appendChild(t);this._handleNode(i,e)}}_checkAndSplitToAllowedPosition(t){const e=this._getAllowedIn(t,this.position.parent);if(!e){return false}while(e!=this.position.parent){if(this.schema.isLimit(this.position.parent)){return false}if(this.position.isAtStart){const t=this.position.parent;this.position=this.writer.createPositionBefore(t);if(t.isEmpty&&t.parent===e){this.writer.remove(t)}}else if(this.position.isAtEnd){this.position=this.writer.createPositionAfter(this.position.parent)}else{const t=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position);this.writer.split(this.position);this.position=t;this.canMergeWith.add(this.position.nodeAfter)}}return true}_getAllowedIn(t,e){if(this.schema.checkChild(e,t)){return e}if(e.parent){return this._getAllowedIn(t,e.parent)}return null}}function Rg(t,e,i={}){if(e.isCollapsed){return}const n=e.getFirstRange();if(n.root.rootName==\"$graveyard\"){return}const o=t.schema;t.change(t=>{if(!i.doNotResetEntireContent&&Hg(o,e)){Fg(t,e,o);return}const r=n.start;const s=Ig.fromPosition(n.end,\"toNext\");if(!n.start.isTouching(n.end)){t.remove(n)}if(!i.leaveUnmerged){jg(t,r,s);o.removeDisallowedAttributes(r.parent.getChildren(),t)}Wg(t,e,r);if(!i.doNotAutoparagraph&&Dg(o,r)){Vg(t,r,e)}s.detach()})}function jg(t,e,i){const n=e.parent;const o=i.parent;if(n==o){return}if(t.model.schema.isLimit(n)||t.model.schema.isLimit(o)){return}if(!Bg(e,i,t.model.schema)){return}e=t.createPositionAfter(n);i=t.createPositionBefore(o);if(!i.isEqual(e)){t.insert(o,e)}t.merge(e);while(i.parent.isEmpty){const e=i.parent;i=t.createPositionBefore(e);t.remove(e)}jg(t,e,i)}function Dg(t,e){const i=t.checkChild(e,\"$text\");const n=t.checkChild(e,\"paragraph\");return!i&&n}function Bg(t,e,i){const n=new $h(t,e);for(const t of n.getWalker()){if(i.isLimit(t.item)){return false}}return true}function Vg(t,e,i){const n=t.createElement(\"paragraph\");t.insert(n,e);Wg(t,i,t.createPositionAt(n,0))}function Fg(t,e){const i=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(i));Vg(t,t.createPositionAt(i,0),e)}function Hg(t,e){const i=t.getLimitElement(e);if(!e.containsEntireContent(i)){return false}const n=e.getFirstRange();if(n.start.parent==n.end.parent){return false}return t.checkChild(i,\"paragraph\")}function Wg(t,e,i){if(e instanceof df){t.setSelection(i)}else{e.setTo(i)}}const Ug=' ,.?!:;\"-()';function qg(t,e,i={}){const n=t.schema;const o=i.direction!=\"backward\";const r=i.unit?i.unit:\"character\";const s=e.focus;const a=new Wh({boundaries:Jg(s,o),singleCharacters:true,direction:o?\"forward\":\"backward\"});const c={walker:a,schema:n,isForward:o,unit:r};let l;while(l=a.next()){if(l.done){return}const i=$g(c,l.value);if(i){if(e instanceof df){t.change(t=>{t.setSelectionFocus(i)})}else{e.setFocus(i)}return}}}function $g(t,e){if(e.type==\"text\"){if(t.unit===\"word\"){return Gg(t.walker,t.isForward)}return Yg(t.walker,t.unit,t.isForward)}if(e.type==(t.isForward?\"elementStart\":\"elementEnd\")){if(t.schema.isObject(e.item)){return qh._createAt(e.item,t.isForward?\"after\":\"before\")}if(t.schema.checkChild(e.nextPosition,\"$text\")){return e.nextPosition}}else{if(t.schema.isLimit(e.item)){t.walker.skip(()=>true);return}if(t.schema.checkChild(e.nextPosition,\"$text\")){return e.nextPosition}}}function Yg(t,e){const i=t.position.textNode;if(i){const n=i.data;let o=t.position.offset-i.startOffset;while(vg(n,o)||e==\"character\"&&yg(n,o)){t.next();o=t.position.offset-i.startOffset}}return t.position}function Gg(t,e){let i=t.position.textNode;if(i){let n=t.position.offset-i.startOffset;while(!Xg(i.data,n,e)&&!Qg(i,n,e)){t.next();const o=e?t.position.nodeAfter:t.position.nodeBefore;if(o&&o.is(\"text\")){const n=o.data.charAt(e?0:o.data.length-1);if(!Ug.includes(n)){t.next();i=t.position.textNode}}n=t.position.offset-i.startOffset}}return t.position}function Jg(t,e){const i=t.root;const n=qh._createAt(i,e?\"end\":0);if(e){return new $h(t,n)}else{return new $h(n,t)}}function Xg(t,e,i){const n=e+(i?0:-1);return Ug.includes(t.charAt(n))}function Qg(t,e,i){return e===(i?t.endOffset:0)}function Kg(t,e){return t.change(t=>{const i=t.createDocumentFragment();const n=e.getFirstRange();if(!n||n.isCollapsed){return i}const o=n.start.root;const r=n.start.getCommonPath(n.end);const s=o.getNodeByPath(r);let a;if(n.start.parent==n.end.parent){a=n}else{a=t.createRange(t.createPositionAt(s,n.start.path[r.length]),t.createPositionAt(s,n.end.path[r.length]+1))}const c=a.end.offset-a.start.offset;for(const e of a.getItems({shallow:true})){if(e.is(\"textProxy\")){t.appendText(e.data,e.getAttributes(),i)}else{t.append(e._clone(true),i)}}if(a!=n){const e=n._getTransformedByMove(a.start,t.createPositionAt(i,0),c)[0];const o=t.createRange(t.createPositionAt(i,0),e.start);const r=t.createRange(e.end,t.createPositionAt(i,\"end\"));Zg(r,t);Zg(o,t)}return i})}function Zg(t,e){const i=[];Array.from(t.getItems({direction:\"backward\"})).map(t=>e.createRangeOn(t)).filter(e=>{const i=(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end));return i}).forEach(t=>{i.push(t.start.parent);e.remove(t)});i.forEach(t=>{let i=t;while(i.parent&&i.isEmpty){const t=e.createRangeOn(i);i=i.parent;e.remove(t)}})}function tp(t){t.document.registerPostFixer(e=>ep(e,t))}function ep(t,e){const i=e.document.selection;const n=e.schema;const o=[];let r=false;for(const t of i.getRanges()){const e=ip(t,n);if(e){o.push(e);r=true}else{o.push(t)}}if(r){t.setSelection(ap(o),{backward:i.isBackward})}}function ip(t,e){if(t.isCollapsed){return np(t,e)}return op(t,e)}function np(t,e){const i=t.start;const n=e.getNearestSelectionRange(i);if(!n){return null}if(!n.isCollapsed){return n}const o=n.start;if(i.isEqual(o)){return null}return new $h(o)}function op(t,e){const i=t.start;const n=t.end;const o=e.checkChild(i,\"$text\");const r=e.checkChild(n,\"$text\");const s=e.getLimitElement(i);const a=e.getLimitElement(n);if(s===a){if(o&&r){return null}if(sp(i,n,e)){const t=i.nodeAfter&&e.isObject(i.nodeAfter);const o=t?null:e.getNearestSelectionRange(i,\"forward\");const r=n.nodeBefore&&e.isObject(n.nodeBefore);const s=r?null:e.getNearestSelectionRange(n,\"backward\");const a=o?o.start:i;const c=s?s.start:n;return new $h(a,c)}}const c=s&&!s.is(\"rootElement\");const l=a&&!a.is(\"rootElement\");if(c||l){const t=i.nodeAfter&&n.nodeBefore&&i.nodeAfter.parent===n.nodeBefore.parent;const o=c&&(!t||!cp(i.nodeAfter,e));const r=l&&(!t||!cp(n.nodeBefore,e));let d=i;let u=n;if(o){d=qh._createBefore(rp(s,e))}if(r){u=qh._createAfter(rp(a,e))}return new $h(d,u)}return null}function rp(t,e){let i=t;let n=i;while(e.isLimit(n)&&n.parent){i=n;n=n.parent}return i}function sp(t,e,i){const n=t.nodeAfter&&!i.isLimit(t.nodeAfter)||i.checkChild(t,\"$text\");const o=e.nodeBefore&&!i.isLimit(e.nodeBefore)||i.checkChild(e,\"$text\");return n||o}function ap(t){const e=[];e.push(t.shift());for(const i of t){const t=e.pop();if(i.isIntersecting(t)){const n=t.start.isAfter(i.start)?i.start:t.start;const o=t.end.isAfter(i.end)?t.end:i.end;const r=new $h(n,o);e.push(r)}else{e.push(t);e.push(i)}}return e}function cp(t,e){return t&&e.isObject(t)}class lp{constructor(){this.markers=new Tg;this.document=new Ag(this);this.schema=new um;this._pendingChanges=[];this._currentWriter=null;[\"insertContent\",\"deleteContent\",\"modifySelection\",\"getSelectedContent\",\"applyOperation\"].forEach(t=>this.decorate(t));this.on(\"applyOperation\",(t,e)=>{const i=e[0];i._validate()},{priority:\"highest\"});this.schema.register(\"$root\",{isLimit:true});this.schema.register(\"$block\",{allowIn:\"$root\",isBlock:true});this.schema.register(\"$text\",{allowIn:\"$block\",isInline:true});this.schema.register(\"$clipboardHolder\",{allowContentOf:\"$root\",isLimit:true});this.schema.extend(\"$text\",{allowIn:\"$clipboardHolder\"});this.schema.register(\"$marker\");this.schema.addChildCheck((t,e)=>{if(e.name===\"$marker\"){return true}});tp(this)}change(t){try{if(this._pendingChanges.length===0){this._pendingChanges.push({batch:new jm,callback:t});return this._runPendingChanges()[0]}else{return t(this._currentWriter)}}catch(t){ss[\"b\"].rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{if(typeof t===\"string\"){t=new jm(t)}else if(typeof t==\"function\"){e=t;t=new jm}this._pendingChanges.push({batch:t,callback:e});if(this._pendingChanges.length==1){this._runPendingChanges()}}catch(t){ss[\"b\"].rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,i){return Lg(this,t,e,i)}deleteContent(t,e){Rg(this,t,e)}modifySelection(t,e){qg(this,t,e)}getSelectedContent(t){return Kg(this,t)}hasContent(t,e){const i=t instanceof Fh?$h._createIn(t):t;if(i.isCollapsed){return false}for(const t of this.markers.getMarkersIntersectingRange(i)){if(t.affectsData){return true}}const{ignoreWhitespaces:n=false}=e||{};for(const t of i.getItems()){if(t.is(\"textProxy\")){if(!n){return true}else if(t.data.search(/\\S/)!==-1){return true}}else if(this.schema.isObject(t)){return true}}return false}createPositionFromPath(t,e,i){return new qh(t,e,i)}createPositionAt(t,e){return qh._createAt(t,e)}createPositionAfter(t){return qh._createAfter(t)}createPositionBefore(t){return qh._createBefore(t)}createRange(t,e){return new $h(t,e)}createRangeIn(t){return $h._createIn(t)}createRangeOn(t){return $h._createOn(t)}createSelection(t,e,i){return new Kh(t,e,i)}createBatch(t){return new jm(t)}createOperationFromJSON(t){return Sg.fromJSON(t,this.document)}destroy(){this.document.destroy();this.stopListening()}_runPendingChanges(){const t=[];this.fire(\"_beforeChanges\");while(this._pendingChanges.length){const e=this._pendingChanges[0].batch;this._currentWriter=new ag(this,e);const i=this._pendingChanges[0].callback(this._currentWriter);t.push(i);this.document._handleChangeBlock(this._currentWriter);this._pendingChanges.shift();this._currentWriter=null}this.fire(\"_afterChanges\");return t}}vs(lp,Jc);class dp{constructor(){this._listener=Object.create(Ud)}listenTo(t){this._listener.listenTo(t,\"keydown\",(t,e)=>{this._listener.fire(\"_keydown:\"+zl(e),e)})}set(t,e,i={}){const n=Rl(t);const o=i.priority;this._listener.listenTo(this._listener,\"_keydown:\"+n,(t,i)=>{e(i,()=>{i.preventDefault();i.stopPropagation();t.stop()});t.return=true},{priority:o})}press(t){return!!this._listener.fire(\"_keydown:\"+zl(t),t)}destroy(){this._listener.stopListening()}}class up extends dp{constructor(t){super();this.editor=t}set(t,e,i={}){if(typeof e==\"string\"){const t=e;e=(e,i)=>{this.editor.execute(t);i()}}super.set(t,e,i)}}class hp{constructor(t={}){this._context=t.context||new Ns({language:t.language});this._context._addEditor(this,!t.context);const e=Array.from(this.constructor.builtinPlugins||[]);this.config=new Jr(t,this.constructor.defaultConfig);this.config.define(\"plugins\",e);this.config.define(this._context._getEditorConfig());this.plugins=new xs(this,e,this._context.plugins);this.locale=this._context.locale;this.t=this.locale.t;this.commands=new cm;this.set(\"state\",\"initializing\");this.once(\"ready\",()=>this.state=\"ready\",{priority:\"high\"});this.once(\"destroy\",()=>this.state=\"destroyed\",{priority:\"high\"});this.set(\"isReadOnly\",false);this.model=new lp;const i=new Oc;this.data=new Nm(this.model,i);this.editing=new am(this.model,i);this.editing.view.document.bind(\"isReadOnly\").to(this);this.conversion=new Lm([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher);this.conversion.addAlias(\"dataDowncast\",this.data.downcastDispatcher);this.conversion.addAlias(\"editingDowncast\",this.editing.downcastDispatcher);this.keystrokes=new up(this);this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const t=this.config;const e=t.get(\"plugins\");const i=t.get(\"removePlugins\")||[];const n=t.get(\"extraPlugins\")||[];return this.plugins.init(e.concat(n),i)}destroy(){let t=Promise.resolve();if(this.state==\"initializing\"){t=new Promise(t=>this.once(\"ready\",t))}return t.then(()=>{this.fire(\"destroy\");this.stopListening();this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy();this.data.destroy();this.editing.destroy();this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(...t){try{this.commands.execute(...t)}catch(t){ss[\"b\"].rethrowUnexpectedError(t,this)}}}vs(hp,Jc);const fp={setData(t){this.data.set(t)},getData(t){return this.data.get(t)}};var mp=fp;function gp(t,e){if(t instanceof HTMLTextAreaElement){t.value=e}t.innerHTML=e}const pp={updateSourceElement(){if(!this.sourceElement){throw new ss[\"b\"](\"editor-missing-sourceelement: Cannot update the source element of a detached editor.\",this)}gp(this.sourceElement,this.data.get())}};var bp=pp;function wp(t){if(!mt(t.updateSourceElement)){throw new ss[\"b\"](\"attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.\",t)}const e=t.sourceElement;if(e&&e.tagName.toLowerCase()===\"textarea\"&&e.form){let i;const n=e.form;const o=()=>t.updateSourceElement();if(mt(n.submit)){i=n.submit;n.submit=()=>{o();i.apply(n)}}n.addEventListener(\"submit\",o);t.on(\"destroy\",()=>{n.removeEventListener(\"submit\",o);if(i){n.submit=i}})}}class _p{getHtml(t){const e=document.implementation.createHTMLDocument(\"\");const i=e.createElement(\"div\");i.appendChild(t);return i.innerHTML}}class kp{constructor(t){this._domParser=new DOMParser;this._domConverter=new jd(t,{blockFillerMode:\"nbsp\"});this._htmlWriter=new _p}toData(t){const e=this._domConverter.viewToDom(t,document);return this._htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this._domConverter.domToView(e)}_toDom(t){const e=this._domParser.parseFromString(t,\"text/html\");const i=e.createDocumentFragment();const n=e.body.childNodes;while(n.length>0){i.appendChild(n[0])}return i}}class vp{constructor(t){this.editor=t;this._components=new Map}*names(){for(const t of this._components.values()){yield t.originalName}}add(t,e){if(this.has(t)){throw new ss[\"b\"](\"componentfactory-item-exists: The item already exists in the component factory.\",this,{name:t})}this._components.set(yp(t),{callback:e,originalName:t})}create(t){if(!this.has(t)){throw new ss[\"b\"](\"componentfactory-item-missing: The required component is not registered in the factory.\",this,{name:t})}return this._components.get(yp(t)).callback(this.editor.locale)}has(t){return this._components.has(yp(t))}}function yp(t){return String(t).toLowerCase()}class xp{constructor(){this.set(\"isFocused\",false);this.set(\"focusedElement\",null);this._elements=new Set;this._nextEventLoopTimeout=null}add(t){if(this._elements.has(t)){throw new ss[\"b\"](\"focusTracker-add-element-already-exist\",this)}this.listenTo(t,\"focus\",()=>this._focus(t),{useCapture:true});this.listenTo(t,\"blur\",()=>this._blur(),{useCapture:true});this._elements.add(t)}remove(t){if(t===this.focusedElement){this._blur(t)}if(this._elements.has(t)){this.stopListening(t);this._elements.delete(t)}}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout);this.focusedElement=t;this.isFocused=true}_blur(){clearTimeout(this._nextEventLoopTimeout);this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null;this.isFocused=false},0)}}vs(xp,Ud);vs(xp,Jc);class Ap{constructor(t){this.editor=t;this.componentFactory=new vp(t);this.focusTracker=new xp;this._editableElementsMap=new Map;this.listenTo(t.editing.view.document,\"layoutChanged\",()=>this.update())}get element(){return null}update(){this.fire(\"update\")}destroy(){this.stopListening();this.focusTracker.destroy();for(const t of this._editableElementsMap.values()){t.ckeditorInstance=null}this._editableElementsMap=new Map}setEditableElement(t,e){this._editableElementsMap.set(t,e);if(!e.ckeditorInstance){e.ckeditorInstance=this.editor}}getEditableElement(t=\"main\"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){console.warn(\"editor-ui-deprecated-editable-elements: \"+\"The EditorUI#_editableElements property has been deprecated and will be removed in the near future.\",{editorUI:this});return this._editableElementsMap}}vs(Ap,ds);function Cp({origin:t,originKeystrokeHandler:e,originFocusTracker:i,toolbar:n,beforeFocus:o,afterBlur:r}){i.add(n.element);e.set(\"Alt+F10\",(t,e)=>{if(i.isFocused&&!n.focusTracker.isFocused){if(o){o()}n.focus();e()}});n.keystrokes.set(\"Esc\",(e,i)=>{if(n.focusTracker.isFocused){t.focus();if(r){r()}i()}})}function Tp(t){if(Array.isArray(t)){return{items:t}}if(!t){return{items:[]}}return Object.assign({items:[]},t)}var Ep=i(17);const Mp=new WeakMap;function Pp(t){const{view:e,element:i,text:n,isDirectHost:o=true}=t;const r=e.document;if(!Mp.has(r)){Mp.set(r,new Map);r.registerPostFixer(t=>Lp(r,t))}Mp.get(r).set(i,{text:n,isDirectHost:o});e.change(t=>Lp(r,t))}function Sp(t,e){const i=e.document;t.change(t=>{if(!Mp.has(i)){return}const n=Mp.get(i);const o=n.get(e);t.removeAttribute(\"data-placeholder\",o.hostElement);Np(t,o.hostElement);n.delete(e)})}function Ip(t,e){if(!e.hasClass(\"ck-placeholder\")){t.addClass(\"ck-placeholder\",e);return true}return false}function Np(t,e){if(e.hasClass(\"ck-placeholder\")){t.removeClass(\"ck-placeholder\",e);return true}return false}function Op(t){if(!t.isAttached()){return false}const e=!Array.from(t.getChildren()).some(t=>!t.is(\"uiElement\"));const i=t.document;if(!i.isFocused&&e){return true}const n=i.selection;const o=n.anchor;if(e&&o&&o.parent!==t){return true}return false}function Lp(t,e){const i=Mp.get(t);let n=false;for(const[t,o]of i){if(zp(e,t,o)){n=true}}return n}function zp(t,e,i){const{text:n,isDirectHost:o}=i;const r=o?e:Rp(e);let s=false;if(!r){return false}i.hostElement=r;if(r.getAttribute(\"data-placeholder\")!==n){t.setAttribute(\"data-placeholder\",n,r);s=true}if(Op(r)){if(Ip(t,r)){s=true}}else if(Np(t,r)){s=true}return s}function Rp(t){if(t.childCount===1){const e=t.getChild(0);if(e.is(\"element\")&&!e.is(\"uiElement\")){return e}}return null}class jp{constructor(){this._replacedElements=[]}replace(t,e){this._replacedElements.push({element:t,newElement:e});t.style.display=\"none\";if(e){t.parentNode.insertBefore(e,t.nextSibling)}}restore(){this._replacedElements.forEach(({element:t,newElement:e})=>{t.style.display=\"\";if(e){e.remove()}});this._replacedElements=[]}}class Dp extends Ap{constructor(t,e){super(t);this.view=e;this._toolbarConfig=Tp(t.config.get(\"toolbar\"));this._elementReplacer=new jp}get element(){return this.view.element}init(t){const e=this.editor;const i=this.view;const n=e.editing.view;const o=i.editable;const r=n.document.getRoot();o.name=r.rootName;i.render();const s=o.element;this.setEditableElement(o.name,s);this.focusTracker.add(s);i.editable.bind(\"isFocused\").to(this.focusTracker);n.attachDomRoot(s);if(t){this._elementReplacer.replace(t,this.element)}this._initPlaceholder();this._initToolbar();this.fire(\"ready\")}destroy(){const t=this.view;const e=this.editor.editing.view;this._elementReplacer.restore();e.detachDomRoot(t.editable.name);t.destroy();super.destroy()}_initToolbar(){const t=this.editor;const e=this.view;const i=t.editing.view;e.stickyPanel.bind(\"isActive\").to(this.focusTracker,\"isFocused\");e.stickyPanel.limiterElement=e.element;if(this._toolbarConfig.viewportTopOffset){e.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset}e.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory);Cp({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:e.toolbar})}_initPlaceholder(){const t=this.editor;const e=t.editing.view;const i=e.document.getRoot();const n=t.sourceElement;const o=t.config.get(\"placeholder\")||n&&n.tagName.toLowerCase()===\"textarea\"&&n.getAttribute(\"placeholder\");if(o){Pp({view:e,element:i,text:o,isDirectHost:false})}}}class Bp extends ys{constructor(t){super({idProperty:\"viewUid\"});this.on(\"add\",(t,e,i)=>{if(!e.isRendered){e.render()}if(e.element&&this._parentElement){this._parentElement.insertBefore(e.element,this._parentElement.children[i])}});this.on(\"remove\",(t,e)=>{if(e.element&&this._parentElement){e.element.remove()}});this.locale=t;this._parentElement=null}destroy(){this.map(t=>t.destroy())}setParent(t){this._parentElement=t}delegate(...t){if(!t.length||!Vp(t)){throw new ss[\"b\"](\"ui-viewcollection-delegate-wrong-events: All event names must be strings.\",this)}return{to:e=>{for(const i of this){for(const n of t){i.delegate(n).to(e)}}this.on(\"add\",(i,n)=>{for(const i of t){n.delegate(i).to(e)}});this.on(\"remove\",(i,n)=>{for(const i of t){n.stopDelegating(i,e)}})}}}}function Vp(t){return t.every(t=>typeof t==\"string\")}const Fp=\"http://www.w3.org/1999/xhtml\";class Hp{constructor(t){Object.assign(this,Zp(Kp(t)));this._isRendered=false;this._revertData=null}render(){const t=this._renderNode({intoFragment:true});this._isRendered=true;return t}apply(t){this._revertData=hb();this._renderNode({node:t,isApplying:true,revertData:this._revertData});return t}revert(t){if(!this._revertData){throw new ss[\"b\"](\"ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.\",[this,t])}this._revertTemplateFromNode(t,this._revertData)}*getViews(){function*t(e){if(e.children){for(const i of e.children){if(lb(i)){yield i}else if(db(i)){yield*t(i)}}}}yield*t(this)}static bind(t,e){return{to(i,n){return new Up({eventNameOrFunction:i,attribute:i,observable:t,emitter:e,callback:n})},if(i,n,o){return new qp({observable:t,emitter:e,attribute:i,valueIfTrue:n,callback:o})}}}static extend(t,e){if(t._isRendered){throw new ss[\"b\"](\"template-extend-render: Attempting to extend a template which has already been rendered.\",[this,t])}ab(t,Zp(Kp(e)))}_renderNode(t){let e;if(t.node){e=this.tag&&this.text}else{e=this.tag?this.text:!this.text}if(e){throw new ss[\"b\"]('ui-template-wrong-syntax: Node definition must have either \"tag\" or \"text\" when rendering a new Node.',this)}if(this.text){return this._renderText(t)}else{return this._renderElement(t)}}_renderElement(t){let e=t.node;if(!e){e=t.node=document.createElementNS(this.ns||Fp,this.tag)}this._renderAttributes(t);this._renderElementChildren(t);this._setUpListeners(t);return e}_renderText(t){let e=t.node;if(e){t.revertData.text=e.textContent}else{e=t.node=document.createTextNode(\"\")}if($p(this.text)){this._bindToObservable({schema:this.text,updater:Jp(e),data:t})}else{e.textContent=this.text.join(\"\")}return e}_renderAttributes(t){let e,i,n,o;if(!this.attributes){return}const r=t.node;const s=t.revertData;for(e in this.attributes){n=r.getAttribute(e);i=this.attributes[e];if(s){s.attributes[e]=n}o=ct(i[0])&&i[0].ns?i[0].ns:null;if($p(i)){const a=o?i[0].value:i;if(s&&fb(e)){a.unshift(n)}this._bindToObservable({schema:a,updater:Xp(r,e,o),data:t})}else if(e==\"style\"&&typeof i[0]!==\"string\"){this._renderStyleAttribute(i[0],t)}else{if(s&&n&&fb(e)){i.unshift(n)}i=i.map(t=>t?t.value||t:t).reduce((t,e)=>t.concat(e),[]).reduce(rb,\"\");if(!cb(i)){r.setAttributeNS(o,e,i)}}}}_renderStyleAttribute(t,e){const i=e.node;for(const n in t){const o=t[n];if($p(o)){this._bindToObservable({schema:[o],updater:Qp(i,n),data:e})}else{i.style[n]=o}}}_renderElementChildren(t){const e=t.node;const i=t.intoFragment?document.createDocumentFragment():e;const n=t.isApplying;let o=0;for(const r of this.children){if(ub(r)){if(!n){r.setParent(e);for(const t of r){i.appendChild(t.element)}}}else if(lb(r)){if(!n){if(!r.isRendered){r.render()}i.appendChild(r.element)}}else if(xd(r)){i.appendChild(r)}else{if(n){const e=t.revertData;const n=hb();e.children.push(n);r._renderNode({node:i.childNodes[o++],isApplying:true,revertData:n})}else{i.appendChild(r.render())}}}if(t.intoFragment){e.appendChild(i)}}_setUpListeners(t){if(!this.eventListeners){return}for(const e in this.eventListeners){const i=this.eventListeners[e].map(i=>{const[n,o]=e.split(\"@\");return i.activateDomEventListener(n,o,t)});if(t.revertData){t.revertData.bindings.push(i)}}}_bindToObservable({schema:t,updater:e,data:i}){const n=i.revertData;Gp(t,e,i);const o=t.filter(t=>!cb(t)).filter(t=>t.observable).map(n=>n.activateAttributeListener(t,e,i));if(n){n.bindings.push(o)}}_revertTemplateFromNode(t,e){for(const t of e.bindings){for(const e of t){e()}}if(e.text){t.textContent=e.text;return}for(const i in e.attributes){const n=e.attributes[i];if(n===null){t.removeAttribute(i)}else{t.setAttribute(i,n)}}for(let i=0;i<e.children.length;++i){this._revertTemplateFromNode(t.childNodes[i],e.children[i])}}}vs(Hp,ds);class Wp{constructor(t){Object.assign(this,t)}getValue(t){const e=this.observable[this.attribute];return this.callback?this.callback(e,t):e}activateAttributeListener(t,e,i){const n=()=>Gp(t,e,i);this.emitter.listenTo(this.observable,\"change:\"+this.attribute,n);return()=>{this.emitter.stopListening(this.observable,\"change:\"+this.attribute,n)}}}class Up extends Wp{activateDomEventListener(t,e,i){const n=(t,i)=>{if(!e||i.target.matches(e)){if(typeof this.eventNameOrFunction==\"function\"){this.eventNameOrFunction(i)}else{this.observable.fire(this.eventNameOrFunction,i)}}};this.emitter.listenTo(i.node,t,n);return()=>{this.emitter.stopListening(i.node,t,n)}}}class qp extends Wp{getValue(t){const e=super.getValue(t);return cb(e)?false:this.valueIfTrue||true}}function $p(t){if(!t){return false}if(t.value){t=t.value}if(Array.isArray(t)){return t.some($p)}else if(t instanceof Wp){return true}return false}function Yp(t,e){return t.map(t=>{if(t instanceof Wp){return t.getValue(e)}return t})}function Gp(t,e,{node:i}){let n=Yp(t,i);if(t.length==1&&t[0]instanceof qp){n=n[0]}else{n=n.reduce(rb,\"\")}if(cb(n)){e.remove()}else{e.set(n)}}function Jp(t){return{set(e){t.textContent=e},remove(){t.textContent=\"\"}}}function Xp(t,e,i){return{set(n){t.setAttributeNS(i,e,n)},remove(){t.removeAttributeNS(i,e)}}}function Qp(t,e){return{set(i){t.style[e]=i},remove(){t.style[e]=null}}}function Kp(t){const e=$r(t,t=>{if(t&&(t instanceof Wp||db(t)||lb(t)||ub(t))){return t}});return e}function Zp(t){if(typeof t==\"string\"){t=ib(t)}else if(t.text){nb(t)}if(t.on){t.eventListeners=eb(t.on);delete t.on}if(!t.text){if(t.attributes){tb(t.attributes)}const e=[];if(t.children){if(ub(t.children)){e.push(t.children)}else{for(const i of t.children){if(db(i)||lb(i)||xd(i)){e.push(i)}else{e.push(new Hp(i))}}}}t.children=e}return t}function tb(t){for(const e in t){if(t[e].value){t[e].value=[].concat(t[e].value)}ob(t,e)}}function eb(t){for(const e in t){ob(t,e)}return t}function ib(t){return{text:[t]}}function nb(t){if(!Array.isArray(t.text)){t.text=[t.text]}}function ob(t,e){if(!Array.isArray(t[e])){t[e]=[t[e]]}}function rb(t,e){if(cb(e)){return t}else if(cb(t)){return e}else{return`${t} ${e}`}}function sb(t,e){for(const i in e){if(t[i]){t[i].push(...e[i])}else{t[i]=e[i]}}}function ab(t,e){if(e.attributes){if(!t.attributes){t.attributes={}}sb(t.attributes,e.attributes)}if(e.eventListeners){if(!t.eventListeners){t.eventListeners={}}sb(t.eventListeners,e.eventListeners)}if(e.text){t.text.push(...e.text)}if(e.children&&e.children.length){if(t.children.length!=e.children.length){throw new ss[\"b\"](\"ui-template-extend-children-mismatch: The number of children in extended definition does not match.\",t)}let i=0;for(const n of e.children){ab(t.children[i++],n)}}}function cb(t){return!t&&t!==0}function lb(t){return t instanceof gb}function db(t){return t instanceof Hp}function ub(t){return t instanceof Bp}function hb(){return{children:[],bindings:[],attributes:{}}}function fb(t){return t==\"class\"||t==\"style\"}var mb=i(19);class gb{constructor(t){this.element=null;this.isRendered=false;this.locale=t;this.t=t&&t.t;this._viewCollections=new ys;this._unboundChildren=this.createCollection();this._viewCollections.on(\"add\",(e,i)=>{i.locale=t});this.decorate(\"render\")}get bindTemplate(){if(this._bindTemplate){return this._bindTemplate}return this._bindTemplate=Hp.bind(this,this)}createCollection(){const t=new Bp;this._viewCollections.add(t);return t}registerChild(t){if(!Fs(t)){t=[t]}for(const e of t){this._unboundChildren.add(e)}}deregisterChild(t){if(!Fs(t)){t=[t]}for(const e of t){this._unboundChildren.remove(e)}}setTemplate(t){this.template=new Hp(t)}extendTemplate(t){Hp.extend(this.template,t)}render(){if(this.isRendered){throw new ss[\"b\"](\"ui-view-render-already-rendered: This View has already been rendered.\",this)}if(this.template){this.element=this.template.render();this.registerChild(this.template.getViews())}this.isRendered=true}destroy(){this.stopListening();this._viewCollections.map(t=>t.destroy());if(this.template&&this.template._revertData){this.template.revert(this.element)}}}vs(gb,Ud);vs(gb,Jc);var pb=\"[object String]\";function bb(t){return typeof t==\"string\"||!Je(t)&&T(t)&&k(t)==pb}var wb=bb;function _b(t,e,i={},n=[]){const o=i&&i.xmlns;const r=o?t.createElementNS(o,e):t.createElement(e);for(const t in i){r.setAttribute(t,i[t])}if(wb(n)||!Fs(n)){n=[n]}for(let e of n){if(wb(e)){e=t.createTextNode(e)}r.appendChild(e)}return r}class kb extends Bp{attachToDom(){this._bodyCollectionContainer=new Hp({tag:\"div\",attributes:{class:[\"ck\",\"ck-reset_all\",\"ck-body\",\"ck-rounded-corners\"],dir:this.locale.uiLanguageDirection},children:this}).render();let t=document.querySelector(\".ck-body-wrapper\");if(!t){t=_b(document,\"div\",{class:\"ck-body-wrapper\"});document.body.appendChild(t)}t.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy();if(this._bodyCollectionContainer){this._bodyCollectionContainer.remove()}const t=document.querySelector(\".ck-body-wrapper\");if(t&&t.childElementCount==0){t.remove()}}}var vb=i(21);class yb extends gb{constructor(t){super(t);this.body=new kb(t)}render(){super.render();this.body.attachToDom()}destroy(){this.body.detachFromDom();return super.destroy()}}var xb=i(23);class Ab extends gb{constructor(t){super(t);this.set(\"text\");this.set(\"for\");this.id=`ck-editor__label_${is()}`;const e=this.bindTemplate;this.setTemplate({tag:\"label\",attributes:{class:[\"ck\",\"ck-label\"],id:this.id,for:e.to(\"for\")},children:[{text:e.to(\"text\")}]})}}class Cb extends yb{constructor(t){super(t);this.top=this.createCollection();this.main=this.createCollection();this._voiceLabelView=this._createVoiceLabel();this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-reset\",\"ck-editor\",\"ck-rounded-corners\"],role:\"application\",dir:t.uiLanguageDirection,lang:t.uiLanguage,\"aria-labelledby\":this._voiceLabelView.id},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(){const t=this.t;const e=new Ab;e.text=t(\"ku\");e.extendTemplate({attributes:{class:\"ck-voice-label\"}});return e}}class Tb extends gb{constructor(t,e,i){super(t);this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-content\",\"ck-editor__editable\",\"ck-rounded-corners\"],lang:t.contentLanguage,dir:t.contentLanguageDirection}});this.name=null;this.set(\"isFocused\",false);this._editableElement=i;this._hasExternalElement=!!this._editableElement;this._editingView=e}render(){super.render();if(this._hasExternalElement){this.template.apply(this.element=this._editableElement)}else{this._editableElement=this.element}this.on(\"change:isFocused\",()=>this._updateIsFocusedClasses());this._updateIsFocusedClasses()}destroy(){if(this._hasExternalElement){this.template.revert(this._editableElement)}super.destroy()}_updateIsFocusedClasses(){const t=this._editingView;if(t.isRenderingInProgress){i(this)}else{e(this)}function e(e){t.change(i=>{const n=t.document.getRoot(e.name);i.addClass(e.isFocused?\"ck-focused\":\"ck-blurred\",n);i.removeClass(e.isFocused?\"ck-blurred\":\"ck-focused\",n)})}function i(n){t.once(\"change:isRenderingInProgress\",(t,o,r)=>{if(!r){e(n)}else{i(n)}})}}}class Eb extends Tb{constructor(t,e,i){super(t,e,i);this.extendTemplate({attributes:{role:\"textbox\",class:\"ck-editor__editable_inline\"}})}render(){super.render();const t=this._editingView;const e=this.t;t.change(i=>{const n=t.document.getRoot(this.name);i.setAttribute(\"aria-label\",e(\"nk\",[this.name]),n)})}}function Mb(t){return e=>e+t}var Pb=i(25);const Sb=Mb(\"px\");class Ib extends gb{constructor(t){super(t);const e=this.bindTemplate;this.set(\"isActive\",false);this.set(\"isSticky\",false);this.set(\"limiterElement\",null);this.set(\"limiterBottomOffset\",50);this.set(\"viewportTopOffset\",0);this.set(\"_marginLeft\",null);this.set(\"_isStickyToTheLimiter\",false);this.set(\"_hasViewportTopOffset\",false);this.content=this.createCollection();this._contentPanelPlaceholder=new Hp({tag:\"div\",attributes:{class:[\"ck\",\"ck-sticky-panel__placeholder\"],style:{display:e.to(\"isSticky\",t=>t?\"block\":\"none\"),height:e.to(\"isSticky\",t=>t?Sb(this._panelRect.height):null)}}}).render();this._contentPanel=new Hp({tag:\"div\",attributes:{class:[\"ck\",\"ck-sticky-panel__content\",e.if(\"isSticky\",\"ck-sticky-panel__content_sticky\"),e.if(\"_isStickyToTheLimiter\",\"ck-sticky-panel__content_sticky_bottom-limit\")],style:{width:e.to(\"isSticky\",t=>t?Sb(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:e.to(\"_hasViewportTopOffset\",t=>t?Sb(this.viewportTopOffset):null),bottom:e.to(\"_isStickyToTheLimiter\",t=>t?Sb(this.limiterBottomOffset):null),marginLeft:e.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(Nd.window,\"scroll\",()=>{this._checkIfShouldBeSticky()});this.listenTo(this,\"change:isActive\",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const t=this._panelRect=this._contentPanel.getBoundingClientRect();let e;if(!this.limiterElement){this.isSticky=false}else{e=this._limiterRect=this.limiterElement.getBoundingClientRect();this.isSticky=this.isActive&&e.top<this.viewportTopOffset&&this._panelRect.height+this.limiterBottomOffset<e.height}if(this.isSticky){this._isStickyToTheLimiter=e.bottom<t.height+this.limiterBottomOffset+this.viewportTopOffset;this._hasViewportTopOffset=!this._isStickyToTheLimiter&&!!this.viewportTopOffset;this._marginLeft=this._isStickyToTheLimiter?null:Sb(-Nd.window.scrollX)}else{this._isStickyToTheLimiter=false;this._hasViewportTopOffset=false;this._marginLeft=null}}}class Nb{constructor(t){Object.assign(this,t);if(t.actions&&t.keystrokeHandler){for(const e in t.actions){let i=t.actions[e];if(typeof i==\"string\"){i=[i]}for(const n of i){t.keystrokeHandler.set(n,(t,i)=>{this[e]();i()})}}}}get first(){return this.focusables.find(Ob)||null}get last(){return this.focusables.filter(Ob).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;if(this.focusTracker.focusedElement===null){return null}this.focusables.find((e,i)=>{const n=e.element===this.focusTracker.focusedElement;if(n){t=i}return n});return t}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){if(t){t.focus()}}_getFocusableItem(t){const e=this.current;const i=this.focusables.length;if(!i){return null}if(e===null){return this[t===1?\"first\":\"last\"]}let n=(e+i+t)%i;do{const e=this.focusables.get(n);if(Ob(e)){return e}n=(n+i+t)%i}while(n!==e);return null}}function Ob(t){return!!(t.focus&&Nd.window.getComputedStyle(t.element).display!=\"none\")}class Lb extends gb{constructor(t){super(t);this.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-toolbar__separator\"]}})}}const zb=100;class Rb{constructor(t,e){if(!Rb._observerInstance){Rb._createObserver()}this._element=t;this._callback=e;Rb._addElementCallback(t,e);Rb._observerInstance.observe(t)}destroy(){Rb._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,e){if(!Rb._elementCallbacks){Rb._elementCallbacks=new Map}let i=Rb._elementCallbacks.get(t);if(!i){i=new Set;Rb._elementCallbacks.set(t,i)}i.add(e)}static _deleteElementCallback(t,e){const i=Rb._getElementCallbacks(t);if(i){i.delete(e);if(!i.size){Rb._elementCallbacks.delete(t);Rb._observerInstance.unobserve(t)}}if(Rb._elementCallbacks&&!Rb._elementCallbacks.size){Rb._observerInstance=null;Rb._elementCallbacks=null}}static _getElementCallbacks(t){if(!Rb._elementCallbacks){return null}return Rb._elementCallbacks.get(t)}static _createObserver(){let t;if(typeof Nd.window.ResizeObserver===\"function\"){t=Nd.window.ResizeObserver}else{t=jb}Rb._observerInstance=new t(t=>{for(const e of t){const t=Rb._getElementCallbacks(e.target);if(t){for(const i of t){i(e)}}}})}}Rb._observerInstance=null;Rb._elementCallbacks=null;class jb{constructor(t){this._callback=t;this._elements=new Set;this._previousRects=new Map;this._periodicCheckTimeout=null}observe(t){this._elements.add(t);this._checkElementRectsAndExecuteCallback();if(this._elements.size===1){this._startPeriodicCheck()}}unobserve(t){this._elements.delete(t);this._previousRects.delete(t);if(!this._elements.size){this._stopPeriodicCheck()}}_startPeriodicCheck(){const t=()=>{this._checkElementRectsAndExecuteCallback();this._periodicCheckTimeout=setTimeout(t,zb)};this.listenTo(Nd.window,\"resize\",()=>{this._checkElementRectsAndExecuteCallback()});this._periodicCheckTimeout=setTimeout(t,zb)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout);this.stopListening();this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const t=[];for(const e of this._elements){if(this._hasRectChanged(e)){t.push({target:e,contentRect:this._previousRects.get(e)})}}if(t.length){this._callback(t)}}_hasRectChanged(t){if(!t.ownerDocument.body.contains(t)){return false}const e=new vh(t);const i=this._previousRects.get(t);const n=!i||!i.isEqual(e);this._previousRects.set(t,e);return n}}vs(jb,Ud);function Db(t){return t.bindTemplate.to(e=>{if(e.target===t.element){e.preventDefault()}})}class Bb extends gb{constructor(t){super(t);const e=this.bindTemplate;this.set(\"isVisible\",false);this.set(\"position\",\"se\");this.children=this.createCollection();this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-reset\",\"ck-dropdown__panel\",e.to(\"position\",t=>`ck-dropdown__panel_${t}`),e.if(\"isVisible\",\"ck-dropdown__panel-visible\")]},children:this.children,on:{selectstart:e.to(t=>t.preventDefault())}})}focus(){if(this.children.length){this.children.first.focus()}}focusLast(){if(this.children.length){const t=this.children.last;if(typeof t.focusLast===\"function\"){t.focusLast()}else{t.focus()}}}}var Vb=i(27);function Fb(t){while(t&&t.tagName.toLowerCase()!=\"html\"){if(Nd.window.getComputedStyle(t).position!=\"static\"){return t}t=t.parentElement}return null}function Hb({element:t,target:e,positions:i,limiter:n,fitInViewport:o}){if(mt(e)){e=e()}if(mt(n)){n=n()}const r=Fb(t.parentElement);const s=new vh(t);const a=new vh(e);let c;let l;if(!n&&!o){[l,c]=Wb(i[0],a,s)}else{const t=n&&new vh(n).getVisible();const e=o&&new vh(Nd.window);[l,c]=Ub(i,a,s,t,e)||Wb(i[0],a,s)}let{left:d,top:u}=qb(c);if(r){const t=qb(new vh(r));const e=_h(r);d-=t.left;u-=t.top;d+=r.scrollLeft;u+=r.scrollTop;d-=e.left;u-=e.top}return{left:d,top:u,name:l}}function Wb(t,e,i){const{left:n,top:o,name:r}=t(e,i);return[r,i.clone().moveTo(n,o)]}function Ub(t,e,i,n,o){let r=0;let s=0;let a;let c;const l=i.getArea();t.some(t=>{const[d,u]=Wb(t,e,i);let h;let f;if(n){if(o){const t=n.getIntersection(o);if(t){h=t.getIntersectionArea(u)}else{h=0}}else{h=n.getIntersectionArea(u)}}if(o){f=o.getIntersectionArea(u)}if(o&&!n){if(f>s){m()}}else if(!o&&n){if(h>r){m()}}else{if(f>s&&h>=r){m()}else if(f>=s&&h>r){m()}}function m(){s=f;r=h;a=u;c=d}return h===l});return a?[c,a]:null}function qb({left:t,top:e}){const{scrollX:i,scrollY:n}=Nd.window;return{left:t+i,top:e+n}}class $b extends gb{constructor(t,e,i){super(t);const n=this.bindTemplate;this.buttonView=e;this.panelView=i;this.set(\"isOpen\",false);this.set(\"isEnabled\",true);this.set(\"class\");this.set(\"id\");this.set(\"panelPosition\",\"auto\");this.focusTracker=new xp;this.keystrokes=new dp;this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-dropdown\",n.to(\"class\"),n.if(\"isEnabled\",\"ck-disabled\",t=>!t)],id:n.to(\"id\"),\"aria-describedby\":n.to(\"ariaDescribedById\")},children:[e,i]});e.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.on(\"change:isOpen\",()=>{if(!this.isOpen){return}if(this.panelPosition===\"auto\"){this.panelView.position=$b._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:true,positions:this._panelPositions}).name}else{this.panelView.position=this.panelPosition}});this.keystrokes.listenTo(this.element);this.focusTracker.add(this.element);const t=(t,e)=>{if(this.isOpen){this.buttonView.focus();this.isOpen=false;e()}};this.keystrokes.set(\"arrowdown\",(t,e)=>{if(this.buttonView.isEnabled&&!this.isOpen){this.isOpen=true;e()}});this.keystrokes.set(\"arrowright\",(t,e)=>{if(this.isOpen){e()}});this.keystrokes.set(\"arrowleft\",t);this.keystrokes.set(\"esc\",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:t,southWest:e,northEast:i,northWest:n}=$b.defaultPanelPositions;if(this.locale.uiLanguageDirection===\"ltr\"){return[t,e,i,n]}else{return[e,t,n,i]}}}$b.defaultPanelPositions={southEast:t=>({top:t.bottom,left:t.left,name:\"se\"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:\"sw\"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:\"ne\"}),northWest:(t,e)=>({top:t.bottom-e.height,left:t.left-e.width+t.width,name:\"nw\"})};$b._getOptimalPosition=Hb;var Yb=i(29);class Gb extends gb{constructor(){super();const t=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:t.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 t=(new DOMParser).parseFromString(this.content.trim(),\"image/svg+xml\");const e=t.querySelector(\"svg\");const i=e.getAttribute(\"viewBox\");if(i){this.viewBox=i}this.element.innerHTML=\"\";while(e.childNodes.length>0){this.element.appendChild(e.childNodes[0])}}}_colorFillPaths(){if(this.fillColor){this.element.querySelectorAll(\".ck-icon__fill\").forEach(t=>{t.style.fill=this.fillColor})}}}var Jb=i(31);class Xb extends gb{constructor(t){super(t);this.set(\"text\",\"\");this.set(\"position\",\"s\");const e=this.bindTemplate;this.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-tooltip\",e.to(\"position\",t=>\"ck-tooltip_\"+t),e.if(\"text\",\"ck-hidden\",t=>!t.trim())]},children:[{tag:\"span\",attributes:{class:[\"ck\",\"ck-tooltip__text\"]},children:[{text:e.to(\"text\")}]}]})}}var Qb=i(33);class Kb extends gb{constructor(t){super(t);const e=this.bindTemplate;const i=is();this.set(\"class\");this.set(\"labelStyle\");this.set(\"icon\");this.set(\"isEnabled\",true);this.set(\"isOn\",false);this.set(\"isVisible\",true);this.set(\"isToggleable\",false);this.set(\"keystroke\");this.set(\"label\");this.set(\"tabindex\",-1);this.set(\"tooltip\");this.set(\"tooltipPosition\",\"s\");this.set(\"type\",\"button\");this.set(\"withText\",false);this.set(\"withKeystroke\",false);this.children=this.createCollection();this.tooltipView=this._createTooltipView();this.labelView=this._createLabelView(i);this.iconView=new Gb;this.iconView.extendTemplate({attributes:{class:\"ck-button__icon\"}});this.keystrokeView=this._createKeystrokeView();this.bind(\"_tooltipString\").to(this,\"tooltip\",this,\"label\",this,\"keystroke\",this._getTooltipString.bind(this));this.setTemplate({tag:\"button\",attributes:{class:[\"ck\",\"ck-button\",e.to(\"class\"),e.if(\"isEnabled\",\"ck-disabled\",t=>!t),e.if(\"isVisible\",\"ck-hidden\",t=>!t),e.to(\"isOn\",t=>t?\"ck-on\":\"ck-off\"),e.if(\"withText\",\"ck-button_with-text\"),e.if(\"withKeystroke\",\"ck-button_with-keystroke\")],type:e.to(\"type\",t=>t?t:\"button\"),tabindex:e.to(\"tabindex\"),\"aria-labelledby\":`ck-editor__aria-label_${i}`,\"aria-disabled\":e.if(\"isEnabled\",true,t=>!t),\"aria-pressed\":e.to(\"isOn\",t=>this.isToggleable?String(t):false)},children:this.children,on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(t=>{if(this.isEnabled){this.fire(\"execute\")}else{t.preventDefault()}})}})}render(){super.render();if(this.icon){this.iconView.bind(\"content\").to(this,\"icon\");this.children.add(this.iconView)}this.children.add(this.tooltipView);this.children.add(this.labelView);if(this.withKeystroke){this.children.add(this.keystrokeView)}}focus(){this.element.focus()}_createTooltipView(){const t=new Xb;t.bind(\"text\").to(this,\"_tooltipString\");t.bind(\"position\").to(this,\"tooltipPosition\");return t}_createLabelView(t){const e=new gb;const i=this.bindTemplate;e.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-button__label\"],style:i.to(\"labelStyle\"),id:`ck-editor__aria-label_${t}`},children:[{text:this.bindTemplate.to(\"label\")}]});return e}_createKeystrokeView(){const t=new gb;t.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-button__keystroke\"]},children:[{text:this.bindTemplate.to(\"keystroke\",t=>jl(t))}]});return t}_getTooltipString(t,e,i){if(t){if(typeof t==\"string\"){return t}else{if(i){i=jl(i)}if(t instanceof Function){return t(e,i)}else{return`${e}${i?` (${i})`:\"\"}`}}}return\"\"}}var Zb='<svg 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\"/></svg>';class tw extends Kb{constructor(t){super(t);this.arrowView=this._createArrowView();this.extendTemplate({attributes:{\"aria-haspopup\":true}});this.delegate(\"execute\").to(this,\"open\")}render(){super.render();this.children.add(this.arrowView)}_createArrowView(){const t=new Gb;t.content=Zb;t.extendTemplate({attributes:{class:\"ck-dropdown__arrow\"}});return t}}var ew=i(35);class iw extends gb{constructor(){super();this.items=this.createCollection();this.focusTracker=new xp;this.keystrokes=new dp;this._focusCycler=new Nb({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 t of this.items){this.focusTracker.add(t.element)}this.items.on(\"add\",(t,e)=>{this.focusTracker.add(e.element)});this.items.on(\"remove\",(t,e)=>{this.focusTracker.remove(e.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class nw extends gb{constructor(t){super(t);this.children=this.createCollection();this.setTemplate({tag:\"li\",attributes:{class:[\"ck\",\"ck-list__item\"]},children:this.children})}focus(){this.children.first.focus()}}class ow extends gb{constructor(t){super(t);this.setTemplate({tag:\"li\",attributes:{class:[\"ck\",\"ck-list__separator\"]}})}}var rw=i(37);class sw extends Kb{constructor(t){super(t);this.isToggleable=true;this.toggleSwitchView=this._createToggleView();this.extendTemplate({attributes:{class:\"ck-switchbutton\"}})}render(){super.render();this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new gb;t.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-button__toggle\"]},children:[{tag:\"span\",attributes:{class:[\"ck\",\"ck-button__toggle__inner\"]}}]});return t}}function aw({emitter:t,activator:e,callback:i,contextElements:n}){t.listenTo(document,\"mousedown\",(t,{target:o})=>{if(!e()){return}for(const t of n){if(t.contains(o)){return}}i()})}var cw=i(39);var lw=i(41);function dw(t,e=tw){const i=new e(t);const n=new Bb(t);const o=new $b(t,i,n);i.bind(\"isEnabled\").to(o);if(i instanceof tw){i.bind(\"isOn\").to(o,\"isOpen\")}else{i.arrowView.bind(\"isOn\").to(o,\"isOpen\")}fw(o);return o}function uw(t,e){const i=t.locale;const n=i.t;const o=t.toolbarView=new _w(i);o.set(\"ariaLabel\",n(\"kt\"));t.extendTemplate({attributes:{class:[\"ck-toolbar-dropdown\"]}});e.map(t=>o.items.add(t));t.panelView.children.add(o);o.items.delegate(\"execute\").to(t)}function hw(t,e){const i=t.locale;const n=t.listView=new iw(i);n.items.bindTo(e).using(({type:t,model:e})=>{if(t===\"separator\"){return new ow(i)}else if(t===\"button\"||t===\"switchbutton\"){const n=new nw(i);let o;if(t===\"button\"){o=new Kb(i)}else{o=new sw(i)}o.bind(...Object.keys(e)).to(e);o.delegate(\"execute\").to(n);n.children.add(o);return n}});t.panelView.children.add(n);n.items.delegate(\"execute\").to(t)}function fw(t){mw(t);gw(t);pw(t)}function mw(t){t.on(\"render\",()=>{aw({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=false},contextElements:[t.element]})})}function gw(t){t.on(\"execute\",e=>{if(e.source instanceof sw){return}t.isOpen=false})}function pw(t){t.keystrokes.set(\"arrowdown\",(e,i)=>{if(t.isOpen){t.panelView.focus();i()}});t.keystrokes.set(\"arrowup\",(e,i)=>{if(t.isOpen){t.panelView.focusLast();i()}})}var bw='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"9.5\" cy=\"4.5\" r=\"1.5\"/><circle cx=\"9.5\" cy=\"10.5\" r=\"1.5\"/><circle cx=\"9.5\" cy=\"16.5\" r=\"1.5\"/></svg>';var ww=i(43);class _w extends gb{constructor(t,e){super(t);const i=this.bindTemplate;const n=this.t;this.options=e||{};this.set(\"ariaLabel\",n(\"ly\"));this.set(\"maxWidth\",\"auto\");this.items=this.createCollection();this.focusTracker=new xp;this.keystrokes=new dp;this.set(\"class\");this.set(\"isCompact\",false);this.itemsView=new kw(t);this.children=this.createCollection();this.children.add(this.itemsView);this.focusables=this.createCollection();this._focusCycler=new Nb({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[\"arrowleft\",\"arrowup\"],focusNext:[\"arrowright\",\"arrowdown\"]}});this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-toolbar\",i.to(\"class\"),i.if(\"isCompact\",\"ck-toolbar_compact\")],role:\"toolbar\",\"aria-label\":i.to(\"ariaLabel\"),style:{maxWidth:i.to(\"maxWidth\")}},children:this.children,on:{mousedown:Db(this)}});this._behavior=this.options.shouldGroupWhenFull?new yw(this):new vw(this)}render(){super.render();for(const t of this.items){this.focusTracker.add(t.element)}this.items.on(\"add\",(t,e)=>{this.focusTracker.add(e.element)});this.items.on(\"remove\",(t,e)=>{this.focusTracker.remove(e.element)});this.keystrokes.listenTo(this.element);this._behavior.render(this)}destroy(){this._behavior.destroy();return super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e){t.map(t=>{if(t==\"|\"){this.items.add(new Lb)}else if(e.has(t)){this.items.add(e.create(t))}else{console.warn(Object(ss[\"a\"])(\"toolbarview-item-unavailable: The requested toolbar item is unavailable.\"),{name:t})}})}}class kw extends gb{constructor(t){super(t);this.children=this.createCollection();this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-toolbar__items\"]},children:this.children})}}class vw{constructor(t){const e=t.bindTemplate;t.set(\"isVertical\",false);t.itemsView.children.bindTo(t.items).using(t=>t);t.focusables.bindTo(t.items).using(t=>t);t.extendTemplate({attributes:{class:[e.if(\"isVertical\",\"ck-toolbar_vertical\")]}})}render(){}destroy(){}}class yw{constructor(t){this.viewChildren=t.children;this.viewFocusables=t.focusables;this.viewItemsView=t.itemsView;this.viewFocusTracker=t.focusTracker;this.viewLocale=t.locale;this.ungroupedItems=t.createCollection();this.groupedItems=t.createCollection();this.groupedItemsDropdown=this._createGroupedItemsDropdown();this.resizeObserver=null;this.cachedPadding=null;t.itemsView.children.bindTo(this.ungroupedItems).using(t=>t);this.ungroupedItems.on(\"add\",this._updateFocusCycleableItems.bind(this));this.ungroupedItems.on(\"remove\",this._updateFocusCycleableItems.bind(this));t.children.on(\"add\",this._updateFocusCycleableItems.bind(this));t.children.on(\"remove\",this._updateFocusCycleableItems.bind(this));t.items.on(\"add\",(t,e,i)=>{if(i>this.ungroupedItems.length){this.groupedItems.add(e,i-this.ungroupedItems.length)}else{this.ungroupedItems.add(e,i)}this._updateGrouping()});t.items.on(\"remove\",(t,e,i)=>{if(i>this.ungroupedItems.length){this.groupedItems.remove(e)}else{this.ungroupedItems.remove(e)}this._updateGrouping()});t.extendTemplate({attributes:{class:[\"ck-toolbar_grouping\"]}})}render(t){this.viewElement=t.element;this._enableGroupingOnResize();this._enableGroupingOnMaxWidthChange(t)}destroy(){this.groupedItemsDropdown.destroy();this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement)){return}let t;while(this._areItemsOverflowing){this._groupLastItem();t=true}if(!t&&this.groupedItems.length){while(this.groupedItems.length&&!this._areItemsOverflowing){this._ungroupFirstItem()}if(this._areItemsOverflowing){this._groupLastItem()}}}get _areItemsOverflowing(){if(!this.ungroupedItems.length){return false}const t=this.viewElement;const e=this.viewLocale.uiLanguageDirection;const i=new vh(t.lastChild);const n=new vh(t);if(!this.cachedPadding){const i=Nd.window.getComputedStyle(t);const n=e===\"ltr\"?\"paddingRight\":\"paddingLeft\";this.cachedPadding=Number.parseInt(i[n])}if(e===\"ltr\"){return i.right>n.right-this.cachedPadding}else{return i.left<n.left+this.cachedPadding}}_enableGroupingOnResize(){let t;this.resizeObserver=new Rb(this.viewElement,e=>{if(!t||t!==e.contentRect.width){this._updateGrouping();t=e.contentRect.width}});this._updateGrouping()}_enableGroupingOnMaxWidthChange(t){t.on(\"change:maxWidth\",()=>{this._updateGrouping()})}_groupLastItem(){if(!this.groupedItems.length){this.viewChildren.add(new Lb);this.viewChildren.add(this.groupedItemsDropdown);this.viewFocusTracker.add(this.groupedItemsDropdown.element)}this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first));if(!this.groupedItems.length){this.viewChildren.remove(this.groupedItemsDropdown);this.viewChildren.remove(this.viewChildren.last);this.viewFocusTracker.remove(this.groupedItemsDropdown.element)}}_createGroupedItemsDropdown(){const t=this.viewLocale;const e=t.t;const i=dw(t);i.class=\"ck-toolbar__grouped-dropdown\";i.panelPosition=t.uiLanguageDirection===\"ltr\"?\"sw\":\"se\";uw(i,[]);i.buttonView.set({label:e(\"lz\"),tooltip:true,icon:bw});i.toolbarView.items.bindTo(this.groupedItems).using(t=>t);return i}_updateFocusCycleableItems(){this.viewFocusables.clear();this.ungroupedItems.map(t=>{this.viewFocusables.add(t)});if(this.groupedItems.length){this.viewFocusables.add(this.groupedItemsDropdown)}}}var xw=i(45);class Aw extends Cb{constructor(t,e,i={}){super(t);this.stickyPanel=new Ib(t);this.toolbar=new _w(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull});this.editable=new Eb(t,e)}render(){super.render();this.stickyPanel.content.add(this.toolbar);this.top.add(this.stickyPanel);this.main.add(this.editable)}}function Cw(t){if(t instanceof HTMLTextAreaElement){return t.value}return t.innerHTML}class Tw extends hp{constructor(t,e){super(e);if(Gr(t)){this.sourceElement=t}this.data.processor=new kp(this.data.viewDocument);this.model.document.createRoot();const i=!this.config.get(\"toolbar.shouldNotGroupWhenFull\");const n=new Aw(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new Dp(this,n);wp(this)}destroy(){if(this.sourceElement){this.updateSourceElement()}this.ui.destroy();return super.destroy()}static create(t,e={}){return new Promise(i=>{const n=new this(t,e);i(n.initPlugins().then(()=>n.ui.init(Gr(t)?t:null)).then(()=>{if(!Gr(t)&&e.initialData){throw new ss[\"b\"](\"editor-create-initial-data: \"+\"The config.initialData option cannot be used together with initial data passed in Editor.create().\",null)}const i=e.initialData||Ew(t);return n.data.init(i)}).then(()=>n.fire(\"ready\")).then(()=>n))})}}vs(Tw,mp);vs(Tw,bp);function Ew(t){return Gr(t)?Cw(t):t}class Mw{static get pluginName(){return\"BlockAutoformatEditing\"}constructor(t,e,i){let n;let o=null;if(typeof i==\"function\"){n=i}else{o=t.commands.get(i);n=()=>{t.execute(i)}}t.model.document.on(\"change\",(i,r)=>{if(o&&!o.isEnabled){return}if(r.type==\"transparent\"){return}const s=Array.from(t.model.document.differ.getChanges());const a=s[0];if(s.length!=1||a.type!==\"insert\"||a.name!=\"$text\"||a.length!=1){return}const c=a.position.parent;if(!c.is(\"paragraph\")||c.childCount!==1){return}const l=e.exec(c.getChild(0).data);if(!l){return}t.model.enqueueChange(t=>{const e=t.createPositionAt(c,0);const i=t.createPositionAt(c,l[0].length);const o=new rf(e,i);const r=n({match:l});if(r!==false){t.remove(o)}o.detach()})})}}function Pw(t,e){let i=t.start;const n=Array.from(t.getItems()).reduce((t,n)=>{if(!(n.is(\"text\")||n.is(\"textProxy\"))){i=e.createPositionAfter(n);return\"\"}return t+n.data},\"\");return{text:n,range:e.createRange(i,t.end)}}class Sw{static get pluginName(){return\"InlineAutoformatEditing\"}constructor(t,e,i){let n;let o;let r;let s;if(e instanceof RegExp){n=e}else{r=e}if(typeof i==\"string\"){o=i}else{s=i}r=r||(t=>{let e;const i=[];const o=[];while((e=n.exec(t))!==null){if(e&&e.length<4){break}let{index:t,1:n,2:r,3:s}=e;const a=n+r+s;t+=e[0].length-a.length;const c=[t,t+n.length];const l=[t+n.length+r.length,t+n.length+r.length+s.length];i.push(c);i.push(l);o.push([t+n.length,t+n.length+r.length])}return{remove:i,format:o}});s=s||((e,i)=>{const n=t.model.schema.getValidRanges(i,o);for(const t of n){e.setAttribute(o,true,t)}e.removeSelectionAttribute(o)});t.model.document.on(\"change\",(e,i)=>{if(i.type==\"transparent\"){return}const n=t.model;const o=n.document.selection;if(!o.isCollapsed){return}const a=Array.from(n.document.differ.getChanges());const c=a[0];if(a.length!=1||c.type!==\"insert\"||c.name!=\"$text\"||c.length!=1){return}const l=o.focus;const d=l.parent;const{text:u,range:h}=Pw(n.createRange(n.createPositionAt(d,0),l),n);const f=r(u);const m=Iw(h.start,f.format,n);const g=Iw(h.start,f.remove,n);if(!(m.length&&g.length)){return}n.enqueueChange(t=>{const e=s(t,m);if(e===false){return}for(const e of g.reverse()){t.remove(e)}})})}}function Iw(t,e,i){return e.filter(t=>t[0]!==undefined&&t[1]!==undefined).map(e=>i.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1])))}class Nw{constructor(t){this.editor=t;this.set(\"isEnabled\",true);this._disableStack=new Set}forceDisabled(t){this._disableStack.add(t);if(this._disableStack.size==1){this.on(\"set:isEnabled\",Ow,{priority:\"highest\"});this.isEnabled=false}}clearForceDisabled(t){this._disableStack.delete(t);if(this._disableStack.size==0){this.off(\"set:isEnabled\",Ow);this.isEnabled=true}}destroy(){this.stopListening()}static get isContextPlugin(){return false}}vs(Nw,Jc);function Ow(t){t.return=false;t.stop()}class Lw extends Nw{static get pluginName(){return\"Autoformat\"}afterInit(){this._addListAutoformats();this._addBasicStylesAutoformats();this._addHeadingAutoformats();this._addBlockQuoteAutoformats();this._addCodeBlockAutoformats()}_addListAutoformats(){const t=this.editor.commands;if(t.get(\"bulletedList\")){new Mw(this.editor,/^[*-]\\s$/,\"bulletedList\")}if(t.get(\"numberedList\")){new Mw(this.editor,/^1[.|)]\\s$/,\"numberedList\")}}_addBasicStylesAutoformats(){const t=this.editor.commands;if(t.get(\"bold\")){const t=zw(this.editor,\"bold\");new Sw(this.editor,/(\\*\\*)([^*]+)(\\*\\*)$/g,t);new Sw(this.editor,/(__)([^_]+)(__)$/g,t)}if(t.get(\"italic\")){const t=zw(this.editor,\"italic\");new Sw(this.editor,/(?:^|[^*])(\\*)([^*_]+)(\\*)$/g,t);new Sw(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,t)}if(t.get(\"code\")){const t=zw(this.editor,\"code\");new Sw(this.editor,/(`)([^`]+)(`)$/g,t)}}_addHeadingAutoformats(){const t=this.editor.commands.get(\"heading\");if(t){t.modelElements.filter(t=>t.match(/^heading[1-6]$/)).forEach(e=>{const i=e[7];const n=new RegExp(`^(#{${i}})\\\\s$`);new Mw(this.editor,n,()=>{if(!t.isEnabled){return false}this.editor.execute(\"heading\",{value:e})})})}}_addBlockQuoteAutoformats(){if(this.editor.commands.get(\"blockQuote\")){new Mw(this.editor,/^>\\s$/,\"blockQuote\")}}_addCodeBlockAutoformats(){if(this.editor.commands.get(\"codeBlock\")){new Mw(this.editor,/^```$/,\"codeBlock\")}}}function zw(t,e){return(i,n)=>{const o=t.commands.get(e);if(!o.isEnabled){return false}const r=t.model.schema.getValidRanges(n,e);for(const t of r){i.setAttribute(e,true,t)}i.removeSelectionAttribute(e)}}class Rw{constructor(t){this.editor=t;this.set(\"value\",undefined);this.set(\"isEnabled\",false);this._disableStack=new Set;this.decorate(\"execute\");this.listenTo(this.editor.model.document,\"change\",()=>{this.refresh()});this.on(\"execute\",t=>{if(!this.isEnabled){t.stop()}},{priority:\"high\"});this.listenTo(t,\"change:isReadOnly\",(t,e,i)=>{if(i){this.forceDisabled(\"readOnlyMode\")}else{this.clearForceDisabled(\"readOnlyMode\")}})}refresh(){this.isEnabled=true}forceDisabled(t){this._disableStack.add(t);if(this._disableStack.size==1){this.on(\"set:isEnabled\",jw,{priority:\"highest\"});this.isEnabled=false}}clearForceDisabled(t){this._disableStack.delete(t);if(this._disableStack.size==0){this.off(\"set:isEnabled\",jw);this.refresh()}}execute(){}destroy(){this.stopListening()}}vs(Rw,Jc);function jw(t){t.return=false;t.stop()}function Dw(t){const e=t.next();if(e.done){return null}return e.value}class Bw extends Rw{refresh(){this.value=this._getValue();this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model;const i=e.schema;const n=e.document.selection;const o=Array.from(n.getSelectedBlocks());const r=t.forceValue===undefined?!this.value:t.forceValue;e.change(t=>{if(!r){this._removeQuote(t,o.filter(Vw))}else{const e=o.filter(t=>Vw(t)||Hw(i,t));this._applyQuote(t,e)}})}_getValue(){const t=this.editor.model.document.selection;const e=Dw(t.getSelectedBlocks());return!!(e&&Vw(e))}_checkEnabled(){if(this.value){return true}const t=this.editor.model.document.selection;const e=this.editor.model.schema;const i=Dw(t.getSelectedBlocks());if(!i){return false}return Hw(e,i)}_removeQuote(t,e){Fw(t,e).reverse().forEach(e=>{if(e.start.isAtStart&&e.end.isAtEnd){t.unwrap(e.start.parent);return}if(e.start.isAtStart){const i=t.createPositionBefore(e.start.parent);t.move(e,i);return}if(!e.end.isAtEnd){t.split(e.end)}const i=t.createPositionAfter(e.end.parent);t.move(e,i)})}_applyQuote(t,e){const i=[];Fw(t,e).reverse().forEach(e=>{let n=Vw(e.start);if(!n){n=t.createElement(\"blockQuote\");t.wrap(e,n)}i.push(n)});i.reverse().reduce((e,i)=>{if(e.nextSibling==i){t.merge(t.createPositionAfter(e));return e}return i})}}function Vw(t){return t.parent.name==\"blockQuote\"?t.parent:null}function Fw(t,e){let i;let n=0;const o=[];while(n<e.length){const r=e[n];const s=e[n+1];if(!i){i=t.createPositionBefore(r)}if(!s||r.nextSibling!=s){o.push(t.createRange(i,t.createPositionAfter(r)));i=null}n++}return o}function Hw(t,e){const i=t.checkChild(e.parent,\"blockQuote\");const n=t.checkChild([\"$root\",\"blockQuote\"],e);return i&&n}class Ww extends Nw{static get pluginName(){return\"BlockQuoteEditing\"}init(){const t=this.editor;const e=t.model.schema;t.commands.add(\"blockQuote\",new Bw(t));e.register(\"blockQuote\",{allowWhere:\"$block\",allowContentOf:\"$root\"});e.addChildCheck((t,e)=>{if(t.endsWith(\"blockQuote\")&&e.name==\"blockQuote\"){return false}});t.conversion.elementToElement({model:\"blockQuote\",view:\"blockquote\"});t.model.document.registerPostFixer(i=>{const n=t.model.document.differ.getChanges();for(const t of n){if(t.type==\"insert\"){const n=t.position.nodeAfter;if(!n){continue}if(n.is(\"blockQuote\")&&n.isEmpty){i.remove(n);return true}else if(n.is(\"blockQuote\")&&!e.checkChild(t.position,n)){i.unwrap(n);return true}else if(n.is(\"element\")){const t=i.createRangeIn(n);for(const n of t.getItems()){if(n.is(\"blockQuote\")&&!e.checkChild(i.createPositionBefore(n),n)){i.unwrap(n);return true}}}}else if(t.type==\"remove\"){const e=t.position.parent;if(e.is(\"blockQuote\")&&e.isEmpty){i.remove(e);return true}}}return false})}afterInit(){const t=this.editor;const e=t.commands.get(\"blockQuote\");this.listenTo(this.editor.editing.view.document,\"enter\",(t,i)=>{const n=this.editor.model.document;const o=n.selection.getLastPosition().parent;if(n.selection.isCollapsed&&o.isEmpty&&e.value){this.editor.execute(\"blockQuote\");this.editor.editing.view.scrollToTheSelection();i.preventDefault();t.stop()}})}}var Uw='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><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.574zm8 0a6.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.574z\"/></svg>';var qw=i(47);class $w extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(\"blockQuote\",i=>{const n=t.commands.get(\"blockQuote\");const o=new Kb(i);o.set({label:e(\"iz\"),icon:Uw,tooltip:true,isToggleable:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(\"blockQuote\");t.editing.view.focus()});return o})}}class Yw extends Nw{static get requires(){return[Ww,$w]}static get pluginName(){return\"BlockQuote\"}}class Gw extends Rw{constructor(t,e){super(t);this.attributeKey=e}refresh(){const t=this.editor.model;const e=t.document;this.value=this._getValueFromFirstAllowedNode();this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model;const i=e.document;const n=i.selection;const o=t.forceValue===undefined?!this.value:t.forceValue;e.change(t=>{if(n.isCollapsed){if(o){t.setSelectionAttribute(this.attributeKey,true)}else{t.removeSelectionAttribute(this.attributeKey)}}else{const i=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of i){if(o){t.setAttribute(this.attributeKey,o,e)}else{t.removeAttribute(this.attributeKey,e)}}}})}_getValueFromFirstAllowedNode(){const t=this.editor.model;const e=t.schema;const i=t.document.selection;if(i.isCollapsed){return i.hasAttribute(this.attributeKey)}for(const t of i.getRanges()){for(const i of t.getItems()){if(e.checkAttribute(i,this.attributeKey)){return i.hasAttribute(this.attributeKey)}}}return false}}const Jw=\"bold\";class Xw extends Nw{static get pluginName(){return\"BoldEditing\"}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:Jw});t.model.schema.setAttributeProperties(Jw,{isFormatting:true,copyOnEnter:true});t.conversion.attributeToElement({model:Jw,view:\"strong\",upcastAlso:[\"b\",t=>{const e=t.getStyle(\"font-weight\");if(!e){return null}if(e==\"bold\"||Number(e)>=600){return{name:true,styles:[\"font-weight\"]}}}]});t.commands.add(Jw,new Gw(t,Jw));t.keystrokes.set(\"CTRL+B\",Jw)}}var Qw='<svg viewBox=\"0 0 20 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\"/></svg>';const Kw=\"bold\";class Zw extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(Kw,i=>{const n=t.commands.get(Kw);const o=new Kb(i);o.set({label:e(\"jd\"),icon:Qw,keystroke:\"CTRL+B\",tooltip:true,isToggleable:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(Kw);t.editing.view.focus()});return o})}}class t_ extends Nw{static get requires(){return[Xw,Zw]}static get pluginName(){return\"Bold\"}}class e_ extends Rw{refresh(){const t=this.editor.model;const e=t.document;const i=Dw(e.selection.getSelectedBlocks());this.value=!!i&&i.is(\"paragraph\");this.isEnabled=!!i&&i_(i,t.schema)}execute(t={}){const e=this.editor.model;const i=e.document;e.change(n=>{const o=(t.selection||i.selection).getSelectedBlocks();for(const t of o){if(!t.is(\"paragraph\")&&i_(t,e.schema)){n.rename(t,\"paragraph\")}}})}}function i_(t,e){return e.checkChild(t.parent,\"paragraph\")&&!e.isObject(t)}class n_ extends Nw{static get pluginName(){return\"Paragraph\"}init(){const t=this.editor;const e=t.model;const i=t.data;t.commands.add(\"paragraph\",new e_(t));e.schema.register(\"paragraph\",{inheritAllFrom:\"$block\"});t.conversion.elementToElement({model:\"paragraph\",view:\"p\"});t.conversion.for(\"upcast\").elementToElement({model:(t,e)=>{if(!n_.paragraphLikeElements.has(t.name)){return null}if(t.isEmpty){return null}return e.createElement(\"paragraph\")},converterPriority:\"low\"});i.upcastDispatcher.on(\"element\",(t,e,i)=>{if(!i.consumable.test(e.viewItem,{name:e.viewItem.name})){return}if(r_(e.viewItem,e.modelCursor,i.schema)){Object.assign(e,o_(e.viewItem,e.modelCursor,i))}},{priority:\"low\"});i.upcastDispatcher.on(\"text\",(t,e,i)=>{if(e.modelRange){return}if(r_(e.viewItem,e.modelCursor,i.schema)){Object.assign(e,o_(e.viewItem,e.modelCursor,i))}},{priority:\"lowest\"});e.document.registerPostFixer(t=>this._autoparagraphEmptyRoots(t));t.data.on(\"ready\",()=>{e.enqueueChange(\"transparent\",t=>this._autoparagraphEmptyRoots(t))},{priority:\"lowest\"})}_autoparagraphEmptyRoots(t){const e=this.editor.model;for(const i of e.document.getRootNames()){const n=e.document.getRoot(i);if(n.isEmpty&&n.rootName!=\"$graveyard\"){if(e.schema.checkChild(n,\"paragraph\")){t.insertElement(\"paragraph\",n);return true}}}}}n_.paragraphLikeElements=new Set([\"blockquote\",\"dd\",\"div\",\"dt\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"li\",\"p\",\"td\"]);function o_(t,e,i){const n=i.writer.createElement(\"paragraph\");i.writer.insert(n,e);return i.convertItem(t,i.writer.createPositionAt(n,0))}function r_(t,e,i){const n=i.createContext(e);if(!i.checkChild(n,\"paragraph\")){return false}if(!i.checkChild(n.push(\"paragraph\"),t)){return false}return true}class s_ extends Rw{constructor(t,e){super(t);this.modelElements=e}refresh(){const t=Dw(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name;this.isEnabled=!!t&&this.modelElements.some(e=>a_(t,e,this.editor.model.schema))}execute(t){const e=this.editor.model;const i=e.document;const n=t.value;e.change(t=>{const o=Array.from(i.selection.getSelectedBlocks()).filter(t=>a_(t,n,e.schema));for(const e of o){if(!e.is(n)){t.rename(e,n)}}})}}function a_(t,e,i){return i.checkChild(t.parent,e)&&!i.isObject(t)}const c_=\"paragraph\";class l_ extends Nw{static get pluginName(){return\"HeadingEditing\"}constructor(t){super(t);t.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[n_]}init(){const t=this.editor;const e=t.config.get(\"heading.options\");const i=[];for(const n of e){if(n.model!==c_){t.model.schema.register(n.model,{inheritAllFrom:\"$block\"});t.conversion.elementToElement(n);i.push(n.model)}}this._addDefaultH1Conversion(t);t.commands.add(\"heading\",new s_(t,i))}afterInit(){const t=this.editor;const e=t.commands.get(\"enter\");const i=t.config.get(\"heading.options\");if(e){this.listenTo(e,\"afterExecute\",(e,n)=>{const o=t.model.document.selection.getFirstPosition().parent;const r=i.some(t=>o.is(t.model));if(r&&!o.is(c_)&&o.childCount===0){n.writer.rename(o,c_)}})}}_addDefaultH1Conversion(t){t.conversion.for(\"upcast\").elementToElement({model:\"heading1\",view:\"h1\",converterPriority:os.get(\"low\")+1})}}class d_{constructor(t,e){if(e){Uc(this,e)}if(t){this.set(t)}}}vs(d_,Jc);function u_(t){const e=t.t;const i={Paragraph:e(\"nd\"),\"Heading 1\":e(\"ne\"),\"Heading 2\":e(\"nf\"),\"Heading 3\":e(\"ng\"),\"Heading 4\":e(\"nh\"),\"Heading 5\":e(\"ni\"),\"Heading 6\":e(\"nj\")};return t.config.get(\"heading.options\").map(t=>{const e=i[t.title];if(e&&e!=t.title){t.title=e}return t})}var h_=i(11);class f_ extends Nw{init(){const t=this.editor;const e=t.t;const i=u_(t);const n=e(\"ja\");const o=e(\"jb\");t.ui.componentFactory.add(\"heading\",e=>{const r={};const s=new ys;const a=t.commands.get(\"heading\");const c=t.commands.get(\"paragraph\");const l=[a];for(const t of i){const e={type:\"button\",model:new d_({label:t.title,class:t.class,withText:true})};if(t.model===\"paragraph\"){e.model.bind(\"isOn\").to(c,\"value\");e.model.set(\"commandName\",\"paragraph\");l.push(c)}else{e.model.bind(\"isOn\").to(a,\"value\",e=>e===t.model);e.model.set({commandName:\"heading\",commandValue:t.model})}s.add(e);r[t.model]=t.title}const d=dw(e);hw(d,s);d.buttonView.set({isOn:false,withText:true,tooltip:o});d.extendTemplate({attributes:{class:[\"ck-heading-dropdown\"]}});d.bind(\"isEnabled\").toMany(l,\"isEnabled\",(...t)=>t.some(t=>t));d.buttonView.bind(\"label\").to(a,\"value\",c,\"value\",(t,e)=>{const i=t||e&&\"paragraph\";return r[i]?r[i]:n});this.listenTo(d,\"execute\",e=>{t.execute(e.source.commandName,e.source.commandValue?{value:e.source.commandValue}:undefined);t.editing.view.focus()});return d})}}class m_ extends Nw{static get requires(){return[l_,f_]}static get pluginName(){return\"Heading\"}}class g_ extends Yd{observe(t){this.listenTo(t,\"load\",(t,e)=>{const i=e.target;if(i.tagName==\"IMG\"){this._fireEvents(e)}},{useCapture:true})}_fireEvents(t){if(this.isEnabled){this.document.fire(\"layoutChanged\");this.document.fire(\"imageLoaded\",t)}}}class p_{constructor(){this._stack=[]}add(t,e){const i=this._stack;const n=i[0];this._insertDescriptor(t);const o=i[0];if(n!==o&&!b_(n,o)){this.fire(\"change:top\",{oldDescriptor:n,newDescriptor:o,writer:e})}}remove(t,e){const i=this._stack;const n=i[0];this._removeDescriptor(t);const o=i[0];if(n!==o&&!b_(n,o)){this.fire(\"change:top\",{oldDescriptor:n,newDescriptor:o,writer:e})}}_insertDescriptor(t){const e=this._stack;const i=e.findIndex(e=>e.id===t.id);if(b_(t,e[i])){return}if(i>-1){e.splice(i,1)}let n=0;while(e[n]&&w_(e[n],t)){n++}e.splice(n,0,t)}_removeDescriptor(t){const e=this._stack;const i=e.findIndex(e=>e.id===t);if(i>-1){e.splice(i,1)}}}vs(p_,ds);function b_(t,e){return t&&e&&t.priority==e.priority&&__(t.classes)==__(e.classes)}function w_(t,e){if(t.priority>e.priority){return true}else if(t.priority<e.priority){return false}return __(t.classes)>__(e.classes)}function __(t){return Array.isArray(t)?t.sort().join(\",\"):t}var k_='<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z\"/><path fill-opacity=\".256\" d=\"M1 1h14v14H1z\"/><g class=\"ck-icon__selected-indicator\"><path d=\"M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z\"/><path fill-opacity=\".254\" d=\"M1 1h14v14H1z\"/></g></svg>';const v_=\"ck-widget\";const y_=\"ck-widget_selected\";function x_(t){if(!t.is(\"element\")){return false}return!!t.getCustomProperty(\"widget\")}function A_(t,e,i={}){if(!Cl.isEdge){e.setAttribute(\"contenteditable\",\"false\",t)}e.addClass(v_,t);e.setCustomProperty(\"widget\",true,t);t.getFillerOffset=I_;if(i.label){T_(t,i.label,e)}if(i.hasSelectionHandle){N_(t,e)}C_(t,e,(t,e,i)=>i.addClass(n(e.classes),t),(t,e,i)=>i.removeClass(n(e.classes),t));return t;function n(t){return Array.isArray(t)?t:[t]}}function C_(t,e,i,n){const o=new p_;o.on(\"change:top\",(e,o)=>{if(o.oldDescriptor){n(t,o.oldDescriptor,o.writer)}if(o.newDescriptor){i(t,o.newDescriptor,o.writer)}});e.setCustomProperty(\"addHighlight\",(t,e,i)=>o.add(e,i),t);e.setCustomProperty(\"removeHighlight\",(t,e,i)=>o.remove(e,i),t)}function T_(t,e,i){i.setCustomProperty(\"widgetLabel\",e,t)}function E_(t){const e=t.getCustomProperty(\"widgetLabel\");if(!e){return\"\"}return typeof e==\"function\"?e():e}function M_(t,e){e.addClass([\"ck-editor__editable\",\"ck-editor__nested-editable\"],t);if(!Cl.isEdge){e.setAttribute(\"contenteditable\",t.isReadOnly?\"false\":\"true\",t);t.on(\"change:isReadOnly\",(i,n,o)=>{e.setAttribute(\"contenteditable\",o?\"false\":\"true\",t)})}t.on(\"change:isFocused\",(i,n,o)=>{if(o){e.addClass(\"ck-editor__nested-editable_focused\",t)}else{e.removeClass(\"ck-editor__nested-editable_focused\",t)}});return t}function P_(t,e){const i=t.getSelectedElement();if(i&&e.schema.isBlock(i)){return e.createPositionAfter(i)}const n=t.getSelectedBlocks().next().value;if(n){if(n.isEmpty){return e.createPositionAt(n,0)}const i=e.createPositionAfter(n);if(t.focus.isTouching(i)){return i}return e.createPositionBefore(n)}return t.focus}function S_(t,e){return(i,n)=>{const{mapper:o,viewPosition:r}=n;const s=o.findMappedViewAncestor(r);if(!e(s)){return}const a=o.toModelElement(s);n.modelPosition=t.createPositionAt(a,r.isAtStart?\"before\":\"after\")}}function I_(){return null}function N_(t,e){const i=e.createUIElement(\"div\",{class:\"ck ck-widget__selection-handle\"},(function(t){const e=this.toDomElement(t);const i=new Gb;i.set(\"content\",k_);i.render();e.appendChild(i.element);return e}));e.insert(e.createPositionAt(t,0),i);e.addClass([\"ck-widget_with-selection-handle\"],t)}function O_(t,e,i){e.setCustomProperty(\"image\",true,t);return A_(t,e,{label:n});function n(){const e=B_(t);const n=e.getAttribute(\"alt\");return n?`${n} ${i}`:i}}function L_(t){return!!t.getCustomProperty(\"image\")&&x_(t)}function z_(t){const e=t.getSelectedElement();if(e&&L_(e)){return e}return null}function R_(t){return!!t&&t.is(\"image\")}function j_(t,e,i={}){const n=t.createElement(\"image\",i);const o=P_(e.document.selection,e);e.insertContent(n,o);if(n.parent){t.setSelection(n,\"on\")}}function D_(t){const e=t.schema;const i=t.document.selection;return V_(i,e,t)&&!F_(i,e)&&H_(i)}function B_(t){return Array.from(t.getChildren()).find(t=>t.is(\"img\"))}function V_(t,e,i){const n=W_(t,i);return e.checkChild(n,\"image\")}function F_(t,e){const i=t.getSelectedElement();return i&&e.isObject(i)}function H_(t){return[...t.focus.getAncestors()].every(t=>!t.is(\"image\"))}function W_(t,e){const i=P_(t,e);const n=i.parent;if(n.isEmpty&&!n.is(\"$root\")){return n.parent}return n}function U_(){return e=>{e.on(\"element:figure\",t)};function t(t,e,i){if(!i.consumable.test(e.viewItem,{name:true,classes:\"image\"})){return}const n=B_(e.viewItem);if(!n||!n.hasAttribute(\"src\")||!i.consumable.test(n,{name:true})){return}const o=i.convertItem(n,e.modelCursor);const r=Dw(o.modelRange.getItems());if(!r){return}i.convertChildren(e.viewItem,i.writer.createPositionAt(r,0));e.modelRange=o.modelRange;e.modelCursor=o.modelCursor}}function q_(){return e=>{e.on(\"attribute:srcset:image\",t)};function t(t,e,i){if(!i.consumable.consume(e.item,t.name)){return}const n=i.writer;const o=i.mapper.toViewElement(e.item);const r=B_(o);if(e.attributeNewValue===null){const t=e.attributeOldValue;if(t.data){n.removeAttribute(\"srcset\",r);n.removeAttribute(\"sizes\",r);if(t.width){n.removeAttribute(\"width\",r)}}}else{const t=e.attributeNewValue;if(t.data){n.setAttribute(\"srcset\",t.data,r);n.setAttribute(\"sizes\",\"100vw\",r);if(t.width){n.setAttribute(\"width\",t.width,r)}}}}}function $_(t){return i=>{i.on(`attribute:${t}:image`,e)};function e(t,e,i){if(!i.consumable.consume(e.item,t.name)){return}const n=i.writer;const o=i.mapper.toViewElement(e.item);const r=B_(o);if(e.attributeNewValue!==null){n.setAttribute(e.attributeKey,e.attributeNewValue,r)}else{n.removeAttribute(e.attributeKey,r)}}}class Y_ extends Rw{refresh(){this.isEnabled=D_(this.editor.model)}execute(t){const e=this.editor.model;e.change(i=>{const n=Array.isArray(t.source)?t.source:[t.source];for(const t of n){j_(i,e,{src:t})}})}}class G_ extends Nw{static get pluginName(){return\"ImageEditing\"}init(){const t=this.editor;const e=t.model.schema;const i=t.t;const n=t.conversion;t.editing.view.addObserver(g_);e.register(\"image\",{isObject:true,isBlock:true,allowWhere:\"$block\",allowAttributes:[\"alt\",\"src\",\"srcset\"]});n.for(\"dataDowncast\").elementToElement({model:\"image\",view:(t,e)=>J_(e)});n.for(\"editingDowncast\").elementToElement({model:\"image\",view:(t,e)=>O_(J_(e),e,i(\"jk\"))});n.for(\"downcast\").add($_(\"src\")).add($_(\"alt\")).add(q_());n.for(\"upcast\").elementToElement({view:{name:\"img\",attributes:{src:true}},model:(t,e)=>e.createElement(\"image\",{src:t.getAttribute(\"src\")})}).attributeToAttribute({view:{name:\"img\",key:\"alt\"},model:\"alt\"}).attributeToAttribute({view:{name:\"img\",key:\"srcset\"},model:{key:\"srcset\",value:t=>{const e={data:t.getAttribute(\"srcset\")};if(t.hasAttribute(\"width\")){e.width=t.getAttribute(\"width\")}return e}}}).add(U_());t.commands.add(\"imageInsert\",new Y_(t))}}function J_(t){const e=t.createEmptyElement(\"img\");const i=t.createContainerElement(\"figure\",{class:\"image\"});t.insert(t.createPositionAt(i,0),e);return i}class X_ extends Ju{constructor(t){super(t);this.domEventType=\"mousedown\"}onDomEvent(t){this.fire(t.type,t)}}var Q_=i(50);const K_=Rl(\"Ctrl+A\");class Z_ extends Nw{static get pluginName(){return\"Widget\"}init(){const t=this.editor.editing.view;const e=t.document;this._previouslySelected=new Set;this.editor.editing.downcastDispatcher.on(\"selection\",(t,e,i)=>{this._clearPreviouslySelectedWidgets(i.writer);const n=i.writer;const o=n.document.selection;const r=o.getSelectedElement();let s=null;for(const t of o.getRanges()){for(const e of t){const t=e.item;if(x_(t)&&!nk(t,s)){n.addClass(y_,t);this._previouslySelected.add(t);s=t;if(t==r){n.setSelection(o.getRanges(),{fake:true,label:E_(r)})}}}}},{priority:\"low\"});t.addObserver(X_);this.listenTo(e,\"mousedown\",(...t)=>this._onMousedown(...t));this.listenTo(e,\"keydown\",(...t)=>this._onKeydown(...t),{priority:\"high\"});this.listenTo(e,\"delete\",(t,e)=>{if(this._handleDelete(e.direction==\"forward\")){e.preventDefault();t.stop()}},{priority:\"high\"})}_onMousedown(t,e){const i=this.editor;const n=i.editing.view;const o=n.document;let r=e.target;if(ik(r)){if(Cl.isSafari&&e.domEvent.detail>=3){const t=i.editing.mapper;const n=t.toModelElement(r);this.editor.model.change(t=>{e.preventDefault();t.setSelection(n,\"in\")})}return}if(!x_(r)){r=r.findAncestor(x_);if(!r){return}}e.preventDefault();if(!o.isFocused){n.focus()}const s=i.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_onKeydown(t,e){const i=e.keyCode;const n=this.editor.locale.contentLanguageDirection===\"ltr\";const o=i==Ll.arrowdown||i==Ll[n?\"arrowright\":\"arrowleft\"];let r=false;if(tk(i)){r=this._handleArrowKeys(o)}else if(ek(e)){r=this._selectAllNestedEditableContent()||this._selectAllContent()}else if(i===Ll.enter){r=this._handleEnterKey(e.shiftKey)}if(r){e.preventDefault();t.stop()}}_handleDelete(t){if(this.editor.isReadOnly){return}const e=this.editor.model.document;const i=e.selection;if(!i.isCollapsed){return}const n=this._getObjectElementNextToSelection(t);if(n){this.editor.model.change(t=>{let e=i.anchor.parent;while(e.isEmpty){const i=e;e=i.parent;t.remove(i)}this._setSelectionOverElement(n)});return true}}_handleArrowKeys(t){const e=this.editor.model;const i=e.schema;const n=e.document;const o=n.selection;const r=o.getSelectedElement();if(r&&i.isObject(r)){const n=t?o.getLastPosition():o.getFirstPosition();const r=i.getNearestSelectionRange(n,t?\"forward\":\"backward\");if(r){e.change(t=>{t.setSelection(r)})}return true}if(!o.isCollapsed){return}const s=this._getObjectElementNextToSelection(t);if(!!s&&i.isObject(s)){this._setSelectionOverElement(s);return true}}_handleEnterKey(t){const e=this.editor.model;const i=e.document.selection;const n=i.getSelectedElement();if(ok(n,e.schema)){e.change(i=>{let o=i.createPositionAt(n,t?\"before\":\"after\");const r=i.createElement(\"paragraph\");if(e.schema.isBlock(n.parent)){const t=e.schema.findAllowedParent(o,r);o=i.split(o,t).position}i.insert(r,o);i.setSelection(r,\"in\")});return true}}_selectAllNestedEditableContent(){const t=this.editor.model;const e=t.document.selection;const i=t.schema.getLimitElement(e);if(e.getFirstRange().root==i){return false}t.change(t=>{t.setSelection(t.createRangeIn(i))});return true}_selectAllContent(){const t=this.editor.model;const e=this.editor.editing;const i=e.view;const n=i.document;const o=n.selection;const r=o.getSelectedElement();if(r&&x_(r)){const i=e.mapper.toModelElement(r.parent);t.change(t=>{t.setSelection(t.createRangeIn(i))});return true}return false}_setSelectionOverElement(t){this.editor.model.change(e=>{e.setSelection(e.createRangeOn(t))})}_getObjectElementNextToSelection(t){const e=this.editor.model;const i=e.schema;const n=e.document.selection;const o=e.createSelection(n);e.modifySelection(o,{direction:t?\"forward\":\"backward\"});const r=t?o.focus.nodeBefore:o.focus.nodeAfter;if(!!r&&i.isObject(r)){return r}return null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected){t.removeClass(y_,e)}this._previouslySelected.clear()}}function tk(t){return t==Ll.arrowright||t==Ll.arrowleft||t==Ll.arrowup||t==Ll.arrowdown}function ek(t){return zl(t)==K_}function ik(t){while(t){if(t.is(\"editableElement\")&&!t.is(\"rootElement\")){return true}if(x_(t)){return false}t=t.parent}return false}function nk(t,e){if(!e){return false}return Array.from(t.getAncestors()).includes(e)}function ok(t,e){return t&&e.isObject(t)&&!e.isInline(t)}class rk extends Rw{refresh(){const t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=R_(t);if(R_(t)&&t.hasAttribute(\"alt\")){this.value=t.getAttribute(\"alt\")}else{this.value=false}}execute(t){const e=this.editor.model;const i=e.document.selection.getSelectedElement();e.change(e=>{e.setAttribute(\"alt\",t.newValue,i)})}}class sk extends Nw{static get pluginName(){return\"ImageTextAlternativeEditing\"}init(){this.editor.commands.add(\"imageTextAlternative\",new rk(this.editor))}}var ak=i(52);class ck extends gb{constructor(t,e){super(t);const i=`ck-input-${is()}`;const n=`ck-status-${is()}`;this.set(\"label\");this.set(\"value\");this.set(\"isReadOnly\",false);this.set(\"errorText\",null);this.set(\"infoText\",null);this.labelView=this._createLabelView(i);this.inputView=this._createInputView(e,i,n);this.statusView=this._createStatusView(n);this.bind(\"_statusText\").to(this,\"errorText\",this,\"infoText\",(t,e)=>t||e);const o=this.bindTemplate;this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-labeled-input\",o.if(\"isReadOnly\",\"ck-disabled\")]},children:[this.labelView,this.inputView,this.statusView]})}_createLabelView(t){const e=new Ab(this.locale);e.for=t;e.bind(\"text\").to(this,\"label\");return e}_createInputView(t,e,i){const n=new t(this.locale,i);n.id=e;n.ariaDescribedById=i;n.bind(\"value\").to(this);n.bind(\"isReadOnly\").to(this);n.bind(\"hasError\").to(this,\"errorText\",t=>!!t);n.on(\"input\",()=>{this.errorText=null});return n}_createStatusView(t){const e=new gb(this.locale);const i=this.bindTemplate;e.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-labeled-input__status\",i.if(\"errorText\",\"ck-labeled-input__status_error\"),i.if(\"_statusText\",\"ck-hidden\",t=>!t)],id:t,role:i.if(\"errorText\",\"alert\")},children:[{text:i.to(\"_statusText\")}]});return e}select(){this.inputView.select()}focus(){this.inputView.focus()}}var lk=i(54);class dk extends gb{constructor(t){super(t);this.set(\"value\");this.set(\"id\");this.set(\"placeholder\");this.set(\"isReadOnly\",false);this.set(\"hasError\",false);this.set(\"ariaDescribedById\");const e=this.bindTemplate;this.setTemplate({tag:\"input\",attributes:{type:\"text\",class:[\"ck\",\"ck-input\",\"ck-input-text\",e.if(\"hasError\",\"ck-error\")],id:e.to(\"id\"),placeholder:e.to(\"placeholder\"),readonly:e.to(\"isReadOnly\"),\"aria-invalid\":e.if(\"hasError\",true),\"aria-describedby\":e.to(\"ariaDescribedById\")},on:{input:e.to(\"input\")}})}render(){super.render();const t=t=>{this.element.value=!t&&t!==0?\"\":t};t(this.value);this.on(\"change:value\",(e,i,n)=>{t(n)})}select(){this.element.select()}focus(){this.element.focus()}}function uk({view:t}){t.listenTo(t.element,\"submit\",(e,i)=>{i.preventDefault();t.fire(\"submit\")},{useCapture:true})}var hk='<svg 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\"/></svg>';var fk='<svg 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\"/></svg>';var mk=i(56);class gk extends gb{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new xp;this.keystrokes=new dp;this.labeledInput=this._createLabeledInputView();this.saveButtonView=this._createButton(e(\"lv\"),hk,\"ck-button-save\");this.saveButtonView.type=\"submit\";this.cancelButtonView=this._createButton(e(\"lw\"),fk,\"ck-button-cancel\",\"cancel\");this._focusables=new Bp;this._focusCycler=new Nb({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);uk({view:this});[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)})}_createButton(t,e,i,n){const o=new Kb(this.locale);o.set({label:t,icon:e,tooltip:true});o.extendTemplate({attributes:{class:i}});if(n){o.delegate(\"execute\").to(this,n)}return o}_createLabeledInputView(){const t=this.locale.t;const e=new ck(this.locale,dk);e.label=t(\"lx\");e.inputView.placeholder=t(\"lx\");return e}}var pk=i(58);const bk=Mb(\"px\");const wk=Nd.document.body;class _k extends gb{constructor(t){super(t);const e=this.bindTemplate;this.set(\"top\",0);this.set(\"left\",0);this.set(\"position\",\"arrow_nw\");this.set(\"isVisible\",false);this.set(\"withArrow\",true);this.set(\"class\");this.content=this.createCollection();this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-balloon-panel\",e.to(\"position\",t=>`ck-balloon-panel_${t}`),e.if(\"isVisible\",\"ck-balloon-panel_visible\"),e.if(\"withArrow\",\"ck-balloon-panel_with-arrow\"),e.to(\"class\")],style:{top:e.to(\"top\",bk),left:e.to(\"left\",bk)}},children:this.content})}show(){this.isVisible=true}hide(){this.isVisible=false}attachTo(t){this.show();const e=_k.defaultPositions;const i=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthMiddleWest,e.southArrowNorthMiddleEast,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthMiddleWest,e.northArrowSouthMiddleEast,e.northArrowSouthWest,e.northArrowSouthEast],limiter:wk,fitInViewport:true},t);const n=_k._getOptimalPosition(i);const o=parseInt(n.left);const r=parseInt(n.top);const s=n.name;Object.assign(this,{top:r,left:o,position:s})}pin(t){this.unpin();this._pinWhenIsVisibleCallback=()=>{if(this.isVisible){this._startPinning(t)}else{this._stopPinning()}};this._startPinning(t);this.listenTo(this,\"change:isVisible\",this._pinWhenIsVisibleCallback)}unpin(){if(this._pinWhenIsVisibleCallback){this._stopPinning();this.stopListening(this,\"change:isVisible\",this._pinWhenIsVisibleCallback);this._pinWhenIsVisibleCallback=null;this.hide()}}_startPinning(t){this.attachTo(t);const e=kk(t.target);const i=t.limiter?kk(t.limiter):wk;this.listenTo(Nd.document,\"scroll\",(n,o)=>{const r=o.target;const s=e&&r.contains(e);const a=i&&r.contains(i);if(s||a||!e||!i){this.attachTo(t)}},{useCapture:true});this.listenTo(Nd.window,\"resize\",()=>{this.attachTo(t)})}_stopPinning(){this.stopListening(Nd.document,\"scroll\");this.stopListening(Nd.window,\"resize\")}}function kk(t){if(Gr(t)){return t}if(wh(t)){return t.commonAncestorContainer}if(typeof t==\"function\"){return kk(t())}return null}_k.arrowHorizontalOffset=25;_k.arrowVerticalOffset=10;_k._getOptimalPosition=Hb;_k.defaultPositions={northWestArrowSouthWest:(t,e)=>({top:vk(t,e),left:t.left-_k.arrowHorizontalOffset,name:\"arrow_sw\"}),northWestArrowSouthMiddleWest:(t,e)=>({top:vk(t,e),left:t.left-e.width*.25-_k.arrowHorizontalOffset,name:\"arrow_smw\"}),northWestArrowSouth:(t,e)=>({top:vk(t,e),left:t.left-e.width/2,name:\"arrow_s\"}),northWestArrowSouthMiddleEast:(t,e)=>({top:vk(t,e),left:t.left-e.width*.75+_k.arrowHorizontalOffset,name:\"arrow_sme\"}),northWestArrowSouthEast:(t,e)=>({top:vk(t,e),left:t.left-e.width+_k.arrowHorizontalOffset,name:\"arrow_se\"}),northArrowSouthWest:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-_k.arrowHorizontalOffset,name:\"arrow_sw\"}),northArrowSouthMiddleWest:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-e.width*.25-_k.arrowHorizontalOffset,name:\"arrow_smw\"}),northArrowSouth:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-e.width/2,name:\"arrow_s\"}),northArrowSouthMiddleEast:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-e.width*.75+_k.arrowHorizontalOffset,name:\"arrow_sme\"}),northArrowSouthEast:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-e.width+_k.arrowHorizontalOffset,name:\"arrow_se\"}),northEastArrowSouthWest:(t,e)=>({top:vk(t,e),left:t.right-_k.arrowHorizontalOffset,name:\"arrow_sw\"}),northEastArrowSouthMiddleWest:(t,e)=>({top:vk(t,e),left:t.right-e.width*.25-_k.arrowHorizontalOffset,name:\"arrow_smw\"}),northEastArrowSouth:(t,e)=>({top:vk(t,e),left:t.right-e.width/2,name:\"arrow_s\"}),northEastArrowSouthMiddleEast:(t,e)=>({top:vk(t,e),left:t.right-e.width*.75+_k.arrowHorizontalOffset,name:\"arrow_sme\"}),northEastArrowSouthEast:(t,e)=>({top:vk(t,e),left:t.right-e.width+_k.arrowHorizontalOffset,name:\"arrow_se\"}),southWestArrowNorthWest:(t,e)=>({top:yk(t,e),left:t.left-_k.arrowHorizontalOffset,name:\"arrow_nw\"}),southWestArrowNorthMiddleWest:(t,e)=>({top:yk(t,e),left:t.left-e.width*.25-_k.arrowHorizontalOffset,name:\"arrow_nmw\"}),southWestArrowNorth:(t,e)=>({top:yk(t,e),left:t.left-e.width/2,name:\"arrow_n\"}),southWestArrowNorthMiddleEast:(t,e)=>({top:yk(t,e),left:t.left-e.width*.75+_k.arrowHorizontalOffset,name:\"arrow_nme\"}),southWestArrowNorthEast:(t,e)=>({top:yk(t,e),left:t.left-e.width+_k.arrowHorizontalOffset,name:\"arrow_ne\"}),southArrowNorthWest:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-_k.arrowHorizontalOffset,name:\"arrow_nw\"}),southArrowNorthMiddleWest:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-e.width*.25-_k.arrowHorizontalOffset,name:\"arrow_nmw\"}),southArrowNorth:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-e.width/2,name:\"arrow_n\"}),southArrowNorthMiddleEast:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-e.width*.75+_k.arrowHorizontalOffset,name:\"arrow_nme\"}),southArrowNorthEast:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-e.width+_k.arrowHorizontalOffset,name:\"arrow_ne\"}),southEastArrowNorthWest:(t,e)=>({top:yk(t,e),left:t.right-_k.arrowHorizontalOffset,name:\"arrow_nw\"}),southEastArrowNorthMiddleWest:(t,e)=>({top:yk(t,e),left:t.right-e.width*.25-_k.arrowHorizontalOffset,name:\"arrow_nmw\"}),southEastArrowNorth:(t,e)=>({top:yk(t,e),left:t.right-e.width/2,name:\"arrow_n\"}),southEastArrowNorthMiddleEast:(t,e)=>({top:yk(t,e),left:t.right-e.width*.75+_k.arrowHorizontalOffset,name:\"arrow_nme\"}),southEastArrowNorthEast:(t,e)=>({top:yk(t,e),left:t.right-e.width+_k.arrowHorizontalOffset,name:\"arrow_ne\"})};function vk(t,e){return t.top-e.height-_k.arrowVerticalOffset}function yk(t){return t.bottom+_k.arrowVerticalOffset}var xk='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z\"/></svg>';var Ak='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z\"/></svg>';var Ck=i(60);var Tk=i(62);const Ek=Mb(\"px\");class Mk extends Nw{static get pluginName(){return\"ContextualBalloon\"}constructor(t){super(t);this.positionLimiter=()=>{const t=this.editor.editing.view;const e=t.document;const i=e.selection.editableElement;if(i){return t.domConverter.mapViewToDom(i.root)}return null};this.set(\"visibleView\",null);this.view=new _k(t.locale);t.ui.view.body.add(this.view);t.ui.focusTracker.add(this.view.element);this._viewToStack=new Map;this._idToStack=new Map;this.set(\"_numberOfStacks\",0);this.set(\"_singleViewMode\",false);this._rotatorView=this._createRotatorView();this._fakePanelsView=this._createFakePanelsView()}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this.hasView(t.view)){throw new ss[\"b\"](\"contextualballoon-add-view-exist: Cannot add configuration of the same view twice.\",[this,t])}const e=t.stackId||\"main\";if(!this._idToStack.has(e)){this._idToStack.set(e,new Map([[t.view,t]]));this._viewToStack.set(t.view,this._idToStack.get(e));this._numberOfStacks=this._idToStack.size;if(!this._visibleStack||t.singleViewMode){this.showStack(e)}return}const i=this._idToStack.get(e);if(t.singleViewMode){this.showStack(e)}i.set(t.view,t);this._viewToStack.set(t.view,i);if(i===this._visibleStack){this._showView(t)}}remove(t){if(!this.hasView(t)){throw new ss[\"b\"](\"contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.\",[this,t])}const e=this._viewToStack.get(t);if(this._singleViewMode&&this.visibleView===t){this._singleViewMode=false}if(this.visibleView===t){if(e.size===1){if(this._idToStack.size>1){this._showNextStack()}else{this.view.hide();this.visibleView=null;this._rotatorView.hideView()}}else{this._showView(Array.from(e.values())[e.size-2])}}if(e.size===1){this._idToStack.delete(this._getStackId(e));this._numberOfStacks=this._idToStack.size}else{e.delete(t)}this._viewToStack.delete(t)}updatePosition(t){if(t){this._visibleStack.get(this.visibleView).position=t}this.view.pin(this._getBalloonPosition());this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e){throw new ss[\"b\"](\"contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.\",this)}if(this._visibleStack===e){return}this._showView(Array.from(e.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){const e=Array.from(this._idToStack.entries()).find(e=>e[1]===t);return e[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;if(!t[e]){e=0}this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;if(!t[e]){e=t.length-1}this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new Pk(this.editor.locale);const e=this.editor.locale.t;this.view.content.add(t);t.bind(\"isNavigationVisible\").to(this,\"_numberOfStacks\",this,\"_singleViewMode\",(t,e)=>!e&&t>1);t.on(\"change:isNavigationVisible\",()=>this.updatePosition(),{priority:\"low\"});t.bind(\"counter\").to(this,\"visibleView\",this,\"_numberOfStacks\",(t,i)=>{if(i<2){return\"\"}const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e(\"ma\",[n,i])});t.buttonNextView.on(\"execute\",()=>{if(t.focusTracker.isFocused){this.editor.editing.view.focus()}this._showNextStack()});t.buttonPrevView.on(\"execute\",()=>{if(t.focusTracker.isFocused){this.editor.editing.view.focus()}this._showPrevStack()});return t}_createFakePanelsView(){const t=new Sk(this.editor.locale,this.view);t.bind(\"numberOfPanels\").to(this,\"_numberOfStacks\",this,\"_singleViewMode\",(t,e)=>{const i=!e&&t>=2;return i?Math.min(t-1,2):0});t.listenTo(this.view,\"change:top\",()=>t.updatePosition());t.listenTo(this.view,\"change:left\",()=>t.updatePosition());this.editor.ui.view.body.add(t);return t}_showView({view:t,balloonClassName:e=\"\",withArrow:i=true,singleViewMode:n=false}){this.view.class=e;this.view.withArrow=i;this._rotatorView.showView(t);this.visibleView=t;this.view.pin(this._getBalloonPosition());this._fakePanelsView.updatePosition();if(n){this._singleViewMode=true}}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;if(t&&!t.limiter){t=Object.assign({},t,{limiter:this.positionLimiter})}return t}}class Pk extends gb{constructor(t){super(t);const e=t.t;const i=this.bindTemplate;this.set(\"isNavigationVisible\",true);this.focusTracker=new xp;this.buttonPrevView=this._createButtonView(e(\"mb\"),xk);this.buttonNextView=this._createButtonView(e(\"mc\"),Ak);this.content=this.createCollection();this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-balloon-rotator\"],\"z-index\":\"-1\"},children:[{tag:\"div\",attributes:{class:[\"ck-balloon-rotator__navigation\",i.to(\"isNavigationVisible\",t=>t?\"\":\"ck-hidden\")]},children:[this.buttonPrevView,{tag:\"span\",attributes:{class:[\"ck-balloon-rotator__counter\"]},children:[{text:i.to(\"counter\")}]},this.buttonNextView]},{tag:\"div\",attributes:{class:\"ck-balloon-rotator__content\"},children:this.content}]})}render(){super.render();this.focusTracker.add(this.element)}showView(t){this.hideView();this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const i=new Kb(this.locale);i.set({label:t,icon:e,tooltip:true});return i}}class Sk extends gb{constructor(t,e){super(t);const i=this.bindTemplate;this.set(\"top\",0);this.set(\"left\",0);this.set(\"height\",0);this.set(\"width\",0);this.set(\"numberOfPanels\",0);this.content=this.createCollection();this._balloonPanelView=e;this.setTemplate({tag:\"div\",attributes:{class:[\"ck-fake-panel\",i.to(\"numberOfPanels\",t=>t?\"\":\"ck-hidden\")],style:{top:i.to(\"top\",Ek),left:i.to(\"left\",Ek),width:i.to(\"width\",Ek),height:i.to(\"height\",Ek)}},children:this.content});this.on(\"change:numberOfPanels\",(t,e,i,n)=>{if(i>n){this._addPanels(i-n)}else{this._removePanels(n-i)}this.updatePosition()})}_addPanels(t){while(t--){const t=new gb;t.setTemplate({tag:\"div\"});this.content.add(t);this.registerChild(t)}}_removePanels(t){while(t--){const t=this.content.last;this.content.remove(t);this.deregisterChild(t);t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView;const{width:i,height:n}=new vh(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:i,height:n})}}}var Ik='<svg 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.012a2.45 2.45 0 0 1 2.017 1.513c.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\"/></svg>';function Nk(t){const e=t.plugins.get(\"ContextualBalloon\");if(z_(t.editing.view.document.selection)){const i=Ok(t);e.updatePosition(i)}}function Ok(t){const e=t.editing.view;const i=_k.defaultPositions;return{target:e.domConverter.viewToDom(e.document.selection.getSelectedElement()),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast]}}class Lk extends Nw{static get requires(){return[Mk]}static get pluginName(){return\"ImageTextAlternativeUI\"}init(){this._createButton();this._createForm()}destroy(){super.destroy();this._form.destroy()}_createButton(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(\"imageTextAlternative\",i=>{const n=t.commands.get(\"imageTextAlternative\");const o=new Kb(i);o.set({label:e(\"ks\"),icon:Ik,tooltip:true});o.bind(\"isEnabled\").to(n,\"isEnabled\");this.listenTo(o,\"execute\",()=>{this._showForm()});return o})}_createForm(){const t=this.editor;const e=t.editing.view;const i=e.document;this._balloon=this.editor.plugins.get(\"ContextualBalloon\");this._form=new gk(t.locale);this._form.render();this.listenTo(this._form,\"submit\",()=>{t.execute(\"imageTextAlternative\",{newValue:this._form.labeledInput.inputView.element.value});this._hideForm(true)});this.listenTo(this._form,\"cancel\",()=>{this._hideForm(true)});this._form.keystrokes.set(\"Esc\",(t,e)=>{this._hideForm(true);e()});this.listenTo(t.ui,\"update\",()=>{if(!z_(i.selection)){this._hideForm(true)}else if(this._isVisible){Nk(t)}});aw({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible){return}const t=this.editor;const e=t.commands.get(\"imageTextAlternative\");const i=this._form.labeledInput;if(!this._isInBalloon){this._balloon.add({view:this._form,position:Ok(t)})}i.value=i.inputView.element.value=e.value||\"\";this._form.labeledInput.select()}_hideForm(t){if(!this._isInBalloon){return}if(this._form.focusTracker.isFocused){this._form.saveButtonView.focus()}this._balloon.remove(this._form);if(t){this.editor.editing.view.focus()}}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class zk extends Nw{static get requires(){return[sk,Lk]}static get pluginName(){return\"ImageTextAlternative\"}}var Rk=i(64);class jk extends Nw{static get requires(){return[G_,Z_,zk]}static get pluginName(){return\"Image\"}}function Dk(t,e){return i=>{const n=i.createEditableElement(\"figcaption\");i.setCustomProperty(\"imageCaption\",true,n);Pp({view:t,element:n,text:e});return M_(n,i)}}function Bk(t){return!!t.getCustomProperty(\"imageCaption\")}function Vk(t){for(const e of t.getChildren()){if(!!e&&e.is(\"caption\")){return e}}return null}function Fk(t){const e=t.parent;if(t.name==\"figcaption\"&&e&&e.name==\"figure\"&&e.hasClass(\"image\")){return{name:true}}return null}class Hk extends Nw{static get pluginName(){return\"ImageCaptionEditing\"}init(){const t=this.editor;const e=t.editing.view;const i=t.model.schema;const n=t.data;const o=t.editing;const r=t.t;i.register(\"caption\",{allowIn:\"image\",allowContentOf:\"$block\",isLimit:true});t.model.document.registerPostFixer(t=>this._insertMissingModelCaptionElement(t));t.conversion.for(\"upcast\").elementToElement({view:Fk,model:\"caption\"});const s=t=>t.createContainerElement(\"figcaption\");n.downcastDispatcher.on(\"insert:caption\",Wk(s,false));const a=Dk(e,r(\"jl\"));o.downcastDispatcher.on(\"insert:caption\",Wk(a));o.downcastDispatcher.on(\"insert\",this._fixCaptionVisibility(t=>t.item),{priority:\"high\"});o.downcastDispatcher.on(\"remove\",this._fixCaptionVisibility(t=>t.position.parent),{priority:\"high\"});e.document.registerPostFixer(t=>this._updateCaptionVisibility(t))}_updateCaptionVisibility(t){const e=this.editor.editing.mapper;const i=this._lastSelectedCaption;let n;const o=this.editor.model.document.selection;const r=o.getSelectedElement();if(r&&r.is(\"image\")){const t=Vk(r);n=e.toViewElement(t)}const s=o.getFirstPosition();const a=qk(s.parent);if(a){n=e.toViewElement(a)}if(n){if(i){if(i===n){return Yk(n,t)}else{$k(i,t);this._lastSelectedCaption=n;return Yk(n,t)}}else{this._lastSelectedCaption=n;return Yk(n,t)}}else{if(i){const e=$k(i,t);this._lastSelectedCaption=null;return e}else{return false}}}_fixCaptionVisibility(t){return(e,i,n)=>{const o=t(i);const r=qk(o);const s=this.editor.editing.mapper;const a=n.writer;if(r){const t=s.toViewElement(r);if(t){if(r.childCount){a.removeClass(\"ck-hidden\",t)}else{a.addClass(\"ck-hidden\",t)}}}}}_insertMissingModelCaptionElement(t){const e=this.editor.model;const i=e.document.differ.getChanges();const n=[];for(const t of i){if(t.type==\"insert\"&&t.name!=\"$text\"){const i=t.position.nodeAfter;if(i.is(\"image\")&&!Vk(i)){n.push(i)}if(!i.is(\"image\")&&i.childCount){for(const t of e.createRangeIn(i).getItems()){if(t.is(\"image\")&&!Vk(t)){n.push(t)}}}}}for(const e of n){t.appendElement(\"caption\",e)}return!!n.length}}function Wk(t,e=true){return(i,n,o)=>{const r=n.item;if(!r.childCount&&!e){return}if(R_(r.parent)){if(!o.consumable.consume(n.item,\"insert\")){return}const e=o.mapper.toViewElement(n.range.start.parent);const i=t(o.writer);const s=o.writer;if(!r.childCount){s.addClass(\"ck-hidden\",i)}Uk(i,n.item,e,o)}}}function Uk(t,e,i,n){const o=n.writer.createPositionAt(i,\"end\");n.writer.insert(o,t);n.mapper.bindElements(e,t)}function qk(t){const e=t.getAncestors({includeSelf:true});const i=e.find(t=>t.name==\"caption\");if(i&&i.parent&&i.parent.name==\"image\"){return i}return null}function $k(t,e){if(!t.childCount&&!t.hasClass(\"ck-hidden\")){e.addClass(\"ck-hidden\",t);return true}return false}function Yk(t,e){if(t.hasClass(\"ck-hidden\")){e.removeClass(\"ck-hidden\",t);return true}return false}var Gk=i(66);class Jk extends Nw{static get requires(){return[Hk]}static get pluginName(){return\"ImageCaption\"}}class Xk extends Rw{constructor(t,e){super(t);this.defaultStyle=false;this.styles=e.reduce((t,e)=>{t[e.name]=e;if(e.isDefault){this.defaultStyle=e.name}return t},{})}refresh(){const t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=R_(t);if(!t){this.value=false}else if(t.hasAttribute(\"imageStyle\")){const e=t.getAttribute(\"imageStyle\");this.value=this.styles[e]?e:false}else{this.value=this.defaultStyle}}execute(t){const e=t.value;const i=this.editor.model;const n=i.document.selection.getSelectedElement();i.change(t=>{if(this.styles[e].isDefault){t.removeAttribute(\"imageStyle\",n)}else{t.setAttribute(\"imageStyle\",e,n)}})}}function Qk(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,e.name)){return}const o=Zk(i.attributeNewValue,t);const r=Zk(i.attributeOldValue,t);const s=n.mapper.toViewElement(i.item);const a=n.writer;if(r){a.removeClass(r.className,s)}if(o){a.addClass(o.className,s)}}}function Kk(t){const e=t.filter(t=>!t.isDefault);return(t,i,n)=>{if(!i.modelRange){return}const o=i.viewItem;const r=Dw(i.modelRange.getItems());if(!n.schema.checkAttribute(r,\"imageStyle\")){return}for(const t of e){if(n.consumable.consume(o,{classes:t.className})){n.writer.setAttribute(\"imageStyle\",t.name,r)}}}}function Zk(t,e){for(const i of e){if(i.name===t){return i}}}var tv='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 4.5V3h16v1.5zm2.5 3V12h11V7.5h-11zM4.061 6H15.94c.586 0 1.061.407 1.061.91v5.68c0 .503-.475.91-1.061.91H4.06c-.585 0-1.06-.407-1.06-.91V6.91C3 6.406 3.475 6 4.061 6zM2 16.5V15h16v1.5z\"/></svg>';var ev='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" 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\"/></svg>';var iv='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 4.5V3h16v1.5zm4.5 3V12h7V7.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\"/></svg>';var nv='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 4.5V3h16v1.5zm0 3V6h5.674v1.5zm0 3V9h5.674v1.5zm0 3V12h5.674v1.5zm8.5-6V12h6V7.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\"/></svg>';const ov={full:{name:\"full\",title:\"Full size image\",icon:tv,isDefault:true},side:{name:\"side\",title:\"Side image\",icon:nv,className:\"image-style-side\"},alignLeft:{name:\"alignLeft\",title:\"Left aligned image\",icon:ev,className:\"image-style-align-left\"},alignCenter:{name:\"alignCenter\",title:\"Centered image\",icon:iv,className:\"image-style-align-center\"},alignRight:{name:\"alignRight\",title:\"Right aligned image\",icon:nv,className:\"image-style-align-right\"}};const rv={full:tv,left:ev,right:nv,center:iv};function sv(t=[]){return t.map(av)}function av(t){if(typeof t==\"string\"){const e=t;if(ov[e]){t=Object.assign({},ov[e])}else{console.warn(Object(ss[\"a\"])(\"image-style-not-found: There is no such image style of given name.\"),{name:e});t={name:e}}}else if(ov[t.name]){const e=ov[t.name];const i=Object.assign({},t);for(const n in e){if(!t.hasOwnProperty(n)){i[n]=e[n]}}t=i}if(typeof t.icon==\"string\"&&rv[t.icon]){t.icon=rv[t.icon]}return t}class cv extends Nw{static get pluginName(){return\"ImageStyleEditing\"}init(){const t=this.editor;const e=t.model.schema;const i=t.data;const n=t.editing;t.config.define(\"image.styles\",[\"full\",\"side\"]);const o=sv(t.config.get(\"image.styles\"));e.extend(\"image\",{allowAttributes:\"imageStyle\"});const r=Qk(o);n.downcastDispatcher.on(\"attribute:imageStyle:image\",r);i.downcastDispatcher.on(\"attribute:imageStyle:image\",r);i.upcastDispatcher.on(\"element:figure\",Kk(o),{priority:\"low\"});t.commands.add(\"imageStyle\",new Xk(t,o))}}var lv=i(68);class dv extends Nw{static get pluginName(){return\"ImageStyleUI\"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{\"Full size image\":t(\"jm\"),\"Side image\":t(\"jn\"),\"Left aligned image\":t(\"jo\"),\"Centered image\":t(\"jp\"),\"Right aligned image\":t(\"jq\")}}init(){const t=this.editor;const e=t.config.get(\"image.styles\");const i=uv(sv(e),this.localizedDefaultStylesTitles);for(const t of i){this._createButton(t)}}_createButton(t){const e=this.editor;const i=`imageStyle:${t.name}`;e.ui.componentFactory.add(i,i=>{const n=e.commands.get(\"imageStyle\");const o=new Kb(i);o.set({label:t.title,icon:t.icon,tooltip:true,isToggleable:true});o.bind(\"isEnabled\").to(n,\"isEnabled\");o.bind(\"isOn\").to(n,\"value\",e=>e===t.name);this.listenTo(o,\"execute\",()=>{e.execute(\"imageStyle\",{value:t.name});e.editing.view.focus()});return o})}}function uv(t,e){for(const i of t){if(e[i.title]){i.title=e[i.title]}}return t}class hv extends Nw{static get requires(){return[cv,dv]}static get pluginName(){return\"ImageStyle\"}}class fv extends Nw{static get requires(){return[Mk]}static get pluginName(){return\"WidgetToolbarRepository\"}init(){const t=this.editor;if(t.plugins.has(\"BalloonToolbar\")){const e=t.plugins.get(\"BalloonToolbar\");this.listenTo(e,\"show\",e=>{if(pv(t.editing.view.document.selection)){e.stop()}},{priority:\"high\"})}this._toolbarDefinitions=new Map;this._balloon=this.editor.plugins.get(\"ContextualBalloon\");this.on(\"change:isEnabled\",()=>{this._updateToolbarsVisibility()});this.listenTo(t.ui,\"update\",()=>{this._updateToolbarsVisibility()});this.listenTo(t.ui.focusTracker,\"change:isFocused\",()=>{this._updateToolbarsVisibility()},{priority:\"low\"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values()){t.view.destroy()}}register(t,{ariaLabel:e,items:i,getRelatedElement:n,balloonClassName:o=\"ck-toolbar-container\"}){const r=this.editor;const s=r.t;const a=new _w(r.locale);a.ariaLabel=e||s(\"jt\");if(this._toolbarDefinitions.has(t)){throw new ss[\"b\"](\"widget-toolbar-duplicated: Toolbar with the given id was already added.\",this,{toolbarId:t})}a.fillFromConfig(i,r.ui.componentFactory);this._toolbarDefinitions.set(t,{view:a,getRelatedElement:n,balloonClassName:o})}_updateToolbarsVisibility(){let t=0;let e=null;let i=null;for(const n of this._toolbarDefinitions.values()){const o=n.getRelatedElement(this.editor.editing.view.document.selection);if(!this.isEnabled||!o){if(this._isToolbarInBalloon(n)){this._hideToolbar(n)}}else if(!this.editor.ui.focusTracker.isFocused){if(this._isToolbarVisible(n)){this._hideToolbar(n)}}else{const r=o.getAncestors().length;if(r>t){t=r;e=o;i=n}}}if(i){this._showToolbar(i,e)}}_hideToolbar(t){this._balloon.remove(t.view);this.stopListening(this._balloon,\"change:visibleView\")}_showToolbar(t,e){if(this._isToolbarVisible(t)){mv(this.editor,e)}else if(!this._isToolbarInBalloon(t)){this._balloon.add({view:t.view,position:gv(this.editor,e),balloonClassName:t.balloonClassName});this.listenTo(this._balloon,\"change:visibleView\",()=>{for(const t of this._toolbarDefinitions.values()){if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);mv(this.editor,e)}}})}}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function mv(t,e){const i=t.plugins.get(\"ContextualBalloon\");const n=gv(t,e);i.updatePosition(n)}function gv(t,e){const i=t.editing.view;const n=_k.defaultPositions;return{target:i.domConverter.mapViewToDom(e),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}function pv(t){const e=t.getSelectedElement();return!!(e&&x_(e))}class bv extends Nw{static get requires(){return[fv]}static get pluginName(){return\"ImageToolbar\"}afterInit(){const t=this.editor;const e=t.t;const i=t.plugins.get(fv);i.register(\"image\",{ariaLabel:e(\"a\"),items:t.config.get(\"image.toolbar\")||[],getRelatedElement:z_})}}class wv extends gb{constructor(t){super(t);this.buttonView=new Kb(t);this._fileInputView=new _v(t);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 _v extends gb{constructor(t){super(t);this.set(\"acceptedType\");this.set(\"allowMultipleFiles\",false);const e=this.bindTemplate;this.setTemplate({tag:\"input\",attributes:{class:[\"ck-hidden\"],type:\"file\",tabindex:\"-1\",accept:e.to(\"acceptedType\"),multiple:e.to(\"allowMultipleFiles\")},on:{change:e.to(()=>{if(this.element&&this.element.files&&this.element.files.length){this.fire(\"done\",this.element.files)}this.element.value=\"\"})}})}open(){this.element.click()}}var kv='<svg viewBox=\"0 0 20 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\"/></svg>';function vv(t){const e=t.map(t=>t.replace(\"+\",\"\\\\+\"));return new RegExp(`^image\\\\/(${e.join(\"|\")})$`)}function yv(t){return new Promise((e,i)=>{const n=t.getAttribute(\"src\");fetch(n).then(t=>t.blob()).then(t=>{const o=Av(t,n);const r=o.replace(\"image/\",\"\");const s=`image.${r}`;const a=Cv(t,s,o);a?e(a):i()}).catch(i)})}function xv(t){if(!t.is(\"element\",\"img\")||!t.getAttribute(\"src\")){return false}return t.getAttribute(\"src\").match(/^data:image\\/\\w+;base64,/g)||t.getAttribute(\"src\").match(/^blob:/g)}function Av(t,e){if(t.type){return t.type}else if(e.match(/data:(image\\/\\w+);base64/)){return e.match(/data:(image\\/\\w+);base64/)[1].toLowerCase()}else{return\"image/jpeg\"}}function Cv(t,e,i){try{return new File([t],e,{type:i})}catch(t){return null}}class Tv extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(\"imageUpload\",i=>{const n=new wv(i);const o=t.commands.get(\"imageUpload\");const r=t.config.get(\"image.upload.types\");const s=vv(r);n.set({acceptedType:r.map(t=>`image/${t}`).join(\",\"),allowMultipleFiles:true});n.buttonView.set({label:e(\"jr\"),icon:kv,tooltip:true});n.buttonView.bind(\"isEnabled\").to(o);n.on(\"done\",(e,i)=>{const n=Array.from(i).filter(t=>s.test(t.type));if(n.length){t.execute(\"imageUpload\",{file:n})}});return n})}}class Ev{constructor(t){this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return true}}vs(Ev,Jc);class Mv extends Ev{static get pluginName(){return\"PendingActions\"}init(){this.set(\"hasAny\",false);this._actions=new ys({idProperty:\"_id\"});this._actions.delegate(\"add\",\"remove\").to(this)}add(t){if(typeof t!==\"string\"){throw new ss[\"b\"](\"pendingactions-add-invalid-message: The message must be a string.\",this)}const e=Object.create(Jc);e.set(\"message\",t);this._actions.add(e);this.hasAny=true;return e}remove(t){this._actions.remove(t);this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class Pv{constructor(){const t=new window.FileReader;this._reader=t;this._data=undefined;this.set(\"loaded\",0);t.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;this.total=t.size;return new Promise((i,n)=>{e.onload=()=>{const t=e.result;this._data=t;i(t)};e.onerror=()=>{n(\"error\")};e.onabort=()=>{n(\"aborted\")};this._reader.readAsDataURL(t)})}abort(){this._reader.abort()}}vs(Pv,Jc);class Sv extends Nw{static get pluginName(){return\"FileRepository\"}static get requires(){return[Mv]}init(){this.loaders=new ys;this.loaders.on(\"add\",()=>this._updatePendingAction());this.loaders.on(\"remove\",()=>this._updatePendingAction());this._loadersMap=new Map;this._pendingAction=null;this.set(\"uploaded\",0);this.set(\"uploadTotal\",null);this.bind(\"uploadedPercent\").to(this,\"uploaded\",this,\"uploadTotal\",(t,e)=>e?t/e*100:0)}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter){console.warn(Object(ss[\"a\"])(\"filerepository-no-upload-adapter: Upload adapter is not defined.\"));return null}const e=new Iv(Promise.resolve(t),this.createUploadAdapter);this.loaders.add(e);this._loadersMap.set(t,e);if(t instanceof Promise){e.file.then(t=>{this._loadersMap.set(t,e)}).catch(()=>{})}e.on(\"change:uploaded\",()=>{let t=0;for(const e of this.loaders){t+=e.uploaded}this.uploaded=t});e.on(\"change:uploadTotal\",()=>{let t=0;for(const e of this.loaders){if(e.uploadTotal){t+=e.uploadTotal}}this.uploadTotal=t});return e}destroyLoader(t){const e=t instanceof Iv?t:this.getLoader(t);e._destroy();this.loaders.remove(e);this._loadersMap.forEach((t,i)=>{if(t===e){this._loadersMap.delete(i)}})}_updatePendingAction(){const t=this.editor.plugins.get(Mv);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t;const i=t=>`${e(\"kj\")} ${parseInt(t)}%.`;this._pendingAction=t.add(i(this.uploadedPercent));this._pendingAction.bind(\"message\").to(this,\"uploadedPercent\",i)}}else{t.remove(this._pendingAction);this._pendingAction=null}}}vs(Sv,Jc);class Iv{constructor(t,e){this.id=is();this._filePromiseWrapper=this._createFilePromiseWrapper(t);this._adapter=e(this);this._reader=new Pv;this.set(\"status\",\"idle\");this.set(\"uploaded\",0);this.set(\"uploadTotal\",null);this.bind(\"uploadedPercent\").to(this,\"uploaded\",this,\"uploadTotal\",(t,e)=>e?t/e*100:0);this.set(\"uploadResponse\",null)}get file(){if(!this._filePromiseWrapper){return Promise.resolve(null)}else{return this._filePromiseWrapper.promise.then(t=>this._filePromiseWrapper?t:null)}}get data(){return this._reader.data}read(){if(this.status!=\"idle\"){throw new ss[\"b\"](\"filerepository-read-wrong-status: You cannot call read if the status is different than idle.\",this)}this.status=\"reading\";return this.file.then(t=>this._reader.read(t)).then(t=>{this.status=\"idle\";return t}).catch(t=>{if(t===\"aborted\"){this.status=\"aborted\";throw\"aborted\"}this.status=\"error\";throw this._reader.error?this._reader.error:t})}upload(){if(this.status!=\"idle\"){throw new ss[\"b\"](\"filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.\",this)}this.status=\"uploading\";return this.file.then(()=>this._adapter.upload()).then(t=>{this.uploadResponse=t;this.status=\"idle\";return t}).catch(t=>{if(this.status===\"aborted\"){throw\"aborted\"}this.status=\"error\";throw t})}abort(){const t=this.status;this.status=\"aborted\";if(!this._filePromiseWrapper.isFulfilled){this._filePromiseWrapper.promise.catch(()=>{});this._filePromiseWrapper.rejecter(\"aborted\")}else if(t==\"reading\"){this._reader.abort()}else if(t==\"uploading\"&&this._adapter.abort){this._adapter.abort()}this._destroy()}_destroy(){this._filePromiseWrapper=undefined;this._reader=undefined;this._adapter=undefined;this.uploadResponse=undefined}_createFilePromiseWrapper(t){const e={};e.promise=new Promise((i,n)=>{e.rejecter=n;e.isFulfilled=false;t.then(t=>{e.isFulfilled=true;i(t)}).catch(t=>{e.isFulfilled=true;n(t)})});return e}}vs(Iv,Jc);var Nv='<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 700 250\"><rect rx=\"4\"/></svg>';var Ov=i(70);var Lv=i(72);var zv=i(74);class Rv extends Nw{constructor(t){super(t);this.placeholder=\"data:image/svg+xml;utf8,\"+encodeURIComponent(Nv)}init(){const t=this.editor;t.editing.downcastDispatcher.on(\"attribute:uploadStatus:image\",(...t)=>this.uploadStatusChange(...t))}uploadStatusChange(t,e,i){const n=this.editor;const o=e.item;const r=o.getAttribute(\"uploadId\");if(!i.consumable.consume(e.item,t.name)){return}const s=n.plugins.get(Sv);const a=r?e.attributeNewValue:null;const c=this.placeholder;const l=n.editing.mapper.toViewElement(o);const d=i.writer;if(a==\"reading\"){jv(l,d);Bv(c,l,d);return}if(a==\"uploading\"){const t=s.loaders.get(r);jv(l,d);if(!t){Bv(c,l,d)}else{Vv(l,d);Fv(l,d,t,n.editing.view);Gv(l,d,t)}return}if(a==\"complete\"&&s.loaders.get(r)&&!Cl.isEdge){Wv(l,d,n.editing.view)}Hv(l,d);Vv(l,d);Dv(l,d)}}function jv(t,e){if(!t.hasClass(\"ck-appear\")){e.addClass(\"ck-appear\",t)}}function Dv(t,e){e.removeClass(\"ck-appear\",t)}function Bv(t,e,i){if(!e.hasClass(\"ck-image-upload-placeholder\")){i.addClass(\"ck-image-upload-placeholder\",e)}const n=B_(e);if(n.getAttribute(\"src\")!==t){i.setAttribute(\"src\",t,n)}if(!$v(e,\"placeholder\")){i.insert(i.createPositionAfter(n),qv(i))}}function Vv(t,e){if(t.hasClass(\"ck-image-upload-placeholder\")){e.removeClass(\"ck-image-upload-placeholder\",t)}Yv(t,e,\"placeholder\")}function Fv(t,e,i,n){const o=Uv(e);e.insert(e.createPositionAt(t,\"end\"),o);i.on(\"change:uploadedPercent\",(t,e,i)=>{n.change(t=>{t.setStyle(\"width\",i+\"%\",o)})})}function Hv(t,e){Yv(t,e,\"progressBar\")}function Wv(t,e,i){const n=e.createUIElement(\"div\",{class:\"ck-image-upload-complete-icon\"});e.insert(e.createPositionAt(t,\"end\"),n);setTimeout(()=>{i.change(t=>t.remove(t.createRangeOn(n)))},3e3)}function Uv(t){const e=t.createUIElement(\"div\",{class:\"ck-progress-bar\"});t.setCustomProperty(\"progressBar\",true,e);return e}function qv(t){const e=t.createUIElement(\"div\",{class:\"ck-upload-placeholder-loader\"});t.setCustomProperty(\"placeholder\",true,e);return e}function $v(t,e){for(const i of t.getChildren()){if(i.getCustomProperty(e)){return i}}}function Yv(t,e,i){const n=$v(t,i);if(n){e.remove(e.createRangeOn(n))}}function Gv(t,e,i){if(i.data){const n=B_(t);e.setAttribute(\"src\",i.data,n)}}class Jv extends Ev{static get pluginName(){return\"Notification\"}init(){this.on(\"show:warning\",(t,e)=>{window.alert(e.message)},{priority:\"lowest\"})}showSuccess(t,e={}){this._showNotification({message:t,type:\"success\",namespace:e.namespace,title:e.title})}showInfo(t,e={}){this._showNotification({message:t,type:\"info\",namespace:e.namespace,title:e.title})}showWarning(t,e={}){this._showNotification({message:t,type:\"warning\",namespace:e.namespace,title:e.title})}_showNotification(t){const e=`show:${t.type}`+(t.namespace?`:${t.namespace}`:\"\");this.fire(e,{message:t.message,type:t.type,title:t.title||\"\"})}}class Xv{constructor(t){this.files=Qv(t);this._native=t}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}}function Qv(t){const e=t.files?Array.from(t.files):[];const i=t.items?Array.from(t.items):[];if(e.length){return e}return i.filter(t=>t.kind===\"file\").map(t=>t.getAsFile())}class Kv extends Ju{constructor(t){super(t);const e=this.document;this.domEventType=[\"paste\",\"copy\",\"cut\",\"drop\",\"dragover\"];this.listenTo(e,\"paste\",i,{priority:\"low\"});this.listenTo(e,\"drop\",i,{priority:\"low\"});function i(t,i){i.preventDefault();const n=i.dropRange?[i.dropRange]:Array.from(e.selection.getRanges());const o=new ts(e,\"clipboardInput\");e.fire(o,{dataTransfer:i.dataTransfer,targetRanges:n});if(o.stop.called){i.stopPropagation()}}}onDomEvent(t){const e={dataTransfer:new Xv(t.clipboardData?t.clipboardData:t.dataTransfer)};if(t.type==\"drop\"){e.dropRange=Zv(this.view,t)}this.fire(t.type,t,e)}}function Zv(t,e){const i=e.target.ownerDocument;const n=e.clientX;const o=e.clientY;let r;if(i.caretRangeFromPoint&&i.caretRangeFromPoint(n,o)){r=i.caretRangeFromPoint(n,o)}else if(e.rangeParent){r=i.createRange();r.setStart(e.rangeParent,e.rangeOffset);r.collapse(true)}if(r){return t.domConverter.domRangeToView(r)}else{return t.document.selection.getFirstRange()}}function ty(t){t=t.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\\n/g,\"</p><p>\").replace(/^\\s/,\"&nbsp;\").replace(/\\s$/,\"&nbsp;\").replace(/\\s\\s/g,\" &nbsp;\");if(t.indexOf(\"</p><p>\")>-1){t=`<p>${t}</p>`}return t}function ey(t){return t.replace(/<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g,(t,e)=>{if(e.length==1){return\" \"}return e})}const iy=[\"figcaption\",\"li\"];function ny(t){let e=\"\";if(t.is(\"text\")||t.is(\"textProxy\")){e=t.data}else if(t.is(\"img\")&&t.hasAttribute(\"alt\")){e=t.getAttribute(\"alt\")}else{let i=null;for(const n of t.getChildren()){const t=ny(n);if(i&&(i.is(\"containerElement\")||n.is(\"containerElement\"))){if(iy.includes(i.name)||iy.includes(n.name)){e+=\"\\n\"}else{e+=\"\\n\\n\"}}e+=t;i=n}}return e}class oy extends Nw{static get pluginName(){return\"Clipboard\"}init(){const t=this.editor;const e=t.model.document;const i=t.editing.view;const n=i.document;this._htmlDataProcessor=new kp(n);i.addObserver(Kv);this.listenTo(n,\"clipboardInput\",e=>{if(t.isReadOnly){e.stop()}},{priority:\"highest\"});this.listenTo(n,\"clipboardInput\",(t,e)=>{const n=e.dataTransfer;let o=\"\";if(n.getData(\"text/html\")){o=ey(n.getData(\"text/html\"))}else if(n.getData(\"text/plain\")){o=ty(n.getData(\"text/plain\"))}o=this._htmlDataProcessor.toView(o);this.fire(\"inputTransformation\",{content:o,dataTransfer:n});i.scrollToTheSelection()},{priority:\"low\"});this.listenTo(this,\"inputTransformation\",(t,e)=>{if(!e.content.isEmpty){const t=this.editor.data;const i=this.editor.model;const n=t.toModel(e.content,\"$clipboardHolder\");if(n.childCount==0){return}i.insertContent(n)}},{priority:\"low\"});function o(i,o){const r=o.dataTransfer;o.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));n.fire(\"clipboardOutput\",{dataTransfer:r,content:s,method:i.name})}this.listenTo(n,\"copy\",o,{priority:\"low\"});this.listenTo(n,\"cut\",(e,i)=>{if(t.isReadOnly){i.preventDefault()}else{o(e,i)}},{priority:\"low\"});this.listenTo(n,\"clipboardOutput\",(i,n)=>{if(!n.content.isEmpty){n.dataTransfer.setData(\"text/html\",this._htmlDataProcessor.toData(n.content));n.dataTransfer.setData(\"text/plain\",ny(n.content))}if(n.method==\"cut\"){t.model.deleteContent(e.selection)}},{priority:\"low\"})}}class ry{constructor(t){this.document=t}createDocumentFragment(t){return new Ul(this.document,t)}createElement(t,e,i){return new jc(this.document,t,e,i)}createText(t){return new Ds(this.document,t)}clone(t,e=false){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,i){return i._insertChild(t,e)}removeChildren(t,e,i){return i._removeChildren(t,e)}remove(t){const e=t.parent;if(e){return this.removeChildren(e.getChildIndex(t),1,e)}return[]}replace(t,e){const i=t.parent;if(i){const n=i.getChildIndex(t);this.removeChildren(n,1,i);this.insertChild(n,e,i);return true}return false}unwrapElement(t){const e=t.parent;if(e){const i=e.getChildIndex(t);this.remove(t);this.insertChild(i,t.getChildren(),e)}}rename(t,e){const i=new jc(this.document,t,e.getAttributes(),e.getChildren());return this.replace(e,i)?i:null}setAttribute(t,e,i){i._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,i){if(L(t)&&i===undefined){i=e}i._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,i){i._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return dl._createAt(t,e)}createPositionAfter(t){return dl._createAfter(t)}createPositionBefore(t){return dl._createBefore(t)}createRange(t,e){return new ul(t,e)}createRangeOn(t){return ul._createOn(t)}createRangeIn(t){return ul._createIn(t)}createSelection(t,e,i){return new ml(t,e,i)}}class sy extends Rw{refresh(){this.isEnabled=D_(this.editor.model)}execute(t){const e=this.editor;const i=e.model;const n=e.plugins.get(Sv);i.change(e=>{const o=Array.isArray(t.file)?t.file:[t.file];for(const t of o){ay(e,i,n,t)}})}}function ay(t,e,i,n){const o=i.createLoader(n);if(!o){return}j_(t,e,{uploadId:o.id})}class cy extends Nw{static get requires(){return[Sv,Jv,oy]}static get pluginName(){return\"ImageUploadEditing\"}constructor(t){super(t);t.config.define(\"image\",{upload:{types:[\"jpeg\",\"png\",\"gif\",\"bmp\",\"webp\",\"tiff\"]}})}init(){const t=this.editor;const e=t.model.document;const i=t.model.schema;const n=t.conversion;const o=t.plugins.get(Sv);const r=vv(t.config.get(\"image.upload.types\"));i.extend(\"image\",{allowAttributes:[\"uploadId\",\"uploadStatus\"]});t.commands.add(\"imageUpload\",new sy(t));n.for(\"upcast\").attributeToAttribute({view:{name:\"img\",key:\"uploadId\"},model:\"uploadId\"});this.listenTo(t.editing.view.document,\"clipboardInput\",(e,i)=>{if(ly(i.dataTransfer)){return}const n=Array.from(i.dataTransfer.files).filter(t=>{if(!t){return false}return r.test(t.type)});const o=i.targetRanges.map(e=>t.editing.mapper.toModelRange(e));t.model.change(i=>{i.setSelection(o);if(n.length){e.stop();t.model.enqueueChange(\"default\",()=>{t.execute(\"imageUpload\",{file:n})})}})});this.listenTo(t.plugins.get(oy),\"inputTransformation\",(e,i)=>{const n=Array.from(t.editing.view.createRangeIn(i.content)).filter(t=>xv(t.item)&&!t.item.getAttribute(\"uploadProcessed\")).map(t=>({promise:yv(t.item),imageElement:t.item}));if(!n.length){return}const r=new ry(t.editing.view.document);for(const t of n){r.setAttribute(\"uploadProcessed\",true,t.imageElement);const e=o.createLoader(t.promise);if(e){r.setAttribute(\"src\",\"\",t.imageElement);r.setAttribute(\"uploadId\",e.id,t.imageElement)}}});t.editing.view.document.on(\"dragover\",(t,e)=>{e.preventDefault()});e.on(\"change\",()=>{const i=e.differ.getChanges({includeChangesInGraveyard:true});for(const e of i){if(e.type==\"insert\"&&e.name!=\"$text\"){const i=e.position.nodeAfter;const n=e.position.root.rootName==\"$graveyard\";for(const e of dy(t,i)){const t=e.getAttribute(\"uploadId\");if(!t){continue}const i=o.loaders.get(t);if(!i){continue}if(n){i.abort()}else if(i.status==\"idle\"){this._readAndUpload(i,e)}}}}})}_readAndUpload(t,e){const i=this.editor;const n=i.model;const o=i.locale.t;const r=i.plugins.get(Sv);const s=i.plugins.get(Jv);n.enqueueChange(\"transparent\",t=>{t.setAttribute(\"uploadStatus\",\"reading\",e)});return t.read().then(()=>{const o=t.upload();if(Cl.isSafari){const t=i.editing.mapper.toViewElement(e);const n=B_(t);i.editing.view.once(\"render\",()=>{if(!n.parent){return}const t=i.editing.view.domConverter.mapViewToDom(n.parent);if(!t){return}const e=t.style.display;t.style.display=\"none\";t._ckHack=t.offsetHeight;t.style.display=e})}n.enqueueChange(\"transparent\",t=>{t.setAttribute(\"uploadStatus\",\"uploading\",e)});return o}).then(t=>{n.enqueueChange(\"transparent\",i=>{i.setAttributes({uploadStatus:\"complete\",src:t.default},e);this._parseAndSetSrcsetAttributeOnImage(t,e,i)});a()}).catch(i=>{if(t.status!==\"error\"&&t.status!==\"aborted\"){throw i}if(t.status==\"error\"&&i){s.showWarning(i,{title:o(\"js\"),namespace:\"upload\"})}a();n.enqueueChange(\"transparent\",t=>{t.remove(e)})});function a(){n.enqueueChange(\"transparent\",t=>{t.removeAttribute(\"uploadId\",e);t.removeAttribute(\"uploadStatus\",e)});r.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,i){let n=0;const o=Object.keys(t).filter(t=>{const e=parseInt(t,10);if(!isNaN(e)){n=Math.max(n,e);return true}}).map(e=>`${t[e]} ${e}w`).join(\", \");if(o!=\"\"){i.setAttribute(\"srcset\",{data:o,width:n},e)}}}function ly(t){return Array.from(t.types).includes(\"text/html\")&&t.getData(\"text/html\")!==\"\"}function dy(t,e){return Array.from(t.model.createRangeOn(e)).filter(t=>t.item.is(\"image\")).map(t=>t.item)}class uy extends Nw{static get pluginName(){return\"ImageUpload\"}static get requires(){return[cy,Tv,Rv]}}class hy extends Rw{constructor(t){super(t);this._childCommands=[]}refresh(){}execute(...t){const e=this._getFirstEnabledCommand();e.execute(t)}registerChildCommand(t){this._childCommands.push(t);t.on(\"change:isEnabled\",()=>this._checkEnabled());this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){return this._childCommands.find(t=>t.isEnabled)}}class fy extends Nw{static get pluginName(){return\"IndentEditing\"}init(){const t=this.editor;t.commands.add(\"indent\",new hy(t));t.commands.add(\"outdent\",new hy(t))}}var my='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.632 6.95L5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z\"/></svg>';var gy='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z\"/></svg>';class py extends Nw{static get pluginName(){return\"IndentUI\"}init(){const t=this.editor;const e=t.locale;const i=t.t;const n=e.uiLanguageDirection==\"ltr\"?my:gy;const o=e.uiLanguageDirection==\"ltr\"?gy:my;this._defineButton(\"indent\",i(\"os\"),n);this._defineButton(\"outdent\",i(\"ot\"),o)}_defineButton(t,e,i){const n=this.editor;n.ui.componentFactory.add(t,o=>{const r=n.commands.get(t);const s=new Kb(o);s.set({label:e,icon:i,tooltip:true});s.bind(\"isOn\",\"isEnabled\").to(r,\"value\",\"isEnabled\");this.listenTo(s,\"execute\",()=>{n.execute(t);n.editing.view.focus()});return s})}}class by extends Nw{static get pluginName(){return\"Indent\"}static get requires(){return[fy,py]}}const wy=\"italic\";class _y extends Nw{static get pluginName(){return\"ItalicEditing\"}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:wy});t.model.schema.setAttributeProperties(wy,{isFormatting:true,copyOnEnter:true});t.conversion.attributeToElement({model:wy,view:\"i\",upcastAlso:[\"em\",{styles:{\"font-style\":\"italic\"}}]});t.commands.add(wy,new Gw(t,wy));t.keystrokes.set(\"CTRL+I\",wy)}}var ky='<svg 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\"/></svg>';const vy=\"italic\";class yy extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(vy,i=>{const n=t.commands.get(vy);const o=new Kb(i);o.set({label:e(\"je\"),icon:ky,keystroke:\"CTRL+I\",tooltip:true,isToggleable:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(vy);t.editing.view.focus()});return o})}}class xy extends Nw{static get requires(){return[_y,yy]}static get pluginName(){return\"Italic\"}}function Ay(t,e,i){return i.createRange(Cy(t,e,true,i),Cy(t,e,false,i))}function Cy(t,e,i,n){let o=t.textNode||(i?t.nodeBefore:t.nodeAfter);let r=null;while(o&&o.getAttribute(\"linkHref\")==e){r=o;o=i?o.previousSibling:o.nextSibling}return r?n.createPositionAt(r,i?\"before\":\"after\"):t}class Ty extends Rw{constructor(t){super(t);this.manualDecorators=new ys}restoreManualDecoratorStates(){for(const t of this.manualDecorators){t.value=this._getDecoratorStateFromModel(t.id)}}refresh(){const t=this.editor.model;const e=t.document;this.value=e.selection.getAttribute(\"linkHref\");for(const t of this.manualDecorators){t.value=this._getDecoratorStateFromModel(t.id)}this.isEnabled=t.schema.checkAttributeInSelection(e.selection,\"linkHref\")}execute(t,e={}){const i=this.editor.model;const n=i.document.selection;const o=[];const r=[];for(const t in e){if(e[t]){o.push(t)}else{r.push(t)}}i.change(e=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute(\"linkHref\")){const a=Ay(s,n.getAttribute(\"linkHref\"),i);e.setAttribute(\"linkHref\",t,a);o.forEach(t=>{e.setAttribute(t,true,a)});r.forEach(t=>{e.removeAttribute(t,a)});e.setSelection(a)}else if(t!==\"\"){const r=Hs(n.getAttributes());r.set(\"linkHref\",t);o.forEach(t=>{r.set(t,true)});const a=e.createText(t,r);i.insertContent(a,s);e.setSelection(e.createRangeOn(a))}}else{const s=i.schema.getValidRanges(n.getRanges(),\"linkHref\");for(const i of s){e.setAttribute(\"linkHref\",t,i);o.forEach(t=>{e.setAttribute(t,true,i)});r.forEach(t=>{e.removeAttribute(t,i)})}}})}_getDecoratorStateFromModel(t){const e=this.editor.model.document;return e.selection.getAttribute(t)||false}}class Ey extends Rw{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute(\"linkHref\")}execute(){const t=this.editor;const e=this.editor.model;const i=e.document.selection;const n=t.commands.get(\"link\");e.change(t=>{const o=i.isCollapsed?[Ay(i.getFirstPosition(),i.getAttribute(\"linkHref\"),e)]:i.getRanges();for(const e of o){t.removeAttribute(\"linkHref\",e);if(n){for(const i of n.manualDecorators){t.removeAttribute(i.id,e)}}}})}}function My(t,e,i){var n=t.length;i=i===undefined?n:i;return!e&&i>=n?t:Ia(t,e,i)}var Py=My;var Sy=\"\\\\ud800-\\\\udfff\",Iy=\"\\\\u0300-\\\\u036f\",Ny=\"\\\\ufe20-\\\\ufe2f\",Oy=\"\\\\u20d0-\\\\u20ff\",Ly=Iy+Ny+Oy,zy=\"\\\\ufe0e\\\\ufe0f\";var Ry=\"\\\\u200d\";var jy=RegExp(\"[\"+Ry+Sy+Ly+zy+\"]\");function Dy(t){return jy.test(t)}var By=Dy;function Vy(t){return t.split(\"\")}var Fy=Vy;var Hy=\"\\\\ud800-\\\\udfff\",Wy=\"\\\\u0300-\\\\u036f\",Uy=\"\\\\ufe20-\\\\ufe2f\",qy=\"\\\\u20d0-\\\\u20ff\",$y=Wy+Uy+qy,Yy=\"\\\\ufe0e\\\\ufe0f\";var Gy=\"[\"+Hy+\"]\",Jy=\"[\"+$y+\"]\",Xy=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",Qy=\"(?:\"+Jy+\"|\"+Xy+\")\",Ky=\"[^\"+Hy+\"]\",Zy=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",tx=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",ex=\"\\\\u200d\";var ix=Qy+\"?\",nx=\"[\"+Yy+\"]?\",ox=\"(?:\"+ex+\"(?:\"+[Ky,Zy,tx].join(\"|\")+\")\"+nx+ix+\")*\",rx=nx+ix+ox,sx=\"(?:\"+[Ky+Jy+\"?\",Jy,Zy,tx,Gy].join(\"|\")+\")\";var ax=RegExp(Xy+\"(?=\"+Xy+\")|\"+sx+rx,\"g\");function cx(t){return t.match(ax)||[]}var lx=cx;function dx(t){return By(t)?lx(t):Fy(t)}var ux=dx;function hx(t){return function(e){e=ka(e);var i=By(e)?ux(e):undefined;var n=i?i[0]:e.charAt(0);var o=i?Py(i,1).join(\"\"):e.slice(1);return n[t]()+o}}var fx=hx;var mx=fx(\"toUpperCase\");var gx=mx;const px=/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g;const bx=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function wx(t){return t.is(\"attributeElement\")&&!!t.getCustomProperty(\"link\")}function _x(t,e){const i=e.createAttributeElement(\"a\",{href:t},{priority:5});e.setCustomProperty(\"link\",true,i);return i}function kx(t){t=String(t);return vx(t)?t:\"#\"}function vx(t){const e=t.replace(px,\"\");return e.match(bx)}function yx(t,e){const i={\"Open in a new tab\":t(\"ow\"),Downloadable:t(\"ox\")};e.forEach(t=>{if(t.label&&i[t.label]){t.label=i[t.label]}return t});return e}function xx(t){const e=[];if(t){for(const[i,n]of Object.entries(t)){const t=Object.assign({},n,{id:`link${gx(i)}`});e.push(t)}}return e}class Ax{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){if(Array.isArray(t)){t.forEach(t=>this._definitions.add(t))}else{this._definitions.add(t)}}getDispatcher(){return t=>{t.on(\"attribute:linkHref\",(t,e,i)=>{if(!i.consumable.test(e.item,\"attribute:linkHref\")){return}const n=i.writer;const o=n.document.selection;for(const t of this._definitions){const r=n.createAttributeElement(\"a\",t.attributes,{priority:5});n.setCustomProperty(\"link\",true,r);if(t.callback(e.attributeNewValue)){if(e.item.is(\"selection\")){n.wrap(o.getFirstRange(),r)}else{n.wrap(i.mapper.toViewRange(e.range),r)}}else{n.unwrap(i.mapper.toViewRange(e.range),r)}}},{priority:\"high\"})}}}class Cx{constructor({id:t,label:e,attributes:i}){this.id=t;this.set(\"value\");this.label=e;this.attributes=i}}vs(Cx,Jc);function Tx({view:t,model:e,emitter:i,attribute:n,locale:o}){const r=new Ex(e,i,n);const s=e.document.selection;i.listenTo(t.document,\"keydown\",(t,e)=>{if(!s.isCollapsed){return}if(e.shiftKey||e.altKey||e.ctrlKey){return}const i=e.keyCode==Ll.arrowright;const n=e.keyCode==Ll.arrowleft;if(!i&&!n){return}const a=s.getFirstPosition();const c=o.contentLanguageDirection;let l;if(c===\"ltr\"&&i||c===\"rtl\"&&n){l=r.handleForwardMovement(a,e)}else{l=r.handleBackwardMovement(a,e)}if(l){t.stop()}},{priority:os.get(\"high\")+1})}class Ex{constructor(t,e,i){this.model=t;this.attribute=i;this._modelSelection=t.document.selection;this._overrideUid=null;this._isNextGravityRestorationSkipped=false;e.listenTo(this._modelSelection,\"change:range\",(t,e)=>{if(this._isNextGravityRestorationSkipped){this._isNextGravityRestorationSkipped=false;return}if(!this._isGravityOverridden){return}if(!e.directChange&&Mx(this._modelSelection.getFirstPosition(),i)){return}this._restoreGravity()})}handleForwardMovement(t,e){const i=this.attribute;if(this._isGravityOverridden){return}if(t.isAtStart&&this._hasSelectionAttribute){return}if(Ix(t,i)&&this._hasSelectionAttribute){this._preventCaretMovement(e);this._removeSelectionAttribute();return true}if(Px(t,i)){this._preventCaretMovement(e);this._overrideGravity();return true}if(Sx(t,i)&&this._hasSelectionAttribute){this._preventCaretMovement(e);this._overrideGravity();return true}}handleBackwardMovement(t,e){const i=this.attribute;if(this._isGravityOverridden){if(Ix(t,i)&&this._hasSelectionAttribute){this._preventCaretMovement(e);this._restoreGravity();this._removeSelectionAttribute();return true}else{this._preventCaretMovement(e);this._restoreGravity();if(t.isAtStart){this._removeSelectionAttribute()}return true}}else{if(Ix(t,i)&&!this._hasSelectionAttribute){this._preventCaretMovement(e);this._setSelectionAttributeFromTheNodeBefore(t);return true}if(t.isAtEnd&&Sx(t,i)){if(this._hasSelectionAttribute){if(Nx(t,i)){this._skipNextAutomaticGravityRestoration();this._overrideGravity()}return}else{this._preventCaretMovement(e);this._setSelectionAttributeFromTheNodeBefore(t);return true}}if(t.isAtStart){if(this._hasSelectionAttribute){this._removeSelectionAttribute();this._preventCaretMovement(e);return true}return}if(Nx(t,i)){this._skipNextAutomaticGravityRestoration();this._overrideGravity()}}}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change(t=>t.overrideSelectionGravity())}_restoreGravity(){this.model.change(t=>{t.restoreSelectionGravity(this._overrideUid);this._overrideUid=null})}_preventCaretMovement(t){t.preventDefault()}_removeSelectionAttribute(){this.model.change(t=>{t.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(t){const e=this.attribute;this.model.change(i=>{i.setSelectionAttribute(this.attribute,t.nodeBefore.getAttribute(e))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=true}}function Mx(t,e){return Px(t,e)||Sx(t,e)}function Px(t,e){const{nodeBefore:i,nodeAfter:n}=t;const o=i?i.hasAttribute(e):false;const r=n?n.hasAttribute(e):false;return r&&(!o||i.getAttribute(e)!==n.getAttribute(e))}function Sx(t,e){const{nodeBefore:i,nodeAfter:n}=t;const o=i?i.hasAttribute(e):false;const r=n?n.hasAttribute(e):false;return o&&(!r||i.getAttribute(e)!==n.getAttribute(e))}function Ix(t,e){const{nodeBefore:i,nodeAfter:n}=t;const o=i?i.hasAttribute(e):false;const r=n?n.hasAttribute(e):false;if(!r||!o){return}return n.getAttribute(e)!==i.getAttribute(e)}function Nx(t,e){return Mx(t.getShiftedBy(-1),e)}var Ox=i(76);const Lx=\"ck-link_selected\";const zx=\"automatic\";const Rx=\"manual\";const jx=/^(https?:)?\\/\\//;class Dx extends Nw{static get pluginName(){return\"LinkEditing\"}constructor(t){super(t);t.config.define(\"link\",{addTargetToExternalLinks:false})}init(){const t=this.editor;const e=t.locale;t.model.schema.extend(\"$text\",{allowAttributes:\"linkHref\"});t.conversion.for(\"dataDowncast\").attributeToElement({model:\"linkHref\",view:_x});t.conversion.for(\"editingDowncast\").attributeToElement({model:\"linkHref\",view:(t,e)=>_x(kx(t),e)});t.conversion.for(\"upcast\").elementToAttribute({view:{name:\"a\",attributes:{href:true}},model:{key:\"linkHref\",value:t=>t.getAttribute(\"href\")}});t.commands.add(\"link\",new Ty(t));t.commands.add(\"unlink\",new Ey(t));const i=yx(t.t,xx(t.config.get(\"link.decorators\")));this._enableAutomaticDecorators(i.filter(t=>t.mode===zx));this._enableManualDecorators(i.filter(t=>t.mode===Rx));Tx({view:t.editing.view,model:t.model,emitter:this,attribute:\"linkHref\",locale:e});this._setupLinkHighlight()}_enableAutomaticDecorators(t){const e=this.editor;const i=new Ax;if(e.config.get(\"link.addTargetToExternalLinks\")){i.add({id:\"linkIsExternal\",mode:zx,callback:t=>jx.test(t),attributes:{target:\"_blank\",rel:\"noopener noreferrer\"}})}i.add(t);if(i.length){e.conversion.for(\"downcast\").add(i.getDispatcher())}}_enableManualDecorators(t){if(!t.length){return}const e=this.editor;const i=e.commands.get(\"link\");const n=i.manualDecorators;t.forEach(t=>{e.model.schema.extend(\"$text\",{allowAttributes:t.id});n.add(new Cx(t));e.conversion.for(\"downcast\").attributeToElement({model:t.id,view:(e,i)=>{if(e){const e=n.get(t.id).attributes;const o=i.createAttributeElement(\"a\",e,{priority:5});i.setCustomProperty(\"link\",true,o);return o}}});e.conversion.for(\"upcast\").elementToAttribute({view:{name:\"a\",attributes:n.get(t.id).attributes},model:{key:t.id}})})}_setupLinkHighlight(){const t=this.editor;const e=t.editing.view;const i=new Set;e.document.registerPostFixer(e=>{const n=t.model.document.selection;let o=false;if(n.hasAttribute(\"linkHref\")){const r=Ay(n.getFirstPosition(),n.getAttribute(\"linkHref\"),t.model);const s=t.editing.mapper.toViewRange(r);for(const t of s.getItems()){if(t.is(\"a\")&&!t.hasClass(Lx)){e.addClass(Lx,t);i.add(t);o=true}}}return o});t.conversion.for(\"editingDowncast\").add(t=>{t.on(\"insert\",n,{priority:\"highest\"});t.on(\"remove\",n,{priority:\"highest\"});t.on(\"attribute\",n,{priority:\"highest\"});t.on(\"selection\",n,{priority:\"highest\"});function n(){e.change(t=>{for(const e of i.values()){t.removeClass(Lx,e);i.delete(e)}})}})}}class Bx extends Ju{constructor(t){super(t);this.domEventType=\"click\"}onDomEvent(t){this.fire(t.type,t)}}var Vx=i(78);class Fx extends gb{constructor(t,e=[]){super(t);const i=t.t;this.focusTracker=new xp;this.keystrokes=new dp;this.urlInputView=this._createUrlInput();this.saveButtonView=this._createButton(i(\"lv\"),hk,\"ck-button-save\");this.saveButtonView.type=\"submit\";this.cancelButtonView=this._createButton(i(\"lw\"),fk,\"ck-button-cancel\",\"cancel\");this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e);this.children=this._createFormChildren(e);this._focusables=new Bp;this._focusCycler=new Nb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"shift + tab\",focusNext:\"tab\"}});const n=[\"ck\",\"ck-link-form\"];if(e.length){n.push(\"ck-link-form_layout-vertical\")}this.setTemplate({tag:\"form\",attributes:{class:n,tabindex:\"-1\"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((t,e)=>{t[e.name]=e.isOn;return t},{})}render(){super.render();uk({view:this});const t=[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView];t.forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t;const e=new ck(this.locale,dk);e.label=t(\"pc\");e.inputView.placeholder=\"https://example.com\";return e}_createButton(t,e,i,n){const o=new Kb(this.locale);o.set({label:t,icon:e,tooltip:true});o.extendTemplate({attributes:{class:i}});if(n){o.delegate(\"execute\").to(this,n)}return o}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const i of t){const t=new sw(this.locale);t.set({name:i.id,label:i.label,withText:true});t.bind(\"isOn\").to(i,\"value\");t.on(\"execute\",()=>{i.set(\"value\",!t.isOn)});e.add(t)}return e}_createFormChildren(t){const e=this.createCollection();e.add(this.urlInputView);if(t.length){const t=new gb;t.setTemplate({tag:\"ul\",children:this._manualDecoratorSwitches.map(t=>({tag:\"li\",children:[t],attributes:{class:[\"ck\",\"ck-list__item\"]}})),attributes:{class:[\"ck\",\"ck-reset\",\"ck-list\"]}});e.add(t)}e.add(this.saveButtonView);e.add(this.cancelButtonView);return e}}var Hx='<svg 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.955.741.741 0 0 1 .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-.184zm4.919 10.562l-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\"/></svg>';var Wx='<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\"/></svg>';var Ux=i(80);class qx extends gb{constructor(t){super(t);const e=t.t;this.focusTracker=new xp;this.keystrokes=new dp;this.previewButtonView=this._createPreviewButton();this.unlinkButtonView=this._createButton(e(\"oy\"),Hx,\"unlink\");this.editButtonView=this._createButton(e(\"oz\"),Wx,\"edit\");this.set(\"href\");this._focusables=new Bp;this._focusCycler=new Nb({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 t=[this.previewButtonView,this.editButtonView,this.unlinkButtonView];t.forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(t,e,i){const n=new Kb(this.locale);n.set({label:t,icon:e,tooltip:true});n.delegate(\"execute\").to(this,i);return n}_createPreviewButton(){const t=new Kb(this.locale);const e=this.bindTemplate;const i=this.t;t.set({withText:true,tooltip:i(\"pa\")});t.extendTemplate({attributes:{class:[\"ck\",\"ck-link-actions__preview\"],href:e.to(\"href\",t=>t&&kx(t)),target:\"_blank\",rel:\"noopener noreferrer\"}});t.bind(\"label\").to(this,\"href\",t=>t||i(\"pb\"));t.bind(\"isEnabled\").to(this,\"href\",t=>!!t);t.template.tag=\"a\";t.template.eventListeners={};return t}}var $x='<svg 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.955.741.741 0 0 1 .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\"/></svg>';const Yx=\"Ctrl+K\";class Gx extends Nw{static get requires(){return[Mk]}static get pluginName(){return\"LinkUI\"}init(){const t=this.editor;t.editing.view.addObserver(Bx);this.actionsView=this._createActionsView();this.formView=this._createFormView();this._balloon=t.plugins.get(Mk);this._createToolbarLinkButton();this._enableUserBalloonInteractions()}destroy(){super.destroy();this.formView.destroy()}_createActionsView(){const t=this.editor;const e=new qx(t.locale);const i=t.commands.get(\"link\");const n=t.commands.get(\"unlink\");e.bind(\"href\").to(i,\"value\");e.editButtonView.bind(\"isEnabled\").to(i);e.unlinkButtonView.bind(\"isEnabled\").to(n);this.listenTo(e,\"edit\",()=>{this._addFormView()});this.listenTo(e,\"unlink\",()=>{t.execute(\"unlink\");this._hideUI()});e.keystrokes.set(\"Esc\",(t,e)=>{this._hideUI();e()});e.keystrokes.set(Yx,(t,e)=>{this._addFormView();e()});return e}_createFormView(){const t=this.editor;const e=t.commands.get(\"link\");const i=new Fx(t.locale,e.manualDecorators);i.urlInputView.bind(\"value\").to(e,\"value\");i.urlInputView.bind(\"isReadOnly\").to(e,\"isEnabled\",t=>!t);i.saveButtonView.bind(\"isEnabled\").to(e);this.listenTo(i,\"submit\",()=>{t.execute(\"link\",i.urlInputView.inputView.element.value,i.getDecoratorSwitchesState());this._closeFormView()});this.listenTo(i,\"cancel\",()=>{this._closeFormView()});i.keystrokes.set(\"Esc\",(t,e)=>{this._closeFormView();e()});return i}_createToolbarLinkButton(){const t=this.editor;const e=t.commands.get(\"link\");const i=t.t;t.keystrokes.set(Yx,(t,e)=>{e();this._showUI(true)});t.ui.componentFactory.add(\"link\",t=>{const n=new Kb(t);n.isEnabled=true;n.label=i(\"or\");n.icon=$x;n.keystroke=Yx;n.tooltip=true;n.isToggleable=true;n.bind(\"isEnabled\").to(e,\"isEnabled\");n.bind(\"isOn\").to(e,\"value\",t=>!!t);this.listenTo(n,\"execute\",()=>this._showUI(true));return n})}_enableUserBalloonInteractions(){const t=this.editor.editing.view.document;this.listenTo(t,\"click\",()=>{const t=this._getSelectedLinkElement();if(t){this._showUI()}});this.editor.keystrokes.set(\"Tab\",(t,e)=>{if(this._areActionsVisible&&!this.actionsView.focusTracker.isFocused){this.actionsView.focus();e()}},{priority:\"high\"});this.editor.keystrokes.set(\"Esc\",(t,e)=>{if(this._isUIVisible){this._hideUI();e()}});aw({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){if(this._areActionsInPanel){return}this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel){return}const t=this.editor;const e=t.commands.get(\"link\");this._balloon.add({view:this.formView,position:this._getBalloonPositionData()});if(this._balloon.visibleView===this.formView){this.formView.urlInputView.select()}this.formView.urlInputView.inputView.element.value=e.value||\"\"}_closeFormView(){const t=this.editor.commands.get(\"link\");t.restoreManualDecoratorStates();if(t.value!==undefined){this._removeFormView()}else{this._hideUI()}}_removeFormView(){if(this._isFormInPanel){this.formView.saveButtonView.focus();this._balloon.remove(this.formView);this.editor.editing.view.focus()}}_showUI(t=false){if(!this._getSelectedLinkElement()){this._addActionsView();if(t){this._balloon.showStack(\"main\")}this._addFormView()}else{if(this._areActionsVisible){this._addFormView()}else{this._addActionsView()}if(t){this._balloon.showStack(\"main\")}}this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel){return}const t=this.editor;this.stopListening(t.ui,\"update\");this.stopListening(this._balloon,\"change:visibleView\");t.editing.view.focus();this._removeFormView();this._balloon.remove(this.actionsView)}_startUpdatingUI(){const t=this.editor;const e=t.editing.view.document;let i=this._getSelectedLinkElement();let n=r();const o=()=>{const t=this._getSelectedLinkElement();const e=r();if(i&&!t||!i&&e!==n){this._hideUI()}else if(this._isUIVisible){this._balloon.updatePosition(this._getBalloonPositionData())}i=t;n=e};function r(){return e.selection.focus.getAncestors().reverse().find(t=>t.is(\"element\"))}this.listenTo(t.ui,\"update\",o);this.listenTo(this._balloon,\"change:visibleView\",o)}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 t=this._balloon.visibleView;return t==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view;const e=t.document;const i=this._getSelectedLinkElement();const n=i?t.domConverter.mapViewToDom(i):t.domConverter.viewRangeToDom(e.selection.getFirstRange());return{target:n}}_getSelectedLinkElement(){const t=this.editor.editing.view;const e=t.document.selection;if(e.isCollapsed){return Jx(e.getFirstPosition())}else{const i=e.getFirstRange().getTrimmed();const n=Jx(i.start);const o=Jx(i.end);if(!n||n!=o){return null}if(t.createRangeIn(n).getTrimmed().isEqual(i)){return n}else{return null}}}}function Jx(t){return t.getAncestors().find(t=>wx(t))}class Xx extends Nw{static get requires(){return[Dx,Gx]}static get pluginName(){return\"Link\"}}class Qx extends Rw{constructor(t,e){super(t);this.type=e}refresh(){this.value=this._getValue();this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;const e=t.document;const i=Array.from(e.selection.getSelectedBlocks()).filter(e=>Zx(e,t.schema));const n=this.value===true;t.change(t=>{if(n){let e=i[i.length-1].nextSibling;let n=Number.POSITIVE_INFINITY;let o=[];while(e&&e.name==\"listItem\"&&e.getAttribute(\"listIndent\")!==0){const t=e.getAttribute(\"listIndent\");if(t<n){n=t}const i=t-n;o.push({element:e,listIndent:i});e=e.nextSibling}o=o.reverse();for(const e of o){t.setAttribute(\"listIndent\",e.listIndent,e.element)}}if(!n){let t=Number.POSITIVE_INFINITY;for(const e of i){if(e.is(\"listItem\")&&e.getAttribute(\"listIndent\")<t){t=e.getAttribute(\"listIndent\")}}t=t===0?1:t;Kx(i,true,t);Kx(i,false,t)}for(const e of i.reverse()){if(n&&e.name==\"listItem\"){t.rename(e,\"paragraph\")}else if(!n&&e.name!=\"listItem\"){t.setAttributes({listType:this.type,listIndent:0},e);t.rename(e,\"listItem\")}else if(!n&&e.name==\"listItem\"&&e.getAttribute(\"listType\")!=this.type){t.setAttribute(\"listType\",this.type,e)}}})}_getValue(){const t=Dw(this.editor.model.document.selection.getSelectedBlocks());return!!t&&t.is(\"listItem\")&&t.getAttribute(\"listType\")==this.type}_checkEnabled(){if(this.value){return true}const t=this.editor.model.document.selection;const e=this.editor.model.schema;const i=Dw(t.getSelectedBlocks());if(!i){return false}return Zx(i,e)}}function Kx(t,e,i){const n=e?t[0]:t[t.length-1];if(n.is(\"listItem\")){let o=n[e?\"previousSibling\":\"nextSibling\"];let r=n.getAttribute(\"listIndent\");while(o&&o.is(\"listItem\")&&o.getAttribute(\"listIndent\")>=i){if(r>o.getAttribute(\"listIndent\")){r=o.getAttribute(\"listIndent\")}if(o.getAttribute(\"listIndent\")==r){t[e?\"unshift\":\"push\"](o)}o=o[e?\"previousSibling\":\"nextSibling\"]}}}function Zx(t,e){return e.checkChild(t.parent,\"listItem\")&&!e.isObject(t)}class tA extends Rw{constructor(t,e){super(t);this._indentBy=e==\"forward\"?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;const e=t.document;let i=Array.from(e.selection.getSelectedBlocks());t.change(t=>{const e=i[i.length-1];let n=e.nextSibling;while(n&&n.name==\"listItem\"&&n.getAttribute(\"listIndent\")>e.getAttribute(\"listIndent\")){i.push(n);n=n.nextSibling}if(this._indentBy<0){i=i.reverse()}for(const e of i){const i=e.getAttribute(\"listIndent\")+this._indentBy;if(i<0){t.rename(e,\"paragraph\")}else{t.setAttribute(\"listIndent\",i,e)}}})}_checkEnabled(){const t=Dw(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is(\"listItem\")){return false}if(this._indentBy>0){const e=t.getAttribute(\"listIndent\");const i=t.getAttribute(\"listType\");let n=t.previousSibling;while(n&&n.is(\"listItem\")&&n.getAttribute(\"listIndent\")>=e){if(n.getAttribute(\"listIndent\")==e){return n.getAttribute(\"listType\")==i}n=n.previousSibling}return false}return true}}function eA(t){const e=t.createContainerElement(\"li\");e.getFillerOffset=cA;return e}function iA(t,e){const i=e.mapper;const n=e.writer;const o=t.getAttribute(\"listType\")==\"numbered\"?\"ol\":\"ul\";const r=eA(n);const s=n.createContainerElement(o,null);n.insert(n.createPositionAt(s,0),r);i.bindElements(t,r);return r}function nA(t,e,i,n){const o=e.parent;const r=i.mapper;const s=i.writer;let a=r.toViewPosition(n.createPositionBefore(t));const c=sA(t.previousSibling,{sameIndent:true,smallerIndent:true,listIndent:t.getAttribute(\"listIndent\")});const l=t.previousSibling;if(c&&c.getAttribute(\"listIndent\")==t.getAttribute(\"listIndent\")){const t=r.toViewElement(c);a=s.breakContainer(s.createPositionAfter(t))}else{if(l&&l.name==\"listItem\"){a=r.toViewPosition(n.createPositionAt(l,\"end\"))}else{a=r.toViewPosition(n.createPositionBefore(t))}}a=rA(a);s.insert(a,o);if(l&&l.name==\"listItem\"){const t=r.toViewElement(l);const i=s.createRange(s.createPositionAt(t,0),a);const n=i.getWalker({ignoreElementEnd:true});for(const t of n){if(t.item.is(\"li\")){const i=s.breakContainer(s.createPositionBefore(t.item));const o=t.item.parent;const r=s.createPositionAt(e,\"end\");oA(s,r.nodeBefore,r.nodeAfter);s.move(s.createRangeOn(o),r);n.position=i}}}else{const i=o.nextSibling;if(i&&(i.is(\"ul\")||i.is(\"ol\"))){let n=null;for(const e of i.getChildren()){const i=r.toModelElement(e);if(i&&i.getAttribute(\"listIndent\")>t.getAttribute(\"listIndent\")){n=e}else{break}}if(n){s.breakContainer(s.createPositionAfter(n));s.move(s.createRangeOn(n.parent),s.createPositionAt(e,\"end\"))}}}oA(s,o,o.nextSibling);oA(s,o.previousSibling,o)}function oA(t,e,i){if(!e||!i||e.name!=\"ul\"&&e.name!=\"ol\"){return null}if(e.name!=i.name||e.getAttribute(\"class\")!==i.getAttribute(\"class\")){return null}return t.mergeContainers(t.createPositionAfter(e))}function rA(t){return t.getLastMatchingPosition(t=>t.item.is(\"uiElement\"))}function sA(t,e){const i=!!e.sameIndent;const n=!!e.smallerIndent;const o=e.listIndent;let r=t;while(r&&r.name==\"listItem\"){const t=r.getAttribute(\"listIndent\");if(i&&o==t||n&&o>t){return r}r=r.previousSibling}return null}function aA(t,e,i,n){t.ui.componentFactory.add(e,o=>{const r=t.commands.get(e);const s=new Kb(o);s.set({label:i,icon:n,tooltip:true,isToggleable:true});s.bind(\"isOn\",\"isEnabled\").to(r,\"value\",\"isEnabled\");s.on(\"execute\",()=>{t.execute(e);t.editing.view.focus()});return s})}function cA(){const t=!this.isEmpty&&(this.getChild(0).name==\"ul\"||this.getChild(0).name==\"ol\");if(this.isEmpty||t){return 0}return Hc.call(this)}function lA(t){return(e,i,n)=>{const o=n.consumable;if(!o.test(i.item,\"insert\")||!o.test(i.item,\"attribute:listType\")||!o.test(i.item,\"attribute:listIndent\")){return}o.consume(i.item,\"insert\");o.consume(i.item,\"attribute:listType\");o.consume(i.item,\"attribute:listIndent\");const r=i.item;const s=iA(r,n);nA(r,s,n,t)}}function dA(t){return(e,i,n)=>{const o=n.mapper.toViewPosition(i.position).getLastMatchingPosition(t=>!t.item.is(\"li\"));const r=o.nodeAfter;const s=n.writer;s.breakContainer(s.createPositionBefore(r));s.breakContainer(s.createPositionAfter(r));const a=r.parent;const c=a.previousSibling;const l=s.createRangeOn(a);const d=s.remove(l);if(c&&c.nextSibling){oA(s,c,c.nextSibling)}const u=n.mapper.toModelElement(r);CA(u.getAttribute(\"listIndent\")+1,i.position,l.start,r,n,t);for(const t of s.createRangeIn(d).getItems()){n.mapper.unbindViewElement(t)}e.stop()}}function uA(t,e,i){if(!i.consumable.consume(e.item,\"attribute:listType\")){return}const n=i.mapper.toViewElement(e.item);const o=i.writer;o.breakContainer(o.createPositionBefore(n));o.breakContainer(o.createPositionAfter(n));const r=n.parent;const s=e.attributeNewValue==\"numbered\"?\"ol\":\"ul\";o.rename(s,r)}function hA(t,e,i){const n=i.mapper.toViewElement(e.item);const o=n.parent;const r=i.writer;oA(r,o,o.nextSibling);oA(r,o.previousSibling,o);for(const t of e.item.getChildren()){i.consumable.consume(t,\"insert\")}}function fA(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,\"attribute:listIndent\")){return}const o=n.mapper.toViewElement(i.item);const r=n.writer;r.breakContainer(r.createPositionBefore(o));r.breakContainer(r.createPositionAfter(o));const s=o.parent;const a=s.previousSibling;const c=r.createRangeOn(s);r.remove(c);if(a&&a.nextSibling){oA(r,a,a.nextSibling)}CA(i.attributeOldValue+1,i.range.start,c.start,o,n,t);nA(i.item,o,n,t);for(const t of i.item.getChildren()){n.consumable.consume(t,\"insert\")}}}function mA(t,e,i){if(e.item.name!=\"listItem\"){let t=i.mapper.toViewPosition(e.range.start);const n=i.writer;const o=[];while(t.parent.name==\"ul\"||t.parent.name==\"ol\"){t=n.breakContainer(t);if(t.parent.name!=\"li\"){break}const e=t;const i=n.createPositionAt(t.parent,\"end\");if(!e.isEqual(i)){const t=n.remove(n.createRange(e,i));o.push(t)}t=n.createPositionAfter(t.parent)}if(o.length>0){for(let e=0;e<o.length;e++){const i=t.nodeBefore;const r=n.insert(t,o[e]);t=r.end;if(e>0){const e=oA(n,i,i.nextSibling);if(e&&e.parent==i){t.offset--}}}oA(n,t.nodeBefore,t.nodeAfter)}}}function gA(t,e,i){const n=i.mapper.toViewPosition(e.position);const o=n.nodeBefore;const r=n.nodeAfter;oA(i.writer,o,r)}function pA(t,e,i){if(i.consumable.consume(e.viewItem,{name:true})){const t=i.writer;const n=t.createElement(\"listItem\");const o=EA(e.viewItem);t.setAttribute(\"listIndent\",o,n);const r=e.viewItem.parent&&e.viewItem.parent.name==\"ol\"?\"numbered\":\"bulleted\";t.setAttribute(\"listType\",r,n);const s=i.splitToAllowedParent(n,e.modelCursor);if(!s){return}t.insert(n,s.position);const a=xA(n,e.viewItem.getChildren(),i);e.modelRange=t.createRange(e.modelCursor,a);if(s.cursorParent){e.modelCursor=t.createPositionAt(s.cursorParent,0)}else{e.modelCursor=e.modelRange.end}}}function bA(t,e,i){if(i.consumable.test(e.viewItem,{name:true})){const t=Array.from(e.viewItem.getChildren());for(const e of t){const t=!(e.is(\"li\")||TA(e));if(t){e._remove()}}}}function wA(t,e,i){if(i.consumable.test(e.viewItem,{name:true})){if(e.viewItem.childCount===0){return}const t=[...e.viewItem.getChildren()];let i=false;let n=true;for(const e of t){if(i&&!TA(e)){e._remove()}if(e.is(\"text\")){if(n){e._data=e.data.replace(/^\\s+/,\"\")}if(!e.nextSibling||TA(e.nextSibling)){e._data=e.data.replace(/\\s+$/,\"\")}}else if(TA(e)){i=true}n=false}}}function _A(t){return(e,i)=>{if(i.isPhantom){return}const n=i.modelPosition.nodeBefore;if(n&&n.is(\"listItem\")){const e=i.mapper.toViewElement(n);const o=e.getAncestors().find(TA);const r=t.createPositionAt(e,0).getWalker();for(const t of r){if(t.type==\"elementStart\"&&t.item.is(\"li\")){i.viewPosition=t.previousPosition;break}else if(t.type==\"elementEnd\"&&t.item==o){i.viewPosition=t.nextPosition;break}}}}}function kA(t){return(e,i)=>{const n=i.viewPosition;const o=n.parent;const r=i.mapper;if(o.name==\"ul\"||o.name==\"ol\"){if(!n.isAtEnd){const e=r.toModelElement(n.nodeAfter);i.modelPosition=t.createPositionBefore(e)}else{const e=r.toModelElement(n.nodeBefore);const o=r.getModelLength(n.nodeBefore);i.modelPosition=t.createPositionBefore(e).getShiftedBy(o)}e.stop()}else if(o.name==\"li\"&&n.nodeBefore&&(n.nodeBefore.name==\"ul\"||n.nodeBefore.name==\"ol\")){const s=r.toModelElement(o);let a=1;let c=n.nodeBefore;while(c&&TA(c)){a+=r.getModelLength(c);c=c.previousSibling}i.modelPosition=t.createPositionBefore(s).getShiftedBy(a);e.stop()}}}function vA(t,e){const i=t.document.differ.getChanges();const n=new Map;let o=false;for(const n of i){if(n.type==\"insert\"&&n.name==\"listItem\"){r(n.position)}else if(n.type==\"insert\"&&n.name!=\"listItem\"){if(n.name!=\"$text\"){const i=n.position.nodeAfter;if(i.hasAttribute(\"listIndent\")){e.removeAttribute(\"listIndent\",i);o=true}if(i.hasAttribute(\"listType\")){e.removeAttribute(\"listType\",i);o=true}for(const e of Array.from(t.createRangeIn(i)).filter(t=>t.item.is(\"listItem\"))){r(e.previousPosition)}}const i=n.position.getShiftedBy(n.length);r(i)}else if(n.type==\"remove\"&&n.name==\"listItem\"){r(n.position)}else if(n.type==\"attribute\"&&n.attributeKey==\"listIndent\"){r(n.range.start)}else if(n.type==\"attribute\"&&n.attributeKey==\"listType\"){r(n.range.start)}}for(const t of n.values()){s(t);a(t)}return o;function r(t){const e=t.nodeBefore;if(!e||!e.is(\"listItem\")){const e=t.nodeAfter;if(e&&e.is(\"listItem\")){n.set(e,e)}}else{let i=e;if(n.has(i)){return}while(i.previousSibling&&i.previousSibling.is(\"listItem\")){i=i.previousSibling;if(n.has(i)){return}}n.set(t.nodeBefore,i)}}function s(t){let i=0;let n=null;while(t&&t.is(\"listItem\")){const r=t.getAttribute(\"listIndent\");if(r>i){let s;if(n===null){n=r-i;s=i}else{if(n>r){n=r}s=r-n}e.setAttribute(\"listIndent\",s,t);o=true}else{n=null;i=t.getAttribute(\"listIndent\")+1}t=t.nextSibling}}function a(t){let i=[];let n=null;while(t&&t.is(\"listItem\")){const r=t.getAttribute(\"listIndent\");if(n&&n.getAttribute(\"listIndent\")>r){i=i.slice(0,r+1)}if(r!=0){if(i[r]){const n=i[r];if(t.getAttribute(\"listType\")!=n){e.setAttribute(\"listType\",n,t);o=true}}else{i[r]=t.getAttribute(\"listType\")}}n=t;t=t.nextSibling}}}function yA(t,[e,i]){let n=e.is(\"documentFragment\")?e.getChild(0):e;let o;if(!i){o=this.document.selection}else{o=this.createSelection(i)}if(n&&n.is(\"listItem\")){const t=o.getFirstPosition();let e=null;if(t.parent.is(\"listItem\")){e=t.parent}else if(t.nodeBefore&&t.nodeBefore.is(\"listItem\")){e=t.nodeBefore}if(e){const t=e.getAttribute(\"listIndent\");if(t>0){while(n&&n.is(\"listItem\")){n._setAttribute(\"listIndent\",n.getAttribute(\"listIndent\")+t);n=n.nextSibling}}}}}function xA(t,e,i){const{writer:n,schema:o}=i;let r=n.createPositionAfter(t);for(const s of e){if(s.name==\"ul\"||s.name==\"ol\"){r=i.convertItem(s,r).modelCursor}else{const e=i.convertItem(s,n.createPositionAt(t,\"end\"));const a=e.modelRange.start.nodeAfter;const c=a&&a.is(\"element\")&&!o.checkChild(t,a.name);if(c){if(e.modelCursor.parent.is(\"listItem\")){t=e.modelCursor.parent}else{t=AA(e.modelCursor)}r=n.createPositionAfter(t)}}}return r}function AA(t){const e=new Wh({startPosition:t});let i;do{i=e.next()}while(!i.value.item.is(\"listItem\"));return i.value.item}function CA(t,e,i,n,o,r){const s=sA(e.nodeBefore,{sameIndent:true,smallerIndent:true,listIndent:t,foo:\"b\"});const a=o.mapper;const c=o.writer;const l=s?s.getAttribute(\"listIndent\"):null;let d;if(!s){d=i}else if(l==t){const t=a.toViewElement(s).parent;d=c.createPositionAfter(t)}else{const t=r.createPositionAt(s,\"end\");d=a.toViewPosition(t)}d=rA(d);for(const t of[...n.getChildren()]){if(TA(t)){d=c.move(c.createRangeOn(t),d).end;oA(c,t,t.nextSibling);oA(c,t.previousSibling,t)}}}function TA(t){return t.is(\"ol\")||t.is(\"ul\")}function EA(t){let e=0;let i=t.parent;while(i){if(i.is(\"li\")){e++}else{const t=i.previousSibling;if(t&&t.is(\"li\")){e++}}i=i.parent}return e}class MA extends Nw{static get pluginName(){return\"ListEditing\"}static get requires(){return[n_]}init(){const t=this.editor;t.model.schema.register(\"listItem\",{inheritAllFrom:\"$block\",allowAttributes:[\"listType\",\"listIndent\"]});const e=t.data;const i=t.editing;t.model.document.registerPostFixer(e=>vA(t.model,e));i.mapper.registerViewToModelLength(\"li\",PA);e.mapper.registerViewToModelLength(\"li\",PA);i.mapper.on(\"modelToViewPosition\",_A(i.view));i.mapper.on(\"viewToModelPosition\",kA(t.model));e.mapper.on(\"modelToViewPosition\",_A(i.view));t.conversion.for(\"editingDowncast\").add(e=>{e.on(\"insert\",mA,{priority:\"high\"});e.on(\"insert:listItem\",lA(t.model));e.on(\"attribute:listType:listItem\",uA,{priority:\"high\"});e.on(\"attribute:listType:listItem\",hA,{priority:\"low\"});e.on(\"attribute:listIndent:listItem\",fA(t.model));e.on(\"remove:listItem\",dA(t.model));e.on(\"remove\",gA,{priority:\"low\"})});t.conversion.for(\"dataDowncast\").add(e=>{e.on(\"insert\",mA,{priority:\"high\"});e.on(\"insert:listItem\",lA(t.model))});t.conversion.for(\"upcast\").add(t=>{t.on(\"element:ul\",bA,{priority:\"high\"});t.on(\"element:ol\",bA,{priority:\"high\"});t.on(\"element:li\",wA,{priority:\"high\"});t.on(\"element:li\",pA)});t.model.on(\"insertContent\",yA,{priority:\"high\"});t.commands.add(\"numberedList\",new Qx(t,\"numbered\"));t.commands.add(\"bulletedList\",new Qx(t,\"bulleted\"));t.commands.add(\"indentList\",new tA(t,\"forward\"));t.commands.add(\"outdentList\",new tA(t,\"backward\"));const n=i.view.document;this.listenTo(n,\"enter\",(t,e)=>{const i=this.editor.model.document;const n=i.selection.getLastPosition().parent;if(i.selection.isCollapsed&&n.name==\"listItem\"&&n.isEmpty){this.editor.execute(\"outdentList\");e.preventDefault();t.stop()}});this.listenTo(n,\"delete\",(t,e)=>{if(e.direction!==\"backward\"){return}const i=this.editor.model.document.selection;if(!i.isCollapsed){return}const n=i.getFirstPosition();if(!n.isAtStart){return}const o=n.parent;if(o.name!==\"listItem\"){return}const r=o.previousSibling&&o.previousSibling.name===\"listItem\";if(r){return}this.editor.execute(\"outdentList\");e.preventDefault();t.stop()},{priority:\"high\"});const o=t=>(e,i)=>{const n=this.editor.commands.get(t);if(n.isEnabled){this.editor.execute(t);i()}};t.keystrokes.set(\"Tab\",o(\"indentList\"));t.keystrokes.set(\"Shift+Tab\",o(\"outdentList\"))}afterInit(){const t=this.editor.commands;const e=t.get(\"indent\");const i=t.get(\"outdent\");if(e){e.registerChildCommand(t.get(\"indentList\"))}if(i){i.registerChildCommand(t.get(\"outdentList\"))}}}function PA(t){let e=1;for(const i of t.getChildren()){if(i.name==\"ul\"||i.name==\"ol\"){for(const t of i.getChildren()){e+=PA(t)}}}return e}var SA='<svg 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\"/></svg>';var IA='<svg 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\"/></svg>';class NA extends Nw{init(){const t=this.editor.t;aA(this.editor,\"numberedList\",t(\"op\"),SA);aA(this.editor,\"bulletedList\",t(\"oq\"),IA)}}class OA extends Nw{static get requires(){return[MA,NA]}static get pluginName(){return\"List\"}}function LA(t,e){return t=>{t.on(\"attribute:url:media\",i)};function i(i,n,o){if(!o.consumable.consume(n.item,i.name)){return}const r=n.attributeNewValue;const s=o.writer;const a=o.mapper.toViewElement(n.item);s.remove(s.createRangeIn(a));const c=t.getMediaViewElement(s,r,e);s.insert(s.createPositionAt(a,0),c)}}function zA(t,e,i){e.setCustomProperty(\"media\",true,t);return A_(t,e,{label:i})}function RA(t){const e=t.getSelectedElement();if(e&&jA(e)){return e}return null}function jA(t){return!!t.getCustomProperty(\"media\")&&x_(t)}function DA(t,e,i,n){const o=t.createContainerElement(\"figure\",{class:\"media\"});o.getFillerOffset=FA;t.insert(t.createPositionAt(o,0),e.getMediaViewElement(t,i,n));return o}function BA(t){const e=t.getSelectedElement();if(e&&e.is(\"media\")){return e}return null}function VA(t,e,i){t.change(n=>{const o=n.createElement(\"media\",{url:e});t.insertContent(o,i);n.setSelection(o,\"on\")})}function FA(){return null}class HA extends Rw{refresh(){const t=this.editor.model;const e=t.document.selection;const i=t.schema;const n=e.getFirstPosition();const o=BA(e);let r=n.parent;if(r!=r.root){r=r.parent}this.value=o?o.getAttribute(\"url\"):null;this.isEnabled=i.checkChild(r,\"media\")}execute(t){const e=this.editor.model;const i=e.document.selection;const n=BA(i);if(n){e.change(e=>{e.setAttribute(\"url\",t,n)})}else{const n=P_(i,e);VA(e,t,n)}}}var WA='<svg viewBox=\"0 0 64 42\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098-2.506.668-4.538-.083-4.538-1.678 0-1.594 2.032-3.43 4.538-4.098.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556A1.014 1.014 0 0 0 49 17h-1.574zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.994 1.994 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805V17zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17zm29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155h18.692zM20.6 21.375v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616V37.53H20.6zm24.233-16.155v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615V37.53h-1.615zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35v-9.956z\"/></svg>';const UA=\"0 0 64 42\";class qA{constructor(t,e){const i=e.providers;const n=e.extraProviders||[];const o=new Set(e.removeProviders);const r=i.concat(n).filter(t=>{const e=t.name;if(!e){console.warn(Object(ss[\"a\"])(\"media-embed-no-provider-name: The configured media provider has no name and cannot be used.\"),{provider:t});return false}return!o.has(e)});this.locale=t;this.providerDefinitions=r}hasMedia(t){return!!this._getMedia(t)}getMediaViewElement(t,e,i){return this._getMedia(e).getViewElement(t,i)}_getMedia(t){if(!t){return new $A(this.locale)}t=t.trim();for(const e of this.providerDefinitions){const i=e.html;let n=e.url;if(!Array.isArray(n)){n=[n]}for(const e of n){const n=this._getUrlMatches(t,e);if(n){return new $A(this.locale,t,n,i)}}}return null}_getUrlMatches(t,e){let i=t.match(e);if(i){return i}let n=t.replace(/^https?:\\/\\//,\"\");i=n.match(e);if(i){return i}n=n.replace(/^www\\./,\"\");i=n.match(e);if(i){return i}return null}}class $A{constructor(t,e,i,n){this.url=this._getValidUrl(e);this._t=t.t;this._match=i;this._previewRenderer=n}getViewElement(t,e){const i={};if(e.renderForEditingView||e.renderMediaPreview&&this.url&&this._previewRenderer){if(this.url){i[\"data-oembed-url\"]=this.url}if(e.renderForEditingView){i.class=\"ck-media__wrapper\"}const n=this._getPreviewHtml(e);return t.createUIElement(\"div\",i,(function(t){const e=this.toDomElement(t);e.innerHTML=n;return e}))}else{if(this.url){i.url=this.url}return t.createEmptyElement(\"oembed\",i)}}_getPreviewHtml(t){if(this._previewRenderer){return this._previewRenderer(this._match)}else{if(this.url&&t.renderForEditingView){return this._getPlaceholderHtml()}return\"\"}}_getPlaceholderHtml(){const t=new Xb;const e=new Gb;t.text=this._t(\"Open media in new tab\");e.content=WA;e.viewBox=UA;const i=new Hp({tag:\"div\",attributes:{class:\"ck ck-reset_all ck-media__placeholder\"},children:[{tag:\"div\",attributes:{class:\"ck-media__placeholder__icon\"},children:[e]},{tag:\"a\",attributes:{class:\"ck-media__placeholder__url\",target:\"_blank\",rel:\"noopener noreferrer\",href:this.url},children:[{tag:\"span\",attributes:{class:\"ck-media__placeholder__url__text\"},children:[this.url]},t]}]}).render();return i.outerHTML}_getValidUrl(t){if(!t){return null}if(t.match(/^https?/)){return t}return\"https://\"+t}}var YA=i(82);class GA extends Nw{static get pluginName(){return\"MediaEmbedEditing\"}constructor(t){super(t);t.config.define(\"mediaEmbed\",{providers:[{name:\"dailymotion\",url:/^dailymotion\\.com\\/video\\/(\\w+)/,html:t=>{const e=t[1];return'<div style=\"position: relative; padding-bottom: 100%; height: 0; \">'+`<iframe src=\"https://www.dailymotion.com/embed/video/${e}\" `+'style=\"position: absolute; width: 100%; height: 100%; top: 0; left: 0;\" '+'frameborder=\"0\" width=\"480\" height=\"270\" allowfullscreen allow=\"autoplay\">'+\"</iframe>\"+\"</div>\"}},{name:\"spotify\",url:[/^open\\.spotify\\.com\\/(artist\\/\\w+)/,/^open\\.spotify\\.com\\/(album\\/\\w+)/,/^open\\.spotify\\.com\\/(track\\/\\w+)/],html:t=>{const e=t[1];return'<div style=\"position: relative; padding-bottom: 100%; height: 0; padding-bottom: 126%;\">'+`<iframe src=\"https://open.spotify.com/embed/${e}\" `+'style=\"position: absolute; width: 100%; height: 100%; top: 0; left: 0;\" '+'frameborder=\"0\" allowtransparency=\"true\" allow=\"encrypted-media\">'+\"</iframe>\"+\"</div>\"}},{name:\"youtube\",url:[/^(?:m\\.)?youtube\\.com\\/watch\\?v=([\\w-]+)/,/^(?:m\\.)?youtube\\.com\\/v\\/([\\w-]+)/,/^youtube\\.com\\/embed\\/([\\w-]+)/,/^youtu\\.be\\/([\\w-]+)/],html:t=>{const e=t[1];return'<div style=\"position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;\">'+`<iframe src=\"https://www.youtube.com/embed/${e}\" `+'style=\"position: absolute; width: 100%; height: 100%; top: 0; left: 0;\" '+'frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen>'+\"</iframe>\"+\"</div>\"}},{name:\"vimeo\",url:[/^vimeo\\.com\\/(\\d+)/,/^vimeo\\.com\\/[^/]+\\/[^/]+\\/video\\/(\\d+)/,/^vimeo\\.com\\/album\\/[^/]+\\/video\\/(\\d+)/,/^vimeo\\.com\\/channels\\/[^/]+\\/(\\d+)/,/^vimeo\\.com\\/groups\\/[^/]+\\/videos\\/(\\d+)/,/^vimeo\\.com\\/ondemand\\/[^/]+\\/(\\d+)/,/^player\\.vimeo\\.com\\/video\\/(\\d+)/],html:t=>{const e=t[1];return'<div style=\"position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;\">'+`<iframe src=\"https://player.vimeo.com/video/${e}\" `+'style=\"position: absolute; width: 100%; height: 100%; top: 0; left: 0;\" '+'frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen>'+\"</iframe>\"+\"</div>\"}},{name:\"instagram\",url:/^instagram\\.com\\/p\\/(\\w+)/},{name:\"twitter\",url:/^twitter\\.com/},{name:\"googleMaps\",url:/^google\\.com\\/maps/},{name:\"flickr\",url:/^flickr\\.com/},{name:\"facebook\",url:/^facebook\\.com/}]});this.registry=new qA(t.locale,t.config.get(\"mediaEmbed\"))}init(){const t=this.editor;const e=t.model.schema;const i=t.t;const n=t.conversion;const o=t.config.get(\"mediaEmbed.previewsInData\");const r=this.registry;t.commands.add(\"mediaEmbed\",new HA(t));e.register(\"media\",{isObject:true,isBlock:true,allowWhere:\"$block\",allowAttributes:[\"url\"]});n.for(\"dataDowncast\").elementToElement({model:\"media\",view:(t,e)=>{const i=t.getAttribute(\"url\");return DA(e,r,i,{renderMediaPreview:i&&o})}});n.for(\"dataDowncast\").add(LA(r,{renderMediaPreview:o}));n.for(\"editingDowncast\").elementToElement({model:\"media\",view:(t,e)=>{const n=t.getAttribute(\"url\");const o=DA(e,r,n,{renderForEditingView:true});return zA(o,e,i(\"jc\"))}});n.for(\"editingDowncast\").add(LA(r,{renderForEditingView:true}));n.for(\"upcast\").elementToElement({view:{name:\"oembed\",attributes:{url:true}},model:(t,e)=>{const i=t.getAttribute(\"url\");if(r.hasMedia(i)){return e.createElement(\"media\",{url:i})}}}).elementToElement({view:{name:\"div\",attributes:{\"data-oembed-url\":true}},model:(t,e)=>{const i=t.getAttribute(\"data-oembed-url\");if(r.hasMedia(i)){return e.createElement(\"media\",{url:i})}}})}}const JA=new Map;function XA(t,e,i){let n=JA.get(t);if(!n){n=new Map;JA.set(t,n)}n.set(e,i)}function QA(t,e){const i=JA.get(t);if(i&&i.has(e)){return i.get(e)}return KA}function KA(t){return[t]}function ZA(t,e,i={}){const n=QA(t.constructor,e.constructor);try{t=t.clone();return n(t,e,i)}catch(t){throw t}}function tC(t,e,i){t=t.slice();e=e.slice();const n=new eC(i.document,i.useRelations,i.forceWeakRemove);n.setOriginalOperations(t);n.setOriginalOperations(e);const o=n.originalOperations;if(t.length==0||e.length==0){return{operationsA:t,operationsB:e,originalOperations:o}}const r=new WeakMap;for(const e of t){r.set(e,0)}const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;while(a<t.length){const i=t[a];const o=r.get(i);if(o==e.length){a++;continue}const s=e[o];const c=ZA(i,s,n.getContext(i,s,true));const l=ZA(s,i,n.getContext(s,i,false));n.updateRelation(i,s);n.setOriginalOperations(c,i);n.setOriginalOperations(l,s);for(const t of c){r.set(t,o+l.length)}t.splice(a,1,...c);e.splice(o,1,...l)}if(i.padWithNoOps){const i=t.length-s.originalOperationsACount;const n=e.length-s.originalOperationsBCount;nC(t,n-i);nC(e,i-n)}iC(t,s.nextBaseVersionB);iC(e,s.nextBaseVersionA);return{operationsA:t,operationsB:e,originalOperations:o}}class eC{constructor(t,e,i=false){this.originalOperations=new Map;this._history=t.history;this._useRelations=e;this._forceWeakRemove=!!i;this._relations=new Map}setOriginalOperations(t,e=null){const i=e?this.originalOperations.get(e):null;for(const e of t){this.originalOperations.set(e,i||e)}}updateRelation(t,e){switch(t.constructor){case Zm:{switch(e.constructor){case og:{if(t.targetPosition.isEqual(e.sourcePosition)||e.movedRange.containsPosition(t.targetPosition)){this._setRelation(t,e,\"insertAtSource\")}else if(t.targetPosition.isEqual(e.deletionPosition)){this._setRelation(t,e,\"insertBetween\")}else if(t.targetPosition.isAfter(e.sourcePosition)){this._setRelation(t,e,\"moveTargetAfter\")}break}case Zm:{if(t.targetPosition.isEqual(e.sourcePosition)||t.targetPosition.isBefore(e.sourcePosition)){this._setRelation(t,e,\"insertBefore\")}else{this._setRelation(t,e,\"insertAfter\")}break}}break}case rg:{switch(e.constructor){case og:{if(t.splitPosition.isBefore(e.sourcePosition)){this._setRelation(t,e,\"splitBefore\")}break}case Zm:{if(t.splitPosition.isEqual(e.sourcePosition)||t.splitPosition.isBefore(e.sourcePosition)){this._setRelation(t,e,\"splitBefore\")}break}}break}case og:{switch(e.constructor){case og:{if(!t.targetPosition.isEqual(e.sourcePosition)){this._setRelation(t,e,\"mergeTargetNotMoved\")}if(t.sourcePosition.isEqual(e.targetPosition)){this._setRelation(t,e,\"mergeSourceNotMoved\")}if(t.sourcePosition.isEqual(e.sourcePosition)){this._setRelation(t,e,\"mergeSameElement\")}break}case rg:{if(t.sourcePosition.isEqual(e.splitPosition)){this._setRelation(t,e,\"splitAtSource\")}}}break}case eg:{const i=t.newRange;if(!i){return}switch(e.constructor){case Zm:{const n=$h._createFromPositionAndShift(e.sourcePosition,e.howMany);const o=n.containsPosition(i.start)||n.start.isEqual(i.start);const r=n.containsPosition(i.end)||n.end.isEqual(i.end);if((o||r)&&!n.containsRange(i)){this._setRelation(t,e,{side:o?\"left\":\"right\",path:o?i.start.path.slice():i.end.path.slice()})}break}case og:{const n=i.start.isEqual(e.targetPosition);const o=i.start.isEqual(e.deletionPosition);const r=i.end.isEqual(e.deletionPosition);const s=i.end.isEqual(e.sourcePosition);if(n||o||r||s){this._setRelation(t,e,{wasInLeftElement:n,wasStartBeforeMergedElement:o,wasEndBeforeMergedElement:r,wasInRightElement:s})}break}}break}}}getContext(t,e,i){return{aIsStrong:i,aWasUndone:this._wasUndone(t),bWasUndone:this._wasUndone(e),abRelation:this._useRelations?this._getRelation(t,e):null,baRelation:this._useRelations?this._getRelation(e,t):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(t){const e=this.originalOperations.get(t);return e.wasUndone||this._history.isUndoneOperation(e)}_getRelation(t,e){const i=this.originalOperations.get(e);const n=this._history.getUndoneOperation(i);if(!n){return null}const o=this.originalOperations.get(t);const r=this._relations.get(o);if(r){return r.get(n)||null}return null}_setRelation(t,e,i){const n=this.originalOperations.get(t);const o=this.originalOperations.get(e);let r=this._relations.get(n);if(!r){r=new Map;this._relations.set(n,r)}r.set(o,i)}}function iC(t,e){for(const i of t){i.baseVersion=e++}}function nC(t,e){for(let i=0;i<e;i++){t.push(new Mg(0))}}XA(Qm,Qm,(t,e,i)=>{if(t.key===e.key){const n=t.range.getDifference(e.range).map(e=>new Qm(e,t.key,t.oldValue,t.newValue,0));const o=t.range.getIntersection(e.range);if(o){if(i.aIsStrong){n.push(new Qm(o,e.key,e.newValue,t.newValue,0))}}if(n.length==0){return[new Mg(0)]}return n}else{return[t]}});XA(Qm,tg,(t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const i=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes);const n=i.map(e=>new Qm(e,t.key,t.oldValue,t.newValue,t.baseVersion));if(e.shouldReceiveAttributes){const i=oC(e,t.key,t.oldValue);if(i){n.unshift(i)}}return n}t.range=t.range._getTransformedByInsertion(e.position,e.howMany,false)[0];return[t]});function oC(t,e,i){const n=t.nodes;const o=n.getNode(0).getAttribute(e);if(o==i){return null}const r=new $h(t.position,t.position.getShiftedBy(t.howMany));return new Qm(r,e,o,i,0)}XA(Qm,og,(t,e)=>{const i=[];if(t.range.start.hasSameParentAs(e.deletionPosition)){if(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition)){i.push($h._createFromPositionAndShift(e.graveyardPosition,1))}}const n=t.range._getTransformedByMergeOperation(e);if(!n.isCollapsed){i.push(n)}return i.map(e=>new Qm(e,t.key,t.oldValue,t.newValue,t.baseVersion))});XA(Qm,Zm,(t,e)=>{const i=rC(t.range,e);return i.map(e=>new Qm(e,t.key,t.oldValue,t.newValue,t.baseVersion))});function rC(t,e){const i=$h._createFromPositionAndShift(e.sourcePosition,e.howMany);let n=null;let o=[];if(i.containsRange(t,true)){n=t}else if(t.start.hasSameParentAs(i.start)){o=t.getDifference(i);n=t.getIntersection(i)}else{o=[t]}const r=[];for(let t of o){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const i=e.getMovedRangeStart();const n=t.start.hasSameParentAs(i);t=t._getTransformedByInsertion(i,e.howMany,n);r.push(...t)}if(n){r.push(n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,false)[0])}return r}XA(Qm,rg,(t,e)=>{if(t.range.end.isEqual(e.insertionPosition)){if(!e.graveyardPosition){t.range.end.offset++}return[t]}if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const i=t.clone();i.range=new $h(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition));t.range.end=e.splitPosition.clone();t.range.end.stickiness=\"toPrevious\";return[t,i]}t.range=t.range._getTransformedBySplitOperation(e);return[t]});XA(tg,Qm,(t,e)=>{const i=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const n=oC(t,e.key,e.newValue);if(n){i.push(n)}}return i});XA(tg,tg,(t,e,i)=>{if(t.position.isEqual(e.position)&&i.aIsStrong){return[t]}t.position=t.position._getTransformedByInsertOperation(e);return[t]});XA(tg,Zm,(t,e)=>{t.position=t.position._getTransformedByMoveOperation(e);return[t]});XA(tg,rg,(t,e)=>{t.position=t.position._getTransformedBySplitOperation(e);return[t]});XA(tg,og,(t,e)=>{t.position=t.position._getTransformedByMergeOperation(e);return[t]});XA(eg,tg,(t,e)=>{if(t.oldRange){t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]}if(t.newRange){t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]}return[t]});XA(eg,eg,(t,e,i)=>{if(t.name==e.name){if(i.aIsStrong){t.oldRange=e.newRange?e.newRange.clone():null}else{return[new Mg(0)]}}return[t]});XA(eg,og,(t,e)=>{if(t.oldRange){t.oldRange=t.oldRange._getTransformedByMergeOperation(e)}if(t.newRange){t.newRange=t.newRange._getTransformedByMergeOperation(e)}return[t]});XA(eg,Zm,(t,e,i)=>{if(t.oldRange){t.oldRange=$h._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))}if(t.newRange){if(i.abRelation){const n=$h._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if(i.abRelation.side==\"left\"&&e.targetPosition.isEqual(t.newRange.start)){t.newRange.start.path=i.abRelation.path;t.newRange.end=n.end;return[t]}else if(i.abRelation.side==\"right\"&&e.targetPosition.isEqual(t.newRange.end)){t.newRange.start=n.start;t.newRange.end.path=i.abRelation.path;return[t]}}t.newRange=$h._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]});XA(eg,rg,(t,e,i)=>{if(t.oldRange){t.oldRange=t.oldRange._getTransformedBySplitOperation(e)}if(t.newRange){if(i.abRelation){const n=t.newRange._getTransformedBySplitOperation(e);if(t.newRange.start.isEqual(e.splitPosition)&&i.abRelation.wasStartBeforeMergedElement){t.newRange.start=qh._createAt(e.insertionPosition)}else if(t.newRange.start.isEqual(e.splitPosition)&&!i.abRelation.wasInLeftElement){t.newRange.start=qh._createAt(e.moveTargetPosition)}if(t.newRange.end.isEqual(e.splitPosition)&&i.abRelation.wasInRightElement){t.newRange.end=qh._createAt(e.moveTargetPosition)}else if(t.newRange.end.isEqual(e.splitPosition)&&i.abRelation.wasEndBeforeMergedElement){t.newRange.end=qh._createAt(e.insertionPosition)}else{t.newRange.end=n.end}return[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]});XA(og,tg,(t,e)=>{if(t.sourcePosition.hasSameParentAs(e.position)){t.howMany+=e.howMany}t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e);t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e);return[t]});XA(og,og,(t,e,i)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(!i.bWasUndone){return[new Mg(0)]}else{const i=e.graveyardPosition.path.slice();i.push(0);t.sourcePosition=new qh(e.graveyardPosition.root,i);t.howMany=0;return[t]}}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!i.bWasUndone&&i.abRelation!=\"splitAtSource\"){const n=t.targetPosition.root.rootName==\"$graveyard\";const o=e.targetPosition.root.rootName==\"$graveyard\";const r=n&&!o;const s=o&&!n;const a=s||!r&&i.aIsStrong;if(a){const i=e.targetPosition._getTransformedByMergeOperation(e);const n=t.targetPosition._getTransformedByMergeOperation(e);return[new Zm(i,t.howMany,n,0)]}else{return[new Mg(0)]}}if(t.sourcePosition.hasSameParentAs(e.targetPosition)){t.howMany+=e.howMany}t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e);t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e);if(!t.graveyardPosition.isEqual(e.graveyardPosition)||!i.aIsStrong){t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)}return[t]});XA(og,Zm,(t,e,i)=>{const n=$h._createFromPositionAndShift(e.sourcePosition,e.howMany);if(e.type==\"remove\"&&!i.bWasUndone&&!i.forceWeakRemove){if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition)){return[new Mg(0)]}}if(t.sourcePosition.hasSameParentAs(e.targetPosition)){t.howMany+=e.howMany}if(t.sourcePosition.hasSameParentAs(e.sourcePosition)){t.howMany-=e.howMany}t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e);t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e);if(!t.graveyardPosition.isEqual(e.targetPosition)){t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}return[t]});XA(og,rg,(t,e,i)=>{if(e.graveyardPosition){t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1);if(t.deletionPosition.isEqual(e.graveyardPosition)){t.howMany=e.howMany}}if(t.targetPosition.isEqual(e.splitPosition)){const n=e.howMany!=0;const o=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(n||o||i.abRelation==\"mergeTargetNotMoved\"){t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e);return[t]}}if(t.sourcePosition.isEqual(e.splitPosition)){if(i.abRelation==\"mergeSourceNotMoved\"){t.howMany=0;t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e);return[t]}if(i.abRelation==\"mergeSameElement\"||t.sourcePosition.offset>0){t.sourcePosition=e.moveTargetPosition.clone();t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e);return[t]}}if(t.sourcePosition.hasSameParentAs(e.splitPosition)){t.howMany=e.splitPosition.offset}t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e);t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e);return[t]});XA(Zm,tg,(t,e)=>{const i=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);const n=i._getTransformedByInsertOperation(e,false)[0];t.sourcePosition=n.start;t.howMany=n.end.offset-n.start.offset;if(!t.targetPosition.isEqual(e.position)){t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)}return[t]});XA(Zm,Zm,(t,e,i)=>{const n=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);const o=$h._createFromPositionAndShift(e.sourcePosition,e.howMany);let r=i.aIsStrong;let s=!i.aIsStrong;if(i.abRelation==\"insertBefore\"||i.baRelation==\"insertAfter\"){s=true}else if(i.abRelation==\"insertAfter\"||i.baRelation==\"insertBefore\"){s=false}let a;if(t.targetPosition.isEqual(e.targetPosition)&&s){a=t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)}else{a=t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}if(sC(t,e)&&sC(e,t)){return[e.getReversed()]}const c=n.containsPosition(e.targetPosition);if(c&&n.containsRange(o,true)){n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);return aC([n],a)}const l=o.containsPosition(t.targetPosition);if(l&&o.containsRange(n,true)){n.start=n.start._getCombined(e.sourcePosition,e.getMovedRangeStart());n.end=n.end._getCombined(e.sourcePosition,e.getMovedRangeStart());return aC([n],a)}const d=Os(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if(d==\"prefix\"||d==\"extension\"){n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);return aC([n],a)}if(t.type==\"remove\"&&e.type!=\"remove\"&&!i.aWasUndone&&!i.forceWeakRemove){r=true}else if(t.type!=\"remove\"&&e.type==\"remove\"&&!i.bWasUndone&&!i.forceWeakRemove){r=false}const u=[];const h=n.getDifference(o);for(const t of h){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany);t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const i=Os(t.start.getParentPath(),e.getMovedRangeStart().getParentPath())==\"same\";const n=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,i);u.push(...n)}const f=n.getIntersection(o);if(f!==null&&r){f.start=f.start._getCombined(e.sourcePosition,e.getMovedRangeStart());f.end=f.end._getCombined(e.sourcePosition,e.getMovedRangeStart());if(u.length===0){u.push(f)}else if(u.length==1){if(o.start.isBefore(n.start)||o.start.isEqual(n.start)){u.unshift(f)}else{u.push(f)}}else{u.splice(1,0,f)}}if(u.length===0){return[new Mg(t.baseVersion)]}return aC(u,a)});XA(Zm,rg,(t,e,i)=>{let n=t.targetPosition.clone();if(!t.targetPosition.isEqual(e.insertionPosition)||!e.graveyardPosition||i.abRelation==\"moveTargetAfter\"){n=t.targetPosition._getTransformedBySplitOperation(e)}const o=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);if(o.end.isEqual(e.insertionPosition)){if(!e.graveyardPosition){t.howMany++}t.targetPosition=n;return[t]}if(o.start.hasSameParentAs(e.splitPosition)&&o.containsPosition(e.splitPosition)){let t=new $h(e.splitPosition,o.end);t=t._getTransformedBySplitOperation(e);const i=[new $h(o.start,e.splitPosition),t];return aC(i,n)}if(t.targetPosition.isEqual(e.splitPosition)&&i.abRelation==\"insertAtSource\"){n=e.moveTargetPosition}if(t.targetPosition.isEqual(e.insertionPosition)&&i.abRelation==\"insertBetween\"){n=t.targetPosition}const r=o._getTransformedBySplitOperation(e);const s=[r];if(e.graveyardPosition){const n=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);if(t.howMany>1&&n&&!i.aWasUndone){s.push($h._createFromPositionAndShift(e.insertionPosition,1))}}return aC(s,n)});XA(Zm,og,(t,e,i)=>{const n=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)){if(t.type==\"remove\"&&!i.forceWeakRemove){if(!i.aWasUndone){const i=[];let n=e.graveyardPosition.clone();let o=e.targetPosition._getTransformedByMergeOperation(e);if(t.howMany>1){i.push(new Zm(t.sourcePosition,t.howMany-1,t.targetPosition,0));n=n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1);o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1)}const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition);const s=new Zm(n,1,r,0);const a=s.getMovedRangeStart().path.slice();a.push(0);const c=new qh(s.targetPosition.root,a);o=o._getTransformedByMove(n,r,1);const l=new Zm(o,e.howMany,c,0);i.push(s);i.push(l);return i}}else{if(t.howMany==1){if(!i.bWasUndone){return[new Mg(0)]}else{t.sourcePosition=e.graveyardPosition.clone();t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e);return[t]}}}}const o=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);const r=o._getTransformedByMergeOperation(e);t.sourcePosition=r.start;t.howMany=r.end.offset-r.start.offset;t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e);return[t]});XA(ig,tg,(t,e)=>{t.position=t.position._getTransformedByInsertOperation(e);return[t]});XA(ig,og,(t,e)=>{if(t.position.isEqual(e.deletionPosition)){t.position=e.graveyardPosition.clone();t.position.stickiness=\"toNext\";return[t]}t.position=t.position._getTransformedByMergeOperation(e);return[t]});XA(ig,Zm,(t,e)=>{t.position=t.position._getTransformedByMoveOperation(e);return[t]});XA(ig,ig,(t,e,i)=>{if(t.position.isEqual(e.position)){if(i.aIsStrong){t.oldName=e.newName}else{return[new Mg(0)]}}return[t]});XA(ig,rg,(t,e)=>{const i=t.position.path;const n=e.splitPosition.getParentPath();if(Os(i,n)==\"same\"&&!e.graveyardPosition){const e=new ig(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}t.position=t.position._getTransformedBySplitOperation(e);return[t]});XA(ng,ng,(t,e,i)=>{if(t.root===e.root&&t.key===e.key){if(!i.aIsStrong||t.newValue===e.newValue){return[new Mg(0)]}else{t.oldValue=e.newValue}}return[t]});XA(rg,tg,(t,e)=>{if(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset<e.position.offset){t.howMany+=e.howMany}t.splitPosition=t.splitPosition._getTransformedByInsertOperation(e);t.insertionPosition=rg.getInsertionPosition(t.splitPosition);return[t]});XA(rg,og,(t,e,i)=>{if(!t.graveyardPosition&&!i.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const i=e.graveyardPosition.path.slice();i.push(0);const n=new qh(e.graveyardPosition.root,i);const o=rg.getInsertionPosition(new qh(e.graveyardPosition.root,i));const r=new rg(n,0,null,0);r.insertionPosition=o;t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e);t.insertionPosition=rg.getInsertionPosition(t.splitPosition);t.graveyardPosition=r.insertionPosition.clone();t.graveyardPosition.stickiness=\"toNext\";return[r,t]}if(t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)){t.howMany--}if(t.splitPosition.hasSameParentAs(e.targetPosition)){t.howMany+=e.howMany}t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e);t.insertionPosition=rg.getInsertionPosition(t.splitPosition);if(t.graveyardPosition){t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)}return[t]});XA(rg,Zm,(t,e,i)=>{const n=$h._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const o=n.start.isEqual(t.graveyardPosition)||n.containsPosition(t.graveyardPosition);if(!i.bWasUndone&&o){const i=t.splitPosition._getTransformedByMoveOperation(e);const n=t.graveyardPosition._getTransformedByMoveOperation(e);const o=n.path.slice();o.push(0);const r=new qh(n.root,o);const s=new Zm(i,t.howMany,r,0);return[s]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.splitPosition)){const i=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);t.howMany-=i;if(t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset){t.howMany+=e.howMany}t.splitPosition=e.sourcePosition.clone();t.insertionPosition=rg.getInsertionPosition(t.splitPosition);return[t]}const o=t.splitPosition.isEqual(e.targetPosition);if(o&&(i.baRelation==\"insertAtSource\"||i.abRelation==\"splitBefore\")){t.howMany+=e.howMany;t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany);t.insertionPosition=rg.getInsertionPosition(t.splitPosition);return[t]}if(!e.sourcePosition.isEqual(e.targetPosition)){if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&t.splitPosition.offset<=e.sourcePosition.offset){t.howMany-=e.howMany}if(t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset){t.howMany+=e.howMany}}t.splitPosition.stickiness=\"toNone\";t.splitPosition=t.splitPosition._getTransformedByMoveOperation(e);t.splitPosition.stickiness=\"toNext\";if(t.graveyardPosition){t.insertionPosition=t.insertionPosition._getTransformedByMoveOperation(e)}else{t.insertionPosition=rg.getInsertionPosition(t.splitPosition)}return[t]});XA(rg,rg,(t,e,i)=>{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition){return[new Mg(0)]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){return[new Mg(0)]}if(i.abRelation==\"splitBefore\"){t.howMany=0;t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e);return[t]}}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const n=t.splitPosition.root.rootName==\"$graveyard\";const o=e.splitPosition.root.rootName==\"$graveyard\";const r=n&&!o;const s=o&&!n;const a=s||!r&&i.aIsStrong;if(a){const i=[];if(e.howMany){i.push(new Zm(e.moveTargetPosition,e.howMany,e.splitPosition,0))}if(t.howMany){i.push(new Zm(t.splitPosition,t.howMany,t.moveTargetPosition,0))}return i}else{return[new Mg(0)]}}if(t.graveyardPosition){t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)}if(t.splitPosition.isEqual(e.insertionPosition)&&i.abRelation==\"splitBefore\"){t.howMany++;return[t]}if(e.splitPosition.isEqual(t.insertionPosition)&&i.baRelation==\"splitBefore\"){const i=e.insertionPosition.path.slice();i.push(0);const n=new qh(e.insertionPosition.root,i);const o=new Zm(t.insertionPosition,1,n,0);return[t,o]}if(t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset<e.splitPosition.offset){t.howMany-=e.howMany}t.splitPosition=t.splitPosition._getTransformedBySplitOperation(e);t.insertionPosition=rg.getInsertionPosition(t.splitPosition);return[t]});function sC(t,e){return t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)===null}function aC(t,e){const i=[];for(let n=0;n<t.length;n++){const o=t[n];const r=new Zm(o.start,o.end.offset-o.start.offset,e,0);i.push(r);for(let e=n+1;e<t.length;e++){t[e]=t[e]._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)[0]}e=e._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)}return i}class cC extends Rw{constructor(t){super(t);this._stack=[];this._createdBatches=new WeakSet;this.refresh()}refresh(){this.isEnabled=this._stack.length>0}addBatch(t){const e=this.editor.model.document.selection;const i={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:i});this.refresh()}clearStack(){this._stack=[];this.refresh()}_restoreSelection(t,e,i){const n=this.editor.model;const o=n.document;const r=[];for(const e of t){const t=lC(e,i);const n=t.find(t=>t.start.root!=o.graveyard);if(n){r.push(n)}}if(r.length){n.change(t=>{t.setSelection(r,{backward:e})})}}_undo(t,e){const i=this.editor.model;const n=i.document;this._createdBatches.add(e);const o=t.operations.slice().filter(t=>t.isDocumentOperation);o.reverse();for(const t of o){const o=t.baseVersion+1;const r=Array.from(n.history.getOperations(o));const s=tC([t.getReversed()],r,{useRelations:true,document:this.editor.model.document,padWithNoOps:false,forceWeakRemove:true});const a=s.operationsA;for(const o of a){e.addOperation(o);i.applyOperation(o);n.history.setOperationAsUndone(t,o)}}}}function lC(t,e){const i=t.getTransformedByOperations(e);i.sort((t,e)=>t.start.isBefore(e.start)?-1:1);for(let t=1;t<i.length;t++){const e=i[t-1];const n=i[t];if(e.end.isTouching(n.start)){e.end=n.end;i.splice(t,1);t--}}return i}class dC extends cC{execute(t=null){const e=t?this._stack.findIndex(e=>e.batch==t):this._stack.length-1;const i=this._stack.splice(e,1)[0];const n=this.editor.model.createBatch(\"transparent\");this.editor.model.enqueueChange(n,()=>{this._undo(i.batch,n);const t=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,t);this.fire(\"revert\",i.batch,n)});this.refresh()}}class uC extends cC{execute(){const t=this._stack.pop();const e=this.editor.model.createBatch(\"transparent\");this.editor.model.enqueueChange(e,()=>{const i=t.batch.operations[t.batch.operations.length-1];const n=i.baseVersion+1;const o=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,o);this._undo(t.batch,e)});this.refresh()}}class hC extends Nw{static get pluginName(){return\"UndoEditing\"}constructor(t){super(t);this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new dC(t);this._redoCommand=new uC(t);t.commands.add(\"undo\",this._undoCommand);t.commands.add(\"redo\",this._redoCommand);this.listenTo(t.model,\"applyOperation\",(t,e)=>{const i=e[0];if(!i.isDocumentOperation){return}const n=i.batch;const o=this._redoCommand._createdBatches.has(n);const r=this._undoCommand._createdBatches.has(n);const s=this._batchRegistry.has(n);if(s||n.type==\"transparent\"&&!o&&!r){return}else{if(o){this._undoCommand.addBatch(n)}else if(!r){this._undoCommand.addBatch(n);this._redoCommand.clearStack()}}this._batchRegistry.add(n)},{priority:\"highest\"});this.listenTo(this._undoCommand,\"revert\",(t,e,i)=>{this._redoCommand.addBatch(i)});t.keystrokes.set(\"CTRL+Z\",\"undo\");t.keystrokes.set(\"CTRL+Y\",\"redo\");t.keystrokes.set(\"CTRL+SHIFT+Z\",\"redo\")}}var fC='<svg 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\"/></svg>';var mC='<svg 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\"/></svg>';class gC extends Nw{init(){const t=this.editor;const e=t.locale;const i=t.t;const n=e.uiLanguageDirection==\"ltr\"?fC:mC;const o=e.uiLanguageDirection==\"ltr\"?mC:fC;this._addButton(\"undo\",i(\"md\"),\"CTRL+Z\",n);this._addButton(\"redo\",i(\"me\"),\"CTRL+Y\",o)}_addButton(t,e,i,n){const o=this.editor;o.ui.componentFactory.add(t,r=>{const s=o.commands.get(t);const a=new Kb(r);a.set({label:e,icon:n,keystroke:i,tooltip:true});a.bind(\"isEnabled\").to(s,\"isEnabled\");this.listenTo(a,\"execute\",()=>{o.execute(t);o.editing.view.focus()});return a})}}class pC extends Nw{static get requires(){return[hC,gC]}static get pluginName(){return\"Undo\"}}const bC=/^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w.-]+)+[\\w\\-._~:/?#[\\]@!$&'()*+,;=]+$/;class wC extends Nw{static get requires(){return[oy,pC]}static get pluginName(){return\"AutoMediaEmbed\"}constructor(t){super(t);this._timeoutId=null;this._positionToInsert=null}init(){const t=this.editor;const e=t.model.document;this.listenTo(t.plugins.get(oy),\"inputTransformation\",()=>{const t=e.selection.getFirstRange();const i=Ig.fromPosition(t.start);i.stickiness=\"toPrevious\";const n=Ig.fromPosition(t.end);n.stickiness=\"toNext\";e.once(\"change:data\",()=>{this._embedMediaBetweenPositions(i,n);i.detach();n.detach()},{priority:\"high\"})});t.commands.get(\"undo\").on(\"execute\",()=>{if(this._timeoutId){Nd.window.clearTimeout(this._timeoutId);this._positionToInsert.detach();this._timeoutId=null;this._positionToInsert=null}},{priority:\"high\"})}_embedMediaBetweenPositions(t,e){const i=this.editor;const n=i.plugins.get(GA).registry;const o=new rf(t,e);const r=o.getWalker({ignoreElementEnd:true});let s=\"\";for(const t of r){if(t.item.is(\"textProxy\")){s+=t.item.data}}s=s.trim();if(!s.match(bC)){return}if(!n.hasMedia(s)){return}const a=i.commands.get(\"mediaEmbed\");if(!a.isEnabled){return}this._positionToInsert=Ig.fromPosition(t);this._timeoutId=Nd.window.setTimeout(()=>{i.model.change(t=>{this._timeoutId=null;t.remove(o);let e;if(this._positionToInsert.root.rootName!==\"$graveyard\"){e=this._positionToInsert}VA(i.model,s,e);this._positionToInsert.detach();this._positionToInsert=null})},100)}}var _C=i(84);class kC extends gb{constructor(t,e){super(e);const i=e.t;this.focusTracker=new xp;this.keystrokes=new dp;this.urlInputView=this._createUrlInput();this.saveButtonView=this._createButton(i(\"lv\"),hk,\"ck-button-save\");this.saveButtonView.type=\"submit\";this.cancelButtonView=this._createButton(i(\"lw\"),fk,\"ck-button-cancel\",\"cancel\");this._focusables=new Bp;this._focusCycler=new Nb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"shift + tab\",focusNext:\"tab\"}});this._validators=t;this.setTemplate({tag:\"form\",attributes:{class:[\"ck\",\"ck-media-form\"],tabindex:\"-1\"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render();uk({view:this});const t=[this.urlInputView,this.saveButtonView,this.cancelButtonView];t.forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)});this.keystrokes.listenTo(this.element);const e=t=>t.stopPropagation();this.keystrokes.set(\"arrowright\",e);this.keystrokes.set(\"arrowleft\",e);this.keystrokes.set(\"arrowup\",e);this.keystrokes.set(\"arrowdown\",e);this.listenTo(this.urlInputView.element,\"selectstart\",(t,e)=>{e.stopPropagation()},{priority:\"high\"})}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.inputView.element.value.trim()}set url(t){this.urlInputView.inputView.element.value=t.trim()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e){this.urlInputView.errorText=e;return false}}return true}resetFormStatus(){this.urlInputView.errorText=null;this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t;const e=new ck(this.locale,dk);const i=e.inputView;this._urlInputViewInfoDefault=t(\"pd\");this._urlInputViewInfoTip=t(\"pe\");e.label=t(\"pf\");e.infoText=this._urlInputViewInfoDefault;i.placeholder=\"https://example.com\";i.on(\"input\",()=>{e.infoText=i.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault});return e}_createButton(t,e,i,n){const o=new Kb(this.locale);o.set({label:t,icon:e,tooltip:true});o.extendTemplate({attributes:{class:i}});if(n){o.delegate(\"execute\").to(this,n)}return o}}var vC='<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path d=\"M18.68 3.03c.6 0 .59-.03.59.55v12.84c0 .59.01.56-.59.56H1.29c-.6 0-.59.03-.59-.56V3.58c0-.58-.01-.55.6-.55h17.38zM15.77 15V5H4.2v10h11.57zM2 4v1h1V4H2zm0 2v1h1V6H2zm0 2v1h1V8H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zM17 4v1h1V4h-1zm0 2v1h1V6h-1zm0 2v1h1V8h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zM7.5 7.177a.4.4 0 01.593-.351l5.133 2.824a.4.4 0 010 .7l-5.133 2.824a.4.4 0 01-.593-.35V7.176v.001z\"/></svg>\\n';class yC extends Nw{static get requires(){return[GA]}static get pluginName(){return\"MediaEmbedUI\"}init(){const t=this.editor;const e=t.commands.get(\"mediaEmbed\");const i=t.plugins.get(GA).registry;this.form=new kC(xC(t.t,i),t.locale);t.ui.componentFactory.add(\"mediaEmbed\",i=>{const n=dw(i);this._setUpDropdown(n,this.form,e,t);this._setUpForm(this.form,n,e);return n})}_setUpDropdown(t,e,i){const n=this.editor;const o=n.t;const r=t.buttonView;t.bind(\"isEnabled\").to(i);t.panelView.children.add(e);r.set({label:o(\"om\"),icon:vC,tooltip:true});r.on(\"open\",()=>{e.url=i.value||\"\";e.urlInputView.select();e.focus()},{priority:\"low\"});t.on(\"submit\",()=>{if(e.isValid()){n.execute(\"mediaEmbed\",e.url);s()}});t.on(\"change:isOpen\",()=>e.resetFormStatus());t.on(\"cancel\",()=>s());function s(){n.editing.view.focus();t.isOpen=false}}_setUpForm(t,e,i){t.delegate(\"submit\",\"cancel\").to(e);t.urlInputView.bind(\"value\").to(i,\"value\");t.urlInputView.bind(\"isReadOnly\").to(i,\"isEnabled\",t=>!t);t.saveButtonView.bind(\"isEnabled\").to(i)}}function xC(t,e){return[e=>{if(!e.url.length){return t(\"on\")}},i=>{if(!e.hasMedia(i.url)){return t(\"oo\")}}]}var AC=i(86);class CC extends Nw{static get requires(){return[GA,yC,wC,Z_]}static get pluginName(){return\"MediaEmbed\"}}function TC(t,e){for(const i of t.getChildren()){if(i.is(\"b\")&&i.getStyle(\"font-weight\")===\"normal\"){const n=t.getChildIndex(i);e.remove(i);e.insertChild(n,i.getChildren(),t)}}}function EC(t,e){if(!t.childCount){return}const i=new ry(t.document);const n=PC(t,i);if(!n.length){return}let o=null;let r=1;n.forEach((t,s)=>{const a=zC(n[s-1],t);const c=a?null:n[s-1];const l=jC(c,t);if(a){o=null;r=1}if(!o||l!==0){const n=SC(t,e);if(!o){o=IC(n,t.element,i)}else if(t.indent>r){const t=o.getChild(o.childCount-1);const e=t.getChild(t.childCount-1);o=IC(n,e,i);r+=1}else if(t.indent<r){const e=r-t.indent;o=DC(o,e);r=parseInt(t.indent)}if(t.indent<=r){if(!o.is(n.type)){o=i.rename(n.type,o)}}}const d=NC(t.element,i);i.appendChild(d,o)})}function MC(t,e){for(const i of e.createRangeIn(t)){const t=i.item;if(t.is(\"li\")){const i=t.getChild(0);if(i.is(\"p\")){e.unwrapElement(i)}}}}function PC(t,e){const i=e.createRangeIn(t);const n=new Ws({name:/^p|h\\d+$/,styles:{\"mso-list\":/.*/}});const o=[];for(const t of i){if(t.type===\"elementStart\"&&n.match(t.item)){const e=OC(t.item);o.push({element:t.item,id:e.id,order:e.order,indent:e.indent})}}return o}function SC(t,e){const i=new RegExp(`@list l${t.id}:level${t.indent}\\\\s*({[^}]*)`,\"gi\");const n=/mso-level-number-format:([^;]*);/gi;const o=i.exec(e);let r=\"decimal\";if(o&&o[1]){const t=n.exec(o[1]);if(t&&t[1]){r=t[1].trim()}}return{type:r!==\"bullet\"&&r!==\"image\"?\"ol\":\"ul\",style:r}}function IC(t,e,i){const n=e.parent;const o=i.createElement(t.type);const r=n.getChildIndex(e)+1;i.insertChild(r,o,n);return o}function NC(t,e){LC(t,e);return e.rename(\"li\",t)}function OC(t){const e={};const i=t.getStyle(\"mso-list\");if(i){const t=i.match(/(^|\\s+)l(\\d+)/i);const n=i.match(/\\s*lfo(\\d+)/i);const o=i.match(/\\s*level(\\d+)/i);if(t&&n&&o){e.id=t[2];e.order=n[1];e.indent=o[1]}}return e}function LC(t,e){const i=new Ws({name:\"span\",styles:{\"mso-list\":\"Ignore\"}});const n=e.createRangeIn(t);for(const t of n){if(t.type===\"elementStart\"&&i.match(t.item)){e.remove(t.item)}}}function zC(t,e){if(!t){return true}if(t.id!==e.id){return true}const i=e.element.previousSibling;if(!i){return true}return!RC(i)}function RC(t){return t.is(\"ol\")||t.is(\"ul\")}function jC(t,e){return t?e.indent-t.indent:e.indent-1}function DC(t,e){const i=t.getAncestors({parentFirst:true});let n=null;let o=0;for(const t of i){if(t.name===\"ul\"||t.name===\"ol\"){o++}if(o===e){n=t;break}}return n}const BC=/id=(\"|')docs-internal-guid-[-0-9a-f]+(\"|')/i;class VC{constructor(t){this.document=t}isActive(t){return BC.test(t)}execute(t){const e=new ry(this.document);TC(t.content,e);MC(t.content,e)}}function FC(t){return WC(WC(t)).replace(/(<span\\s+style=['\"]mso-spacerun:yes['\"]>[\\s]*?)[\\r\\n]+(\\s*<\\/span>)/g,\"$1$2\").replace(/<span\\s+style=['\"]mso-spacerun:yes['\"]><\\/span>/g,\"\").replace(/ <\\//g,\" </\").replace(/ <o:p><\\/o:p>/g,\" <o:p></o:p>\").replace(/<o:p>(&nbsp;|\\u00A0)<\\/o:p>/g,\"\").replace(/>(\\s*[\\r\\n]\\s*)</g,\"><\")}function HC(t){t.querySelectorAll(\"span[style*=spacerun]\").forEach(t=>{const e=t.childNodes&&t.childNodes[0]&&t.childNodes[0].data&&t.childNodes[0].data.length||0;t.innerHTML=Array(e+1).join(\"  \").substr(0,e)})}function WC(t){return t.replace(/<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g,(t,e)=>e.length===1?\" \":Array(e.length+1).join(\"  \").substr(0,e.length))}function UC(t){const e=new DOMParser;t=t.replace(/<!--\\[if gte vml 1]>/g,\"\");const i=FC(YC(t));const n=e.parseFromString(i,\"text/html\");HC(n);const o=n.body.innerHTML;const r=qC(n);const s=$C(n);return{body:r,bodyString:o,styles:s.styles,stylesString:s.stylesString}}function qC(t){const e=new pl(new Oc);const i=new jd(e,{blockFillerMode:\"nbsp\"});const n=t.createDocumentFragment();const o=t.body.childNodes;while(o.length>0){n.appendChild(o[0])}return i.domToView(n)}function $C(t){const e=[];const i=[];const n=Array.from(t.getElementsByTagName(\"style\"));for(const t of n){if(t.sheet&&t.sheet.cssRules&&t.sheet.cssRules.length){e.push(t.sheet);i.push(t.innerHTML)}}return{styles:e,stylesString:i.join(\" \")}}function YC(t){const e=/<\\/body>(.*?)(<\\/html>|$)/;const i=t.match(e);if(i&&i[1]){t=t.slice(0,i.index)+t.slice(i.index).replace(i[1],\"\")}return t}function GC(t,e){if(!t.childCount){return}const i=new ry;const n=XC(t,i);QC(n,t,i);KC(t,i);const o=ZC(t,i);if(o.length){eT(o,tT(e),i)}}function JC(t){return btoa(t.match(/\\w{2}/g).map(t=>String.fromCharCode(parseInt(t,16))).join(\"\"))}function XC(t,e){const i=e.createRangeIn(t);const n=new Ws({name:/v:(.+)/});const o=[];for(const t of i){const e=t.item;const i=e.previousSibling&&e.previousSibling.name||null;if(n.match(e)&&e.getAttribute(\"o:gfxdata\")&&i!==\"v:shapetype\"){o.push(t.item.getAttribute(\"id\"))}}return o}function QC(t,e,i){const n=i.createRangeIn(e);const o=new Ws({name:\"img\"});const r=[];for(const e of n){if(o.match(e.item)){const i=e.item;const n=i.getAttribute(\"v:shapes\")?i.getAttribute(\"v:shapes\").split(\" \"):[];if(n.length&&n.every(e=>t.indexOf(e)>-1)){r.push(i)}else if(!i.getAttribute(\"src\")){r.push(i)}}}for(const t of r){i.remove(t)}}function KC(t,e){const i=e.createRangeIn(t);const n=new Ws({name:/v:(.+)/});const o=[];for(const t of i){if(n.match(t.item)){o.push(t.item)}}for(const t of o){e.remove(t)}}function ZC(t,e){const i=e.createRangeIn(t);const n=new Ws({name:\"img\"});const o=[];for(const t of i){if(n.match(t.item)){if(t.item.getAttribute(\"src\").startsWith(\"file://\")){o.push(t.item)}}}return o}function tT(t){if(!t){return[]}const e=/{\\\\pict[\\s\\S]+?\\\\bliptag-?\\d+(\\\\blipupi-?\\d+)?({\\\\\\*\\\\blipuid\\s?[\\da-fA-F]+)?[\\s}]*?/;const i=new RegExp(\"(?:(\"+e.source+\"))([\\\\da-fA-F\\\\s]+)\\\\}\",\"g\");const n=t.match(i);const o=[];if(n){for(const t of n){let i=false;if(t.includes(\"\\\\pngblip\")){i=\"image/png\"}else if(t.includes(\"\\\\jpegblip\")){i=\"image/jpeg\"}if(i){o.push({hex:t.replace(e,\"\").replace(/[^\\da-fA-F]/g,\"\"),type:i})}}}return o}function eT(t,e,i){if(t.length===e.length){for(let n=0;n<t.length;n++){const o=`data:${e[n].type};base64,${JC(e[n].hex)}`;i.setAttribute(\"src\",o,t[n])}}}const iT=/<meta\\s*name=\"?generator\"?\\s*content=\"?microsoft\\s*word\\s*\\d+\"?\\/?>/i;const nT=/xmlns:o=\"urn:schemas-microsoft-com/i;class oT{isActive(t){return iT.test(t)||nT.test(t)}execute(t){const{body:e,stylesString:i}=UC(t.dataTransfer.getData(\"text/html\"));EC(e,i);GC(e,t.dataTransfer.getData(\"text/rtf\"));t.content=e}}class rT extends Nw{static get pluginName(){return\"PasteFromOffice\"}static get requires(){return[oy]}init(){const t=this.editor;const e=[];e.push(new oT);e.push(new VC(t.editing.view.document));t.plugins.get(\"Clipboard\").on(\"inputTransformation\",(t,i)=>{if(i.isTransformedWithPasteFromOffice){return}const n=i.dataTransfer.getData(\"text/html\");const o=e.find(t=>t.isActive(n));if(o){o.execute(i);i.isTransformedWithPasteFromOffice=true}},{priority:\"high\"})}}function sT(t,e){let i=e.parent;while(i){if(i.name===t){return i}i=i.parent}}function aT(t,e,i,n,o=1){if(e>o){n.setAttribute(t,e,i)}else{n.removeAttribute(t,i)}}function cT(t,e,i={}){const n=t.createElement(\"tableCell\",i);t.insertElement(\"paragraph\",n);t.insert(n,e)}function lT(t){if(!t||!ct(t)){return t}const{top:e,right:i,bottom:n,left:o}=t;if(e==i&&i==n&&n==o){return e}}function dT(t,e){const i=parseFloat(t);if(Number.isNaN(i)){return t}if(String(i)!==String(t)){return t}return`${i}${e}`}function uT(t,e){const i=e.parent.parent;const n=parseInt(i.getAttribute(\"headingColumns\")||0);const{column:o}=t.getCellLocation(e);return!!n&&o<n}function hT(){return t=>{t.on(\"element:table\",(t,e,i)=>{const n=e.viewItem;if(!i.consumable.test(n,{name:true})){return}const{rows:o,headingRows:r,headingColumns:s}=mT(n);const a={};if(s){a.headingColumns=s}if(r){a.headingRows=r}const c=i.writer.createElement(\"table\",a);const l=i.splitToAllowedParent(c,e.modelCursor);if(!l){return}i.writer.insert(c,l.position);i.consumable.consume(n,{name:true});if(o.length){o.forEach(t=>i.convertItem(t,i.writer.createPositionAt(c,\"end\")))}else{const t=i.writer.createElement(\"tableRow\");i.writer.insert(t,i.writer.createPositionAt(c,\"end\"));cT(i.writer,i.writer.createPositionAt(t,\"end\"))}e.modelRange=i.writer.createRange(i.writer.createPositionBefore(c),i.writer.createPositionAfter(c));if(l.cursorParent){e.modelCursor=i.writer.createPositionAt(l.cursorParent,0)}else{e.modelCursor=e.modelRange.end}})}}function fT(t){return e=>{e.on(`element:${t}`,(t,e,i)=>{const n=e.viewItem;if(!i.consumable.test(n,{name:true})){return}const o=i.writer.createElement(\"tableCell\");const r=i.splitToAllowedParent(o,e.modelCursor);if(!r){return}i.writer.insert(o,r.position);i.consumable.consume(n,{name:true});const s=i.writer.createPositionAt(o,0);i.convertChildren(n,s);if(!o.childCount){i.writer.insertElement(\"paragraph\",s)}e.modelRange=i.writer.createRange(i.writer.createPositionBefore(o),i.writer.createPositionAfter(o));e.modelCursor=e.modelRange.end})}}function mT(t){const e={headingRows:0,headingColumns:0};const i=[];const n=[];let o;for(const r of Array.from(t.getChildren())){if(r.name===\"tbody\"||r.name===\"thead\"||r.name===\"tfoot\"){if(r.name===\"thead\"&&!o){o=r}const t=Array.from(r.getChildren()).filter(t=>t.is(\"element\",\"tr\"));for(const r of t){if(r.parent.name===\"thead\"&&r.parent===o){e.headingRows++;i.push(r)}else{n.push(r);const t=gT(r,e,o);if(t>e.headingColumns){e.headingColumns=t}}}}}e.rows=[...i,...n];return e}function gT(t){let e=0;let i=0;const n=Array.from(t.getChildren()).filter(t=>t.name===\"th\"||t.name===\"td\");while(i<n.length&&n[i].name===\"th\"){const t=n[i];const o=parseInt(t.getAttribute(\"colspan\")||1);e=e+o;i++}return e}class pT{constructor(t,e={}){this.table=t;this.startRow=e.startRow||0;this.endRow=typeof e.endRow==\"number\"?e.endRow:undefined;this.includeSpanned=!!e.includeSpanned;this.column=typeof e.column==\"number\"?e.column:undefined;this._skipRows=new Set;this._row=0;this._column=0;this._cellIndex=0;this._spannedCells=new Map;this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){const t=this.table.getChild(this._row);if(!t||this._isOverEndRow()){return{done:true}}let e,i,n;if(this._isSpanned(this._row,this._column)){e=this._getSpanned(this._row,this._column);i=!this.includeSpanned||this._shouldSkipRow()||this._shouldSkipColumn();n=this._formatOutValue(e,this._column,true)}else{e=t.getChild(this._cellIndex);if(!e){this._row++;this._column=0;this._cellIndex=0;this._nextCellAtColumn=-1;return this.next()}const o=parseInt(e.getAttribute(\"colspan\")||1);const r=parseInt(e.getAttribute(\"rowspan\")||1);if(o>1||r>1){this._recordSpans(this._row,this._column,r,o,e)}this._nextCellAtColumn=this._column+o;i=this._shouldSkipRow()||this._shouldSkipColumn();n=this._formatOutValue(e,this._column,false,r,o)}this._column++;if(this._column==this._nextCellAtColumn){this._cellIndex++}return i?this.next():n}skipRow(t){this._skipRows.add(t)}_isOverEndRow(){return this.endRow!==undefined&&this._row>this.endRow}_formatOutValue(t,e,i,n=1,o=1){return{done:false,value:{cell:t,row:this._row,column:e,isSpanned:i,rowspan:n,colspan:o,cellIndex:this._cellIndex}}}_shouldSkipRow(){const t=this._row<this.startRow;const e=this._skipRows.has(this._row);return t||e}_shouldSkipColumn(){if(this.column===undefined){return false}return this.column!=this._column}_isSpanned(t,e){if(!this._spannedCells.has(t)){return false}const i=this._spannedCells.get(t);return i.has(e)}_getSpanned(t,e){return this._spannedCells.get(t).get(e)}_recordSpans(t,e,i,n,o){for(let i=e+1;i<=e+n-1;i++){this._markSpannedCell(t,i,o)}for(let r=t+1;r<t+i;r++){for(let t=e;t<=e+n-1;t++){this._markSpannedCell(r,t,o)}}}_markSpannedCell(t,e,i){if(!this._spannedCells.has(t)){this._spannedCells.set(t,new Map)}const n=this._spannedCells.get(t);n.set(e,i)}}function bT(t,e){e.setCustomProperty(\"table\",true,t);return A_(t,e,{hasSelectionHandle:true})}function wT(t){return!!t.getCustomProperty(\"table\")&&x_(t)}function _T(t){const e=t.getSelectedElement();if(e&&wT(e)){return e}return null}function kT(t){const e=sT(\"table\",t.getFirstPosition());if(e&&wT(e.parent)){return e.parent}return null}function vT(t){const e=[];for(const i of AT(t.getRanges())){const t=i.getContainedElement();if(t&&t.is(\"tableCell\")){e.push(t)}}return e}function yT(t){const e=[];for(const i of t.getRanges()){const t=sT(\"tableCell\",i.start);if(t){e.push(t)}}return e}function xT(t){const e=vT(t);if(e.length){return e}return yT(t)}function AT(t){return Array.from(t).sort(CT)}function CT(t,e){const i=t.start;const n=e.start;if(i.isEqual(n)){return 0}return i.isBefore(n)?-1:1}function TT(t={}){return e=>e.on(\"insert:table\",(e,i,n)=>{const o=i.item;if(!n.consumable.consume(o,\"insert\")){return}n.consumable.consume(o,\"attribute:headingRows:table\");n.consumable.consume(o,\"attribute:headingColumns:table\");const r=t&&t.asWidget;const s=n.writer.createContainerElement(\"figure\",{class:\"table\"});const a=n.writer.createContainerElement(\"table\");n.writer.insert(n.writer.createPositionAt(s,0),a);let c;if(r){c=bT(s,n.writer)}const l=new pT(o);const d={headingRows:o.getAttribute(\"headingRows\")||0,headingColumns:o.getAttribute(\"headingColumns\")||0};const u=new Map;for(const e of l){const{row:i,cell:r}=e;const s=DT(jT(i,d),a,n);const c=o.getChild(i);const l=u.get(i)||zT(c,i,s,n);u.set(i,l);n.consumable.consume(r,\"insert\");const h=n.writer.createPositionAt(l,\"end\");LT(e,d,h,n,t)}const h=n.mapper.toViewPosition(i.range.start);n.mapper.bindElements(o,r?c:s);n.writer.insert(h,r?c:s)})}function ET(t={}){return e=>e.on(\"insert:tableRow\",(e,i,n)=>{const o=i.item;if(!n.consumable.consume(o,\"insert\")){return}const r=o.parent;const s=n.mapper.toViewElement(r);const a=WT(s);const c=r.getChildIndex(o);const l=new pT(r,{startRow:c,endRow:c});const d={headingRows:r.getAttribute(\"headingRows\")||0,headingColumns:r.getAttribute(\"headingColumns\")||0};const u=new Map;for(const e of l){const i=DT(jT(c,d),a,n);const r=u.get(c)||zT(o,c,i,n);u.set(c,r);n.consumable.consume(e.cell,\"insert\");const s=n.writer.createPositionAt(r,\"end\");LT(e,d,s,n,t)}})}function MT(t={}){return e=>e.on(\"insert:tableCell\",(e,i,n)=>{const o=i.item;if(!n.consumable.consume(o,\"insert\")){return}const r=o.parent;const s=r.parent;const a=s.getChildIndex(r);const c=new pT(s,{startRow:a,endRow:a});const l={headingRows:s.getAttribute(\"headingRows\")||0,headingColumns:s.getAttribute(\"headingColumns\")||0};for(const e of c){if(e.cell===o){const i=n.mapper.toViewElement(r);const s=n.writer.createPositionAt(i,r.getChildIndex(o));LT(e,l,s,n,t);return}}})}function PT(t={}){const e=!!t.asWidget;return t=>t.on(\"attribute:headingRows:table\",(t,i,n)=>{const o=i.item;if(!n.consumable.consume(i.item,t.name)){return}const r=n.mapper.toViewElement(o);const s=WT(r);const a=i.attributeOldValue;const c=i.attributeNewValue;if(c>a){const t=Array.from(o.getChildren()).filter(({index:t})=>l(t,a-1,c));const i=DT(\"thead\",s,n);HT(t,i,n,\"end\");for(const i of t){for(const t of i.getChildren()){NT(t,\"th\",n,e)}}FT(\"tbody\",s,n)}else{const t=Array.from(o.getChildren()).filter(({index:t})=>l(t,c-1,a)).reverse();const i=DT(\"tbody\",s,n);HT(t,i,n,0);const r=new pT(o,{startRow:c?c-1:c,endRow:a-1});const d={headingRows:o.getAttribute(\"headingRows\")||0,headingColumns:o.getAttribute(\"headingColumns\")||0};for(const t of r){OT(t,d,n,e)}FT(\"thead\",s,n)}function l(t,e,i){return t>e&&t<i}})}function ST(t={}){const e=!!t.asWidget;return t=>t.on(\"attribute:headingColumns:table\",(t,i,n)=>{const o=i.item;if(!n.consumable.consume(i.item,t.name)){return}const r={headingRows:o.getAttribute(\"headingRows\")||0,headingColumns:o.getAttribute(\"headingColumns\")||0};const s=i.attributeOldValue;const a=i.attributeNewValue;const c=(s>a?s:a)-1;for(const t of new pT(o)){if(t.column>c){continue}OT(t,r,n,e)}})}function IT(){return t=>t.on(\"remove:tableRow\",(t,e,i)=>{t.stop();const n=i.writer;const o=i.mapper;const r=o.toViewPosition(e.position).getLastMatchingPosition(t=>!t.item.is(\"tr\"));const s=r.nodeAfter;const a=s.parent;const c=n.createRangeOn(s);const l=n.remove(c);for(const t of n.createRangeIn(l).getItems()){o.unbindViewElement(t)}if(!a.childCount){n.remove(n.createRangeOn(a))}},{priority:\"higher\"})}function NT(t,e,i,n){const o=i.writer;const r=i.mapper.toViewElement(t);if(!r){return}let s;if(n){const t=o.createEditableElement(e,r.getAttributes());s=M_(t,o);o.insert(o.createPositionAfter(r),s);o.move(o.createRangeIn(r),o.createPositionAt(s,0));o.remove(o.createRangeOn(r))}else{s=o.rename(e,r)}i.mapper.unbindViewElement(r);i.mapper.bindElements(t,s)}function OT(t,e,i,n){const{cell:o}=t;const r=RT(t,e);const s=i.mapper.toViewElement(o);if(s&&s.name!==r){NT(o,r,i,n)}}function LT(t,e,i,n,o){const r=o&&o.asWidget;const s=RT(t,e);const a=r?M_(n.writer.createEditableElement(s),n.writer):n.writer.createContainerElement(s);const c=t.cell;const l=c.getChild(0);const d=c.childCount===1&&l.name===\"paragraph\";n.writer.insert(i,a);if(d&&!UT(l)){const t=c.getChild(0);const e=n.writer.createPositionAt(a,\"end\");n.consumable.consume(t,\"insert\");if(o.asWidget){const i=n.writer.createContainerElement(\"span\",{style:\"display:inline-block\"});n.mapper.bindElements(t,i);n.writer.insert(e,i);n.mapper.bindElements(c,a)}else{n.mapper.bindElements(c,a);n.mapper.bindElements(t,a)}}else{n.mapper.bindElements(c,a)}}function zT(t,e,i,n){n.consumable.consume(t,\"insert\");const o=n.writer.createContainerElement(\"tr\");n.mapper.bindElements(t,o);const r=t.parent.getAttribute(\"headingRows\")||0;const s=r>0&&e>=r?e-r:e;const a=n.writer.createPositionAt(i,s);n.writer.insert(a,o);return o}function RT(t,e){const{row:i,column:n}=t;const{headingColumns:o,headingRows:r}=e;const s=r&&r>i;if(s){return\"th\"}const a=o&&o>n;return a?\"th\":\"td\"}function jT(t,e){return t<e.headingRows?\"thead\":\"tbody\"}function DT(t,e,i){const n=BT(t,e);return n?n:VT(t,e,i)}function BT(t,e){for(const i of e.getChildren()){if(i.name==t){return i}}}function VT(t,e,i){const n=i.writer.createContainerElement(t);const o=i.writer.createPositionAt(e,t==\"tbody\"?\"end\":0);i.writer.insert(o,n);return n}function FT(t,e,i){const n=BT(t,e);if(n&&n.childCount===0){i.writer.remove(i.writer.createRangeOn(n))}}function HT(t,e,i,n){for(const o of t){const t=i.mapper.toViewElement(o);if(t){i.writer.move(i.writer.createRangeOn(t),i.writer.createPositionAt(e,n))}}}function WT(t){for(const e of t.getChildren()){if(e.name===\"table\"){return e}}}function UT(t){return!![...t.getAttributeKeys()].length}class qT extends Rw{refresh(){const t=this.editor.model;const e=t.document.selection;const i=t.schema;const n=$T(e.getFirstPosition());this.isEnabled=i.checkChild(n,\"table\")}execute(t={}){const e=this.editor.model;const i=e.document.selection;const n=this.editor.plugins.get(\"TableUtils\");const o=parseInt(t.rows)||2;const r=parseInt(t.columns)||2;const s=P_(i,e);e.change(t=>{const i=n.createTable(t,o,r);e.insertContent(i,s);t.setSelection(t.createPositionAt(i.getNodeByPath([0,0,0]),0))})}}function $T(t){const e=t.parent;return e===e.root?e:e.parent}class YT extends Rw{constructor(t,e={}){super(t);this.order=e.order||\"below\"}refresh(){const t=this.editor.model.document.selection;const e=sT(\"table\",t.getFirstPosition());this.isEnabled=!!e}execute(){const t=this.editor;const e=t.model.document.selection;const i=t.plugins.get(\"TableUtils\");const n=this.order===\"above\";const o=n?e.getFirstPosition():e.getLastPosition();const r=n?e.getFirstRange():e.getLastRange();const s=r.getContainedElement()||sT(\"tableCell\",o);const a=s.parent;const c=a.parent;const l=c.getChildIndex(a);i.insertRows(c,{rows:1,at:this.order===\"below\"?l+1:l})}}class GT extends Rw{constructor(t,e={}){super(t);this.order=e.order||\"right\"}refresh(){const t=this.editor.model.document.selection;const e=sT(\"table\",t.getFirstPosition());this.isEnabled=!!e}execute(){const t=this.editor;const e=t.model.document.selection;const i=t.plugins.get(\"TableUtils\");const n=this.order===\"left\";const o=n?e.getFirstPosition():e.getLastPosition();const r=n?e.getFirstRange():e.getLastRange();const s=r.getContainedElement()||sT(\"tableCell\",o);const a=s.parent.parent;const{column:c}=i.getCellLocation(s);i.insertColumns(a,{columns:1,at:n?c:c+1})}}class JT extends Rw{constructor(t,e={}){super(t);this.direction=e.direction||\"horizontally\"}refresh(){const t=xT(this.editor.model.document.selection);this.isEnabled=t.length===1}execute(){const t=xT(this.editor.model.document.selection)[0];const e=this.direction===\"horizontally\";const i=this.editor.plugins.get(\"TableUtils\");if(e){i.splitCellHorizontally(t,2)}else{i.splitCellVertically(t,2)}}}class XT extends Rw{constructor(t,e){super(t);this.direction=e.direction;this.isHorizontal=this.direction==\"right\"||this.direction==\"left\"}refresh(){const t=this._getMergeableCell();this.value=t;this.isEnabled=!!t}execute(){const t=this.editor.model;const e=t.document;const i=yT(e.selection)[0];const n=this.value;const o=this.direction;t.change(t=>{const e=o==\"right\"||o==\"down\";const r=e?i:n;const s=e?n:i;const a=s.parent;tE(s,r,t);const c=this.isHorizontal?\"colspan\":\"rowspan\";const l=parseInt(i.getAttribute(c)||1);const d=parseInt(n.getAttribute(c)||1);t.setAttribute(c,l+d,r);t.setSelection(t.createRangeIn(r));if(!a.childCount){ZT(a,t)}})}_getMergeableCell(){const t=this.editor.model;const e=t.document;const i=yT(e.selection)[0];if(!i){return}const n=this.editor.plugins.get(\"TableUtils\");const o=this.isHorizontal?QT(i,this.direction,n):KT(i,this.direction);if(!o){return}const r=this.isHorizontal?\"rowspan\":\"colspan\";const s=parseInt(i.getAttribute(r)||1);const a=parseInt(o.getAttribute(r)||1);if(a===s){return o}}}function QT(t,e,i){const n=t.parent;const o=n.parent;const r=e==\"right\"?t.nextSibling:t.previousSibling;const s=(o.getAttribute(\"headingColumns\")||0)>0;if(!r){return}const a=e==\"right\"?t:r;const c=e==\"right\"?r:t;const{column:l}=i.getCellLocation(a);const{column:d}=i.getCellLocation(c);const u=parseInt(a.getAttribute(\"colspan\")||1);const h=uT(i,a,o);const f=uT(i,c,o);if(s&&h!=f){return}const m=l+u===d;return m?r:undefined}function KT(t,e){const i=t.parent;const n=i.parent;const o=n.getChildIndex(i);if(e==\"down\"&&o===n.childCount-1||e==\"up\"&&o===0){return}const r=parseInt(t.getAttribute(\"rowspan\")||1);const s=n.getAttribute(\"headingRows\")||0;const a=e==\"down\"&&o+r===s;const c=e==\"up\"&&o===s;if(s&&(a||c)){return}const l=parseInt(t.getAttribute(\"rowspan\")||1);const d=e==\"down\"?o+l:o;const u=[...new pT(n,{endRow:d})];const h=u.find(e=>e.cell===t);const f=h.column;const m=u.find(({row:t,rowspan:i,column:n})=>{if(n!==f){return false}if(e==\"down\"){return t===d}else{return d===t+i}});return m&&m.cell}function ZT(t,e){const i=t.parent;const n=i.getChildIndex(t);for(const{cell:t,row:o,rowspan:r}of new pT(i,{endRow:n})){const i=o+r-1>=n;if(i){aT(\"rowspan\",r-1,t,e)}}e.remove(t)}function tE(t,e,i){if(!eE(t)){if(eE(e)){i.remove(i.createRangeIn(e))}i.move(i.createRangeIn(t),i.createPositionAt(e,\"end\"))}i.remove(t)}function eE(t){return t.childCount==1&&t.getChild(0).is(\"paragraph\")&&t.getChild(0).isEmpty}class iE extends Rw{refresh(){const t=xT(this.editor.model.document.selection);const e=t[0];if(e){const i=e.parent.parent;const n=this.editor.plugins.get(\"TableUtils\").getRows(i);const o=[...new pT(i)];const r=o.filter(e=>t.includes(e.cell)).map(t=>t.row);const s=r[0];const a=r[r.length-1];this.isEnabled=a-s<n-1}else{this.isEnabled=false}}execute(){const t=xT(this.editor.model.document.selection);const e=nE(t);const i=t[0];const n=i.parent.parent;const o=[...new pT(n,{endRow:e.last})];const r=this.editor.model.createBatch();const s=rE(o,i);this.editor.model.enqueueChange(r,t=>{t.setSelection(t.createSelection(n,\"on\"))});let a;for(let t=e.last;t>=e.first;t--){this.editor.model.enqueueChange(r,e=>{const i=t;this._removeRow(i,n,e,o);a=oE(n,i,s)})}this.editor.model.enqueueChange(r,t=>{t.setSelection(t.createPositionAt(a,0))})}_removeRow(t,e,i,n){const o=new Map;const r=e.getChild(t);const s=e.getAttribute(\"headingRows\")||0;if(s&&t<s){aT(\"headingRows\",s-1,e,i,0)}n.filter(({row:e,rowspan:i})=>e===t&&i>1).forEach(({column:t,cell:e,rowspan:i})=>o.set(t,{cell:e,rowspanToSet:i-1}));n.filter(({row:e,rowspan:i})=>e<=t-1&&e+i>t).forEach(({cell:t,rowspan:e})=>aT(\"rowspan\",e-1,t,i));const a=t+1;const c=new pT(e,{includeSpanned:true,startRow:a,endRow:a});let l;for(const{row:t,column:n,cell:r}of[...c]){if(o.has(n)){const{cell:r,rowspanToSet:s}=o.get(n);const a=l?i.createPositionAfter(l):i.createPositionAt(e.getChild(t),0);i.move(i.createRangeOn(r),a);aT(\"rowspan\",s,r,i);l=r}else{l=r}}i.remove(r)}}function nE(t){const e=t.map(t=>t.parent.index).sort();return{first:e[0],last:e[e.length-1]}}function oE(t,e,i){const n=t.getChild(e)||t.getChild(t.childCount-1);let o=n.getChild(0);let r=0;for(const t of n.getChildren()){if(r>i){return o}o=t;r+=parseInt(t.getAttribute(\"colspan\")||1)}return o}function rE(t,e){const i=t.find(t=>t.cell===e);return i.column}class sE extends Rw{refresh(){const t=xT(this.editor.model.document.selection);const e=t[0];if(e){const i=e.parent.parent;const n=this.editor.plugins.get(\"TableUtils\").getColumns(i);const o=[...new pT(i)];const r=o.filter(e=>t.includes(e.cell)).map(t=>t.column).sort();const s=r[0];const a=r[r.length-1];this.isEnabled=a-s<n-1}else{this.isEnabled=false}}execute(){const[t,e]=lE(this.editor.model.document.selection);const i=t.parent.parent;const n=[...new pT(i)];const o={first:n.find(e=>e.cell===t).column,last:n.find(t=>t.cell===e).column};const r=cE(n,t,e,o);this.editor.model.change(t=>{t.setSelection(t.createRangeOn(i));aE(i,o,t);for(let e=o.last;e>=o.first;e--){for(const{cell:i,column:o,colspan:r}of n){if(o<=e&&r>1&&o+r>e){aT(\"colspan\",r-1,i,t)}else if(o===e){const e=i.parent;t.remove(i);if(!e.childCount){t.remove(e)}}}}t.setSelection(t.createPositionAt(r,0))})}}function aE(t,e,i){const n=t.getAttribute(\"headingColumns\")||0;if(n&&e.first<=n){const o=Math.min(n-1,e.last)-e.first+1;i.setAttribute(\"headingColumns\",n-o,t)}}function cE(t,e,i,n){const o=parseInt(i.getAttribute(\"colspan\")||1);if(o>1){return i}else if(e.previousSibling||i.nextSibling){return i.nextSibling||e.previousSibling}else{if(n.first){return t.reverse().find(({column:t})=>t<n.first).cell}else{return t.reverse().find(({column:t})=>t>n.last).cell}}}function lE(t){const e=xT(t);const i=e[0];const n=e.pop();const o=[i,n];return i.isBefore(n)?o:o.reverse()}class dE extends Rw{refresh(){const t=this.editor.model;const e=xT(t.document.selection);const i=e.length>0;this.isEnabled=i;this.value=i&&e.every(t=>this._isInHeading(t,t.parent.parent))}execute(t={}){const e=this.editor.model;const i=xT(e.document.selection);const n=i[0];const o=i[i.length-1];const r=n.parent.parent;const s=r.getAttribute(\"headingRows\")||0;const[a,c]=[n.parent.index,o.parent.index].sort();if(t.forceValue===this.value){return}const l=this.value?a:c+1;e.change(t=>{if(l){const e=uE(r,l,s);for(const i of e){hE(i,l,t)}}aT(\"headingRows\",l,r,t,0)})}_isInHeading(t,e){const i=parseInt(e.getAttribute(\"headingRows\")||0);return!!i&&t.parent.index<i}}function uE(t,e,i){const n=[];const o=e>i?i:0;const r=e-1;const s=new pT(t,{startRow:o,endRow:r});for(const{row:t,rowspan:i,cell:o}of s){if(i>1&&t+i>e){n.push(o)}}return n}function hE(t,e,i){const n=t.parent;const o=n.parent;const r=n.index;const s=parseInt(t.getAttribute(\"rowspan\"));const a=e-r;const c={};const l=s-a;if(l>1){c.rowspan=l}const d=parseInt(t.getAttribute(\"colspan\")||1);if(d>1){c.colspan=d}const u=o.getChildIndex(n);const h=u+a;const f=[...new pT(o,{startRow:u,endRow:h,includeSpanned:true})];let m;for(const{row:e,column:n,cell:r,cellIndex:s}of f){if(r===t&&m===undefined){m=n}if(m!==undefined&&m===n&&e===h){const t=o.getChild(e);const n=i.createPositionAt(t,s);cT(i,n,c)}}aT(\"rowspan\",a,t,i)}class fE extends Rw{refresh(){const t=this.editor.model;const e=xT(t.document.selection);const i=this.editor.plugins.get(\"TableUtils\");const n=e.length>0;this.isEnabled=n;this.value=n&&e.every(t=>uT(i,t))}execute(t={}){const e=this.editor.model;const i=this.editor.plugins.get(\"TableUtils\");const n=xT(e.document.selection);const o=n[0];const r=n[n.length-1];const s=o.parent;const a=s.parent;const[c,l]=[i.getCellLocation(o).column,i.getCellLocation(r).column].sort();if(t.forceValue===this.value){return}const d=this.value?c:l+1;e.change(t=>{aT(\"headingColumns\",d,a,t,0)})}}class mE extends Nw{static get pluginName(){return\"TableUtils\"}getCellLocation(t){const e=t.parent;const i=e.parent;const n=i.getChildIndex(e);const o=new pT(i,{startRow:n,endRow:n});for(const{cell:e,row:i,column:n}of o){if(e===t){return{row:i,column:n}}}}createTable(t,e,i){const n=t.createElement(\"table\");gE(t,n,0,e,i);return n}insertRows(t,e={}){const i=this.editor.model;const n=e.at||0;const o=e.rows||1;i.change(e=>{const i=t.getAttribute(\"headingRows\")||0;if(i>n){e.setAttribute(\"headingRows\",i+o,t)}if(n===0||n===t.childCount){gE(e,t,n,o,this.getColumns(t));return}const r=new pT(t,{endRow:n});let s=0;for(const{row:t,rowspan:i,colspan:a,cell:c}of r){const r=t<n;const l=t+i>n;if(r&&l){e.setAttribute(\"rowspan\",i+o,c)}if(t===n){s+=a}}gE(e,t,n,o,s)})}insertColumns(t,e={}){const i=this.editor.model;const n=e.at||0;const o=e.columns||1;i.change(e=>{const i=t.getAttribute(\"headingColumns\");if(n<i){e.setAttribute(\"headingColumns\",i+o,t)}const r=this.getColumns(t);if(n===0||r===n){for(const i of t.getChildren()){pE(o,e,e.createPositionAt(i,n?\"end\":0))}return}const s=new pT(t,{column:n,includeSpanned:true});for(const{row:i,cell:r,cellIndex:a}of s){const c=parseInt(r.getAttribute(\"rowspan\")||1);const l=parseInt(r.getAttribute(\"colspan\")||1);if(r.index!==n&&l>1){e.setAttribute(\"colspan\",l+o,r);s.skipRow(i);if(c>1){for(let t=i+1;t<i+c;t++){s.skipRow(t)}}}else{const n=e.createPositionAt(t.getChild(i),a);pE(o,e,n)}}})}splitCellVertically(t,e=2){const i=this.editor.model;const n=t.parent;const o=n.parent;const r=parseInt(t.getAttribute(\"rowspan\")||1);const s=parseInt(t.getAttribute(\"colspan\")||1);i.change(i=>{if(s>1){const{newCellsSpan:n,updatedSpan:o}=bE(s,e);aT(\"colspan\",o,t,i);const a={};if(n>1){a.colspan=n}if(r>1){a.rowspan=r}const c=s>e?e-1:s-1;pE(c,i,i.createPositionAfter(t),a)}if(s<e){const n=e-s;const a=[...new pT(o)];const{column:c}=a.find(({cell:e})=>e===t);const l=a.filter(({cell:e,colspan:i,column:n})=>{const o=e!==t&&n===c;const r=n<c&&n+i>c;return o||r});for(const{cell:t,colspan:e}of l){i.setAttribute(\"colspan\",e+n,t)}const d={};if(r>1){d.rowspan=r}pE(n,i,i.createPositionAfter(t),d);const u=o.getAttribute(\"headingColumns\")||0;if(u>c){aT(\"headingColumns\",u+n,o,i)}}})}splitCellHorizontally(t,e=2){const i=this.editor.model;const n=t.parent;const o=n.parent;const r=o.getChildIndex(n);const s=parseInt(t.getAttribute(\"rowspan\")||1);const a=parseInt(t.getAttribute(\"colspan\")||1);i.change(i=>{if(s>1){const n=[...new pT(o,{startRow:r,endRow:r+s-1,includeSpanned:true})];const{newCellsSpan:c,updatedSpan:l}=bE(s,e);aT(\"rowspan\",l,t,i);const{column:d}=n.find(({cell:e})=>e===t);const u={};if(c>1){u.rowspan=c}if(a>1){u.colspan=a}for(const{column:t,row:e,cellIndex:s}of n){const n=e>=r+l;const a=t===d;const h=(e+r+l)%c===0;if(n&&a&&h){const t=i.createPositionAt(o.getChild(e),s);pE(1,i,t,u)}}}if(s<e){const n=e-s;const c=[...new pT(o,{startRow:0,endRow:r})];for(const{cell:e,rowspan:o,row:s}of c){if(e!==t&&s+o>r){const t=o+n;i.setAttribute(\"rowspan\",t,e)}}const l={};if(a>1){l.colspan=a}gE(i,o,r+1,n,1,l);const d=o.getAttribute(\"headingRows\")||0;if(d>r){aT(\"headingRows\",d+n,o,i)}}})}getColumns(t){const e=t.getChild(0);return[...e.getChildren()].reduce((t,e)=>{const i=parseInt(e.getAttribute(\"colspan\")||1);return t+i},0)}getRows(t){return t.childCount}}function gE(t,e,i,n,o,r={}){for(let s=0;s<n;s++){const n=t.createElement(\"tableRow\");t.insert(n,e,i);pE(o,t,t.createPositionAt(n,\"end\"),r)}}function pE(t,e,i,n={}){for(let o=0;o<t;o++){cT(e,i,n)}}function bE(t,e){if(t<e){return{newCellsSpan:1,updatedSpan:1}}const i=Math.floor(t/e);const n=t-i*e+i;return{newCellsSpan:i,updatedSpan:n}}function wE(t){t.document.registerPostFixer(e=>_E(e,t))}function _E(t,e){const i=e.document.differ.getChanges();let n=false;const o=new Set;for(const e of i){let i;if(e.name==\"table\"&&e.type==\"insert\"){i=e.position.nodeAfter}if(e.name==\"tableRow\"||e.name==\"tableCell\"){i=sT(\"table\",e.position)}if(AE(e)){i=sT(\"table\",e.range.start)}if(i&&!o.has(i)){n=kE(i,t)||n;n=vE(i,t)||n;o.add(i)}}return n}function kE(t,e){let i=false;const n=yE(t);if(n.length){i=true;for(const t of n){aT(\"rowspan\",t.rowspan,t.cell,e,1)}}return i}function vE(t,e){let i=false;const n=xE(t);const o=n[0];const r=Object.values(n).every(t=>t===o);if(!r){const o=Object.values(n).reduce((t,e)=>e>t?e:t,0);for(const[r,s]of Object.entries(n)){const n=o-s;if(n){for(let i=0;i<n;i++){cT(e,e.createPositionAt(t.getChild(r),\"end\"))}i=true}}}return i}function yE(t){const e=parseInt(t.getAttribute(\"headingRows\")||0);const i=t.childCount;const n=[];for(const{row:o,rowspan:r,cell:s}of new pT(t)){if(r<2){continue}const t=o<e;const a=t?e:i;if(o+r>a){const t=a-o;n.push({cell:s,rowspan:t})}}return n}function xE(t){const e={};for(const{row:i}of new pT(t,{includeSpanned:true})){if(!e[i]){e[i]=0}e[i]+=1}return e}function AE(t){const e=t.type===\"attribute\";const i=t.attributeKey;return e&&(i===\"headingRows\"||i===\"colspan\"||i===\"rowspan\")}function CE(t){t.document.registerPostFixer(e=>TE(e,t))}function TE(t,e){const i=e.document.differ.getChanges();let n=false;for(const e of i){if(e.type==\"insert\"&&e.name==\"table\"){n=EE(e.position.nodeAfter,t)||n}if(e.type==\"insert\"&&e.name==\"tableRow\"){n=ME(e.position.nodeAfter,t)||n}if(e.type==\"insert\"&&e.name==\"tableCell\"){n=PE(e.position.nodeAfter,t)||n}if(SE(e)){n=PE(e.position.parent,t)||n}}return n}function EE(t,e){let i=false;for(const n of t.getChildren()){i=ME(n,e)||i}return i}function ME(t,e){let i=false;for(const n of t.getChildren()){i=PE(n,e)||i}return i}function PE(t,e){if(t.childCount==0){e.insertElement(\"paragraph\",t);return true}const i=Array.from(t.getChildren()).filter(t=>t.is(\"text\"));for(const t of i){e.wrap(e.createRangeOn(t),\"paragraph\")}return!!i.length}function SE(t){if(!t.position||!t.position.parent.is(\"tableCell\")){return false}return t.type==\"insert\"&&t.name==\"$text\"||t.type==\"remove\"}function IE(t){t.document.registerPostFixer(()=>NE(t))}function NE(t){const e=t.document.differ;const i=new Set;for(const t of e.getChanges()){const e=t.type==\"insert\"||t.type==\"remove\"?t.position.parent:t.range.start.parent;if(e.is(\"tableCell\")&&OE(e,t.type)){i.add(e)}}if(i.size){for(const t of i.values()){e.refreshItem(t)}return true}return false}function OE(t,e){const i=Array.from(t.getChildren()).some(t=>t.is(\"paragraph\"));if(!i){return false}if(e==\"attribute\"){const e=Array.from(t.getChild(0).getAttributeKeys()).length;return t.childCount===1&&e<2}return t.childCount<=(e==\"insert\"?2:1)}var LE=i(88);class zE extends Nw{static get pluginName(){return\"TableEditing\"}init(){const t=this.editor;const e=t.model;const i=e.schema;const n=t.conversion;i.register(\"table\",{allowWhere:\"$block\",allowAttributes:[\"headingRows\",\"headingColumns\"],isLimit:true,isObject:true,isBlock:true});i.register(\"tableRow\",{allowIn:\"table\",isLimit:true});i.register(\"tableCell\",{allowIn:\"tableRow\",allowAttributes:[\"colspan\",\"rowspan\"],isObject:true});i.extend(\"$block\",{allowIn:\"tableCell\"});i.addChildCheck((t,e)=>{if(e.name==\"table\"&&Array.from(t.getNames()).includes(\"table\")){return false}});n.for(\"upcast\").add(hT());n.for(\"editingDowncast\").add(TT({asWidget:true}));n.for(\"dataDowncast\").add(TT());n.for(\"upcast\").elementToElement({model:\"tableRow\",view:\"tr\"});n.for(\"editingDowncast\").add(ET({asWidget:true}));n.for(\"dataDowncast\").add(ET());n.for(\"downcast\").add(IT());n.for(\"upcast\").add(fT(\"td\"));n.for(\"upcast\").add(fT(\"th\"));n.for(\"editingDowncast\").add(MT({asWidget:true}));n.for(\"dataDowncast\").add(MT());n.attributeToAttribute({model:\"colspan\",view:\"colspan\"});n.attributeToAttribute({model:\"rowspan\",view:\"rowspan\"});n.for(\"editingDowncast\").add(ST({asWidget:true}));n.for(\"dataDowncast\").add(ST());n.for(\"editingDowncast\").add(PT({asWidget:true}));n.for(\"dataDowncast\").add(PT());t.commands.add(\"insertTable\",new qT(t));t.commands.add(\"insertTableRowAbove\",new YT(t,{order:\"above\"}));t.commands.add(\"insertTableRowBelow\",new YT(t,{order:\"below\"}));t.commands.add(\"insertTableColumnLeft\",new GT(t,{order:\"left\"}));t.commands.add(\"insertTableColumnRight\",new GT(t,{order:\"right\"}));t.commands.add(\"removeTableRow\",new iE(t));t.commands.add(\"removeTableColumn\",new sE(t));t.commands.add(\"splitTableCellVertically\",new JT(t,{direction:\"vertically\"}));t.commands.add(\"splitTableCellHorizontally\",new JT(t,{direction:\"horizontally\"}));t.commands.add(\"mergeTableCellRight\",new XT(t,{direction:\"right\"}));t.commands.add(\"mergeTableCellLeft\",new XT(t,{direction:\"left\"}));t.commands.add(\"mergeTableCellDown\",new XT(t,{direction:\"down\"}));t.commands.add(\"mergeTableCellUp\",new XT(t,{direction:\"up\"}));t.commands.add(\"setTableColumnHeader\",new fE(t));t.commands.add(\"setTableRowHeader\",new dE(t));wE(e);IE(e);CE(e);this.editor.keystrokes.set(\"Tab\",(...t)=>this._handleTabOnSelectedTable(...t),{priority:\"low\"});this.editor.keystrokes.set(\"Tab\",this._getTabHandler(true),{priority:\"low\"});this.editor.keystrokes.set(\"Shift+Tab\",this._getTabHandler(false),{priority:\"low\"})}static get requires(){return[mE]}_handleTabOnSelectedTable(t,e){const i=this.editor;const n=i.model.document.selection;if(!n.isCollapsed&&n.rangeCount===1&&n.getFirstRange().isFlat){const t=n.getSelectedElement();if(!t||!t.is(\"table\")){return}e();i.model.change(e=>{e.setSelection(e.createRangeIn(t.getChild(0).getChild(0)))})}}_getTabHandler(t){const e=this.editor;return(i,n)=>{const o=e.model.document.selection;const r=yT(o)[0];if(!r){return}n();const s=r.parent;const a=s.parent;const c=a.getChildIndex(s);const l=s.getChildIndex(r);const d=l===0;if(!t&&d&&c===0){return}const u=l===s.childCount-1;const h=c===a.childCount-1;if(t&&h&&u){e.execute(\"insertTableRowBelow\");if(c===a.childCount-1){return}}let f;if(t&&u){const t=a.getChild(c+1);f=t.getChild(0)}else if(!t&&d){const t=a.getChild(c-1);f=t.getChild(t.childCount-1)}else{f=s.getChild(l+(t?1:-1))}e.model.change(t=>{t.setSelection(t.createRangeIn(f))})}}}var RE=i(90);class jE extends gb{constructor(t){super(t);const e=this.bindTemplate;this.items=this.createCollection();this.set(\"rows\",0);this.set(\"columns\",0);this.bind(\"label\").to(this,\"columns\",this,\"rows\",(t,e)=>`${e} × ${t}`);this.setTemplate({tag:\"div\",attributes:{class:[\"ck\"]},children:[{tag:\"div\",attributes:{class:[\"ck-insert-table-dropdown__grid\"]},children:this.items},{tag:\"div\",attributes:{class:[\"ck-insert-table-dropdown__label\"]},children:[{text:e.to(\"label\")}]}],on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(()=>{this.fire(\"execute\")})}});for(let t=0;t<100;t++){const e=new DE;e.on(\"over\",()=>{const e=Math.floor(t/10);const i=t%10;this.set(\"rows\",e+1);this.set(\"columns\",i+1)});this.items.add(e)}this.on(\"change:columns\",()=>{this._highlightGridBoxes()});this.on(\"change:rows\",()=>{this._highlightGridBoxes()})}focus(){}focusLast(){}_highlightGridBoxes(){const t=this.rows;const e=this.columns;this.items.map((i,n)=>{const o=Math.floor(n/10);const r=n%10;const s=o<t&&r<e;i.set(\"isOn\",s)})}}class DE extends gb{constructor(t){super(t);const e=this.bindTemplate;this.set(\"isOn\",false);this.setTemplate({tag:\"div\",attributes:{class:[\"ck-insert-table-dropdown-grid-box\",e.if(\"isOn\",\"ck-on\")]},on:{mouseover:e.to(\"over\")}})}}var BE='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 6v3h4V6H3zm0 4v3h4v-3H3zm0 4v3h4v-3H3zm5 3h4v-3H8v3zm5 0h4v-3h-4v3zm4-4v-3h-4v3h4zm0-4V6h-4v3h4zm1.5 8a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 17V4c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13zM12 13v-3H8v3h4zm0-4V6H8v3h4z\"/></svg>';var VE='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z\" opacity=\".6\"/><path d=\"M18 7v1H2V7h16zm0 5v1H2v-1h16z\" opacity=\".6\"/><path d=\"M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z\"/></svg>';var FE='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z\" opacity=\".6\"/><path d=\"M7 2h1v16H7V2zm5 0h1v16h-1V2z\" opacity=\".6\"/><path d=\"M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z\"/></svg>';var HE='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z\" opacity=\".6\"/><path d=\"M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z\" opacity=\".6\"/><path d=\"M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z\"/></svg>';class WE extends Nw{init(){const t=this.editor;const e=this.editor.t;const i=t.locale.contentLanguageDirection;const n=i===\"ltr\";t.ui.componentFactory.add(\"insertTable\",i=>{const n=t.commands.get(\"insertTable\");const o=dw(i);o.bind(\"isEnabled\").to(n);o.buttonView.set({icon:BE,label:e(\"nu\"),tooltip:true});let r;o.on(\"change:isOpen\",()=>{if(r){return}r=new jE(i);o.panelView.children.add(r);r.delegate(\"execute\").to(o);o.buttonView.on(\"open\",()=>{r.rows=0;r.columns=0});o.on(\"execute\",()=>{t.execute(\"insertTable\",{rows:r.rows,columns:r.columns});t.editing.view.focus()})});return o});t.ui.componentFactory.add(\"tableColumn\",t=>{const i=[{type:\"switchbutton\",model:{commandName:\"setTableColumnHeader\",label:e(\"nv\"),bindIsOn:true}},{type:\"separator\"},{type:\"button\",model:{commandName:n?\"insertTableColumnLeft\":\"insertTableColumnRight\",label:e(\"nw\")}},{type:\"button\",model:{commandName:n?\"insertTableColumnRight\":\"insertTableColumnLeft\",label:e(\"nx\")}},{type:\"button\",model:{commandName:\"removeTableColumn\",label:e(\"ny\")}}];return this._prepareDropdown(e(\"nz\"),VE,i,t)});t.ui.componentFactory.add(\"tableRow\",t=>{const i=[{type:\"switchbutton\",model:{commandName:\"setTableRowHeader\",label:e(\"oa\"),bindIsOn:true}},{type:\"separator\"},{type:\"button\",model:{commandName:\"insertTableRowBelow\",label:e(\"ob\")}},{type:\"button\",model:{commandName:\"insertTableRowAbove\",label:e(\"oc\")}},{type:\"button\",model:{commandName:\"removeTableRow\",label:e(\"od\")}}];return this._prepareDropdown(e(\"oe\"),FE,i,t)});t.ui.componentFactory.add(\"mergeTableCells\",t=>{const i=[{type:\"button\",model:{commandName:\"mergeTableCellUp\",label:e(\"of\")}},{type:\"button\",model:{commandName:n?\"mergeTableCellRight\":\"mergeTableCellLeft\",label:e(\"og\")}},{type:\"button\",model:{commandName:\"mergeTableCellDown\",label:e(\"oh\")}},{type:\"button\",model:{commandName:n?\"mergeTableCellLeft\":\"mergeTableCellRight\",label:e(\"oi\")}},{type:\"separator\"},{type:\"button\",model:{commandName:\"splitTableCellVertically\",label:e(\"oj\")}},{type:\"button\",model:{commandName:\"splitTableCellHorizontally\",label:e(\"ok\")}}];return this._prepareDropdown(e(\"ol\"),HE,i,t)})}_prepareDropdown(t,e,i,n){const o=this.editor;const r=dw(n);const s=[];const a=new ys;for(const t of i){UE(t,o,s,a)}hw(r,a,o.ui.componentFactory);r.buttonView.set({label:t,icon:e,tooltip:true});r.bind(\"isEnabled\").toMany(s,\"isEnabled\",(...t)=>t.some(t=>t));this.listenTo(r,\"execute\",t=>{o.execute(t.source.commandName);o.editing.view.focus()});return r}}function UE(t,e,i,n){const o=t.model=new d_(t.model);const{commandName:r,bindIsOn:s}=t.model;if(t.type===\"button\"||t.type===\"switchbutton\"){const t=e.commands.get(r);i.push(t);o.set({commandName:r});o.bind(\"isEnabled\").to(t);if(s){o.bind(\"isOn\").to(t,\"value\")}}o.set({withText:true});n.add(t)}class qE extends Ju{constructor(t){super(t);this.domEventType=[\"mousemove\",\"mouseup\",\"mouseleave\"]}onDomEvent(t){this.fire(t.type,t)}}function $E(t,e,i){const n=Array.from(t);const o=n[0];const r=n[n.length-1];const{row:s,column:a}=e.getCellLocation(o);const c=YE(n,a,i,e);const{row:l,column:d}=e.getCellLocation(r);const u=d-a+1;const h=l-s+1;JE(c,u,h,i,e);const f=sT(\"table\",o);XE(c,f,s,a,i);return c}function YE(t,e,i,n){const o=i.createElement(\"table\");const r=new Map;const s=new Map;for(const e of t){const t=sT(\"tableRow\",e);if(!r.has(t)){const e=t._clone();i.append(e,o);r.set(t,e)}const a=e._clone(true);const{column:c}=n.getCellLocation(e);s.set(a,c);i.append(a,r.get(t))}GE(o,e,s,i,n);return o}function GE(t,e,i,n,o){for(const r of t.getChildren()){for(const t of Array.from(r.getChildren())){const{column:r}=o.getCellLocation(t);const s=i.get(t);const a=s-e;if(r!==a){for(let e=0;e<a-r;e++){const e=n.createElement(\"tableCell\");n.insert(e,n.createPositionBefore(t));const i=n.createElement(\"paragraph\");n.insert(i,e,0);n.insertText(\"\",i,0)}}}}}function JE(t,e,i,n,o){for(const r of t.getChildren()){for(const t of r.getChildren()){const r=parseInt(t.getAttribute(\"colspan\")||1);const s=parseInt(t.getAttribute(\"rowspan\")||1);const{row:a,column:c}=o.getCellLocation(t);if(c+r>e){const i=e-c;if(i>1){n.setAttribute(\"colspan\",i,t)}else{n.removeAttribute(\"colspan\",t)}}if(a+s>i){const e=i-a;if(e>1){n.setAttribute(\"rowspan\",e,t)}else{n.removeAttribute(\"rowspan\",t)}}}}}function XE(t,e,i,n,o){const r=parseInt(e.getAttribute(\"headingRows\")||0);if(r>0){const e=r-i;o.setAttribute(\"headingRows\",e,t)}const s=parseInt(e.getAttribute(\"headingColumns\")||0);if(s>0){const e=s-n;o.setAttribute(\"headingColumns\",e,t)}}var QE=i(92);class KE extends Nw{static get pluginName(){return\"TableSelection\"}static get requires(){return[mE]}init(){const t=this.editor;const e=t.model;this.listenTo(e,\"deleteContent\",(t,e)=>this._handleDeleteContent(t,e),{priority:\"high\"});t.editing.view.addObserver(qE);this._defineSelectionConverter();this._enableShiftClickSelection();this._enableMouseDragSelection()}getSelectedTableCells(){const t=this.editor.model.document.selection;const e=vT(t);if(e.length==0){return null}return e}getSelectionAsFragment(){const t=this.getSelectedTableCells();if(!t){return null}return this.editor.model.change(e=>{const i=e.createDocumentFragment();const n=$E(t,this.editor.plugins.get(\"TableUtils\"),e);e.insert(n,i,0);return i})}_defineSelectionConverter(){const t=this.editor;const e=new Set;t.conversion.for(\"editingDowncast\").add(t=>t.on(\"selection\",(t,n,o)=>{const r=o.writer;i(r);const s=this.getSelectedTableCells();if(!s){return}for(const t of s){const i=o.mapper.toViewElement(t);r.addClass(\"ck-editor__editable_selected\",i);e.add(i)}const a=o.mapper.toViewElement(s[s.length-1]);r.setSelection(a,0)},{priority:\"lowest\"}));function i(t){for(const i of e){t.removeClass(\"ck-editor__editable_selected\",i)}e.clear()}}_enableShiftClickSelection(){const t=this.editor;let e=false;this.listenTo(t.editing.view.document,\"mousedown\",(i,n)=>{if(!this.isEnabled){return}if(!n.domEvent.shiftKey){return}const o=yT(t.model.document.selection)[0];if(!o){return}const r=this._getModelTableCellFromDomEvent(n);if(r&&tM(o,r)){e=true;this._setCellSelection(o,r);n.preventDefault()}});this.listenTo(t.editing.view.document,\"mouseup\",()=>{e=false});this.listenTo(t.editing.view.document,\"selectionChange\",t=>{if(e){t.stop()}},{priority:\"highest\"})}_enableMouseDragSelection(){const t=this.editor;let e,i;let n=false;let o=false;this.listenTo(t.editing.view.document,\"mousedown\",(t,i)=>{if(!this.isEnabled){return}if(i.domEvent.shiftKey||i.domEvent.ctrlKey||i.domEvent.altKey){return}e=this._getModelTableCellFromDomEvent(i)});this.listenTo(t.editing.view.document,\"mousemove\",(t,r)=>{if(!r.domEvent.buttons){return}if(!e){return}const s=this._getModelTableCellFromDomEvent(r);if(s&&tM(e,s)){i=s;if(!n&&i!=e){n=true}}if(!n){return}o=true;this._setCellSelection(e,i);r.preventDefault()});this.listenTo(t.editing.view.document,\"mouseup\",()=>{n=false;o=false;e=null;i=null});this.listenTo(t.editing.view.document,\"selectionChange\",t=>{if(o){t.stop()}},{priority:\"highest\"})}_handleDeleteContent(t,e){const[i,n]=e;const o=this.editor.model;const r=!n||n.direction==\"backward\";const s=vT(i);if(!s.length){return}t.stop();o.change(t=>{const e=s[r?s.length-1:0];o.change(t=>{for(const e of s){o.deleteContent(t.createSelection(e,\"in\"))}});const n=o.schema.getNearestSelectionRange(t.createPositionAt(e,0));if(n){if(i.is(\"documentSelection\")){t.setSelection(n)}else{i.setTo(n)}}})}_setCellSelection(t,e){const i=this._getCellsToSelect(t,e);this.editor.model.change(t=>{t.setSelection(i.cells.map(e=>t.createRangeOn(e)),{backward:i.backward})})}_getModelTableCellFromDomEvent(t){const e=t.target;const i=this.editor.editing.view.createPositionAt(e,0);const n=this.editor.editing.mapper.toModelPosition(i);const o=n.parent;if(!o){return}if(o.is(\"tableCell\")){return o}return sT(\"tableCell\",o)}_getCellsToSelect(t,e){const i=this.editor.plugins.get(\"TableUtils\");const n=i.getCellLocation(t);const o=i.getCellLocation(e);const r=Math.min(n.row,o.row);const s=Math.max(n.row,o.row);const a=Math.min(n.column,o.column);const c=Math.max(n.column,o.column);const l=[];for(const e of new pT(sT(\"table\",t),{startRow:r,endRow:s})){if(e.column>=a&&e.column<=c){l.push(e.cell)}}if(ZE(n,o)){return{cells:l.reverse(),backward:true}}return{cells:l,backward:false}}}function ZE(t,e){if(t.row>e.row){return true}if(t.row==e.row&&t.column>e.column){return true}return false}function tM(t,e){return t.parent.parent==e.parent.parent}class eM extends Nw{static get pluginName(){return\"TableClipboard\"}static get requires(){return[KE]}init(){const t=this.editor;const e=t.editing.view.document;this.listenTo(e,\"copy\",(t,e)=>this._onCopyCut(t,e));this.listenTo(e,\"cut\",(t,e)=>this._onCopyCut(t,e))}_onCopyCut(t,e){const i=this.editor.plugins.get(\"TableSelection\");if(!i.getSelectedTableCells()){return}if(t.name==\"cut\"&&this.editor.isReadOnly){return}e.preventDefault();t.stop();const n=this.editor.data;const o=this.editor.editing.view.document;const r=n.toView(i.getSelectionAsFragment());o.fire(\"clipboardOutput\",{dataTransfer:e.dataTransfer,content:r,method:t.name})}}var iM=i(94);class nM extends Nw{static get requires(){return[zE,WE,KE,eM,Z_]}static get pluginName(){return\"Table\"}}class oM extends Nw{static get requires(){return[fv]}static get pluginName(){return\"TableToolbar\"}afterInit(){const t=this.editor;const e=t.t;const i=t.plugins.get(fv);const n=t.config.get(\"table.contentToolbar\");const o=t.config.get(\"table.tableToolbar\");if(n){i.register(\"tableContent\",{ariaLabel:e(\"c\"),items:n,getRelatedElement:kT})}if(o){i.register(\"table\",{ariaLabel:e(\"c\"),items:o,getRelatedElement:_T})}}}const rM=[\"left\",\"right\",\"center\",\"justify\"];function sM(t){return rM.includes(t)}function aM(t,e){if(e.contentLanguageDirection==\"rtl\"){return t===\"right\"}else{return t===\"left\"}}const cM=\"alignment\";class lM extends Rw{refresh(){const t=this.editor;const e=t.locale;const i=Dw(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!i&&this._canBeAligned(i);if(this.isEnabled&&i.hasAttribute(\"alignment\")){this.value=i.getAttribute(\"alignment\")}else{this.value=e.contentLanguageDirection===\"rtl\"?\"right\":\"left\"}}execute(t={}){const e=this.editor;const i=e.locale;const n=e.model;const o=n.document;const r=t.value;n.change(t=>{const e=Array.from(o.selection.getSelectedBlocks()).filter(t=>this._canBeAligned(t));const n=e[0].getAttribute(\"alignment\");const s=aM(r,i)||n===r||!r;if(s){dM(e,t)}else{uM(e,t,r)}})}_canBeAligned(t){return this.editor.model.schema.checkAttribute(t,cM)}}function dM(t,e){for(const i of t){e.removeAttribute(cM,i)}}function uM(t,e,i){for(const n of t){e.setAttribute(cM,i,n)}}class hM extends Nw{static get pluginName(){return\"AlignmentEditing\"}constructor(t){super(t);t.config.define(\"alignment\",{options:[...rM]})}init(){const t=this.editor;const e=t.locale;const i=t.model.schema;const n=t.config.get(\"alignment.options\").filter(sM);i.extend(\"$block\",{allowAttributes:\"alignment\"});t.model.schema.setAttributeProperties(\"alignment\",{isFormatting:true});const o=fM(n.filter(t=>!aM(t,e)));t.conversion.attributeToAttribute(o);t.commands.add(\"alignment\",new lM(t))}}function fM(t){const e={model:{key:\"alignment\",values:t.slice()},view:{}};for(const i of t){e.view[i]={key:\"style\",value:{\"text-align\":i}}}return e}var mM='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z\"/></svg>';var gM='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z\"/></svg>';var pM='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z\"/></svg>';var bM='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z\"/></svg>';const wM=new Map([[\"left\",mM],[\"right\",gM],[\"center\",pM],[\"justify\",bM]]);class _M extends Nw{get localizedOptionTitles(){const t=this.editor.t;return{left:t(\"no\"),right:t(\"np\"),center:t(\"nq\"),justify:t(\"nr\")}}static get pluginName(){return\"AlignmentUI\"}init(){const t=this.editor;const e=t.ui.componentFactory;const i=t.t;const n=t.config.get(\"alignment.options\");n.filter(sM).forEach(t=>this._addButton(t));e.add(\"alignment\",t=>{const o=dw(t);const r=n.map(t=>e.create(`alignment:${t}`));uw(o,r);o.buttonView.set({label:i(\"ns\"),tooltip:true});o.toolbarView.isVertical=true;o.toolbarView.ariaLabel=i(\"nt\");o.extendTemplate({attributes:{class:\"ck-alignment-dropdown\"}});const s=t.contentLanguageDirection===\"rtl\"?gM:mM;o.buttonView.bind(\"icon\").toMany(r,\"isOn\",(...t)=>{const e=t.findIndex(t=>t);if(e<0){return s}return r[e].icon});o.bind(\"isEnabled\").toMany(r,\"isEnabled\",(...t)=>t.some(t=>t));return o})}_addButton(t){const e=this.editor;e.ui.componentFactory.add(`alignment:${t}`,i=>{const n=e.commands.get(\"alignment\");const o=new Kb(i);o.set({label:this.localizedOptionTitles[t],icon:wM.get(t),tooltip:true,isToggleable:true});o.bind(\"isEnabled\").to(n);o.bind(\"isOn\").to(n,\"value\",e=>e===t);this.listenTo(o,\"execute\",()=>{e.execute(\"alignment\",{value:t});e.editing.view.focus()});return o})}}class kM extends Nw{static get requires(){return[hM,_M]}static get pluginName(){return\"Alignment\"}}class vM extends Nw{static get requires(){return[Sv]}static get pluginName(){return\"Base64UploadAdapter\"}init(){this.editor.plugins.get(Sv).createUploadAdapter=t=>new yM(t)}}class yM{constructor(t){this.loader=t}upload(){return new Promise((t,e)=>{const i=this.reader=new window.FileReader;i.addEventListener(\"load\",()=>{t({default:i.result})});i.addEventListener(\"error\",t=>{e(t)});i.addEventListener(\"abort\",()=>{e()});this.loader.file.then(t=>{i.readAsDataURL(t)})})}abort(){this.reader.abort()}}const xM=\"code\";class AM extends Nw{static get pluginName(){return\"CodeEditing\"}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:xM});t.model.schema.setAttributeProperties(xM,{isFormatting:true,copyOnEnter:true});t.conversion.attributeToElement({model:xM,view:\"code\",upcastAlso:{styles:{\"word-wrap\":\"break-word\"}}});t.commands.add(xM,new Gw(t,xM))}}var CM='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.5 5.7l5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z\"/></svg>';var TM=i(12);const EM=\"code\";class MM extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(EM,i=>{const n=t.commands.get(EM);const o=new Kb(i);o.set({label:e(\"jf\"),icon:CM,tooltip:true,isToggleable:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(EM);t.editing.view.focus()});return o})}}class PM extends Nw{static get requires(){return[AM,MM]}static get pluginName(){return\"Code\"}}function*SM(t,e){for(const i of e){if(i&&t.getAttributeProperties(i[0]).copyOnEnter){yield i}}}class IM extends Rw{execute(){const t=this.editor.model;const e=t.document;t.change(i=>{OM(t,i,e.selection);this.fire(\"afterExecute\",{writer:i})})}refresh(){const t=this.editor.model;const e=t.document;this.isEnabled=NM(t.schema,e.selection)}}function NM(t,e){if(e.rangeCount>1){return false}const i=e.anchor;if(!i||!t.checkChild(i,\"softBreak\")){return false}const n=e.getFirstRange();const o=n.start.parent;const r=n.end.parent;if((zM(o,t)||zM(r,t))&&o!==r){return false}return true}function OM(t,e,i){const n=i.isCollapsed;const o=i.getFirstRange();const r=o.start.parent;const s=o.end.parent;const a=r==s;if(n){const n=SM(t.schema,i.getAttributes());LM(t,e,o.end);e.removeSelectionAttribute(i.getAttributeKeys());e.setSelectionAttribute(n)}else{const n=!(o.start.isAtStart&&o.end.isAtEnd);t.deleteContent(i,{leaveUnmerged:n});if(a){LM(t,e,i.focus)}else{if(n){e.setSelection(s,0)}}}}function LM(t,e,i){const n=e.createElement(\"softBreak\");t.insertContent(n,i);e.setSelection(n,\"after\")}function zM(t,e){if(t.is(\"rootElement\")){return false}return e.isLimit(t)||zM(t.parent,e)}class RM extends Yd{constructor(t){super(t);const e=this.document;e.on(\"keydown\",(t,i)=>{if(this.isEnabled&&i.keyCode==Ll.enter){let n;e.once(\"enter\",t=>n=t,{priority:\"highest\"});e.fire(\"enter\",new Gu(e,i.domEvent,{isSoft:i.shiftKey}));if(n&&n.stop.called){t.stop()}}})}observe(){}}class jM extends Nw{static get pluginName(){return\"ShiftEnter\"}init(){const t=this.editor;const e=t.model.schema;const i=t.conversion;const n=t.editing.view;const o=n.document;e.register(\"softBreak\",{allowWhere:\"$text\",isInline:true});i.for(\"upcast\").elementToElement({model:\"softBreak\",view:\"br\"});i.for(\"downcast\").elementToElement({model:\"softBreak\",view:(t,e)=>e.createEmptyElement(\"br\")});n.addObserver(RM);t.commands.add(\"shiftEnter\",new IM(t));this.listenTo(o,\"enter\",(e,i)=>{i.preventDefault();if(!i.isSoft){return}t.execute(\"shiftEnter\");n.scrollToTheSelection()},{priority:\"low\"})}}function DM(t){const e=t.t;const i=t.config.get(\"codeBlock.languages\");for(const t of i){if(t.label===\"Plain text\"){t.label=e(\"ov\")}if(t.class===undefined){t.class=`language-${t.language}`}}return i}function BM(t,e,i){const n={};for(const o of t){if(e===\"class\"){n[o[e].split(\" \").shift()]=o[i]}else{n[o[e]]=o[i]}}return n}function VM(t){return t.data.match(/^(\\s*)/)[0]}function FM(t,e){const i=t.createDocumentFragment();const n=e.split(\"\\n\").map(e=>t.createText(e));const o=n[n.length-1];for(const e of n){t.append(e,i);if(e!==o){t.appendElement(\"softBreak\",i)}}return i}function HM(t){const e=t.document.selection;const i=[];if(e.isCollapsed){i.push(e.anchor)}else{const n=e.getFirstRange().getWalker({ignoreElementEnd:true,direction:\"backward\"});for(const{item:e}of n){if(e.is(\"textProxy\")&&e.parent.is(\"codeBlock\")){const n=VM(e.textNode);const{parent:o,startOffset:r}=e.textNode;const s=t.createPositionAt(o,r+n.length);i.push(s)}}}return i}function WM(t){const e=Dw(t.getSelectedBlocks());return e&&e.is(\"codeBlock\")}class UM extends Rw{refresh(){this.value=this._getValue();this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor;const i=e.model;const n=i.document.selection;const o=DM(e);const r=o[0];const s=Array.from(n.getSelectedBlocks());const a=t.forceValue===undefined?!this.value:t.forceValue;const c=t.language||r.language;i.change(t=>{if(a){this._applyCodeBlock(t,s,c)}else{this._removeCodeBlock(t,s)}})}_getValue(){const t=this.editor.model.document.selection;const e=Dw(t.getSelectedBlocks());const i=!!(e&&e.is(\"codeBlock\"));return i?e.getAttribute(\"language\"):false}_checkEnabled(){if(this.value){return true}const t=this.editor.model.document.selection;const e=this.editor.model.schema;const i=Dw(t.getSelectedBlocks());if(!i){return false}return qM(e,i)}_applyCodeBlock(t,e,i){const n=this.editor.model.schema;const o=e.filter(t=>qM(n,t));for(const e of o){t.rename(e,\"codeBlock\");t.setAttribute(\"language\",i,e);n.removeDisallowedAttributes([e],t)}o.reverse().forEach((e,i)=>{const n=o[i+1];if(e.previousSibling===n){t.appendElement(\"softBreak\",n);t.merge(t.createPositionBefore(e))}})}_removeCodeBlock(t,e){const i=e.filter(t=>t.is(\"codeBlock\"));for(const e of i){const i=t.createRangeOn(e);for(const e of Array.from(i.getItems()).reverse()){if(e.is(\"softBreak\")&&e.parent.is(\"codeBlock\")){const{position:i}=t.split(t.createPositionBefore(e));t.rename(i.nodeAfter,\"paragraph\");t.removeAttribute(\"language\",i.nodeAfter);t.remove(e)}}t.rename(e,\"paragraph\");t.removeAttribute(\"language\",e)}}}function qM(t,e){if(e.is(\"rootElement\")||t.isLimit(e)){return false}return t.checkChild(e.parent,\"codeBlock\")}class $M extends Rw{constructor(t){super(t);this._indentSequence=t.config.get(\"codeBlock.indentSequence\")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor;const e=t.model;e.change(t=>{const i=HM(e);for(const e of i){t.insertText(this._indentSequence,e)}})}_checkEnabled(){if(!this._indentSequence){return false}return WM(this.editor.model.document.selection)}}class YM extends Rw{constructor(t){super(t);this._indentSequence=t.config.get(\"codeBlock.indentSequence\")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor;const e=t.model;e.change(t=>{const i=HM(e);for(const e of i){const i=GM(this.editor.model,e,this._indentSequence);if(i){t.remove(i)}}})}_checkEnabled(){if(!this._indentSequence){return false}const t=this.editor.model;if(!WM(t.document.selection)){return false}return HM(t).some(e=>GM(t,e,this._indentSequence))}}function GM(t,e,i){const n=JM(e);if(!n){return null}const o=VM(n);const r=o.lastIndexOf(i);if(r+i.length!==o.length){return null}if(r===-1){return null}const{parent:s,startOffset:a}=n;return t.createRange(t.createPositionAt(s,a+r),t.createPositionAt(s,a+r+i.length))}function JM(t){let e=t.parent.getChild(t.index);if(!e||e.is(\"softBreak\")){e=t.nodeBefore}if(!e||e.is(\"softBreak\")){return null}return e}function XM(t,e,i=false){const n=BM(e,\"language\",\"class\");const o=BM(e,\"language\",\"label\");return(e,r,s)=>{const{writer:a,mapper:c,consumable:l}=s;if(!l.consume(r.item,\"insert\")){return}const d=r.item.getAttribute(\"language\");const u=c.toViewPosition(t.createPositionBefore(r.item));const h={};if(i){h[\"data-language\"]=o[d];h.spellcheck=\"false\"}const f=a.createContainerElement(\"pre\",h);const m=a.createContainerElement(\"code\",{class:n[d]||null});a.insert(a.createPositionAt(f,0),m);a.insert(u,f);c.bindElements(r.item,m)}}function QM(t){return(e,i,n)=>{if(i.item.parent.name!==\"codeBlock\"){return}const{writer:o,mapper:r,consumable:s}=n;if(!s.consume(i.item,\"insert\")){return}const a=r.toViewPosition(t.createPositionBefore(i.item));o.insert(a,o.createText(\"\\n\"))}}function KM(t,e){const i=BM(e,\"class\",\"language\");const n=e[0].language;return(e,o,r)=>{const s=o.viewItem;const a=s.getChild(0);if(!a||!a.is(\"code\")){return}const{consumable:c,writer:l}=r;if(!c.test(s,{name:true})||!c.test(a,{name:true})){return}const d=l.createElement(\"codeBlock\");const u=[...a.getClassNames()];if(!u.length){u.push(\"\")}for(const t of u){const e=i[t];if(e){l.setAttribute(\"language\",e,d);break}}if(!d.hasAttribute(\"language\")){l.setAttribute(\"language\",n,d)}const h=t.processor.toData(a);const f=ZM(h);const m=FM(l,f);l.append(m,d);const g=r.splitToAllowedParent(d,o.modelCursor);if(!g){return}l.insert(d,g.position);c.consume(s,{name:true});c.consume(a,{name:true});const p=r.getSplitParts(d);o.modelRange=l.createRange(r.writer.createPositionBefore(d),r.writer.createPositionAfter(p[p.length-1]));if(g.cursorParent){o.modelCursor=l.createPositionAt(g.cursorParent,0)}else{o.modelCursor=o.modelRange.end}}}function ZM(t){const e=new RegExp(/^<code[^>]*>([\\S\\s]*)<\\/code>$/).exec(t)[1];return e.replace(/&lt;/g,\"<\").replace(/&gt;/g,\">\")}const tP=\"paragraph\";class eP extends Nw{static get pluginName(){return\"CodeBlockEditing\"}static get requires(){return[jM]}constructor(t){super(t);t.config.define(\"codeBlock\",{languages:[{language:\"plaintext\",label:\"Plain text\"},{language:\"c\",label:\"C\"},{language:\"cs\",label:\"C#\"},{language:\"cpp\",label:\"C++\"},{language:\"css\",label:\"CSS\"},{language:\"diff\",label:\"Diff\"},{language:\"xml\",label:\"HTML/XML\"},{language:\"java\",label:\"Java\"},{language:\"javascript\",label:\"JavaScript\"},{language:\"php\",label:\"PHP\"},{language:\"python\",label:\"Python\"},{language:\"ruby\",label:\"Ruby\"},{language:\"typescript\",label:\"TypeScript\"}],indentSequence:\"\\t\"})}init(){const t=this.editor;const e=t.model.schema;const i=t.model;const n=DM(t);t.commands.add(\"codeBlock\",new UM(t));t.commands.add(\"indentCodeBlock\",new $M(t));t.commands.add(\"outdentCodeBlock\",new YM(t));const o=t=>(e,i)=>{const n=this.editor.commands.get(t);if(n.isEnabled){this.editor.execute(t);i()}};t.keystrokes.set(\"Tab\",o(\"indentCodeBlock\"));t.keystrokes.set(\"Shift+Tab\",o(\"outdentCodeBlock\"));e.register(\"codeBlock\",{allowWhere:\"$block\",isBlock:true,allowAttributes:[\"language\"]});e.extend(\"$text\",{allowIn:\"codeBlock\"});e.addAttributeCheck(t=>{if(t.endsWith(\"codeBlock $text\")){return false}});t.editing.downcastDispatcher.on(\"insert:codeBlock\",XM(i,n,true));t.data.downcastDispatcher.on(\"insert:codeBlock\",XM(i,n));t.data.downcastDispatcher.on(\"insert:softBreak\",QM(i),{priority:\"high\"});t.data.upcastDispatcher.on(\"element:pre\",KM(t.data,n));this.listenTo(t.editing.view.document,\"clipboardInput\",(t,e)=>{const n=i.document.selection;if(!n.anchor.parent.is(\"codeBlock\")){return}const o=e.dataTransfer.getData(\"text/plain\");i.change(e=>{i.insertContent(FM(e,o),n);t.stop()})});this.listenTo(i,\"getSelectedContent\",(t,[n])=>{const o=n.anchor;if(n.isCollapsed||!o.parent.is(\"codeBlock\")||!o.hasSameParentAs(n.focus)){return}i.change(i=>{const r=t.return;if(r.childCount>1||n.containsEntireContent(o.parent)){const e=i.createElement(\"codeBlock\",o.parent.getAttributes());i.append(r,e);const n=i.createDocumentFragment();i.append(e,n);t.return=n}else{const t=r.getChild(0);if(e.checkAttribute(t,\"code\")){i.setAttribute(\"code\",true,t)}}})})}afterInit(){const t=this.editor;const e=t.commands;const i=e.get(\"indent\");const n=e.get(\"outdent\");if(i){i.registerChildCommand(e.get(\"indentCodeBlock\"))}if(n){n.registerChildCommand(e.get(\"outdentCodeBlock\"))}this.listenTo(t.editing.view.document,\"enter\",(e,i)=>{const n=t.model.document.selection.getLastPosition().parent;if(!n.is(\"codeBlock\")){return}nP(t,i.isSoft)||oP(t,i.isSoft)||iP(t);i.preventDefault();e.stop()})}}function iP(t){const e=t.model;const i=e.document;const n=i.selection.getLastPosition();const o=n.nodeBefore||n.textNode;let r;if(o&&o.is(\"text\")){r=VM(o)}t.model.change(e=>{t.execute(\"shiftEnter\");if(r){e.insertText(r,i.selection.anchor)}})}function nP(t,e){const i=t.model;const n=i.document;const o=t.editing.view;const r=n.selection.getLastPosition();const s=r.nodeAfter;if(e||!n.selection.isCollapsed||!r.isAtStart){return false}if(!s||!s.is(\"softBreak\")){return false}t.model.change(e=>{t.execute(\"enter\");const i=n.selection.anchor.parent.previousSibling;e.rename(i,tP);e.setSelection(i,\"in\");t.model.schema.removeDisallowedAttributes([i],e);e.remove(s)});o.scrollToTheSelection();return true}function oP(t,e){const i=t.model;const n=i.document;const o=t.editing.view;const r=n.selection.getLastPosition();const s=r.nodeBefore;let a;if(e||!n.selection.isCollapsed||!r.isAtEnd||!s){return false}if(s.is(\"softBreak\")){a=i.createRangeOn(s)}else if(s.is(\"text\")&&!s.data.match(/\\S/)&&s.previousSibling&&s.previousSibling.is(\"softBreak\")){a=i.createRange(i.createPositionBefore(s.previousSibling),i.createPositionAfter(s))}else{return false}t.model.change(e=>{e.remove(a);t.execute(\"enter\");const i=n.selection.anchor.parent;e.rename(i,tP);t.model.schema.removeDisallowedAttributes([i],e)});o.scrollToTheSelection();return true}var rP=i(97);class sP extends gb{constructor(t){super(t);const e=this.bindTemplate;this.set(\"icon\");this.set(\"isEnabled\",true);this.set(\"isOn\",false);this.set(\"isToggleable\",false);this.set(\"isVisible\",true);this.set(\"keystroke\");this.set(\"label\");this.set(\"tabindex\",-1);this.set(\"tooltip\");this.set(\"tooltipPosition\",\"s\");this.set(\"type\",\"button\");this.set(\"withText\",false);this.children=this.createCollection();this.actionView=this._createActionView();this.arrowView=this._createArrowView();this.keystrokes=new dp;this.focusTracker=new xp;this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-splitbutton\",e.if(\"isVisible\",\"ck-hidden\",t=>!t),this.arrowView.bindTemplate.if(\"isOn\",\"ck-splitbutton_open\")]},children:this.children})}render(){super.render();this.children.add(this.actionView);this.children.add(this.arrowView);this.focusTracker.add(this.actionView.element);this.focusTracker.add(this.arrowView.element);this.keystrokes.listenTo(this.element);this.keystrokes.set(\"arrowright\",(t,e)=>{if(this.focusTracker.focusedElement===this.actionView.element){this.arrowView.focus();e()}});this.keystrokes.set(\"arrowleft\",(t,e)=>{if(this.focusTracker.focusedElement===this.arrowView.element){this.actionView.focus();e()}})}focus(){this.actionView.focus()}_createActionView(){const t=new Kb;t.bind(\"icon\",\"isEnabled\",\"isOn\",\"isToggleable\",\"keystroke\",\"label\",\"tabindex\",\"tooltip\",\"tooltipPosition\",\"type\",\"withText\").to(this);t.extendTemplate({attributes:{class:\"ck-splitbutton__action\"}});t.delegate(\"execute\").to(this);return t}_createArrowView(){const t=new Kb;const e=t.bindTemplate;t.icon=Zb;t.extendTemplate({attributes:{class:\"ck-splitbutton__arrow\",\"aria-haspopup\":true,\"aria-expanded\":e.to(\"isOn\",t=>String(t))}});t.bind(\"isEnabled\").to(this);t.delegate(\"execute\").to(this,\"open\");return t}}var aP='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174zm2.795-.231l.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207zM16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h14zM5.009 15l.003 1H3v-1h2.009zm2.188-2l-1.471 1H5v-1h2.197zM10 11v.095L8.668 12H7v-1h3zm4-2v1H7V9h7zm0-2v1H7V7h7zm-4-2v1H5V5h5zM6 3v1H3V3h3z\"/></svg>';var cP=i(99);class lP extends Nw{init(){const t=this.editor;const e=t.t;const i=t.ui.componentFactory;const n=DM(t);const o=n[0];i.add(\"codeBlock\",i=>{const r=t.commands.get(\"codeBlock\");const s=dw(i,sP);const a=s.buttonView;a.set({label:e(\"nn\"),tooltip:true,icon:aP,isToggleable:true});a.bind(\"isOn\").to(r,\"value\",t=>!!t);a.on(\"execute\",()=>{t.execute(\"codeBlock\",{language:o.language});t.editing.view.focus()});s.on(\"execute\",e=>{t.execute(\"codeBlock\",{language:e.source._codeBlockLanguage,forceValue:true});t.editing.view.focus()});s.class=\"ck-code-block-dropdown\";s.bind(\"isEnabled\").to(r);hw(s,this._getLanguageListItemDefinitions(n));return s})}_getLanguageListItemDefinitions(t){const e=this.editor;const i=e.commands.get(\"codeBlock\");const n=new ys;for(const e of t){const t={type:\"button\",model:new d_({_codeBlockLanguage:e.language,label:e.label,withText:true})};t.model.bind(\"isOn\").to(i,\"value\",e=>e===t.model._codeBlockLanguage);n.add(t)}return n}}class dP extends Nw{static get requires(){return[eP,lP]}static get pluginName(){return\"CodeBlock\"}}class uP extends Rw{constructor(t,e){super(t);this.attributeKey=e}refresh(){const t=this.editor.model;const e=t.document;this.value=e.selection.getAttribute(this.attributeKey);this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model;const i=e.document;const n=i.selection;const o=t.value;e.change(t=>{if(n.isCollapsed){if(o){t.setSelectionAttribute(this.attributeKey,o)}else{t.removeSelectionAttribute(this.attributeKey)}}else{const i=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of i){if(o){t.setAttribute(this.attributeKey,o,e)}else{t.removeAttribute(this.attributeKey,e)}}}})}}var hP='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path class=\"ck-icon__fill\" d=\"M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z\"/><path d=\"M14.814 6.035L8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z\"/></svg>';class fP extends Kb{constructor(t){super(t);const e=this.bindTemplate;this.set(\"color\");this.set(\"hasBorder\");this.icon=hP;this.extendTemplate({attributes:{style:{backgroundColor:e.to(\"color\")},class:[\"ck\",\"ck-color-grid__tile\",e.if(\"hasBorder\",\"ck-color-table__color-tile_bordered\")]}})}render(){super.render();this.iconView.fillColor=\"hsl(0, 0%, 100%)\"}}var mP=i(101);class gP extends gb{constructor(t,e){super(t);const i=e&&e.colorDefinitions||[];const n={};if(e&&e.columns){n.gridTemplateColumns=`repeat( ${e.columns}, 1fr)`}this.set(\"selectedColor\");this.items=this.createCollection();this.focusTracker=new xp;this.keystrokes=new dp;this._focusCycler=new Nb({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"arrowleft\",focusNext:\"arrowright\"}});this.items.on(\"add\",(t,e)=>{e.isOn=e.color===this.selectedColor});i.forEach(t=>{const e=new fP;e.set({color:t.color,label:t.label,tooltip:true,hasBorder:t.options.hasBorder});e.on(\"execute\",()=>{this.fire(\"execute\",{value:t.color,hasBorder:t.options.hasBorder,label:t.label})});this.items.add(e)});this.setTemplate({tag:\"div\",children:this.items,attributes:{class:[\"ck\",\"ck-color-grid\"],style:n}});this.on(\"change:selectedColor\",(t,e,i)=>{for(const t of this.items){t.isOn=t.color===i}})}focus(){if(this.items.length){this.items.first.focus()}}focusLast(){if(this.items.length){this.items.last.focus()}}render(){super.render();for(const t of this.items){this.focusTracker.add(t.element)}this.items.on(\"add\",(t,e)=>{this.focusTracker.add(e.element)});this.items.on(\"remove\",(t,e)=>{this.focusTracker.remove(e.element)});this.keystrokes.listenTo(this.element)}}class pP extends ys{constructor(t){super(t);this.set(\"isEmpty\",true)}add(t,e){if(this.find(e=>e.color===t.color)){return}super.add(t,e);this.set(\"isEmpty\",false)}remove(t){const e=super.remove(t);if(this.length===0){this.set(\"isEmpty\",true)}return e}hasColor(t){return!!this.find(e=>e.color===t)}}vs(pP,Jc);var bP='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.636 9.531l-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z\"/><path d=\"M4 18h5.523v-1H4zm-2 0h1v-1H2z\"/></svg>';var wP=i(103);class _P extends gb{constructor(t,{colors:e,columns:i,removeButtonLabel:n,documentColorsLabel:o,documentColorsCount:r}){super(t);this.items=this.createCollection();this.colorDefinitions=e;this.focusTracker=new xp;this.keystrokes=new dp;this.set(\"selectedColor\");this.removeButtonLabel=n;this.columns=i;this.documentColors=new pP;this.documentColorsCount=r;this._focusCycler=new Nb({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"arrowup\",focusNext:\"arrowdown\"}});this._documentColorsLabel=o;this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-color-table\"]},children:this.items});this.items.add(this._removeColorButton())}updateDocumentColors(t,e){const i=t.document;const n=this.documentColorsCount;this.documentColors.clear();for(const o of i.getRootNames()){const r=i.getRoot(o);const s=t.createRangeIn(r);for(const t of s.getItems()){if(t.is(\"textProxy\")&&t.hasAttribute(e)){this._addColorToDocumentColors(t.getAttribute(e));if(this.documentColors.length>=n){return}}}}}updateSelectedColors(){const t=this.documentColorsGrid;const e=this.staticColorsGrid;const i=this.selectedColor;e.selectedColor=i;if(t){t.selectedColor=i}}render(){super.render();for(const t of this.items){this.focusTracker.add(t.element)}this.keystrokes.listenTo(this.element)}appendGrids(){if(this.staticColorsGrid){return}this.staticColorsGrid=this._createStaticColorsGrid();this.items.add(this.staticColorsGrid);if(this.documentColorsCount){const t=Hp.bind(this.documentColors,this.documentColors);const e=new Ab(this.locale);e.text=this._documentColorsLabel;e.extendTemplate({attributes:{class:[\"ck\",\"ck-color-grid__label\",t.if(\"isEmpty\",\"ck-hidden\")]}});this.items.add(e);this.documentColorsGrid=this._createDocumentColorsGrid();this.items.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_removeColorButton(){const t=new Kb;t.set({withText:true,icon:bP,tooltip:true,label:this.removeButtonLabel});t.class=\"ck-color-table__remove-color\";t.on(\"execute\",()=>{this.fire(\"execute\",{value:null})});return t}_createStaticColorsGrid(){const t=new gP(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});t.delegate(\"execute\").to(this);return t}_createDocumentColorsGrid(){const t=Hp.bind(this.documentColors,this.documentColors);const e=new gP(this.locale,{columns:this.columns});e.delegate(\"execute\").to(this);e.extendTemplate({attributes:{class:t.if(\"isEmpty\",\"ck-hidden\")}});e.items.bindTo(this.documentColors).using(t=>{const e=new fP;e.set({color:t.color,hasBorder:t.options&&t.options.hasBorder});if(t.label){e.set({label:t.label,tooltip:true})}e.on(\"execute\",()=>{this.fire(\"execute\",{value:t.color})});return e});this.documentColors.on(\"change:isEmpty\",(t,i,n)=>{if(n){e.selectedColor=null}});return e}_addColorToDocumentColors(t){const e=this.colorDefinitions.find(e=>e.color===t);if(!e){this.documentColors.add({color:t,label:t,options:{hasBorder:false}})}else{this.documentColors.add(Object.assign({},e))}}}const kP=\"fontSize\";const vP=\"fontFamily\";const yP=\"fontColor\";const xP=\"fontBackgroundColor\";function AP(t,e){const i={model:{key:t,values:[]},view:{},upcastAlso:{}};for(const t of e){i.model.values.push(t.model);i.view[t.model]=t.view;if(t.upcastAlso){i.upcastAlso[t.model]=t.upcastAlso}}return i}function CP(t){return e=>MP(e.getStyle(t))}function TP(t){return(e,i)=>i.createAttributeElement(\"span\",{style:`${t}:${e}`},{priority:7})}function EP({dropdownView:t,colors:e,columns:i,removeButtonLabel:n,documentColorsLabel:o,documentColorsCount:r}){const s=t.locale;const a=new _P(s,{colors:e,columns:i,removeButtonLabel:n,documentColorsLabel:o,documentColorsCount:r});t.colorTableView=a;t.panelView.children.add(a);a.delegate(\"execute\").to(t,\"execute\");return a}function MP(t){return t.replace(/\\s/g,\"\")}class PP extends uP{constructor(t){super(t,xP)}}class SP extends Nw{static get pluginName(){return\"FontBackgroundColorEditing\"}constructor(t){super(t);t.config.define(xP,{colors:[{color:\"hsl(0, 0%, 0%)\",label:\"Black\"},{color:\"hsl(0, 0%, 30%)\",label:\"Dim grey\"},{color:\"hsl(0, 0%, 60%)\",label:\"Grey\"},{color:\"hsl(0, 0%, 90%)\",label:\"Light grey\"},{color:\"hsl(0, 0%, 100%)\",label:\"White\",hasBorder:true},{color:\"hsl(0, 75%, 60%)\",label:\"Red\"},{color:\"hsl(30, 75%, 60%)\",label:\"Orange\"},{color:\"hsl(60, 75%, 60%)\",label:\"Yellow\"},{color:\"hsl(90, 75%, 60%)\",label:\"Light green\"},{color:\"hsl(120, 75%, 60%)\",label:\"Green\"},{color:\"hsl(150, 75%, 60%)\",label:\"Aquamarine\"},{color:\"hsl(180, 75%, 60%)\",label:\"Turquoise\"},{color:\"hsl(210, 75%, 60%)\",label:\"Light blue\"},{color:\"hsl(240, 75%, 60%)\",label:\"Blue\"},{color:\"hsl(270, 75%, 60%)\",label:\"Purple\"}],columns:5});t.conversion.for(\"upcast\").elementToAttribute({view:{name:\"span\",styles:{\"background-color\":/[\\s\\S]+/}},model:{key:xP,value:CP(\"background-color\")}});t.conversion.for(\"downcast\").attributeToElement({model:xP,view:TP(\"background-color\")});t.commands.add(xP,new PP(t));t.model.schema.extend(\"$text\",{allowAttributes:xP});t.model.schema.setAttributeProperties(xP,{isFormatting:true,copyOnEnter:true})}}function IP(t,e){const i=t.t;const n={Black:i(\"lg\"),\"Dim grey\":i(\"lh\"),Grey:i(\"li\"),\"Light grey\":i(\"lj\"),White:i(\"lk\"),Red:i(\"ll\"),Orange:i(\"lm\"),Yellow:i(\"ln\"),\"Light green\":i(\"lo\"),Green:i(\"lp\"),Aquamarine:i(\"lq\"),Turquoise:i(\"lr\"),\"Light blue\":i(\"ls\"),Blue:i(\"lt\"),Purple:i(\"lu\")};return e.map(t=>{const e=n[t.label];if(e&&e!=t.label){t.label=e}return t})}function NP(t){return t.map(OP).filter(t=>!!t)}function OP(t){if(typeof t===\"string\"){return{model:t.replace(/ /g,\"\"),label:t,hasBorder:false,view:{name:\"span\",styles:{color:t}}}}else{return{model:t.color.replace(/ /g,\"\"),label:t.label||t.color,hasBorder:t.hasBorder===undefined?false:t.hasBorder,view:{name:\"span\",styles:{color:`${t.color}`}}}}}class LP extends Nw{constructor(t,{commandName:e,icon:i,componentName:n,dropdownLabel:o}){super(t);this.commandName=e;this.componentName=n;this.icon=i;this.dropdownLabel=o;this.columns=t.config.get(`${this.componentName}.columns`);this.colorTableView}init(){const t=this.editor;const e=t.locale;const i=e.t;const n=t.commands.get(this.commandName);const o=NP(t.config.get(this.componentName).colors);const r=IP(e,o);const s=t.config.get(`${this.componentName}.documentColors`);t.ui.componentFactory.add(this.componentName,e=>{const o=dw(e);this.colorTableView=EP({dropdownView:o,colors:r.map(t=>({label:t.label,color:t.model,options:{hasBorder:t.hasBorder}})),columns:this.columns,removeButtonLabel:i(\"mx\"),documentColorsLabel:s!==0?i(\"ou\"):undefined,documentColorsCount:s===undefined?this.columns:s});this.colorTableView.bind(\"selectedColor\").to(n,\"value\");o.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:true});o.extendTemplate({attributes:{class:\"ck-color-ui-dropdown\"}});o.bind(\"isEnabled\").to(n);o.on(\"execute\",(e,i)=>{t.execute(this.commandName,i);t.editing.view.focus()});o.on(\"change:isOpen\",(e,i,n)=>{o.colorTableView.appendGrids();if(n){if(s!==0){this.colorTableView.updateDocumentColors(t.model,this.componentName)}this.colorTableView.updateSelectedColors()}});return o})}}var zP='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z\"/></svg>';class RP extends LP{constructor(t){const e=t.locale.t;super(t,{commandName:xP,componentName:xP,icon:zP,dropdownLabel:e(\"nm\")})}static get pluginName(){return\"FontBackgroundColorUI\"}}class jP extends Nw{static get requires(){return[SP,RP]}static get pluginName(){return\"FontBackgroundColor\"}}class DP extends uP{constructor(t){super(t,yP)}}class BP extends Nw{static get pluginName(){return\"FontColorEditing\"}constructor(t){super(t);t.config.define(yP,{colors:[{color:\"hsl(0, 0%, 0%)\",label:\"Black\"},{color:\"hsl(0, 0%, 30%)\",label:\"Dim grey\"},{color:\"hsl(0, 0%, 60%)\",label:\"Grey\"},{color:\"hsl(0, 0%, 90%)\",label:\"Light grey\"},{color:\"hsl(0, 0%, 100%)\",label:\"White\",hasBorder:true},{color:\"hsl(0, 75%, 60%)\",label:\"Red\"},{color:\"hsl(30, 75%, 60%)\",label:\"Orange\"},{color:\"hsl(60, 75%, 60%)\",label:\"Yellow\"},{color:\"hsl(90, 75%, 60%)\",label:\"Light green\"},{color:\"hsl(120, 75%, 60%)\",label:\"Green\"},{color:\"hsl(150, 75%, 60%)\",label:\"Aquamarine\"},{color:\"hsl(180, 75%, 60%)\",label:\"Turquoise\"},{color:\"hsl(210, 75%, 60%)\",label:\"Light blue\"},{color:\"hsl(240, 75%, 60%)\",label:\"Blue\"},{color:\"hsl(270, 75%, 60%)\",label:\"Purple\"}],columns:5});t.conversion.for(\"upcast\").elementToAttribute({view:{name:\"span\",styles:{color:/[\\s\\S]+/}},model:{key:yP,value:CP(\"color\")}});t.conversion.for(\"downcast\").attributeToElement({model:yP,view:TP(\"color\")});t.commands.add(yP,new DP(t));t.model.schema.extend(\"$text\",{allowAttributes:yP});t.model.schema.setAttributeProperties(yP,{isFormatting:true,copyOnEnter:true})}}var VP='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.4 10.3L10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z\"/></svg>';class FP extends LP{constructor(t){const e=t.locale.t;super(t,{commandName:yP,componentName:yP,icon:VP,dropdownLabel:e(\"nl\")})}static get pluginName(){return\"FontColorUI\"}}class HP extends Nw{static get requires(){return[BP,FP]}static get pluginName(){return\"FontColor\"}}class WP extends uP{constructor(t){super(t,kP)}}function UP(t){return t.map($P).filter(t=>!!t)}const qP={tiny:{title:\"Tiny\",model:\"tiny\",view:{name:\"span\",classes:\"text-tiny\",priority:7}},small:{title:\"Small\",model:\"small\",view:{name:\"span\",classes:\"text-small\",priority:7}},big:{title:\"Big\",model:\"big\",view:{name:\"span\",classes:\"text-big\",priority:7}},huge:{title:\"Huge\",model:\"huge\",view:{name:\"span\",classes:\"text-huge\",priority:7}}};function $P(t){if(typeof t===\"object\"){return t}if(qP[t]){return qP[t]}if(t===\"default\"){return{model:undefined,title:\"Default\"}}const e=parseFloat(t);if(isNaN(e)){return}return YP(e)}function YP(t){const e=String(t);return{title:e,model:t,view:{name:\"span\",styles:{\"font-size\":`${t}px`},priority:7}}}class GP extends Nw{static get pluginName(){return\"FontSizeEditing\"}constructor(t){super(t);t.config.define(kP,{options:[\"tiny\",\"small\",\"default\",\"big\",\"huge\"]});const e=UP(this.editor.config.get(\"fontSize.options\")).filter(t=>t.model);const i=AP(kP,e);t.conversion.attributeToElement(i);t.commands.add(kP,new WP(t))}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:kP});t.model.schema.setAttributeProperties(kP,{isFormatting:true,copyOnEnter:true})}}var JP='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.816 11.5L7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279l.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z\"/></svg>';var XP=i(105);class QP extends Nw{init(){const t=this.editor;const e=t.t;const i=this._getLocalizedOptions();const n=t.commands.get(kP);t.ui.componentFactory.add(kP,o=>{const r=dw(o);hw(r,KP(i,n));r.buttonView.set({label:e(\"kn\"),icon:JP,tooltip:true});r.extendTemplate({attributes:{class:[\"ck-font-size-dropdown\"]}});r.bind(\"isEnabled\").to(n);this.listenTo(r,\"execute\",e=>{t.execute(e.source.commandName,{value:e.source.commandParam});t.editing.view.focus()});return r})}_getLocalizedOptions(){const t=this.editor;const e=t.t;const i={Default:e(\"km\"),Tiny:e(\"ko\"),Small:e(\"kp\"),Big:e(\"kq\"),Huge:e(\"kr\")};const n=UP(t.config.get(kP).options);return n.map(t=>{const e=i[t.title];if(e&&e!=t.title){t=Object.assign({},t,{title:e})}return t})}}function KP(t,e){const i=new ys;for(const n of t){const t={type:\"button\",model:new d_({commandName:kP,commandParam:n.model,label:n.title,class:\"ck-fontsize-option\",withText:true})};if(n.view&&n.view.styles){t.model.set(\"labelStyle\",`font-size:${n.view.styles[\"font-size\"]}`)}if(n.view&&n.view.classes){t.model.set(\"class\",`${t.model.class} ${n.view.classes}`)}t.model.bind(\"isOn\").to(e,\"value\",t=>t===n.model);i.add(t)}return i}class ZP extends Nw{static get requires(){return[GP,QP]}static get pluginName(){return\"FontSize\"}}class tS extends uP{constructor(t){super(t,vP)}}function eS(t){return t.map(iS).filter(t=>!!t)}function iS(t){if(typeof t===\"object\"){return t}if(t===\"default\"){return{title:\"Default\",model:undefined}}if(typeof t!==\"string\"){return}return nS(t)}function nS(t){const e=t.replace(/\"|'/g,\"\").split(\",\");const i=e[0];const n=e.map(oS).join(\", \");return{title:i,model:i,view:{name:\"span\",styles:{\"font-family\":n},priority:7}}}function oS(t){t=t.trim();if(t.indexOf(\" \")>0){t=`'${t}'`}return t}class rS extends Nw{static get pluginName(){return\"FontFamilyEditing\"}constructor(t){super(t);t.config.define(vP,{options:[\"default\",\"Arial, Helvetica, sans-serif\",\"Courier New, Courier, monospace\",\"Georgia, serif\",\"Lucida Sans Unicode, Lucida Grande, sans-serif\",\"Tahoma, Geneva, sans-serif\",\"Times New Roman, Times, serif\",\"Trebuchet MS, Helvetica, sans-serif\",\"Verdana, Geneva, sans-serif\"]})}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:vP});t.model.schema.setAttributeProperties(vP,{isFormatting:true,copyOnEnter:true});const e=eS(t.config.get(\"fontFamily.options\")).filter(t=>t.model);const i=AP(vP,e);t.conversion.attributeToElement(i);t.commands.add(vP,new tS(t))}}var sS='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z\"/></svg>';class aS extends Nw{init(){const t=this.editor;const e=t.t;const i=this._getLocalizedOptions();const n=t.commands.get(vP);t.ui.componentFactory.add(vP,o=>{const r=dw(o);hw(r,cS(i,n));r.buttonView.set({label:e(\"kl\"),icon:sS,tooltip:true});r.extendTemplate({attributes:{class:\"ck-font-family-dropdown\"}});r.bind(\"isEnabled\").to(n);this.listenTo(r,\"execute\",e=>{t.execute(e.source.commandName,{value:e.source.commandParam});t.editing.view.focus()});return r})}_getLocalizedOptions(){const t=this.editor;const e=t.t;const i=eS(t.config.get(vP).options);return i.map(t=>{if(t.title===\"Default\"){t.title=e(\"km\")}return t})}}function cS(t,e){const i=new ys;for(const n of t){const t={type:\"button\",model:new d_({commandName:vP,commandParam:n.model,label:n.title,withText:true})};t.model.bind(\"isOn\").to(e,\"value\",t=>t===n.model);if(n.view&&n.view.styles){t.model.set(\"labelStyle\",`font-family: ${n.view.styles[\"font-family\"]}`)}i.add(t)}return i}class lS extends Nw{static get requires(){return[rS,aS]}static get pluginName(){return\"FontFamily\"}}class dS extends Rw{refresh(){const t=this.editor.model;const e=t.document;this.value=e.selection.getAttribute(\"highlight\");this.isEnabled=t.schema.checkAttributeInSelection(e.selection,\"highlight\")}execute(t={}){const e=this.editor.model;const i=e.document;const n=i.selection;const o=t.value;e.change(t=>{const i=e.schema.getValidRanges(n.getRanges(),\"highlight\");if(n.isCollapsed){const e=n.getFirstPosition();if(n.hasAttribute(\"highlight\")){const i=t=>t.item.hasAttribute(\"highlight\")&&t.item.getAttribute(\"highlight\")===this.value;const n=e.getLastMatchingPosition(i,{direction:\"backward\"});const r=e.getLastMatchingPosition(i);const s=t.createRange(n,r);if(!o||this.value===o){t.removeAttribute(\"highlight\",s);t.removeSelectionAttribute(\"highlight\")}else{t.setAttribute(\"highlight\",o,s);t.setSelectionAttribute(\"highlight\",o)}}else if(o){t.setSelectionAttribute(\"highlight\",o)}}else{for(const e of i){if(o){t.setAttribute(\"highlight\",o,e)}else{t.removeAttribute(\"highlight\",e)}}}})}}class uS extends Nw{static get pluginName(){return\"HighlightEditing\"}constructor(t){super(t);t.config.define(\"highlight\",{options:[{model:\"yellowMarker\",class:\"marker-yellow\",title:\"Yellow marker\",color:\"var(--ck-highlight-marker-yellow)\",type:\"marker\"},{model:\"greenMarker\",class:\"marker-green\",title:\"Green marker\",color:\"var(--ck-highlight-marker-green)\",type:\"marker\"},{model:\"pinkMarker\",class:\"marker-pink\",title:\"Pink marker\",color:\"var(--ck-highlight-marker-pink)\",type:\"marker\"},{model:\"blueMarker\",class:\"marker-blue\",title:\"Blue marker\",color:\"var(--ck-highlight-marker-blue)\",type:\"marker\"},{model:\"redPen\",class:\"pen-red\",title:\"Red pen\",color:\"var(--ck-highlight-pen-red)\",type:\"pen\"},{model:\"greenPen\",class:\"pen-green\",title:\"Green pen\",color:\"var(--ck-highlight-pen-green)\",type:\"pen\"}]})}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:\"highlight\"});const e=t.config.get(\"highlight.options\");t.conversion.attributeToElement(hS(e));t.commands.add(\"highlight\",new dS(t))}}function hS(t){const e={model:{key:\"highlight\",values:[]},view:{}};for(const i of t){e.model.values.push(i.model);e.view[i.model]={name:\"mark\",classes:i.class}}return e}var fS='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path class=\"ck-icon__fill\" d=\"M10.798 1.59L3.002 12.875l1.895 1.852 2.521 1.402 6.997-12.194z\"/><path d=\"M2.556 16.727l.234-.348c-.297-.151-.462-.293-.498-.426-.036-.137.002-.416.115-.837.094-.25.15-.449.169-.595a4.495 4.495 0 0 0 0-.725c-.209-.621-.303-1.041-.284-1.26.02-.218.178-.506.475-.862l6.77-9.414c.539-.91 1.605-.85 3.199.18 1.594 1.032 2.188 1.928 1.784 2.686l-5.877 10.36c-.158.412-.333.673-.526.782-.193.108-.604.179-1.232.21-.362.131-.608.237-.738.318-.13.081-.305.238-.526.47-.293.265-.504.397-.632.397-.096 0-.27-.075-.524-.226l-.31.41-1.6-1.12zm-.279.415l1.575 1.103-.392.515H1.19l1.087-1.618zm8.1-13.656l-4.953 6.9L8.75 12.57l4.247-7.574c.175-.25-.188-.647-1.092-1.192-.903-.546-1.412-.652-1.528-.32zM8.244 18.5L9.59 17h9.406v1.5H8.245z\"/></svg>';var mS='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path class=\"ck-icon__fill\" d=\"M10.126 2.268L2.002 13.874l1.895 1.852 2.521 1.402L14.47 5.481l-1.543-2.568-2.801-.645z\"/><path d=\"M4.5 18.088l-2.645-1.852-.04-2.95-.006-.005.006-.008v-.025l.011.008L8.73 2.97c.165-.233.356-.417.567-.557l-1.212.308L4.604 7.9l-.83-.558 3.694-5.495 2.708-.69 1.65 1.145.046.018.85-1.216 2.16 1.512-.856 1.222c.828.967 1.144 2.141.432 3.158L7.55 17.286l.006.005-3.055.797H4.5zm-.634.166l-1.976.516-.026-1.918 2.002 1.402zM9.968 3.817l-.006-.004-6.123 9.184 3.277 2.294 6.108-9.162.005.003c.317-.452-.16-1.332-1.064-1.966-.891-.624-1.865-.776-2.197-.349zM8.245 18.5L9.59 17h9.406v1.5H8.245z\"/></svg>';var gS=i(107);class pS extends Nw{get localizedOptionTitles(){const t=this.editor.t;return{\"Yellow marker\":t(\"ka\"),\"Green marker\":t(\"kb\"),\"Pink marker\":t(\"kc\"),\"Blue marker\":t(\"kd\"),\"Red pen\":t(\"ke\"),\"Green pen\":t(\"kf\")}}static get pluginName(){return\"HighlightUI\"}init(){const t=this.editor.config.get(\"highlight.options\");for(const e of t){this._addHighlighterButton(e)}this._addRemoveHighlightButton();this._addDropdown(t)}_addRemoveHighlightButton(){const t=this.editor.t;this._addButton(\"removeHighlight\",t(\"kg\"),bP)}_addHighlighterButton(t){const e=this.editor.commands.get(\"highlight\");this._addButton(\"highlight:\"+t.model,t.title,wS(t.type),t.model,i);function i(i){i.bind(\"isEnabled\").to(e,\"isEnabled\");i.bind(\"isOn\").to(e,\"value\",e=>e===t.model);i.iconView.fillColor=t.color;i.isToggleable=true}}_addButton(t,e,i,n,o=(()=>{})){const r=this.editor;r.ui.componentFactory.add(t,t=>{const s=new Kb(t);const a=this.localizedOptionTitles[e]?this.localizedOptionTitles[e]:e;s.set({label:a,icon:i,tooltip:true});s.on(\"execute\",()=>{r.execute(\"highlight\",{value:n});r.editing.view.focus()});o(s);return s})}_addDropdown(t){const e=this.editor;const i=e.t;const n=e.ui.componentFactory;const o=t[0];const r=t.reduce((t,e)=>{t[e.model]=e;return t},{});n.add(\"highlight\",s=>{const a=e.commands.get(\"highlight\");const c=dw(s,sP);const l=c.buttonView;l.set({tooltip:i(\"kh\"),lastExecuted:o.model,commandValue:o.model,isToggleable:true});l.bind(\"icon\").to(a,\"value\",t=>wS(u(t,\"type\")));l.bind(\"color\").to(a,\"value\",t=>u(t,\"color\"));l.bind(\"commandValue\").to(a,\"value\",t=>u(t,\"model\"));l.bind(\"isOn\").to(a,\"value\",t=>!!t);l.delegate(\"execute\").to(c);const d=t.map(t=>{const e=n.create(\"highlight:\"+t.model);this.listenTo(e,\"execute\",()=>c.buttonView.set({lastExecuted:t.model}));return e});c.bind(\"isEnabled\").toMany(d,\"isEnabled\",(...t)=>t.some(t=>t));d.push(new Lb);d.push(n.create(\"removeHighlight\"));uw(c,d);bS(c);c.toolbarView.ariaLabel=i(\"ki\");l.on(\"execute\",()=>{e.execute(\"highlight\",{value:l.commandValue});e.editing.view.focus()});function u(t,e){const i=!t||t===l.lastExecuted?l.lastExecuted:t;return r[i][e]}return c})}}function bS(t){const e=t.buttonView.actionView;e.iconView.bind(\"fillColor\").to(t.buttonView,\"color\")}function wS(t){return t===\"marker\"?fS:mS}class _S extends Nw{static get requires(){return[uS,pS]}static get pluginName(){return\"Highlight\"}}class kS extends Rw{refresh(){this.isEnabled=vS(this.editor.model)}execute(){const t=this.editor.model;t.change(e=>{const i=e.createElement(\"horizontalLine\");t.insertContent(i);let n=i.nextSibling;const o=n&&t.schema.checkChild(n,\"$text\");if(!o&&t.schema.checkChild(i.parent,\"paragraph\")){n=e.createElement(\"paragraph\");t.insertContent(n,e.createPositionAfter(i))}if(n){e.setSelection(n,0)}})}}function vS(t){const e=t.schema;const i=t.document.selection;return yS(i,e,t)&&!xS(i,e)}function yS(t,e,i){const n=AS(t,i);return e.checkChild(n,\"horizontalLine\")}function xS(t,e){const i=t.getSelectedElement();return i&&e.isObject(i)}function AS(t,e){const i=P_(t,e);const n=i.parent;if(n.isEmpty&&!n.is(\"$root\")){return n.parent}return n}var CS=i(109);class TS extends Nw{static get pluginName(){return\"HorizontalLineEditing\"}init(){const t=this.editor;const e=t.model.schema;const i=t.t;const n=t.conversion;e.register(\"horizontalLine\",{isObject:true,allowWhere:\"$block\"});n.for(\"dataDowncast\").elementToElement({model:\"horizontalLine\",view:(t,e)=>e.createEmptyElement(\"hr\")});n.for(\"editingDowncast\").elementToElement({model:\"horizontalLine\",view:(t,e)=>{const n=i(\"jz\");const o=e.createContainerElement(\"div\");const r=e.createEmptyElement(\"hr\");e.addClass(\"ck-horizontal-line\",o);e.setCustomProperty(\"hr\",true,o);e.insert(e.createPositionAt(o,0),r);return ES(o,e,n)}});n.for(\"upcast\").elementToElement({view:\"hr\",model:\"horizontalLine\"});t.commands.add(\"horizontalLine\",new kS(t))}}function ES(t,e,i){e.setCustomProperty(\"horizontalLine\",true,t);return A_(t,e,{label:i})}var MS='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 9h16v2H2z\"/></svg>';class PS extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(\"horizontalLine\",i=>{const n=t.commands.get(\"horizontalLine\");const o=new Kb(i);o.set({label:e(\"jz\"),icon:MS,tooltip:true});o.bind(\"isEnabled\").to(n,\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(\"horizontalLine\");t.editing.view.focus()});return o})}}class SS extends Nw{static get requires(){return[TS,PS]}static get pluginName(){return\"HorizontalLine\"}}class IS{constructor(t){this.set(\"activeHandlePosition\",null);this.set(\"proposedWidthPercents\",null);this.set(\"proposedWidth\",null);this.set(\"proposedHeight\",null);this.set(\"proposedHandleHostWidth\",null);this.set(\"proposedHandleHostHeight\",null);this._options=t;this._referenceCoordinates=null}begin(t,e,i){const n=new vh(e);this.activeHandlePosition=zS(t);this._referenceCoordinates=OS(e,RS(this.activeHandlePosition));this.originalWidth=n.width;this.originalHeight=n.height;this.aspectRatio=n.width/n.height;const o=i.style.width;if(o&&o.match(/^\\d+\\.?\\d*%$/)){this.originalWidthPercents=parseFloat(o)}else{this.originalWidthPercents=NS(i,n)}}update(t){this.proposedWidth=t.width;this.proposedHeight=t.height;this.proposedWidthPercents=t.widthPercents;this.proposedHandleHostWidth=t.handleHostWidth;this.proposedHandleHostHeight=t.handleHostHeight}}vs(IS,Jc);function NS(t,e){const i=t.parentElement;const n=parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).width);return e.width/n*100}function OS(t,e){const i=new vh(t);const n=e.split(\"-\");const o={x:n[1]==\"right\"?i.right:i.left,y:n[0]==\"bottom\"?i.bottom:i.top};o.x+=t.ownerDocument.defaultView.scrollX;o.y+=t.ownerDocument.defaultView.scrollY;return o}function LS(t){return`ck-widget__resizer__handle-${t}`}function zS(t){const e=[\"top-left\",\"top-right\",\"bottom-right\",\"bottom-left\"];for(const i of e){if(t.classList.contains(LS(i))){return i}}}function RS(t){const e=t.split(\"-\");const i={top:\"bottom\",bottom:\"top\",left:\"right\",right:\"left\"};return`${i[e[0]]}-${i[e[1]]}`}class jS{constructor(t){this._options=t;this._domResizerWrapper=null;this._viewResizerWrapper=null;this.set(\"isEnabled\",true);this.decorate(\"begin\");this.decorate(\"cancel\");this.decorate(\"commit\");this.decorate(\"updateSize\");this.on(\"commit\",t=>{if(!this.state.proposedWidth&&!this.state.proposedWidthPercents){this._cleanup();t.stop()}},{priority:\"high\"})}attach(){const t=this;const e=this._options.viewElement;const i=this._options.editor.editing.view;i.change(i=>{const n=i.createUIElement(\"div\",{class:\"ck ck-reset_all ck-widget__resizer\"},(function(e){const i=this.toDomElement(e);t._appendHandles(i);t._appendSizeUI(i);t._domResizerWrapper=i;t.on(\"change:isEnabled\",(t,e,n)=>{i.style.display=n?\"\":\"none\"});i.style.display=t.isEnabled?\"\":\"none\";return i}));i.insert(i.createPositionAt(e,\"end\"),n);i.addClass(\"ck-widget_with-resizer\",e);this._viewResizerWrapper=n})}begin(t){this.state=new IS(this._options);this._sizeUI.bindToState(this._options,this.state);this.state.begin(t,this._getHandleHost(),this._getResizeHost())}updateSize(t){const e=this._proposeNewSize(t);const i=this._options.editor.editing.view;i.change(t=>{const i=this._options.unit||\"%\";const n=(i===\"%\"?e.widthPercents:e.width)+i;t.setStyle(\"width\",n,this._options.viewElement)});const n=this._getHandleHost();const o=new vh(n);e.handleHostWidth=Math.round(o.width);e.handleHostHeight=Math.round(o.height);const r=new vh(n);e.width=Math.round(r.width);e.height=Math.round(r.height);this.redraw(o);this.state.update(e)}commit(){const t=this._options.unit||\"%\";const e=(t===\"%\"?this.state.proposedWidthPercents:this.state.proposedWidth)+t;this._options.onCommit(e);this._cleanup()}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(t){const e=this._domResizerWrapper;if(i(e)){this._options.editor.editing.view.change(i=>{const n=e.parentElement;const o=this._getHandleHost();const r=t||new vh(o);i.setStyle(\"width\",r.width+\"px\",this._viewResizerWrapper);i.setStyle(\"height\",r.height+\"px\",this._viewResizerWrapper);const s={left:o.offsetLeft,top:o.offsetTop,height:o.offsetHeight,width:o.offsetWidth};if(!n.isSameNode(o)){i.setStyle(\"left\",s.left+\"px\",this._viewResizerWrapper);i.setStyle(\"top\",s.top+\"px\",this._viewResizerWrapper);i.setStyle(\"height\",s.height+\"px\",this._viewResizerWrapper);i.setStyle(\"width\",s.width+\"px\",this._viewResizerWrapper)}})}function i(t){return t&&t.ownerDocument&&t.ownerDocument.contains(t)}}containsHandle(t){return this._domResizerWrapper.contains(t)}static isResizeHandle(t){return t.classList.contains(\"ck-widget__resizer__handle\")}_cleanup(){this._sizeUI.dismiss();this._sizeUI.isVisible=false}_proposeNewSize(t){const e=this.state;const i=VS(t);const n=this._options.isCentered?this._options.isCentered(this):true;const o={x:e._referenceCoordinates.x-(i.x+e.originalWidth),y:i.y-e.originalHeight-e._referenceCoordinates.y};if(n&&e.activeHandlePosition.endsWith(\"-right\")){o.x=i.x-(e._referenceCoordinates.x+e.originalWidth)}if(n){o.x*=2}const r={width:Math.abs(e.originalWidth+o.x),height:Math.abs(e.originalHeight+o.y)};r.dominant=r.width/e.aspectRatio>r.height?\"width\":\"height\";r.max=r[r.dominant];const s={width:r.width,height:r.height};if(r.dominant==\"width\"){s.height=s.width/e.aspectRatio}else{s.width=s.height*e.aspectRatio}return{width:Math.round(s.width),height:Math.round(s.height),widthPercents:Math.min(Math.round(e.originalWidthPercents/e.originalWidth*s.width*100)/100,100)}}_getResizeHost(){const t=this._domResizerWrapper.parentElement;return this._options.getResizeHost(t)}_getHandleHost(){const t=this._domResizerWrapper.parentElement;return this._options.getHandleHost(t)}_appendHandles(t){const e=[\"top-left\",\"top-right\",\"bottom-right\",\"bottom-left\"];for(const i of e){t.appendChild(new Hp({tag:\"div\",attributes:{class:`ck-widget__resizer__handle ${BS(i)}`}}).render())}}_appendSizeUI(t){const e=new DS;e.render();this._sizeUI=e;t.appendChild(e.element)}}vs(jS,Jc);class DS extends gb{constructor(){super();const t=this.bindTemplate;this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-size-view\",t.to(\"activeHandlePosition\",t=>t?`ck-orientation-${t}`:\"\")],style:{display:t.if(\"isVisible\",\"none\",t=>!t)}},children:[{text:t.to(\"label\")}]})}bindToState(t,e){this.bind(\"isVisible\").to(e,\"proposedWidth\",e,\"proposedHeight\",(t,e)=>t!==null&&e!==null);this.bind(\"label\").to(e,\"proposedHandleHostWidth\",e,\"proposedHandleHostHeight\",e,\"proposedWidthPercents\",(e,i,n)=>{if(t.unit===\"px\"){return`${e}×${i}`}else{return`${n}%`}});this.bind(\"activeHandlePosition\").to(e)}dismiss(){this.unbind();this.isVisible=false}}function BS(t){return`ck-widget__resizer__handle-${t}`}function VS(t){return{x:t.pageX,y:t.pageY}}var FS=\"Expected a function\";function HS(t,e,i){var n=true,o=true;if(typeof t!=\"function\"){throw new TypeError(FS)}if(ct(i)){n=\"leading\"in i?!!i.leading:n;o=\"trailing\"in i?!!i.trailing:o}return uh(t,e,{leading:n,maxWait:e,trailing:o})}var WS=HS;var US=i(111);class qS extends Nw{static get pluginName(){return\"WidgetResize\"}init(){this.set(\"_visibleResizer\",null);this.set(\"_activeResizer\",null);this._resizers=new Map;const t=Nd.window.document;this.editor.model.schema.setAttributeProperties(\"width\",{isFormatting:true});this._observer=Object.create(Ud);this._observer.listenTo(t,\"mousedown\",this._mouseDownListener.bind(this));this._observer.listenTo(t,\"mousemove\",this._mouseMoveListener.bind(this));this._observer.listenTo(t,\"mouseup\",this._mouseUpListener.bind(this));const e=()=>{if(this._visibleResizer){this._visibleResizer.redraw()}};const i=WS(e,200);this.on(\"change:_visibleResizer\",e);this.editor.ui.on(\"update\",i);this._observer.listenTo(Nd.window,\"resize\",i);const n=this.editor.editing.view.document.selection;n.on(\"change\",()=>{const t=n.getSelectedElement();this._visibleResizer=this._getResizerByViewElement(t)||null})}destroy(){this._observer.stopListening();for(const t of this._resizers.values()){t.destroy()}}attachTo(t){const e=new jS(t);const i=this.editor.plugins;e.attach();if(i.has(\"WidgetToolbarRepository\")){const t=i.get(\"WidgetToolbarRepository\");e.on(\"begin\",()=>{t.forceDisabled(\"resize\")},{priority:\"lowest\"});e.on(\"cancel\",()=>{t.clearForceDisabled(\"resize\")},{priority:\"highest\"});e.on(\"commit\",()=>{t.clearForceDisabled(\"resize\")},{priority:\"highest\"})}this._resizers.set(t.viewElement,e);return e}_getResizerByHandle(t){for(const e of this._resizers.values()){if(e.containsHandle(t)){return e}}}_getResizerByViewElement(t){return this._resizers.get(t)}_mouseDownListener(t,e){if(!jS.isResizeHandle(e.target)){return}const i=e.target;this._activeResizer=this._getResizerByHandle(i);if(this._activeResizer){this._activeResizer.begin(i)}}_mouseMoveListener(t,e){if(this._activeResizer){this._activeResizer.updateSize(e)}}_mouseUpListener(){if(this._activeResizer){this._activeResizer.commit();this._activeResizer=null}}}vs(qS,Jc);class $S extends Rw{refresh(){const t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=R_(t);if(!t||!t.hasAttribute(\"width\")){this.value=null}else{this.value={width:t.getAttribute(\"width\"),height:null}}}execute(t){const e=this.editor.model;const i=e.document.selection.getSelectedElement();e.change(e=>{e.setAttribute(\"width\",t.width,i)})}}var YS=i(113);class GS extends Nw{static get requires(){return[qS]}static get pluginName(){return\"ImageResize\"}init(){const t=this.editor;const e=new $S(t);this._registerSchema();this._registerConverters();t.commands.add(\"imageResize\",e);t.editing.downcastDispatcher.on(\"insert:image\",(i,n,o)=>{const r=o.mapper.toViewElement(n.item);const s=t.plugins.get(qS).attachTo({unit:t.config.get(\"image.resizeUnit\")||\"%\",modelElement:n.item,viewElement:r,editor:t,getHandleHost(t){return t.querySelector(\"img\")},getResizeHost(t){return t},isCentered(){const t=n.item.getAttribute(\"imageStyle\");return!t||t==\"full\"||t==\"alignCenter\"},onCommit(e){t.execute(\"imageResize\",{width:e})}});s.on(\"updateSize\",()=>{if(!r.hasClass(\"image_resized\")){t.editing.view.change(t=>{t.addClass(\"image_resized\",r)})}});s.bind(\"isEnabled\").to(e)},{priority:\"low\"})}_registerSchema(){this.editor.model.schema.extend(\"image\",{allowAttributes:\"width\"})}_registerConverters(){const t=this.editor;t.conversion.for(\"downcast\").add(t=>t.on(\"attribute:width:image\",(t,e,i)=>{if(!i.consumable.consume(e.item,t.name)){return}const n=i.writer;const o=i.mapper.toViewElement(e.item);if(e.attributeNewValue!==null){n.setStyle(\"width\",e.attributeNewValue,o);n.addClass(\"image_resized\",o)}else{n.removeStyle(\"width\",o);n.removeClass(\"image_resized\",o)}}));t.conversion.for(\"upcast\").attributeToAttribute({view:{name:\"figure\",styles:{width:/.+/}},model:{key:\"width\",value:t=>t.getStyle(\"width\")}})}}class JS extends Rw{constructor(t,e){super(t);this._indentBehavior=e}refresh(){const t=this.editor;const e=t.model;const i=Dw(e.document.selection.getSelectedBlocks());if(!i||!e.schema.checkAttribute(i,\"blockIndent\")){this.isEnabled=false;return}this.isEnabled=this._indentBehavior.checkEnabled(i.getAttribute(\"blockIndent\"))}execute(){const t=this.editor.model;const e=XS(t);t.change(t=>{for(const i of e){const e=i.getAttribute(\"blockIndent\");const n=this._indentBehavior.getNextIndent(e);if(n){t.setAttribute(\"blockIndent\",n,i)}else{t.removeAttribute(\"blockIndent\",i)}}})}}function XS(t){const e=t.document.selection;const i=t.schema;const n=Array.from(e.getSelectedBlocks());return n.filter(t=>i.checkAttribute(t,\"blockIndent\"))}class QS{constructor(t){this.isForward=t.direction===\"forward\";this.offset=t.offset;this.unit=t.unit}checkEnabled(t){const e=parseFloat(t||0);return this.isForward||e>0}getNextIndent(t){const e=parseFloat(t||0);const i=!t||t.endsWith(this.unit);if(!i){return this.isForward?this.offset+this.unit:undefined}const n=this.isForward?this.offset:-this.offset;const o=e+n;return o>0?o+this.unit:undefined}}class KS{constructor(t){this.isForward=t.direction===\"forward\";this.classes=t.classes}checkEnabled(t){const e=this.classes.indexOf(t);if(this.isForward){return e<this.classes.length-1}else{return e>=0}}getNextIndent(t){const e=this.classes.indexOf(t);const i=this.isForward?1:-1;return this.classes[e+i]}}const ZS=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;const tI=/^rgb\\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\\)$/i;const eI=/^rgba\\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\\.?[0-9]+)\\)$/i;const iI=/^hsl\\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\\.?[0-9]+)?\\)$/i;const nI=/^hsla\\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\\.?[0-9]+)\\)$/i;const oI=new Set([\"black\",\"silver\",\"gray\",\"white\",\"maroon\",\"red\",\"purple\",\"fuchsia\",\"green\",\"lime\",\"olive\",\"yellow\",\"navy\",\"blue\",\"teal\",\"aqua\",\"orange\",\"aliceblue\",\"antiquewhite\",\"aquamarine\",\"azure\",\"beige\",\"bisque\",\"blanchedalmond\",\"blueviolet\",\"brown\",\"burlywood\",\"cadetblue\",\"chartreuse\",\"chocolate\",\"coral\",\"cornflowerblue\",\"cornsilk\",\"crimson\",\"cyan\",\"darkblue\",\"darkcyan\",\"darkgoldenrod\",\"darkgray\",\"darkgreen\",\"darkgrey\",\"darkkhaki\",\"darkmagenta\",\"darkolivegreen\",\"darkorange\",\"darkorchid\",\"darkred\",\"darksalmon\",\"darkseagreen\",\"darkslateblue\",\"darkslategray\",\"darkslategrey\",\"darkturquoise\",\"darkviolet\",\"deeppink\",\"deepskyblue\",\"dimgray\",\"dimgrey\",\"dodgerblue\",\"firebrick\",\"floralwhite\",\"forestgreen\",\"gainsboro\",\"ghostwhite\",\"gold\",\"goldenrod\",\"greenyellow\",\"grey\",\"honeydew\",\"hotpink\",\"indianred\",\"indigo\",\"ivory\",\"khaki\",\"lavender\",\"lavenderblush\",\"lawngreen\",\"lemonchiffon\",\"lightblue\",\"lightcoral\",\"lightcyan\",\"lightgoldenrodyellow\",\"lightgray\",\"lightgreen\",\"lightgrey\",\"lightpink\",\"lightsalmon\",\"lightseagreen\",\"lightskyblue\",\"lightslategray\",\"lightslategrey\",\"lightsteelblue\",\"lightyellow\",\"limegreen\",\"linen\",\"magenta\",\"mediumaquamarine\",\"mediumblue\",\"mediumorchid\",\"mediumpurple\",\"mediumseagreen\",\"mediumslateblue\",\"mediumspringgreen\",\"mediumturquoise\",\"mediumvioletred\",\"midnightblue\",\"mintcream\",\"mistyrose\",\"moccasin\",\"navajowhite\",\"oldlace\",\"olivedrab\",\"orangered\",\"orchid\",\"palegoldenrod\",\"palegreen\",\"paleturquoise\",\"palevioletred\",\"papayawhip\",\"peachpuff\",\"peru\",\"pink\",\"plum\",\"powderblue\",\"rosybrown\",\"royalblue\",\"saddlebrown\",\"salmon\",\"sandybrown\",\"seagreen\",\"seashell\",\"sienna\",\"skyblue\",\"slateblue\",\"slategray\",\"slategrey\",\"snow\",\"springgreen\",\"steelblue\",\"tan\",\"thistle\",\"tomato\",\"turquoise\",\"violet\",\"wheat\",\"whitesmoke\",\"yellowgreen\",\"rebeccapurple\",\"currentcolor\",\"transparent\"]);function rI(t){if(t.startsWith(\"#\")){return ZS.test(t)}if(t.startsWith(\"rgb\")){return tI.test(t)||eI.test(t)}if(t.startsWith(\"hsl\")){return iI.test(t)||nI.test(t)}return oI.has(t.toLowerCase())}const sI=[\"none\",\"hidden\",\"dotted\",\"dashed\",\"solid\",\"double\",\"groove\",\"ridge\",\"inset\",\"outset\"];function aI(t){return sI.includes(t)}const cI=/^([+-]?[0-9]*[.]?[0-9]+(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function lI(t){return cI.test(t)}const dI=/^[+-]?[0-9]*[.]?[0-9]+%$/;function uI(t){return dI.test(t)}const hI=[\"repeat-x\",\"repeat-y\",\"repeat\",\"space\",\"round\",\"no-repeat\"];function fI(t){return hI.includes(t)}const mI=[\"center\",\"top\",\"bottom\",\"left\",\"right\"];function gI(t){return mI.includes(t)}const pI=[\"fixed\",\"scroll\",\"local\"];function bI(t){return pI.includes(t)}const wI=/^url\\(/;function _I(t){return wI.test(t)}function kI(t=\"\"){if(t===\"\"){return{top:undefined,right:undefined,bottom:undefined,left:undefined}}const e=AI(t);const i=e[0];const n=e[2]||i;const o=e[1]||i;const r=e[3]||o;return{top:i,bottom:n,right:o,left:r}}function vI(t){return e=>{const{top:i,right:n,bottom:o,left:r}=e;const s=[];if(![i,n,r,o].every(t=>!!t)){if(i){s.push([t+\"-top\",i])}if(n){s.push([t+\"-right\",n])}if(o){s.push([t+\"-bottom\",o])}if(r){s.push([t+\"-left\",r])}}else{s.push([t,yI(e)])}return s}}function yI({top:t,right:e,bottom:i,left:n}){const o=[];if(n!==e){o.push(t,e,i,n)}else if(i!==t){o.push(t,e,i)}else if(e!==t){o.push(t,e)}else{o.push(t)}return o.join(\" \")}function xI(t){return e=>({path:t,value:kI(e)})}function AI(t){return t.replace(/, /g,\",\").split(\" \").map(t=>t.replace(/,/g,\", \"))}function CI(t){t.setNormalizer(\"margin\",xI(\"margin\"));t.setNormalizer(\"margin-top\",t=>({path:\"margin.top\",value:t}));t.setNormalizer(\"margin-right\",t=>({path:\"margin.right\",value:t}));t.setNormalizer(\"margin-bottom\",t=>({path:\"margin.bottom\",value:t}));t.setNormalizer(\"margin-left\",t=>({path:\"margin.left\",value:t}));t.setReducer(\"margin\",vI(\"margin\"));t.setStyleRelation(\"margin\",[\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\"])}class TI extends Nw{constructor(t){super(t);t.config.define(\"indentBlock\",{offset:40,unit:\"px\"})}static get pluginName(){return\"IndentBlock\"}init(){const t=this.editor;const e=t.config.get(\"indentBlock\");const i=!e.classes||!e.classes.length;const n=Object.assign({direction:\"forward\"},e);const o=Object.assign({direction:\"backward\"},e);if(i){t.data.addStyleProcessorRules(CI);this._setupConversionUsingOffset(t.conversion);t.commands.add(\"indentBlock\",new JS(t,new QS(n)));t.commands.add(\"outdentBlock\",new JS(t,new QS(o)))}else{this._setupConversionUsingClasses(e.classes);t.commands.add(\"indentBlock\",new JS(t,new KS(n)));t.commands.add(\"outdentBlock\",new JS(t,new KS(o)))}}afterInit(){const t=this.editor;const e=t.model.schema;const i=t.commands.get(\"indent\");const n=t.commands.get(\"outdent\");const o=[\"paragraph\",\"heading1\",\"heading2\",\"heading3\",\"heading4\",\"heading5\",\"heading6\"];o.forEach(t=>{if(e.isRegistered(t)){e.extend(t,{allowAttributes:\"blockIndent\"})}});i.registerChildCommand(t.commands.get(\"indentBlock\"));n.registerChildCommand(t.commands.get(\"outdentBlock\"))}_setupConversionUsingOffset(){const t=this.editor.conversion;const e=this.editor.locale;const i=e.contentLanguageDirection===\"rtl\"?\"margin-right\":\"margin-left\";t.for(\"upcast\").attributeToAttribute({view:{styles:{[i]:/[\\s\\S]+/}},model:{key:\"blockIndent\",value:t=>t.getStyle(i)}});t.for(\"downcast\").attributeToAttribute({model:\"blockIndent\",view:t=>({key:\"style\",value:{[i]:t}})})}_setupConversionUsingClasses(t){const e={model:{key:\"blockIndent\",values:[]},view:{}};for(const i of t){e.model.values.push(i);e.view[i]={key:\"class\",value:[i]}}this.editor.conversion.attributeToAttribute(e)}}class EI{constructor(t,e={}){this.namespaces=e.namespaces||[];this._domParser=new DOMParser;this._domConverter=new jd(t,{blockFillerMode:\"nbsp\"});this._htmlWriter=new _p}toData(t){const e=this._domConverter.viewToDom(t,document);return this._htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this._domConverter.domToView(e,{keepOriginalCase:true})}_toDom(t){const e=this.namespaces.map(t=>`xmlns:${t}=\"nsp\"`).join(\" \");t=`<xml ${e}>${t}</xml>`;const i=this._domParser.parseFromString(t,\"text/xml\");const n=i.querySelector(\"parsererror\");if(n){throw new Error(\"Parse error - \"+n.textContent)}const o=i.createDocumentFragment();const r=i.documentElement.childNodes;while(r.length>0){o.appendChild(r[0])}return o}}class MI{static get safeXmlCharactersEntities(){return{tagOpener:\"&laquo;\",tagCloser:\"&raquo;\",doubleQuote:\"&uml;\",realDoubleQuote:\"&quot;\"}}static get safeBadBlackboardCharacters(){return{ltElement:\"«mo»<«/mo»\",gtElement:\"«mo»>«/mo»\",ampElement:\"«mo»&«/mo»\"}}static get safeGoodBlackboardCharacters(){return{ltElement:\"«mo»§lt;«/mo»\",gtElement:\"«mo»§gt;«/mo»\",ampElement:\"«mo»§amp;«/mo»\"}}static get xmlCharacters(){return{id:\"xmlCharacters\",tagOpener:\"<\",tagCloser:\">\",doubleQuote:'\"',ampersand:\"&\",quote:\"'\"}}static get safeXmlCharacters(){return{id:\"safeXmlCharacters\",tagOpener:\"«\",tagCloser:\"»\",doubleQuote:\"¨\",ampersand:\"§\",quote:\"`\",realDoubleQuote:\"¨\"}}}class PI{static isMathmlInAttribute(t,e){const i=\"['\\\"][\\\\s]*=[\\\\s]*[\\\\w-]+\";const n=\"\\\"[^\\\"]*\\\"|'[^']*'\";const o=`[\\\\s]*(${n})[\\\\s]*=[\\\\s]*[\\\\w-]+[\\\\s]*`;const r=`('${o}')*`;const s=`^${i}${r}[\\\\s]+gmi<`;const a=new RegExp(s);const c=t.substring(0,e);const l=c.split(\"\").reverse().join(\"\");const d=a.test(l);return d}static safeXmlDecode(t){let{tagOpener:e}=MI.safeXmlCharactersEntities;let{tagCloser:i}=MI.safeXmlCharactersEntities;let{doubleQuote:n}=MI.safeXmlCharactersEntities;let{realDoubleQuote:o}=MI.safeXmlCharactersEntities;t=t.split(e).join(MI.safeXmlCharacters.tagOpener);t=t.split(i).join(MI.safeXmlCharacters.tagCloser);t=t.split(n).join(MI.safeXmlCharacters.doubleQuote);t=t.split(o).join(MI.safeXmlCharacters.realDoubleQuote);const{ltElement:r}=MI.safeBadBlackboardCharacters;const{gtElement:s}=MI.safeBadBlackboardCharacters;const{ampElement:a}=MI.safeBadBlackboardCharacters;if(\"_wrs_blackboard\"in window&&window._wrs_blackboard){t=t.split(r).join(MI.safeGoodBlackboardCharacters.ltElement);t=t.split(s).join(MI.safeGoodBlackboardCharacters.gtElement);t=t.split(a).join(MI.safeGoodBlackboardCharacters.ampElement)}({tagOpener:e}=MI.safeXmlCharacters);({tagCloser:i}=MI.safeXmlCharacters);({doubleQuote:n}=MI.safeXmlCharacters);({realDoubleQuote:o}=MI.safeXmlCharacters);const{ampersand:c}=MI.safeXmlCharacters;const{quote:l}=MI.safeXmlCharacters;t=t.split(e).join(MI.xmlCharacters.tagOpener);t=t.split(i).join(MI.xmlCharacters.tagCloser);t=t.split(n).join(MI.xmlCharacters.doubleQuote);t=t.split(c).join(MI.xmlCharacters.ampersand);t=t.split(l).join(MI.xmlCharacters.quote);let d=\"\";let u=null;for(let e=0;e<t.length;e+=1){const i=t.charAt(e);if(u==null){if(i===\"$\"){u=\"\"}else{d+=i}}else if(i===\";\"){d+=`&${u}`;u=null}else if(i.match(/([a-zA-Z0-9#._-] | '-')/)){u+=i}else{d+=`$${u}`;u=null;e-=1}}return d}static safeXmlEncode(t){const{tagOpener:e}=MI.xmlCharacters;const{tagCloser:i}=MI.xmlCharacters;const{doubleQuote:n}=MI.xmlCharacters;const{ampersand:o}=MI.xmlCharacters;const{quote:r}=MI.xmlCharacters;t=t.split(e).join(MI.safeXmlCharacters.tagOpener);t=t.split(i).join(MI.safeXmlCharacters.tagCloser);t=t.split(n).join(MI.safeXmlCharacters.doubleQuote);t=t.split(o).join(MI.safeXmlCharacters.ampersand);t=t.split(r).join(MI.safeXmlCharacters.quote);return t}static mathMLEntities(t){let e=\"\";for(let i=0;i<t.length;i+=1){const n=t.charAt(i);if(t.codePointAt(i)>128){e+=`&#${t.codePointAt(i)};`;if(t.codePointAt(i)>65535){i+=1}}else if(n===\"&\"){const o=t.indexOf(\";\",i+1);if(o>=0){const n=document.createElement(\"span\");n.innerHTML=t.substring(i,o+1);e+=`&#${jI.fixedCharCodeAt(n.textContent||n.innerText,0)};`;i=o}else{e+=n}}else{e+=n}}return e}static addCustomEditorClassAttribute(t,e){let i=\"\";const n=t.indexOf(\"<math\");if(n===0){const o=t.indexOf(\">\");if(t.indexOf(\"class\")===-1){i=`${t.substr(n,o)} class=\"wrs_${e}\">`;i+=t.substr(o+1,t.length);return i}}return t}static removeCustomEditorClassAttribute(t,e){if(t.indexOf(\"class\")===-1||t.indexOf(`wrs_${e}`)===-1){return t}if(t.indexOf(`class=\"wrs_${e}\"`)!==-1){return t.replace(`class=\"wrs_${e}\"`,\"\")}return t.replace(`wrs_${e}`,\"\")}static addAnnotation(t,e,i){const n=t.indexOf(\"<annotation\");let o=\"\";if(n!==-1){const n=t.indexOf(\"</semantics>\");o=`${t.substring(0,n)}<annotation encoding=\"${i}\">${e}</annotation>${t.substring(n)}`}else if(PI.isEmpty(t)){const n=t.indexOf(\"/>\");const r=t.indexOf(\">\");const s=r===n?n:r;o=`${t.substring(0,s)}><semantics><annotation encoding=\"${i}\">${e}</annotation></semantics></math>`}else{const n=t.indexOf(\">\")+1;const r=t.lastIndexOf(\"</math>\");const s=t.substring(n,r);o=`${t.substring(0,n)}<semantics>${s}<annotation encoding=\"${i}\">${e}</annotation></semantics></math>`}return o}static removeAnnotation(t,e){let i=t;const n=`<annotation encoding=\"${e}\">`;const o=\"</annotation>\";const r=t.indexOf(n);if(r!==-1){let e=false;let n=t.indexOf(\"<annotation\");while(n!==-1){if(n!==r){e=true}n=t.indexOf(\"<annotation\",n+1)}if(e){const e=t.indexOf(o,r);const n=e+o.length;const s=t.substring(0,r);i=s+t.substring(n)}else{i=PI.removeSemantics(t)}}return i}static removeSemantics(t){const e=\"</math>\";const i=\"<semantics>\";const n=\"<annotation\";let o=t;const r=t.indexOf(i);if(r!==-1){const s=t.indexOf(n,r+i.length);if(s!==-1){o=t.substring(0,r)+t.substring(r+i.length,s)+e}}return o}static removeSemanticsOcurrences(t,e=MI.xmlCharacters){const i=`${e.tagOpener}math`;const n=`${e.tagOpener}/math${e.tagCloser}`;const o=`/${e.tagCloser}`;const{tagCloser:r}=e;const s=`${e.tagOpener}semantics${e.tagCloser}`;const a=`${e.tagOpener}annotation encoding=`;let c=\"\";let l=t.indexOf(i);let d=0;while(l!==-1){c+=t.substring(d,l);const e=t.indexOf(n,l);const u=t.indexOf(o,l);const h=t.indexOf(r,l);if(e!==-1){d=e}else if(u===h-1){d=u}const f=t.indexOf(s,l);if(f!==-1){const e=t.substring(l,f);const o=t.indexOf(a,l);if(o!==-1){const r=f+s.length;const a=t.substring(r,o);c+=e+a+n;l=t.indexOf(i,l+i.length);d+=n.length}else{d=l;l=t.indexOf(i,l+i.length)}}else{d=l;l=t.indexOf(i,l+i.length)}}c+=t.substring(d,t.length);return c}static containClass(t,e){const i=t.indexOf(\"class\");if(i===-1){return false}const n=t.indexOf(\">\",i);const o=t.substring(i,n);if(o.indexOf(e)!==-1){return true}return false}static isEmpty(t){const e=\">\";const i=\"/>\";const n=t.indexOf(e);const o=t.indexOf(i);let r=false;if(o!==-1){if(o===n-1){r=true}}if(!r){const e=new RegExp(\"</(.+:)?math>\");const i=e.exec(t);if(i){r=n+1===i.index}}return r}static encodeProperties(t){const e=/\\w+=\".*?\"/g;const i=t=>{const e=t.indexOf('\"');const i=t.substring(e+1,t.length-1);const n=jI.htmlEntities(i);const o=`${t.substring(0,e+1)}${n}\"`;return o};const n=t.replace(e,i);return n}}class SI{static addConfiguration(t){Object.assign(SI.properties,t)}static get properties(){return SI._properties}static set properties(t){SI._properties=t}static get(t){if(!Object.prototype.hasOwnProperty.call(SI.properties,t)){if(Object.prototype.hasOwnProperty.call(SI.properties,\"_wrs_conf_\")){return SI.properties[`_wrs_conf_${t}`]}return false}return SI.properties[t]}static set(t,e){SI.properties[t]=e}static update(t,e){if(!SI.get(t)){SI.set(t,e)}else{const i=Object.assign(SI.get(t),e);SI.set(t,i)}}}SI._properties={};class II{constructor(){this.cache=[]}populate(t,e){this.cache[t]=e}get(t){if(Object.prototype.hasOwnProperty.call(this.cache,t)){return this.cache[t]}return false}}class NI{constructor(){this.listeners=[]}add(t){this.listeners.push(t)}fire(t,e){for(let i=0;i<this.listeners.length&&!e.cancelled;i+=1){if(this.listeners[i].eventName===t){this.listeners[i].callback(e)}}return e.defaultPrevented}static newListener(t,e){const i={};i.eventName=t;i.callback=e;return i}}class OI{static get listeners(){return OI._listeners}static addListener(t){OI.listeners.add(t)}static fireEvent(t,e){OI.listeners.fire(t,e)}static get parameters(){return OI._parameters}static set parameters(t){OI._parameters=t}static get servicePaths(){return OI._servicePaths}static set servicePaths(t){OI._servicePaths=t}static setServicePath(t,e){OI.servicePaths[t]=e}static getServicePath(t){return OI.servicePaths[t]}static get integrationPath(){return OI._integrationPath}static set integrationPath(t){OI._integrationPath=t}static getServerURL(){const t=window.location.href;const e=t.split(\"/\");const i=`${e[0]}//${e[2]}`;return i}static init(t){OI.parameters=t;let e=OI.createServiceURI(\"configurationjs\");let i=OI.createServiceURI(\"createimage\");let n=OI.createServiceURI(\"showimage\");let o=OI.createServiceURI(\"getmathml\");let r=OI.createServiceURI(\"service\");if(OI.parameters.URI.indexOf(\"/\")===0){const t=OI.getServerURL();e=t+e;n=t+n;i=t+i;o=t+o;r=t+r}OI.setServicePath(\"configurationjs\",e);OI.setServicePath(\"showimage\",n);OI.setServicePath(\"createimage\",i);OI.setServicePath(\"service\",r);OI.setServicePath(\"getmathml\",o);OI.setServicePath(\"configurationjs\",e);OI.listeners.fire(\"onInit\",{})}static getUrl(t,e){const i=window.location.toString().substr(0,window.location.toString().lastIndexOf(\"/\")+1);const n=jI.createHttpRequest();if(n){if(typeof e===\"undefined\"||typeof e===\"undefined\"){n.open(\"GET\",t,false)}else if(t.substr(0,1)===\"/\"||t.substr(0,7)===\"http://\"||t.substr(0,8)===\"https://\"){n.open(\"POST\",t,false)}else{n.open(\"POST\",i+t,false)}if(typeof e!==\"undefined\"&&e){n.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded; charset=UTF-8\");n.send(jI.httpBuildQuery(e))}else{n.send(null)}return n.responseText}return\"\"}static getService(t,e,i){let n;if(i===true){const i=`${OI.getServicePath(t)}?${e}`;n=OI.getUrl(i)}else{const i=OI.getServicePath(t);n=OI.getUrl(i,e)}return n}static getServerLanguageFromService(t){if(t.indexOf(\".php\")!==-1){return\"php\"}if(t.indexOf(\".aspx\")!==-1){return\"aspx\"}if(t.indexOf(\"wirispluginengine\")!==-1){return\"ruby\"}return\"java\"}static createServiceURI(t){const e=OI.serverExtension();return jI.concatenateUrl(OI.parameters.URI,t)+e}static serverExtension(){if(OI.parameters.server.indexOf(\"php\")!==-1){return\".php\"}if(OI.parameters.server.indexOf(\"aspx\")!==-1){return\".aspx\"}return\"\"}}OI._servicePaths={};OI._integrationPath=\"\";OI._listeners=new NI;OI._parameters={};class LI{static get cache(){return LI._cache}static set cache(t){LI._cache=t}static getLatexFromMathML(t){const e=PI.removeSemantics(t);const{cache:i}=LI;const n={service:\"mathml2latex\",mml:e};const o=JSON.parse(OI.getService(\"service\",n));let r=\"\";if(o.status===\"ok\"){r=o.result.text;const e=jI.htmlEntities(r);const n=PI.addAnnotation(t,e,\"LaTeX\");i.populate(r,n)}return r}static getMathMLFromLatex(t,e){const i=LI.cache;if(LI.cache.get(t)){return LI.cache.get(t)}const n={service:\"latex2mathml\",latex:t};if(e){n.saveLatex=\"\"}const o=JSON.parse(OI.getService(\"service\",n));let r;if(o.status===\"ok\"){let e=o.result.text;e=e.split(\"\\r\").join(\"\").split(\"\\n\").join(\" \");if(e.indexOf(\"semantics\")===-1&&e.indexOf(\"annotation\")===-1){e=PI.addAnnotation(e,t,\"LaTeX\");r=e}else{r=e}if(!i.get(t)){i.populate(t,e)}}else{r=`$$${t}$$`}return r}static parseMathmlToLatex(t,e){let i=\"\";const n=`${e.tagOpener}math`;const o=`${e.tagOpener}/math${e.tagCloser}`;const r=`${e.tagOpener}annotation encoding=${e.doubleQuote}LaTeX${e.doubleQuote}${e.tagCloser}`;const s=`${e.tagOpener}/annotation${e.tagCloser}`;let a=t.indexOf(n);let c=0;let l;let d;let u;while(a!==-1){i+=t.substring(c,a);c=t.indexOf(o,a);if(c===-1){c=t.length-1}else{c+=o.length}l=t.substring(a,c);d=l.indexOf(r);if(d!==-1){d+=r.length;u=l.indexOf(s);let t=l.substring(d,u);if(e===MI.safeXmlCharacters){t=PI.safeXmlDecode(t)}i+=`$$${t}$$`;LI.cache.populate(t,l)}else{i+=l}a=t.indexOf(n,c)}i+=t.substring(c,t.length);return i}static getLatexFromTextNode(t,e,i){const n={open:\"$$\",close:\"$$\"};if(typeof i===\"undefined\"||i==null){i=n}let o=t;while(o.previousSibling&&o.previousSibling.nodeType===3){o=o.previousSibling}function r(t,e,n){let o=t.nodeValue.indexOf(n,e);while(o===-1){t=t.nextSibling;if(!t){return null}o=t.nodeValue?t.nodeValue.indexOf(i.close):-1}return{node:t,position:o}}function s(t,e,i,n){if(t===i){return e<=n}while(t&&t!==i){t=t.nextSibling}return t===i}let a;let c={node:o,position:0};const l=i.open.length;do{a=r(c.node,c.position,i.open);if(a==null||s(t,e,a.node,a.position)){return null}c=r(a.node,a.position+l,i.close);if(c==null){return null}c.position+=l}while(s(c.node,c.position,t,e));let d;if(a.node===c.node){d=a.node.nodeValue.substring(a.position+l,c.position-l)}else{const t=a.position+l;d=a.node.nodeValue.substring(t,a.node.nodeValue.length);let e=a.node;do{e=e.nextSibling;if(e===c.node){d+=c.node.nodeValue.substring(0,c.position-l)}else{d+=e.nodeValue?e.nodeValue:\"\"}}while(e!==c.node)}return{latex:d,startNode:a.node,startPosition:a.position,endNode:c.node,endPosition:c.position}}}LI._cache=new II;var zI=i(16);class RI{constructor(){throw new Error(\"Static class StringManager can not be instantiated.\")}static get(t){let{language:e}=this;if(!(e in this.strings)){console.warn(`Unknown language ${e} set in StringManager.`);e=\"en\"}if(!(t in this.strings[e])){console.warn(`Unknown key ${t} in StringManager.`);return t}return this.strings[e][t]}}RI.strings=zI;RI.language=\"en\";class jI{static fireEvent(t,e){if(document.createEvent){const i=document.createEvent(\"HTMLEvents\");i.initEvent(e,true,true);return!t.dispatchEvent(i)}const i=document.createEventObject();return t.fireEvent(`on${e}`,i)}static addEvent(t,e,i){if(t.addEventListener){t.addEventListener(e,i,true)}else if(t.attachEvent){t.attachEvent(`on${e}`,i)}}static removeEvent(t,e,i){if(t.removeEventListener){t.removeEventListener(e,i,true)}else if(t.detachEvent){t.detachEvent(`on${e}`,i)}}static addElementEvents(t,e,i,n){if(e){jI.addEvent(t,\"dblclick\",t=>{const i=t||window.event;const n=i.srcElement?i.srcElement:i.target;e(n,i)})}if(i){jI.addEvent(t,\"mousedown\",t=>{const e=t||window.event;const n=e.srcElement?e.srcElement:e.target;i(n,e)})}if(n){jI.addEvent(t,\"mouseup\",t=>{const e=t||window.event;const i=e.srcElement?e.srcElement:e.target;n(i,e)})}}static addClass(t,e){if(!jI.containsClass(t,e)){t.className+=` ${e}`}}static containsClass(t,e){if(t==null||!(\"className\"in t)){return false}const i=t.className.split(\" \");for(let t=i.length-1;t>=0;t-=1){if(i[t]===e){return true}}return false}static removeClass(t,e){let i=\"\";const n=t.className.split(\" \");for(let t=0;t<n.length;t+=1){if(n[t]!==e){i+=`${n[t]} `}}t.className=i.trim()}static convertOldXmlinitialtextAttribute(t){const e=\"value=\";const i=t.indexOf(\"xmlinitialtext\");const n=t.indexOf(e,i);const o=t.charAt(n+e.length);const r=n+e.length+1;const s=t.indexOf(o,r);const a=t.substring(r,s);let c=a.split(\"«\").join(\"§lt;\");c=c.split(\"»\").join(\"§gt;\");c=c.split(\"&\").join(\"§\");c=c.split(\"¨\").join(\"§quot;\");t=t.split(a).join(c);return t}static createElement(t,e,i){if(e===undefined){e={}}if(i===undefined){i=document}let n;try{let o=`<${t}`;Object.keys(e).forEach(t=>{o+=` ${t}=\"${jI.htmlEntities(e[t])}\"`});o+=\">\";n=i.createElement(o)}catch(o){n=i.createElement(t);Object.keys(e).forEach(t=>{n.setAttribute(t,e[t])})}return n}static createObject(t,e){if(e===undefined){e=document}t=t.split(\"<applet \").join('<span wirisObject=\"WirisApplet\" ').split(\"<APPLET \").join('<span wirisObject=\"WirisApplet\" ');t=t.split(\"</applet>\").join(\"</span>\").split(\"</APPLET>\").join(\"</span>\");t=t.split(\"<param \").join('<br wirisObject=\"WirisParam\" ').split(\"<PARAM \").join('<br wirisObject=\"WirisParam\" ');t=t.split(\"</param>\").join(\"</br>\").split(\"</PARAM>\").join(\"</br>\");const i=jI.createElement(\"div\",{},e);i.innerHTML=t;function n(t){if(t.getAttribute&&t.getAttribute(\"wirisObject\")===\"WirisParam\"){const i={};for(let e=0;e<t.attributes.length;e+=1){if(t.attributes[e].nodeValue!==null){i[t.attributes[e].nodeName]=t.attributes[e].nodeValue}}const n=jI.createElement(\"param\",i,e);if(n.NAME){n.name=n.NAME;n.value=n.VALUE}n.removeAttribute(\"wirisObject\");t.parentNode.replaceChild(n,t)}else if(t.getAttribute&&t.getAttribute(\"wirisObject\")===\"WirisApplet\"){const i={};for(let e=0;e<t.attributes.length;e+=1){if(t.attributes[e].nodeValue!==null){i[t.attributes[e].nodeName]=t.attributes[e].nodeValue}}const o=jI.createElement(\"applet\",i,e);o.removeAttribute(\"wirisObject\");for(let e=0;e<t.childNodes.length;e+=1){n(t.childNodes[e]);if(t.childNodes[e].nodeName.toLowerCase()===\"param\"){o.appendChild(t.childNodes[e]);e-=1}}t.parentNode.replaceChild(o,t)}else{for(let e=0;e<t.childNodes.length;e+=1){n(t.childNodes[e])}}}n(i);return i.firstChild}static createObjectCode(t){if(typeof t===\"undefined\"||t===null){return null}if(t.nodeType===1){let e=`<${t.tagName}`;for(let i=0;i<t.attributes.length;i+=1){if(t.attributes[i].specified){e+=` ${t.attributes[i].name}=\"${jI.htmlEntities(t.attributes[i].value)}\"`}}if(t.childNodes.length>0){e+=\">\";for(let i=0;i<t.childNodes.length;i+=1){e+=jI.createObject(t.childNodes[i])}e+=`</${t.tagName}>`}else if(t.nodeName===\"DIV\"||t.nodeName===\"SCRIPT\"){e+=`></${t.tagName}>`}else{e+=\"/>\"}return e}if(t.nodeType===3){return jI.htmlEntities(t.nodeValue)}return\"\"}static concatenateUrl(t,e){let i=\"\";if(t.indexOf(\"/\")!==t.length&&e.indexOf(\"/\")!==0){i=\"/\"}return(t+i+e).replace(/([^:]\\/)\\/+/g,\"$1\")}static htmlEntities(t){return t.split(\"&\").join(\"&amp;\").split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\").split('\"').join(\"&quot;\")}static htmlEntitiesDecode(t){const e=document.createElement(\"textarea\");e.innerHTML=t;return e.value}static createHttpRequest(){const t=window.location.toString().substr(0,window.location.toString().lastIndexOf(\"/\")+1);if(t.substr(0,7)===\"file://\"){throw RI.get(\"exception_cross_site\")}if(typeof XMLHttpRequest!==\"undefined\"){return new XMLHttpRequest}try{return new ActiveXObject(\"Msxml2.XMLHTTP\")}catch(t){try{return new ActiveXObject(\"Microsoft.XMLHTTP\")}catch(t){return null}}}static httpBuildQuery(t){let e=\"\";Object.keys(t).forEach(i=>{if(t[i]!=null){e+=`${jI.urlEncode(i)}=${jI.urlEncode(t[i])}&`}});if(e.substring(e.length-1)===\"&\"){e=e.substring(0,e.length-1)}return e}static propertiesToString(t){const e=[];Object.keys(t).forEach(i=>{if(Object.prototype.hasOwnProperty.call(t,i)){e.push(i)}});const i=e.length;for(let t=0;t<i;t+=1){for(let n=t+1;n<i;n+=1){const i=e[t];const o=e[n];if(jI.compareStrings(i,o)>0){e[t]=o;e[n]=i}}}let n=\"\";for(let o=0;o<i;o+=1){const i=e[o];n+=i;n+=\"=\";let r=t[i];r=r.replace(\"\\\\\",\"\\\\\\\\\");r=r.replace(\"\\n\",\"\\\\n\");r=r.replace(\"\\r\",\"\\\\r\");r=r.replace(\"\\t\",\"\\\\t\");n+=r;n+=\"\\n\"}return n}static compareStrings(t,e){let i;const n=t.length;const o=e.length;const r=n>o?o:n;for(i=0;i<r;i+=1){const n=jI.fixedCharCodeAt(t,i)-jI.fixedCharCodeAt(e,i);if(n!==0){return n}}return t.length-e.length}static fixedCharCodeAt(t,e){e=e||0;const i=t.charCodeAt(e);let n;let o;if(i>=55296&&i<=56319){n=i;o=t.charCodeAt(e+1);if(Number.isNaN(o)){throw RI.get(\"exception_high_surrogate\")}return(n-55296)*1024+(o-56320)+65536}if(i>=56320&&i<=57343){return false}return i}static urlToAssArray(t){let e;e=t.indexOf(\"?\");if(e>0){const i=t.substring(e+1);const n=i.split(\"&\");const o={};for(e=0;e<n.length;e+=1){const t=n[e];const i=t.split(\"=\");if(i.length>1){o[i[0]]=decodeURIComponent(i[1].replace(/\\+/g,\" \"))}}return o}return{}}static urlEncode(t){let e=\"\";e=encodeURIComponent(t);return e}static getWIRISImageOutput(t,e,i){const n=jI.createObject(t);if(n){if(n.className===SI.get(\"imageClassName\")||n.getAttribute(SI.get(\"imageMathmlAttribute\"))){if(!e){return t}const o=n.getAttribute(SI.get(\"imageMathmlAttribute\"));let r=PI.safeXmlDecode(o);if(!SI.get(\"saveHandTraces\")){r=PI.removeAnnotation(r,\"application/json\")}if(r==null){r=n.getAttribute(\"alt\")}if(i){const t=PI.safeXmlEncode(r);return t}return r}}return t}static getNodeLength(t){const e={IMG:1,BR:1};if(t.nodeType===3){return t.nodeValue.length}if(t.nodeType===1){let i=e[t.nodeName.toUpperCase()];if(i===undefined){i=0}for(let e=0;e<t.childNodes.length;e+=1){i+=jI.getNodeLength(t.childNodes[e])}return i}return 0}static getSelectedItem(t,e,i){let n;if(e){n=t.contentWindow;n.focus()}else{n=window;t.focus()}if(document.selection&&!i){const i=n.document.selection.createRange();if(i.parentElement){if(i.htmlText.length>0){if(i.text.length===0){return jI.getSelectedItem(t,e,true)}return null}n.document.execCommand(\"InsertImage\",false,\"#\");let o=i.parentElement();if(o.nodeName.toUpperCase()!==\"IMG\"){i.pasteHTML('<span id=\"wrs_openEditorWindow_temporalObject\"></span>');o=n.document.getElementById(\"wrs_openEditorWindow_temporalObject\")}let r;let s;if(o.nextSibling&&o.nextSibling.nodeType===3){r=o.nextSibling;s=0}else if(o.previousSibling&&o.previousSibling.nodeType===3){r=o.previousSibling;s=r.nodeValue.length}else{r=n.document.createTextNode(\"\");o.parentNode.insertBefore(r,o);s=0}o.parentNode.removeChild(o);return{node:r,caretPosition:s}}if(i.length>1){return null}return{node:i.item(0)}}if(n.getSelection){let t;const e=n.getSelection();try{t=e.getRangeAt(0)}catch(e){t=n.document.createRange()}const i=t.startContainer;if(i.nodeType===3){return{node:i,caretPosition:t.startOffset}}if(i!==t.endContainer){return null}if(i.nodeType===1){const e=t.startOffset;if(i.childNodes[e]){return{node:i.childNodes[e]}}}}return null}static getSelectedItemOnTextarea(t){const e=document.createTextNode(t.value);const i=LI.getLatexFromTextNode(e,t.selectionStart);if(i===null){return null}return{node:e,caretPosition:t.selectionStart,startPosition:i.startPosition,endPosition:i.endPosition}}static getElementsByNameFromString(t,e,i){const n=[];t=t.toLowerCase();e=e.toLowerCase();let o=t.indexOf(`<${e} `);while(o!==-1){let r;if(i){r=\">\"}else{r=`</${e}>`}let s=t.indexOf(r,o);if(s!==-1){s+=r.length;n.push({start:o,end:s})}else{s=o+1}o=t.indexOf(`<${e} `,s)}return n}static decode64(t){const e=\"+\".charCodeAt(0);const i=\"/\".charCodeAt(0);const n=\"0\".charCodeAt(0);const o=\"a\".charCodeAt(0);const r=\"A\".charCodeAt(0);const s=\"-\".charCodeAt(0);const a=\"_\".charCodeAt(0);const c=t.charCodeAt(0);if(c===e||c===s){return 62}if(c===i||c===a){return 63}if(c<n){return-1}if(c<n+10){return c-n+26+26}if(c<r+26){return c-r}if(c<o+26){return c-o+26}return null}static b64ToByteArray(t,e){let i;if(t.length%4>0){throw new Error(\"Invalid string. Length must be a multiple of 4\")}const n=[];let o;let r;if(!e){if(t.charAt(t.length-2)===\"=\"){r=2}else if(t.charAt(t.length-1)===\"=\"){r=1}else{r=0}o=r>0?t.length-4:t.length}else{o=e}let s;for(s=0;s<o;s+=4){i=jI.decode64(t.charAt(s))<<18|jI.decode64(t.charAt(s+1))<<12|jI.decode64(t.charAt(s+2))<<6|jI.decode64(t.charAt(s+3));n.push(i>>16&255);n.push(i>>8&255);n.push(i&255)}if(r){if(r===2){i=jI.decode64(t.charAt(s))<<2|jI.decode64(t.charAt(s+1))>>4;n.push(i&255)}else if(r===1){i=jI.decode64(t.charAt(s))<<10|jI.decode64(t.charAt(s+1))<<4|jI.decode64(t.charAt(s+2))>>2;n.push(i>>8&255);n.push(i&255)}}return n}static readInt32(t){if(t.length<4){return false}const e=t.splice(0,4);return e[0]<<24|e[1]<<16|e[2]<<8|e[3]<<0}static readByte(t){return t.shift()<<0}static readBytes(t,e,i){return t.splice(e,i)}static updateTextArea(t,e){if(t&&e){t.focus();if(t.selectionStart!=null){const{selectionEnd:i}=t;const n=t.value.substring(0,t.selectionStart);const o=t.value.substring(i,t.value.length);t.value=n+e+o;t.selectionEnd=i+e.length}else{const t=document.selection.createRange();t.text=e}}}static updateExistingTextOnTextarea(t,e,i,n){t.focus();const o=t.value.substring(0,i);t.value=o+e+t.value.substring(n,t.value.length);t.selectionEnd=i+e.length}static addArgument(t,e,i){let n;if(t.indexOf(\"?\")>0){n=\"&\"}else{n=\"?\"}return`${t+n+e}=${i}`}}class DI{static removeImgDataAttributes(t){const e=[];const{attributes:i}=t;Object.keys(i).forEach(t=>{const n=i[t];if(n.name.indexOf(\"data-\")===0){e.push(n.name)}});e.forEach(e=>{t.removeAttribute(e)})}static clone(t,e){const i=SI.get(\"imageCustomEditorName\");if(!t.hasAttribute(i)){e.removeAttribute(i)}const n=SI.get(\"imageMathmlAttribute\");const o=[n,i,\"alt\",\"height\",\"width\",\"style\",\"src\",\"role\"];o.forEach(i=>{const n=t.getAttribute(i);if(n){e.setAttribute(i,n)}})}static setImgSize(t,e,i){let n;let o;let r;let s;if(i){if(SI.get(\"imageFormat\")===\"svg\"){if(SI.get(\"saveMode\")!==\"base64\"){n=DI.getMetricsFromSvgString(e)}else{o=t.src.substr(t.src.indexOf(\"base64,\")+7,t.src.length);s=\"\";r=jI.b64ToByteArray(o,o.length);for(let t=0;t<r.length;t+=1){s+=String.fromCharCode(r[t])}n=DI.getMetricsFromSvgString(s)}}else{o=t.src.substr(t.src.indexOf(\"base64,\")+7,t.src.length);r=jI.b64ToByteArray(o,88);n=DI.getMetricsFromBytes(r)}}else{n=jI.urlToAssArray(e)}let a=n.cw;if(!a){return}let c=n.ch;let l=n.cb;const{dpi:d}=n;if(d){a=a*96/d;c=c*96/d;l=l*96/d}t.width=a;t.height=c;t.style.verticalAlign=`-${c-l}px`}static fixAfterResize(t){t.removeAttribute(\"style\");t.removeAttribute(\"width\");t.removeAttribute(\"height\");t.style.maxWidth=\"none\";if(t.src.indexOf(\"data:image\")!==-1){if(SI.get(\"imageFormat\")===\"svg\"){const e=decodeURIComponent(t.src.substring(32,t.src.length));DI.setImgSize(t,e,true)}else{const e=t.src.substring(22,t.src.length);DI.setImgSize(t,e,true)}}else{DI.setImgSize(t,t.src)}}static getMetricsFromSvgString(t){let e=t.indexOf('height=\"');let i=t.indexOf('\"',e+8,t.length);const n=t.substring(e+8,i);e=t.indexOf('width=\"');i=t.indexOf('\"',e+7,t.length);const o=t.substring(e+7,i);e=t.indexOf('wrs:baseline=\"');i=t.indexOf('\"',e+14,t.length);const r=t.substring(e+14,i);if(typeof o!==\"undefined\"){const t=[];t.cw=o;t.ch=n;if(typeof r!==\"undefined\"){t.cb=r}return t}return[]}static getMetricsFromBytes(t){jI.readBytes(t,0,8);let e;let i;let n;let o;let r;while(t.length>=4){n=jI.readInt32(t);if(n===1229472850){e=jI.readInt32(t);i=jI.readInt32(t);jI.readInt32(t);jI.readByte(t)}else if(n===1650545477){o=jI.readInt32(t)}else if(n===1883789683){r=jI.readInt32(t);r=Math.round(r/39.37);jI.readInt32(t);jI.readByte(t)}jI.readInt32(t)}if(typeof e!==\"undefined\"){const t=[];t.cw=e;t.ch=i;t.dpi=r;if(o){t.cb=o}return t}return[]}}class BI{static get cache(){return BI._cache}static set cache(t){BI._cache=t}static mathMLToAccessible(t,e,i){if(typeof e===\"undefined\"){e=\"en\"}if(PI.containClass(t,\"wrs_chemistry\")){i.mode=\"chemistry\"}let n=\"\";if(BI.cache.get(t)){n=BI.cache.get(t)}else{i.service=\"mathml2accessible\";i.lang=e;const o=JSON.parse(OI.getService(\"service\",i));if(o.status!==\"error\"){n=o.result.text;BI.cache.populate(t,n)}else{n=RI.get(\"error_convert_accessibility\")}}return n}}BI._cache=new II;var VI=i(115);class FI{static mathmlToImgObject(t,e,i,n){const o=t.createElement(\"img\");o.align=\"middle\";o.style.maxWidth=\"none\";const r=i||{};r.mml=e;r.lang=n;r.metrics=\"true\";r.centerbaseline=\"false\";if(SI.get(\"saveMode\")===\"base64\"&&SI.get(\"base64savemode\")===\"default\"){r.base64=true}o.className=SI.get(\"imageClassName\");if(e.indexOf('class=\"')!==-1){let t=e.substring(e.indexOf('class=\"')+'class=\"'.length,e.length);t=t.substring(0,t.indexOf('\"'));t=t.substring(4,t.length);o.setAttribute(SI.get(\"imageCustomEditorName\"),t)}if(SI.get(\"wirisPluginPerformance\")&&(SI.get(\"saveMode\")===\"xml\"||SI.get(\"saveMode\")===\"safeXml\")){let t=JSON.parse(FI.createShowImageSrc(r,n));if(t.status===\"warning\"){try{t=JSON.parse(OI.getService(\"showimage\",r))}catch(t){return null}}({result:t}=t);if(t.format===\"png\"){o.src=`data:image/png;base64,${t.content}`}else{o.src=`data:image/svg+xml;charset=utf8,${jI.urlEncode(t.content)}`}o.setAttribute(SI.get(\"imageMathmlAttribute\"),PI.safeXmlEncode(e));DI.setImgSize(o,t.content,true);if(SI.get(\"enableAccessibility\")){if(typeof t.alt===\"undefined\"){o.alt=BI.mathMLToAccessible(e,n,r)}else{o.alt=t.alt}}}else{const t=FI.createImageSrc(e,r);o.setAttribute(SI.get(\"imageMathmlAttribute\"),PI.safeXmlEncode(e));o.src=t;DI.setImgSize(o,t,SI.get(\"saveMode\")===\"base64\"&&SI.get(\"base64savemode\")===\"default\");if(SI.get(\"enableAccessibility\")){o.alt=BI.mathMLToAccessible(e,n,r)}}if(typeof FI.observer!==\"undefined\"){FI.observer.observe(o)}o.setAttribute(\"role\",\"math\");return o}static createImageSrc(t,e){if(SI.get(\"saveMode\")===\"base64\"&&SI.get(\"base64savemode\")===\"default\"){e.base64=true}let i=OI.getService(\"createimage\",e);if(i.indexOf(\"@BASE@\")!==-1){const t=OI.getServicePath(\"createimage\").split(\"/\");t.pop();i=i.split(\"@BASE@\").join(t.join(\"/\"))}return i}static initParse(t,e){t=FI.initParseSaveMode(t,e);return FI.initParseEditMode(t)}static initParseSaveMode(t,e){if(SI.get(\"saveMode\")){t=LI.parseMathmlToLatex(t,MI.safeXmlCharacters);t=LI.parseMathmlToLatex(t,MI.xmlCharacters);t=FI.parseMathmlToImg(t,MI.safeXmlCharacters,e);t=FI.parseMathmlToImg(t,MI.xmlCharacters,e);if(SI.get(\"saveMode\")===\"base64\"&&SI.get(\"base64savemode\")===\"image\"){t=FI.codeImgTransform(t,\"base642showimage\")}}return t}static initParseEditMode(t){if(SI.get(\"parseModes\").indexOf(\"latex\")!==-1){const e=jI.getElementsByNameFromString(t,\"img\",true);const i='encoding=\"LaTeX\">';let n=0;for(let o=0;o<e.length;o+=1){const r=t.substring(e[o].start+n,e[o].end+n);if(r.indexOf(` class=\"${SI.get(\"imageClassName\")}\"`)!==-1){let s=` ${SI.get(\"imageMathmlAttribute\")}=\"`;let a=r.indexOf(s);if(a===-1){s=' alt=\"';a=r.indexOf(s)}if(a!==-1){a+=s.length;const c=r.indexOf('\"',a);const l=PI.safeXmlDecode(r.substring(a,c));let d=l.indexOf(i);if(d!==-1){d+=i.length;const r=l.indexOf(\"</annotation>\",d);const s=l.substring(d,r);const a=`$$${jI.htmlEntitiesDecode(s)}$$`;const c=t.substring(0,e[o].start+n);const u=t.substring(e[o].end+n);t=c+a+u;n+=a.length-(e[o].end-e[o].start)}}}}}return t}static endParse(t){const e=FI.endParseEditMode(t);const i=FI.endParseSaveMode(e);return i}static endParseEditMode(t){if(SI.get(\"parseModes\").indexOf(\"latex\")!==-1){let e=\"\";let i=0;let n=t.indexOf(\"$$\");while(n!==-1){e+=t.substring(i,n);i=t.indexOf(\"$$\",n+2);if(i!==-1){const o=t.substring(n+2,i);const r=jI.htmlEntitiesDecode(o);let s=LI.getMathMLFromLatex(r,true);if(!SI.get(\"saveHandTraces\")){s=PI.removeAnnotation(s,\"application/json\")}e+=s;i+=2}else{e+=\"$$\";i=n+2}n=t.indexOf(\"$$\",i)}e+=t.substring(i,t.length);t=e}return t}static endParseSaveMode(t){if(SI.get(\"saveMode\")){if(SI.get(\"saveMode\")===\"safeXml\"){t=FI.codeImgTransform(t,\"img2mathml\")}else if(SI.get(\"saveMode\")===\"xml\"){t=FI.codeImgTransform(t,\"img2mathml\")}else if(SI.get(\"saveMode\")===\"base64\"&&SI.get(\"base64savemode\")===\"image\"){t=FI.codeImgTransform(t,\"img264\")}}return t}static createShowImageSrc(t,e){const i=[];const n=[\"mml\",\"color\",\"centerbaseline\",\"zoom\",\"dpi\",\"fontSize\",\"fontFamily\",\"defaultStretchy\",\"backgroundColor\",\"format\"];n.forEach(e=>{const o=n[e];if(typeof t[o]!==\"undefined\"){i[o]=t[o]}});const o={};Object.keys(t).forEach(e=>{if(e!==\"mml\"){o[e]=t[e]}});o.formula=com.wiris.js.JsPluginTools.md5encode(jI.propertiesToString(i));o.lang=typeof e===\"undefined\"?\"en\":e;o.version=SI.get(\"version\");const r=OI.getService(\"showimage\",jI.httpBuildQuery(o),true);return r}static codeImgTransform(t,e){let i=\"\";let n=0;const o=/<img/gi;const r=o.source.length;while(o.test(t)){const s=o.lastIndex-r;i+=t.substring(n,s);let a=s+1;while(a<t.length&&n<=s){const e=t.charAt(a);if(e==='\"'||e===\"'\"){const i=t.indexOf(e,a+1);if(i===-1){a=t.length}else{a=i}}else if(e===\">\"){n=a+1}a+=1}if(n<s){i+=t.substring(s,t.length);return i}let c=t.substring(s,n);const l=jI.createObject(c);let d=l.getAttribute(SI.get(\"imageMathmlAttribute\"));let u;let h;if(e===\"base642showimage\"){if(d==null){d=l.getAttribute(\"alt\")}d=PI.safeXmlDecode(d);c=FI.mathmlToImgObject(document,d,null,null);i+=jI.createObjectCode(c)}else if(e===\"img2mathml\"){if(SI.get(\"saveMode\")){if(SI.get(\"saveMode\")===\"safeXml\"){u=true;h=true}else if(SI.get(\"saveMode\")===\"xml\"){u=true;h=false}}i+=jI.getWIRISImageOutput(c,u,h)}else if(e===\"img264\"){if(d===null){d=l.getAttribute(\"alt\")}d=PI.safeXmlDecode(d);const t={};t.base64=\"true\";c=FI.mathmlToImgObject(document,d,t,null);DI.setImgSize(c,c.src,true);i+=jI.createObjectCode(c)}}i+=t.substring(n,t.length);return i}static parseMathmlToImg(t,e,i){let n=\"\";const o=`${e.tagOpener}math`;const r=`${e.tagOpener}/math${e.tagCloser}`;let s=t.indexOf(o);let a=0;while(s!==-1){n+=t.substring(a,s);const c=t.indexOf(SI.get(\"imageMathmlAttribute\"));a=t.indexOf(r,s);if(a===-1){a=t.length-1}else if(c!==-1){a+=t.indexOf(\"/>\",s)}else{a+=r.length}if(!PI.isMathmlInAttribute(t,s)&&c===-1){let o=t.substring(s,a);o=e.id===MI.safeXmlCharacters.id?PI.safeXmlDecode(o):PI.mathMLEntities(o);n+=jI.createObjectCode(FI.mathmlToImgObject(document,o,null,i))}else{n+=t.substring(s,a)}s=t.indexOf(o,a)}n+=t.substring(a,t.length);return n}}if(typeof MutationObserver!==\"undefined\"){const t=new MutationObserver(t=>{t.forEach(t=>{if(t.oldValue===SI.get(\"imageClassName\")&&t.attributeName===\"class\"&&t.target.className.indexOf(SI.get(\"imageClassName\"))===-1){t.target.className=SI.get(\"imageClassName\")}})});FI.observer=Object.create(t);FI.observer.Config={attributes:true,attributeOldValue:true};FI.observer.observe=function t(e){Object.getPrototypeOf(this).observe(e,this.Config)}}class HI{constructor(){this.isContentChanged=false;this.waitingForChanges=false}setIsContentChanged(t){this.isContentChanged=t}getIsContentChanged(){return this.isContentChanged}setWaitingForChanges(t){this.waitingForChanges=t}caretPositionChanged(t){}clipboardChanged(t){}contentChanged(t){if(this.waitingForChanges===true&&this.isContentChanged===false){this.isContentChanged=true}}styleChanged(t){}transformationReceived(t){}}class WI{constructor(t){this.editorAttributes={};if(\"editorAttributes\"in t){this.editorAttributes=t.editorAttributes}else{throw new Error(\"ContentManager constructor error: editorAttributes property missed.\")}this.customEditors=null;if(\"customEditors\"in t){this.customEditors=t.customEditors}this.environment={};if(\"environment\"in t){this.environment=t.environment}else{throw new Error(\"ContentManager constructor error: environment property missed\")}this.language=\"\";if(\"language\"in t){this.language=t.language}else{throw new Error(\"ContentManager constructor error: language property missed\")}this.editorListener=new HI;this.editor=null;this.ua=navigator.userAgent.toLowerCase();this.deviceProperties={};this.deviceProperties.isAndroid=this.ua.indexOf(\"android\")>-1;this.deviceProperties.isIOS=this.ua.indexOf(\"ipad\")>-1||this.ua.indexOf(\"iphone\")>-1;this.toolbar=null;this.modalDialogInstance=null;this.listeners=new NI;this.mathML=null;this.isNewElement=true;this.integrationModel=null;this.isEditorLoaded=false}addListener(t){this.listeners.add(t)}setIntegrationModel(t){this.integrationModel=t}setModalDialogInstance(t){this.modalDialogInstance=t}insert(){this.updateTitle(this.modalDialogInstance);this.insertEditor(this.modalDialogInstance)}insertEditor(){if(window.com&&window.com.wiris&&window.com.wiris.jsEditor&&window.com.wiris.jsEditor.JsEditor&&window.com.wiris.jsEditor.JsEditor.newInstance){this.editor=window.com.wiris.jsEditor.JsEditor.newInstance(this.editorAttributes);this.editor.insertInto(this.modalDialogInstance.contentContainer);this.editor.focus();if(this.modalDialogInstance.rtl){this.editor.action(\"rtl\")}if(this.editor.getEditorModel().isRTL()){this.editor.element.style.direction=\"rtl\"}this.editor.getEditorModel().addEditorListener(this.editorListener);if(this.modalDialogInstance.deviceProperties.isIOS){setTimeout((function t(){this.modalDialogInstance.hideKeyboard()}),400);const t=document.getElementsByClassName(\"wrs_formulaDisplay\")[0];jI.addEvent(t,\"focus\",this.modalDialogInstance.handleOpenedIosSoftkeyboard);jI.addEvent(t,\"blur\",this.modalDialogInstance.handleClosedIosSoftkeyboard)}this.listeners.fire(\"onLoad\",{});this.isEditorLoaded=true}else{setTimeout(WI.prototype.insertEditor.bind(this),100)}}init(){const t=document.createElement(\"script\");t.type=\"text/javascript\";let e=SI.get(\"editorUrl\");const i=document.createElement(\"a\");i.href=e;if(window.location.href.indexOf(\"https://\")===0){if(i.protocol===\"http:\"){i.protocol=\"https:\"}}if(i.port===\"80\"||i.port===\"443\"){e=`${i.protocol}//${i.hostname}/${i.pathname}`}else{e=`${i.protocol}//${i.hostname}:${i.port}/${i.pathname}`}const n={};if(\"editor\"in this.environment){n.editor=this.environment.editor}else{n.editor=\"unknown\"}if(\"mode\"in this.environment){n.mode=this.environment.mode}else{n.mode=SI.get(\"saveMode\")}if(\"version\"in this.environment){n.version=this.environment.version}else{n.version=SI.get(\"version\")}t.src=`${e}?lang=${this.language}&stats-editor=${n.editor}&stats-mode=${n.mode}&stats-version=${n.version}`;document.getElementsByTagName(\"head\")[0].appendChild(t)}setInitialContent(){if(!this.isNewElement){this.setMathML(this.mathML)}}setMathML(t,e){if(typeof e===\"undefined\"){e=false}this.editor.setMathMLWithCallback(t,()=>{this.editorListener.setWaitingForChanges(true)});setTimeout(()=>{this.editorListener.setIsContentChanged(false)},500);if(!e){this.onFocus()}}onFocus(){if(typeof this.editor!==\"undefined\"&&this.editor!=null){this.editor.focus()}}submitAction(){if(!this.editor.isFormulaEmpty()){let t=this.editor.getMathMLWithSemantics();if(this.customEditors.getActiveEditor()!==null){const{toolbar:e}=this.customEditors.getActiveEditor();t=PI.addCustomEditorClassAttribute(t,e)}else{Object.keys(this.customEditors.editors).forEach(e=>{t=PI.removeCustomEditorClassAttribute(t,e)})}const e=PI.mathMLEntities(t);this.integrationModel.updateFormula(e)}else{this.integrationModel.updateFormula(null)}this.customEditors.disable();this.integrationModel.notifyWindowClosed();this.setEmptyMathML();this.customEditors.disable()}setEmptyMathML(){if(this.deviceProperties.isAndroid||this.deviceProperties.isIOS){if(this.editor.getEditorModel().isRTL()){this.setMathML('<math dir=\"rtl\"><semantics><annotation encoding=\"application/json\">[]</annotation></semantics></math>',true)}else{this.setMathML('<math><semantics><annotation encoding=\"application/json\">[]</annotation></semantics></math>',true)}}else if(this.editor.getEditorModel().isRTL()){this.setMathML('<math dir=\"rtl\"/>',true)}else{this.setMathML(\"<math/>\",true)}}onOpen(){if(this.isNewElement){this.setEmptyMathML()}else{this.setMathML(this.mathML)}this.updateToolbar();this.onFocus()}updateToolbar(){this.updateTitle(this.modalDialogInstance);const t=this.customEditors.getActiveEditor();if(t){const e=t.toolbar?t.toolbar:_wrs_int_wirisProperties.toolbar;if(this.toolbar==null||this.toolbar!==e){this.setToolbar(e)}}else{const t=this.getToolbar();if(this.toolbar==null||this.toolbar!==t){this.setToolbar(t);this.customEditors.disable()}}}updateTitle(){const t=this.customEditors.getActiveEditor();if(t){this.modalDialogInstance.setTitle(t.title)}else{this.modalDialogInstance.setTitle(\"MathType\")}}getToolbar(){let t=\"general\";if(\"toolbar\"in this.editorAttributes){({toolbar:t}=this.editorAttributes)}if(t===\"general\"){t=typeof _wrs_int_wirisProperties===\"undefined\"||typeof _wrs_int_wirisProperties.toolbar===\"undefined\"?\"general\":_wrs_int_wirisProperties.toolbar}return t}setToolbar(t){this.toolbar=t;this.editor.setParams({toolbar:this.toolbar})}hasChanges(){return!this.editor.isFormulaEmpty()&&this.editorListener.getIsContentChanged()}onKeyDown(t){if(t.key!==undefined&&t.repeat===false){if(t.key===\"Escape\"||t.key===\"Esc\"){let e=document.getElementsByClassName(\"wrs_expandButton wrs_expandButtonFor3RowsLayout wrs_pressed\");if(e.length===0){e=document.getElementsByClassName(\"wrs_expandButton wrs_expandButtonFor2RowsLayout wrs_pressed\");if(e.length===0){e=document.getElementsByClassName(\"wrs_select wrs_pressed\");if(e.length===0){this.modalDialogInstance.cancelAction();t.stopPropagation();t.preventDefault()}}}}else if(t.shiftKey&&t.key===\"Tab\"){if(document.activeElement===this.modalDialogInstance.submitButton){this.editor.focus();t.stopPropagation();t.preventDefault()}else{const e=document.querySelector('[title=\"Manual\"]');if(document.activeElement===e){this.modalDialogInstance.cancelButton.focus();t.stopPropagation();t.preventDefault()}}}else if(t.key===\"Tab\"){if(document.activeElement===this.modalDialogInstance.cancelButton){const e=document.querySelector('[title=\"Manual\"]');e.focus();t.stopPropagation();t.preventDefault()}else{const e=document.getElementsByClassName(\"wrs_formulaDisplay\")[0];if(e.getAttribute(\"class\")===\"wrs_formulaDisplay wrs_focused\"){this.modalDialogInstance.submitButton.focus();t.stopPropagation();t.preventDefault()}}}}}}class UI{constructor(){this.editors=[];this.activeEditor=\"default\"}addEditor(t,e){const i={};i.name=e.name;i.toolbar=e.toolbar;i.icon=e.icon;i.confVariable=e.confVariable;i.title=e.title;i.tooltip=e.tooltip;this.editors[t]=i}enable(t){this.activeEditor=t}disable(){this.activeEditor=\"default\"}getActiveEditor(){if(this.activeEditor!==\"default\"){return this.editors[this.activeEditor]}return null}}const qI={imageCustomEditorName:\"data-custom-editor\",imageClassName:\"Wirisformula\",CASClassName:\"Wiriscas\"};var $I=qI;class YI{constructor(){this.cancelled=false;this.defaultPrevented=false}cancel(){this.cancelled=true}preventDefault(){this.defaultPrevented=true}}class GI{constructor(t){this.overlayElement=t.overlayElement;this.callbacks=t.callbacks;this.overlayWrapper=this.overlayElement.appendChild(document.createElement(\"div\"));this.overlayWrapper.setAttribute(\"class\",\"wrs_popupmessage_overlay_envolture\");this.message=this.overlayWrapper.appendChild(document.createElement(\"div\"));this.message.id=\"wrs_popupmessage\";this.message.setAttribute(\"class\",\"wrs_popupmessage_panel\");this.message.setAttribute(\"role\",\"dialog\");this.message.setAttribute(\"aria-describedby\",\"description_txt\");const e=document.createElement(\"p\");const i=document.createTextNode(t.strings.message);e.appendChild(i);e.id=\"description_txt\";this.message.appendChild(e);const n=this.overlayWrapper.appendChild(document.createElement(\"div\"));n.setAttribute(\"class\",\"wrs_popupmessage_overlay\");n.addEventListener(\"click\",this.cancelAction.bind(this));this.buttonArea=this.message.appendChild(document.createElement(\"div\"));this.buttonArea.setAttribute(\"class\",\"wrs_popupmessage_button_area\");this.buttonArea.id=\"wrs_popup_button_area\";const o={class:\"wrs_button_accept\",innerHTML:t.strings.submitString,id:\"wrs_popup_accept_button\"};this.closeButton=this.createButton(o,this.closeAction.bind(this));this.buttonArea.appendChild(this.closeButton);const r={class:\"wrs_button_cancel\",innerHTML:t.strings.cancelString,id:\"wrs_popup_cancel_button\"};this.cancelButton=this.createButton(r,this.cancelAction.bind(this));this.buttonArea.appendChild(this.cancelButton)}createButton(t,e){let i={};i=document.createElement(\"button\");i.setAttribute(\"id\",t.id);i.setAttribute(\"class\",t.class);i.innerHTML=t.innerHTML;i.addEventListener(\"click\",e);return i}show(){if(this.overlayWrapper.style.display!==\"block\"){document.activeElement.blur();this.overlayWrapper.style.display=\"block\";this.closeButton.focus()}else{this.overlayWrapper.style.display=\"none\";_wrs_modalWindow.focus()}}cancelAction(){this.overlayWrapper.style.display=\"none\";if(typeof this.callbacks.cancelCallback!==\"undefined\"){this.callbacks.cancelCallback()}}closeAction(){this.cancelAction();if(typeof this.callbacks.closeCallback!==\"undefined\"){this.callbacks.closeCallback()}}onKeyDown(t){if(t.key!==undefined){if(t.key===\"Escape\"||t.key===\"Esc\"){this.cancelAction();t.stopPropagation();t.preventDefault()}else if(t.key===\"Tab\"){if(document.activeElement===this.closeButton){this.cancelButton.focus()}else{this.closeButton.focus()}t.stopPropagation();t.preventDefault()}}}}var JI='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.76 13.76\"\\n height=\"13.76\"\\n width=\"13.76\"\\n id=\"svg3783\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata3789\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs3787\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image3791\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAACXBIWXMAAC4jAAAuIwF4pT92AAAB\\nvklEQVRYw83Z23GDMBAF0AsNhBIowSVQgjuISnAJKSEdZNOBS6CDOBUkqSC4gs2PyGhAQg92se4M\\n4w8bccYW2hVumBmRdAB6ADfopQcw2SOYNoIkAL8APgB8AzgLI0/2S/iy1xkt3B9m9h0dM9/YHxM4\\nJ/c4MfPkGX+y763OyYVKgUPQTXAJdC84Bg2CS6Gl4FSoF7wHmgvOhbrgzsW+8L4YJegccrEj749R\\ngs7ZXGdz8wbAeNbREcDTzrHvblEgBbAUFACuy6JALJeL0E/P9sbvmBnNojcgAM+oJ58AhrlnWM5Z\\nA+C9RmiokakBvIJuNTLSc7hojqY0Mo8EB6Ep2CPBm9BU7BHgKDQHqwlOguZiNcDJ0JLe4FV4iaLY\\nJjF16dLqnoob+EdDs8A1QJPBtUCTwDVBo+DaoJvgNvBIR6rDl9wirbA1QIPgVgl6VwHb+dAr7Jkk\\nS/Pg3mCkVOslxxV9yBFqSqTA/3N2Utkzye3pftw5OxzQ5tHeddcdzGj3o4VgClUwowgtAVOs3BpF\\naA6YUnsDowhNAVNu12UUoVtgCn2+ifxp1wO42Ner4KPR5dJ2tsse2ZLvTQxbVf4AmC2z7WnSvpIA\\nAAAASUVORK5CYII=\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.76\" />\\n</svg>\\n';var XI='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.76 13.76\"\\n height=\"13.76\"\\n width=\"13.76\"\\n id=\"svg2\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata8\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs6\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image10\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAACXBIWXMAAC4jAAAuIwF4pT92AAAB\\n2ElEQVRYw9XZoXPCMBTH8S+5KfDzQ29606CH3/SmQTO96aGHHn/F0Himh8eDZSblQknSJH2F0DtE\\nQw8+12vyfulr7XY7LuW4qvj+DugD18AC+AE2woa+/mz07y9cF7Y8d7YPDEtjK2AsCB4BvdLYHPi0\\nXawioAA3wAfQaQiKHhuFYl1QSbAL6gWrSKgEuArqBKsEaB1wKNQKVsasHybcpRhwLNQED0zsoMbz\\nFwJOhWL6Cmzd2e0D14Wi1/k9di2wFNnAEtBifd9jv4GtIPgaeBOCAkzLFayr/6idWSSY6DJ8sHT9\\n6VK6zRFqKwo5gQ+grnKbA/gI6gsy5wRboT7sucBOaBX21GAvNAR7KnAlNBTbNDgIGoMtwO/C0Gko\\nNBZbN525tk+dJrAj4F4YGxXgVQS019DkCgarM0OjwCoDaDBYZQINAquMoJVglRnUC1YZQp1g1RB0\\nJryn65jYJ0HoRGPHguDX8hsZ6VAiGX4eUrJBbHqSArdN7LLBmCcBnpvYWfHWo6E8Wge8Ar7Kj8E4\\nARwcnBPBB20BE7uJBMdAU8BH/YvyBAsFp0BjwNZGi201qALXgYaAnR0hX2upAzwDj/p8raFL5I4u\\n8ALc6vNfvc+ztq5al9Rh/AfwZZ/LmlMllAAAAABJRU5ErkJggg==\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.76\" />\\n</svg>\\n';var QI='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.76 13.76\"\\n height=\"13.76\"\\n width=\"13.76\"\\n id=\"svg3793\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata3799\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs3797\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image3801\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\\njwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAAG4SURBVFhHvZnhUYNAEEbRBkwH2oGUkA40FWgJ\\nKSEdaAmxA0vQDmIHKSFWgPuAHZkEAnd8y5v5kuNHMm+WY1mSm6qqCiGlZdUspXzxopY9Wu6bpZQf\\nSxlRWapwVx9p2dy2CxUHy9ryWx9pKdWyECYcIQshwlGyIBeOlAWpcLQsyISXkAWEX5tlPkvJwnP7\\nns1SsnvLS7PMZwlZiShEy8pEIVJWKgpRsnJRiJBNFf2wbCzjfZgRUZi9JYWDxT9bWk6WIXbKym4t\\nKRVloObO5oze6ZClWX9a5jyOcOrfmuUkXPRUH/1zVRhZpvsnCxN+jnDqHh0SdQaFu9vg0ZIqrBZ1\\neoXP92yKcJSocyHcd4FNEY4WdbrCR1rGrukMF9BWVhZvLZ7U9rS2nH9HVvoq63iFu+RUlOpIuCYL\\nCCPIqVjq1A9j5R3aBnMY2kKzMlbZHPQVbVHLhomCUjZUFFSy35ZQUVDIMo+Gi4JCltFwERSy75Y5\\n4+VkFLLcKHLHyyRUF1jOeJmMShbChZWy0Df8yFDLgg8/cpCN6I9cdHJhZHmy7X2anAnCtDUZ/j/Y\\ng2X2j709MHhTDAFF8QdK9SRpUl2yFgAAAABJRU5ErkJggg==\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.76\" />\\n</svg>\\n';var KI='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.76 13.76\"\\n height=\"13.76\"\\n width=\"13.76\"\\n id=\"svg12\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata18\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs16\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image20\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\\njwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAAGMSURBVFhHvdk7TsNAFIVhQ0l6elLDJqCGngXQ\\nU7MA6rALahZATQ81C6APrXP/jEaKHD/i8TnzS1eaICF/2I4f4qxt20bYOmaVlrK2Mb8s1Nj3mIu0\\nlPYZszlPa1kvMf9pKe02Zq3Gcrhc4JUaSzawA0sWsAtLcrATS1KwG0sycA0sAd6kZXm1sNzVHtOy\\nvBpYoK8xV/tPC3JjZVByYqVQcmHlUHJgLVBSY0ugPP7xO5PXYSW2FMr19ytm8sahxD7ElEBzk3c6\\nsFysn/afymKPvsXMueh3oblRMNibmPuYZ34wsyWHfqhB8OFpwKvDHLADmusFd8/ZU8FOaO4I3PcF\\nmwLXgOYOwVtexdnwdUy3vg2UQPnD2eji+vZsrruHS/eoBEpjWMpgrhi1Dv1gY6fBkuRQmtqzJVmg\\npMbaoKTEWqGkwtqhpMBWgZICWwVKCuwpzxKSFNi5T2vFqb5gVcAqLNnBSixZwWos2cBg/9JSmgUM\\n9iMt5QFe8tZ8VP6n3WXMHQtxPzHfabm0ptkBwWhpthzMp7YAAAAASUVORK5CYII=\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.76\" />\\n</svg>\\n';var ZI='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.76 13.76\"\\n height=\"13.76\"\\n width=\"13.76\"\\n id=\"svg3813\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata3819\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs3817\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image3821\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA\\nnUlEQVRYw+3Z0QnCMBSF4T/FATqCG1g3cISO0NE6iiPoCE5gneD40ohPvgkJ/AcC9/EjHELgliT0\\nkoGOIlasWLFixYoVK1asWLFixYoVK1bsjxy+5hlYgLEx47ofSEKSJW1nTUJJMgLPDlpwHoCpk8rO\\nvgZixf4Zu3Vi3cq+WroBp4ahL+BYa3AB7o1CH7vvc7M1U4N/g2sdSk8bxjfDaMNdr+hmAQAAAABJ\\nRU5ErkJggg==\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.76\" />\\n</svg>\\n';var tN='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.76 13.76\"\\n height=\"13.76\"\\n width=\"13.76\"\\n id=\"svg32\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata38\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs36\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image40\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA\\npklEQVRYw+3ZLQ4CMRCG4bcbFOvXg99T7FG4BafAw1VALx7dWyy2mIoGgSOZJu/n6p70ZybppFIK\\nvWSgo4gVK1asWLFixYoVK1asWLFixYoV+yO7r/UMHIAxiO8FZGBrsUfgDEwBN/QNXIA11S/PW1Bo\\nCz4N9ein4Nd1Dyw9PbDR0iVW7J+xudax6HkOtZVdg0MfQE7N0G4GlmANYgNW4A6QepowfgDMXB26\\nb1V6LAAAAABJRU5ErkJggg==\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.76\" />\\n</svg>\\n';var eN='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.76 13.76\"\\n height=\"13.76\"\\n width=\"13.76\"\\n id=\"svg3823\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata3829\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs3827\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image3831\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\\njwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAAHOSURBVFhH1ZiLUcMwEEQNDcQl0AEuISVABZhO\\nUkroICVAB6ECoINQgdmVfR5FlmQrkZzjzezEzsc8NPqcdNd1XfVfuB9ec3NAmv4yiRo5ImzBlm+c\\nwZYtEHJCGsT3eSgHxKZFxs/tL+aMkCK8R3yMwu4PcsVmiXBIVDDCvh/miEtMeE5UaEsNMJcN8o64\\ng26PvPSXs9S+/zRHQtgtvLRFCb9blZpnYw/9Rb6RR3M3zxtiprFbyKYwipK1+uwlnIkSrbITUaJR\\n1itKtMkGRYk2WRZAQbTNBpzWtggrrwnaWja00hk0DrCgsEZZ4hXWKksmwjLAHobkgOv+V3+ZhXHQ\\niWxKqXYLKNyILDdqbPKlldASPhA+Mxc7uwatkSOSix1iP//q2APshLBvfJo7hbizgQj/mDtl+KYu\\nCj8h7NSqCM2zXJvZwqqEY4uCOuGYLKEwJ3kVzMlyscg5915FTFbdqhaSVbn8+mTV1gmurOqCxpZN\\nEeUu9BlZd1obioTkQ7IhPGTjYZuPIoUMK/GUFrX39asuHJTlH3w1d3FCBxCrCUufZX+NCUdPSsAq\\nwu4A8wnPiQrFhW1Z4govFRWKCoeOjzjoZF92CdwpZy6AquoPvJRHJxB8bJ8AAAAASUVORK5CYII=\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.76\" />\\n</svg>\\n';var iN='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.76 13.76\"\\n height=\"13.76\"\\n width=\"13.76\"\\n id=\"svg42\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata48\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs46\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image50\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\\njwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAAG/SURBVFhH1ZgxUsMwEEUNJRyAGmp6qKGn5xRQ\\nQ08NNfRQQw11DpAaanIAWrMv8WaELSlexhLLm/mRnImiF48jr7zVtm3zX9ju2ik5llxLdpdHNg4k\\nT5I7yWB8Cdl9yZHkRmIRRpQxOxK+YzC+hKwSnTBBKKoMxpeUBSbkksgRE1V+CJeWhUPJ5ao7ICeq\\nrIVryMKJpC88RlTZk1SThVDYIvoluZIsSqyz511SfEg4UxbRdw5qnlmFa9AsCn8hO4aBKHiUjYqC\\nN9mkKHiSzYqCJ9lPSVIUPMmySqTudEu8XbOxO90ab7KQFPYoC1Fhr7IwENbagMLCUtXnoCTM1QZW\\n3iS3dFT2mRfHvEjuVfZUckFnQh67dgqo1GYqC1MLn3XtZIR/sFcJW2C39FcD18KxpcutcGqddSmc\\nuykg/LDq+iAnC/OudUFOVrfLbkjJWvb11YjJuhSFvqxbUQhlXYuCylpE2YXy2SkLlVEgaxVluzyT\\nIEutWQ1kKZYtouF2maK4mjCyFN6bJsw9gKgmrNdsbsKNT0qEKsIqC7EJx4gqxYVDWQgntIgqRYXD\\nbY3CLpcVgmdPC974BYy3/MgRNM03hR9ubFTHT48AAAAASUVORK5CYII=\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.76\" />\\n</svg>\\n';var nN='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.44 13.76\"\\n height=\"13.76\"\\n width=\"13.44\"\\n id=\"svg3803\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata3809\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs3807\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image3811\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAArCAYAAAAOnxr+AAAACXBIWXMAAC4jAAAuIwF4pT92AAAA\\nvElEQVRYw+3ZSw0CMRSF4b8T9iAFB4wDkDAWcICEkTA4GAeAA3AADurgsCkbAgsSMrmFczZNd1/a\\n3vSVJFFDGipJNdBZaRdAB2wC2TIwAgNAkrQEjsA86GBegDZJGoF18JnfJtVR9idXvaGGGmrod/b6\\nV9kD14k9LbD6FDqUM8CU2b2Deo0aaqihhhpqqKGGGhr1hH/wiP469FaBMzflEhc9PZKQ1CtmsqRO\\nEunpHbeNNN3A+dFJ/mf6V+gduGPIoUgKLbAAAAAASUVORK5CYII=\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.44\" />\\n</svg>\\n';var oN='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<svg\\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\\n xmlns:cc=\"http://creativecommons.org/ns#\"\\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n xmlns:svg=\"http://www.w3.org/2000/svg\"\\n xmlns=\"http://www.w3.org/2000/svg\"\\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\\n viewBox=\"0 0 13.44 13.76\"\\n height=\"13.76\"\\n width=\"13.44\"\\n id=\"svg22\"\\n version=\"1.1\">\\n <metadata\\n id=\"metadata28\">\\n <rdf:RDF>\\n <cc:Work\\n rdf:about=\"\">\\n <dc:format>image/svg+xml</dc:format>\\n <dc:type\\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\\n <dc:title></dc:title>\\n </cc:Work>\\n </rdf:RDF>\\n </metadata>\\n <defs\\n id=\"defs26\" />\\n <image\\n y=\"0\"\\n x=\"0\"\\n id=\"image30\"\\n xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAArCAYAAAAOnxr+AAAACXBIWXMAAC4jAAAuIwF4pT92AAAA\\nvUlEQVRYw+3ZsQ3CMBCF4d8WFekZgBqWIDUDZACmYBQWYIn0pGYAegZIexROERHRIBTdhXeVy08+\\nyT4/JzMjQmWCVBjoarSugK0z3/0degKODjeyBy5Am8ysARrnnT8nM7sCa+fQLgdAAlQ6ngQVVFBB\\nfzeUTK6t8VAwU328ztV6QQUVVFBBBRVUUEG9Ds41sJvZs/8GelDrlw7tAjhvmZLo9o6RD4bEGUp+\\nX1My/I0T4HN4rrcASf9M/wp9ASNzIKYYz2hAAAAAAElFTkSuQmCC\\n\"\\n style=\"image-rendering:optimizeQuality\"\\n preserveAspectRatio=\"none\"\\n height=\"13.76\"\\n width=\"13.44\" />\\n</svg>\\n';class rN{constructor(t){this.attributes=t;const e=navigator.userAgent.toLowerCase();const i=e.indexOf(\"android\")>-1;const n=e.indexOf(\"ipad\")>-1||e.indexOf(\"iphone\")>-1;this.iosSoftkeyboardOpened=false;this.iosMeasureUnit=e.indexOf(\"crios\")===-1?\"%\":\"vh\";this.iosDivHeight=`100%${this.iosMeasureUnit}`;const o=window.outerWidth;const r=window.outerHeight;const s=o>r;const a=o<r;const c=s&&this.attributes.height>r;const l=a&&this.attributes.width>o;const d=c||l;this.instanceId=document.getElementsByClassName(\"wrs_modal_dialogContainer\").length;this.deviceProperties={orientation:s?\"landscape\":\"portait\",isAndroid:i,isIOS:n,isMobile:d,isDesktop:!d&&!n&&!i};this.properties={created:false,state:\"\",previousState:\"\",position:{bottom:0,right:10},size:{height:338,width:580}};this.websiteBeforeLockParameters=null;let u={};u.class=\"wrs_modal_overlay\";u.id=this.getElementId(u.class);this.overlay=jI.createElement(\"div\",u);u={};u.class=\"wrs_modal_title_bar\";u.id=this.getElementId(u.class);this.titleBar=jI.createElement(\"div\",u);u={};u.class=\"wrs_modal_title\";u.id=this.getElementId(u.class);this.title=jI.createElement(\"div\",u);this.title.innerHTML=\"\";u={};u.class=\"wrs_modal_close_button\";u.id=this.getElementId(u.class);u.title=RI.get(\"close\");u.style={};this.closeDiv=jI.createElement(\"a\",u);this.closeDiv.setAttribute(\"role\",\"button\");let h=`background-size: 10px; background-image: url(data:image/svg+xml;base64,${window.btoa(JI)})`;let f=`background-size: 10px; background-image: url(data:image/svg+xml;base64,${window.btoa(XI)})`;this.closeDiv.setAttribute(\"style\",h);this.closeDiv.setAttribute(\"onmouseover\",`this.style = \"${f}\";`);this.closeDiv.setAttribute(\"onmouseout\",`this.style = \"${h}\";`);u={};u.class=\"wrs_modal_stack_button\";u.id=this.getElementId(u.class);u.title=RI.get(\"exit_fullscreen\");this.stackDiv=jI.createElement(\"a\",u);this.stackDiv.setAttribute(\"role\",\"button\");h=`background-size: 10px; background-image: url(data:image/svg+xml;base64,${window.btoa(eN)})`;f=`background-size: 10px; background-image: url(data:image/svg+xml;base64,${window.btoa(iN)})`;this.stackDiv.setAttribute(\"style\",h);this.stackDiv.setAttribute(\"onmouseover\",`this.style = \"${f}\";`);this.stackDiv.setAttribute(\"onmouseout\",`this.style = \"${h}\";`);u={};u.class=\"wrs_modal_maximize_button\";u.id=this.getElementId(u.class);u.title=RI.get(\"fullscreen\");this.maximizeDiv=jI.createElement(\"a\",u);this.maximizeDiv.setAttribute(\"role\",\"button\");h=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(QI)})`;f=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(KI)})`;this.maximizeDiv.setAttribute(\"style\",h);this.maximizeDiv.setAttribute(\"onmouseover\",`this.style = \"${f}\";`);this.maximizeDiv.setAttribute(\"onmouseout\",`this.style = \"${h}\";`);u={};u.class=\"wrs_modal_minimize_button\";u.id=this.getElementId(u.class);u.title=RI.get(\"minimize\");this.minimizeDiv=jI.createElement(\"a\",u);this.minimizeDiv.setAttribute(\"role\",\"button\");h=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(ZI)})`;f=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(tN)})`;this.minimizeDiv.setAttribute(\"style\",h);this.minimizeDiv.setAttribute(\"onmouseover\",`this.style = \"${f}\";`);this.minimizeDiv.setAttribute(\"onmouseout\",`this.style = \"${h}\";`);u={};u.class=\"wrs_modal_dialogContainer\";u.id=this.getElementId(u.class);u.role=\"dialog\";this.container=jI.createElement(\"div\",u);this.container.setAttribute(\"aria-labeledby\",\"wrs_modal_title[0]\");u={};u.class=\"wrs_modal_wrapper\";u.id=this.getElementId(u.class);this.wrapper=jI.createElement(\"div\",u);u={};u.class=\"wrs_content_container\";u.id=this.getElementId(u.class);this.contentContainer=jI.createElement(\"div\",u);u={};u.class=\"wrs_modal_controls\";u.id=this.getElementId(u.class);this.controls=jI.createElement(\"div\",u);u={};u.class=\"wrs_modal_buttons_container\";u.id=this.getElementId(u.class);this.buttonContainer=jI.createElement(\"div\",u);this.submitButton=this.createSubmitButton({id:this.getElementId(\"wrs_modal_button_accept\"),class:\"wrs_modal_button_accept\",innerHTML:RI.get(\"accept\")},this.submitAction.bind(this));this.cancelButton=this.createSubmitButton({id:this.getElementId(\"wrs_modal_button_cancel\"),class:\"wrs_modal_button_cancel\",innerHTML:RI.get(\"cancel\")},this.cancelAction.bind(this));this.contentManager=null;const m={cancelString:RI.get(\"cancel\"),submitString:RI.get(\"close\"),message:RI.get(\"close_modal_warning\")};const g={closeCallback:()=>{this.close()},cancelCallback:()=>{this.focus()}};const p={overlayElement:this.container,callbacks:g,strings:m};this.popup=new GI(p);this.rtl=false;if(\"rtl\"in this.attributes){this.rtl=this.attributes.rtl}this.handleOpenedIosSoftkeyboard=this.handleOpenedIosSoftkeyboard.bind(this);this.handleClosedIosSoftkeyboard=this.handleClosedIosSoftkeyboard.bind(this)}setContentManager(t){this.contentManager=t}getContentManager(){return this.contentManager}submitAction(){if(typeof this.contentManager.submitAction!==\"undefined\"){this.contentManager.submitAction()}this.close()}cancelAction(){if(typeof this.contentManager.hasChanges===\"undefined\"){this.close()}else if(!this.contentManager.hasChanges()){this.close()}else{this.showPopUpMessage()}}createSubmitButton(t,e){class i{constructor(){this.element=document.createElement(\"button\");this.element.id=t.id;this.element.className=t.class;this.element.innerHTML=t.innerHTML;jI.addEvent(this.element,\"click\",e)}getElement(){return this.element}}return new i(t,e).getElement()}create(){this.titleBar.appendChild(this.closeDiv);this.titleBar.appendChild(this.stackDiv);this.titleBar.appendChild(this.maximizeDiv);this.titleBar.appendChild(this.minimizeDiv);this.titleBar.appendChild(this.title);if(this.deviceProperties.isDesktop){this.container.appendChild(this.titleBar)}this.wrapper.appendChild(this.contentContainer);this.wrapper.appendChild(this.controls);this.controls.appendChild(this.buttonContainer);this.buttonContainer.appendChild(this.submitButton);this.buttonContainer.appendChild(this.cancelButton);this.container.appendChild(this.wrapper);this.recalculateScrollBar();document.body.appendChild(this.container);document.body.appendChild(this.overlay);if(this.deviceProperties.isDesktop){this.createModalWindowDesktop();this.createResizeButtons();this.addListeners();if(SI.get(\"modalWindowFullScreen\")){this.maximize()}}else if(this.deviceProperties.isAndroid){this.createModalWindowAndroid()}else if(this.deviceProperties.isIOS&&!this.deviceProperties.isMobile){this.createModalWindowIos()}if(this.contentManager!=null){this.contentManager.insert(this)}this.properties.open=true;this.properties.created=true;if(this.isRTL()){this.container.style.right=`${window.innerWidth-this.scrollbarWidth-this.container.offsetWidth}px`;this.container.className+=\" wrs_modal_rtl\"}}createResizeButtons(){this.resizerBR=document.createElement(\"div\");this.resizerBR.className=\"wrs_bottom_right_resizer\";this.resizerBR.innerHTML=\"◢\";this.resizerTL=document.createElement(\"div\");this.resizerTL.className=\"wrs_bottom_left_resizer\";this.container.appendChild(this.resizerBR);this.titleBar.appendChild(this.resizerTL);jI.addEvent(this.resizerBR,\"mousedown\",this.activateResizeStateBR.bind(this));jI.addEvent(this.resizerTL,\"mousedown\",this.activateResizeStateTL.bind(this))}activateResizeStateBR(t){this.initializeResizeProperties(t,false)}activateResizeStateTL(t){this.initializeResizeProperties(t,true)}initializeResizeProperties(t,e){jI.addClass(document.body,\"wrs_noselect\");jI.addClass(this.overlay,\"wrs_overlay_active\");this.resizeDataObject={x:this.eventClient(t).X,y:this.eventClient(t).Y};this.initialWidth=parseInt(this.container.style.width,10);this.initialHeight=parseInt(this.container.style.height,10);if(!e){this.initialRight=parseInt(this.container.style.right,10);this.initialBottom=parseInt(this.container.style.bottom,10)}else{this.leftScale=true}if(!this.initialRight){this.initialRight=0}if(!this.initialBottom){this.initialBottom=0}document.body.style[\"user-select\"]=\"none\"}open(){this.removeClass(\"wrs_closed\");const{isIOS:t}=this.deviceProperties;const{isAndroid:e}=this.deviceProperties;const{isMobile:i}=this.deviceProperties;if(t||e||i){this.restoreWebsiteScale();this.lockWebsiteScroll();setTimeout(()=>{this.hideKeyboard()},400)}if(!this.properties.created){this.create()}else{if(!this.properties.open){this.properties.open=true;if(!this.deviceProperties.isAndroid&&!this.deviceProperties.isIOS){this.restoreState()}}if(this.deviceProperties.isDesktop&&SI.get(\"modalWindowFullScreen\")){this.maximize()}if(this.deviceProperties.isIOS){this.iosSoftkeyboardOpened=false;this.setContainerHeight(`${100+this.iosMeasureUnit}`)}}if(this.contentManager.isEditorLoaded===false){const t=NI.newListener(\"onLoad\",()=>{this.contentManager.onOpen(this)});this.contentManager.addListener(t)}else{this.contentManager.onOpen(this)}}close(){this.removeClass(\"wrs_maximized\");this.removeClass(\"wrs_minimized\");this.removeClass(\"wrs_stack\");this.addClass(\"wrs_closed\");this.saveModalProperties();this.unlockWebsiteScroll();this.properties.open=false}restoreWebsiteScale(){let t=document.querySelector(\"meta[name=viewport]\");const e=[\"initial-scale=\",\"minimum-scale=\",\"maximum-scale=\"];const i=[\"1.0\",\"1.0\",\"1.0\"];const n=(t,e)=>{const n=t.getAttribute(\"content\");if(n){const o=n.split(\",\");let r=\"\";const s=[];for(let t=0;t<o.length;t+=1){let i=false;let n=0;while(!i&&n<e.length){if(o[t].indexOf(e[n])){i=true}n+=1}if(!i){s.push(o[t])}}for(let t=0;t<e.length;t+=1){const n=e[t]+i[t];r+=t===0?n:`,${n}`}for(let t=0;t<s.length;t+=1){r+=`,${s[t]}`}t.setAttribute(\"content\",r);t.setAttribute(\"content\",\"\");t.setAttribute(\"content\",n)}else{t.setAttribute(\"content\",\"initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0\");t.removeAttribute(\"content\")}};if(!t){t=document.createElement(\"meta\");document.getElementsByTagName(\"head\")[0].appendChild(t);n(t,e,i);t.remove()}else{n(t,e,i)}}lockWebsiteScroll(){this.websiteBeforeLockParameters={bodyStylePosition:document.body.style.position?document.body.style.position:\"\",bodyStyleOverflow:document.body.style.overflow?document.body.style.overflow:\"\",htmlStyleOverflow:document.documentElement.style.overflow?document.documentElement.style.overflow:\"\",windowScrollX:window.scrollX,windowScrollY:window.scrollY}}unlockWebsiteScroll(){if(this.websiteBeforeLockParameters){document.body.style.position=this.websiteBeforeLockParameters.bodyStylePosition;document.body.style.overflow=this.websiteBeforeLockParameters.bodyStyleOverflow;document.documentElement.style.overflow=this.websiteBeforeLockParameters.htmlStyleOverflow;const{windowScrollX:t}=this.websiteBeforeLockParameters;const{windowScrollY:e}=this.websiteBeforeLockParameters;window.scrollTo(t,e);this.websiteBeforeLockParameters=null}}isIE11(){if(navigator.userAgent.search(\"Msie/\")>=0||navigator.userAgent.search(\"Trident/\")>=0||navigator.userAgent.search(\"Edge/\")>=0){return true}return false}isRTL(){if(this.attributes.language===\"ar\"||this.attributes.language===\"he\"){return true}return this.rtl}addClass(t){jI.addClass(this.overlay,t);jI.addClass(this.titleBar,t);jI.addClass(this.overlay,t);jI.addClass(this.container,t);jI.addClass(this.contentContainer,t);jI.addClass(this.stackDiv,t);jI.addClass(this.minimizeDiv,t);jI.addClass(this.maximizeDiv,t);jI.addClass(this.wrapper,t)}removeClass(t){jI.removeClass(this.overlay,t);jI.removeClass(this.titleBar,t);jI.removeClass(this.overlay,t);jI.removeClass(this.container,t);jI.removeClass(this.contentContainer,t);jI.removeClass(this.stackDiv,t);jI.removeClass(this.minimizeDiv,t);jI.removeClass(this.maximizeDiv,t);jI.removeClass(this.wrapper,t)}createModalWindowDesktop(){this.addClass(\"wrs_modal_desktop\");this.stack()}createModalWindowAndroid(){this.addClass(\"wrs_modal_android\");window.addEventListener(\"resize\",this.orientationChangeAndroidSoftkeyboard.bind(this))}createModalWindowIos(){this.addClass(\"wrs_modal_ios\");window.addEventListener(\"resize\",this.orientationChangeIosSoftkeyboard.bind(this))}restoreState(){if(this.properties.state===\"maximized\"){this.maximize()}else if(this.properties.state===\"minimized\"){this.properties.state=this.properties.previousState;this.properties.previousState=\"\";this.minimize()}else{this.stack()}}stack(){this.properties.previousState=this.properties.state;this.properties.state=\"stack\";this.removeClass(\"wrs_maximized\");this.minimizeDiv.title=RI.get(\"minimize\");this.removeClass(\"wrs_minimized\");this.addClass(\"wrs_stack\");const t=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(ZI)})`;const e=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(tN)})`;this.minimizeDiv.setAttribute(\"style\",t);this.minimizeDiv.setAttribute(\"onmouseover\",`this.style = \"${e}\";`);this.minimizeDiv.setAttribute(\"onmouseout\",`this.style = \"${t}\";`);this.restoreModalProperties();if(typeof this.resizerBR!==\"undefined\"&&typeof this.resizerTL!==\"undefined\"){this.setResizeButtonsVisibility()}this.recalculateScrollBar();this.recalculatePosition();this.recalculateScale();this.focus()}minimize(){this.saveModalProperties();this.title.style.cursor=\"pointer\";if(this.properties.state===\"minimized\"&&this.properties.previousState===\"stack\"){this.stack()}else if(this.properties.state===\"minimized\"&&this.properties.previousState===\"maximized\"){this.maximize()}else{this.container.style.height=\"30px\";this.container.style.width=\"250px\";this.container.style.bottom=\"0px\";this.container.style.right=\"10px\";this.removeListeners();this.properties.previousState=this.properties.state;this.properties.state=\"minimized\";this.setResizeButtonsVisibility();this.minimizeDiv.title=RI.get(\"maximize\");if(jI.containsClass(this.overlay,\"wrs_stack\")){this.removeClass(\"wrs_stack\")}else{this.removeClass(\"wrs_maximized\")}this.addClass(\"wrs_minimized\");const t=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(nN)})`;const e=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(oN)})`;this.minimizeDiv.setAttribute(\"style\",t);this.minimizeDiv.setAttribute(\"onmouseover\",`this.style = \"${e}\";`);this.minimizeDiv.setAttribute(\"onmouseout\",`this.style = \"${t}\";`)}}maximize(){this.saveModalProperties();if(this.properties.state!==\"maximized\"){this.properties.previousState=this.properties.state;this.properties.state=\"maximized\"}this.setResizeButtonsVisibility();if(jI.containsClass(this.overlay,\"wrs_minimized\")){this.minimizeDiv.title=RI.get(\"minimize\");this.removeClass(\"wrs_minimized\")}else if(jI.containsClass(this.overlay,\"wrs_stack\")){this.container.style.left=null;this.container.style.top=null;this.removeClass(\"wrs_stack\")}this.addClass(\"wrs_maximized\");const t=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(ZI)})`;const e=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(tN)})`;this.minimizeDiv.setAttribute(\"style\",t);this.minimizeDiv.setAttribute(\"onmouseover\",`this.style = \"${e}\";`);this.minimizeDiv.setAttribute(\"onmouseout\",`this.style = \"${t}\";`);this.setSize(parseInt(window.innerHeight*.8,10),parseInt(window.innerWidth*.8,10));if(this.container.clientHeight>700){this.container.style.height=\"700px\"}if(this.container.clientWidth>1200){this.container.style.width=\"1200px\"}const{innerHeight:i}=window;const{innerWidth:n}=window;const{offsetHeight:o}=this.container;const{offsetWidth:r}=this.container;const s=i/2-o/2;const a=n/2-r/2;this.setPosition(s,a);this.recalculateScale();this.recalculatePosition();this.recalculateSize();this.focus()}reExpand(){if(this.properties.state===\"minimized\"){if(this.properties.previousState===\"maximized\"){this.maximize()}else{this.stack()}this.title.style.cursor=\"\"}}setSize(t,e){this.container.style.height=`${t}px`;this.container.style.width=`${e}px`;this.recalculateSize()}setPosition(t,e){this.container.style.bottom=`${t}px`;this.container.style.right=`${e}px`}saveModalProperties(){if(this.properties.state===\"stack\"){this.properties.position.bottom=parseInt(this.container.style.bottom,10);this.properties.position.right=parseInt(this.container.style.right,10);this.properties.size.width=parseInt(this.container.style.width,10);this.properties.size.height=parseInt(this.container.style.height,10)}}restoreModalProperties(){if(this.properties.state===\"stack\"){this.setPosition(this.properties.position.bottom,this.properties.position.right);this.setSize(this.properties.size.height,this.properties.size.width)}}recalculateSize(){this.wrapper.style.width=`${this.container.clientWidth-12}px`;this.wrapper.style.height=`${this.container.clientHeight-38}px`;this.contentContainer.style.height=`${parseInt(this.wrapper.offsetHeight-50,10)}px`}setResizeButtonsVisibility(){if(this.properties.state===\"stack\"){this.resizerTL.style.visibility=\"visible\";this.resizerBR.style.visibility=\"visible\"}else{this.resizerTL.style.visibility=\"hidden\";this.resizerBR.style.visibility=\"hidden\"}}addListeners(){this.maximizeDiv.addEventListener(\"click\",this.maximize.bind(this),true);this.stackDiv.addEventListener(\"click\",this.stack.bind(this),true);this.minimizeDiv.addEventListener(\"click\",this.minimize.bind(this),true);this.closeDiv.addEventListener(\"click\",this.cancelAction.bind(this));this.title.addEventListener(\"click\",this.reExpand.bind(this));this.overlay.addEventListener(\"click\",this.cancelAction.bind(this));jI.addEvent(window,\"mousedown\",this.startDrag.bind(this));jI.addEvent(window,\"mouseup\",this.stopDrag.bind(this));jI.addEvent(window,\"mousemove\",this.drag.bind(this));jI.addEvent(window,\"resize\",this.onWindowResize.bind(this));jI.addEvent(this.container,\"keydown\",this.onKeyDown.bind(this))}removeListeners(){jI.removeEvent(window,\"mousedown\",this.startDrag);jI.removeEvent(window,\"mouseup\",this.stopDrag);jI.removeEvent(window,\"mousemove\",this.drag);jI.removeEvent(window,\"resize\",this.onWindowResize);jI.removeEvent(this.container,\"keydown\",this.onKeyDown)}eventClient(t){if(typeof t.clientX===\"undefined\"&&t.changedTouches){const e={X:t.changedTouches[0].clientX,Y:t.changedTouches[0].clientY};return e}const e={X:t.clientX,Y:t.clientY};return e}startDrag(t){if(this.properties.state===\"minimized\"){return}if(t.target===this.title){if(typeof this.dragDataObject===\"undefined\"||this.dragDataObject===null){this.dragDataObject={x:this.eventClient(t).X,y:this.eventClient(t).Y};this.lastDrag={x:\"0px\",y:\"0px\"};if(this.container.style.right===\"\"){this.container.style.right=\"0px\"}if(this.container.style.bottom===\"\"){this.container.style.bottom=\"0px\"}if(this.isIE11()){}jI.addClass(document.body,\"wrs_noselect\");jI.addClass(this.overlay,\"wrs_overlay_active\");this.limitWindow=this.getLimitWindow()}}}drag(t){if(this.dragDataObject){t.preventDefault();let e=Math.min(this.eventClient(t).Y,this.limitWindow.minPointer.y);e=Math.max(this.limitWindow.maxPointer.y,e);let i=Math.min(this.eventClient(t).X,this.limitWindow.minPointer.x);i=Math.max(this.limitWindow.maxPointer.x,i);const n=`${i-this.dragDataObject.x}px`;const o=`${e-this.dragDataObject.y}px`;this.lastDrag={x:n,y:o};this.container.style.transform=`translate3d(${n},${o},0)`}if(this.resizeDataObject){const{innerWidth:e}=window;const{innerHeight:i}=window;let n=Math.min(this.eventClient(t).X,e-this.scrollbarWidth-7);let o=Math.min(this.eventClient(t).Y,i-7);if(n<0){n=0}if(o<0){o=0}let r;if(this.leftScale){r=-1}else{r=1}this.container.style.width=`${this.initialWidth+r*(n-this.resizeDataObject.x)}px`;this.container.style.height=`${this.initialHeight+r*(o-this.resizeDataObject.y)}px`;if(!this.leftScale){if(this.resizeDataObject.x-n-this.initialWidth<-580){this.container.style.right=`${this.initialRight-(n-this.resizeDataObject.x)}px`}else{this.container.style.right=`${this.initialRight+this.initialWidth-580}px`;this.container.style.width=\"580px\"}if(this.resizeDataObject.y-o<this.initialHeight-338){this.container.style.bottom=`${this.initialBottom-(o-this.resizeDataObject.y)}px`}else{this.container.style.bottom=`${this.initialBottom+this.initialHeight-338}px`;this.container.style.height=\"338px\"}}this.recalculateScale();this.recalculatePosition()}}getLimitWindow(){const t=window.innerWidth;const e=window.innerHeight;const{offsetHeight:i}=this.container;const n=parseInt(this.container.style.bottom,10);const o=parseInt(this.container.style.right,10);const{pageXOffset:r}=window;const s=this.dragDataObject.y;const a=this.dragDataObject.x;const c=i+n-(e-(s-r));const l=t-this.scrollbarWidth-(a-r)-o;const d=e-this.container.offsetHeight+c;const u=this.title.offsetHeight-(this.title.offsetHeight-c);const h=t-l-this.scrollbarWidth;const f=this.container.offsetWidth-l;const m={x:h,y:d};const g={x:f,y:u};return{minPointer:m,maxPointer:g}}getScrollBarWidth(){const t=document.createElement(\"p\");t.style.width=\"100%\";t.style.height=\"200px\";const e=document.createElement(\"div\");e.style.position=\"absolute\";e.style.top=\"0px\";e.style.left=\"0px\";e.style.visibility=\"hidden\";e.style.width=\"200px\";e.style.height=\"150px\";e.style.overflow=\"hidden\";e.appendChild(t);document.body.appendChild(e);const i=t.offsetWidth;e.style.overflow=\"scroll\";let n=t.offsetWidth;if(i===n){n=e.clientWidth}document.body.removeChild(e);return i-n}stopDrag(){if(this.dragDataObject||this.resizeDataObject){this.container.style.transform=\"\";if(this.dragDataObject){this.container.style.right=`${parseInt(this.container.style.right,10)-parseInt(this.lastDrag.x,10)}px`;this.container.style.bottom=`${parseInt(this.container.style.bottom,10)-parseInt(this.lastDrag.y,10)}px`}this.focus();document.body.style[\"user-select\"]=\"\";if(this.isIE11()){}jI.removeClass(document.body,\"wrs_noselect\");jI.removeClass(this.overlay,\"wrs_overlay_active\")}this.dragDataObject=null;this.resizeDataObject=null;this.initialWidth=null;this.leftScale=null}onWindowResize(){this.recalculateScrollBar();this.recalculatePosition();this.recalculateScale()}onKeyDown(t){if(t.key!==undefined){if(this.popup.overlayWrapper.style.display!==\"block\"){if(t.key===\"Escape\"||t.key===\"Esc\"){if(this.properties.open){this.contentManager.onKeyDown(t)}}else if(t.shiftKey&&t.key===\"Tab\"){if(document.activeElement===this.cancelButton){this.submitButton.focus();t.stopPropagation();t.preventDefault()}else{this.contentManager.onKeyDown(t)}}else if(t.key===\"Tab\"){if(document.activeElement===this.submitButton){this.cancelButton.focus();t.stopPropagation();t.preventDefault()}else{this.contentManager.onKeyDown(t)}}}else{this.popup.onKeyDown(t)}}}recalculatePosition(){this.container.style.right=`${Math.min(parseInt(this.container.style.right,10),window.innerWidth-this.scrollbarWidth-this.container.offsetWidth)}px`;if(parseInt(this.container.style.right,10)<0){this.container.style.right=\"0px\"}this.container.style.bottom=`${Math.min(parseInt(this.container.style.bottom,10),window.innerHeight-this.container.offsetHeight)}px`;if(parseInt(this.container.style.bottom,10)<0){this.container.style.bottom=\"0px\"}}recalculateScale(){let t=false;if(parseInt(this.container.style.width,10)>580){this.container.style.width=`${Math.min(parseInt(this.container.style.width,10),window.innerWidth-this.scrollbarWidth)}px`;t=true}else{this.container.style.width=\"580px\";t=true}if(parseInt(this.container.style.height,10)>338){this.container.style.height=`${Math.min(parseInt(this.container.style.height,10),window.innerHeight)}px`;t=true}else{this.container.style.height=\"338px\";t=true}if(t){this.recalculateSize()}}recalculateScrollBar(){this.hasScrollBar=window.innerWidth>document.documentElement.clientWidth;if(this.hasScrollBar){this.scrollbarWidth=this.getScrollBarWidth()}else{this.scrollbarWidth=0}}hideKeyboard(){const t=document.createElement(\"input\");this.container.appendChild(t);t.focus();t.blur();t.remove()}focus(){if(this.contentManager!=null&&typeof this.contentManager.onFocus!==\"undefined\"){this.contentManager.onFocus()}}portraitMode(){return window.innerHeight>window.innerWidth}handleOpenedIosSoftkeyboard(){if(!this.iosSoftkeyboardOpened&&this.iosDivHeight!=null&&this.iosDivHeight===`100${this.iosMeasureUnit}`){if(this.portraitMode()){this.setContainerHeight(`63${this.iosMeasureUnit}`)}else{this.setContainerHeight(`40${this.iosMeasureUnit}`)}}this.iosSoftkeyboardOpened=true}handleClosedIosSoftkeyboard(){this.iosSoftkeyboardOpened=false;this.setContainerHeight(`100${this.iosMeasureUnit}`)}orientationChangeIosSoftkeyboard(){if(this.iosSoftkeyboardOpened){if(this.portraitMode()){this.setContainerHeight(`63${this.iosMeasureUnit}`)}else{this.setContainerHeight(`40${this.iosMeasureUnit}`)}}else{this.setContainerHeight(`100${this.iosMeasureUnit}`)}}orientationChangeAndroidSoftkeyboard(){this.setContainerHeight(\"100%\")}setContainerHeight(t){this.iosDivHeight=t;this.wrapper.style.height=t}showPopUpMessage(){if(this.properties.state===\"minimized\"){this.stack()}this.popup.show()}setTitle(t){this.title.innerHTML=t}getElementId(t){return`${t}[${this.instanceId}]`}}var sN;var aN=sN;\n/*! http://mths.be/codepointat v0.1.0 by @mathias */if(!String.prototype.codePointAt){(function(){\"use strict\";var t=function(t){if(this==null){throw TypeError()}var e=String(this);var i=e.length;var n=t?Number(t):0;if(n!=n){n=0}if(n<0||n>=i){return undefined}var o=e.charCodeAt(n);var r;if(o>=55296&&o<=56319&&i>n+1){r=e.charCodeAt(n+1);if(r>=56320&&r<=57343){return(o-55296)*1024+r-56320+65536}}return o};if(Object.defineProperty){Object.defineProperty(String.prototype,\"codePointAt\",{value:t,configurable:true,writable:true})}else{String.prototype.codePointAt=t}})()}if(typeof Object.assign!=\"function\"){Object.defineProperty(Object,\"assign\",{value:function t(e,i){\"use strict\";if(e==null){throw new TypeError(\"Cannot convert undefined or null to object\")}var n=Object(e);for(var o=1;o<arguments.length;o++){var r=arguments[o];if(r!=null){for(var s in r){if(Object.prototype.hasOwnProperty.call(r,s)){n[s]=r[s]}}}}return n},writable:true,configurable:true})}var cN=i(116);class lN{constructor(t){this.language=\"en\";this.editMode=\"images\";this.modalDialog=null;this.customEditors=new UI;const e={name:\"Chemistry\",toolbar:\"chemistry\",icon:\"chem.png\",confVariable:\"chemEnabled\",title:\"ChemType\",tooltip:\"Insert a chemistry formula - ChemType\"};this.customEditors.addEditor(\"chemistry\",e);this.environment={};this.editionProperties={};this.editionProperties.isNewElement=true;this.editionProperties.temporalImage=null;this.editionProperties.latexRange=null;this.editionProperties.range=null;this.integrationModel=null;this.contentManager=null;this.browser=(()=>{const t=navigator.userAgent;let e=\"none\";if(t.search(\"Edge/\")>=0){e=\"EDGE\"}else if(t.search(\"Chrome/\")>=0){e=\"CHROME\"}else if(t.search(\"Trident/\")>=0){e=\"IE\"}else if(t.search(\"Firefox/\")>=0){e=\"FIREFOX\"}else if(t.search(\"Safari/\")>=0){e=\"SAFARI\"}return e})();this.listeners=new NI;this.serviceProviderProperties={};if(\"serviceProviderProperties\"in t){this.serviceProviderProperties=t.serviceProviderProperties}else{throw new Error(\"serviceProviderProperties property missing.\")}}static get globalListeners(){return lN._globalListeners}static set globalListeners(t){lN._globalListeners=t}static get initialized(){return lN._initialized}static set initialized(t){lN._initialized=t}setIntegrationModel(t){this.integrationModel=t}setEnvironment(t){if(\"editor\"in t){this.environment.editor=t.editor}if(\"mode\"in t){this.environment.mode=t.mode}if(\"version\"in t){this.environment.version=t.version}}getModalDialog(){return this.modalDialog}init(){if(!lN.initialized){const t=NI.newListener(\"onInit\",()=>{const t=OI.getService(\"configurationjs\",\"\",\"get\");const e=JSON.parse(t);SI.addConfiguration(e);SI.addConfiguration($I);RI.language=this.language;this.listeners.fire(\"onLoad\",{})});OI.addListener(t);OI.init(this.serviceProviderProperties);lN.initialized=true}else{this.listeners.fire(\"onLoad\",{})}}addListener(t){this.listeners.add(t)}static addGlobalListener(t){lN.globalListeners.add(t)}beforeUpdateFormula(t,e){const i=new YI;i.mathml=t;i.wirisProperties={};if(e!=null){Object.keys(e).forEach(t=>{i.wirisProperties[t]=e[t]})}i.language=this.language;i.editMode=this.editMode;if(this.listeners.fire(\"onBeforeFormulaInsertion\",i)){return{}}if(lN.globalListeners.fire(\"onBeforeFormulaInsertion\",i)){return{}}return{mathml:i.mathml,wirisProperties:i.wirisProperties}}insertFormula(t,e,i,n){const o={};if(!i){this.insertElementOnSelection(null,t,e)}else if(this.editMode===\"latex\"){o.latex=LI.getLatexFromMathML(i);if(!!this.integrationModel.fillNonLatexNode&&!o.latex){const n=new YI;n.editMode=this.editMode;n.windowTarget=e;n.focusElement=t;n.latex=o.latex;this.integrationModel.fillNonLatexNode(n,e,i)}else{o.node=e.document.createTextNode(`$$${o.latex}$$`)}this.insertElementOnSelection(o.node,t,e)}else{o.node=FI.mathmlToImgObject(e.document,i,n,this.language);this.insertElementOnSelection(o.node,t,e)}return o}afterUpdateFormula(t,e,i,n){const o=new YI;o.editMode=this.editMode;o.windowTarget=e;o.focusElement=t;o.node=i;o.latex=n;if(this.listeners.fire(\"onAfterFormulaInsertion\",o)){return{}}if(lN.globalListeners.fire(\"onAfterFormulaInsertion\",o)){return{}}return{}}placeCaretAfterNode(t){this.integrationModel.getSelection();const e=t.ownerDocument;if(typeof e.getSelection!==\"undefined\"&&!!t.parentElement){const i=e.createRange();i.setStartAfter(t);i.collapse(true);const n=e.getSelection();n.removeAllRanges();n.addRange(i);e.body.focus()}}insertElementOnSelection(t,e,i){if(this.editionProperties.isNewElement){if(t){if(e.type===\"textarea\"){jI.updateTextArea(e,t.textContent)}else if(document.selection&&document.getSelection===0){let e=i.document.selection.createRange();i.document.execCommand(\"InsertImage\",false,t.src);if(!(\"parentElement\"in e)){i.document.execCommand(\"delete\",false);e=i.document.selection.createRange();i.document.execCommand(\"InsertImage\",false,t.src)}if(\"parentElement\"in e){const i=e.parentElement();if(i.nodeName.toUpperCase()===\"IMG\"){i.parentNode.replaceChild(t,i)}else{e.pasteHTML(jI.createObjectCode(t))}}}else{const e=this.integrationModel.getSelection();let i=null;if(this.editionProperties.range){({range:i}=this.editionProperties);this.editionProperties.range=null}else{i=e.getRangeAt(0)}i.deleteContents();let n=i.startContainer;const o=i.startOffset;if(n.nodeType===3){n=n.splitText(o);n.parentNode.insertBefore(t,n)}else if(n.nodeType===1){n.insertBefore(t,n.childNodes[o])}this.placeCaretAfterNode(t)}}else if(e.type===\"textarea\"){e.focus()}else{const t=this.integrationModel.getSelection();t.removeAllRanges();if(this.editionProperties.range){const{range:e}=this.editionProperties;this.editionProperties.range=null;t.addRange(e)}}}else if(this.editionProperties.latexRange){if(document.selection&&document.getSelection===0){this.editionProperties.isNewElement=true;this.editionProperties.latexRange.select();this.insertElementOnSelection(t,e,i)}else{this.editionProperties.latexRange.deleteContents();this.editionProperties.latexRange.insertNode(t);this.placeCaretAfterNode(t)}}else if(e.type===\"textarea\"){let i;if(typeof this.integrationModel.getSelectedItem!==\"undefined\"){i=this.integrationModel.getSelectedItem(e,false)}else{i=jI.getSelectedItemOnTextarea(e)}jI.updateExistingTextOnTextarea(e,t.textContent,i.startPosition,i.endPosition)}else{if(t&&t.nodeName.toLowerCase()===\"img\"){DI.removeImgDataAttributes(this.editionProperties.temporalImage);DI.clone(t,this.editionProperties.temporalImage)}else{this.editionProperties.temporalImage.remove()}this.placeCaretAfterNode(this.editionProperties.temporalImage)}}openModalDialog(t,e){this.editMode=\"images\";try{if(e){t.contentWindow.focus();const e=t.contentWindow.getSelection();this.editionProperties.range=e.getRangeAt(0)}else{t.focus();const e=getSelection();this.editionProperties.range=e.getRangeAt(0)}}catch(t){this.editionProperties.range=null}if(e===undefined){e=true}this.editionProperties.latexRange=null;if(t){let i;if(typeof this.integrationModel.getSelectedItem!==\"undefined\"){i=this.integrationModel.getSelectedItem(t,e)}else{i=jI.getSelectedItem(t,e)}if(i){if(!i.caretPosition&&jI.containsClass(i.node,SI.get(\"imageClassName\"))){this.editionProperties.temporalImage=i.node;this.editionProperties.isNewElement=false}else if(i.node.nodeType===3){if(this.integrationModel.getMathmlFromTextNode){const t=this.integrationModel.getMathmlFromTextNode(i.node,i.caretPosition);if(t){this.editMode=\"latex\";this.editionProperties.isNewElement=false;this.editionProperties.temporalImage=document.createElement(\"img\");this.editionProperties.temporalImage.setAttribute(SI.get(\"imageMathmlAttribute\"),PI.safeXmlEncode(t))}}else{const n=LI.getLatexFromTextNode(i.node,i.caretPosition);if(n){const i=LI.getMathMLFromLatex(n.latex);this.editMode=\"latex\";this.editionProperties.isNewElement=false;this.editionProperties.temporalImage=document.createElement(\"img\");this.editionProperties.temporalImage.setAttribute(SI.get(\"imageMathmlAttribute\"),PI.safeXmlEncode(i));const o=e?t.contentWindow:window;if(t.tagName.toLowerCase()!==\"textarea\"){if(document.selection){let t=0;let e=n.startNode.previousSibling;while(e){t+=jI.getNodeLength(e);e=e.previousSibling}this.editionProperties.latexRange=o.document.selection.createRange();this.editionProperties.latexRange.moveToElementText(n.startNode.parentNode);this.editionProperties.latexRange.move(\"character\",t+n.startPosition);this.editionProperties.latexRange.moveEnd(\"character\",n.latex.length+4)}else{this.editionProperties.latexRange=o.document.createRange();this.editionProperties.latexRange.setStart(n.startNode,n.startPosition);this.editionProperties.latexRange.setEnd(n.endNode,n.endPosition)}}}}}}else if(t.tagName.toLowerCase()===\"textarea\"){this.editMode=\"latex\"}}const i=SI.get(\"editorAttributes\").split(\", \");const n={};for(let t=0,e=i.length;t<e;t+=1){const e=i[t].split(\"=\");const o=e[0];const r=e[1];n[o]=r}const o={};const r=SI.get(\"editorParameters\");const s=this.integrationModel.editorParameters;Object.assign(o,n,r);Object.assign(o,n,s);o.language=this.language;o.rtl=this.integrationModel.rtl;const a={};a.editorAttributes=o;a.language=this.language;a.customEditors=this.customEditors;a.environment=this.environment;if(this.modalDialog==null){this.modalDialog=new rN(o);this.contentManager=new WI(a);const t=NI.newListener(\"onLoad\",()=>{this.contentManager.isNewElement=this.editionProperties.isNewElement;if(this.editionProperties.temporalImage!=null){const t=PI.safeXmlDecode(this.editionProperties.temporalImage.getAttribute(SI.get(\"imageMathmlAttribute\")));this.contentManager.mathML=t}});this.contentManager.addListener(t);this.contentManager.init();this.modalDialog.setContentManager(this.contentManager);this.contentManager.setModalDialogInstance(this.modalDialog)}else{this.contentManager.isNewElement=this.editionProperties.isNewElement;if(this.editionProperties.temporalImage!=null){const t=PI.safeXmlDecode(this.editionProperties.temporalImage.getAttribute(SI.get(\"imageMathmlAttribute\")));this.contentManager.mathML=t}}this.contentManager.setIntegrationModel(this.integrationModel);this.modalDialog.open()}getCustomEditors(){return this.customEditors}}lN._globalListeners=new NI;lN._initialized=false;class dN{constructor(t){this.language=\"en\";this.serviceProviderProperties={};if(\"serviceProviderProperties\"in t){this.serviceProviderProperties=t.serviceProviderProperties}this.configurationService=\"\";if(\"configurationService\"in t){this.serviceProviderProperties.URI=t.configurationService;console.warn(\"Deprecated property configurationService. Use serviceParameters on instead.\",[t.configurationService])}this.version=\"version\"in t?t.version:\"\";this.target=null;if(\"target\"in t){this.target=t.target}else{throw new Error(\"IntegrationModel constructor error: target property missed.\")}if(\"scriptName\"in t){this.scriptName=t.scriptName}this.callbackMethodArguments={};if(\"callbackMethodArguments\"in t){this.callbackMethodArguments=t.callbackMethodArguments}this.environment={};if(\"environment\"in t){this.environment=t.environment}this.isIframe=false;if(this.target!=null){this.isIframe=this.target.tagName.toUpperCase()===\"IFRAME\"}this.editorObject=null;if(\"editorObject\"in t){this.editorObject=t.editorObject}this.rtl=false;if(\"rtl\"in t){this.rtl=t.rtl}this.managesLanguage=false;if(\"managesLanguage\"in t){this.managesLanguage=t.managesLanguage}this.temporalImageResizing=false;this.core=null;this.listeners=new NI;if(\"integrationParameters\"in t){dN.integrationParameters.forEach(e=>{if(e in t.integrationParameters){const i=t.integrationParameters[e];if(Object.keys(i).length!==0){this[e]=i}}})}}init(){this.language=this.getLanguage();const t=NI.newListener(\"onLoad\",()=>{this.callbackFunction(this.callbackMethodArguments)});if(this.serviceProviderProperties.URI.indexOf(\"configuration\")!==-1){const t=this.serviceProviderProperties.URI;const e=OI.getServerLanguageFromService(t);this.serviceProviderProperties.server=e;const i=this.serviceProviderProperties.URI.indexOf(\"configuration\");const n=this.serviceProviderProperties.URI.substring(0,i);this.serviceProviderProperties.URI=n}let e=this.serviceProviderProperties.URI;e=e.indexOf(\"/\")===0||e.indexOf(\"http\")===0?e:jI.concatenateUrl(this.getPath(),e);this.serviceProviderProperties.URI=e;const i={};i.serviceProviderProperties=this.serviceProviderProperties;this.setCore(new lN(i));this.core.addListener(t);this.core.language=this.language;this.core.init();this.core.setEnvironment(this.environment)}getPath(){if(typeof this.scriptName===\"undefined\"){throw new Error(\"scriptName property needed for getPath.\")}const t=document.getElementsByTagName(\"script\");let e=\"\";for(let i=0;i<t.length;i+=1){const n=t[i].src.lastIndexOf(this.scriptName);if(n>=0){e=t[i].src.substr(0,n-1)}}return e}setLanguage(t){this.language=t}setCore(t){this.core=t;t.setIntegrationModel(this)}getCore(){return this.core}setTarget(t){this.target=t;this.isIframe=this.target.tagName.toUpperCase()===\"IFRAME\"}setEditorObject(t){this.editorObject=t}openNewFormulaEditor(){this.core.editionProperties.isNewElement=true;this.core.openModalDialog(this.target,this.isIframe)}openExistingFormulaEditor(){this.core.editionProperties.isNewElement=false;this.core.openModalDialog(this.target,this.isIframe)}updateFormula(t){if(this.editorParameters){t=com.wiris.editor.util.EditorUtils.addAnnotation(t,\"application/vnd.wiris.mtweb-params+json\",JSON.stringify(this.editorParameters))}let e;let i;const n=null;if(this.isIframe){e=this.target.contentWindow;i=this.target.contentWindow}else{e=this.target;i=window}let o=this.core.beforeUpdateFormula(t,n);if(!o){return\"\"}o=this.insertFormula(e,i,o.mathml,o.wirisProperties);if(!o){return\"\"}return this.core.afterUpdateFormula(o.focusElement,o.windowTarget,o.node,o.latex)}insertFormula(t,e,i,n){return this.core.insertFormula(t,e,i,n)}getSelection(){if(this.isIframe){this.target.contentWindow.focus();return this.target.contentWindow.getSelection()}this.target.focus();return window.getSelection()}addEvents(){const t=this.isIframe?this.target.contentWindow.document:this.target;jI.addElementEvents(t,(t,e)=>{this.doubleClickHandler(t,e)},(t,e)=>{this.mousedownHandler(t,e)},(t,e)=>{this.mouseupHandler(t,e)})}doubleClickHandler(t){if(t.nodeName.toLowerCase()===\"img\"){this.core.getCustomEditors().disable();const e=SI.get(\"imageCustomEditorName\");if(t.hasAttribute(e)){const i=t.getAttribute(e);this.core.getCustomEditors().enable(i)}if(jI.containsClass(t,SI.get(\"imageClassName\"))){this.core.editionProperties.temporalImage=t;this.core.editionProperties.isNewElement=true;this.openExistingFormulaEditor()}}}mouseupHandler(){if(this.temporalImageResizing){setTimeout(()=>{DI.fixAfterResize(this.temporalImageResizing)},10)}}mousedownHandler(t){if(t.nodeName.toLowerCase()===\"img\"){if(jI.containsClass(t,SI.get(\"imageClassName\"))){this.temporalImageResizing=t}}}getLanguage(){return this.getBrowserLanguage()}getBrowserLanguage(){let t=\"en\";if(navigator.userLanguage){t=navigator.userLanguage.substring(0,2)}else if(navigator.language){t=navigator.language.substring(0,2)}else{t=\"en\"}return t}callbackFunction(){const t=NI.newListener(\"onTargetReady\",()=>{this.addEvents(this.target)});this.listeners.add(t)}notifyWindowClosed(){}getMathmlFromTextNode(t,e){}fillNonLatexNode(t,e,i){}getSelectedItem(t,e){}}dN.prototype.getMathmlFromTextNode=undefined;dN.prototype.fillNonLatexNode=undefined;dN.prototype.getSelectedItem=undefined;dN.integrationParameters=[\"serviceProviderProperties\",\"editorParameters\"];class uN extends dN{constructor(t){const e=t.editorObject;if(typeof e.config!=\"undefined\"&&typeof e.config.get(\"mathTypeParameters\")!=\"undefined\"){t.integrationParameters=e.config.get(\"mathTypeParameters\")}super(t);this.integrationFolderName=\"ckeditor_wiris\"}getLanguage(){return this.editorObject.config.get(\"language\")}addEditorListeners(){const t=this.editorObject;if(typeof t.config.wirislistenersdisabled==\"undefined\"||!t.config.wirislistenersdisabled){this.checkElement()}}checkElement(){const t=this.editorObject;const e=t.sourceElement;if(!e.wirisActive){this.setTarget(e);this.addEvents();e.wirisActive=true}}doubleClickHandler(t,e){if(t.nodeName.toLowerCase()==\"img\"){if(jI.containsClass(t,SI.get(\"imageClassName\"))){if(typeof e.stopPropagation!=\"undefined\"){e.stopPropagation()}else{e.returnValue=false}this.core.getCustomEditors().disable();const i=t.getAttribute(SI.get(\"imageCustomEditorName\"));if(i){this.core.getCustomEditors().enable(i)}this.core.editionProperties.temporalImage=t;this.openExistingFormulaEditor()}}}getCorePath(){return null}callbackFunction(){super.callbackFunction();this.addEditorListeners()}openNewFormulaEditor(){this.core.editionProperties.selection=this.editorObject.editing.view.document.selection;return super.openNewFormulaEditor()}insertMathml(t){return this.editorObject.model.change(e=>{const i=this.getCore();const n=e.createElement(\"mathml\",{formula:t});if(i.editionProperties.isNewElement){if(!t)return;let i=this.core.editionProperties.selection||this.editorObject.editing.view.document.selection;let o=this.editorObject.editing.mapper.toModelPosition(i.getLastPosition());e.insert(n,o);if(!i.isCollapsed){for(const t of i.getRanges()){e.remove(this.editorObject.editing.mapper.toModelRange(t))}}}else{const o=i.editionProperties.temporalImage;const r=this.editorObject.editing.view.domConverter.domToView(o).parent;const s=this.editorObject.editing.mapper.toModelElement(r);const a=this.editorObject.model.createPositionBefore(s);if(t){e.insert(n,a)}e.remove(s)}return n})}findText(t){let e=t;let i;while(!i){i=this.editorObject.editing.mapper.toModelElement(this.editorObject.editing.view.domConverter.domToView(e));e=e.parentElement}const n=this.editorObject.model.createRangeIn(i);const o=Array.from(n.getItems());for(const e of o){if(e.is(\"textProxy\")&&e.data==t.data.replace(String.fromCharCode(160),\" \")){return e.textNode}}}insertFormula(t,e,i,n){let o={};if(!i){this.insertMathml(\"\")}else if(this.core.editMode==\"latex\"){o.latex=LI.getLatexFromMathML(i);o.node=e.document.createTextNode(\"$$\"+o.latex+\"$$\");this.editorObject.model.change(t=>{const e=this.core.editionProperties.latexRange;const i=this.findText(e.startContainer);const n=this.findText(e.endContainer);const r=t.createPositionAt(i.parent,i.startOffset+e.startOffset);const s=t.createPositionAt(n.parent,n.startOffset+e.endOffset);const a=t.createRange(r,s);t.remove(a);t.insertText(\"$$\"+o.latex+\"$$\",i.getAttributes(),r)})}else{o.node=this.editorObject.editing.view.domConverter.viewToDom(this.editorObject.editing.mapper.toViewElement(this.insertMathml(i)),e.document)}return o}notifyWindowClosed(){this.editorObject.editing.view.focus()}}class hN extends Rw{constructor(t){super(t)}execute(t={}){if(!t.hasOwnProperty(\"integration\")||!(t.integration instanceof uN)){throw'Must pass a valid CKEditor5Integration instance as attribute \"integration\" of options'}this.integration=t.integration;this.setEditor();this.openEditor()}setEditor(){this.integration.core.getCustomEditors().disable()}openEditor(){const t=this._getSelectedImage();if(typeof t!==\"undefined\"&&t!==null&&t.classList.contains(WirisPlugin.Configuration.get(\"imageClassName\"))){this.integration.core.editionProperties.temporalImage=t;this.integration.openExistingFormulaEditor()}else{this.integration.openNewFormulaEditor()}}_getSelectedImage(){const t=this.editor.editing.view.document.selection;if(t.isCollapsed||t.rangeCount!==1){return}const e=t.getFirstRange();let i;for(const t of e){if(t.item.name!==\"span\"){return}i=t.item.getChild(0);break}if(!i){return}return this.editor.editing.view.domConverter.mapViewToDom(i)}}class fN extends hN{setEditor(){this.integration.core.getCustomEditors().enable(\"chemistry\")}}var mN='<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n\\x3c!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\\x3e\\n<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\\n\\t viewBox=\"0 0 300 261.7\" style=\"enable-background:new 0 0 300 261.7;\" xml:space=\"preserve\">\\n<style type=\"text/css\">\\n\\t.st0{fill:#FFFFFF;}\\n\\t.st1{fill:#EF4A5F;}\\n\\t.st2{fill:#C8202F;}\\n</style>\\n<path class=\"st0\" d=\"M300,32.8c0-16.4-13.4-29.7-29.9-29.7c-2.9,0-7.2,0.8-7.2,0.8c-37.9,9.1-71.3,14-112,14c-0.3,0-0.6,0-1,0\\n\\tc-16.5,0-29.9,13.3-29.9,29.7c0,16.4,13.4,29.7,29.9,29.7l0,0c45.3,0,83.1-5.3,125.3-15.3h0C289.3,59.5,300,47.4,300,32.8\"/>\\n<path class=\"st0\" d=\"M90.2,257.7c-11.4,0-21.9-6.4-27-16.7l-60-119.9c-7.5-14.9-1.4-33.1,13.5-40.5c14.9-7.5,33.1-1.4,40.5,13.5\\n\\tl27.3,54.7L121.1,39c5.3-15.8,22.4-24.4,38.2-19.1c15.8,5.3,24.4,22.4,19.1,38.2l-59.6,179c-3.9,11.6-14.3,19.7-26.5,20.6\\n\\tC91.6,257.7,90.9,257.7,90.2,257.7\"/>\\n<g>\\n\\t<g>\\n\\t\\t<path class=\"st1\" d=\"M90.2,257.7c-11.4,0-21.9-6.4-27-16.7l-60-119.9c-7.5-14.9-1.4-33.1,13.5-40.5c14.9-7.5,33.1-1.4,40.5,13.5\\n\\t\\t\\tl27.3,54.7L121.1,39c5.3-15.8,22.4-24.4,38.2-19.1c15.8,5.3,24.4,22.4,19.1,38.2l-59.6,179c-3.9,11.6-14.3,19.7-26.5,20.6\\n\\t\\t\\tC91.6,257.7,90.9,257.7,90.2,257.7\"/>\\n\\t</g>\\n</g>\\n<g>\\n\\t<g>\\n\\t\\t<path class=\"st2\" d=\"M300,32.8c0-16.4-13.4-29.7-29.9-29.7c-2.9,0-7.2,0.8-7.2,0.8c-37.9,9.1-71.3,14-112,14c-0.3,0-0.6,0-1,0\\n\\t\\t\\tc-16.5,0-29.9,13.3-29.9,29.7c0,16.4,13.4,29.7,29.9,29.7l0,0c45.3,0,83.1-5.3,125.3-15.3h0C289.3,59.5,300,47.4,300,32.8\"/>\\n\\t</g>\\n</g>\\n</svg>\\n';var gN='<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n\\x3c!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\\x3e\\n<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\\n\\t viewBox=\"0 0 40.3 49.5\" style=\"enable-background:new 0 0 40.3 49.5;\" xml:space=\"preserve\">\\n<style type=\"text/css\">\\n\\t.st0{fill:#A4CF61;}\\n</style>\\n<path class=\"st0\" d=\"M39.2,12.1c0-1.9-1.1-3.6-2.7-4.4L24.5,0.9l0,0c-0.7-0.4-1.5-0.6-2.4-0.6c-0.9,0-1.7,0.2-2.4,0.6l0,0L2.3,10.8\\n\\tl0,0C0.9,11.7,0,13.2,0,14.9h0v19.6h0c0,1.7,0.9,3.3,2.3,4.1l0,0l17.4,9.9l0,0c0.7,0.4,1.5,0.6,2.4,0.6c0.9,0,1.7-0.2,2.4-0.6l0,0\\n\\tl12.2-6.9h0c1.5-0.8,2.6-2.5,2.6-4.3c0-2.7-2.2-4.9-4.9-4.9c-0.9,0-1.8,0.3-2.5,0.7l0,0l-9.7,5.6l-12.3-7V17.8l12.3-7l9.9,5.7l0,0\\n\\tc0.7,0.4,1.5,0.6,2.4,0.6C37,17,39.2,14.8,39.2,12.1\"/>\\n</svg>\\n';class pN extends Nw{static get requires(){return[Z_]}static get pluginName(){return\"MathType\"}init(){const t=this._addIntegration();this._addCommands();this._addViews(t);this._addSchema();this._addConverters();this._exposeWiris()}_addIntegration(){const t=this.editor;const e={};e.environment={};e.environment.editor=\"CKEditor5\";e.editorObject=t;e.serviceProviderProperties={};e.serviceProviderProperties.URI=\"https://www.wiris.net/demo/plugins/app\";e.serviceProviderProperties.server=\"java\";e.target=t.sourceElement;e.scriptName=\"bundle.js\";e.managesLanguage=true;let i;if(e.target){i=new uN(e);i.init();i.listeners.fire(\"onTargetReady\",{});i.checkElement();this.listenTo(t.editing.view.document,\"click\",(t,e)=>{if(e.domEvent.detail==2){i.doubleClickHandler(e.domTarget,e.domEvent);t.stop()}},{priority:\"highest\"})}return i}_addCommands(){const t=this.editor;t.commands.add(\"MathType\",new hN(t));t.commands.add(\"ChemType\",new fN(t))}_addViews(t){const e=this.editor;e.ui.componentFactory.add(\"MathType\",i=>{const n=new Kb(i);n.bind(\"isEnabled\").to(e.commands.get(\"MathType\"),\"isEnabled\");n.set({label:\"Insert a math equation - MathType\",icon:mN,tooltip:true});n.on(\"execute\",()=>{e.execute(\"MathType\",{integration:t})});return n});e.ui.componentFactory.add(\"ChemType\",i=>{const n=new Kb(i);n.bind(\"isEnabled\").to(e.commands.get(\"ChemType\"),\"isEnabled\");n.set({label:\"Insert a chemistry formula - ChemType\",icon:gN,tooltip:true});n.on(\"execute\",()=>{e.execute(\"ChemType\",{integration:t})});return n});e.editing.view.addObserver(Bx)}_addSchema(){const t=this.editor.model.schema;t.register(\"mathml\",{allowWhere:\"$text\",isObject:true,isInline:true,allowAttributes:[\"formula\"]})}_addConverters(){const t=this.editor;t.conversion.for(\"upcast\").elementToElement({view:{name:\"span\",classes:\"ck-math-widget\"},model:(t,e)=>{const i=PI.safeXmlDecode(t.getChild(0).getAttribute(\"data-mathml\"));return e.createElement(\"mathml\",{formula:i})}});t.data.upcastDispatcher.on(\"element:math\",(i,n,o)=>{const{consumable:r,writer:s}=o;const a=n.viewItem;if(!r.test(a,{name:true})){return}let c=e(a);const l=new EI(t.editing.view.document);const d=new ry(t.editing.view.document);const u=d.createDocumentFragment(a.getChildren());const h=[...a.getAttributes()].map(([t,e])=>` ${t}=\"${e}\"`).join(\"\");let f=l.toData(u)||\"\";f=`<math${h}>${f}</math>`;const m=c?s.createText(FI.initParse(f,t.config.get(\"language\"))):s.createElement(\"mathml\",{formula:f});const g=o.splitToAllowedParent(m,n.modelCursor);if(!g){return}o.writer.insert(m,g.position);r.consume(a,{name:true});const p=o.getSplitParts(m);n.modelRange=s.createRange(o.writer.createPositionBefore(m),o.writer.createPositionAfter(p[p.length-1]));if(g.cursorParent){n.modelCursor=o.writer.createPositionAt(g.cursorParent,0)}else{n.modelCursor=n.modelRange.end}});function e(t){const e=t.getChild(0);if(!e||e.name!==\"semantics\")return false;for(const t of e.getChildren()){if(t.name===\"annotation\"&&t.getAttribute(\"encoding\")===\"LaTeX\"){return true}}return false}t.conversion.for(\"editingDowncast\").elementToElement({model:\"mathml\",view:o});t.conversion.for(\"dataDowncast\").elementToElement({model:\"mathml\",view:n});function i(t,e){if(e.is(\"text\")){return t.createText(e.data)}else if(e.is(\"element\")){if(e.is(\"emptyElement\")){return t.createEmptyElement(e.name,e.getAttributes())}else{const n=t.createContainerElement(e.name,e.getAttributes());for(const o of e.getChildren()){t.insert(t.createPositionAt(n,\"end\"),i(t,o))}return n}}throw new Exception(\"Given node has unsupported type.\")}function n(t,e){const n=new kp(e.document);let o=FI.endParseSaveMode(t.getAttribute(\"formula\"));if(!SI.get(\"saveHandTraces\")){o=PI.removeAnnotation(o,\"application/json\")}const r=n.toView(o).getChild(0);return i(e,r)}function o(t,e){const i=e.createContainerElement(\"span\",{class:\"ck-math-widget\"});const n=r(t,e);e.insert(e.createPositionAt(i,0),n);return A_(i,e)}function r(e,i){const n=new kp(i.document);const o=e.getAttribute(\"formula\");const r=FI.initParse(o,t.config.get(\"language\"));const s=n.toView(r).getChild(0);return i.createEmptyElement(\"img\",s.getAttributes())}}_exposeWiris(){window.WirisPlugin={Core:lN,Parser:FI,Image:DI,MathML:PI,Util:jI,Configuration:SI,Listeners:NI,IntegrationModel:dN,Latex:LI}}}class bN extends Nw{static get requires(){return[fv]}static get pluginName(){return\"MediaEmbedToolbar\"}afterInit(){const t=this.editor;const e=t.t;const i=t.plugins.get(fv);i.register(\"mediaEmbed\",{ariaLabel:e(\"b\"),items:t.config.get(\"mediaEmbed.toolbar\")||[],getRelatedElement:RA})}}class wN extends Rw{refresh(){this.isEnabled=_N(this.editor.model)}execute(){const t=this.editor.model;t.change(e=>{const i=e.createElement(\"pageBreak\");t.insertContent(i);let n=i.nextSibling;const o=n&&t.schema.checkChild(n,\"$text\");if(!o&&t.schema.checkChild(i.parent,\"paragraph\")){n=e.createElement(\"paragraph\");t.insertContent(n,e.createPositionAfter(i))}if(n){e.setSelection(n,0)}})}}function _N(t){const e=t.schema;const i=t.document.selection;return kN(i,e,t)&&!vN(i,e)}function kN(t,e,i){const n=yN(t,i);return e.checkChild(n,\"pageBreak\")}function vN(t,e){const i=t.getSelectedElement();return i&&e.isObject(i)}function yN(t,e){const i=P_(t,e);const n=i.parent;if(n.isEmpty&&!n.is(\"$root\")){return n.parent}return n}var xN=i(118);class AN extends Nw{static get pluginName(){return\"PageBreakEditing\"}init(){const t=this.editor;const e=t.model.schema;const i=t.t;const n=t.conversion;e.register(\"pageBreak\",{isObject:true,allowWhere:\"$block\"});n.for(\"dataDowncast\").elementToElement({model:\"pageBreak\",view:(t,e)=>{const i=e.createContainerElement(\"div\",{class:\"page-break\",style:\"page-break-after: always\"});const n=e.createContainerElement(\"span\",{style:\"display: none\"});e.insert(e.createPositionAt(i,0),n);return i}});n.for(\"editingDowncast\").elementToElement({model:\"pageBreak\",view:(t,e)=>{const n=i(\"jy\");const o=e.createContainerElement(\"div\");const r=e.createContainerElement(\"span\");const s=e.createText(i(\"jy\"));e.addClass(\"page-break\",o);e.setCustomProperty(\"pageBreak\",true,o);e.addClass(\"page-break__label\",r);e.insert(e.createPositionAt(o,0),r);e.insert(e.createPositionAt(r,0),s);return CN(o,e,n)}});n.for(\"upcast\").elementToElement({view:t=>{if(!t.is(\"div\")||t.getStyle(\"page-break-after\")!=\"always\"||t.childCount!=1){return}const e=Dw(t.getChildren());if(!e.is(\"span\")||e.getStyle(\"display\")!=\"none\"||e.childCount!=1){return}const i=Dw(e.getChildren());if(!i.is(\"text\")||i.data!==\" \"){return}return{name:true}},model:\"pageBreak\"});t.commands.add(\"pageBreak\",new wN(t))}}function CN(t,e,i){e.setCustomProperty(\"pageBreak\",true,t);return A_(t,e,{label:i})}var TN='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.598.687h1.5v5h-1.5zm14.5 0h1.5v5h-1.5z\"/><path d=\"M19.598 4.187v1.5h-16v-1.5zm-16 14.569h1.5v-5h-1.5zm14.5 0h1.5v-5h-1.5z\"/><path d=\"M19.598 15.256v-1.5h-16v1.5zM5.081 9h6v2h-6zm8 0h6v2h-6zm-9.483 1L0 12.5v-5z\"/></svg>';class EN extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(\"pageBreak\",i=>{const n=t.commands.get(\"pageBreak\");const o=new Kb(i);o.set({label:e(\"jy\"),icon:TN,tooltip:true});o.bind(\"isEnabled\").to(n,\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(\"pageBreak\");t.editing.view.focus()});return o})}}class MN extends Nw{static get requires(){return[AN,EN]}static get pluginName(){return\"PageBreak\"}}var PN='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z\"/></svg>';const SN=\"removeFormat\";class IN extends Nw{static get pluginName(){return\"RemoveFormatUI\"}init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(SN,i=>{const n=t.commands.get(SN);const o=new Kb(i);o.set({label:e(\"jx\"),icon:PN,tooltip:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(SN);t.editing.view.focus()});return o})}}class NN extends Rw{refresh(){const t=this.editor.model;this.isEnabled=!!Dw(this._getFormattingItems(t.document.selection,t.schema))}execute(){const t=this.editor.model;const e=t.schema;t.change(i=>{for(const n of this._getFormattingItems(t.document.selection,e)){if(n.is(\"selection\")){for(const t of this._getFormattingAttributes(n,e)){i.removeSelectionAttribute(t)}}else{const t=i.createRangeOn(n);for(const o of this._getFormattingAttributes(n,e)){i.removeAttribute(o,t)}}}})}*_getFormattingItems(t,e){const i=t=>!!Dw(this._getFormattingAttributes(t,e));for(const e of t.getRanges()){for(const t of e.getItems()){if(i(t)){yield t}}}if(i(t)){yield t}}*_getFormattingAttributes(t,e){for(const[i]of t.getAttributes()){const t=e.getAttributeProperties(i);if(t&&t.isFormatting){yield i}}}}class ON extends Nw{static get pluginName(){return\"RemoveFormatEditing\"}init(){const t=this.editor;t.commands.add(\"removeFormat\",new NN(t))}}class LN extends Nw{static get requires(){return[ON,IN]}static get pluginName(){return\"RemoveFormat\"}}class zN{constructor(t,e=20){this.model=t;this.size=0;this.limit=e;this.isLocked=false;this._changeCallback=(t,e)=>{if(e.type!=\"transparent\"&&e!==this._batch){this._reset(true)}};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(){if(!this._batch){this._batch=this.model.createBatch()}return this._batch}input(t){this.size+=t;if(this.size>=this.limit){this._reset(true)}}lock(){this.isLocked=true}unlock(){this.isLocked=false}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(t){if(!this.isLocked||t){this._batch=null;this.size=0}}}class RN extends Rw{constructor(t,e){super(t);this._buffer=new zN(t.model,e);this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy();this._buffer.destroy()}execute(t={}){const e=this.editor.model;const i=e.document;const n=t.text||\"\";const o=n.length;const r=t.range?e.createSelection(t.range):i.selection;const s=t.resultRange;e.enqueueChange(this._buffer.batch,t=>{this._buffer.lock();e.deleteContent(r);if(n){e.insertContent(t.createText(n,i.selection.getAttributes()),r)}if(s){t.setSelection(s)}else if(!r.is(\"documentSelection\")){t.setSelection(r)}this._buffer.unlock();this._buffer.input(o);this._batches.add(this._buffer.batch)})}}function jN(t){let e=null;const i=t.model;const n=t.editing.view;const o=t.commands.get(\"input\");if(Cl.isAndroid){n.document.on(\"beforeinput\",(t,e)=>r(e),{priority:\"lowest\"})}else{n.document.on(\"keydown\",(t,e)=>r(e),{priority:\"lowest\"})}n.document.on(\"compositionstart\",s,{priority:\"lowest\"});n.document.on(\"compositionend\",()=>{e=i.createSelection(i.document.selection)},{priority:\"lowest\"});function r(t){const r=i.document;const s=n.document.isComposing;const c=e&&e.isEqual(r.selection);e=null;if(!o.isEnabled){return}if(BN(t)||r.selection.isCollapsed){return}if(s&&t.keyCode===229){return}if(!s&&t.keyCode===229&&c){return}a()}function s(){const t=i.document;const e=t.selection.rangeCount===1?t.selection.getFirstRange().isFlat:true;if(t.selection.isCollapsed||e){return}a()}function a(){const t=o.buffer;t.lock();i.enqueueChange(t.batch,()=>{i.deleteContent(i.document.selection)});t.unlock()}}const DN=[zl(\"arrowUp\"),zl(\"arrowRight\"),zl(\"arrowDown\"),zl(\"arrowLeft\"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let t=112;t<=135;t++){DN.push(t)}function BN(t){if(t.ctrlKey){return true}return DN.includes(t.keyCode)}function VN(t,e){const i=[];let n=0;let o;t.forEach(t=>{if(t==\"equal\"){r();n++}else if(t==\"insert\"){if(s(\"insert\")){o.values.push(e[n])}else{r();o={type:\"insert\",index:n,values:[e[n]]}}n++}else{if(s(\"delete\")){o.howMany++}else{r();o={type:\"delete\",index:n,howMany:1}}}});r();return i;function r(){if(o){i.push(o);o=null}}function s(t){return o&&o.type==t}}function FN(t){if(t.length==0){return false}for(const e of t){if(e.type===\"children\"&&!HN(e)){return true}}return false}function HN(t){if(t.newChildren.length-t.oldChildren.length!=1){return}const e=kd(t.oldChildren,t.newChildren,WN);const i=VN(e,t.newChildren);if(i.length>1){return}const n=i[0];if(!(!!n.values[0]&&n.values[0].is(\"text\"))){return}return n}function WN(t,e){if(!!t&&t.is(\"text\")&&!!e&&e.is(\"text\")){return t.data===e.data}else{return t===e}}function UN(t){t.editing.view.document.on(\"mutations\",(e,i,n)=>{new qN(t).handle(i,n)})}class qN{constructor(t){this.editor=t;this.editing=this.editor.editing}handle(t,e){if(FN(t)){this._handleContainerChildrenMutations(t,e)}else{for(const i of t){this._handleTextMutation(i,e);this._handleTextNodeInsertion(i)}}}_handleContainerChildrenMutations(t,e){const i=$N(t);if(!i){return}const n=this.editor.editing.view.domConverter;const o=n.mapViewToDom(i);const r=new jd(this.editor.editing.view.document);const s=this.editor.data.toModel(r.domToView(o)).getChild(0);const a=this.editor.editing.mapper.toModelElement(i);if(!a){return}const c=Array.from(s.getChildren());const l=Array.from(a.getChildren());const d=c[c.length-1];const u=l[l.length-1];if(d&&d.is(\"softBreak\")&&u&&!u.is(\"softBreak\")){c.pop()}const h=this.editor.model.schema;if(!YN(c,h)||!YN(l,h)){return}const f=c.map(t=>t.is(\"text\")?t.data:\"@\").join(\"\").replace(/\\u00A0/g,\" \");const m=l.map(t=>t.is(\"text\")?t.data:\"@\").join(\"\").replace(/\\u00A0/g,\" \");if(m===f){return}const g=kd(m,f);const{firstChangeAt:p,insertions:b,deletions:w}=GN(g);let _=null;if(e){_=this.editing.mapper.toModelRange(e.getFirstRange())}const k=f.substr(p,b);const v=this.editor.model.createRange(this.editor.model.createPositionAt(a,p),this.editor.model.createPositionAt(a,p+w));this.editor.execute(\"input\",{text:k,range:v,resultRange:_})}_handleTextMutation(t,e){if(t.type!=\"text\"){return}const i=t.newText.replace(/\\u00A0/g,\" \");const n=t.oldText.replace(/\\u00A0/g,\" \");if(n===i){return}const o=kd(n,i);const{firstChangeAt:r,insertions:s,deletions:a}=GN(o);let c=null;if(e){c=this.editing.mapper.toModelRange(e.getFirstRange())}const l=this.editing.view.createPositionAt(t.node,r);const d=this.editing.mapper.toModelPosition(l);const u=this.editor.model.createRange(d,d.getShiftedBy(a));const h=i.substr(r,s);this.editor.execute(\"input\",{text:h,range:u,resultRange:c})}_handleTextNodeInsertion(t){if(t.type!=\"children\"){return}const e=HN(t);const i=this.editing.view.createPositionAt(t.node,e.index);const n=this.editing.mapper.toModelPosition(i);const o=e.values[0].data;this.editor.execute(\"input\",{text:o.replace(/\\u00A0/g,\" \"),range:this.editor.model.createRange(n)})}}function $N(t){const e=t.map(t=>t.node).reduce((t,e)=>t.getCommonAncestor(e,{includeSelf:true}));if(!e){return}return e.getAncestors({includeSelf:true,parentFirst:true}).find(t=>t.is(\"containerElement\")||t.is(\"rootElement\"))}function YN(t,e){return t.every(t=>e.isInline(t))}function GN(t){let e=null;let i=null;for(let n=0;n<t.length;n++){const o=t[n];if(o!=\"equal\"){e=e===null?n:e;i=n}}let n=0;let o=0;for(let r=e;r<=i;r++){if(t[r]!=\"insert\"){n++}if(t[r]!=\"delete\"){o++}}return{insertions:o,deletions:n,firstChangeAt:e}}class JN extends Nw{static get pluginName(){return\"Input\"}init(){const t=this.editor;const e=new RN(t,t.config.get(\"typing.undoStep\")||20);t.commands.add(\"input\",e);jN(t);UN(t)}isInput(t){const e=this.editor.commands.get(\"input\");return e._batches.has(t)}}class XN extends Rw{constructor(t,e){super(t);this.direction=e;this._buffer=new zN(t.model,t.config.get(\"typing.undoStep\"))}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model;const i=e.document;e.enqueueChange(this._buffer.batch,n=>{this._buffer.lock();const o=n.createSelection(t.selection||i.selection);const r=o.isCollapsed;if(o.isCollapsed){e.modifySelection(o,{direction:this.direction,unit:t.unit})}if(this._shouldEntireContentBeReplacedWithParagraph(t.sequence||1)){this._replaceEntireContentWithParagraph(n);return}if(o.isCollapsed){return}let s=0;o.getFirstRange().getMinimalFlatRanges().forEach(t=>{s+=fl(t.getWalker({singleCharacters:true,ignoreElementEnd:true,shallow:true}))});e.deleteContent(o,{doNotResetEntireContent:r,direction:this.direction});this._buffer.input(s);n.setSelection(o);this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1){return false}const e=this.editor.model;const i=e.document;const n=i.selection;const o=e.schema.getLimitElement(n);const r=n.isCollapsed&&n.containsEntireContent(o);if(!r){return false}if(!e.schema.checkChild(o,\"paragraph\")){return false}const s=o.getChild(0);if(s&&s.name===\"paragraph\"){return false}return true}_replaceEntireContentWithParagraph(t){const e=this.editor.model;const i=e.document;const n=i.selection;const o=e.schema.getLimitElement(n);const r=t.createElement(\"paragraph\");t.remove(t.createRangeIn(o));t.insert(r,o);t.setSelection(r,0)}}class QN extends Yd{constructor(t){super(t);const e=t.document;let i=0;e.on(\"keyup\",(t,e)=>{if(e.keyCode==Ll.delete||e.keyCode==Ll.backspace){i=0}});e.on(\"keydown\",(t,e)=>{const o={};if(e.keyCode==Ll.delete){o.direction=\"forward\";o.unit=\"character\"}else if(e.keyCode==Ll.backspace){o.direction=\"backward\";o.unit=\"codePoint\"}else{return}const r=Cl.isMac?e.altKey:e.ctrlKey;o.unit=r?\"word\":o.unit;o.sequence=++i;n(t,e.domEvent,o)});if(Cl.isAndroid){e.on(\"beforeinput\",(e,i)=>{if(i.domEvent.inputType!=\"deleteContentBackward\"){return}const o={unit:\"codepoint\",direction:\"backward\",sequence:1};const r=i.domTarget.ownerDocument.defaultView.getSelection();if(r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset){o.selectionToRemove=t.domConverter.domSelectionToView(r)}n(e,i.domEvent,o)})}function n(t,i,n){let o;e.once(\"delete\",t=>o=t,{priority:Number.POSITIVE_INFINITY});e.fire(\"delete\",new Gu(e,i,n));if(o&&o.stop.called){t.stop()}}}observe(){}}class KN extends Nw{static get pluginName(){return\"Delete\"}init(){const t=this.editor;const e=t.editing.view;const i=e.document;e.addObserver(QN);t.commands.add(\"forwardDelete\",new XN(t,\"forward\"));t.commands.add(\"delete\",new XN(t,\"backward\"));this.listenTo(i,\"delete\",(i,n)=>{const o={unit:n.unit,sequence:n.sequence};if(n.selectionToRemove){const e=t.model.createSelection();const i=[];for(const e of n.selectionToRemove.getRanges()){i.push(t.editing.mapper.toModelRange(e))}e.setTo(i);o.selection=e}t.execute(n.direction==\"forward\"?\"forwardDelete\":\"delete\",o);n.preventDefault();e.scrollToTheSelection()});if(Cl.isAndroid){let t=null;this.listenTo(i,\"delete\",(e,i)=>{const n=i.domTarget.ownerDocument.defaultView.getSelection();t={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}},{priority:\"lowest\"});this.listenTo(i,\"keyup\",(e,i)=>{if(t){const e=i.domTarget.ownerDocument.defaultView.getSelection();e.collapse(t.anchorNode,t.anchorOffset);e.extend(t.focusNode,t.focusOffset);t=null}})}}}class ZN extends Nw{static get requires(){return[JN,KN]}static get pluginName(){return\"Typing\"}}class tO extends gb{constructor(t,e){super(t);const i=t.t;this.labelView=new Ab(t);this.labelView.text=i(\"d\");this.groupDropdownView=this._createGroupDropdown(e);this.groupDropdownView.panelPosition=t.uiLanguageDirection===\"rtl\"?\"se\":\"sw\";this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-special-characters-navigation\"]},children:[this.labelView,this.groupDropdownView]})}get currentGroupName(){return this.groupDropdownView.value}_createGroupDropdown(t){const e=this.locale;const i=e.t;const n=dw(e);const o=this._getCharacterGroupListItemDefinitions(n,t);n.set(\"value\",o.first.model.label);n.buttonView.bind(\"label\").to(n,\"value\");n.buttonView.set({isOn:false,withText:true,tooltip:i(\"kk\")});n.on(\"execute\",t=>{n.value=t.source.label});n.delegate(\"execute\").to(this);hw(n,o);return n}_getCharacterGroupListItemDefinitions(t,e){const i=new ys;for(const n of e){const e={type:\"button\",model:new d_({label:n,withText:true})};e.model.bind(\"isOn\").to(t,\"value\",t=>t===e.model.label);i.add(e)}return i}}var eO=i(120);class iO extends gb{constructor(t){super(t);this.tiles=this.createCollection();this.setTemplate({tag:\"div\",children:[{tag:\"div\",attributes:{class:[\"ck\",\"ck-character-grid__tiles\"]},children:this.tiles}],attributes:{class:[\"ck\",\"ck-character-grid\"]}})}createTile(t,e){const i=new Kb(this.locale);i.set({label:t,withText:true,class:\"ck-character-grid__tile\"});i.extendTemplate({attributes:{title:e},on:{mouseover:i.bindTemplate.to(\"mouseover\")}});i.on(\"mouseover\",()=>{this.fire(\"tileHover\",{name:e,character:t})});i.on(\"execute\",()=>{this.fire(\"execute\",{name:e,character:t})});return i}}var nO=i(122);class oO extends gb{constructor(t){super(t);const e=this.bindTemplate;this.set(\"character\",null);this.set(\"name\",null);this.bind(\"code\").to(this,\"character\",rO);this.setTemplate({tag:\"div\",children:[{tag:\"span\",attributes:{class:[\"ck-character-info__name\"]},children:[{text:e.to(\"name\",t=>t?t:\"\")}]},{tag:\"span\",attributes:{class:[\"ck-character-info__code\"]},children:[{text:e.to(\"code\")}]}],attributes:{class:[\"ck\",\"ck-character-info\"]}})}}function rO(t){if(t===null){return\"\"}const e=t.codePointAt(0).toString(16);return\"U+\"+(\"0000\"+e).slice(-4)}var sO='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.268 7.268 0 0 1 2.703 3.454 7.128 7.128 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.873.873 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.601 5.601 0 0 0 2.492-2.371 5.459 5.459 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.71 5.71 0 0 0 10 4.206 5.708 5.708 0 0 0 6.419 5.46 5.527 5.527 0 0 0 4.46 8.663a5.457 5.457 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.877.877 0 0 1-.614-.25.845.845 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.128 7.128 0 0 1 .199-4.352 7.268 7.268 0 0 1 2.703-3.455A7.475 7.475 0 0 1 10 2.5z\"/></svg>';var aO=i(124);const cO=\"All\";class lO extends Nw{static get requires(){return[ZN]}static get pluginName(){return\"SpecialCharacters\"}constructor(t){super(t);this._characters=new Map;this._groups=new Map}init(){const t=this.editor;const e=t.t;const i=t.commands.get(\"input\");t.ui.componentFactory.add(\"specialCharacters\",n=>{const o=dw(n);let r;o.buttonView.set({label:e(\"d\"),icon:sO,tooltip:true});o.bind(\"isEnabled\").to(i);o.on(\"execute\",(e,i)=>{t.execute(\"input\",{text:i.character});t.editing.view.focus()});o.on(\"change:isOpen\",()=>{if(!r){r=this._createDropdownPanelContent(n,o);o.panelView.children.add(r.navigationView);o.panelView.children.add(r.gridView);o.panelView.children.add(r.infoView)}r.infoView.set({character:null,name:null})});return o})}addItems(t,e){if(t===cO){throw new ss[\"b\"](`special-character-invalid-group-name: The name \"${cO}\" is reserved and cannot be used.`)}const i=this._getGroup(t);for(const t of e){i.add(t.title);this._characters.set(t.title,t.character)}}getGroups(){return this._groups.keys()}getCharactersForGroup(t){if(t===cO){return new Set(this._characters.keys())}return this._groups.get(t)}getCharacter(t){return this._characters.get(t)}_getGroup(t){if(!this._groups.has(t)){this._groups.set(t,new Set)}return this._groups.get(t)}_updateGrid(t,e){e.tiles.clear();const i=this.getCharactersForGroup(t);for(const t of i){const i=this.getCharacter(t);e.tiles.add(e.createTile(i,t))}}_createDropdownPanelContent(t,e){const i=[...this.getGroups()];i.unshift(cO);const n=new tO(t,i);const o=new iO(t);const r=new oO(t);o.delegate(\"execute\").to(e);o.on(\"tileHover\",(t,e)=>{r.set(e)});n.on(\"execute\",()=>{this._updateGrid(n.currentGroupName,o)});this._updateGrid(n.currentGroupName,o);return{navigationView:n,gridView:o,infoView:r}}}class dO extends Nw{init(){const t=this.editor;const e=t.t;t.plugins.get(\"SpecialCharacters\").addItems(\"Currency\",[{character:\"$\",title:e(\"w\")},{character:\"€\",title:e(\"x\")},{character:\"¥\",title:e(\"y\")},{character:\"£\",title:e(\"z\")},{character:\"¢\",title:e(\"aa\")},{character:\"₠\",title:e(\"ab\")},{character:\"₡\",title:e(\"ac\")},{character:\"₢\",title:e(\"ad\")},{character:\"₣\",title:e(\"ae\")},{character:\"₤\",title:e(\"af\")},{character:\"¤\",title:e(\"ag\")},{character:\"₿\",title:e(\"ah\")},{character:\"₥\",title:e(\"ai\")},{character:\"₦\",title:e(\"aj\")},{character:\"₧\",title:e(\"ak\")},{character:\"₨\",title:e(\"al\")},{character:\"₩\",title:e(\"am\")},{character:\"₪\",title:e(\"an\")},{character:\"₫\",title:e(\"ao\")},{character:\"₭\",title:e(\"ap\")},{character:\"₮\",title:e(\"aq\")},{character:\"₯\",title:e(\"ar\")},{character:\"₰\",title:e(\"as\")},{character:\"₱\",title:e(\"at\")},{character:\"₲\",title:e(\"au\")},{character:\"₳\",title:e(\"av\")},{character:\"₴\",title:e(\"aw\")},{character:\"₵\",title:e(\"ax\")},{character:\"₶\",title:e(\"ay\")},{character:\"₷\",title:e(\"az\")},{character:\"₸\",title:e(\"ba\")},{character:\"₹\",title:e(\"bb\")},{character:\"₺\",title:e(\"bc\")},{character:\"₻\",title:e(\"bd\")},{character:\"₼\",title:e(\"be\")},{character:\"₽\",title:e(\"bf\")}])}}class uO extends Nw{init(){const t=this.editor;const e=t.t;t.plugins.get(\"SpecialCharacters\").addItems(\"Mathematical\",[{character:\"<\",title:e(\"ge\")},{character:\">\",title:e(\"gf\")},{character:\"≤\",title:e(\"gg\")},{character:\"≥\",title:e(\"gh\")},{character:\"\",title:e(\"gi\")},{character:\"—\",title:e(\"gj\")},{character:\"¯\",title:e(\"gk\")},{character:\"‾\",title:e(\"gl\")},{character:\"°\",title:e(\"gm\")},{character:\"\",title:e(\"gn\")},{character:\"±\",title:e(\"go\")},{character:\"÷\",title:e(\"gp\")},{character:\"\",title:e(\"gq\")},{character:\"×\",title:e(\"gr\")},{character:\"ƒ\",title:e(\"gs\")},{character:\"∫\",title:e(\"gt\")},{character:\"∑\",title:e(\"gu\")},{character:\"∞\",title:e(\"gv\")},{character:\"√\",title:e(\"gw\")},{character:\"\",title:e(\"gx\")},{character:\"≅\",title:e(\"gy\")},{character:\"≈\",title:e(\"gz\")},{character:\"≠\",title:e(\"ha\")},{character:\"≡\",title:e(\"hb\")},{character:\"∈\",title:e(\"hc\")},{character:\"∉\",title:e(\"hd\")},{character:\"∋\",title:e(\"he\")},{character:\"∏\",title:e(\"hf\")},{character:\"∧\",title:e(\"hg\")},{character:\"\",title:e(\"hh\")},{character:\"¬\",title:e(\"hi\")},{character:\"∩\",title:e(\"hj\")},{character:\"\",title:e(\"hk\")},{character:\"∂\",title:e(\"hl\")},{character:\"∀\",title:e(\"hm\")},{character:\"∃\",title:e(\"hn\")},{character:\"∅\",title:e(\"ho\")},{character:\"∇\",title:e(\"hp\")},{character:\"\",title:e(\"hq\")},{character:\"∝\",title:e(\"hr\")},{character:\"∠\",title:e(\"hs\")},{character:\"¼\",title:e(\"ht\")},{character:\"½\",title:e(\"hu\")},{character:\"¾\",title:e(\"hv\")}])}}class hO extends Nw{init(){const t=this.editor;const e=t.t;t.plugins.get(\"SpecialCharacters\").addItems(\"Arrows\",[{title:e(\"e\"),character:\"⇐\"},{title:e(\"f\"),character:\"⇒\"},{title:e(\"g\"),character:\"⇑\"},{title:e(\"h\"),character:\"⇓\"},{title:e(\"i\"),character:\"⇠\"},{title:e(\"j\"),character:\"⇢\"},{title:e(\"k\"),character:\"⇡\"},{title:e(\"l\"),character:\"⇣\"},{title:e(\"m\"),character:\"⇤\"},{title:e(\"n\"),character:\"⇥\"},{title:e(\"o\"),character:\"⤒\"},{title:e(\"p\"),character:\"⤓\"},{title:e(\"q\"),character:\"↨\"},{title:e(\"r\"),character:\"🔙\"},{title:e(\"s\"),character:\"🔚\"},{title:e(\"t\"),character:\"🔛\"},{title:e(\"u\"),character:\"🔜\"},{title:e(\"v\"),character:\"🔝\"}])}}class fO extends Nw{init(){const t=this.editor;const e=t.t;t.plugins.get(\"SpecialCharacters\").addItems(\"Latin\",[{character:\"Ā\",title:e(\"bg\")},{character:\"ā\",title:e(\"bh\")},{character:\"Ă\",title:e(\"bi\")},{character:\"ă\",title:e(\"bj\")},{character:\"Ą\",title:e(\"bk\")},{character:\"ą\",title:e(\"bl\")},{character:\"Ć\",title:e(\"bm\")},{character:\"ć\",title:e(\"bn\")},{character:\"Ĉ\",title:e(\"bo\")},{character:\"ĉ\",title:e(\"bp\")},{character:\"Ċ\",title:e(\"bq\")},{character:\"ċ\",title:e(\"br\")},{character:\"Č\",title:e(\"bs\")},{character:\"č\",title:e(\"bt\")},{character:\"Ď\",title:e(\"bu\")},{character:\"ď\",title:e(\"bv\")},{character:\"Đ\",title:e(\"bw\")},{character:\"đ\",title:e(\"bx\")},{character:\"Ē\",title:e(\"by\")},{character:\"ē\",title:e(\"bz\")},{character:\"Ĕ\",title:e(\"ca\")},{character:\"ĕ\",title:e(\"cb\")},{character:\"Ė\",title:e(\"cc\")},{character:\"ė\",title:e(\"cd\")},{character:\"Ę\",title:e(\"ce\")},{character:\"ę\",title:e(\"cf\")},{character:\"Ě\",title:e(\"cg\")},{character:\"ě\",title:e(\"ch\")},{character:\"Ĝ\",title:e(\"ci\")},{character:\"ĝ\",title:e(\"cj\")},{character:\"Ğ\",title:e(\"ck\")},{character:\"ğ\",title:e(\"cl\")},{character:\"Ġ\",title:e(\"cm\")},{character:\"ġ\",title:e(\"cn\")},{character:\"Ģ\",title:e(\"co\")},{character:\"ģ\",title:e(\"cp\")},{character:\"Ĥ\",title:e(\"cq\")},{character:\"ĥ\",title:e(\"cr\")},{character:\"Ħ\",title:e(\"cs\")},{character:\"ħ\",title:e(\"ct\")},{character:\"Ĩ\",title:e(\"cu\")},{character:\"ĩ\",title:e(\"cv\")},{character:\"Ī\",title:e(\"cw\")},{character:\"ī\",title:e(\"cx\")},{character:\"Ĭ\",title:e(\"cy\")},{character:\"ĭ\",title:e(\"cz\")},{character:\"Į\",title:e(\"da\")},{character:\"į\",title:e(\"db\")},{character:\"İ\",title:e(\"dc\")},{character:\"ı\",title:e(\"dd\")},{character:\"IJ\",title:e(\"de\")},{character:\"ij\",title:e(\"df\")},{character:\"Ĵ\",title:e(\"dg\")},{character:\"ĵ\",title:e(\"dh\")},{character:\"Ķ\",title:e(\"di\")},{character:\"ķ\",title:e(\"dj\")},{character:\"ĸ\",title:e(\"dk\")},{character:\"Ĺ\",title:e(\"dl\")},{character:\"ĺ\",title:e(\"dm\")},{character:\"Ļ\",title:e(\"dn\")},{character:\"ļ\",title:e(\"do\")},{character:\"Ľ\",title:e(\"dp\")},{character:\"ľ\",title:e(\"dq\")},{character:\"Ŀ\",title:e(\"dr\")},{character:\"ŀ\",title:e(\"ds\")},{character:\"Ł\",title:e(\"dt\")},{character:\"ł\",title:e(\"du\")},{character:\"Ń\",title:e(\"dv\")},{character:\"ń\",title:e(\"dw\")},{character:\"Ņ\",title:e(\"dx\")},{character:\"ņ\",title:e(\"dy\")},{character:\"Ň\",title:e(\"dz\")},{character:\"ň\",title:e(\"ea\")},{character:\"ʼn\",title:e(\"eb\")},{character:\"Ŋ\",title:e(\"ec\")},{character:\"ŋ\",title:e(\"ed\")},{character:\"Ō\",title:e(\"ee\")},{character:\"ō\",title:e(\"ef\")},{character:\"Ŏ\",title:e(\"eg\")},{character:\"ŏ\",title:e(\"eh\")},{character:\"Ő\",title:e(\"ei\")},{character:\"ő\",title:e(\"ej\")},{character:\"Œ\",title:e(\"ek\")},{character:\"œ\",title:e(\"el\")},{character:\"Ŕ\",title:e(\"em\")},{character:\"ŕ\",title:e(\"en\")},{character:\"Ŗ\",title:e(\"eo\")},{character:\"ŗ\",title:e(\"ep\")},{character:\"Ř\",title:e(\"eq\")},{character:\"ř\",title:e(\"er\")},{character:\"Ś\",title:e(\"es\")},{character:\"ś\",title:e(\"et\")},{character:\"Ŝ\",title:e(\"eu\")},{character:\"ŝ\",title:e(\"ev\")},{character:\"Ş\",title:e(\"ew\")},{character:\"ş\",title:e(\"ex\")},{character:\"Š\",title:e(\"ey\")},{character:\"š\",title:e(\"ez\")},{character:\"Ţ\",title:e(\"fa\")},{character:\"ţ\",title:e(\"fb\")},{character:\"Ť\",title:e(\"fc\")},{character:\"ť\",title:e(\"fd\")},{character:\"Ŧ\",title:e(\"fe\")},{character:\"ŧ\",title:e(\"ff\")},{character:\"Ũ\",title:e(\"fg\")},{character:\"ũ\",title:e(\"fh\")},{character:\"Ū\",title:e(\"fi\")},{character:\"ū\",title:e(\"fj\")},{character:\"Ŭ\",title:e(\"fk\")},{character:\"ŭ\",title:e(\"fl\")},{character:\"Ů\",title:e(\"fm\")},{character:\"ů\",title:e(\"fn\")},{character:\"Ű\",title:e(\"fo\")},{character:\"ű\",title:e(\"fp\")},{character:\"Ų\",title:e(\"fq\")},{character:\"ų\",title:e(\"fr\")},{character:\"Ŵ\",title:e(\"fs\")},{character:\"ŵ\",title:e(\"ft\")},{character:\"Ŷ\",title:e(\"fu\")},{character:\"ŷ\",title:e(\"fv\")},{character:\"Ÿ\",title:e(\"fw\")},{character:\"Ź\",title:e(\"fx\")},{character:\"ź\",title:e(\"fy\")},{character:\"Ż\",title:e(\"fz\")},{character:\"ż\",title:e(\"ga\")},{character:\"Ž\",title:e(\"gb\")},{character:\"ž\",title:e(\"gc\")},{character:\"ſ\",title:e(\"gd\")}])}}class mO extends Nw{init(){const t=this.editor;const e=t.t;t.plugins.get(\"SpecialCharacters\").addItems(\"Text\",[{character:\"\",title:e(\"hw\")},{character:\"\",title:e(\"hx\")},{character:\"«\",title:e(\"hy\")},{character:\"»\",title:e(\"hz\")},{character:\"\",title:e(\"ia\")},{character:\"\",title:e(\"ib\")},{character:\"“\",title:e(\"ic\")},{character:\"”\",title:e(\"id\")},{character:\"\",title:e(\"ie\")},{character:\"„\",title:e(\"if\")},{character:\"¡\",title:e(\"ig\")},{character:\"¿\",title:e(\"ih\")},{character:\"‥\",title:e(\"ii\")},{character:\"…\",title:e(\"ij\")},{character:\"‡\",title:e(\"ik\")},{character:\"‰\",title:e(\"il\")},{character:\"‱\",title:e(\"im\")},{character:\"‼\",title:e(\"in\")},{character:\"⁈\",title:e(\"io\")},{character:\"⁉\",title:e(\"ip\")},{character:\"⁇\",title:e(\"iq\")},{character:\"©\",title:e(\"ir\")},{character:\"®\",title:e(\"is\")},{character:\"™\",title:e(\"it\")},{character:\"§\",title:e(\"iu\")},{character:\"¶\",title:e(\"iv\")},{character:\"⁋\",title:e(\"iw\")}])}}class gO extends Nw{static get requires(){return[dO,mO,uO,hO,fO]}}const pO=\"strikethrough\";class bO extends Nw{static get pluginName(){return\"StrikethroughEditing\"}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:pO});t.model.schema.setAttributeProperties(pO,{isFormatting:true,copyOnEnter:true});t.conversion.attributeToElement({model:pO,view:\"s\",upcastAlso:[\"del\",\"strike\",{styles:{\"text-decoration\":\"line-through\"}}]});t.commands.add(pO,new Gw(t,pO));t.keystrokes.set(\"CTRL+SHIFT+X\",\"strikethrough\")}}var wO='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9L6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z\"/><path d=\"M3 10.5V9h14v1.5z\"/></svg>';const _O=\"strikethrough\";class kO extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(_O,i=>{const n=t.commands.get(_O);const o=new Kb(i);o.set({label:e(\"jg\"),icon:wO,keystroke:\"CTRL+SHIFT+X\",tooltip:true,isToggleable:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(_O);t.editing.view.focus()});return o})}}class vO extends Nw{static get requires(){return[bO,kO]}static get pluginName(){return\"Strikethrough\"}}const yO=\"subscript\";class xO extends Nw{static get pluginName(){return\"SubscriptEditing\"}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:yO});t.model.schema.setAttributeProperties(yO,{isFormatting:true,copyOnEnter:true});t.conversion.attributeToElement({model:yO,view:\"sub\",upcastAlso:[{styles:{\"vertical-align\":\"sub\"}}]});t.commands.add(yO,new Gw(t,yO))}}var AO='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.03 10.349l3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82zm8.147 7.829h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309z\"/></svg>';const CO=\"subscript\";class TO extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(CO,i=>{const n=t.commands.get(CO);const o=new Kb(i);o.set({label:e(\"jh\"),icon:AO,tooltip:true,isToggleable:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(CO);t.editing.view.focus()});return o})}}class EO extends Nw{static get requires(){return[xO,TO]}static get pluginName(){return\"Subscript\"}}const MO=\"superscript\";class PO extends Nw{static get pluginName(){return\"SuperscriptEditing\"}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:MO});t.model.schema.setAttributeProperties(MO,{isFormatting:true,copyOnEnter:true});t.conversion.attributeToElement({model:MO,view:\"sup\",upcastAlso:[{styles:{\"vertical-align\":\"super\"}}]});t.commands.add(MO,new Gw(t,MO))}}var SO='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15.677 8.678h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309zM7.03 10.349l3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82z\"/></svg>';const IO=\"superscript\";class NO extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(IO,i=>{const n=t.commands.get(IO);const o=new Kb(i);o.set({label:e(\"ji\"),icon:SO,tooltip:true,isToggleable:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(IO);t.editing.view.focus()});return o})}}class OO extends Nw{static get requires(){return[PO,NO]}static get pluginName(){return\"Superscript\"}}var LO=i(126);class zO extends gb{constructor(t,e){super(t);const i=`ck-labeled-view-${is()}`;const n=`ck-labeled-view-status-${is()}`;this.view=e(this,i,n);this.set(\"label\");this.set(\"isEnabled\",true);this.set(\"errorText\",null);this.set(\"infoText\",null);this.set(\"class\");this.labelView=this._createLabelView(i);this.statusView=this._createStatusView(n);this.bind(\"_statusText\").to(this,\"errorText\",this,\"infoText\",(t,e)=>t||e);const o=this.bindTemplate;this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-labeled-view\",o.to(\"class\"),o.if(\"isEnabled\",\"ck-disabled\",t=>!t)]},children:[this.labelView,this.view,this.statusView]})}_createLabelView(t){const e=new Ab(this.locale);e.for=t;e.bind(\"text\").to(this,\"label\");return e}_createStatusView(t){const e=new gb(this.locale);const i=this.bindTemplate;e.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-labeled-view__status\",i.if(\"errorText\",\"ck-labeled-view__status_error\"),i.if(\"_statusText\",\"ck-hidden\",t=>!t)],id:t,role:i.if(\"errorText\",\"alert\")},children:[{text:i.to(\"_statusText\")}]});return e}focus(){this.view.focus()}}function RO(t,e,i){const n=new dk(t.locale);n.set({id:e,ariaDescribedById:i});n.bind(\"isReadOnly\").to(t,\"isEnabled\",t=>!t);n.bind(\"hasError\").to(t,\"errorText\",t=>!!t);n.on(\"input\",()=>{t.errorText=null});return n}function jO(t,e,i){const n=dw(t.locale);n.set({id:e,ariaDescribedById:i});n.bind(\"isEnabled\").to(t);return n}var DO=i(128);class BO extends gb{constructor(t,e){super(t);const i=this.bindTemplate;this.set(\"value\",\"\");this.set(\"id\");this.set(\"isReadOnly\",false);this.set(\"hasError\",false);this.set(\"ariaDescribedById\");this.options=e;this._dropdownView=this._createDropdownView(t);this._inputView=this._createInputTextView(t);this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-input-color\",i.if(\"hasError\",\"ck-error\")],id:i.to(\"id\"),\"aria-invalid\":i.if(\"hasError\",true),\"aria-describedby\":i.to(\"ariaDescribedById\")},children:[this._inputView,this._dropdownView]})}focus(){this._inputView.focus()}_createDropdownView(){const t=this.locale;const e=this.bindTemplate;const i=this._createColorGrid(t);const n=dw(t);const o=new gb;const r=this._createRemoveColorButton(t);o.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-input-color__button__preview\"],style:{backgroundColor:e.to(\"value\")}},children:[{tag:\"span\",attributes:{class:[\"ck\",\"ck-input-color__button__preview__no-color-indicator\",e.if(\"value\",\"ck-hidden\",t=>t!=\"\")]}}]});n.buttonView.extendTemplate({attributes:{class:\"ck-input-color__button\"}});n.buttonView.children.add(o);n.panelPosition=t.uiLanguageDirection===\"rtl\"?\"se\":\"sw\";n.panelView.children.add(r);n.panelView.children.add(i);n.bind(\"isEnabled\").to(this,\"isReadOnly\",t=>!t);return n}_createInputTextView(){const t=this.locale;const e=new dk(t);e.bind(\"value\").to(this);e.bind(\"isReadOnly\").to(this);e.bind(\"hasError\").to(this);e.on(\"input\",()=>{this.value=e.element.value});e.delegate(\"input\").to(this);return e}_createRemoveColorButton(){const t=this.locale;const e=t.t;const i=new Kb(t);i.class=\"ck-input-color__remove-color\";i.withText=true;i.icon=bP;i.label=e(\"mx\");i.on(\"execute\",()=>{this.value=\"\";this._dropdownView.isOpen=false;this.fire(\"input\")});return i}_createColorGrid(t){const e=new gP(t,{colorDefinitions:this.options.colorDefinitions,columns:this.options.columns});e.on(\"execute\",(t,e)=>{this.value=e.value;this._dropdownView.isOpen=false;this.fire(\"input\")});e.bind(\"selectedColor\").to(this,\"value\");return e}}const VO=_k.defaultPositions;const FO=[VO.northArrowSouth,VO.northArrowSouthWest,VO.northArrowSouthEast,VO.southArrowNorth,VO.southArrowNorthWest,VO.southArrowNorthEast];const HO=t=>t===\"\";function WO(t,e){const i=t.plugins.get(\"ContextualBalloon\");if(kT(t.editing.view.document.selection)){let n;if(e===\"cell\"){n=qO(t)}else{n=UO(t)}i.updatePosition(n)}}function UO(t){const e=t.model.document.selection.getFirstPosition();const i=sT(\"table\",e);const n=t.editing.mapper.toViewElement(i);return{target:t.editing.view.domConverter.viewToDom(n),positions:FO}}function qO(t){const e=oL(t.model.document.selection.getFirstPosition());const i=t.editing.mapper.toViewElement(e);return{target:t.editing.view.domConverter.viewToDom(i),positions:FO}}function $O(t){return{none:t(\"kv\"),solid:t(\"kw\"),dotted:t(\"kx\"),dashed:t(\"ky\"),double:t(\"kz\"),groove:t(\"la\"),ridge:t(\"lb\"),inset:t(\"lc\"),outset:t(\"ld\")}}function YO(t){return t(\"le\")}function GO(t){return t(\"lf\")}function JO(t){t=t.trim();return HO(t)||rI(t)}function XO(t){t=t.trim();return HO(t)||iL(t)||lI(t)||uI(t)}function QO(t){t=t.trim();return HO(t)||iL(t)||lI(t)}function KO(t){const e=new ys;const i=$O(t.t);for(const n in i){const o={type:\"button\",model:new d_({_borderStyleValue:n===\"none\"?\"\":n,label:i[n],withText:true})};if(n===\"none\"){o.model.bind(\"isOn\").to(t,\"borderStyle\",t=>!t)}else{o.model.bind(\"isOn\").to(t,\"borderStyle\",t=>t===n)}e.add(o)}return e}function ZO({view:t,icons:e,toolbar:i,labels:n,propertyName:o,nameToValue:r}){for(const s in n){const a=new Kb(t.locale);a.set({label:n[s],icon:e[s]});a.bind(\"isOn\").to(t,o,t=>t===r(s));a.on(\"execute\",()=>{t[o]=r(s)});i.items.add(a)}}const tL=[{color:\"hsl(0, 0%, 0%)\",label:\"Black\"},{color:\"hsl(0, 0%, 30%)\",label:\"Dim grey\"},{color:\"hsl(0, 0%, 60%)\",label:\"Grey\"},{color:\"hsl(0, 0%, 90%)\",label:\"Light grey\"},{color:\"hsl(0, 0%, 100%)\",label:\"White\",hasBorder:true},{color:\"hsl(0, 75%, 60%)\",label:\"Red\"},{color:\"hsl(30, 75%, 60%)\",label:\"Orange\"},{color:\"hsl(60, 75%, 60%)\",label:\"Yellow\"},{color:\"hsl(90, 75%, 60%)\",label:\"Light green\"},{color:\"hsl(120, 75%, 60%)\",label:\"Green\"},{color:\"hsl(150, 75%, 60%)\",label:\"Aquamarine\"},{color:\"hsl(180, 75%, 60%)\",label:\"Turquoise\"},{color:\"hsl(210, 75%, 60%)\",label:\"Light blue\"},{color:\"hsl(240, 75%, 60%)\",label:\"Blue\"},{color:\"hsl(270, 75%, 60%)\",label:\"Purple\"}];function eL(t){return(e,i,n)=>{const o=new BO(e.locale,{colorDefinitions:nL(t.colorConfig),columns:t.columns});o.set({id:i,ariaDescribedById:n});o.bind(\"isReadOnly\").to(e,\"isEnabled\",t=>!t);o.bind(\"errorText\").to(e);o.on(\"input\",()=>{e.errorText=null});return o}}function iL(t){const e=parseFloat(t);return!Number.isNaN(e)&&t===String(e)}function nL(t){return t.map(t=>({color:t.model,label:t.label,options:{hasBorder:t.hasBorder}}))}function oL(t){const e=t.nodeAfter&&t.nodeAfter.is(\"tableCell\");return e?t.nodeAfter:sT(\"tableCell\",t)}var rL=i(130);class sL extends gb{constructor(t,e={}){super(t);const i=this.bindTemplate;this.set(\"class\",e.class||null);this.children=this.createCollection();if(e.children){e.children.forEach(t=>this.children.add(t))}this.set(\"_role\",null);this.set(\"_ariaLabelledBy\",null);if(e.labelView){this.set({_role:\"group\",_ariaLabelledBy:e.labelView.id})}this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-form__row\",i.to(\"class\")],role:i.to(\"_role\"),\"aria-labelledby\":i.to(\"_ariaLabelledBy\")},children:this.children})}}var aL=i(132);class cL extends gb{constructor(t,e={}){super(t);const i=this.bindTemplate;this.children=this.createCollection();this.set(\"class\",e.class||null);this.set(\"label\",e.label||\"\");const n=new gb(t);n.setTemplate({tag:\"span\",attributes:{class:[\"ck\",\"ck-form__header__label\"]},children:[{text:i.to(\"label\")}]});this.children.add(n);this.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-form__header\",i.to(\"class\")]},children:this.children})}}var lL='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.261 7.062l2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z\"/></svg>';var dL='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z\"/></svg>';var uL='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.239 13.938l-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z\"/></svg>';var hL=i(13);var fL=i(14);var mL=i(136);const gL={left:mM,center:pM,right:gM,justify:bM,top:lL,middle:dL,bottom:uL};class pL extends gb{constructor(t,e){super(t);this.set({borderStyle:\"\",borderWidth:\"\",borderColor:\"\",padding:\"\",backgroundColor:\"\",width:\"\",height:\"\",horizontalAlignment:\"\",verticalAlignment:\"\"});this.options=e;const{borderStyleDropdown:i,borderWidthInput:n,borderColorInput:o,borderRowLabel:r}=this._createBorderFields();const{widthInput:s,operatorLabel:a,heightInput:c,dimensionsLabel:l}=this._createDimensionFields();const{horizontalAlignmentToolbar:d,verticalAlignmentToolbar:u,alignmentLabel:h}=this._createAlignmentFields();this.focusTracker=new xp;this.keystrokes=new dp;this.children=this.createCollection();this.borderStyleDropdown=i;this.borderWidthInput=n;this.borderColorInput=o;this.backgroundInput=this._createBackgroundField();this.paddingInput=this._createPaddingField();this.widthInput=s;this.heightInput=c;this.horizontalAlignmentToolbar=d;this.verticalAlignmentToolbar=u;const{saveButtonView:f,cancelButtonView:m}=this._createActionButtons();this.saveButtonView=f;this.cancelButtonView=m;this._focusables=new Bp;this._focusCycler=new Nb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"shift + tab\",focusNext:\"tab\"}});this.children.add(new cL(t,{label:this.t(\"Cell properties\")}));this.children.add(new sL(t,{labelView:r,children:[r,i,o,n],class:\"ck-table-form__border-row\"}));this.children.add(new sL(t,{children:[this.backgroundInput]}));this.children.add(new sL(t,{children:[new sL(t,{labelView:l,children:[l,s,a,c],class:\"ck-table-form__dimensions-row\"}),new sL(t,{children:[this.paddingInput],class:\"ck-table-cell-properties-form__padding-row\"})]}));this.children.add(new sL(t,{labelView:h,children:[h,d,u],class:\"ck-table-cell-properties-form__alignment-row\"}));this.children.add(new sL(t,{children:[this.saveButtonView,this.cancelButtonView],class:\"ck-table-form__action-row\"}));this.setTemplate({tag:\"form\",attributes:{class:[\"ck\",\"ck-form\",\"ck-table-form\",\"ck-table-cell-properties-form\"],tabindex:\"-1\"},children:this.children})}render(){super.render();uk({view:this});[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const t=eL({colorConfig:this.options.borderColors,columns:5});const e=this.locale;const i=this.t;const n=new Ab(e);n.text=i(\"mf\");const o=$O(i);const r=new zO(e,jO);r.set({label:i(\"mg\"),class:\"ck-table-form__border-style\"});r.view.buttonView.set({isOn:false,withText:true,tooltip:i(\"mg\")});r.view.buttonView.bind(\"label\").to(this,\"borderStyle\",t=>o[t?t:\"none\"]);r.view.on(\"execute\",t=>{this.borderStyle=t.source._borderStyleValue});hw(r.view,KO(this));const s=new zO(e,RO);s.set({label:i(\"mh\"),class:\"ck-table-form__border-width\"});s.view.bind(\"value\").to(this,\"borderWidth\");s.bind(\"isEnabled\").to(this,\"borderStyle\",bL);s.view.on(\"input\",()=>{this.borderWidth=s.view.element.value});const a=new zO(e,t);a.set({label:i(\"mi\"),class:\"ck-table-form__border-color\"});a.view.bind(\"value\").to(this,\"borderColor\");a.bind(\"isEnabled\").to(this,\"borderStyle\",bL);a.view.on(\"input\",()=>{this.borderColor=a.view.value});this.on(\"change:borderStyle\",(t,e,i)=>{if(!bL(i)){this.borderColor=\"\";this.borderWidth=\"\"}});return{borderRowLabel:n,borderStyleDropdown:r,borderColorInput:a,borderWidthInput:s}}_createBackgroundField(){const t=this.locale;const e=this.t;const i=eL({colorConfig:this.options.backgroundColors,columns:5});const n=new zO(t,i);n.set({label:e(\"mj\"),class:\"ck-table-cell-properties-form__background\"});n.view.bind(\"value\").to(this,\"backgroundColor\");n.view.on(\"input\",()=>{this.backgroundColor=n.view.value});return n}_createDimensionFields(){const t=this.locale;const e=this.t;const i=new Ab(t);i.text=e(\"mk\");const n=new zO(t,RO);n.set({label:e(\"mh\"),class:\"ck-table-form__dimensions-row__width\"});n.view.bind(\"value\").to(this,\"width\");n.view.on(\"input\",()=>{this.width=n.view.element.value});const o=new gb(t);o.setTemplate({tag:\"span\",attributes:{class:[\"ck-table-form__dimension-operator\"]},children:[{text:\"×\"}]});const r=new zO(t,RO);r.set({label:e(\"ml\"),class:\"ck-table-form__dimensions-row__height\"});r.view.bind(\"value\").to(this,\"height\");r.view.on(\"input\",()=>{this.height=r.view.element.value});return{dimensionsLabel:i,widthInput:n,operatorLabel:o,heightInput:r}}_createPaddingField(){const t=this.locale;const e=this.t;const i=new zO(t,RO);i.set({label:e(\"mm\"),class:\"ck-table-cell-properties-form__padding\"});i.view.bind(\"value\").to(this,\"padding\");i.view.on(\"input\",()=>{this.padding=i.view.element.value});return i}_createAlignmentFields(){const t=this.locale;const e=this.t;const i=new Ab(t);i.text=e(\"mn\");const n=new _w(t);const o=this.locale.contentLanguageDirection===\"rtl\";n.set({isCompact:true,ariaLabel:e(\"mo\")});ZO({view:this,icons:gL,toolbar:n,labels:this._horizontalAlignmentLabels,propertyName:\"horizontalAlignment\",nameToValue:t=>t===(o?\"right\":\"left\")?\"\":t});const r=new _w(t);r.set({isCompact:true,ariaLabel:e(\"mp\")});ZO({view:this,icons:gL,toolbar:r,labels:this._verticalAlignmentLabels,propertyName:\"verticalAlignment\",nameToValue:t=>t===\"middle\"?\"\":t});return{horizontalAlignmentToolbar:n,verticalAlignmentToolbar:r,alignmentLabel:i}}_createActionButtons(){const t=this.locale;const e=this.t;const i=new Kb(t);const n=new Kb(t);const o=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];i.set({label:e(\"lv\"),icon:hk,class:\"ck-button-save\",type:\"submit\",withText:true});i.bind(\"isEnabled\").toMany(o,\"errorText\",(...t)=>t.every(t=>!t));n.set({label:e(\"lw\"),icon:fk,class:\"ck-button-cancel\",type:\"cancel\",withText:true});n.delegate(\"execute\").to(this,\"cancel\");return{saveButtonView:i,cancelButtonView:n}}get _horizontalAlignmentLabels(){const t=this.locale;const e=this.t;const i=e(\"mq\");const n=e(\"mr\");const o=e(\"ms\");const r=e(\"mt\");if(t.uiLanguageDirection===\"rtl\"){return{right:o,center:n,left:i,justify:r}}else{return{left:i,center:n,right:o,justify:r}}}get _verticalAlignmentLabels(){const t=this.t;return{top:t(\"mu\"),middle:t(\"mv\"),bottom:t(\"mw\")}}}function bL(t){return!!t}var wL='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.105 18l-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z\" opacity=\".6\"/><path d=\"M15.5 11.5l1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z\"/></svg>';const _L=500;class kL extends Nw{static get requires(){return[Mk]}static get pluginName(){return\"TableCellPropertiesUI\"}constructor(t){super(t);t.config.define(\"table.tableCellProperties\",{borderColors:tL,backgroundColors:tL})}init(){const t=this.editor;const e=t.t;this._balloon=t.plugins.get(Mk);this.view=this._createPropertiesView();this._undoStepBatch=null;t.ui.componentFactory.add(\"tableCellProperties\",t=>{const i=new Kb(t);i.set({label:e(\"jv\"),icon:wL,tooltip:true});this.listenTo(i,\"execute\",()=>this._showView());return i})}destroy(){super.destroy();this.view.destroy()}_createPropertiesView(){const t=this.editor;const e=t.editing.view.document;const i=t.config.get(\"table.tableCellProperties\");const n=NP(i.borderColors);const o=IP(t.locale,n);const r=NP(i.backgroundColors);const s=IP(t.locale,r);const a=new pL(t.locale,{borderColors:o,backgroundColors:s});const c=t.t;a.render();this.listenTo(a,\"submit\",()=>{this._hideView()});this.listenTo(a,\"cancel\",()=>{if(this._undoStepBatch.operations.length){t.execute(\"undo\",this._undoStepBatch)}this._hideView()});a.keystrokes.set(\"Esc\",(t,e)=>{this._hideView();e()});this.listenTo(t.ui,\"update\",()=>{if(!kT(e.selection)){this._hideView()}else if(this._isViewVisible){WO(t,\"cell\")}});aw({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const l=YO(c);const d=GO(c);a.on(\"change:borderStyle\",this._getPropertyChangeCallback(\"tableCellBorderStyle\"));a.on(\"change:borderColor\",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:\"tableCellBorderColor\",errorText:l,validator:JO}));a.on(\"change:borderWidth\",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:\"tableCellBorderWidth\",errorText:d,validator:QO}));a.on(\"change:padding\",this._getValidatedPropertyChangeCallback({viewField:a.paddingInput,commandName:\"tableCellPadding\",errorText:d,validator:XO}));a.on(\"change:width\",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:\"tableCellWidth\",errorText:d,validator:XO}));a.on(\"change:height\",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:\"tableCellHeight\",errorText:d,validator:XO}));a.on(\"change:backgroundColor\",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:\"tableCellBackgroundColor\",errorText:l,validator:JO}));a.on(\"change:horizontalAlignment\",this._getPropertyChangeCallback(\"tableCellHorizontalAlignment\"));a.on(\"change:verticalAlignment\",this._getPropertyChangeCallback(\"tableCellVerticalAlignment\"));return a}_fillViewFormFromCommandValues(){const t=this.editor.commands;this.view.set({borderStyle:t.get(\"tableCellBorderStyle\").value||\"\",borderColor:t.get(\"tableCellBorderColor\").value||\"\",borderWidth:t.get(\"tableCellBorderWidth\").value||\"\",width:t.get(\"tableCellWidth\").value||\"\",height:t.get(\"tableCellHeight\").value||\"\",padding:t.get(\"tableCellPadding\").value||\"\",backgroundColor:t.get(\"tableCellBackgroundColor\").value||\"\",horizontalAlignment:t.get(\"tableCellHorizontalAlignment\").value||\"\",verticalAlignment:t.get(\"tableCellVerticalAlignment\").value||\"\"})}_showView(){const t=this.editor;this._balloon.add({view:this.view,position:qO(t)});this._undoStepBatch=t.model.createBatch();this._fillViewFormFromCommandValues();this.view.focus()}_hideView(){if(!this._isViewInBalloon){return}const t=this.editor;this.stopListening(t.ui,\"update\");this.view.saveButtonView.focus();this._balloon.remove(this.view);this.editor.editing.view.focus()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(t){return(e,i,n)=>{this.editor.execute(t,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback({commandName:t,viewField:e,validator:i,errorText:n}){const o=uh(()=>{e.errorText=n},_L);return(n,r,s)=>{o.cancel();if(i(s)){this.editor.execute(t,{value:s,batch:this._undoStepBatch});e.errorText=null}else{o()}}}}function vL(t){t.setNormalizer(\"border\",yL);t.setNormalizer(\"border-top\",xL(\"top\"));t.setNormalizer(\"border-right\",xL(\"right\"));t.setNormalizer(\"border-bottom\",xL(\"bottom\"));t.setNormalizer(\"border-left\",xL(\"left\"));t.setNormalizer(\"border-color\",AL(\"color\"));t.setNormalizer(\"border-width\",AL(\"width\"));t.setNormalizer(\"border-style\",AL(\"style\"));t.setNormalizer(\"border-top-color\",TL(\"color\",\"top\"));t.setNormalizer(\"border-top-style\",TL(\"style\",\"top\"));t.setNormalizer(\"border-top-width\",TL(\"width\",\"top\"));t.setNormalizer(\"border-right-color\",TL(\"color\",\"right\"));t.setNormalizer(\"border-right-style\",TL(\"style\",\"right\"));t.setNormalizer(\"border-right-width\",TL(\"width\",\"right\"));t.setNormalizer(\"border-bottom-color\",TL(\"color\",\"bottom\"));t.setNormalizer(\"border-bottom-style\",TL(\"style\",\"bottom\"));t.setNormalizer(\"border-bottom-width\",TL(\"width\",\"bottom\"));t.setNormalizer(\"border-left-color\",TL(\"color\",\"left\"));t.setNormalizer(\"border-left-style\",TL(\"style\",\"left\"));t.setNormalizer(\"border-left-width\",TL(\"width\",\"left\"));t.setExtractor(\"border-top\",EL(\"top\"));t.setExtractor(\"border-right\",EL(\"right\"));t.setExtractor(\"border-bottom\",EL(\"bottom\"));t.setExtractor(\"border-left\",EL(\"left\"));t.setExtractor(\"border-top-color\",\"border.color.top\");t.setExtractor(\"border-right-color\",\"border.color.right\");t.setExtractor(\"border-bottom-color\",\"border.color.bottom\");t.setExtractor(\"border-left-color\",\"border.color.left\");t.setExtractor(\"border-top-width\",\"border.width.top\");t.setExtractor(\"border-right-width\",\"border.width.right\");t.setExtractor(\"border-bottom-width\",\"border.width.bottom\");t.setExtractor(\"border-left-width\",\"border.width.left\");t.setExtractor(\"border-top-style\",\"border.style.top\");t.setExtractor(\"border-right-style\",\"border.style.right\");t.setExtractor(\"border-bottom-style\",\"border.style.bottom\");t.setExtractor(\"border-left-style\",\"border.style.left\");t.setReducer(\"border-color\",vI(\"border-color\"));t.setReducer(\"border-style\",vI(\"border-style\"));t.setReducer(\"border-width\",vI(\"border-width\"));t.setReducer(\"border-top\",IL(\"top\"));t.setReducer(\"border-right\",IL(\"right\"));t.setReducer(\"border-bottom\",IL(\"bottom\"));t.setReducer(\"border-left\",IL(\"left\"));t.setReducer(\"border\",SL);t.setStyleRelation(\"border\",[\"border-color\",\"border-style\",\"border-width\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\"]);t.setStyleRelation(\"border-color\",[\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\"]);t.setStyleRelation(\"border-style\",[\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\"]);t.setStyleRelation(\"border-width\",[\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\"]);t.setStyleRelation(\"border-top\",[\"border-top-color\",\"border-top-style\",\"border-top-width\"]);t.setStyleRelation(\"border-right\",[\"border-right-color\",\"border-right-style\",\"border-right-width\"]);t.setStyleRelation(\"border-bottom\",[\"border-bottom-color\",\"border-bottom-style\",\"border-bottom-width\"]);t.setStyleRelation(\"border-left\",[\"border-left-color\",\"border-left-style\",\"border-left-width\"])}function yL(t){const{color:e,style:i,width:n}=PL(t);return{path:\"border\",value:{color:kI(e),style:kI(i),width:kI(n)}}}function xL(t){return e=>{const{color:i,style:n,width:o}=PL(e);const r={};if(i!==undefined){r.color={[t]:i}}if(n!==undefined){r.style={[t]:n}}if(o!==undefined){r.width={[t]:o}}return{path:\"border\",value:r}}}function AL(t){return e=>({path:\"border\",value:CL(e,t)})}function CL(t,e){return{[e]:kI(t)}}function TL(t,e){return i=>({path:\"border\",value:{[t]:{[e]:i}}})}function EL(t){return(e,i)=>{if(i.border){return ML(i.border,t)}}}function ML(t,e){const i={};if(t.width&&t.width[e]){i.width=t.width[e]}if(t.style&&t.style[e]){i.style=t.style[e]}if(t.color&&t.color[e]){i.color=t.color[e]}return i}function PL(t){const e={};const i=AI(t);for(const t of i){if(lI(t)||/thin|medium|thick/.test(t)){e.width=t}else if(aI(t)){e.style=t}else{e.color=t}}return e}function SL(t){const e=[];e.push(...NL(ML(t,\"top\"),\"top\"));e.push(...NL(ML(t,\"right\"),\"right\"));e.push(...NL(ML(t,\"bottom\"),\"bottom\"));e.push(...NL(ML(t,\"left\"),\"left\"));return e}function IL(t){return e=>NL(e,t)}function NL(t,e){const i=[];if(t&&t.width!==undefined){i.push(t.width)}if(t&&t.style!==undefined){i.push(t.style)}if(t&&t.color!==undefined){i.push(t.color)}if(i.length){return[[`border-${e}`,i.join(\" \")]]}return[]}function OL(t){t.setNormalizer(\"padding\",xI(\"padding\"));t.setNormalizer(\"padding-top\",t=>({path:\"padding.top\",value:t}));t.setNormalizer(\"padding-right\",t=>({path:\"padding.right\",value:t}));t.setNormalizer(\"padding-bottom\",t=>({path:\"padding.bottom\",value:t}));t.setNormalizer(\"padding-left\",t=>({path:\"padding.left\",value:t}));t.setReducer(\"padding\",vI(\"padding\"));t.setStyleRelation(\"padding\",[\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\"])}function LL(t){t.setNormalizer(\"background\",zL);t.setNormalizer(\"background-color\",t=>({path:\"background.color\",value:t}));t.setReducer(\"background\",t=>{const e=[];e.push([\"background-color\",t.color]);return e})}function zL(t){const e={};const i=AI(t);for(const t of i){if(fI(t)){e.repeat=e.repeat||[];e.repeat.push(t)}else if(gI(t)){e.position=e.position||[];e.position.push(t)}else if(bI(t)){e.attachment=t}else if(rI(t)){e.color=t}else if(_I(t)){e.image=t}}return{path:\"background\",value:e}}function RL(t,e,i,n){t.for(\"upcast\").attributeToAttribute({view:{styles:{[n]:/[\\s\\S]+/}},model:{name:e,key:i,value:t=>t.getNormalizedStyle(n)}})}function jL(t,e){t.for(\"upcast\").add(t=>t.on(\"element:\"+e,(t,e,i)=>{const n=[\"border-top\",\"border-right\",\"border-bottom\",\"border-left\"].filter(t=>e.viewItem.hasStyle(t));if(!n.length){return}const o={styles:n};if(!i.consumable.test(e.viewItem,o)){return}if(!e.modelRange){e=Object.assign(e,i.convertChildren(e.viewItem,e.modelCursor))}const r=[...e.modelRange.getItems({shallow:true})].pop();i.consumable.consume(e.viewItem,o);i.writer.setAttribute(\"borderStyle\",e.viewItem.getNormalizedStyle(\"border-style\"),r);i.writer.setAttribute(\"borderColor\",e.viewItem.getNormalizedStyle(\"border-color\"),r);i.writer.setAttribute(\"borderWidth\",e.viewItem.getNormalizedStyle(\"border-width\"),r)}))}function DL(t,e,i,n){t.for(\"downcast\").attributeToAttribute({model:{name:e,key:i},view:t=>({key:\"style\",value:{[n]:t}})})}function BL(t,e,i){t.for(\"downcast\").add(t=>t.on(`attribute:${e}:table`,(t,e,n)=>{const{item:o,attributeNewValue:r}=e;const{mapper:s,writer:a}=n;if(!n.consumable.consume(e.item,t.name)){return}const c=[...s.toViewElement(o).getChildren()].find(t=>t.is(\"table\"));if(r){a.setStyle(i,r,c)}else{a.removeStyle(i,c)}}))}class VL extends Rw{constructor(t,e){super(t);this.attributeName=e}refresh(){const t=this.editor;const e=xT(t.model.document.selection);this.isEnabled=!!e.length;this.value=this._getSingleValue(e)}execute(t={}){const{value:e,batch:i}=t;const n=this.editor.model;const o=xT(n.document.selection);const r=this._getValueToSet(e);n.enqueueChange(i||\"default\",t=>{if(r){o.forEach(e=>t.setAttribute(this.attributeName,r,e))}else{o.forEach(e=>t.removeAttribute(this.attributeName,e))}})}_getAttribute(t){if(!t){return}return t.getAttribute(this.attributeName)}_getValueToSet(t){return t}_getSingleValue(t){const e=this._getAttribute(t[0]);const i=t.every(t=>this._getAttribute(t)===e);return i?e:undefined}}class FL extends VL{constructor(t){super(t,\"padding\")}_getAttribute(t){if(!t){return}return lT(t.getAttribute(this.attributeName))}_getValueToSet(t){return dT(t,\"px\")}}class HL extends VL{constructor(t){super(t,\"width\")}_getValueToSet(t){return dT(t,\"px\")}}class WL extends VL{constructor(t){super(t,\"height\")}_getValueToSet(t){return dT(t,\"px\")}}class UL extends VL{constructor(t){super(t,\"backgroundColor\")}}class qL extends VL{constructor(t){super(t,\"verticalAlignment\")}}class $L extends VL{constructor(t){super(t,\"horizontalAlignment\")}}class YL extends VL{constructor(t){super(t,\"borderStyle\")}_getAttribute(t){if(!t){return}return lT(t.getAttribute(this.attributeName))}}class GL extends VL{constructor(t){super(t,\"borderColor\")}_getAttribute(t){if(!t){return}return lT(t.getAttribute(this.attributeName))}}class JL extends VL{constructor(t){super(t,\"borderWidth\")}_getAttribute(t){if(!t){return}return lT(t.getAttribute(this.attributeName))}_getValueToSet(t){return dT(t,\"px\")}}const XL=/^(top|bottom)$/;class QL extends Nw{static get pluginName(){return\"TableCellPropertiesEditing\"}static get requires(){return[zE]}init(){const t=this.editor;const e=t.model.schema;const i=t.conversion;t.data.addStyleProcessorRules(vL);KL(e,i);t.commands.add(\"tableCellBorderStyle\",new YL(t));t.commands.add(\"tableCellBorderColor\",new GL(t));t.commands.add(\"tableCellBorderWidth\",new JL(t));ZL(e,i);t.commands.add(\"tableCellHorizontalAlignment\",new $L(t));ez(e,i,\"width\",\"width\");t.commands.add(\"tableCellWidth\",new HL(t));ez(e,i,\"height\",\"height\");t.commands.add(\"tableCellHeight\",new WL(t));t.data.addStyleProcessorRules(OL);ez(e,i,\"padding\",\"padding\");t.commands.add(\"tableCellPadding\",new FL(t));t.data.addStyleProcessorRules(LL);ez(e,i,\"backgroundColor\",\"background-color\");t.commands.add(\"tableCellBackgroundColor\",new UL(t));tz(e,i);t.commands.add(\"tableCellVerticalAlignment\",new qL(t))}}function KL(t,e){t.extend(\"tableCell\",{allowAttributes:[\"borderWidth\",\"borderColor\",\"borderStyle\"]});jL(e,\"td\");jL(e,\"th\");DL(e,\"tableCell\",\"borderStyle\",\"border-style\");DL(e,\"tableCell\",\"borderColor\",\"border-color\");DL(e,\"tableCell\",\"borderWidth\",\"border-width\")}function ZL(t,e){t.extend(\"tableCell\",{allowAttributes:[\"horizontalAlignment\"]});e.attributeToAttribute({model:{name:\"tableCell\",key:\"horizontalAlignment\",values:[\"right\",\"center\",\"justify\"]},view:{right:{key:\"style\",value:{\"text-align\":\"right\"}},center:{key:\"style\",value:{\"text-align\":\"center\"}},justify:{key:\"style\",value:{\"text-align\":\"justify\"}}}})}function tz(t,e){t.extend(\"tableCell\",{allowAttributes:[\"verticalAlignment\"]});e.attributeToAttribute({model:{name:\"tableCell\",key:\"verticalAlignment\",values:[\"top\",\"bottom\"]},view:{top:{key:\"style\",value:{\"vertical-align\":\"top\"}},bottom:{key:\"style\",value:{\"vertical-align\":\"bottom\"}}}});e.for(\"upcast\").attributeToAttribute({view:{attributes:{valign:XL}},model:{name:\"tableCell\",key:\"verticalAlignment\",value:t=>t.getAttribute(\"valign\")}})}function ez(t,e,i,n){t.extend(\"tableCell\",{allowAttributes:[i]});RL(e,\"tableCell\",i,n);DL(e,\"tableCell\",i,n)}class iz extends Nw{static get pluginName(){return\"TableCellProperties\"}static get requires(){return[QL,kL]}}class nz extends Rw{constructor(t,e){super(t);this.attributeName=e}refresh(){const t=this.editor;const e=t.model.document.selection;const i=sT(\"table\",e.getFirstPosition());this.isEnabled=!!i;this.value=this._getValue(i)}execute(t={}){const e=this.editor.model;const i=e.document.selection;const{value:n,batch:o}=t;const r=sT(\"table\",i.getFirstPosition());const s=this._getValueToSet(n);e.enqueueChange(o||\"default\",t=>{if(s){t.setAttribute(this.attributeName,s,r)}else{t.removeAttribute(this.attributeName,r)}})}_getValue(t){if(!t){return}return t.getAttribute(this.attributeName)}_getValueToSet(t){return t}}class oz extends nz{constructor(t){super(t,\"backgroundColor\")}}class rz extends nz{constructor(t){super(t,\"borderColor\")}_getValue(t){if(!t){return}return lT(t.getAttribute(this.attributeName))}}class sz extends nz{constructor(t){super(t,\"borderStyle\")}_getValue(t){if(!t){return}return lT(t.getAttribute(this.attributeName))}}class az extends nz{constructor(t){super(t,\"borderWidth\")}_getValue(t){if(!t){return}return lT(t.getAttribute(this.attributeName))}_getValueToSet(t){return dT(t,\"px\")}}class cz extends nz{constructor(t){super(t,\"width\")}_getValueToSet(t){return dT(t,\"px\")}}class lz extends nz{constructor(t){super(t,\"height\")}_getValueToSet(t){return dT(t,\"px\")}}class dz extends nz{constructor(t){super(t,\"alignment\")}}const uz=/^(left|right)$/;class hz extends Nw{static get pluginName(){return\"TablePropertiesEditing\"}static get requires(){return[zE]}init(){const t=this.editor;const e=t.model.schema;const i=t.conversion;t.data.addStyleProcessorRules(vL);fz(e,i);t.commands.add(\"tableBorderColor\",new rz(t));t.commands.add(\"tableBorderStyle\",new sz(t));t.commands.add(\"tableBorderWidth\",new az(t));mz(e,i);t.commands.add(\"tableAlignment\",new dz(t));pz(e,i,\"width\",\"width\");t.commands.add(\"tableWidth\",new cz(t));pz(e,i,\"height\",\"height\");t.commands.add(\"tableHeight\",new lz(t));t.data.addStyleProcessorRules(LL);gz(e,i,\"backgroundColor\",\"background-color\");t.commands.add(\"tableBackgroundColor\",new oz(t))}}function fz(t,e){t.extend(\"table\",{allowAttributes:[\"borderWidth\",\"borderColor\",\"borderStyle\"]});jL(e,\"table\");BL(e,\"borderColor\",\"border-color\");BL(e,\"borderStyle\",\"border-style\");BL(e,\"borderWidth\",\"border-width\")}function mz(t,e){t.extend(\"table\",{allowAttributes:[\"alignment\"]});e.attributeToAttribute({model:{name:\"table\",key:\"alignment\",values:[\"left\",\"right\"]},view:{left:{key:\"style\",value:{float:\"left\"}},right:{key:\"style\",value:{float:\"right\"}}},converterPriority:\"high\"});e.for(\"upcast\").attributeToAttribute({view:{attributes:{align:uz}},model:{name:\"table\",key:\"alignment\",value:t=>t.getAttribute(\"align\")}})}function gz(t,e,i,n){t.extend(\"table\",{allowAttributes:[i]});RL(e,\"table\",i,n);BL(e,i,n)}function pz(t,e,i,n){t.extend(\"table\",{allowAttributes:[i]});RL(e,\"table\",i,n);DL(e,\"table\",i,n)}var bz=i(138);const wz={left:ev,center:iv,right:nv};class _z extends gb{constructor(t,e){super(t);this.set({borderStyle:\"\",borderWidth:\"\",borderColor:\"\",backgroundColor:\"\",width:\"\",height:\"\",alignment:\"\"});this.options=e;const{borderStyleDropdown:i,borderWidthInput:n,borderColorInput:o,borderRowLabel:r}=this._createBorderFields();const{widthInput:s,operatorLabel:a,heightInput:c,dimensionsLabel:l}=this._createDimensionFields();const{alignmentToolbar:d,alignmentLabel:u}=this._createAlignmentFields();this.focusTracker=new xp;this.keystrokes=new dp;this.children=this.createCollection();this.borderStyleDropdown=i;this.borderWidthInput=n;this.borderColorInput=o;this.backgroundInput=this._createBackgroundField();this.widthInput=s;this.heightInput=c;this.alignmentToolbar=d;const{saveButtonView:h,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=h;this.cancelButtonView=f;this._focusables=new Bp;this._focusCycler=new Nb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"shift + tab\",focusNext:\"tab\"}});this.children.add(new cL(t,{label:this.t(\"Table properties\")}));this.children.add(new sL(t,{labelView:r,children:[r,i,o,n],class:\"ck-table-form__border-row\"}));this.children.add(new sL(t,{children:[this.backgroundInput]}));this.children.add(new sL(t,{children:[new sL(t,{labelView:l,children:[l,s,a,c],class:\"ck-table-form__dimensions-row\"}),new sL(t,{labelView:u,children:[u,d],class:\"ck-table-properties-form__alignment-row\"})]}));this.children.add(new sL(t,{children:[this.saveButtonView,this.cancelButtonView],class:\"ck-table-form__action-row\"}));this.setTemplate({tag:\"form\",attributes:{class:[\"ck\",\"ck-form\",\"ck-table-form\",\"ck-table-properties-form\"],tabindex:\"-1\"},children:this.children})}render(){super.render();uk({view:this});[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const t=eL({colorConfig:this.options.borderColors,columns:5});const e=this.locale;const i=this.t;const n=new Ab(e);n.text=i(\"mf\");const o=$O(this.t);const r=new zO(e,jO);r.set({label:i(\"mg\"),class:\"ck-table-form__border-style\"});r.view.buttonView.set({isOn:false,withText:true,tooltip:i(\"mg\")});r.view.buttonView.bind(\"label\").to(this,\"borderStyle\",t=>o[t?t:\"none\"]);r.view.on(\"execute\",t=>{this.borderStyle=t.source._borderStyleValue});hw(r.view,KO(this));const s=new zO(e,RO);s.set({label:i(\"mh\"),class:\"ck-table-form__border-width\"});s.view.bind(\"value\").to(this,\"borderWidth\");s.bind(\"isEnabled\").to(this,\"borderStyle\",kz);s.view.on(\"input\",()=>{this.borderWidth=s.view.element.value});const a=new zO(e,t);a.set({label:i(\"mi\"),class:\"ck-table-form__border-color\"});a.view.bind(\"value\").to(this,\"borderColor\");a.bind(\"isEnabled\").to(this,\"borderStyle\",kz);a.view.on(\"input\",()=>{this.borderColor=a.view.value});this.on(\"change:borderStyle\",(t,e,i)=>{if(!kz(i)){this.borderColor=\"\";this.borderWidth=\"\"}});return{borderRowLabel:n,borderStyleDropdown:r,borderColorInput:a,borderWidthInput:s}}_createBackgroundField(){const t=eL({colorConfig:this.options.backgroundColors,columns:5});const e=this.locale;const i=this.t;const n=new zO(e,t);n.set({label:i(\"mj\"),class:\"ck-table-properties-form__background\"});n.view.bind(\"value\").to(this,\"backgroundColor\");n.view.on(\"input\",()=>{this.backgroundColor=n.view.value});return n}_createDimensionFields(){const t=this.locale;const e=this.t;const i=new Ab(t);i.text=e(\"mk\");const n=new zO(t,RO);n.set({label:e(\"mh\"),class:\"ck-table-form__dimensions-row__width\"});n.view.bind(\"value\").to(this,\"width\");n.view.on(\"input\",()=>{this.width=n.view.element.value});const o=new gb(t);o.setTemplate({tag:\"span\",attributes:{class:[\"ck-table-form__dimension-operator\"]},children:[{text:\"×\"}]});const r=new zO(t,RO);r.set({label:e(\"ml\"),class:\"ck-table-form__dimensions-row__height\"});r.view.bind(\"value\").to(this,\"height\");r.view.on(\"input\",()=>{this.height=r.view.element.value});return{dimensionsLabel:i,widthInput:n,operatorLabel:o,heightInput:r}}_createAlignmentFields(){const t=this.locale;const e=this.t;const i=new Ab(t);i.text=e(\"my\");const n=new _w(t);n.set({isCompact:true,ariaLabel:e(\"mz\")});ZO({view:this,icons:wz,toolbar:n,labels:this._alignmentLabels,propertyName:\"alignment\",nameToValue:t=>t===\"center\"?\"\":t});return{alignmentLabel:i,alignmentToolbar:n}}_createActionButtons(){const t=this.locale;const e=this.t;const i=new Kb(t);const n=new Kb(t);const o=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];i.set({label:e(\"lv\"),icon:hk,class:\"ck-button-save\",type:\"submit\",withText:true});i.bind(\"isEnabled\").toMany(o,\"errorText\",(...t)=>t.every(t=>!t));n.set({label:e(\"lw\"),icon:fk,class:\"ck-button-cancel\",type:\"cancel\",withText:true});n.delegate(\"execute\").to(this,\"cancel\");return{saveButtonView:i,cancelButtonView:n}}get _alignmentLabels(){const t=this.locale;const e=this.t;const i=e(\"na\");const n=e(\"nb\");const o=e(\"nc\");if(t.uiLanguageDirection===\"rtl\"){return{right:o,center:n,left:i}}else{return{left:i,center:n,right:o}}}}function kz(t){return!!t}var vz='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z\" opacity=\".6\"/><path d=\"M15.5 11.5l1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z\"/></svg>';const yz=500;class xz extends Nw{static get requires(){return[Mk]}static get pluginName(){return\"TablePropertiesUI\"}constructor(t){super(t);t.config.define(\"table.tableProperties\",{borderColors:tL,backgroundColors:tL})}init(){const t=this.editor;const e=t.t;this._balloon=t.plugins.get(Mk);this.view=this._createPropertiesView();this._undoStepBatch=null;t.ui.componentFactory.add(\"tableProperties\",t=>{const i=new Kb(t);i.set({label:e(\"ju\"),icon:vz,tooltip:true});this.listenTo(i,\"execute\",()=>this._showView());return i})}destroy(){super.destroy();this.view.destroy()}_createPropertiesView(){const t=this.editor;const e=t.editing.view.document;const i=t.config.get(\"table.tableProperties\");const n=NP(i.borderColors);const o=IP(t.locale,n);const r=NP(i.backgroundColors);const s=IP(t.locale,r);const a=new _z(t.locale,{borderColors:o,backgroundColors:s});const c=t.t;a.render();this.listenTo(a,\"submit\",()=>{this._hideView()});this.listenTo(a,\"cancel\",()=>{if(this._undoStepBatch.operations.length){t.execute(\"undo\",this._undoStepBatch)}this._hideView()});a.keystrokes.set(\"Esc\",(t,e)=>{this._hideView();e()});this.listenTo(t.ui,\"update\",()=>{if(!kT(e.selection)){this._hideView()}else if(this._isViewVisible){WO(t,\"table\")}});aw({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const l=YO(c);const d=GO(c);a.on(\"change:borderStyle\",this._getPropertyChangeCallback(\"tableBorderStyle\"));a.on(\"change:borderColor\",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:\"tableBorderColor\",errorText:l,validator:JO}));a.on(\"change:borderWidth\",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:\"tableBorderWidth\",errorText:d,validator:QO}));a.on(\"change:backgroundColor\",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:\"tableBackgroundColor\",errorText:l,validator:JO}));a.on(\"change:width\",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:\"tableWidth\",errorText:d,validator:XO}));a.on(\"change:height\",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:\"tableHeight\",errorText:d,validator:XO}));a.on(\"change:alignment\",this._getPropertyChangeCallback(\"tableAlignment\"));return a}_fillViewFormFromCommandValues(){const t=this.editor.commands;this.view.set({borderStyle:t.get(\"tableBorderStyle\").value||\"\",borderColor:t.get(\"tableBorderColor\").value||\"\",borderWidth:t.get(\"tableBorderWidth\").value||\"\",backgroundColor:t.get(\"tableBackgroundColor\").value||\"\",width:t.get(\"tableWidth\").value||\"\",height:t.get(\"tableHeight\").value||\"\",alignment:t.get(\"tableAlignment\").value||\"\"})}_showView(){const t=this.editor;this._balloon.add({view:this.view,position:UO(t)});this._undoStepBatch=t.model.createBatch();this._fillViewFormFromCommandValues();this.view.focus()}_hideView(){if(!this._isViewInBalloon){return}const t=this.editor;this.stopListening(t.ui,\"update\");this.view.saveButtonView.focus();this._balloon.remove(this.view);this.editor.editing.view.focus()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(t){return(e,i,n)=>{this.editor.execute(t,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback({commandName:t,viewField:e,validator:i,errorText:n}){const o=uh(()=>{e.errorText=n},yz);return(n,r,s)=>{o.cancel();if(i(s)){this.editor.execute(t,{value:s,batch:this._undoStepBatch});e.errorText=null}else{o()}}}}class Az extends Nw{static get pluginName(){return\"TableProperties\"}static get requires(){return[hz,xz]}}const Cz=\"todoListChecked\";class Tz extends Rw{constructor(t){super(t);this._selectedElements=[];this.on(\"execute\",()=>{this.refresh()},{priority:\"highest\"})}refresh(){this._selectedElements=this._getSelectedItems();this.value=this._selectedElements.every(t=>!!t.getAttribute(\"todoListChecked\"));this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const t=this.editor.model;const e=t.schema;const i=t.document.selection.getFirstRange();const n=i.start.parent;const o=[];if(e.checkAttribute(n,Cz)){o.push(n)}for(const t of i.getItems()){if(e.checkAttribute(t,Cz)&&!o.includes(t)){o.push(t)}}return o}execute(t={}){this.editor.model.change(e=>{for(const i of this._selectedElements){const n=t.forceValue===undefined?!this.value:t.forceValue;if(n){e.setAttribute(Cz,true,i)}else{e.removeAttribute(Cz,i)}}})}}function Ez(t,e){return(i,n,o)=>{const r=o.consumable;if(!r.test(n.item,\"insert\")||!r.test(n.item,\"attribute:listType\")||!r.test(n.item,\"attribute:listIndent\")){return}if(n.item.getAttribute(\"listType\")!=\"todo\"){return}const s=n.item;r.consume(s,\"insert\");r.consume(s,\"attribute:listType\");r.consume(s,\"attribute:listIndent\");r.consume(s,\"attribute:todoListChecked\");const a=o.writer;const c=iA(s,o);const l=!!s.getAttribute(\"todoListChecked\");const d=Lz(s,a,l,e);a.addClass(\"todo-list\",c.parent);a.insert(a.createPositionAt(c,0),d);nA(s,c,o,t)}}function Mz(t){return(e,i,n)=>{const o=n.consumable;if(!o.test(i.item,\"insert\")||!o.test(i.item,\"attribute:listType\")||!o.test(i.item,\"attribute:listIndent\")){return}if(i.item.getAttribute(\"listType\")!=\"todo\"){return}o.consume(i.item,\"insert\");o.consume(i.item,\"attribute:listType\");o.consume(i.item,\"attribute:listIndent\");const r=n.writer;const s=i.item;const a=iA(s,n);r.addClass(\"todo-list\",a.parent);const c=r.createAttributeElement(\"label\",{class:\"todo-list__label\"});const l=r.createEmptyElement(\"input\",{type:\"checkbox\",disabled:\"disabled\"});if(i.item.getAttribute(\"todoListChecked\")){r.setAttribute(\"checked\",\"checked\",l);r.addClass(\"todo-list__label\",c)}r.insert(r.createPositionAt(a,0),l);r.wrap(r.createRangeOn(l),c);nA(s,a,n,t)}}function Pz(t,e,i){const n=e.range.start.parent;if(n.name!=\"listItem\"||n.getAttribute(\"listType\")!=\"todo\"){return}if(!i.consumable.consume(e.item,\"insert\")){return}const o=i.writer;const r=i.mapper.toViewPosition(e.range.start);const s=o.createText(e.item.data);const a=o.createAttributeElement(\"span\",{class:\"todo-list__label__description\"});const c=r.parent.getChild(0);o.insert(o.createPositionAt(r.parent,\"end\"),s);o.wrap(o.createRangeOn(s),a);o.wrap(o.createRangeOn(s.parent),c)}function Sz(t,e,i){const n=e.modelCursor;const o=n.parent;const r=e.viewItem;if(r.getAttribute(\"type\")!=\"checkbox\"||o.name!=\"listItem\"||!n.isAtStart){return}if(!i.consumable.consume(r,{name:true})){return}const s=i.writer;s.setAttribute(\"listType\",\"todo\",o);if(e.viewItem.hasAttribute(\"checked\")){s.setAttribute(\"todoListChecked\",true,o)}e.modelRange=s.createRange(n)}function Iz(t,e){return(i,n,o)=>{const r=o.mapper.toViewElement(n.item);const s=o.writer;if(n.attributeNewValue==\"todo\"){const e=!!n.item.getAttribute(\"todoListChecked\");const i=Lz(n.item,s,e,t);s.addClass(\"todo-list\",r.parent);s.insert(s.createPositionAt(r,0),i)}else if(n.attributeOldValue==\"todo\"){s.removeClass(\"todo-list\",r.parent);s.remove(zz(r,e))}}}function Nz(t){return(e,i,n)=>{if(i.item.getAttribute(\"listType\")!=\"todo\"){return}if(!n.consumable.consume(i.item,\"attribute:todoListChecked\")){return}const{mapper:o,writer:r}=n;const s=!!i.item.getAttribute(\"todoListChecked\");const a=o.toViewElement(i.item);const c=a.getChild(0);const l=Lz(i.item,r,s,t);r.insert(r.createPositionAfter(c),l);r.remove(c)}}function Oz(t,e){return(i,n)=>{const o=n.modelPosition;const r=o.parent;if(!r.is(\"listItem\")||r.getAttribute(\"listType\")!=\"todo\"||o.offset!==0){return}const s=e.toViewElement(r);const a=zz(s,t);if(!a){return}if(a.nextSibling&&!a.nextSibling.is(\"uiElement\")){n.viewPosition=t.createPositionAt(a.nextSibling,0)}else{n.viewPosition=t.createPositionAfter(a)}}}function Lz(t,e,i,n){const o=e.createUIElement(\"label\",{class:\"todo-list__label\",contenteditable:false},(function(e){const o=_b(document,\"input\",{type:\"checkbox\"});if(i){o.setAttribute(\"checked\",\"checked\")}o.addEventListener(\"change\",()=>n(t));const r=this.toDomElement(e);r.appendChild(o);return r}));return o}function zz(t,e){const i=e.createRangeIn(t);for(const t of i){if(t.item.is(\"uiElement\",\"label\")){return t.item}}}class Rz extends Nw{static get pluginName(){return\"TodoListEditing\"}static get requires(){return[MA]}init(){const t=this.editor;const{editing:e,data:i,model:n}=t;n.schema.extend(\"listItem\",{allowAttributes:[\"todoListChecked\"]});n.schema.addAttributeCheck((t,e)=>{const i=t.last;if(e==\"todoListChecked\"&&i.name==\"listItem\"&&i.getAttribute(\"listType\")!=\"todo\"){return false}});t.commands.add(\"todoList\",new Qx(t,\"todo\"));t.commands.add(\"todoListCheck\",new Tz(t));i.downcastDispatcher.on(\"insert:listItem\",Mz(n),{priority:\"high\"});i.downcastDispatcher.on(\"insert:$text\",Pz,{priority:\"high\"});e.downcastDispatcher.on(\"insert:listItem\",Ez(n,t=>this._handleCheckmarkChange(t)),{priority:\"high\"});e.downcastDispatcher.on(\"attribute:listType:listItem\",Iz(t=>this._handleCheckmarkChange(t),e.view));e.downcastDispatcher.on(\"attribute:todoListChecked:listItem\",Nz(t=>this._handleCheckmarkChange(t)));e.mapper.on(\"modelToViewPosition\",Oz(e.view,e.mapper));i.upcastDispatcher.on(\"element:input\",Sz,{priority:\"high\"});const o=t.locale.contentLanguageDirection===\"ltr\"?\"arrowleft\":\"arrowright\";t.keystrokes.set(o,(t,e)=>jz(e,n));t.keystrokes.set(\"Ctrl+space\",()=>t.execute(\"todoListCheck\"));const r=new Set;this.listenTo(n,\"applyOperation\",(t,e)=>{const i=e[0];if(i.type==\"rename\"&&i.oldName==\"listItem\"){const t=i.position.nodeAfter;if(t.hasAttribute(\"todoListChecked\")){r.add(t)}}else if(i.type==\"changeAttribute\"&&i.key==\"listType\"&&i.oldValue===\"todo\"){for(const t of i.range.getItems()){if(t.hasAttribute(\"todoListChecked\")&&t.getAttribute(\"listType\")!==\"todo\"){r.add(t)}}}});n.document.registerPostFixer(t=>{let e=false;for(const i of r){t.removeAttribute(\"todoListChecked\",i);e=true}r.clear();return e})}_handleCheckmarkChange(t){const e=this.editor;const i=e.model;const n=Array.from(i.document.selection.getRanges());i.change(i=>{i.setSelection(t,\"end\");e.execute(\"todoListCheck\");i.setSelection(n)})}}function jz(t,e){const i=e.schema;const n=e.document.selection;if(!n.isCollapsed){return}const o=n.getFirstPosition();const r=o.parent;if(r.name===\"listItem\"&&r.getAttribute(\"listType\")==\"todo\"&&o.isAtStart){const n=i.getNearestSelectionRange(e.createPositionBefore(r),\"backward\");if(n){t();e.change(t=>t.setSelection(n))}}}var Dz='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2.315 14.705l2.224-2.24a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.682.682 0 0 1-.112.089.647.647 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.717.722zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75zM2.329 5.745l2.21-2.226a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.685.685 0 0 1-.496.196.644.644 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z\"/></svg>';class Bz extends Nw{init(){const t=this.editor.t;aA(this.editor,\"todoList\",t(\"jw\"),Dz)}}var Vz=i(140);class Fz extends Nw{static get requires(){return[Rz,Bz]}static get pluginName(){return\"TodoList\"}}const Hz=\"underline\";class Wz extends Nw{static get pluginName(){return\"UnderlineEditing\"}init(){const t=this.editor;t.model.schema.extend(\"$text\",{allowAttributes:Hz});t.model.schema.setAttributeProperties(Hz,{isFormatting:true,copyOnEnter:true});t.conversion.attributeToElement({model:Hz,view:\"u\",upcastAlso:{styles:{\"text-decoration\":\"underline\"}}});t.commands.add(Hz,new Gw(t,Hz));t.keystrokes.set(\"CTRL+U\",\"underline\")}}var Uz='<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z\"/></svg>';const qz=\"underline\";class $z extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(qz,i=>{const n=t.commands.get(qz);const o=new Kb(i);o.set({label:e(\"jj\"),icon:Uz,keystroke:\"CTRL+U\",tooltip:true,isToggleable:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{t.execute(qz);t.editing.view.focus()});return o})}}class Yz extends Nw{static get requires(){return[Wz,$z]}static get pluginName(){return\"Underline\"}}function Gz(t){if(t.is(\"text\")||t.is(\"textProxy\")){return t.data}let e=\"\";let i=null;for(const n of t.getChildren()){const t=Gz(n);if(i&&i.is(\"element\")){e+=\"\\n\"}e+=t;i=n}return e}class Jz extends Nw{constructor(t){super(t);this.set(\"characters\",0);this.set(\"words\",0);Object.defineProperties(this,{characters:{get(){return this.characters=this._getCharacters()}},words:{get(){return this.words=this._getWords()}}});this.set(\"_wordsLabel\");this.set(\"_charactersLabel\");this._config=t.config.get(\"wordCount\")||{};this._outputView;this._wordsMatchRegExp=Cl.features.isRegExpUnicodePropertySupported?new RegExp(\"[\\\\p{L}\\\\p{N}\\\\p{M}\\\\p{Pd}\\\\p{Pc}]+\",\"gu\"):/[_\\-a-zA-Z0--ž]+/gu}static get pluginName(){return\"WordCount\"}init(){const t=this.editor;t.model.document.on(\"change:data\",WS(this._refreshStats.bind(this),250));if(typeof this._config.onUpdate==\"function\"){this.on(\"update\",(t,e)=>{this._config.onUpdate(e)})}if(Gr(this._config.container)){this._config.container.appendChild(this.wordCountContainer)}}destroy(){if(this._outputView){this._outputView.element.remove();this._outputView.destroy()}super.destroy()}get wordCountContainer(){const t=this.editor;const e=t.t;const i=t.config.get(\"wordCount.displayWords\");const n=t.config.get(\"wordCount.displayCharacters\");const o=Hp.bind(this,this);const r=[];if(!this._outputView){this._outputView=new gb;if(i||i===undefined){this.bind(\"_wordsLabel\").to(this,\"words\",t=>e(\"ix\",[t]));r.push({tag:\"div\",children:[{text:[o.to(\"_wordsLabel\")]}],attributes:{class:\"ck-word-count__words\"}})}if(n||n===undefined){this.bind(\"_charactersLabel\").to(this,\"characters\",t=>e(\"iy\",[t]));r.push({tag:\"div\",children:[{text:[o.to(\"_charactersLabel\")]}],attributes:{class:\"ck-word-count__characters\"}})}this._outputView.setTemplate({tag:\"div\",attributes:{class:[\"ck\",\"ck-word-count\"]},children:r});this._outputView.render()}return this._outputView.element}_getCharacters(){const t=Gz(this.editor.model.document.getRoot());return t.replace(/\\n/g,\"\").length}_getWords(){const t=Gz(this.editor.model.document.getRoot());const e=t.match(this._wordsMatchRegExp)||[];return e.length}_refreshStats(){const t=this.words=this._getWords();const e=this.characters=this._getCharacters();this.fire(\"update\",{words:t,characters:e})}}class Xz extends Rw{execute(){const t=this.editor.model;const e=t.document;t.change(i=>{Qz(this.editor.model,i,e.selection,t.schema);this.fire(\"afterExecute\",{writer:i})})}}function Qz(t,e,i,n){const o=i.isCollapsed;const r=i.getFirstRange();const s=r.start.parent;const a=r.end.parent;if(n.isLimit(s)||n.isLimit(a)){if(!o&&s==a){t.deleteContent(i)}return}if(o){const t=SM(e.model.schema,i.getAttributes());Kz(e,r.start);e.setSelectionAttribute(t)}else{const n=!(r.start.isAtStart&&r.end.isAtEnd);const o=s==a;t.deleteContent(i,{leaveUnmerged:n});if(n){if(o){Kz(e,i.focus)}else{e.setSelection(a,0)}}}}function Kz(t,e){t.split(e);t.setSelection(e.parent.nextSibling,0)}class Zz extends Nw{static get pluginName(){return\"Enter\"}init(){const t=this.editor;const e=t.editing.view;const i=e.document;e.addObserver(RM);t.commands.add(\"enter\",new Xz(t));this.listenTo(i,\"enter\",(i,n)=>{n.preventDefault();if(n.isSoft){return}t.execute(\"enter\");e.scrollToTheSelection()},{priority:\"low\"})}}class tR extends Nw{static get requires(){return[oy,Zz,jM,ZN,pC]}static get pluginName(){return\"Essentials\"}}class eR extends Tw{}eR.builtinPlugins=[Lw,Yw,t_,m_,jk,Jk,hv,bv,uy,by,xy,Xx,OA,CC,rT,nM,oM,kM,vM,PM,dP,jP,HP,ZP,lS,_S,SS,GS,TI,pN,bN,MN,LN,lO,gO,hO,dO,fO,uO,mO,vO,EO,OO,iz,Az,Fz,Yz,Jz,tR,n_]}])[\"default\"]}));"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA","sourceRoot":""}