text: webpackJsonp([2],{428:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(76),r=(n.n(i),n(2)),o=n.n(r),a=(n(49),n(1)),s=n.n(a),l=n(5),c=n.n(l),u=n(441),d=n(699),f=(new d(window.navigator.userAgent),o()(window).width()),m=!1;f>800&&(m=!0),c.a.render(s.a.createElement(u.a,{post:post,withColumns:m}),document.getElementById("editor-app"))},434:function(e,t){},435:function(e,t){},440:function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(1),l=n.n(s),c=n(5),u=n.n(c),d=n(2),f=n.n(d),m=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),p=(n(10).Translate,n(10).I18n);f.a.fn.checkbox=n(422);var h=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={in_reply_to:n.props.in_reply_to,comments_status:n.props.comments_status,adult_content:n.props.adult_content,mention_notifications_status:n.props.mention_notifications_status},n.dom=void 0,n.handleChangeReply=n.handleChangeReply.bind(n),n.handleChangeCheckbox=n.handleChangeCheckbox.bind(n),n}return a(t,e),m(t,[{key:"shouldComponentUpdate",value:function(e,t){return!0}},{key:"componentDidMount",value:function(){var e=this;this.dom=f()(u.a.findDOMNode(this)),this.dom.find(".ui.checkbox").checkbox({onChange:function(){e.handleChangeCheckbox(this)}}),this.dom.find("input[name=adult_content]").attr("checked",this.state.adult_content),this.dom.find("input[name=comments_status]").attr("checked",this.state.comments_status),this.dom.find("input[name=mention_notifications_status]").attr("checked",this.state.mention_notifications_status),this.dom.find("#editor_in_reply_to").change(function(){e.handleChangeReply(this)}),this.dom.find("#editor_in_reply_to").val(this.state.in_reply_to)}},{key:"render",value:function(){return l.a.createElement("div",{id:"config-editor"},l.a.createElement("div",{className:"inline field"},l.a.createElement("div",{className:"ui toggle checkbox"},l.a.createElement("input",{type:"checkbox",name:"comments_status",className:"hidden"}),l.a.createElement("label",null,p.t("editor.enable_comments")))),l.a.createElement("div",{className:"inline field"},l.a.createElement("div",{className:"ui toggle checkbox"},l.a.createElement("input",{type:"checkbox",name:"adult_content",className:"hidden"}),l.a.createElement("label",null,p.t("editor.adult_content")))),l.a.createElement("div",{className:"inline field"},l.a.createElement("div",{className:"ui toggle checkbox"},l.a.createElement("input",{type:"checkbox",name:"mention_notifications_status",className:"hidden"}),l.a.createElement("label",null,p.t("editor.notify_mentions")))),l.a.createElement("br",null),l.a.createElement("div",{className:"field"},l.a.createElement("label",null,p.t("editor.in_reply_to")),l.a.createElement("input",{type:"text",name:"in_reply_to",id:"editor_in_reply_to",placeholder:"Example: https://www.nytimes.com/..."})))}},{key:"handleChangeReply",value:function(e){var t=f()(e).attr("name"),n=f()(e).val();this.setState(i({},t,n)),this.props.onChangeConfig(this.state)}},{key:"handleChangeCheckbox",value:function(e){var t=f()(e).attr("name"),n=f()(e).is(":checked");this.setState(i({},t,n)),this.props.onChangeConfig(this.state)}}]),t}(l.a.PureComponent);h.defaultProps={},t.a=h},441:function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(1),l=n.n(s),c=n(5),u=n.n(c),d=n(2),f=n.n(d),m=n(7),p=n(456),h=n(455),g=n(442),v=n(440),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),b=(n(10).Translate,n(10).I18n);f.a.fn.form=n(102),f.a.fn.transition=n(9),f.a.fn.transition.settings.silent=!0;var C=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={id:e.post.id,content:e.post.content,title:e.post.title,tags:e.post.tags,slug:e.post.slug,adult_content:e.post.adult_content,in_reply_to:e.post.in_reply_to,comments_status:e.post.comments_status,mention_notifications_status:e.post.mention_notifications_status,featured_img:e.post.featured_img,showPreview:!1,showPublish:!1,showUnpublish:!1},n.dom=void 0,n.getTemplate=n.getTemplate.bind(n),n.handleInputChange=n.handleInputChange.bind(n),n.handleChangeContent=n.handleChangeContent.bind(n),n.handleChangeFeaturedImg=n.handleChangeFeaturedImg.bind(n),n.handleChangeTags=n.handleChangeTags.bind(n),n.handleChangeConfig=n.handleChangeConfig.bind(n),n.handlePreview=n.handlePreview.bind(n),n.handlePublish=n.handlePublish.bind(n),n.handleUnpublish=n.handleUnpublish.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n.handleSubmitSuccess=n.handleSubmitSuccess.bind(n),n.handleSubmitError=n.handleSubmitError.bind(n),n.handleSave=n.handleSave.bind(n),n.refresh=n.refresh.bind(n),n}return a(t,e),y(t,[{key:"componentDidMount",value:function(){this.dom=f()(u.a.findDOMNode(this));var e=this.handleSubmit,t={onSuccess:e,inline:!0,fields:{title:{identifier:"title",rules:[{type:"empty",prompt:"Please enter a title"}]},content:{identifier:"content",rules:[{type:"empty",prompt:"Please enter a post"},{type:"minLength[140]",prompt:"Your post must be at least {ruleValue} characters"}]},tags:{identifier:"tags",rules:[{type:"empty",prompt:"Please enter some tags"},{type:"minLength[10]",prompt:"The tags field must be at least {ruleValue} characters"}]},adult_content:{identifier:"adult_content"},mention_notifications_status:{identifier:"mention_notifications_status"},comments_status:{identifier:"comments_status"},in_reply_to:{identifier:"in_reply_to",optional:!0,rules:[{type:"url",prompt:"Please enter a correct url"}]}}};this.dom.find(".ui.twitter-posts-editor.form").form(t)}},{key:"render",value:function(){var e={};return e.title=b.t("editor.new_post"),e.activePublish="disabled",e.postLink="",this.state.id&&(e.title=b.t("editor.edit_post"),e.activePublish="",e.postLink=l.a.createElement("a",{className:"ui button right",href:"/posts/view/"+this.state.slug+"/"+this.state.id},b.t("app.view"))),e.publishButton=l.a.createElement("div",{className:"small ui primary button right floated "+e.activePublish,onClick:this.handlePublish,ref:"pub"},b.t("app.publish")),"published"===this.props.post.status_str&&(e.publishButton=l.a.createElement("div",{className:"small ui red button right floated ",onClick:this.handleUnpublish,ref:"unpub"},b.t("app.unpublish"))),this.props.withColumns?this.getColumnTemplate(e):this.getTemplate(e)}},{key:"getTemplate",value:function(e){return l.a.createElement("div",null,l.a.createElement("div",{className:"ui grid twitter-posts-editor form"},l.a.createElement("div",{className:"sixteen wide column"},l.a.createElement("div",{className:"ui message-container"}),l.a.createElement("h2",{className:"ui top attached header"},e.title,e.postLink),l.a.createElement("div",{className:"ui bottom attached segment"},l.a.createElement("div",{className:"small ui button",onClick:this.handleSave,ref:"save"},b.t("app.save")),l.a.createElement("div",{className:"small ui default button",onClick:this.handlePreview,ref:"preview"},b.t("app.preview")),e.publishButton)),l.a.createElement("div",{className:"sixteen wide column"},l.a.createElement("div",{className:"ui large form"},l.a.createElement("input",{type:"hidden",name:"slug",value:this.state.slug}),l.a.createElement("input",{type:"hidden",name:"_id",value:this.state.id}),l.a.createElement("div",{className:"field"},l.a.createElement("label",null,b.t("app.title")),l.a.createElement("input",{type:"text",name:"title",placeholder:b.t("editor.post_title"),value:this.state.title,onChange:this.handleInputChange})),l.a.createElement("div",{className:"field"},l.a.createElement("label",null,b.t("app.content")),l.a.createElement(p.a,{content:this.state.content,onChangeContent:this.handleChangeContent})),l.a.createElement("div",{className:"ui error message"}))),l.a.createElement("div",{className:"sixteen wide column"},l.a.createElement("h4",{className:"ui top attached header"},b.t("app.setup")),l.a.createElement("div",{className:"ui bottom attached segment"},l.a.createElement(v.a,{adult_content:this.state.adult_content,comments_status:this.state.comments_status,mention_notifications_status:this.state.mention_notifications_status,in_reply_to:this.state.in_reply_to,onChangeConfig:this.handleChangeConfig}))),l.a.createElement("div",{className:"sixteen wide column"},l.a.createElement("h4",{className:"ui top attached header"},"Featured Image"),l.a.createElement("div",{className:"ui bottom attached segment"},l.a.createElement(g.a,{img:this.state.featured_img,onChange:this.handleChangeFeaturedImg}))),l.a.createElement("div",{className:"sixteen wide column"},l.a.createElement("h4",{className:"ui top attached header"},"Tags"),l.a.createElement("div",{className:"ui bottom attached segment"},l.a.createElement(h.a,{tags:this.state.tags,onChangeTags:this.handleChangeTags})))))}},{key:"getColumnTemplate",value:function(e){return l.a.createElement("div",null,l.a.createElement("div",{className:"ui grid twitter-posts-editor form"},l.a.createElement("div",{className:"eleven wide column"},l.a.createElement("div",{className:"ui message-container"}),e.postLink,l.a.createElement("h2",null,e.title),l.a.createElement("div",{className:"ui large form"},l.a.createElement("input",{type:"hidden",name:"slug",value:this.state.slug}),l.a.createElement("input",{type:"hidden",name:"_id",value:this.state.id}),l.a.createElement("div",{className:"field"},l.a.createElement("input",{type:"text",name:"title",placeholder:b.t("editor.post_title"),value:this.state.title,onChange:this.handleInputChange})),l.a.createElement("div",{className:"field"},l.a.createElement("label",null,b.t("app.content")),l.a.createElement(p.a,{content:this.state.content,onChangeContent:this.handleChangeContent})),l.a.createElement("div",{className:"ui error message"}))),l.a.createElement("div",{className:"five wide column"},l.a.createElement("h4",{className:"ui top attached header"},b.t("app.actions")),l.a.createElement("div",{className:"ui bottom attached segment"},l.a.createElement("div",{className:"small ui button",onClick:this.handleSave,ref:"save"},b.t("app.save")),l.a.createElement("div",{className:"small ui default button",onClick:this.handlePreview,ref:"preview"},b.t("app.preview")),e.publishButton),l.a.createElement("h4",{className:"ui top attached header"},b.t("app.setup")),l.a.createElement("div",{className:"ui bottom attached segment"},l.a.createElement(v.a,{adult_content:this.state.adult_content,comments_status:this.state.comments_status,mention_notifications_status:this.state.mention_notifications_status,in_reply_to:this.state.in_reply_to,onChangeConfig:this.handleChangeConfig})),l.a.createElement("h4",{className:"ui top attached header"},b.t("editor.featured_img")),l.a.createElement("div",{className:"ui bottom attached segment"},l.a.createElement(g.a,{img:this.state.featured_img,onChange:this.handleChangeFeaturedImg})),l.a.createElement("h4",{className:"ui top attached header"},b.t("app.tags")),l.a.createElement("div",{className:"ui bottom attached segment"},l.a.createElement(h.a,{tags:this.state.tags,onChangeTags:this.handleChangeTags})))))}},{key:"handleInputChange",value:function(e){var t=e.target,n="checkbox"===t.type?t.checked:t.value,r=t.name;this.setState(i({},r,n))}},{key:"handleChangeConfig",value:function(e){this.setState({adult_content:e.adult_content,in_reply_to:e.in_reply_to,comments_status:e.comments_status})}},{key:"handleChangeContent",value:function(e){this.setState({content:e})}},{key:"handleChangeTags",value:function(e){this.setState({tags:e})}},{key:"handleChangeFeaturedImg",value:function(e){this.setState({featured_img:e})}},{key:"handleSave",value:function(e){var t=document.createElement("div");f()(t).html(this.state.content),f()(t).trigger("create");var n=f()(t).html();this.setState({content:n}),this.dom.find("#post-content").val(n),this.dom.find(".ui.twitter-posts-editor.form").form("validate form")}},{key:"handleSubmit",value:function(){var e=this;this.dom.find(".ui.twitter-posts.form").addClass("loading"),this.dom.find(".ui.submit.button").addClass("loading");var t={data:{id:this.state.id,title:this.state.title,tags:this.state.tags,content:this.state.content,in_reply_to:this.state.in_reply_to,comments_status:this.state.comments_status,adult_content:this.state.adult_content,featured_img:this.state.featured_img,_token:this.state._token},done:function(t){e.dom.find(".ui.large.form").removeClass("loading"),e.dom.find(".ui.submit.button").removeClass("loading"),200==t.status?e.handleSubmitSuccess(t):e.handleSubmitError(),e.dom.find(".message .close").on("click",function(){e.dom.find(this).closest(".message").transition("fade")})}};m.a.get("postManager").save(t)}},{key:"handleSubmitSuccess",value:function(e){e.id&&(this.setState({id:e.id}),this.setState({slug:e.data.slug}),history.replaceState({},"Editing post `"+this.props.title+"´","/posts/edit/"+e.id));this.dom.find(".message-container").html("<div class='ui success message'><i class='close icon'></i><div class='header'>Post Saved</div><p>The post was successufully saved.</p></div>"),this.dom.find(".ui.large.form").addClass("success")}},{key:"handleSubmitError",value:function(){this.dom.find(".message-container").html("<div class='ui error message'><i class='close icon'></i><div class='header'>Form Error</div><p>There was a problem during the send. Sorry for the inconvenience. Please, try again later.</p></div>"),this.dom.find(".ui.large.form").addClass("error")}},{key:"handlePreview",value:function(e){window.__editing=!1,m.a.get("modalManager").create("ModalPreview",{title:this.state.title,tags:this.state.tags,content:this.state.content}),twttr.widgets.load()}},{key:"handlePublish",value:function(e){m.a.get("modalManager").create("ModalPublish",{user_screen_name:this.props.post.user_screen_name,id:this.state.id,title:this.state.title,tags:this.state.tags,slug:this.state.slug,content:this.state.content,onSuccess:this.refresh})}},{key:"handleUnpublish",value:function(e){m.a.get("modalManager").create("ModalUnpublish",{post:this.props.post,onSuccess:this.refresh})}},{key:"refresh",value:function(){window.location.reload()}}]),t}(l.a.Component);C.defaultProps={},t.a=C},442:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1),s=n.n(a),l=n(5),c=(n.n(l),n(2)),u=n.n(c),d=n(7),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),m=n(10).I18n;u.a.fn.modal=n(14),u.a.fn.dimmer=n(13),u.a.fn.transition=n(9),u.a.fn.transition.settings.silent=!0;var p=function(e){function t(e){i(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={currentImg:e.img},n.sessionManager=d.a.get("sessionManager"),n.modalManager=d.a.get("modalManager"),n.handleLogin=n.handleLogin.bind(n),n.handleClick=n.handleClick.bind(n),n.setImage=n.setImage.bind(n),n}return o(t,e),f(t,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e="";return void 0!==this.state.currentImg&&""!==this.state.currentImg&&(e=s.a.createElement("img",{src:this.state.currentImg,width:"150"})),s.a.createElement("div",{className:"featured-image-comp"},s.a.createElement("button",{className:"ui button",onClick:this.handleClick,ref:"pick"},m.t("app.pick")),s.a.createElement("div",{className:"featured-image-container"},e))}},{key:"handleClick",value:function(){var e=this;if(this.sessionManager.isGuest())return this.showLogin();var e=this;d.a.get("modalManager").create("ModalLibrary",{callback:function(t){e.setImage(t)}},this.dom)}},{key:"setImage",value:function(e){this.setState({currentImg:e.src}),this.props.onChange(e.src)}},{key:"showLogin",value:function(e){this.modalManager.create("ModalLogin",{callback:this.handleLogin})}},{key:"handleLogin",value:function(e){this.handleClick()}}]),t}(s.a.Component);p.defaultProps={},t.a=p},455:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1),s=n.n(a),l=n(2),c=(n.n(l),function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()),u=n(10).I18n,d=(n(11),function(e){function t(e){i(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={tags:e.tags},n.handleChangeTags=n.handleChangeTags.bind(n),n}return o(t,e),c(t,[{key:"shouldComponentUpdate",value:function(e,t){return!0}},{key:"componentDidMount",value:function(){}},{key:"handleChangeTags",value:function(e){var t="",n=e.target.value,i=n[n.length-1];" "!==i&&(i=""),n=n.replace(/\s\s/i," ");for(var r=n.split(" "),o=0;o<r.length;o++){var a=r[o];"#"!==a[0]&&a.trim().length>0&&(a="#"+a),o<r.length-1?a.length>2&&(t+=" "+a):t+=" "+a}t=t.trim()+i,t=t.substring(0,120),this.setState({tags:t}),this.props.onChangeTags(t)}},{key:"render",value:function(){return s.a.createElement("div",{id:"tags-editor"},s.a.createElement("div",{className:"field"},s.a.createElement("textarea",{name:"tags",ref:"tags",id:"tags",className:"tags-editor",placeholder:u.t("app.tag_editor.placeholder"),value:this.state.tags,onChange:this.handleChangeTags})))}}]),t}(s.a.PureComponent));d.defaultProps={},t.a=d},456:function(e,t,n){"use strict";(function(e){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1),s=n.n(a),l=n(5),c=n.n(l),u=n(885),d=n.n(u),f=n(884),m=(n.n(f),n(868)),p=(n.n(m),n(870)),h=(n.n(p),n(876)),g=(n.n(h),n(877)),v=(n.n(g),n(875)),y=(n.n(v),n(871)),b=(n.n(y),n(879)),C=(n.n(b),n(878)),T=(n.n(C),n(869)),S=(n.n(T),n(880)),x=(n.n(S),n(883)),w=(n.n(x),n(873)),E=(n.n(w),n(874)),A=(n.n(E),n(882)),N=(n.n(A),n(881)),P=(n.n(N),n(872)),k=(n.n(P),n(7)),M=n(11),_=(n.n(M),n(469)),B=(n.n(_),n(468)),R=(n.n(B),function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()),D=n(10).I18n,I=function(t){function n(e){i(this,n);var t=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.state={content:e.content,editorInstance:null,editorDom:null},t.dom=void 0,t.handleInputChange=t.handleInputChange.bind(t),t.init=t.init.bind(t),t}return o(n,t),R(n,[{key:"componentDidMount",value:function(){this.dom=e(c.a.findDOMNode(this)),this.dom.find("#post-content").val(this.state.content),this.init()}},{key:"handleInputChange",value:function(e){var t=this.state.editorInstance.getContent({format:"raw"});this.props.onChangeContent(t),this.state.editorInstance.save()}},{key:"render",value:function(){return s.a.createElement("div",{className:"tinymce-component"},s.a.createElement("textarea",{name:"content",id:"post-content",placeholder:"Write anything!"}))}},{key:"init",value:function(){var e=this,t=(this.dom.find("#post-content").get(0),"@[class,data-caption|data-padding-top|data-padding-bottom|data-padding-right|data-padding-left]");t+=",@[data-margin-top|data-margin-bottom|data-margin-left|data-margin-right]",t+=",@[data-border-width|data-border-color|data-type]",t+=",twp-post-img[src|alt|width|height|align|id|name]",t+=",twp-gallery[src|alt|width|height|align|id|name]",t+=",twp-post-link[href|title|id|name|data-text|data-color]",t+=",twp-post-mention[id|name|data-text|data-color|data-screen-name]",t+=",twp-data[*]",t+=",twp-tweet[id|data-screen-name,data-url]",t+=",twp-tweet-thread[id]",t+=",iframe[class|src|frameborder=0|alt|title|width|height|align|name]",d.a.init({language:k.a.getCurrentLanguage(),entity_encoding:"raw",selector:"#post-content",content_css:"/css/app.css",body_class:"single-post loading",extended_valid_elements:t,custom_elements:"twp-post-img,twp-post-link,twp-post-mention,twp-gallery,twp-data,twp-tweet,twp-tweet-thread",valid_children:"+p[twp-post-link|twp-post-mention|strong|a|#text],twp-gallery[twp-data],twp-tweet-thread[twp-tweet],twp-data[*]",autoresize_min_height:550,max_width:700,menubar:!1,object_resizing:!1,paste_data_images:!0,remove_script_host:!1,convert_urls:!1,element_format:"xhtml",schema:"html5",skin_url:"/css/tinymce/skins/custom",plugins:["advlist autolink lists charmap print preview anchor textcolor","searchreplace visualblocks freedistraction autoresize","table paste"],toolbar1:"insertButton | styleselect | bullist numlist outdent indent | image | forecolor backcolor | undo redo | removeformat | freedistraction showCodeButton",setup:function(t){e.setState({editorInstance:t}),t.addButton("showCodeButton",{type:"button",text:"",icon:" code icon",onclick:function(){e.showCode()}}),t.addButton("insertButton",{type:"splitbutton",text:"Insert",icon:!1,onclick:function(){},menu:[{text:D.t("app.mention"),icon:" at icon",onclick:function(){e.showInsertMention()}},{text:"Link",icon:" linkify icon",onclick:function(){e.showInsertLink()}},{text:"Image",icon:"image",onclick:function(){k.a.get("sessionManager").isLogged()?e.showImgLibrary():e.showLogin()}},{text:D.t("app.gallery"),icon:" icomoon icon-images",onclick:function(){k.a.get("sessionManager").isLogged()?e.showInsertGallery():e.showLogin()}},{text:"Tweet",icon:" twitter icon",onclick:function(){e.showInsertTweet()}},{text:D.t("app.media_code"),icon:" youtube play icon",onclick:function(){e.showInsertMedia()}}]}),t.on("init",function(t){var n=e.dom.find("#"+t.target.id+"_ifr"),i=n[0].contentWindow,r=i.document;e.setState({editorDom:r});var o=r.getElementsByTagName("head")[0],a=r.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src","/bower_components/webcomponentsjs/custom-elements-es5-adapter.js");var s=r.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src","/bower_components/webcomponentsjs/webcomponents-hi-sd-ce.js");var l=r.createElement("script");l.setAttribute("type","text/javascript"),l.setAttribute("src","/js/manifest.js");var c=r.createElement("script");c.setAttribute("type","text/javascript"),c.setAttribute("src","/js/vendor.js");var u=r.createElement("script");u.setAttribute("type","text/javascript"),u.setAttribute("src","/js/tinymce.js"),a.addEventListener("load",function(e){o.appendChild(s)}),s.addEventListener("load",function(e){o.appendChild(l)}),l.addEventListener("load",function(e){o.appendChild(c)}),c.addEventListener("load",function(e){o.appendChild(u),i.modalManager=k.a.get("modalManager")}),o.appendChild(a)})}}),this.dom.find("#tinymce-upload-button").click(function(){e.clickFileUploader()}),window.setInterval(function(){e.handleInputChange()},1e3)}},{key:"showLogin",value:function(){k.a.get("modalManager").create("ModalLogin",{showModal:this.state.showLogin,callback:this.handleLogin})}},{key:"showInsertLink",value:function(){k.a.get("modalManager").create("ModalLink",{editor:this.state.editorInstance})}},{key:"showInsertMention",value:function(){k.a.get("modalManager").create("ModalMention",{editor:this.state.editorInstance})}},{key:"showCode",value:function(){k.a.get("modalManager").create("ModalEditorCode",{editor:this.state.editorInstance,editorDom:this.state.editorDom})}},{key:"showImgLibrary",value:function(){k.a.get("modalManager").create("ModalImage",{editor:this.state.editorInstance})}},{key:"showInsertTweet",value:function(e){k.a.get("modalManager").create("ModalTweet",{editor:this.state.editorInstance})}},{key:"showInsertTweetThread",value:function(e){k.a.get("modalManager").create("ModalThread",{editor:this.state.editorInstance})}},{key:"showInsertMedia",value:function(e){k.a.get("modalManager").create("ModalMedia",{editor:this.state.editorInstance})}},{key:"showInsertGallery",value:function(e){k.a.get("modalManager").create("ModalImageGallery",{editor:this.state.editorInstance})}}]),n}(s.a.Component);I.defaultProps={},t.a=I}).call(t,n(2))},468:function(e,t){tinymce.PluginManager.add("autoresize",function(e){function t(){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}function n(){return e.plugins.freedistraction&&e.plugins.freedistraction.isFreeDistraction()}function i(r){var s,l,c,u,d,f,m,p,h,g,v,y,b=tinymce.DOM;if(l=e.getDoc()){if(c=l.body,u=l.documentElement,d=o.autoresize_min_height,!c||r&&"setcontent"===r.type&&r.initial||t()||n())return void(c&&u&&(c.style.overflowY="auto",u.style.overflowY="auto"));m=e.dom.getStyle(c,"margin-top",!0),p=e.dom.getStyle(c,"margin-bottom",!0),h=e.dom.getStyle(c,"padding-top",!0),g=e.dom.getStyle(c,"padding-bottom",!0),v=e.dom.getStyle(c,"border-top-width",!0),y=e.dom.getStyle(c,"border-bottom-width",!0),f=c.offsetHeight+parseInt(m,10)+parseInt(p,10)+parseInt(h,10)+parseInt(g,10)+parseInt(v,10)+parseInt(y,10),(isNaN(f)||f<=0)&&(f=tinymce.Env.ie?c.scrollHeight:tinymce.Env.webkit&&0===c.clientHeight?0:c.offsetHeight),f>o.autoresize_min_height&&(d=f),o.autoresize_max_height&&f>o.autoresize_max_height?(d=o.autoresize_max_height,c.style.overflowY="auto",u.style.overflowY="auto"):(c.style.overflowY="hidden",u.style.overflowY="hidden",c.scrollTop=0),d!==a&&(s=d-a,b.setStyle(e.iframeElement,"height",d+"px"),a=d,tinymce.isWebKit&&s<0&&i(r))}}function r(t,n,o){tinymce.util.Delay.setEditorTimeout(e,function(){i({}),t--?r(t,n,o):o&&o()},n)}var o=e.settings,a=0;e.settings.inline||(o.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),o.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){var t,n;t=e.getParam("autoresize_overflow_padding",1),n=e.getParam("autoresize_bottom_margin",50),!1!==t&&e.dom.setStyles(e.getBody(),{paddingLeft:t,paddingRight:t}),!1!==n&&e.dom.setStyles(e.getBody(),{paddingBottom:n})}),e.on("nodechange setcontent keyup FullscreenStateChanged FreeDistractionStateChanged",i),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){r(20,100,function(){r(5,1e3)})}),e.addCommand("mceAutoResize",i))})},469:function(e,t){tinymce.PluginManager.add("freedistraction",function(e){function t(){var e,t,n=window,i=document,r=i.body;return r.offsetWidth&&(e=r.offsetWidth,t=r.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){var e=tinymce.DOM.getViewPort();return{x:e.x,y:e.y}}function i(e){scrollTo(e.x,e.y)}function r(){function r(){f.setStyle(h,"height",t().h-(p.clientHeight-h.clientHeight))}var m,p,h,g,v=document.body,y=document.documentElement;d=!d,p=e.getContainer(),m=p.style,h=e.getContentAreaContainer().firstChild,g=h.style;var b=h.contentWindow.document,C=b.getElementsByTagName("body")[0],T=b.getElementsByTagName("html")[0];d?(u=n(),o=g.width,a=g.height,g.width=g.height="100%",l=m.width,c=m.height,m.width=m.height="",f.addClass(v,"mce-freedistraction"),f.addClass(y,"mce-freedistraction"),f.addClass(p,"mce-freedistraction"),f.bind(window,"resize",r),r(),s=r,C.style.width="850px",C.style.margin="0 auto",C.style.padding="20px",C.style.border="1px solid #DDD",T.style.backgroundColor="#F5F8FA"):(g.width=o,g.height=a,l&&(m.width=l),c&&(m.height=c),f.removeClass(v,"mce-freedistraction"),f.removeClass(y,"mce-freedistraction"),f.removeClass(p,"mce-freedistraction"),f.unbind(window,"resize",s),C.style.width="auto",C.style.margin="8px",C.style.padding="1px",C.style.paddingBottom="50px",T.style.backgroundColor="#fff",C.style.border="0px",i(u)),e.fire("FreeDistractionStateChanged",{state:d})}var o,a,s,l,c,u,d=!1,f=tinymce.DOM;if(!e.settings.inline)return e.on("init",function(){e.addShortcut("Ctrl+Shift+F","",r)}),e.on("remove",function(){s&&f.unbind(window,"resize",s)}),e.addCommand("mceFreeDistraction",r),e.addMenuItem("freedistraction",{text:"Free Distraction",shortcut:"Ctrl+Shift+F",selectable:!0,onClick:function(){r(),e.focus()},onPostRender:function(){var t=this;e.on("FreeDistractionStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("freedistraction",{tooltip:"Free Distraction",icon:" move icon",shortcut:"Ctrl+Shift+F",onClick:r,onPostRender:function(){var t=this;e.on("FreeDistractionStateChanged",function(e){t.active(e.state)})}}),{isFreeDistraction:function(){return d}}})},699:function(e,t,n){/*!mobile-detect v1.3.6 2017-04-05*/
  /*!@license Copyright 2013, Heinrich Goebl, License: MIT, see https://github.com/hgoebl/mobile-detect.js*/
  !function(e,t){e(function(){"use strict";function e(e,t){return null!=e&&null!=t&&e.toLowerCase()===t.toLowerCase()}function t(e,t){var n,i,r=e.length;if(!r||!t)return!1;for(n=t.toLowerCase(),i=0;i<r;++i)if(n===e[i].toLowerCase())return!0;return!1}function n(e){for(var t in e)a.call(e,t)&&(e[t]=new RegExp(e[t],"i"))}function i(e,t){this.ua=e||"",this._cache={},this.maxPhoneWidth=t||600}var r={};r.mobileDetectRules={phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6",Dell:"Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b",Samsung:"\\bSamsung\\b|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",NokiaLumia:"Lumia [0-9]{3,4}",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo 3DS",Amoi:"Amoi",INQ:"INQ",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk/[0-9.]+ like Chrome/[0-9.]+ (?!Mobile)",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20\\b|\\bA3-A30",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",NokiaLumiaTablet:"Lumia 2520",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris [E|M]10)|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android.*\\bG1\\b",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9",JXDTablet:"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712",MpmanTablet:"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",KocasoTablet:"\\b(TB-1207)\\b",HisenseTablet:"\\b(F5281|E2371)\\b",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+",Skyfire:"Skyfire",Edge:"Mobile Safari/[.0-9]* Edge",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Puffin:"Puffin",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger",PaleMoon:"Android.*PaleMoon|Mobile.*PaleMoon"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:["Firefox/[VER]","FxiOS/[VER]"],Fennec:"Fennec/[VER]",Edge:"Edge/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]","UC Browser":"UC Browser[VER]",MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",SamsungBrowser:"SamsungBrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",PaleMoon:"PaleMoon/[VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",Goanna:"Goanna/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b",Watch:"SM-V700"}},r.detectMobileBrowsers={fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,tabletPattern:/android|ipad|playbook|silk/i};var o,a=Object.prototype.hasOwnProperty;return r.FALLBACK_PHONE="UnknownPhone",r.FALLBACK_TABLET="UnknownTablet",r.FALLBACK_MOBILE="UnknownMobile",o="isArray"in Array?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},function(){var e,t,i,s,l,c,u=r.mobileDetectRules;for(e in u.props)if(a.call(u.props,e)){for(t=u.props[e],o(t)||(t=[t]),l=t.length,s=0;s<l;++s)i=t[s],c=i.indexOf("[VER]"),c>=0&&(i=i.substring(0,c)+"([\\w._\\+]+)"+i.substring(c+5)),t[s]=new RegExp(i,"i");u.props[e]=t}n(u.oss),n(u.phones),n(u.tablets),n(u.uas),n(u.utils),u.oss0={WindowsPhoneOS:u.oss.WindowsPhoneOS,WindowsMobileOS:u.oss.WindowsMobileOS}}(),r.findMatch=function(e,t){for(var n in e)if(a.call(e,n)&&e[n].test(t))return n;return null},r.findMatches=function(e,t){var n=[];for(var i in e)a.call(e,i)&&e[i].test(t)&&n.push(i);return n},r.getVersionStr=function(e,t){var n,i,o,s,l=r.mobileDetectRules.props;if(a.call(l,e))for(n=l[e],o=n.length,i=0;i<o;++i)if(null!==(s=n[i].exec(t)))return s[1];return null},r.getVersion=function(e,t){var n=r.getVersionStr(e,t);return n?r.prepareVersionNo(n):NaN},r.prepareVersionNo=function(e){var t;return t=e.split(/[a-z._ \/\-]/i),1===t.length&&(e=t[0]),t.length>1&&(e=t[0]+".",t.shift(),e+=t.join("")),Number(e)},r.isMobileFallback=function(e){return r.detectMobileBrowsers.fullPattern.test(e)||r.detectMobileBrowsers.shortPattern.test(e.substr(0,4))},r.isTabletFallback=function(e){return r.detectMobileBrowsers.tabletPattern.test(e)},r.prepareDetectionCache=function(e,t,n){if(void 0===e.mobile){var o,a,s;if(a=r.findMatch(r.mobileDetectRules.tablets,t))return e.mobile=e.tablet=a,void(e.phone=null);if(o=r.findMatch(r.mobileDetectRules.phones,t))return e.mobile=e.phone=o,void(e.tablet=null);r.isMobileFallback(t)?(s=i.isPhoneSized(n),void 0===s?(e.mobile=r.FALLBACK_MOBILE,e.tablet=e.phone=null):s?(e.mobile=e.phone=r.FALLBACK_PHONE,e.tablet=null):(e.mobile=e.tablet=r.FALLBACK_TABLET,e.phone=null)):r.isTabletFallback(t)?(e.mobile=e.tablet=r.FALLBACK_TABLET,e.phone=null):e.mobile=e.tablet=e.phone=null}},r.mobileGrade=function(e){var t=null!==e.mobile();return e.os("iOS")&&e.version("iPad")>=4.3||e.os("iOS")&&e.version("iPhone")>=3.1||e.os("iOS")&&e.version("iPod")>=3.1||e.version("Android")>2.1&&e.is("Webkit")||e.version("Windows Phone OS")>=7||e.is("BlackBerry")&&e.version("BlackBerry")>=6||e.match("Playbook.*Tablet")||e.version("webOS")>=1.4&&e.match("Palm|Pre|Pixi")||e.match("hp.*TouchPad")||e.is("Firefox")&&e.version("Firefox")>=12||e.is("Chrome")&&e.is("AndroidOS")&&e.version("Android")>=4||e.is("Skyfire")&&e.version("Skyfire")>=4.1&&e.is("AndroidOS")&&e.version("Android")>=2.3||e.is("Opera")&&e.version("Opera Mobi")>11&&e.is("AndroidOS")||e.is("MeeGoOS")||e.is("Tizen")||e.is("Dolfin")&&e.version("Bada")>=2||(e.is("UC Browser")||e.is("Dolfin"))&&e.version("Android")>=2.3||e.match("Kindle Fire")||e.is("Kindle")&&e.version("Kindle")>=3||e.is("AndroidOS")&&e.is("NookTablet")||e.version("Chrome")>=11&&!t||e.version("Safari")>=5&&!t||e.version("Firefox")>=4&&!t||e.version("MSIE")>=7&&!t||e.version("Opera")>=10&&!t?"A":e.os("iOS")&&e.version("iPad")<4.3||e.os("iOS")&&e.version("iPhone")<3.1||e.os("iOS")&&e.version("iPod")<3.1||e.is("Blackberry")&&e.version("BlackBerry")>=5&&e.version("BlackBerry")<6||e.version("Opera Mini")>=5&&e.version("Opera Mini")<=6.5&&(e.version("Android")>=2.3||e.is("iOS"))||e.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||e.version("Opera Mobi")>=11&&e.is("SymbianOS")?"B":(e.version("BlackBerry")<5||e.match("MSIEMobile|Windows CE.*Mobile")||e.version("Windows Mobile"),"C")},r.detectOS=function(e){return r.findMatch(r.mobileDetectRules.oss0,e)||r.findMatch(r.mobileDetectRules.oss,e)},r.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},i.prototype={constructor:i,mobile:function(){return r.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return r.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return r.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){/*!mobile-detect v1.3.6 2017-04-05*/
  /*!@license Copyright 2013, Heinrich Goebl, License: MIT, see https://github.com/hgoebl/mobile-detect.js*/
  return void 0===this._cache.userAgent&&(this._cache.userAgent=r.findMatch(r.mobileDetectRules.uas,this.ua)),this._cache.userAgent},userAgents:function(){return void 0===this._cache.userAgents&&(this._cache.userAgents=r.findMatches(r.mobileDetectRules.uas,this.ua)),this._cache.userAgents},os:function(){return void 0===this._cache.os&&(this._cache.os=r.detectOS(this.ua)),this._cache.os},version:function(e){return r.getVersion(e,this.ua)},versionStr:function(e){return r.getVersionStr(e,this.ua)},is:function(n){return t(this.userAgents(),n)||e(n,this.os())||e(n,this.phone())||e(n,this.tablet())||t(r.findMatches(r.mobileDetectRules.utils,this.ua),n)},match:function(e){return e instanceof RegExp||(e=new RegExp(e,"i")),e.test(this.ua)},isPhoneSized:function(e){return i.isPhoneSized(e||this.maxPhoneWidth)},mobileGrade:function(){return void 0===this._cache.grade&&(this._cache.grade=r.mobileGrade(this)),this._cache.grade}},"undefined"!=typeof window&&window.screen?i.isPhoneSized=function(e){return e<0?void 0:r.getDeviceSmallerSide()<=e}:i.isPhoneSized=function(){},i._impl=r,i.version="1.3.6 2017-04-05",i})}(function(t){return void 0!==e&&e.exports?function(t){e.exports=t()}:n(890)}())},868:function(e,t){tinymce.PluginManager.add("advlist",function(e){function t(t){return e.$.contains(e.getBody(),t)}function n(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)&&t(e)}function i(e,t){var n=[];return t&&tinymce.each(t.split(/[ ,]/),function(e){n.push({text:e.replace(/\-/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),data:"default"==e?"":e})}),n}function r(t,n){e.undoManager.transact(function(){var i,r=e.dom,o=e.selection;if(!(i=r.getParent(o.getNode(),"ol,ul"))||i.nodeName!=t||!1===n){var a={"list-style-type":n||""};e.execCommand("UL"==t?"InsertUnorderedList":"InsertOrderedList",!1,a)}i=r.getParent(o.getNode(),"ol,ul"),i&&tinymce.util.Tools.each(r.select("ol,ul",i).concat([i]),function(e){e.nodeName!==t&&!1!==n&&(e=r.rename(e,t)),r.setStyle(e,"listStyleType",n||null),e.removeAttribute("data-mce-style")}),e.focus()})}function o(t){var n=e.dom.getStyle(e.dom.getParent(e.selection.getNode(),"ol,ul"),"listStyleType")||"";t.control.items().each(function(e){e.active(e.settings.data===n)})}var a,s;a=i("OL",e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),s=i("UL",e.getParam("advlist_bullet_styles","default,circle,disc,square"));var l=function(t){return function(){var i=this;e.on("NodeChange",function(e){var r=tinymce.util.Tools.grep(e.parents,n);i.active(r.length>0&&r[0].nodeName===t)})}};(function(e,t){var n=e.settings.plugins?e.settings.plugins:"";return-1!==tinymce.util.Tools.inArray(n.split(/[ ,]/),t)})(e,"lists")&&(e.addCommand("ApplyUnorderedListStyle",function(e,t){r("UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(e,t){r("OL",t["list-style-type"])}),e.addButton("numlist",{type:a.length>0?"splitbutton":"button",tooltip:"Numbered list",menu:a,onPostRender:l("OL"),onshow:o,onselect:function(e){r("OL",e.control.settings.data)},onclick:function(){r("OL",!1)}}),e.addButton("bullist",{type:s.length>0?"splitbutton":"button",tooltip:"Bullet list",onPostRender:l("UL"),menu:s,onshow:o,onselect:function(e){r("UL",e.control.settings.data)},onclick:function(){r("UL",!1)}}))})},869:function(e,t){tinymce.PluginManager.add("anchor",function(e){var t=function(e){return!e.attr("href")&&(e.attr("id")||e.attr("name"))&&!e.firstChild},n=function(e){return function(n){for(var i=0;i<n.length;i++)t(n[i])&&n[i].attr("contenteditable",e)}},i=function(e){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(e)},r=function(){var t=e.selection.getNode(),n="A"==t.tagName&&""===e.dom.getAttrib(t,"href"),r="";n&&(r=t.id||t.name||""),e.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:r},onsubmit:function(r){var o=r.data.id;if(!i(o))return r.preventDefault(),void e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.");n?(t.removeAttribute("name"),t.id=o):(e.selection.collapse(!0),e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:o})))}})};tinymce.Env.ceFalse&&e.on("PreInit",function(){e.parser.addNodeFilter("a",n("false")),e.serializer.addNodeFilter("a",n(null))}),e.addCommand("mceAnchor",r),e.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:r,stateSelector:"a:not([href])"}),e.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:r})})},870:function(e,t){tinymce.PluginManager.add("autolink",function(e){function t(e){r(e,-1,"(")}function n(e){r(e,0,"")}function i(e){r(e,-1,"")}function r(e,t,n){function i(e,t){if(t<0&&(t=0),3==e.nodeType){var n=e.data.length;t>n&&(t=n)}return t}function r(e,t){1!=e.nodeType||e.hasChildNodes()?s.setStart(e,i(e,t)):s.setStartBefore(e)}function o(e,t){1!=e.nodeType||e.hasChildNodes()?s.setEnd(e,i(e,t)):s.setEndAfter(e)}var s,l,c,u,d,f,m,p,h,g;if("A"!=e.selection.getNode().tagName){if(s=e.selection.getRng(!0).cloneRange(),s.startOffset<5){if(!(p=s.endContainer.previousSibling)){if(!s.endContainer.firstChild||!s.endContainer.firstChild.nextSibling)return;p=s.endContainer.firstChild.nextSibling}if(h=p.length,r(p,h),o(p,h),s.endOffset<5)return;l=s.endOffset,u=p}else{if(u=s.endContainer,3!=u.nodeType&&u.firstChild){for(;3!=u.nodeType&&u.firstChild;)u=u.firstChild;3==u.nodeType&&(r(u,0),o(u,u.nodeValue.length))}l=1==s.endOffset?2:s.endOffset-1-t}c=l;do{r(u,l>=2?l-2:0),o(u,l>=1?l-1:0),l-=1,g=s.toString()}while(" "!=g&&""!==g&&160!=g.charCodeAt(0)&&l-2>=0&&g!=n);s.toString()==n||160==s.toString().charCodeAt(0)?(r(u,l),o(u,c),l+=1):0===s.startOffset?(r(u,0),o(u,c)):(r(u,l),o(u,c)),f=s.toString(),"."==f.charAt(f.length-1)&&o(u,c-1),f=s.toString(),m=f.match(a),m&&("www."==m[1]?m[1]="http://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),d=e.selection.getBookmark(),e.selection.setRng(s),e.execCommand("createlink",!1,m[1]+m[2]),e.settings.default_link_target&&e.dom.setAttrib(e.selection.getNode(),"target",e.settings.default_link_target),e.selection.moveToBookmark(d),e.nodeChanged())}}var o,a=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;if(e.settings.autolink_pattern&&(a=e.settings.autolink_pattern),e.on("keydown",function(t){if(13==t.keyCode)return i(e)}),tinymce.Env.ie)return void e.on("focus",function(){if(!o){o=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}});e.on("keypress",function(n){if(41==n.keyCode)return t(e)}),e.on("keyup",function(t){if(32==t.keyCode)return n(e)})})},871:function(e,t){tinymce.PluginManager.add("charmap",function(e){function t(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]}function n(e){return tinymce.util.Tools.grep(e,function(e){return l(e)&&2==e.length})}function i(e){return l(e)?[].concat(n(e)):"function"==typeof e?e():[]}function r(t){var n=e.settings;return n.charmap&&(t=i(n.charmap)),n.charmap_append?[].concat(t).concat(i(n.charmap_append)):t}function o(){return r(t())}function a(t){e.fire("insertCustomChar",{chr:t}).chr,e.execCommand("mceInsertContent",!1,t)}function s(){function t(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var n,i,r,s;n='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var l=o(),c=Math.min(l.length,25),u=Math.ceil(l.length/c);for(r=0;r<u;r++){for(n+="<tr>",i=0;i<c;i++){var d=r*c+i;if(d<l.length){var f=l[d],m=f?String.fromCharCode(parseInt(f[0],10)):"&nbsp;";n+='<td title="'+f[1]+'"><div tabindex="-1" title="'+f[1]+'" role="button" data-chr="'+m+'">'+m+"</div></td>"}else n+="<td />"}n+="</tr>"}n+="</tbody></table>";var p={type:"container",html:n,onclick:function(e){var n=e.target;/^(TD|DIV)$/.test(n.nodeName)&&t(n).firstChild&&(a(n.getAttribute("data-chr")),e.ctrlKey||s.close())},onmouseover:function(e){var n=t(e.target);n&&n.firstChild?(s.find("#preview").text(n.firstChild.firstChild.data),s.find("#previewTitle").text(n.title)):(s.find("#preview").text(" "),s.find("#previewTitle").text(" "))}};s=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[p,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){s.close()}}]})}var l=tinymce.util.Tools.isArray;return e.addCommand("mceShowCharmap",s),e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"}),{getCharMap:o,insertChar:a}})},872:function(e,t){tinymce.PluginManager.add("contextmenu",function(e){var t,n,i=e.settings.contextmenu_never_use_native,r=function(e){return e.ctrlKey&&!i},o=function(){return tinymce.Env.mac&&tinymce.Env.webkit},a=function(){return!0===n};return e.on("mousedown",function(t){o()&&2===t.button&&!r(t)&&e.selection.isCollapsed()&&e.once("contextmenu",function(t){e.selection.placeCaretAt(t.clientX,t.clientY)})}),e.on("contextmenu",function(i){var o;if(!r(i)){if(i.preventDefault(),o=e.settings.contextmenu||"link openlink image inserttable | cell row column deletetable",t)t.show();else{var a=[];tinymce.each(o.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"==t&&(n={text:t}),n&&(n.shortcut="",a.push(n))});for(var s=0;s<a.length;s++)"|"==a[s].text&&(0!==s&&s!=a.length-1||a.splice(s,1));t=new tinymce.ui.Menu({items:a,context:"contextmenu",classes:"contextmenu"}).renderTo(),t.on("hide",function(e){e.control===this&&(n=!1)}),e.on("remove",function(){t.remove(),t=null})}var l={x:i.pageX,y:i.pageY};e.inline||(l=tinymce.DOM.getPos(e.getContentAreaContainer()),l.x+=i.clientX,l.y+=i.clientY),t.moveTo(l.x,l.y),n=!0}}),{isContextMenuVisible:a}})},873:function(e,t){tinymce.PluginManager.add("fullpage",function(e){function t(){var t=n();e.windowManager.open({title:"Document properties",data:t,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(e){i(tinymce.extend(t,e.data))}})}function n(){function t(e,t){return e.attr(t)||""}var n,i,o=r(),a={};return a.fontface=e.getParam("fullpage_default_fontface",""),a.fontsize=e.getParam("fullpage_default_fontsize",""),n=o.firstChild,7==n.type&&(a.xml_pi=!0,(i=/encoding="([^"]+)"/.exec(n.value))&&(a.docencoding=i[1])),n=o.getAll("#doctype")[0],n&&(a.doctype="<!DOCTYPE"+n.value+">"),n=o.getAll("title")[0],n&&n.firstChild&&(a.title=n.firstChild.value),u(o.getAll("meta"),function(e){var t,n=e.attr("name"),i=e.attr("http-equiv");n?a[n.toLowerCase()]=e.attr("content"):"Content-Type"==i&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(a.docencoding=t[1])}),n=o.getAll("html")[0],n&&(a.langcode=t(n,"lang")||t(n,"xml:lang")),a.stylesheets=[],tinymce.each(o.getAll("link"),function(e){"stylesheet"==e.attr("rel")&&a.stylesheets.push(e.attr("href"))}),n=o.getAll("body")[0],n&&(a.langdir=t(n,"dir"),a.style=t(n,"style"),a.visited_color=t(n,"vlink"),a.link_color=t(n,"link"),a.active_color=t(n,"alink")),a}function i(t){function n(e,t,n){e.attr(t,n||void 0)}function i(e){a.firstChild?a.insert(e,a.firstChild):a.append(e)}var o,a,s,c,f,m=e.dom;o=r(),a=o.getAll("head")[0],a||(c=o.getAll("html")[0],a=new d("head",1),c.firstChild?c.insert(a,c.firstChild,!0):c.append(a)),c=o.firstChild,t.xml_pi?(f='version="1.0"',t.docencoding&&(f+=' encoding="'+t.docencoding+'"'),7!=c.type&&(c=new d("xml",7),o.insert(c,o.firstChild,!0)),c.value=f):c&&7==c.type&&c.remove(),c=o.getAll("#doctype")[0],t.doctype?(c||(c=new d("#doctype",10),t.xml_pi?o.insert(c,o.firstChild):i(c)),c.value=t.doctype.substring(9,t.doctype.length-1)):c&&c.remove(),c=null,u(o.getAll("meta"),function(e){"Content-Type"==e.attr("http-equiv")&&(c=e)}),t.docencoding?(c||(c=new d("meta",1),c.attr("http-equiv","Content-Type"),c.shortEnded=!0,i(c)),c.attr("content","text/html; charset="+t.docencoding)):c&&c.remove(),c=o.getAll("title")[0],t.title?(c?c.empty():(c=new d("title",1),i(c)),c.append(new d("#text",3)).value=t.title):c&&c.remove(),u("keywords,description,author,copyright,robots".split(","),function(e){var n,r,a=o.getAll("meta"),s=t[e];for(n=0;n<a.length;n++)if(r=a[n],r.attr("name")==e)return void(s?r.attr("content",s):r.remove());s&&(c=new d("meta",1),c.attr("name",e),c.attr("content",s),c.shortEnded=!0,i(c))});var p={};tinymce.each(o.getAll("link"),function(e){"stylesheet"==e.attr("rel")&&(p[e.attr("href")]=e)}),tinymce.each(t.stylesheets,function(e){p[e]||(c=new d("link",1),c.attr({rel:"stylesheet",text:"text/css",href:e}),c.shortEnded=!0,i(c)),delete p[e]}),tinymce.each(p,function(e){e.remove()}),c=o.getAll("body")[0],c&&(n(c,"dir",t.langdir),n(c,"style",t.style),n(c,"vlink",t.visited_color),n(c,"link",t.link_color),n(c,"alink",t.active_color),m.setAttribs(e.getBody(),{style:t.style,dir:t.dir,vLink:t.visited_color,link:t.link_color,aLink:t.active_color})),c=o.getAll("html")[0],c&&(n(c,"lang",t.langcode),n(c,"xml:lang",t.langcode)),a.firstChild||a.remove(),s=new tinymce.html.Serializer({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(o),l=s.substring(0,s.indexOf("</body>"))}function r(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(l)}function o(t){function n(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})}var i,o,s,d,f=t.content,m="",p=e.dom;if(!t.selection&&!("raw"==t.format&&l||t.source_view&&e.getParam("fullpage_hide_in_source_view"))){0!==f.length||t.source_view||(f=tinymce.trim(l)+"\n"+tinymce.trim(f)+"\n"+tinymce.trim(c)),f=f.replace(/<(\/?)BODY/gi,"<$1body"),i=f.indexOf("<body"),-1!=i?(i=f.indexOf(">",i),l=n(f.substring(0,i+1)),o=f.indexOf("</body",i),-1==o&&(o=f.length),t.content=f.substring(i+1,o),c=n(f.substring(o))):(l=a(),c="\n</body>\n</html>"),s=r(),u(s.getAll("style"),function(e){e.firstChild&&(m+=e.firstChild.value)}),d=s.getAll("body")[0],d&&p.setAttribs(e.getBody(),{style:d.attr("style")||"",dir:d.attr("dir")||"",vLink:d.attr("vlink")||"",link:d.attr("link")||"",aLink:d.attr("alink")||""}),p.remove("fullpage_styles");var h=e.getDoc().getElementsByTagName("head")[0];m&&(p.add(h,"style",{id:"fullpage_styles"},m),d=p.get("fullpage_styles"),d.styleSheet&&(d.styleSheet.cssText=m));var g={};tinymce.each(h.getElementsByTagName("link"),function(e){"stylesheet"==e.rel&&e.getAttribute("data-mce-fullpage")&&(g[e.href]=e)}),tinymce.each(s.getAll("link"),function(e){var t=e.attr("href");if(!t)return!0;g[t]||"stylesheet"!=e.attr("rel")||p.add(h,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete g[t]}),tinymce.each(g,function(e){e.parentNode.removeChild(e)})}}function a(){var t,n="",i="";return e.getParam("fullpage_default_xml_pi")&&(n+='<?xml version="1.0" encoding="'+e.getParam("fullpage_default_encoding","ISO-8859-1")+'" ?>\n'),n+=e.getParam("fullpage_default_doctype","<!DOCTYPE html>"),n+="\n<html>\n<head>\n",(t=e.getParam("fullpage_default_title"))&&(n+="<title>"+t+"</title>\n"),(t=e.getParam("fullpage_default_encoding"))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+t+'" />\n'),(t=e.getParam("fullpage_default_font_family"))&&(i+="font-family: "+t+";"),(t=e.getParam("fullpage_default_font_size"))&&(i+="font-size: "+t+";"),(t=e.getParam("fullpage_default_text_color"))&&(i+="color: "+t+";"),n+="</head>\n<body"+(i?' style="'+i+'"':"")+">\n"}function s(t){t.selection||t.source_view&&e.getParam("fullpage_hide_in_source_view")||(t.content=tinymce.trim(l)+"\n"+tinymce.trim(t.content)+"\n"+tinymce.trim(c))}var l,c,u=tinymce.each,d=tinymce.html.Node;e.addCommand("mceFullPageProperties",t),e.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),e.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),e.on("BeforeSetContent",o),e.on("GetContent",s)})},874:function(e,t){tinymce.PluginManager.add("insertdatetime",function(e){function t(t,n){function i(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",i(n.getMonth()+1,2)),t=t.replace("%d",i(n.getDate(),2)),t=t.replace("%H",""+i(n.getHours(),2)),t=t.replace("%M",""+i(n.getMinutes(),2)),t=t.replace("%S",""+i(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",n.getHours()<12?"AM":"PM"),t=t.replace("%B",""+e.translate(l[n.getMonth()])),t=t.replace("%b",""+e.translate(s[n.getMonth()])),t=t.replace("%A",""+e.translate(a[n.getDay()])),t=t.replace("%a",""+e.translate(o[n.getDay()])),t=t.replace("%%","%")}function n(n){var i=t(n);if(e.settings.insertdatetime_element){var r;r=t(/%[HMSIp]/.test(n)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),i='<time datetime="'+r+'">'+i+"</time>";var o=e.dom.getParent(e.selection.getStart(),"time");if(o)return void e.dom.setOuterHTML(o,i)}e.insertContent(i)}var i,r,o="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),l="January February March April May June July August September October November December".split(" "),c=[];e.addCommand("mceInsertDate",function(){n(e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){n(e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S")))}),e.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){n(i||r)},menu:c}),tinymce.each(e.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){r||(r=e),c.push({text:t(e),onclick:function(){i=e,n(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:c,context:"insert"})})},875:function(e,t){tinymce.PluginManager.add("link",function(e){function t(e){return e&&"A"===e.nodeName&&e.href}function n(e){return tinymce.util.Tools.grep(e,t).length>0}function i(t){return e.dom.getParent(t,"a[href]")}function r(){return i(e.selection.getStart())}function o(e){var t=e.getAttribute("data-mce-href");return t||e.getAttribute("href")}function a(){var t=e.plugins.contextmenu;return!!t&&t.isContextMenuVisible()}function s(n){var i,r,o;return!!(e.settings.link_context_toolbar&&!a()&&t(n)&&(i=e.selection,r=i.getRng(),o=r.startContainer,3==o.nodeType&&i.isCollapsed()&&r.startOffset>0&&r.startOffset<o.data.length))}function l(e,t){document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)}function c(e){if(!tinymce.Env.ie||tinymce.Env.ie>10){var t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),l(t,n)}else{var i=window.open("","_blank");if(i){i.opener=null;var r=i.document;r.open(),r.write('<meta http-equiv="refresh" content="0; url='+tinymce.DOM.encode(e)+'">'),r.close()}}}function u(t){if(t){var n=o(t);if(/^#/.test(n)){var i=e.$(n);i.length&&e.selection.scrollIntoView(i[0],!0)}else c(t.href)}}function d(){u(r())}function f(){var t=this,i=function(e){n(e.parents)?t.show():t.hide()};n(e.dom.getParents(e.selection.getStart()))||t.hide(),e.on("nodechange",i),t.on("remove",function(){e.off("nodechange",i)})}function m(t){return function(){var n=e.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof n?n(t):t(n)}}function p(e,t,n){function i(e,n){return n=n||[],tinymce.each(e,function(e){var r={text:e.text||e.title};e.menu?r.menu=i(e.menu):(r.value=e.value,t&&t(r)),n.push(r)}),n}return i(e,n||[])}function h(t){function n(e){var t=c.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),c.find("#href").value(e.control.value())}function i(){!l&&0===C.text.length&&u&&this.parent().parent().find("#text")[0].value(this.value())}function r(t){var n=t.meta||{};f&&f.value(e.convertURL(this.value(),"href")),tinymce.each(t.meta,function(e,t){var n=c.find("#"+t);"text"===t?0===l.length&&(n.value(e),C.text=e):n.value(e)}),n.attach&&(g={href:this.value(),attach:n.attach}),n.text||i.call(this)}function o(e){e.meta=c.toJSON()}var a,s,l,c,u,d,f,m,h,v,y,b,C={},T=e.selection,S=e.dom;a=T.getNode(),s=S.getParent(a,"a[href]"),u=function(e){var t=T.getContent();if(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1==t.indexOf("href=")))return!1;if(e){var n,i=e.childNodes;if(0===i.length)return!1;for(n=i.length-1;n>=0;n--)if(3!=i[n].nodeType)return!1}return!0}(),C.text=l=s?s.innerText||s.textContent:T.getContent({format:"text"}),C.href=s?S.getAttrib(s,"href"):"",s?C.target=S.getAttrib(s,"target"):e.settings.default_link_target&&(C.target=e.settings.default_link_target),(b=S.getAttrib(s,"rel"))&&(C.rel=b),(b=S.getAttrib(s,"class"))&&(C.class=b),(b=S.getAttrib(s,"title"))&&(C.title=b),u&&(d={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){C.text=this.value()}}),t&&(f={type:"listbox",label:"Link list",values:p(t,function(t){t.value=e.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:n,value:e.convertURL(C.href,"href"),onPostRender:function(){f=this}}),!1!==e.settings.target_list&&(e.settings.target_list||(e.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),h={name:"target",type:"listbox",label:"Target",values:p(e.settings.target_list)}),e.settings.rel_list&&(m={name:"rel",type:"listbox",label:"Rel",values:p(e.settings.rel_list)}),e.settings.link_class_list&&(v={name:"class",type:"listbox",label:"Class",values:p(e.settings.link_class_list,function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:"a",classes:[t.value]})})})}),!1!==e.settings.link_title&&(y={name:"title",type:"textbox",label:"Title",value:C.title}),c=e.windowManager.open({title:"Insert link",data:C,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:r,onkeyup:i,onbeforecall:o},d,y,function(t){var i=[];if(tinymce.each(e.dom.select("a:not([href])"),function(e){var n=e.name||e.id;n&&i.push({text:n,value:"#"+n,selected:-1!=t.indexOf("#"+n)})}),i.length)return i.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:i,onselect:n}}(C.href),f,m,h,v],onSubmit:function(t){function n(t,n){var i=e.selection.getRng();tinymce.util.Delay.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(i),n(t)})})}function i(e,t){function n(e){var t=new RegExp("("+i.replace(" ","|")+")","g");return e&&(e=tinymce.trim(e.replace(t,""))),e||null}var i="noopener noreferrer";return t?function(e){return e=n(e),e?[e,i].join(" "):i}(e):n(e)}function r(){var t={href:a,target:C.target?C.target:null,rel:C.rel?C.rel:null,class:C.class?C.class:null,title:C.title?C.title:null};e.settings.allow_unsafe_link_target||(t.rel=i(t.rel,"_blank"==t.target)),a===g.href&&(g.attach(),g={}),s?(e.focus(),u&&C.text!=l&&("innerText"in s?s.innerText=C.text:s.textContent=C.text),S.setAttribs(s,t),T.select(s),e.undoManager.add()):u?e.insertContent(S.createHTML("a",t,S.encode(C.text))):e.execCommand("mceInsertLink",!1,t)}function o(){e.undoManager.transact(r)}var a;return C=tinymce.extend(C,t.data),(a=C.href)?a.indexOf("@")>0&&-1==a.indexOf("//")&&-1==a.indexOf("mailto:")?void n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(a="mailto:"+a),o()}):e.settings.link_assume_external_targets&&!/^\w+:/i.test(a)||!e.settings.link_assume_external_targets&&/^\s*www[\.|\d\.]/i.test(a)?void n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(a="http://"+a),o()}):void o():void e.execCommand("unlink")}})}var g={},v=function(e){return!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey};e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:m(h),stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),e.addContextToolbar&&(e.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:d}),e.addContextToolbar(s,"openlink | link unlink")),e.addShortcut("Meta+K","",m(h)),e.addCommand("mceLink",m(h)),e.on("click",function(e){var t=i(e.target);t&&tinymce.util.VK.metaKeyPressed(e)&&(e.preventDefault(),u(t))}),e.on("keydown",function(e){var t=r();t&&13===e.keyCode&&v(e)&&(e.preventDefault(),u(t))}),this.showDialog=h,e.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:d,onPostRender:f,prependToContext:!0}),e.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:m(h),stateSelector:"a[href]",context:"insert",prependToContext:!0})})},876:function(e,t){!function(){var e={},t=function(t){for(var n=e[t],r=n.deps,o=n.defn,a=r.length,s=new Array(a),l=0;l<a;++l)s[l]=i(r[l]);var c=o.apply(null,s);if(void 0===c)throw"module ["+t+"] returned undefined";n.instance=c},n=function(t,n,i){if("string"!=typeof t)throw"module id must be a string";if(void 0===n)throw"no dependencies for "+t;if(void 0===i)throw"no definition function for "+t;e[t]={deps:n,defn:i,instance:void 0}},i=function(n){var i=e[n];if(void 0===i)throw"module ["+n+"] was undefined";return void 0===i.instance&&t(n),i.instance},r=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r.push(i(e[o]));t.apply(null,t)};({}).bolt={module:{api:{define:n,require:r,demand:i}}};var o=n,a=function(e,t){o(e,[],function(){return t})};a("global!tinymce.PluginManager",tinymce.PluginManager),a("global!tinymce.util.Tools",tinymce.util.Tools),a("global!tinymce.util.VK",tinymce.util.VK),o("tinymce.lists.core.NodeType",[],function(){var e=function(e){return e&&3===e.nodeType},t=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},n=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},i=function(e){return e&&"BR"===e.nodeName};return{isTextNode:e,isListNode:t,isListItemNode:n,isBr:i,isFirstChild:function(e){return e.parentNode.firstChild===e},isLastChild:function(e){return e.parentNode.lastChild===e},isTextBlock:function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},isBogusBr:function(e,t){return!!i(t)&&!(!e.isBlock(t.nextSibling)||i(t.previousSibling))},isEmpty:function(e,t,n){var i=e.isEmpty(t);return!(n&&e.select("span[data-mce-type=bookmark]",t).length>0)&&i},isChildOfBody:function(e,t){return e.isChildOf(t,e.getRoot())}}}),a("global!tinymce.dom.TreeWalker",tinymce.dom.TreeWalker),a("global!tinymce.dom.RangeUtils",tinymce.dom.RangeUtils),o("tinymce.lists.core.Selection",["global!tinymce.util.Tools","tinymce.lists.core.NodeType"],function(e,t){return{getSelectedListItems:function(n){return e.grep(n.selection.getSelectedBlocks(),function(e){return t.isListItemNode(e)})}}}),a("global!tinymce.dom.DOMUtils.DOM",tinymce.dom.DOMUtils.DOM),o("tinymce.lists.core.Range",["global!tinymce.dom.RangeUtils","tinymce.lists.core.NodeType"],function(e,t){var n=function(n,i){var r=e.getNode(n,i);if(t.isListItemNode(n)&&t.isTextNode(r)){return{container:r,offset:i>=n.childNodes.length?r.data.length:0}}return{container:n,offset:i}};return{getNormalizedEndPoint:n,normalizeRange:function(e){var t=e.cloneRange(),i=n(e.startContainer,e.startOffset);t.setStart(i.container,i.offset);var r=n(e.endContainer,e.endOffset);return t.setEnd(r.container,r.offset),t}}}),o("tinymce.lists.core.Bookmark",["global!tinymce.dom.DOMUtils.DOM","tinymce.lists.core.NodeType","tinymce.lists.core.Range"],function(e,t,n){return{createBookmark:function(t){var n={},i=function(i){var r,o,a;o=t[i?"startContainer":"endContainer"],a=t[i?"startOffset":"endOffset"],1===o.nodeType&&(r=e.create("span",{"data-mce-type":"bookmark"}),o.hasChildNodes()?(a=Math.min(a,o.childNodes.length-1),i?o.insertBefore(r,o.childNodes[a]):e.insertAfter(r,o.childNodes[a])):o.appendChild(r),o=r,a=0),n[i?"startContainer":"endContainer"]=o,n[i?"startOffset":"endOffset"]=a};return i(!0),t.collapsed||i(),n},resolveBookmark:function(t){function i(n){var i,r,o;i=o=t[n?"startContainer":"endContainer"],r=t[n?"startOffset":"endOffset"],i&&(1===i.nodeType&&(r=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(i),i=i.parentNode,e.remove(o)),t[n?"startContainer":"endContainer"]=i,t[n?"startOffset":"endOffset"]=r)}i(!0),i();var r=e.createRng();return r.setStart(t.startContainer,t.startOffset),t.endContainer&&r.setEnd(t.endContainer,t.endOffset),n.normalizeRange(r)}}}),o("tinymce.lists.core.NormalizeLists",["global!tinymce.dom.DOMUtils.DOM","global!tinymce.util.Tools","tinymce.lists.core.NodeType"],function(e,t,n){var i=function(t,i){var r,o=i.parentNode;"LI"===o.nodeName&&o.firstChild===i&&(r=o.previousSibling,r&&"LI"===r.nodeName?(r.appendChild(i),n.isEmpty(t,o)&&e.remove(o)):e.setStyle(o,"listStyleType","none")),n.isListNode(o)&&(r=o.previousSibling)&&"LI"===r.nodeName&&r.appendChild(i)};return{normalizeList:i,normalizeLists:function(e,n){t.each(t.grep(e.select("ol,ul",n)),function(t){i(e,t)})}}}),a("global!tinymce.dom.BookmarkManager",tinymce.dom.BookmarkManager),a("global!tinymce.Env",tinymce.Env),o("tinymce.lists.core.TextBlock",["global!tinymce.dom.DOMUtils.DOM","global!tinymce.Env"],function(e,t){return{createNewTextBlock:function(n,i,r){var o,a,s,l=e.createFragment(),c=n.schema.getBlockElements();if(n.settings.forced_root_block&&(r=r||n.settings.forced_root_block),r&&(a=e.create(r),a.tagName===n.settings.forced_root_block&&e.setAttribs(a,n.settings.forced_root_block_attrs),l.appendChild(a)),i)for(;o=i.firstChild;){var u=o.nodeName;s||"SPAN"===u&&"bookmark"===o.getAttribute("data-mce-type")||(s=!0),c[u]?(l.appendChild(o),a=null):r?(a||(a=e.create(r),l.appendChild(a)),a.appendChild(o)):l.appendChild(o)}return n.settings.forced_root_block?s||t.ie&&!(t.ie>10)||a.appendChild(e.create("br",{"data-mce-bogus":"1"})):l.appendChild(e.create("br")),l}}}),o("tinymce.lists.core.SplitList",["global!tinymce.dom.DOMUtils.DOM","global!tinymce.util.Tools","tinymce.lists.core.TextBlock","tinymce.lists.core.NodeType"],function(e,t,n,i){return{splitList:function(r,o,a,s){var l,c,u,d;for(u=e.select('span[data-mce-type="bookmark"]',o),s=s||n.createNewTextBlock(r,a),l=e.createRng(),l.setStartAfter(a),l.setEndAfter(o),c=l.extractContents(),d=c.firstChild;d;d=d.firstChild)if("LI"===d.nodeName&&r.dom.isEmpty(d)){e.remove(d);break}r.dom.isEmpty(c)||e.insertAfter(c,o),e.insertAfter(s,o),i.isEmpty(r.dom,a.parentNode)&&function(n){t.each(u,function(e){n.parentNode.insertBefore(e,a.parentNode)}),e.remove(n)}(a.parentNode),e.remove(a),i.isEmpty(r.dom,o)&&e.remove(o)}}}),o("tinymce.lists.actions.Outdent",["global!tinymce.dom.DOMUtils.DOM","tinymce.lists.core.NodeType","tinymce.lists.core.Bookmark","tinymce.lists.core.Selection","tinymce.lists.core.SplitList","tinymce.lists.core.NormalizeLists","tinymce.lists.core.TextBlock"],function(e,t,n,i,r,o,a){var s=function(n,i){t.isEmpty(n,i)&&e.remove(i)},l=function(n,i){var l,c=i.parentNode,u=c.parentNode;return c===n.getBody()||("DD"===i.nodeName?(e.rename(i,"DT"),!0):t.isFirstChild(i)&&t.isLastChild(i)?("LI"===u.nodeName?(e.insertAfter(i,u),s(n.dom,u),e.remove(c)):t.isListNode(u)?e.remove(c,!0):(u.insertBefore(a.createNewTextBlock(n,i),c),e.remove(c)),!0):t.isFirstChild(i)?("LI"===u.nodeName?(e.insertAfter(i,u),i.appendChild(c),s(n.dom,u)):t.isListNode(u)?u.insertBefore(i,c):(u.insertBefore(a.createNewTextBlock(n,i),c),e.remove(i)),!0):t.isLastChild(i)?("LI"===u.nodeName?e.insertAfter(i,u):t.isListNode(u)?e.insertAfter(i,c):(e.insertAfter(a.createNewTextBlock(n,i),c),e.remove(i)),!0):("LI"===u.nodeName?(c=u,l=a.createNewTextBlock(n,i,"LI")):l=t.isListNode(u)?a.createNewTextBlock(n,i,"LI"):a.createNewTextBlock(n,i),r.splitList(n,c,i,l),o.normalizeLists(n.dom,c.parentNode),!0))};return{outdent:l,outdentSelection:function(e){var t=i.getSelectedListItems(e);if(t.length){var r,o,a=n.createBookmark(e.selection.getRng(!0)),s=e.getBody();for(r=t.length;r--;)for(var c=t[r].parentNode;c&&c!==s;){for(o=t.length;o--;)if(t[o]===c){t.splice(r,1);break}c=c.parentNode}for(r=0;r<t.length&&(l(e,t[r])||0!==r);r++);return e.selection.setRng(n.resolveBookmark(a)),e.nodeChanged(),!0}}}}),o("tinymce.lists.actions.ToggleList",["global!tinymce.util.Tools","global!tinymce.dom.BookmarkManager","tinymce.lists.core.Selection","tinymce.lists.core.NodeType","tinymce.lists.core.Bookmark","tinymce.lists.core.SplitList","tinymce.lists.core.NormalizeLists","tinymce.lists.actions.Outdent"],function(e,t,n,i,r,o,a,s){var l=function(e,t,n){var i=n["list-style-type"]?n["list-style-type"]:null;e.setStyle(t,"list-style-type",i)},c=function(t,n){e.each(n,function(e,n){t.setAttribute(n,e)})},u=function(t,n,i){c(n,i["list-attributes"]),e.each(t.select("li",n),function(e){c(e,i["list-item-attributes"])})},d=function(e,t,n){l(e,t,n),u(e,t,n)},f=function(e,t,n){var r,o,a=e.getBody();for(r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],1===r.nodeType&&(r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r);r.parentNode!==a;){if(i.isTextBlock(e,r))return r;if(/^(TD|TH)$/.test(r.parentNode.nodeName))return r;r=r.parentNode}return r},m=function(n,r){for(var o,a=[],s=n.getBody(),l=n.dom,c=f(n,r,!0),u=f(n,r,!1),d=[],m=c;m&&(d.push(m),m!==u);m=m.nextSibling);return e.each(d,function(e){if(i.isTextBlock(n,e))return a.push(e),void(o=null);if(l.isBlock(e)||i.isBr(e))return i.isBr(e)&&l.remove(e),void(o=null);var r=e.nextSibling;if(t.isBookmarkNode(e)&&(i.isTextBlock(n,r)||!r&&e.parentNode===s))return void(o=null);o||(o=l.create("p"),e.parentNode.insertBefore(o,e),a.push(o)),o.appendChild(e)}),a},p=function(t,n,o){var a,s=t.selection.getRng(!0),l="LI",c=t.dom;o=o||{},"false"!==c.getContentEditable(t.selection.getNode())&&(n=n.toUpperCase(),"DL"===n&&(l="DT"),a=r.createBookmark(s),e.each(m(t,s),function(e){var r,a;a=e.previousSibling,a&&i.isListNode(a)&&a.nodeName===n&&function(e){var t=c.getStyle(e,"list-style-type"),n=o?o["list-style-type"]:"";return n=null===n?"":n,t===n}(a)?(r=a,e=c.rename(e,l),a.appendChild(e)):(r=c.create(n),e.parentNode.insertBefore(r,e),r.appendChild(e),e=c.rename(e,l)),d(c,r,o),C(t.dom,r)}),t.selection.setRng(r.resolveBookmark(a)))},h=function(t){var l=r.createBookmark(t.selection.getRng(!0)),c=t.getBody(),u=n.getSelectedListItems(t),d=e.grep(u,function(e){return t.dom.isEmpty(e)});u=e.grep(u,function(e){return!t.dom.isEmpty(e)}),e.each(d,function(e){if(i.isEmpty(t.dom,e))return void s.outdent(t,e)}),e.each(u,function(e){var n,r;if(e.parentNode!==t.getBody()){for(n=e;n&&n!==c;n=n.parentNode)i.isListNode(n)&&(r=n);o.splitList(t,r,e),a.normalizeLists(t.dom,r.parentNode)}}),t.selection.setRng(r.resolveBookmark(l))},g=function(e,t){return e&&t&&i.isListNode(e)&&e.nodeName===t.nodeName},v=function(e,t,n){return e.getStyle(t,"list-style-type",!0)===e.getStyle(n,"list-style-type",!0)},y=function(e,t){return e.className===t.className},b=function(e,t,n){return g(t,n)&&v(e,t,n)&&y(t,n)},C=function(e,t){var n,i;if(n=t.nextSibling,b(e,t,n)){for(;i=n.firstChild;)t.appendChild(i);e.remove(n)}if(n=t.previousSibling,b(e,t,n)){for(;i=n.lastChild;)t.insertBefore(i,t.firstChild);e.remove(n)}};return{toggleList:function(e,t,n){var i=e.dom.getParent(e.selection.getStart(),"OL,UL,DL");if(n=n||{},i!==e.getBody())if(i)if(i.nodeName===t)h(e);else{var o=r.createBookmark(e.selection.getRng(!0));d(e.dom,i,n),C(e.dom,e.dom.rename(i,t)),e.selection.setRng(r.resolveBookmark(o))}else p(e,t,n)},removeList:h,mergeWithAdjacentLists:C}}),o("tinymce.lists.core.Delete",["global!tinymce.dom.TreeWalker","global!tinymce.dom.RangeUtils","global!tinymce.util.VK","tinymce.lists.core.Selection","tinymce.lists.core.NodeType","tinymce.lists.core.Bookmark","tinymce.lists.core.Range","tinymce.lists.core.NormalizeLists","tinymce.lists.actions.ToggleList"],function(e,t,n,i,r,o,a,s,l){var c=function(n,i,o){var a,s,l=i.startContainer,c=i.startOffset;if(3===l.nodeType&&(o?c<l.data.length:c>0))return l;for(a=n.schema.getNonEmptyElements(),1===l.nodeType&&(l=t.getNode(l,c)),s=new e(l,n.getBody()),o&&r.isBogusBr(n.dom,l)&&s.next();l=s[o?"next":"prev2"]();){if("LI"===l.nodeName&&!l.hasChildNodes())return l;if(a[l.nodeName])return l;if(3===l.nodeType&&l.data.length>0)return l}},u=function(e,t,n){var i,o,a=t.parentNode;if(r.isChildOfBody(e,t)&&r.isChildOfBody(e,n)){if(r.isListNode(n.lastChild)&&(o=n.lastChild),a===n.lastChild&&r.isBr(a.previousSibling)&&e.remove(a.previousSibling),i=n.lastChild,i&&r.isBr(i)&&t.hasChildNodes()&&e.remove(i),r.isEmpty(e,n,!0)&&e.$(n).empty(),!r.isEmpty(e,t,!0))for(;i=t.firstChild;)n.appendChild(i);o&&n.appendChild(o),e.remove(t),r.isEmpty(e,a)&&a!==e.getRoot()&&e.remove(a)}},d=function(e,t){var n,i,s,d=e.dom,f=e.selection,m=d.getParent(f.getStart(),"LI");if(m){if((n=m.parentNode)===e.getBody()&&r.isEmpty(d,n))return!0;if(i=a.normalizeRange(f.getRng(!0)),(s=d.getParent(c(e,i,t),"LI"))&&s!==m){var p=o.createBookmark(i);return t?u(d,s,m):u(d,m,s),e.selection.setRng(o.resolveBookmark(p)),!0}if(!s&&!t&&l.removeList(e,n.nodeName))return!0}return!1},f=function(e,t){var n=e.dom,i=n.getParent(e.selection.getStart(),n.isBlock);if(i&&n.isEmpty(i)){var r=a.normalizeRange(e.selection.getRng(!0)),o=n.getParent(c(e,r,t),"LI");if(o)return e.undoManager.transact(function(){n.remove(i),l.mergeWithAdjacentLists(n,o.parentNode),e.selection.select(o,!0),e.selection.collapse(t)}),!0}return!1},m=function(e,t){return d(e,t)||f(e,t)},p=function(e){return!!(e.dom.getParent(e.selection.getStart(),"LI,DT,DD")||i.getSelectedListItems(e).length>0)&&(e.undoManager.transact(function(){e.execCommand("Delete"),s.normalizeLists(e.dom,e.getBody())}),!0)},h=function(e,t){return e.selection.isCollapsed()?m(e,t):p(e)};return{setup:function(e){e.on("keydown",function(t){t.keyCode===n.BACKSPACE?h(e,!1)&&t.preventDefault():t.keyCode===n.DELETE&&h(e,!0)&&t.preventDefault()})},backspaceDelete:h}}),o("tinymce.lists.actions.Indent",["global!tinymce.dom.DOMUtils.DOM","tinymce.lists.core.NodeType","tinymce.lists.core.Bookmark","tinymce.lists.core.Selection"],function(e,t,n,i){var r=function(n,i){var r;if(t.isListNode(n)){for(;r=n.firstChild;)i.appendChild(r);e.remove(n)}},o=function(n){var i,o,a;return"DT"===n.nodeName?(e.rename(n,"DD"),!0):(i=n.previousSibling)&&t.isListNode(i)?(i.appendChild(n),!0):i&&"LI"===i.nodeName&&t.isListNode(i.lastChild)?(i.lastChild.appendChild(n),r(n.lastChild,i.lastChild),!0):(i=n.nextSibling)&&t.isListNode(i)?(i.insertBefore(n,i.firstChild),!0):!(!(i=n.previousSibling)||"LI"!==i.nodeName)&&(o=e.create(n.parentNode.nodeName),a=e.getStyle(n.parentNode,"listStyleType"),a&&e.setStyle(o,"listStyleType",a),i.appendChild(o),o.appendChild(n),r(n.lastChild,o),!0)};return{indentSelection:function(e){var t=i.getSelectedListItems(e);if(t.length){for(var r=n.createBookmark(e.selection.getRng(!0)),a=0;a<t.length&&(o(t[a])||0!==a);a++);return e.selection.setRng(n.resolveBookmark(r)),e.nodeChanged(),!0}}}}),o("tinymce.lists.Plugin",["global!tinymce.PluginManager","global!tinymce.util.Tools","global!tinymce.util.VK","tinymce.lists.core.NodeType","tinymce.lists.core.Delete","tinymce.lists.actions.Indent","tinymce.lists.actions.Outdent","tinymce.lists.actions.ToggleList"],function(e,t,n,i,r,o,a,s){var l=function(e,t){return function(){var n=e.dom.getParent(e.selection.getStart(),"UL,OL,DL");return n&&n.nodeName===t}},c=function(e){e.on("BeforeExecCommand",function(t){var n,i=t.command.toLowerCase();if("indent"===i?o.indentSelection(e)&&(n=!0):"outdent"===i&&a.outdentSelection(e)&&(n=!0),n)return e.fire("ExecCommand",{command:t.command}),t.preventDefault(),!0}),e.addCommand("InsertUnorderedList",function(t,n){s.toggleList(e,"UL",n)}),e.addCommand("InsertOrderedList",function(t,n){s.toggleList(e,"OL",n)}),e.addCommand("InsertDefinitionList",function(t,n){s.toggleList(e,"DL",n)})},u=function(e){e.addQueryStateHandler("InsertUnorderedList",l(e,"UL")),e.addQueryStateHandler("InsertOrderedList",l(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",l(e,"DL"))},d=function(e){e.on("keydown",function(t){9!==t.keyCode||n.metaKeyPressed(t)||e.dom.getParent(e.selection.getStart(),"LI,DT,DD")&&(t.preventDefault(),t.shiftKey?a.outdentSelection(e):o.indentSelection(e))})},f=function(e){var n=function(n){return function(){var r=this;e.on("NodeChange",function(e){var o=t.grep(e.parents,i.isListNode);r.active(o.length>0&&o[0].nodeName===n)})}};(function(e,n){var i=e.settings.plugins?e.settings.plugins:"";return-1!==t.inArray(i.split(/[ ,]/),n)})(e,"advlist")||(e.addButton("numlist",{title:"Numbered list",cmd:"InsertOrderedList",onPostRender:n("OL")}),e.addButton("bullist",{title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:n("UL")})),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(t){var n=t.control;e.on("nodechange",function(){for(var t=e.selection.getSelectedBlocks(),r=!1,o=0,a=t.length;!r&&o<a;o++){var s=t[o].nodeName;r="LI"===s&&i.isFirstChild(t[o])||"UL"===s||"OL"===s||"DD"===s}n.disabled(r)})}})};return e.add("lists",function(e){return f(e),r.setup(e),e.on("init",function(){c(e),u(e),d(e)}),{backspaceDelete:function(t){r.backspaceDelete(e,t)}}}),function(){}}),i("tinymce.lists.Plugin")()}()},877:function(e,t){!function(e,t){"use strict";function n(e,t){for(var n,i=[],a=0;a<e.length;++a){if(!(n=o[e[a]]||r(e[a])))throw"module definition dependecy not found: "+e[a];i.push(n)}t.apply(null,i)}function i(e,i,r){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(i===t)throw"invalid module definition, dependencies must be specified";if(r===t)throw"invalid module definition, definition function must be specified";n(i,function(){o[e]=r.apply(null,arguments)})}function r(t){for(var n=e,i=t.split(/[.\/]/),r=0;r<i.length;++r){if(!n[i[r]])return;n=n[i[r]]}return n}var o={};i("tinymce/pasteplugin/Utils",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema"],function(e,t,n){function i(t,n){return e.each(n,function(e){t=e.constructor==RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function r(r){function o(e){var t=e.name,n=e;if("br"===t)return void(l+="\n");if(c[t]&&(l+=" "),u[t])return void(l+=" ");if(3==e.type&&(l+=e.value),!e.shortEnded&&(e=e.firstChild))do{o(e)}while(e=e.next);d[t]&&n.next&&(l+="\n","p"==t&&(l+="\n"))}var a=new n,s=new t({},a),l="",c=a.getShortEndedElements(),u=e.makeMap("script noscript style textarea video audio iframe object"," "),d=a.getBlockElements();return r=i(r,[/<!\[[^\]]+\]>/g]),o(s.parse(r)),l}function o(e){function t(e,t,n){return t||n?" ":" "}return e=i(s(e),[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,t],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function a(e){var t=0;return function(){return e+t++}}var s=function(e){var t=e.indexOf("\x3c!--StartFragment--\x3e");if(-1!==t){var n=e.substr(t+"\x3c!--StartFragment--\x3e".length),i=n.indexOf("\x3c!--EndFragment--\x3e");if(-1!==i&&/^<\/(p|h[1-6]|li)>/i.test(n.substr(i+"\x3c!--EndFragment--\x3e".length,5)))return n.substr(0,i)}return e};return{filter:i,innerText:r,trimHtml:o,createIdGenerator:a}}),i("tinymce/pasteplugin/SmartPaste",["tinymce/util/Tools"],function(e){var t=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},n=function(e){return t(e)&&/.(gif|jpe?g|png)$/.test(e)},i=function(e,t,n){return e.undoManager.extra(function(){n(e,t)},function(){e.insertContent('<img src="'+t+'">')}),!0},r=function(e,t,n){return e.undoManager.extra(function(){n(e,t)},function(){e.execCommand("mceInsertLink",!1,t)}),!0},o=function(e,n,i){return!(!1!==e.selection.isCollapsed()||!t(n))&&r(e,n,i)},a=function(e,t,r){return!!n(t)&&i(e,t,r)},s=function(e,t){return e.insertContent(t,{merge:!1!==e.settings.paste_merge_formats,paste:!0}),!0},l=function(t,n){e.each([o,a,s],function(e){return!0!==e(t,n,s)})};return{isImageUrl:n,isAbsoluteUrl:t,insertContent:function(e,t){!1===e.settings.smart_paste?s(e,t):l(e,t)}}}),i("tinymce/pasteplugin/Clipboard",["tinymce/Env","tinymce/dom/RangeUtils","tinymce/util/VK","tinymce/pasteplugin/Utils","tinymce/pasteplugin/SmartPaste","tinymce/util/Delay"],function(e,t,n,i,r,o){return function(a){function s(e){var t,n=a.dom;if(t=a.fire("BeforePastePreProcess",{content:e}),t=a.fire("PastePreProcess",t),e=t.content,!t.isDefaultPrevented()){if(a.hasEventListeners("PastePostProcess")&&!t.isDefaultPrevented()){var i=n.add(a.getBody(),"div",{style:"display:none"},e);t=a.fire("PastePostProcess",{node:i}),n.remove(i),e=t.node.innerHTML}t.isDefaultPrevented()||r.insertContent(a,e)}}function l(e){e=a.dom.encode(e).replace(/\r\n/g,"\n");var t,n=a.dom.getParent(a.selection.getStart(),a.dom.isBlock),r=a.settings.forced_root_block;r&&(t=a.dom.createHTML(r,a.settings.forced_root_block_attrs),t=t.substr(0,t.length-3)+">"),n&&/^(PRE|DIV)$/.test(n.nodeName)||!r?e=i.filter(e,[[/\n/g,"<br>"]]):(e=i.filter(e,[[/\n\n/g,"</p>"+t],[/^(.*<\/p>)(<p>)$/,t+"$1"],[/\n/g,"<br />"]]),-1!=e.indexOf("<p>")&&(e=t+e)),s(e)}function c(){var t,n=a.dom,i=a.getBody(),r=a.dom.getViewPort(a.getWin()),o=r.y,s=20;if(E=a.selection.getRng(),a.inline&&(t=a.selection.getScrollContainer())&&t.scrollTop>0&&(o=t.scrollTop),E.getClientRects){var l=function(e){var t,i,r,o=e.startContainer;if(t=e.getClientRects(),t.length)return t[0];if(e.collapsed&&1==o.nodeType){for(r=o.childNodes[E.startOffset];r&&3==r.nodeType&&!r.data.length;)r=r.nextSibling;if(r)return"BR"==r.tagName&&(i=n.doc.createTextNode("\ufeff"),r.parentNode.insertBefore(i,r),e=n.createRng(),e.setStartBefore(i),e.setEndAfter(i),t=e.getClientRects(),n.remove(i)),t.length?t[0]:void 0}}(E);if(l)s=o+(l.top-n.getPos(i).y);else{s=o;var c=E.startContainer;c&&(3==c.nodeType&&c.parentNode!=i&&(c=c.parentNode),1==c.nodeType&&(s=n.getPos(c,t||i).y))}}w=n.add(a.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+s+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},M),(e.ie||e.gecko)&&n.setStyle(w,"left","rtl"==n.getStyle(i,"direction",!0)?65535:-65535),n.bind(w,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),w.focus(),a.selection.select(w,!0)}function u(){if(w){for(var e;e=a.dom.get("mcepastebin");)a.dom.remove(e),a.dom.unbind(e);E&&a.selection.setRng(E)}w=E=null}function d(){var e,t,n,i,r="";for(e=a.dom.select("div[id=mcepastebin]"),t=0;t<e.length;t++)n=e[t],n.firstChild&&"mcepastebin"==n.firstChild.id&&(n=n.firstChild),i=n.innerHTML,r!=M&&(r+=i);return r}function f(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&n.length>0&&-1==n.indexOf(_)&&(t["text/plain"]=n)}if(e.types)for(var i=0;i<e.types.length;i++){var r=e.types[i];t[r]=e.getData(r)}}return t}function m(e){return f(e.clipboardData||a.getDoc().dataTransfer)}function p(e){return T(e,"text/html")||T(e,"text/plain")}function h(e){var t;return t=e.indexOf(","),-1!==t?e.substr(t+1):null}function g(e,t){return!e.images_dataimg_filter||e.images_dataimg_filter(t)}function v(e,t,n){e&&(a.selection.setRng(e),e=null);var i=t.result,r=h(i),o=new Image;if(o.src=i,g(a.settings,o)){var l,c,u=a.editorUpload.blobCache;c=u.findFirst(function(e){return e.base64()===r}),c?l=c:(l=u.create(B(),n,r),u.add(l)),s('<img src="'+l.blobUri()+'">')}else s('<img src="'+i+'">')}function y(e,t){function n(n){var i,r,o,a=!1;if(n)for(i=0;i<n.length;i++)if(r=n[i],/^image\/(jpeg|png|gif|bmp)$/.test(r.type)){var s=r.getAsFile?r.getAsFile():r;o=new FileReader,o.onload=v.bind(null,t,o,s),o.readAsDataURL(s),e.preventDefault(),a=!0}return a}var i=e.clipboardData||e.dataTransfer;if(a.settings.paste_data_images&&i)return n(i.items)||n(i.files)}function b(e){var t=e.clipboardData;return-1!=navigator.userAgent.indexOf("Android")&&t&&t.items&&0===t.items.length}function C(e){return t.getCaretRangeFromPoint(e.clientX,e.clientY,a.getDoc())}function T(e,t){return t in e&&e[t].length>0}function S(e){return n.metaKeyPressed(e)&&86==e.keyCode||e.shiftKey&&45==e.keyCode}function x(){function t(e,t,n){var r;if(T(e,"text/html")?r=e["text/html"]:(r=d())==M&&(n=!0),r=i.trimHtml(r),w&&w.firstChild&&"mcepastebin"===w.firstChild.id&&(n=!0),u(),r.length||(n=!0),n&&(r=T(e,"text/plain")&&-1==r.indexOf("</p>")?e["text/plain"]:i.innerText(r)),r==M)return void(t||a.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."));n?l(r):s(r)}function n(e){var t=e["text/plain"];return!!t&&0===t.indexOf("file://")}a.on("keydown",function(t){function n(e){S(e)&&!e.isDefaultPrevented()&&u()}if(S(t)&&!t.isDefaultPrevented()){if((A=t.shiftKey&&86==t.keyCode)&&e.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),P=(new Date).getTime(),e.ie&&A)return t.preventDefault(),void a.fire("paste",{ieFake:!0});u(),c(),a.once("keyup",n),a.once("paste",function(){a.off("keyup",n)})}});var r=function(){return E||a.selection.getRng()};a.on("paste",function(n){var i=(new Date).getTime(),s=m(n),l=(new Date).getTime()-i,f=(new Date).getTime()-P-l<1e3,h="text"==N.pasteFormat||A;return A=!1,n.isDefaultPrevented()||b(n)?void u():!p(s)&&y(n,r())?void u():(f||n.preventDefault(),!e.ie||f&&!n.ieFake||(c(),a.dom.bind(w,"paste",function(e){e.stopPropagation()}),a.getDoc().execCommand("Paste",!1,null),s["text/html"]=d()),void(T(s,"text/html")?(n.preventDefault(),t(s,f,h)):o.setEditorTimeout(a,function(){t(s,f,h)},0)))}),a.on("dragstart dragend",function(e){k="dragstart"==e.type}),a.on("drop",function(e){var t,r;if(r=C(e),!e.isDefaultPrevented()&&!k&&(t=f(e.dataTransfer),(p(t)&&!n(t)||!y(e,r))&&r&&!1!==a.settings.paste_filter_drop)){var c=t["mce-internal"]||t["text/html"]||t["text/plain"];c&&(e.preventDefault(),o.setEditorTimeout(a,function(){a.undoManager.transact(function(){t["mce-internal"]&&a.execCommand("Delete"),a.selection.setRng(r),c=i.trimHtml(c),t["text/html"]?s(c):l(c)})}))}}),a.on("dragover dragend",function(e){a.settings.paste_data_images&&e.preventDefault()})}var w,E,A,N=this,P=0,k=!1,M="%MCEPASTEBIN%",_="data:text/mce-internal,",B=i.createIdGenerator("mceclip");N.pasteHtml=s,N.pasteText=l,N.pasteImageData=y,a.on("preInit",function(){x(),a.parser.addNodeFilter("img",function(t,n,i){function r(t){t.attr("data-mce-object")||s===e.transparentSrc||t.remove()}if(!a.settings.paste_data_images&&function(e){return e.data&&!0===e.data.paste}(i))for(var o=t.length;o--;){var s=t[o].attributes.map.src;s&&(!function(e){return 0===e.indexOf("webkit-fake-url")}(s)?!a.settings.allow_html_data_urls&&function(e){return 0===e.indexOf("data:")}(s)&&r(t[o]):r(t[o]))}})})}}),i("tinymce/pasteplugin/WordFilter",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema","tinymce/html/Serializer","tinymce/html/Node","tinymce/pasteplugin/Utils"],function(e,t,n,i,r,o){function a(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function s(t){var n,i;return i=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],t=t.replace(/^[\u00a0 ]+/,""),e.each(i,function(e){if(e.test(t))return n=!0,!1}),n}function l(e){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(e)}function c(c){var u=c.settings;c.on("BeforePastePreProcess",function(d){function f(t,n){var i,o={},a=c.dom.parseStyle(n);return e.each(a,function(e,r){switch(r){case"mso-list":i=/\w+ \w+([0-9]+)/i.exec(n),i&&(t._listLevel=parseInt(i[1],10)),/Ignore/i.test(e)&&t.firstChild&&(t._listIgnore=!0,t.firstChild._listIgnore=!0);break;case"horiz-align":r="text-align";break;case"vert-align":r="vertical-align";break;case"font-color":case"mso-foreground":r="color";break;case"mso-background":case"mso-highlight":r="background";break;case"font-weight":case"font-style":return void("normal"!=e&&(o[r]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void t.remove()}if(0===r.indexOf("mso-comment"))return void t.remove();0!==r.indexOf("mso-")&&("all"==m||p&&p[r])&&(o[r]=e)}),/(bold)/i.test(o["font-weight"])&&(delete o["font-weight"],t.wrap(new r("b",1))),/(italic)/i.test(o["font-style"])&&(delete o["font-style"],t.wrap(new r("i",1))),(o=c.dom.serializeStyle(o,t.name))||null}var m,p,h=d.content;if(h=h.replace(/<b[^>]+id="?docs-internal-[^>]*>/gi,""),h=h.replace(/<br class="?Apple-interchange-newline"?>/gi,""),m=u.paste_retain_style_properties,m&&(p=e.makeMap(m.split(/[, ]/))),!1!==u.paste_enable_default_filters&&a(d.content)){d.wordContent=!0,h=o.filter(h,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(" "):""}]]);var g=u.paste_word_valid_elements;g||(g="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var v=new n({valid_elements:g,valid_children:"-li[p]"});e.each(v.elements,function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var y=new t({},v);y.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)t=e[n],t.attr("style",f(t,t.attr("style"))),"span"==t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),y.addAttributeFilter("class",function(e){for(var t,n,i=e.length;i--;)t=e[i],n=t.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),y.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),y.addNodeFilter("a",function(e){for(var t,n,i,r=e.length;r--;)if(t=e[r],n=t.attr("href"),i=t.attr("name"),n&&-1!=n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||i){if(i&&!/^_?(?:toc|edn|ftn)/i.test(i)){t.unwrap();continue}t.attr({href:n,name:i})}else t.unwrap()});var b=y.parse(h);!1!==u.paste_convert_word_fake_lists&&function(e){function t(e){var n="";if(3===e.type)return e.value;if(e=e.firstChild)do{n+=t(e)}while(e=e.next);return n}function n(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!n(e,t))return!1}while(e=e.next);return!0}function i(e){if(e._listIgnore)return void e.remove();if(e=e.firstChild)do{i(e)}while(e=e.next)}function o(e,t,o){var s=e._listLevel||u;s!=u&&(s<u?a&&(a=a.parent.parent):(c=a,a=null)),a&&a.name==t?a.append(e):(c=c||a,a=new r(t,1),o>1&&a.attr("start",""+o),e.wrap(a)),e.name="li",s>u&&c&&c.lastChild.append(a),u=s,i(e),n(e,/^\u00a0+/),n(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),n(e,/^\u00a0+/)}for(var a,c,u=1,d=[],f=e.firstChild;void 0!==f&&null!==f;)if(d.push(f),null!==(f=f.walk()))for(;void 0!==f&&f.parent!==e;)f=f.walk();for(var m=0;m<d.length;m++)if(e=d[m],"p"==e.name&&e.firstChild){var p=t(e);if(l(p)){o(e,"ul");continue}if(s(p)){var h=/([0-9]+)\./.exec(p),g=1;h&&(g=parseInt(h[1],10)),o(e,"ol",g);continue}if(e._listLevel){o(e,"ul",1);continue}a=null}else c=a,a=null}(b),d.content=new i({validate:u.validate},v).serialize(b)}})}return c.isWordContent=a,c}),i("tinymce/pasteplugin/Quirks",["tinymce/Env","tinymce/util/Tools","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Utils"],function(e,t,n,i){return function(r){function o(e){r.on("BeforePastePreProcess",function(t){t.content=e(t.content)})}function a(e){if(!n.isWordContent(e))return e;var o=[];t.each(r.schema.getBlockElements(),function(e,t){o.push(t)});var a=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+o.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return e=i.filter(e,[[a,"$1"]]),e=i.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function s(e){if(n.isWordContent(e))return e;var t=r.settings.paste_webkit_styles;if(!1===r.settings.paste_remove_styles_if_webkit||"all"==t)return e;if(t&&(t=t.split(/[, ]/)),t){var i=r.dom,o=r.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,n,r,a){var s=i.parseStyle(r,"span"),l={};if("none"===t)return n+a;for(var c=0;c<t.length;c++){var u=s[t[c]],d=i.getStyle(o,t[c],!0);/color/.test(t[c])&&(u=i.toHex(u),d=i.toHex(d)),d!=u&&(l[t[c]]=u)}return l=i.serializeStyle(l,"span"),l?n+' style="'+l+'"'+a:n+a})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,i){return t+' style="'+n+'"'+i})}function l(e){r.$("a",e).find("font,u").each(function(e,t){r.dom.remove(t,!0)})}e.webkit&&o(s),e.ie&&(o(a),function(e){r.on("PastePostProcess",function(t){e(t.node)})}(l))}}),i("tinymce/pasteplugin/Plugin",["tinymce/PluginManager","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks"],function(e,t,n,i){var r;e.add("paste",function(o){function a(){return r||!1===o.settings.paste_plaintext_inform}function s(){if("text"==c.pasteFormat)c.pasteFormat="html",o.fire("PastePlainTextToggle",{state:!1});else if(c.pasteFormat="text",o.fire("PastePlainTextToggle",{state:!0}),!a()){var e=o.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");o.notificationManager.open({text:e,type:"info"}),r=!0}o.focus()}function l(){var e=this;e.active("text"===c.pasteFormat),o.on("PastePlainTextToggle",function(t){e.active(t.state)})}var c,u=this,d=o.settings;if(/(^|[ ,])powerpaste([, ]|$)/.test(d.plugins)&&e.get("powerpaste"))return void("undefined"!=typeof console&&console.log);u.clipboard=c=new t(o),u.quirks=new i(o),u.wordFilter=new n(o),o.settings.paste_as_text&&(u.clipboard.pasteFormat="text"),d.paste_preprocess&&o.on("PastePreProcess",function(e){d.paste_preprocess.call(u,u,e)}),d.paste_postprocess&&o.on("PastePostProcess",function(e){d.paste_postprocess.call(u,u,e)}),o.addCommand("mceInsertClipboardContent",function(e,t){t.content&&u.clipboard.pasteHtml(t.content),t.text&&u.clipboard.pasteText(t.text)}),o.settings.paste_block_drop&&o.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),o.settings.paste_data_images||o.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),o.addCommand("mceTogglePlainTextPaste",s),o.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:s,onPostRender:l}),o.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:c.pasteFormat,onclick:s,onPostRender:l})})}),function(n){var i,r,a,s,l;for(i=0;i<n.length;i++){r=e,a=n[i],s=a.split(/[.\/]/);for(var c=0;c<s.length-1;++c)r[s[c]]===t&&(r[s[c]]={}),r=r[s[c]];r[s[s.length-1]]=o[a]}if(e.AMDLC_TESTS){l=e.privateModules||{};for(a in o)l[a]=o[a];for(i=0;i<n.length;i++)delete l[n[i]];e.privateModules=l}}(["tinymce/pasteplugin/Utils"])}(window)},878:function(e,t){tinymce.PluginManager.add("preview",function(e){var t=e.settings,n=!tinymce.Env.ie;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'<iframe src="javascript:\'\'" frameborder="0"'+(n?' sandbox="allow-scripts"':"")+"></iframe>",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var i,r="";r+='<base href="'+e.documentBaseURI.getURI()+'">',tinymce.each(e.contentCSS,function(t){r+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'});var o=t.body_id||"tinymce";-1!=o.indexOf("=")&&(o=e.getParam("body_id","","hash"),o=o[e.id]||o);var a=t.body_class||"";-1!=a.indexOf("=")&&(a=e.getParam("body_class","","hash"),a=a[e.id]||"");var s=e.settings.directionality?' dir="'+e.settings.directionality+'"':"";if(i="<!DOCTYPE html><html><head>"+r+'</head><body id="'+o+'" class="mce-content-body '+a+'"'+s+">"+e.getContent()+'<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);<\/script> </body></html>',n)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(i);else{var l=this.getEl("body").firstChild.contentWindow.document;l.open(),l.write(i),l.close()}}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})})},879:function(e,t){tinymce.PluginManager.add("print",function(e){e.addCommand("mcePrint",function(){e.getWin().print()}),e.addButton("print",{title:"Print",cmd:"mcePrint"}),e.addShortcut("Meta+P","","mcePrint"),e.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Meta+P",context:"file"})})},880:function(e,t){!function(){function e(e){return e&&1==e.nodeType&&"false"===e.contentEditable}function t(t,n,i,r,o){function a(e,t){if(t=t||0,!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var n=e.index;if(t>0){var i=e[t];if(!i)throw"Invalid capture group";n+=e[0].indexOf(i),e[0]=i}return[n,n+e[0].length,[e[0]]]}function s(t){var n;if(3===t.nodeType)return t.data;if(f[t.nodeName]&&!d[t.nodeName])return"";if(n="",e(t))return"\n";if((d[t.nodeName]||m[t.nodeName])&&(n+="\n"),t=t.firstChild)do{n+=s(t)}while(t=t.nextSibling);return n}var l,c,u,d,f,m,p=[],h=0;if(u=n.ownerDocument,d=o.getBlockElements(),f=o.getWhiteSpaceElements(),m=o.getShortEndedElements(),c=s(n)){if(t.global)for(;l=t.exec(c);)p.push(a(l,r));else l=c.match(t),p.push(a(l,r));return p.length&&(h=p.length,function(t,n,i){var r,o,a,s,l=[],c=0,u=t,p=n.shift(),h=0;e:for(;;){if((d[u.nodeName]||m[u.nodeName]||e(u))&&c++,3===u.nodeType&&(!o&&u.length+c>=p[1]?(o=u,s=p[1]-c):r&&l.push(u),!r&&u.length+c>p[0]&&(r=u,a=p[0]-c),c+=u.length),r&&o){if(u=i({startNode:r,startNodeIndex:a,endNode:o,endNodeIndex:s,innerNodes:l,match:p[2],matchIndex:h}),c-=o.length-s,r=null,o=null,l=[],p=n.shift(),h++,!p)break}else if(f[u.nodeName]&&!d[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!e(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===t)break e;u=u.parentNode}}}(n,p,function(e){var t;if("function"!=typeof e){var n=e.nodeType?e:u.createElement(e);t=function(e,t){var i=n.cloneNode(!1);return i.setAttribute("data-mce-index",t),e&&i.appendChild(u.createTextNode(e)),i}}else t=e;return function(e){var n,i,r,o=e.startNode,a=e.endNode,s=e.matchIndex;if(o===a){var l=o;r=l.parentNode,e.startNodeIndex>0&&(n=u.createTextNode(l.data.substring(0,e.startNodeIndex)),r.insertBefore(n,l));var c=t(e.match[0],s);return r.insertBefore(c,l),e.endNodeIndex<l.length&&(i=u.createTextNode(l.data.substring(e.endNodeIndex)),r.insertBefore(i,l)),l.parentNode.removeChild(l),c}n=u.createTextNode(o.data.substring(0,e.startNodeIndex)),i=u.createTextNode(a.data.substring(e.endNodeIndex));for(var d=t(o.data.substring(e.startNodeIndex),s),f=[],m=0,p=e.innerNodes.length;m<p;++m){var h=e.innerNodes[m],g=t(h.data,s);h.parentNode.replaceChild(g,h),f.push(g)}var v=t(a.data.substring(0,e.endNodeIndex),s);return r=o.parentNode,r.insertBefore(n,o),r.insertBefore(d,o),r.removeChild(o),r=a.parentNode,r.insertBefore(v,a),r.insertBefore(i,a),r.removeChild(a),v}}(i))),h}}function n(e){function n(){function t(){o.statusbar.find("#next").disabled(!a(d+1).length),o.statusbar.find("#prev").disabled(!a(d-1).length)}function n(){e.windowManager.alert("Could not find the specified string.",function(){o.find("#find")[0].focus()})}var i,r={};i=tinymce.trim(e.selection.getContent({format:"text"}));var o=e.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){e.focus(),u.done()},onSubmit:function(e){var i,s,l,c;return e.preventDefault(),s=o.find("#case").checked(),c=o.find("#words").checked(),l=o.find("#find").value(),l.length?r.text==l&&r.caseState==s&&r.wholeWord==c?0===a(d+1).length?void n():(u.next(),void t()):(i=u.find(l,s,c),i||n(),o.statusbar.items().slice(1).disabled(0===i),t(),void(r={text:l,caseState:s,wholeWord:c})):(u.done(!1),void o.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){o.submit()}},{text:"Replace",disabled:!0,onclick:function(){u.replace(o.find("#replace").value())||(o.statusbar.items().slice(1).disabled(!0),d=-1,r={})}},{text:"Replace all",disabled:!0,onclick:function(){u.replace(o.find("#replace").value(),!0,!0),o.statusbar.items().slice(1).disabled(!0),r={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){u.prev(),t()}},{text:"Next",name:"next",disabled:!0,onclick:function(){u.next(),t()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:i},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})}function i(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function r(n){var i,r;return r=e.dom.create("span",{"data-mce-bogus":1}),r.className="mce-match-marker",i=e.getBody(),u.done(!1),t(n,i,r,!1,e.schema)}function o(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function a(t){var n,r=[];if(n=tinymce.toArray(e.getBody().getElementsByTagName("span")),n.length)for(var o=0;o<n.length;o++){var a=i(n[o]);null!==a&&a.length&&(a===t.toString()&&r.push(n[o]))}return r}function s(t){var n=d,i=e.dom;t=!1!==t,t?n++:n--,i.removeClass(a(d),"mce-match-marker-selected");var r=a(n);return r.length?(i.addClass(a(n),"mce-match-marker-selected"),e.selection.scrollIntoView(r[0]),n):-1}function l(t){var n=e.dom,i=t.parentNode;n.remove(t),n.isEmpty(i)&&n.remove(i)}function c(e){var t=i(e);return null!==t&&t.length>0}var u=this,d=-1;u.init=function(e){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:n,separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Meta+F",onclick:n}),e.addCommand("SearchReplace",n),e.shortcuts.add("Meta+F","",n)},u.find=function(e,t,n){e=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),e=n?"\\b"+e+"\\b":e;var i=r(new RegExp(e,t?"g":"gi"));return i&&(d=-1,d=s(!0)),i},u.next=function(){var e=s(!0);-1!==e&&(d=e)},u.prev=function(){var e=s(!1);-1!==e&&(d=e)},u.replace=function(t,n,r){var s,f,m,p,h,g,v=d;for(n=!1!==n,m=e.getBody(),f=tinymce.grep(tinymce.toArray(m.getElementsByTagName("span")),c),s=0;s<f.length;s++){var y=i(f[s]);if(p=h=parseInt(y,10),r||p===d){for(t.length?(f[s].firstChild.nodeValue=t,o(f[s])):l(f[s]);f[++s];){if((p=parseInt(i(f[s]),10))!==h){s--;break}l(f[s])}n&&v--}else h>d&&f[s].setAttribute("data-mce-index",h-1)}return e.undoManager.add(),d=v,n?(g=a(v+1).length>0,u.next()):(g=a(v-1).length>0,u.prev()),!r&&g},u.done=function(t){var n,r,a,s;for(r=tinymce.toArray(e.getBody().getElementsByTagName("span")),n=0;n<r.length;n++){var l=i(r[n]);null!==l&&l.length&&(l===d.toString()&&(a||(a=r[n].firstChild),s=r[n].firstChild),o(r[n]))}if(a&&s){var c=e.dom.createRng();return c.setStart(a,0),c.setEnd(s,s.data.length),!1!==t&&e.selection.setRng(c),c}}}tinymce.PluginManager.add("searchreplace",n)}()},881:function(e,t){!function(e,t){"use strict";function n(e,t){for(var n,i=[],a=0;a<e.length;++a){if(!(n=o[e[a]]||r(e[a])))throw"module definition dependecy not found: "+e[a];i.push(n)}t.apply(null,i)}function i(e,i,r){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(i===t)throw"invalid module definition, dependencies must be specified";if(r===t)throw"invalid module definition, definition function must be specified";n(i,function(){o[e]=r.apply(null,arguments)})}function r(t){for(var n=e,i=t.split(/[.\/]/),r=0;r<i.length;++r){if(!n[i[r]])return;n=n[i[r]]}return n}var o={};i("tinymce/tableplugin/Utils",["tinymce/Env"],function(e){function t(t){(!e.ie||e.ie>9)&&(t.hasChildNodes()||(t.innerHTML='<br data-mce-bogus="1" />'))}var n=function(e){return function(t,n){t&&(n=parseInt(n,10),1===n||0===n?t.removeAttribute(e,1):t.setAttribute(e,n,1))}},i=function(e){return function(t){return parseInt(t.getAttribute(e)||1,10)}};return{setColSpan:n("colSpan"),setRowSpan:n("rowspan"),getColSpan:i("colSpan"),getRowSpan:i("rowSpan"),setSpanVal:function(e,t,i){n(t)(e,i)},getSpanVal:function(e,t){return i(t)(e)},paddCell:t}}),i("tinymce/tableplugin/SplitCols",["tinymce/util/Tools","tinymce/tableplugin/Utils"],function(e,t){var n=function(e,t,n){return e[n]?e[n][t]:null},i=function(e,t,i){var r=n(e,t,i);return r?r.elm:null},r=function(e,t,r,o){var a,s,l=0,c=i(e,t,r);for(a=r;(o>0?a<e.length:a>=0)&&(s=n(e,t,a),c===s.elm);a+=o)l++;return l},o=function(e,t,n){for(var i,r=e[n],o=t;o<r.length;o++)if(i=r[o],i.real)return i.elm;return null},a=function(e,n){for(var i,o=[],a=e[n],s=0;s<a.length;s++)i=a[s],o.push({elm:i.elm,above:r(e,s,n,-1)-1,below:r(e,s,n,1)-1}),s+=t.getColSpan(i.elm)-1;return o},s=function(e,n){var i=e.elm.ownerDocument,r=i.createElement("td");return t.setColSpan(r,t.getColSpan(e.elm)),t.setRowSpan(r,n),t.paddCell(r),r},l=function(e,t,n,i){var r=o(e,n+1,i);r?r.parentNode.insertBefore(t,r):(r=o(e,0,i),r.parentNode.appendChild(t))},c=function(e,n,i,r){if(0!==n.above){t.setRowSpan(n.elm,n.above);var o=s(n,n.below+1);return l(e,o,i,r),o}return null},u=function(e,n,i,r){if(0!==n.below){t.setRowSpan(n.elm,n.above+1);var o=s(n,n.below);return l(e,o,i,r+1),o}return null};return{splitAt:function(t,n,r,o){var s=a(t,r),l=i(t,n,r).parentNode,d=[];return e.each(s,function(e,n){null!==(o?c(t,e,n,r):u(t,e,n,r))&&d.push(d)}),{cells:d,row:l}}}}),i("tinymce/tableplugin/TableGrid",["tinymce/util/Tools","tinymce/Env","tinymce/tableplugin/Utils","tinymce/tableplugin/SplitCols"],function(e,n,i,r){var o=e.each,a=i.getSpanVal,s=i.setSpanVal;return function(l,c,u){function d(){l.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected")}function f(e){return e===l.getBody()}function m(t,n){return t?(n=e.map(n.split(","),function(e){return e.toLowerCase()}),e.grep(t.childNodes,function(t){return-1!==e.inArray(n,t.nodeName.toLowerCase())})):[]}function p(){var e=0;Q=[],J=0,o(["thead","tbody","tfoot"],function(t){var n=m(c,t)[0],i=m(n,"tr");o(i,function(n,i){i+=e,o(m(n,"td,th"),function(e,n){var r,o,s,l;if(Q[i])for(;Q[i][n];)n++;for(s=a(e,"rowspan"),l=a(e,"colspan"),o=i;o<i+s;o++)for(Q[o]||(Q[o]=[]),r=n;r<n+l;r++)Q[o][r]={part:t,real:o==i&&r==n,elm:e,rowspan:s,colspan:l};J=Math.max(J,n+1)})}),e+=i.length})}function h(e){return l.fire("newrow",{node:e}),e}function g(e){return l.fire("newcell",{node:e}),e}function v(e,t){return e=e.cloneNode(t),e.removeAttribute("id"),e}function y(e,t){var n;if(n=Q[t])return n[e]}function b(e,t){return e[t]?e[t]:null}function C(e,t){for(var n=[],i=0;i<e.length;i++)n.push(y(t,i));return n}function T(e){return e&&(!!ne.getAttrib(e.elm,"data-mce-selected")||e==u)}function S(){var e=[];return o(c.rows,function(t){o(t.cells,function(n){if(ne.getAttrib(n,"data-mce-selected")||u&&n==u.elm)return e.push(t),!1})}),e}function x(){var e=0;return o(Q,function(t){if(o(t,function(t){T(t)&&e++}),e)return!1}),e}function w(){var e=ne.createRng();f(c)||(e.setStartAfter(c),e.setEndAfter(c),te.setRng(e),ne.remove(c))}function E(t){var r,a={};return!1!==l.settings.table_clone_elements&&(a=e.makeMap((l.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),e.walk(t,function(e){var i;if(3==e.nodeType)return o(ne.getParents(e.parentNode,null,t).reverse(),function(e){a[e.nodeName]&&(e=v(e,!1),r?i&&i.appendChild(e):r=i=e,i=e)}),i&&(i.innerHTML=n.ie&&n.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'),!1},"childNodes"),t=v(t,!1),g(t),s(t,"rowSpan",1),s(t,"colSpan",1),r?t.appendChild(r):i.paddCell(t),t}function A(){var e,t=ne.createRng();if(o(ne.select("tr",c),function(e){0===e.cells.length&&ne.remove(e)}),0===ne.select("tr",c).length)return t.setStartBefore(c),t.setEndBefore(c),te.setRng(t),void ne.remove(c);o(ne.select("thead,tbody,tfoot",c),function(e){0===e.rows.length&&ne.remove(e)}),p(),Z&&(e=Q[Math.min(Q.length-1,Z.y)])&&(te.select(e[Math.min(e.length-1,Z.x)].elm,!0),te.collapse(!0))}function N(e,t,n,i){var r,o,a,s,l;for(r=Q[t][e].elm.parentNode,a=1;a<=n;a++)if(r=ne.getNext(r,"tr")){for(o=e;o>=0;o--)if(l=Q[t+a][o].elm,l.parentNode==r){for(s=1;s<=i;s++)ne.insertAfter(E(l),l);break}if(-1==o)for(s=1;s<=i;s++)r.insertBefore(E(r.cells[0]),r.cells[0])}}function P(){o(Q,function(e,t){o(e,function(e,n){var i,r,o;if(T(e)&&(e=e.elm,i=a(e,"colspan"),r=a(e,"rowspan"),i>1||r>1)){for(s(e,"rowSpan",1),s(e,"colSpan",1),o=0;o<i-1;o++)ne.insertAfter(E(e),e);N(n,t,r-1,i)}})})}function k(e,t,n){for(var i=[],r=0;r<e.length;r++)(r<t||r>n)&&i.push(e[r]);return i}function M(t){return e.grep(t,function(e){return!1===e.real})}function _(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].elm;t[t.length-1]!==i&&t.push(i)}return t}function B(t,n,r,o,a){var s=0;if(a-r<1)return 0;for(var l=r+1;l<=a;l++){var c=k(b(t,l),n,o),u=M(c);c.length===u.length&&(e.each(_(u),function(e){i.setRowSpan(e,i.getRowSpan(e)-1)}),s++)}return s}function R(t,n,r,o,a){var s=0;if(o-n<1)return 0;for(var l=n+1;l<=o;l++){var c=k(C(t,l),r,a),u=M(c);c.length===u.length&&(e.each(_(u),function(e){i.setColSpan(e,i.getColSpan(e)-1)}),s++)}return s}function D(t,n,i){var r,a,l,c,u,d,f,m,h,g,v,b,C;if(t?(r=K(t),a=r.x,l=r.y,c=a+(n-1),u=l+(i-1)):(Z=ee=null,o(Q,function(e,t){o(e,function(e,n){T(e)&&(Z||(Z={x:n,y:t}),ee={x:n,y:t})})}),Z&&(a=Z.x,l=Z.y,c=ee.x,u=ee.y)),m=y(a,l),h=y(c,u),m&&h&&m.part==h.part){P(),p(),b=B(Q,a,l,c,u),C=R(Q,a,l,c,u),m=y(a,l).elm;var S=c-a-C+1,x=u-l-b+1;for(S===J&&x===Q.length&&(S=1,x=1),S===J&&x>1&&(x=1),s(m,"colSpan",S),s(m,"rowSpan",x),f=l;f<=u;f++)for(d=a;d<=c;d++)Q[f]&&Q[f][d]&&(t=Q[f][d].elm)!=m&&(g=e.grep(t.childNodes),o(g,function(e){m.appendChild(e)}),g.length&&(g=e.grep(m.childNodes),v=0,o(g,function(e){"BR"==e.nodeName&&v++<g.length-1&&m.removeChild(e)})),ne.remove(t));A()}}function I(e){var n,i,r,l,c,u,d,f,m,p;if(o(Q,function(i,r){if(o(i,function(t){if(T(t)&&(t=t.elm,c=t.parentNode,u=h(v(c,!1)),n=r,e))return!1}),e)return n===t}),n!==t){for(l=0,p=0;l<Q[0].length;l+=p)if(Q[n][l]&&(i=Q[n][l].elm,p=a(i,"colspan"),i!=r)){if(e){if(n>0&&Q[n-1][l]&&(f=Q[n-1][l].elm,(m=a(f,"rowSpan"))>1)){s(f,"rowSpan",m+1);continue}}else if((m=a(i,"rowspan"))>1){s(i,"rowSpan",m+1);continue}d=E(i),s(d,"colSpan",i.colSpan),u.appendChild(d),r=i}u.hasChildNodes()&&(e?c.parentNode.insertBefore(u,c):ne.insertAfter(u,c))}}function H(e,t){t=t||S().length||1;for(var n=0;n<t;n++)I(e)}function L(e){var n,i;o(Q,function(i){if(o(i,function(t,i){if(T(t)&&(n=i,e))return!1}),e)return n===t}),o(Q,function(t,r){var o,l,c;t[n]&&(o=t[n].elm)!=i&&(c=a(o,"colspan"),l=a(o,"rowspan"),1==c?e?(o.parentNode.insertBefore(E(o),o),N(n,r,l-1,c)):(ne.insertAfter(E(o),o),N(n,r,l-1,c)):s(o,"colSpan",o.colSpan+1),i=o)})}function O(e,t){t=t||x()||1;for(var n=0;n<t;n++)L(e)}function G(t){return e.grep(F(t),T)}function F(e){var t=[];return o(e,function(e){o(e,function(e){t.push(e)})}),t}function V(){var t=[];if(f(c)){if(1==Q[0].length)return;if(G(Q).length==F(Q).length)return}o(Q,function(n){o(n,function(n,i){T(n)&&-1===e.inArray(t,i)&&(o(Q,function(e){var t,n=e[i].elm;t=a(n,"colSpan"),t>1?s(n,"colSpan",t-1):ne.remove(n)}),t.push(i))})}),A()}function U(){function e(e){var t,n;o(e.cells,function(e){var n=a(e,"rowSpan");n>1&&(s(e,"rowSpan",n-1),t=K(e),N(t.x,t.y,1,1))}),t=K(e.cells[0]),o(Q[t.y],function(e){var t;(e=e.elm)!=n&&(t=a(e,"rowSpan"),t<=1?ne.remove(e):s(e,"rowSpan",t-1),n=e)})}var t;t=S(),f(c)&&t.length==c.rows.length||(o(t.reverse(),function(t){e(t)}),A())}function W(){var e=S();if(!f(c)||e.length!=c.rows.length)return ne.remove(e),A(),e}function z(){var e=S();return o(e,function(t,n){e[n]=v(t,!0)}),e}function X(t,n){var i,a,l;t&&(i=r.splitAt(Q,Z.x,Z.y,n),a=i.row,e.each(i.cells,g),l=e.map(t,function(e){return e.cloneNode(!0)}),n||l.reverse(),o(l,function(e){var t,i,r=e.cells.length;for(h(e),t=0;t<r;t++)i=e.cells[t],g(i),s(i,"colSpan",1),s(i,"rowSpan",1);for(t=r;t<J;t++)e.appendChild(g(E(e.cells[r-1])));for(t=J;t<r;t++)ne.remove(e.cells[t]);n?a.parentNode.insertBefore(e,a):ne.insertAfter(e,a)}),d())}function K(e){var t;return o(Q,function(n,i){return o(n,function(n,r){if(n.elm==e)return t={x:r,y:i},!1}),!t}),t}function j(e){Z=K(e)}function $(e){var t,n,i,r,o,a,s,l,c,u;if(ee=K(e),Z&&ee){for(t=Math.min(Z.x,ee.x),n=Math.min(Z.y,ee.y),i=Math.max(Z.x,ee.x),r=Math.max(Z.y,ee.y),o=i,a=r,u=n;u<=r;u++)for(c=t;c<=i;c++)e=Q[u][c],e.real&&(s=e.colspan-1,l=e.rowspan-1,s&&c+s>o&&(o=c+s),l&&u+l>a&&(a=u+l));for(d(),u=n;u<=a;u++)for(c=t;c<=o;c++)Q[u][c]&&ne.setAttrib(Q[u][c].elm,"data-mce-selected","1")}}function q(e,t){var n,i,r;n=K(e),i=n.y*J+n.x;do{if(i+=t,!(r=y(i%J,Math.floor(i/J))))break;if(r.elm!=e)return te.select(r.elm,!0),ne.isEmpty(r.elm)&&te.collapse(!0),!0}while(r.elm==e);return!1}function Y(t){if(Z){var n=r.splitAt(Q,Z.x,Z.y,t);e.each(n.cells,g)}}var Q,J,Z,ee,te=l.selection,ne=te.dom;c=c||ne.getParent(te.getStart(!0),"table"),p(),u=u||ne.getParent(te.getStart(!0),"th,td"),u&&(Z=K(u),ee=function(){var e,t;return e=t=0,o(Q,function(n,i){o(n,function(n,r){var o,a;T(n)&&(n=Q[i][r],r>e&&(e=r),i>t&&(t=i),n.real&&(o=n.colspan-1,a=n.rowspan-1,o&&r+o>e&&(e=r+o),a&&i+a>t&&(t=i+a)))})}),{x:e,y:t}}(),u=y(Z.x,Z.y)),e.extend(this,{deleteTable:w,split:P,merge:D,insertRow:I,insertRows:H,insertCol:L,insertCols:O,splitCols:Y,deleteCols:V,deleteRows:U,cutRows:W,copyRows:z,pasteRows:X,getPos:K,setStartCell:j,setEndCell:$,moveRelIdx:q,refresh:p})}}),i("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/util/Delay","tinymce/Env","tinymce/util/Tools","tinymce/tableplugin/Utils"],function(e,t,n,i,r){var o=i.each,a=r.getSpanVal;return function(s){function l(){function e(e,t){var n,i=t.ownerDocument,r=i.createRange();return r.setStartBefore(t),r.setEnd(e.endContainer,e.endOffset),n=i.createElement("body"),n.appendChild(r.cloneContents()),0===n.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}s.on("KeyDown",function(t){var n,i,r=s.dom;37!=t.keyCode&&38!=t.keyCode||(n=s.selection.getRng(),(i=r.getParent(n.startContainer,"table"))&&s.getBody().firstChild==i&&e(n,i)&&(n=r.createRng(),n.setStartBefore(i),n.setEndBefore(i),s.selection.setRng(n),t.preventDefault()))})}function c(){s.on("KeyDown SetContent VisualAid",function(){var e;for(e=s.getBody().lastChild;e;e=e.previousSibling)if(3==e.nodeType){if(e.nodeValue.length>0)break}else if(1==e.nodeType&&("BR"==e.tagName||!e.getAttribute("data-mce-bogus")))break;e&&"TABLE"==e.nodeName&&(s.settings.forced_root_block?s.dom.add(s.getBody(),s.settings.forced_root_block,s.settings.forced_root_block_attrs,n.ie&&n.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'):s.dom.add(s.getBody(),"br",{"data-mce-bogus":"1"}))}),s.on("PreProcess",function(e){var t=e.node.lastChild;t&&("BR"==t.nodeName||1==t.childNodes.length&&("BR"==t.firstChild.nodeName||" "==t.firstChild.nodeValue))&&t.previousSibling&&"TABLE"==t.previousSibling.nodeName&&s.dom.remove(t)})}!function(){function t(e){s.selection.select(e,!0),s.selection.collapse(!0)}function n(e){s.$(e).empty(),r.paddCell(e)}s.on("keydown",function(r){if((r.keyCode==e.DELETE||r.keyCode==e.BACKSPACE)&&!r.isDefaultPrevented()){var o,a,l,c;if(o=s.dom.getParent(s.selection.getStart(),"table")){if(a=s.dom.select("td,th",o),l=i.grep(a,function(e){return!!s.dom.getAttrib(e,"data-mce-selected")}),0===l.length)return c=s.dom.getParent(s.selection.getStart(),"td,th"),void(s.selection.isCollapsed()&&c&&s.dom.isEmpty(c)&&(r.preventDefault(),n(c),t(c)));r.preventDefault(),s.undoManager.transact(function(){a.length==l.length?s.execCommand("mceTableDelete"):(i.each(l,n),t(l[0]))})}}})}(),function(){var t=function(e){return e&&"CAPTION"==e.nodeName&&"TABLE"==e.parentNode.nodeName},i=function(e,t){var n=s.selection.getRng(),i=e.ownerDocument.createTextNode(" ");n.startOffset?e.insertBefore(i,e.firstChild):e.appendChild(i),t&&(s.selection.select(i,!0),s.selection.collapse(!0))},r=function(t){return(t.keyCode==e.DELETE||t.keyCode==e.BACKSPACE)&&!t.isDefaultPrevented()},o=function(e){return e.firstChild===e.lastChild&&e.firstChild},a=function(e){return e&&3===e.nodeType},l=function(e){var t=o(e);return a(t)&&1===t.data.length?t.data:null},c=function(e){var t=o(e),n=l(e);return t&&!a(t)||n&&!d(n)},u=function(e){return s.dom.isEmpty(e)||d(l(e))},d=function(e){return" "===e};s.on("keydown",function(e){if(r(e)){var o=s.dom.getParent(s.selection.getStart(),"caption");t(o)&&(n.ie&&(s.selection.isCollapsed()?c(o)&&i(o):(s.undoManager.transact(function(){s.execCommand("Delete"),u(o)&&i(o,!0)}),e.preventDefault())),u(o)&&e.preventDefault())}})}(),n.webkit&&(function(){function n(n){function i(e,t){var i=e?"previousSibling":"nextSibling",o=s.dom.getParent(t,"tr"),a=o[i];if(a)return h(s,t,a,e),n.preventDefault(),!0;var l=s.dom.getParent(o,"table"),d=o.parentNode,f=d.nodeName.toLowerCase();if("tbody"===f||f===(e?"tfoot":"thead")){var m=r(e,l,d,"tbody");if(null!==m)return c(e,m,t)}return u(e,o,i,l)}function r(e,t,n,i){var r=s.dom.select(">"+i,t),o=r.indexOf(n);return e&&0===o||!e&&o===r.length-1?l(e,t):-1===o?r["thead"===n.tagName.toLowerCase()?0:r.length-1]:r[o+(e?-1:1)]}function l(e,t){var n=e?"thead":"tfoot",i=s.dom.select(">"+n,t);return 0!==i.length?i[0]:null}function c(e,t,i){var r=d(t,e);return r&&h(s,i,r,e),n.preventDefault(),!0}function u(e,t,r,o){var a=o[r];if(a)return f(a),!0;var l=s.dom.getParent(o,"td,th");return l?i(e,l,n):(f(d(t,!e)),n.preventDefault(),!1)}function d(e,t){var n=e&&e[t?"lastChild":"firstChild"];return n&&"BR"===n.nodeName?s.dom.getParent(n,"td,th"):n}function f(e){s.selection.setCursorLocation(e,0)}function m(e){for(var t=0,n=e;n.previousSibling;)n=n.previousSibling,t+=a(n,"colspan");return t}function p(e,t){var n=0,i=0;return o(e.children,function(e,r){if(n+=a(e,"colspan"),i=r,n>t)return!1}),i}function h(e,t,n,i){var r=m(s.dom.getParent(t,"td,th")),o=p(n,r),a=n.childNodes[o];f(d(a,i)||a)}function g(e){var t=s.selection.getNode(),n=s.dom.getParent(t,"td,th"),i=s.dom.getParent(e,"td,th");return n&&n!==i&&v(n,i)}function v(e,t){return s.dom.getParent(e,"TABLE")===s.dom.getParent(t,"TABLE")}var y=n.keyCode;if(function(){return y==e.UP||y==e.DOWN}()&&function(e){var t=e.selection.getNode();return null!==e.dom.getParent(t,"tr")}(s)){var b=s.selection.getNode();t.setEditorTimeout(s,function(){g(b)&&i(!n.shiftKey&&y===e.UP,b,n)},0)}}s.on("KeyDown",function(e){n(e)})}(),function(){function e(e,t,n,i){var r,o,a,s=e.dom.getParent(t.startContainer,"TABLE");return s&&(r=s.parentNode),o=3==t.startContainer.nodeType&&0===t.startOffset&&0===t.endOffset&&i&&("TR"==n.nodeName||n==r),a=("TD"==n.nodeName||"TH"==n.nodeName)&&!i,o||a}function t(){var t=s.selection.getRng(),n=s.selection.getNode(),i=s.dom.getParent(t.startContainer,"TD,TH");if(e(s,t,n,i)){i||(i=n);for(var r=i.lastChild;r.lastChild;)r=r.lastChild;3==r.nodeType&&(t.setEnd(r,r.data.length),s.selection.setRng(t))}}s.on("KeyDown",function(){t()}),s.on("MouseDown",function(e){2!=e.button&&t()})}()),n.gecko&&(l(),c()),n.ie>9&&(l(),c())}}),i("tinymce/tableplugin/CellSelection",["tinymce/tableplugin/TableGrid","tinymce/dom/TreeWalker","tinymce/util/Tools"],function(e,t,n){return function(i,r){function o(e){i.getBody().style.webkitUserSelect="",(e||h)&&(i.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),h=!1)}function a(e,t){return!(!e||!t)&&e===p.getParent(t,"table")}function s(t){var n,o,s=t.target;if(!f&&!m&&s!==d&&(d=s,u&&c)){if(o=p.getParent(s,"td,th"),a(u,o)||(o=p.getParent(u,"td,th")),c===o&&!h)return;if(r(!0),a(u,o)){t.preventDefault(),l||(l=new e(i,u,c),i.getBody().style.webkitUserSelect="none"),l.setEndCell(o),h=!0,n=i.selection.getSel();try{n.removeAllRanges?n.removeAllRanges():n.empty()}catch(e){}}}}var l,c,u,d,f,m,p=i.dom,h=!0,g=function(){c=l=u=d=null,r(!1)};return i.on("SelectionChange",function(e){h&&e.stopImmediatePropagation()},!0),i.on("MouseDown",function(e){2==e.button||f||m||(o(),c=p.getParent(e.target,"td,th"),u=p.getParent(c,"table"))}),i.on("mouseover",s),i.on("remove",function(){p.unbind(i.getDoc(),"mouseover",s),o()}),i.on("MouseUp",function(){function e(e,i){var o=new t(e,e);do{if(3==e.nodeType&&0!==n.trim(e.nodeValue).length)return void(i?r.setStart(e,0):r.setEnd(e,e.nodeValue.length));if("BR"==e.nodeName)return void(i?r.setStartBefore(e):r.setEndBefore(e))}while(e=i?o.next():o.prev())}var r,o,a,s,u,d=i.selection;if(c){if(l&&(i.getBody().style.webkitUserSelect=""),o=p.select("td[data-mce-selected],th[data-mce-selected]"),o.length>0){r=p.createRng(),s=o[0],r.setStartBefore(s),r.setEndAfter(s),e(s,1),a=new t(s,p.getParent(o[0],"table"));do{if("TD"==s.nodeName||"TH"==s.nodeName){if(!p.getAttrib(s,"data-mce-selected"))break;u=s}}while(s=a.next());e(u),d.setRng(r)}i.nodeChanged(),g()}}),i.on("KeyUp Drop SetContent",function(e){o("setcontent"==e.type),g(),f=!1}),i.on("ObjectResizeStart ObjectResized",function(e){f="objectresized"!=e.type}),i.on("dragstart",function(){m=!0}),i.on("drop dragend",function(){m=!1}),{clear:o}}}),i("tinymce/tableplugin/Dialogs",["tinymce/util/Tools","tinymce/Env"],function(e,t){var n=e.each;return function(i){function r(){var e=i.settings.color_picker_callback;if(e)return function(){var t=this;e.call(i,function(e){t.value(e).fire("change")},t.value())}}function o(e){return{title:"Advanced",type:"form",defaults:{onchange:function(){d(e,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:r()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:r()}]}]}}function a(e){return e?e.replace(/px$/,""):""}function s(e){return/^[0-9]+$/.test(e)&&(e+="px"),e}function l(e){n("left center right".split(" "),function(t){i.formatter.remove("align"+t,{},e)})}function c(e){n("top middle bottom".split(" "),function(t){i.formatter.remove("valign"+t,{},e)})}function u(t,n,i){function r(t,i){return i=i||[],e.each(t,function(e){var t={text:e.text||e.title};e.menu?t.menu=r(e.menu):(t.value=e.value,n&&n(t)),i.push(t)}),i}return r(t,i||[])}function d(e,t,n){var i=t.toJSON(),r=e.parseStyle(i.style);n?(t.find("#borderColor").value(r["border-color"]||"")[0].fire("change"),t.find("#backgroundColor").value(r["background-color"]||"")[0].fire("change")):(r["border-color"]=i.borderColor,r["background-color"]=i.backgroundColor),t.find("#style").value(e.serializeStyle(e.parseStyle(e.serializeStyle(r))))}function f(e,t,n){var i=e.parseStyle(e.getAttrib(n,"style"));i["border-color"]&&(t.borderColor=i["border-color"]),i["background-color"]&&(t.backgroundColor=i["background-color"]),t.style=e.serializeStyle(i)}function m(e,t,i){var r=e.parseStyle(e.getAttrib(t,"style"));n(i,function(e){r[e.name]=e.value}),e.setAttrib(t,"style",e.serializeStyle(e.parseStyle(e.serializeStyle(r))))}var p=this;p.tableProps=function(){p.table(!0)},p.table=function(r){function c(){function n(e,t,i){if("TD"===e.tagName||"TH"===e.tagName)T.setStyle(e,t,i);else if(e.children)for(var r=0;r<e.children.length;r++)n(e.children[r],t,i)}var r;d(T,this),S=e.extend(S,this.toJSON()),!1===S.class&&delete S.class,i.undoManager.transact(function(){if(h||(h=i.plugins.table.insertTable(S.cols||1,S.rows||1)),i.dom.setAttribs(h,{style:S.style,class:S.class}),i.settings.table_style_by_css){if(C=[],C.push({name:"border",value:S.border}),C.push({name:"border-spacing",value:s(S.cellspacing)}),m(T,h,C),T.setAttribs(h,{"data-mce-border-color":S.borderColor,"data-mce-cell-padding":S.cellpadding,"data-mce-border":S.border}),h.children)for(var e=0;e<h.children.length;e++)n(h.children[e],"border",S.border),n(h.children[e],"padding",s(S.cellpadding))}else i.dom.setAttribs(h,{border:S.border,cellpadding:S.cellpadding,cellspacing:S.cellspacing});T.getAttrib(h,"width")&&!i.settings.table_style_by_css?T.setAttrib(h,"width",a(S.width)):T.setStyle(h,"width",s(S.width)),T.setStyle(h,"height",s(S.height)),r=T.select("caption",h)[0],r&&!S.caption&&T.remove(r),!r&&S.caption&&(r=T.create("caption"),r.innerHTML=t.ie?" ":'<br data-mce-bogus="1"/>',h.insertBefore(r,h.firstChild)),l(h),S.align&&i.formatter.apply("align"+S.align,{},h),i.focus(),i.addVisual()})}function p(e,t){var n,r=i.dom.select("td,th",e);return n=function(e,n){for(var i=0;i<n.length;i++){var r=T.getStyle(n[i],t);if(void 0===e&&(e=r),e!=r)return""}return e}(n,r)}var h,g,v,y,b,C,T=i.dom,S={};!0===r?(h=T.getParent(i.selection.getStart(),"table"))&&(S={width:a(T.getStyle(h,"width")||T.getAttrib(h,"width")),height:a(T.getStyle(h,"height")||T.getAttrib(h,"height")),cellspacing:a(T.getStyle(h,"border-spacing")||T.getAttrib(h,"cellspacing")),cellpadding:T.getAttrib(h,"data-mce-cell-padding")||T.getAttrib(h,"cellpadding")||p(h,"padding"),border:T.getAttrib(h,"data-mce-border")||T.getAttrib(h,"border")||p(h,"border"),borderColor:T.getAttrib(h,"data-mce-border-color"),caption:!!T.select("caption",h)[0],class:T.getAttrib(h,"class")},n("left center right".split(" "),function(e){i.formatter.matchNode(h,"align"+e)&&(S.align=e)})):(g={label:"Cols",name:"cols"},v={label:"Rows",name:"rows"}),i.settings.table_class_list&&(S.class&&(S.class=S.class.replace(/\s*mce\-item\-table\s*/g,"")),y={name:"class",type:"listbox",label:"Class",values:u(i.settings.table_class_list,function(e){e.value&&(e.textStyle=function(){return i.formatter.getCssText({block:"table",classes:[e.value]})})})}),b={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:!1!==i.settings.table_appearance_options?[g,v,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[g,v,{label:"Width",name:"width"},{label:"Height",name:"height"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},y]},!1!==i.settings.table_advtab?(f(T,S,h),i.windowManager.open({title:"Table properties",data:S,bodyType:"tabpanel",body:[{title:"General",type:"form",items:b},o(T)],onsubmit:c})):i.windowManager.open({title:"Table properties",data:S,body:b,onsubmit:c})},p.merge=function(e,t){i.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",value:"1",size:10},{label:"Rows",name:"rows",type:"textbox",value:"1",size:10}],onsubmit:function(){var n=this.toJSON();i.undoManager.transact(function(){e.merge(t,n.cols,n.rows)})}})},p.cell=function(){function t(e,t,n){(1===y.length||n)&&v.setAttrib(e,t,n)}function r(e,t,n){(1===y.length||n)&&v.setStyle(e,t,n)}function m(){d(v,this),h=e.extend(h,this.toJSON()),i.undoManager.transact(function(){n(y,function(e){t(e,"scope",h.scope),t(e,"style",h.style),t(e,"class",h.class),r(e,"width",s(h.width)),r(e,"height",s(h.height)),h.type&&e.nodeName.toLowerCase()!==h.type&&(e=v.rename(e,h.type)),1===y.length&&(l(e),c(e)),h.align&&i.formatter.apply("align"+h.align,{},e),h.valign&&i.formatter.apply("valign"+h.valign,{},e)}),i.focus()})}var p,h,g,v=i.dom,y=[];if(y=i.dom.select("td[data-mce-selected],th[data-mce-selected]"),p=i.dom.getParent(i.selection.getStart(),"td,th"),!y.length&&p&&y.push(p),p=p||y[0]){y.length>1?h={width:"",height:"",scope:"",class:"",align:"",style:"",type:p.nodeName.toLowerCase()}:(h={width:a(v.getStyle(p,"width")||v.getAttrib(p,"width")),height:a(v.getStyle(p,"height")||v.getAttrib(p,"height")),scope:v.getAttrib(p,"scope"),class:v.getAttrib(p,"class")},h.type=p.nodeName.toLowerCase(),n("left center right".split(" "),function(e){i.formatter.matchNode(p,"align"+e)&&(h.align=e)}),n("top middle bottom".split(" "),function(e){i.formatter.matchNode(p,"valign"+e)&&(h.valign=e)}),f(v,h,p)),i.settings.table_cell_class_list&&(g={name:"class",type:"listbox",label:"Class",values:u(i.settings.table_cell_class_list,function(e){e.value&&(e.textStyle=function(){return i.formatter.getCssText({block:"td",classes:[e.value]})})})});var b={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},g]};!1!==i.settings.table_cell_advtab?i.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:h,body:[{title:"General",type:"form",items:b},o(v)],onsubmit:m}):i.windowManager.open({title:"Cell properties",data:h,body:b,onsubmit:m})}},p.row=function(){function t(e,t,n){(1===C.length||n)&&b.setAttrib(e,t,n)}function r(e,t,n){(1===C.length||n)&&b.setStyle(e,t,n)}function c(){var o,a,c;d(b,this),v=e.extend(v,this.toJSON()),i.undoManager.transact(function(){var e=v.type;n(C,function(n){t(n,"scope",v.scope),t(n,"style",v.style),t(n,"class",v.class),r(n,"height",s(v.height)),e!==n.parentNode.nodeName.toLowerCase()&&(o=b.getParent(n,"table"),a=n.parentNode,c=b.select(e,o)[0],c||(c=b.create(e),o.firstChild?o.insertBefore(c,o.firstChild):o.appendChild(c)),c.appendChild(n),a.hasChildNodes()||b.remove(a)),1===C.length&&l(n),v.align&&i.formatter.apply("align"+v.align,{},n)}),i.focus()})}var m,p,h,g,v,y,b=i.dom,C=[];m=i.dom.getParent(i.selection.getStart(),"table"),p=i.dom.getParent(i.selection.getStart(),"td,th"),n(m.rows,function(e){n(e.cells,function(t){if(b.getAttrib(t,"data-mce-selected")||t==p)return C.push(e),!1})}),(h=C[0])&&(C.length>1?v={height:"",scope:"",class:"",align:"",type:h.parentNode.nodeName.toLowerCase()}:(v={height:a(b.getStyle(h,"height")||b.getAttrib(h,"height")),scope:b.getAttrib(h,"scope"),class:b.getAttrib(h,"class")},v.type=h.parentNode.nodeName.toLowerCase(),n("left center right".split(" "),function(e){i.formatter.matchNode(h,"align"+e)&&(v.align=e)}),f(b,v,h)),i.settings.table_row_class_list&&(g={name:"class",type:"listbox",label:"Class",values:u(i.settings.table_row_class_list,function(e){e.value&&(e.textStyle=function(){return i.formatter.getCssText({block:"tr",classes:[e.value]})})})}),y={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"Header",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},g]},!1!==i.settings.table_row_advtab?i.windowManager.open({title:"Row properties",data:v,bodyType:"tabpanel",body:[{title:"General",type:"form",items:y},o(b)],onsubmit:c}):i.windowManager.open({title:"Row properties",data:v,body:y,onsubmit:c}))}}}),i("tinymce/tableplugin/ResizeBars",["tinymce/util/Tools","tinymce/util/VK"],function(e,n){var i;return function(r){function o(e,t){return{index:e,y:r.dom.getPos(t).y}}function a(e,t){return{index:e,y:r.dom.getPos(t).y+t.offsetHeight}}function s(e,t){return{index:e,x:r.dom.getPos(t).x}}function l(e,t){return{index:e,x:r.dom.getPos(t).x+t.offsetWidth}}function c(){return"rtl"===r.getBody().dir}function u(){return r.inline}function d(){return u?r.getBody().ownerDocument.body:r.getBody()}function f(e,t){return c()?l(e,t):s(e,t)}function m(e,t){return c()?s(e,t):l(e,t)}function p(e,t){return h(e,"width")/h(t,"width")*100}function h(e,t){var n=r.dom.getStyle(e,t,!0);return parseInt(n,10)}function g(e){return h(e,"width")/h(e.parentElement,"width")*100}function v(e,t){return t/h(e,"width")*100}function y(e,t){return t/h(e.parentElement,"width")*100}function b(e,t,n){for(var i=[],r=1;r<n.length;r++){var o=n[r].element;i.push(e(r-1,o))}var a=n[n.length-1];return i.push(t(n.length-1,a.element)),i}function C(){var t=r.dom.select("."+fe,d());e.each(t,function(e){r.dom.remove(e)})}function T(e){C(),_(e)}function S(e,t,n,i,r,o,a,s){var l={"data-mce-bogus":"all",class:fe+" "+e,unselectable:"on","data-mce-resize":!1,style:"cursor: "+t+"; margin: 0; padding: 0; position: absolute; left: "+n+"px; top: "+i+"px; height: "+r+"px; width: "+o+"px; "};return l[a]=s,l}function x(t,n,i){e.each(t,function(e){var t=i.x,o=e.y-Te/2,a=Te,s=n;r.dom.add(d(),"div",S(me,pe,t,o,a,s,he,e.index))})}function w(t,n,i){e.each(t,function(e){var t=e.x-Te/2,o=i.y,a=n,s=Te;r.dom.add(d(),"div",S(ve,ye,t,o,a,s,be,e.index))})}function E(t){return e.map(t.rows,function(t){return{element:t,cells:e.map(t.cells,function(e){return{element:e,rowspan:e.hasAttribute("rowspan")?parseInt(e.getAttribute("rowspan"),10):1,colspan:e.hasAttribute("colspan")?parseInt(e.getAttribute("colspan"),10):1}})}})}function A(n){function i(e,t){return e+","+t}function r(e,t){return s[i(e,t)]}function o(){var t=[];return e.each(l,function(e){t=t.concat(e.cells)}),t}function a(){return l}var s={},l=[],c=0,u=0;return e.each(n,function(n,r){var o=[];e.each(n.cells,function(e){for(var n=0;s[i(r,n)]!==t;)n++;for(var a={element:e.element,colspan:e.colspan,rowspan:e.rowspan,rowIndex:r,colIndex:n},l=0;l<e.colspan;l++)for(var d=0;d<e.rowspan;d++){var f=r+d,m=n+l;s[i(f,m)]=a,c=Math.max(c,f+1),u=Math.max(u,m+1)}o.push(a)}),l.push({element:n.element,cells:o})}),{grid:{maxRows:c,maxCols:u},getAt:r,getAllCells:o,getAllRows:a}}function N(e,t){for(var n=[],i=e;i<t;i++)n.push(i);return n}function P(e,t,n){for(var i,r=e(),o=0;o<r.length;o++)t(r[o])&&(i=r[o]);return i||n()}function k(t){var n=N(0,t.grid.maxCols),i=N(0,t.grid.maxRows);return e.map(n,function(e){function n(){for(var n=[],r=0;r<i.length;r++){var o=t.getAt(r,e);o&&o.colIndex===e&&n.push(o)}return n}function r(e){return 1===e.colspan}function o(){for(var n,r=0;r<i.length;r++)if(n=t.getAt(r,e))return n;return null}return P(n,r,o)})}function M(t){var n=N(0,t.grid.maxCols),i=N(0,t.grid.maxRows);return e.map(i,function(e){function i(){for(var i=[],r=0;r<n.length;r++){var o=t.getAt(e,r);o&&o.rowIndex===e&&i.push(o)}return i}function r(e){return 1===e.rowspan}function o(){return t.getAt(e,0)}return P(i,r,o)})}function _(e){var t=E(e),n=A(t),i=M(n),s=k(n),l=r.dom.getPos(e),c=i.length>0?b(o,a,i):[],u=s.length>0?b(f,m,s):[];x(c,e.offsetWidth,l),w(u,e.offsetHeight,l)}function B(e,t,n,i){if(t<0||t>=e.length-1)return"";var r=e[t];if(r)r={value:r,delta:0};else for(var o=e.slice(0,t).reverse(),a=0;a<o.length;a++)o[a]&&(r={value:o[a],delta:a+1});var s=e[t+1];if(s)s={value:s,delta:1};else for(var l=e.slice(t+1),c=0;c<l.length;c++)l[c]&&(s={value:l[c],delta:c+1});var u=s.delta-r.delta,d=Math.abs(s.value-r.value)/u;return n?d/h(i,"width")*100:d}function R(e,t){var n=r.dom.getStyle(e,t);return n||(n=r.dom.getAttrib(e,t)),n||(n=r.dom.getStyle(e,t,!0)),n}function D(e,t,n){var i=R(e,"width"),r=parseInt(i,10),o=t?p(e,n):h(e,"width");return(t&&!W(i)||!t&&!z(i))&&(r=0),!isNaN(r)&&r>0?r:o}function I(t,n,i){for(var r=k(t),o=e.map(r,function(e){return f(e.colIndex,e.element).x}),a=[],s=0;s<r.length;s++){var l=r[s].element.hasAttribute("colspan")?parseInt(r[s].element.getAttribute("colspan"),10):1,c=l>1?B(o,s):D(r[s].element,n,i);c=c||Se,a.push(c)}return a}function H(e){var t=R(e,"height"),n=parseInt(t,10);return W(t)&&(n=0),!isNaN(n)&&n>0?n:h(e,"height")}function L(t){for(var n=M(t),i=e.map(n,function(e){return o(e.rowIndex,e.element).y}),r=[],a=0;a<n.length;a++){var s=n[a].element.hasAttribute("rowspan")?parseInt(n[a].element.getAttribute("rowspan"),10):1,l=s>1?B(i,a):H(n[a].element);l=l||xe,r.push(l)}return r}function O(t,n,i,r,o){function a(t){return e.map(t,function(){return 0})}function s(e,t){var n,o=a(l.slice(0,e)),s=a(l.slice(t+1));if(i>=0){var c=Math.max(r,l[t]-i);n=o.concat([i,c-l[t]]).concat(s)}else{var u=Math.max(r,l[e]+i),d=l[e]-u;n=o.concat([u-l[e],d]).concat(s)}return n}var l=t.slice(0);return 0===t.length?[]:1===t.length?function(){var e;if(o)e=[100-l[0]];else{e=[Math.max(r,l[0]+i)-l[0]]}return e}():0===n?s(0,1):n>0&&n<t.length-1?s(n,n+1):n===t.length-1?function(e,t){var n,o=a(l.slice(0,t));if(i>=0)n=o.concat([i]);else{var s=Math.max(r,l[t]+i);n=o.concat([s-l[t]])}return n}(n-1,n):[]}function G(e,t,n){for(var i=0,r=e;r<t;r++)i+=n[r];return i}function F(t,n){var i=t.getAllCells();return e.map(i,function(e){var t=G(e.colIndex,e.colIndex+e.colspan,n);return{element:e.element,width:t,colspan:e.colspan}})}function V(t,n){var i=t.getAllCells();return e.map(i,function(e){var t=G(e.rowIndex,e.rowIndex+e.rowspan,n);return{element:e.element,height:t,rowspan:e.rowspan}})}function U(t,n){var i=t.getAllRows();return e.map(i,function(e,t){return{element:e.element,height:n[t]}})}function W(e){return Ee.test(e)}function z(e){return Ae.test(e)}function X(t,n,i){function o(t,n){e.each(t,function(e){r.dom.setStyle(e.element,"width",e.width+n),r.dom.setAttrib(e.element,"width",null)})}function a(e,n,o){i!=l.grid.maxCols-1&&o||(r.dom.setStyle(t,"width",e+n),r.dom.setAttrib(t,"width",null))}for(var s=E(t),l=A(s),c=W(t.width)||W(t.style.width),u=I(l,c,t),d=c?v(t,n):n,f=O(u,i,d,Se,c,t),m=[],p=0;p<f.length;p++)m.push(f[p]+u[p]);var b=F(l,m),C=c?"%":"px",T=c?function(){return i<l.grid.maxCols-1?g(t):g(t)+y(t,n)}():function(){return i<l.grid.maxCols-1?h(t,"width"):h(t,"width")+n}();r.undoManager.transact(function(){o(b,C),a(T,C,c)})}function K(t,n,i){for(var o=E(t),a=A(o),s=L(a),l=[],c=0,u=0;u<s.length;u++)l.push(u===i?n+s[u]:s[u]),c+=c[u];var d=V(a,l),f=U(a,l);r.undoManager.transact(function(){e.each(f,function(e){r.dom.setStyle(e.element,"height",e.height+"px"),r.dom.setAttrib(e.element,"height",null)}),e.each(d,function(e){r.dom.setStyle(e.element,"height",e.height+"px"),r.dom.setAttrib(e.element,"height",null)}),r.dom.setStyle(t,"height",c+"px"),r.dom.setAttrib(t,"height",null)})}function j(){ae=setTimeout(function(){Q()},200)}function $(){clearTimeout(ae)}function q(){var e=document.createElement("div");return e.setAttribute("style","margin: 0; padding: 0; position: fixed; left: 0px; top: 0px; height: 100%; width: 100%;"),e.setAttribute("data-mce-bogus","all"),e}function Y(e,t){r.dom.bind(e,"mouseup",function(){Q()}),r.dom.bind(e,"mousemove",function(e){$(),se&&t(e)}),r.dom.bind(e,"mouseout",function(){j()})}function Q(){if(r.dom.remove(le),se){r.dom.removeClass(ce,we),se=!1;var e,t;if(Z(ce)){var n=parseInt(r.dom.getAttrib(ce,Ce),10),o=r.dom.getPos(ce).x;e=parseInt(r.dom.getAttrib(ce,be),10),t=c()?n-o:o-n,Math.abs(t)>=1&&X(i,t,e)}else if(ee(ce)){var a=parseInt(r.dom.getAttrib(ce,ge),10),s=r.dom.getPos(ce).y;e=parseInt(r.dom.getAttrib(ce,he),10),t=s-a,Math.abs(t)>=1&&K(i,t,e)}T(i),r.nodeChanged()}}function J(e,t){le=le||q(),se=!0,r.dom.addClass(e,we),ce=e,Y(le,t),r.dom.add(d(),le)}function Z(e){return r.dom.hasClass(e,ve)}function ee(e){return r.dom.hasClass(e,me)}function te(e){ue=ue!==t?ue:e.clientX;var n=e.clientX-ue;ue=e.clientX;var i=r.dom.getPos(ce).x;r.dom.setStyle(ce,"left",i+n+"px")}function ne(e){de=de!==t?de:e.clientY;var n=e.clientY-de;de=e.clientY;var i=r.dom.getPos(ce).y;r.dom.setStyle(ce,"top",i+n+"px")}function ie(e){ue=t,J(e,te)}function re(e){de=t,J(e,ne)}function oe(e){var t=e.target,n=r.getBody();if(r.$.contains(n,i)||i===n)if(Z(t)){e.preventDefault();var o=r.dom.getPos(t).x;r.dom.setAttrib(t,Ce,o),ie(t)}else if(ee(t)){e.preventDefault();var a=r.dom.getPos(t).y;r.dom.setAttrib(t,ge,a),re(t)}else C()}var ae,se,le,ce,ue,de,fe="mce-resize-bar",me="mce-resize-bar-row",pe="row-resize",he="data-row",ge="data-initial-top",ve="mce-resize-bar-col",ye="col-resize",be="data-col",Ce="data-initial-left",Te=4,Se=10,xe=10,we="mce-resize-bar-dragging",Ee=new RegExp(/(\d+(\.\d+)?%)/),Ae=new RegExp(/px|em/);return r.on("init",function(){r.dom.bind(d(),"mousedown",oe)}),r.on("ObjectResized",function(t){var n=t.target;if("TABLE"===n.nodeName){var i=[];e.each(n.rows,function(t){e.each(t.cells,function(e){var t=r.dom.getStyle(e,"width",!0);i.push({cell:e,width:t})})}),e.each(i,function(e){r.dom.setStyle(e.cell,"width",e.width),r.dom.setAttrib(e.cell,"width",null)})}}),r.on("mouseover",function(e){if(!se){var t=r.dom.getParent(e.target,"table");("TABLE"===e.target.nodeName||t)&&(i=t,T(t))}}),r.on("keydown",function(e){switch(e.keyCode){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:C()}}),r.on("remove",function(){C(),r.dom.unbind(d(),"mousedown",oe)}),{adjustWidth:X,adjustHeight:K,clearBars:C,drawBars:_,determineDeltas:O,getTableGrid:A,getTableDetails:E,getWidths:I,getPixelHeights:L,isPercentageBasedSize:W,isPixelBasedSize:z,recalculateWidths:F,recalculateCellHeights:V,recalculateRowHeights:U}}}),i("tinymce/tableplugin/Plugin",["tinymce/tableplugin/TableGrid","tinymce/tableplugin/Quirks","tinymce/tableplugin/CellSelection","tinymce/tableplugin/Dialogs","tinymce/tableplugin/ResizeBars","tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/Env","tinymce/PluginManager"],function(e,t,n,i,r,o,a,s,l){function c(o){function a(e){return function(){o.execCommand(e)}}function l(e,t){var n,i,r,a;for(r='<table id="__mce"><tbody>',n=0;n<t;n++){for(r+="<tr>",i=0;i<e;i++)r+="<td>"+(s.ie&&s.ie<10?"&nbsp;":"<br>")+"</td>";r+="</tr>"}return r+="</tbody></table>",o.undoManager.transact(function(){o.insertContent(r),a=o.dom.get("__mce"),o.dom.setAttrib(a,"id",null),o.$("tr",a).each(function(e,t){o.fire("newrow",{node:t}),o.$("th,td",t).each(function(e,t){o.fire("newcell",{node:t})})}),o.dom.setAttribs(a,o.settings.table_default_attributes||{}),o.dom.setStyles(a,o.settings.table_default_styles||{})}),a}function c(e,t,n){function i(){var i,r,a,s={},l=0;r=o.dom.select("td[data-mce-selected],th[data-mce-selected]"),i=r[0],i||(i=o.selection.getStart()),n&&r.length>0?(u(r,function(e){return s[e.parentNode.parentNode.nodeName]=1}),u(s,function(e){l+=e}),a=1!==l):a=!o.dom.getParent(i,t),e.disabled(a),o.selection.selectorChanged(t,function(t){e.disabled(!t)})}o.initialized?i():o.on("init",i)}function d(){c(this,"table")}function f(){c(this,"td,th")}function m(){c(this,"td,th",!0)}function p(e,t,n){var i,r,a,s,l,c=n.getEl().getElementsByTagName("table")[0],u=n.isRtl()||"tl-tr"==n.parent().rel;for(c.nextSibling.innerHTML=e+1+" x "+(t+1),u&&(e=9-e),r=0;r<10;r++)for(i=0;i<10;i++)s=c.rows[r].childNodes[i].firstChild,l=(u?i>=e:i<=e)&&r<=t,o.dom.toggleClass(s,"mce-active",l),l&&(a=s);return a.parentNode}function h(e){return o.dom.is(e,"table")&&o.getBody().contains(e)}function g(){return y}function v(e){y=e}var y,b,C=this,T=new i(o);!o.settings.object_resizing||!1===o.settings.table_resize_bars||!0!==o.settings.object_resizing&&"table"!==o.settings.object_resizing||(b=r(o)),!1===o.settings.table_grid?o.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",onclick:T.table}):o.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(e){e.aria&&(this.parent().hideAll(),e.stopImmediatePropagation(),T.table())},onshow:function(){p(0,0,this.menu.items()[0])},onhide:function(){var e=this.menu.items()[0].getEl().getElementsByTagName("a");o.dom.removeClass(e,"mce-active"),o.dom.addClass(e[0],"mce-active")},menu:[{type:"container",html:function(){var e="";e='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var t=0;t<10;t++){e+="<tr>";for(var n=0;n<10;n++)e+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*t+n)+'" href="#" data-mce-x="'+n+'" data-mce-y="'+t+'"></a></td>';e+="</tr>"}return e+="</table>",e+='<div class="mce-text-center" role="presentation">1 x 1</div>'}(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(e){var t,n,i=e.target;"A"==i.tagName.toUpperCase()&&(t=parseInt(i.getAttribute("data-mce-x"),10),n=parseInt(i.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(t=9-t),t===this.lastX&&n===this.lastY||(p(t,n,e.control),this.lastX=t,this.lastY=n))},onclick:function(e){var t=this;"A"==e.target.tagName.toUpperCase()&&(e.preventDefault(),e.stopPropagation(),t.parent().cancel(),o.undoManager.transact(function(){l(t.lastX+1,t.lastY+1)}),o.addVisual())}}]}),o.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:d,onclick:T.tableProps}),o.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:d,cmd:"mceTableDelete"}),o.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:a("mceTableCellProps"),onPostRender:f},{text:"Merge cells",onclick:a("mceTableMergeCells"),onPostRender:m},{text:"Split cell",onclick:a("mceTableSplitCells"),onPostRender:f}]}),o.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:a("mceTableInsertRowBefore"),onPostRender:f},{text:"Insert row after",onclick:a("mceTableInsertRowAfter"),onPostRender:f},{text:"Delete row",onclick:a("mceTableDeleteRow"),onPostRender:f},{text:"Row properties",onclick:a("mceTableRowProps"),onPostRender:f},{text:"-"},{text:"Cut row",onclick:a("mceTableCutRow"),onPostRender:f},{text:"Copy row",onclick:a("mceTableCopyRow"),onPostRender:f},{text:"Paste row before",onclick:a("mceTablePasteRowBefore"),onPostRender:f},{text:"Paste row after",onclick:a("mceTablePasteRowAfter"),onPostRender:f}]}),o.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:a("mceTableInsertColBefore"),onPostRender:f},{text:"Insert column after",onclick:a("mceTableInsertColAfter"),onPostRender:f},{text:"Delete column",onclick:a("mceTableDeleteCol"),onPostRender:f}]});var S=[];u("inserttable tableprops deletetable | cell row column".split(" "),function(e){"|"==e?S.push({text:"-"}):S.push(o.menuItems[e])}),o.addButton("table",{type:"menubutton",title:"Table",menu:S}),s.isIE||o.on("click",function(e){e=e.target,"TABLE"===e.nodeName&&(o.selection.select(e),o.nodeChanged())}),C.quirks=new t(o),o.on("Init",function(){C.cellSelection=new n(o,function(e){e&&b&&b.clearBars()}),C.resizeBars=b}),o.on("PreInit",function(){o.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})}),u({mceTableSplitCells:function(e){e.split()},mceTableMergeCells:function(e){var t;t=o.dom.getParent(o.selection.getStart(),"th,td"),o.dom.select("td[data-mce-selected],th[data-mce-selected]").length?e.merge():T.merge(e,t)},mceTableInsertRowBefore:function(e){e.insertRows(!0)},mceTableInsertRowAfter:function(e){e.insertRows()},mceTableInsertColBefore:function(e){e.insertCols(!0)},mceTableInsertColAfter:function(e){e.insertCols()},mceTableDeleteCol:function(e){e.deleteCols()},mceTableDeleteRow:function(e){e.deleteRows()},mceTableCutRow:function(e){y=e.cutRows()},mceTableCopyRow:function(e){y=e.copyRows()},mceTablePasteRowBefore:function(e){e.pasteRows(y,!0)},mceTablePasteRowAfter:function(e){e.pasteRows(y)},mceSplitColsBefore:function(e){e.splitCols(!0)},mceSplitColsAfter:function(e){e.splitCols(!1)},mceTableDelete:function(e){b&&b.clearBars(),e.deleteTable()}},function(t,n){o.addCommand(n,function(){var n=new e(o);n&&(t(n),o.execCommand("mceRepaint"),C.cellSelection.clear())})}),u({mceInsertTable:T.table,mceTableProps:function(){T.table(!0)},mceTableRowProps:T.row,mceTableCellProps:T.cell},function(e,t){o.addCommand(t,function(t,n){e(n)})}),function(){o.addButton("tableprops",{title:"Table properties",onclick:T.tableProps,icon:"table"}),o.addButton("tabledelete",{title:"Delete table",onclick:a("mceTableDelete")}),o.addButton("tablecellprops",{title:"Cell properties",onclick:a("mceTableCellProps")}),o.addButton("tablemergecells",{title:"Merge cells",onclick:a("mceTableMergeCells")}),o.addButton("tablesplitcells",{title:"Split cell",onclick:a("mceTableSplitCells")}),o.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:a("mceTableInsertRowBefore")}),o.addButton("tableinsertrowafter",{title:"Insert row after",onclick:a("mceTableInsertRowAfter")}),o.addButton("tabledeleterow",{title:"Delete row",onclick:a("mceTableDeleteRow")}),o.addButton("tablerowprops",{title:"Row properties",onclick:a("mceTableRowProps")}),o.addButton("tablecutrow",{title:"Cut row",onclick:a("mceTableCutRow")}),o.addButton("tablecopyrow",{title:"Copy row",onclick:a("mceTableCopyRow")}),o.addButton("tablepasterowbefore",{title:"Paste row before",onclick:a("mceTablePasteRowBefore")}),o.addButton("tablepasterowafter",{title:"Paste row after",onclick:a("mceTablePasteRowAfter")}),o.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:a("mceTableInsertColBefore")}),o.addButton("tableinsertcolafter",{title:"Insert column after",onclick:a("mceTableInsertColAfter")}),o.addButton("tabledeletecol",{title:"Delete column",onclick:a("mceTableDeleteCol")})}(),function(){var e=o.settings.table_toolbar;""!==e&&!1!==e&&(e||(e="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),o.addContextToolbar(h,e))}(),!1!==o.settings.table_tab_navigation&&o.on("keydown",function(t){var n,i,r;9==t.keyCode&&(n=o.dom.getParent(o.selection.getStart(),"th,td"))&&(t.preventDefault(),i=new e(o),r=t.shiftKey?-1:1,o.undoManager.transact(function(){!i.moveRelIdx(n,r)&&r>0&&(i.insertRow(),i.refresh(),i.moveRelIdx(n,r))}))}),C.insertTable=l,C.setClipboardRows=v,C.getClipboardRows=g}var u=o.each;l.add("table",c)})}(window)},882:function(e,t){tinymce.PluginManager.add("textcolor",function(e){function t(t){var n;return e.dom.getParents(e.selection.getStart(),function(e){var i;(i=e.style["forecolor"==t?"color":"background-color"])&&(n=i)}),n}function n(t){var n,i,r=[];for(i=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],i=e.settings.textcolor_map||i,i=e.settings[t+"_map"]||i,n=0;n<i.length;n+=2)r.push({text:i[n+1],color:"#"+i[n]});return r}function i(){function t(e,t){var n="transparent"==e;return'<td class="mce-grid-cell'+(n?" mce-colorbtn-trans":"")+'"><div id="'+p+"-"+h+++'" data-mce-color="'+(e||"")+'" role="option" tabIndex="-1" style="'+(e?"background-color: "+e:"")+'" title="'+tinymce.translate(t)+'">'+(n?"&#215;":"")+"</div></td>"}var i,r,o,a,s,u,d,f,m=this,p=m._id,h=0;for(f=m.settings.origin,i=n(f),i.push({text:tinymce.translate("No color"),color:"transparent"}),o='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',a=i.length-1,u=0;u<c[f];u++){for(o+="<tr>",s=0;s<l[f];s++)d=u*l[f]+s,d>a?o+="<td></td>":(r=i[d],o+=t(r.color,r.text));o+="</tr>"}if(e.settings.color_picker_callback){for(o+='<tr><td colspan="'+l[f]+'" class="mce-custom-color-btn"><div id="'+p+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+p+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+tinymce.translate("Custom...")+"</button></div></td></tr>",o+="<tr>",s=0;s<l[f];s++)o+=t("","Custom color");o+="</tr>"}return o+="</tbody></table>"}function r(t,n){e.undoManager.transact(function(){e.focus(),e.formatter.apply(t,{value:n}),e.nodeChanged()})}function o(t){e.undoManager.transact(function(){e.focus(),e.formatter.remove(t,{value:null},null,!0),e.nodeChanged()})}function a(n){function i(e){u.hidePanel(),u.color(e),r(u.settings.format,e)}function a(e,t){e.style.background=t,e.setAttribute("data-mce-color",t)}var s,c,u=this.parent();c=u.settings.origin,tinymce.DOM.getParent(n.target,".mce-custom-color-btn")&&(u.hidePanel(),e.settings.color_picker_callback.call(e,function(e){var t,n,r,o=u.panel.getEl().getElementsByTagName("table")[0];for(t=tinymce.map(o.rows[o.rows.length-1].childNodes,function(e){return e.firstChild}),r=0;r<t.length&&(n=t[r],n.getAttribute("data-mce-color"));r++);if(r==l[c])for(r=0;r<l[c]-1;r++)a(t[r],t[r+1].getAttribute("data-mce-color"));a(n,e),i(e)},t(u.settings.format))),s=n.target.getAttribute("data-mce-color"),s?(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),n.target.setAttribute("aria-selected",!0),this.lastId=n.target.id,"transparent"==s?function(){u.hidePanel(),u.resetColor(),o(u.settings.format)}():i(s)):null!==s&&u.hidePanel()}function s(){var e=this;e._color?r(e.settings.format,e._color):o(e.settings.format)}var l,c;c={forecolor:e.settings.forecolor_rows||e.settings.textcolor_rows||5,backcolor:e.settings.backcolor_rows||e.settings.textcolor_rows||5},l={forecolor:e.settings.forecolor_cols||e.settings.textcolor_cols||8,backcolor:e.settings.backcolor_cols||e.settings.textcolor_cols||8},e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{origin:"forecolor",role:"application",ariaRemember:!0,html:i,onclick:a},onclick:s}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{origin:"backcolor",role:"application",ariaRemember:!0,html:i,onclick:a},onclick:s})})},883:function(e,t){tinymce.PluginManager.add("visualblocks",function(e,t){function n(){var t=this;t.active(o),e.on("VisualBlocks",function(){t.active(e.dom.hasClass(e.getBody(),"mce-visualblocks"))})}var i,r,o;window.NodeList&&(e.addCommand("mceVisualBlocks",function(){var n,a=e.dom;i||(i=a.uniqueId(),n=a.create("link",{id:i,rel:"stylesheet",href:t+"/css/visualblocks.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(n)),e.on("PreviewFormats AfterPreviewFormats",function(t){o&&a.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"==t.type)}),a.toggleClass(e.getBody(),"mce-visualblocks"),o=e.dom.hasClass(e.getBody(),"mce-visualblocks"),r&&r.active(a.hasClass(e.getBody(),"mce-visualblocks")),e.fire("VisualBlocks")}),e.addButton("visualblocks",{title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n,selectable:!0,context:"view",prependToContext:!0}),e.on("init",function(){e.settings.visualblocks_default_state&&e.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")}))})},884:function(e,t){!function(){var e={},t=function(t){for(var n=e[t],r=n.deps,o=n.defn,a=r.length,s=new Array(a),l=0;l<a;++l)s[l]=i(r[l]);var c=o.apply(null,s);if(void 0===c)throw"module ["+t+"] returned undefined";n.instance=c},n=function(t,n,i){if("string"!=typeof t)throw"module id must be a string";if(void 0===n)throw"no dependencies for "+t;if(void 0===i)throw"no definition function for "+t;e[t]={deps:n,defn:i,instance:void 0}},i=function(n){var i=e[n];if(void 0===i)throw"module ["+n+"] was undefined";return void 0===i.instance&&t(n),i.instance},r=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r.push(i(e[o]));t.apply(null,t)};({}).bolt={module:{api:{define:n,require:r,demand:i}}};var o=n,a=function(e,t){o(e,[],function(){return t})};a("global!tinymce.Env",tinymce.Env),a("global!tinymce.EditorManager",tinymce.EditorManager),a("global!tinymce.ThemeManager",tinymce.ThemeManager),a("global!tinymce.util.Tools",tinymce.util.Tools),a("global!tinymce.ui.Factory",tinymce.ui.Factory),a("global!tinymce.DOM",tinymce.DOM),o("tinymce.modern.ui.Toolbar",["global!tinymce.util.Tools","global!tinymce.ui.Factory"],function(e,t){var n=function(n,i,r){var o,a=[];if(i)return e.each(i.split(/[ ,]/),function(e){var i,s=function(){var t=n.selection;e.settings.stateSelector&&t.selectorChanged(e.settings.stateSelector,function(t){e.active(t)},!0),e.settings.disabledStateSelector&&t.selectorChanged(e.settings.disabledStateSelector,function(t){e.disabled(t)})};"|"==e?o=null:t.has(e)?(e={type:e,size:r},a.push(e),o=null):(o||(o={type:"buttongroup",items:[]},a.push(o)),n.buttons[e]&&(i=e,e=n.buttons[i],"function"==typeof e&&(e=e()),e.type=e.type||"button",e.size=r,e=t.create(e),o.items.push(e),n.initialized?s():n.on("init",s)))}),{type:"toolbar",layout:"flow",items:a}};return{createToolbar:n,createToolbars:function(t,i){var r=[],o=t.settings,a=function(e){if(e)return r.push(n(t,e,i)),!0};if(e.isArray(o.toolbar)){if(0===o.toolbar.length)return;e.each(o.toolbar,function(e,t){o["toolbar"+(t+1)]=e}),delete o.toolbar}for(var s=1;s<10&&a(o["toolbar"+s]);s++);if(r.length||!1===o.toolbar||a(o.toolbar||"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),r.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:r}}}}),o("tinymce.modern.ui.Menubar",["global!tinymce.util.Tools"],function(e){var t={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},n=function(e,t){return"|"==t?{text:"|"}:e[t]},i=function(i,r,o){var a,s,l,c,u;if(u=e.makeMap((r.removed_menuitems||"").split(/[ ,]/)),r.menu?(s=r.menu[o],c=!0):s=t[o],s){a={text:s.title},l=[],e.each((s.items||"").split(/[ ,]/),function(e){n(i,e)&&!u[e]&&l.push(n(i,e))}),c||e.each(i,function(e){e.context==o&&("before"==e.separator&&l.push({text:"|"}),e.prependToContext?l.unshift(e):l.push(e),"after"==e.separator&&l.push({text:"|"}))});for(var d=0;d<l.length;d++)"|"==l[d].text&&(0!==d&&d!=l.length-1||l.splice(d,1));if(a.menu=l,!a.menu.length)return null}return a};return{createMenuButtons:function(e){var n,r=[],o=e.settings,a=[];if(o.menu)for(n in o.menu)a.push(n);else for(n in t)a.push(n);for(var s="string"==typeof o.menubar?o.menubar.split(/[ ,]/):a,l=0;l<s.length;l++){var c=s[l];c=i(e.menuItems,e.settings,c),c&&r.push(c)}return r}}}),a("global!tinymce.util.Delay",tinymce.util.Delay),a("global!tinymce.geom.Rect",tinymce.geom.Rect),o("tinymce.modern.ui.ContextToolbars",["global!tinymce.DOM","global!tinymce.util.Tools","global!tinymce.util.Delay","tinymce.modern.ui.Toolbar","global!tinymce.ui.Factory","global!tinymce.geom.Rect"],function(e,t,n,i,r,o){var a=function(e){return{left:e.x,top:e.y,width:e.w,height:e.h,right:e.x+e.w,bottom:e.y+e.h}},s=function(e){t.each(e.contextToolbars,function(e){e.panel&&e.panel.hide()})},l=function(e,t){e.moveTo(t.left,t.top)},c=function(e,n,i){n=n?n.substr(0,2):"",t.each({t:"down",b:"up"},function(t,r){e.classes.toggle("arrow-"+t,i(r,n.substr(0,1)))}),t.each({l:"left",r:"right"},function(t,r){e.classes.toggle("arrow-"+t,i(r,n.substr(1,1)))})},u=function(e,t,n,i,r,o){return o=a({x:t,y:n,w:o.w,h:o.h}),e&&(o=e({elementRect:a(i),contentAreaRect:a(r),panelRect:o})),o};return{addContextualToolbars:function(a){var d,f=a.settings,m=function(){return a.contextToolbars||[]},p=function(t){var n,i,r;return n=e.getPos(a.getContentAreaContainer()),i=a.dom.getRect(t),r=a.dom.getRoot(),"BODY"===r.nodeName&&(i.x-=r.ownerDocument.documentElement.scrollLeft||r.scrollLeft,i.y-=r.ownerDocument.documentElement.scrollTop||r.scrollTop),i.x+=n.x,i.y+=n.y,i},h=function(t,n){var i,r,d,m,h,g,v,y,b=f.inline_toolbar_position_handler;if(!a.removed){if(!t||!t.toolbar.panel)return void s(a);v=["bc-tc","tc-bc","tl-bl","bl-tl","tr-br","br-tr"],h=t.toolbar.panel,n&&h.show(),d=p(t.element),r=e.getRect(h.getEl()),m=e.getRect(a.getContentAreaContainer()||a.getBody()),y=25,"inline"!==e.getStyle(t.element,"display",!0)&&(d.w=t.element.clientWidth,d.h=t.element.clientHeight),a.inline||(m.w=a.getDoc().documentElement.offsetWidth),a.selection.controlSelection.isResizable(t.element)&&d.w<y&&(d=o.inflate(d,0,8)),i=o.findBestRelativePosition(r,d,m,v),d=o.clamp(d,m),i?(g=o.relativePosition(r,d,i),l(h,u(b,g.x,g.y,d,m,r))):(m.h+=r.h,d=o.intersect(m,d),d?(i=o.findBestRelativePosition(r,d,m,["bc-tc","bl-tl","br-tr"]),i?(g=o.relativePosition(r,d,i),l(h,u(b,g.x,g.y,d,m,r))):l(h,u(b,d.x,d.y,d,m,r))):h.hide()),c(h,i,function(e,t){return e===t})}},g=function(e){return function(){var t=function(){a.selection&&h(C(a.selection.getNode()),e)};n.requestAnimationFrame(t)}},v=function(){d||(d=a.selection.getScrollContainer()||a.getWin(),e.bind(d,"scroll",g(!0)),a.on("remove",function(){e.unbind(d,"scroll")}))},y=function(e){var t;if(e.toolbar.panel)return e.toolbar.panel.show(),void h(e);v(),t=r.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:i.createToolbar(a,e.toolbar.items),oncancel:function(){a.focus()}}),e.toolbar.panel=t,t.renderTo(document.body).reflow(),h(e)},b=function(){t.each(m(),function(e){e.panel&&e.panel.hide()})},C=function(e){var t,n,i,r=m();for(i=a.$(e).parents().add(e),t=i.length-1;t>=0;t--)for(n=r.length-1;n>=0;n--)if(r[n].predicate(i[t]))return{toolbar:r[n],element:i[t]};return null};a.on("click keyup setContent ObjectResized",function(e){("setcontent"!==e.type||e.selection)&&n.setEditorTimeout(a,function(){var e;e=C(a.selection.getNode()),e?(b(),y(e)):b()})}),a.on("blur hide contextmenu",b),a.on("ObjectResizeStart",function(){var e=C(a.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.hide()}),a.on("ResizeEditor ResizeWindow",g(!0)),a.on("nodeChange",g(!1)),a.on("remove",function(){t.each(m(),function(e){e.panel&&e.panel.remove()}),a.contextToolbars={}}),a.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var e=C(a.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.items()[0].focus()})}}}),o("tinymce.modern.ui.A11y",[],function(){var e=function(e,t){return function(){var n=e.find(t)[0];n&&n.focus(!0)}};return{addKeys:function(t,n){t.shortcuts.add("Alt+F9","",e(n,"menubar")),t.shortcuts.add("Alt+F10,F10","",e(n,"toolbar")),t.shortcuts.add("Alt+F11","",e(n,"elementpath")),n.on("cancel",function(){t.focus()})}}}),o("tinymce.modern.ui.Sidebar",["global!tinymce.util.Tools","global!tinymce.ui.Factory","global!tinymce.Env"],function(e,t,n){var i=function(e){return{element:function(){return e}}},r=function(e,t,n){var r=e.settings[n];r&&r(i(t.getEl("body")))},o=function(t,n,i){e.each(i,function(e){var i=n.items().filter("#"+e.name)[0];i&&i.visible()&&e.name!==t&&(r(e,i,"onhide"),i.visible(!1))})},a=function(e){e.items().each(function(e){e.active(!1)})},s=function(t,n){return e.grep(t,function(e){return e.name===n})[0]},l=function(e,n,i){return function(l){var c=l.control,u=c.parents().filter("panel")[0],d=u.find("#"+n)[0],f=s(i,n);o(n,u,i),a(c.parent()),d&&d.visible()?(r(f,d,"onhide"),d.hide(),c.active(!1)):(d?(d.show(),r(f,d,"onshow")):(d=t.create({type:"container",name:n,layout:"stack",classes:"sidebar-panel",html:""}),u.prepend(d),r(f,d,"onrender"),r(f,d,"onshow")),c.active(!0)),e.fire("ResizeEditor")}},c=function(){return!n.ie||n.ie>=11};return{hasSidebar:function(e){return!(!c()||!e.sidebars)&&e.sidebars.length>0},createSidebar:function(t){return{type:"panel",name:"sidebar",layout:"stack",classes:"sidebar",items:[{type:"toolbar",layout:"stack",classes:"sidebar-toolbar",items:e.map(t.sidebars,function(e){var n=e.settings;return{type:"button",icon:n.icon,image:n.image,tooltip:n.tooltip,onclick:l(t,e.name,t.sidebars)}})}]}}}}),o("tinymce.modern.ui.SkinLoaded",[],function(){return{fireSkinLoaded:function(e){var t=function(){e._skinLoaded=!0,e.fire("SkinLoaded")};return function(){e.initialized?t():e.on("init",t)}}}}),o("tinymce.modern.ui.Resize",["global!tinymce.DOM"],function(e){var t=function(e){return{width:e.clientWidth,height:e.clientHeight}},n=function(n,i,r){var o,a,s,l,c=n.settings;o=n.getContainer(),a=n.getContentAreaContainer().firstChild,s=t(o),l=t(a),null!==i&&(i=Math.max(c.min_width||100,i),i=Math.min(c.max_width||65535,i),e.setStyle(o,"width",i+(s.width-l.width)),e.setStyle(a,"width",i)),r=Math.max(c.min_height||100,r),r=Math.min(c.max_height||65535,r),e.setStyle(a,"height",r),n.fire("ResizeEditor")};return{resizeTo:n,resizeBy:function(e,t,i){var r=e.getContentAreaContainer();n(e,r.clientWidth+t,r.clientHeight+i)}}}),o("tinymce.modern.modes.Iframe",["global!tinymce.util.Tools","global!tinymce.ui.Factory","global!tinymce.DOM","tinymce.modern.ui.Toolbar","tinymce.modern.ui.Menubar","tinymce.modern.ui.ContextToolbars","tinymce.modern.ui.A11y","tinymce.modern.ui.Sidebar","tinymce.modern.ui.SkinLoaded","tinymce.modern.ui.Resize"],function(e,t,n,i,r,o,a,s,l,c){var u=function(e){return function(t){e.find("*").disabled("readonly"===t.mode)}},d=function(e){return{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",border:e,html:""}},f=function(e){return{type:"panel",layout:"stack",classes:"edit-aria-container",border:"1 0 0 0",items:[d("0"),s.createSidebar(e)]}};return{render:function(e,m,p){var h,g,v,y=e.settings;return p.skinUiCss&&n.styleSheetLoader.load(p.skinUiCss,l.fireSkinLoaded(e)),h=m.panel=t.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[!1===y.menubar?null:{type:"menubar",border:"0 0 1 0",items:r.createMenuButtons(e)},i.createToolbars(e,y.toolbar_items_size),s.hasSidebar(e)?f(e):d("1 0 0 0")]}),!1!==y.resize&&(g={type:"resizehandle",direction:y.resize,onResizeStart:function(){var t=e.getContentAreaContainer().firstChild;v={width:t.clientWidth,height:t.clientHeight}},onResize:function(t){"both"===y.resize?c.resizeTo(e,v.width+t.deltaX,v.height+t.deltaY):c.resizeTo(e,null,v.height+t.deltaY)}}),!1!==y.statusbar&&h.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:e},g]}),e.fire("BeforeRenderUI"),e.on("SwitchMode",u(h)),h.renderBefore(p.targetNode).reflow(),y.readonly&&e.setMode("readonly"),y.width&&n.setStyle(h.getEl(),"width",y.width),e.on("remove",function(){h.remove(),h=null}),a.addKeys(e,h),o.addContextualToolbars(e),{iframeContainer:h.find("#iframe")[0].getEl(),editorContainer:h.getEl()}}}}),a("global!tinymce.ui.FloatPanel",tinymce.ui.FloatPanel),o("tinymce.modern.modes.Inline",["global!tinymce.util.Tools","global!tinymce.ui.Factory","global!tinymce.DOM","global!tinymce.ui.FloatPanel","tinymce.modern.ui.Toolbar","tinymce.modern.ui.Menubar","tinymce.modern.ui.ContextToolbars","tinymce.modern.ui.A11y","tinymce.modern.ui.SkinLoaded"],function(e,t,n,i,r,o,a,s,l){return{render:function(e,c,u){var d,f,m=e.settings;m.fixed_toolbar_container&&(f=n.select(m.fixed_toolbar_container)[0]);var p=function(){if(d&&d.moveRel&&d.visible()&&!d._fixed){var t=e.selection.getScrollContainer(),i=e.getBody(),r=0,o=0;if(t){var a=n.getPos(i),s=n.getPos(t);r=Math.max(0,s.x-a.x),o=Math.max(0,s.y-a.y)}d.fixed(!1).moveRel(i,e.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(r,o)}},h=function(){d&&(d.show(),p(),n.addClass(e.getBody(),"mce-edit-focus"))},g=function(){d&&(d.hide(),i.hideAll(),n.removeClass(e.getBody(),"mce-edit-focus"))},v=function(){if(d)return void(d.visible()||h());d=c.panel=t.create({type:f?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!f,border:1,items:[!1===m.menubar?null:{type:"menubar",border:"0 0 1 0",items:o.createMenuButtons(e)},r.createToolbars(e,m.toolbar_items_size)]}),e.fire("BeforeRenderUI"),d.renderTo(f||document.body).reflow(),s.addKeys(e,d),h(),a.addContextualToolbars(e),e.on("nodeChange",p),e.on("activate",h),e.on("deactivate",g),e.nodeChanged()};return m.content_editable=!0,e.on("focus",function(){u.skinUiCss?n.styleSheetLoader.load(u.skinUiCss,v,v):v()}),e.on("blur hide",g),e.on("remove",function(){d&&(d.remove(),d=null)}),u.skinUiCss&&n.styleSheetLoader.load(u.skinUiCss,l.fireSkinLoaded(e)),{}}}}),a("global!tinymce.ui.Throbber",tinymce.ui.Throbber),o("tinymce.modern.ui.ProgressState",["global!tinymce.ui.Throbber"],function(e){return{setup:function(t,n){var i;t.on("ProgressState",function(t){i=i||new e(n.panel.getEl("body")),t.state?i.show(t.time):i.hide()})}}}),o("tinymce.modern.Theme",["global!tinymce.Env","global!tinymce.EditorManager","global!tinymce.ThemeManager","tinymce.modern.modes.Iframe","tinymce.modern.modes.Inline","tinymce.modern.ui.Resize","tinymce.modern.ui.ProgressState"],function(e,t,n,i,r,o,a){var s=function(n,o,s){var l=n.settings,c=!1!==l.skin&&(l.skin||"lightgray");if(c){var u=l.skin_url;u=u?n.documentBaseURI.toAbsolute(u):t.baseURL+"/skins/"+c,e.documentMode<=7?s.skinUiCss=u+"/skin.ie7.min.css":s.skinUiCss=u+"/skin.min.css",n.contentCSS.push(u+"/content"+(n.inline?".inline":"")+".min.css")}return a.setup(n,o),l.inline?r.render(n,o,s):i.render(n,o,s)};return n.add("modern",function(e){return{renderUI:function(t){return s(e,this,t)},resizeTo:function(t,n){return o.resizeTo(e,t,n)},resizeBy:function(t,n){return o.resizeBy(e,t,n)}}}),function(){}}),i("tinymce.modern.Theme")()}()},885:function(e,t,n){(function(t){!function(n,i){"use strict";function r(e,t){for(var n,i=[],r=0;r<e.length;++r){if(!(n=s[e[r]]||a(e[r])))throw"module definition dependecy not found: "+e[r];i.push(n)}t.apply(null,i)}function o(e,t,n){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(t===i)throw"invalid module definition, dependencies must be specified";if(n===i)throw"invalid module definition, definition function must be specified";r(t,function(){s[e]=n.apply(null,arguments)})}function a(e){for(var t=n,i=e.split(/[.\/]/),r=0;r<i.length;++r){if(!t[i[r]])return;t=t[i[r]]}return t}var s={};o("tinymce/geom/Rect",[],function(){function e(e,t,n){var i,r,a,s,l,u;return i=t.x,r=t.y,a=e.w,s=e.h,l=t.w,u=t.h,n=(n||"").split(""),"b"===n[0]&&(r+=u),"r"===n[1]&&(i+=l),"c"===n[0]&&(r+=c(u/2)),"c"===n[1]&&(i+=c(l/2)),"b"===n[3]&&(r-=s),"r"===n[4]&&(i-=a),"c"===n[3]&&(r-=c(s/2)),"c"===n[4]&&(i-=c(a/2)),o(i,r,a,s)}function t(t,n,i,r){var o,a;for(a=0;a<r.length;a++)if(o=e(t,n,r[a]),o.x>=i.x&&o.x+o.w<=i.w+i.x&&o.y>=i.y&&o.y+o.h<=i.h+i.y)return r[a];return null}function n(e,t,n){return o(e.x-t,e.y-n,e.w+2*t,e.h+2*n)}function i(e,t){var n,i,r,a;return n=l(e.x,t.x),i=l(e.y,t.y),r=s(e.x+e.w,t.x+t.w),a=s(e.y+e.h,t.y+t.h),r-n<0||a-i<0?null:o(n,i,r-n,a-i)}function r(e,t,n){var i,r,a,s,c,u,d,f,m,p;return c=e.x,u=e.y,d=e.x+e.w,f=e.y+e.h,m=t.x+t.w,p=t.y+t.h,i=l(0,t.x-c),r=l(0,t.y-u),a=l(0,d-m),s=l(0,f-p),c+=i,u+=r,n&&(d+=i,f+=r,c-=a,u-=s),d-=a,f-=s,o(c,u,d-c,f-u)}function o(e,t,n,i){return{x:e,y:t,w:n,h:i}}function a(e){return o(e.left,e.top,e.width,e.height)}var s=Math.min,l=Math.max,c=Math.round;return{inflate:n,relativePosition:e,findBestRelativePosition:t,intersect:i,clamp:r,create:o,fromClientRect:a}}),o("tinymce/util/Promise",[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function n(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(t,e(r,this),e(o,this))}function i(e){var t=this;if(null===this._state)return void this._deferreds.push(e);c(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var i;try{i=n(t._value)}catch(t){return void e.reject(t)}e.resolve(i)})}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void l(e(n,t),e(r,this),e(o,this))}this._state=!0,this._value=t,a.call(this)}catch(e){o.call(this,e)}}function o(e){this._state=!1,this._value=e,a.call(this)}function a(){for(var e=0,t=this._deferreds.length;e<t;e++)i.call(this,this._deferreds[e]);this._deferreds=null}function s(e,t,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=i}function l(e,t,n){var i=!1;try{e(function(e){i||(i=!0,t(e))},function(e){i||(i=!0,n(e))})}catch(e){if(i)return;i=!0,n(e)}}if(window.Promise)return window.Promise;var c=n.immediateFn||"function"==typeof t&&t||function(e){setTimeout(e,1)},u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return n.prototype.catch=function(e){return this.then(null,e)},n.prototype.then=function(e,t){var r=this;return new n(function(n,o){i.call(r,new s(e,t,n,o))})},n.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&u(arguments[0])?arguments[0]:arguments);return new n(function(t,n){function i(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){i(o,e)},n)}e[o]=a,0==--r&&t(e)}catch(e){n(e)}}if(0===e.length)return t([]);for(var r=e.length,o=0;o<e.length;o++)i(o,e[o])})},n.resolve=function(e){return e&&"object"==typeof e&&e.constructor===n?e:new n(function(t){t(e)})},n.reject=function(e){return new n(function(t,n){n(e)})},n.race=function(e){return new n(function(t,n){for(var i=0,r=e.length;i<r;i++)e[i].then(t,n)})},n}),o("tinymce/util/Delay",["tinymce/util/Promise"],function(e){function t(e,t){function n(e){window.setTimeout(e,0)}var i,r=window.requestAnimationFrame,o=["ms","moz","webkit"];for(i=0;i<o.length&&!r;i++)r=window[o[i]+"RequestAnimationFrame"];r||(r=n),r(e,t)}function n(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)}function i(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)}function r(e){return clearTimeout(e)}function o(e){return clearInterval(e)}function a(e,t){var i,r;return r=function(){var r=arguments;clearTimeout(i),i=n(function(){e.apply(this,r)},t)},r.stop=function(){clearTimeout(i)},r}var s;return{requestAnimationFrame:function(n,i){if(s)return void s.then(n);s=new e(function(e){i||(i=document.body),t(e,i)}).then(n)},setTimeout:n,setInterval:i,setEditorTimeout:function(e,t,i){return n(function(){e.removed||t()},i)},setEditorInterval:function(e,t,n){var r;return r=i(function(){e.removed?clearInterval(r):t()},n)},debounce:a,throttle:a,clearInterval:o,clearTimeout:r}}),o("tinymce/Env",[],function(){function e(e){return"matchMedia"in window&&matchMedia(e).matches}var t,n,i,r,o,a,s,l,c,u,d,f,m,p=navigator,h=p.userAgent;return t=window.opera&&window.opera.buildNumber,c=/Android/.test(h),n=/WebKit/.test(h),i=!n&&!t&&/MSIE/gi.test(h)&&/Explorer/gi.test(p.appName),i=i&&/MSIE (\w+)\./.exec(h)[1],r=-1!=h.indexOf("Trident/")&&(-1!=h.indexOf("rv:")||-1!=p.appName.indexOf("Netscape"))&&11,o=-1!=h.indexOf("Edge/")&&!i&&!r&&12,i=i||r||o,a=!n&&!r&&/Gecko/.test(h),s=-1!=h.indexOf("Mac"),l=/(iPad|iPhone)/.test(h),u="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,d=e("only screen and (max-device-width: 480px)")&&(c||l),f=e("only screen and (min-width: 800px)")&&(c||l),m=-1!=h.indexOf("Windows Phone"),o&&(n=!1),{opera:t,webkit:n,ie:i,gecko:a,mac:s,iOS:l,android:c,contentEditable:!l||u||h.match(/AppleWebKit\/(\d*)/)[1]>=534,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=i,range:window.getSelection&&"Range"in window,documentMode:i&&!o?document.documentMode||7:10,fileApi:u,ceFalse:!1===i||i>8,canHaveCSP:!1===i||i>11,desktop:!d&&!f,windowsPhone:m}}),o("tinymce/dom/EventUtils",["tinymce/util/Delay","tinymce/Env"],function(e,t){function n(e,t,n,i){e.addEventListener?e.addEventListener(t,n,i||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function i(e,t,n,i){e.removeEventListener?e.removeEventListener(t,n,i||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function r(e,t){var n,i=t;return n=e.path,n&&n.length>0&&(i=n[0]),e.deepPath&&(n=e.deepPath())&&n.length>0&&(i=n[0]),i}function o(e,n){function i(){return!1}function o(){return!0}var a,s=n||{};for(a in e)u[a]||(s[a]=e[a]);if(s.target||(s.target=s.srcElement||document),t.experimentalShadowDom&&(s.target=r(e,s.target)),e&&c.test(e.type)&&void 0===e.pageX&&void 0!==e.clientX){var l=s.target.ownerDocument||document,d=l.documentElement,f=l.body;s.pageX=e.clientX+(d&&d.scrollLeft||f&&f.scrollLeft||0)-(d&&d.clientLeft||f&&f.clientLeft||0),s.pageY=e.clientY+(d&&d.scrollTop||f&&f.scrollTop||0)-(d&&d.clientTop||f&&f.clientTop||0)}return s.preventDefault=function(){s.isDefaultPrevented=o,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},s.stopPropagation=function(){s.isPropagationStopped=o,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},s.stopImmediatePropagation=function(){s.isImmediatePropagationStopped=o,s.stopPropagation()},s.isDefaultPrevented||(s.isDefaultPrevented=i,s.isPropagationStopped=i,s.isImmediatePropagationStopped=i),void 0===s.metaKey&&(s.metaKey=!1),s}function a(t,r,o){function a(){o.domLoaded||(o.domLoaded=!0,r(u))}function s(){("complete"===c.readyState||"interactive"===c.readyState&&c.body)&&(i(c,"readystatechange",s),a())}function l(){try{c.documentElement.doScroll("left")}catch(t){return void e.setTimeout(l)}a()}var c=t.document,u={type:"ready"};if(o.domLoaded)return void r(u);c.addEventListener?"complete"===c.readyState?a():n(t,"DOMContentLoaded",a):(n(c,"readystatechange",s),c.documentElement.doScroll&&t.self===t.top&&l()),n(t,"load",a)}function s(){function e(e,t){var n,i,r,o,a=f[t];if(n=a&&a[e.type])for(i=0,r=n.length;i<r;i++)if(o=n[i],o&&!1===o.func.call(o.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}var t,r,s,c,u,d=this,f={};r=l+(+new Date).toString(32),c="onmouseenter"in document.documentElement,s="onfocusin"in document.documentElement,u={mouseenter:"mouseover",mouseleave:"mouseout"},t=1,d.domLoaded=!1,d.events=f,d.bind=function(i,l,m,p){function h(t){e(o(t||x.event),g)}var g,v,y,b,C,T,S,x=window;if(i&&3!==i.nodeType&&8!==i.nodeType){for(i[r]?g=i[r]:(g=t++,i[r]=g,f[g]={}),p=p||i,l=l.split(" "),y=l.length;y--;)b=l[y],T=h,C=S=!1,"DOMContentLoaded"===b&&(b="ready"),d.domLoaded&&"ready"===b&&"complete"==i.readyState?m.call(p,o({type:b})):(c||(C=u[b])&&(T=function(t){var n,i;if(n=t.currentTarget,(i=t.relatedTarget)&&n.contains)i=n.contains(i);else for(;i&&i!==n;)i=i.parentNode;i||(t=o(t||x.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=n,e(t,g))}),s||"focusin"!==b&&"focusout"!==b||(S=!0,C="focusin"===b?"focus":"blur",T=function(t){t=o(t||x.event),t.type="focus"===t.type?"focusin":"focusout",e(t,g)}),v=f[g][b],v?"ready"===b&&d.domLoaded?m({type:b}):v.push({func:m,scope:p}):(f[g][b]=v=[{func:m,scope:p}],v.fakeName=C,v.capture=S,v.nativeHandler=T,"ready"===b?a(i,T,d):n(i,C||b,T,S)));return i=v=0,m}},d.unbind=function(e,t,n){var o,a,s,l,c,u;if(!e||3===e.nodeType||8===e.nodeType)return d;if(o=e[r]){if(u=f[o],t){for(t=t.split(" "),s=t.length;s--;)if(c=t[s],a=u[c]){if(n)for(l=a.length;l--;)if(a[l].func===n){var m=a.nativeHandler,p=a.fakeName,h=a.capture;a=a.slice(0,l).concat(a.slice(l+1)),a.nativeHandler=m,a.fakeName=p,a.capture=h,u[c]=a}n&&0!==a.length||(delete u[c],i(e,a.fakeName||c,a.nativeHandler,a.capture))}}else{for(c in u)a=u[c],i(e,a.fakeName||c,a.nativeHandler,a.capture);u={}}for(c in u)return d;delete f[o];try{delete e[r]}catch(t){e[r]=null}}return d},d.fire=function(t,n,i){var a;if(!t||3===t.nodeType||8===t.nodeType)return d;i=o(null,i),i.type=n,i.target=t;do{a=t[r],a&&e(i,a),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow}while(t&&!i.isPropagationStopped());return d},d.clean=function(e){var t,n,i=d.unbind;if(!e||3===e.nodeType||8===e.nodeType)return d;if(e[r]&&i(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(i(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[r]&&i(e);return d},d.destroy=function(){f={}},d.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var l="mce-data-",c=/^(?:mouse|contextmenu)|click/,u={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1};return s.Event=new s,s.Event.bind(window,"ready",function(){}),s}),o("tinymce/dom/Sizzle",[],function(){function e(e,t,n,i){var r,o,a,s,c,d,f,m,p,h;if((t?t.ownerDocument||t:O)!==M&&k(t),t=t||M,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(B&&!i){if(r=he.exec(e))if(a=r[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&H(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&b.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(a)),n}if(b.qsa&&(!R||!R.test(e))){if(m=f=L,p=t,h=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(d=x(e),(f=t.getAttribute("id"))?m=f.replace(ve,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",c=d.length;c--;)d[c]=m+u(d[c]);p=ge.test(e)&&l(t.parentNode)||t,h=d.join(",")}if(h)try{return Q.apply(n,p.querySelectorAll(h)),n}catch(e){}finally{f||t.removeAttribute("id")}}}return E(e.replace(oe,"$1"),t,n,i)}function t(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function n(e){return e[L]=!0,e}function r(e){var t=M.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)C.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||K)-(~e.sourceIndex||K);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return n(function(t){return t=+t,n(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function l(e){return e&&typeof e.getElementsByTagName!==X&&e}function c(){}function u(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function d(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=F++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,l,c=[G,o];if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(l=t[L]||(t[L]={}),(s=l[i])&&s[0]===G&&s[1]===o)return c[2]=s[2];if(l[i]=c,c[2]=e(t,n,a))return!0}}}function f(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function m(t,n,i){for(var r=0,o=n.length;r<o;r++)e(t,n[r],i);return i}function p(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,i,r)||(a.push(o),c&&t.push(s)));return a}function h(e,t,i,r,o,a){return r&&!r[L]&&(r=h(r)),o&&!o[L]&&(o=h(o,a)),n(function(n,a,s,l){var c,u,d,f=[],h=[],g=a.length,v=n||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!n&&t?v:p(v,f,e,s,l),b=i?o||(n?e:g||r)?[]:a:y;if(i&&i(y,b,s,l),r)for(c=p(b,h),r(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[h[u]]=!(y[h[u]]=d));if(n){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?Z.call(n,d):f[u])>-1&&(n[c]=!(a[c]=d))}}else b=p(b===a?b.splice(g,b.length):b),o?o(null,a,b,l):Q.apply(a,b)})}function g(e){for(var t,n,i,r=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,l=d(function(e){return e===t},a,!0),c=d(function(e){return Z.call(t,e)>-1},a,!0),m=[function(e,n,i){return!o&&(i||n!==A)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];s<r;s++)if(n=C.relative[e[s].type])m=[d(f(m),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[L]){for(i=++s;i<r&&!C.relative[e[i].type];i++);return h(s>1&&f(m),s>1&&u(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<i&&g(e.slice(s,i)),i<r&&g(e=e.slice(i)),i<r&&u(e))}m.push(n)}return f(m)}function v(t,i){var r=i.length>0,o=t.length>0,a=function(n,a,s,l,c){var u,d,f,m=0,h="0",g=n&&[],v=[],y=A,b=n||o&&C.find.TAG("*",c),T=G+=null==y?1:Math.random()||.1,S=b.length;for(c&&(A=a!==M&&a);h!==S&&null!=(u=b[h]);h++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(G=T)}r&&((u=!f&&u)&&m--,n&&g.push(u))}if(m+=h,r&&h!==m){for(d=0;f=i[d++];)f(g,v,a,s);if(n){if(m>0)for(;h--;)g[h]||v[h]||(v[h]=q.call(l));v=p(v)}Q.apply(l,v),c&&!n&&v.length>0&&m+i.length>1&&e.uniqueSort(l)}return c&&(G=T,A=y),g};return r?n(a):a}var y,b,C,T,S,x,w,E,A,N,P,k,M,_,B,R,D,I,H,L="sizzle"+-new Date,O=window.document,G=0,F=0,V=t(),U=t(),W=t(),z=function(e,t){return e===t&&(P=!0),0},X=typeof i,K=1<<31,j={}.hasOwnProperty,$=[],q=$.pop,Y=$.push,Q=$.push,J=$.slice,Z=$.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",te="[\\x20\\t\\r\\n\\f]",ne="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie="\\["+te+"*("+ne+")(?:"+te+"*([*^$|!~]?=)"+te+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ne+"))|)"+te+"*\\]",re=":("+ne+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",oe=new RegExp("^"+te+"+|((?:^|[^\\\\])(?:\\\\.)*)"+te+"+$","g"),ae=new RegExp("^"+te+"*,"+te+"*"),se=new RegExp("^"+te+"*([>+~]|"+te+")"+te+"*"),le=new RegExp("="+te+"*([^\\]'\"]*?)"+te+"*\\]","g"),ce=new RegExp(re),ue=new RegExp("^"+ne+"$"),de={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},fe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,pe=/^[^{]+\{\s*\[native \w/,he=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ge=/[+~]/,ve=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+te+"?|("+te+")|.)","ig"),be=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{Q.apply($=J.call(O.childNodes),O.childNodes),$[O.childNodes.length].nodeType}catch(e){Q={apply:$.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}b=e.support={},S=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},k=e.setDocument=function(e){var t,n=e?e.ownerDocument||e:O,i=n.defaultView;return n!==M&&9===n.nodeType&&n.documentElement?(M=n,_=n.documentElement,B=!S(n),i&&i!==function(e){try{return e.top}catch(e){}return null}(i)&&(i.addEventListener?i.addEventListener("unload",function(){k()},!1):i.attachEvent&&i.attachEvent("onunload",function(){k()})),b.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=r(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=pe.test(n.getElementsByClassName),b.getById=r(function(e){return _.appendChild(e).id=L,!n.getElementsByName||!n.getElementsByName(L).length}),b.getById?(C.find.ID=function(e,t){if(typeof t.getElementById!==X&&B){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(ye,be);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(ye,be);return function(e){var n=typeof e.getAttributeNode!==X&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=b.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==X)return t.getElementsByTagName(e)}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},C.find.CLASS=b.getElementsByClassName&&function(e,t){if(B)return t.getElementsByClassName(e)},D=[],R=[],(b.qsa=pe.test(n.querySelectorAll))&&(r(function(e){e.innerHTML="<select msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||R.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll(":checked").length||R.push(":checked")}),r(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&R.push("name"+te+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),R.push(",.*:")})),(b.matchesSelector=pe.test(I=_.matches||_.webkitMatchesSelector||_.mozMatchesSelector||_.oMatchesSelector||_.msMatchesSelector))&&r(function(e){b.disconnectedMatch=I.call(e,"div"),I.call(e,"[s!='']:x"),D.push("!=",re)}),R=R.length&&new RegExp(R.join("|")),D=D.length&&new RegExp(D.join("|")),t=pe.test(_.compareDocumentPosition),H=t||pe.test(_.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return P=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!b.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===O&&H(O,e)?-1:t===n||t.ownerDocument===O&&H(O,t)?1:N?Z.call(N,e)-Z.call(N,t):0:4&i?-1:1)}:function(e,t){if(e===t)return P=!0,0;var i,r=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:N?Z.call(N,e)-Z.call(N,t):0;if(o===s)return a(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)c.unshift(i);for(;l[r]===c[r];)r++;return r?a(l[r],c[r]):l[r]===O?-1:c[r]===O?1:0},n):M},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==M&&k(t),n=n.replace(le,"='$1']"),b.matchesSelector&&B&&(!D||!D.test(n))&&(!R||!R.test(n)))try{var i=I.call(t,n);if(i||b.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(e){}return e(n,M,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==M&&k(e),H(e,t)},e.attr=function(e,t){(e.ownerDocument||e)!==M&&k(e);var n=C.attrHandle[t.toLowerCase()],r=n&&j.call(C.attrHandle,t.toLowerCase())?n(e,t,!B):i;return r!==i?r:b.attributes||!B?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],i=0,r=0;if(P=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(z),P){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return N=null,e},T=e.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=T(t);return n},C=e.selectors={cacheLength:50,createPseudo:n,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,be),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=x(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=V[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&V(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==X&&e.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,m,p,h=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;h;){for(d=t;d=d[h];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=h="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(u=g[L]||(g[L]={}),c=u[e]||[],m=c[0]===G&&c[1],f=c[0]===G&&c[2],d=m&&g.childNodes[m];d=++m&&d&&d[h]||(f=m=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[G,m,f];break}}else if(y&&(c=(t[L]||(t[L]={}))[e])&&c[0]===G)f=c[1];else for(;(d=++m&&d&&d[h]||(f=m=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[L]||(d[L]={}))[e]=[G,f]),d!==t)););return(f-=r)===i||f%i==0&&f/i>=0}}},PSEUDO:function(t,i){var r,o=C.pseudos[t]||C.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[L]?o(i):o.length>1?(r=[t,t,"",i],C.setFilters.hasOwnProperty(t.toLowerCase())?n(function(e,t){for(var n,r=o(e,i),a=r.length;a--;)n=Z.call(e,r[a]),e[n]=!(t[n]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:n(function(e){var t=[],i=[],r=w(e.replace(oe,"$1"));return r[L]?n(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,n,o){return t[0]=e,r(t,null,o,i),!i.pop()}}),has:n(function(t){return function(n){return e(t,n).length>0}}),contains:n(function(e){return e=e.replace(ye,be),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:n(function(t){return ue.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(ye,be).toLowerCase(),function(e){var n;do{if(n=B?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===_},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:s(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},C.pseudos.nth=C.pseudos.eq;for(y in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[y]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(y);for(y in{submit:!0,reset:!0})C.pseudos[y]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(y);return c.prototype=C.filters=C.pseudos,C.setFilters=new c,x=e.tokenize=function(t,n){var i,r,o,a,s,l,c,u=U[t+" "];if(u)return n?0:u.slice(0);for(s=t,l=[],c=C.preFilter;s;){i&&!(r=ae.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=se.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(oe," ")}),s=s.slice(i.length));for(a in C.filter)!(r=de[a].exec(s))||c[a]&&!(r=c[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?e.error(t):U(t,l).slice(0)},w=e.compile=function(e,t){var n,i=[],r=[],o=W[e+" "];if(!o){for(t||(t=x(e)),n=t.length;n--;)o=g(t[n]),o[L]?i.push(o):r.push(o);o=W(e,v(r,i)),o.selector=e}return o},E=e.select=function(e,t,n,i){var r,o,a,s,c,d="function"==typeof e&&e,f=!i&&x(e=d.selector||e);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&b.getById&&9===t.nodeType&&B&&C.relative[o[1].type]){if(!(t=(C.find.ID(a.matches[0].replace(ye,be),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=de.needsContext.test(e)?0:o.length;r--&&(a=o[r],!C.relative[s=a.type]);)if((c=C.find[s])&&(i=c(a.matches[0].replace(ye,be),ge.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&u(o)))return Q.apply(n,i),n;break}}return(d||w(e,f))(i,t,!B,n,ge.test(e)&&l(t.parentNode)||t),n},b.sortStable=L.split("").sort(z).join("")===L,b.detectDuplicates=!!P,k(),b.sortDetached=r(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(ee,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),e}),o("tinymce/util/Arr",[],function(){function e(e){var t,n,i=e;if(!u(e))for(i=[],t=0,n=e.length;t<n;t++)i[t]=e[t];return i}function t(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==i){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1}function n(e,n){var i=[];return t(e,function(t,r){i.push(n(t,r,e))}),i}function r(e,n){var i=[];return t(e,function(t,r){n&&!n(t,r,e)||i.push(t)}),i}function o(e,t){var n,i;if(e)for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}function a(e,t,n,i){var r=0;for(arguments.length<3&&(n=e[0]);r<e.length;r++)n=t.call(i,n,e[r],r);return n}function s(e,t,n){var i,r;for(i=0,r=e.length;i<r;i++)if(t.call(n,e[i],i,e))return i;return-1}function l(e,t,n){var r=s(e,t,n);return-1!==r?e[r]:i}function c(e){return e[e.length-1]}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{isArray:u,toArray:e,each:t,map:n,filter:r,indexOf:o,reduce:a,findIndex:s,find:l,last:c}}),o("tinymce/util/Tools",["tinymce/Env","tinymce/util/Arr"],function(e,t){function n(e){return null===e||e===i?"":(""+e).replace(p,"")}function r(e,n){return n?!("array"!=n||!t.isArray(e))||typeof e==n:e!==i}function o(e,t,n){var i;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},i=e.length;i--;)n[e[i]]={};return n}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e,t,n){var i,r,o,a,s,l=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),o=e[3].match(/(^|\.)(\w+)$/i)[2],r=l.createNS(e[3].replace(/\.\w+$/,""),n),!r[o]){if("static"==e[2])return r[o]=t,void(this.onCreate&&this.onCreate(e[2],e[3],r[o]));t[o]||(t[o]=function(){},c=1),r[o]=t[o],l.extend(r[o].prototype,t),e[5]&&(i=l.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],s=r[o],r[o]=c?function(){return i[a].apply(this,arguments)}:function(){return this.parent=i[a],s.apply(this,arguments)},r[o].prototype[o]=r[o],l.each(i,function(e,t){r[o].prototype[t]=i[t]}),l.each(t,function(e,t){i[t]?r[o].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=o&&(r[o].prototype[t]=e)})),l.each(t.static,function(e,t){r[o][t]=e})}}function l(e,t){var n,r,o,a,s=arguments;for(n=1,r=s.length;n<r;n++){t=s[n];for(o in t)t.hasOwnProperty(o)&&(a=t[o])!==i&&(e[o]=a)}return e}function c(e,n,i,r){r=r||this,e&&(i&&(e=e[i]),t.each(e,function(e,t){if(!1===n.call(r,e,t,i))return!1;c(e,n,i,r)}))}function u(e,t){var n,i;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)i=e[n],t[i]||(t[i]={}),t=t[i];return t}function d(e,t){var n,i;for(t=t||window,e=e.split("."),n=0,i=e.length;n<i&&(t=t[e[n]]);n++);return t}function f(e,i){return!e||r(e,"array")?e:t.map(e.split(i||","),n)}function m(t){var n=e.cacheSuffix;return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}var p=/^\s*|\s*$/g;return{trim:n,isArray:t.isArray,is:r,toArray:t.toArray,makeMap:o,each:t.each,map:t.map,grep:t.filter,inArray:t.indexOf,hasOwn:a,extend:l,create:s,walk:c,createNS:u,resolve:d,explode:f,_addCacheSuffix:m}}),o("tinymce/dom/DomQuery",["tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/util/Tools","tinymce/Env"],function(e,t,n,r){function o(e){return void 0!==e}function a(e){return"string"==typeof e}function s(e){return e&&e==e.window}function l(e,t){var n,i,r;for(t=t||x,r=t.createElement("div"),n=t.createDocumentFragment(),r.innerHTML=e;i=r.firstChild;)n.appendChild(i);return n}function c(e,t,n,i){var r;if(a(t))t=l(t,v(e[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),i)for(r=t.length-1;r>=0;r--)c(e,t[r],n,i);else for(r=0;r<t.length;r++)c(e,t[r],n,i);return e}if(t.nodeType)for(r=e.length;r--;)n.call(e[r],t);return e}function u(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function d(e,t,n){var i,r;return t=f(t)[0],e.each(function(){var e=this;n&&i==e.parentNode?r.appendChild(e):(i=e.parentNode,r=t.cloneNode(!1),e.parentNode.insertBefore(r,e),r.appendChild(e))}),e}function f(e,t){return new f.fn.init(e,t)}function m(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1}function p(e){return null===e||e===S?"":(""+e).replace(I,"")}function h(e,t){var n,i,r,o;if(e)if(void 0===(n=e.length)){for(i in e)if(e.hasOwnProperty(i)&&(o=e[i],!1===t.call(o,i,o)))break}else for(r=0;r<n&&(o=e[r],!1!==t.call(o,r,o));r++);return e}function g(e,t){var n=[];return h(e,function(e,i){t(i,e)&&n.push(i)}),n}function v(e){return e?9==e.nodeType?e:e.ownerDocument:x}function y(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof f&&(n=n[0]);o&&9!==o.nodeType;){if(n!==i){if(o===n)break;if("string"==typeof n&&f(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r}function b(e,t,n,r){var o=[];for(r instanceof f&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(r!==i){if(e===r)break;if("string"==typeof r&&f(e).is(r))break}o.push(e)}return o}function C(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function T(e,t,n){h(n,function(n,i){e[n]=e[n]||{},e[n][t]=i})}var S,x=document,w=Array.prototype.push,E=Array.prototype.slice,A=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,N=e.Event,P=n.makeMap("children,contents,next,prev"),k=n.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),M=n.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),_={for:"htmlFor",class:"className",readonly:"readOnly"},B={float:"cssFloat"},R={},D={},I=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(e,t){var n,i,r=this;if(!e)return r;if(e.nodeType)return r.context=r[0]=e,r.length=1,r;if(t&&t.nodeType)r.context=t;else{if(t)return f(e).attr(t);r.context=t=document}if(a(e)){if(r.selector=e,!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:A.exec(e)))return f(t).find(e);if(n[1])for(i=l(e,v(t)).firstChild;i;)w.call(r,i),i=i.nextSibling;else{if(!(i=v(t).getElementById(n[2])))return r;if(i.id!==n[2])return r.find(e);r.length=1,r[0]=i}}else this.add(e,!1);return r},toArray:function(){return n.toArray(this)},add:function(e,t){var n,i,r=this;if(a(e))return r.add(f(e));if(!1!==t)for(n=f.unique(r.toArray().concat(f.makeArray(e))),r.length=n.length,i=0;i<n.length;i++)r[i]=n[i];else w.apply(r,f.makeArray(e));return r},attr:function(e,t){var n,i=this;if("object"==typeof e)h(e,function(e,t){i.attr(e,t)});else{if(!o(t)){if(i[0]&&1===i[0].nodeType){if((n=R[e])&&n.get)return n.get(i[0],e);if(M[e])return i.prop(e)?e:S;t=i[0].getAttribute(e,2),null===t&&(t=S)}return t}this.each(function(){var n;if(1===this.nodeType){if((n=R[e])&&n.set)return void n.set(this,t);null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2)}})}return i},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=_[e]||e))h(e,function(e,t){n.prop(e,t)});else{if(!o(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1==this.nodeType&&(this[e]=t)})}return n},css:function(e,t){function n(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function i(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}var r,a,s=this;if("object"==typeof e)h(e,function(e,t){s.css(e,t)});else if(o(t))e=n(e),"number"!=typeof t||k[e]||(t+="px"),s.each(function(){var n=this.style;if((a=D[e])&&a.set)return void a.set(this,t);try{this.style[B[e]||e]=t}catch(e){}null!==t&&""!==t||(n.removeProperty?n.removeProperty(i(e)):n.removeAttribute(e))});else{if(r=s[0],(a=D[e])&&a.get)return a.get(r);if(r.ownerDocument.defaultView)try{return r.ownerDocument.defaultView.getComputedStyle(r,null).getPropertyValue(i(e))}catch(e){return S}else if(r.currentStyle)return r.currentStyle[n(e)]}return s},remove:function(){for(var e,t=this,n=this.length;n--;)e=t[n],N.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this,n=this.length;n--;)for(e=t[n];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t,n=this;if(o(e)){t=n.length;try{for(;t--;)n[t].innerHTML=e}catch(i){f(n[t]).empty().append(e)}return n}return n[0]?n[0].innerHTML:""},text:function(e){var t,n=this;if(o(e)){for(t=n.length;t--;)"innerText"in n[t]?n[t].innerText=e:n[0].textContent=e;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return c(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return c(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){var e=this;return e[0]&&e[0].parentNode?c(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?c(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):e},appendTo:function(e){return f(e).append(this),this},prependTo:function(e){return f(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return d(this,e)},wrapAll:function(e){return d(this,e,!0)},wrapInner:function(e){return this.each(function(){f(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){f(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),f(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e?n:(-1!==e.indexOf(" ")?h(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,i){var r,o;(o=u(i,e))!==t&&(r=i.className,o?i.className=p((" "+r+" ").replace(" "+e+" "," ")):i.className+=r?" "+e:e)}),n)},hasClass:function(e){return u(this[0],e)},each:function(e){return h(this,e)},on:function(e,t){return this.each(function(){N.bind(this,e,t)})},off:function(e,t){return this.each(function(){N.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?N.fire(this,e.type,e):N.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new f(E.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,i=[];for(t=0,n=this.length;t<n;t++)f.find(e,this[t],i);return f(i)},filter:function(e){return f("function"==typeof e?g(this.toArray(),function(t,n){return e(n,t)}):f.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof f&&(e=e[0]),this.each(function(n,i){for(;i;){if("string"==typeof e&&f(i).is(e)){t.push(i);break}if(i==e){t.push(i);break}i=i.parentNode}}),f(t)},offset:function(e){var t,n,i,r,o=0,a=0;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,i=n.documentElement,t.getBoundingClientRect&&(r=t.getBoundingClientRect(),o=r.left+(i.scrollLeft||n.body.scrollLeft)-i.clientLeft,a=r.top+(i.scrollTop||n.body.scrollTop)-i.clientTop)),{left:o,top:a})},push:w,sort:[].sort,splice:[].splice},n.extend(f,{extend:n.extend,makeArray:function(e){return s(e)||e.nodeType?[e]:n.toArray(e)},inArray:m,isArray:n.isArray,each:h,trim:p,grep:g,find:t,expr:t.selectors,unique:t.uniqueSort,text:t.getText,contains:t.contains,filter:function(e,t,n){var i=t.length;for(n&&(e=":not("+e+")");i--;)1!=t[i].nodeType&&t.splice(i,1);return t=1===t.length?f.find.matchesSelector(t[0],e)?[t[0]]:[]:f.find.matches(e,t)}}),h({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},next:function(e){return C(e,"nextSibling",1)},prev:function(e){return C(e,"previousSibling",1)},children:function(e){return b(e.firstChild,"nextSibling",1)},contents:function(e){return n.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){f.fn[e]=function(n){var i=this,r=[];return i.each(function(){var e=t.call(r,this,n,r);e&&(f.isArray(e)?r.push.apply(r,e):r.push(e))}),this.length>1&&(P[e]||(r=f.unique(r)),0===e.indexOf("parents")&&(r=r.reverse())),r=f(r),n?r.filter(n):r}}),h({parentsUntil:function(e,t){return y(e,"parentNode",t)},nextUntil:function(e,t){return b(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return b(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,i){var r=this,o=[];return r.each(function(){var e=t.call(o,this,n,o);e&&(f.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=f.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),o=f(o),i?o.filter(i):o}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(i,r){return n=n||e(),0===arguments.length&&(i=n.element),r||(r=n.context),new t.fn.init(i,r)}var n;return f.extend(t,this),t},r.ie&&r.ie<8&&(T(R,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?S:t},size:function(e){var t=e.size;return 20===t?S:t},class:function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?S:t}}),T(R,"set",{class:function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),r.ie&&r.ie<9&&(B.float="styleFloat",T(D,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=R,f.cssHooks=D,f}),o("tinymce/html/Styles",[],function(){return function(e,t){function n(e,t,n,i){function r(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+r(t)+r(n)+r(i)}var i,r,o,a,s=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,l=/\s*([^:]+):\s*([^;]+);?/g,c={};for(e=e||{},t&&(o=t.getValidStyles(),a=t.getInvalidStyles()),r="\\\" \\' \\; \\: ; : \ufeff".split(" "),i=0;i<r.length;i++)c[r[i]]="\ufeff"+i,c["\ufeff"+i]=r[i];return{toHex:function(e){return e.replace(s,n)},parse:function(t){function r(e,t,n){var r,o,a,s;if((r=y[e+"-top"+t])&&(o=y[e+"-right"+t])&&(a=y[e+"-bottom"+t])&&(s=y[e+"-left"+t])){var l=[r,o,a,s];for(i=l.length-1;i--&&l[i]===l[i+1];);i>-1&&n||(y[e+t]=-1==i?l[0]:l.join(" "),delete y[e+"-top"+t],delete y[e+"-right"+t],delete y[e+"-bottom"+t],delete y[e+"-left"+t])}}function o(e){var t,n=y[e];if(n){for(n=n.split(" "),t=n.length;t--;)if(n[t]!==n[0])return!1;return y[e]=n[0],!0}}function a(e){return v=!0,c[e]}function u(e,t){return v&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function d(e){return String.fromCharCode(parseInt(e.slice(1),16))}function f(e){return e.replace(/\\[0-9a-f]+/gi,d)}function m(t,n,i,r,o,a){if(o=o||a)return o=u(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=u(n||i||r),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return b&&(n=b.call(C,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var p,h,g,v,y={},b=e.url_converter,C=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,a).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,a)});p=l.exec(t);)if(l.lastIndex=p.index+p[0].length,h=p[1].replace(/\s+$/,"").toLowerCase(),g=p[2].replace(/\s+$/,""),h&&g){if(h=f(h),g=f(g),-1!==h.indexOf("\ufeff")||-1!==h.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"==h||/expression\s*\(|\/\*|\*\//.test(g)))continue;"font-weight"===h&&"700"===g?g="bold":"color"!==h&&"background-color"!==h||(g=g.toLowerCase()),g=g.replace(s,n),g=g.replace(/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,m),y[h]=v?u(g,!0):g}r("border","",!0),r("border","-width"),r("border","-color"),r("border","-style"),r("padding",""),r("margin",""),function(e,t,n,i){o(t)&&o(n)&&o(i)&&(y[e]=y[t]+" "+y[n]+" "+y[i],delete y[t],delete y[n],delete y[i])}("border","border-width","border-style","border-color"),"medium none"===y.border&&delete y.border,"none"===y["border-image"]&&delete y["border-image"]}return y},serialize:function(e,t){function n(t){var n,i,r,a;if(n=o[t])for(i=0,r=n.length;i<r;i++)t=n[i],(a=e[t])&&(s+=(s.length>0?" ":"")+t+": "+a+";")}var i,r,s="";if(t&&o)n("*"),n(t);else for(i in e)!(r=e[i])||a&&!function(e,t){var n;return(!(n=a["*"])||!n[e])&&(!(n=a[t])||!n[e])}(i,t)||(s+=(s.length>0?" ":"")+i+": "+r+";");return s}}}}),o("tinymce/dom/TreeWalker",[],function(){return function(e,t){function n(e,n,i,r){var o,a;if(e){if(!r&&e[n])return e[n];if(e!=t){if(o=e[i])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[i])return o}}}function i(e,n,i,r){var o,a,s;if(e){if(o=e[i],t&&o===t)return;if(o){if(!r)for(s=o[n];s;s=s[n])if(!s[n])return s;return o}if((a=e.parentNode)&&a!==t)return a}}var r=e;this.current=function(){return r},this.next=function(e){return r=n(r,"firstChild","nextSibling",e)},this.prev=function(e){return r=n(r,"lastChild","previousSibling",e)},this.prev2=function(e){return r=i(r,"lastChild","previousSibling",e)}}}),o("tinymce/dom/Range",["tinymce/util/Tools"],function(e){function t(n){function i(){return I.createDocumentFragment()}function r(e,t){x(G,e,t)}function o(e,t){x(F,e,t)}function a(e){r(e.parentNode,K(e))}function s(e){r(e.parentNode,K(e)+1)}function l(e){o(e.parentNode,K(e))}function c(e){o(e.parentNode,K(e)+1)}function u(e){e?(D[W]=D[U],D[z]=D[V]):(D[U]=D[W],D[V]=D[z]),D.collapsed=G}function d(e){a(e),c(e)}function f(e){r(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function m(e,t){var n=D[U],i=D[V],r=D[W],o=D[z],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?S(n,i,a,s):1===e?S(r,o,a,s):2===e?S(r,o,l,c):3===e?S(n,i,l,c):void 0}function p(){w(O)}function h(){return w(H)}function g(){return w(L)}function v(e){var t,i,r=this[U],o=this[V];3!==r.nodeType&&4!==r.nodeType||!r.nodeValue?(r.childNodes.length>0&&(i=r.childNodes[o]),i?r.insertBefore(e,i):3==r.nodeType?n.insertAfter(e,r):r.appendChild(e)):o?o>=r.nodeValue.length?n.insertAfter(e,r):(t=r.splitText(o),r.parentNode.insertBefore(e,t)):r.parentNode.insertBefore(e,r)}function y(e){var t=D.extractContents();D.insertNode(e),e.appendChild(t),D.selectNode(e)}function b(){return X(new t(n),{startContainer:D[U],startOffset:D[V],endContainer:D[W],endOffset:D[z],collapsed:D.collapsed,commonAncestorContainer:D.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(t<0)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n||e}function T(){return D[U]==D[W]&&D[V]==D[z]}function S(e,t,i,r){var o,a,s,l,c,u;if(e==i)return t==r?0:t<r?-1:1;for(o=i;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&a<t;)a++,s=s.nextSibling;return t<=a?-1:1}for(o=e;o&&o.parentNode!=i;)o=o.parentNode;if(o){for(a=0,s=i.firstChild;s!=o&&a<r;)a++,s=s.nextSibling;return a<r?-1:1}for(l=n.findCommonAncestor(e,i),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=i;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function x(e,t,i){var r,o;for(e?(D[U]=t,D[V]=i):(D[W]=t,D[z]=i),r=D[W];r.parentNode;)r=r.parentNode;for(o=D[U];o.parentNode;)o=o.parentNode;o==r?S(D[U],D[V],D[W],D[z])>0&&D.collapse(e):D.collapse(e),D.collapsed=T(),D.commonAncestorContainer=n.findCommonAncestor(D[U],D[W])}function w(e){var t,n,i,r,o,a,s,l=0,c=0;if(D[U]==D[W])return E(e);for(t=D[W],n=t.parentNode;n;t=n,n=n.parentNode){if(n==D[U])return A(t,e);++l}for(t=D[U],n=t.parentNode;n;t=n,n=n.parentNode){if(n==D[W])return N(t,e);++c}for(i=c-l,r=D[U];i>0;)r=r.parentNode,i--;for(o=D[W];i<0;)o=o.parentNode,i++;for(a=r.parentNode,s=o.parentNode;a!=s;a=a.parentNode,s=s.parentNode)r=a,o=s;return P(r,o,e)}function E(e){var t,n,r,o,a,s,l,c,u;if(e!=O&&(t=i()),D[V]==D[z])return t;if(3==D[U].nodeType){if(n=D[U].nodeValue,r=n.substring(D[V],D[z]),e!=L&&(o=D[U],c=D[V],u=D[z]-D[V],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),D.collapse(G)),e==O)return;return r.length>0&&t.appendChild(I.createTextNode(r)),t}for(o=C(D[U],D[V]),a=D[z]-D[V];o&&a>0;)s=o.nextSibling,l=B(o,e),t&&t.appendChild(l),--a,o=s;return e!=L&&D.collapse(G),t}function A(e,t){var n,r,o,a,s,l;if(t!=O&&(n=i()),r=k(e,t),n&&n.appendChild(r),o=K(e),(a=o-D[V])<=0)return t!=L&&(D.setEndBefore(e),D.collapse(F)),n;for(r=e.previousSibling;a>0;)s=r.previousSibling,l=B(r,t),n&&n.insertBefore(l,n.firstChild),--a,r=s;return t!=L&&(D.setEndBefore(e),D.collapse(F)),n}function N(e,t){var n,r,o,a,s,l;for(t!=O&&(n=i()),o=M(e,t),n&&n.appendChild(o),r=K(e),++r,a=D[z]-r,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=B(o,t),n&&n.appendChild(l),--a,o=s;return t!=L&&(D.setStartAfter(e),D.collapse(G)),n}function P(e,t,n){var r,o,a,s,l,c,u;for(n!=O&&(o=i()),r=M(e,n),o&&o.appendChild(r),a=K(e),s=K(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,r=B(c,n),o&&o.appendChild(r),c=u,--l;return r=k(t,n),o&&o.appendChild(r),n!=L&&(D.setStartAfter(e),D.collapse(G)),o}function k(e,t){var n,i,r,o,a,s=C(D[W],D[z]-1),l=s!=D[W];if(s==e)return _(s,l,F,t);for(n=s.parentNode,i=_(n,F,F,t);n;){for(;s;)r=s.previousSibling,o=_(s,l,F,t),t!=O&&i.insertBefore(o,i.firstChild),l=G,s=r;if(n==e)return i;s=n.previousSibling,n=n.parentNode,a=_(n,F,F,t),t!=O&&a.appendChild(i),i=a}}function M(e,t){var n,i,r,o,a,s=C(D[U],D[V]),l=s!=D[U];if(s==e)return _(s,l,G,t);for(n=s.parentNode,i=_(n,F,G,t);n;){for(;s;)r=s.nextSibling,o=_(s,l,G,t),t!=O&&i.appendChild(o),l=G,s=r;if(n==e)return i;s=n.nextSibling,n=n.parentNode,a=_(n,F,G,t),t!=O&&a.appendChild(i),i=a}}function _(e,t,i,r){var o,a,s,l,c;if(t)return B(e,r);if(3==e.nodeType){if(o=e.nodeValue,i?(l=D[V],a=o.substring(l),s=o.substring(0,l)):(l=D[z],a=o.substring(0,l),s=o.substring(l)),r!=L&&(e.nodeValue=s),r==O)return;return c=n.clone(e,F),c.nodeValue=a,c}if(r!=O)return n.clone(e,F)}function B(e,t){if(t!=O)return t==L?n.clone(e,G):e;e.parentNode.removeChild(e)}function R(){return n.create("body",null,g()).outerText}var D=this,I=n.doc,H=0,L=1,O=2,G=!0,F=!1,V="startOffset",U="startContainer",W="endContainer",z="endOffset",X=e.extend,K=n.nodeIndex;return X(D,{startContainer:I,startOffset:0,endContainer:I,endOffset:0,collapsed:G,commonAncestorContainer:I,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:r,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:m,deleteContents:p,extractContents:h,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:R}),D}return t.prototype.toString=function(){return this.toStringIE()},t}),o("tinymce/html/Entities",["tinymce/util/Tools"],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,i,o,a={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)i=String.fromCharCode(parseInt(e[n],t)),r[i]||(o="&"+e[n+1]+";",a[i]=o,a[o]=i);return a}}var i,r,o,a=e.makeMap,s=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};r={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},o={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var u={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return r[e]||e})},encodeAllRaw:function(e){return(""+e).replace(/[<>&\"\']/g,function(e){return r[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":r[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return r[e]||n[e]||e})},getEncodeFunc:function(e,t){function o(e,n){return e.replace(n?s:l,function(e){return r[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return u.encodeNamed(e,n,t)}return t=n(t)||i,e=a(e.replace(/\+/g,",")),e.named&&e.numeric?o:e.named?t?c:u.encodeNamed:e.numeric?u.encodeNumeric:u.encodeRaw},decode:function(e){return e.replace(/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):c[n]||String.fromCharCode(n)):o[e]||i[e]||t(e)})}};return u}),o("tinymce/dom/StyleSheetLoader",["tinymce/util/Tools","tinymce/util/Delay"],function(e,t){return function(n,i){function r(e){n.getElementsByTagName("head")[0].appendChild(e)}function o(i,o,c){function u(){for(var e=y.passed,t=e.length;t--;)e[t]();y.status=2,y.passed=[],y.failed=[]}function d(){for(var e=y.failed,t=e.length;t--;)e[t]();y.status=3,y.passed=[],y.failed=[]}function f(e,n){e()||((new Date).getTime()-v<a?t.setTimeout(n):d())}function m(){f(function(){for(var e,t,i=n.styleSheets,r=i.length;r--;)if(e=i[r],(t=e.ownerNode?e.ownerNode:e.owningElement)&&t.id===h.id)return u(),!0},m)}function p(){f(function(){try{var e=g.sheet.cssRules;return u(),!!e}catch(e){}},p)}var h,g,v,y;if(i=e._addCacheSuffix(i),l[i]?y=l[i]:(y={passed:[],failed:[]},l[i]=y),o&&y.passed.push(o),c&&y.failed.push(c),1!=y.status){if(2==y.status)return void u();if(3==y.status)return void d();if(y.status=1,h=n.createElement("link"),h.rel="stylesheet",h.type="text/css",h.id="u"+s++,h.async=!1,h.defer=!1,v=(new Date).getTime(),"onload"in h&&!function(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}())h.onload=m,h.onerror=d;else{if(navigator.userAgent.indexOf("Firefox")>0)return g=n.createElement("style"),g.textContent='@import "'+i+'"',p(),void r(g);m()}r(h),h.href=i}}var a,s=0,l={};i=i||{},a=i.maxLoadTime||5e3,this.load=o}}),o("tinymce/dom/DOMUtils",["tinymce/dom/Sizzle","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/EventUtils","tinymce/dom/TreeWalker","tinymce/dom/Range","tinymce/html/Entities","tinymce/Env","tinymce/util/Tools","tinymce/dom/StyleSheetLoader"],function(e,t,n,r,o,a,s,l,c,u){function d(e,t){var n,i={},r=t.keep_values;return n={set:function(n,i,r){t.url_converter&&(i=t.url_converter.call(t.url_converter_scope||e,i,r,n[0])),n.attr("data-mce-"+r,i).attr(r,i)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},i={style:{set:function(e,t){if(null!==t&&"object"==typeof t)return void e.css(t);r&&e.attr("data-mce-style",t),e.attr("style",t)},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(i.href=i.src=n),i}function f(e,t){var n=t.attr("style");n=e.serializeStyle(e.parseStyle(n),t[0].nodeName),n||(n=null),t.attr("data-mce-style",n)}function m(e,t){var n,i,r=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=n&&e.nodeValue.length)&&(r++,n=i);return r}function p(e,i){var o,a=this;a.doc=e,a.win=window,a.files={},a.counter=0,a.stdMode=!b||e.documentMode>=8,a.boxModel=!b||"CSS1Compat"==e.compatMode||a.stdMode,a.styleSheetLoader=new u(e),a.boundEvents=[],a.settings=i=i||{},a.schema=i.schema,a.styles=new n({url_converter:i.url_converter,url_converter_scope:i.url_converter_scope},i.schema),a.fixDoc(e),a.events=i.ownEvents?new r(i.proxy):r.Event,a.attrHooks=d(a,i),o=i.schema?i.schema.getBlockElements():{},a.$=t.overrideDefaults(function(){return{context:e,element:a.getRoot()}}),a.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!o[e.nodeName]):!!o[e]}}var h=c.each,g=c.is,v=c.grep,y=c.trim,b=l.ie,C=/^([a-z0-9],?)+$/i,T=/^[ \t\r\n]*$/;return p.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t,n=this.settings;if(b&&n.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(t in n.schema.getCustomElements())e.createElement(t)}},clone:function(e,t){var n,i,r=this;return!b||1!==e.nodeType||t?e.cloneNode(t):(i=r.doc,t?n.firstChild:(n=i.createElement(e.nodeName),h(r.getAttribs(e),function(t){r.setAttrib(n,t.nodeName,r.getAttrib(e,t.nodeName))}),n))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return e=e||this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t,n,i=this;return e=i.get(e),t=i.getPos(e),n=i.getSize(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:function(e){var t,n,i=this;return e=i.get(e),t=i.getStyle(e,"width"),n=i.getStyle(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,t,n,r){var o,a=this,s=[];for(e=a.get(e),r=r===i,n=n||("BODY"!=a.getRoot().nodeName?a.getRoot().parentNode:null),g(t,"string")&&(o=t,t="*"===t?function(e){return 1==e.nodeType}:function(e){return a.is(e,o)});e&&e!=n&&e.nodeType&&9!==e.nodeType;){if(!t||t(e)){if(!r)return e;s.push(e)}e=e.parentNode}return r?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,(e=this.doc.getElementById(e))&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var i=this;return e(t,i.get(n)||i.settings.root_element||i.doc,[])},is:function(t,n){var r;if(t.length===i){if("*"===n)return 1==t.nodeType;if(C.test(n)){for(n=n.toLowerCase().split(/,/),t=t.nodeName.toLowerCase(),r=n.length-1;r>=0;r--)if(n[r]==t)return!0;return!1}}if(t.nodeType&&1!=t.nodeType)return!1;var o=t.nodeType?[t]:t;return e(n,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,i,r){var o=this;return this.run(e,function(e){var a;return a=g(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),i&&(i.nodeType?a.appendChild(i):o.setHTML(a,i)),r?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var i,r="";r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&void 0!==t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return void 0!==n?r+">"+n+"</"+e+">":r+" />"},createFragment:function(e){var t,n,i,r=this.doc;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&f(this,e)},getStyle:function(e,t,n){return e=this.$$(e),n?e.css(t):(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==t&&(t=l.ie&&l.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[t]:i)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&f(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var i,r,o=this,a=o.settings;""===n&&(n=null),e=o.$$(e),i=e.attr(t),e.length&&(r=o.attrHooks[t],r&&r.set?r.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,i){h(t,function(e,t){n.setAttrib(i,t,e)})})},getAttrib:function(e,t,n){var i,r,o=this;return e=o.$$(e),e.length&&(i=o.attrHooks[t],r=i&&i.get?i.get(e,t):e.attr(t)),void 0===r&&(r=n||""),r},getPos:function(e,n){var i,r,o=this,a=0,s=0,l=o.doc,c=l.body;if(e=o.get(e),n=n||c,e){if(n===c&&e.getBoundingClientRect&&"static"===t(c).css("position"))return r=e.getBoundingClientRect(),n=o.boxModel?l.documentElement:c,a=r.left+(l.documentElement.scrollLeft||c.scrollLeft)-n.clientLeft,s=r.top+(l.documentElement.scrollTop||c.scrollTop)-n.clientTop,{x:a,y:s};for(i=e;i&&i!=n&&i.nodeType;)a+=i.offsetLeft||0,s+=i.offsetTop||0,i=i.offsetParent;for(i=e.parentNode;i&&i!=n&&i.nodeType;)a-=i.scrollLeft||0,s-=i.scrollTop||0,i=i.parentNode}return{x:a,y:s}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t,n,i=this,r=i.doc;if(i!==p.DOM&&r===document){var o=p.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,p.DOM.addedStyles=o}n=r.getElementById("mceDefaultStyles"),n||(n=r.createElement("style"),n.id="mceDefaultStyles",n.type="text/css",t=r.getElementsByTagName("head")[0],t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(r.createTextNode(e))},loadCSS:function(e){var t,n=this,i=n.doc;if(n!==p.DOM&&i===document)return void p.DOM.loadCSS(e);e||(e=""),t=i.getElementsByTagName("head")[0],h(e.split(","),function(e){var r;e=c._addCacheSuffix(e),n.files[e]||(n.files[e]=!0,r=n.create("link",{rel:"stylesheet",href:e}),b&&i.documentMode&&i.recalc&&(r.onload=function(){i.recalc&&i.recalc(),r.onload=null}),t.appendChild(r))})},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,n,i){this.$$(e).toggleClass(n,i).each(function(){""===this.className&&t(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e||"mce_")+this.counter++},setHTML:function(e,n){e=this.$$(e),b?e.each(function(e,i){if(!1!==i.canHaveHTML){for(;i.firstChild;)i.removeChild(i.firstChild);try{i.innerHTML="<br>"+n,i.removeChild(i.firstChild)}catch(e){t("<div></div>").html("<br>"+n).contents().slice(1).appendTo(i)}return n}}):e.html(n)},getOuterHTML:function(e){return e=this.get(e),1==e.nodeType&&"outerHTML"in e?e.outerHTML:t("<div></div>").append(t(e).clone()).html()},setOuterHTML:function(e,n){var i=this;i.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=n)}catch(e){}i.remove(t(this).html(n),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,i;return n=t.parentNode,i=t.nextSibling,i?n.insertBefore(e,i):n.appendChild(e),e})},replace:function(e,t,n){return this.run(t,function(t){return g(t,"array")&&(e=e.cloneNode(!0)),n&&h(v(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n,i=this;return e.nodeName!=t.toUpperCase()&&(n=i.create(t),h(i.getAttribs(e),function(t){i.setAttrib(n,t.nodeName,i.getAttrib(e,t.nodeName))}),i.replace(n,e,1)),n||e},findCommonAncestor:function(e,t){for(var n,i=e;i;){for(n=t;n&&i!=n;)n=n.parentNode;if(i==n)break;i=i.parentNode}return!i&&e.ownerDocument?e.ownerDocument.documentElement:i},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var i,r=this;return"string"==typeof e&&(e=r.get(e)),!!e&&(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],h(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i))},getAttribs:function(e){var t;if(!(e=this.get(e)))return[];if(b){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});return e.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n,i,r,a,s,l,c=this,u=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||(c.schema?c.schema.getNonEmptyElements():null),a=c.schema?c.schema.getWhiteSpaceElements():{};do{if(1===(r=e.nodeType)){var d=e.getAttribute("data-mce-bogus");if(d){e=s.next("all"===d);continue}if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){u++,e=s.next();continue}return!1}for(i=c.getAttribs(e),n=i.length;n--;)if("name"===(l=i[n].nodeName)||"data-mce-bookmark"===l)return!1}if(8==r)return!1;if(3===r&&!T.test(e.nodeValue))return!1;if(3===r&&e.parentNode&&a[e.parentNode.nodeName]&&T.test(e.nodeValue))return!1;e=s.next()}while(e)}return u<=1},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:m,split:function(e,t,n){function i(e){var t,n=e.childNodes,r=e.nodeType;if(1!=r||"bookmark"!=e.getAttribute("data-mce-type")){for(t=n.length-1;t>=0;t--)i(n[t]);if(9!=r){if(3==r&&e.nodeValue.length>0){var o=y(e.nodeValue).length;if(!s.isBlock(e.parentNode)||o>0||0===o&&function(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}(e))return}else if(1==r&&(n=e.childNodes,1==n.length&&n[0]&&1==n[0].nodeType&&"bookmark"==n[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(n[0],e),n.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;s.remove(e)}return e}}var r,o,a,s=this,l=s.createRng();if(e&&t)return l.setStart(e.parentNode,s.nodeIndex(e)),l.setEnd(t.parentNode,s.nodeIndex(t)),r=l.extractContents(),l=s.createRng(),l.setStart(t.parentNode,s.nodeIndex(t)+1),l.setEnd(e.parentNode,s.nodeIndex(e)+1),o=l.extractContents(),a=e.parentNode,a.insertBefore(i(r),e),n?a.insertBefore(n,e):a.insertBefore(t,e),a.insertBefore(i(o),e),s.remove(e),n||t},bind:function(e,t,n,i){var r=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=r.bind(e[o],t,n,i);return e}return!r.settings.collect||e!==r.doc&&e!==r.win||r.boundEvents.push([e,t,n,i]),r.events.bind(e,t,n,i||r)},unbind:function(e,t,n){var i,r=this;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&null===(n=this.getContentEditable(e));e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var i=t.boundEvents[n];this.events.unbind(i[0],i[1],i[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var i=this,r=t;if(e)for("string"==typeof r&&(r=function(e){return i.is(e,t)}),e=e[n];e;e=e[n])if(r(e))return e;return null}},p.DOM=new p(document),p.nodeIndex=m,p}),o("tinymce/dom/ScriptLoader",["tinymce/dom/DOMUtils","tinymce/util/Tools"],function(e,t){function n(){function e(e,n,r){function o(){u.remove(c),l&&(l.onreadystatechange=l.onload=l=null),n()}function s(){a(r)?r():"undefined"!=typeof console&&console.log}var l,c,u=i;c=u.uniqueId(),l=document.createElement("script"),l.id=c,l.type="text/javascript",l.src=t._addCacheSuffix(e),"onreadystatechange"in l?l.onreadystatechange=function(){/loaded|complete/.test(l.readyState)&&o()}:l.onload=o,l.onerror=s,(document.getElementsByTagName("head")[0]||document.body).appendChild(l)}var n,s={},l=[],c={},u=[],d=0;this.isDone=function(e){return 2==s[e]},this.markDone=function(e){s[e]=2},this.add=this.load=function(e,t,i,r){s[e]==n&&(l.push(e),s[e]=0),t&&(c[e]||(c[e]=[]),c[e].push({success:t,failure:r,scope:i||this}))},this.remove=function(e){delete s[e],delete c[e]},this.loadQueue=function(e,t,n){this.loadScripts(l,e,t,n)},this.loadScripts=function(t,i,l,f){function m(e,t){r(c[t],function(t){a(t[e])&&t[e].call(t.scope)}),c[t]=n}var p,h=[];u.push({success:i,failure:f,scope:l||this}),(p=function(){var n=o(t);t.length=0,r(n,function(t){return 2===s[t]?void m("success",t):3===s[t]?void m("failure",t):void(1!==s[t]&&(s[t]=1,d++,e(t,function(){s[t]=2,d--,m("success",t),p()},function(){s[t]=3,d--,h.push(t),m("failure",t),p()})))}),d||(r(u,function(e){0===h.length?a(e.success)&&e.success.call(e.scope):a(e.failure)&&e.failure.call(e.scope,h)}),u.length=0)})()}}var i=e.DOM,r=t.each,o=t.grep,a=function(e){return"function"==typeof e};return n.ScriptLoader=new n,n}),o("tinymce/AddOnManager",["tinymce/dom/ScriptLoader","tinymce/util/Tools"],function(e,t){function n(){var e=this;e.items=[],e.urls={},e.lookup={}}var r=t.each;return n.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:i},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,i){var r=n.language;if(r&&!1!==n.languageLoad){if(i)if(i=","+i+",",-1!=i.indexOf(","+r.substr(0,2)+","))r=r.substr(0,2);else if(-1==i.indexOf(","+r+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+r+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},remove:function(e){delete this.urls[e],delete this.lookup[e]},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var i=this.urls[t];r(n,function(t){e.ScriptLoader.add(i+"/"+t)})},load:function(t,o,a,s,l){function c(){var n=u.dependencies(t);r(n,function(e){var t=u.createUrl(o,e);u.load(t.resource,t,i,i)}),a&&(s?a.call(s):a.call(e))}var u=this,d=o;u.urls[t]||("object"==typeof o&&(d=o.prefix+o.resource+o.suffix),0!==d.indexOf("/")&&-1==d.indexOf("://")&&(d=n.baseURL+"/"+d),u.urls[t]=d.substring(0,d.lastIndexOf("/")),u.lookup[t]?c():e.ScriptLoader.add(d,c,s,l))}},n.PluginManager=new n,n.ThemeManager=new n,n}),o("tinymce/dom/NodeType",[],function(){function e(e){return function(t){return!!t&&t.nodeType==e}}function t(e){return e=e.toLowerCase().split(" "),function(t){var n,i;if(t&&t.nodeType)for(i=t.nodeName.toLowerCase(),n=0;n<e.length;n++)if(i===e[n])return!0;return!1}}function n(e,t){return t=t.toLowerCase().split(" "),function(n){var i;if(s(n))for(i=0;i<t.length;i++)if(getComputedStyle(n,null).getPropertyValue(e)===t[i])return!0;return!1}}function i(e,t){return function(n){return s(n)&&n[e]===t}}function r(e,t){return function(n){return s(n)&&n.getAttribute(e)===t}}function o(e){return s(e)&&e.hasAttribute("data-mce-bogus")}function a(e){return function(t){if(s(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}}var s=e(1);return{isText:e(3),isElement:s,isComment:e(8),isBr:t("br"),isContentEditableTrue:a("true"),isContentEditableFalse:a("false"),matchNodeNames:t,hasPropValue:i,hasAttributeValue:r,matchStyleValues:n,isBogus:o}}),o("tinymce/text/Zwsp",[],function(){function e(e){return e==n}function t(e){return e.replace(new RegExp(n,"g"),"")}var n="\ufeff";return{isZwsp:e,ZWSP:n,trim:t}}),o("tinymce/caret/CaretContainer",["tinymce/dom/NodeType","tinymce/text/Zwsp"],function(e,t){function n(e){return y(e)&&(e=e.parentNode),v(e)&&e.hasAttribute("data-mce-caret")}function i(e){return y(e)&&t.isZwsp(e.data)}function r(e){return n(e)||i(e)}function o(e){var t=e.parentNode;t&&t.removeChild(e)}function a(e){try{return e.nodeValue}catch(e){return""}}function s(e,t){0===t.length?o(e):e.nodeValue=t}function l(e,n){var i,o,a,s;if(i=e.ownerDocument,a=i.createTextNode(t.ZWSP),s=e.parentNode,n){if(o=e.previousSibling,y(o)){if(r(o))return o;if(p(o))return o.splitText(o.data.length-1)}s.insertBefore(a,e)}else{if(o=e.nextSibling,y(o)){if(r(o))return o;if(m(o))return o.splitText(1),o}e.nextSibling?s.insertBefore(a,e.nextSibling):s.appendChild(a)}return a}function c(){var e=document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e}function u(e,t,n){var i,r,o;return i=t.ownerDocument,r=i.createElement(e),r.setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(c()),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r}function d(t){return t.firstChild!==t.lastChild||!e.isBr(t.firstChild)}function f(e){if(v(e)&&r(e)&&(d(e)?e.removeAttribute("data-mce-caret"):o(e)),y(e)){s(e,t.trim(a(e)))}}function m(e){return y(e)&&e.data[0]==t.ZWSP}function p(e){return y(e)&&e.data[e.data.length-1]==t.ZWSP}function h(t){var n=t.getElementsByTagName("br"),i=n[n.length-1];e.isBogus(i)&&i.parentNode.removeChild(i)}function g(e){return e&&e.hasAttribute("data-mce-caret")?(h(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null}var v=e.isElement,y=e.isText;return{isCaretContainer:r,isCaretContainerBlock:n,isCaretContainerInline:i,showCaretContainerBlock:g,insertInline:l,insertBlock:u,hasContent:d,remove:f,startsWithCaretContainer:m,endsWithCaretContainer:p}}),o("tinymce/dom/RangeUtils",["tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/dom/NodeType","tinymce/dom/Range","tinymce/caret/CaretContainer"],function(e,t,n,i,r){function o(e){return h(e)||g(e)}function a(e,t){var n=e.childNodes;return t--,t>n.length-1?t=n.length-1:t<0&&(t=0),n[t]||e}function s(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}function l(e,t,n){return null!==s(e,t,n)}function c(e){return"_mce_caret"===e.id}function u(e,t){return v(e)&&!1===l(e,t,c)}function d(e){this.walk=function(t,n){function i(e){var t;return t=e[0],3===t.nodeType&&t===g&&v>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===b&&e.length>0&&t===y&&3===t.nodeType&&e.splice(e.length-1,1),e}function r(e,t,n){for(var i=[];e&&e!=n;e=e[t])i.push(e);return i}function o(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function s(e,t,o){var a=o?"nextSibling":"previousSibling";for(d=e,f=d.parentNode;d&&d!=t;d=f)f=d.parentNode,m=r(d==e?d:d[a],a),m.length&&(o||m.reverse(),n(i(m)))}var l,c,u,d,f,m,h,g=t.startContainer,v=t.startOffset,y=t.endContainer,b=t.endOffset;if(h=e.select("td[data-mce-selected],th[data-mce-selected]"),h.length>0)return void p(h,function(e){n([e])});if(1==g.nodeType&&g.hasChildNodes()&&(g=g.childNodes[v]),1==y.nodeType&&y.hasChildNodes()&&(y=a(y,b)),g==y)return n(i([g]));for(l=e.findCommonAncestor(g,y),d=g;d;d=d.parentNode){if(d===y)return s(g,l,!0);if(d===l)break}for(d=y;d;d=d.parentNode){if(d===g)return s(y,l);if(d===l)break}c=o(g,l)||g,u=o(y,l)||y,s(g,c,!0),m=r(c==g?c:c.nextSibling,"nextSibling",u==y?u.nextSibling:u),m.length&&n(i(m)),s(y,u)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,i=e.startOffset,r=e.endContainer,o=e.endOffset;return n==r&&3==n.nodeType?i>0&&i<n.nodeValue.length&&(r=t(n,i),n=r.previousSibling,o>i?(o-=i,n=r=t(r,o).previousSibling,o=r.nodeValue.length,i=0):o=0):(3==n.nodeType&&i>0&&i<n.nodeValue.length&&(n=t(n,i),i=0),3==r.nodeType&&o>0&&o<r.nodeValue.length&&(r=t(r,o).previousSibling,o=r.nodeValue.length)),{startContainer:n,startOffset:i,endContainer:r,endOffset:o}},this.normalize=function(n){function i(i){function a(n,i){for(var r=new t(n,e.getParent(n.parentNode,e.isBlock)||y);n=r[i?"prev":"next"]();)if("BR"===n.nodeName)return!0}function s(n,i){var a,s,d;if(i=i||l,d=e.getParent(i.parentNode,e.isBlock)||y,n&&"BR"==i.nodeName&&h&&e.isEmpty(d))return l=i.parentNode,c=e.nodeIndex(i),void(r=!0);for(a=new t(i,d);f=a[n?"prev":"next"]();){if("false"===e.getContentEditableParent(f)||u(f,e.getRoot()))return;if(3===f.nodeType&&f.nodeValue.length>0)return l=f,c=n?f.nodeValue.length:0,void(r=!0);if(e.isBlock(f)||m[f.nodeName.toLowerCase()])return;s=f}o&&s&&(l=s,r=!0,c=0)}var l,c,d,f,m,p,h,y=e.getRoot();if(l=n[(i?"start":"end")+"Container"],c=n[(i?"start":"end")+"Offset"],h=1==l.nodeType&&c===l.childNodes.length,m=e.schema.getNonEmptyElements(),p=i,!v(l)){if(1==l.nodeType&&c>l.childNodes.length-1&&(p=!1),9===l.nodeType&&(l=e.getRoot(),c=0),l===y){if(p&&(f=l.childNodes[c>0?c-1:0])){if(v(f))return;if(m[f.nodeName]||"TABLE"==f.nodeName)return}if(l.hasChildNodes()){if(c=Math.min(!p&&c>0?c-1:c,l.childNodes.length-1),l=l.childNodes[c],c=0,!o&&l===y.lastChild&&"TABLE"===l.nodeName)return;if(function(e){for(;e&&e!=y;){if(g(e))return!0;e=e.parentNode}return!1}(l)||v(l))return;if(l.hasChildNodes()&&!/TABLE/.test(l.nodeName)){f=l,d=new t(l,y);do{if(g(f)||v(f)){r=!1;break}if(3===f.nodeType&&f.nodeValue.length>0){c=p?0:f.nodeValue.length,l=f,r=!0;break}if(m[f.nodeName.toLowerCase()]&&!function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}(f)){c=e.nodeIndex(f),l=f.parentNode,"IMG"!=f.nodeName||p||c++,r=!0;break}}while(f=p?d.next():d.prev())}}}o&&(3===l.nodeType&&0===c&&s(!0),1===l.nodeType&&(f=l.childNodes[c],f||(f=l.childNodes[c-1]),!f||"BR"!==f.nodeName||function(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}(f,"A")||a(f)||a(f,!0)||s(!0,f))),p&&!o&&3===l.nodeType&&c===l.nodeValue.length&&s(!1),r&&n["set"+(i?"Start":"End")](l,c)}}var r,o;return o=n.collapsed,i(!0),o||i(),r&&o&&n.collapse(!0),r}}function f(t,n,i){var r,o,a;if(r=i.elementFromPoint(t,n),o=i.body.createTextRange(),r&&"HTML"!=r.tagName||(r=i.body),o.moveToElementText(r),a=e.toArray(o.getClientRects()),a=a.sort(function(e,t){return e=Math.abs(Math.max(e.top-n,e.bottom-n)),t=Math.abs(Math.max(t.top-n,t.bottom-n)),e-t}),a.length>0){n=(a[0].bottom+a[0].top)/2;try{return o.moveToPoint(t,n),o.collapse(!0),o}catch(e){}}return null}function m(e,t){var n=e&&e.parentElement?e.parentElement():null;return g(s(n,t,o))?null:e}var p=e.each,h=n.isContentEditableTrue,g=n.isContentEditableFalse,v=r.isCaretContainer;return d.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},d.getCaretRangeFromPoint=function(e,t,n){var i,r;if(n.caretPositionFromPoint)r=n.caretPositionFromPoint(e,t),i=n.createRange(),i.setStart(r.offsetNode,r.offset),i.collapse(!0);else if(n.caretRangeFromPoint)i=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){i=n.body.createTextRange();try{i.moveToPoint(e,t),i.collapse(!0)}catch(r){i=f(e,t,n)}return m(i,n.body)}return i},d.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},d.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},d}),o("tinymce/NodeChange",["tinymce/dom/RangeUtils","tinymce/Env","tinymce/util/Delay"],function(e,t,n){return function(i){function r(e){var t,n;if(n=i.$(e).parentsUntil(i.getBody()).add(e),n.length===a.length){for(t=n.length;t>=0&&n[t]===a[t];t--);if(-1===t)return a=n,!0}return a=n,!1}var o,a=[];"onselectionchange"in i.getDoc()||i.on("NodeChange Click MouseUp KeyUp Focus",function(t){var n,r;n=i.selection.getRng(),r={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset},"nodechange"!=t.type&&e.compareRanges(r,o)||i.fire("SelectionChange"),o=r}),i.on("contextmenu",function(){i.fire("SelectionChange")}),i.on("SelectionChange",function(){var e=i.selection.getStart(!0);!t.range&&i.selection.isCollapsed()||!r(e)&&i.dom.isChildOf(e,i.getBody())&&i.nodeChanged({selectionChange:!0})}),i.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==i.selection.getNode().nodeName?n.setEditorTimeout(i,function(){i.nodeChanged()}):i.nodeChanged())}),this.nodeChanged=function(e){var t,n,r,o=i.selection;i.initialized&&o&&!i.settings.disable_nodechange&&!i.readonly&&(r=i.getBody(),t=o.getStart()||r,t.ownerDocument==i.getDoc()&&i.dom.isChildOf(t,r)||(t=r),"IMG"==t.nodeName&&o.isCollapsed()&&(t=t.parentNode),n=[],i.dom.getParent(t,function(e){if(e===r)return!0;n.push(e)}),e=e||{},e.element=t,e.parents=n,i.fire("NodeChange",e))}}}),o("tinymce/html/Node",[],function(){function e(e,t,n){var i,r,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(i=e[a])return i;for(r=e.parent;r&&r!==t;r=r.parent)if(i=r[a])return i}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,i={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n,i,r=this;if("string"!=typeof e){for(i in e)r.attr(i,e[i]);return r}if(n=r.attributes){if(void 0!==t){if(null===t){if(e in n.map)for(delete n.map[e],i=n.length;i--;)if(n[i].name===e)return n=n.splice(i,1),r;return r}if(e in n.map){for(i=n.length;i--;)if(n[i].name===e){n[i].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,r}return n.map[e]}},clone:function(){var e,n,i,r,o,a=this,s=new t(a.name,a.type);if(i=a.attributes){for(o=[],o.map={},e=0,n=i.length;e<n;e++)r=i[e],"id"!==r.name&&(o[o.length]={name:r.name,value:r.value},o.map[r.name]=r.value);s.attributes=o}return s.value=a.value,s.shortEnded=a.shortEnded,s},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e,t,n=this;for(e=n.firstChild;e;)t=e.next,n.insert(e,n,!0),e=t;n.remove()},remove:function(){var e=this,t=e.parent,n=e.next,i=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):i.next=n,t.lastChild===e?(t.lastChild=i,i&&(i.next=null)):n.prev=i,e.parent=e.next=e.prev=null),e},append:function(e){var t,n=this;return e.parent&&e.remove(),t=n.lastChild,t?(t.next=e,e.prev=t,n.lastChild=e):n.lastChild=n.firstChild=e,e.parent=n,e},insert:function(e,t,n){var i;return e.parent&&e.remove(),i=t.parent||this,n?(t===i.firstChild?i.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===i.lastChild?i.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=i,e},getAll:function(t){var n,i=this,r=[];for(n=i.firstChild;n;n=e(n,i))n.name===t&&r.push(n);return r},empty:function(){var t,n,i,r=this;if(r.firstChild){for(t=[],i=r.firstChild;i;i=e(i,r))t.push(i);for(n=t.length;n--;)i=t[n],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return r.firstChild=r.lastChild=null,r},isEmpty:function(t,i){var r,o,a=this,s=a.firstChild;if(i=i||{},s)do{if(1===s.type){if(s.attributes.map["data-mce-bogus"])continue;if(t[s.name])return!1;for(r=s.attributes.length;r--;)if("name"===(o=s.attributes[r].name)||0===o.indexOf("data-mce-bookmark"))return!1}if(8===s.type)return!1;if(3===s.type&&!n.test(s.value))return!1;if(3===s.type&&s.parent&&i[s.parent.name]&&n.test(s.value))return!1}while(s=e(s,a));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var r,o;if(r=new t(e,i[e]||1),n)for(o in n)r.attr(o,n[o]);return r},t}),o("tinymce/html/Schema",["tinymce/util/Tools"],function(e){function t(t,n){return t=e.trim(t),t?t.split(n||" "):[]}function n(e){function n(e,n,i){function r(e,t){var n,i,r={};for(n=0,i=e.length;n<i;n++)r[e[n]]=t||{};return r}var s,l,c;for(i=i||[],n=n||"","string"==typeof i&&(i=t(i)),e=t(e),s=e.length;s--;)l=t([a,n].join(" ")),c={attributes:r(l),attributesOrder:l,children:r(i,o)},m[e[s]]=c}function i(e,n){var i,r,o,a;for(e=t(e),i=e.length,n=t(n);i--;)for(r=m[e[i]],o=0,a=n.length;o<a;o++)r.attributes[n[o]]={},r.attributesOrder.push(n[o])}var a,l,c,u,d,f,m={};return r[e]?r[e]:(a="id accesskey class dir lang style tabindex title",l="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",c="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!=e&&(a+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",l+=" article aside details dialog figure header footer hgroup section nav",c+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!=e&&(a+=" xml:lang",f="acronym applet basefont big font strike tt",c=[c,f].join(" "),s(t(f),function(e){n(e,"",c)}),d="center dir isindex noframes",l=[l,d].join(" "),u=[l,c].join(" "),s(t(d),function(e){n(e,"",u)})),u=u||[l,c].join(" "),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",u),n("address dt dd div caption","",u),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",c),n("blockquote","cite",u),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",u),n("dl","","dt dd"),n("a","href target rel media hreflang type",c),n("q","cite",c),n("ins del","cite datetime",u),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",u),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",[u,"param"].join(" ")),n("param","name value"),n("map","name",[u,"area"].join(" ")),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",u),n("th","colspan rowspan headers scope abbr",u),n("form","accept-charset action autocomplete enctype method name novalidate target",u),n("fieldset","disabled form name",[u,"legend"].join(" ")),n("label","form for",c),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?u:c),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",[u,"li"].join(" ")),n("noscript","",u),"html4"!=e&&(n("wbr"),n("ruby","",[c,"rt rp"].join(" ")),n("figcaption","",u),n("mark rt rp summary bdi","",c),n("canvas","width height",u),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[u,"track source"].join(" ")),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[u,"track source"].join(" ")),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",[c,"option"].join(" ")),n("article section nav aside header footer","",u),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",[u,"figcaption"].join(" ")),n("time","datetime",c),n("dialog","open",u),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",c),n("progress","value max",c),n("meter","value min max low high optimum",c),n("details","open",[u,"summary"].join(" ")),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(i("script","language xml:space"),i("style","xml:space"),i("object","declare classid code codebase codetype archive standby align border hspace vspace"),i("embed","align name hspace vspace"),i("param","valuetype type"),i("a","charset name rev shape coords"),i("br","clear"),i("applet","codebase archive code object alt name width height align hspace vspace"),i("img","name longdesc align border hspace vspace"),i("iframe","longdesc frameborder marginwidth marginheight scrolling align"),i("font basefont","size color face"),i("input","usemap align"),i("select","onchange"),i("textarea"),i("h1 h2 h3 h4 h5 h6 div p legend caption","align"),i("ul","type compact"),i("li","type"),i("ol dl menu dir","compact"),i("pre","width xml:space"),i("hr","align noshade size width"),i("isindex","prompt"),i("table","summary width frame rules cellspacing cellpadding align bgcolor"),i("col","width align char charoff valign"),i("colgroup","width align char charoff valign"),i("thead","align char charoff valign"),i("tr","align char charoff valign bgcolor"),i("th","axis align char charoff valign nowrap bgcolor width height"),i("form","accept"),i("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),i("tfoot","align char charoff valign"),i("tbody","align char charoff valign"),i("area","nohref"),i("body","background bgcolor text link vlink alink")),"html4"!=e&&(i("input button select textarea","autofocus"),i("input textarea","placeholder"),i("a","download"),i("link script img","crossorigin"),i("iframe","sandbox seamless allowfullscreen")),s(t("a form meter progress dfn"),function(e){m[e]&&delete m[e].children[e]}),delete m.caption.children.table,delete m.script,r[e]=m,m)}function i(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),s(e,function(e,i){n[i]=n[i.toUpperCase()]="map"==t?a(e,/[, ]/):c(e,/[, ]/)})),n}var r={},o={},a=e.makeMap,s=e.each,l=e.extend,c=e.explode,u=e.inArray;return function(e){function o(t,n,i){var o=e[t];return o?o=a(o,/[, ]/,a(o.toUpperCase(),/[, ]/)):(o=r[t])||(o=a(n," ",a(n.toUpperCase()," ")),o=l(o,i),r[t]=o),o}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,i,r,o,s,l,c,f,m,p,h,g,v,y,b,C,T,S,x,w=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,E=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,A=/[*?+]/;if(e)for(e=t(e,","),_["@"]&&(C=_["@"].attributes,T=_["@"].attributesOrder),n=0,i=e.length;n<i;n++)if(s=w.exec(e[n])){if(y=s[1],m=s[2],b=s[3],f=s[5],g={},v=[],l={attributes:g,attributesOrder:v},"#"===y&&(l.paddEmpty=!0),"-"===y&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),C){for(S in C)g[S]=C[S];v.push.apply(v,T)}if(f)for(f=t(f,"|"),r=0,o=f.length;r<o;r++)if(s=E.exec(f[r])){if(c={},h=s[1],p=s[2].replace(/::/g,":"),y=s[3],x=s[4],"!"===h&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(p),c.required=!0),"-"===h){delete g[p],v.splice(u(v,p),1);continue}y&&("="===y&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:p,value:x}),c.defaultValue=x),":"===y&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:p,value:x}),c.forcedValue=x),"<"===y&&(c.validValues=a(x,"?"))),A.test(p)?(l.attributePatterns=l.attributePatterns||[],c.pattern=d(p),l.attributePatterns.push(c)):(g[p]||v.push(p),g[p]=c)}C||"@"!=m||(C=g,T=v),b&&(l.outputName=m,_[b]=l),A.test(m)?(l.pattern=d(m),R.push(l)):_[m]=l}}function m(e){_={},R=[],f(e),s(b,function(e,t){B[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(r.text_block_elements=r.block_elements=null,s(t(e,","),function(e){var t=n.exec(e),i="~"===t[1],r=i?"span":"div",o=t[2];if(B[o]=B[r],D[o]=r,i||(E[o.toUpperCase()]={},E[o]={}),!_[o]){var a=_[r];a=l({},a),delete a.removeEmptyAttrs,delete a.removeEmpty,_[o]=a}s(B,function(e,t){e[r]&&(B[t]=e=l({},B[t]),e[o]=e[r])})}))}function h(n){var i=/^([+\-]?)(\w+)\[([^\]]+)\]$/;r[e.schema]=null,n&&s(t(n,","),function(e){var n,r,o=i.exec(e);o&&(r=o[1],n=r?B[o[2]]:B[o[2]]={"#comment":{}},n=B[o[2]],s(t(o[3],"|"),function(e){"-"===r?delete n[e]:n[e]={}}))})}function g(e){var t,n=_[e];if(n)return n;for(t=R.length;t--;)if(n=R[t],n.pattern.test(e))return n}var v,y,b,C,T,S,x,w,E,A,N,P,k,M=this,_={},B={},R=[],D={},I={};e=e||{},b=n(e.schema),!1===e.verify_html&&(e.valid_elements="*[*]"),v=i(e.valid_styles),y=i(e.invalid_styles,"map"),w=i(e.valid_classes,"map"),C=o("whitespace_elements","pre script noscript style textarea video audio iframe object code"),T=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),S=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),x=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),A=o("non_empty_elements","td th iframe video audio object script pre code",S),N=o("move_caret_before_on_enter_elements","table",A),P=o("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),E=o("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption",P),k=o("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),s((e.special||"script noscript style textarea").split(" "),function(e){I[e]=new RegExp("</"+e+"[^>]*>","gi")}),e.valid_elements?m(e.valid_elements):(s(b,function(e,t){_[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},B[t]=e.children}),"html5"!=e.schema&&s(t("strong/b em/i"),function(e){e=t(e,"/"),_[e[1]].outputName=e[0]}),s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){_[e]&&(_[e].removeEmpty=!0)}),s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){_[e].paddEmpty=!0}),s(t("span"),function(e){_[e].removeEmptyAttrs=!0})),p(e.custom_elements),h(e.valid_children),f(e.extended_valid_elements),h("+ol[ul|ol],+ul[ul|ol]"),s({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,n){_[n]&&(_[n].parentsRequired=t(e))}),e.invalid_elements&&s(c(e.invalid_elements),function(e){_[e]&&delete _[e]}),g("span")||f("span[!data-mce-type|*]"),M.children=B,M.getValidStyles=function(){return v},M.getInvalidStyles=function(){return y},M.getValidClasses=function(){return w},M.getBoolAttrs=function(){return x},M.getBlockElements=function(){return E},M.getTextBlockElements=function(){return P},M.getTextInlineElements=function(){return k},M.getShortEndedElements=function(){return S},M.getSelfClosingElements=function(){return T},M.getNonEmptyElements=function(){return A},M.getMoveCaretBeforeOnEnterElements=function(){return N},M.getWhiteSpaceElements=function(){return C},M.getSpecialElements=function(){return I},M.isValidChild=function(e,t){var n=B[e];return!(!n||!n[t])},M.isValid=function(e,t){var n,i,r=g(e);if(r){if(!t)return!0;if(r.attributes[t])return!0;if(n=r.attributePatterns)for(i=n.length;i--;)if(n[i].pattern.test(e))return!0}return!1},M.getElementRule=g,M.getCustomElements=function(){return D},M.addValidElements=f,M.setValidElements=m,M.addCustomElements=p,M.addValidChildren=h,M.elements=_}}),o("tinymce/html/SaxParser",["tinymce/html/Schema","tinymce/html/Entities","tinymce/util/Tools"],function(e,t,n){function i(e,t,n){var i,r,o,a,s=1;for(a=e.getShortEndedElements(),o=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,o.lastIndex=i=n;r=o.exec(t);){if(i=o.lastIndex,"/"===r[1])s--;else if(!r[1]){if(r[2]in a)continue;s++}if(0===s)break}return i}function r(r,a){function s(){}var l=this;r=r||{},l.schema=a=a||new e,!1!==r.fix_self_closing&&(r.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=r[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=G.length;t--&&G[t].name!==e;);if(t>=0){for(n=G.length-1;n>=t;n--)e=G[n],e.valid&&L.end(e.name);G.length=t}}function s(e,t,n,i,o){var a,s;if(t=t.toLowerCase(),n=t in y?t:V(n||i||o||""),C&&!h&&0!==t.indexOf("data-")){if(!(a=E[t])&&A){for(s=A.length;s--&&(a=A[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(U[t]&&!r.allow_script_urls){var l=n.replace(/[\s\u0000-\u001F]+/g,"");try{l=decodeURIComponent(l)}catch(e){l=unescape(l)}if(W.test(l))return;if(!r.allow_html_data_urls&&z.test(l)&&!/^data:image\//i.test(l))return}d.map[t]=n,d.push({name:t,value:n})}var l,c,u,d,f,m,p,h,g,v,y,b,C,T,S,x,w,E,A,N,P,k,M,_,B,R,D,I,H,L=this,O=0,G=[],F=0,V=t.decode,U=n.makeMap("src,href,data,background,formaction,poster"),W=/((java|vb)script|mhtml):/i,z=/^data:/i;for(B=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),R=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,v=a.getShortEndedElements(),_=r.self_closing_elements||a.getSelfClosingElements(),y=a.getBoolAttrs(),C=r.validate,g=r.remove_internals,H=r.fix_self_closing,D=a.getSpecialElements();l=B.exec(e);){if(O<l.index&&L.text(V(e.substr(O,l.index-O))),c=l[6])c=c.toLowerCase(),":"===c.charAt(0)&&(c=c.substr(1)),o(c);else if(c=l[7]){if(c=c.toLowerCase(),":"===c.charAt(0)&&(c=c.substr(1)),b=c in v,H&&_[c]&&G.length>0&&G[G.length-1].name===c&&o(c),!C||(T=a.getElementRule(c))){if(S=!0,C&&(E=T.attributes,A=T.attributePatterns),(w=l[8])?(h=-1!==w.indexOf("data-mce-type"),h&&g&&(S=!1),d=[],d.map={},w.replace(R,s)):(d=[],d.map={}),C&&!h){if(N=T.attributesRequired,P=T.attributesDefault,k=T.attributesForced,M=T.removeEmptyAttrs,M&&!d.length&&(S=!1),k)for(f=k.length;f--;)x=k[f],p=x.name,I=x.value,"{$uid}"===I&&(I="mce_"+F++),d.map[p]=I,d.push({name:p,value:I});if(P)for(f=P.length;f--;)x=P[f],(p=x.name)in d.map||(I=x.value,"{$uid}"===I&&(I="mce_"+F++),d.map[p]=I,d.push({name:p,value:I}));if(N){for(f=N.length;f--&&!(N[f]in d.map););-1===f&&(S=!1)}if(x=d.map["data-mce-bogus"]){if("all"===x){O=i(a,e,B.lastIndex),B.lastIndex=O;continue}S=!1}}S&&L.start(c,d,b)}else S=!1;if(u=D[c]){u.lastIndex=O=l.index+l[0].length,(l=u.exec(e))?(S&&(m=e.substr(O,l.index-O)),O=l.index+l[0].length):(m=e.substr(O),O=e.length),S&&(m.length>0&&L.text(m,!0),L.end(c)),B.lastIndex=O;continue}b||(w&&w.indexOf("/")==w.length-1?S&&L.end(c):G.push({name:c,valid:S}))}else(c=l[1])?(">"===c.charAt(0)&&(c=" "+c),r.allow_conditional_comments||"[if"!==c.substr(0,3).toLowerCase()||(c=" "+c),L.comment(c)):(c=l[2])?L.cdata(c):(c=l[3])?L.doctype(c):(c=l[4])&&L.pi(c,l[5]);O=l.index+l[0].length}for(O<e.length&&L.text(V(e.substr(O))),f=G.length-1;f>=0;f--)c=G[f],c.valid&&L.end(c.name)}}var o=n.each;return r.findEndTag=i,r}),o("tinymce/html/DomParser",["tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/util/Tools"],function(e,t,n,i){var r=i.makeMap,o=i.each,a=i.explode,s=i.extend,l=function(t,n){t.padd_empty_with_br?n.empty().append(new e("br","1")).shortEnded=!0:n.empty().append(new e("#text","3")).value=" "},c=function(e,t){return e&&e.firstChild===e.lastChild&&e.firstChild.name===t};return function(u,d){function f(t){var n,i,o,a,s,l,u,f,p,h,g,v,y,b,C,T;for(v=r("tr,td,th,tbody,thead,tfoot,table"),h=d.getNonEmptyElements(),g=d.getWhiteSpaceElements(),y=d.getTextBlockElements(),b=d.getSpecialElements(),n=0;n<t.length;n++)if(i=t[n],i.parent&&!i.fixed)if(y[i.name]&&"li"==i.parent.name){for(C=i.next;C&&y[C.name];)C.name="li",C.fixed=!0,i.parent.insert(C,i.parent),C=C.next;i.unwrap(i)}else{for(a=[i],o=i.parent;o&&!d.isValidChild(o.name,i.name)&&!v[o.name];o=o.parent)a.push(o);if(o&&a.length>1){for(a.reverse(),s=l=m.filterNode(a[0].clone()),p=0;p<a.length-1;p++){for(d.isValidChild(l.name,a[p].name)?(u=m.filterNode(a[p].clone()),l.append(u)):u=l,f=a[p].firstChild;f&&f!=a[p+1];)T=f.next,u.append(f),f=T;l=u}s.isEmpty(h,g)?o.insert(i,a[0],!0):(o.insert(s,a[0],!0),o.insert(i,s)),o=a[0],(o.isEmpty(h,g)||c(o,"br"))&&o.empty().remove()}else if(i.parent){if("li"===i.name){if((C=i.prev)&&("ul"===C.name||"ul"===C.name)){C.append(i);continue}if((C=i.next)&&("ul"===C.name||"ul"===C.name)){C.insert(i,C.firstChild,!0);continue}i.wrap(m.filterNode(new e("ul",1)));continue}d.isValidChild(i.parent.name,"div")&&d.isValidChild("div",i.name)?i.wrap(m.filterNode(new e("div",1))):b[i.name]?i.empty().remove():i.unwrap()}}}var m=this,p={},h=[],g={},v={};u=u||{},u.validate=!("validate"in u)||u.validate,u.root_name=u.root_name||"body",m.schema=d=d||new t,m.filterNode=function(e){var t,n,i;n in p&&(i=g[n],i?i.push(e):g[n]=[e]),t=h.length;for(;t--;)(n=h[t].name)in e.attributes.map&&(i=v[n],i?i.push(e):v[n]=[e]);return e},m.addNodeFilter=function(e,t){o(a(e),function(e){var n=p[e];n||(p[e]=n=[]),n.push(t)})},m.addAttributeFilter=function(e,t){o(a(e),function(e){var n;for(n=0;n<h.length;n++)if(h[n].name===e)return void h[n].callbacks.push(t);h.push({name:e,callbacks:[t]})})},m.parse=function(t,i){function o(t,n){var i,r=new e(t,n);return t in p&&(i=g[t],i?i.push(r):g[t]=[r]),r}function a(e){var t,n,i,r,o=d.getBlockElements();for(t=e.prev;t&&3===t.type;){if(i=t.value.replace(M,""),i.length>0)return void(t.value=i);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}r=t.prev,t.remove(),t=r}}var c,m,y,b,C,T,S,x,w,E,A,N,P,k,M,_,B,R,D,I,H,L=[];if(i=i||{},g={},v={},N=s(r("script,style,head,html,body,title,meta,param"),d.getBlockElements()),I=d.getNonEmptyElements(),D=d.children,A=u.validate,H="forced_root_block"in i?i.forced_root_block:u.forced_root_block,R=d.getWhiteSpaceElements(),P=/^[ \t\r\n]+/,M=/[ \t\r\n]+$/,_=/[ \t\r\n]+/g,B=/^[ \t\r\n]+$/,c=new n({validate:A,allow_script_urls:u.allow_script_urls,allow_conditional_comments:u.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}(d.getSelfClosingElements()),cdata:function(e){y.append(o("#cdata",4)).value=e},text:function(e,t){var n;k||(e=e.replace(_," "),y.lastChild&&N[y.lastChild.name]&&(e=e.replace(P,""))),0!==e.length&&(n=o("#text",3),n.raw=!!t,y.append(n).value=e)},comment:function(e){y.append(o("#comment",8)).value=e},pi:function(e,t){y.append(o(e,7)).value=t,a(y)},doctype:function(e){var t;t=y.append(o("#doctype",10)),t.value=e,a(y)},start:function(e,t,n){var i,r,s,l,c;if(s=A?d.getElementRule(e):{}){for(i=o(s.outputName||e,1),i.attributes=t,i.shortEnded=n,y.append(i),c=D[y.name],c&&D[i.name]&&!c[i.name]&&L.push(i),r=h.length;r--;)(l=h[r].name)in t.map&&(w=v[l],w?w.push(i):v[l]=[i]);N[e]&&a(i),n||(y=i),!k&&R[e]&&(k=!0)}},end:function(e){var t,n,i,r,o;if(n=A?d.getElementRule(e):{}){if(N[e]&&!k){if((t=y.firstChild)&&3===t.type)if(i=t.value.replace(P,""),i.length>0)t.value=i,t=t.next;else for(r=t.next,t.remove(),t=r;t&&3===t.type;)i=t.value,r=t.next,(0===i.length||B.test(i))&&(t.remove(),t=r),t=r;if((t=y.lastChild)&&3===t.type)if(i=t.value.replace(M,""),i.length>0)t.value=i,t=t.prev;else for(r=t.prev,t.remove(),t=r;t&&3===t.type;)i=t.value,r=t.prev,(0===i.length||B.test(i))&&(t.remove(),t=r),t=r}if(k&&R[e]&&(k=!1),(n.removeEmpty||n.paddEmpty)&&y.isEmpty(I,R))if(n.paddEmpty)l(u,y);else if(!y.attributes.map.name&&!y.attributes.map.id)return o=y.parent,N[y.name]?y.empty().remove():y.unwrap(),void(y=o);y=y.parent}}},d),m=y=new e(i.context||u.root_name,11),c.parse(t),A&&L.length&&(i.context?i.invalid=!0:f(L)),H&&("body"==m.name||i.isRootContent)&&function(){function e(e){e&&(i=e.firstChild,i&&3==i.type&&(i.value=i.value.replace(P,"")),(i=e.lastChild)&&3==i.type&&(i.value=i.value.replace(M,"")))}var t,n,i=m.firstChild;if(d.isValidChild(m.name,H.toLowerCase())){for(;i;)t=i.next,3==i.type||1==i.type&&"p"!==i.name&&!N[i.name]&&!i.attr("data-mce-type")?n?n.append(i):(n=o(H,1),n.attr(u.forced_root_block_attrs),m.insert(n,i),n.append(i)):(e(n),n=null),i=t;e(n)}}(),!i.invalid){for(E in g){for(w=p[E],b=g[E],S=b.length;S--;)b[S].parent||b.splice(S,1);for(C=0,T=w.length;C<T;C++)w[C](b,E,i)}for(C=0,T=h.length;C<T;C++)if(w=h[C],w.name in v){for(b=v[w.name],S=b.length;S--;)b[S].parent||b.splice(S,1);for(S=0,x=w.callbacks.length;S<x;S++)w.callbacks[S](b,w.name,i)}}return m},u.remove_trailing_brs&&m.addNodeFilter("br",function(t){var n,i,r,o,a,c,f,m,p=t.length,h=s({},d.getBlockElements()),g=d.getNonEmptyElements(),v=d.getNonEmptyElements();for(h.body=1,n=0;n<p;n++)if(i=t[n],r=i.parent,h[i.parent.name]&&i===r.lastChild){for(a=i.prev;a;){if("span"!==(c=a.name)||"bookmark"!==a.attr("data-mce-type")){if("br"!==c)break;if("br"===c){i=null;break}}a=a.prev}i&&(i.remove(),r.isEmpty(g,v)&&(f=d.getElementRule(r.name))&&(f.removeEmpty?r.remove():f.paddEmpty&&l(u,r)))}else{for(o=i;r&&r.firstChild===o&&r.lastChild===o&&(o=r,!h[r.name]);)r=r.parent;o===r&&!0!==u.padd_empty_with_br&&(m=new e("#text",3),m.value=" ",i.replace(m))}}),u.allow_unsafe_link_target||m.addAttributeFilter("href",function(e){function t(e){return e=n(e),e?[e,s].join(" "):s}function n(e){var t=new RegExp("("+s.replace(" ","|")+")","g");return e&&(e=i.trim(e.replace(t,""))),e||null}for(var r,o,a=e.length,s="noopener noreferrer";a--;)r=e[a],o=r.attr("rel"),"a"===r.name&&r.attr("rel",function(e,i){return i?t(e):n(e)}(o,"_blank"==r.attr("target")))}),u.allow_html_in_named_anchor||m.addAttributeFilter("id,name",function(e){for(var t,n,i,r,o=e.length;o--;)if(r=e[o],"a"===r.name&&r.firstChild&&!r.attr("href")){i=r.parent,t=r.lastChild;do{n=t.prev,i.insert(t,r),t=n}while(t)}}),u.fix_list_elements&&m.addNodeFilter("ul,ol",function(t){for(var n,i,r=t.length;r--;)if(n=t[r],i=n.parent,"ul"===i.name||"ol"===i.name)if(n.prev&&"li"===n.prev.name)n.prev.append(n);else{var o=new e("li",1);o.attr("style","list-style-type: none"),n.wrap(o)}}),u.validate&&d.getValidClasses()&&m.addAttributeFilter("class",function(e){for(var t,n,i,r,o,a,s,l=e.length,c=d.getValidClasses();l--;){for(t=e[l],n=t.attr("class").split(" "),o="",i=0;i<n.length;i++)r=n[i],s=!1,a=c["*"],a&&a[r]&&(s=!0),a=c[t.name],!s&&a&&a[r]&&(s=!0),s&&(o&&(o+=" "),o+=r);o.length||(o=null),t.attr("class",o)}})}}),o("tinymce/html/Writer",["tinymce/html/Entities","tinymce/util/Tools"],function(e,t){var n=t.makeMap;return function(t){var i,r,o,a,s,l=[];return t=t||{},i=t.indent,r=n(t.indent_before||""),o=n(t.indent_after||""),a=e.getEncodeFunc(t.entity_encoding||"raw",t.entities),s="html"==t.element_format,{start:function(e,t,n){var c,u,d,f;if(i&&r[e]&&l.length>0&&(f=l[l.length-1],f.length>0&&"\n"!==f&&l.push("\n")),l.push("<",e),t)for(c=0,u=t.length;c<u;c++)d=t[c],l.push(" ",d.name,'="',a(d.value,!0),'"');l[l.length]=!n||s?">":" />",n&&i&&o[e]&&l.length>0&&(f=l[l.length-1],f.length>0&&"\n"!==f&&l.push("\n"))},end:function(e){var t;l.push("</",e,">"),i&&o[e]&&l.length>0&&(t=l[l.length-1],t.length>0&&"\n"!==t&&l.push("\n"))},text:function(e,t){e.length>0&&(l[l.length]=t?e:a(e))},cdata:function(e){l.push("<![CDATA[",e,"]]>")},comment:function(e){l.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?l.push("<?",e," ",a(t),"?>"):l.push("<?",e,"?>"),i&&l.push("\n")},doctype:function(e){l.push("<!DOCTYPE",e,">",i?"\n":"")},reset:function(){l.length=0},getContent:function(){return l.join("").replace(/\n$/,"")}}}}),o("tinymce/html/Serializer",["tinymce/html/Writer","tinymce/html/Schema"],function(e,t){return function(n,i){var r=this,o=new e(n);n=n||{},n.validate=!("validate"in n)||n.validate,r.schema=i=i||new t,r.writer=o,r.serialize=function(e){function t(e){var n,s,l,c,u,d,f,m,p,h=r[e.type];if(h)h(e);else{if(n=e.name,s=e.shortEnded,l=e.attributes,a&&l&&l.length>1&&(d=[],d.map={},p=i.getElementRule(e.name))){for(f=0,m=p.attributesOrder.length;f<m;f++)(c=p.attributesOrder[f])in l.map&&(u=l.map[c],d.map[c]=u,d.push({name:c,value:u}));for(f=0,m=l.length;f<m;f++)(c=l[f].name)in d.map||(u=l.map[c],d.map[c]=u,d.push({name:c,value:u}));l=d}if(o.start(e.name,l,s),!s){if(e=e.firstChild)do{t(e)}while(e=e.next);o.end(n)}}}var r,a;return a=n.validate,r={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do{t(e)}while(e=e.next)}},o.reset(),1!=e.type||n.inner?r[11](e):t(e),o.getContent()}}}),o("tinymce/dom/Serializer",["tinymce/dom/DOMUtils","tinymce/html/DomParser","tinymce/html/SaxParser","tinymce/html/Entities","tinymce/html/Serializer","tinymce/html/Node","tinymce/html/Schema","tinymce/Env","tinymce/util/Tools","tinymce/text/Zwsp"],function(e,t,n,i,r,o,a,s,l,c){function u(e){function t(e){return e&&"br"===e.name}var n,i;n=e.lastChild,t(n)&&(i=n.prev,t(i)&&(n.remove(),i.remove()))}var d=l.each,f=l.trim,m=e.DOM;return function(e,o){function p(e){var t=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[​\ufeff]+<\\/span>","\\s?("+T.join("|")+')="[^"]+"'].join("|"),"gi");return e=c.trim(e.replace(t,""))}function h(e){var t,i,r,a,s,l=e,c=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,u=o.schema;for(l=p(l),s=u.getShortEndedElements();a=c.exec(l);)i=c.lastIndex,r=a[0].length,t=s[a[1]]?i:n.findEndTag(u,l,i),l=l.substring(0,i-r)+l.substring(t),c.lastIndex=i-r;return l}function g(){return h(o.getBody().innerHTML)}function v(e){-1===l.inArray(T,e)&&(C.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),T.push(e))}var y,b,C,T=["data-mce-selected"];return o&&(y=o.dom,b=o.schema),y=y||m,b=b||new a(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=!("remove_trailing_brs"in e)||e.remove_trailing_brs,C=new t(e,b),C.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,i=e.length;i--;)n=e[i],n.attr("tabindex",n.attributes.map["data-mce-tabindex"]),n.attr(t,null)}),C.addAttributeFilter("src,href,style",function(t,n){for(var i,r,o=t.length,a="data-mce-"+n,s=e.url_converter,l=e.url_converter_scope;o--;)i=t[o],r=i.attributes.map[a],void 0!==r?(i.attr(n,r.length>0?r:null),i.attr(a,null)):(r=i.attributes.map[n],"style"===n?r=y.serializeStyle(y.parseStyle(r),i.name):s&&(r=s.call(l,r,n,i.name)),i.attr(n,r.length>0?r:null))}),C.addAttributeFilter("class",function(e){for(var t,n,i=e.length;i--;)t=e[i],(n=t.attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",n.length>0?n:null))}),C.addAttributeFilter("data-mce-type",function(e,t,n){for(var i,r=e.length;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),C.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=i.decode(t.value))}),C.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var i,r,o,a=e.length;a--;)i=e[a],r=i.firstChild?i.firstChild.value:"","script"===t?(o=i.attr("type"),o&&i.attr("type","mce-no/type"==o?null:o.replace(/^mce\-/,"")),r.length>0&&(i.firstChild.value="// <![CDATA[\n"+n(r)+"\n// ]]>")):r.length>0&&(i.firstChild.value="\x3c!--\n"+n(r)+"\n--\x3e")}),C.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)t=e[n],0===t.value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),C.addNodeFilter("xml:namespace,input",function(e,t){for(var n,i=e.length;i--;)n=e[i],7===n.type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),C.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:b,addNodeFilter:C.addNodeFilter,addAttributeFilter:C.addAttributeFilter,serialize:function(t,n){var i,o,a,l,m,p,h=this;return s.ie&&y.select("script,style,select,map").length>0?(m=t.innerHTML,t=t.cloneNode(!1),y.setHTML(t,m)):t=t.cloneNode(!0),i=document.implementation,i.createHTMLDocument&&(o=i.createHTMLDocument(""),d("BODY"==t.nodeName?t.childNodes:[t],function(e){o.body.appendChild(o.importNode(e,!0))}),t="BODY"!=t.nodeName?o.body.firstChild:o.body,a=y.doc,y.doc=o),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,h.onPreProcess(n)),p=C.parse(f(n.getInner?t.innerHTML:y.getOuterHTML(t)),n),u(p),l=new r(e,b),n.content=l.serialize(p),n.cleanup||(n.content=c.trim(n.content),n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||h.onPostProcess(n),a&&(y.doc=a),n.node=null,n.content},addRules:function(e){b.addValidElements(e)},setRules:function(e){b.setValidElements(e)},onPreProcess:function(e){o&&o.fire("PreProcess",e)},onPostProcess:function(e){o&&o.fire("PostProcess",e)},addTempAttr:v,trimHtml:p,getTrimmedContent:g,trimContent:h}}}),o("tinymce/dom/TridentSelection",[],function(){function e(e){function t(t,n){var i,r,o,a,s,l,c,u,d=0,f=-1;if(i=t.duplicate(),i.collapse(n),u=i.parentElement(),u.ownerDocument===e.dom.doc){for(;"false"===u.contentEditable;)u=u.parentNode;if(!u.hasChildNodes())return{node:u,inside:1};for(a=u.children,r=a.length-1;d<=r;)if(c=Math.floor((d+r)/2),s=a[c],i.moveToElementText(s),(f=i.compareEndPoints(n?"StartToStart":"EndToEnd",t))>0)r=c-1;else{if(!(f<0))return{node:s};d=c+1}if(f<0)for(s?i.collapse(!1):(i.moveToElementText(u),i.collapse(!0),s=u,o=!0),l=0;0!==i.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==i.move("character",1)&&u==i.parentElement();)l++;else for(i.collapse(!0),l=0;0!==i.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==i.move("character",-1)&&u==i.parentElement();)l++;return{node:s,position:f,offset:l,inside:o}}}function n(){function n(e){var n,i,r,o,a=t(u,e),s=0;if(n=a.node,i=a.offset,a.inside&&!n.hasChildNodes())return void d[e?"setStart":"setEnd"](n,0);if(void 0===i)return void d[e?"setStartBefore":"setEndAfter"](n);if(a.position<0){if(!(r=a.inside?n.firstChild:n.nextSibling))return void d[e?"setStartAfter":"setEndAfter"](n);if(!i)return void(3==r.nodeType?d[e?"setStart":"setEnd"](r,0):d[e?"setStartBefore":"setEndBefore"](r));for(;r;){if(3==r.nodeType&&(o=r.nodeValue,(s+=o.length)>=i)){n=r,s-=i,s=o.length-s;break}r=r.nextSibling}}else{if(!(r=n.previousSibling))return d[e?"setStartBefore":"setEndBefore"](n);if(!i)return void(3==n.nodeType?d[e?"setStart":"setEnd"](r,n.nodeValue.length):d[e?"setStartAfter":"setEndAfter"](r));for(;r;){if(3==r.nodeType&&(s+=r.nodeValue.length)>=i){n=r,s-=i;break}r=r.previousSibling}}d[e?"setStart":"setEnd"](n,s)}var o,a,s,l,c,u=e.getRng(),d=r.createRng();if(o=u.item?u.item(0):u.parentElement(),o.ownerDocument!=r.doc)return d;if(a=e.isCollapsed(),u.item)return d.setStart(o.parentNode,r.nodeIndex(o)),d.setEnd(d.startContainer,d.startOffset+1),d;try{n(!0),a||n()}catch(t){if(-2147024809!=t.number)throw t;c=i.getBookmark(2),s=u.duplicate(),s.collapse(!0),o=s.parentElement(),a||(s=u.duplicate(),s.collapse(!1),l=s.parentElement(),l.innerHTML=l.innerHTML),o.innerHTML=o.innerHTML,i.moveToBookmark(c),u=e.getRng(),n(!0),a||n()}return d}var i=this,r=e.dom;this.getBookmark=function(n){function i(e){var t,n,i,o,a=[];for(t=e.parentNode,n=r.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(i=t.children,o=i.length;o--;)if(e===i[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;if(n=t(a,e))return{position:n.position,offset:n.offset,indexes:i(n.node),inside:n.inside}}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:i(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,i,o;for(t=r.getRoot(),n=e.length-1;n>=0;n--)o=t.children,(i=e[n])<=o.length-1&&(t=o[i]);return t}function n(n){var r,a,s,l=e[n?"start":"end"];l&&(r=l.position>0,a=o.createTextRange(),a.moveToElementText(t(l.indexes)),s=l.offset,void 0!==s?(a.collapse(l.inside||r),a.moveStart("character",r?-s:s)):a.collapse(n),i.setEndPoint(n?"StartToStart":"EndToStart",a),n&&i.collapse(!0))}var i,o=r.doc.body;e.start&&(e.start.ctrl?(i=o.createControlRange(),i.addElement(t(e.start.indexes)),i.select()):(i=o.createTextRange(),n(!0),n(),i.select()))},this.addRange=function(t){function n(e){var t,n,o,u,d;o=r.create("a"),t=e?a:l,n=e?s:c,u=i.duplicate(),t!=m&&t!=m.documentElement||(t=p,n=0),3==t.nodeType?(t.parentNode.insertBefore(o,t),u.moveToElementText(o),u.moveStart("character",n),r.remove(o),i.setEndPoint(e?"StartToStart":"EndToEnd",u)):(d=t.childNodes,d.length?(n>=d.length?r.insertAfter(o,d[d.length-1]):t.insertBefore(o,d[n]),u.moveToElementText(o)):t.canHaveHTML&&(t.innerHTML="<span>&#xFEFF;</span>",o=t.firstChild,u.moveToElementText(o),u.collapse(!1)),i.setEndPoint(e?"StartToStart":"EndToEnd",u),r.remove(o))}var i,o,a,s,l,c,u,d,f,m=e.dom.doc,p=m.body;if(a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset,i=p.createTextRange(),a==l&&1==a.nodeType){if(s==c&&!a.hasChildNodes()){if(a.canHaveHTML)return u=a.previousSibling,u&&!u.hasChildNodes()&&r.isBlock(u)?u.innerHTML="&#xFEFF;":u=null,a.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>",i.moveToElementText(a.lastChild),i.select(),r.doc.selection.clear(),a.innerHTML="",void(u&&(u.innerHTML=""));s=r.nodeIndex(a),a=a.parentNode}if(s==c-1)try{if(f=a.childNodes[s],o=p.createControlRange(),o.addElement(f),o.select(),d=e.getRng(),d.item&&f===d.item(0))return}catch(e){}}n(!0),n(),i.select()},this.getRangeAt=n}return e}),o("tinymce/util/VK",["tinymce/Env"],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),o("tinymce/dom/ControlSelection",["tinymce/util/VK","tinymce/util/Tools","tinymce/util/Delay","tinymce/Env","tinymce/dom/NodeType"],function(e,t,n,i,r){function o(e,t){for(;t&&t!=e;){if(s(t)||a(t))return t;t=t.parentNode}return null}var a=r.isContentEditableFalse,s=r.isContentEditableTrue;return function(r,s){function l(e){var t=s.settings.object_resizing;return!1!==t&&!i.iOS&&("string"!=typeof t&&(t="table,img,div"),"false"!==e.getAttribute("data-mce-resize")&&(e!=s.getBody()&&s.dom.is(e,t)))}function c(t){var n,i,r,o,a;n=t.screenX-_,i=t.screenY-B,G=n*k[2]+I,F=i*k[3]+H,G=G<5?5:G,F=F<5?5:F,r="IMG"==E.nodeName&&!1!==s.settings.resize_img_proportional?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==E.nodeName&&k[2]*k[3]!=0,r&&($(n)>$(i)?(F=q(G*L),G=q(F/L)):(G=q(F/L),F=q(G*L))),W.setStyles(A,{width:G,height:F}),o=k.startPos.x+n,a=k.startPos.y+i,o=o>0?o:0,a=a>0?a:0,W.setStyles(N,{left:o,top:a,display:"block"}),N.innerHTML=G+" &times; "+F,k[2]<0&&A.clientWidth<=G&&W.setStyle(A,"left",R+(I-G)),k[3]<0&&A.clientHeight<=F&&W.setStyle(A,"top",D+(H-F)),n=Y.scrollWidth-V,i=Y.scrollHeight-U,n+i!==0&&W.setStyles(N,{left:o-n,top:a-i}),O||(s.fire("ObjectResizeStart",{target:E,width:I,height:H}),O=!0)}function u(){function e(e,t){t&&(E.style[e]||!s.schema.isValid(E.nodeName.toLowerCase(),e)?W.setStyle(E,e,t):W.setAttrib(E,e,t))}O=!1,e("width",G),e("height",F),W.unbind(X,"mousemove",c),W.unbind(X,"mouseup",u),K!=X&&(W.unbind(K,"mousemove",c),W.unbind(K,"mouseup",u)),W.remove(A),W.remove(N),j&&"TABLE"!=E.nodeName||d(E),s.fire("ObjectResized",{target:E,width:G,height:F}),W.setAttrib(E,"style",W.getAttrib(E,"style")),s.nodeChanged()}function d(e,t,n){var r,o,a,d,m;f(),T(),r=W.getPos(e,Y),R=r.x,D=r.y,m=e.getBoundingClientRect(),o=m.width||m.right-m.left,a=m.height||m.bottom-m.top,E!=e&&(C(),E=e,G=F=0),d=s.fire("ObjectSelected",{target:e}),l(e)&&!d.isDefaultPrevented()?z(P,function(e,r){function s(t){_=t.screenX,B=t.screenY,I=E.clientWidth,H=E.clientHeight,L=H/I,k=e,e.startPos={x:o*e[0]+R,y:a*e[1]+D},V=Y.scrollWidth,U=Y.scrollHeight,A=E.cloneNode(!0),W.addClass(A,"mce-clonedresizable"),W.setAttrib(A,"data-mce-bogus","all"),A.contentEditable=!1,A.unSelectabe=!0,W.setStyles(A,{left:R,top:D,margin:0}),A.removeAttribute("data-mce-selected"),Y.appendChild(A),W.bind(X,"mousemove",c),W.bind(X,"mouseup",u),K!=X&&(W.bind(K,"mousemove",c),W.bind(K,"mouseup",u)),N=W.add(Y,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},I+" &times; "+H)}var l;if(t)return void(r==t&&s(n));l=W.get("mceResizeHandle"+r),l&&W.remove(l),l=W.add(Y,"div",{id:"mceResizeHandle"+r,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+r+"-resize; margin:0; padding:0"}),i.ie&&(l.contentEditable=!1),W.bind(l,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),s(e)}),e.elm=l,W.setStyles(l,{left:o*e[0]+R-l.offsetWidth/2,top:a*e[1]+D-l.offsetHeight/2})}):f(),E.setAttribute("data-mce-selected","1")}function f(){var e,t;T(),E&&E.removeAttribute("data-mce-selected");for(e in P)(t=W.get("mceResizeHandle"+e))&&(W.unbind(t),W.remove(t))}function m(e){function t(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)}var n,i;if(!O&&!s.removed){if(z(W.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),i="mousedown"==e.type?e.target:r.getNode(),i=W.$(i).closest(j?"table":"table,img,hr")[0],t(i,Y)&&(S(),n=r.getStart(!0),t(n,i)&&t(r.getEnd(!0),i)&&(!j||i!=n&&"IMG"!==n.nodeName)))return void d(i);f()}}function p(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function h(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function g(e){var t,n,i,r,o,a,l,c=e.srcElement;t=c.getBoundingClientRect(),a=M.clientX-t.left,l=M.clientY-t.top;for(n in P)if(i=P[n],r=c.offsetWidth*i[0],o=c.offsetHeight*i[1],$(r-a)<8&&$(o-l)<8){k=i;break}O=!0,s.fire("ObjectResizeStart",{target:E,width:E.clientWidth,height:E.clientHeight}),s.getDoc().selection.empty(),d(c,n,M)}function v(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function y(e){return a(o(s.getBody(),e))}function b(e){var t=e.srcElement;if(y(t))return void v(e);if(t!=E){if(s.fire("ObjectSelected",{target:t}),C(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=t.nodeName&&"TABLE"!=t.nodeName||(f(),E=t,p(t,"resizestart",g))}}function C(){h(E,"resizestart",g)}function T(){for(var e in P){var t=P[e];t.elm&&(W.unbind(t.elm),delete t.elm)}}function S(){try{s.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function x(e){var t;if(j){t=X.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(e){}}}function w(){E=A=null,j&&(C(),h(Y,"controlselect",b))}var E,A,N,P,k,M,_,B,R,D,I,H,L,O,G,F,V,U,W=s.dom,z=t.each,X=s.getDoc(),K=document,j=i.ie&&i.ie<11,$=Math.abs,q=Math.round,Y=s.getBody();P={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var Q=".mce-content-body";return s.contentStyles.push(Q+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+Q+" .mce-resizehandle:hover {background: #000}"+Q+" img[data-mce-selected],"+Q+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+Q+" .mce-clonedresizable {position: absolute;"+(i.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+Q+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),s.on("init",function(){j?(s.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(f(),x(e.target))}),p(Y,"controlselect",b),s.on("mousedown",function(e){M=e})):(S(),i.ie>=11&&(s.on("mousedown click",function(e){var t=e.target,n=t.nodeName;O||!/^(TABLE|IMG|HR)$/.test(n)||y(t)||(s.selection.select(t,"TABLE"==n),"mousedown"==e.type&&s.nodeChanged())}),s.dom.bind(Y,"mscontrolselect",function(e){function t(e){n.setEditorTimeout(s,function(){s.selection.select(e)})}if(y(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&t(e.target))})));var e=n.throttle(function(e){s.composing||m(e)});s.on("nodechange ResizeEditor ResizeWindow drop",e),s.on("keyup compositionend",function(t){E&&"TABLE"==E.nodeName&&e(t)}),s.on("hide blur",f)}),s.on("remove",T),{isResizable:l,showResizeRect:d,hideResizeRect:f,updateResizeRect:m,controlSelect:x,destroy:w}}}),o("tinymce/util/Fun",[],function(){function e(e){return function(){return e}}function t(e){return function(t){return!e(t)}}function n(e,t){return function(n){return e(t(n))}}function i(){var e=s.call(arguments);return function(t){for(var n=0;n<e.length;n++)if(e[n](t))return!0;return!1}}function r(){var e=s.call(arguments);return function(t){for(var n=0;n<e.length;n++)if(!e[n](t))return!1;return!0}}function o(e){var t=s.call(arguments);return t.length-1>=e.length?e.apply(this,t.slice(1)):function(){var e=t.concat([].slice.call(arguments));return o.apply(this,e)}}function a(){}var s=[].slice;return{constant:e,negate:t,and:r,or:i,curry:o,compose:n,noop:a}}),o("tinymce/caret/CaretCandidate",["tinymce/dom/NodeType","tinymce/util/Arr","tinymce/caret/CaretContainer"],function(e,t,n){function i(e){return!h(e)&&(d(e)?!f(e.parentNode):m(e)||u(e)||p(e)||c(e))}function r(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(c(e))return!1;if(l(e))return!0}return!0}function o(e){return!!c(e)&&!0!==t.reduce(e.getElementsByTagName("*"),function(e,t){return e||l(t)},!1)}function a(e){return m(e)||o(e)}function s(e,t){return i(e)&&r(e,t)}var l=e.isContentEditableTrue,c=e.isContentEditableFalse,u=e.isBr,d=e.isText,f=e.matchNodeNames("script style textarea"),m=e.matchNodeNames("img input textarea hr iframe video audio object"),p=e.matchNodeNames("table"),h=n.isCaretContainer;return{isCaretCandidate:i,isInEditable:r,isAtomic:a,isEditableCaretCandidate:s}}),o("tinymce/geom/ClientRect",[],function(){function e(e){return e?{left:u(e.left),top:u(e.top),bottom:u(e.bottom),right:u(e.right),width:u(e.width),height:u(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function t(t,n){return t=e(t),n?t.right=t.left:(t.left=t.left+t.width,t.right=t.left),t.width=0,t}function n(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}function i(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2}function r(e,t){return e.bottom<t.top||!(e.top>t.bottom)&&i(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&i(t.bottom-e.top,e,t)}function a(e,t){return e.left<t.left}function s(e,t){return e.right>t.right}function l(e,t){return r(e,t)?-1:o(e,t)?1:a(e,t)?-1:s(e,t)?1:0}function c(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}var u=Math.round;return{clone:e,collapse:t,isEqual:n,isAbove:r,isBelow:o,isLeft:a,isRight:s,compare:l,containsXY:c}}),o("tinymce/text/ExtendingChar",[],function(){function e(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&t.test(e)}var t=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯ﾞ-ﾟ]");return{isExtendingChar:e}}),o("tinymce/caret/CaretPosition",["tinymce/util/Fun","tinymce/dom/NodeType","tinymce/dom/DOMUtils","tinymce/dom/RangeUtils","tinymce/caret/CaretCandidate","tinymce/geom/ClientRect","tinymce/text/ExtendingChar"],function(e,t,n,i,r,o,a){function s(e){return"createRange"in e?e.createRange():n.DOM.createRng()}function l(e){return e&&/[\r\n\t ]/.test(e)}function c(e){var t,n=e.startContainer,i=e.startOffset;return!!(l(e.toString())&&v(n.parentNode)&&(t=n.data,l(t[i-1])||l(t[i+1])))}function u(e){function t(e){var t,n=e.ownerDocument,i=s(n),r=n.createTextNode(" "),a=e.parentNode;return a.insertBefore(r,e),i.setStart(r,0),i.setEnd(r,1),t=o.clone(i.getBoundingClientRect()),a.removeChild(r),t}function n(e){var n,i;return i=e.getClientRects(),n=i.length>0?o.clone(i[0]):o.clone(e.getBoundingClientRect()),b(e)&&0===n.left?t(e):n}function i(e,t){return e=o.collapse(e,t),e.width=1,e.right=e.left+1,e}function r(e){0!==e.height&&(m.length>0&&o.isEqual(e,m[m.length-1])||m.push(e))}function l(e,t){var o=s(e.ownerDocument);if(t<e.data.length){if(a.isExtendingChar(e.data[t]))return m;if(a.isExtendingChar(e.data[t-1])&&(o.setStart(e,t),o.setEnd(e,t+1),!c(o)))return r(i(n(o),!1)),m}t>0&&(o.setStart(e,t-1),o.setEnd(e,t),c(o)||r(i(n(o),!1))),t<e.data.length&&(o.setStart(e,t),o.setEnd(e,t+1),c(o)||r(i(n(o),!0)))}var u,d,m=[];if(y(e.container()))return l(e.container(),e.offset()),m;if(f(e.container()))if(e.isAtEnd())d=T(e.container(),e.offset()),y(d)&&l(d,d.data.length),g(d)&&!b(d)&&r(i(n(d),!1));else{if(d=T(e.container(),e.offset()),y(d)&&l(d,0),g(d)&&e.isAtEnd())return r(i(n(d),!1)),m;u=T(e.container(),e.offset()-1),g(u)&&!b(u)&&(p(u)||p(d)||!g(d))&&r(i(n(u),!1)),g(d)&&r(i(n(d),!0))}return m}function d(t,n,i){function r(){return y(t),0===n}function o(){return y(t)?n>=t.data.length:n>=t.childNodes.length}function a(){var e;return e=s(t.ownerDocument),e.setStart(t,n),e.setEnd(t,n),e}function l(){return i||(i=u(new d(t,n))),i}function c(){return l().length>0}function f(e){return e&&t===e.container()&&n===e.offset()}function m(e){return T(t,e?n-1:n)}return{container:e.constant(t),offset:e.constant(n),toRange:a,getClientRects:l,isVisible:c,isAtStart:r,isAtEnd:o,isEqual:f,getNode:m}}var f=t.isElement,m=r.isCaretCandidate,p=t.matchStyleValues("display","block table"),h=t.matchStyleValues("float","left right"),g=e.and(f,m,e.negate(h)),v=e.negate(t.matchStyleValues("white-space","pre pre-line pre-wrap")),y=t.isText,b=t.isBr,C=n.nodeIndex,T=i.getNode;return d.fromRangeStart=function(e){return new d(e.startContainer,e.startOffset)},d.fromRangeEnd=function(e){return new d(e.endContainer,e.endOffset)},d.after=function(e){return new d(e.parentNode,C(e)+1)},d.before=function(e){return new d(e.parentNode,C(e))},d}),o("tinymce/caret/CaretBookmark",["tinymce/dom/NodeType","tinymce/dom/DOMUtils","tinymce/util/Fun","tinymce/util/Arr","tinymce/caret/CaretPosition"],function(e,t,n,i,r){function o(e){var t=e.parentNode;return v(t)?o(t):t}function a(e){return e?i.reduce(e.childNodes,function(e,t){return v(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function s(e,t){for(;(e=e.previousSibling)&&g(e);)t+=e.data.length;return t}function l(e){return function(t){return e===t}}function c(t){var n,r,s;return n=a(o(t)),r=i.findIndex(n,l(t),t),n=n.slice(0,r+1),s=i.reduce(n,function(e,t,i){return g(t)&&g(n[i-1])&&e++,e},0),n=i.filter(n,e.matchNodeNames(t.nodeName)),(r=i.findIndex(n,l(t),t))-s}function u(e){return(g(e)?"text()":e.nodeName.toLowerCase())+"["+c(e)+"]"}function d(e,t,n){var i=[];for(t=t.parentNode;t!=e&&(!n||!n(t));t=t.parentNode)i.push(t);return i}function f(t,r){var o,a,l,c,f,m=[];return o=r.container(),a=r.offset(),g(o)?l=s(o,a):(c=o.childNodes,a>=c.length?(l="after",a=c.length-1):l="before",o=c[a]),m.push(u(o)),f=d(t,o),f=i.filter(f,n.negate(e.isBogus)),m=m.concat(i.map(f,function(e){return u(e)})),m.reverse().join("/")+","+l}function m(t,n,r){var o=a(t);return o=i.filter(o,function(e,t){return!g(e)||!g(o[t-1])}),o=i.filter(o,e.matchNodeNames(n)),o[r]}function p(e,t){for(var n,i=e,o=0;g(i);){if(n=i.data.length,t>=o&&t<=o+n){e=i,t-=o;break}if(!g(i.nextSibling)){e=i,t=n;break}o+=n,i=i.nextSibling}return t>e.data.length&&(t=e.data.length),new r(e,t)}function h(e,t){var n,o,a;return t?(n=t.split(","),t=n[0].split("/"),a=n.length>1?n[1]:"before",o=i.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),m(e,t[1],parseInt(t[2],10))):null},e),o?g(o)?p(o,parseInt(a,10)):(a="after"===a?y(o)+1:y(o),new r(o.parentNode,a)):null):null}var g=e.isText,v=e.isBogus,y=t.nodeIndex;return{create:f,resolve:h}}),o("tinymce/dom/BookmarkManager",["tinymce/Env","tinymce/util/Tools","tinymce/caret/CaretContainer","tinymce/caret/CaretBookmark","tinymce/caret/CaretPosition","tinymce/dom/NodeType","tinymce/dom/RangeUtils"],function(e,t,n,i,r,o,a){function s(s){var c=s.dom;this.getBookmark=function(e,u){function d(e,n){var i=0;return t.each(c.select(e),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!=n&&void i++}),i}function f(e){function t(t){var n,i,r,o=t?"start":"end";n=e[o+"Container"],i=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(r=n.childNodes,(n=r[Math.min(t?i:i-1,r.length-1)])&&(i=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,i)))}return t(!0),t(),e}var m,p,h,g,v,y,b,C="&#xFEFF;";if(2==e)return y=s.getNode(),v=y?y.nodeName:null,m=s.getRng(),l(y)||"IMG"==v?{name:v,index:d(v,y)}:s.tridentSel?s.tridentSel.getBookmark(e):(y=function(e){function t(e,t){var i;if(o.isElement(e)&&(e=a.getNode(e,t),l(e)))return e;if(n.isCaretContainer(e)){if(o.isText(e)&&n.isCaretContainerBlock(e)&&(e=e.parentNode),i=e.previousSibling,l(i))return i;if(i=e.nextSibling,l(i))return i}}return t(e.startContainer,e.startOffset)||t(e.endContainer,e.endOffset)}(m),y?(v=y.tagName,{name:v,index:d(v,y)}):function(e){function t(e,t){var i,r,o=e[t?"startContainer":"endContainer"],a=e[t?"startOffset":"endOffset"],s=[],l=0;if(3==o.nodeType){if(u)for(i=o.previousSibling;i&&3==i.nodeType;i=i.previousSibling)a+=i.nodeValue.length;s.push(a)}else r=o.childNodes,a>=r.length&&r.length&&(l=1,a=Math.max(0,r.length-1)),s.push(c.nodeIndex(r[a],u)+l);for(;o&&o!=n;o=o.parentNode)s.push(c.nodeIndex(o,u));return s}var n=c.getRoot(),i={};return i.start=t(e,!0),s.isCollapsed()||(i.end=t(e)),i}(m));if(3==e)return m=s.getRng(),{start:i.create(c.getRoot(),r.fromRangeStart(m)),end:i.create(c.getRoot(),r.fromRangeEnd(m))};if(e)return{rng:s.getRng()};if(m=s.getRng(),h=c.uniqueId(),g=s.isCollapsed(),b="overflow:hidden;line-height:0px",m.duplicate||m.item){if(m.item)return y=m.item(0),v=y.nodeName,{name:v,index:d(v,y)};p=m.duplicate();try{m.collapse(),m.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_start" style="'+b+'">'+C+"</span>"),g||(p.collapse(!1),m.moveToElementText(p.parentElement()),0===m.compareEndPoints("StartToEnd",p)&&p.move("character",-1),p.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_end" style="'+b+'">'+C+"</span>"))}catch(e){return null}}else{if(y=s.getNode(),"IMG"==(v=y.nodeName))return{name:v,index:d(v,y)};p=f(m.cloneRange()),g||(p.collapse(!1),p.insertNode(c.create("span",{"data-mce-type":"bookmark",id:h+"_end",style:b},C))),m=f(m),m.collapse(!0),m.insertNode(c.create("span",{"data-mce-type":"bookmark",id:h+"_start",style:b},C))}return s.moveToBookmark({id:h,keep:1}),{id:h}},this.moveToBookmark=function(n){function r(e){var t,i,r,o,a=n[e?"start":"end"];if(a){for(r=a[0],i=u,t=a.length-1;t>=1;t--){if(o=i.childNodes,a[t]>o.length-1)return;i=o[a[t]]}3===i.nodeType&&(r=Math.min(a[0],i.nodeValue.length)),1===i.nodeType&&(r=Math.min(a[0],i.childNodes.length)),e?l.setStart(i,r):l.setEnd(i,r)}return!0}function o(i){var r,o,a,s,l=c.get(n.id+"_"+i),u=n.keep;if(l&&(r=l.parentNode,"start"==i?(u?(r=l.firstChild,o=1):o=c.nodeIndex(l),d=f=r,m=p=o):(u?(r=l.firstChild,o=1):o=c.nodeIndex(l),f=r,p=o),!u)){for(s=l.previousSibling,a=l.nextSibling,t.each(t.grep(l.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});l=c.get(n.id+"_"+i);)c.remove(l,1);s&&a&&s.nodeType==a.nodeType&&3==s.nodeType&&!e.opera&&(o=s.nodeValue.length,s.appendData(a.nodeValue),c.remove(a),"start"==i?(d=f=s,m=p=o):(f=s,p=o))}}function a(t){return!c.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t}var l,u,d,f,m,p;if(n)if(t.isArray(n.start)){if(l=c.createRng(),u=c.getRoot(),s.tridentSel)return s.tridentSel.moveToBookmark(n);r(!0)&&r()&&s.setRng(l)}else"string"==typeof n.start?s.setRng(function(){var e,t;return e=c.createRng(),t=i.resolve(c.getRoot(),n.start),e.setStart(t.container(),t.offset()),t=i.resolve(c.getRoot(),n.end),e.setEnd(t.container(),t.offset()),e}()):n.id?(o("start"),o("end"),d&&(l=c.createRng(),l.setStart(a(d),m),l.setEnd(a(f),p),s.setRng(l))):n.name?s.select(c.select(n.name)[n.index]):n.rng&&s.setRng(n.rng)}}var l=o.isContentEditableFalse;return s.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},s}),o("tinymce/dom/Selection",["tinymce/dom/TreeWalker","tinymce/dom/TridentSelection","tinymce/dom/ControlSelection","tinymce/dom/RangeUtils","tinymce/dom/BookmarkManager","tinymce/dom/NodeType","tinymce/Env","tinymce/util/Tools","tinymce/caret/CaretPosition"],function(e,t,n,r,o,a,s,l,c){function u(e,i,r,a){var s=this;s.dom=e,s.win=i,s.serializer=r,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new n(s,a),s.win.getSelection||(s.tridentSel=new t(s))}var d=l.each,f=l.trim,m=s.ie;return u.prototype={setCursorLocation:function(e,t){var n=this,i=n.dom.createRng();e?(i.setStart(e,t),i.setEnd(e,t),n.setRng(i),n.collapse(!1)):(n._moveEndPoint(i,n.editor.getBody(),!0),n.setRng(i))},getContent:function(e){var t,n,r,o=this,a=o.getRng(),s=o.dom.create("body"),l=o.getSel();return e=e||{},t=n="",e.get=!0,e.format=e.format||"html",e.selection=!0,o.editor.fire("BeforeGetContent",e),"text"==e.format?o.isCollapsed()?"":a.text||(l.toString?l.toString():""):(a.cloneContents?(r=a.cloneContents())&&s.appendChild(r):a.item!==i||a.htmlText!==i?(s.innerHTML="<br>"+(a.item?a.item(0).outerHTML:a.htmlText),s.removeChild(s.firstChild)):s.innerHTML=a.toString(),/^\s/.test(s.innerHTML)&&(t=" "),/\s+$/.test(s.innerHTML)&&(n=" "),e.getInner=!0,e.content=o.isCollapsed()?"":t+o.serializer.serialize(s,e)+n,o.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n,i,r,o=this,a=o.getRng(),s=o.win.document;if(t=t||{format:"html"},t.set=!0,t.selection=!0,t.content=e,t.no_events||o.editor.fire("BeforeSetContent",t),e=t.content,a.insertNode){e+='<span id="__caret">_</span>',a.startContainer==s&&a.endContainer==s?s.body.innerHTML=e:(a.deleteContents(),0===s.body.childNodes.length?s.body.innerHTML=e:a.createContextualFragment?a.insertNode(a.createContextualFragment(e)):(i=s.createDocumentFragment(),r=s.createElement("div"),i.appendChild(r),r.outerHTML=e,a.insertNode(i))),n=o.dom.get("__caret"),a=s.createRange(),a.setStartBefore(n),a.setEndBefore(n),o.setRng(a),o.dom.remove("__caret");try{o.setRng(a)}catch(e){}}else a.item&&(s.execCommand("Delete",!1,null),a=o.getRng()),/^\s+/.test(e)?(a.pasteHTML('<span id="__mce_tmp">_</span>'+e),o.dom.remove("__mce_tmp")):a.pasteHTML(e);t.no_events||o.editor.fire("SetContent",t)},getStart:function(e){var t,n,i,r,o=this,a=o.getRng();if(a.duplicate||a.item){if(a.item)return a.item(0);for(i=a.duplicate(),i.collapse(1),t=i.parentElement(),t.ownerDocument!==o.dom.doc&&(t=o.dom.getRoot()),n=r=a.parentElement();r=r.parentNode;)if(r==t){t=n;break}return t}return t=a.startContainer,1==t.nodeType&&t.hasChildNodes()&&(e&&a.collapsed||(t=t.childNodes[Math.min(t.childNodes.length-1,a.startOffset)])),t&&3==t.nodeType?t.parentNode:t},getEnd:function(e){var t,n,i=this,r=i.getRng();return r.duplicate||r.item?r.item?r.item(0):(r=r.duplicate(),r.collapse(0),t=r.parentElement(),t.ownerDocument!==i.dom.doc&&(t=i.dom.getRoot()),t&&"BODY"==t.nodeName?t.lastChild||t:t):(t=r.endContainer,n=r.endOffset,1==t.nodeType&&t.hasChildNodes()&&(e&&r.collapsed||(t=t.childNodes[n>0?n-1:n])),t&&3==t.nodeType?t.parentNode:t)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n,i=this,r=i.dom,o=r.createRng();if(i.lastFocusBookmark=null,e){if(!t&&i.controlSelection.controlSelect(e))return;n=r.nodeIndex(e),o.setStart(e.parentNode,n),o.setEnd(e.parentNode,n+1),t&&(i._moveEndPoint(o,e,!0),i._moveEndPoint(o,e)),i.setRng(o)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed)},collapse:function(e){var t,n=this,i=n.getRng();i.item&&(t=i.item(0),i=n.win.document.body.createTextRange(),i.moveToElementText(t)),i.collapse(!!e),n.setRng(i)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}}var n,i,r,o,a,s,l=this;if(!l.win)return null;if(void 0===(o=l.win.document)||null===o)return null;if(!e&&l.lastFocusBookmark){var c=l.lastFocusBookmark;return c.startContainer?(i=o.createRange(),i.setStart(c.startContainer,c.startOffset),i.setEnd(c.endContainer,c.endOffset)):i=c,i}if(e&&l.tridentSel)return l.tridentSel.getRangeAt(0);try{(n=l.getSel())&&(i=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():o.createRange())}catch(e){}if(s=l.editor.fire("GetSelectionRange",{range:i}),s.range!==i)return s.range;if(m&&i&&i.setStart&&o.selection){try{a=o.selection.createRange()}catch(e){}a&&a.item&&(r=a.item(0),i=o.createRange(),i.setStartBefore(r),i.setEndAfter(r))}return i||(i=o.createRange?o.createRange():o.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(r=l.dom.getRoot(),i.setStart(r,0),i.setEnd(r,0)),l.selectedRange&&l.explicitRange&&(0===t(i.START_TO_START,i,l.selectedRange)&&0===t(i.END_TO_END,i,l.selectedRange)?i=l.explicitRange:(l.selectedRange=null,l.explicitRange=null)),i},setRng:function(e,t){var n,i,r,o=this;if(e)if(e.select){o.explicitRange=null;try{e.select()}catch(e){}}else if(o.tridentSel){if(e.cloneRange)try{o.tridentSel.addRange(e)}catch(e){}}else{if(n=o.getSel(),r=o.editor.fire("SetSelectionRange",{range:e}),e=r.range,n){o.explicitRange=e;try{n.removeAllRanges(),n.addRange(e)}catch(e){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),o.selectedRange=n.rangeCount>0?n.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!n.setBaseAndExtent||s.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(i=e.startContainer.childNodes[e.startOffset])&&"IMG"==i.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(i,0,i,1)),o.editor.fire("AfterSetSelectionRange",{range:e})}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t,n,i,r,o,a=this,s=a.getRng(),l=a.dom.getRoot();return s?(n=s.startContainer,i=s.endContainer,r=s.startOffset,o=s.endOffset,s.setStart?(t=s.commonAncestorContainer,!s.collapsed&&(n==i&&o-r<2&&n.hasChildNodes()&&(t=n.childNodes[r]),3===n.nodeType&&3===i.nodeType&&(n=n.length===r?e(n.nextSibling,!0):n.parentNode,i=0===o?e(i.previousSibling,!1):i.parentNode,n&&n===i))?n:t&&3==t.nodeType?t.parentNode:t):(t=s.item?s.item(0):s.parentElement(),t.ownerDocument!==a.win.document&&(t=l),t)):l},getSelectedBlocks:function(t,n){var i,r,o=this,a=o.dom,s=[];if(r=a.getRoot(),t=a.getParent(t||o.getStart(),a.isBlock),n=a.getParent(n||o.getEnd(),a.isBlock),t&&t!=r&&s.push(t),t&&n&&t!=n){i=t;for(var l=new e(t,r);(i=l.next())&&i!=n;)a.isBlock(i)&&s.push(i)}return n&&t!=n&&n!=r&&s.push(n),s},isForward:function(){var e,t,n=this.dom,i=this.getSel();return!(i&&i.anchorNode&&i.focusNode)||(e=n.createRng(),e.setStart(i.anchorNode,i.anchorOffset),e.collapse(!0),t=n.createRng(),t.setStart(i.focusNode,i.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)},normalize:function(){var e=this,t=e.getRng();return s.range&&new r(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n,i=this;return i.selectorChangedData||(i.selectorChangedData={},n={},i.editor.on("NodeChange",function(e){var t=e.element,r=i.dom,o=r.getParents(t,null,r.getRoot()),a={};d(i.selectorChangedData,function(e,t){d(o,function(i){if(r.is(i,t))return n[t]||(d(e,function(e){e(!0,{node:i,selector:t,parents:o})}),n[t]=e),a[t]=e,!1})}),d(n,function(e,i){a[i]||(delete n[i],d(e,function(e){e(!1,{node:t,selector:i,parents:o})}))})})),i.selectorChangedData[e]||(i.selectorChangedData[e]=[]),i.selectorChangedData[e].push(t),i},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){function n(e){for(var t=0,n=0,i=e;i&&i.nodeType;)t+=i.offsetLeft||0,n+=i.offsetTop||0,i=i.offsetParent;return{x:t,y:n}}var i,r,o,s,l=this,c=l.dom,u=c.getRoot(),d=0;if(a.isElement(e)){if(!1===t&&(d=e.offsetHeight),"BODY"!=u.nodeName){var f=l.getScrollContainer();if(f)return i=n(e).y-n(f).y+d,s=f.clientHeight,o=f.scrollTop,void((i<o||i+25>o+s)&&(f.scrollTop=i<o?i:i-s+25))}r=c.getViewPort(l.editor.getWin()),i=c.getPos(e).y+d,o=r.y,s=r.h,(i<r.y||i+25>o+s)&&l.editor.getWin().scrollTo(0,i<o?i:i-s+25)}},placeCaretAt:function(e,t){this.setRng(r.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(t,n,i){var r=n,o=new e(n,r),a=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==f(n.nodeValue).length)return void(i?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(i?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(s.ie&&s.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(i?t.setStart(n,0):t.setEnd(n,0))}while(n=i?o.next():o.prev());"BODY"==r.nodeName&&(i?t.setStart(r,0):t.setEnd(r,r.childNodes.length))},getBoundingClientRect:function(){var e=this.getRng();return e.collapsed?c.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){this.win=null,this.controlSelection.destroy()}},u}),o("tinymce/dom/ElementUtils",["tinymce/dom/BookmarkManager","tinymce/util/Tools"],function(e,t){function n(t){this.compare=function(n,r){function o(e){var n={};return i(t.getAttribs(e),function(i){var r=i.nodeName.toLowerCase();0!==r.indexOf("_")&&"style"!==r&&0!==r.indexOf("data-")&&(n[r]=t.getAttrib(e,r))}),n}function a(e,t){var n,i;for(i in e)if(e.hasOwnProperty(i)){if(void 0===(n=t[i]))return!1;if(e[i]!=n)return!1;delete t[i]}for(i in t)if(t.hasOwnProperty(i))return!1;return!0}return n.nodeName==r.nodeName&&(!!a(o(n),o(r))&&(!!a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(r,"style")))&&(!e.isBookmarkNode(n)&&!e.isBookmarkNode(r))))}}var i=t.each;return n}),o("tinymce/fmt/Preview",["tinymce/dom/DOMUtils","tinymce/util/Tools","tinymce/html/Schema"],function(e,t,n){function i(e,i){function r(e,t){t.classes.length&&c.addClass(e,t.classes.join(" ")),c.setAttribs(e,t.attrs)}function o(e){var t;return u="string"==typeof e?{name:e,classes:[],attrs:{}}:e,t=c.create(u.name),r(t,u),t}function a(e,n){var i="string"!=typeof e?e.nodeName.toLowerCase():e,r=f.getElementRule(i),o=r.parentsRequired;return!(!o||!o.length)&&(n&&-1!==t.inArray(o,n)?n:o[0])}function s(e,n,i){var r,l,u,d=n.length&&n[0],f=d&&d.name;if(u=a(e,f))f==u?(l=n[0],n=n.slice(1)):l=u;else if(d)l=n[0],n=n.slice(1);else if(!i)return e;return l&&(r=o(l),r.appendChild(e)),i&&(r||(r=c.create("div"),r.appendChild(e)),t.each(i,function(t){var n=o(t);r.insertBefore(n,e)})),s(r,n,l&&l.siblings)}var l,u,d,f=i&&i.schema||new n({});return e&&e.length?(u=e[0],l=o(u),d=c.create("div"),d.appendChild(s(l,e.slice(1),u.siblings)),d):""}function r(e,t){return i(a(e),t)}function o(e){var n,i={classes:[],attrs:{}};return e=i.selector=t.trim(e),"*"!==e&&(n=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,n,r,o,a){switch(n){case"#":i.attrs.id=r;break;case".":i.classes.push(r);break;case":":-1!==t.inArray("checked disabled enabled read-only required".split(" "),r)&&(i.attrs[r]=r)}if("["==o){var s=a.match(/([\w\-]+)(?:\=\"([^\"]+))?/);s&&(i.attrs[s[1]]=s[2])}return""})),i.name=n||"div",i}function a(e){return e&&"string"==typeof e?(e=e.split(/\s*,\s*/)[0],e=e.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),t.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var n=t.map(e.split(/(?:~\+|~|\+)/),o),i=n.pop();return n.length&&(i.siblings=n),i}).reverse()):[]}function s(e,t){function n(e){return e.replace(/%(\w+)/g,"")}var r,o,s,u,d,f,m="";if(!1===(f=e.settings.preview_styles))return"";if("string"!=typeof f&&(f="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(!(t=e.formatter.get(t)))return;t=t[0]}return"preview"in t&&!1===(f=t.preview)?"":(r=t.block||t.inline||"span",u=a(t.selector),u.length?(u[0].name||(u[0].name=r),r=t.selector,o=i(u,e)):o=i([r],e),s=c.select(r,o)[0]||o.firstChild,l(t.styles,function(e,t){(e=n(e))&&c.setStyle(s,t,e)}),l(t.attributes,function(e,t){(e=n(e))&&c.setAttrib(s,t,e)}),l(t.classes,function(e){e=n(e),c.hasClass(s,e)||c.addClass(s,e)}),e.fire("PreviewFormats"),c.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),d=c.getStyle(e.getBody(),"fontSize",!0),d=/px$/.test(d)?parseInt(d,10):0,l(f.split(" "),function(t){var n=c.getStyle(s,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=c.getStyle(e.getBody(),t,!0),"#ffffff"==c.toHex(n).toLowerCase())||"color"==t&&"#000000"==c.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===d)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*d+"px"}"border"==t&&n&&(m+="padding:0 2px;"),m+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),c.remove(o),m)}var l=t.each,c=e.DOM;return{getCssText:s,parseSelector:a,selectorToHtml:r}}),o("tinymce/fmt/Hooks",["tinymce/util/Arr","tinymce/dom/NodeType","tinymce/dom/DomQuery"],function(e,t,n){function i(e,t){a(r[e],function(e){e(t)})}var r={},o=e.filter,a=e.each;return function(e,t){var n=r[e];n||(r[e]=n=[]),r[e].push(t)}("pre",function(i){function r(t){return l(t.previousSibling)&&-1!=e.indexOf(c,t.previousSibling)}function s(e,t){n(t).remove(),n(e).append("<br><br>").append(t.childNodes)}var l,c,u=i.selection.getRng();l=t.matchNodeNames("pre"),u.collapsed||(c=i.selection.getSelectedBlocks(),a(o(o(c,l),r),function(e){s(e.previousSibling,e)}))}),{postProcess:i}}),o("tinymce/Formatter",["tinymce/dom/TreeWalker","tinymce/dom/RangeUtils","tinymce/dom/BookmarkManager","tinymce/dom/ElementUtils","tinymce/util/Fun","tinymce/util/Tools","tinymce/fmt/Preview","tinymce/fmt/Hooks"],function(e,t,n,i,r,o,a,s){return function(l){function c(e){return e.nodeType&&(e=e.nodeName),!!l.schema.getTextBlockElements()[e.toLowerCase()]}function u(e){return/^(TH|TD)$/.test(e.nodeName)}function d(e){return e&&/^(IMG)$/.test(e.nodeName)}function f(e,t){return ee.getParents(e,t,ee.getRoot())}function m(e){return 1===e.nodeType&&"_mce_caret"===e.id}function p(e){return e?Z[e]:Z}function h(e,t){e&&("string"!=typeof e?me(e,function(e,t){h(t,e)}):(t=t.length?t:[t],me(t,function(e){e.deep===Y&&(e.deep=!e.selector),e.split===Y&&(e.split=!e.selector||e.inline),e.remove===Y&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),Z[e]=t))}function g(e){return e&&Z[e]&&delete Z[e],Z}function v(e,t){var n=p(t);if(n)for(var i=0;i<n.length;i++)if(!1===n[i].inherit&&ee.is(e,n[i].selector))return!0;return!1}function y(e){var t;return l.dom.getParent(e,function(e){return(t=l.dom.getStyle(e,"text-decoration"))&&"none"!==t}),t}function b(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=y(e.parentNode),l.dom.getStyle(e,"color")&&t?l.dom.setStyle(e,"text-decoration",t):l.dom.getStyle(e,"text-decoration")===t&&l.dom.setStyle(e,"text-decoration",null))}function C(t,n,i){function r(e,t){if(t=t||h,e){if(t.onformat&&t.onformat(e,t,n,i),me(t.styles,function(t,i){ee.setStyle(e,i,L(t,n))}),t.styles){var r=ee.getAttrib(e,"style");r&&e.setAttribute("data-mce-style",r)}me(t.attributes,function(t,i){ee.setAttrib(e,i,L(t,n))}),me(t.classes,function(t){t=L(t,n),ee.hasClass(e,t)||ee.addClass(e,t)})}}function o(e,t){var n=!1;return!!h.selector&&(me(e,function(e){if(!("collapsed"in e&&e.collapsed!==g))return ee.is(t,e.selector)&&!m(t)?(r(t,e),n=!0,!1):void 0}),n)}function a(e,i,a){var s,l,u=[],d=!0;s=h.inline||h.block,l=ee.create(s),r(l),ne.walk(e,function(e){function i(e){var g,v,y,b;if(b=d,g=e.nodeName.toLowerCase(),v=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&de(e)&&(b=d,d="true"===de(e),y=!0),M(g,"br"))return p=0,void(h.block&&ee.remove(e));if(h.wrapper&&x(e,t,n))return void(p=0);if(d&&!y&&h.block&&!h.wrapper&&c(g)&&ie(v,s))return e=ee.rename(e,s),r(e),u.push(e),void(p=0);if(h.selector){var C=o(f,e);if(!h.inline||C)return void(p=0)}!d||y||!ie(s,g)||!ie(v,s)||!a&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||m(e)||h.inline&&re(e)?(p=0,me(pe(e.childNodes),i),y&&(d=b),p=0):(p||(p=ee.clone(l,ce),e.parentNode.insertBefore(p,e),u.push(p)),p.appendChild(e))}var p;me(e,i)}),!0===h.links&&me(u,function(e){function t(e){"A"===e.nodeName&&r(e,h),me(pe(e.childNodes),t)}t(e)}),me(u,function(e){function i(e){var t=0;return me(e.childNodes,function(e){O(e)||fe(e)||t++}),t}function o(e){var t=!1;return me(e.childNodes,function(e){if(B(e))return t=e,!1}),t}var a;if(a=i(e),(u.length>1||!re(e))&&0===a)return void ee.remove(e,1);if(h.inline||h.wrapper){if(h.exact||1!==a||(e=function(e){var t,n;return t=o(e),t&&!fe(t)&&k(t,h)&&(n=ee.clone(t,ce),r(n),ee.replace(n,e,ue),ee.remove(t,1)),n||e}(e)),me(f,function(t){me(ee.select(t.inline,e),function(e){fe(e)||U(t,n,e,t.exact?e:null)})}),x(e.parentNode,t,n)&&U(h,n,e)&&(e=0),h.merge_with_parents&&ee.getParent(e.parentNode,function(i){if(x(i,t,n))return U(h,n,e)&&(e=0),ue}),!re(e)&&!I(e,"fontSize")){var s=function(e,t){do{if(1!==i(e))break;if(!(e=o(e)))break;if(t(e))return e}while(e);return null}(e,R("fontSize"));s&&C("fontsize",{value:I(s,"fontSize")},e)}e&&!1!==h.merge_siblings&&(e=X(z(e),e),e=X(e,z(e,ue)))}})}var u,d,f=p(t),h=f[0],g=!i&&te.isCollapsed();if("false"!==de(te.getNode())){if(h){if(i)i.nodeType?o(f,i)||(d=ee.createRng(),d.setStartBefore(i),d.setEndAfter(i),a(F(d,f),null,!0)):a(i,null,!0);else if(g&&h.inline&&!ee.select("td[data-mce-selected],th[data-mce-selected]").length)j("apply",t,n);else{var v=l.selection.getNode();oe||!f[0].defaultBlock||ee.getParent(v,ee.isBlock)||C(f[0].defaultBlock),l.selection.setRng(function(){var t=l.selection.getRng(),n=t.startContainer,r=t.endContainer;if(n!=r&&0===t.endOffset){var o=function(t,n){var r=new e(n);for(i=r.prev2();i;i=r.prev2()){if(3==i.nodeType&&i.data.length>0)return i;if(i.childNodes.length>1||i==t||"BR"==i.tagName)return i}}(n,r),a=3==o.nodeType?o.data.length:o.childNodes.length;t.setEnd(o,a)}return t}()),u=te.getBookmark(),a(F(te.getRng(ue),f),u),h.styles&&((h.styles.color||h.styles.textDecoration)&&(he(v,b,"childNodes"),b(v)),h.styles.backgroundColor&&_(v,R("fontSize"),D("backgroundColor",L(h.styles.backgroundColor,n)))),te.moveToBookmark(u),$(te.getRng(ue)),l.nodeChanged()}s.postProcess(t,l)}}else{i=te.getNode();for(var y=0,T=f.length;y<T;y++)if(f[y].ceFalseOverride&&ee.is(i,f[y].selector))return void r(i,f[y])}}function T(e,t,n,i){function r(e){var n,i,o,a,s;if(1===e.nodeType&&de(e)&&(a=b,b="true"===de(e),s=!0),n=pe(e.childNodes),b&&!s)for(i=0,o=g.length;i<o&&!U(g[i],t,e,e);i++);if(v.deep&&n.length){for(i=0,o=n.length;i<o;i++)r(n[i]);s&&(b=a)}}function o(n){var r;return me(f(n.parentNode).reverse(),function(n){var o;r||"_start"==n.id||"_end"==n.id||(o=x(n,e,t,i))&&!1!==o.split&&(r=n)}),r}function a(e,n,i,r){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=ee.clone(o,ce),c=0;c<g.length;c++)if(U(g[c],t,a,a)){a=0;break}a&&(s&&a.appendChild(s),l||(l=a),s=a)}!r||v.mixed&&re(e)||(n=ee.split(e,n)),s&&(i.parentNode.insertBefore(s,i),l.appendChild(i))}return n}function s(e){return a(o(e),e,e,!0)}function c(e){var t=ee.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return fe(n)&&(n=n[e?"firstChild":"lastChild"]),3==n.nodeType&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),ee.remove(t,!0),n}function d(e){var t,n,i=e.commonAncestorContainer;if(e=F(e,g,ue),v.split){if(t=K(e,ue),n=K(e),t!=n){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"==t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),i&&/^T(HEAD|BODY|FOOT|R)$/.test(i.nodeName)&&u(n)&&n.firstChild&&(n=n.firstChild||n),ee.isChildOf(t,n)&&!re(n)&&!u(t)&&!u(n))return t=G(t,"span",{id:"_start","data-mce-type":"bookmark"}),s(t),void(t=c(ue));t=G(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=G(n,"span",{id:"_end","data-mce-type":"bookmark"}),s(t),s(n),t=c(ue),n=c()}else t=n=s(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=ae(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=ae(n)+1}ne.walk(e,function(e){me(e,function(e){r(e),1===e.nodeType&&"underline"===l.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===y(e.parentNode)&&U({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var m,h,g=p(e),v=g[0],b=!0;if(n)return void(n.nodeType?(h=ee.createRng(),h.setStartBefore(n),h.setEndAfter(n),d(h)):d(n));if("false"!==de(te.getNode()))te.isCollapsed()&&v.inline&&!ee.select("td[data-mce-selected],th[data-mce-selected]").length?j("remove",e,t,i):(m=te.getBookmark(),d(te.getRng(ue)),te.moveToBookmark(m),v.inline&&w(e,t,te.getStart())&&$(te.getRng(!0)),l.nodeChanged());else{n=te.getNode();for(var C=0,T=g.length;C<T&&(!g[C].ceFalseOverride||!U(g[C],t,n,n));C++);}}function S(e,t,n){var i=p(e);!w(e,t,n)||"toggle"in i[0]&&!i[0].toggle?C(e,t,n):T(e,t,n)}function x(e,t,n,i){function r(e,t,r){var o,a,s,l=t[r];if(t.onmatch)return t.onmatch(e,t,r);if(l)if(l.length===Y){for(o in l)if(l.hasOwnProperty(o)){if(a="attributes"===r?ee.getAttrib(e,o):I(e,o),i&&!a&&!t.exact)return;if((!i||t.exact)&&!M(a,H(L(l[o],n),o)))return}}else for(s=0;s<l.length;s++)if("attributes"===r?ee.getAttrib(e,l[s]):I(e,l[s]))return t;return t}var o,a,s,l=p(t);if(l&&e)for(a=0;a<l.length;a++)if(o=l[a],k(e,o)&&r(e,o,"attributes")&&r(e,o,"styles")){if(s=o.classes)for(a=0;a<s.length;a++)if(!ee.hasClass(e,s[a]))return;return o}}function w(e,t,n){function i(n){var i=ee.getRoot();return n!==i&&(n=ee.getParent(n,function(n){return!!v(n,e)||(n.parentNode===i||!!x(n,e,t,!0))}),x(n,e,t))}var r;return n?i(n):(n=te.getNode(),i(n)?ue:(r=te.getStart(),r!=n&&i(r)?ue:ce))}function E(e,t){var n,i=[],r={};return n=te.getStart(),ee.getParent(n,function(n){var o,a;for(o=0;o<e.length;o++)a=e[o],!r[a]&&x(n,a,t)&&(r[a]=!0,i.push(a))},ee.getRoot()),i}function A(e){var t,n,i,r,o,a=p(e);if(a)for(t=te.getStart(),n=f(t),r=a.length-1;r>=0;r--){if(!(o=a[r].selector)||a[r].defaultBlock)return ue;for(i=n.length-1;i>=0;i--)if(ee.is(n[i],o))return ue}return ce}function N(e,t,n){var i;return q||(q={},i={},l.on("NodeChange",function(e){var t=f(e.element),n={};t=o.grep(t,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),me(q,function(e,r){me(t,function(o){return x(o,r,{},e.similar)?(i[r]||(me(e,function(e){e(!0,{node:o,format:r,parents:t})}),i[r]=e),n[r]=e,!1):!v(o,r)&&void 0})}),me(i,function(r,o){n[o]||(delete i[o],me(r,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),me(e.split(","),function(e){q[e]||(q[e]=[],q[e].similar=n),q[e].push(t)}),this}function P(e){return a.getCssText(l,e)}function k(e,t){return M(e,t.inline)?ue:M(e,t.block)?ue:t.selector?1==e.nodeType&&ee.is(e,t.selector):void 0}function M(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function _(e,t,n){me(e.childNodes,function(e){B(e)&&(t(e)&&n(e),e.hasChildNodes()&&_(e,t,n))})}function B(e){return 1==e.nodeType&&!fe(e)&&!O(e)&&!m(e)}function R(e){return r.curry(function(e,t){return!(!t||!I(t,e))},e)}function D(e,t){return r.curry(function(e,t,n){ee.setStyle(n,e,t)},e,t)}function I(e,t){return H(ee.getStyle(e,t),t)}function H(e,t){return"color"!=t&&"backgroundColor"!=t||(e=ee.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function L(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function O(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function G(e,t,n){var i=ee.create(t,n);return e.parentNode.insertBefore(i,e),i.appendChild(e),i}function F(t,n,i){function r(e){var t,i,r,o,a;if(t=i=e?g:y,o=e?"previousSibling":"nextSibling",a=ee.getRoot(),3==t.nodeType&&!O(t)&&(e?v>0:b<t.nodeValue.length))return t;for(;;){if(!n[0].block_expand&&re(i))return i;for(r=i[o];r;r=r[o])if(!fe(r)&&!O(r)&&!function(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}(r))return i;if(i==a||i.parentNode==a){t=i;break}i=i.parentNode}return t}function o(e,t){for(t===Y&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function a(e){for(var t=e;t;){if(1===t.nodeType&&de(t))return"false"===de(t)?t:e;t=t.parentNode}return e}function s(t,n,r){function o(e,t){var n,o,a=e.nodeValue;return void 0===t&&(t=r?a.length:0),r?(n=a.lastIndexOf(" ",t),o=a.lastIndexOf(" ",t),-1===(n=n>o?n:o)||i||n++):(n=a.indexOf(" ",t),o=a.indexOf(" ",t),n=-1!==n&&(-1===o||n<o)?n:o),n}var a,s,c,u;if(3===t.nodeType){if(-1!==(c=o(t,n)))return{container:t,offset:c};u=t}for(a=new e(t,ee.getParent(t,re)||l.getBody());s=a[r?"prev":"next"]();)if(3===s.nodeType){if(u=s,-1!==(c=o(s)))return{container:s,offset:c}}else if(re(s))break;if(u)return n=r?0:u.length,{container:u,offset:n}}function u(e,i){var r,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[i]&&(e=e[i]),r=f(e),o=0;o<r.length;o++)for(a=0;a<n.length;a++)if(!("collapsed"in(s=n[a])&&s.collapsed!==t.collapsed)&&ee.is(r[o],s.selector))return r[o];return e}function d(e,t){var i,r=ee.getRoot();if(n[0].wrapper||(i=ee.getParent(e,n[0].block,r)),i||(i=ee.getParent(3==e.nodeType?e.parentNode:e,function(e){return e!=r&&c(e)})),i&&n[0].wrapper&&(i=f(i,"ul,ol").reverse()[0]||i),!i)for(i=e;i[t]&&!re(i[t])&&(i=i[t],!M(i,"br")););return i||e}var m,p,h,g=t.startContainer,v=t.startOffset,y=t.endContainer,b=t.endOffset;if(1==g.nodeType&&g.hasChildNodes()&&(m=g.childNodes.length-1,g=g.childNodes[v>m?m:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(m=y.childNodes.length-1,y=y.childNodes[b>m?m:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=a(g),y=a(y),(fe(g.parentNode)||fe(g))&&(g=fe(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(fe(y.parentNode)||fe(y))&&(y=fe(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(h=s(g,v,!0),h&&(g=h.container,v=h.offset),(h=s(y,b))&&(y=h.container,b=h.offset)),p=o(y,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=o(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(y=p.node,y.splitText(p.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=r(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=r())),n[0].selector&&n[0].expand!==ce&&!n[0].inline&&(g=u(g,"previousSibling"),y=u(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=d(g,"previousSibling"),y=d(y,"nextSibling"),n[0].block&&(re(g)||(g=r(!0)),re(y)||(y=r()))),1==g.nodeType&&(v=ae(g),g=g.parentNode),1==y.nodeType&&(b=ae(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function V(e,t){return t.links&&"A"==e.tagName}function U(e,t,n,i){var r,o,a;if(!k(n,e)&&!V(n,e))return ce;if("all"!=e.remove)for(me(e.styles,function(r,o){r=H(L(r,t),o),"number"==typeof o&&(o=r,i=0),(e.remove_similar||!i||M(I(i,o),r))&&ee.setStyle(n,o,""),a=1}),a&&""===ee.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),me(e.attributes,function(e,r){var o;if(e=L(e,t),"number"==typeof r&&(r=e,i=0),!i||M(ee.getAttrib(i,r),e)){if("class"==r&&(e=ee.getAttrib(n,r))&&(o="",me(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o))return void ee.setAttrib(n,r,o);"class"==r&&n.removeAttribute("className"),le.test(r)&&n.removeAttribute("data-mce-"+r),n.removeAttribute(r)}}),me(e.classes,function(e){e=L(e,t),i&&!ee.hasClass(i,e)||ee.removeClass(n,e)}),o=ee.getAttribs(n),r=0;r<o.length;r++){var s=o[r].nodeName;if(0!==s.indexOf("_")&&0!==s.indexOf("data-"))return ce}return"none"!=e.remove?(W(n,e),ue):void 0}function W(e,t){function n(e,t,n){return!(e=z(e,t,n))||"BR"==e.nodeName||re(e)}var i,r=e.parentNode;t.block&&(oe?r==ee.getRoot()&&(t.list_block&&M(e,t.list_block)||me(pe(e.childNodes),function(e){ie(oe,e.nodeName.toLowerCase())?i?i.appendChild(e):(i=G(e,oe),ee.setAttribs(i,l.settings.forced_root_block_attrs)):i=0})):re(e)&&!re(r)&&(n(e,ce)||n(e.firstChild,ue,1)||e.insertBefore(ee.create("br"),e.firstChild),n(e,ue)||n(e.lastChild,ce,1)||e.appendChild(ee.create("br")))),t.selector&&t.inline&&!M(t.inline,e)||ee.remove(e,1)}function z(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!O(e))return e}function X(e,t){function n(e,t){for(r=e;r;r=r[t]){if(3==r.nodeType&&0!==r.nodeValue.length)return e;if(1==r.nodeType&&!fe(r))return r}return e}var r,o,a=new i(ee);if(e&&t&&(e=n(e,"previousSibling"),t=n(t,"nextSibling"),a.compare(e,t))){for(r=e.nextSibling;r&&r!=t;)o=r,r=r.nextSibling,e.appendChild(o);return ee.remove(t),me(pe(t.childNodes),function(t){e.appendChild(t)}),e}return t}function K(t,n){var i,r,o;return i=t[n?"startContainer":"endContainer"],r=t[n?"startOffset":"endOffset"],1==i.nodeType&&(o=i.childNodes.length-1,!n&&r&&r--,i=i.childNodes[r>o?o:r]),3===i.nodeType&&n&&r>=i.nodeValue.length&&(i=new e(i,l.getBody()).next()||i),3!==i.nodeType||n||0!==r||(i=new e(i,l.getBody()).prev()||i),i}function j(t,n,i,r){function o(e){var t=ee.create("span",{id:m,"data-mce-bogus":!0,style:h?"color:red":""});return e&&t.appendChild(l.getDoc().createTextNode(se)),t}function a(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==se||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function s(e){for(;e;){if(e.id===m)return e;e=e.parentNode}}function u(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,i;if(e)i=te.getRng(!0),a(e)?(!1!==t&&(i.setStartBefore(e),i.setEndBefore(e)),ee.remove(e)):(n=u(e),n.nodeValue.charAt(0)===se&&(n.deleteData(0,1),i.startContainer==n&&i.startOffset>0&&i.setStart(n,i.startOffset-1),i.endContainer==n&&i.endOffset>0&&i.setEnd(n,i.endOffset-1)),ee.remove(e,1)),te.setRng(i);else if(!(e=s(te.getStart())))for(;e=ee.get(m);)d(e,!1)}function f(){var e;(e=s(te.getStart()))&&!ee.isEmpty(e)&&he(e,function(e){1!=e.nodeType||e.id===m||ee.isEmpty(e)||ee.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var m="_mce_caret",h=l.settings.caret_debug;l._hasCaretEvents||(J=function(){var e,t=[];if(a(s(te.getStart()),t))for(e=t.length;e--;)ee.setAttrib(t[e],"data-mce-bogus","1")},Q=function(e){var t=e.keyCode;d(),8==t&&te.isCollapsed()&&te.getStart().innerHTML==se&&d(s(te.getStart())),37!=t&&39!=t||d(s(te.getStart())),f()},l.on("SetContent",function(e){e.selection&&f()}),l._hasCaretEvents=!0),"apply"==t?function(){var e,t,r,a,l,c,d;e=te.getRng(!0),a=e.startOffset,c=e.startContainer,d=c.nodeValue,(t=s(te.getStart()))&&(r=u(t));var f=/[^\s\u00a0\u00ad\u200b\ufeff]/;d&&a>0&&a<d.length&&f.test(d.charAt(a))&&f.test(d.charAt(a-1))?(l=te.getBookmark(),e.collapse(!0),e=F(e,p(n)),e=ne.split(e),C(n,i,e),te.moveToBookmark(l)):(t&&r.nodeValue===se?C(n,i,t):(t=o(!0),r=t.firstChild,e.insertNode(t),a=1,C(n,i,t)),te.setCursorLocation(r,a))}():function(){var e,t,a,s,l,u,d,f,m=te.getRng(!0),h=[];for(e=m.startContainer,t=m.startOffset,l=e,3==e.nodeType&&(t!=e.nodeValue.length&&(s=!0),l=l.parentNode);l;){if(x(l,n,i,r)){u=l;break}l.nextSibling&&(s=!0),h.push(l),l=l.parentNode}if(u)if(s)a=te.getBookmark(),m.collapse(!0),m=F(m,p(n),!0),m=ne.split(m),T(n,i,m),te.moveToBookmark(a);else{for(f=o(),l=f,d=h.length-1;d>=0;d--)l.appendChild(ee.clone(h[d],!1)),l=l.firstChild;l.appendChild(ee.doc.createTextNode(se)),l=l.firstChild;var g=ee.getParent(u,c);g&&ee.isEmpty(g)?u.parentNode.replaceChild(f,u):ee.insertAfter(f,u),te.setCursorLocation(l,1),ee.isEmpty(u)&&ee.remove(u)}}()}function $(t){var n,i,r,o,a,s=t.startContainer,l=t.startOffset;if((t.startContainer!=t.endContainer||!d(t.startContainer.childNodes[t.startOffset]))&&(3==s.nodeType&&l>=s.nodeValue.length&&(l=ae(s),s=s.parentNode,n=!0),1==s.nodeType))for(o=s.childNodes,s=o[Math.min(l,o.length-1)],i=new e(s,ee.getParent(s,ee.isBlock)),(l>o.length-1||n)&&i.next(),r=i.current();r;r=i.next())if(3==r.nodeType&&!O(r))return a=ee.create("a",{"data-mce-bogus":"all"},se),r.parentNode.insertBefore(a,r),t.setStart(r,0),te.setRng(t),void ee.remove(a)}var q,Y,Q,J,Z={},ee=l.dom,te=l.selection,ne=new t(ee),ie=l.schema.isValidChild,re=ee.isBlock,oe=l.settings.forced_root_block,ae=ee.nodeIndex,se="\ufeff",le=/^(src|href|style)$/,ce=!1,ue=!0,de=ee.getContentEditable,fe=n.isBookmarkNode,me=o.each,pe=o.grep,he=o.walk;(0,o.extend)(this,{get:p,register:h,unregister:g,apply:C,remove:T,toggle:S,match:w,matchAll:E,matchNode:x,canApply:A,formatChanged:N,getCssText:P}),function(){h({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){me(n,function(t,n){ee.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),me("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){h(e,{block:e,remove:"all"})}),h(l.settings.formats)}(),function(){l.addShortcut("meta+b","bold_desc","Bold"),l.addShortcut("meta+i","italic_desc","Italic"),l.addShortcut("meta+u","underline_desc","Underline");for(var e=1;e<=6;e++)l.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);l.addShortcut("access+7","",["FormatBlock",!1,"p"]),l.addShortcut("access+8","",["FormatBlock",!1,"div"]),l.addShortcut("access+9","",["FormatBlock",!1,"address"])}(),l.on("BeforeGetContent",function(e){J&&"raw"!=e.format&&J()}),l.on("mouseup keydown",function(e){Q&&Q(e)})}}),o("tinymce/undo/Diff",[],function(){return{KEEP:0,DELETE:2,INSERT:1,diff:function(e,t){var n=e.length+t.length+2,i=new Array(n),r=new Array(n),o=function(e,t,n){return{start:e,end:t,diag:n}},a=function(n,i,r,o,s){var c=l(n,i,r,o);if(null===c||c.start===i&&c.diag===i-o||c.end===n&&c.diag===n-r)for(var u=n,d=r;u<i||d<o;)u<i&&d<o&&e[u]===t[d]?(s.push([0,e[u]]),++u,++d):i-n>o-r?(s.push([2,e[u]]),++u):(s.push([1,t[d]]),++d);else{a(n,c.start,r,c.start-c.diag,s);for(var f=c.start;f<c.end;++f)s.push([0,e[f]]);a(c.end,i,c.end-c.diag,o,s)}},s=function(n,i,r,a){for(var s=n;s-i<a&&s<r&&e[s]===t[s-i];)++s;return o(n,s,i)},l=function(n,o,a,l){var c=o-n,u=l-a;if(0===c||0===u)return null;var d=c-u,f=u+c,m=(f%2==0?f:f+1)/2;i[1+m]=n,r[1+m]=o+1;for(var p=0;p<=m;++p){for(var h=-p;h<=p;h+=2){var g=h+m;h===-p||h!=p&&i[g-1]<i[g+1]?i[g]=i[g+1]:i[g]=i[g-1]+1;for(var v=i[g],y=v-n+a-h;v<o&&y<l&&e[v]===t[y];)i[g]=++v,++y;if(d%2!=0&&d-p<=h&&h<=d+p&&r[g-d]<=i[g])return s(r[g-d],h+n-a,o,l)}for(h=d-p;h<=d+p;h+=2){for(g=h+m-d,h===d-p||h!=d+p&&r[g+1]<=r[g-1]?r[g]=r[g+1]-1:r[g]=r[g-1],v=r[g]-1,y=v-n+a-h;v>=n&&y>=a&&e[v]===t[y];)r[g]=v--,y--;if(d%2==0&&-p<=h&&h<=p&&r[g]<=i[g+d])return s(r[g],h+n-a,o,l)}}},c=[];return a(0,e.length,0,t.length,c),c}}}),o("tinymce/undo/Fragments",["tinymce/util/Arr","tinymce/html/Entities","tinymce/undo/Diff"],function(e,t,n){var i=function(e){return 1===e.nodeType?e.outerHTML:3===e.nodeType?t.encodeRaw(e.data,!1):8===e.nodeType?"\x3c!--"+e.data+"--\x3e":""},r=function(e){var t,n,i;for(i=document.createElement("div"),t=document.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},o=function(e,t,n){var i=r(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(i,o)}else e.appendChild(i)},a=function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}},s=function(t,i){var r=0;e.each(t,function(e){e[0]===n.KEEP?r++:e[0]===n.INSERT?(o(i,e[1],r),r++):e[0]===n.DELETE&&a(i,r)})};return{read:function(t){return e.map(t.childNodes,i)},write:function(t,r){var o=e.map(r.childNodes,i);return s(n.diff(o,t),r),r}}}),o("tinymce/undo/Levels",["tinymce/util/Arr","tinymce/undo/Fragments"],function(e,t){var n=function(e){return-1!==e.indexOf("</iframe>")},i=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},r=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},o=function(o){var a,s,l;return a=t.read(o.getBody()),l=e.map(a,function(e){return o.serializer.trimContent(e)}),s=l.join(""),n(s)?i(l):r(s)},a=function(e,n,i){"fragmented"===n.type?t.write(n.fragments,e.getBody()):e.setContent(n.content,{format:"raw"}),e.selection.moveToBookmark(i?n.beforeBookmark:n.bookmark)},s=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content};return{createFragmentedLevel:i,createCompleteLevel:r,createFromEditor:o,applyToEditor:a,isEq:function(e,t){return s(e)===s(t)}}}),o("tinymce/UndoManager",["tinymce/util/VK","tinymce/util/Tools","tinymce/undo/Levels"],function(e,t,n){return function(e){function i(t){e.setDirty(t)}function r(e){l.typing=!1,l.add({},e)}function o(){l.typing&&(l.typing=!1,l.add())}var a,s,l=this,c=0,u=[],d=0;return e.on("init",function(){l.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(o(),l.beforeChange())}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&r(e)}),e.on("ObjectResizeStart Cut",function(){l.beforeChange()}),e.on("SaveContent ObjectResized blur",r),e.on("DragEnd",r),e.on("KeyUp",function(t){var o=t.keyCode;t.isDefaultPrevented()||((o>=33&&o<=36||o>=37&&o<=40||45===o||t.ctrlKey)&&(r(),e.nodeChanged()),46!==o&&8!==o||e.nodeChanged(),s&&l.typing&&(e.isDirty()||(i(u[0]&&!n.isEq(n.createFromEditor(e),u[0])),e.isDirty()&&e.fire("change",{level:u[0],lastLevel:null})),e.fire("TypingUndo"),s=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented()){if(t>=33&&t<=36||t>=37&&t<=40||45===t)return void(l.typing&&r(e));var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||t>20)||224===t||91===t||l.typing||n||(l.beforeChange(),l.typing=!0,l.add({},e),s=!0)}}),e.on("MouseDown",function(e){l.typing&&r(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),l={data:u,typing:!1,beforeChange:function(){d||(a=e.selection.getBookmark(2,!0))},add:function(r,o){var s,l,f,m=e.settings;if(f=n.createFromEditor(e),r=r||{},r=t.extend(r,f),d||e.removed)return null;if(l=u[c],e.fire("BeforeAddUndo",{level:r,lastLevel:l,originalEvent:o}).isDefaultPrevented())return null;if(l&&n.isEq(l,r))return null;if(u[c]&&(u[c].beforeBookmark=a),m.custom_undo_redo_levels&&u.length>m.custom_undo_redo_levels){for(s=0;s<u.length-1;s++)u[s]=u[s+1];u.length--,c=u.length}r.bookmark=e.selection.getBookmark(2,!0),c<u.length-1&&(u.length=c+1),u.push(r),c=u.length-1;var p={level:r,lastLevel:l,originalEvent:o};return e.fire("AddUndo",p),c>0&&(i(!0),e.fire("change",p)),r},undo:function(){var t;return l.typing&&(l.add(),l.typing=!1),c>0&&(t=u[--c],n.applyToEditor(e,t,!0),i(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return c<u.length-1&&(t=u[++c],n.applyToEditor(e,t,!1),i(!0),e.fire("redo",{level:t})),t},clear:function(){u=[],c=0,l.typing=!1,l.data=u,e.fire("ClearUndos")},hasUndo:function(){return c>0||l.typing&&u[0]&&!n.isEq(n.createFromEditor(e),u[0])},hasRedo:function(){return c<u.length-1&&!l.typing},transact:function(e){o(),l.beforeChange();try{d++,e()}finally{d--}return l.add()},extra:function(t,i){var r,o;l.transact(t)&&(o=u[c].bookmark,r=u[c-1],n.applyToEditor(e,r,!0),l.transact(i)&&(u[c-1].beforeBookmark=o))}}}}),o("tinymce/EnterKey",["tinymce/dom/TreeWalker","tinymce/dom/RangeUtils","tinymce/caret/CaretContainer","tinymce/Env"],function(e,t,n,i){var r=i.ie&&i.ie<11;return function(o){function a(a){function p(e){return e&&s.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==s.getContentEditable(e)}function h(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}function g(e){var t;s.isBlock(e)&&(t=l.getRng(),e.appendChild(s.create("span",null," ")),l.select(e),e.lastChild.outerHTML="",l.setRng(t))}function v(t){var n,r,o,a,c=t;if(t){if(i.ie&&i.ie<9&&k&&k.firstChild&&k.firstChild==k.lastChild&&"BR"==k.firstChild.tagName&&s.remove(k.firstChild),/^(LI|DT|DD)$/.test(t.nodeName)){var u=function(e){for(;e;){if(1==e.nodeType||3==e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);u&&/^(UL|OL|DL)$/.test(u.nodeName)&&t.insertBefore(s.doc.createTextNode(" "),t.firstChild)}if(o=s.createRng(),i.ie||t.normalize(),t.hasChildNodes()){for(n=new e(t,t);r=n.current();){if(3==r.nodeType){o.setStart(r,0),o.setEnd(r,0);break}if(m[r.nodeName.toLowerCase()]){o.setStartBefore(r),o.setEndBefore(r);break}c=r,r=n.next()}r||(o.setStart(c,0),o.setEnd(c,0))}else"BR"==t.nodeName?t.nextSibling&&s.isBlock(t.nextSibling)?((!M||M<9)&&(a=s.create("br"),t.parentNode.insertBefore(a,t)),o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)):(o.setStart(t,0),o.setEnd(t,0));l.setRng(o),s.remove(a),l.scrollIntoView(t)}}function y(e){var t=c.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&s.setAttribs(e,c.forced_root_block_attrs)}function b(e){e.innerHTML=r?"":'<br data-mce-bogus="1">'}function C(e){var t,n,i,o=N,a=d.getTextInlineElements();if(e||"TABLE"==I?(t=s.create(e||L),y(t)):t=k.cloneNode(!1),i=t,!1!==c.keep_styles)do{if(a[o.nodeName]){if("_mce_caret"==o.id)continue;n=o.cloneNode(!1),s.setAttrib(n,"id",""),t.hasChildNodes()?(n.appendChild(t.firstChild),t.appendChild(n)):(i=n,t.appendChild(n))}}while((o=o.parentNode)&&o!=A);return r||(i.innerHTML='<br data-mce-bogus="1">'),t}function T(t){var n,i,r;if(3==N.nodeType&&(t?P>0:P<N.nodeValue.length))return!1;if(N.parentNode==k&&O&&!t)return!0;if(t&&1==N.nodeType&&N==k.firstChild)return!0;if("TABLE"===N.nodeName||N.previousSibling&&"TABLE"==N.previousSibling.nodeName)return O&&!t||!O&&t;for(n=new e(N,k),3==N.nodeType&&(t&&0===P?n.prev():t||P!=N.nodeValue.length||n.next());i=n.current();){if(1===i.nodeType){if(!i.getAttribute("data-mce-bogus")&&(r=i.nodeName.toLowerCase(),f[r]&&"br"!==r))return!1}else if(3===i.nodeType&&!/^[ \t\r\n]*$/.test(i.nodeValue))return!1;t?n.prev():n.next()}return!0}function S(){o.execCommand("InsertLineBreak",!1,a)}function x(){B=/^(H[1-6]|PRE|FIGURE)$/.test(I)&&"HGROUP"!=H?C(L):C(),c.end_container_on_empty_block&&p(D)&&s.isEmpty(k)?B=s.split(D,k):s.insertAfter(B,k),v(B)}var w,E,A,N,P,k,M,_,B,R,D,I,H,L,O;if(w=l.getRng(!0),!a.isDefaultPrevented()){if(!w.collapsed)return void o.execCommand("Delete");if(new t(s).normalize(w),N=w.startContainer,P=w.startOffset,L=(c.force_p_newlines?"p":"")||c.forced_root_block,L=L?L.toUpperCase():"",M=s.doc.documentMode,_=a.shiftKey,1==N.nodeType&&N.hasChildNodes()&&(O=P>N.childNodes.length-1,N=N.childNodes[Math.min(P,N.childNodes.length-1)]||N,P=O&&3==N.nodeType?N.nodeValue.length:0),A=function(e){var t,n,i=s.getRoot();for(t=e;t!==i&&"false"!==s.getContentEditable(t);)"true"===s.getContentEditable(t)&&(n=t),t=t.parentNode;return t!==i?n:i}(N)){if(u.beforeChange(),!s.isBlock(A)&&A!=s.getRoot())return void(L&&!_||S());if((L&&!_||!L&&_)&&(N=function(e,t){var n,i,r,a,l,c,u=L||"P";if(!(i=s.getParent(e,s.isBlock))||!p(i)){if(i=i||A,c=i==o.getBody()||h(i)?i.nodeName.toLowerCase():i.parentNode.nodeName.toLowerCase(),!i.hasChildNodes())return n=s.create(u),y(n),i.appendChild(n),w.setStart(n,0),w.setEnd(n,0),n;for(a=e;a.parentNode!=i;)a=a.parentNode;for(;a&&!s.isBlock(a);)r=a,a=a.previousSibling;if(r&&d.isValidChild(c,u.toLowerCase())){for(n=s.create(u),y(n),r.parentNode.insertBefore(n,r),a=r;a&&!s.isBlock(a);)l=a.nextSibling,n.appendChild(a),a=l;w.setStart(e,t),w.setEnd(e,t)}}return e}(N,P)),k=s.getParent(N,s.isBlock),D=k?s.getParent(k.parentNode,s.isBlock):null,I=k?k.nodeName.toUpperCase():"",H=D?D.nodeName.toUpperCase():"","LI"!=H||a.ctrlKey||(k=D,I=H),o.undoManager.typing&&(o.undoManager.typing=!1,o.undoManager.add()),/^(LI|DT|DD)$/.test(I)){if(!L&&_)return void S();if(s.isEmpty(k))return void function(){function e(e){for(var t=D[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===k}function t(){var e=D.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:D}if(D!=o.getBody()){var n=D.parentNode.nodeName;/^(OL|UL|LI)$/.test(n)&&(L="LI"),B=L?C(L):s.create("BR"),e(!0)&&e()?"LI"==n?s.insertAfter(B,t()):s.replace(B,D):e(!0)?"LI"==n?(s.insertAfter(B,t()),B.appendChild(s.doc.createTextNode(" ")),B.appendChild(D)):D.parentNode.insertBefore(B,D):e()?(s.insertAfter(B,t()),g(B)):(D=t(),E=w.cloneRange(),E.setStartAfter(k),E.setEndAfter(D),R=E.extractContents(),"LI"==L&&"LI"==R.firstChild.nodeName?(B=R.firstChild,s.insertAfter(R,D)):(s.insertAfter(R,D),s.insertAfter(B,D))),s.remove(k),v(B),u.add()}}()}if("PRE"==I&&!1!==c.br_in_pre){if(!_)return void S()}else if(!L&&!_&&"LI"!=I||L&&_)return void S();L&&k===o.getBody()||(L=L||"P",n.isCaretContainerBlock(k)?(B=n.showCaretContainerBlock(k),s.isEmpty(k)&&b(k),v(B)):T()?x():T(!0)?(B=k.parentNode.insertBefore(C(),k),g(B),v(k)):(E=w.cloneRange(),E.setEndAfter(k),R=E.extractContents(),function(e){do{3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild}while(e)}(R),B=R.firstChild,s.insertAfter(R,k),function(e){var t,n=e,i=[];if(n){for(;n=n.firstChild;){if(s.isBlock(n))return;1!=n.nodeType||f[n.nodeName.toLowerCase()]||i.push(n)}for(t=i.length;t--;)n=i[t],!n.hasChildNodes()||n.firstChild==n.lastChild&&""===n.firstChild.nodeValue?s.remove(n):"A"==n.nodeName&&" "===(n.innerText||n.textContent)&&s.remove(n)}}(B),function(e){var t;r||(e.normalize(),(t=e.lastChild)&&!/^(left|right)$/gi.test(s.getStyle(t,"float",!0))||s.add(e,"br"))}(k),s.isEmpty(k)&&b(k),B.normalize(),s.isEmpty(B)?(s.remove(B),x()):v(B)),s.setAttrib(B,"id",""),o.fire("NewBlock",{newBlock:B}),u.typing=!1,u.add())}}}var s=o.dom,l=o.selection,c=o.settings,u=o.undoManager,d=o.schema,f=d.getNonEmptyElements(),m=d.getMoveCaretBeforeOnEnterElements();o.on("keydown",function(e){13==e.keyCode&&!1!==a(e)&&e.preventDefault()})}}),o("tinymce/ForceBlocks",[],function(){return function(e){function t(){var t,s,l,c,u,d,f,m,p,h,g,v,y=r.getStart(),b=e.getBody();if(v=n.forced_root_block,y&&1===y.nodeType&&v){for(;y&&y!=b;){if(a[y.nodeName])return;y=y.parentNode}if(t=r.getRng(),t.setStart){s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset;try{p=e.getDoc().activeElement===b}catch(e){}}else t.item&&(y=t.item(0),t=e.getDoc().body.createTextRange(),t.moveToElementText(y)),p=t.parentElement().ownerDocument===e.getDoc(),h=t.duplicate(),h.collapse(!0),l=-1*h.move("character",-16777215),h.collapsed||(h=t.duplicate(),h.collapse(!1),u=-1*h.move("character",-16777215)-l);for(y=b.firstChild,g=b.nodeName.toLowerCase();y;)if((3===y.nodeType||1==y.nodeType&&!a[y.nodeName])&&o.isValidChild(g,v.toLowerCase())){if(3===y.nodeType&&0===y.nodeValue.length){f=y,y=y.nextSibling,i.remove(f);continue}d||(d=i.create(v,e.settings.forced_root_block_attrs),y.parentNode.insertBefore(d,y),m=!0),f=y,y=y.nextSibling,d.appendChild(f)}else d=null,y=y.nextSibling;if(m&&p){if(t.setStart)t.setStart(s,l),t.setEnd(c,u),r.setRng(t);else try{t=e.getDoc().body.createTextRange(),t.moveToElementText(b),t.collapse(!0),t.moveStart("character",l),u>0&&t.moveEnd("character",u),t.select()}catch(e){}e.nodeChanged()}}}var n=e.settings,i=e.dom,r=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),o("tinymce/caret/CaretUtils",["tinymce/util/Fun","tinymce/dom/TreeWalker","tinymce/dom/NodeType","tinymce/caret/CaretPosition","tinymce/caret/CaretContainer","tinymce/caret/CaretCandidate"],function(e,t,n,i,r,o){function a(e){return e>0}function s(e){return e<0}function l(e,t){for(var n;n=e(t);)if(!w(n))return n;return null}function c(e,n,i,r,o){var c=new t(e,r);if(s(n)){if((T(e)||w(e))&&(e=l(c.prev,!0),i(e)))return e;for(;e=l(c.prev,o);)if(i(e))return e}if(a(n)){if((T(e)||w(e))&&(e=l(c.next,!0),i(e)))return e;for(;e=l(c.next,o);)if(i(e))return e}return null}function u(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(C(e))return e;return t}function d(e,t){for(;e&&e!=t;){if(S(e))return e;e=e.parentNode}return null}function f(e,t,n){return d(e.container(),n)==d(t.container(),n)}function m(e,t,n){return u(e.container(),n)==u(t.container(),n)}function p(e,t){var n,i;return t?(n=t.container(),i=t.offset(),A(n)?n.childNodes[i+e]:null):null}function h(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function g(e,t,n){return d(t,e)==d(n,e)}function v(e,t,n){var i,r;for(r=e?"previousSibling":"nextSibling";n&&n!=t;){if(i=n[r],x(i)&&(i=i[r]),T(i)){if(g(t,i,n))return i;break}if(N(i))break;n=n.parentNode}return null}function y(e,t,i){var o,a,s,l,c=E(v,!0,t),u=E(v,!1,t);if(a=i.startContainer,s=i.startOffset,r.isCaretContainerBlock(a)){if(A(a)||(a=a.parentNode),"before"==(l=a.getAttribute("data-mce-caret"))&&(o=a.nextSibling,T(o)))return P(o);if("after"==l&&(o=a.previousSibling,T(o)))return k(o)}if(!i.collapsed)return i;if(n.isText(a)){if(x(a)){if(1===e){if(o=u(a))return P(o);if(o=c(a))return k(o)}if(-1===e){if(o=c(a))return k(o);if(o=u(a))return P(o)}return i}if(r.endsWithCaretContainer(a)&&s>=a.data.length-1)return 1===e&&(o=u(a))?P(o):i;if(r.startsWithCaretContainer(a)&&s<=1)return-1===e&&(o=c(a))?k(o):i;if(s===a.data.length)return o=u(a),o?P(o):i;if(0===s)return o=c(a),o?k(o):i}return i}function b(e,t){return T(p(e,t))}var C=n.isContentEditableTrue,T=n.isContentEditableFalse,S=n.matchStyleValues("display","block table table-cell table-caption"),x=r.isCaretContainer,w=r.isCaretContainerBlock,E=e.curry,A=n.isElement,N=o.isCaretCandidate,P=E(h,!0),k=E(h,!1);return{isForwards:a,isBackwards:s,findNode:c,getEditingHost:u,getParentBlock:d,isInSameBlock:f,isInSameEditingHost:m,isBeforeContentEditableFalse:E(b,0),isAfterContentEditableFalse:E(b,-1),normalizeRange:y}}),o("tinymce/caret/CaretWalker",["tinymce/dom/NodeType","tinymce/caret/CaretCandidate","tinymce/caret/CaretPosition","tinymce/caret/CaretUtils","tinymce/util/Arr","tinymce/util/Fun"],function(e,t,n,i,r,o){function a(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}function s(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null}function l(e,t){if(h(e)){if(v(t.previousSibling)&&!f(t.previousSibling))return n.before(t);if(f(t))return n(t,0)}if(g(e)){if(v(t.nextSibling)&&!f(t.nextSibling))return n.after(t);if(f(t))return n(t,t.data.length)}return g(e)?p(t)?n.before(t):n.after(t):n.before(t)}function c(t,r){var o;return!!e.isBr(t)&&(!!(o=u(1,n.after(t),r))&&!i.isInSameBlock(n.before(t),n.before(o),r))}function u(e,t,p){var C,T,S,x,w,E,A;if(!m(p)||!t)return null;if(A=t,C=A.container(),T=A.offset(),f(C)){if(g(e)&&T>0)return n(C,--T);if(h(e)&&T<C.length)return n(C,++T);S=C}else{if(g(e)&&T>0&&(x=s(C,T-1),v(x)))return!y(x)&&(w=i.findNode(x,e,b,x))?f(w)?n(w,w.data.length):n.after(w):f(x)?n(x,x.data.length):n.before(x);if(h(e)&&T<C.childNodes.length&&(x=s(C,T),v(x)))return c(x,p)?u(e,n.after(x),p):!y(x)&&(w=i.findNode(x,e,b,x))?f(w)?n(w,0):n.before(w):f(x)?n(x,0):n.after(x);S=A.getNode()}return(h(e)&&A.isAtEnd()||g(e)&&A.isAtStart())&&(S=i.findNode(S,e,o.constant(!0),p,!0),b(S))?l(e,S):(x=i.findNode(S,e,b,p),E=r.last(r.filter(a(C,p),d)),!E||x&&E.contains(x)?x?l(e,x):null:A=h(e)?n.after(E):n.before(E))}var d=e.isContentEditableFalse,f=e.isText,m=e.isElement,p=e.isBr,h=i.isForwards,g=i.isBackwards,v=t.isCaretCandidate,y=t.isAtomic,b=t.isEditableCaretCandidate;return function(e){return{next:function(t){return u(1,t,e)},prev:function(t){return u(-1,t,e)}}}}),o("tinymce/InsertList",["tinymce/util/Tools","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition"],function(e,t,n){var i=function(e){var t=e.firstChild,n=e.lastChild;return t&&"meta"===t.name&&(t=t.next),n&&"mce_marker"===n.attr("id")&&(n=n.prev),!(!t||t!==n)&&("ul"===t.name||"ol"===t.name)},r=function(e){var t=e.firstChild,n=e.lastChild;return t&&"META"===t.nodeName&&t.parentNode.removeChild(t),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),e},o=function(e,t,n){var i=t.serialize(n),o=e.createFragment(i);return r(o)},a=function(t){return e.grep(t.childNodes,function(e){return"LI"===e.nodeName})},s=function(e){return!e.firstChild},l=function(e){return e.length>0&&s(e[e.length-1])?e.slice(0,-1):e},c=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},u=function(e,t){return!!c(e,t)},d=function(e,t){var n=t.cloneRange(),i=t.cloneRange();return n.setStartBefore(e),i.setEndAfter(e),[n.cloneContents(),i.cloneContents()]},f=function(e,i){var r=n.before(e),o=new t(i),a=o.next(r);return a?a.toRange():null},m=function(e,i){var r=n.after(e),o=new t(i),a=o.prev(r);return a?a.toRange():null},p=function(t,n,i,r){var o=d(t,r),a=t.parentNode;return a.insertBefore(o[0],t),e.each(n,function(e){a.insertBefore(e,t)}),a.insertBefore(o[1],t),a.removeChild(t),m(n[n.length-1],i)},h=function(t,n,i){var r=t.parentNode;return e.each(n,function(e){r.insertBefore(e,t)}),f(t,i)},g=function(e,t,n,i){return i.insertAfter(t.reverse(),e),m(t[0],n)};return{isListFragment:i,insertAtCaret:function(e,i,r,s){var u=o(i,e,s),d=c(i,r.startContainer),f=l(a(u.firstChild)),m=i.getRoot(),v=function(e){var o=n.fromRangeStart(r),a=new t(i.getRoot()),s=1===e?a.prev(o):a.next(o);return!s||c(i,s.getNode())!==d};return v(1)?h(d,f,m):v(2)?g(d,f,m,i):p(d,f,m,r)},isParentBlockLi:u,trimListItems:l,listItems:a}}),o("tinymce/InsertContent",["tinymce/Env","tinymce/util/Tools","tinymce/html/Serializer","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition","tinymce/dom/ElementUtils","tinymce/dom/NodeType","tinymce/InsertList"],function(e,t,n,i,r,o,a,s){var l=a.matchNodeNames("td th"),c=function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var i=n.firstChild,r=n.lastChild;!i||i===r&&"BR"===i.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t)}},u=function(a,u,d){function f(e){return!!e.getAttribute("data-mce-fragment")}var m,p,h,g,v,y,b,C,T,S,x,w,E=a.schema.getTextInlineElements(),A=a.selection,N=a.dom;/^ | $/.test(u)&&(u=function(e){function t(e){return i[e]&&3==i[e].nodeType}var n,i,r;return n=A.getRng(!0),i=n.startContainer,r=n.startOffset,3==i.nodeType&&(r>0?e=e.replace(/^&nbsp;/," "):t("previousSibling")||(e=e.replace(/^ /,"&nbsp;")),r<i.length?e=e.replace(/&nbsp;(<br>|)$/," "):t("nextSibling")||(e=e.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),e}(u)),m=a.parser,w=d.merge,p=new n({validate:a.settings.validate},a.schema),x='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',y={content:u,format:"html",selection:!0},a.fire("BeforeSetContent",y),u=y.content,-1==u.indexOf("{$caret}")&&(u+="{$caret}"),u=u.replace(/\{\$caret\}/,x),C=A.getRng();var P=C.startContainer||(C.parentElement?C.parentElement():null),k=a.getBody();P===k&&A.isCollapsed()&&N.isBlock(k.firstChild)&&function(e){return e&&!a.schema.getShortEndedElements()[e.nodeName]}(k.firstChild)&&N.isEmpty(k.firstChild)&&(C=N.createRng(),C.setStart(k.firstChild,0),C.setEnd(k.firstChild,0),A.setRng(C)),A.isCollapsed()||(a.selection.setRng(a.selection.getRng()),a.getDoc().execCommand("Delete",!1,null),function(){var e,t,n;e=A.getRng(!0),t=e.startContainer,n=e.startOffset,3==t.nodeType&&e.collapsed&&(" "===t.data[n]?(t.deleteData(n,1),/[\u00a0| ]$/.test(u)||(u+=" ")):" "===t.data[n-1]&&(t.deleteData(n-1,1),/[\u00a0| ]$/.test(u)||(u=" "+u)))}()),h=A.getNode();var M={context:h.nodeName.toLowerCase(),data:d.data};if(v=m.parse(u,M),!0===d.paste&&s.isListFragment(v)&&s.isParentBlockLi(N,h))return C=s.insertAtCaret(p,N,a.selection.getRng(!0),v),a.selection.setRng(C),void a.fire("SetContent",y);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(v),T=v.lastChild,"mce_marker"==T.attr("id"))for(b=T,T=T.prev;T;T=T.walk(!0))if(3==T.type||!N.isBlock(T.name)){a.schema.isValidChild(T.parent.name,"span")&&T.parent.insert(b,T,"br"===T.name);break}if(a._selectionOverrides.showBlockCaretContainer(h),M.invalid){for(A.setContent(x),h=A.getNode(),g=a.getBody(),9==h.nodeType?h=T=g:T=h;T!==g;)h=T,T=T.parentNode;u=h==g?g.innerHTML:N.getOuterHTML(h),u=p.serialize(m.parse(u.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return p.serialize(v)}))),h==g?N.setHTML(g,u):N.setOuterHTML(h,u)}else u=p.serialize(v),c(a,u,h);!function(){if(w){var e=a.getBody(),n=new o(N);t.each(N.select("*[data-mce-fragment]"),function(t){for(var i=t.parentNode;i&&i!=e;i=i.parentNode)E[t.nodeName.toLowerCase()]&&n.compare(i,t)&&N.remove(t,!0)})}}(),function(t){var n,o,s;if(t){if(A.scrollIntoView(t),n=function(e){for(var t=a.getBody();e&&e!==t;e=e.parentNode)if("false"===a.dom.getContentEditable(e))return e;return null}(t))return N.remove(t),void A.select(n);C=N.createRng(),T=t.previousSibling,T&&3==T.nodeType?(C.setStart(T,T.nodeValue.length),e.ie||(S=t.nextSibling)&&3==S.nodeType&&(T.appendData(S.data),S.parentNode.removeChild(S))):(C.setStartBefore(t),C.setEndBefore(t)),o=N.getParent(t,N.isBlock),N.remove(t),o&&N.isEmpty(o)&&(a.$(o).empty(),C.setStart(o,0),C.setEnd(o,0),l(o)||f(o)||!(s=function(e){var t=r.fromRangeStart(e);if(t=new i(a.getBody()).next(t))return t.toRange()}(C))?N.add(o,N.create("br",{"data-mce-bogus":"1"})):(C=s,N.remove(o))),A.setRng(C)}}(N.get("mce_marker")),function(e){t.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})}(a.getBody()),a.fire("SetContent",y),a.addVisual()},d=function(e){var n;return"string"!=typeof e?(n=t.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:n}):{content:e,details:{}}};return{insertAtCaret:function(e,t){var n=d(t);u(e,n.content,n.details)}}}),o("tinymce/EditorCommands",["tinymce/Env","tinymce/util/Tools","tinymce/dom/RangeUtils","tinymce/dom/TreeWalker","tinymce/InsertContent","tinymce/dom/NodeType"],function(e,t,n,r,o,a){var s=t.each,l=t.extend,c=t.map,u=t.inArray,d=t.explode,f=e.ie&&e.ie<11,m=!1;return function(t){function p(e,n,i,r){var o,a,l=0;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus||t.focus(),r=t.fire("BeforeExecCommand",{command:e,ui:n,value:i}),r.isDefaultPrevented())return!1;if(a=e.toLowerCase(),o=B.exec[a])return o(a,n,i),t.fire("ExecCommand",{command:e,ui:n,value:i}),!0;if(s(t.plugins,function(r){if(r.execCommand&&r.execCommand(e,n,i))return t.fire("ExecCommand",{command:e,ui:n,value:i}),l=!0,!1}),l)return l;if(t.theme&&t.theme.execCommand&&t.theme.execCommand(e,n,i))return t.fire("ExecCommand",{command:e,ui:n,value:i}),!0;try{l=t.getDoc().execCommand(e,n,i)}catch(e){}return!!l&&(t.fire("ExecCommand",{command:e,ui:n,value:i}),!0)}function h(e){var n;if(!t.quirks.isHidden()){if(e=e.toLowerCase(),n=B.state[e])return n(e);try{return t.getDoc().queryCommandState(e)}catch(e){}return!1}}function g(e){var n;if(!t.quirks.isHidden()){if(e=e.toLowerCase(),n=B.value[e])return n(e);try{return t.getDoc().queryCommandValue(e)}catch(e){}}}function v(e,t){t=t||"exec",s(e,function(e,n){s(n.toLowerCase().split(","),function(n){B[t][n]=e})})}function y(e,n,i){e=e.toLowerCase(),B.exec[e]=function(e,r,o,a){return n.call(i||t,r,o,a)}}function b(e){if(e=e.toLowerCase(),B.exec[e])return!0;try{return t.getDoc().queryCommandSupported(e)}catch(e){}return!1}function C(e,n,i){e=e.toLowerCase(),B.state[e]=function(){return n.call(i||t)}}function T(e,n,i){e=e.toLowerCase(),B.value[e]=function(){return n.call(i||t)}}function S(e){return e=e.toLowerCase(),!!B.exec[e]}function x(e,n,r){return n===i&&(n=m),r===i&&(r=null),t.getDoc().execCommand(e,n,r)}function w(e){return M.match(e)}function E(e,n){M.toggle(e,n?{value:n}:i),t.nodeChanged()}function A(e){_=k.getBookmark(e)}function N(){k.moveToBookmark(_)}var P,k,M,_,B={state:{},exec:{},value:{}},R=t.settings;t.on("PreInit",function(){P=t.dom,k=t.selection,R=t.settings,M=t.formatter}),l(this,{execCommand:p,queryCommandState:h,queryCommandValue:g,queryCommandSupported:b,addCommands:v,addCommand:y,addQueryStateHandler:C,addQueryValueHandler:T,hasCustomCommand:S}),v({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},"Cut,Copy,Paste":function(n){var i,r=t.getDoc();try{x(n)}catch(e){i=!0}if("paste"!==n||r.queryCommandEnabled(n)||(i=!0),i||!r.queryCommandSupported(n)){var o=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");e.mac&&(o=o.replace(/Ctrl\+/g,"⌘+")),t.notificationManager.open({text:o,type:"error"})}},unlink:function(){if(k.isCollapsed()){var e=t.dom.getParent(t.selection.getStart(),"a");return void(e&&t.dom.remove(e,!0))}M.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"==t&&(t="justify"),s("left,center,right,justify".split(","),function(e){t!=e&&M.remove("align"+e)}),"none"!=t&&E("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;x(e),(t=P.getParent(k.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(A(),P.split(n,t),N()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){E(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){E(e,n)},FontSize:function(e,t,n){var i,r;n>=1&&n<=7&&(r=d(R.font_size_style_values),i=d(R.font_size_classes),n=i?i[n-1]||n:r[n-1]||n),E(e,n)},RemoveFormat:function(e){M.remove(e)},mceBlockQuote:function(){E("blockquote")},FormatBlock:function(e,t,n){return E(n||"p")},mceCleanup:function(){var e=k.getBookmark();t.setContent(t.getContent({cleanup:!0}),{cleanup:!0}),k.moveToBookmark(e)},mceRemoveNode:function(e,n,i){var r=i||k.getNode();r!=t.getBody()&&(A(),t.dom.remove(r,!0),N())},mceSelectNodeDepth:function(e,n,i){var r=0;P.getParent(k.getNode(),function(e){if(1==e.nodeType&&r++==i)return k.select(e),m},t.getBody())},mceSelectNode:function(e,t,n){k.select(n)},mceInsertContent:function(e,n,i){o.insertAtCaret(t,i)},mceInsertRawHTML:function(e,n,i){k.setContent("tiny_mce_marker"),t.setContent(t.getContent().replace(/tiny_mce_marker/g,function(){return i}))},mceToggleFormat:function(e,t,n){E(n)},mceSetContent:function(e,n,i){t.setContent(i)},"Indent,Outdent":function(e){var n,i,r;n=R.indentation,i=/[a-z%]+$/i.exec(n),n=parseInt(n,10),h("InsertUnorderedList")||h("InsertOrderedList")?x(e):(R.forced_root_block||P.getParent(k.getNode(),P.isBlock)||M.apply("div"),s(k.getSelectedBlocks(),function(o){if("false"!==P.getContentEditable(o)&&"LI"!==o.nodeName){var a=t.getParam("indent_use_margin",!1)?"margin":"padding";a="TABLE"===o.nodeName?"margin":a,a+="rtl"==P.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(r=Math.max(0,parseInt(o.style[a]||0,10)-n),P.setStyle(o,a,r?r+i:"")):(r=parseInt(o.style[a]||0,10)+n+i,P.setStyle(o,a,r))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){t.hasVisual=!t.hasVisual,t.addVisual()},mceReplaceContent:function(e,n,i){t.execCommand("mceInsertContent",!1,i.replace(/\{\$selection\}/g,k.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var i;"string"==typeof n&&(n={href:n}),i=P.getParent(k.getNode(),"a"),n.href=n.href.replace(" ","%20"),i&&n.href||M.remove("link"),n.href&&M.apply("link",n,i)},selectAll:function(){var e,t=P.getRoot();if(k.getRng().setStart){var n=P.getParent(k.getStart(),a.isContentEditableTrue);n&&(e=P.createRng(),e.selectNodeContents(n),k.setRng(e))}else e=k.getRng(),e.item||(e.moveToElementText(t),e.select())},delete:function(){x("Delete");var e=t.getBody();P.isEmpty(e)&&(t.setContent(""),e.firstChild&&P.isBlock(e.firstChild)?t.selection.setCursorLocation(e.firstChild,0):t.selection.setCursorLocation(e,0))},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,i,o){var a,s,l,c=o,u=k.getRng(!0);new n(P).normalize(u);var d=u.startOffset,m=u.startContainer;if(1==m.nodeType&&m.hasChildNodes()){var p=d>m.childNodes.length-1;m=m.childNodes[Math.min(d,m.childNodes.length-1)]||m,d=p&&3==m.nodeType?m.nodeValue.length:0}var h=P.getParent(m,P.isBlock),g=h?h.nodeName.toUpperCase():"",v=h?P.getParent(h.parentNode,P.isBlock):null,y=v?v.nodeName.toUpperCase():"",b=c&&c.ctrlKey;"LI"!=y||b||(h=v,g=y),m&&3==m.nodeType&&d>=m.nodeValue.length&&(f||function(){for(var e,n=new r(m,h),i=t.schema.getNonEmptyElements();e=n.next();)if(i[e.nodeName.toLowerCase()]||e.length>0)return!0}()||(a=P.create("br"),u.insertNode(a),u.setStartAfter(a),u.setEndAfter(a),s=!0)),a=P.create("br"),u.insertNode(a);var C=P.doc.documentMode;return f&&"PRE"==g&&(!C||C<8)&&a.parentNode.insertBefore(P.doc.createTextNode("\r"),a),l=P.create("span",{},"&nbsp;"),a.parentNode.insertBefore(l,a),k.scrollIntoView(l),P.remove(l),s?(u.setStartBefore(a),u.setEndBefore(a)):(u.setStartAfter(a),u.setEndAfter(a)),k.setRng(u),t.undoManager.add(),!0}}),v({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=k.isCollapsed()?[P.getParent(k.getNode(),P.isBlock)]:k.getSelectedBlocks(),i=c(n,function(e){return!!M.matchNode(e,t)});return-1!==u(i,!0)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return w(e)},mceBlockQuote:function(){return w("blockquote")},Outdent:function(){var e;if(R.inline_styles){if((e=P.getParent(k.getStart(),P.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return!0;if((e=P.getParent(k.getEnd(),P.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return!0}return h("InsertUnorderedList")||h("InsertOrderedList")||!R.inline_styles&&!!P.getParent(k.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=P.getParent(k.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),v({"FontSize,FontName":function(e){var t,n=0;return(t=P.getParent(k.getNode(),"span"))&&(n="fontsize"==e?t.style.fontSize:t.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),n}},"value"),v({Undo:function(){t.undoManager.undo()},Redo:function(){t.undoManager.redo()}})}}),o("tinymce/util/URI",["tinymce/util/Tools"],function(e){function t(e,o){var a,s,l=this;if(e=i(e),o=l.settings=o||{},a=o.base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(l.source=e);var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(a?a.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(s=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+l.toAbsPath(s,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(a&&a.protocol||"http")+"://mce_host"+l.toAbsPath(s,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(r,function(t,n){var i=e[n];i&&(i=i.replace(/\(mce_at\)/g,"@@")),l[t]=i}),a&&(l.protocol||(l.protocol=a.protocol),l.userInfo||(l.userInfo=a.userInfo),l.port||"mce_host"!==l.host||(l.port=a.port),l.host&&"mce_host"!==l.host||(l.host=a.host),l.source=""),c&&(l.protocol="")}var n=e.each,i=e.trim,r="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n,i=this;if("./"===e)return e;if(e=new t(e,{base_uri:i}),"mce_host"!=e.host&&i.host!=e.host&&e.host||i.port!=e.port||i.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var r=i.getURI(),o=e.getURI();return r==o||"/"==r.charAt(r.length-1)&&r.substr(0,r.length-1)==o?r:(n=i.toRelPath(i.path,e.path),e.query&&(n+="?"+e.query),e.anchor&&(n+="#"+e.anchor),n)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,i,r,o=0,a="";if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(i=0,r=e.length;i<r;i++)if(i>=n.length||e[i]!=n[i]){o=i+1;break}if(e.length<n.length)for(i=0,r=n.length;i<r;i++)if(i>=e.length||e[i]!=n[i]){o=i+1;break}if(1===o)return t;for(i=0,r=e.length-(o-1);i<r;i++)a+="../";for(i=o-1,r=n.length;i<r;i++)a+=i!=o-1?"/"+n[i]:n[i];return a},toAbsPath:function(e,t){var i,r,o,a=0,s=[];for(r=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&s.push(e)}),e=s,i=t.length-1,s=[];i>=0;i--)0!==t[i].length&&"."!==t[i]&&(".."!==t[i]?a>0?a--:s.push(t[i]):a++);return i=e.length-a,o=i<=0?s.reverse().join("/"):e.slice(0,i).join("/")+"/"+s.reverse().join("/"),0!==o.indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(n.protocol?t+=n.protocol+"://":t+="//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}},t.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},t}),o("tinymce/util/Class",["tinymce/util/Tools"],function(e){function t(){}var n,i,r=e.each,o=e.extend;return t.extend=n=function(e){function t(){var e,t,n,r=this;if(!i&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}var s,l,c,u=this,d=u.prototype;i=!0,s=new u,i=!1,e.Mixins&&(r(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),d.Mixins&&(e.Mixins=d.Mixins.concat(e.Mixins))),e.Methods&&r(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&r(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this;return void 0!==e?(t[n]=e,t):t[n]}}),e.Statics&&r(e.Statics,function(e,n){t[n]=e}),e.Defaults&&d.Defaults&&(e.Defaults=o({},d.Defaults,e.Defaults));for(l in e)c=e[l],"function"==typeof c&&d[l]?s[l]=function(e,t){return function(){var n,i=this,r=i._super;return i._super=d[e],n=t.apply(i,arguments),i._super=r,n}}(l,c):s[l]=c;return t.prototype=s,t.constructor=t,t.extend=n,t},t}),o("tinymce/util/EventDispatcher",["tinymce/util/Tools"],function(e){function t(t){function n(){return!1}function i(){return!0}function r(e,r){var o,s,l,u;if(e=e.toLowerCase(),r=r||{},r.type=e,r.target||(r.target=c),r.preventDefault||(r.preventDefault=function(){r.isDefaultPrevented=i},r.stopPropagation=function(){r.isPropagationStopped=i},r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=i},r.isDefaultPrevented=n,r.isPropagationStopped=n,r.isImmediatePropagationStopped=n),t.beforeFire&&t.beforeFire(r),o=f[e])for(s=0,l=o.length;s<l;s++){if(u=o[s],u.once&&a(e,u.func),r.isImmediatePropagationStopped())return r.stopPropagation(),r;if(!1===u.func.call(c,r))return r.preventDefault(),r}return r}function o(t,i,r,o){var a,s,l;if(!1===i&&(i=n),i)for(i={func:i},o&&e.extend(i,o),s=t.toLowerCase().split(" "),l=s.length;l--;)t=s[l],a=f[t],a||(a=f[t]=[],u(t,!0)),r?a.unshift(i):a.push(i);return d}function a(e,t){var n,i,r,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],i=f[e],!e){for(r in f)u(r,!1),delete f[r];return d}if(i){if(t)for(a=i.length;a--;)i[a].func===t&&(i=i.slice(0,a).concat(i.slice(a+1)),f[e]=i);else i.length=0;i.length||(u(e,!1),delete f[e])}}else{for(e in f)u(e,!1);f={}}return d}function s(e,t,n){return o(e,t,n,{once:!0})}function l(e){return e=e.toLowerCase(),!(!f[e]||0===f[e].length)}var c,u,d=this,f={};t=t||{},c=t.scope||d,u=t.toggleEvent||n,d.fire=r,d.on=o,d.off=a,d.once=s,d.has=l}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),o("tinymce/data/Binding",[],function(){function e(e){this.create=e.create}return e.create=function(t,n){return new e({create:function(e,i){function r(t){e.set(i,t.value)}function o(e){t.set(n,e.value)}var a;return e.on("change:"+i,o),t.on("change:"+n,r),a=e._bindings,a||(a=e._bindings=[],e.on("destroy",function(){for(var e=a.length;e--;)a[e]()})),a.push(function(){t.off("change:"+n,r)}),t.get(n)}})},e}),o("tinymce/util/Observable",["tinymce/util/EventDispatcher"],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,i){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,i)}})),t._eventDispatcher}return{fire:function(e,n,i){var r=this;if(r.removed&&"remove"!==e)return n;if(n=t(r).fire(e,n,i),!1!==i&&r.parent)for(var o=r.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,i){return t(this).on(e,n,i)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),o("tinymce/data/ObservableObject",["tinymce/data/Binding","tinymce/util/Observable","tinymce/util/Class","tinymce/util/Tools"],function(e,t,n,i){function r(e){return e.nodeType>0}function o(e,t){var n,a;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(i.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!o(e[n],t[n]))return!1}if(r(e)||r(t))return e===t;a={};for(n in t){if(!o(e[n],t[n]))return!1;a[n]=!0}for(n in e)if(!a[n]&&!o(e[n],t[n]))return!1;return!0}return n.extend({Mixins:[t],init:function(t){var n,i;t=t||{};for(n in t)(i=t[n])instanceof e&&(t[n]=i.create(this,n));this.data=t},set:function(t,n){var i,r,a=this.data[t];if(n instanceof e&&(n=n.create(this,t)),"object"==typeof t){for(i in t)this.set(i,t[i]);return this}return o(a,n)||(this.data[t]=n,r={target:this,name:t,value:n,oldValue:a},this.fire("change:"+t,r),this.fire("change",r)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(t){return e.create(this,t)},destroy:function(){this.fire("destroy")}})}),o("tinymce/ui/Selector",["tinymce/util/Class"],function(e){function t(e){for(var t,n=[],i=e.length;i--;)t=e[i],t.__checked||(n.push(t),t.__checked=1);for(i=n.length;i--;)delete n[i].__checked;return n}var n,i=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,o=/^\s*|\s*$/g,a=e.extend({init:function(e){function t(e){if(e)return e=e.toLowerCase(),function(t){return"*"===e||t.type===e}}function n(e){if(e)return function(t){return t._name===e}}function a(e){if(e)return e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}}function s(e,t,n){if(e)return function(i){var r=i[e]?i[e]():"";return t?"="===t?r===n:"*="===t?r.indexOf(n)>=0:"~="===t?(" "+r+" ").indexOf(" "+n+" ")>=0:"!="===t?r!=n:"^="===t?0===r.indexOf(n):"$="===t&&r.substr(r.length-n.length)===n:!!n}}function l(e){var t;if(e)return e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,i){return"first"===e?0===n:"last"===e?n===i-1:"even"===e?n%2==0:"odd"===e?n%2==1:!!t[e]&&t[e]()})}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=i.exec(e.replace(o,"")),u(t(d[1])),u(n(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.pseudo=!!d[7],r.direct=c,r}function u(e,t){var n,i,o,a=[];do{if(r.exec(""),(i=r.exec(e))&&(e=i[3],a.push(i[1]),i[2])){n=i[3];break}}while(i);for(n&&u(n,t),e=[],o=0;o<a.length;o++)">"!=a[o]&&e.push(c(a[o],[],">"===a[o-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,i,r,o,a,s,l,c,u,d,f,m,p;for(t=t||this._selectors,n=0,i=t.length;n<i;n++){for(a=t[n],o=a.length,p=e,m=0,r=o-1;r>=0;r--)for(c=a[r];p;){if(c.pseudo)for(f=p.parent().items(),u=d=f.length;u--&&f[u]!==p;);for(s=0,l=c.length;s<l;s++)if(!c[s](p,u,d)){s=l+1;break}if(s===l){m++;break}if(r===o-1)break;p=p.parent()}if(m===o)return!0}return!1},find:function(e){function i(e,t,n){var r,o,a,l,c,u=t[n];for(r=0,o=e.length;r<o;r++){for(c=e[r],a=0,l=u.length;a<l;a++)if(!u[a](c,r,o)){a=l+1;break}if(a===l)n==t.length-1?s.push(c):c.items&&i(c.items(),t,n+1);else if(u.direct)return;c.items&&i(c.items(),t,n)}}var r,o,s=[],l=this._selectors;if(e.items){for(r=0,o=l.length;r<o;r++)i(e.items(),l[r],0);o>1&&(s=t(s))}return n||(n=a.Collection),new n(s)}});return a}),o("tinymce/ui/Collection",["tinymce/util/Tools","tinymce/ui/Selector","tinymce/util/Class"],function(e,t,n){var i,r,o=Array.prototype.push,a=Array.prototype.slice;return r={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof i?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t,n=this,i=n.length;for(n.length=0,n.add(e),t=n.length;t<i;t++)delete n[t];return n},filter:function(e){var n,r,o,a,s=this,l=[];for("string"==typeof e?(e=new t(e),a=function(t){return e.match(t)}):a=e,n=0,r=s.length;n<r;n++)o=s[n],a(o)&&l.push(o);return new i(l)},slice:function(){return new i(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new i(e.toArray(this).reverse())},hasClass:function(e){return!!this[0]&&this[0].classes.contains(e)},prop:function(e,t){var n,i=this;return void 0!==t?(i.each(function(n){n[e]&&n[e](t)}),i):(n=i[0],n&&n[e]?n[e]():void 0)},exec:function(t){var n=this,i=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,i)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},e.each("fire on off show hide append prepend before after reflow".split(" "),function(t){r[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){r[e]=function(t){return this.prop(e,t)}}),i=n.extend(r),t.Collection=i,i}),o("tinymce/ui/DomUtils",["tinymce/Env","tinymce/util/Tools","tinymce/dom/DOMUtils"],function(e,t,n){var i=0,r={id:function(){return"mceu_"+i++},create:function(e,i,r){var o=document.createElement(e);return n.DOM.setAttribs(o,i),"string"==typeof r?o.innerHTML=r:t.each(r,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return n.DOM.createFragment(e)},getWindowSize:function(){return n.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var i=e.getBoundingClientRect();t=Math.max(i.width||i.right-i.left,e.offsetWidth),n=Math.max(i.height||i.bottom-i.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return n.DOM.getPos(e,t||r.getContainer())},getContainer:function(){return e.container?e.container:document.body},getViewPort:function(e){return n.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return n.DOM.addClass(e,t)},removeClass:function(e,t){return n.DOM.removeClass(e,t)},hasClass:function(e,t){return n.DOM.hasClass(e,t)},toggleClass:function(e,t,i){return n.DOM.toggleClass(e,t,i)},css:function(e,t,i){return n.DOM.setStyle(e,t,i)},getRuntimeStyle:function(e,t){return n.DOM.getStyle(e,t,!0)},on:function(e,t,i,r){return n.DOM.bind(e,t,i,r)},off:function(e,t,i){return n.DOM.unbind(e,t,i)},fire:function(e,t,i){return n.DOM.fire(e,t,i)},innerHtml:function(e,t){n.DOM.setHTML(e,t)}};return r}),o("tinymce/ui/BoxUtils",[],function(){return{parseBox:function(e){var t;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],10)||0,right:parseInt(e[1],10)||0,bottom:parseInt(e[2],10)||0,left:parseInt(e[3],10)||0})},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function i(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:i(t+"TopWidth"),right:i(t+"RightWidth"),bottom:i(t+"BottomWidth"),left:i(t+"LeftWidth")}}}}),o("tinymce/ui/ClassList",["tinymce/util/Tools"],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),n.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)t>0&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),o("tinymce/ui/ReflowQueue",["tinymce/util/Delay"],function(e){var t,n={};return{add:function(i){var r=i.parent();if(r){if(!r._layout||r._layout.isNative())return;n[r._id]||(n[r._id]=r),t||(t=!0,e.requestAnimationFrame(function(){var e,i;t=!1;for(e in n)i=n[e],i.state.get("rendered")&&i.reflow();n={}},document.body))}},remove:function(e){n[e._id]&&delete n[e._id]}}}),o("tinymce/ui/Control",["tinymce/util/Class","tinymce/util/Tools","tinymce/util/EventDispatcher","tinymce/data/ObservableObject","tinymce/ui/Collection","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/ui/BoxUtils","tinymce/ui/ClassList","tinymce/ui/ReflowQueue"],function(e,t,n,i,r,o,a,s,l,c){function u(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,i){i&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&d(e))}})),e._eventDispatcher}function d(e){function t(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function n(){var e=c._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),c._lastHoverCtrl=null)}function i(t){var n,i,r,o=e.getParentCtrl(t.target),a=c._lastHoverCtrl,s=0;if(o!==a){if(c._lastHoverCtrl=o,i=o.parents().toArray().reverse(),i.push(o),a){for(r=a.parents().toArray().reverse(),r.push(a),s=0;s<r.length&&i[s]===r[s];s++);for(n=r.length-1;n>=s;n--)a=r[n],a.fire("mouseleave",{target:a.getEl()})}for(n=s;n<i.length;n++)o=i[n],o.fire("mouseenter",{target:o.getEl()})}}function r(t){t.preventDefault(),"mousewheel"==t.type?(t.deltaY=-.025*t.wheelDelta,t.wheelDeltaX&&(t.deltaX=-.025*t.wheelDeltaX)):(t.deltaX=0,t.deltaY=t.detail),t=e.fire("wheel",t)}var o,s,l,c,u,d;if(u=e._nativeEvents){for(l=e.parents().toArray(),l.unshift(e),o=0,s=l.length;!c&&o<s;o++)c=l[o]._eventsRoot;for(c||(c=l[l.length-1]||e),e._eventsRoot=c,s=o,o=0;o<s;o++)l[o]._eventsRoot=c;var f=c._delegates;f||(f=c._delegates={});for(d in u){if(!u)return!1;"wheel"!==d||p?("mouseenter"===d||"mouseleave"===d?c._hasMouseEnter||(a(c.getEl()).on("mouseleave",n).on("mouseover",i),c._hasMouseEnter=1):f[d]||(a(c.getEl()).on(d,t),f[d]=!0),u[d]=!1):m?a(e.getEl()).on("mousewheel",r):a(e.getEl()).on("DOMMouseScroll",r)}}}var f,m="onmousewheel"in document,p=!1,h=0,g={Statics:{classPrefix:"mce-"},isRtl:function(){return f.rtl},classPrefix:"mce-",init:function(e){function n(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)c.classes.add(e[t])}var r,o,c=this;c.settings=e=t.extend({},c.Defaults,e),c._id=e.id||"mceu_"+h++,c._aria={role:e.role},c._elmCache={},c.$=a,c.state=new i({visible:!0,active:!1,disabled:!1,value:""}),c.data=new i(e.data),c.classes=new l(function(){c.state.get("rendered")&&(c.getEl().className=this.toString())}),c.classes.prefix=c.classPrefix,r=e.classes,r&&(c.Defaults&&(o=c.Defaults.classes)&&r!=o&&n(o),n(r)),t.each("title text name visible disabled active value".split(" "),function(t){t in e&&c[t](e[t])}),c.on("click",function(){if(c.disabled())return!1}),c.settings=e,c.borderBox=s.parseBox(e.border),c.paddingBox=s.parseBox(e.padding),c.marginBox=s.parseBox(e.margin),e.hidden&&c.hide()},Properties:"parent,name",getContainerElm:function(){return o.getContainer()},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e,t,n,i,r,a,l,c,u,d,f=this,m=f.settings,p=f.getEl();e=f.borderBox=f.borderBox||s.measureBox(p,"border"),f.paddingBox=f.paddingBox||s.measureBox(p,"padding"),f.marginBox=f.marginBox||s.measureBox(p,"margin"),d=o.getSize(p),c=m.minWidth,u=m.minHeight,r=c||d.width,a=u||d.height,n=m.width,i=m.height,l=m.autoResize,l=void 0!==l?l:!n&&!i,n=n||r,i=i||a;var h=e.left+e.right,g=e.top+e.bottom,v=m.maxWidth||65535,y=m.maxHeight||65535;return f._layoutRect=t={x:m.x||0,y:m.y||0,w:n,h:i,deltaW:h,deltaH:g,contentW:n-h,contentH:i-g,innerW:n-h,innerH:i-g,startMinWidth:c||0,startMinHeight:u||0,minW:Math.min(r,v),minH:Math.min(a,y),maxW:v,maxH:y,autoResize:l,scrollW:0},f._lastLayoutRect={},t},layoutRect:function(e){var t,n,i,r,o,a=this,s=a._layoutRect;return s||(s=a.initLayoutRect()),e?(i=s.deltaW,r=s.deltaH,void 0!==e.x&&(s.x=e.x),void 0!==e.y&&(s.y=e.y),void 0!==e.minW&&(s.minW=e.minW),void 0!==e.minH&&(s.minH=e.minH),n=e.w,void 0!==n&&(n=n<s.minW?s.minW:n,n=n>s.maxW?s.maxW:n,s.w=n,s.innerW=n-i),n=e.h,void 0!==n&&(n=n<s.minH?s.minH:n,n=n>s.maxH?s.maxH:n,s.h=n,s.innerH=n-r),n=e.innerW,void 0!==n&&(n=n<s.minW-i?s.minW-i:n,n=n>s.maxW-i?s.maxW-i:n,s.innerW=n,s.w=n+i),n=e.innerH,void 0!==n&&(n=n<s.minH-r?s.minH-r:n,n=n>s.maxH-r?s.maxH-r:n,s.innerH=n,s.h=n+r),void 0!==e.contentW&&(s.contentW=e.contentW),void 0!==e.contentH&&(s.contentH=e.contentH),t=a._lastLayoutRect,t.x===s.x&&t.y===s.y&&t.w===s.w&&t.h===s.h||(o=f.repaintControls,o&&o.map&&!o.map[a._id]&&(o.push(a),o.map[a._id]=!0),t.x=s.x,t.y=s.y,t.w=s.w,t.h=s.h),a):s},repaint:function(){var e,t,n,i,r,o,a,s,l,c,u=this;l=document.createRange?function(e){return e}:Math.round,e=u.getEl().style,i=u._layoutRect,s=u._lastRepaintRect||{},r=u.borderBox,o=r.left+r.right,a=r.top+r.bottom,i.x!==s.x&&(e.left=l(i.x)+"px",s.x=i.x),i.y!==s.y&&(e.top=l(i.y)+"px",s.y=i.y),i.w!==s.w&&(c=l(i.w-o),e.width=(c>=0?c:0)+"px",s.w=i.w),i.h!==s.h&&(c=l(i.h-a),e.height=(c>=0?c:0)+"px",s.h=i.h),u._hasBody&&i.innerW!==s.innerW&&(c=l(i.innerW),n=u.getEl("body"),n&&(t=n.style,t.width=(c>=0?c:0)+"px"),s.innerW=i.innerW),u._hasBody&&i.innerH!==s.innerH&&(c=l(i.innerH),n=n||u.getEl("body"),n&&(t=t||n.style,t.height=(c>=0?c:0)+"px"),s.innerH=i.innerH),u._lastRepaintRect=s,u.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,o.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){var n=this;return u(n).on(e,function(e){var t,i;return"string"!=typeof e?e:function(r){return t||n.parentsAndSelf().each(function(n){var r=n.settings.callbacks;if(r&&(t=r[e]))return i=n,!1}),t?t.call(i,r):(r.action=e,void this.fire("execute",r))}}(t)),n},off:function(e,t){return u(this).off(e,t),this},fire:function(e,t,n){var i=this;if(t=t||{},t.control||(t.control=i),t=u(i).fire(e,t),!1!==n&&i.parent)for(var r=i.parent();r&&!t.isPropagationStopped();)r.fire(e,t,!1),r=r.parent();return t},hasEventListeners:function(e){return u(this).has(e)},parents:function(e){var t,n=this,i=new r;for(t=n.parent();t;t=t.parent())i.add(t);return e&&(i=i.filter(e)),i},parentsAndSelf:function(e){return new r(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=a("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,i=n.getEl(n.ariaTarget);return void 0===t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&i.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return f.translate?f.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e,t,n=this,i=n.getEl(),r=n.parent();if(n.items){var o=n.items().toArray();for(t=o.length;t--;)o[t].remove()}r&&r.items&&(e=[],r.items().each(function(t){t!==n&&e.push(t)}),r.items().set(e),r._lastRect=null),n._eventsRoot&&n._eventsRoot==n&&a(i).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return a(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return a(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e,t,n,i,r,o=this,s=o.settings;o.$el=a(o.getEl()),o.state.set("rendered",!0);for(i in s)0===i.indexOf("on")&&o.on(i.substr(2),s[i]);if(o._eventsRoot){for(n=o.parent();!r&&n;n=n.parent())r=n._eventsRoot;if(r)for(i in r._nativeEvents)o._nativeEvents[i]=!0}d(o),s.style&&(e=o.getEl())&&(e.setAttribute("style",s.style),e.style.cssText=s.style),o.settings.border&&(t=o.borderBox,o.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var l=o.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[o._id]=o;for(var u in o._aria)o.aria(u,o._aria[u]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(e){var t,n=e.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),t=o.parent(),t&&(t._lastRect=null),o.fire(n?"show":"hide"),c.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){var t,n,i,r,o,a,s=this.getEl(),l=s.parentNode,c=function(e,t){var n,i,r=e;for(n=i=0;r&&r!=t&&r.nodeType;)n+=r.offsetLeft||0,i+=r.offsetTop||0,r=r.offsetParent;return{x:n,y:i}}(s,l);return t=c.x,n=c.y,i=s.offsetWidth,r=s.offsetHeight,o=l.clientWidth,a=l.clientHeight,"end"==e?(t-=o-i,n-=a-r):"center"==e&&(t-=o/2-i/2,n-=a/2-r/2),l.scrollLeft=t,l.scrollTop=n,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),e=t,t=t.parent()}e||(e=this);for(var i=n.length;i--;)n[i].rootControl=e;return e},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return t.each("text title visible disabled active value".split(" "),function(e){g[e]=function(t){return 0===arguments.length?this.state.get(e):(void 0!==t&&this.state.set(e,t),this)}}),f=e.extend(g)}),o("tinymce/ui/Factory",[],function(){var e,t={};return{add:function(e,n){t[e.toLowerCase()]=n},has:function(e){return!!t[e.toLowerCase()]},create:function(n,i){var r,o,a;if(!e){a=tinymce.ui;for(o in a)t[o.toLowerCase()]=a[o];e=!0}if("string"==typeof n?(i=i||{},i.type=n):(i=n,n=i.type),n=n.toLowerCase(),!(r=t[n]))throw new Error("Could not find control by type: "+n);return r=new r(i),r.type=n,r}}}),o("tinymce/ui/KeyboardNavigation",[],function(){return function(e){function t(e){return e&&1===e.nodeType}function n(e){return e=e||b,t(e)?e.getAttribute("role"):null}function i(e){for(var t,i=e||b;i=i.parentNode;)if(t=n(i))return t}function r(e){var n=b;if(t(n))return n.getAttribute("aria-"+e)}function o(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function a(e){return!(!o(e)||e.hidden)||!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(n(e))}function s(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display&&!e.disabled){a(e)&&n.push(e);for(var i=0;i<e.childNodes.length;i++)t(e.childNodes[i])}}var n=[];return t(e||T.getEl()),n}function l(e){var t,n;e=e||C,n=e.parents().toArray(),n.unshift(e);for(var i=0;i<n.length&&(t=n[i],!t.settings.ariaRoot);i++);return t}function c(e){var t=l(e),n=s(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?u(t.lastAriaIndex,n):u(0,n)}function u(e,t){return e<0?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,i=l();t=t||s(i.getEl());for(var r=0;r<t.length;r++)t[r]===b&&(n=r);n+=e,i.lastAriaIndex=u(n,t)}function f(){"tablist"==i()?d(-1,s(b.parentNode)):C.parent().submenu?v():d(-1)}function m(){var e=n(),t=i();"tablist"==t?d(1,s(b.parentNode)):"menuitem"==e&&"menu"==t&&r("haspopup")?y():d(1)}function p(){d(-1)}function h(){var e=n(),t=i();"menuitem"==e&&"menubar"==t?y():"button"==e&&r("haspopup")?y({key:"down"}):d(1)}function g(e){if("tablist"==i()){var t=s(C.getEl("body"))[0];t&&t.focus()}else d(e.shiftKey?-1:1)}function v(){C.fire("cancel")}function y(e){e=e||{},C.fire("click",{target:b,aria:e})}var b,C,T=e.root;try{b=document.activeElement}catch(e){b=document.body}return C=T.getParentCtrl(b),T.on("keydown",function(e){function t(e,t){o(b)||"slider"!==n(b)&&!1!==t(e)&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,f);break;case 39:t(e,m);break;case 38:t(e,p);break;case 40:t(e,h);break;case 27:v();break;case 14:case 13:case 32:t(e,y);break;case 9:!1!==g(e)&&e.preventDefault()}}),T.on("focusin",function(e){b=e.target,C=e.control}),{focusFirst:c}}}),o("tinymce/ui/Container",["tinymce/ui/Control","tinymce/ui/Collection","tinymce/ui/Selector","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/util/Tools","tinymce/dom/DomQuery","tinymce/ui/ClassList","tinymce/ui/ReflowQueue"],function(e,t,n,i,r,o,a,s,l){var c={};return e.extend({init:function(e){var n=this;n._super(e),e=n.settings,e.fixed&&n.state.set("fixed",!0),n._items=new t,n.isRtl()&&n.classes.add("rtl"),n.bodyClasses=new s(function(){n.state.get("rendered")&&(n.getEl("body").className=this.toString())}),n.bodyClasses.prefix=n.classPrefix,n.classes.add("container"),n.bodyClasses.add("container-body"),e.containerCls&&n.classes.add(e.containerCls),n._layout=i.create((e.layout||"")+"layout"),n.settings.items?n.add(n.settings.items):n.add(n.render()),n._hasBody=!0},items:function(){return this._items},find:function(e){return e=c[e]=c[e]||new n(e),e.find(this)},add:function(e){var t=this;return t.items().add(t.create(e)).parent(t),t},focus:function(e){var t,n,i,r=this;return e&&(n=r.keyboardNav||r.parents().eq(-1)[0].keyboardNav)?void n.focusFirst(r):(i=r.find("*"),r.statusbar&&i.add(r.statusbar.items()),i.each(function(e){if(e.settings.autofocus)return t=null,!1;e.canFocus&&(t=t||e)}),t&&t.focus(),r)},replace:function(e,t){for(var n,i=this.items(),r=i.length;r--;)if(i[r]===e){i[r]=t;break}r>=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),(n=e.getEl())&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n,r=this,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),n=o.extend({},r.settings.defaults,t),t.type=n.type=n.type||t.type||r.settings.defaultType||(n.defaults?n.defaults.type:null),t=i.create(n)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var i;t.parent(e),t.state.get("rendered")||(i=e.getEl("body"),i.hasChildNodes()&&n<=i.childNodes.length-1?a(i.childNodes[n]).before(t.renderHtml()):a(i).append(t.renderHtml()),t.postRender(),l.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var i,r,o,a=this;return e=a.create(e),i=a.items(),!n&&t<i.length-1&&(t+=1),t>=0&&t<i.length&&(r=i.slice(0,t).toArray(),o=i.slice(t).toArray(),i.set(r.concat(e,o))),a.renderNew()},fromJSON:function(e){var t=this;for(var n in e)t.find("#"+n).value(e[n]);return t},toJSON:function(){var e=this,t={};return e.find("*").each(function(e){var n=e.name(),i=e.value();n&&void 0!==i&&(t[n]=i)}),t},renderHtml:function(){var e=this,t=e._layout,n=this.settings.role;return e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"'+(n?' role="'+this.settings.role+'"':"")+'><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t.state.set("rendered",!0),t.settings.style&&t.$el.css(t.settings.style),t.settings.border&&(e=t.borderBox,t.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=new r({root:t})),t},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;if(!n||n.w!=t.w||n.h!=t.h)return e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0},reflow:function(){var t;if(l.remove(this),this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),o("tinymce/ui/DragHelper",["tinymce/dom/DomQuery"],function(e){function t(e){var t,n,i,r,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,i=c(t.scrollWidth,n.scrollWidth),r=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:i<o?r:i,height:a<l?s:a}}function n(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}return function(i,r){function o(){return m.getElementById(r.handle||i)}var a,s,l,c,u,d,f,m=r.document||document;r=r||{},l=function(i){var l,p,h=t(m);n(i),i.preventDefault(),s=i.button,l=o(),d=i.screenX,f=i.screenY,p=window.getComputedStyle?window.getComputedStyle(l,null).getPropertyValue("cursor"):l.runtimeStyle.cursor,a=e("<div></div>").css({position:"absolute",top:0,left:0,width:h.width,height:h.height,zIndex:2147483647,opacity:1e-4,cursor:p}).appendTo(m.body),e(m).on("mousemove touchmove",u).on("mouseup touchend",c),r.start(i)},u=function(e){if(n(e),e.button!==s)return c(e);e.deltaX=e.screenX-d,e.deltaY=e.screenY-f,e.preventDefault(),r.drag(e)},c=function(t){n(t),e(m).off("mousemove touchmove",u).off("mouseup touchend",c),a.remove(),r.stop&&r.stop(t)},this.destroy=function(){e(o()).off()},e(o()).on("mousedown touchstart",l)}}),o("tinymce/ui/Scrollable",["tinymce/dom/DomQuery","tinymce/ui/DragHelper"],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,m,p,h,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),e(i.getEl("absend")).css(y,i.layoutRect()[l]-1),!c)return void e(f).css("display","none");e(f).css("display","block"),d=i.getEl("body"),m=i.getEl("scroll"+t+"t"),p=d["client"+s]-2*r,p-=n&&o?f["client"+u]:0,h=d["scroll"+s],g=p/h,v={},v[y]=d["offset"+a]+r,v[b]=p,e(f).css(v),v={},v[y]=d["scroll"+a]*g,v[b]=p*g,e(m).css(v)}}var n,o,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,o=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",o,"Width")}var i=this,r=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,function(){function n(n,o,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;e(i.getEl()).append('<div id="'+u+'" class="'+d+"scrollbar "+d+"scrollbar-"+n+'"><div id="'+u+'t" class="'+d+'scrollbar-thumb"></div></div>'),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+o],e("#"+u).addClass(d+"active")},drag:function(e){var t,u,d,f,m=i.layoutRect();u=m.contentW>m.innerW,d=m.contentH>m.innerH,f=i.getEl("body")["client"+a]-2*r,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+o]=c+e["delta"+s]/t},stop:function(){e("#"+u).removeClass(d+"active")}})}i.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e(i.getEl("body")).on("scroll",n)),n())}}}),o("tinymce/ui/Panel",["tinymce/ui/Container","tinymce/ui/Scrollable"],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n='<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}})}),o("tinymce/ui/Movable",["tinymce/ui/DomUtils"],function(e){function t(t,n,i){var r,o,a,s,l,c,u,d,f,m;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t.state.get("fixed")&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),r=t.getEl(),m=e.getSize(r),l=m.width,c=m.height,m=e.getSize(n),u=m.width,d=m.height,i=(i||"").split(""),"b"===i[0]&&(s+=d),"r"===i[1]&&(a+=u),"c"===i[0]&&(s+=Math.round(d/2)),"c"===i[1]&&(a+=Math.round(u/2)),"b"===i[3]&&(s-=c),"r"===i[4]&&(a-=l),"c"===i[3]&&(s-=Math.round(c/2)),"c"===i[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,i){for(var r=e.getViewPort(),o=0;o<i.length;o++){var a=t(this,n,i[o]);if(this.state.get("fixed")){if(a.x>0&&a.x+a.w<r.w&&a.y>0&&a.y+a.h<r.h)return i[o]}else if(a.x>r.x&&a.x+a.w<r.w+r.x&&a.y>r.y&&a.y+a.h<r.h+r.y)return i[o]}return i[0]},moveRel:function(e,n){"string"!=typeof n&&(n=this.testMoveRel(e,n));var i=t(this,e,n);return this.moveTo(i.x,i.y)},moveBy:function(e,t){var n=this,i=n.layoutRect();return n.moveTo(i.x+e,i.y+t),n},moveTo:function(t,n){function i(e,t,n){return e<0?0:e+n>t?(e=t-n,e<0?0:e):e}var r=this;if(r.settings.constrainToViewport){var o=e.getViewPort(window),a=r.layoutRect();t=i(t,o.w+o.x,a.w),n=i(n,o.h+o.y,a.h)}return r.state.get("rendered")?r.layoutRect({x:t,y:n}).repaint():(r.settings.x=t,r.settings.y=n),r.fire("move",{x:t,y:n}),r}}}),o("tinymce/ui/Resizable",["tinymce/ui/DomUtils"],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(t<=1||n<=1){var i=e.getWindowSize();t=t<=1?t*i.w:t,n=n<=1?n*i.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,i=n.layoutRect();return n.resizeTo(i.w+e,i.h+t)}}}),o("tinymce/ui/FloatPanel",["tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/util/Delay"],function(e,t,n,i,r,o){function a(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function s(e){for(var t=y.length;t--;){var n=y[t],i=n.getParentCtrl(e.target);if(n.settings.autohide){if(i&&(a(i,n)||n.parent()===i))continue;e=n.fire("autohide",{target:e.target}),e.isDefaultPrevented()||n.hide()}}}function l(){p||(p=function(e){2!=e.button&&s(e)},r(document).on("click touchstart",p))}function c(){h||(h=function(){var e;for(e=y.length;e--;)d(y[e])},r(window).on("scroll",h))}function u(){if(!g){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;g=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,C.hideAll())},r(window).on("resize",g)}}function d(e){function t(t,n){for(var i,r=0;r<y.length;r++)if(y[r]!=e)for(i=y[r].parent();i&&(i=i.parent());)i==e&&y[r].fixed(t).moveBy(0,n).repaint()}var n=i.getViewPort().y;e.settings.autofix&&(e.state.get("fixed")?e._autoFixY>n&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY<n&&(e.fixed(!0).layoutRect({y:0}).repaint(),t(!0,n-e._autoFixY))))}function f(e,t){var n,i,o=C.zIndex||65535;if(e)b.push(t);else for(n=b.length;n--;)b[n]===t&&b.splice(n,1);if(b.length)for(n=0;n<b.length;n++)b[n].modal&&(o++,i=b[n]),b[n].getEl().style.zIndex=o,b[n].zIndex=o,o++;var a=r("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];i?r(a).css("z-index",i.zIndex-1):a&&(a.parentNode.removeChild(a),v=!1),C.currentZIndex=o}function m(e){var t;for(t=y.length;t--;)y[t]===e&&y.splice(t,1);for(t=b.length;t--;)b[t]===e&&b.splice(t,1)}var p,h,g,v,y=[],b=[],C=e.extend({Mixins:[t,n],init:function(e){var t=this;t._super(e),t._eventsRoot=t,t.classes.add("floatpanel"),e.autohide&&(l(),u(),y.push(t)),e.autofix&&(c(),t.on("move",function(){d(this)})),t.on("postrender show",function(e){if(e.control==t){var n,i=t.classPrefix;t.modal&&!v&&(n=r("#"+i+"modal-block",t.getContainerElm()),n[0]||(n=r('<div id="'+i+'modal-block" class="'+i+"reset "+i+'fade"></div>').appendTo(t.getContainerElm())),o.setTimeout(function(){n.addClass(i+"in"),r(t.getEl()).addClass(i+"in")}),v=!0),f(!0,t)}}),t.on("show",function(){t.parents().each(function(e){if(e.state.get("fixed"))return t.fixed(!0),!1})}),e.popover&&(t._preBodyHtml='<div class="'+t.classPrefix+'arrow"></div>',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!=e){if(t.state.get("rendered")){var n=i.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e,t=this,n=t._super();for(e=y.length;e--&&y[e]!==t;);return-1===e&&y.push(t),n},hide:function(){return m(this),f(!1,this),this._super()},hideAll:function(){C.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),f(!1,e)),e},remove:function(){m(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return C.hideAll=function(){for(var e=y.length;e--;){var t=y[e];t&&t.settings.autohide&&(t.hide(),y.splice(e,1))}},C}),o("tinymce/ui/Window",["tinymce/ui/FloatPanel","tinymce/ui/Panel","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/ui/DragHelper","tinymce/ui/BoxUtils","tinymce/Env","tinymce/util/Delay"],function(e,t,n,i,r,o,a,s){function l(e){var t,n=i("meta[name=viewport]")[0];!1!==a.overrideViewPort&&(n||(n=document.createElement("meta"),n.setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),t=n.getAttribute("content"),t&&void 0!==f&&(f=t),n.setAttribute("content",e?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":f))}function c(e,t){u()&&!1===t&&i([document.documentElement,document.body]).removeClass(e+"fullscreen")}function u(){for(var e=0;e<d.length;e++)if(d[e]._fullscreen)return!0;return!1}var d=[],f="",m=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var i=this;i._super(e),i.isRtl()&&i.classes.add("rtl"),i.classes.add("window"),i.bodyClasses.add("window-body"),i.state.set("fixed",!0),e.buttons&&(i.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:i.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),i.statusbar.classes.add("foot"),i.statusbar.parent(i)),i.on("click",function(e){var t=i.classPrefix+"close";(n.hasClass(e.target,t)||n.hasClass(e.target.parentNode,t))&&i.close()}),i.on("cancel",function(){i.close()}),i.aria("describedby",i.describedBy||i._id+"-none"),i.aria("label",e.title),i._fullscreen=!1},recalc:function(){var e,t,i,r,o=this,a=o.statusbar;o._fullscreen&&(o.layoutRect(n.getWindowSize()),o.layoutRect().contentH=o.layoutRect().innerH),o._super(),e=o.layoutRect(),o.settings.title&&!o._fullscreen&&(t=e.headerW)>e.w&&(i=e.x-Math.max(0,t/2),o.layoutRect({w:t,x:i}),r=!0),a&&(a.layoutRect({w:o.layoutRect().innerW}).recalc(),(t=a.layoutRect().minW+e.deltaW)>e.w&&(i=e.x-Math.max(0,t-e.w),o.layoutRect({w:t,x:i}),r=!0)),r&&o.recalc()},initLayoutRect:function(){var e,t=this,i=t._super(),r=0;if(t.settings.title&&!t._fullscreen){e=t.getEl("head");var o=n.getSize(e);i.headerW=o.width,i.headerH=o.height,r+=i.headerH}t.statusbar&&(r+=t.statusbar.layoutRect().h),i.deltaH+=r,i.minH+=r,i.h+=r;var a=n.getWindowSize();return i.x=t.settings.x||Math.max(0,a.w/2-i.w/2),i.y=t.settings.y||Math.max(0,a.h/2-i.h/2),i},renderHtml:function(){var e=this,t=e._layout,n=e._id,i=e.classPrefix,r=e.settings,o="",a="",s=r.html;return e.preRender(),t.preRender(e),r.title&&(o='<div id="'+n+'-head" class="'+i+'window-head"><div id="'+n+'-title" class="'+i+'title">'+e.encode(r.title)+'</div><div id="'+n+'-dragh" class="'+i+'dragh"></div><button type="button" class="'+i+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),r.url&&(s='<iframe src="'+r.url+'" tabindex="-1"></iframe>'),void 0===s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.bodyClasses+'">'+s+"</div>"+a+"</div></div>"},fullscreen:function(e){var t,r,a=this,l=document.documentElement,c=a.classPrefix;if(e!=a._fullscreen)if(i(window).on("resize",function(){var e;if(a._fullscreen)if(t)a._timer||(a._timer=s.setTimeout(function(){var e=n.getWindowSize();a.moveTo(0,0).resizeTo(e.w,e.h),a._timer=0},50));else{e=(new Date).getTime();var i=n.getWindowSize();a.moveTo(0,0).resizeTo(i.w,i.h),(new Date).getTime()-e>50&&(t=!0)}}),r=a.layoutRect(),a._fullscreen=e,e){a._initial={x:r.x,y:r.y,w:r.w,h:r.h},a.borderBox=o.parseBox("0"),a.getEl("head").style.display="none",r.deltaH-=r.headerH+2,i([l,document.body]).addClass(c+"fullscreen"),a.classes.add("fullscreen");var u=n.getWindowSize();a.moveTo(0,0).resizeTo(u.w,u.h)}else a.borderBox=o.parseBox(a.settings.border),a.getEl("head").style.display="",r.deltaH+=r.headerH,i([l,document.body]).removeClass(c+"fullscreen"),a.classes.remove("fullscreen"),a.moveTo(a._initial.x,a._initial.y).resizeTo(a._initial.w,a._initial.h);return a.reflow()},postRender:function(){var e,t=this;setTimeout(function(){t.classes.add("in"),t.fire("open")},0),t._super(),t.statusbar&&t.statusbar.postRender(),t.focus(),this.dragHelper=new r(t._id+"-dragh",{start:function(){e={x:t.layoutRect().x,y:t.layoutRect().y}},drag:function(n){t.moveTo(e.x+n.deltaX,e.y+n.deltaY)}}),t.on("submit",function(e){e.isDefaultPrevented()||t.close()}),d.push(t),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e,t=this;for(t.dragHelper.destroy(),t._super(),t.statusbar&&this.statusbar.remove(),c(t.classPrefix,!1),e=d.length;e--;)d[e]===t&&d.splice(e,1);l(d.length>0)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return function(){function e(){var e,t,i=n.getWindowSize();for(e=0;e<d.length;e++)t=d[e].layoutRect(),d[e].moveTo(d[e].settings.x||Math.max(0,i.w/2-t.w/2),d[e].settings.y||Math.max(0,i.h/2-t.h/2))}if(!a.desktop){var t={w:window.innerWidth,h:window.innerHeight};s.setInterval(function(){var e=window.innerWidth,n=window.innerHeight;t.w==e&&t.h==n||(t={w:e,h:n},i(window).trigger("resize"))},100)}i(window).on("resize",e)}(),m}),o("tinymce/ui/MessageBox",["tinymce/ui/Window"],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function i(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var r,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:r=[i("Ok",!0,!0),i("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:r=[i("Yes",1,!0),i("No",0)],n.buttons==t.YES_NO_CANCEL&&r.push(i("Cancel",-1));break;default:r=[i("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:r,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),o("tinymce/WindowManager",["tinymce/ui/Window","tinymce/ui/MessageBox"],function(e,t){return function(n){function i(){if(s.length)return s[s.length-1]}function r(e){n.fire("OpenWindow",{win:e})}function o(e){n.fire("CloseWindow",{win:e})}var a=this,s=[];a.windows=s,n.on("remove",function(){for(var e=s.length;e--;)s[e].close()}),a.open=function(t,i){var a;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body,data:t.data,callbacks:t.commands}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){a.find("form")[0].submit()}},{text:"Cancel",onclick:function(){a.close()}}]),a=new e(t),s.push(a),a.on("close",function(){for(var e=s.length;e--;)s[e]===a&&s.splice(e,1);s.length||n.focus(),o(a)}),t.data&&a.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),a.features=t||{},a.params=i||{},1===s.length&&n.nodeChanged(),a=a.renderTo().reflow(),r(a),a},a.alert=function(e,i,a){var s;s=t.alert(e,function(){i?i.call(a||this):n.focus()}),s.on("close",function(){o(s)}),r(s)},a.confirm=function(e,n,i){var a;a=t.confirm(e,function(e){n.call(i||this,e)}),a.on("close",function(){o(a)}),r(a)},a.close=function(){i()&&i().close()},a.getParams=function(){return i()?i().params:null},a.setParams=function(e){i()&&(i().params=e)},a.getWindows=function(){return s}}}),o("tinymce/ui/Tooltip",["tinymce/ui/Control","tinymce/ui/Movable"],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'" role="presentation"><div class="'+t+'tooltip-arrow"></div><div class="'+t+'tooltip-inner">'+e.encode(e.state.get("text"))+"</div></div>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e,t,n=this;e=n.getEl().style,t=n._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}})}),o("tinymce/ui/Widget",["tinymce/ui/Control","tinymce/ui/Tooltip"],function(e,t){var n,i=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&!1!==i.tooltips&&(t.on("mouseenter",function(n){var i=t.tooltip().moveTo(-65535);if(n.control==t){var r=i.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);i.classes.toggle("tooltip-n","bc-tc"==r),i.classes.toggle("tooltip-nw","bc-tl"==r),i.classes.toggle("tooltip-ne","bc-tr"==r),i.moveRel(t.getEl(),r)}else i.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){function e(e){n.aria("disabled",e),n.classes.toggle("disabled",e)}function t(e){n.aria("pressed",e),n.classes.toggle("active",e)}var n=this;return n.state.on("change:disabled",function(t){e(t.value)}),n.state.on("change:active",function(e){t(e.value)}),n.state.get("disabled")&&e(!0),n.state.get("active")&&t(!0),n._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return i}),o("tinymce/ui/Progress",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{value:0},init:function(e){var t=this;t._super(e),t.classes.add("progress"),t.settings.filter||(t.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this,t=e._id,n=this.classPrefix;return'<div id="'+t+'" class="'+e.classes+'"><div class="'+n+'bar-container"><div class="'+n+'bar"></div></div><div class="'+n+'text">0%</div></div>'},postRender:function(){var e=this;return e._super(),e.value(e.settings.value),e},bindStates:function(){function e(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}var t=this;return t.state.on("change:value",function(t){e(t.value)}),e(t.state.get("value")),t._super()}})}),o("tinymce/ui/Notification",["tinymce/ui/Control","tinymce/ui/Movable","tinymce/ui/Progress","tinymce/util/Delay"],function(e,t,n,i){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",i="",r="",o="";return e.icon&&(n='<i class="'+t+"ico "+t+"i-"+e.icon+'"></i>'),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(i='<button type="button" class="'+t+'close" aria-hidden="true">×</button>'),e.progressBar&&(r=e.progressBar.renderHtml()),'<div id="'+e._id+'" class="'+e.classes+'"'+o+' role="presentation">'+n+'<div class="'+t+'notification-inner">'+e.state.get("text")+"</div>"+r+i+"</div>"},postRender:function(){var e=this;return i.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().childNodes[1].innerHTML=t.value}),e.progressBar&&e.progressBar.bindStates(),e._super()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||e.remove(),e},repaint:function(){var e,t,n=this;e=n.getEl().style,t=n._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}})}),o("tinymce/NotificationManager",["tinymce/ui/Notification","tinymce/util/Delay","tinymce/util/Tools"],function(e,t,n){return function(i){function r(){if(f.length)return f[f.length-1]}function o(){t.requestAnimationFrame(function(){a(),s()})}function a(){for(var e=0;e<f.length;e++)f[e].moveTo(0,0)}function s(){if(f.length>0){var e=f.slice(0,1)[0],t=i.inline?i.getElement():i.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),f.length>1)for(var n=1;n<f.length;n++)f[n].moveRel(f[n-1].getEl(),"bc-tc")}}function l(e,t){if(!u(t))return null;var i=n.grep(e,function(e){return c(t,e)});return 0===i.length?null:i[0]}function c(e,t){return e.type===t.settings.type&&e.text===t.settings.text}function u(e){return!e.progressBar&&!e.timeout}var d=this,f=[];d.notifications=f,i.on("remove",function(){for(var e=f.length;e--;)f[e].close()}),i.on("ResizeEditor",s),i.on("ResizeWindow",o),d.open=function(t){if(!i.removed){var n;i.editorManager.setActive(i);var r=l(f,t);return null===r?(n=new e(t),f.push(n),t.timeout>0&&(n.timer=setTimeout(function(){n.close()},t.timeout)),n.on("close",function(){var e=f.length;for(n.timer&&i.getWin().clearTimeout(n.timer);e--;)f[e]===n&&f.splice(e,1);s()}),n.renderTo(),s()):n=r,n}},d.close=function(){r()&&r().close()},d.getNotifications=function(){return f},i.on("SkinLoaded",function(){var e=i.settings.service_message;e&&i.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),o("tinymce/dom/NodePath",["tinymce/dom/DOMUtils"],function(e){function t(t,n,i){for(var r=[];n&&n!=t;n=n.parentNode)r.push(e.nodeIndex(n,i));return r}function n(e,t){var n,i,r;for(i=e,n=t.length-1;n>=0;n--){if(r=i.childNodes,t[n]>r.length-1)return null;i=r[t[n]]}return i}return{create:t,resolve:n}}),o("tinymce/util/Quirks",["tinymce/util/VK","tinymce/dom/RangeUtils","tinymce/dom/TreeWalker","tinymce/dom/NodePath","tinymce/html/Node","tinymce/html/Entities","tinymce/Env","tinymce/util/Tools","tinymce/util/Delay","tinymce/caret/CaretContainer","tinymce/caret/CaretPosition","tinymce/caret/CaretWalker"],function(e,t,n,i,r,o,a,s,l,c,u,d){return function(f){function m(e,t){try{f.getDoc().execCommand(e,!1,t)}catch(e){}}function p(){var e=f.getDoc().documentMode;return e||6}function h(e){return e.isDefaultPrevented()}function g(e){var t,n;e.dataTransfer&&(f.selection.isCollapsed()&&"IMG"==e.target.tagName&&_.select(e.target),t=f.selection.getContent(),t.length>0&&(n=O+escape(f.id)+","+escape(t),e.dataTransfer.setData(G,n)))}function v(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(G))&&t.indexOf(O)>=0?(t=t.substr(O.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function y(e){f.queryCommandSupported("mceInsertClipboardContent")?f.execCommand("mceInsertClipboardContent",!1,{content:e}):f.execCommand("mceInsertContent",!1,e)}function b(){f.shortcuts.add("meta+a",null,"SelectAll")}function C(){f.on("keydown",function(e){if(!h(e)&&e.keyCode===P){if(!f.getBody().getElementsByTagName("hr").length)return;if(_.isCollapsed()&&0===_.getRng(!0).startOffset){var t=_.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return M.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(M.remove(n),e.preventDefault())}}})}function T(){f.on("keydown",function(e){if(!h(e)&&e.keyCode===P&&_.isCollapsed()&&0===_.getRng(!0).startOffset){var t=_.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function S(){f.inline||(f.contentStyles.push("body {min-height: 150px}"),f.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(a.ie>11)return void f.getBody().focus();t=f.selection.getRng(),f.getBody().focus(),f.selection.setRng(t),f.selection.normalize(),f.nodeChanged()}}))}function x(){}function w(){var e;return I?!(e=f.selection.getSel())||!e.rangeCount||0===e.rangeCount:0}function E(){function t(e){var t=new d(e.getBody()),n=e.selection.getRng(),i=u.fromRangeStart(n),r=u.fromRangeEnd(n),o=t.prev(i),a=t.next(r);return!e.selection.isCollapsed()&&(!o||o.isAtStart()&&i.isEqual(o))&&(!a||a.isAtEnd()&&i.isEqual(a))}f.on("keypress",function(n){!h(n)&&!_.isCollapsed()&&n.charCode>31&&!e.metaKeyPressed(n)&&t(f)&&(n.preventDefault(),f.setContent(String.fromCharCode(n.charCode)),f.selection.select(f.getBody(),!0),f.selection.collapse(!1),f.nodeChanged())}),f.on("keydown",function(e){var n=e.keyCode;h(e)||n!=k&&n!=P||t(f)&&(e.preventDefault(),f.setContent(""),f.nodeChanged())})}var A=s.each,N=f.$,P=e.BACKSPACE,k=e.DELETE,M=f.dom,_=f.selection,B=f.settings,R=f.parser,D=f.serializer,I=a.gecko,H=a.ie,L=a.webkit,O="data:text/mce-internal,",G=H?"Text":"URL";return function(){f.on("keydown",function(t){var n,i,r,o,a;if(!h(t)&&t.keyCode==e.BACKSPACE&&(n=_.getRng(),i=n.startContainer,r=n.startOffset,o=M.getRoot(),a=i,n.collapsed&&0===r)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(f.formatter.toggle("blockquote",null,a),n=M.createRng(),n.setStart(i,0),n.setEnd(i,0),_.setRng(n))}})}(),function(){function e(e){var t=M.create("body"),n=e.cloneContents();return t.appendChild(n),_.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var i=n.duplicate();return i.moveToElementText(f.getBody()),t.compareRanges(n,i)}var r=e(n),o=M.createRng();return o.selectNode(f.getBody()),r===e(o)}f.on("keydown",function(e){var t,i,r=e.keyCode;if(!h(e)&&(r==k||r==P)){if(t=f.selection.isCollapsed(),i=f.getBody(),t&&!M.isEmpty(i))return;if(!t&&!n(f.selection.getRng()))return;e.preventDefault(),f.setContent(""),i.firstChild&&M.isBlock(i.firstChild)?f.selection.setCursorLocation(i.firstChild,0):f.selection.setCursorLocation(i,0),f.nodeChanged()}})}(),a.windowsPhone||function(){f.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||_.normalize()},!0)}(),L&&(E(),function(){function r(e){var t=x.schema.getBlockElements(),n=f.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function o(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==N.trim(n.data).length)&&n!==t)return!1;return n===t}function a(e,t,i){var o,a,s;if(x.isChildOf(e,f.getBody()))for(s=x.schema.getNonEmptyElements(),o=new n(i||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!r(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function c(e){var n,i,r,o,s;if(!e.collapsed&&(n=x.getParent(t.getNode(e.startContainer,e.startOffset),x.isBlock),i=x.getParent(t.getNode(e.endContainer,e.endOffset),x.isBlock),s=f.schema.getTextBlockElements(),n!=i&&s[n.nodeName]&&s[i.nodeName]&&"false"!==x.getContentEditable(n)&&"false"!==x.getContentEditable(i)))return e.deleteContents(),r=a(n,!1),o=a(i,!0),x.isEmpty(i)||N(n).append(i.childNodes),N(i).remove(),r?1==r.nodeType?"BR"==r.nodeName?(e.setStartBefore(r),e.setEndBefore(r)):(e.setStartAfter(r),e.setEndAfter(r)):(e.setStart(r,r.data.length),e.setEnd(r,r.data.length)):o&&(1==o.nodeType?(e.setStartBefore(o),e.setEndBefore(o)):(e.setStart(o,0),e.setEnd(o,0))),w.setRng(e),!0}function u(e,n){var i,r,s,l,c,u;if(!e.collapsed)return e;if(c=e.startContainer,u=e.startOffset,3==c.nodeType)if(n){if(u<c.data.length)return e}else if(u>0)return e;i=t.getNode(c,u),s=x.getParent(i,x.isBlock),r=a(f.getBody(),n,i),l=x.getParent(r,x.isBlock);var d=1===c.nodeType&&u>c.childNodes.length-1;if(!i||!r)return e;if(l&&s!=l)if(n){if(!o(s,l))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==r.nodeType?e.setEnd(r,0):e.setEndBefore(r)}else{if(!o(l,s))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==i.nodeType&&d?e.setEndAfter(i):e.setEndBefore(i)}return e}function d(e){var t=w.getRng();if(t=u(t,e),c(t))return!0}function m(e,t){function n(e,n){return h=N(n).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),l=e.cloneNode(!1),h=s.map(h,function(e){return e=e.cloneNode(!1),l.hasChildNodes()?(e.appendChild(l.firstChild),l.appendChild(e)):l.appendChild(e),l.appendChild(e),e}),h.length?(p=x.create("br"),h[0].appendChild(p),x.replace(l,e),t.setStartBefore(p),t.setEndBefore(p),f.selection.setRng(t),p):null}function r(e){return e&&f.schema.getTextBlockElements()[e.tagName]}var o,a,l,c,u,d,m,p,h;if(t.collapsed&&(d=t.startContainer,m=t.startOffset,a=x.getParent(d,x.isBlock),r(a)))if(1==d.nodeType){if((d=d.childNodes[m])&&"BR"!=d.tagName)return;if(u=e?a.nextSibling:a.previousSibling,x.isEmpty(a)&&r(u)&&x.isEmpty(u)&&n(a,d))return x.remove(u),!0}else if(3==d.nodeType){if(o=i.create(a,d),c=a.cloneNode(!0),d=i.resolve(c,o),e){if(m>=d.data.length)return;d.deleteData(m,1)}else{if(m<=0)return;d.deleteData(m-1,1)}if(x.isEmpty(c))return n(a,d)}}function p(e){var t,n,i;d(e)||(s.each(f.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&f.dom.setAttrib(e,"style",f.dom.getAttrib(e,"style"))}),t=new E(function(){}),t.observe(f.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),f.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=f.selection.getRng(),i=n.startContainer.parentNode,s.each(t.takeRecords(),function(e){if(x.isChildOf(e.target,f.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}s.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,r;e==i&&(t=n.startOffset,r=e.firstChild),x.remove(e,!0),r&&(n.setStart(r,t),n.setEnd(r,t),f.selection.setRng(n))}})}}),t.disconnect(),s.each(f.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}function b(e){f.undoManager.transact(function(){p(e)})}var C,T,S=f.getDoc(),x=f.dom,w=f.selection,E=window.MutationObserver;E||(C=!0,E=function(){function e(e){var t=e.relatedNode||e.target;i.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;i.push({target:t,attributeName:e.attrName})}var n,i=[];this.observe=function(i){n=i,n.addEventListener("DOMSubtreeModified",e,!1),n.addEventListener("DOMNodeInsertedIntoDocument",e,!1),n.addEventListener("DOMNodeInserted",e,!1),n.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){n.removeEventListener("DOMSubtreeModified",e,!1),n.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),n.removeEventListener("DOMNodeInserted",e,!1),n.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return i}}),f.on("keydown",function(e){var t=e.keyCode==k,n=e.ctrlKey||e.metaKey;if(!h(e)&&(t||e.keyCode==P)){var i=f.selection.getRng(),r=i.startContainer,o=i.startOffset;if(t&&e.shiftKey)return;if(m(t,i))return void e.preventDefault();if(!n&&i.collapsed&&3==r.nodeType&&(t?o<r.data.length:o>0))return;e.preventDefault(),n&&f.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),p(t)}}),f.on("keypress",function(t){if(!h(t)&&!w.isCollapsed()&&t.charCode>31&&!e.metaKeyPressed(t)){var n,i,r,o,a,s;n=f.selection.getRng(),s=String.fromCharCode(t.charCode),t.preventDefault(),i=N(n.startContainer).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),p(!0),i=i.filter(function(e,t){return!N.contains(f.getBody(),t)}),i.length?(r=x.createFragment(),i.each(function(e,t){t=t.cloneNode(!1),r.hasChildNodes()?(t.appendChild(r.firstChild),r.appendChild(t)):(a=t,r.appendChild(t)),r.appendChild(t)}),a.appendChild(f.getDoc().createTextNode(s)),o=x.getParent(n.startContainer,x.isBlock),x.isEmpty(o)?N(o).empty().append(r):n.insertNode(r),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),f.selection.setRng(n)):f.selection.setContent(s)}}),f.addCommand("Delete",function(){p()}),f.addCommand("ForwardDelete",function(){p(!0)}),C||(f.on("dragstart",function(e){T=w.getRng(),g(e)}),f.on("drop",function(e){if(!h(e)){var n=v(e);n&&(e.preventDefault(),l.setEditorTimeout(f,function(){var i=t.getCaretRangeFromPoint(e.x,e.y,S);T&&(w.setRng(T),T=null,b()),w.setRng(i),y(n.html)}))}}),f.on("cut",function(e){h(e)||!e.clipboardData||f.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",f.selection.getContent()),e.clipboardData.setData("text/plain",f.selection.getContent({format:"text"})),l.setEditorTimeout(f,function(){b(!0)}))}))}(),function(){f.settings.content_editable||M.bind(f.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==f.getDoc().documentElement)if(t=_.getRng(),f.getBody().focus(),"mousedown"==e.type){if(c.isCaretContainer(t.startContainer))return;_.placeCaretAt(e.clientX,e.clientY)}else _.setRng(t)})}(),function(){f.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==M.getContentEditableParent(t)&&(e.preventDefault(),_.select(t),f.nodeChanged()),"A"==t.nodeName&&M.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),_.select(t))})}(),function(){B.forced_root_block&&f.on("init",function(){m("DefaultParagraphSeparator",B.forced_root_block)})}(),function(){f.on("init",function(){f.dom.bind(f.getBody(),"submit",function(e){e.preventDefault()})})}(),T(),function(){R.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}(),a.iOS?(function(){f.inline||f.on("keydown",function(){document.activeElement==document.body&&f.getWin().focus()})}(),S(),function(){f.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),f.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}()):b()),H&&a.ie<11&&(C(),function(){document.body.setAttribute("role","application")}(),function(){p()>7||(m("RespectVisibilityInDesign",!0),f.contentStyles.push(".mceHideBrInPre pre br {display: none}"),M.addClass(f.getBody(),"mceHideBrInPre"),R.addNodeFilter("pre",function(e){for(var t,n,i,o,a=e.length;a--;)for(t=e[a].getAll("br"),n=t.length;n--;)i=t[n],o=i.prev,o&&3===o.type&&"\n"!=o.value.charAt(o.value-1)?o.value+="\n":i.parent.insert(new r("#text",3),i,!0).value="\n"}),D.addNodeFilter("pre",function(e){for(var t,n,i,r,o=e.length;o--;)for(t=e[o].getAll("br"),n=t.length;n--;)i=t[n],(r=i.prev)&&3==r.type&&(r.value=r.value.replace(/\r?\n$/,""))}))}(),function(){M.bind(f.getBody(),"mouseup",function(){var e,t=_.getNode();"IMG"==t.nodeName&&((e=M.getStyle(t,"width"))&&(M.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),M.setStyle(t,"width","")),(e=M.getStyle(t,"height"))&&(M.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),M.setStyle(t,"height","")))})}(),function(){f.on("keydown",function(e){var t;h(e)||e.keyCode!=P||(t=f.getDoc().selection.createRange())&&t.item&&(e.preventDefault(),f.undoManager.beforeChange(),M.remove(t.item(0)),f.undoManager.add())})}(),function(){var e;p()>=10&&(e="",A("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),f.contentStyles.push(e+"{padding-right: 1px !important}"))}(),function(){p()<9&&(R.addNodeFilter("noscript",function(e){for(var t,n,i=e.length;i--;)t=e[i],(n=t.firstChild)&&t.attr("data-mce-innertext",n.value)}),D.addNodeFilter("noscript",function(e){for(var t,n,i,a=e.length;a--;)t=e[a],n=e[a].firstChild,n?n.value=o.decode(n.value):(i=t.attributes.map["data-mce-innertext"])&&(t.attr("data-mce-innertext",null),n=new r("#text",3),n.value=i,n.raw=!0,t.append(n))}))}(),function(){function e(e,t){var n=s.createTextRange();try{n.moveToPoint(e,t)}catch(e){n=null}return n}function t(t){var i;t.button?(i=e(t.x,t.y))&&(i.compareEndPoints("StartToStart",r)>0?i.setEndPoint("StartToStart",r):i.setEndPoint("EndToEnd",r),i.select()):n()}function n(){var e=a.selection.createRange();r&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&r.select(),M.unbind(a,"mouseup",n),M.unbind(a,"mousemove",t),r=i=0}var i,r,o,a=M.doc,s=a.body;a.documentElement.unselectable=!0,M.bind(a,"mousedown contextmenu",function(s){if("HTML"===s.target.nodeName){if(i&&n(),o=a.documentElement,o.scrollHeight>o.clientHeight)return;i=1,(r=e(s.x,s.y))&&(M.bind(a,"mouseup",n),M.bind(a,"mousemove",t),M.getRoot().focus(),r.select())}})}()),a.ie>=11&&(S(),T()),a.ie&&(b(),function(){m("AutoUrlDetect",!1)}(),function(){f.on("dragstart",function(e){g(e)}),f.on("drop",function(e){if(!h(e)){var n=v(e);if(n&&n.id!=f.id){e.preventDefault();var i=t.getCaretRangeFromPoint(e.x,e.y,f.getDoc());_.setRng(i),y(n.html)}}})}()),I&&(E(),C(),function(){window.Range.prototype.getClientRects||f.on("mousedown",function(e){if(!h(e)&&"HTML"===e.target.nodeName){var t=f.getBody();t.blur(),l.setEditorTimeout(f,function(){t.focus()})}})}(),function(){function e(){var e=M.getAttribs(_.getStart().cloneNode(!1));return function(){var t=_.getStart();t!==f.getBody()&&(M.setAttrib(t,"style",null),A(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!_.isCollapsed()&&M.getParent(_.getStart(),M.isBlock)!=M.getParent(_.getEnd(),M.isBlock)}f.on("keypress",function(n){var i;if(!h(n)&&(8==n.keyCode||46==n.keyCode)&&t())return i=e(),f.getDoc().execCommand("delete",!1,null),i(),n.preventDefault(),!1}),M.bind(f.getDoc(),"cut",function(n){var i;!h(n)&&t()&&(i=e(),l.setEditorTimeout(f,function(){i()}))})}(),function(){function e(){m("StyleWithCSS",!1),m("enableInlineTableEditing",!1),B.object_resizing||m("enableObjectResizing",!1)}B.readonly||f.on("BeforeExecCommand MouseDown",e)}(),function(){function e(){A(M.select("a"),function(e){var t=e.parentNode,n=M.getRoot();if(t.lastChild===e){for(;t&&!M.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}M.add(t,"br",{"data-mce-bogus":1})}})}f.on("SetContent ExecCommand",function(t){"setcontent"!=t.type&&"mceInsertLink"!==t.command||e()})}(),function(){f.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}(),function(){a.mac&&f.on("keydown",function(t){!e.metaKeyPressed(t)||t.shiftKey||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),f.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))})}(),T()),{refreshContentEditable:x,isHidden:w}}}),o("tinymce/EditorObservable",["tinymce/util/Observable","tinymce/dom/DOMUtils","tinymce/util/Tools"],function(e,t,n){function i(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=a.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function r(e,t){function n(e){return!e.hidden&&!e.readonly}var r,s=i(e,t);if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(o||(o={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&o){for(t in o)e.dom.unbind(i(e,t));o=null}})),o[t])return;r=function(i){for(var r=i.target,o=e.editorManager.editors,s=o.length;s--;){var l=o[s].getBody();(l===r||a.isChildOf(r,l))&&n(o[s])&&o[s].fire(t,i)}},o[t]=r,a.bind(s,t,r)}else r=function(i){n(e)&&e.fire(t,i)},a.bind(s,t,r),e.delegates[t]=r}var o,a=t.DOM,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){r(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?r(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(i(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this;if(t.delegates){for(e in t.delegates)t.dom.unbind(i(t,e),e,t.delegates[e]);delete t.delegates}t.inline||(t.getBody().onload=null,t.dom.unbind(t.getWin()),t.dom.unbind(t.getDoc())),t.dom.unbind(t.getBody()),t.dom.unbind(t.getContainer())}};return s=n.extend({},e,s)}),o("tinymce/Mode",[],function(){function e(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(e){}}function t(e){var t,n;return t=e.getBody(),n=function(t){e.dom.getParents(t.target,"a").length>0&&t.preventDefault()},e.dom.bind(t,"click",n),{unbind:function(){e.dom.unbind(t,"click",n)}}}function n(n,i){n._clickBlocker&&(n._clickBlocker.unbind(),n._clickBlocker=null),i?(n._clickBlocker=t(n),n.selection.controlSelection.hideResizeRect(),n.readonly=!0,n.getBody().contentEditable=!1):(n.readonly=!1,n.getBody().contentEditable=!0,e(n,"StyleWithCSS",!1),e(n,"enableInlineTableEditing",!1),e(n,"enableObjectResizing",!1),n.focus(),n.nodeChanged())}function i(e,t){var i=e.readonly?"readonly":"design";t!=i&&(e.initialized?n(e,"readonly"==t):e.on("init",function(){n(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}return{setMode:i}}),o("tinymce/Shortcuts",["tinymce/util/Tools","tinymce/Env"],function(e,t){var n=e.each,i=e.explode,r={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e){var a,s,l={};n(i(e,"+"),function(e){e in o?l[e]=!0:/^[0-9]{2,}$/.test(e)?l.keyCode=parseInt(e,10):(l.charCode=e.charCodeAt(0),l.keyCode=r[e]||e.toUpperCase().charCodeAt(0))}),a=[l.keyCode];for(s in o)l[s]?a.push(s):l[s]=!1;return l.id=a.join(","),l.access&&(l.alt=!0,t.mac?l.ctrl=!0:l.shift=!0),l.meta&&(t.mac?l.meta=!0:(l.ctrl=!0,l.meta=!1)),l}function l(t,n,r,o){var l;return l=e.map(i(t,">"),s),l[l.length-1]=e.extend(l[l.length-1],{func:r,scope:o||a}),e.extend(l[0],{desc:a.translate(n),subpatterns:l.slice(1)})}function c(e){return e.altKey||e.ctrlKey||e.metaKey}function u(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123}function d(e,t){return!!t&&(t.ctrl==e.ctrlKey&&t.meta==e.metaKey&&(t.alt==e.altKey&&t.shift==e.shiftKey&&(!!(e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode)&&(e.preventDefault(),!0))))}function f(e){return e.func?e.func.call(e.scope):null}var m=this,p={},h=[];a.on("keyup keypress keydown",function(e){!c(e)&&!u(e)||e.isDefaultPrevented()||(n(p,function(t){if(d(e,t))return h=t.subpatterns.slice(0),"keydown"==e.type&&f(t),!0}),d(e,h[0])&&(1===h.length&&"keydown"==e.type&&f(h[0]),h.shift()))}),m.add=function(t,r,o,s){var c;return c=o,"string"==typeof o?o=function(){a.execCommand(c,!1,null)}:e.isArray(c)&&(o=function(){a.execCommand(c[0],c[1],c[2])}),n(i(e.trim(t.toLowerCase())),function(e){var t=l(e,r,o,s);p[t.id]=t}),!0},m.remove=function(e){var t=l(e);return!!p[t.id]&&(delete p[t.id],!0)}}}),o("tinymce/file/Uploader",["tinymce/util/Promise","tinymce/util/Tools","tinymce/util/Fun"],function(e,t,n){return function(i,r){function o(e){var t,n;return n={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"},t=n[e.blob().type.toLowerCase()]||"dat",e.filename()+"."+t}function a(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}function s(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:n.constant(o(e))}}function l(e,t,n,i){var o,s;o=new XMLHttpRequest,o.open("POST",r.url),o.withCredentials=r.credentials,o.upload.onprogress=function(e){i(e.loaded/e.total*100)},o.onerror=function(){n("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){var e;return 200!=o.status?void n("HTTP Error: "+o.status):(e=JSON.parse(o.responseText))&&"string"==typeof e.location?void t(a(r.basePath,e.location)):void n("Invalid JSON: "+o.responseText)},s=new FormData,s.append("file",e.blob(),e.filename()),o.send(s)}function c(){return new e(function(e){e([])})}function u(e,t){return{url:t,blobInfo:e,status:!0}}function d(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function f(e,n){t.each(y[e],function(e){e(n)}),delete y[e]}function m(t,n,r){return i.markPending(t.blobUri()),new e(function(e){var o,a,l=function(){};try{var c=function(){o&&(o.close(),a=l)},m=function(n){c(),i.markUploaded(t.blobUri(),n),f(t.blobUri(),u(t,n)),e(u(t,n))},p=function(n){c(),i.removeFailed(t.blobUri()),f(t.blobUri(),d(t,n)),e(d(t,n))};a=function(e){e<0||e>100||(o||(o=r()),o.progressBar.value(e))},n(s(t),m,p,a)}catch(n){e(d(t,n.message))}})}function p(e){return e===l}function h(t){var n=t.blobUri();return new e(function(e){y[n]=y[n]||[],y[n].push(e)})}function g(n,o){return n=t.grep(n,function(e){return!i.isUploaded(e.blobUri())}),e.all(t.map(n,function(e){return i.isPending(e.blobUri())?h(e):m(e,r.handler,o)}))}function v(e,t){return!r.url&&p(r.handler)?c():g(e,t)}var y={};return r=t.extend({credentials:!1,handler:l},r),{upload:v}}}),o("tinymce/file/Conversions",["tinymce/util/Promise"],function(e){function t(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function n(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}}function i(t){return new e(function(e){var i,r,o;t=n(t);try{i=atob(t.data)}catch(t){return void e(new Blob([]))}for(r=new Uint8Array(i.length),o=0;o<r.length;o++)r[o]=i.charCodeAt(o);e(new Blob([r],{type:t.type}))})}function r(e){return 0===e.indexOf("blob:")?t(e):0===e.indexOf("data:")?i(e):null}function o(t){return new e(function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})}return{uriToBlob:r,blobToDataUri:o,parseDataUri:n}}),o("tinymce/file/ImageScanner",["tinymce/util/Promise","tinymce/util/Arr","tinymce/util/Fun","tinymce/file/Conversions","tinymce/Env"],function(e,t,n,i,r){var o=0,a=function(e){return(e||"blobid")+o++};return function(o,s){function l(l,u){function d(e,t){var n,r;if(0===e.src.indexOf("blob:"))return r=s.getByUri(e.src),void(r?t({image:e,blobInfo:r}):i.uriToBlob(e.src).then(function(o){i.blobToDataUri(o).then(function(l){n=i.parseDataUri(l).data,r=s.create(a(),o,n),s.add(r),t({image:e,blobInfo:r})})}));n=i.parseDataUri(e.src).data,r=s.findFirst(function(e){return e.base64()===n}),r?t({image:e,blobInfo:r}):i.uriToBlob(e.src).then(function(i){r=s.create(a(),i,n),s.add(r),t({image:e,blobInfo:r})})}var f,m;return u||(u=n.constant(!0)),f=t.filter(l.getElementsByTagName("img"),function(e){var t=e.src;return!!r.fileApi&&(!e.hasAttribute("data-mce-bogus")&&(!e.hasAttribute("data-mce-placeholder")&&(!(!t||t==r.transparentSrc)&&(0===t.indexOf("blob:")?!o.isUploaded(t):0===t.indexOf("data:")&&u(e)))))}),m=t.map(f,function(t){var n;return c[t.src]?new e(function(e){c[t.src].then(function(n){e({image:t,blobInfo:n.blobInfo})})}):(n=new e(function(e){d(t,e)}).then(function(e){return delete c[e.image.src],e}).catch(function(e){return delete c[t.src],e}),c[t.src]=n,n)}),e.all(m)}var c={};return{findAll:l}}}),o("tinymce/file/BlobCache",["tinymce/util/Arr","tinymce/util/Fun"],function(e,t){return function(){function n(e,t,n,i){return{id:u(e),filename:u(i||e),blob:u(t),base64:u(n),blobUri:u(URL.createObjectURL(t))}}function i(e){r(e.id())||c.push(e)}function r(e){return o(function(t){return t.id()===e})}function o(t){return e.filter(c,t)[0]}function a(e){return o(function(t){return t.blobUri()==e})}function s(t){c=e.filter(c,function(e){return e.blobUri()!==t||(URL.revokeObjectURL(e.blobUri()),!1)})}function l(){e.each(c,function(e){URL.revokeObjectURL(e.blobUri())}),c=[]}var c=[],u=t.constant;return{create:n,add:i,get:r,getByUri:a,findFirst:o,removeByUri:s,destroy:l}}}),o("tinymce/file/UploadStatus",[],function(){return function(){function e(e,t){return{status:e,resultUri:t}}function t(e){return e in d}function n(e){var t=d[e];return t?t.resultUri:null}function i(e){return!!t(e)&&d[e].status===c}function r(e){return!!t(e)&&d[e].status===u}function o(t){d[t]=e(c,null)}function a(t,n){d[t]=e(u,n)}function s(e){delete d[e]}function l(){d={}}var c=1,u=2,d={};return{hasBlobUri:t,getResultUri:n,isPending:i,isUploaded:r,markPending:o,markUploaded:a,removeFailed:s,destroy:l}}}),o("tinymce/ErrorReporter",["tinymce/AddOnManager"],function(e){var t=e.PluginManager,n=function(e,n){for(var i in t.urls){if(t.urls[i]+"/plugin"+n+".js"===e)return i}return null},i=function(e,t){var i=n(t,e.suffix);return i?"Failed to load plugin: "+i+" from url "+t:"Failed to load plugin url: "+t},r=function(e,t){e.notificationManager.open({type:"error",text:t})},o=function(e,t){e._skinLoaded?r(e,t):e.on("SkinLoaded",function(){r(e,t)})},a=function(e,t){o(e,"Failed to upload image: "+t)};return{pluginLoadError:function(e,t){o(e,i(e,t))},uploadError:a}}),o("tinymce/EditorUpload",["tinymce/util/Arr","tinymce/file/Uploader","tinymce/file/ImageScanner","tinymce/file/BlobCache","tinymce/file/UploadStatus","tinymce/ErrorReporter"],function(e,t,n,i,r,o){return function(a){function s(e){return function(t){return a.selection?e(t):[]}}function l(){return"?"+(new Date).getTime()}function c(e,t,n){var i=0;do{-1!==(i=e.indexOf(t,i))&&(e=e.substring(0,i)+n+e.substr(i+t.length),i+=n.length-t.length+1)}while(-1!==i);return e}function u(e,t,n){return e=c(e,'src="'+t+'"','src="'+n+'"'),e=c(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')}function d(t,n){e.each(a.undoManager.data,function(i){"fragmented"===i.type?i.fragments=e.map(i.fragments,function(e){return u(e,t,n)}):i.content=u(i.content,t,n)})}function f(){return a.notificationManager.open({text:a.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}function m(e,t){S.removeByUri(e.src),d(e.src,t),a.$(e).attr({src:x.images_reuse_filename?t+l():t,"data-mce-src":a.convertURL(t,"src")})}function p(n){return C||(C=new t(w,{url:x.images_upload_url,basePath:x.images_upload_base_path,credentials:x.images_upload_credentials,handler:x.images_upload_handler})),v().then(s(function(t){var i;return i=e.map(t,function(e){return e.blobInfo}),C.upload(i,f).then(s(function(i){return i=e.map(i,function(e,n){var i=t[n].image;return e.status&&!1!==a.settings.images_replace_blob_uris?m(i,e.url):e.error&&o.uploadError(a,e.error),{element:i,status:e.status}}),n&&n(i),i}))}))}function h(e){if(!1!==x.automatic_uploads)return p(e)}function g(e){return!x.images_dataimg_filter||x.images_dataimg_filter(e)}function v(){return T||(T=new n(w,S)),T.findAll(a.getBody(),g).then(s(function(t){return e.each(t,function(e){d(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),t}))}function y(){S.destroy(),w.destroy(),T=C=null}function b(t){return t.replace(/src="(blob:[^"]+)"/g,function(t,n){var i=w.getResultUri(n);if(i)return'src="'+i+'"';var r=S.getByUri(n);return r||(r=e.reduce(a.editorManager.editors,function(e,t){return e||t.editorUpload.blobCache.getByUri(n)},null)),r?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':t})}var C,T,S=new i,x=a.settings,w=new r;return a.on("setContent",function(){!1!==a.settings.automatic_uploads?h():v()}),a.on("RawSaveContent",function(e){e.content=b(e.content)}),a.on("getContent",function(e){e.source_view||"raw"==e.format||(e.content=b(e.content))}),a.on("PostRender",function(){a.parser.addNodeFilter("img",function(t){e.each(t,function(e){var t=e.attr("src");if(!S.getByUri(t)){var n=w.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:S,uploadImages:p,uploadImagesAuto:h,scanForImages:v,destroy:y}}}),o("tinymce/caret/FakeCaret",["tinymce/caret/CaretContainer","tinymce/caret/CaretPosition","tinymce/dom/NodeType","tinymce/dom/RangeUtils","tinymce/dom/DomQuery","tinymce/geom/ClientRect","tinymce/util/Delay"],function(e,t,n,i,r,o,a){var s=n.isContentEditableFalse;return function(t,n){function i(e,n){var i,r,a,s,l,c=o.collapse(e.getBoundingClientRect(),n);return"BODY"==t.tagName?(i=t.ownerDocument.documentElement,r=t.scrollLeft||i.scrollLeft,a=t.scrollTop||i.scrollTop):(l=t.getBoundingClientRect(),r=t.scrollLeft-l.left,a=t.scrollTop-l.top),c.left+=r,c.right+=r,c.top+=a,c.bottom+=a,c.width=1,s=e.offsetWidth-e.clientWidth,s>0&&(n&&(s*=-1),c.left+=s,c.right+=s),c}function l(){var n,i,o,a,s;for(n=r("*[contentEditable=false]",t),a=0;a<n.length;a++)i=n[a],o=i.previousSibling,e.endsWithCaretContainer(o)&&(s=o.data,1==s.length?o.parentNode.removeChild(o):o.deleteData(s.length-1,1)),o=i.nextSibling,e.startsWithCaretContainer(o)&&(s=o.data,1==s.length?o.parentNode.removeChild(o):o.deleteData(0,1));return null}function c(o,a){var l,c;return u(),n(a)?(g=e.insertBlock("p",a,o),l=i(a,o),r(g).css("top",l.top),h=r('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(l).appendTo(t),o&&h.addClass("mce-visual-caret-before"),d(),c=a.ownerDocument.createRange(),c.setStart(g,0),c.setEnd(g,0),c):(g=e.insertInline(a,o),c=a.ownerDocument.createRange(),s(g.nextSibling)?(c.setStart(g,0),c.setEnd(g,0)):(c.setStart(g,1),c.setEnd(g,1)),c)}function u(){l(),g&&(e.remove(g),g=null),h&&(h.remove(),h=null),clearInterval(p)}function d(){p=a.setInterval(function(){r("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden")},500)}function f(){a.clearInterval(p)}function m(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"}var p,h,g;return{show:c,hide:u,getCss:m,destroy:f}}}),o("tinymce/dom/Dimensions",["tinymce/util/Arr","tinymce/dom/NodeType","tinymce/geom/ClientRect"],function(e,t,n){function i(r){function o(t){return e.map(t,function(e){return e=n.clone(e),e.node=r,e})}if(e.isArray(r))return e.reduce(r,function(e,t){return e.concat(i(t))},[]);if(t.isElement(r))return o(r.getClientRects());if(t.isText(r)){var a=r.ownerDocument.createRange();return a.setStart(r,0),a.setEnd(r,r.data.length),o(a.getClientRects())}}return{getClientRects:i}}),o("tinymce/caret/LineWalker",["tinymce/util/Fun","tinymce/util/Arr","tinymce/dom/Dimensions","tinymce/caret/CaretCandidate","tinymce/caret/CaretUtils","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition","tinymce/geom/ClientRect"],function(e,t,n,i,r,o,a,s){function l(e,t,n,o){for(;o=r.findNode(o,e,i.isEditableCaretCandidate,t);)if(n(o))return}function c(e,i,r,o,a,s){function c(o){var s,l,c;for(c=n.getClientRects(o),-1==e&&(c=c.reverse()),s=0;s<c.length;s++)if(l=c[s],!r(l,d)){if(m.length>0&&i(l,t.last(m))&&f++,l.line=f,a(l))return!0;m.push(l)}}var u,d,f=0,m=[];return(d=t.last(s.getClientRects()))?(u=s.getNode(),c(u),l(e,o,c,u),m):m}function u(e,t){return t.line>e}function d(e,t){return t.line===e}function f(e,n,i,r){function l(e){return t.last(e.getClientRects())}var c,u,d,f,m,p,h=new o(n),g=[],v=0;1==e?(c=h.next,u=s.isBelow,d=s.isAbove,f=a.after(r)):(c=h.prev,u=s.isAbove,d=s.isBelow,f=a.before(r)),p=l(f);do{if(f.isVisible()&&(m=l(f),!d(m,p))){if(g.length>0&&u(m,t.last(g))&&v++,m=s.clone(m),m.position=f,m.line=v,i(m))return g;g.push(m)}}while(f=c(f));return g}var m=e.curry;return{upUntil:m(c,-1,s.isAbove,s.isBelow),downUntil:m(c,1,s.isBelow,s.isAbove),positionsUntil:f,isAboveLine:m(u),isLine:m(d)}}),o("tinymce/caret/LineUtils",["tinymce/util/Fun","tinymce/util/Arr","tinymce/dom/NodeType","tinymce/dom/Dimensions","tinymce/geom/ClientRect","tinymce/caret/CaretUtils","tinymce/caret/CaretCandidate"],function(e,t,n,i,r,o,a){function s(e,t){return Math.abs(e.left-t)}function l(e,t){return Math.abs(e.right-t)}function c(e,n){function i(e,t){return e>=t.left&&e<=t.right}return t.reduce(e,function(e,t){var r,o;return r=Math.min(s(e,n),l(e,n)),o=Math.min(s(t,n),l(t,n)),i(n,t)?t:i(n,e)?e:o==r&&h(t.node)?t:o<r?t:e})}function u(e,t,n,i){for(;i=g(i,e,a.isEditableCaretCandidate,t);)if(n(i))return}function d(e,n){function o(e,r){var o;return o=t.filter(i.getClientRects(r),function(t){return!e(t,n)}),a=a.concat(o),0===o.length}var a=[];return a.push(n),u(-1,e,v(o,r.isAbove),n.node),u(1,e,v(o,r.isBelow),n.node),a}function f(e){return t.filter(t.toArray(e.getElementsByTagName("*")),h)}function m(e,t){return{node:e.node,before:s(e,t)<l(e,t)}}function p(e,n,r){var o,a;return o=i.getClientRects(f(e)),o=t.filter(o,function(e){return r>=e.top&&r<=e.bottom}),a=c(o,n),a&&(a=c(d(e,a),n))&&h(a.node)?m(a,n):null}var h=n.isContentEditableFalse,g=o.findNode,v=e.curry;return{findClosestClientRect:c,findLineNodeRects:d,closestCaret:p}}),o("tinymce/dom/MousePosition",[],function(){var e=function(e){var t,n,i,r;return r=e.getBoundingClientRect(),t=e.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}},t=function(t){return t.inline?e(t.getBody()):{left:0,top:0}},n=function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},i=function(e){var t=e.getBody(),n=e.getDoc().documentElement,i={left:t.scrollLeft,top:t.scrollTop},r={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?i:r},r=function(t,n){if(n.target.ownerDocument!==t.getDoc()){var r=e(t.getContentAreaContainer()),o=i(t);return{left:n.pageX-r.left+o.left,top:n.pageY-r.top+o.top}}return{left:n.pageX,top:n.pageY}},o=function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}};return{calc:function(e,i){return o(t(e),n(e),r(e,i))}}}),o("tinymce/DragDropOverrides",["tinymce/dom/NodeType","tinymce/util/Arr","tinymce/util/Fun","tinymce/util/Delay","tinymce/dom/DOMUtils","tinymce/dom/MousePosition"],function(e,t,n,i,r,o){var a=e.isContentEditableFalse,s=e.isContentEditableTrue,l=function(e,t){return a(t)&&t!==e},c=function(e,t,n){return t!==n&&!e.dom.isChildOf(t,n)&&!a(t)},u=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t},d=function(e,t,n,i){var r=t.cloneNode(!0);e.dom.setStyles(r,{width:n,height:i}),e.dom.setAttrib(r,"data-mce-selected",null);var o=e.dom.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(o,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:i}),e.dom.setStyles(r,{margin:0,boxSizing:"border-box"}),o.appendChild(r),o},f=function(e,t){e.parentNode!==t&&t.appendChild(e)},m=function(e,t,n,i,r,o){var a=0,s=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>r&&(a=t.pageX+n-r),t.pageY+i>o&&(s=t.pageY+i-o),e.style.width=n-a+"px",e.style.height=i-s+"px"},p=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},h=function(e){return 0===e.button},g=function(e){return e.element},v=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}},y=function(e,i){return function(r){if(h(r)){var o=t.find(i.dom.getParents(r.target),n.or(a,s));if(l(i.getBody(),o)){var c=i.dom.getPos(o),u=i.getBody(),f=i.getDoc().documentElement;e.element=o,e.screenX=r.screenX,e.screenY=r.screenY,e.maxX=(i.inline?u.scrollWidth:f.offsetWidth)-2,e.maxY=(i.inline?u.scrollHeight:f.offsetHeight)-2,e.relX=r.pageX-c.x,e.relY=r.pageY-c.y,e.width=o.offsetWidth,e.height=o.offsetHeight,e.ghost=d(i,o,e.width,e.height)}}}},b=function(e,t){var n=i.throttle(function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)},0);return function(i){var r=Math.max(Math.abs(i.screenX-e.screenX),Math.abs(i.screenY-e.screenY));if(g(e)&&!e.dragging&&r>10){if(t.fire("dragstart",{target:e.element}).isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){var a=v(e,o.calc(t,i));f(e.ghost,t.getBody()),m(e.ghost,a,e.width,e.height,e.maxX,e.maxY),n(i.clientX,i.clientY)}}},C=function(e){var t=e.getSel().getRangeAt(0),n=t.startContainer;return 3===n.nodeType?n.parentNode:n},T=function(e,t){return function(n){if(e.dragging&&c(t,C(t.selection),e.element)){var i=u(e.element),r=t.fire("drop",{targetClone:i,clientX:n.clientX,clientY:n.clientY});r.isDefaultPrevented()||(i=r.targetClone,t.undoManager.transact(function(){p(e.element),t.insertContent(t.dom.getOuterHTML(i)),t._selectionOverrides.hideFakeCaret()}))}x(e)}},S=function(e,t){return function(){x(e),e.dragging&&t.fire("dragend")}},x=function(e){e.dragging=!1,e.element=null,p(e.ghost)},w=function(e){var t,n,i,o,a,s,l={};t=r.DOM,s=document,n=y(l,e),i=b(l,e),o=T(l,e),a=S(l,e),e.on("mousedown",n),e.on("mousemove",i),e.on("mouseup",o),t.bind(s,"mousemove",i),t.bind(s,"mouseup",a),e.on("remove",function(){t.unbind(s,"mousemove",i),t.unbind(s,"mouseup",a)})},E=function(e){e.on("drop",function(t){var n=void 0!==t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(a(n)||a(e.dom.getContentEditableParent(n)))&&t.preventDefault()})};return{init:function(e){w(e),E(e)}}}),o("tinymce/SelectionOverrides",["tinymce/Env","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition","tinymce/caret/CaretContainer","tinymce/caret/CaretUtils","tinymce/caret/FakeCaret","tinymce/caret/LineWalker","tinymce/caret/LineUtils","tinymce/dom/NodeType","tinymce/dom/RangeUtils","tinymce/geom/ClientRect","tinymce/util/VK","tinymce/util/Fun","tinymce/util/Arr","tinymce/util/Delay","tinymce/DragDropOverrides"],function(e,t,n,i,r,o,a,s,l,c,u,d,f,m,p,h){function g(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function v(c){function v(e){return c.dom.hasClass(e,"mce-offscreen-selection")}function E(){var e=c.dom.get(le);return e?e.getElementsByTagName("*")[0]:e}function A(e){return c.dom.isBlock(e)}function N(e){e&&c.selection.setRng(e)}function P(){return c.selection.getRng()}function k(e,t){c.selection.scrollIntoView(e,t)}function M(e,t,n){var i;return i=c.fire("ShowCaret",{target:t,direction:e,before:n}),i.isDefaultPrevented()?null:(k(t,-1===e),se.show(n,t))}function _(e){var t;return t=c.fire("BeforeObjectSelected",{target:e}),t.isDefaultPrevented()?null:B(e)}function B(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}function R(e,t){var n=r.isInSameBlock(e,t);return!(n||!l.isBr(e.getNode()))||n}function D(e,t){return t=r.normalizeRange(e,ie,t),-1==e?n.fromRangeStart(t):n.fromRangeEnd(t)}function I(e){return i.isCaretContainerBlock(e.startContainer)}function H(e,t,n,i){var r,o,a,s;return!i.collapsed&&(r=w(i),C(r))?M(e,r,-1==e):(s=I(i),o=D(e,i),n(o)?_(o.getNode(-1==e)):(o=t(o))?n(o)?M(e,o.getNode(-1==e),1==e):(a=t(o),n(a)&&R(o,a)?M(e,a.getNode(-1==e),1==e):s?z(o.toRange()):null):s?i:null)}function L(e,t,n){var i,r,o,l,c,u,d,f,p;if(p=w(n),i=D(e,n),r=t(ie,a.isAboveLine(1),i),o=m.filter(r,a.isLine(1)),c=m.last(i.getClientRects()),x(i)&&(p=i.getNode()),S(i)&&(p=i.getNode(!0)),!c)return null;if(u=c.left,(l=s.findClosestClientRect(o,u))&&C(l.node))return d=Math.abs(u-l.left),f=Math.abs(u-l.right),M(e,l.node,d<f);if(p){var h=a.positionsUntil(e,ie,a.isAboveLine(1),p);if(l=s.findClosestClientRect(m.filter(h,a.isLine(1)),u))return z(l.position.toRange());if(l=m.last(m.filter(h,a.isLine(0))))return z(l.position.toRange())}}function O(t,i){var r,o,a;if(i.collapsed&&c.settings.forced_root_block){if(!(r=c.dom.getParent(i.startContainer,"PRE")))return;o=1==t?oe(n.fromRangeStart(i)):ae(n.fromRangeStart(i)),o||(a=function(){var t=c.dom.create(c.settings.forced_root_block);return(!e.ie||e.ie>=11)&&(t.innerHTML='<br data-mce-bogus="1">'),t}(),1==t?c.$(r).after(a):c.$(r).before(a),c.selection.select(a,!0),c.selection.collapse())}}function G(e,t,n,i){var r;return(r=H(e,t,n,i))?r:(r=O(e,i))||null}function F(e,t,n){var i;return(i=L(e,t,n))?i:(i=O(e,n))||null}function V(){return ce("*[data-mce-caret]")[0]}function U(e){e.hasAttribute("data-mce-caret")&&(i.showCaretContainerBlock(e),N(P()),k(e[0]))}function W(e){var t,i;return e=r.normalizeRange(1,ie,e),t=n.fromRangeStart(e),C(t.getNode())?M(1,t.getNode(),!t.isAtEnd()):C(t.getNode(!0))?M(1,t.getNode(!0),!1):(i=c.dom.getParent(t.getNode(),f.or(C,b)),C(i)?M(1,i,!1):null)}function z(e){return e&&e.collapsed?W(e)||e:e}function X(e){var t,r,o,a;return C(e)?(C(e.previousSibling)&&(o=e.previousSibling),r=ae(n.before(e)),r||(t=oe(n.after(e))),t&&T(t.getNode())&&(a=t.getNode()),i.remove(e.previousSibling),i.remove(e.nextSibling),c.dom.remove(e),c.dom.isEmpty(c.getBody())?(c.setContent(""),void c.focus()):o?n.after(o).toRange():a?n.before(a).toRange():r?r.toRange():t?t.toRange():null):null}function K(e){var t=c.schema.getTextBlockElements();return e.nodeName in t}function j(e){return c.dom.isEmpty(e)}function $(e,t,i){var r,o,a,s,l=c.dom;if(r=l.getParent(t.getNode(),l.isBlock),o=l.getParent(i.getNode(),l.isBlock),-1===e){if(s=i.getNode(!0),S(i)&&A(s))return K(r)?(j(r)&&l.remove(r),n.after(s).toRange()):X(i.getNode(!0))}else if(s=t.getNode(),x(t)&&A(s))return K(o)?(j(o)&&l.remove(o),n.before(s).toRange()):X(t.getNode());if(r===o||!K(r)||!K(o))return null;for(;a=r.firstChild;)o.appendChild(a);return c.dom.remove(r),i.toRange()}function q(e,t,n,r){var o,a,s,l;return!r.collapsed&&(o=w(r),C(o))?z(X(o)):(a=D(e,r),n(a)&&i.isCaretContainerBlock(r.startContainer)?(l=-1==e?re.prev(a):re.next(a),l?z(l.toRange()):r):t(a)?z(X(a.getNode(-1==e))):(s=-1==e?re.prev(a):re.next(a),t(s)?-1===e?$(e,a,s):$(e,s,a):void 0))}function Y(e){return i.isCaretContainer(e)||i.startsWithCaretContainer(e)||i.endsWithCaretContainer(e)}function Q(e){return Y(e.startContainer)||Y(e.endContainer)}function J(t){var n,i,r,o,a,s,l,u,d,f,m=c.$,p=c.dom;if(!t)return null;if(t.collapsed){if(!Q(t)){if(u=D(1,t),C(u.getNode()))return M(1,u.getNode(),!u.isAtEnd());if(C(u.getNode(!0)))return M(1,u.getNode(!0),!1)}return null}return o=t.startContainer,a=t.startOffset,s=t.endOffset,3==o.nodeType&&0==a&&C(o.parentNode)&&(o=o.parentNode,a=p.nodeIndex(o),o=o.parentNode),1!=o.nodeType?null:(s==a+1&&(n=o.childNodes[a]),C(n)?(d=f=n.cloneNode(!0),l=c.fire("ObjectSelected",{target:n,targetClone:d}),l.isDefaultPrevented()?null:(d=l.targetClone,i=m("#"+le),0===i.length&&(i=m('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",le),i.appendTo(c.getBody())),t=c.dom.createRng(),d===f&&e.ie?(i.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(d),t.setStartAfter(i[0].firstChild.firstChild),t.setEndAfter(d)):(i.empty().append(" ").append(d).append(" "),t.setStart(i[0].firstChild,1),t.setEnd(i[0].lastChild,0)),i.css({top:p.getPos(n,c.getBody()).y}),i[0].focus(),r=c.selection.getSel(),r.removeAllRanges(),r.addRange(t),c.$("*[data-mce-selected]").removeAttr("data-mce-selected"),n.setAttribute("data-mce-selected",1),ne=n,te(),t)):null)}function Z(){ne&&(ne.removeAttribute("data-mce-selected"),c.$("#"+le).remove(),ne=null)}function ee(){se.destroy(),ne=null}function te(){se.hide()}var ne,ie=c.getBody(),re=new t(ie),oe=y(g,re.next),ae=y(g,re.prev),se=new o(c.getBody(),A),le="sel-"+c.dom.uniqueId(),ce=c.$;return e.ceFalse&&(function(){function r(e,t){if(!1===e.isDefaultPrevented()){var n=t(P());n&&(e.preventDefault(),N(n))}}function o(e){for(var t=c.getBody();e&&e!=t;){if(b(e)||C(e))return e;e=e.parentNode}return null}function l(e,t,n){return!n.collapsed&&m.reduce(n.getClientRects(),function(n,i){return n||u.containsXY(i,e,t)},!1)}function f(){var e,t=o(c.selection.getNode());b(t)&&A(t)&&c.dom.isEmpty(t)&&(e=c.dom.create("br",{"data-mce-bogus":"1"}),c.$(t).empty().append(e),c.selection.setRng(n.before(e).toRange()))}function g(e){var t=V();if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void U(t)):void(i.hasContent(t)&&U(t))}function T(e){var t;switch(e.keyCode){case d.DELETE:case d.BACKSPACE:t=f()}t&&e.preventDefault()}var w=y(G,1,oe,x),k=y(G,-1,ae,S),B=y(q,1,x,S),R=y(q,-1,S,x),D=y(F,-1,a.upUntil),I=y(F,1,a.downUntil);c.on("mouseup",function(){var e=P();e.collapsed&&N(W(e))}),c.on("click",function(e){var t;(t=o(e.target))&&(C(t)&&(e.preventDefault(),c.focus()),b(t)&&c.dom.isChildOf(t,c.selection.getNode())&&Z())}),c.on("blur NewBlock",function(){Z(),te()});var H=function(e){var i=new t(e);if(!e.firstChild)return!1;var r=n.before(e.firstChild),o=i.next(r);return o&&!x(o)&&!S(o)},L=function(e,t){return c.dom.getParent(e,c.dom.isBlock)===c.dom.getParent(t,c.dom.isBlock)},O=function(e){return!(e.keyCode>=112&&e.keyCode<=123)},K=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),i=c.dom.getParent(t,c.dom.isBlock);return n&&!L(n,i)&&H(n)};!function(e){var t=!1;e.on("touchstart",function(){t=!1}),e.on("touchmove",function(){t=!0}),e.on("touchend",function(e){var n=o(e.target);C(n)&&(t||(e.preventDefault(),J(_(n))))})}(c),c.on("mousedown",function(e){var t;if(t=o(e.target))C(t)?(e.preventDefault(),J(_(t))):l(e.clientX,e.clientY,c.selection.getRng())||c.selection.placeCaretAt(e.clientX,e.clientY);else{Z(),te();var n=s.closestCaret(ie,e.clientX,e.clientY);n&&(K(e.target,n.node)||(e.preventDefault(),c.getBody().focus(),N(M(1,n.node,n.before))))}}),c.on("keydown",function(e){if(!d.modifierPressed(e))switch(e.keyCode){case d.RIGHT:r(e,w);break;case d.DOWN:r(e,I);break;case d.LEFT:r(e,k);break;case d.UP:r(e,D);break;case d.DELETE:r(e,B);break;case d.BACKSPACE:r(e,R);break;default:C(c.selection.getNode())&&O(e)&&e.preventDefault()}}),c.on("keyup compositionstart",function(e){g(e),T(e)},!0),c.on("cut",function(){var e=c.selection.getNode();C(e)&&p.setEditorTimeout(c,function(){N(z(X(e)))})}),c.on("getSelectionRange",function(e){var t=e.range;if(ne){if(!ne.parentNode)return void(ne=null);t=t.cloneRange(),t.selectNode(ne),e.range=t}}),c.on("setSelectionRange",function(e){var t;(t=J(e.range))&&(e.range=t)}),c.on("AfterSetSelectionRange",function(e){var t=e.range;Q(t)||te(),v(t.startContainer.parentNode)||Z()}),c.on("focus",function(){p.setEditorTimeout(c,function(){c.selection.setRng(z(c.selection.getRng()))},0)}),c.on("copy",function(t){var n=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!e.ie){var i=E();i&&(t.preventDefault(),n.clearData(),n.setData("text/html",i.outerHTML),n.setData("text/plain",i.outerText))}}),h.init(c)}(),function(){var e=c.contentStyles;e.push(se.getCss()),e.push(".mce-content-body .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}.mce-content-body *[contentEditable=false] {cursor: default;}.mce-content-body *[contentEditable=true] {cursor: text;}")}()),{showBlockCaretContainer:U,hideFakeCaret:te,destroy:ee}}var y=f.curry,b=l.isContentEditableTrue,C=l.isContentEditableFalse,T=l.isElement,S=r.isAfterContentEditableFalse,x=r.isBeforeContentEditableFalse,w=c.getSelectedNode;return v}),o("tinymce/util/Uuid",[],function(){var e=0,t=function(){var e=function(){return Math.round(4294967295*Math.random()).toString(36)};return"s"+(new Date).getTime().toString(36)+e()+e()+e()};return{uuid:function(n){return n+e+++t()}}}),o("tinymce/ui/Sidebar",[],function(){return{add:function(e,t,n){var i=e.sidebars?e.sidebars:[];i.push({name:t,settings:n}),e.sidebars=i}}}),o("tinymce/Editor",["tinymce/dom/DOMUtils","tinymce/dom/DomQuery","tinymce/AddOnManager","tinymce/NodeChange","tinymce/html/Node","tinymce/dom/Serializer","tinymce/html/Serializer","tinymce/dom/Selection","tinymce/Formatter","tinymce/UndoManager","tinymce/EnterKey","tinymce/ForceBlocks","tinymce/EditorCommands","tinymce/util/URI","tinymce/dom/ScriptLoader","tinymce/dom/EventUtils","tinymce/WindowManager","tinymce/NotificationManager","tinymce/html/Schema","tinymce/html/DomParser","tinymce/util/Quirks","tinymce/Env","tinymce/util/Tools","tinymce/util/Delay","tinymce/EditorObservable","tinymce/Mode","tinymce/Shortcuts","tinymce/EditorUpload","tinymce/SelectionOverrides","tinymce/util/Uuid","tinymce/ui/Sidebar","tinymce/ErrorReporter"],function(e,t,n,r,o,a,s,l,c,u,d,f,m,p,h,g,v,y,b,C,T,S,x,w,E,A,N,P,k,M,_,B){function R(e,i,r){var o,a,s,l=this;o=l.documentBaseUrl=r.documentBaseURL,a=r.baseURI,s=r.defaultSettings,i=L({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:o,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:l.convertURL,url_converter_scope:l,ie7_compat:!0},s,i),s&&s.external_plugins&&i.external_plugins&&(i.external_plugins=L({},s.external_plugins,i.external_plugins)),l.settings=i,n.language=i.language||"en",n.languageLoad=i.language_load,n.baseURL=r.baseURL,l.id=i.id=e,l.setDirty(!1),l.plugins={},l.documentBaseURI=new p(i.document_base_url||o,{base_uri:a}),l.baseURI=a,l.contentCSS=[],l.contentStyles=[],l.shortcuts=new N(l),l.loadedCSS={},l.editorCommands=new m(l),l.suffix=r.suffix,l.editorManager=r,l.inline=i.inline,l.settings.content_editable=l.inline,i.cache_suffix&&(S.cacheSuffix=i.cache_suffix.replace(/^[\?\&]+/,"")),!1===i.override_viewport&&(S.overrideViewPort=!1),r.fire("SetupEditor",l),l.execCallback("setup",l),l.$=t.overrideDefaults(function(){return{context:l.inline?l.getBody():l.getDoc(),element:l.getBody()}})}var D=e.DOM,I=n.ThemeManager,H=n.PluginManager,L=x.extend,O=x.each,G=x.explode,F=x.inArray,V=x.trim,U=x.resolve,W=g.Event,z=S.gecko,X=S.ie;return R.prototype={render:function(){function e(){D.unbind(window,"ready",e),t.render()}var t=this,n=t.settings,i=t.id,r=t.suffix;if(!W.domLoaded)return void D.bind(window,"ready",e);if(t.getElement()&&S.contentEditable){n.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||D.getParent(i,"form");o&&(t.formElement=o,n.hidden_input&&!/TEXTAREA|INPUT/i.test(t.getElement().nodeName)&&(D.insertAfter(D.create("input",{type:"hidden",name:i}),i),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},D.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.setContent(t.startContent,{format:"raw"})}),!n.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=new v(t),t.notificationManager=new y(t),"xml"==n.encoding&&t.on("GetContent",function(e){e.save&&(e.content=D.encode(e.content))}),n.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),n.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),function(){var e=h.ScriptLoader;if(n.language&&"en"!=n.language&&!n.language_url&&(n.language_url=t.editorManager.baseURL+"/langs/"+n.language+".js"),n.language_url&&e.add(n.language_url),n.theme&&"function"!=typeof n.theme&&"-"!=n.theme.charAt(0)&&!I.urls[n.theme]){var i=n.theme_url;i=i?t.documentBaseURI.toAbsolute(i):"themes/"+n.theme+"/theme"+r+".js",I.load(n.theme,i)}x.isArray(n.plugins)&&(n.plugins=n.plugins.join(" ")),O(n.external_plugins,function(e,t){H.load(t,e),n.plugins+=" "+t}),O(n.plugins.split(/[ ,]/),function(e){if((e=V(e))&&!H.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=H.dependencies(e);O(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};e=H.createUrl(t,e),H.load(e.resource,e)})}else H.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"})}),e.loadQueue(function(){t.removed||t.init()},t,function(e){B.pluginLoadError(t,e[0]),t.removed||t.init()})}()}},init:function(){function e(t){var n,i,r=H.get(t);if(n=H.urls[t]||f.documentBaseUrl.replace(/\/$/,""),t=V(t),r&&-1===F(h,t)){if(O(H.dependencies(t),function(t){e(t)}),f.plugins[t])return;i=new r(f,n,f.$),f.plugins[t]=i,i.init&&(i.init(f,n),h.push(t))}}var t,n,i,r,o,a,s,l,c,u,d,f=this,m=f.settings,p=f.getElement(),h=[];if(f.rtl=m.rtl_ui||f.editorManager.i18n.rtl,f.editorManager.i18n.setCode(m.language),m.aria_label=m.aria_label||D.getAttrib(p,"aria-label",f.getLang("aria.rich_text_area")),f.fire("ScriptsLoaded"),m.theme&&("function"!=typeof m.theme?(m.theme=m.theme.replace(/-/,""),a=I.get(m.theme),f.theme=new a(f,I.urls[m.theme]),f.theme.init&&f.theme.init(f,I.urls[m.theme]||f.documentBaseUrl.replace(/\/$/,""),f.$)):f.theme=m.theme),O(m.plugins.replace(/\-/g,"").split(/[ ,]/),e),m.render_ui&&f.theme&&(f.orgDisplay=p.style.display,"function"!=typeof m.theme?(t=m.width||p.style.width||p.offsetWidth,n=m.height||p.style.height||p.offsetHeight,i=m.min_height||100,u=/^[0-9\.]+(|px)$/i,u.test(""+t)&&(t=Math.max(parseInt(t,10),100)),u.test(""+n)&&(n=Math.max(parseInt(n,10),i)),o=f.theme.renderUI({targetNode:p,width:t,height:n,deltaWidth:m.delta_width,deltaHeight:m.delta_height}),m.content_editable||(n=(o.iframeHeight||n)+("number"==typeof n?o.deltaHeight||0:""))<i&&(n=i)):(o=m.theme(f,p),o.editorContainer.nodeType&&(o.editorContainer.id=o.editorContainer.id||f.id+"_parent"),o.iframeContainer.nodeType&&(o.iframeContainer.id=o.iframeContainer.id||f.id+"_iframecontainer"),n=o.iframeHeight||p.offsetHeight),f.editorContainer=o.editorContainer),m.content_css&&O(G(m.content_css),function(e){f.contentCSS.push(f.documentBaseURI.toAbsolute(e))}),m.content_style&&f.contentStyles.push(m.content_style),m.content_editable)return p=r=o=null,f.initContentBody();if(f.iframeHTML=m.doctype+"<html><head>",m.document_base_url!=f.documentBaseUrl&&(f.iframeHTML+='<base href="'+f.documentBaseURI.getURI()+'" />'),!S.caretAfter&&m.ie7_compat&&(f.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),f.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',!/#$/.test(document.location.href))for(d=0;d<f.contentCSS.length;d++){var g=f.contentCSS[d];f.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+x._addCacheSuffix(g)+'" />',f.loadedCSS[g]=!0}l=m.body_id||"tinymce",-1!=l.indexOf("=")&&(l=f.getParam("body_id","","hash"),l=l[f.id]||l),c=m.body_class||"",-1!=c.indexOf("=")&&(c=f.getParam("body_class","","hash"),c=c[f.id]||""),m.content_security_policy&&(f.iframeHTML+='<meta http-equiv="Content-Security-Policy" content="'+m.content_security_policy+'" />'),f.iframeHTML+='</head><body id="'+l+'" class="mce-content-body '+c+'" data-id="'+f.id+'"><br></body></html>';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+f.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&S.ie&&S.ie<12&&(s=v);var y=D.create("iframe",{id:f.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:f.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:n,display:"block"}});if(y.onload=function(){y.onload=null,f.fire("load")},D.setAttrib(y,"src",s||'javascript:""'),f.contentAreaContainer=o.iframeContainer,f.iframeElement=y,r=D.add(o.iframeContainer,y),X)try{f.getDoc()}catch(e){r.src=s=v}o.editorContainer&&(D.get(o.editorContainer).style.display=f.orgDisplay,f.hidden=D.isHidden(o.editorContainer)),f.getElement().style.display="none",D.setAttrib(f.id,"aria-hidden",!0),s||f.initContentBody(),p=r=o=null},initContentBody:function(t){var n,i,s=this,m=s.settings,p=s.getElement(),h=s.getDoc();m.inline||(s.getElement().style.visibility=s.orgVisibility),t||m.content_editable||(h.open(),h.write(s.iframeHTML),h.close()),m.content_editable&&(s.on("remove",function(){var e=this.getBody();D.removeClass(e,"mce-content-body"),D.removeClass(e,"mce-edit-focus"),D.setAttrib(e,"contentEditable",null)}),D.addClass(p,"mce-content-body"),s.contentDocument=h=m.content_document||document,s.contentWindow=m.content_window||window,s.bodyElement=p,m.content_document=m.content_window=null,m.root_name=p.nodeName.toLowerCase()),n=s.getBody(),n.disabled=!0,s.readonly=m.readonly,s.readonly||(s.inline&&"static"==D.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=s.getParam("content_editable_state",!0)),n.disabled=!1,s.editorUpload=new P(s),s.schema=new b(m),s.dom=new e(h,{keep_values:!0,url_converter:s.convertURL,url_converter_scope:s,hex_colors:m.force_hex_style_colors,class_filter:m.class_filter,update_styles:!0,root_element:s.inline?s.getBody():null,collect:m.content_editable,schema:s.schema,onSetAttrib:function(e){s.fire("SetAttrib",e)}}),s.parser=new C(m,s.schema),s.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,i,r,o=e.length,a=s.dom;o--;)if(n=e[o],i=n.attr(t),r="data-mce-"+t,!n.attributes.map[r]){if(0===i.indexOf("data:")||0===i.indexOf("blob:"))continue;"style"===t?(i=a.serializeStyle(a.parseStyle(i),n.name),i.length||(i=null),n.attr(r,i),n.attr(t,i)):"tabindex"===t?(n.attr(r,i),n.attr(t,null)):n.attr(r,s.convertURL(i,t,n.name))}}),s.parser.addNodeFilter("script",function(e){for(var t,n,i=e.length;i--;)t=e[i],n=t.attr("type")||"no/type",0!==n.indexOf("mce-")&&t.attr("type","mce-"+n)}),s.parser.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)t=e[n],t.type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),s.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,i=s.schema.getNonEmptyElements();n--;)t=e[n],t.isEmpty(i)&&0===t.getAll("br").length&&(t.append(new o("br",1)).shortEnded=!0)}),s.serializer=new a(m,s),s.selection=new l(s.dom,s.getWin(),s.serializer,s),s.formatter=new c(s),s.undoManager=new u(s),s.forceBlocks=new f(s),s.enterKey=new d(s),s._nodeChangeDispatcher=new r(s),s._selectionOverrides=new k(s),s.fire("PreInit"),m.browser_spellcheck||m.gecko_spellcheck||(h.body.spellcheck=!1,D.setAttrib(n,"spellcheck","false")),s.quirks=new T(s),s.fire("PostRender"),m.directionality&&(n.dir=m.directionality),m.nowrap&&(n.style.whiteSpace="nowrap"),m.protect&&s.on("BeforeSetContent",function(e){O(m.protect,function(t){e.content=e.content.replace(t,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),s.on("SetContent",function(){s.addVisual(s.getBody())}),m.padd_empty_editor&&s.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|<br \/>|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),s.load({initial:!0,format:"html"}),s.startContent=s.getContent({format:"raw"}),s.initialized=!0,s.bindPendingEventDelegates(),s.fire("init"),s.focus(!0),s.nodeChanged({initial:!0}),s.execCallback("init_instance_callback",s),s.on("compositionstart compositionend",function(e){s.composing="compositionstart"===e.type}),s.contentStyles.length>0&&(i="",O(s.contentStyles,function(e){i+=e+"\r\n"}),s.dom.addStyle(i)),O(s.contentCSS,function(e){s.loadedCSS[e]||(s.dom.loadCSS(e),s.loadedCSS[e]=!0)}),m.auto_focus&&w.setEditorTimeout(s,function(){var e;e=!0===m.auto_focus?s:s.editorManager.get(m.auto_focus),e.destroyed||e.focus()},100),p=h=n=null},focus:function(e){var t,n,i,r=this,o=r.selection,a=r.settings.content_editable,s=r.getDoc(),l=r.getBody();if(!e){if(t=o.getRng(),t.item&&(n=t.item(0)),r.quirks.refreshContentEditable(),i=function(e){return r.dom.getParent(e,function(e){return"true"===r.dom.getContentEditable(e)})}(o.getNode()),r.$.contains(l,i))return i.focus(),o.normalize(),void r.editorManager.setActive(r);if(a||(S.opera||r.getBody().focus(),r.getWin().focus()),z||a){if(l.setActive)try{l.setActive()}catch(e){l.focus()}else l.focus();a&&o.normalize()}n&&n.ownerDocument==s&&(t=s.body.createControlRange(),t.addElement(n),t.select())}r.editorManager.setActive(r)},execCallback:function(e){var t,n=this,i=n.settings[e];if(i)return n.callbackLookup&&(t=n.callbackLookup[e])&&(i=t.func,t=t.scope),"string"==typeof i&&(t=i.replace(/\.\w+$/,""),t=t?U(t):0,i=U(i),n.callbackLookup=n.callbackLookup||{},n.callbackLookup[e]={func:i,scope:t}),i.apply(t||n,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?(e=n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,i){return n.data[t+"."+i]||"{#"+i+"}"}),this.editorManager.translate(e)):""},getLang:function(e,t){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(t!==i?t:"{#"+e+"}")},getParam:function(e,t,n){var i,r=e in this.settings?this.settings[e]:t;return"hash"===n?(i={},"string"==typeof r?O(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),e.length>1?i[V(e[0])]=V(e[1]):i[V(e[0])]=V(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addSidebar:function(e,t){return _.add(this,e,t)},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n,i=this;i.contextToolbars=i.contextToolbars||[],"string"==typeof e&&(n=e,e=function(e){return i.dom.is(e,n)}),i.contextToolbars.push({id:M.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,i){this.shortcuts.add(e,t,n,i)},execCommand:function(e,t,n,i){return this.editorCommands.execCommand(e,t,n,i)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(D.show(e.getContainer()),D.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(X&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(D.hide(e.getContainer()),D.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var t,n=this,r=n.getElement();if(r)return e=e||{},e.load=!0,t=n.setContent(r.value!==i?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,t},save:function(e){var t,n,i=this,r=i.getElement();if(r&&i.initialized)return e=e||{},e.save=!0,e.element=r,t=e.content=i.getContent(e),e.no_events||i.fire("SaveContent",e),"raw"==e.format&&i.fire("RawSaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(r.nodeName)?r.value=t:(i.inline||(r.innerHTML=t),(n=D.getParent(i.id,"form"))&&O(n.elements,function(e){if(e.name==i.id)return e.value=t,!1})),e.element=r=null,!1!==e.set_dirty&&i.setDirty(!1),t},setContent:function(e,t){var n,i,r=this,o=r.getBody();return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||r.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(i=X&&X<11?"":'<br data-mce-bogus="1">',"TABLE"==o.nodeName?e="<tr><td>"+i+"</td></tr>":/^(UL|OL)$/.test(o.nodeName)&&(e="<li>"+i+"</li>"),n=r.settings.forced_root_block,n&&r.schema.isValidChild(o.nodeName.toLowerCase(),n.toLowerCase())?(e=i,e=r.dom.createHTML(n,r.settings.forced_root_block_attrs,e)):X||e||(e='<br data-mce-bogus="1">'),r.dom.setHTML(o,e),r.fire("SetContent",t)):("raw"!==t.format&&(e=new s({validate:r.validate},r.schema).serialize(r.parser.parse(e,{isRootContent:!0}))),t.content=V(e),r.dom.setHTML(o,t.content),t.no_events||r.fire("SetContent",t)),t.content},getContent:function(e){var t,n=this,i=n.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||n.fire("BeforeGetContent",e),t="raw"==e.format?x.trim(n.serializer.getTrimmedContent()):"text"==e.format?i.innerText||i.textContent:n.serializer.serialize(i,e),"text"!=e.format?e.content=V(t):e.content=t,e.no_events||n.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=L({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){A.setMode(this,e)},getContainer:function(){var e=this;return e.container||(e.container=D.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=D.get(this.id)),this.targetElm},getWin:function(){var e,t=this;return t.contentWindow||(e=t.iframeElement)&&(t.contentWindow=e.contentWindow),t.contentWindow},getDoc:function(){var e,t=this;return t.contentDocument||(e=t.getWin())&&(t.contentDocument=e.document),t.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var i=this,r=i.settings;return r.urlconverter_callback?i.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?i.documentBaseURI.toRelative(e):e=i.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var t,n=this,r=n.settings,o=n.dom;e=e||n.getBody(),n.hasVisual===i&&(n.hasVisual=r.visual),O(o.select("table,a",e),function(e){var i;switch(e.nodeName){case"TABLE":return t=r.visual_table_class||"mce-item-table",i=o.getAttrib(e,"border"),void(i&&"0"!=i||!n.hasVisual?o.removeClass(e,t):o.addClass(e,t));case"A":return void(o.getAttrib(e,"href",!1)||(i=o.getAttrib(e,"name")||e.id,t=r.visual_anchor_class||"mce-item-anchor",i&&n.hasVisual?o.addClass(e,t):o.removeClass(e,t)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&D.remove(e.getElement().nextSibling),e.inline||(X&&X<10&&e.getDoc().execCommand("SelectAll",!1,null),D.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),D.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t,n=this;if(!n.destroyed){if(!e&&!n.removed)return void n.remove();e||(n.editorManager.off("beforeunload",n._beforeUnload),n.theme&&n.theme.destroy&&n.theme.destroy(),n.selection.destroy(),n.dom.destroy()),t=n.formElement,t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),D.unbind(t,"submit reset",n.formEventDelegate)),n.contentAreaContainer=n.formElement=n.container=n.editorContainer=null,n.bodyElement=n.contentDocument=n.contentWindow=null,n.iframeElement=n.targetElm=null,n.selection&&(n.selection=n.selection.win=n.selection.dom=n.selection.dom.doc=null),n.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},L(R.prototype,E),R}),o("tinymce/util/I18n",["tinymce/util/Tools"],function(e){var t={},n="en";return{setCode:function(e){e&&(n=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return n},rtl:!1,add:function(e,n){var i=t[e];i||(t[e]=i={});for(var r in n)i[r]=n[r];this.setCode(e)},translate:function(i){function r(t){return e.is(t,"function")?Object.prototype.toString.call(t):o(t)?"":""+t}function o(t){return""===t||null===t||e.is(t,"undefined")}function a(t){return t=r(t),e.hasOwn(s,t)?r(s[t]):t}var s=t[n]||{};if(o(i))return"";if(e.is(i,"object")&&e.hasOwn(i,"raw"))return r(i.raw);if(e.is(i,"array")){var l=i.slice(1);i=a(i[0]).replace(/\{([0-9]+)\}/g,function(t,n){return e.hasOwn(l,n)?r(l[n]):t})}return a(i).replace(/{context:\w+}$/,"")},data:t}}),o("tinymce/FocusManager",["tinymce/dom/DOMUtils","tinymce/util/Delay","tinymce/Env"],function(e,t,n){function i(e){function i(){try{return document.activeElement}catch(e){return document.body}}function c(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function u(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function d(d){var f=d.editor;f.on("init",function(){(f.inline||n.ie)&&("onbeforedeactivate"in document&&n.ie<9?f.dom.bind(f.getBody(),"beforedeactivate",function(e){if(e.target==f.getBody())try{f.lastRng=f.selection.getRng()}catch(e){}}):f.on("nodechange mouseup keyup",function(e){var t=i();"nodechange"==e.type&&e.selectionChange||(t&&t.id==f.id+"_ifr"&&(t=f.getBody()),f.dom.isChildOf(t,f.getBody())&&(f.lastRng=f.selection.getRng()))}),n.webkit&&!r&&(r=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(f.lastRng=n)}},s.bind(document,"selectionchange",r)))}),f.on("setcontent",function(){f.lastRng=null}),f.on("mousedown",function(){f.selection.lastFocusBookmark=null}),f.on("focusin",function(){var t,n=e.focusedEditor;f.selection.lastFocusBookmark&&(t=u(f,f.selection.lastFocusBookmark),f.selection.lastFocusBookmark=null,f.selection.setRng(t)),n!=f&&(n&&n.fire("blur",{focusedEditor:f}),e.setActive(f),e.focusedEditor=f,f.fire("focus",{blurredEditor:n}),f.focus(!0)),f.lastRng=null}),f.on("focusout",function(){t.setEditorTimeout(f,function(){var t=e.focusedEditor;l(f,i())||t!=f||(f.fire("blur",{focusedEditor:null}),e.focusedEditor=null,f.selection&&(f.selection.lastFocusBookmark=null))})}),o||(o=function(t){var n,i=e.activeEditor;n=t.target,i&&n.ownerDocument==document&&(i.selection&&n!=i.getBody()&&(i.selection.lastFocusBookmark=c(i.dom,i.lastRng)),n==document.body||l(i,n)||e.focusedEditor!=i||(i.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},s.bind(document,"focusin",o)),f.inline&&!a&&(a=function(t){var n=e.activeEditor,i=n.dom;if(n.inline&&i&&!i.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collapsed||(n.lastRng=r)}},s.bind(document,"mouseup",a))}function f(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(s.unbind(document,"selectionchange",r),s.unbind(document,"focusin",o),s.unbind(document,"mouseup",a),r=o=a=null)}e.on("AddEditor",d),e.on("RemoveEditor",f)}var r,o,a,s=e.DOM,l=function(e,t){var n=e?e.settings.custom_ui_selector:"";return null!==s.getParent(t,function(t){return i.isEditorUIElement(t)||!!n&&e.dom.is(t,n)})};return i.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},i._isUIElement=l,i}),o("tinymce/EditorManager",["tinymce/Editor","tinymce/dom/DomQuery","tinymce/dom/DOMUtils","tinymce/util/URI","tinymce/Env","tinymce/util/Tools","tinymce/util/Promise","tinymce/util/Observable","tinymce/util/I18n","tinymce/FocusManager","tinymce/AddOnManager"],function(e,t,n,i,r,o,a,s,l,c,u){function d(e){b(g.editors,function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})}function f(e,n){n!==S&&(n?t(window).on("resize scroll",d):t(window).off("resize scroll",d),S=n)}function m(e){var t,n=g.editors;delete n[e.id];for(var i=0;i<n.length;i++)if(n[i]==e){n.splice(i,1),t=!0;break}return g.activeEditor==e&&(g.activeEditor=n[0]),g.focusedEditor==e&&(g.focusedEditor=null),t}function p(e){return e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(m(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null),e}var h,g,v=n.DOM,y=o.explode,b=o.each,C=o.extend,T=0,S=!1;return g={$:t,majorVersion:"4",minorVersion:"5.7",releaseDate:"2017-04-25",editors:[],i18n:l,activeEditor:null,setup:function(){var e,t,n,r,o=this,a="";if(t=i.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),n=window.tinymce||window.tinyMCEPreInit)e=n.base||n.baseURL,a=n.suffix;else{for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){r=s[l].src;var u=r.substring(r.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(r)){-1!=u.indexOf(".min")&&(a=".min"),e=r.substring(0,r.lastIndexOf("/"));break}}!e&&document.currentScript&&(r=document.currentScript.src,-1!=r.indexOf(".min")&&(a=".min"),e=r.substring(0,r.lastIndexOf("/")))}o.baseURL=new i(t).toAbsolute(e),o.documentBaseURL=t,o.baseURI=new i(o.baseURL),o.suffix=a,o.focusManager=new c(o)},overrideDefaults:function(e){var t,n;t=e.base_url,t&&(this.baseURL=new i(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new i(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n),this.defaultSettings=e;var r=e.plugin_base_urls;for(var o in r)u.PluginManager.urls[o]=r[o]},init:function(n){function i(e,t){return e.inline&&t.tagName.toLowerCase()in m}function r(e,t){window.console&&!window.test&&window.console.log(e,t)}function s(e){var t=e.id;return t||(t=e.name,t=t&&!v.get(t)?e.name:v.uniqueId(),e.setAttribute("id",t)),t}function l(e){var t=n[e];if(t)return t.apply(h,Array.prototype.slice.call(arguments,2))}function c(e,t){return t.constructor===RegExp?t.test(e.className):v.hasClass(e,t)}function u(e){var t,n=[];if(e.types)return b(e.types,function(e){n=n.concat(v.select(e.selector))}),n;if(e.selector)return v.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":t=e.elements||"",t.length>0&&b(y(t),function(e){var t;(t=v.get(e))?n.push(t):b(document.forms,function(t){b(t.elements,function(t){t.name===e&&(e="mce_editor_"+T++,v.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":b(v.select("textarea"),function(t){e.editor_deselector&&c(t,e.editor_deselector)||e.editor_selector&&!c(t,e.editor_selector)||n.push(t)})}return n}function d(){function a(t,n,i){var r=new e(t,n,h);m.push(r),r.on("init",function(){++f===c.length&&g(m)}),r.targetElm=r.targetElm||i,r.render()}var c,f=0,m=[];if(v.unbind(window,"ready",d),l("onpageload"),c=t.unique(u(n)),n.types)return void b(n.types,function(e){o.each(c,function(t){return!v.is(t,e.selector)||(a(s(t),C({},n,e),t),!1)})});o.each(c,function(e){p(h.get(e.id))}),c=o.grep(c,function(e){return!h.get(e.id)}),b(c,function(e){i(n,e)?r("Could not initialize inline editor on invalid inline target element",e):a(s(e),n,e)})}var f,m,h=this;m=o.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var g=function(e){f=e};return h.settings=n,v.bind(window,"ready",d),new a(function(e){f?e(f):g=function(t){e(t)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),f(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),h||(h=function(){t.fire("BeforeUnload")},v.bind(window,"beforeunload",h)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t,n,i=this,r=i.editors;{if(e)return"string"==typeof e?(e=e.selector||e,void b(v.select(e),function(e){(n=r[e.id])&&i.remove(n)})):(n=e,r[n.id]?(m(n)&&i.fire("RemoveEditor",{editor:n}),r.length||v.unbind(window,"beforeunload",h),n.remove(),f(r,r.length>0),n):null);for(t=r.length-1;t>=0;t--)i.remove(r[t])}},execCommand:function(t,n,i){var r=this,o=r.get(i);switch(t){case"mceAddEditor":return r.get(i)||new e(i,r.settings,r).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(r.execCommand("mceAddEditor",0,i),!0)}return!!r.activeEditor&&r.activeEditor.execCommand(t,n,i)},triggerSave:function(){b(this.editors,function(e){e.save()})},addI18n:function(e,t){l.add(e,t)},translate:function(e){return l.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},C(g,s),g.setup(),window.tinymce=window.tinyMCE=g,g}),o("tinymce/LegacyInput",["tinymce/EditorManager","tinymce/util/Tools"],function(e,t){var n=t.each,i=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function r(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=i(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,i){"html4"===t.settings.schema&&e(i,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",r))})})}),o("tinymce/util/XHR",["tinymce/util/Observable","tinymce/util/Tools"],function(e,t){var n={send:function(e){function i(){!e.async||4==r.readyState||o++>1e4?(e.success&&o<1e4&&200==r.status?e.success.call(e.success_scope,""+r.responseText,r,e):e.error&&e.error.call(e.error_scope,o>1e4?"TIMED_OUT":"GENERAL",r,e),r=null):setTimeout(i,10)}var r,o=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",n.fire("beforeInitialize",{settings:e}),r=new XMLHttpRequest){if(r.overrideMimeType&&r.overrideMimeType(e.content_type),r.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(r.withCredentials=!0),e.content_type&&r.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&t.each(e.requestheaders,function(e){r.setRequestHeader(e.key,e.value)}),r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r=n.fire("beforeSend",{xhr:r,settings:e}).xhr,r.send(e.data),!e.async)return i();setTimeout(i,10)}}};return t.extend(n,e),n}),o("tinymce/util/JSON",[],function(){function e(t,n){var i,r,o,a;if(n=n||'"',null===t)return"null";if("string"==(o=typeof t))return r="\bb\tt\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(i=r.indexOf(t))+1?"\\"+r.charAt(i+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(i=0,r="[";i<t.length;i++)r+=(i>0?",":"")+e(t[i],n);return r+"]"}r="{";for(a in t)t.hasOwnProperty(a)&&(r+="function"!=typeof t[a]?(r.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return r+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(e){}}}}),o("tinymce/util/JSONRequest",["tinymce/util/JSON","tinymce/util/XHR","tinymce/util/Tools"],function(e,t,n){function i(e){this.settings=r({},e),this.count=0}var r=n.extend;return i.sendRPC=function(e){return(new i).send(e)},i.prototype={send:function(n){var i=n.error,o=n.success;n=r(this.settings,n),n.success=function(t,r){t=e.parse(t),void 0===t&&(t={error:"JSON Parse error."}),t.error?i.call(n.error_scope||n.scope,t.error,r):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){i&&i.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},i}),o("tinymce/util/JSONP",["tinymce/dom/DOMUtils"],function(e){return{callbacks:{},count:0,send:function(t){var n=this,r=e.DOM,o=t.count!==i?t.count:n.count,a="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(a),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:a,src:t.url,type:"text/javascript"}),n.count++}}}),o("tinymce/util/LocalStorage",[],function(){function e(){a=[];for(var e in o)a.push(e);n.length=a.length}function t(){var t,n="";if(l){for(var i in o)t=o[i],n+=(n?",":"")+i.length.toString(32)+","+i+","+t.length.toString(32)+","+t;r.setAttribute(s,n);try{r.save(s)}catch(e){}e()}}var n,r,o,a,s,l;try{if(window.localStorage)return localStorage}catch(e){}return s="tinymce",r=document.documentElement,l=!!r.addBehavior,l&&r.addBehavior("#default#userData"),n={key:function(e){return a[e]},getItem:function(e){return e in o?o[e]:null},setItem:function(e,n){o[e]=""+n,t()},removeItem:function(e){delete o[e],t()},clear:function(){o={},t()}},function(){function t(e){var t,n;return-1===(n=e!==i?u+e:a.indexOf(",",u))||n>a.length?null:(t=a.substring(u,n),u=n+1,t)}var n,a,c,u=0;if(o={},l){r.load(s),a=r.getAttribute(s)||"";do{var d=t();if(null===d)break;if(null!==(n=t(parseInt(d,32)||0))){if(null===(d=t()))break;c=t(parseInt(d,32)||0),n&&(o[n]=c)}}while(null!==n);e()}}(),n}),o("tinymce/Compat",["tinymce/dom/DOMUtils","tinymce/dom/EventUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/util/Tools","tinymce/Env"],function(e,t,n,i,r,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=i.PluginManager,a.ThemeManager=i.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,r.each("trim isArray is toArray makeMap each map grep inArray extend create walk createNS resolve explode _addCacheSuffix".split(" "),function(e){a[e]=r[e]}),r.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),o("tinymce/ui/Layout",["tinymce/util/Class","tinymce/util/Tools"],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t,n,i,r,o=this,a=o.settings;t=a.firstControlClass,n=a.lastControlClass,e.each(function(e){e.classes.remove(t).remove(n).add(a.controlClass),e.visible()&&(i||(i=e),r=e)}),i&&i.classes.add(t),r&&r.classes.add(n)},renderHtml:function(e){var t=this,n="";return t.applyClasses(e.items()),e.items().each(function(e){n+=e.renderHtml()}),n},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),o("tinymce/ui/AbsoluteLayout",["tinymce/ui/Layout"],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})}),o("tinymce/ui/Button",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&(e=t.style,e.width=e.height="100%"),this._super()},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r=t.state.get("icon"),o=t.state.get("text"),a="";return e=t.settings.image,e?(r="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o&&(t.classes.add("btn-has-text"),a='<span class="'+i+'txt">'+t.encode(o)+"</span>"),r=r?i+"ico "+i+"i-"+r:"",'<div id="'+n+'" class="'+t.classes+'" tabindex="-1" aria-labelledby="'+n+'"><button role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+e+"></i>":"")+a+"</button></div>"},bindStates:function(){function e(e){var r=n("span."+i,t.getEl());e?(r[0]||(n("button:first",t.getEl()).append('<span class="'+i+'"></span>'),r=n("span."+i,t.getEl())),r.html(t.encode(e))):r.remove(),t.classes.toggle("btn-has-text",!!e)}var t=this,n=t.$,i=t.classPrefix+"txt";return t.state.on("change:text",function(t){e(t.value)}),t.state.on("change:icon",function(n){var i=n.value,r=t.classPrefix;t.settings.icon=i,i=i?r+"ico "+r+"i-"+t.settings.icon:"";var o=t.getEl().firstChild,a=o.getElementsByTagName("i")[0];i?(a&&a==o.firstChild||(a=document.createElement("i"),o.insertBefore(a,o.firstChild)),a.className=i):a&&o.removeChild(a),e(t.state.get("text"))}),t._super()}})}),o("tinymce/ui/ButtonGroup",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),o("tinymce/ui/Checkbox",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes+'" unselectable="on" aria-labelledby="'+t+'-al" tabindex="-1"><i class="'+n+"ico "+n+'i-checkbox"></i><span id="'+t+'-al" class="'+n+'label">'+e.encode(e.state.get("text"))+"</span></div>"},bindStates:function(){function e(e){t.classes.toggle("checked",e),t.aria("checked",e)}var t=this;return t.state.on("change:text",function(e){t.getEl("al").firstChild.data=t.translate(e.value)}),t.state.on("change:checked change:value",function(n){t.fire("change"),e(n.value)}),t.state.on("change:icon",function(e){var n=e.value,i=t.classPrefix;if(void 0===n)return t.settings.icon;t.settings.icon=n,n=n?i+"ico "+i+"i-"+t.settings.icon:"";var r=t.getEl().firstChild,o=r.getElementsByTagName("i")[0];n?(o&&o==r.firstChild||(o=document.createElement("i"),r.insertBefore(o,r.firstChild)),o.className=n):o&&r.removeChild(o)}),t.state.get("checked")&&e(!0),t._super()}})}),o("tinymce/ui/ComboBox",["tinymce/ui/Widget","tinymce/ui/Factory","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/util/VK","tinymce/util/Tools"],function(e,t,n,i,r,o){return e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var r=n.target,o=t.getEl();if(i.contains(o,r)||r==o)for(;r&&r!=o;)r.id&&-1!=r.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),r=r.parentNode}),t.on("keydown",function(e){var n;13==e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){if("INPUT"==e.target.nodeName){var n=t.state.get("value"),i=e.target.value;i!==n&&(t.state.set("value",i),t.fire("autocomplete",e))}}),t.on("mouseover",function(e){var n=t.tooltip().moveTo(-65535);if(t.statusLevel()&&-1!==e.target.className.indexOf(t.classPrefix+"status")){var i=t.statusMessage()||"Ok",r=n.text(i).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);n.classes.toggle("tooltip-n","bc-tc"==r),n.classes.toggle("tooltip-nw","bc-tl"==r),n.classes.toggle("tooltip-ne","bc-tr"==r),n.moveRel(e.target,r)}})},statusLevel:function(e){return arguments.length>0&&this.state.set("statusLevel",e),this.state.get("statusLevel")},statusMessage:function(e){return arguments.length>0&&this.state.set("statusMessage",e),this.state.get("statusMessage")},showMenu:function(){var e,n=this,i=n.settings;n.menu||(e=i.menu||[],e.length?e={type:"menu",items:e}:e.type=e.type||"menu",n.menu=t.create(e).parent(n).renderTo(n.getContainerElm()),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control===n.menu&&n.focus()}),n.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()==n.value())})}).fire("show"),n.menu.on("select",function(e){n.value(e.control.value())}),n.on("focusin",function(e){"INPUT"==e.target.tagName.toUpperCase()&&n.menu.hide()}),n.aria("expanded",!0)),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,r=this,o=r.getEl(),a=r.getEl("open"),s=r.layoutRect(),l=0,c=o.firstChild;r.statusLevel()&&"none"!==r.statusLevel()&&(l=parseInt(n.getRuntimeStyle(c,"padding-right"),10)-parseInt(n.getRuntimeStyle(c,"padding-left"),10)),e=a?s.w-n.getSize(a).width-10:s.w-10;var u=document;return u.all&&(!u.documentMode||u.documentMode<=8)&&(t=r.layoutRect().h-2+"px"),i(c).css({width:e-l,lineHeight:t}),r._super(),r},postRender:function(){var e=this;return i(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e,t,n=this,i=n._id,r=n.settings,o=n.classPrefix,a=n.state.get("value")||"",s="",l="",c="";return"spellcheck"in r&&(l+=' spellcheck="'+r.spellcheck+'"'),r.maxLength&&(l+=' maxlength="'+r.maxLength+'"'),r.size&&(l+=' size="'+r.size+'"'),r.subtype&&(l+=' type="'+r.subtype+'"'),c='<i id="'+i+'-status" class="mce-status mce-ico" style="display: none"></i>',n.disabled()&&(l+=' disabled="disabled"'),e=r.icon,e&&"caret"!=e&&(e=o+"ico "+o+"i-"+r.icon),t=n.state.get("text"),(e||t)&&(s='<div id="'+i+'-open" class="'+o+"btn "+o+'open" tabIndex="-1" role="button"><button id="'+i+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!=e?'<i class="'+e+'"></i>':'<i class="'+o+'caret"></i>')+(t?(e?" ":"")+t:"")+"</button></div>",n.classes.add("has-open")),'<div id="'+i+'" class="'+n.classes+'"><input id="'+i+'-inp" class="'+o+'textbox" value="'+n.encode(a,!1)+'" hidefocus="1"'+l+' placeholder="'+n.encode(r.placeholder)+'" />'+c+s+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(e,n){var i=this;if(0===e.length)return void i.hideMenu();var r=function(e,t){return function(){i.fire("selectitem",{title:t,value:e})}};i.menu?i.menu.items().remove():i.menu=t.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(i).renderTo(),o.each(e,function(e){i.menu.add({text:e.title,url:e.previewUrl,match:n,classes:"menu-item-ellipsis",onclick:r(e.value,e.title)})}),i.menu.renderNew(),i.hideMenu(),i.menu.on("cancel",function(e){e.control.parent()===i.menu&&(e.stopPropagation(),i.focus(),i.hideMenu())}),i.menu.on("select",function(){i.focus()});var a=i.layoutRect().w;i.menu.layoutRect({w:a,minW:0,maxW:a}),i.menu.reflow(),i.menu.show(),i.menu.moveRel(i.getEl(),i.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var e=this;e.state.on("change:value",function(t){e.getEl("inp").value!=t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e.state.on("change:statusLevel",function(t){var i=e.getEl("status"),r=e.classPrefix,o=t.value;n.css(i,"display","none"===o?"none":""),n.toggleClass(i,r+"i-checkmark","ok"===o),n.toggleClass(i,r+"i-warning","warn"===o),n.toggleClass(i,r+"i-error","error"===o),e.classes.toggle("has-status","none"!==o),e.repaint()}),n.on(e.getEl("status"),"mouseleave",function(){e.tooltip().hide()}),e.on("cancel",function(t){e.menu&&e.menu.visible()&&(t.stopPropagation(),e.hideMenu())});var t=function(e,t){t&&t.items().length>0&&t.items().eq(e)[0].focus()};return e.on("keydown",function(n){var i=n.keyCode;"INPUT"===n.target.nodeName&&(i===r.DOWN?(n.preventDefault(),e.fire("autocomplete"),t(0,e.menu)):i===r.UP&&(n.preventDefault(),t(-1,e.menu)))}),e._super()},remove:function(){i(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}})}),o("tinymce/ui/ColorBox",["tinymce/ui/ComboBox"],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl("open"),n=t?t.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=e}catch(e){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.state.get("rendered")&&e.repaintColor(t.value)}),e._super()}})}),o("tinymce/ui/PanelButton",["tinymce/ui/Button","tinymce/ui/FloatPanel"],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var i=n.panel;i.type&&(i={layout:"grid",items:i}),i.role=i.role||"dialog",i.popover=!0,i.autohide=!0,i.ariaRoot=!0,e.panel=new t(i).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),o("tinymce/ui/ColorButton",["tinymce/ui/PanelButton","tinymce/dom/DOMUtils"],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,i=e.state.get("text"),r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return i&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(i)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+o+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+a+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(i){i.aria&&"down"==i.aria.key||i.control!=e||n.getParent(i.target,"."+e.classPrefix+"open")||(i.stopImmediatePropagation(),t.call(e,i))}),delete e.settings.onclick,e._super()}})}),o("tinymce/util/Color",[],function(){function e(e){function r(e,r,o){var a,s,l,c,u,d;return a=0,s=0,l=0,e/=255,r/=255,o/=255,u=t(e,t(r,o)),d=n(e,n(r,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=e==u?r-o:o==u?e-r:o-e,a=e==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:i(a),s:i(100*s),v:i(100*l)})}function o(e,r,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,r=parseInt(r,10)/100,o=parseInt(o,10)/100,r=n(0,t(r,1)),o=n(0,t(o,1)),0===r)return void(d=f=m=i(255*o));switch(a=e/60,s=o*r,l=s*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0:d=s,f=l,m=0;break;case 1:d=l,f=s,m=0;break;case 2:d=0,f=s,m=l;break;case 3:d=0,f=l,m=s;break;case 4:d=l,f=0,m=s;break;case 5:d=s,f=0,m=l;break;default:d=f=m=0}d=i(255*(d+c)),f=i(255*(f+c)),m=i(255*(m+c))}function a(){function e(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+e(d)+e(f)+e(m)}function s(){return{r:d,g:f,b:m}}function l(){return r(d,f,m)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,m=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),m=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),m=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),m=parseInt(t[3]+t[3],16)),d=d<0?0:d>255?255:d,f=f<0?0:f>255?255:f,m=m<0?0:m>255?255:m,u}var u=this,d=0,f=0,m=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,i=Math.round;return e}),o("tinymce/ui/ColorPicker",["tinymce/ui/Widget","tinymce/ui/DragHelper","tinymce/ui/DomUtils","tinymce/util/Color"],function(e,t,n,i){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var i,r,o=n.getPos(e);return i=t.pageX-o.x,r=t.pageY-o.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),r=Math.max(0,Math.min(r/e.clientHeight,1)),{x:i,y:r}}function r(e,t){var r=(360-e.h)/360;n.css(c,{top:100*r+"%"}),t||n.css(d,{left:e.s+"%",top:100-e.v+"%"}),u.style.background=new i({s:100,v:100,h:e.h}).toHex(),f.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(u,t),s.s=100*n.x,s.v=100*(1-n.y),r(s),f.fire("change")}function a(t){var n;n=e(l,t),s=m.toHsv(),s.h=360*(1-n.y),r(s,!0),f.fire("change")}var s,l,c,u,d,f=this,m=f.color();l=f.getEl("h"),c=f.getEl("hp"),u=f.getEl("sv"),d=f.getEl("svp"),f._repaint=function(){s=m.toHsv(),r(s)},f._super(),f._svdraghelper=new t(f._id+"-sv",{start:o,drag:o}),f._hdraghelper=new t(f._id+"-h",{start:a,drag:a}),f._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;if(!arguments.length)return t.color().toHex();t.color().parse(e),t._rendered&&t._repaint()},color:function(){return this._color||(this._color=new i),this._color},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return e='<div id="'+n+'-h" class="'+i+'colorpicker-h" style="background: -ms-linear-gradient(top,'+r+");background: linear-gradient(to bottom,"+r+');">'+function(){var e,t,n,o,a="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",o=r.split(","),e=0,t=o.length-1;e<t;e++)a+='<div class="'+i+'colorpicker-h-chunk" style="height:'+100/t+"%;"+n+o[e]+",endColorstr="+o[e+1]+");-ms-"+n+o[e]+",endColorstr="+o[e+1]+')"></div>';return a}()+'<div id="'+n+'-hp" class="'+i+'colorpicker-h-marker"></div></div>','<div id="'+n+'" class="'+t.classes+'"><div id="'+n+'-sv" class="'+i+'colorpicker-sv"><div class="'+i+'colorpicker-overlay1"><div class="'+i+'colorpicker-overlay2"><div id="'+n+'-svp" class="'+i+'colorpicker-selector1"><div class="'+i+'colorpicker-selector2"></div></div></div></div></div>'+e+"</div>"}})}),o("tinymce/ui/Path",["tinymce/ui/Widget"],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="»"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n;(n=e.target.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){var e=this;return'<div id="'+e._id+'" class="'+e.classes+'">'+e._getDataPathHtml(e.state.get("row"))+"</div>"},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t,n,i=this,r=e||[],o="",a=i.classPrefix;for(t=0,n=r.length;t<n;t++)o+=(t>0?'<div class="'+a+'divider" aria-hidden="true"> '+i.settings.delimiter+" </div>":"")+'<div role="button" class="'+a+"path-item"+(t==n-1?" "+a+"last":"")+'" data-index="'+t+'" tabindex="-1" id="'+i._id+"-"+t+'" aria-level="'+(t+1)+'">'+r[t].name+"</div>";return o||(o='<div class="'+a+'path-item"> </div>'),o}})}),o("tinymce/ui/ElementPath",["tinymce/ui/Path"],function(e){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var t=this,n=t.settings.editor;return!1!==n.settings.elementpath&&(t.on("select",function(e){n.focus(),n.selection.select(this.row()[e.index].element),n.nodeChanged()}),n.on("nodeChange",function(i){for(var r=[],o=i.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=n.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||r.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}t.row(r)})),t._super()}})}),o("tinymce/ui/FormItem",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),o("tinymce/ui/Form",["tinymce/ui/Container","tinymce/ui/FormItem","tinymce/util/Tools"],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,i=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),i.each(function(i){var r,o=i.settings.label;o&&(r=new t(n.extend({items:{type:"label",id:i._id+"-l",text:o,flex:0,forId:i._id,disabled:i.disabled()}},e.settings.formItemDefaults)),r.type="formitem",i.aria("labelledby",i._id+"-l"),void 0===i.settings.flex&&(i.settings.flex=1),e.replace(i,r),r.add(i))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.fromJSON(e.settings.data)},bindStates:function(){function e(){var e,n,i,r=0,o=[];if(!1!==t.settings.labelGapCalc)for(i="children"==t.settings.labelGapCalc?t.find("formitem"):t.items(),i.filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;r=n>r?n:r,o.push(t)}),n=t.settings.labelGap||0,e=o.length;e--;)o[e].settings.minWidth=r+n}var t=this;t._super(),t.on("show",e),e()}})}),o("tinymce/ui/FieldSet",["tinymce/ui/Form"],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}})}),o("tinymce/content/LinkTargets",["tinymce/dom/DOMUtils","tinymce/util/Fun","tinymce/util/Arr","tinymce/util/Uuid","tinymce/util/Tools","tinymce/dom/NodeType"],function(e,t,n,i,r,o){var a=r.trim,s=function(e,t,n,i,r){return{type:e,title:t,url:n,level:i,attach:r}},l=function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return o.isContentEditableTrue(e)}return!1},c=function(t,n){return e.DOM.select(t,n)},u=function(e){return e.innerText||e.textContent},d=function(e){return e.id?e.id:i.uuid("h")},f=function(e){return e&&"A"===e.nodeName&&(e.id||e.name)},m=function(e){return f(e)&&h(e)},p=function(e){return e&&/^(H[1-6])$/.test(e.nodeName)},h=function(e){return l(e)&&!o.isContentEditableFalse(e)},g=function(e){return p(e)&&h(e)},v=function(e){return p(e)?parseInt(e.nodeName.substr(1),10):0},y=function(e){var t=d(e),n=function(){e.id=t};return s("header",u(e),"#"+t,v(e),n)},b=function(e){var n=e.id||e.name,i=u(e);return s("anchor",i||"#"+n,"#"+n,0,t.noop)},C=function(e){return n.map(n.filter(e,g),y)},T=function(e){return n.map(n.filter(e,m),b)},S=function(e){return c("h1,h2,h3,h4,h5,h6,a:not([href])",e)},x=function(e){return a(e.title).length>0};return{find:function(e){var t=S(e);return n.filter(C(t).concat(T(t)),x)}}}),o("tinymce/ui/FilePicker",["tinymce/ui/ComboBox","tinymce/util/Tools","tinymce/util/Arr","tinymce/util/Fun","tinymce/util/VK","tinymce/content/LinkTargets"],function(e,t,n,i,r,o){var a={},s=function(e){return{title:e.title,value:{title:{raw:e.title},url:e.url,attach:e.attach}}},l=function(e){return t.map(e,s)},c=function(e,t){return{title:e,value:{title:e,url:t,attach:i.noop}}},u=function(e,t){return!n.find(t,function(t){return t.url===e})},d=function(e,t,n){var i=t in e?e[t]:n;return!1===i?null:i},f=function(e,r,o,s){var f={title:"-"},m=function(e){var a=n.filter(e[o],function(e){return u(e,r)});return t.map(a,function(e){return{title:e,value:{title:e,url:e,attach:i.noop}}})},h=function(e){var t=n.filter(r,function(t){return t.type==e});return l(t)};return!1===s.typeahead_urls?[]:"file"===o?function(e){return n.reduce(e,function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(f,t)},[])}([p(e,m(a)),p(e,h("header")),p(e,function(){var e=h("anchor"),t=d(s,"anchor_top","#top"),n=d(s,"anchor_bottom","#bottom");return null!==t&&e.unshift(c("<top>",t)),null!==n&&e.push(c("<bottom>",n)),e}())]):p(e,m(a))},m=function(e,t){var i=a[t];/^https?/.test(e)&&(i?-1===n.indexOf(i,e)&&(a[t]=i.slice(0,5).concat(e)):a[t]=[e])},p=function(e,n){var i=e.toLowerCase(),r=t.grep(n,function(e){return-1!==e.title.toLowerCase().indexOf(i)});return 1===r.length&&r[0].title===e?[]:r},h=function(e){var t=e.title;return t.raw?t.raw:t},g=function(e,t,n,i){var r=function(r){var a=o.find(n),s=f(r,a,i,t);e.showAutoComplete(s,r)};e.on("autocomplete",function(){r(e.value())}),e.on("selectitem",function(t){var n=t.value;e.value(n.url);var r=h(n);"image"===i?e.fire("change",{meta:{alt:r,attach:n.attach}}):e.fire("change",{meta:{text:r,attach:n.attach}}),e.focus()}),e.on("click",function(t){0===e.value().length&&"INPUT"===t.target.nodeName&&r("")}),e.on("PostRender",function(){e.getRoot().on("submit",function(t){t.isDefaultPrevented()||m(e.value(),i)})})},v=function(e){var t=e.status,n=e.message;return"valid"===t?{status:"ok",message:n}:"unknown"===t?{status:"warn",message:n}:"invalid"===t?{status:"warn",message:n}:{status:"none",message:""}},y=function(e,t,n){var i=t.filepicker_validator_handler;if(i){var r=function(t){if(0===t.length)return void e.statusLevel("none");i({url:t,type:n},function(t){var n=v(t);e.statusMessage(n.message),e.statusLevel(n.status)})};e.state.on("change:value",function(e){r(e.value)})}};return e.extend({init:function(e){var n,i,r,o=this,a=tinymce.activeEditor,s=a.settings,l=e.filetype;e.spellcheck=!1,r=s.file_picker_types||s.file_browser_callback_types,r&&(r=t.makeMap(r,/[, ]/)),r&&!r[l]||(i=s.file_picker_callback,!i||r&&!r[l]?!(i=s.file_browser_callback)||r&&!r[l]||(n=function(){i(o.getEl("inp").id,o.value(),l,window)}):n=function(){var e=o.fire("beforecall").meta;e=t.extend({filetype:l},e),i.call(a,function(e,t){o.value(e).fire("change",{meta:t})},o.value(),e)}),n&&(e.icon="browse",e.onaction=n),o._super(e),g(o,s,a.getBody(),l),y(o,s,l)}})}),o("tinymce/ui/FitLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),o("tinymce/ui/FlexLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t,n,i,r,o,a,s,l,c,u,d,f,m,p,h,g,v,y,b,C,T,S,x,w,E,A,N,P,k,M,_,B,R,D,I,H,L,O,G=[],F=Math.max,V=Math.min;for(i=e.items().filter(":visible"),r=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(i=i.set(i.toArray().reverse()),f=f.split("-")[0]),"column"==f?(E="y",x="h",w="minH",A="maxH",P="innerH",N="top",k="deltaH",M="contentH",I="left",R="w",_="x",B="innerW",D="minW",H="right",L="deltaW",O="contentW"):(E="x",x="w",w="minW",A="maxW",P="innerW",N="left",k="deltaW",M="contentW",I="top",R="h",_="y",B="innerH",D="minH",H="bottom",L="deltaH",O="contentH"),d=r[P]-o[N]-o[N],S=u=0,t=0,n=i.length;t<n;t++)m=i[t],p=m.layoutRect(),h=m.settings,g=h.flex,d-=t<n-1?c:0,g>0&&(u+=g,p[A]&&G.push(m),p.flex=g),d-=p[w],(v=o[I]+p[D]+o[H])>S&&(S=v);if(C={},C[w]=d<0?r[w]-d+r[k]:r[P]-d+r[k],C[D]=S+r[L],C[M]=r[P]-d,C[O]=S,C.minW=V(C.minW,r.maxW),C.minH=V(C.minH,r.maxH),C.minW=F(C.minW,r.startMinWidth),C.minH=F(C.minH,r.startMinHeight),!r.autoResize||C.minW==r.minW&&C.minH==r.minH){for(b=d/u,t=0,n=G.length;t<n;t++)m=G[t],p=m.layoutRect(),y=p[A],v=p[w]+p.flex*b,v>y?(d-=p[A]-p[w],u-=p.flex,p.flex=0,p.maxFlexSize=y):p.maxFlexSize=0;for(b=d/u,T=o[N],C={},0===u&&("end"==l?T=d+o[N]:"center"==l?(T=Math.round(r[P]/2-(r[P]-d)/2)+o[N])<0&&(T=o[N]):"justify"==l&&(T=o[N],c=Math.floor(d/(i.length-1)))),C[_]=o[I],t=0,n=i.length;t<n;t++)m=i[t],p=m.layoutRect(),v=p.maxFlexSize||p[w],"center"===s?C[_]=Math.round(r[B]/2-p[R]/2):"stretch"===s?(C[R]=F(p[D]||0,r[B]-o[I]-o[H]),C[_]=o[I]):"end"===s&&(C[_]=r[B]-p[R]-o.top),p.flex>0&&(v+=p.flex*b),C[x]=v,C[E]=T,m.layoutRect(C),m.recalc&&m.recalc(),T+=v+c}else if(C.w=C.minW,C.h=C.minH,e.layoutRect(C),this.recalc(e),null===e._lastRect){var U=e.parent();U&&(U._lastRect=null,U.recalc())}}})}),o("tinymce/ui/FlowLayout",["tinymce/ui/Layout"],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),o("tinymce/fmt/FontInfo",["tinymce/dom/DOMUtils"],function(e){var t=function(e,t,n){for(;n!==t;){if(n.style[e])return n.style[e];n=n.parentNode}return""},n=function(e){return/[0-9.]+px$/.test(e)?Math.round(72*parseInt(e,10)/96)+"pt":e},r=function(e){return e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")},o=function(t,n){return e.DOM.getStyle(n,t,!0)};return{getFontSize:function(e,n){var i=t("fontSize",e,n);return""!==i?i:o("fontSize",n)},getFontFamily:function(e,n){var a=t("fontFamily",e,n),s=""!==a?a:o("fontFamily",n);return s!==i?r(s):""},toPt:n}}),o("tinymce/ui/FormatControls",["tinymce/ui/Control","tinymce/ui/Widget","tinymce/ui/FloatPanel","tinymce/util/Tools","tinymce/util/Arr","tinymce/dom/DOMUtils","tinymce/EditorManager","tinymce/Env","tinymce/fmt/FontInfo"],function(e,t,n,i,r,o,a,s,l){function c(e){e.settings.ui_container&&(s.container=o.DOM.select(e.settings.ui_container)[0])}function u(t){t.on("ScriptsLoaded",function(){t.rtl&&(e.rtl=!0)})}function d(e){function t(t,n){return function(){var i=this;e.on("nodeChange",function(r){var o=e.formatter,a=null;f(r.parents,function(e){if(f(t,function(t){if(n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a)return!1}),a)return!1}),i.value(a)})}}function r(t){return function(){var n=this,i=function(e){return e?e.split(",")[0]:""};e.on("nodeChange",function(r){var o,a=null;o=l.getFontFamily(e.getBody(),r.element),f(t,function(e){e.value.toLowerCase()===o.toLowerCase()&&(a=e.value)}),f(t,function(e){a||i(e.value).toLowerCase()!==i(o).toLowerCase()||(a=e.value)}),n.value(a),!a&&o&&n.text(i(o))})}}function o(t){return function(){var n=this;e.on("nodeChange",function(i){var r,o,a=null;r=l.getFontSize(e.getBody(),i.element),o=l.toPt(r),f(t,function(e){e.value===r?a=r:e.value===o&&(a=o)}),n.value(a),a||n.text(o)})}}function a(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function s(t){return function(){var n=this;e.formatter?e.formatter.formatChanged(t,function(e){n.active(e)}):e.on("init",function(){e.formatter.formatChanged(t,function(e){n.active(e)})})}}function c(t){return function(){function n(){var n="redo"==t?"hasRedo":"hasUndo";return!!e.undoManager&&e.undoManager[n]()}var i=this;i.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){i.disabled(e.readonly||!n())})}}function u(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function d(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}function p(t){var n=t.length;return i.each(t,function(t){t.menu&&(t.hidden=0===p(t.menu));var i=t.format;i&&(t.hidden=!e.formatter.canApply(i)),t.hidden&&n--}),n}function h(t){var n=t.items().length;return t.items().each(function(t){t.menu&&t.visible(h(t.menu)>0),!t.menu&&t.settings.menu&&t.visible(p(t.settings.menu)>0);var i=t.settings.format;i&&t.visible(e.formatter.canApply(i)),t.visible()||n--}),n}var g;g=function(){function t(e){var r=[];if(e)return f(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+n++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}r.push(o)}),r}var n=0,i=[],r=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){f(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:function(){return t(e.settings.style_formats_merge?e.settings.style_formats?r.concat(e.settings.style_formats):r:e.settings.style_formats||r)}(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return e.formatter.getCssText(this.settings.format)},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,i;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),(i=t.settings.cmd)&&t.active(e.queryCommandState(i))})},onclick:function(){this.settings.format&&d(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}(),f({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:s(n),onclick:function(){d(n)}})}),f({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),f({blockquote:["Blockquote","mceBlockQuote"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:s(n)})});var v=function(e){var t=e;return t.length>0&&"-"===t[0].text&&(t=t.slice(1)),t.length>0&&"-"===t[t.length-1].text&&(t=t.slice(0,t.length-1)),t},y=function(t){var n,r;if("string"==typeof t)r=t.split(" ");else if(i.isArray(t))return m(i.map(t,y));return n=i.grep(r,function(t){return"|"===t||t in e.menuItems}),i.map(n,function(t){return"|"===t?{text:"-"}:e.menuItems[t]})},b=function(t){var n=[{text:"-"}],r=i.grep(e.menuItems,function(e){return e.context===t});return i.each(r,function(e){"before"==e.separator&&n.push({text:"|"}),e.prependToContext?n.unshift(e):n.push(e),"after"==e.separator&&n.push({text:"|"})}),n},C=function(e){return v(e.insert_button_items?y(e.insert_button_items):b("insert"))};e.addButton("undo",{tooltip:"Undo",onPostRender:c("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:c("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:c("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:c("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:u,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),e.addButton("insert",{type:"menubutton",icon:"insert",menu:[],oncreatemenu:function(){this.menu.add(C(e.settings)),this.menu.renderNew()}}),f({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline","Meta+U"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:g,onShowMenu:function(){e.settings.style_formats_autohide&&h(this.menu)}}),e.addButton("formatselect",function(){var n=[],i=a(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return f(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:d,onPostRender:t(n)}}),e.addButton("fontselect",function(){var t=[],n=a(e.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return f(n,function(e){t.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:t,fixedWidth:!0,onPostRender:r(t),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var t=[],n=e.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt";return f(n.split(" "),function(e){var n=e,i=e,r=e.split("=");r.length>1&&(n=r[0],i=r[1]),t.push({text:n,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:t,fixedWidth:!0,onPostRender:o(t),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:g})}var f=i.each,m=function(e){return r.reduce(e,function(e,t){return e.concat(t)},[])};a.on("AddEditor",function(e){var t=e.editor;u(t),d(t),c(t)}),e.translate=function(e){return a.translate(e)},t.tooltips=!s.iOS}),o("tinymce/ui/GridLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t,n,i,r,o,a,s,l,c,u,d,f,m,p,h,g,v,y,b,C,T,S,x,w,E,A,N,P,k,M=[],_=[];t=e.settings,r=e.items().filter(":visible"),o=e.layoutRect(),i=t.columns||Math.ceil(Math.sqrt(r.length)),n=Math.ceil(r.length/i),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,T=t.alignV||t.align,g=e.paddingBox,P="reverseRows"in t?t.reverseRows:e.isRtl(),C&&"string"==typeof C&&(C=[C]),T&&"string"==typeof T&&(T=[T]);for(d=0;d<i;d++)M.push(0);for(f=0;f<n;f++)_.push(0);for(f=0;f<n;f++)for(d=0;d<i&&(u=r[f*i+d]);d++)c=u.layoutRect(),w=c.minW,E=c.minH,M[d]=w>M[d]?w:M[d],_[f]=E>_[f]?E:_[f];for(A=o.innerW-g.left-g.right,S=0,d=0;d<i;d++)S+=M[d]+(d>0?y:0),A-=(d>0?y:0)+M[d];for(N=o.innerH-g.top-g.bottom,x=0,f=0;f<n;f++)x+=_[f]+(f>0?b:0),N-=(f>0?b:0)+_[f];if(S+=g.left+g.right,x+=g.top+g.bottom,l={},l.minW=S+(o.w-o.innerW),l.minH=x+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var B;B="start"==t.packV?0:N>0?Math.floor(N/n):0;var R=0,D=t.flexWidths;if(D)for(d=0;d<D.length;d++)R+=D[d];else R=i;var I=A/R;for(d=0;d<i;d++)M[d]+=D?D[d]*I:I;for(p=g.top,f=0;f<n;f++){for(m=g.left,s=_[f]+B,d=0;d<i&&(k=P?f*i+i-1-d:f*i+d,u=r[k]);d++)h=u.settings,c=u.layoutRect(),a=Math.max(M[d],c.startMinWidth),c.x=m,c.y=p,v=h.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=m+a/2-c.w/2:"right"==v?c.x=m+a-c.w:"stretch"==v&&(c.w=a),v=h.alignV||(T?T[d]||T[0]:null),"center"==v?c.y=p+s/2-c.h/2:"bottom"==v?c.y=p+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),m+=a+y,u.recalc&&u.recalc();p+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var H=e.parent();H&&(H._lastRect=null,H.recalc())}}})}),o("tinymce/ui/Iframe",["tinymce/ui/Widget","tinymce/util/Delay"],function(e,t){return e.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,'<iframe id="'+e._id+'" class="'+e.classes+'" tabindex="-1" src="'+(e.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,n){var i=this,r=this.getEl().contentWindow.document.body;return r?(r.innerHTML=e,n&&n()):t.setTimeout(function(){i.html(e)}),this}})}),o("tinymce/ui/InfoBox",["tinymce/ui/Widget"],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("infobox"),t.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+e.encode(e.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+t+"ico "+t+'i-help"></i></button></div></div>'},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),o("tinymce/ui/Label",["tinymce/ui/Widget","tinymce/ui/DomUtils"],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){t.getSize(e.getEl()).width>n.maxW&&(n.minW=n.maxW,e.classes.add("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e,t,n=this,i=n.settings.forId;return!i&&(t=n.settings.forName)&&(e=n.getRoot().find("#"+t)[0])&&(i=e._id),i?'<label id="'+n._id+'" class="'+n.classes+'"'+(i?' for="'+i+'"':"")+">"+n.encode(n.state.get("text"))+"</label>":'<span id="'+n._id+'" class="'+n.classes+'">'+n.encode(n.state.get("text"))+"</span>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),o("tinymce/ui/Toolbar",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.classes.add("toolbar")},postRender:function(){var e=this;return e.items().each(function(e){e.classes.add("toolbar-item")}),e._super()}})}),o("tinymce/ui/MenuBar",["tinymce/ui/Toolbar"],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),o("tinymce/ui/MenuButton",["tinymce/ui/Button","tinymce/ui/Factory","tinymce/ui/MenuBar"],function(e,t,n){function i(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var r=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(e){var n,i=this;if(i.menu&&i.menu.visible()&&!1!==e)return i.hideMenu();i.menu||(n=i.state.get("menu")||[],n.length?n={type:"menu",items:n}:n.type=n.type||"menu",n.renderTo?i.menu=n.parent(i).show().renderTo():i.menu=t.create(n).parent(i).renderTo(),i.fire("createmenu"),i.menu.reflow(),i.menu.on("cancel",function(e){e.control.parent()===i.menu&&(e.stopPropagation(),i.focus(),i.hideMenu())}),i.menu.on("select",function(){i.focus()}),i.menu.on("show hide",function(e){e.control==i.menu&&i.activeMenu("show"==e.type),i.aria("expanded","show"==e.type)}).fire("show")),i.menu.show(),i.menu.layoutRect({w:i.layoutRect().w}),i.menu.moveRel(i.getEl(),i.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]),i.fire("showmenu")},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e,t=this,i=t._id,r=t.classPrefix,o=t.settings.icon,a=t.state.get("text"),s="";return e=t.settings.image,e?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",a&&(t.classes.add("btn-has-text"),s='<span class="'+r+'txt">'+t.encode(a)+"</span>"),o=t.settings.icon?r+"ico "+r+"i-"+o:"",t.aria("role",t.parent()instanceof n?"menuitem":"button"),'<div id="'+i+'" class="'+t.classes+'" tabindex="-1" aria-labelledby="'+i+'"><button id="'+i+'-open" role="presentation" type="button" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+s+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&i(t.target,e.getEl())&&(e.focus(),e.showMenu(!t.aria),t.aria&&e.menu.items().filter(":visible")[0].focus())}),e.on("mouseenter",function(t){var n,i=t.control,o=e.parent();i&&o&&i instanceof r&&i.parent()==o&&(o.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=i&&(e.menu&&e.menu.visible()&&(n=!0),e.hideMenu())}),n&&(i.focus(),i.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return r}),o("tinymce/ui/MenuItem",["tinymce/ui/Widget","tinymce/ui/Factory","tinymce/Env","tinymce/util/Delay"],function(e,t,n,i){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t,n=this;n._super(e),e=n.settings,n.classes.add("menu-item"),e.menu&&n.classes.add("menu-item-expand"),e.preview&&n.classes.add("menu-item-preview"),t=n.state.get("text"),"-"!==t&&"|"!==t||(n.classes.add("menu-item-sep"),n.aria("role","separator"),n.state.set("text","-")),e.selectable&&(n.aria("role","menuitemcheckbox"),n.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||n.classes.add("menu-item-normal"),n.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&n.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e,n=this,i=n.settings,r=n.parent();if(r.items().each(function(e){e!==n&&e.hideMenu()}),i.menu){e=n.menu,e?e.show():(e=i.menu,e.length?e={type:"menu",items:e}:e.type=e.type||"menu",r.settings.itemDefaults&&(e.itemDefaults=r.settings.itemDefaults),e=n.menu=t.create(e).parent(n).renderTo(),e.reflow(),e.on("cancel",function(t){t.stopPropagation(),n.focus(),e.hide()}),e.on("show hide",function(e){e.control.items&&e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),e.on("hide",function(t){t.control===e&&n.classes.remove("selected")}),e.submenu=!0),e._parentMenu=r,e.classes.add("menu-sub");var o=e.testMoveRel(n.getEl(),n.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);e.moveRel(n.getEl(),o),e.rel=o,o="menu-sub-"+o,e.classes.remove(e._lastRel).add(o),e._lastRel=o,n.classes.add("selected"),n.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){function e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function t(t){var n=a.match||"";return n?t.replace(new RegExp(e(n),"gi"),function(e){return"!mce~match["+e+"]mce~match!"}):t}function i(t){return t.replace(new RegExp(e("!mce~match["),"g"),"<b>").replace(new RegExp(e("]mce~match!"),"g"),"</b>")}var r=this,o=r._id,a=r.settings,s=r.classPrefix,l=r.state.get("text"),c=r.settings.icon,u="",d=a.shortcut,f=r.encode(a.url),m="";return c&&r.parent().classes.add("menu-has-icons"),a.image&&(u=" style=\"background-image: url('"+a.image+"')\""),d&&(d=function(e){var t,i,r={};for(r=n.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)(i=r[e[t].toLowerCase()])&&(e[t]=i);return e.join("+")}(d)),c=s+"ico "+s+"i-"+(r.settings.icon||"none"),m="-"!==l?'<i class="'+c+'"'+u+"></i> ":"",l=i(r.encode(t(l))),f=i(r.encode(t(f))),'<div id="'+o+'" class="'+r.classes+'" tabindex="-1">'+m+("-"!==l?'<span id="'+o+'-text" class="'+s+'text">'+l+"</span>":"")+(d?'<div id="'+o+'-shortcut" class="'+s+'menu-shortcut">'+d+"</div>":"")+(a.menu?'<div class="'+s+'caret"></div>':"")+(f?'<div class="'+s+'menu-item-link">'+f+"</div>":"")+"</div>"},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var r=e.getEl("text");r&&r.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),i.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){var e=this;return e.parent().items().each(function(e){e.classes.remove("selected")}),e.classes.toggle("selected",!0),e},active:function(e){return void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),o("tinymce/ui/Throbber",["tinymce/dom/DomQuery","tinymce/ui/Control","tinymce/util/Delay"],function(e,t,n){return function(i,r){var o,a,s=this,l=t.classPrefix;s.show=function(t,c){function u(){o&&(e(i).append('<div class="'+l+"throbber"+(r?" "+l+"throbber-inline":"")+'"></div>'),c&&c())}return s.hide(),o=!0,t?a=n.setTimeout(u,t):u(),s},s.hide=function(){var e=i.lastChild;return n.clearTimeout(a),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,s}}}),o("tinymce/ui/Menu",["tinymce/ui/FloatPanel","tinymce/ui/MenuItem","tinymce/ui/Throbber","tinymce/util/Tools"],function(e,t,n,i){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var n=e.items,r=n.length;r--;)n[r]=i.extend({},e.itemDefaults,n[r]);t._super(e),t.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},load:function(){function e(){r.throbber&&(r.throbber.hide(),r.throbber=null)}var t,i,r=this;(i=r.settings.itemsFactory)&&(r.throbber||(r.throbber=new n(r.getEl("body"),!0),0===r.items().length?(r.throbber.show(),r.fire("loading")):r.throbber.show(100,function(){r.items().remove(),r.fire("loading")}),r.on("hide close",e)),r.requestTime=t=(new Date).getTime(),r.settings.itemsFactory(function(n){if(0===n.length)return void r.hide();r.requestTime===t&&(r.getEl().style.width="",r.getEl("body").style.width="",e(),r.items().remove(),r.getEl("body").innerHTML="",r.add(n),r.renderNew(),r.fire("loaded"))}))},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;if(n.icon||n.image||n.selectable)return e._hasIcons=!0,!1}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e._super()}})}),o("tinymce/ui/ListBox",["tinymce/ui/MenuButton","tinymce/ui/Menu"],function(e,t){return e.extend({init:function(e){function t(n){for(var o=0;o<n.length;o++){if(i=n[o].selected||e.value===n[o].value)return r=r||n[o].text,a.state.set("value",n[o].value),!0;if(n[o].menu&&t(n[o].menu))return!0}}var n,i,r,o,a=this;a._super(e),e=a.settings,a._values=n=e.values,n&&(void 0!==e.value&&t(n),!i&&n.length>0&&(r=n[0].text,a.state.set("value",n[0].value)),a.state.set("menu",n)),a.state.set("text",e.text||r),a.classes.add("listbox"),a.on("select",function(t){var n=t.control;o&&(t.lastControl=o),e.multiple?n.active(!n.active()):a.value(t.control.value()),o=n})},bindStates:function(){function e(e,n){e instanceof t&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}function n(e,t){var i;if(e)for(var r=0;r<e.length;r++){if(e[r].value===t)return e[r];if(e[r].menu&&(i=n(e[r].menu,t)))return i}}var i=this;return i.on("show",function(t){e(t.control,i.value())}),i.state.on("change:value",function(e){var t=n(i.state.get("menu"),e.value);t?i.text(t.text):i.text(i.settings.text)}),i._super()}})}),o("tinymce/ui/Radio",["tinymce/ui/Checkbox"],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),o("tinymce/ui/ResizeHandle",["tinymce/ui/Widget","tinymce/ui/DragHelper"],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.classes.add("resizehandle"),"both"==e.settings.direction&&e.classes.add("resizehandle-both"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),o("tinymce/ui/SelectBox",["tinymce/ui/Widget"],function(e){function t(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e,n=this,i="";return e=t(n._options),n.size&&(i=' size = "'+n.size+'"'),'<select id="'+n._id+'" class="'+n.classes+'"'+i+">"+e+"</select>"},bindStates:function(){var e=this;return e.state.on("change:options",function(n){e.getEl().innerHTML=t(n.value)}),e._super()}})}),o("tinymce/ui/Slider",["tinymce/ui/Widget","tinymce/ui/DragHelper","tinymce/ui/DomUtils"],function(e,t,n){function i(e,t,n){return e<t&&(e=t),e>n&&(e=n),e}function r(e,t,n){e.setAttribute("aria-"+t,n)}function o(e,t){var i,o,a,s,l,c;"v"==e.settings.orientation?(s="top",a="height",o="h"):(s="left",a="width",o="w"),c=e.getEl("handle"),i=(e.layoutRect()[o]||100)-n.getSize(c)[a],l=i*((t-e._minValue)/(e._maxValue-e._minValue))+"px",c.style[s]=l,c.style.height=e.layoutRect().h+"px",r(c,"valuenow",t),r(c,"valuetext",""+e.settings.previewFilter(t)),r(c,"valuemin",e._minValue),r(c,"valuemax",e._maxValue)}return e.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"==e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes+'"><div id="'+t+'-handle" class="'+n+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function e(e,t,n){return(n+e)/(t-e)}function r(e,t,n){return n*(t-e)-e}var o,a,s,l,c,u,d=this;o=d._minValue,a=d._maxValue,"v"==d.settings.orientation?(s="screenY",l="top",c="height",u="h"):(s="screenX",l="left",c="width",u="w"),d._super(),function(t,n){function o(o){var a;a=d.value(),a=r(t,n,e(t,n,a)+.05*o),a=i(a,t,n),d.value(a),d.fire("dragstart",{value:a}),d.fire("drag",{value:a}),d.fire("dragend",{value:a})}d.on("keydown",function(e){switch(e.keyCode){case 37:case 38:o(-1);break;case 39:case 40:o(1)}})}(o,a,d.getEl("handle")),function(e,r,o){var a,f,m,p,h;d._dragHelper=new t(d._id,{handle:d._id+"-handle",start:function(e){a=e[s],f=parseInt(d.getEl("handle").style[l],10),m=(d.layoutRect()[u]||100)-n.getSize(o)[c],d.fire("dragstart",{value:h})},drag:function(t){var n=t[s]-a;p=i(f+n,0,m),o.style[l]=p+"px",h=e+p/m*(r-e),d.value(h),d.tooltip().text(""+d.settings.previewFilter(h)).show().moveRel(o,"bc tc"),d.fire("drag",{value:h})},stop:function(){d.tooltip().hide(),d.fire("dragend",{value:h})}})}(o,a,d.getEl("handle"))},repaint:function(){this._super(),o(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){o(e,t.value)}),e._super()}})}),o("tinymce/ui/Spacer",["tinymce/ui/Widget"],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("spacer"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"></div>'}})}),o("tinymce/ui/SplitButton",["tinymce/ui/MenuButton","tinymce/ui/DomUtils","tinymce/dom/DomQuery"],function(e,t,n){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,i,r=this,o=r.getEl(),a=r.layoutRect();return r._super(),e=o.firstChild,i=o.lastChild,n(e).css({width:a.w-t.getSize(i).width,height:a.h-2}),n(i).css({height:a.h-2}),r},activeMenu:function(e){var t=this;n(t.getEl().lastChild).toggleClass(t.classPrefix+"active",e)},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r=t.state.get("icon"),o=t.state.get("text"),a="";return e=t.settings.image,e?(r="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",r=t.settings.icon?i+"ico "+i+"i-"+r:"",o&&(t.classes.add("btn-has-text"),a='<span class="'+i+'txt">'+t.encode(o)+"</span>"),'<div id="'+n+'" class="'+t.classes+'" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(r?'<i class="'+r+'"'+e+"></i>":"")+a+'</button><button type="button" class="'+i+'open" hidefocus="1" tabindex="-1">'+(t._menuBtnText?(r?" ":"")+t._menuBtnText:"")+' <i class="'+i+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void(t&&t.call(this,e));n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),o("tinymce/ui/StackLayout",["tinymce/ui/FlowLayout"],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),o("tinymce/ui/TabPanel",["tinymce/ui/Panel","tinymce/dom/DomQuery","tinymce/ui/DomUtils"],function(e,t,n){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t(n).removeClass(this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t(n).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",i=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,r){var o=e._id+"-t"+r;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='<div id="'+o+'" class="'+i+'tab" unselectable="on" role="tab" aria-controls="'+t._id+'" aria-selected="false" tabIndex="-1">'+e.encode(t.settings.title)+"</div>"}),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1"><div id="'+e._id+'-head" class="'+i+'tabs" role="tablist">'+n+'</div><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(n&&n.id==e._id+"-head")for(var i=n.childNodes.length;i--;)n.childNodes[i]==t.target&&e.activateTab(i)})},initLayoutRect:function(){var e,t,i,r=this;t=n.getSize(r.getEl("head")).width,t=t<0?0:t,i=0,r.items().each(function(e){t=Math.max(t,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),r.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=i,e.layoutRect({x:0,y:0,w:t,h:i})});var o=n.getSize(r.getEl("head")).height;return r.settings.minWidth=t,r.settings.minHeight=i+o,e=r._super(),e.deltaH+=o,e.innerH=e.h-e.deltaH,e}})}),o("tinymce/ui/TextBox",["tinymce/ui/Widget","tinymce/util/Tools","tinymce/ui/DomUtils"],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,i,r,o=this,a=0;e=o.getEl().style,t=o._layoutRect,r=o._lastRepaintRect||{};var s=document;return!o.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(e.lineHeight=t.h-a+"px"),n=o.borderBox,i=n.left+n.right+8,a=n.top+n.bottom+(o.settings.multiline?8:0),t.x!==r.x&&(e.left=t.x+"px",r.x=t.x),t.y!==r.y&&(e.top=t.y+"px",r.y=t.y),t.w!==r.w&&(e.width=t.w-i+"px",r.w=t.w),t.h!==r.h&&(e.height=t.h-a+"px",r.h=t.h),o._lastRepaintRect=r,o.fire("repaint",{},!1),o},renderHtml:function(){var e,i,r=this,o=r.settings;return e={id:r._id,hidefocus:"1"},t.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(t){e[t]=o[t]}),r.disabled()&&(e.disabled="disabled"),o.subtype&&(e.type=o.subtype),i=n.create(o.multiline?"textarea":"input",e),i.value=r.state.get("value"),i.className=r.classes,i.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!=t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}})}),o("tinymce/Register",[],function(){var t=this||window,n=function(){return t.tinymce};return"function"==typeof t.define&&(t.define.amd||t.define("ephox/tinymce",[],n)),e.exports=window.tinymce,{}}),function(e){var t,r,o,a,l;for(t=0;t<e.length;t++){r=n,o=e[t],a=o.split(/[.\/]/);for(var c=0;c<a.length-1;++c)r[a[c]]===i&&(r[a[c]]={}),r=r[a[c]];r[a[a.length-1]]=s[o]}if(n.AMDLC_TESTS){l=n.privateModules||{};for(o in s)l[o]=s[o];for(t=0;t<e.length;t++)delete l[e[t]];n.privateModules=l}}(["tinymce/geom/Rect","tinymce/util/Promise","tinymce/util/Delay","tinymce/Env","tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/util/Tools","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/TreeWalker","tinymce/html/Entities","tinymce/dom/DOMUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/dom/RangeUtils","tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/html/DomParser","tinymce/html/Writer","tinymce/html/Serializer","tinymce/dom/Serializer","tinymce/util/VK","tinymce/dom/ControlSelection","tinymce/dom/BookmarkManager","tinymce/dom/Selection","tinymce/Formatter","tinymce/UndoManager","tinymce/EditorCommands","tinymce/util/URI","tinymce/util/Class","tinymce/util/EventDispatcher","tinymce/util/Observable","tinymce/ui/Selector","tinymce/ui/Collection","tinymce/ui/ReflowQueue","tinymce/ui/Control","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/ui/Container","tinymce/ui/DragHelper","tinymce/ui/Scrollable","tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/FloatPanel","tinymce/ui/Window","tinymce/ui/MessageBox","tinymce/WindowManager","tinymce/ui/Tooltip","tinymce/ui/Widget","tinymce/ui/Progress","tinymce/ui/Notification","tinymce/NotificationManager","tinymce/EditorObservable","tinymce/Shortcuts","tinymce/Editor","tinymce/util/I18n","tinymce/FocusManager","tinymce/EditorManager","tinymce/util/XHR","tinymce/util/JSON","tinymce/util/JSONRequest","tinymce/util/JSONP","tinymce/util/LocalStorage","tinymce/Compat","tinymce/ui/Layout","tinymce/ui/AbsoluteLayout","tinymce/ui/Button","tinymce/ui/ButtonGroup","tinymce/ui/Checkbox","tinymce/ui/ComboBox","tinymce/ui/ColorBox","tinymce/ui/PanelButton","tinymce/ui/ColorButton","tinymce/util/Color","tinymce/ui/ColorPicker","tinymce/ui/Path","tinymce/ui/ElementPath","tinymce/ui/FormItem","tinymce/ui/Form","tinymce/ui/FieldSet","tinymce/ui/FilePicker","tinymce/ui/FitLayout","tinymce/ui/FlexLayout","tinymce/ui/FlowLayout","tinymce/ui/FormatControls","tinymce/ui/GridLayout","tinymce/ui/Iframe","tinymce/ui/InfoBox","tinymce/ui/Label","tinymce/ui/Toolbar","tinymce/ui/MenuBar","tinymce/ui/MenuButton","tinymce/ui/MenuItem","tinymce/ui/Throbber","tinymce/ui/Menu","tinymce/ui/ListBox","tinymce/ui/Radio","tinymce/ui/ResizeHandle","tinymce/ui/SelectBox","tinymce/ui/Slider","tinymce/ui/Spacer","tinymce/ui/SplitButton","tinymce/ui/StackLayout","tinymce/ui/TabPanel","tinymce/ui/TextBox"])}(window)}).call(t,n(426).setImmediate)},890:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},895:function(e,t,n){n(428),n(434),e.exports=n(435)}},[895]);