/** * Kendo UI v2016.1.112 (http://www.telerik.com/kendo-ui) * Copyright 2016 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(e,define){define("util/undoredostack.min",["kendo.core.min"],e)}(function(){!function(e){var t=e.Observable.extend({init:function(t){e.Observable.fn.init.call(this,t),this.clear()},events:["undo","redo"],push:function(e){this.stack=this.stack.slice(0,this.currentCommandIndex+1),this.currentCommandIndex=this.stack.push(e)-1},undo:function(){if(this.canUndo()){var e=this.stack[this.currentCommandIndex--];e.undo(),this.trigger("undo",{command:e})}},redo:function(){if(this.canRedo()){var e=this.stack[++this.currentCommandIndex];e.redo(),this.trigger("redo",{command:e})}},clear:function(){this.stack=[],this.currentCommandIndex=-1},canUndo:function(){return this.currentCommandIndex>=0},canRedo:function(){return this.currentCommandIndex!=this.stack.length-1}});e.deepExtend(e,{util:{UndoRedoStack:t}})}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/main.min",["util/undoredostack.min","kendo.combobox.min","kendo.dropdownlist.min","kendo.window.min","kendo.colorpicker.min"],e)}(function(){!function(e,t){var n,i,o,r,a=window.kendo,s=a.Class,l=a.ui.Widget,d=a.support.mobileOS,c=a.support.browser,u=e.extend,f=e.proxy,p=a.deepExtend,m=".kendoEditor",h=a.keys,g=s.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return a.template(e.template,{useWithBlock:!1})(e)}}),v={editorWrapperTemplate:'',buttonTemplate:'#= data.title #',colorPickerTemplate:'
',comboBoxTemplate:'',separatorTemplate:'',overflowAnchorTemplate:'',formatByName:function(t,n){for(var i=0;n.length>i;i++)if(e.inArray(t,n[i].tags)>=0)return n[i]},registerTool:function(e,t){var n=t.options;n&&n.template&&(n.template.options.cssClass="k-"+e),t.name||(t.options.name=e,t.name=e.toLowerCase()),w.defaultTools[e]=t},registerFormat:function(e,t){w.fn.options.formats[e]=t}},b={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertFile:"Insert file",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",editAreaTitle:"Editable area. Press F10 for toolbar.",uploadFile:"Upload",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",imageWidth:"Width (px)",imageHeight:"Height (px)",fileWebAddress:"Web address",fileTitle:"Title",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogCancel:"Cancel",createTable:"Create table",createTableHint:"Create a {0} x {1} table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column"},k=!d||d.ios&&d.flatVersion>=500||!d.ios&&t!==document.documentElement.contentEditable,y={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],links:["createLink","unlink"],tables:["createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"]},w=l.extend({init:function(t,n){var i,o,r,s,d,c=this,h=a.ui.editor,g=h.Dom;k&&(l.fn.init.call(c,t,n),c.options=p({},c.options,n),c.options.tools=c.options.tools.slice(),t=c.element,d=t[0],s=g.name(d),t.closest("form").on("submit"+m,function(){c.update()}),r=u({},c.options),r.editor=c,"textarea"==s?(c._wrapTextarea(),o=c.wrapper.find(".k-editor-toolbar"),d.id&&o.attr("aria-controls",d.id)):(c.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),r.popup=!0,o=e('"),a=this.isBlock(t),k.focus(),l=k.getRange(),l.deleteContents(),l.startContainer==k.document&&l.selectNodeContents(k.body),d=new u,c=d.addCaret(l),p=this.splittableParent(a,c),m=!1,h=p!=k.body&&!s.is(p,"td"),n.split&&h&&(a||s.isInline(p))&&(l.selectNode(c),o.RangeUtils.split(l,p,!0),m=!0),g=this.htmlToFragment(t),g.firstChild&&"k-paste-container"===g.firstChild.className){for(v=[],i=0,r=g.childNodes.length;r>i;i++)v.push(g.childNodes[i].innerHTML);g=this.htmlToFragment(v.join("
"))}if(e(g.childNodes).filter("table").addClass("k-table").end().find("table").addClass("k-table"),l.insertNode(g),p=this.splittableParent(a,c),m){for(;c.parentNode!=p;)s.unwrap(c.parentNode);s.unwrap(c.parentNode)}s.normalize(l.commonAncestorContainer),c.style.display="inline",s.restoreScrollTop(k.document),s.scrollTo(c),d.removeCaret(l),b=l.commonAncestorContainer.parentNode,l.collapsed&&"tbody"==s.name(b)&&(l.setStartAfter(e(b).closest("table")[0]),l.collapse(!0)),k.selectRange(l)}}),C=i.extend({clean:function(e){var t,n,i=this,o=i.replacements;for(t=0,n=o.length;n>t;t+=2)e=e.replace(o[t],o[t+1]);return e}}),x=C.extend({init:function(){this.replacements=[/<(\/?)script([^>]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return/]*>/i.test(e)}}),T=C.extend({init:function(){var e=" ";this.replacements=[/]*>\s*<\/span>/gi,e,/\t/gi,e,/    /gi,e]},applicable:function(e){return/    |class="?Apple-tab-span/i.test(e)}}),N=C.extend({init:function(){this.replacements=[/<\?xml[^>]*>/gi,"",//g,"",/"/g,"'",/(?:
 [\s\r\n]+|
)*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:
 [\s\r\n]+|
)*/g,"$1",/

/g,"

",/
(?!\n)/g," ",/]*)>(\s| )+]*>(\s| )*<\/tr>/gi,"",/]*>(\s| )*<\/tbody>/gi,"",/]*>(\s| )*<\/table>/gi,"",/

/g,"
",/^\s*( )+/gi,"",/( |]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)font(\s[^>]*)?>/gi,this.convertFontMatch,/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/ <\/o:p>/gi," ",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/<\/o>/g,"",/style=(["|'])\s*\1/g,"",/(]*>)?\n/g,function(e,t){return t?e:" "}]},convertFontMatch:function(e,t,n){var i=/face=['"]([^'"]+)['"]/i,o=i.exec(n),r=n&&o&&o[1];return t?"
":r?'':""},applicable:function(e){return/class="?Mso/i.test(e)||/style="[^"]*mso-/i.test(e)||/urn:schemas-microsoft-com:office/.test(e)},stripEmptyAnchors:function(e){return e.replace(/]*)>\s*<\/a>/gi,function(e,t){return!t||t.indexOf("href")<0?"":e})},listType:function(e){var t;return/^(]*texhtml[^>]*>)?]*(Symbol|Wingdings)[^>]*>/i.test(e)&&(t=!0),e=e.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),!t&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(e)||t&&/^.\u00a0+/.test(e)?"ul":/^\s*\w+[\.\)]\u00a0{2,}/.test(e)?"ol":void 0},_convertToLi:function(e){var t;return 1==e.childNodes.length?t=e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(s.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivx]+\.$/i.test(e.firstChild.nodeValue)&&s.remove(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&s.remove(e.firstChild),t=e.innerHTML),s.remove(e),s.create(document,"li",{innerHTML:t})},lists:function(t){var n,i,o,r,a,l,d,c,u,f=e(s.blockElements.join(","),t),p=-1,m={ul:{},ol:{}},h=t;for(o=0;f.length>o;o++)if(r=f[o],a=this.listType(r.innerHTML),i=s.name(r),"td"!=i)if(a&&"p"==i){if(l=parseFloat(r.style.marginLeft||0),d=m[a][l],(l>p||!d)&&(d=s.create(document,a),h==t?s.insertBefore(d,r):h.appendChild(d),m[a][l]=d),n!=a)for(c in m)for(u in m[c])e.contains(d,m[c][u])&&delete m[c][u];h=this._convertToLi(r),d.appendChild(h),p=l,n=a}else r.innerHTML?(m={ul:{},ol:{}},h=t,p=-1):s.remove(r)},removeAttributes:function(e){for(var t=e.attributes,n=t.length;n--;)"colspan"!=s.name(t[n])&&e.removeAttributeNode(t[n])},createColGroup:function(t){var i=t.cells,o=e(t).closest("table"),r=o.children("colgroup");2>i.length||(r.length&&(i=r.children(),r[0].parentNode.removeChild(r[0])),r=e(e.map(i,function(e){var t=e.width;return t&&0!==parseInt(t,10)?n.format('',t):""}).join("")),r.is("colgroup")||(r=e("").append(r)),r.prependTo(o))},convertHeaders:function(t){var n,i=t.cells,o=e.map(i,function(t){var n=e(t).children("p").children("strong")[0];return n&&"strong"==s.name(n)?n:void 0});if(o.length==i.length){for(n=0;o.length>n;n++)s.unwrap(o[n]);for(e(t).closest("table").find("colgroup").after("").end().find("thead").append(t),n=0;i.length>n;n++)s.changeTag(i[n],"th")}},removeParagraphs:function(t){var n,i,o,r,a;for(n=0;t.length>n;n++)for(this.removeAttributes(t[n]),r=e(t[n]),a=r.children("p"),i=0,o=a.length;o>i;i++)o-1>i&&s.insertAfter(s.create(document,"br"),a[i]),s.unwrap(a[i])},removeDefaultColors:function(e){for(var t=0;e.length>t;t++)/^\s*color:\s*[^;]*;?$/i.test(e[t].style.cssText)&&s.unwrap(e[t])},tables:function(t){var n,i,o,r,a,s=e(t).find("table"),l=this;for(r=0;s.length>r;r++){for(n=s[r].rows,o=i=n[0],a=1;n.length>a;a++)n[a].cells.length>o.cells.length&&(o=n[a]);l.createColGroup(o),l.convertHeaders(i),l.removeAttributes(s[r]),l.removeParagraphs(s.eq(r).find("td,th")),l.removeDefaultColors(s.eq(r).find("span"))}},headers:function(t){var n,i=e(t).find("p.MsoTitle");for(n=0;i.length>n;n++)s.changeTag(i[n],"h1")},clean:function(e){var t,n=this;return e=C.fn.clean.call(n,e),e=n.stripEmptyAnchors(e),t=s.create(document,"div",{innerHTML:e}),n.headers(t),n.lists(t),n.tables(t),e=t.innerHTML.replace(/(<[^>]*)\s+class="?[^"\s>]*"?/gi,"$1")}}),S=C.extend({init:function(){this.replacements=[/\s+class="Apple-style-span[^"]*"/gi,"",/<(div|p|h[1-6])\s+style="[^"]*"/gi,"<$1",/^
(.*)<\/div>$/,"$1"]},applicable:function(e){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)}}),_=p.extend({init:function(e){p.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e=this.editor;n.support.browser.msie?e.document.execCommand("print",!1,null):e.window.print&&e.window.print()}}),A=p.extend({init:function(e){this.async=!0,p.fn.init.call(this,e)},exec:function(){var e=this,t=this.lockRange(!0);this.editor.saveAsPDF().then(function(){e.releaseRange(t)})}});f(o,{_finishUpdate:t,Command:p,GenericCommand:m,InsertHtmlCommand:h,InsertHtmlTool:g,TypingHandler:v,SystemHandler:k,BackspaceHandler:b,Keyboard:y,Clipboard:w,Cleaner:C,TabCleaner:T,MSWordFormatCleaner:N,WebkitFormatCleaner:S,PrintCommand:_,ExportPdfCommand:A}),a("insertHtml",new g({template:new d({template:r.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})})),a("print",new l({command:_,template:new d({template:r.buttonTemplate,title:"Print"})})),a("pdf",new l({command:A,template:new d({template:r.buttonTemplate,title:"Export PDF"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/inlineformat.min",["editor/system.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,o=t.ui.Editor.fn.options.formats,r=i.EditorUtils,a=i.Tool,s=i.ToolTemplate,l=i.FormatTool,d=i.Dom,c=i.RangeUtils,u=e.extend,f=i.EditorUtils.registerTool,p=i.EditorUtils.registerFormat,m="k-marker",h=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,o=0,r=e.parentNode;for(t=r.firstChild;t;t=t.nextSibling)t!=e&&(t.className==m?o++:3==t.nodeType?n++:i++);return o>1&&r.firstChild.className==m&&r.lastChild.className==m?0:i+n},findSuitable:function(e,t){var n,i;if(!t&&this.numberOfSiblings(e)>0)return null;for(n=e.parentNode,i=this.format[0].tags;!d.ofType(n,i);){if(this.numberOfSiblings(n)>0)return null;n=n.parentNode}return n},findFormat:function(e){var t,n,i,o,r,a=this.format,s=d.attrEquals;for(t=0,n=a.length;n>t;t++){if(i=e,o=a[t].tags,r=a[t].attr,i&&d.ofType(i,o)&&s(i,r))return i;for(;i;)if(i=d.parentOfType(i,o),i&&s(i,r))return i}return null},isFormatted:function(e){var t,n;for(t=0,n=e.length;n>t;t++)if(this.findFormat(e[t]))return!0;return!1}}),g=n.extend({init:function(e,t){this.finder=new h(e),this.attributes=u({},e[0].attr,t),this.tag=e[0].tags[0]},wrap:function(e){return d.wrap(e,d.create(e.ownerDocument,this.tag,this.attributes))},activate:function(e,t){this.finder.isFormatted(t)?(this.split(e),this.remove(t)):this.apply(t)},toggle:function(e){var t=c.textNodes(e);t.length>0&&this.activate(e,t)},apply:function(e){var t,n,i,o,r=[];for(t=0,n=e.length;n>t;t++){if(i=e[t],o=this.finder.findSuitable(i))d.attr(o,this.attributes);else{for(;!d.isBlock(i.parentNode)&&1==i.parentNode.childNodes.length;)i=i.parentNode;o=this.wrap(i)}r.push(o)}this.consolidate(r)},remove:function(e){var t,n,i;for(t=0,n=e.length;n>t;t++)i=this.finder.findFormat(e[t]),i&&(this.attributes&&this.attributes.style?(d.unstyle(i,this.attributes.style),i.style.cssText||i.attributes["class"]||d.unwrap(i)):d.unwrap(i))},split:function(e){var t,n,i=c.textNodes(e),o=i.length;if(o>0)for(t=0;o>t;t++)n=this.finder.findFormat(i[t]),n&&c.split(e,n,!0)},consolidate:function(e){for(var t,n;e.length>1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==m&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText){for(;t.firstChild;)n.appendChild(t.firstChild);d.remove(t)}}}),v=h.extend({init:function(e,t){this.format=e,this.greedyProperty=t,h.fn.init.call(this,e)},getInlineCssValue:function(t){var n,i,o,r,a,s,l,c,u,f,p,m,h=t.attributes,g=e.trim;if(h)for(n=0,i=h.length;i>n;n++)if(o=h[n],r=o.nodeName,a=o.nodeValue,o.specified&&"style"==r)for(s=g(a||t.style.cssText).split(";"),c=0,u=s.length;u>c;c++)if(l=s[c],l.length){if(f=l.split(":"),p=g(f[0].toLowerCase()),m=g(f[1]),p!=this.greedyProperty)continue;return p.indexOf("color")>=0?d.toHex(m):m}},getFormatInner:function(t){var n,i,o,r=e(d.isDataNode(t)?t.parentNode:t),a=r.parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=a.length;i>n;n++)if(o="className"==this.greedyProperty?a[n].className:this.getInlineCssValue(a[n]))return o;return"inherit"},getFormat:function(e){var t,n,i=this.getFormatInner(e[0]);for(t=1,n=e.length;n>t;t++)if(i!=this.getFormatInner(e[t]))return"";return i},isFormatted:function(e){return""!==this.getFormat(e)}}),b=g.extend({init:function(e,n,i){g.fn.init.call(this,e,n),this.values=n,this.finder=new v(e,i),i&&(this.greedyProperty=t.toCamelCase(i))},activate:function(e,t){var n=this.greedyProperty,i="apply";this.split(e),n&&"inherit"==this.values.style[n]&&(i="remove"),this[i](t)}}),k=l.extend({init:function(e){l.fn.init.call(this,u(e,{finder:new h(e.format),formatter:function(){return new g(e.format)}}))}}),y=a.extend({update:function(e,t){var n=e.data(this.type);n.close(),n.value(this.finder.getFormat(t))}}),w=y.extend({init:function(e){a.fn.init.call(this,e),this.type=t.support.browser.msie||t.support.touch?"kendoDropDownList":"kendoComboBox",this.format=[{tags:["span"]}],this.finder=new v(this.format,e.cssAttr)},command:function(e){var t=this.options,n=this.format,o={};return new i.FormatCommand(u(e,{formatter:function(){return o[t.domAttr]=e.value,new b(n,{style:o},t.cssAttr)}}))},initialize:function(e,t){var n,i=t.editor,o=this.options,r=o.name,s=[];o.defaultValue&&(s=[{text:i.options.messages[o.defaultValue[0].text],value:o.defaultValue[0].value}]),n=s.concat(o.items?o.items:i.options[r]||[]),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:n,change:function(){a.exec(i,r,this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+r).find("*").addBack().attr("unselectable","on"),e.data(this.type).value("inherit")}}),C=a.extend({init:function(e){a.fn.init.call(this,e),this.format=[{tags:["span"]}],this.finder=new v(this.format,e.cssAttr)},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,o={};return new i.FormatCommand(u(e,{formatter:function(){return o[t.domAttr]=e.value,new b(n,{style:o},t.cssAttr)}}))},initialize:function(e,n){var i=n.editor,o=this.name,r=u({},C.fn.options,this.options),s=r.palette;e=this._widget=new t.ui.ColorPicker(e,{toolIcon:"k-"+r.name,palette:s,change:function(){var t=e.value();t&&a.exec(i,o,t),i.focus()},activate:function(t){t.preventDefault(),e.trigger("change")}}),e.wrapper.attr({title:n.title,unselectable:"on"}).find("*").attr("unselectable","on")}});u(i,{InlineFormatFinder:h,InlineFormatter:g,DelayedExecutionTool:y,GreedyInlineFormatFinder:v,GreedyInlineFormatter:b,InlineFormatTool:k,FontTool:w,ColorTool:C}),p("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),f("bold",new k({key:"B",ctrl:!0,format:o.bold,template:new s({template:r.buttonTemplate,title:"Bold"})})),p("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),f("italic",new k({key:"I",ctrl:!0,format:o.italic,template:new s({template:r.buttonTemplate,title:"Italic"})})),p("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),f("underline",new k({key:"U",ctrl:!0,format:o.underline,template:new s({template:r.buttonTemplate,title:"Underline"})})),p("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),f("strikethrough",new k({format:o.strikethrough,template:new s({template:r.buttonTemplate,title:"Strikethrough"})})),p("superscript",[{tags:["sup"]}]),f("superscript",new k({format:o.superscript,template:new s({template:r.buttonTemplate,title:"Superscript"})})),p("subscript",[{tags:["sub"]}]),f("subscript",new k({format:o.subscript,template:new s({template:r.buttonTemplate,title:"Subscript"})})),f("foreColor",new C({cssAttr:"color",domAttr:"color",name:"foreColor",template:new s({template:r.colorPickerTemplate,title:"Color"})})),f("backColor",new C({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new s({template:r.colorPickerTemplate,title:"Background Color"})})),f("fontName",new w({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new s({template:r.comboBoxTemplate,title:"Font Name"})})),f("fontSize",new w({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new s({template:r.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/formatblock.min",["editor/inlineformat.min"],e)}(function(){!function(e){var t,n=window.kendo,i=n.Class,o=e.extend,r=n.ui.editor,a=n.ui.Editor.fn.options.formats,s=r.Dom,l=r.Command,d=r.ToolTemplate,c=r.FormatTool,u=r.EditorUtils,f=u.registerTool,p=u.registerFormat,m=r.RangeUtils,h=i.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,o;for(n=0,i=t.length;i>n;n++)if(o=t[n],!o||!s.isAncestorOrSelf(e,o))return!1;return!0},findSuitable:function(t){var n,i,o,r,a=this.format,l=[];for(n=0,i=t.length;i>n;n++){for(r=a.length-1;r>=0&&!(o=s.ofType(t[n],a[r].tags)?t[n]:s.parentOfType(t[n],a[r].tags));r--);if(!o||"true"===o.contentEditable)return[];e.inArray(o,l)<0&&l.push(o)}for(n=0,i=l.length;i>n;n++)if(this.contains(l[n],l))return[l[n]];return l},findFormat:function(e){var t,n,i,o,r,a=this.format,l=s.editableParent(e);for(t=0,n=a.length;n>t;t++)for(i=e,o=a[t].tags,r=a[t].attr;i&&s.isAncestorOf(l,i);){if(s.ofType(i,o)&&s.attrEquals(i,r))return i;i=i.parentNode}return null},getFormat:function(e){var t,n,i=this,o=function(e){return i.findFormat(s.isDataNode(e)?e.parentNode:e)},r=o(e[0]);if(!r)return"";for(t=1,n=e.length;n>t;t++)if(r!=o(e[t]))return"";return r.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,n=e.length;n>t;t++)if(!this.findFormat(e[t]))return!1;return!0}}),g=i.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new h(e)},wrap:function(e,t,n){var i,o,r,a,l,d=1==n.length?s.blockParentOrBody(n[0]):s.commonAncestor.apply(null,n);for(s.isInline(d)&&(d=s.blockParentOrBody(d)),i=s.significantChildNodes(d),o=s.findNodeIndex(i[0]),r=s.create(d.ownerDocument,e,t),a=0;i.length>a;a++)l=i[a],s.isBlock(l)?(s.attr(l,t),r.childNodes.length&&(s.insertBefore(r,l),r=r.cloneNode(!1)),o=s.findNodeIndex(l)+1):r.appendChild(l);r.firstChild&&s.insertAt(d,r,o)},apply:function(t){function n(e){return o({},e&&e.attr,c)}var i,r,a,l,d,c=this.values,f=s.filter("img",t),p=u.formatByName("img",this.format),m=n(p);if(e.each(f,function(){s.attr(this,m)}),f.length!=t.length)if(r=s.filter("img",t,!0),a=this.finder.findSuitable(r),a.length)for(l=0,d=a.length;d>l;l++)i=u.formatByName(s.name(a[l]),this.format),s.attr(a[l],n(i));else i=this.format[0],this.wrap(i.tags[0],n(i),r)},remove:function(e){var t,n,i,o,r;for(t=0,n=e.length;n>t;t++)i=this.finder.findFormat(e[t]),i&&(r=s.name(i),"div"!=r||i.getAttribute("class")?(o=u.formatByName(r,this.format),o.attr.style&&s.unstyle(i,o.attr.style),o.attr.className&&s.removeClass(i,o.attr.className)):s.unwrap(i))},toggle:function(e){var t=this,n=m.nodes(e);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),v=i.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new h(e)},apply:function(e){var t,n,i,o,a,l,d,c=this.format,u=s.blockParents(e),f=c[0].tags[0];if(u.length)for(t=0,n=u.length;n>t;t++)d=s.name(u[t]),"li"==d?(i=u[t].parentNode,o=new r.ListFormatter(i.nodeName.toLowerCase(),f),a=this.editor.createRange(),a.selectNode(u[t]),o.toggle(a)):f&&("td"==d||u[t].attributes.contentEditable)?new g(c,this.values).apply(u[t].childNodes):(l=s.changeTag(u[t],f),s.attr(l,c[0].attr));else new g(c,this.values).apply(e)},toggle:function(e){var t=m.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),t=m.textNodes(e),t.length||(t=s.significantChildNodes(e.commonAncestorContainer))),this.apply(t)}}),b=l.extend({init:function(e){e.formatter=e.formatter(),l.fn.init.call(this,e)}}),k=c.extend({init:function(e){c.fn.init.call(this,o(e,{finder:new h(e.format),formatter:function(){return new g(e.format)}}))}});o(r,{BlockFormatFinder:h,BlockFormatter:g,GreedyBlockFormatter:v,FormatCommand:b,BlockFormatTool:k}),t=["ul","ol","li"],p("justifyLeft",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"left",listStylePosition:""}}}]),f("justifyLeft",new k({format:a.justifyLeft,template:new d({template:u.buttonTemplate,title:"Justify Left"})})),p("justifyCenter",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"center",listStylePosition:"inside"}}}]),f("justifyCenter",new k({format:a.justifyCenter,template:new d({template:u.buttonTemplate,title:"Justify Center"})})),p("justifyRight",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"right",listStylePosition:"inside"}}}]),f("justifyRight",new k({format:a.justifyRight,template:new d({template:u.buttonTemplate,title:"Justify Right"})})),p("justifyFull",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"justify"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"justify",listStylePosition:""}}}]),f("justifyFull",new k({format:a.justifyFull,template:new d({template:u.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/linebreak.min",["editor/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,o=i.Dom,r=i.Command,a=i.Tool,s=i.BlockFormatter,l=o.normalize,d=i.RangeUtils,c=i.EditorUtils.registerTool,u=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=o.create(e,"a");return i.className="k-marker",t.insertNode(i),i.parentNode||(n=t.commonAncestorContainer,n.innerHTML="",n.appendChild(i)),l(i.parentNode),i},_moveFocus:function(e,t){if(o.isEmpty(t))e.setStartBefore(t);else{e.selectNodeContents(t);var n=d.textNodes(e)[0];if(!n){for(;t.childNodes.length&&!o.is(t.firstChild,"br");)t=t.firstChild;n=t}o.isEmpty(n)?e.setStartBefore(n):(o.emptyNode(n)&&(n.innerHTML="\ufeff"),e.setStartBefore(n.firstChild||n))}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=o.parentOfType(e.startContainer,t),i=o.parentOfType(e.endContainer,t);return n&&!i||!n&&i},_blankAfter:function(e){for(;e&&(o.isMarker(e)||""===o.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var e,t,n,r,a,c,u,f,p=this.getRange(),m=d.documentFromRange(p),h=i.emptyElementContent,g=this.shouldTrim(p);p.deleteContents(),a=this._insertMarker(m,p),c=o.closestEditableOfType(a,["li"]),u=o.closestEditableOfType(a,"h1,h2,h3,h4,h5,h6".split(",")),c?o.emptyNode(c)&&(r=o.create(m,"p"),c.nextSibling&&(f=p.cloneRange(),f.selectNode(c),d.split(f,c.parentNode)),o.insertAfter(r,c.parentNode),o.remove(1==c.parentNode.childNodes.length?c.parentNode:c),r.innerHTML=h,n=r):u&&this._blankAfter(a)&&(r=o.create(m,"p"),o.insertAfter(r,u),r.innerHTML=h,o.remove(a),n=r),n||(c||u||new s([{tags:["p"]}]).apply([a]),p.selectNode(a),e=o.parentOfType(a,[c?"li":u?o.name(u):"p"]),d.split(p,e,g),t=e.previousSibling,o.is(t,"li")&&t.firstChild&&!o.is(t.firstChild,"br")&&(t=t.firstChild),n=e.nextSibling,this.clean(t),this.clean(n,{links:!0}),o.is(n,"li")&&n.firstChild&&!o.is(n.firstChild,"br")&&(n=n.firstChild),o.remove(e),l(t)),l(n),this._moveFocus(p,n),p.collapse(!0),o.scrollTo(n),d.selectRange(p)},clean:function(t,n){var r,a=t;if(t.firstChild&&o.is(t.firstChild,"br")&&o.remove(t.firstChild),o.isDataNode(t)&&!t.nodeValue&&(t=t.parentNode),t){for(r=!1;t.firstChild&&1==t.firstChild.nodeType;)r=r||o.significantNodes(t.childNodes).length>1,t=t.firstChild;if(o.isEmpty(t)||!/^\s*$/.test(t.innerHTML)||r||(e(a).find(".k-br").remove(),t.innerHTML=i.emptyElementContent),n&&n.links)for(;t!=a;){if(o.is(t,"a")&&o.emptyNode(t)){o.unwrap(t);break}t=t.parentNode}}}}),f=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},exec:function(){var e,n=this.getRange(),i=o.create(d.documentFromRange(n),"br"),r=t.support.browser,a=r.msie&&11>r.version;n.deleteContents(),n.insertNode(i),l(i.parentNode),a||i.nextSibling&&!o.isWhitespace(i.nextSibling)||(e=i.cloneNode(!0),e.className="k-br",o.insertAfter(e,i)),n.setStartAfter(i),n.collapse(!0),o.scrollTo(i.nextSibling||i),d.selectRange(n)}});n(i,{ParagraphCommand:u,NewLineCommand:f}),c("insertLineBreak",new a({key:13,shift:!0,command:f})),c("insertParagraph",new a({key:13,command:u}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/lists.min",["editor/linebreak.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=e.extend,o=t.ui.editor,r=o.Dom,a=o.RangeUtils,s=o.EditorUtils,l=o.Command,d=o.ToolTemplate,c=o.FormatTool,u=o.BlockFormatFinder,f=a.textNodes,p=o.EditorUtils.registerTool,m=u.extend({init:function(e){this.tag=e;var t=this.tags=["ul"==e?"ol":"ul",e];u.fn.init.call(this,[{tags:t}])},isFormatted:function(e){var t,n,i=[];for(n=0;e.length>n;n++)t=this.findFormat(e[n]),t&&r.name(t)==this.tag&&i.push(t);if(1>i.length)return!1;if(i.length!=e.length)return!1;for(n=0;i.length>n&&i[n].parentNode==t.parentNode;n++)if(i[n]!=t)return!1;return!0},findSuitable:function(e){var t=this.findFormat(e[0]);return t&&r.name(t)==this.tag?t:null}}),h=n.extend({init:function(e,t){var n=this;n.finder=new m(e),n.tag=e,n.unwrapTag=t},isList:function(e){var t=r.name(e);return"ul"==t||"ol"==t||"dl"==t},wrap:function(e,t){var n,i,o=r.create(e.ownerDocument,"li");for(n=0;t.length>n;n++)if(i=t[n],r.is(i,"li"))e.appendChild(i);else if(this.isList(i))for(;i.firstChild;)e.appendChild(i.firstChild);else if(r.is(i,"td")){for(;i.firstChild;)o.appendChild(i.firstChild);e.appendChild(o),i.appendChild(e),e=e.cloneNode(!1),o=o.cloneNode(!1)}else o.appendChild(i),r.isBlock(i)&&(e.appendChild(o),r.unwrap(i),o=o.cloneNode(!1));o.firstChild&&e.appendChild(o)},containsAny:function(e,t){for(var n=0;t.length>n;n++)if(r.isAncestorOrSelf(e,t[n]))return!0;return!1},suitable:function(e,t){if("k-marker"==e.className){var n=e.nextSibling;if(n&&r.isBlock(n))return!1;if(n=e.previousSibling,n&&r.isBlock(n))return!1}return this.containsAny(e,t)||r.isInline(e)||3==e.nodeType},_parentLists:function(t){var n=r.closestEditable(t);return e(t).parentsUntil(n,"ul,ol")},split:function(e){var t,n,i,o,s,l,d=f(e);if(d.length)for(t=r.parentOfType(d[0],["li"]),n=r.parentOfType(d[d.length-1],["li"]),e.setStartBefore(t),e.setEndAfter(n),o=0,s=d.length;s>o;o++)l=this.finder.findFormat(d[o]),l&&(i=this._parentLists(l),i.length?a.split(e,i.last()[0],!0):a.split(e,l,!0))},merge:function(e,t){for(var n,i=t.previousSibling;i&&("k-marker"==i.className||3==i.nodeType&&r.isWhitespace(i));)i=i.previousSibling;if(i&&r.name(i)==e){for(;t.firstChild;)i.appendChild(t.firstChild);r.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&r.isWhitespace(n));)n=n.nextSibling;if(n&&r.name(n)==e){for(;t.lastChild;)n.insertBefore(t.lastChild,n.firstChild);r.remove(t)}},breakable:function(e){return e!=e.ownerDocument.body&&!/table|tbody|tr|td/.test(r.name(e))&&!e.attributes.contentEditable},applyOnSection:function(t,n){function i(){u.push(this)}var o,a,s,l,d=this.tag,c=r.closestSplittableParent(n),u=[],f=this.finder.findSuitable(n);for(f||(f=new m("ul"==d?"ol":"ul").findSuitable(n)),/table|tbody/.test(r.name(c))?o=e.map(n,function(e){return r.parentOfType(e,["td"])}):(o=r.significantChildNodes(c),e.grep(o,r.isBlock).length&&(o=e.grep(o,e.proxy(function(e){return this.containsAny(e,n)},this))),o.length||(o=n)),a=0;o.length>a;a++)s=o[a],l=(!f||!r.isAncestorOrSelf(f,s))&&this.suitable(s,n),l&&(f&&this.isList(s)?(e.each(s.childNodes,i),r.remove(s)):u.push(s));u.length==o.length&&this.breakable(c)&&(u=[c]),f||(f=r.create(c.ownerDocument,d),r.insertBefore(f,u[0])),this.wrap(f,u),r.is(f,d)||r.changeTag(f,d),this.merge(d,f)},apply:function(e){var t,n,i,o=0,a=[];do i=r.closestEditable(e[o],["td","body"]),t&&i==t?n.push(e[o]):(t&&a.push({section:t,nodes:n}),n=[e[o]],t=i),o++;while(e.length>o);for(a.push({section:t,nodes:n}),o=0;a.length>o;o++)this.applyOnSection(a[o].section,a[o].nodes)},unwrap:function(e){var t,n,i,o,a=e.ownerDocument.createDocumentFragment(),s=this.unwrapTag;for(n=e.firstChild;n;n=n.nextSibling){for(i=r.create(e.ownerDocument,s||"p");n.firstChild;)o=n.firstChild,r.isBlock(o)?(i.firstChild&&(a.appendChild(i),i=r.create(e.ownerDocument,s||"p")),a.appendChild(o)):i.appendChild(o);i.firstChild&&a.appendChild(i)}t=this._parentLists(e),t[0]?(r.insertAfter(a,t.last()[0]),t.last().remove()):r.insertAfter(a,e),r.remove(e)},remove:function(e){var t,n,i;for(n=0,i=e.length;i>n;n++)t=this.finder.findFormat(e[n]),t&&this.unwrap(t)},toggle:function(e){var t,n=this,i=f(e),o=e.commonAncestorContainer;i.length||(e.selectNodeContents(o),i=f(e),i.length||(t=o.ownerDocument.createTextNode(""),e.startContainer.appendChild(t),i=[t],e.selectNode(t.parentNode))),n.finder.isFormatted(i)?(n.split(e),n.remove(i)):n.apply(i)}}),g=l.extend({init:function(e){e.formatter=new h(e.tag),l.fn.init.call(this,e)}}),v=c.extend({init:function(e){this.options=e,c.fn.init.call(this,i(e,{finder:new m(e.tag)}))},command:function(e){return new g(i(e,{tag:this.options.tag}))}});i(o,{ListFormatFinder:m,ListFormatter:h,ListCommand:g,ListTool:v}),p("insertUnorderedList",new v({tag:"ul",template:new d({template:s.buttonTemplate,title:"Insert unordered list"})})),p("insertOrderedList",new v({tag:"ol",template:new d({template:s.buttonTemplate,title:"Insert ordered list"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/link.min",["editor/lists.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.Class,o=e.extend,r=e.proxy,a=n.ui.editor,s=a.Dom,l=a.RangeUtils,d=a.EditorUtils,c=a.Command,u=a.Tool,f=a.ToolTemplate,p=a.InlineFormatter,m=a.InlineFormatFinder,h=l.textNodes,g=a.EditorUtils.registerTool,v=i.extend({findSuitable:function(e){return s.parentOfType(e,["a"])}}),b=i.extend({init:function(){this.finder=new v},apply:function(e,t){var n,i,o,r,a,d,c,u=h(e);if(t.innerHTML){for(i=l.documentFromRange(e),n=l.getMarkers(e),e.deleteContents(),r=s.create(i,"a",t),e.insertNode(r),a=r.parentNode,"a"==s.name(a)&&s.insertAfter(r,a),s.emptyNode(a)&&s.remove(a),d=r,c=0;n.length>c;c++)s.insertAfter(n[c],d),d=n[c];n.length&&(s.insertBefore(i.createTextNode("\ufeff"),n[1]),s.insertAfter(i.createTextNode("\ufeff"),n[1]),e.setStartBefore(n[0]),e.setEndAfter(n[n.length-1]))}else o=new p([{tags:["a"]}],t),o.finder=this.finder,o.apply(u)}}),k=c.extend({init:function(e){e.formatter={toggle:function(e){new p([{tags:["a"]}]).remove(h(e))}},this.options=e,c.fn.init.call(this,e)}}),y=c.extend({init:function(e){this.options=e,c.fn.init.call(this,e),this.formatter=new b,e.url?this.exec=function(){this.formatter.apply(e.range,{href:e.url,innerHTML:e.text||e.url,target:e.target})}:(this.attributes=null,this.async=!0)},_dialogTemplate:function(){return n.template("
")({ messages:this.editor.options.messages})},exec:function(){var t,n,i,o,a=this.editor.options.messages;this._initialText="",this._range=this.lockRange(!0),t=h(this._range),n=t.length?this.formatter.finder.findSuitable(t[0]):null,i=t.length&&"img"==s.name(t[0]),o=this.createDialog(this._dialogTemplate(),{title:a.createLink,close:r(this._close,this),visible:!1}),n&&(this._range.selectNodeContents(n),t=h(this._range)),this._initialText=this.linkText(t),o.find(".k-dialog-insert").click(r(this._apply,this)).end().find(".k-dialog-close").click(r(this._close,this)).end().find(".k-edit-field input").keydown(r(this._keydown,this)).end().find("#k-editor-link-url").val(this.linkUrl(n)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(n?n.title:"").end().find("#k-editor-link-target").attr("checked",n?"_blank"==n.target:!1).end().find(".k-editor-link-text-row").toggle(!i),this._dialog=o.data("kendoWindow").center().open(),e("#k-editor-link-url",o).focus().select()},_keydown:function(e){var t=n.keys;e.keyCode==t.ENTER?this._apply(e):e.keyCode==t.ESC&&this._close(e)},_apply:function(t){var n,i,o,r=this._dialog.element,a=e("#k-editor-link-url",r).val(),l=e("#k-editor-link-text",r);a&&"http://"!=a&&(a.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(a)&&(a="mailto:"+a),this.attributes={href:a},n=e("#k-editor-link-title",r).val(),n&&(this.attributes.title=n),l.is(":visible")&&(i=l.val(),i||this._initialText?i&&i!==this._initialText&&(this.attributes.innerHTML=s.stripBom(i)):this.attributes.innerHTML=a),o=e("#k-editor-link-target",r).is(":checked"),this.attributes.target=o?"_blank":null,this.formatter.apply(this._range,this.attributes)),this._close(t),this.change&&this.change()},_close:function(e){e.preventDefault(),this._dialog.destroy(),s.windowFromDocument(l.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):"http://"},linkText:function(e){var t,n="";for(t=0;e.length>t;t++)n+=e[t].nodeValue;return s.stripBom(n||"")},redo:function(){var e=this.lockRange(!0);this.formatter.apply(e,this.attributes),this.releaseRange(e)}}),w=u.extend({init:function(t){this.options=t,this.finder=new m([{tags:["a"]}]),u.fn.init.call(this,e.extend(t,{command:k}))},initialize:function(e,t){u.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){e.toggleClass("k-state-disabled",!this.finder.isFormatted(t)).removeClass("k-state-hover")}});o(n.ui.editor,{LinkFormatFinder:v,LinkFormatter:b,UnlinkCommand:k,LinkCommand:y,UnlinkTool:w}),g("createLink",new u({key:"K",ctrl:!0,command:y,template:new f({template:d.buttonTemplate,title:"Create Link"})})),g("unlink",new w({key:"K",ctrl:!0,shift:!0,template:new f({template:d.buttonTemplate,title:"Remove Link"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/file.min",["kendo.filebrowser.min","editor/link.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,a=o.Dom,s=r.registerTool,l=o.ToolTemplate,d=o.RangeUtils,c=o.Command,u=o.LinkFormatter,f=d.textNodes,p=n.keys,m="#k-editor-file-url",h="#k-editor-file-title",g=c.extend({init:function(e){var t=this;c.fn.init.call(t,e),t.formatter=new u,t.async=!0,t.attributes={}},insertFile:function(e,t){var n=this.attributes,i=d.documentFromRange(t);if(n.href&&"http://"!=n.href){if(!e)return e=a.create(i,"a",{href:n.href}),e.innerHTML=n.innerHTML,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(i.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;a.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('
# if (showBrowser) { #
# } #
')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();this.formatter.apply(t,this.attributes),e.releaseRange(t)},exec:function(){function e(e){var t=s.element,n=t.find(m).val().replace(/ /g,"%20"),i=t.find(h).val();l.attributes={href:n,innerHTML:""!==i?i:n},g=l.insertFile(v,c),o(e),l.change&&l.change()}function o(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(c)).focus(),g||l.releaseRange(c)}function r(t){t.keyCode==p.ENTER?e(t):t.keyCode==p.ESC&&o(t)}var s,l=this,c=l.lockRange(),u=f(c),g=!1,v=u.length?this.formatter.finder.findSuitable(u[0]):null,b=l.editor.options,k=b.messages,y=b.fileBrowser,w=!!(n.ui.FileBrowser&&y&&y.transport&&y.transport.read!==t),C={title:k.insertFile,visible:!1,resizable:w};C.close=o,w&&(C.width=750),s=this.createDialog(l._dialogTemplate(w),C).toggleClass("k-filebrowser-dialog",w).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(m).val(v?v.getAttribute("href",2):"http://").end().find(h).val(v?v.title:"").end().data("kendoWindow"),w&&(l._fileBrowser=new n.ui.FileBrowser(s.element.find(".k-filebrowser"),i({},y,{change:function(){s.element.find(m).val(this.value())},apply:e}))),s.center().open(),s.element.find(m).focus().select()}});n.ui.editor.FileCommand=g,s("insertFile",new o.Tool({command:g,template:new l({template:r.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/image.min",["kendo.imagebrowser.min","editor/link.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,a=o.Dom,s=r.registerTool,l=o.ToolTemplate,d=o.RangeUtils,c=o.Command,u=n.keys,f="#k-editor-image-url",p="#k-editor-image-title",m="#k-editor-image-width",h="#k-editor-image-height",g=c.extend({init:function(e){var t=this;c.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var n,i=this.attributes,o=d.documentFromRange(t);if(i.src&&"http://"!=i.src){if(n=function(){setTimeout(function(){i.width||e.removeAttribute("width"),i.height||e.removeAttribute("height"),e.removeAttribute("complete")})},!e)return e=a.create(o,"img",i),e.onload=e.onerror=n,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(o.createTextNode("\ufeff"),e),n(),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;e.onload=e.onerror=n,a.attr(e,i),n()}return!1},_dialogTemplate:function(e){return n.template('
# if (showBrowser) { #
# } #
')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();e.insertImage(d.image(t),t)||e.releaseRange(t)},exec:function(){function e(e){var t=s.element,n=parseInt(t.find(m).val(),10),i=parseInt(t.find(h).val(),10);l.attributes={src:t.find(f).val().replace(/ /g,"%20"),alt:t.find(p).val()},l.attributes.width=null,l.attributes.height=null,!isNaN(n)&&n>0&&(l.attributes.width=n),!isNaN(i)&&i>0&&(l.attributes.height=i),g=l.insertImage(v,c),o(e),l.change&&l.change()}function o(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(c)).focus(),g||l.releaseRange(c)}function r(t){t.keyCode==u.ENTER?e(t):t.keyCode==u.ESC&&o(t)}var s,l=this,c=l.lockRange(),g=!1,v=d.image(c),b=v&&v.getAttribute("width")||"",k=v&&v.getAttribute("height")||"",y=l.editor.options,w=y.messages,C=y.imageBrowser,x=!!(n.ui.ImageBrowser&&C&&C.transport&&C.transport.read!==t),T={title:w.insertImage,visible:!1,resizable:x};T.close=o,x&&(T.width=750),s=this.createDialog(l._dialogTemplate(x),T).toggleClass("k-filebrowser-dialog",x).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(f).val(v?v.getAttribute("src",2):"http://").end().find(p).val(v?v.alt:"").end().find(m).val(b).end().find(h).val(k).end().data("kendoWindow"),x&&(this._imageBrowser=new n.ui.ImageBrowser(s.element.find(".k-imagebrowser"),i({},C,{change:function(){s.element.find(f).val(this.value())},apply:e}))),s.center().open(),s.element.find(f).focus().select()}});n.ui.editor.ImageCommand=g,s("insertImage",new o.Tool({command:g,template:new l({template:r.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/components.min",["editor/image.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.ui.DropDownList,o=n.ui.editor.Dom,r=i.extend({init:function(t,o){var r=this;i.fn.init.call(r,t,o),n.support.mobileOS.ios&&(this._initSelectOverlay(),this.bind("dataBound",e.proxy(this._initSelectOverlay,this))),r.text(r.options.title),r.bind("open",function(){if(r.options.autoSize){var e,t=r.list;t.css({whiteSpace:"nowrap",width:"auto"}),e=t.width(),e?e+=20:e=r._listWidth,t.css("width",e+n.support.scrollbar()),r._listWidth=e}})},options:{name:"SelectBox",index:-1},_initSelectOverlay:function(){var t,i,o,r,a=this,s=a.value(),l=this.dataSource.view(),d="",c=n.htmlEncode;for(i=0;l.length>i;i++)t=l[i],d+="