!function(){function t(t){var e=this.att;void 0!==(t=t&&t.hasAttribute(e)&&t.getAttribute(e)||"")&&this.setValue(t)}function e(){for(var t,e=0;e<arguments.length;e++)if(arguments[e]instanceof NEW_CKEDITOR.dom.element){t=arguments[e];break}if(t){e=this.att;var i=this.getValue();i?t.setAttribute(e,i):t.removeAttribute(e,i)}}var i={id:1,dir:1,classes:1,styles:1};NEW_CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(t){t||(t=i);var e=[];t.id&&e.push("id"),t.dir&&e.push("dir");var l="";return e.length&&(l+="["+e.join(",")+"]"),t.classes&&(l+="(*)"),t.styles&&(l+="{*}"),l},createAdvancedTab:function(l,s,a){s||(s=i);var n=l.lang.common,d={id:"advanced",label:n.advancedTab,title:n.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},r=[];return(s.id||s.dir)&&(s.id&&r.push({id:"advId",att:"id",type:"text",requiredContent:a?a+"[id]":null,label:n.id,setup:t,commit:e}),s.dir&&r.push({id:"advLangDir",att:"dir",type:"select",requiredContent:a?a+"[dir]":null,label:n.langDir,default:"",style:"width:100%",items:[[n.notSet,""],[n.langDirLTR,"ltr"],[n.langDirRTL,"rtl"]],setup:t,commit:e}),d.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(r)})),(s.styles||s.classes)&&(r=[],s.styles&&r.push({id:"advStyles",att:"style",type:"text",requiredContent:a?a+"{edi-xyz}":null,label:n.styles,default:"",validate:NEW_CKEDITOR.dialog.validate.inlineStyle(n.invalidInlineStyle),onChange:function(){},getStyle:function(t,e){var i=this.getValue().match(new RegExp("(?:^|;)\\s*"+t+"\\s*:\\s*([^;]*)","i"));return i?i[1]:e},updateStyle:function(t,e){var i=this.getValue(),s=l.document.createElement("span");s.setAttribute("style",i),s.setStyle(t,e),i=NEW_CKEDITOR.tools.normalizeCssText(s.getAttribute("style")),this.setValue(i,1)},setup:t,commit:e}),s.classes&&r.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:a?a+"(edi-xyz)":null,label:n.cssClasses,default:"",setup:t,commit:e}]}),d.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(r)})),d}})}();