/* 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.plugins.add("div",{requires:"dialog",lang:"af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn",icons:"creatediv",hidpi:!0,init:function(e){if(!e.blockless){var d=e.lang.div,i="div(*)";CKEDITOR.dialog.isTabEnabled(e,"editdiv","advanced")&&(i+=";div[dir,id,lang,title]{*}"),e.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:i,requiredContent:"div",contextSensitive:!0,contentTransformations:[["div: alignmentToStyle"]],refresh:function(e,d){this.setState("div"in(e.config.div_wrapTable?d.root:d.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})),e.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"})),e.addCommand("removediv",{requiredContent:"div",exec:function(e){function d(d){(d=CKEDITOR.plugins.div.getSurroundDiv(e,d))&&!d.data("cke-div-added")&&(o.push(d),d.data("cke-div-added"))}for(var i,t=e.getSelection(),n=t&&t.getRanges(),a=t.createBookmarks(),o=[],r=0;r