!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i",c=function(a){return b+a},d=function(a){return a.replace(b,"")},e=function(a){return a.indexOf(b)!==-1};return{mark:c,unmark:d,isMarked:e,internalHtmlMime:function(){return a}}}),g("j",["6"],function(a){return a("tinymce.html.Entities")}),g("d",["a","j"],function(a,b){var c=function(a){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(a)},d=function(a){return a.replace(/\r?\n/g,"
")},e=function(a,c){var d,e=[],f="<"+a;if("object"==typeof c){for(d in c)c.hasOwnProperty(d)&&e.push(d+'="'+b.encodeAllRaw(c[d])+'"');e.length&&(f+=" "+e.join(" "))}return f+">"},f=function(b,c,d){var f=b.split(/\n\n/),g=e(c,d),h="",i=a.map(f,function(a){return a.split(/\n/).join("
")}),j=function(a){return g+a+h};return 1===i.length?i[0]:a.map(i,j).join("")},g=function(a,b,c){return b?f(a,b,c):d(a)};return{isPlainText:c,convert:g,toBRs:d,toBlockElements:f}}),g("e",["a","8"],function(a,b){return function(c){var d,e="%MCEPASTEBIN%",f=function(){function a(a){var b,c,e,f=a.startContainer;if(b=a.getClientRects(),b.length)return b[0];if(a.collapsed&&1==f.nodeType){for(e=f.childNodes[d.startOffset];e&&3==e.nodeType&&!e.data.length;)e=e.nextSibling;if(e)return"BR"==e.tagName&&(c=h.doc.createTextNode("\ufeff"),e.parentNode.insertBefore(c,e),a=h.createRng(),a.setStartBefore(c),a.setEndAfter(c),b=a.getClientRects(),h.remove(c)),b.length?b[0]:void 0}}var f,g,h=c.dom,i=c.getBody(),j=c.dom.getViewPort(c.getWin()),k=j.y,l=20;if(d=c.selection.getRng(),c.inline&&(g=c.selection.getScrollContainer(),g&&g.scrollTop>0&&(k=g.scrollTop)),d.getClientRects){var m=a(d);if(m)l=k+(m.top-h.getPos(i).y);else{l=k;var n=d.startContainer;n&&(3==n.nodeType&&n.parentNode!=i&&(n=n.parentNode),1==n.nodeType&&(l=h.getPos(n,g||i).y))}}f=c.dom.add(c.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+l+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"},e),(b.ie||b.gecko)&&h.setStyle(f,"left","rtl"==h.getStyle(i,"direction",!0)?65535:-65535),h.bind(f,"beforedeactivate focusin focusout",function(a){a.stopPropagation()}),f.focus(),c.selection.select(f,!0)},g=function(){if(h()){for(var a;a=c.dom.get("mcepastebin");)c.dom.remove(a),c.dom.unbind(a);d&&c.selection.setRng(d)}d=null},h=function(){return c.dom.get("mcepastebin")},i=function(){var b,d,e,f,g,h=function(a,b){a.appendChild(b),c.dom.remove(b,!0)};for(d=a.grep(c.getBody().childNodes,function(a){return"mcepastebin"===a.id}),b=d.shift(),a.each(d,function(a){h(b,a)}),f=c.dom.select("div[id=mcepastebin]",b),e=f.length-1;e>=0;e--)g=c.dom.create("div"),b.insertBefore(g,f[e]),h(g,f[e]);return b?b.innerHTML:""},j=function(){return d},k=function(a){return a===e},l=function(a){return a&&"mcepastebin"===a.id},m=function(){var a=h();return l(a)&&k(a.innerHTML)};return{create:f,remove:g,getEl:h,getHtml:i,getLastRng:j,isDefault:m,isDefaultContent:k}}}),g("k",["6"],function(a){return a("tinymce.html.DomParser")}),g("l",["6"],function(a){return a("tinymce.html.Schema")}),g("m",["6"],function(a){return a("tinymce.html.Serializer")}),g("n",["6"],function(a){return a("tinymce.html.Node")}),g("h",["a","k","l"],function(a,b,c){function d(b,c){return a.each(c,function(a){b=a.constructor==RegExp?b.replace(a,""):b.replace(a[0],a[1])}),b}function e(e){function f(a){var b=a.name,c=a;if("br"===b)return void(i+="\n");if(j[b]&&(i+=" "),k[b])return void(i+=" ");if(3==a.type&&(i+=a.value),!a.shortEnded&&(a=a.firstChild))do f(a);while(a=a.next);l[b]&&c.next&&(i+="\n","p"==b&&(i+="\n"))}var g=new c,h=new b({},g),i="",j=g.getShortEndedElements(),k=a.makeMap("script noscript style textarea video audio iframe object"," "),l=g.getBlockElements();return e=d(e,[//g]),f(h.parse(e)),i}function f(a){function b(a,b,c){return b||c?"\xa0":" "}return a=d(a,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/|/g,[/( ?)\u00a0<\/span>( ?)/g,b],/
/g,/
$/i])}function g(a){var b=0;return function(){return a+b++}}var h=function(){return navigator.userAgent.indexOf(" Edge/")!==-1};return{filter:d,innerText:e,trimHtml:f,createIdGenerator:g,isMsEdge:h}}),g("i",["a","k","l","m","n","h"],function(a,b,c,d,e,f){function g(a){return/1&&g.attr("start",""+f),a.wrap(g)),a.name="li",h>k&&j&&j.lastChild.append(g),k=h,d(a),c(a,/^\u00a0+/),c(a,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),c(a,/^\u00a0+/)}for(var g,j,k=1,l=[],m=a.firstChild;"undefined"!=typeof m&&null!==m;)if(l.push(m),m=m.walk(),null!==m)for(;"undefined"!=typeof m&&m.parent!==a;)m=m.walk();for(var n=0;n/gi,/]+id="?docs-internal-[^>]*>/gi,//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(a,b){return b.length>0?b.replace(/./," ").slice(Math.floor(b.length/2)).split("").join("\xa0"):""}]]);var l=e.settings.paste_word_valid_elements;l||(l="-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 m=new c({valid_elements:l,valid_children:"-li[p]"});a.each(m.elements,function(a){a.attributes["class"]||(a.attributes["class"]={},a.attributesOrder.push("class")),a.attributes.style||(a.attributes.style={},a.attributesOrder.push("style"))});var n=new b({},m);n.addAttributeFilter("style",function(a){for(var b,c=a.length;c--;)b=a[c],b.attr("style",k(e,i,b,b.attr("style"))),"span"==b.name&&b.parent&&!b.attributes.length&&b.unwrap()}),n.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)b=a[d],c=b.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(c)&&b.remove(),b.attr("class",null)}),n.addNodeFilter("del",function(a){for(var b=a.length;b--;)a[b].remove()}),n.addNodeFilter("a",function(a){for(var b,c,d,e=a.length;e--;)if(b=a[e],c=b.attr("href"),d=b.attr("name"),c&&c.indexOf("#_msocom_")!=-1)b.remove();else if(c&&0===c.indexOf("file://")&&(c=c.split("#")[1],c&&(c="#"+c)),c||d){if(d&&!/^_?(?:toc|edn|ftn)/i.test(d)){b.unwrap();continue}b.attr({href:c,name:d})}else b.unwrap()});var o=n.parse(g);return e.settings.paste_convert_word_fake_lists!==!1&&j(o),g=new d({validate:e.settings.validate},m).serialize(o)},m=function(a,b){return a.settings.paste_enable_default_filters===!1?b:l(a,b)};return{preProcess:m,isWordContent:g}}),g("f",["2","i"],function(a,b){var c=function(a,b){return{content:a,cancelled:b}},d=function(b,d,e,f){var g=b.dom.create("div",{style:"display:none"},d),h=a.firePastePostProcess(b,g,e,f);return c(h.node.innerHTML,h.isDefaultPrevented())},e=function(b,e,f,g){var h=a.firePastePreProcess(b,e,f,g);return b.hasEventListeners("PastePostProcess")&&!h.isDefaultPrevented()?d(b,h.content,f,g):c(h.content,h.isDefaultPrevented())},f=function(a,c,d){var f=b.isWordContent(c),g=f?b.preProcess(a,c):c;return e(a,g,d,f)};return{process:f}}),g("g",["a"],function(a){var b=function(a){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(a)},c=function(a){return b(a)&&/.(gif|jpe?g|png)$/.test(a)},d=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.insertContent('')}),!0},e=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.execCommand("mceInsertLink",!1,b)}),!0},f=function(a,c,d){return!(a.selection.isCollapsed()!==!1||!b(c))&&e(a,c,d)},g=function(a,b,e){return!!c(b)&&d(a,b,e)},h=function(a,b){return a.insertContent(b,{merge:a.settings.paste_merge_formats!==!1,paste:!0}),!0},i=function(b,c){a.each([f,g,h],function(a){return a(b,c,h)!==!0})},j=function(a,b){a.settings.smart_paste===!1?h(a,b):i(a,b)};return{isImageUrl:c,isAbsoluteUrl:b,insertContent:j}}),g("3",["7","8","9","a","b","c","d","e","f","g","h"],function(a,b,c,d,e,f,g,h,i,j,k){return function(l){function m(a,b){var c=b?b:f.isMarked(a),d=i.process(l,f.unmark(a),c);d.cancelled===!1&&j.insertContent(l,d.content)}function n(a){a=l.dom.encode(a).replace(/\r\n/g,"\n"),a=g.convert(a,l.settings.forced_root_block,l.settings.forced_root_block_attrs),m(a,!1)}function o(a){var b={};if(a){if(a.getData){var c=a.getData("Text");c&&c.length>0&&c.indexOf(G)==-1&&(b["text/plain"]=c)}if(a.types)for(var d=0;d',!1)}else m('',!1)}function v(a,b){function c(c){var d,e,f,g=!1;if(c)for(d=0;d0}function z(a){return e.metaKeyPressed(a)&&86==a.keyCode||a.shiftKey&&45==a.keyCode}function A(){function a(a,b,c,d){var e,h;return y(a,"text/html")?e=a["text/html"]:(e=F.getHtml(),d=d?d:f.isMarked(e),F.isDefaultContent(e)&&(c=!0)),e=k.trimHtml(e),F.remove(),h=d===!1&&g.isPlainText(e),e.length&&!h||(c=!0),c&&(e=y(a,"text/plain")&&h?a["text/plain"]:k.innerText(e)),F.isDefaultContent(e)?void(b||l.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(c?n(e):m(e,d))}function d(a){var b=a["text/plain"];return!!b&&0===b.indexOf("file://")}l.on("keydown",function(a){function c(a){z(a)&&!a.isDefaultPrevented()&&F.remove()}if(z(a)&&!a.isDefaultPrevented()){if(B=a.shiftKey&&86==a.keyCode,B&&b.webkit&&navigator.userAgent.indexOf("Version/")!=-1)return;if(a.stopImmediatePropagation(),D=(new Date).getTime(),b.ie&&B)return a.preventDefault(),void l.fire("paste",{ieFake:!0});F.remove(),F.create(),l.once("keyup",c),l.once("paste",function(){l.off("keyup",c)})}});var e=function(){return F.getLastRng()||l.selection.getRng()};l.on("paste",function(d){var g=(new Date).getTime(),h=p(d),i=(new Date).getTime()-g,j=(new Date).getTime()-D-i<1e3,k="text"==C.pasteFormat||B,m=y(h,f.internalHtmlMime());return B=!1,d.isDefaultPrevented()||w(d)?void F.remove():!q(h)&&v(d,e())?void F.remove():(j||d.preventDefault(),!b.ie||j&&!d.ieFake||y(h,"text/html")||(F.create(),l.dom.bind(F.getEl(),"paste",function(a){a.stopPropagation()}),l.getDoc().execCommand("Paste",!1,null),h["text/html"]=F.getHtml()),void(y(h,"text/html")?(d.preventDefault(),m||(m=f.isMarked(h["text/html"])),a(h,j,k,m)):c.setEditorTimeout(l,function(){a(h,j,k,m)},0)))}),l.on("dragstart dragend",function(a){E="dragstart"==a.type}),l.on("drop",function(a){var b,e;if(e=x(a),!a.isDefaultPrevented()&&!E){b=o(a.dataTransfer);var g=y(b,f.internalHtmlMime());if((q(b)&&!d(b)||!v(a,e))&&e&&l.settings.paste_filter_drop!==!1){var h=b["mce-internal"]||b["text/html"]||b["text/plain"];h&&(a.preventDefault(),c.setEditorTimeout(l,function(){l.undoManager.transact(function(){b["mce-internal"]&&l.execCommand("Delete"),l.selection.setRng(e),h=k.trimHtml(h),b["text/html"]?m(h,g):n(h)})}))}}}),l.on("dragover dragend",function(a){l.settings.paste_data_images&&a.preventDefault()})}var B,C=this,D=0,E=!1,F=new h(l),G="data:text/mce-internal,",H=k.createIdGenerator("mceclip");C.pasteHtml=m,C.pasteText=n,C.pasteImageData=v,l.on("preInit",function(){A(),l.parser.addNodeFilter("img",function(a,c,d){function e(a){return a.data&&a.data.paste===!0}function f(a){a.attr("data-mce-object")||j===b.transparentSrc||a.remove()}function g(a){return 0===a.indexOf("webkit-fake-url")}function h(a){return 0===a.indexOf("data:")}if(!l.settings.paste_data_images&&e(d))for(var i=a.length;i--;){var j=a[i].attributes.map.src;j&&(g(j)?f(a[i]):!l.settings.allow_html_data_urls&&h(j)&&f(a[i]))}})})}}),g("4",["8","c","h"],function(a,b,c){var d=function(){},e=function(b){return a.iOS===!1&&void 0!==b&&"function"==typeof b.setData&&c.isMsEdge()!==!0},f=function(a,c,d){if(!e(a))return!1;try{return a.clearData(),a.setData("text/html",c),a.setData("text/plain",d),a.setData(b.internalHtmlMime(),c),!0}catch(a){return!1}},g=function(a,b,c,d){f(a.clipboardData,b.html,b.text)?(a.preventDefault(),d()):c(b.html,d)},h=function(a){return function(c,d){var e=b.mark(c),f=a.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),g=a.dom.create("div",{contenteditable:"true"},e);a.dom.setStyles(f,{position:"fixed",left:"-3000px",width:"1000px",overflow:"hidden"}),f.appendChild(g),a.dom.add(a.getBody(),f);var h=a.selection.getRng();g.focus();var i=a.dom.createRng();i.selectNodeContents(g),a.selection.setRng(i),setTimeout(function(){f.parentNode.removeChild(f),a.selection.setRng(h),d()},0)}},i=function(a){return{html:a.selection.getContent({contextual:!0}),text:a.selection.getContent({format:"text"})}},j=function(a){return function(b){a.selection.isCollapsed()===!1&&g(b,i(a),h(a),function(){setTimeout(function(){a.execCommand("Delete")},0)})}},k=function(a){return function(b){a.selection.isCollapsed()===!1&&g(b,i(a),h(a),d)}},l=function(a){a.on("cut",j(a)),a.on("copy",k(a))};return{register:l}}),g("5",["8","a","i","h"],function(a,b,c,d){function e(a,b){a.on("PastePreProcess",function(c){c.content=b(a,c.content,c.internal,c.wordContent)})}function f(a,b){a.on("PastePostProcess",function(c){b(a,c.node)})}function g(a,e){if(!c.isWordContent(e))return e;var f=[];b.each(a.schema.getBlockElements(),function(a,b){f.push(b)});var g=new RegExp("(?:
 [\\s\\r\\n]+|
)*(<\\/?("+f.join("|")+")[^>]*>)(?:
 [\\s\\r\\n]+|
)*","g");return e=d.filter(e,[[g,"$1"]]),e=d.filter(e,[[/

/g,"

"],[/
/g," "],[/

/g,"
"]])}function h(a,b,c,d){if(d||c)return b;var e=a.settings.paste_webkit_styles;if(a.settings.paste_remove_styles_if_webkit===!1||"all"==e)return b;if(e&&(e=e.split(/[, ]/)),e){var f=a.dom,g=a.selection.getNode();b=b.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(a,b,c,d){var h=f.parseStyle(f.decode(c),"span"),i={};if("none"===e)return b+d;for(var j=0;j]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return b=b.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(a,b,c,d){return b+' style="'+c+'"'+d})}function i(a,b){a.$("a",b).find("font,u").each(function(b,c){a.dom.remove(c,!0)})}var j=function(b){a.webkit&&e(b,h),a.ie&&(e(b,g),f(b,i))};return{setup:j}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){var f;return a.add("paste",function(g){function h(){return f||g.settings.paste_plaintext_inform===!1}function i(){if("text"==k.pasteFormat)k.pasteFormat="html",b.firePastePlainTextToggle(g,!1);else if(k.pasteFormat="text",b.firePastePlainTextToggle(g,!0),!h()){var a=g.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");g.notificationManager.open({text:a,type:"info"}),f=!0}g.focus()}function j(){var a=this;a.active("text"===k.pasteFormat),g.on("PastePlainTextToggle",function(b){a.active(b.state)})}var k,l=this,m=g.settings;return/(^|[ ,])powerpaste([, ]|$)/.test(m.plugins)&&a.get("powerpaste")?void("undefined"!=typeof console&&console.log&&console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option.")):(l.clipboard=k=new c(g),l.quirks=e.setup(g),g.settings.paste_as_text&&(l.clipboard.pasteFormat="text"),m.paste_preprocess&&g.on("PastePreProcess",function(a){m.paste_preprocess.call(l,l,a)}),m.paste_postprocess&&g.on("PastePostProcess",function(a){m.paste_postprocess.call(l,l,a)}),g.addCommand("mceInsertClipboardContent",function(a,b){b.content&&l.clipboard.pasteHtml(b.content,b.internal),b.text&&l.clipboard.pasteText(b.text)}),g.settings.paste_block_drop&&g.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),g.settings.paste_data_images||g.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),g.addCommand("mceTogglePlainTextPaste",i),g.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:i,onPostRender:j}),g.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:k.pasteFormat,onclick:i,onPostRender:j}),void d.register(g))}),function(){}}),d("0")()}();