/* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ !function(){CKEDITOR.on("dialogDefinition",function(e){var t;t=e.data.name,e=e.data.definition,"link"==t?(e.removeContents("target"),e.removeContents("upload"),e.removeContents("advanced"),t=e.getContents("info"),t.remove("emailSubject"),t.remove("emailBody")):"image"==t&&(e.removeContents("advanced"),t=e.getContents("Link"),t.remove("cmbTarget"),t=e.getContents("info"),t.remove("txtAlt"),t.remove("basic"))});var e,t={b:"strong",u:"u",i:"em",s:"s",color:"span",size:"span",left:"div",right:"div",center:"div",justify:"div",quote:"blockquote",code:"code",url:"a",email:"span",img:"span","*":"li",list:"ol"},n={strong:"b",b:"b",u:"u",em:"i",i:"i",s:"s",code:"code",li:"*"},i={strong:"b",em:"i",u:"u",s:"s",li:"*",ul:"list",ol:"list",code:"code",a:"link",img:"img",blockquote:"quote"},r={color:"color",size:"font-size",left:"text-align",center:"text-align",right:"text-align",justify:"text-align"},s={url:"href",email:"mailhref",quote:"cite",list:"listType"},a=CKEDITOR.dtd,l=CKEDITOR.tools.extend({table:1},a.$block,a.$listItem,a.$tableContent,a.$list),o=/\s*(?:;\s*|$)/,u={smiley:":)",sad:":(",wink:";)",laugh:":D",cheeky:":P",blush:":*)",surprise:":-o",indecision:":|",angry:">:(",angel:"o:)",cool:"8-)",devil:">:-)",crying:";(",kiss:":-*"},c={},h=[];for(e in u)c[u[e]]=e,h.push(u[e].replace(/\(|\)|\:|\/|\*|\-|\|/g,function(e){return"\\"+e}));var h=new RegExp(h.join("|"),"g"),f=function(){var e,t=[],n={nbsp:" ",shy:"­"};for(e in n)t.push(e);return t=new RegExp("&("+t.join("|")+");","g"),function(e){return e.replace(t,function(e,t){return n[t]})}}();CKEDITOR.BBCodeParser=function(){this._={bbcPartsRegex:/(?:\[([^\/\]=]*?)(?:=([^\]]*?))?\])|(?:\[\/([a-z]{1,16})\])/gi}},CKEDITOR.BBCodeParser.prototype={parse:function(e){for(var n,i,a=0;n=this._.bbcPartsRegex.exec(e);)if(i=n.index,i>a&&(a=e.substring(a,i),this.onText(a,1)),a=this._.bbcPartsRegex.lastIndex,(i=(n[1]||n[3]||"").toLowerCase())&&!t[i])this.onText(n[0]);else if(n[1]){var l=t[i],u={},c={};if(n=n[2],("left"==i||"right"==i||"center"==i||"justify"==i)&&(n=i),n)if("list"==i&&(isNaN(n)?/^[a-z]+$/.test(n)?n="lower-alpha":/^[A-Z]+$/.test(n)&&(n="upper-alpha"):n="decimal"),r[i]){"size"==i&&(n+="%"),c[r[i]]=n,n=u;var h="",f=void 0;for(f in c)var d=(f+":"+c[f]).replace(o,";"),h=h+d;n.style=h}else s[i]&&(u[s[i]]=CKEDITOR.tools.htmlDecode(n));("email"==i||"img"==i)&&(u.bbcode=i),this.onTagOpen(l,u,CKEDITOR.dtd.$empty[l])}else n[3]&&this.onTagClose(t[i]);e.length>a&&this.onText(e.substring(a,e.length),1)}},CKEDITOR.htmlParser.fragment.fromBBCode=function(e){function t(e){if(00&&m.children[n-1],n=!r&&d.getRule(i[m.name],"breakAfterOpen"),r=r&&r.type==CKEDITOR.NODE_ELEMENT&&d.getRule(i[r.name],"breakAfterClose"),s=e&&d.getRule(i[e],t?"breakBeforeClose":"breakBeforeOpen");f&&(n||r||s)&&f--,f&&e in l&&f++;for(;f&&f--;)m.children.push(new CKEDITOR.htmlParser.element("br"))}function r(e,t){n(e.name,1),t=t||m||o;var i=t.children.length;e.previous=i>0&&t.children[i-1]||null,e.parent=t,t.children.push(e),e.returnPoint&&(m=e.returnPoint,delete e.returnPoint)}var s,a=new CKEDITOR.BBCodeParser,o=new CKEDITOR.htmlParser.fragment,u=[],f=0,m=o;a.onTagOpen=function(e,i){var l=new CKEDITOR.htmlParser.element(e,i);if(CKEDITOR.dtd.$removeEmpty[e])u.push(l);else{var o=m.name,c=o&&(CKEDITOR.dtd[o]||(m._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span));if(c&&!c[e]){var h,c=!1;if(e==o?r(m,m.parent):(e in CKEDITOR.dtd.$listItem?(a.onTagOpen("ul",{}),h=m):(r(m,m.parent),u.unshift(m)),c=!0),m=h?h:m.returnPoint||m.parent,c)return void a.onTagOpen.apply(this,arguments)}t(e),n(e),l.parent=m,l.returnPoint=s,s=0,l.isEmpty?r(l):m=l}},a.onTagClose=function(e){for(var t=u.length-1;t>=0;t--)if(e==u[t].name)return void u.splice(t,1);for(var n=[],i=[],s=m;s.type&&s.name!=e;)s._.isBlockLike||i.unshift(s),n.push(s),s=s.parent;if(s.type){for(t=0;t