/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ !function(){function e(e){return e&&e.domId&&e.getInputElement().$?e.getInputElement():e&&e.$?e:!1}function t(e){if(!e)throw"Languages-by-groups list are required for construct selectbox";var t,n=[],i="";for(t in e)for(var o in e[t]){var a=e[t][o];"en_US"==a?i=a:n.push(a)}return n.sort(),i&&n.unshift(i),{getCurrentLangGroup:function(t){e:{for(var n in e)for(var i in e[n])if(i.toUpperCase()===t.toUpperCase()){t=n;break e}t=""}return t},setLangList:function(){var t,n={};for(t in e)for(var i in e[t])n[e[t][i]]=i;return n}()}}var n=function(){var e=function(e,t,n){n=n||{};var i=n.expires;if("number"==typeof i&&i){var o=new Date;o.setTime(o.getTime()+1e3*i),i=n.expires=o}i&&i.toUTCString&&(n.expires=i.toUTCString()),t=encodeURIComponent(t),e=e+"="+t;for(var a in n)t=n[a],e+="; "+a,!0!==t&&(e+="="+t);document.cookie=e};return{postMessage:{init:function(e){window.addEventListener?window.addEventListener("message",e,!1):window.attachEvent("onmessage",e)},send:function(e){var t=Object.prototype.toString,n=e.fn||null,i=e.id||"",o=e.target||window,a=e.message||{id:i};e.message&&"[object Object]"==t.call(e.message)&&(e.message.id?e.message.id:e.message.id=i,a=e.message),e=window.JSON.stringify(a,n),o.postMessage(e,"*")},unbindHandler:function(e){window.removeEventListener?window.removeEventListener("message",e,!1):window.detachEvent("onmessage",e)}},hash:{create:function(){},parse:function(){}},cookie:{set:e,get:function(e){return(e=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(e[1]):void 0},remove:function(t){e(t,"",{expires:-1})}},misc:{findFocusable:function(e){var t=null;return e&&(t=e.find("a[href], area[href], input, select, textarea, button, *[tabindex], *[contenteditable]")),t},isVisible:function(e){var t;return(t=0===e.offsetWidth||0==e.offsetHeight)||(t="none"===(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e,null).display:e.currentStyle?e.currentStyle.display:e.style.display)),!t},hasClass:function(e,t){return!(!e.className||!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}}}}(),i=i||{};i.TextAreaNumber=null,i.load=!0,i.cmd={SpellTab:"spell",Thesaurus:"thes",GrammTab:"grammar"},i.dialog=null,i.optionNode=null,i.selectNode=null,i.grammerSuggest=null,i.textNode={},i.iframeMain=null,i.dataTemp="",i.div_overlay=null,i.textNodeInfo={},i.selectNode={},i.selectNodeResponce={},i.langList=null,i.langSelectbox=null,i.banner="",i.show_grammar=null,i.div_overlay_no_check=null,i.targetFromFrame={},i.onLoadOverlay=null,i.LocalizationComing={},i.OverlayPlace=null,i.sessionid="",i.LocalizationButton={ChangeTo_button:{instance:null,text:"Change to",localizationID:"ChangeTo"},ChangeAll:{instance:null,text:"Change All"},IgnoreWord:{instance:null,text:"Ignore word"},IgnoreAllWords:{instance:null,text:"Ignore all words"},Options:{instance:null,text:"Options",optionsDialog:{instance:null}},AddWord:{instance:null,text:"Add word"},FinishChecking_button:{instance:null,text:"Finish Checking",localizationID:"FinishChecking"},Option_button:{instance:null,text:"Options",localizationID:"Options"},FinishChecking_button_block:{instance:null,text:"Finish Checking",localizationID:"FinishChecking"}},i.LocalizationLabel={ChangeTo_label:{instance:null,text:"Change to",localizationID:"ChangeTo"},Suggestions:{instance:null,text:"Suggestions"},Categories:{instance:null,text:"Categories"},Synonyms:{instance:null,text:"Synonyms"}};var o,a,s=function(e){var t,n,o;for(o in e){if(t=i.dialog.getContentElement(i.dialog._.currentTabId,o))t=t.getElement();else{if(!e[o].instance)continue;t=e[o].instance.getElement().getFirst()||e[o].instance.getElement()}n=e[o].localizationID||o,t.setText(i.LocalizationComing[n])}},l=function(e){var t,n,o;for(o in e)t=i.dialog.getContentElement(i.dialog._.currentTabId,o),t||(t=e[o].instance),t.setLabel&&(n=e[o].localizationID||o,t.setLabel(i.LocalizationComing[n]+":"))};i.framesetHtml=function(e){return"'},i.setIframe=function(e,t){var n;n=i.framesetHtml(t);var o=i.iframeNumber+"_"+t;e.getElement().setHtml(n),n=document.getElementById(o),n=n.contentWindow?n.contentWindow:n.contentDocument.document?n.contentDocument.document:n.contentDocument,n.document.open(),n.document.write('iframe
'),n.document.close(),i.div_overlay.setEnable()},i.setCurrentIframe=function(e){i.setIframe(i.dialog._.contents[e].Content,e)},i.setHeightBannerFrame=function(){var e=i.dialog.getContentElement("SpellTab","banner").getElement(),t=i.dialog.getContentElement("GrammTab","banner").getElement(),n=i.dialog.getContentElement("Thesaurus","banner").getElement();e.setStyle("height","90px"),t.setStyle("height","90px"),n.setStyle("height","90px")},i.setHeightFrame=function(){document.getElementById(i.iframeNumber+"_"+i.dialog._.currentTabId).style.height="240px"},i.sendData=function(e){var t,n,o=e._.currentTabId,a=e._.contents[o].Content;i.previousTab=o,i.setIframe(a,o);var s=function(s){o=e._.currentTabId,s=s||window.event,s.data.getTarget().is("a")&&o!==i.previousTab&&(i.previousTab=o,a=e._.contents[o].Content,t=i.iframeNumber+"_"+o,i.div_overlay.setEnable(),a.getElement().getChildCount()?p(i.targetFromFrame[t],i.cmd[o]):(i.setIframe(a,o),n=document.getElementById(t),i.targetFromFrame[t]=n.contentWindow))};e.parts.tabs.removeListener("click",s),e.parts.tabs.on("click",s)},i.buildSelectLang=function(e){var t=new CKEDITOR.dom.element("div"),n=new CKEDITOR.dom.element("select");return e="wscLang"+e,t.addClass("cke_dialog_ui_input_select"),t.setAttribute("role","presentation"),t.setStyles({height:"auto",position:"absolute",right:"0",top:"-1px",width:"160px","white-space":"normal"}),n.setAttribute("id",e),n.addClass("cke_dialog_ui_input_select"),n.setStyles({width:"160px"}),t.append(n),t},i.buildOptionLang=function(e,t){var n,o,a=document.getElementById("wscLang"+t),s=document.createDocumentFragment(),l=[];if(0===a.options.length){for(n in e)l.push([n,e[n]]);l.sort();for(var r=0;ro;o++)i.grammerSuggest.getElement().append(c(e[o],e[o],n)),n=!1;v(),i.div_overlay.setDisable()},thesaurusSuggest:function(t){delete t.id,delete t.mocklangs,x(),g(i.langList),i.selectNodeResponce=t,i.textNode.Thesaurus.reset();var n=e(i.selectNode.Categories),o=0;i.selectNode.Categories.clear();for(var a in t)t=document.createElement("option"),t.text=a,t.value=a,n.$.add(t,o),o++;n=i.selectNode.Categories.getInputElement().getChildren().$[0].value,i.selectNode.Categories.getInputElement().getChildren().$[0].selected=!0,i.buildOptionSynonyms(n),v(),i.div_overlay.setDisable()},finish:function(e){delete e.id,_(),e=i.dialog.getContentElement(i.dialog._.currentTabId,"BlockFinishChecking").getElement(),e.removeStyle("display"),e.removeStyle("position"),e.removeStyle("left"),e.show(),i.div_overlay.setDisable()},settext:function(e){function t(){try{n.focus()}catch(t){}n.setData(e.text,function(){i.dataTemp="",n.unlockSelection(),n.fire("saveSnapshot"),i.dialog.hide()})}delete e.id,i.dialog.getParentEditor().getCommand("checkspell");var n=i.dialog.getParentEditor(),o=CKEDITOR.plugins.scayt,a=n.scayt;if(o&&n.wsc){var s,l,r=n.wsc.udn,c=n.wsc.ud;if(a){var d=function(){if(c)for(s=c.split(","),l=0;ls.width-d&&(o=s.width-d),(as.height-c&&(a=s.height-c),r.width=o+d,r.height=a+c,t._.fromResizeEvent=!1,t.resize(o,a),setTimeout(function(){t._.fromResizeEvent=!1,CKEDITOR.dialog.fire("resize",{dialog:t,width:o,height:a},e)},300)}t._.moved||(c=isNaN(n)&&isNaN(i)?0:1,isNaN(n)&&(n=(s.width-r.width)/2),0>n&&(n=0),n>s.width-r.width&&(n=s.width-r.width),isNaN(i)&&(i=(s.height-r.height)/2),0>i&&(i=0),i>s.height-r.height&&(i=s.height-r.height),t.move(n,i,c))}function o(){e.wsc={},function(e){var t={separator:"<$>",getDataType:function(e){return"undefined"==typeof e?"undefined":null===e?"null":Object.prototype.toString.call(e).slice(8,-1)},convertDataToString:function(e){return this.getDataType(e).toLowerCase()+this.separator+e},restoreDataFromString:function(e){var t,n=e;if(e=this.backCompatibility(e),"string"==typeof e)switch(n=e.indexOf(this.separator),t=e.substring(0,n),n=e.substring(n+this.separator.length),t){case"boolean":n="true"===n;break;case"number":n=parseFloat(n);break;case"array":n=""===n?[]:n.split(",");break;case"null":n=null;break;case"undefined":n=void 0}return n},backCompatibility:function(e){var t,n=e;return"string"==typeof e&&(t=e.indexOf(this.separator),0>t&&(n=parseFloat(e),isNaN(n)&&("["===e[0]&&"]"===e[e.length-1]?(e=e.replace("[",""),e=e.replace("]",""),n=""===e?[]:e.split(",")):n="true"===e||"false"===e?"true"===e:e),n=this.convertDataToString(n))),n}},n={get:function(e){return t.restoreDataFromString(window.localStorage.getItem(e))},set:function(e,n){var i=t.convertDataToString(n);window.localStorage.setItem(e,i)},del:function(e){window.localStorage.removeItem(e)},clear:function(){window.localStorage.clear()}},i={expiration:31622400,get:function(e){return t.restoreDataFromString(this.getCookie(e))},set:function(e,n){var i=t.convertDataToString(n);this.setCookie(e,i,{expires:this.expiration})},del:function(e){this.deleteCookie(e)},getCookie:function(e){return(e=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(e[1]):void 0},setCookie:function(e,t,n){n=n||{};var i=n.expires;if("number"==typeof i&&i){var o=new Date;o.setTime(o.getTime()+1e3*i),i=n.expires=o}i&&i.toUTCString&&(n.expires=i.toUTCString()),t=encodeURIComponent(t),e=e+"="+t;for(var a in n)t=n[a],e+="; "+a,!0!==t&&(e+="="+t);document.cookie=e},deleteCookie:function(e){this.setCookie(e,null,{expires:-1})},clear:function(){for(var e=document.cookie.split(";"),t=0;t-1?n.substr(0,i):n;this.deleteCookie(n)}}},o=window.localStorage?n:i;e.DataStorage={getData:function(e){return o.get(e)},setData:function(e,t){o.set(e,t)},deleteData:function(e){o.del(e)},clear:function(){o.clear()}}}(e.wsc),e.wsc.operationWithUDN=function(e,t){n.postMessage.send({message:{udn:t,id:"operationWithUDN",udnCmd:e},target:i.targetFromFrame[i.iframeNumber+"_"+i.dialog._.currentTabId]})},e.wsc.getLocalStorageUDN=function(){var t=e.wsc.DataStorage.getData("scayt_user_dictionary_name");return t?t:void 0},e.wsc.getLocalStorageUD=function(){var t=e.wsc.DataStorage.getData("scayt_user_dictionary");return t?t:void 0},e.wsc.addWords=function(t,n){var i=e.config.wsc.DefaultParams.serviceHost+e.config.wsc.DefaultParams.ssrvHost+"?cmd=dictionary&format=json&customerid=1%3AncttD3-fIoSf2-huzwE4-Y5muI2-mD0Tt-kG9Wz-UEDFC-tYu243-1Uq474-d9Z2l3&action=addword&word="+t+"&callback=toString&synchronization=true",o=document.createElement("script");o.type="text/javascript",o.src=i,document.getElementsByTagName("head")[0].appendChild(o),o.onload=n,o.onreadystatechange=function(){"loaded"===this.readyState&&n()}},e.wsc.cgiOrigin=function(){var t=e.config.wsc.DefaultParams.serviceHost.split("/");return t[0]+"//"+t[2]},e.wsc.isSsrvSame=!1}var s=function(t){this.getElement().focus(),i.div_overlay.setEnable(),t=i.dialog._.currentTabId;var o=i.iframeNumber+"_"+t,a=i.textNode[t].getValue(),s=this.getElement().getAttribute("title-cmd");n.postMessage.send({message:{cmd:s,tabId:t,new_word:a},target:i.targetFromFrame[o],id:"cmd_outer__page"}),"ChangeTo"!=s&&"ChangeAll"!=s||e.fire("saveSnapshot"),"FinishChecking"==s&&e.config.wsc_onFinish.call(CKEDITOR.document.getWindow().getFrame())},l={minWidth:560,minHeight:444};return{title:e.config.wsc_dialogTitle||e.lang.wsc.title,minWidth:l.minWidth,minHeight:l.minHeight,buttons:[CKEDITOR.dialog.cancelButton],onLoad:function(){i.dialog=this,y(),C(),w(),e.plugins.scayt&&o()},onShow:function(){if(i.dialog=this,e.lockSelection(e.getSelection()),i.TextAreaNumber="cke_textarea_"+e.name,n.postMessage.init(h),i.dataTemp=e.getData(),i.OverlayPlace=i.dialog.parts.tabs.getParent().$,CKEDITOR&&CKEDITOR.config){i.wsc_customerId=e.config.wsc_customerId,i.cust_dic_ids=e.config.wsc_customDictionaryIds,i.userDictionaryName=e.config.wsc_userDictionaryName,i.defaultLanguage=CKEDITOR.config.defaultLanguage;var o=e.config.wsc_customLoaderScript||"https://www.webspellchecker.net/spellcheck31/lf/22/js/wsc_fck2plugin.js";t(this),CKEDITOR.scriptLoader.load(o,function(t){CKEDITOR.config&&CKEDITOR.config.wsc&&CKEDITOR.config.wsc.DefaultParams?(i.serverLocationHash=CKEDITOR.config.wsc.DefaultParams.serviceHost,i.logotype=CKEDITOR.config.wsc.DefaultParams.logoPath,i.loadIcon=CKEDITOR.config.wsc.DefaultParams.iconPath,i.loadIconEmptyEditor=CKEDITOR.config.wsc.DefaultParams.iconPathEmptyEditor,i.LangComparer=new CKEDITOR.config.wsc.DefaultParams._SP_FCK_LangCompare):(i.serverLocationHash=DefaultParams.serviceHost,i.logotype=DefaultParams.logoPath,i.loadIcon=DefaultParams.iconPath,i.loadIconEmptyEditor=DefaultParams.iconPathEmptyEditor,i.LangComparer=new _SP_FCK_LangCompare),i.pluginPath=CKEDITOR.getUrl(e.plugins.wsc.path),i.iframeNumber=i.TextAreaNumber,i.templatePath=i.pluginPath+"dialogs/tmp.html",i.LangComparer.setDefaulLangCode(i.defaultLanguage),i.currentLang=e.config.wsc_lang||i.LangComparer.getSPLangCode(e.langCode)||"en_US",i.interfaceLang=e.config.wsc_interfaceLang,i.selectingLang=i.currentLang,i.div_overlay=new r({opacity:"1",background:"#fff url("+i.loadIcon+") no-repeat 50% 50%",target:i.OverlayPlace});var n=i.dialog.parts.tabs.getId(),n=CKEDITOR.document.getById(n);if(n.setStyle("width","97%"),n.getElementsByTag("DIV").count()||n.append(i.buildSelectLang(i.dialog.getParentEditor().name)),i.div_overlay_no_check=new r({opacity:"1",id:"no_check_over",background:"#fff url("+i.loadIconEmptyEditor+") no-repeat 50% 50%",target:i.OverlayPlace}),t&&(b(i.dialog),i.dialog.setupContent(i.dialog)),e.plugins.scayt&&(e.wsc.isSsrvSame=function(){var t,n,i,o,a,s=CKEDITOR.config.wsc.DefaultParams.serviceHost.replace("lf/22/js/../../../","").split("//")[1],l=CKEDITOR.config.wsc.DefaultParams.ssrvHost,r=e.config.scayt_srcUrl;return window.SCAYT&&window.SCAYT.CKSCAYT&&(i=SCAYT.CKSCAYT.prototype.basePath,i.split("//"),o=i.split("//")[1].split("/")[0],a=i.split(o+"/")[1].replace("/lf/scayt3/ckscayt/","")+"/script/ssrv.cgi"),!r||i||e.config.scayt_servicePath||(r.split("//"),t=r.split("//")[1].split("/")[0],n=r.split(t+"/")[1].replace("/lf/scayt3/ckscayt/ckscayt.js","")+"/script/ssrv.cgi"),"//"+s+l=="//"+(e.config.scayt_serviceHost||o||t)+"/"+(e.config.scayt_servicePath||a||n)}()),window.SCAYT&&e.wsc){var o=e.wsc.cgiOrigin();e.wsc.syncIsDone=!1,t=function(t){t.origin===o&&(t=JSON.parse(t.data),t.ud&&"undefined"!==t.ud?e.wsc.ud=t.ud:"undefined"===t.ud&&(e.wsc.ud=void 0),t.udn&&"undefined"!==t.udn?e.wsc.udn=t.udn:"undefined"===t.udn&&(e.wsc.udn=void 0),e.wsc.syncIsDone||(a(e.wsc.ud),e.wsc.syncIsDone=!0))};var a=function(t){t=e.wsc.getLocalStorageUD();var n;t instanceof Array&&(n=t.toString()),void 0!==n&&""!==n&&setTimeout(function(){e.wsc.addWords(n,function(){b(i.dialog),i.dialog.setupContent(i.dialog)})},400)};window.addEventListener?addEventListener("message",t,!1):window.attachEvent("onmessage",t),setTimeout(function(){var t=e.wsc.getLocalStorageUDN();void 0!==t&&e.wsc.operationWithUDN("restore",t)},500)}})}else i.dialog.hide()},onHide:function(){e.unlockSelection(),i.dataTemp="",i.sessionid="",n.postMessage.unbindHandler(h)},contents:[{id:"SpellTab",label:"SpellChecker",accessKey:"S",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"
"},{type:"html",id:"Content",label:"spellContent",html:"",setup:function(e){e=i.iframeNumber+"_"+e._.currentTabId;var t=document.getElementById(e);i.targetFromFrame[e]=t.contentWindow}},{type:"hbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;",widths:["50%","50%"],className:"wsc-spelltab-bottom",children:[{type:"hbox",id:"leftCol",align:"left",width:"50%",children:[{type:"vbox",id:"rightCol1",widths:["50%","50%"],children:[{type:"text",id:"ChangeTo_label",label:i.LocalizationLabel.ChangeTo_label.text+":",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",width:"140px","default":"",onShow:function(){i.textNode.SpellTab=this,i.LocalizationLabel.ChangeTo_label.instance=this},onHide:function(){this.reset()}},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"text",id:"labelSuggestions",label:i.LocalizationLabel.Suggestions.text+":",onShow:function(){i.LocalizationLabel.Suggestions.instance=this,this.getInputElement().setStyles({display:"none"})}},{type:"html",id:"logo",html:"",setup:function(e){this.getElement().$.src=i.logotype,this.getElement().getParent().setStyles({"text-align":"left"})}}]},{type:"select",id:"list_of_suggestions",labelStyle:"font: 12px/25px arial, sans-serif;",size:"6",inputStyle:"width: 140px; height: auto;",items:[["loading..."]],onShow:function(){a=this},onChange:function(){i.textNode.SpellTab.setValue(this.getValue())}}]}]}]},{type:"hbox",id:"rightCol",align:"right",width:"50%",children:[{type:"vbox",id:"rightCol_col__left",widths:["50%","50%","50%","50%"],children:[{type:"button",id:"ChangeTo_button",label:i.LocalizationButton.ChangeTo_button.text,title:"Change to",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","ChangeTo"),i.LocalizationButton.ChangeTo_button.instance=this},onClick:s},{type:"button",id:"ChangeAll",label:i.LocalizationButton.ChangeAll.text,title:"Change All",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id),i.LocalizationButton.ChangeAll.instance=this},onClick:s},{type:"button",id:"AddWord",label:i.LocalizationButton.AddWord.text,title:"Add word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id),i.LocalizationButton.AddWord.instance=this},onClick:s},{type:"button",id:"FinishChecking_button",label:i.LocalizationButton.FinishChecking_button.text,title:"Finish Checking",style:"width: 100%;margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking"),i.LocalizationButton.FinishChecking_button.instance=this},onClick:s}]},{type:"vbox",id:"rightCol_col__right",widths:["50%","50%","50%"],children:[{type:"button",id:"IgnoreWord",label:i.LocalizationButton.IgnoreWord.text,title:"Ignore word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id),i.LocalizationButton.IgnoreWord.instance=this},onClick:s},{type:"button",id:"IgnoreAllWords",label:i.LocalizationButton.IgnoreAllWords.text,title:"Ignore all words",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id),i.LocalizationButton.IgnoreAllWords.instance=this},onClick:s},{type:"button",id:"Options",label:i.LocalizationButton.Options.text,title:"Option",style:"width: 100%;",onLoad:function(){i.LocalizationButton.Options.instance=this,"file:"==document.location.protocol&&this.disable()},onClick:function(){this.getElement().focus(),"file:"==document.location.protocol?alert("WSC: Options functionality is disabled when runing from file system"):(T=document.activeElement,e.openDialog("options"))}}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;", widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},onHide:v,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",setup:function(){this.getChild()[0].getElement().$.src=i.logotype,this.getChild()[0].getElement().getParent().setStyles({"text-align":"center"})},children:[{type:"html",id:"logo",html:""}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"Option_button",label:i.LocalizationButton.Options.text,title:"Option",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id),"file:"==document.location.protocol&&this.disable()},onClick:function(){this.getElement().focus(),"file:"==document.location.protocol?alert("WSC: Options functionality is disabled when runing from file system"):(T=document.activeElement,e.openDialog("options"))}},{type:"button",id:"FinishChecking_button_block",label:i.LocalizationButton.FinishChecking_button_block.text,title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:s}]}]}]}]},{id:"GrammTab",label:"Grammar",accessKey:"G",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"
"},{type:"html",id:"Content",label:"GrammarContent",html:"",setup:function(){var e=i.iframeNumber+"_"+i.dialog._.currentTabId,t=document.getElementById(e);i.targetFromFrame[e]=t.contentWindow}},{type:"vbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;",children:[{type:"hbox",id:"leftCol",widths:["66%","34%"],children:[{type:"vbox",children:[{type:"text",id:"text",label:"Change to:",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",inputStyle:"float: right; width: 200px;","default":"",onShow:function(){i.textNode.GrammTab=this},onHide:function(){this.reset()}},{type:"html",id:"html_text",html:"
",onShow:function(e){i.textNodeInfo.GrammTab=this}},{type:"html",id:"radio",html:"",onShow:function(){i.grammerSuggest=this}}]},{type:"vbox",children:[{type:"button",id:"ChangeTo_button",label:"Change to",title:"Change to",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd","ChangeTo")},onClick:s},{type:"button",id:"IgnoreWord",label:"Ignore word",title:"Ignore word",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:s},{type:"button",id:"IgnoreAllWords",label:"Ignore Problem",title:"Ignore Problem",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:s},{type:"button",id:"FinishChecking_button",label:i.LocalizationButton.FinishChecking_button.text,title:"Finish Checking",style:"width: 133px; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:s}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},onHide:v,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:"",setup:function(){this.getElement().$.src=i.logotype,this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"FinishChecking_button_block",label:i.LocalizationButton.FinishChecking_button_block.text,title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:s}]}]}]}]},{id:"Thesaurus",label:"Thesaurus",accessKey:"T",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"
"},{type:"html",id:"Content",label:"spellContent",html:"",setup:function(){var e=i.iframeNumber+"_"+i.dialog._.currentTabId,t=document.getElementById(e);i.targetFromFrame[e]=t.contentWindow}},{type:"vbox",id:"bottomGroup",style:"width:560px; margin: -10px auto; overflow: hidden;",children:[{type:"hbox",widths:["75%","25%"],children:[{type:"vbox",children:[{type:"hbox",widths:["65%","35%"],children:[{type:"text",id:"ChangeTo_label",label:i.LocalizationLabel.ChangeTo_label.text+":",labelLayout:"horizontal",inputStyle:"width: 160px;",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onShow:function(e){i.textNode.Thesaurus=this,i.LocalizationLabel.ChangeTo_label.instance=this},onHide:function(){this.reset()}},{type:"button",id:"ChangeTo_button",label:i.LocalizationButton.ChangeTo_button.text,title:"Change to",style:"width: 121px; margin-top: 1px;",onLoad:function(){this.getElement().setAttribute("title-cmd","ChangeTo"),i.LocalizationButton.ChangeTo_button.instance=this},onClick:s}]},{type:"hbox",children:[{type:"select",id:"Categories",label:i.LocalizationLabel.Categories.text+":",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",items:[],onShow:function(){i.selectNode.Categories=this,i.LocalizationLabel.Categories.instance=this},onChange:function(){i.buildOptionSynonyms(this.getValue())}},{type:"select",id:"Synonyms",label:i.LocalizationLabel.Synonyms.text+":",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",items:[],onShow:function(){i.selectNode.Synonyms=this,i.textNode.Thesaurus.setValue(this.getValue()),i.LocalizationLabel.Synonyms.instance=this},onChange:function(e){i.textNode.Thesaurus.setValue(this.getValue())}}]}]},{type:"vbox",width:"120px",style:"margin-top:46px;",children:[{type:"html",id:"logotype",label:"WebSpellChecker.net",html:"",setup:function(){this.getElement().$.src=i.logotype,this.getElement().getParent().setStyles({"text-align":"center"})}},{type:"button",id:"FinishChecking_button",label:i.LocalizationButton.FinishChecking_button.text,title:"Finish Checking",style:"width: 100%; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:s}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:"",setup:function(){this.getElement().$.src=i.logotype,this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"FinishChecking_button_block",label:i.LocalizationButton.FinishChecking_button_block.text,title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:s}]}]}]}]}]}});var T=null;CKEDITOR.dialog.add("options",function(e){var t=null,a={},s={},l=null,r=null;n.cookie.get("udn"),n.cookie.get("osp"),e=function(e){r=this.getElement().getAttribute("title-cmd"),e=[],e[0]=s.IgnoreAllCapsWords,e[1]=s.IgnoreWordsNumbers,e[2]=s.IgnoreMixedCaseWords,e[3]=s.IgnoreDomainNames,e=e.toString().replace(/,/g,""),n.cookie.set("osp",e),n.cookie.set("udnCmd",r?r:"ignore"),"delete"!=r&&(e="",""!==o.getValue()&&(e=o.getValue()),n.cookie.set("udn",e)),n.postMessage.send({id:"options_dic_send"})};var c=function(){l.getElement().setHtml(i.LocalizationComing.error),l.getElement().show()};return{title:i.LocalizationComing.Options,minWidth:430,minHeight:130,resizable:CKEDITOR.DIALOG_RESIZE_NONE,contents:[{id:"OptionsTab",label:"Options",accessKey:"O",elements:[{type:"hbox",id:"options_error",children:[{type:"html",style:"display: block;text-align: center;white-space: normal!important; font-size: 12px;color:red",html:"
",onShow:function(){l=this}}]},{type:"vbox",id:"Options_content",children:[{type:"hbox",id:"Options_manager",widths:["52%","48%"],children:[{type:"fieldset",label:"Spell Checking Options",style:"border: none;margin-top: 13px;padding: 10px 0 10px 10px",onShow:function(){this.getInputElement().$.children[0].innerHTML=i.LocalizationComing.SpellCheckingOptions},children:[{type:"vbox",id:"Options_checkbox",children:[{type:"checkbox",id:"IgnoreAllCapsWords",label:"Ignore All-Caps Words",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){s[this.id]=this.getValue()?1:0}},{type:"checkbox",id:"IgnoreWordsNumbers",label:"Ignore Words with Numbers",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){s[this.id]=this.getValue()?1:0}},{type:"checkbox",id:"IgnoreMixedCaseWords",label:"Ignore Mixed-Case Words",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){s[this.id]=this.getValue()?1:0}},{type:"checkbox",id:"IgnoreDomainNames",label:"Ignore Domain Names",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){s[this.id]=this.getValue()?1:0}}]}]},{type:"vbox",id:"Options_DictionaryName",children:[{type:"text",id:"DictionaryName",style:"margin-bottom: 10px",label:"Dictionary Name:",labelLayout:"vertical",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onLoad:function(){o=this;var e=i.userDictionaryName?i.userDictionaryName:(n.cookie.get("udn"),this.getValue());this.setValue(e)},onShow:function(){o=this;var e=n.cookie.get("udn")?n.cookie.get("udn"):this.getValue();this.setValue(e),this.setLabel(i.LocalizationComing.DictionaryName)},onHide:function(){this.reset()}},{type:"hbox",id:"Options_buttons",children:[{type:"vbox",id:"Options_leftCol_col",widths:["50%","50%"],children:[{type:"button",id:"create",label:"Create",title:"Create",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(i.LocalizationComing.Create)},onClick:e},{type:"button",id:"restore",label:"Restore",title:"Restore",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(i.LocalizationComing.Restore)},onClick:e}]},{type:"vbox",id:"Options_rightCol_col",widths:["50%","50%"],children:[{type:"button",id:"rename",label:"Rename",title:"Rename",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(i.LocalizationComing.Rename)},onClick:e},{type:"button",id:"delete",label:"Remove",title:"Remove",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(i.LocalizationComing.Remove)},onClick:e}]}]}]}]},{type:"hbox",id:"Options_text",children:[{type:"html",style:"text-align: justify;margin-top: 15px;white-space: normal!important; font-size: 12px;color:#777;",html:"
"+i.LocalizationComing.OptionsTextIntro+"
",onShow:function(){this.getElement().setText(i.LocalizationComing.OptionsTextIntro)}}]}]}]}],buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton],onOk:function(){var e=[];e[0]=s.IgnoreAllCapsWords,e[1]=s.IgnoreWordsNumbers,e[2]=s.IgnoreMixedCaseWords,e[3]=s.IgnoreDomainNames,e=e.toString().replace(/,/g,""),n.cookie.set("osp",e),n.postMessage.send({id:"options_checkbox_send"}),l.getElement().hide(),l.getElement().setHtml(" ")},onLoad:function(){t=this,a.IgnoreAllCapsWords=t.getContentElement("OptionsTab","IgnoreAllCapsWords"),a.IgnoreWordsNumbers=t.getContentElement("OptionsTab","IgnoreWordsNumbers"),a.IgnoreMixedCaseWords=t.getContentElement("OptionsTab","IgnoreMixedCaseWords"),a.IgnoreDomainNames=t.getContentElement("OptionsTab","IgnoreDomainNames")},onShow:function(){n.postMessage.init(c);var e=n.cookie.get("osp").split("");s.IgnoreAllCapsWords=e[0],s.IgnoreWordsNumbers=e[1],s.IgnoreMixedCaseWords=e[2],s.IgnoreDomainNames=e[3],parseInt(s.IgnoreAllCapsWords,10)?a.IgnoreAllCapsWords.setValue("checked",!1):a.IgnoreAllCapsWords.setValue("",!1),parseInt(s.IgnoreWordsNumbers,10)?a.IgnoreWordsNumbers.setValue("checked",!1):a.IgnoreWordsNumbers.setValue("",!1),parseInt(s.IgnoreMixedCaseWords,10)?a.IgnoreMixedCaseWords.setValue("checked",!1):a.IgnoreMixedCaseWords.setValue("",!1),parseInt(s.IgnoreDomainNames,10)?a.IgnoreDomainNames.setValue("checked",!1):a.IgnoreDomainNames.setValue("",!1),s.IgnoreAllCapsWords=a.IgnoreAllCapsWords.getValue()?1:0,s.IgnoreWordsNumbers=a.IgnoreWordsNumbers.getValue()?1:0,s.IgnoreMixedCaseWords=a.IgnoreMixedCaseWords.getValue()?1:0,s.IgnoreDomainNames=a.IgnoreDomainNames.getValue()?1:0,a.IgnoreAllCapsWords.getElement().$.lastChild.innerHTML=i.LocalizationComing.IgnoreAllCapsWords,a.IgnoreWordsNumbers.getElement().$.lastChild.innerHTML=i.LocalizationComing.IgnoreWordsWithNumbers,a.IgnoreMixedCaseWords.getElement().$.lastChild.innerHTML=i.LocalizationComing.IgnoreMixedCaseWords,a.IgnoreDomainNames.getElement().$.lastChild.innerHTML=i.LocalizationComing.IgnoreDomainNames},onHide:function(){if(n.postMessage.unbindHandler(c),T)try{T.focus()}catch(e){}}}}),CKEDITOR.dialog.on("resize",function(e){e=e.data;var t=e.dialog,n=CKEDITOR.document.getById(i.iframeNumber+"_"+t._.currentTabId);"checkspell"==t._.name&&(i.bnr?n&&n.setSize("height",e.height-310):n&&n.setSize("height",e.height-220),t._.fromResizeEvent&&!t._.resized&&(t._.resized=!0),t._.fromResizeEvent=!0)}),CKEDITOR.on("dialogDefinition",function(e){if("checkspell"===e.data.name){var t=e.data.definition;i.onLoadOverlay=new r({opacity:"1",background:"#fff",target:t.dialog.parts.tabs.getParent().$}),i.onLoadOverlay.setEnable(),t.dialog.on("cancel",function(e){return t.dialog.getParentEditor().config.wsc_onClose.call(this.document.getWindow().getFrame()),i.div_overlay.setDisable(),i.onLoadOverlay.setDisable(),!1},this,null,-1)}})}();