wysiwyg-rails 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/froala_editor.min.js +7 -7
- data/app/assets/javascripts/froala_editor.pkgd.min.js +21 -0
- data/app/assets/javascripts/languages/ar.js +1 -1
- data/app/assets/javascripts/languages/bs.js +1 -1
- data/app/assets/javascripts/languages/cs.js +1 -1
- data/app/assets/javascripts/languages/da.js +1 -1
- data/app/assets/javascripts/languages/de.js +1 -1
- data/app/assets/javascripts/languages/en_ca.js +1 -1
- data/app/assets/javascripts/languages/en_gb.js +1 -1
- data/app/assets/javascripts/languages/es.js +1 -1
- data/app/assets/javascripts/languages/et.js +1 -1
- data/app/assets/javascripts/languages/fa.js +1 -1
- data/app/assets/javascripts/languages/fi.js +1 -1
- data/app/assets/javascripts/languages/fr.js +1 -1
- data/app/assets/javascripts/languages/he.js +1 -1
- data/app/assets/javascripts/languages/hr.js +1 -1
- data/app/assets/javascripts/languages/hu.js +1 -1
- data/app/assets/javascripts/languages/id.js +1 -1
- data/app/assets/javascripts/languages/it.js +1 -1
- data/app/assets/javascripts/languages/ja.js +1 -1
- data/app/assets/javascripts/languages/ko.js +1 -1
- data/app/assets/javascripts/languages/me.js +1 -1
- data/app/assets/javascripts/languages/nb.js +1 -1
- data/app/assets/javascripts/languages/nl.js +1 -1
- data/app/assets/javascripts/languages/pl.js +1 -1
- data/app/assets/javascripts/languages/pt_br.js +1 -1
- data/app/assets/javascripts/languages/pt_pt.js +1 -1
- data/app/assets/javascripts/languages/ro.js +1 -1
- data/app/assets/javascripts/languages/ru.js +1 -1
- data/app/assets/javascripts/languages/sk.js +1 -1
- data/app/assets/javascripts/languages/sr.js +1 -1
- data/app/assets/javascripts/languages/sv.js +1 -1
- data/app/assets/javascripts/languages/th.js +1 -1
- data/app/assets/javascripts/languages/tr.js +1 -1
- data/app/assets/javascripts/languages/ua.js +1 -1
- data/app/assets/javascripts/languages/vi.js +1 -1
- data/app/assets/javascripts/languages/zh_cn.js +1 -1
- data/app/assets/javascripts/languages/zh_tw.js +1 -1
- data/app/assets/javascripts/plugins/align.min.js +1 -1
- data/app/assets/javascripts/plugins/char_counter.min.js +1 -1
- data/app/assets/javascripts/plugins/code_beautifier.min.js +1 -1
- data/app/assets/javascripts/plugins/code_view.min.js +1 -1
- data/app/assets/javascripts/plugins/colors.min.js +1 -1
- data/app/assets/javascripts/plugins/draggable.min.js +1 -1
- data/app/assets/javascripts/plugins/emoticons.min.js +1 -1
- data/app/assets/javascripts/plugins/entities.min.js +1 -1
- data/app/assets/javascripts/plugins/file.min.js +2 -2
- data/app/assets/javascripts/plugins/font_family.min.js +1 -1
- data/app/assets/javascripts/plugins/font_size.min.js +1 -1
- data/app/assets/javascripts/plugins/forms.min.js +2 -2
- data/app/assets/javascripts/plugins/fullscreen.min.js +1 -1
- data/app/assets/javascripts/plugins/help.min.js +1 -1
- data/app/assets/javascripts/plugins/image.min.js +3 -3
- data/app/assets/javascripts/plugins/image_manager.min.js +1 -1
- data/app/assets/javascripts/plugins/inline_style.min.js +1 -1
- data/app/assets/javascripts/plugins/line_breaker.min.js +1 -1
- data/app/assets/javascripts/plugins/link.min.js +1 -1
- data/app/assets/javascripts/plugins/lists.min.js +1 -1
- data/app/assets/javascripts/plugins/paragraph_format.min.js +1 -1
- data/app/assets/javascripts/plugins/paragraph_style.min.js +1 -1
- data/app/assets/javascripts/plugins/print.min.js +1 -1
- data/app/assets/javascripts/plugins/quick_insert.min.js +1 -1
- data/app/assets/javascripts/plugins/quote.min.js +1 -1
- data/app/assets/javascripts/plugins/save.min.js +1 -1
- data/app/assets/javascripts/plugins/special_characters.min.js +1 -1
- data/app/assets/javascripts/plugins/table.min.js +1 -1
- data/app/assets/javascripts/plugins/url.min.js +2 -2
- data/app/assets/javascripts/plugins/video.min.js +3 -3
- data/app/assets/javascripts/plugins/word_paste.min.js +2 -2
- data/app/assets/stylesheets/froala_editor.css +1190 -0
- data/app/assets/stylesheets/froala_editor.min.css +2 -2
- data/app/assets/stylesheets/froala_editor.pkgd.css +2767 -0
- data/app/assets/stylesheets/froala_editor.pkgd.min.css +7 -0
- data/app/assets/stylesheets/froala_style.css +300 -0
- data/app/assets/stylesheets/froala_style.min.css +1 -1
- data/app/assets/stylesheets/plugins/char_counter.css +57 -0
- data/app/assets/stylesheets/plugins/char_counter.min.css +1 -1
- data/app/assets/stylesheets/plugins/code_view.css +112 -0
- data/app/assets/stylesheets/plugins/code_view.min.css +1 -1
- data/app/assets/stylesheets/plugins/colors.css +124 -0
- data/app/assets/stylesheets/plugins/colors.min.css +1 -1
- data/app/assets/stylesheets/plugins/draggable.css +43 -0
- data/app/assets/stylesheets/plugins/draggable.min.css +1 -1
- data/app/assets/stylesheets/plugins/emoticons.css +42 -0
- data/app/assets/stylesheets/plugins/emoticons.min.css +1 -1
- data/app/assets/stylesheets/plugins/file.css +146 -0
- data/app/assets/stylesheets/plugins/file.min.css +1 -1
- data/app/assets/stylesheets/plugins/fullscreen.css +28 -0
- data/app/assets/stylesheets/plugins/fullscreen.min.css +1 -1
- data/app/assets/stylesheets/plugins/help.css +52 -0
- data/app/assets/stylesheets/plugins/help.min.css +1 -1
- data/app/assets/stylesheets/plugins/image.css +244 -0
- data/app/assets/stylesheets/plugins/image.min.css +1 -1
- data/app/assets/stylesheets/plugins/image_manager.css +264 -0
- data/app/assets/stylesheets/plugins/image_manager.min.css +1 -1
- data/app/assets/stylesheets/plugins/line_breaker.css +37 -0
- data/app/assets/stylesheets/plugins/line_breaker.min.css +1 -1
- data/app/assets/stylesheets/plugins/quick_insert.css +70 -0
- data/app/assets/stylesheets/plugins/quick_insert.min.css +1 -1
- data/app/assets/stylesheets/plugins/special_characters.css +51 -0
- data/app/assets/stylesheets/plugins/special_characters.min.css +1 -1
- data/app/assets/stylesheets/plugins/table.css +151 -0
- data/app/assets/stylesheets/plugins/table.min.css +1 -1
- data/app/assets/stylesheets/plugins/video.css +231 -0
- data/app/assets/stylesheets/plugins/video.min.css +1 -1
- data/app/assets/stylesheets/themes/dark.css +1161 -0
- data/app/assets/stylesheets/themes/dark.min.css +1 -1
- data/app/assets/stylesheets/themes/gray.css +1161 -0
- data/app/assets/stylesheets/themes/gray.min.css +1 -1
- data/app/assets/stylesheets/themes/red.css +1161 -0
- data/app/assets/stylesheets/themes/red.min.css +1 -1
- data/app/assets/stylesheets/themes/royal.css +1161 -0
- data/app/assets/stylesheets/themes/royal.min.css +1 -1
- data/lib/wysiwyg-rails/version.rb +1 -1
- metadata +26 -3
- data/app/assets/javascripts/languages/uk.js +0 -216
@@ -1,8 +1,8 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.5.
|
2
|
+
* froala_editor v2.5.1 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2017 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){a.extend(a.FE.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),a.extend(a.FE.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageRemove","|","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUploadURL:"https://i.froala.com/upload",imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","svg+xml"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5}),a.FE.PLUGINS.image=function(b){function c(){var a=b.popups.get("image.insert"),c=a.find(".fr-image-by-url-layer input");c.val(""),xa&&c.val(xa.attr("src")),c.trigger("change")}function d(){var a=b.$tb.find('.fr-command[data-cmd="insertImage"]'),c=b.popups.get("image.insert");if(c||(c=M()),s(),!c.hasClass("fr-active"))if(b.popups.refresh("image.insert"),b.popups.setContainer("image.insert",b.$tb),a.is(":visible")){var d=a.offset().left+a.outerWidth()/2,e=a.offset().top+(b.opts.toolbarBottom?10:a.outerHeight()-10);b.popups.show("image.insert",d,e,a.outerHeight())}else b.position.forSelection(c),b.popups.show("image.insert")}function e(){var a=b.popups.get("image.edit");if(a||(a=q()),a){b.popups.setContainer("image.edit",b.$sc),b.popups.refresh("image.edit");var c=xa.offset().left+xa.outerWidth()/2,d=xa.offset().top+xa.outerHeight();b.popups.show("image.edit",c,d,xa.outerHeight())}}function f(){s()}function g(a){a.hasClass("fr-dii")||a.hasClass("fr-dib")||(a.addClass("fr-fi"+ma(a)[0]),a.addClass("fr-di"+na(a)[0]),a.css("margin",""),a.css("float",""),a.css("display",""),a.css("z-index",""),a.css("position",""),a.css("overflow",""),a.css("vertical-align",""))}function h(a){var b=a.hasClass("fr-dib")?"block":a.hasClass("fr-dii")?"inline":null,c=a.hasClass("fr-fil")?"left":a.hasClass("fr-fir")?"right":ma(a);ka(a,b,c),a.removeClass("fr-dib fr-dii fr-fir fr-fil")}function i(){for(var c="IMG"==b.el.tagName?[b.el]:b.el.querySelectorAll("img"),d=0;d<c.length;d++){var e=a(c[d]);!b.opts.htmlUntouched&&b.opts.useClasses?((b.opts.imageEditButtons.indexOf("imageAlign")>=0||b.opts.imageEditButtons.indexOf("imageDisplay")>=0)&&g(e),b.opts.imageTextNear||e.removeClass("fr-dii").addClass("fr-dib")):b.opts.htmlUntouched||b.opts.useClasses||(b.opts.imageEditButtons.indexOf("imageAlign")>=0||b.opts.imageEditButtons.indexOf("imageDisplay")>=0)&&h(e),b.opts.iframe&&e.on("load",b.size.syncIframe)}}function j(){var c,d=Array.prototype.slice.call(b.el.querySelectorAll("img")),e=[];for(c=0;c<d.length;c++)e.push(d[c].getAttribute("src")),a(d[c]).toggleClass("fr-draggable",b.opts.imageMove),""===d[c].getAttribute("class")&&d[c].removeAttribute("class"),""===d[c].getAttribute("style")&&d[c].removeAttribute("style");if(Ka)for(c=0;c<Ka.length;c++)e.indexOf(Ka[c].getAttribute("src"))<0&&b.events.trigger("image.removed",[a(Ka[c])]);Ka=d}function k(){ya||Z();var a=b.$wp||b.$sc;a.append(ya),ya.data("instance",b);var c=a.scrollTop()-("static"!=a.css("position")?a.offset().top:0),d=a.scrollLeft()-("static"!=a.css("position")?a.offset().left:0);d-=b.helpers.getPX(a.css("border-left-width")),c-=b.helpers.getPX(a.css("border-top-width")),b.$el.is("img")&&(c=0,d=0),ya.css("top",(b.opts.iframe?xa.offset().top:xa.offset().top+c)-1).css("left",(b.opts.iframe?xa.offset().left:xa.offset().left+d)-1).css("width",xa.get(0).getBoundingClientRect().width).css("height",xa.get(0).getBoundingClientRect().height).addClass("fr-active")}function l(a){return'<div class="fr-handler fr-h'+a+'"></div>'}function m(c){if(!b.core.sameInstance(ya))return!0;if(c.preventDefault(),c.stopPropagation(),b.$el.find("img.fr-error").left)return!1;b.undo.canDo()||b.undo.saveStep();var d=c.pageX||c.originalEvent.touches[0].pageX,e=b.$oel.get(0),f=e.ownerDocument,g=f.defaultView||f.parentWindow,h=g.location!=g.parent.location;h&&(d+=g.frameElement.offsetLeft+g.frameElement.clientLeft),za=a(this),za.data("start-x",d),za.data("start-width",xa.width()),za.data("start-height",xa.height());var i=xa.width();if(b.opts.imageResizeWithPercent){var j=xa.parentsUntil(b.$el,b.html.blockTagsQuery()).get(0)||b.el;xa.css("width",(i/a(j).outerWidth()*100).toFixed(2)+"%")}else xa.css("width",i);Aa.show(),b.popups.hideAll(),ia()}function n(c){if(!b.core.sameInstance(ya))return!0;var d;if(za&&xa){if(c.preventDefault(),b.$el.find("img.fr-error").left)return!1;var e=c.pageX||(c.originalEvent.touches?c.originalEvent.touches[0].pageX:null);if(!e)return!1;var f=za.data("start-x"),g=e-f,h=za.data("start-width");if((za.hasClass("fr-hnw")||za.hasClass("fr-hsw"))&&(g=0-g),b.opts.imageResizeWithPercent){var i=xa.parentsUntil(b.$el,b.html.blockTagsQuery()).get(0)||b.el;h=((h+g)/a(i).outerWidth()*100).toFixed(2),b.opts.imageRoundPercent&&(h=Math.round(h)),xa.css("width",h+"%"),d=(b.helpers.getPX(xa.css("width"))/a(i).outerWidth()*100).toFixed(2),d!==h&&xa.css("width",d+"%"),xa.css("height","").removeAttr("height")}else h+g>=b.opts.imageMinWidth&&xa.css("width",h+g),d=b.helpers.getPX(xa.css("width")),d!==h+g&&xa.css("width",d),xa.css("height",za.data("start-height")*xa.width()/za.data("start-width"));k(),b.events.trigger("image.resize",[va()])}}function o(a){if(!b.core.sameInstance(ya))return!0;if(za&&xa){if(a&&a.stopPropagation(),b.$el.find("img.fr-error").left)return!1;za=null,Aa.hide(),k(),e(),b.undo.saveStep(),b.events.trigger("image.resizeEnd",[va()])}}function p(a,c){b.edit.on(),xa&&xa.addClass("fr-error"),u(b.language.translate("Something went wrong. Please try again.")),b.events.trigger("image.error",[{code:a,message:Ja[a]},c])}function q(a){if(a)return b.$wp&&b.events.$on(b.$wp,"scroll",function(){xa&&b.popups.isVisible("image.edit")&&(b.events.disableBlur(),w(xa))}),!0;var c="";if(b.opts.imageEditButtons.length>0){c+='<div class="fr-buttons">',c+=b.button.buildList(b.opts.imageEditButtons),c+="</div>";var d={buttons:c},e=b.popups.create("image.edit",d);return e}return!1}function r(a){var c=b.popups.get("image.insert");if(c||(c=M()),c.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),c.find(".fr-image-progress-bar-layer").addClass("fr-active"),c.find(".fr-buttons").hide(),xa){b.popups.setContainer("image.insert",b.$sc);var d=xa.offset().left+xa.width()/2,e=xa.offset().top+xa.height();b.popups.show("image.insert",d,e,xa.outerHeight())}"undefined"==typeof a&&t("Uploading",0)}function s(a){var c=b.popups.get("image.insert");if(c&&(c.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),c.find(".fr-image-progress-bar-layer").removeClass("fr-active"),c.find(".fr-buttons").show(),a||b.$el.find("img.fr-error").length)){if(b.events.focus(),b.$el.find("img.fr-error").length&&(b.$el.find("img.fr-error").remove(),b.undo.saveStep(),b.undo.run(),b.undo.dropRedo()),!b.$wp&&xa){var d=xa;ga(!0),b.selection.setAfter(d.get(0)),b.selection.restore()}b.popups.hide("image.insert")}}function t(a,c){var d=b.popups.get("image.insert");if(d){var e=d.find(".fr-image-progress-bar-layer");e.find("h3").text(a+(c?" "+c+"%":"")),e.removeClass("fr-error"),c?(e.find("div").removeClass("fr-indeterminate"),e.find("div > span").css("width",c+"%")):e.find("div").addClass("fr-indeterminate")}}function u(a){r();var c=b.popups.get("image.insert"),d=c.find(".fr-image-progress-bar-layer");d.addClass("fr-error");var e=d.find("h3");e.text(a),b.events.disableBlur(),e.focus()}function v(){var a=b.popups.get("image.insert"),c=a.find(".fr-image-by-url-layer input");c.val().length>0&&(r(),t("Loading image"),y(c.val(),!0,[],xa),c.val(""),c.blur())}function w(a){fa.call(a.get(0))}function x(){var c=a(this);b.popups.hide("image.insert"),c.removeClass("fr-uploading"),c.next().is("br")&&c.next().remove(),w(c),b.events.trigger("image.loaded",[c])}function y(a,c,d,e,f){b.edit.off(),t("Loading image"),c&&(a=b.helpers.sanitizeURL(a));var g=new Image;g.onload=function(){var c,g;if(e){b.undo.canDo()||e.hasClass("fr-uploading")||b.undo.saveStep();var h=e.data("fr-old-src");b.$wp?(c=e.clone().removeData("fr-old-src").removeClass("fr-uploading"),c.off("load"),h&&e.attr("src",h),e.replaceWith(c)):c=e;for(var i=c.get(0).attributes,k=0;k<i.length;k++){var l=i[k];0===l.nodeName.indexOf("data-")&&c.removeAttr(l.nodeName)}if("undefined"!=typeof d)for(g in d)d.hasOwnProperty(g)&&"link"!=g&&c.attr("data-"+g,d[g]);c.on("load",x),c.attr("src",a),b.edit.on(),j(),b.undo.saveStep(),b.$el.blur(),b.events.trigger(h?"image.replaced":"image.inserted",[c,f])}else c=E(a,d,x),j(),b.undo.saveStep(),b.events.trigger("image.inserted",[c,f])},g.onerror=function(){p(Ca)},r("Loading image"),g.src=a}function z(c){try{if(b.events.trigger("image.uploaded",[c],!0)===!1)return b.edit.on(),!1;var d=a.parseJSON(c);return d.link?d:(p(Da,c),!1)}catch(e){return p(Fa,c),!1}}function A(c){try{var d=a(c).find("Location").text(),e=a(c).find("Key").text();return b.events.trigger("image.uploadedToS3",[d,e,c],!0)===!1?(b.edit.on(),!1):d}catch(f){return p(Fa,c),!1}}function B(a){t("Loading image");var c=this.status,d=this.response,e=this.responseXML,f=this.responseText;try{if(b.opts.imageUploadToS3)if(201==c){var g=A(e);g&&y(g,!1,[],a,d||e)}else p(Fa,d||e);else if(c>=200&&c<300){var h=z(f);h&&y(h.link,!1,h,a,d||f)}else p(Ea,d||f)}catch(i){p(Fa,d||f)}}function C(){p(Fa,this.response||this.responseText||this.responseXML)}function D(a){if(a.lengthComputable){var b=a.loaded/a.total*100|0;t("Uploading",b)}}function E(c,d,e){var f,g="";if(d&&"undefined"!=typeof d)for(f in d)d.hasOwnProperty(f)&&"link"!=f&&(g+=" data-"+f+'="'+d[f]+'"');var h=b.opts.imageDefaultWidth;h&&"auto"!=h&&(h+=b.opts.imageResizeWithPercent?"%":"px");var i=a('<img src="'+c+'"'+g+(h?' style="width: '+h+';"':"")+">");ka(i,b.opts.imageDefaultDisplay,b.opts.imageDefaultAlign),i.on("load",e),b.edit.on(),b.events.focus(!0),b.selection.restore(),b.undo.saveStep(),b.opts.imageSplitHTML?b.markers.split():b.markers.insert();var j=b.$el.find(".fr-marker");return j.replaceWith(i),b.html.wrap(),b.selection.clear(),i}function F(){b.edit.on(),s(!0)}function G(c,d,e){function f(){var e=a(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),b.placeholder.refresh(),e.is(xa)||w(e),k(),r(),b.edit.off(),c.onload=function(){B.call(c,e)},c.onerror=C,c.upload.onprogress=D,c.onabort=F,e.off("abortUpload").on("abortUpload",function(){4!=c.readyState&&c.abort()}),c.send(d)}var g,h=new FileReader;h.addEventListener("load",function(){var a=h.result;if(h.result.indexOf("svg+xml")<0){for(var c=atob(h.result.split(",")[1]),d=[],e=0;e<c.length;e++)d.push(c.charCodeAt(e));a=window.URL.createObjectURL(new Blob([new Uint8Array(d)],{type:"image/jpeg"}))}xa?(xa.on("load",f),b.edit.on(),b.undo.saveStep(),xa.data("fr-old-src",xa.attr("src")),xa.attr("src",a)):g=E(a,null,f)},!1),h.readAsDataURL(e)}function H(a){if("undefined"!=typeof a&&a.length>0){if(b.events.trigger("image.beforeUpload",[a])===!1)return!1;var c=a[0];if(c.size>b.opts.imageMaxSize)return p(Ga),!1;if(b.opts.imageAllowedTypes.indexOf(c.type.replace(/image\//g,""))<0)return p(Ha),!1;var d;if(b.drag_support.formdata&&(d=b.drag_support.formdata?new FormData:null),d){var e;if(b.opts.imageUploadToS3!==!1){d.append("key",b.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(c.name||"untitled")),d.append("success_action_status","201"),d.append("X-Requested-With","xhr"),d.append("Content-Type",c.type);for(e in b.opts.imageUploadToS3.params)b.opts.imageUploadToS3.params.hasOwnProperty(e)&&d.append(e,b.opts.imageUploadToS3.params[e])}for(e in b.opts.imageUploadParams)b.opts.imageUploadParams.hasOwnProperty(e)&&d.append(e,b.opts.imageUploadParams[e]);d.append(b.opts.imageUploadParam,c);var f=b.opts.imageUploadURL;b.opts.imageUploadToS3&&(f=b.opts.imageUploadToS3.uploadURL?b.opts.imageUploadToS3.uploadURL:"https://"+b.opts.imageUploadToS3.region+".amazonaws.com/"+b.opts.imageUploadToS3.bucket);var g=b.core.getXHR(f,b.opts.imageUploadMethod);G(g,d,c)}}}function I(c){b.events.$on(c,"dragover dragenter",".fr-image-upload-layer",function(){return a(this).addClass("fr-drop"),!1}),b.events.$on(c,"dragleave dragend",".fr-image-upload-layer",function(){return a(this).removeClass("fr-drop"),!1}),b.events.$on(c,"drop",".fr-image-upload-layer",function(d){d.preventDefault(),d.stopPropagation(),a(this).removeClass("fr-drop");var e=d.originalEvent.dataTransfer;if(e&&e.files){var f=c.data("instance")||b;f.events.disableBlur(),f.image.upload(e.files),f.events.enableBlur()}}),b.events.$on(c,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var d=c.data("instance")||b;d.events.disableBlur(),c.find("input:focus").blur(),d.events.enableBlur(),d.image.upload(this.files)}a(this).val("")})}function J(c){var d=c.originalEvent.dataTransfer;if(d&&d.files&&d.files.length){var e=d.files[0];if(e&&e.type&&e.type.indexOf("image")!==-1){b.markers.remove(),b.markers.insertAtPoint(c.originalEvent),b.$el.find(".fr-marker").replaceWith(a.FE.MARKERS),b.popups.hideAll();var f=b.popups.get("image.insert");return f||(f=M()),b.popups.setContainer("image.insert",b.$sc),b.popups.show("image.insert",c.originalEvent.pageX,c.originalEvent.pageY),r(),b.opts.imageAllowedTypes.indexOf(e.type.replace(/image\//g,""))>=0?H(d.files):p(Ha),c.preventDefault(),c.stopPropagation(),!1}}}function K(){var c,d,e=b.selection.ranges(0);e.collapsed&&e.startContainer.nodeType==Node.ELEMENT_NODE&&(e.startContainer.childNodes.length==e.startOffset?(c=e.startContainer.childNodes[e.startOffset-1],c&&"IMG"==c.tagName&&"block"==a(c).css("display")&&(d=b.node.blockParent(c),d&&b.html.defaultTag()?d.nextSibling||(["TD","TH"].indexOf(d.tagName)<0?a(d).after("<"+b.html.defaultTag()+"><br>"+a.FE.MARKERS+"</"+b.html.defaultTag()+">"):a(c).after("<br>"+a.FE.MARKERS),b.selection.restore()):d||(a(c).after("<br>"+a.FE.MARKERS),b.selection.restore()))):0===e.startOffset&&e.startContainer.childNodes.length>e.startOffset&&(c=e.startContainer.childNodes[e.startOffset],c&&"IMG"==c.tagName&&"block"==a(c).css("display")&&(d=b.node.blockParent(c),d&&b.html.defaultTag()?d.previousSibling||(["TD","TH"].indexOf(d.tagName)<0?a(d).before("<"+b.html.defaultTag()+"><br>"+a.FE.MARKERS+"</"+b.html.defaultTag()+">"):a(c).before("<br>"+a.FE.MARKERS),b.selection.restore()):d||(a(c).before(a.FE.MARKERS+"<br>"),b.selection.restore()))))}function L(){b.events.$on(b.$el,b._mousedown,"IMG"==b.el.tagName?null:'img:not([contenteditable="false"])',function(c){return"false"==a(this).parents("[contenteditable]:not(.fr-element):not(body):first").attr("contenteditable")||(b.helpers.isMobile()||b.selection.clear(),Ba=!0,b.popups.areVisible()&&b.events.disableBlur(),b.browser.msie&&(b.events.disableBlur(),b.$el.attr("contenteditable",!1)),b.draggable||c.preventDefault(),void c.stopPropagation())}),b.events.$on(b.$el,b._mouseup,"IMG"==b.el.tagName?null:'img:not([contenteditable="false"])',function(c){return"false"==a(this).parents("[contenteditable]:not(.fr-element):not(body):first").attr("contenteditable")||void(Ba&&(Ba=!1,c.stopPropagation(),b.browser.msie&&(b.$el.attr("contenteditable",!0),b.events.enableBlur())))}),b.events.on("keyup",function(c){if(c.shiftKey&&""===b.selection.text().replace(/\n/g,"")){var d=b.selection.element(),e=b.selection.endElement();d&&"IMG"==d.tagName?w(a(d)):e&&"IMG"==e.tagName&&w(a(e))}},!0),b.events.on("drop",J),b.events.on("mousedown window.mousedown",ha),b.events.on("window.touchmove",ia),b.events.on("mouseup window.mouseup",function(){return xa?(ga(),!1):void ia()}),b.events.on("commands.mousedown",function(a){a.parents(".fr-toolbar").length>0&&ga()}),b.browser.edge||b.events.on("mouseup",K),b.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){Ba=!1,ga(!0)}),b.events.on("modals.hide",function(){xa&&(ta(),b.selection.clear())})}function M(a){if(a)return b.popups.onRefresh("image.insert",c),b.popups.onHide("image.insert",f),!0;var d,e="";b.opts.imageInsertButtons.length>1&&(e='<div class="fr-buttons">'+b.button.buildList(b.opts.imageInsertButtons)+"</div>");var g=b.opts.imageInsertButtons.indexOf("imageUpload"),h=b.opts.imageInsertButtons.indexOf("imageByURL"),i="";g>=0&&(d=" fr-active",h>=0&&g>h&&(d=""),i='<div class="fr-image-upload-layer'+d+' fr-layer" id="fr-image-upload-layer-'+b.id+'"><strong>'+b.language.translate("Drop image")+"</strong><br>("+b.language.translate("or click")+')<div class="fr-form"><input type="file" accept="image/'+b.opts.imageAllowedTypes.join(", image/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-'+b.id+'" role="button"></div></div>');var j="";h>=0&&(d=" fr-active",g>=0&&h>g&&(d=""),j='<div class="fr-image-by-url-layer'+d+' fr-layer" id="fr-image-by-url-layer-'+b.id+'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-'+b.id+'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">'+b.language.translate("Insert")+"</button></div></div>");var k='<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>',l={buttons:e,upload_layer:i,by_url_layer:j,progress_bar:k},m=b.popups.create("image.insert",l);return b.$wp&&b.events.$on(b.$wp,"scroll",function(){xa&&b.popups.isVisible("image.insert")&&sa()}),I(m),m}function N(){if(xa){var a=b.popups.get("image.alt");a.find("input").val(xa.attr("alt")||"").trigger("change")}}function O(){var a=b.popups.get("image.alt");a||(a=P()),s(),b.popups.refresh("image.alt"),b.popups.setContainer("image.alt",b.$sc);var c=xa.offset().left+xa.width()/2,d=xa.offset().top+xa.height();b.popups.show("image.alt",c,d,xa.outerHeight())}function P(a){if(a)return b.popups.onRefresh("image.alt",N),!0;var c="";c='<div class="fr-buttons">'+b.button.buildList(b.opts.imageAltButtons)+"</div>";var d="";d='<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'+b.id+'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-'+b.id+'" type="text" placeholder="'+b.language.translate("Alternate Text")+'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">'+b.language.translate("Update")+"</button></div></div>";var e={buttons:c,alt_layer:d},f=b.popups.create("image.alt",e);return b.$wp&&b.events.$on(b.$wp,"scroll.image-alt",function(){xa&&b.popups.isVisible("image.alt")&&O()}),f}function Q(a){if(xa){var c=b.popups.get("image.alt");xa.attr("alt",a||c.find("input").val()||""),c.find("input:focus").blur(),w(xa)}}function R(){if(xa){var a=b.popups.get("image.size");a.find('input[name="width"]').val(xa.get(0).style.width).trigger("change"),a.find('input[name="height"]').val(xa.get(0).style.height).trigger("change")}}function S(){var a=b.popups.get("image.size");a||(a=T()),s(),b.popups.refresh("image.size"),b.popups.setContainer("image.size",b.$sc);var c=xa.offset().left+xa.width()/2,d=xa.offset().top+xa.height();b.popups.show("image.size",c,d,xa.outerHeight())}function T(a){if(a)return b.popups.onRefresh("image.size",R),!0;var c="";c='<div class="fr-buttons">'+b.button.buildList(b.opts.imageSizeButtons)+"</div>";var d="";d='<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'+b.id+'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-'+b.id+'" type="text" name="width" placeholder="'+b.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height'+b.id+'" type="text" name="height" placeholder="'+b.language.translate("Height")+'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">'+b.language.translate("Update")+"</button></div></div>";var e={buttons:c,size_layer:d},f=b.popups.create("image.size",e);return b.$wp&&b.events.$on(b.$wp,"scroll.image-size",function(){xa&&b.popups.isVisible("image.size")&&S()}),f}function U(a,c){if(xa){var d=b.popups.get("image.size");a=a||d.find('input[name="width"]').val()||"",c=c||d.find('input[name="height"]').val()||"";var e=/^[\d]+((px)|%)*$/g;a.match(e)&&xa.css("width",a),c.match(e)&&xa.css("height",c),d.find("input:focus").blur(),w(xa)}}function V(a){var c,d,e=b.popups.get("image.insert");if(xa||b.opts.toolbarInline)xa&&(d=xa.offset().top+xa.outerHeight());else{var f=b.$tb.find('.fr-command[data-cmd="insertImage"]');c=f.offset().left+f.outerWidth()/2,d=f.offset().top+(b.opts.toolbarBottom?10:f.outerHeight()-10)}!xa&&b.opts.toolbarInline&&(d=e.offset().top-b.helpers.getPX(e.css("margin-top")),e.hasClass("fr-above")&&(d+=e.outerHeight())),e.find(".fr-layer").removeClass("fr-active"),e.find(".fr-"+a+"-layer").addClass("fr-active"),b.popups.show("image.insert",c,d,xa?xa.outerHeight():0),b.accessibility.focusPopup(e)}function W(a){var c=b.popups.get("image.insert");c.find(".fr-image-upload-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function X(a){var c=b.popups.get("image.insert");c.find(".fr-image-by-url-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function Y(a,b,c,d){return a.pageX=b,m.call(this,a),a.pageX=a.pageX+c*Math.floor(Math.pow(1.1,d)),n.call(this,a),o.call(this,a),++d}function Z(){var c;if(b.shared.$image_resizer?(ya=b.shared.$image_resizer,Aa=b.shared.$img_overlay,b.events.on("destroy",function(){ya.removeClass("fr-active").appendTo(a("body"))},!0)):(b.shared.$image_resizer=a('<div class="fr-image-resizer"></div>'),ya=b.shared.$image_resizer,b.events.$on(ya,"mousedown",function(a){a.stopPropagation()},!0),b.opts.imageResize&&(ya.append(l("nw")+l("ne")+l("sw")+l("se")),b.shared.$img_overlay=a('<div class="fr-image-overlay"></div>'),Aa=b.shared.$img_overlay,c=ya.get(0).ownerDocument,a(c).find("body").append(Aa))),b.events.on("shared.destroy",function(){ya.html("").removeData().remove(),ya=null,b.opts.imageResize&&(Aa.remove(),Aa=null)},!0),b.helpers.isMobile()||b.events.$on(a(b.o_win),"resize",function(){xa&&!xa.hasClass("fr-uploading")?ga(!0):xa&&(k(),sa(),r(!1))}),b.opts.imageResize){c=ya.get(0).ownerDocument,b.events.$on(ya,b._mousedown,".fr-handler",m),b.events.$on(a(c),b._mousemove,n),b.events.$on(a(c.defaultView||c.parentWindow),b._mouseup,o),b.events.$on(Aa,"mouseleave",o);var d=1,e=null,f=0;b.events.on("keydown",function(c){if(xa){var g=navigator.userAgent.indexOf("Mac OS X")!=-1?c.metaKey:c.ctrlKey,h=c.which;(h!==e||c.timeStamp-f>200)&&(d=1),(h==a.FE.KEYCODE.EQUALS||b.browser.mozilla&&h==a.FE.KEYCODE.FF_EQUALS)&&g&&!c.altKey?d=Y.call(this,c,1,1,d):(h==a.FE.KEYCODE.HYPHEN||b.browser.mozilla&&h==a.FE.KEYCODE.FF_HYPHEN)&&g&&!c.altKey?d=Y.call(this,c,2,-1,d):b.keys.ctrlKey(c)||h!=a.FE.KEYCODE.ENTER||(xa.before("<br>"),w(xa)),e=h,f=c.timeStamp}},!0),b.events.on("keyup",function(){d=1})}}function $(c){c=c||xa,c&&b.events.trigger("image.beforeRemove",[c])!==!1&&(b.popups.hideAll(),ta(),ga(!0),b.undo.canDo()||b.undo.saveStep(),c.get(0)==b.el?c.removeAttr("src"):("A"==c.get(0).parentNode.tagName?(b.selection.setBefore(c.get(0).parentNode)||b.selection.setAfter(c.get(0).parentNode)||c.parent().after(a.FE.MARKERS),a(c.get(0).parentNode).remove()):(b.selection.setBefore(c.get(0))||b.selection.setAfter(c.get(0))||c.after(a.FE.MARKERS),c.remove()),b.html.fillEmptyBlocks(),b.selection.restore()),b.undo.saveStep())}function _(c){var d=c.which;if(xa&&(d==a.FE.KEYCODE.BACKSPACE||d==a.FE.KEYCODE.DELETE))return c.preventDefault(),c.stopPropagation(),$(),!1;if(xa&&d==a.FE.KEYCODE.ESC){var e=xa;return ga(!0),b.selection.setAfter(e.get(0)),b.selection.restore(),c.preventDefault(),!1}if(xa&&(d==a.FE.KEYCODE.ARROW_LEFT||d==a.FE.KEYCODE.ARROW_RIGHT)){var f=xa.get(0);return ga(!0),d==a.FE.KEYCODE.ARROW_LEFT?b.selection.setBefore(f):b.selection.setAfter(f),b.selection.restore(),c.preventDefault(),!1}return xa&&d!=a.FE.KEYCODE.F10&&!b.keys.isBrowserAction(c)?(c.preventDefault(),c.stopPropagation(),!1):void 0}function aa(a){if(a&&"IMG"==a.tagName)b.node.hasClass(a,"fr-uploading")||b.node.hasClass(a,"fr-error")?a.parentNode.removeChild(a):b.node.hasClass(a,"fr-draggable")&&a.classList.remove("fr-draggable");else if(a&&a.nodeType==Node.ELEMENT_NODE)for(var c=a.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),d=0;d<c.length;d++)aa(c[d])}function ba(){if(L(),"IMG"==b.el.tagName&&b.$el.addClass("fr-view"),b.events.$on(b.$el,b.helpers.isMobile()&&!b.helpers.isWindowsPhone()?"touchend":"click","IMG"==b.el.tagName?null:'img:not([contenteditable="false"])',fa),b.helpers.isMobile()&&(b.events.$on(b.$el,"touchstart","IMG"==b.el.tagName?null:'img:not([contenteditable="false"])',function(){La=!1}),b.events.$on(b.$el,"touchmove",function(){La=!0})),b.$wp?(b.events.on("window.keydown keydown",_,!0),b.events.on("keyup",function(b){if(b.which==a.FE.KEYCODE.ENTER)return!1},!0)):b.events.$on(b.$win,"keydown",_),b.events.on("toolbar.esc",function(){if(xa){if(b.$wp)b.events.disableBlur(),b.events.focus();else{var a=xa;ga(!0),b.selection.setAfter(a.get(0)),b.selection.restore()}return!1}},!0),b.events.on("toolbar.focusEditor",function(){if(xa)return!1},!0),b.events.on("window.cut window.copy",function(c){xa&&b.popups.isVisible("image.edit")&&!b.popups.get("image.edit").find(":focus").length&&(ta(),a.FE.copied_text="\n",a.FE.copied_html=xa.get(0).outerHTML,"copy"==c.type?setTimeout(function(){w(xa)}):(ga(!0),b.undo.saveStep(),setTimeout(function(){b.undo.saveStep()},0)))},!0),b.events.$on(a(b.o_win),"keydown",function(b){var c=b.which;if(xa&&c==a.FE.KEYCODE.BACKSPACE)return b.preventDefault(),!1}),b.events.$on(b.$win,"keydown",function(b){var c=b.which;xa&&xa.hasClass("fr-uploading")&&c==a.FE.KEYCODE.ESC&&xa.trigger("abortUpload")}),b.events.on("destroy",function(){xa&&xa.hasClass("fr-uploading")&&xa.trigger("abortUpload")}),b.events.on("paste.before",da),b.events.on("paste.beforeCleanup",ea),b.events.on("paste.after",ca),b.events.on("html.set",i),b.events.on("html.inserted",i),i(),b.events.on("destroy",function(){Ka=[]}),b.events.on("html.processGet",aa),b.opts.imageOutputSize){var c;b.events.on("html.beforeGet",function(){c=b.el.querySelectorAll("img");for(var d=0;d<c.length;d++){var e=c[d].style.width||a(c[d]).width(),f=c[d].style.height||a(c[d]).height();e&&c[d].setAttribute("width",(""+e).replace(/px/,"")),f&&c[d].setAttribute("height",(""+f).replace(/px/,""))}}),b.events.on("html.afterGet",function(){for(var a=0;a<c.length;a++)c[a].removeAttribute("width"),c[a].removeAttribute("height")})}b.opts.iframe&&b.events.on("image.loaded",b.size.syncIframe),b.$wp&&(j(),b.events.on("contentChanged",j)),b.events.$on(a(b.o_win),"orientationchange.image",function(){setTimeout(function(){xa&&w(xa)},100)}),q(!0),M(!0),T(!0),P(!0),b.events.on("node.remove",function(a){if("IMG"==a.get(0).tagName)return $(a),!1})}function ca(){b.opts.imagePaste?b.$el.find("img[data-fr-image-pasted]").each(function(c,d){if(b.opts.imagePasteProcess){var f=b.opts.imageDefaultWidth;f&&"auto"!=f&&(f+=b.opts.imageResizeWithPercent?"%":"px"),a(d).css("width",f),a(d).removeClass("fr-dii fr-dib fr-fir fr-fil").addClass((b.opts.imageDefaultDisplay?"fr-di"+b.opts.imageDefaultDisplay[0]:"")+(b.opts.imageDefaultAlign&&"center"!=b.opts.imageDefaultAlign?" fr-fi"+b.opts.imageDefaultAlign[0]:""))}if(0===d.src.indexOf("data:")){if(b.events.trigger("image.beforePasteUpload",[d])===!1)return!1;xa=a(d),k(),e(),sa(),r(),b.edit.off();for(var g=atob(a(d).attr("src").split(",")[1]),h=[],i=0;i<g.length;i++)h.push(g.charCodeAt(i));var j=new Blob([new Uint8Array(h)],{type:"image/jpeg"});H([j]),a(d).removeAttr("data-fr-image-pasted")}else 0!==d.src.indexOf("http")||0===d.src.indexOf("https://mail.google.com/mail")?(b.selection.save(),a(d).remove(),b.selection.restore()):a(d).removeAttr("data-fr-image-pasted")}):b.$el.find("img[data-fr-image-pasted]").remove()}function da(a){if(a&&a.clipboardData&&a.clipboardData.items&&a.clipboardData.items[0]){var c=a.clipboardData.items[0].getAsFile();if(c){var d=new FileReader;return d.onload=function(a){var c=a.target.result,d=b.opts.imageDefaultWidth;d&&"auto"!=d&&(d+=b.opts.imageResizeWithPercent?"%":"px"),b.html.insert('<img data-fr-image-pasted="true" class="'+(b.opts.imageDefaultDisplay?"fr-di"+b.opts.imageDefaultDisplay[0]:"")+(b.opts.imageDefaultAlign&&"center"!=b.opts.imageDefaultAlign?" fr-fi"+b.opts.imageDefaultAlign[0]:"")+'" src="'+c+'"'+(d?' style="width: '+d+';"':"")+">"),b.events.trigger("paste.after")},d.readAsDataURL(c),!1}}}function ea(a){return a=a.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fa(c){if("false"==a(this).parents("[contenteditable]:not(.fr-element):not(body):first").attr("contenteditable"))return!0;if(c&&"touchend"==c.type&&La)return!0;if(c&&b.edit.isDisabled())return c.stopPropagation(),c.preventDefault(),!1;for(var d=0;d<a.FE.INSTANCES.length;d++)a.FE.INSTANCES[d]!=b&&a.FE.INSTANCES[d].events.trigger("image.hideResizer");b.toolbar.disable(),c&&(c.stopPropagation(),c.preventDefault()),b.helpers.isMobile()&&(b.events.disableBlur(),b.$el.blur(),b.events.enableBlur()),b.opts.iframe&&b.size.syncIframe(),xa=a(this),ta(),k(),e(),b.selection.clear(),b.button.bulkRefresh(),b.events.trigger("video.hideResizer")}function ga(a){xa&&(ja()||a===!0)&&(b.toolbar.enable(),ya.removeClass("fr-active"),b.popups.hide("image.edit"),xa=null,ia())}function ha(){Ma=!0}function ia(){Ma=!1}function ja(){return Ma}function ka(a,c,d){!b.opts.htmlUntouched&&b.opts.useClasses?(a.removeClass("fr-fil fr-fir fr-dib fr-dii"),a.addClass("fr-fi"+d[0]+" fr-di"+c[0])):"inline"==c?(a.css({display:"inline-block",verticalAlign:"bottom",margin:b.opts.imageDefaultMargin}),"center"==d?a.css({float:"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - "+2*b.opts.imageDefaultMargin+"px)"}):"left"==d?a.css({float:"left",marginLeft:0,maxWidth:"calc(100% - "+b.opts.imageDefaultMargin+"px)"}):a.css({float:"right",marginRight:0,maxWidth:"calc(100% - "+b.opts.imageDefaultMargin+"px)"})):"block"==c&&(a.css({display:"block",float:"none",verticalAlign:"top",margin:b.opts.imageDefaultMargin+"px auto"}),"left"==d?a.css({marginLeft:0}):"right"==d&&a.css({marginRight:0}))}function la(a){xa.removeClass("fr-fir fr-fil"),!b.opts.htmlUntouched&&b.opts.useClasses?"left"==a?xa.addClass("fr-fil"):"right"==a&&xa.addClass("fr-fir"):ka(xa,na(),a),k(),e()}function ma(a){if("undefined"==typeof a&&(a=xa),a){if(a.hasClass("fr-fil"))return"left";if(a.hasClass("fr-fir"))return"right";if(a.hasClass("fr-dib")||a.hasClass("fr-dii"))return"center";var b=a.css("float");if(a.css("float","none"),"block"==a.css("display")){if(a.css("float",""),a.css("float")!=b&&a.css("float",b),0===parseInt(a.css("margin-left"),10))return"left";if(0===parseInt(a.css("margin-right"),10))return"right"}else{if(a.css("float",""),a.css("float")!=b&&a.css("float",b),"left"==a.css("float"))return"left";if("right"==a.css("float"))return"right"}}return"center"}function na(a){"undefined"==typeof a&&(a=xa);var b=a.css("float");return a.css("float","none"),
|
8
|
-
"block"==a.css("display")?(a.css("float",""),a.css("float")!=b&&a.css("float",b),"block"):(a.css("float",""),a.css("float")!=b&&a.css("float",b),"inline")}function oa(a){xa&&a.find("> *:first").replaceWith(b.icon.create("image-align-"+ma()))}function pa(a,b){xa&&b.find('.fr-command[data-param1="'+ma()+'"]').addClass("fr-active").attr("aria-selected",!0)}function qa(a){xa.removeClass("fr-dii fr-dib"),!b.opts.htmlUntouched&&b.opts.useClasses?"inline"==a?xa.addClass("fr-dii"):"block"==a&&xa.addClass("fr-dib"):ka(xa,a,ma()),k(),e()}function ra(a,b){xa&&b.find('.fr-command[data-param1="'+na()+'"]').addClass("fr-active").attr("aria-selected",!0)}function sa(){var a=b.popups.get("image.insert");a||(a=M()),b.popups.isVisible("image.insert")||(s(),b.popups.refresh("image.insert"),b.popups.setContainer("image.insert",b.$sc));var c=xa.offset().left+xa.width()/2,d=xa.offset().top+xa.height();b.popups.show("image.insert",c,d,xa.outerHeight())}function ta(){if(xa){b.selection.clear();var a=b.doc.createRange();a.selectNode(xa.get(0));var c=b.selection.get();c.addRange(a)}}function ua(){xa?(b.events.disableBlur(),a(".fr-popup input:focus").blur(),w(xa)):(b.events.disableBlur(),b.selection.restore(),b.events.enableBlur(),b.popups.hide("image.insert"),b.toolbar.showInline())}function va(){return xa}function wa(a,c,d){if("undefined"==typeof c&&(c=b.opts.imageStyles),"undefined"==typeof d&&(d=b.opts.imageMultipleStyles),!xa)return!1;if(!d){var e=Object.keys(c);e.splice(e.indexOf(a),1),xa.removeClass(e.join(" "))}"object"==typeof c[a]?(xa.removeAttr("style"),xa.css(c[a].style)):xa.toggleClass(a),w(xa)}var xa,ya,za,Aa,Ba=!1,Ca=1,Da=2,Ea=3,Fa=4,Ga=5,Ha=6,Ia=7,Ja={};Ja[Ca]="Image cannot be loaded from the passed link.",Ja[Da]="No link in upload response.",Ja[Ea]="Error during file upload.",Ja[Fa]="Parsing response failed.",Ja[Ga]="File is too large.",Ja[Ha]="Image file type is invalid.",Ja[Ia]="Files can be uploaded only to same domain in IE 8 and IE 9.";var Ka,La,Ma=!1;return{_init:ba,showInsertPopup:d,showLayer:V,refreshUploadButton:W,refreshByURLButton:X,upload:H,insertByURL:v,align:la,refreshAlign:oa,refreshAlignOnShow:pa,display:qa,refreshDisplayOnShow:ra,replace:sa,back:ua,get:va,insert:y,showProgressBar:r,remove:$,hideProgressBar:s,applyStyle:wa,showAltPopup:O,showSizePopup:S,setAlt:Q,setSize:U,exitEdit:ga,edit:w}},a.FE.DefineIcon("insertImage",{NAME:"image"}),a.FE.RegisterShortcut(a.FE.KEYCODE.P,"insertImage",null,"P"),a.FE.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),a.FE.DefineIcon("imageUpload",{NAME:"upload"}),a.FE.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(a){this.image.refreshUploadButton(a)}}),a.FE.DefineIcon("imageByURL",{NAME:"link"}),a.FE.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(a){this.image.refreshByURLButton(a)}}),a.FE.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(a){var b=this.image.get();b?a.text(this.language.translate("Replace")):a.text(this.language.translate("Insert"))}}),a.FE.DefineIcon("imageDisplay",{NAME:"star"}),a.FE.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(a,b){this.image.display(b)},refresh:function(a){this.opts.imageTextNear||a.addClass("fr-hidden")},refreshOnShow:function(a,b){this.image.refreshDisplayOnShow(a,b)}}),a.FE.DefineIcon("image-align",{NAME:"align-left"}),a.FE.DefineIcon("image-align-left",{NAME:"align-left"}),a.FE.DefineIcon("image-align-right",{NAME:"align-right"}),a.FE.DefineIcon("image-align-center",{NAME:"align-justify"}),a.FE.DefineIcon("imageAlign",{NAME:"align-justify"}),a.FE.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var b='<ul class="fr-dropdown-list" role="presentation">',c=a.FE.COMMANDS.imageAlign.options;for(var d in c)c.hasOwnProperty(d)&&(b+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'+d+'" title="'+this.language.translate(c[d])+'">'+this.icon.create("image-align-"+d)+'<span class="fr-sr-only">'+this.language.translate(c[d])+"</span></a></li>");return b+="</ul>"},callback:function(a,b){this.image.align(b)},refresh:function(a){this.image.refreshAlign(a)},refreshOnShow:function(a,b){this.image.refreshAlignOnShow(a,b)}}),a.FE.DefineIcon("imageReplace",{NAME:"exchange"}),a.FE.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),a.FE.DefineIcon("imageRemove",{NAME:"trash"}),a.FE.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),a.FE.DefineIcon("imageBack",{NAME:"arrow-left"}),a.FE.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(a){var b=this.image.get();b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FE.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),a.FE.DefineIcon("imageStyle",{NAME:"magic"}),a.FE.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',b=this.opts.imageStyles;for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];"object"==typeof d&&(d=d.title),a+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'+c+'">'+this.language.translate(d)+"</a></li>"}return a+="</ul>"},callback:function(a,b){this.image.applyStyle(b)},refreshOnShow:function(b,c){var d=this.image.get();d&&c.find(".fr-command").each(function(){var b=a(this).data("param1"),c=d.hasClass(b);a(this).toggleClass("fr-active",c).attr("aria-selected",c)})}}),a.FE.DefineIcon("imageAlt",{NAME:"info"}),a.FE.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternate Text",callback:function(){this.image.showAltPopup()}}),a.FE.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),a.FE.DefineIcon("imageSize",{NAME:"arrows-alt"}),a.FE.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),a.FE.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}})});
|
7
|
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){a.extend(a.FE.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),a.extend(a.FE.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageRemove","|","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUploadURL:"https://i.froala.com/upload",imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","svg+xml"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5}),a.FE.PLUGINS.image=function(b){function c(){var a=b.popups.get("image.insert"),c=a.find(".fr-image-by-url-layer input");c.val(""),xa&&c.val(xa.attr("src")),c.trigger("change")}function d(){var a=b.$tb.find('.fr-command[data-cmd="insertImage"]'),c=b.popups.get("image.insert");if(c||(c=M()),s(),!c.hasClass("fr-active"))if(b.popups.refresh("image.insert"),b.popups.setContainer("image.insert",b.$tb),a.is(":visible")){var d=a.offset().left+a.outerWidth()/2,e=a.offset().top+(b.opts.toolbarBottom?10:a.outerHeight()-10);b.popups.show("image.insert",d,e,a.outerHeight())}else b.position.forSelection(c),b.popups.show("image.insert")}function e(){var a=b.popups.get("image.edit");if(a||(a=q()),a){b.popups.setContainer("image.edit",b.$sc),b.popups.refresh("image.edit");var c=xa.offset().left+xa.outerWidth()/2,d=xa.offset().top+xa.outerHeight();b.popups.show("image.edit",c,d,xa.outerHeight())}}function f(){s()}function g(a){a.hasClass("fr-dii")||a.hasClass("fr-dib")||(a.addClass("fr-fi"+ma(a)[0]),a.addClass("fr-di"+na(a)[0]),a.css("margin",""),a.css("float",""),a.css("display",""),a.css("z-index",""),a.css("position",""),a.css("overflow",""),a.css("vertical-align",""))}function h(a){var b=a.hasClass("fr-dib")?"block":a.hasClass("fr-dii")?"inline":null,c=a.hasClass("fr-fil")?"left":a.hasClass("fr-fir")?"right":ma(a);ka(a,b,c),a.removeClass("fr-dib fr-dii fr-fir fr-fil")}function i(){for(var c="IMG"==b.el.tagName?[b.el]:b.el.querySelectorAll("img"),d=0;d<c.length;d++){var e=a(c[d]);!b.opts.htmlUntouched&&b.opts.useClasses?((b.opts.imageEditButtons.indexOf("imageAlign")>=0||b.opts.imageEditButtons.indexOf("imageDisplay")>=0)&&g(e),b.opts.imageTextNear||e.removeClass("fr-dii").addClass("fr-dib")):b.opts.htmlUntouched||b.opts.useClasses||(b.opts.imageEditButtons.indexOf("imageAlign")>=0||b.opts.imageEditButtons.indexOf("imageDisplay")>=0)&&h(e),b.opts.iframe&&e.on("load",b.size.syncIframe)}}function j(){var c,d=Array.prototype.slice.call(b.el.querySelectorAll("img")),e=[];for(c=0;c<d.length;c++)e.push(d[c].getAttribute("src")),a(d[c]).toggleClass("fr-draggable",b.opts.imageMove),""===d[c].getAttribute("class")&&d[c].removeAttribute("class"),""===d[c].getAttribute("style")&&d[c].removeAttribute("style");if(Ka)for(c=0;c<Ka.length;c++)e.indexOf(Ka[c].getAttribute("src"))<0&&b.events.trigger("image.removed",[a(Ka[c])]);Ka=d}function k(){ya||Z();var a=b.$wp||b.$sc;a.append(ya),ya.data("instance",b);var c=a.scrollTop()-("static"!=a.css("position")?a.offset().top:0),d=a.scrollLeft()-("static"!=a.css("position")?a.offset().left:0);d-=b.helpers.getPX(a.css("border-left-width")),c-=b.helpers.getPX(a.css("border-top-width")),b.$el.is("img")&&(c=0,d=0),ya.css("top",(b.opts.iframe?xa.offset().top:xa.offset().top+c)-1).css("left",(b.opts.iframe?xa.offset().left:xa.offset().left+d)-1).css("width",xa.get(0).getBoundingClientRect().width).css("height",xa.get(0).getBoundingClientRect().height).addClass("fr-active")}function l(a){return'<div class="fr-handler fr-h'+a+'"></div>'}function m(c){if(!b.core.sameInstance(ya))return!0;if(c.preventDefault(),c.stopPropagation(),b.$el.find("img.fr-error").left)return!1;b.undo.canDo()||b.undo.saveStep();var d=c.pageX||c.originalEvent.touches[0].pageX;if("mousedown"==c.type){var e=b.$oel.get(0),f=e.ownerDocument,g=f.defaultView||f.parentWindow,h=g.location!=g.parent.location;h&&(d+=b.helpers.getPX(a(g.frameElement).offset().left)+g.frameElement.clientLeft)}za=a(this),za.data("start-x",d),za.data("start-width",xa.width()),za.data("start-height",xa.height());var i=xa.width();if(b.opts.imageResizeWithPercent){var j=xa.parentsUntil(b.$el,b.html.blockTagsQuery()).get(0)||b.el;xa.css("width",(i/a(j).outerWidth()*100).toFixed(2)+"%")}else xa.css("width",i);Aa.show(),b.popups.hideAll(),ia()}function n(c){if(!b.core.sameInstance(ya))return!0;var d;if(za&&xa){if(c.preventDefault(),b.$el.find("img.fr-error").left)return!1;var e=c.pageX||(c.originalEvent.touches?c.originalEvent.touches[0].pageX:null);if(!e)return!1;var f=za.data("start-x"),g=e-f,h=za.data("start-width");if((za.hasClass("fr-hnw")||za.hasClass("fr-hsw"))&&(g=0-g),b.opts.imageResizeWithPercent){var i=xa.parentsUntil(b.$el,b.html.blockTagsQuery()).get(0)||b.el;h=((h+g)/a(i).outerWidth()*100).toFixed(2),b.opts.imageRoundPercent&&(h=Math.round(h)),xa.css("width",h+"%"),d=(b.helpers.getPX(xa.css("width"))/a(i).outerWidth()*100).toFixed(2),d!==h&&xa.css("width",d+"%"),xa.css("height","").removeAttr("height")}else h+g>=b.opts.imageMinWidth&&xa.css("width",h+g),d=b.helpers.getPX(xa.css("width")),d!==h+g&&xa.css("width",d),xa.css("height",za.data("start-height")*xa.width()/za.data("start-width"));k(),b.events.trigger("image.resize",[va()])}}function o(a){if(!b.core.sameInstance(ya))return!0;if(za&&xa){if(a&&a.stopPropagation(),b.$el.find("img.fr-error").left)return!1;za=null,Aa.hide(),k(),e(),b.undo.saveStep(),b.events.trigger("image.resizeEnd",[va()])}}function p(a,c){b.edit.on(),xa&&xa.addClass("fr-error"),u(b.language.translate("Something went wrong. Please try again.")),b.events.trigger("image.error",[{code:a,message:Ja[a]},c])}function q(a){if(a)return b.$wp&&b.events.$on(b.$wp,"scroll",function(){xa&&b.popups.isVisible("image.edit")&&(b.events.disableBlur(),w(xa))}),!0;var c="";if(b.opts.imageEditButtons.length>0){c+='<div class="fr-buttons">',c+=b.button.buildList(b.opts.imageEditButtons),c+="</div>";var d={buttons:c},e=b.popups.create("image.edit",d);return e}return!1}function r(a){var c=b.popups.get("image.insert");if(c||(c=M()),c.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),c.find(".fr-image-progress-bar-layer").addClass("fr-active"),c.find(".fr-buttons").hide(),xa){b.popups.setContainer("image.insert",b.$sc);var d=xa.offset().left+xa.width()/2,e=xa.offset().top+xa.height();b.popups.show("image.insert",d,e,xa.outerHeight())}"undefined"==typeof a&&t("Uploading",0)}function s(a){var c=b.popups.get("image.insert");if(c&&(c.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),c.find(".fr-image-progress-bar-layer").removeClass("fr-active"),c.find(".fr-buttons").show(),a||b.$el.find("img.fr-error").length)){if(b.events.focus(),b.$el.find("img.fr-error").length&&(b.$el.find("img.fr-error").remove(),b.undo.saveStep(),b.undo.run(),b.undo.dropRedo()),!b.$wp&&xa){var d=xa;ga(!0),b.selection.setAfter(d.get(0)),b.selection.restore()}b.popups.hide("image.insert")}}function t(a,c){var d=b.popups.get("image.insert");if(d){var e=d.find(".fr-image-progress-bar-layer");e.find("h3").text(a+(c?" "+c+"%":"")),e.removeClass("fr-error"),c?(e.find("div").removeClass("fr-indeterminate"),e.find("div > span").css("width",c+"%")):e.find("div").addClass("fr-indeterminate")}}function u(a){r();var c=b.popups.get("image.insert"),d=c.find(".fr-image-progress-bar-layer");d.addClass("fr-error");var e=d.find("h3");e.text(a),b.events.disableBlur(),e.focus()}function v(){var a=b.popups.get("image.insert"),c=a.find(".fr-image-by-url-layer input");c.val().length>0&&(r(),t("Loading image"),y(c.val(),!0,[],xa),c.val(""),c.blur())}function w(a){fa.call(a.get(0))}function x(){var c=a(this);b.popups.hide("image.insert"),c.removeClass("fr-uploading"),c.next().is("br")&&c.next().remove(),w(c),b.events.trigger("image.loaded",[c])}function y(a,c,d,e,f){b.edit.off(),t("Loading image"),c&&(a=b.helpers.sanitizeURL(a));var g=new Image;g.onload=function(){var c,g;if(e){b.undo.canDo()||e.hasClass("fr-uploading")||b.undo.saveStep();var h=e.data("fr-old-src");b.$wp?(c=e.clone().removeData("fr-old-src").removeClass("fr-uploading"),c.off("load"),h&&e.attr("src",h),e.replaceWith(c)):c=e;for(var i=c.get(0).attributes,k=0;k<i.length;k++){var l=i[k];0===l.nodeName.indexOf("data-")&&c.removeAttr(l.nodeName)}if("undefined"!=typeof d)for(g in d)d.hasOwnProperty(g)&&"link"!=g&&c.attr("data-"+g,d[g]);c.on("load",x),c.attr("src",a),b.edit.on(),j(),b.undo.saveStep(),b.$el.blur(),b.events.trigger(h?"image.replaced":"image.inserted",[c,f])}else c=E(a,d,x),j(),b.undo.saveStep(),b.events.trigger("image.inserted",[c,f])},g.onerror=function(){p(Ca)},r("Loading image"),g.src=a}function z(c){try{if(b.events.trigger("image.uploaded",[c],!0)===!1)return b.edit.on(),!1;var d=a.parseJSON(c);return d.link?d:(p(Da,c),!1)}catch(e){return p(Fa,c),!1}}function A(c){try{var d=a(c).find("Location").text(),e=a(c).find("Key").text();return b.events.trigger("image.uploadedToS3",[d,e,c],!0)===!1?(b.edit.on(),!1):d}catch(f){return p(Fa,c),!1}}function B(a){t("Loading image");var c=this.status,d=this.response,e=this.responseXML,f=this.responseText;try{if(b.opts.imageUploadToS3)if(201==c){var g=A(e);g&&y(g,!1,[],a,d||e)}else p(Fa,d||e);else if(c>=200&&c<300){var h=z(f);h&&y(h.link,!1,h,a,d||f)}else p(Ea,d||f)}catch(i){p(Fa,d||f)}}function C(){p(Fa,this.response||this.responseText||this.responseXML)}function D(a){if(a.lengthComputable){var b=a.loaded/a.total*100|0;t("Uploading",b)}}function E(c,d,e){var f,g="";if(d&&"undefined"!=typeof d)for(f in d)d.hasOwnProperty(f)&&"link"!=f&&(g+=" data-"+f+'="'+d[f]+'"');var h=b.opts.imageDefaultWidth;h&&"auto"!=h&&(h+=b.opts.imageResizeWithPercent?"%":"px");var i=a('<img src="'+c+'"'+g+(h?' style="width: '+h+';"':"")+">");ka(i,b.opts.imageDefaultDisplay,b.opts.imageDefaultAlign),i.on("load",e),b.edit.on(),b.events.focus(!0),b.selection.restore(),b.undo.saveStep(),b.opts.imageSplitHTML?b.markers.split():b.markers.insert();var j=b.$el.find(".fr-marker");return j.parent().is("hr")&&j.parent().after(j),b.node.isLastSibling(j)&&j.parent().hasClass("fr-deletable")&&j.insertAfter(j.parent()),j.replaceWith(i),b.html.wrap(),b.selection.clear(),i}function F(){b.edit.on(),s(!0)}function G(c,d,e,f){function g(){var e=a(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),b.placeholder.refresh(),e.is(f)||w(e),k(),r(),b.edit.off(),c.onload=function(){B.call(c,e)},c.onerror=C,c.upload.onprogress=D,c.onabort=F,e.off("abortUpload").on("abortUpload",function(){4!=c.readyState&&c.abort()}),c.send(d)}var h,i=new FileReader;i.addEventListener("load",function(){var a=i.result;if(i.result.indexOf("svg+xml")<0){for(var c=atob(i.result.split(",")[1]),d=[],e=0;e<c.length;e++)d.push(c.charCodeAt(e));a=window.URL.createObjectURL(new Blob([new Uint8Array(d)],{type:"image/jpeg"}))}f?(f.on("load",g),b.edit.on(),b.undo.saveStep(),f.data("fr-old-src",f.attr("src")),f.attr("src",a)):h=E(a,null,g)},!1),i.readAsDataURL(e)}function H(a,c){if("undefined"!=typeof a&&a.length>0){if(b.events.trigger("image.beforeUpload",[a])===!1)return!1;var d=a[0];if(d.size>b.opts.imageMaxSize)return p(Ga),!1;if(b.opts.imageAllowedTypes.indexOf(d.type.replace(/image\//g,""))<0)return p(Ha),!1;var e;if(b.drag_support.formdata&&(e=b.drag_support.formdata?new FormData:null),e){var f;if(b.opts.imageUploadToS3!==!1){e.append("key",b.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(d.name||"untitled")),e.append("success_action_status","201"),e.append("X-Requested-With","xhr"),e.append("Content-Type",d.type);for(f in b.opts.imageUploadToS3.params)b.opts.imageUploadToS3.params.hasOwnProperty(f)&&e.append(f,b.opts.imageUploadToS3.params[f])}for(f in b.opts.imageUploadParams)b.opts.imageUploadParams.hasOwnProperty(f)&&e.append(f,b.opts.imageUploadParams[f]);e.append(b.opts.imageUploadParam,d);var g=b.opts.imageUploadURL;b.opts.imageUploadToS3&&(g=b.opts.imageUploadToS3.uploadURL?b.opts.imageUploadToS3.uploadURL:"https://"+b.opts.imageUploadToS3.region+".amazonaws.com/"+b.opts.imageUploadToS3.bucket);var h=b.core.getXHR(g,b.opts.imageUploadMethod);G(h,e,d,c||xa)}}}function I(c){b.events.$on(c,"dragover dragenter",".fr-image-upload-layer",function(){return a(this).addClass("fr-drop"),!1}),b.events.$on(c,"dragleave dragend",".fr-image-upload-layer",function(){return a(this).removeClass("fr-drop"),!1}),b.events.$on(c,"drop",".fr-image-upload-layer",function(d){d.preventDefault(),d.stopPropagation(),a(this).removeClass("fr-drop");var e=d.originalEvent.dataTransfer;if(e&&e.files){var f=c.data("instance")||b;f.events.disableBlur(),f.image.upload(e.files),f.events.enableBlur()}}),b.events.$on(c,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var d=c.data("instance")||b;d.events.disableBlur(),c.find("input:focus").blur(),d.events.enableBlur(),d.image.upload(this.files)}a(this).val("")})}function J(c){var d=c.originalEvent.dataTransfer;if(d&&d.files&&d.files.length){var e=d.files[0];if(e&&e.type&&e.type.indexOf("image")!==-1){b.markers.remove(),b.markers.insertAtPoint(c.originalEvent),b.$el.find(".fr-marker").replaceWith(a.FE.MARKERS),b.popups.hideAll();var f=b.popups.get("image.insert");return f||(f=M()),b.popups.setContainer("image.insert",b.$sc),b.popups.show("image.insert",c.originalEvent.pageX,c.originalEvent.pageY),r(),b.opts.imageAllowedTypes.indexOf(e.type.replace(/image\//g,""))>=0?H(d.files):p(Ha),c.preventDefault(),c.stopPropagation(),!1}}}function K(){var c,d,e=b.selection.ranges(0);e.collapsed&&e.startContainer.nodeType==Node.ELEMENT_NODE&&(e.startContainer.childNodes.length==e.startOffset?(c=e.startContainer.childNodes[e.startOffset-1],c&&"IMG"==c.tagName&&"block"==a(c).css("display")&&(d=b.node.blockParent(c),d&&b.html.defaultTag()?d.nextSibling||(["TD","TH"].indexOf(d.tagName)<0?a(d).after("<"+b.html.defaultTag()+"><br>"+a.FE.MARKERS+"</"+b.html.defaultTag()+">"):a(c).after("<br>"+a.FE.MARKERS),b.selection.restore()):d||(a(c).after("<br>"+a.FE.MARKERS),b.selection.restore()))):0===e.startOffset&&e.startContainer.childNodes.length>e.startOffset&&(c=e.startContainer.childNodes[e.startOffset],c&&"IMG"==c.tagName&&"block"==a(c).css("display")&&(d=b.node.blockParent(c),d&&b.html.defaultTag()?d.previousSibling||(["TD","TH"].indexOf(d.tagName)<0?a(d).before("<"+b.html.defaultTag()+"><br>"+a.FE.MARKERS+"</"+b.html.defaultTag()+">"):a(c).before("<br>"+a.FE.MARKERS),b.selection.restore()):d||(a(c).before(a.FE.MARKERS+"<br>"),b.selection.restore()))))}function L(){b.events.$on(b.$el,b._mousedown,"IMG"==b.el.tagName?null:'img:not([contenteditable="false"])',function(c){return"false"==a(this).parents("[contenteditable]:not(.fr-element):not(body):first").attr("contenteditable")||(b.helpers.isMobile()||b.selection.clear(),Ba=!0,b.popups.areVisible()&&b.events.disableBlur(),b.browser.msie&&(b.events.disableBlur(),b.$el.attr("contenteditable",!1)),b.draggable||c.preventDefault(),void c.stopPropagation())}),b.events.$on(b.$el,b._mouseup,"IMG"==b.el.tagName?null:'img:not([contenteditable="false"])',function(c){return"false"==a(this).parents("[contenteditable]:not(.fr-element):not(body):first").attr("contenteditable")||void(Ba&&(Ba=!1,c.stopPropagation(),b.browser.msie&&(b.$el.attr("contenteditable",!0),b.events.enableBlur())))}),b.events.on("keyup",function(c){if(c.shiftKey&&""===b.selection.text().replace(/\n/g,"")){var d=b.selection.element(),e=b.selection.endElement();d&&"IMG"==d.tagName?w(a(d)):e&&"IMG"==e.tagName&&w(a(e))}},!0),b.events.on("drop",J),b.events.on("mousedown window.mousedown",ha),b.events.on("window.touchmove",ia),b.events.on("mouseup window.mouseup",function(){return xa?(ga(),!1):void ia()}),b.events.on("commands.mousedown",function(a){a.parents(".fr-toolbar").length>0&&ga()}),b.browser.edge||b.events.on("mouseup",K),b.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){Ba=!1,ga(!0)}),b.events.on("modals.hide",function(){xa&&(ta(),b.selection.clear())})}function M(a){if(a)return b.popups.onRefresh("image.insert",c),b.popups.onHide("image.insert",f),!0;var d,e="";b.opts.imageInsertButtons.length>1&&(e='<div class="fr-buttons">'+b.button.buildList(b.opts.imageInsertButtons)+"</div>");var g=b.opts.imageInsertButtons.indexOf("imageUpload"),h=b.opts.imageInsertButtons.indexOf("imageByURL"),i="";g>=0&&(d=" fr-active",h>=0&&g>h&&(d=""),i='<div class="fr-image-upload-layer'+d+' fr-layer" id="fr-image-upload-layer-'+b.id+'"><strong>'+b.language.translate("Drop image")+"</strong><br>("+b.language.translate("or click")+')<div class="fr-form"><input type="file" accept="image/'+b.opts.imageAllowedTypes.join(", image/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-'+b.id+'" role="button"></div></div>');var j="";h>=0&&(d=" fr-active",g>=0&&h>g&&(d=""),j='<div class="fr-image-by-url-layer'+d+' fr-layer" id="fr-image-by-url-layer-'+b.id+'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-'+b.id+'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">'+b.language.translate("Insert")+"</button></div></div>");var k='<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>',l={buttons:e,upload_layer:i,by_url_layer:j,progress_bar:k},m=b.popups.create("image.insert",l);return b.$wp&&b.events.$on(b.$wp,"scroll",function(){xa&&b.popups.isVisible("image.insert")&&sa()}),I(m),m}function N(){if(xa){var a=b.popups.get("image.alt");a.find("input").val(xa.attr("alt")||"").trigger("change")}}function O(){var a=b.popups.get("image.alt");a||(a=P()),s(),b.popups.refresh("image.alt"),b.popups.setContainer("image.alt",b.$sc);var c=xa.offset().left+xa.width()/2,d=xa.offset().top+xa.height();b.popups.show("image.alt",c,d,xa.outerHeight())}function P(a){if(a)return b.popups.onRefresh("image.alt",N),!0;var c="";c='<div class="fr-buttons">'+b.button.buildList(b.opts.imageAltButtons)+"</div>";var d="";d='<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'+b.id+'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-'+b.id+'" type="text" placeholder="'+b.language.translate("Alternate Text")+'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">'+b.language.translate("Update")+"</button></div></div>";var e={buttons:c,alt_layer:d},f=b.popups.create("image.alt",e);return b.$wp&&b.events.$on(b.$wp,"scroll.image-alt",function(){xa&&b.popups.isVisible("image.alt")&&O()}),f}function Q(a){if(xa){var c=b.popups.get("image.alt");xa.attr("alt",a||c.find("input").val()||""),c.find("input:focus").blur(),w(xa)}}function R(){if(xa){var a=b.popups.get("image.size");a.find('input[name="width"]').val(xa.get(0).style.width).trigger("change"),a.find('input[name="height"]').val(xa.get(0).style.height).trigger("change")}}function S(){var a=b.popups.get("image.size");a||(a=T()),s(),b.popups.refresh("image.size"),b.popups.setContainer("image.size",b.$sc);var c=xa.offset().left+xa.width()/2,d=xa.offset().top+xa.height();b.popups.show("image.size",c,d,xa.outerHeight())}function T(a){if(a)return b.popups.onRefresh("image.size",R),!0;var c="";c='<div class="fr-buttons">'+b.button.buildList(b.opts.imageSizeButtons)+"</div>";var d="";d='<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'+b.id+'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-'+b.id+'" type="text" name="width" placeholder="'+b.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height'+b.id+'" type="text" name="height" placeholder="'+b.language.translate("Height")+'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">'+b.language.translate("Update")+"</button></div></div>";var e={buttons:c,size_layer:d},f=b.popups.create("image.size",e);return b.$wp&&b.events.$on(b.$wp,"scroll.image-size",function(){xa&&b.popups.isVisible("image.size")&&S()}),f}function U(a,c){if(xa){var d=b.popups.get("image.size");a=a||d.find('input[name="width"]').val()||"",c=c||d.find('input[name="height"]').val()||"";var e=/^[\d]+((px)|%)*$/g;a.match(e)&&xa.css("width",a),c.match(e)&&xa.css("height",c),d.find("input:focus").blur(),w(xa)}}function V(a){var c,d,e=b.popups.get("image.insert");if(xa||b.opts.toolbarInline)xa&&(d=xa.offset().top+xa.outerHeight());else{var f=b.$tb.find('.fr-command[data-cmd="insertImage"]');c=f.offset().left+f.outerWidth()/2,d=f.offset().top+(b.opts.toolbarBottom?10:f.outerHeight()-10)}!xa&&b.opts.toolbarInline&&(d=e.offset().top-b.helpers.getPX(e.css("margin-top")),e.hasClass("fr-above")&&(d+=e.outerHeight())),e.find(".fr-layer").removeClass("fr-active"),e.find(".fr-"+a+"-layer").addClass("fr-active"),b.popups.show("image.insert",c,d,xa?xa.outerHeight():0),b.accessibility.focusPopup(e)}function W(a){var c=b.popups.get("image.insert");c.find(".fr-image-upload-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function X(a){var c=b.popups.get("image.insert");c.find(".fr-image-by-url-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function Y(a,b,c,d){return a.pageX=b,m.call(this,a),a.pageX=a.pageX+c*Math.floor(Math.pow(1.1,d)),n.call(this,a),o.call(this,a),++d}function Z(){var c;if(b.shared.$image_resizer?(ya=b.shared.$image_resizer,Aa=b.shared.$img_overlay,b.events.on("destroy",function(){ya.removeClass("fr-active").appendTo(a("body"))},!0)):(b.shared.$image_resizer=a('<div class="fr-image-resizer"></div>'),ya=b.shared.$image_resizer,b.events.$on(ya,"mousedown",function(a){a.stopPropagation()},!0),b.opts.imageResize&&(ya.append(l("nw")+l("ne")+l("sw")+l("se")),b.shared.$img_overlay=a('<div class="fr-image-overlay"></div>'),Aa=b.shared.$img_overlay,c=ya.get(0).ownerDocument,a(c).find("body").append(Aa))),b.events.on("shared.destroy",function(){ya.html("").removeData().remove(),ya=null,b.opts.imageResize&&(Aa.remove(),Aa=null)},!0),b.helpers.isMobile()||b.events.$on(a(b.o_win),"resize",function(){xa&&!xa.hasClass("fr-uploading")?ga(!0):xa&&(k(),sa(),r(!1))}),b.opts.imageResize){c=ya.get(0).ownerDocument,b.events.$on(ya,b._mousedown,".fr-handler",m),b.events.$on(a(c),b._mousemove,n),b.events.$on(a(c.defaultView||c.parentWindow),b._mouseup,o),b.events.$on(Aa,"mouseleave",o);var d=1,e=null,f=0;b.events.on("keydown",function(c){if(xa){var g=navigator.userAgent.indexOf("Mac OS X")!=-1?c.metaKey:c.ctrlKey,h=c.which;(h!==e||c.timeStamp-f>200)&&(d=1),(h==a.FE.KEYCODE.EQUALS||b.browser.mozilla&&h==a.FE.KEYCODE.FF_EQUALS)&&g&&!c.altKey?d=Y.call(this,c,1,1,d):(h==a.FE.KEYCODE.HYPHEN||b.browser.mozilla&&h==a.FE.KEYCODE.FF_HYPHEN)&&g&&!c.altKey?d=Y.call(this,c,2,-1,d):b.keys.ctrlKey(c)||h!=a.FE.KEYCODE.ENTER||(xa.before("<br>"),w(xa)),e=h,f=c.timeStamp}},!0),b.events.on("keyup",function(){d=1})}}function $(c){c=c||xa,c&&b.events.trigger("image.beforeRemove",[c])!==!1&&(b.popups.hideAll(),ta(),ga(!0),b.undo.canDo()||b.undo.saveStep(),c.get(0)==b.el?c.removeAttr("src"):("A"==c.get(0).parentNode.tagName?(b.selection.setBefore(c.get(0).parentNode)||b.selection.setAfter(c.get(0).parentNode)||c.parent().after(a.FE.MARKERS),a(c.get(0).parentNode).remove()):(b.selection.setBefore(c.get(0))||b.selection.setAfter(c.get(0))||c.after(a.FE.MARKERS),c.remove()),b.html.fillEmptyBlocks(),b.selection.restore()),b.undo.saveStep())}function _(c){var d=c.which;if(xa&&(d==a.FE.KEYCODE.BACKSPACE||d==a.FE.KEYCODE.DELETE))return c.preventDefault(),c.stopPropagation(),$(),!1;if(xa&&d==a.FE.KEYCODE.ESC){var e=xa;return ga(!0),b.selection.setAfter(e.get(0)),b.selection.restore(),c.preventDefault(),!1}if(xa&&(d==a.FE.KEYCODE.ARROW_LEFT||d==a.FE.KEYCODE.ARROW_RIGHT)){var f=xa.get(0);return ga(!0),d==a.FE.KEYCODE.ARROW_LEFT?b.selection.setBefore(f):b.selection.setAfter(f),b.selection.restore(),c.preventDefault(),!1}return xa&&d!=a.FE.KEYCODE.F10&&!b.keys.isBrowserAction(c)?(c.preventDefault(),c.stopPropagation(),!1):void 0}function aa(a){if(a&&"IMG"==a.tagName)b.node.hasClass(a,"fr-uploading")||b.node.hasClass(a,"fr-error")?a.parentNode.removeChild(a):b.node.hasClass(a,"fr-draggable")&&a.classList.remove("fr-draggable");else if(a&&a.nodeType==Node.ELEMENT_NODE)for(var c=a.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),d=0;d<c.length;d++)aa(c[d])}function ba(){if(L(),"IMG"==b.el.tagName&&b.$el.addClass("fr-view"),b.events.$on(b.$el,b.helpers.isMobile()&&!b.helpers.isWindowsPhone()?"touchend":"click","IMG"==b.el.tagName?null:'img:not([contenteditable="false"])',fa),b.helpers.isMobile()&&(b.events.$on(b.$el,"touchstart","IMG"==b.el.tagName?null:'img:not([contenteditable="false"])',function(){La=!1}),b.events.$on(b.$el,"touchmove",function(){La=!0})),b.$wp?(b.events.on("window.keydown keydown",_,!0),b.events.on("keyup",function(b){if(b.which==a.FE.KEYCODE.ENTER)return!1},!0)):b.events.$on(b.$win,"keydown",_),b.events.on("toolbar.esc",function(){if(xa){if(b.$wp)b.events.disableBlur(),b.events.focus();else{var a=xa;ga(!0),b.selection.setAfter(a.get(0)),b.selection.restore()}return!1}},!0),b.events.on("toolbar.focusEditor",function(){if(xa)return!1},!0),b.events.on("window.cut window.copy",function(a){xa&&b.popups.isVisible("image.edit")&&!b.popups.get("image.edit").find(":focus").length&&(ta(),b.paste.saveCopiedText(xa.get(0).outerHTML,"\n"),"copy"==a.type?setTimeout(function(){w(xa)}):(ga(!0),b.undo.saveStep(),setTimeout(function(){b.undo.saveStep()},0)))},!0),b.events.$on(a(b.o_win),"keydown",function(b){var c=b.which;if(xa&&c==a.FE.KEYCODE.BACKSPACE)return b.preventDefault(),!1}),b.events.$on(b.$win,"keydown",function(b){var c=b.which;xa&&xa.hasClass("fr-uploading")&&c==a.FE.KEYCODE.ESC&&xa.trigger("abortUpload")}),b.events.on("destroy",function(){xa&&xa.hasClass("fr-uploading")&&xa.trigger("abortUpload")}),b.events.on("paste.before",da),b.events.on("paste.beforeCleanup",ea),b.events.on("paste.after",ca),b.events.on("html.set",i),b.events.on("html.inserted",i),i(),b.events.on("destroy",function(){Ka=[]}),b.events.on("html.processGet",aa),b.opts.imageOutputSize){var c;b.events.on("html.beforeGet",function(){c=b.el.querySelectorAll("img");for(var d=0;d<c.length;d++){var e=c[d].style.width||a(c[d]).width(),f=c[d].style.height||a(c[d]).height();e&&c[d].setAttribute("width",(""+e).replace(/px/,"")),f&&c[d].setAttribute("height",(""+f).replace(/px/,""))}}),b.events.on("html.afterGet",function(){for(var a=0;a<c.length;a++)c[a].removeAttribute("width"),c[a].removeAttribute("height")})}b.opts.iframe&&b.events.on("image.loaded",b.size.syncIframe),b.$wp&&(j(),b.events.on("contentChanged",j)),b.events.$on(a(b.o_win),"orientationchange.image",function(){setTimeout(function(){xa&&w(xa)},100)}),q(!0),M(!0),T(!0),P(!0),b.events.on("node.remove",function(a){if("IMG"==a.get(0).tagName)return $(a),!1})}function ca(){b.opts.imagePaste?b.$el.find("img[data-fr-image-pasted]").each(function(c,d){if(b.opts.imagePasteProcess){var f=b.opts.imageDefaultWidth;f&&"auto"!=f&&(f+=b.opts.imageResizeWithPercent?"%":"px"),a(d).css("width",f),a(d).removeClass("fr-dii fr-dib fr-fir fr-fil").addClass((b.opts.imageDefaultDisplay?"fr-di"+b.opts.imageDefaultDisplay[0]:"")+(b.opts.imageDefaultAlign&&"center"!=b.opts.imageDefaultAlign?" fr-fi"+b.opts.imageDefaultAlign[0]:""))}if(0===d.src.indexOf("data:")){if(b.events.trigger("image.beforePasteUpload",[d])===!1)return!1;xa=a(d),k(),e(),sa(),r(),b.edit.off();for(var g=atob(a(d).attr("src").split(",")[1]),h=[],i=0;i<g.length;i++)h.push(g.charCodeAt(i));var j=new Blob([new Uint8Array(h)],{type:"image/jpeg"});H([j],a(d)),a(d).removeAttr("data-fr-image-pasted")}else 0!==d.src.indexOf("http")||0===d.src.indexOf("https://mail.google.com/mail")?(b.selection.save(),a(d).remove(),b.selection.restore()):a(d).removeAttr("data-fr-image-pasted")}):b.$el.find("img[data-fr-image-pasted]").remove()}function da(a){if(a&&a.clipboardData&&a.clipboardData.items&&a.clipboardData.items[0]){var c=a.clipboardData.items[0].getAsFile();if(c){var d=new FileReader;return d.onload=function(a){var c=a.target.result,d=b.opts.imageDefaultWidth;d&&"auto"!=d&&(d+=b.opts.imageResizeWithPercent?"%":"px"),b.html.insert('<img data-fr-image-pasted="true" class="'+(b.opts.imageDefaultDisplay?"fr-di"+b.opts.imageDefaultDisplay[0]:"")+(b.opts.imageDefaultAlign&&"center"!=b.opts.imageDefaultAlign?" fr-fi"+b.opts.imageDefaultAlign[0]:"")+'" src="'+c+'"'+(d?' style="width: '+d+';"':"")+">"),b.events.trigger("paste.after")},d.readAsDataURL(c),!1}}}function ea(a){return a=a.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fa(c){if("false"==a(this).parents("[contenteditable]:not(.fr-element):not(body):first").attr("contenteditable"))return!0;if(c&&"touchend"==c.type&&La)return!0;if(c&&b.edit.isDisabled())return c.stopPropagation(),c.preventDefault(),!1;for(var d=0;d<a.FE.INSTANCES.length;d++)a.FE.INSTANCES[d]!=b&&a.FE.INSTANCES[d].events.trigger("image.hideResizer");b.toolbar.disable(),c&&(c.stopPropagation(),c.preventDefault()),b.helpers.isMobile()&&(b.events.disableBlur(),b.$el.blur(),b.events.enableBlur()),b.opts.iframe&&b.size.syncIframe(),xa=a(this),ta(),k(),e(),b.selection.clear(),b.button.bulkRefresh(),b.events.trigger("video.hideResizer")}function ga(a){xa&&(ja()||a===!0)&&(b.toolbar.enable(),ya.removeClass("fr-active"),b.popups.hide("image.edit"),xa=null,ia())}function ha(){Ma=!0}function ia(){Ma=!1}function ja(){return Ma}function ka(a,c,d){!b.opts.htmlUntouched&&b.opts.useClasses?(a.removeClass("fr-fil fr-fir fr-dib fr-dii"),a.addClass("fr-fi"+d[0]+" fr-di"+c[0])):"inline"==c?(a.css({display:"inline-block",verticalAlign:"bottom",margin:b.opts.imageDefaultMargin}),"center"==d?a.css({float:"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - "+2*b.opts.imageDefaultMargin+"px)"}):"left"==d?a.css({float:"left",marginLeft:0,maxWidth:"calc(100% - "+b.opts.imageDefaultMargin+"px)"}):a.css({float:"right",marginRight:0,maxWidth:"calc(100% - "+b.opts.imageDefaultMargin+"px)"})):"block"==c&&(a.css({display:"block",float:"none",verticalAlign:"top",margin:b.opts.imageDefaultMargin+"px auto"}),"left"==d?a.css({marginLeft:0}):"right"==d&&a.css({marginRight:0}))}function la(a){xa.removeClass("fr-fir fr-fil"),!b.opts.htmlUntouched&&b.opts.useClasses?"left"==a?xa.addClass("fr-fil"):"right"==a&&xa.addClass("fr-fir"):ka(xa,na(),a),k(),e()}function ma(a){if("undefined"==typeof a&&(a=xa),a){if(a.hasClass("fr-fil"))return"left";if(a.hasClass("fr-fir"))return"right";if(a.hasClass("fr-dib")||a.hasClass("fr-dii"))return"center";var b=a.css("float");if(a.css("float","none"),"block"==a.css("display")){if(a.css("float",""),a.css("float")!=b&&a.css("float",b),0===parseInt(a.css("margin-left"),10))return"left";if(0===parseInt(a.css("margin-right"),10))return"right"}else{if(a.css("float",""),a.css("float")!=b&&a.css("float",b),
|
8
|
+
"left"==a.css("float"))return"left";if("right"==a.css("float"))return"right"}}return"center"}function na(a){"undefined"==typeof a&&(a=xa);var b=a.css("float");return a.css("float","none"),"block"==a.css("display")?(a.css("float",""),a.css("float")!=b&&a.css("float",b),"block"):(a.css("float",""),a.css("float")!=b&&a.css("float",b),"inline")}function oa(a){xa&&a.find("> *:first").replaceWith(b.icon.create("image-align-"+ma()))}function pa(a,b){xa&&b.find('.fr-command[data-param1="'+ma()+'"]').addClass("fr-active").attr("aria-selected",!0)}function qa(a){xa.removeClass("fr-dii fr-dib"),!b.opts.htmlUntouched&&b.opts.useClasses?"inline"==a?xa.addClass("fr-dii"):"block"==a&&xa.addClass("fr-dib"):ka(xa,a,ma()),k(),e()}function ra(a,b){xa&&b.find('.fr-command[data-param1="'+na()+'"]').addClass("fr-active").attr("aria-selected",!0)}function sa(){var a=b.popups.get("image.insert");a||(a=M()),b.popups.isVisible("image.insert")||(s(),b.popups.refresh("image.insert"),b.popups.setContainer("image.insert",b.$sc));var c=xa.offset().left+xa.width()/2,d=xa.offset().top+xa.height();b.popups.show("image.insert",c,d,xa.outerHeight())}function ta(){if(xa){b.selection.clear();var a=b.doc.createRange();a.selectNode(xa.get(0));var c=b.selection.get();c.addRange(a)}}function ua(){xa?(b.events.disableBlur(),a(".fr-popup input:focus").blur(),w(xa)):(b.events.disableBlur(),b.selection.restore(),b.events.enableBlur(),b.popups.hide("image.insert"),b.toolbar.showInline())}function va(){return xa}function wa(a,c,d){if("undefined"==typeof c&&(c=b.opts.imageStyles),"undefined"==typeof d&&(d=b.opts.imageMultipleStyles),!xa)return!1;if(!d){var e=Object.keys(c);e.splice(e.indexOf(a),1),xa.removeClass(e.join(" "))}"object"==typeof c[a]?(xa.removeAttr("style"),xa.css(c[a].style)):xa.toggleClass(a),w(xa)}var xa,ya,za,Aa,Ba=!1,Ca=1,Da=2,Ea=3,Fa=4,Ga=5,Ha=6,Ia=7,Ja={};Ja[Ca]="Image cannot be loaded from the passed link.",Ja[Da]="No link in upload response.",Ja[Ea]="Error during file upload.",Ja[Fa]="Parsing response failed.",Ja[Ga]="File is too large.",Ja[Ha]="Image file type is invalid.",Ja[Ia]="Files can be uploaded only to same domain in IE 8 and IE 9.";var Ka,La,Ma=!1;return{_init:ba,showInsertPopup:d,showLayer:V,refreshUploadButton:W,refreshByURLButton:X,upload:H,insertByURL:v,align:la,refreshAlign:oa,refreshAlignOnShow:pa,display:qa,refreshDisplayOnShow:ra,replace:sa,back:ua,get:va,insert:y,showProgressBar:r,remove:$,hideProgressBar:s,applyStyle:wa,showAltPopup:O,showSizePopup:S,setAlt:Q,setSize:U,exitEdit:ga,edit:w}},a.FE.DefineIcon("insertImage",{NAME:"image"}),a.FE.RegisterShortcut(a.FE.KEYCODE.P,"insertImage",null,"P"),a.FE.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),a.FE.DefineIcon("imageUpload",{NAME:"upload"}),a.FE.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(a){this.image.refreshUploadButton(a)}}),a.FE.DefineIcon("imageByURL",{NAME:"link"}),a.FE.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(a){this.image.refreshByURLButton(a)}}),a.FE.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(a){var b=this.image.get();b?a.text(this.language.translate("Replace")):a.text(this.language.translate("Insert"))}}),a.FE.DefineIcon("imageDisplay",{NAME:"star"}),a.FE.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(a,b){this.image.display(b)},refresh:function(a){this.opts.imageTextNear||a.addClass("fr-hidden")},refreshOnShow:function(a,b){this.image.refreshDisplayOnShow(a,b)}}),a.FE.DefineIcon("image-align",{NAME:"align-left"}),a.FE.DefineIcon("image-align-left",{NAME:"align-left"}),a.FE.DefineIcon("image-align-right",{NAME:"align-right"}),a.FE.DefineIcon("image-align-center",{NAME:"align-justify"}),a.FE.DefineIcon("imageAlign",{NAME:"align-justify"}),a.FE.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var b='<ul class="fr-dropdown-list" role="presentation">',c=a.FE.COMMANDS.imageAlign.options;for(var d in c)c.hasOwnProperty(d)&&(b+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'+d+'" title="'+this.language.translate(c[d])+'">'+this.icon.create("image-align-"+d)+'<span class="fr-sr-only">'+this.language.translate(c[d])+"</span></a></li>");return b+="</ul>"},callback:function(a,b){this.image.align(b)},refresh:function(a){this.image.refreshAlign(a)},refreshOnShow:function(a,b){this.image.refreshAlignOnShow(a,b)}}),a.FE.DefineIcon("imageReplace",{NAME:"exchange"}),a.FE.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),a.FE.DefineIcon("imageRemove",{NAME:"trash"}),a.FE.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),a.FE.DefineIcon("imageBack",{NAME:"arrow-left"}),a.FE.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(a){var b=this.image.get();b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FE.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),a.FE.DefineIcon("imageStyle",{NAME:"magic"}),a.FE.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',b=this.opts.imageStyles;for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];"object"==typeof d&&(d=d.title),a+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'+c+'">'+this.language.translate(d)+"</a></li>"}return a+="</ul>"},callback:function(a,b){this.image.applyStyle(b)},refreshOnShow:function(b,c){var d=this.image.get();d&&c.find(".fr-command").each(function(){var b=a(this).data("param1"),c=d.hasClass(b);a(this).toggleClass("fr-active",c).attr("aria-selected",c)})}}),a.FE.DefineIcon("imageAlt",{NAME:"info"}),a.FE.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternate Text",callback:function(){this.image.showAltPopup()}}),a.FE.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),a.FE.DefineIcon("imageSize",{NAME:"arrows-alt"}),a.FE.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),a.FE.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}})});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.5.
|
2
|
+
* froala_editor v2.5.1 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2017 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){a.extend(a.FE.DEFAULTS,{}),a.FE.URLRegEx
|
7
|
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){a.extend(a.FE.DEFAULTS,{}),a.FE.URLRegEx="(\\s|^|>)(((http|https|ftp|ftps)\\:\\/\\/)?[a-zA-Z0-9\\-\\.]+(\\.[a-zA-Z]{2,3})(:\\d*)?(\\/[^\\s<]*)?)(\\s|$|<)",a.FE.PLUGINS.url=function(b){function c(a){for(;a.parentNode;)if(a=a.parentNode,["A","BUTTON","TEXTAREA"].indexOf(a.tagName)>=0)return!0;return!1}function d(){for(var d,e=b.doc.createTreeWalker(b.el,NodeFilter.SHOW_TEXT,b.node.filter(function(b){return new RegExp(a.FE.URLRegEx,"gi").test(b.textContent.replace(/ /gi," "))&&!c(b)}),!1),f=[];e.nextNode();)d=e.currentNode,f.push(d);for(var g=0;g<f.length;g++){d=f[g];var h=null;b.opts.linkAlwaysNoFollow&&(h="nofollow"),b.opts.linkAlwaysBlank&&(h?h+=" noopener noreferrer":h="noopener noreferrer"),a(d).before(d.textContent.replace(new RegExp(a.FE.URLRegEx,"gi"),"$1<a"+(b.opts.linkAlwaysBlank?' target="_blank"':"")+(h?' rel="'+h+'"':"")+' href="$2">$2</a>$8')),d.parentNode.removeChild(d)}}function e(){b.events.on("paste.afterCleanup",function(c){if(new RegExp(a.FE.URLRegEx,"gi").test(c))return c.replace(new RegExp(a.FE.URLRegEx,"gi"),"$1<a"+(b.opts.linkAlwaysBlank?' target="_blank"':"")+(b.opts.linkAlwaysNoFollow?' rel="nofollow"':"")+' href="$2">$2</a>$8')}),b.events.on("keyup",function(c){var e=c.which;e!=a.FE.KEYCODE.ENTER&&e!=a.FE.KEYCODE.SPACE||d(b.node.contents(b.el))},!0),b.events.on("keydown",function(c){var d=c.which;if(d==a.FE.KEYCODE.ENTER){var e=b.selection.element();if(("A"==e.tagName||a(e).parents("a").length)&&b.selection.info(e).atEnd)return c.stopImmediatePropagation(),"A"!==e.tagName&&(e=a(e).parents("a")[0]),a(e).after(" "+a.FE.MARKERS),b.selection.restore(),!1}})}return{_init:e}}});
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.5.
|
2
|
+
* froala_editor v2.5.1 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2017 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){a.extend(a.FE.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),a.extend(a.FE.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","|","videoDisplay","videoAlign","videoSize"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadURL:"https://i.froala.com/upload"}),a.FE.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"//www.youtube.com/embed/$1",html:'<iframe width="640" height="360" src="{url}?wmode=opaque" frameborder="0" allowfullscreen></iframe>'},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?/i,url_text:"//player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>'},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"//www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>'},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>'},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"//rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>'},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&\/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&\/]+)\/?(?:[^_.&]+)?/g,url_text:"//play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>'}],a.FE.VIDEO_EMBED_REGEX=/^\W*((<iframe.*><\/iframe>)|(<embed.*>))\W*$/i,a.FE.PLUGINS.video=function(b){function c(){var a=b.popups.get("video.insert"),c=a.find(".fr-video-by-url-layer input");c.val("").trigger("change");var d=a.find(".fr-video-embed-layer textarea");d.val("").trigger("change"),d=a.find(".fr-video-upload-layer input"),d.val("").trigger("change")}function d(){var a=b.$tb.find('.fr-command[data-cmd="insertVideo"]'),c=b.popups.get("video.insert");if(c||(c=f()),o(),!c.hasClass("fr-active")){b.popups.refresh("video.insert"),b.popups.setContainer("video.insert",b.$tb);var d=a.offset().left+a.outerWidth()/2,e=a.offset().top+(b.opts.toolbarBottom?10:a.outerHeight()-10);b.popups.show("video.insert",d,e,a.outerHeight())}}function e(){var a=b.popups.get("video.edit");if(a||(a=T()),a){b.popups.setContainer("video.edit",b.$sc),b.popups.refresh("video.edit");var c=ra.find("iframe, embed, video"),d=c.offset().left+c.outerWidth()/2,e=c.offset().top+c.outerHeight();b.popups.show("video.edit",d,e,c.outerHeight())}}function f(a){if(a)return b.popups.onRefresh("video.insert",c),b.popups.onHide("image.insert",ea),!0;var d="";b.opts.videoInsertButtons.length>1&&(d='<div class="fr-buttons">'+b.button.buildList(b.opts.videoInsertButtons)+"</div>");var e="";b.opts.videoInsertButtons.indexOf("videoByURL")>=0&&(e='<div class="fr-video-by-url-layer fr-layer fr-active" id="fr-video-by-url-layer-'+b.id+'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-'+b.id+'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">'+b.language.translate("Insert")+"</button></div></div>");var f="";b.opts.videoInsertButtons.indexOf("videoEmbed")>=0&&(f='<div class="fr-video-embed-layer fr-layer" id="fr-video-embed-layer-'+b.id+'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text'+b.id+'" type="text" placeholder="'+b.language.translate("Embedded Code")+'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">'+b.language.translate("Insert")+"</button></div></div>");var g="";b.opts.videoInsertButtons.indexOf("videoUpload")>=0&&(g='<div class="fr-video-upload-layer fr-layer" id="fr-video-upload-layer-'+b.id+'"><strong>'+b.language.translate("Drop video")+"</strong><br>("+b.language.translate("or click")+')<div class="fr-form"><input type="file" accept="video/'+b.opts.videoAllowedTypes.join(", video/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-'+b.id+'" role="button"></div></div>');var h='<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>',i={buttons:d,by_url_layer:e,embed_layer:f,upload_layer:g,progress_bar:h},j=b.popups.create("video.insert",i);return Q(j),j}function g(a){var c,d,e=b.popups.get("video.insert");if(!ra&&!b.opts.toolbarInline){var f=b.$tb.find('.fr-command[data-cmd="insertVideo"]');c=f.offset().left+f.outerWidth()/2,d=f.offset().top+(b.opts.toolbarBottom?10:f.outerHeight()-10)}b.opts.toolbarInline&&(d=e.offset().top-b.helpers.getPX(e.css("margin-top")),e.hasClass("fr-above")&&(d+=e.outerHeight())),e.find(".fr-layer").removeClass("fr-active"),e.find(".fr-"+a+"-layer").addClass("fr-active"),b.popups.show("video.insert",c,d,0),b.accessibility.focusPopup(e)}function h(a){var c=b.popups.get("video.insert");c.find(".fr-video-by-url-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function i(a){var c=b.popups.get("video.insert");c.find(".fr-video-embed-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function j(a){var c=b.popups.get("video.insert");c.find(".fr-video-upload-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function k(a){b.events.focus(!0),b.selection.restore();var c=!1;ra&&(da(),c=!0),b.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video">'+a+"</span>",!1,b.opts.videoSplitHTML),b.popups.hide("video.insert");var d=b.$el.find(".fr-jiv");d.removeClass("fr-jiv"),fa(d,b.opts.videoDefaultDisplay,b.opts.videoDefaultAlign),d.toggleClass("fr-draggable",b.opts.videoMove),b.events.trigger(c?"video.replaced":"video.inserted",[d])}function l(){var c=a(this);b.popups.hide("video.insert"),c.removeClass("fr-uploading"),c.parent().next().is("br")&&c.parent().next().remove(),t(c.parent()),b.events.trigger("video.loaded",[c.parent()])}function m(a,c,d,e,f){b.edit.off(),p("Loading video"),c&&(a=b.helpers.sanitizeURL(a));var g=document.createElement("video");g.oncanplay=function(){var c,g;if(e){b.undo.canDo()||e.find("video").hasClass("fr-uploading")||b.undo.saveStep();var h=e.find("video").data("fr-old-src"),i=e.data("fr-replaced");e.data("fr-replaced",!1),b.$wp?(c=e.clone(),c.find("video").removeData("fr-old-src").removeClass("fr-uploading"),c.find("video").off("canplay"),h&&e.find("video").attr("src",h),e.replaceWith(c)):c=e;for(var j=c.find("video").get(0).attributes,k=0;k<j.length;k++){var m=j[k];0===m.nodeName.indexOf("data-")&&c.find("video").removeAttr(m.nodeName)}if("undefined"!=typeof d)for(g in d)d.hasOwnProperty(g)&&"link"!=g&&c.find("video").attr("data-"+g,d[g]);c.find("video").on("canplay",l),c.find("video").attr("src",a),b.edit.on(),H(),b.undo.saveStep(),b.$el.blur(),b.events.trigger(i?"video.replaced":"video.inserted",[c,f])}},g.onerror=function(){S(sa)},n("Loading video"),g.src=a}function n(a){var c=b.popups.get("video.insert");if(c||(c=f()),c.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),c.find(".fr-video-progress-bar-layer").addClass("fr-active"),c.find(".fr-buttons").hide(),ra){var d=ra.find("video");b.popups.setContainer("video.insert",b.$sc);var e=d.offset().left+d.width()/2,g=d.offset().top+d.height();b.popups.show("video.insert",e,g,d.outerHeight())}"undefined"==typeof a&&p("Uploading",0)}function o(a){var c=b.popups.get("video.insert");if(c&&(c.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),c.find(".fr-video-progress-bar-layer").removeClass("fr-active"),c.find(".fr-buttons").show(),a||b.$el.find("video.fr-error").length)){if(b.events.focus(),b.$el.find("video.fr-error").length&&(b.$el.find("video.fr-error").parent().remove(),b.undo.saveStep(),b.undo.run(),b.undo.dropRedo()),!b.$wp&&ra){var d=ra;K(!0),b.selection.setAfter(d.find("video").get(0)),b.selection.restore()}b.popups.hide("video.insert")}}function p(a,c){var d=b.popups.get("video.insert");if(d){var e=d.find(".fr-video-progress-bar-layer");e.find("h3").text(a+(c?" "+c+"%":"")),e.removeClass("fr-error"),c?(e.find("div").removeClass("fr-indeterminate"),e.find("div > span").css("width",c+"%")):e.find("div").addClass("fr-indeterminate")}}function q(a){n();var c=b.popups.get("video.insert"),d=c.find(".fr-video-progress-bar-layer");d.addClass("fr-error");var e=d.find("h3");e.text(a),b.events.disableBlur(),e.focus()}function r(c){if("undefined"==typeof c){var d=b.popups.get("video.insert");c=d.find('.fr-video-by-url-layer input[type="text"]').val()||""}var e=null;if(b.helpers.isURL(c))for(var f=0;f<a.FE.VIDEO_PROVIDERS.length;f++){var g=a.FE.VIDEO_PROVIDERS[f];if(g.test_regex.test(c)){e=c.replace(g.url_regex,g.url_text),e=g.html.replace(/\{url\}/,e);break}}e?k(e):b.events.trigger("video.linkError",[c])}function s(c){if("undefined"==typeof c){var d=b.popups.get("video.insert");c=d.find(".fr-video-embed-layer textarea").val()||""}0!==c.length&&a.FE.VIDEO_EMBED_REGEX.test(c)?k(c):b.events.trigger("video.codeError",[c])}function t(a){J.call(a.get(0))}function u(c){try{if(b.events.trigger("video.uploaded",[c],!0)===!1)return b.edit.on(),!1;var d=a.parseJSON(c);return d.link?d:(S(ta,c),!1)}catch(e){return S(va,c),!1}}function v(c){try{var d=a(c).find("Location").text(),e=a(c).find("Key").text();return b.events.trigger("video.uploadedToS3",[d,e,c],!0)===!1?(b.edit.on(),!1):d}catch(f){return S(va,c),!1}}function w(a){p("Loading video");var c=this.status,d=this.response,e=this.responseXML,f=this.responseText;try{if(b.opts.videoUploadToS3)if(201==c){var g=v(e);g&&m(g,!1,[],a,d||e)}else S(va,d||e);else if(c>=200&&c<300){var h=u(f);h&&m(h.link,!1,h,a,d||f)}else S(ua,d||f)}catch(i){S(va,d||f)}}function x(){S(va,this.response||this.responseText||this.responseXML)}function y(a){if(a.lengthComputable){var b=a.loaded/a.total*100|0;p("Uploading",b)}}function z(){b.edit.on(),o(!0)}function A(c,d,e){var f,g="";if(d&&"undefined"!=typeof d)for(f in d)d.hasOwnProperty(f)&&"link"!=f&&(g+=" data-"+f+'="'+d[f]+'"');var h=b.opts.videoDefaultWidth;h&&"auto"!=h&&(h+="px");var i=a('<span contenteditable="false" draggable="true" class="fr-video fr-dv'+b.opts.videoDefaultDisplay[0]+("center"!=b.opts.videoDefaultAlign?" fr-fv"+b.opts.videoDefaultAlign[0]:"")+'"><video src="'+c+'" '+g+(h?' style="width: '+h+';"':"")+'" controls>'+b.language.translate("Your browser does not support HTML5 video.")+"</video></span>");i.toggleClass("fr-draggable",b.opts.videoMove),i.find("video").on("canplay",e),b.edit.on(),b.events.focus(!0),b.selection.restore(),b.undo.saveStep(),b.opts.videoSplitHTML?b.markers.split():b.markers.insert();var j=b.$el.find(".fr-marker");return j.replaceWith(i),b.html.wrap(),b.selection.clear(),i}function B(c){if(!b.core.sameInstance(qa))return!0;c.preventDefault(),c.stopPropagation();var d=c.pageX||(c.originalEvent.touches?c.originalEvent.touches[0].pageX:null),e=c.pageY||(c.originalEvent.touches?c.originalEvent.touches[0].pageY:null);if(!d||!e)return!1;var f=b.$oel.get(0),g=f.ownerDocument,h=g.defaultView||g.parentWindow,i=h.location!=h.parent.location;i&&(d+=h.frameElement.offsetLeft+h.frameElement.clientLeft,e=c.clientY+h.frameElement.offsetTop+h.frameElement.clientTop),b.undo.canDo()||b.undo.saveStep(),pa=a(this),pa.data("start-x",d),pa.data("start-y",e),oa.show(),b.popups.hideAll(),M()}function C(a){if(!b.core.sameInstance(qa))return!0;if(pa){a.preventDefault();var c=a.pageX||(a.originalEvent.touches?a.originalEvent.touches[0].pageX:null),d=a.pageY||(a.originalEvent.touches?a.originalEvent.touches[0].pageY:null);if(!c||!d)return!1;var e=pa.data("start-x"),f=pa.data("start-y");pa.data("start-x",c),pa.data("start-y",d);var g=c-e,h=d-f,i=ra.find("iframe, embed, video"),j=i.width(),k=i.height();(pa.hasClass("fr-hnw")||pa.hasClass("fr-hsw"))&&(g=0-g),(pa.hasClass("fr-hnw")||pa.hasClass("fr-hne"))&&(h=0-h),i.css("width",j+g),i.css("height",k+h),i.removeAttr("width"),i.removeAttr("height"),I()}}function D(a){return!b.core.sameInstance(qa)||void(pa&&ra&&(a&&a.stopPropagation(),pa=null,oa.hide(),I(),e(),b.undo.saveStep()))}function E(a){return'<div class="fr-handler fr-h'+a+'"></div>'}function F(a,b,c,d){return a.pageX=b,a.pageY=b,B.call(this,a),a.pageX=a.pageX+c*Math.floor(Math.pow(1.1,d)),a.pageY=a.pageY+c*Math.floor(Math.pow(1.1,d)),C.call(this,a),D.call(this,a),++d}function G(){var c;if(b.shared.$video_resizer?(qa=b.shared.$video_resizer,oa=b.shared.$vid_overlay,b.events.on("destroy",function(){qa.removeClass("fr-active").appendTo(a("body"))},!0)):(b.shared.$video_resizer=a('<div class="fr-video-resizer"></div>'),qa=b.shared.$video_resizer,b.events.$on(qa,"mousedown",function(a){a.stopPropagation()},!0),b.opts.videoResize&&(qa.append(E("nw")+E("ne")+E("sw")+E("se")),b.shared.$vid_overlay=a('<div class="fr-video-overlay"></div>'),oa=b.shared.$vid_overlay,c=qa.get(0).ownerDocument,a(c).find("body").append(oa))),b.events.on("shared.destroy",function(){qa.html("").removeData().remove(),qa=null,b.opts.videoResize&&(oa.remove(),oa=null)},!0),b.helpers.isMobile()||b.events.$on(a(b.o_win),"resize.video",function(){K(!0)}),b.opts.videoResize){c=qa.get(0).ownerDocument,b.events.$on(qa,b._mousedown,".fr-handler",B),b.events.$on(a(c),b._mousemove,C),b.events.$on(a(c.defaultView||c.parentWindow),b._mouseup,D),b.events.$on(oa,"mouseleave",D);var d=1,e=null,f=0;b.events.on("keydown",function(c){if(ra){var g=navigator.userAgent.indexOf("Mac OS X")!=-1?c.metaKey:c.ctrlKey,h=c.which;(h!==e||c.timeStamp-f>200)&&(d=1),(h==a.FE.KEYCODE.EQUALS||b.browser.mozilla&&h==a.FE.KEYCODE.FF_EQUALS)&&g&&!c.altKey?d=F.call(this,c,1,1,d):(h==a.FE.KEYCODE.HYPHEN||b.browser.mozilla&&h==a.FE.KEYCODE.FF_HYPHEN)&&g&&!c.altKey&&(d=F.call(this,c,2,-1,d)),e=h,f=c.timeStamp}}),b.events.on("keyup",function(){d=1})}}function H(){var c,d=Array.prototype.slice.call(b.el.querySelectorAll("video")),e=[];for(c=0;c<d.length;c++)e.push(d[c].getAttribute("src")),a(d[c]).toggleClass("fr-draggable",b.opts.videoMove),""===d[c].getAttribute("class")&&d[c].removeAttribute("class"),""===d[c].getAttribute("style")&&d[c].removeAttribute("style");if(Aa)for(c=0;c<Aa.length;c++)e.indexOf(Aa[c].getAttribute("src"))<0&&b.events.trigger("video.removed",[a(Aa[c])]);Aa=d}function I(){qa||G(),(b.$wp||b.$sc).append(qa),qa.data("instance",b);var a=ra.find("iframe, embed, video");qa.css("top",(b.opts.iframe?a.offset().top-1:a.offset().top-b.$wp.offset().top-1)+b.$wp.scrollTop()).css("left",(b.opts.iframe?a.offset().left-1:a.offset().left-b.$wp.offset().left-1)+b.$wp.scrollLeft()).css("width",a.outerWidth()).css("height",a.height()).addClass("fr-active")}function J(c){if(c&&"touchend"==c.type&&Ba)return!0;if(c&&b.edit.isDisabled())return c.stopPropagation(),c.preventDefault(),!1;if(b.edit.isDisabled())return!1;for(var d=0;d<a.FE.INSTANCES.length;d++)a.FE.INSTANCES[d]!=b&&a.FE.INSTANCES[d].events.trigger("video.hideResizer");b.toolbar.disable(),b.helpers.isMobile()&&(b.events.disableBlur(),b.$el.blur(),b.events.enableBlur()),ra=a(this),a(this).addClass("fr-active"),b.opts.iframe&&b.size.syncIframe(),ka(),I(),e(),b.selection.clear(),b.button.bulkRefresh(),b.events.trigger("image.hideResizer")}function K(a){ra&&(N()||a===!0)&&(qa.removeClass("fr-active"),b.toolbar.enable(),ra.removeClass("fr-active"),ra=null,M())}function L(){b.shared.vid_exit_flag=!0}function M(){b.shared.vid_exit_flag=!1}function N(){return b.shared.vid_exit_flag}function O(c,d,e){function f(){var e=a(this);e.off("canplay"),e.addClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),b.placeholder.refresh(),e.parent().is(ra)||t(e.parent()),I(),n(),b.edit.off(),c.onload=function(){w.call(c,e.parent())},c.onerror=x,c.upload.onprogress=y,c.onabort=z,e.off("abortUpload").on("abortUpload",function(){4!=c.readyState&&c.abort()}),c.send(d)}var g,h=new FileReader;h.addEventListener("load",function(){for(var a=h.result,c=atob(h.result.split(",")[1]),d=[],e=0;e<c.length;e++)d.push(c.charCodeAt(e));if(a=window.URL.createObjectURL(new Blob([new Uint8Array(d)],{type:"video/mp4"})),ra){ra.data("fr-replaced",!0);var i=ra.find("video");i.length?(i.on("canplay",f),b.edit.on(),b.undo.saveStep(),i.data("fr-old-src",i.attr("src")),i.attr("src",a)):(da(),g=A(a,null,f))}else g=A(a,null,f)},!1),h.readAsDataURL(e)}function P(a){if("undefined"!=typeof a&&a.length>0){if(b.events.trigger("video.beforeUpload",[a])===!1)return!1;var c=a[0];if(c.size>b.opts.videoMaxSize)return S(wa),!1;if(b.opts.videoAllowedTypes.indexOf(c.type.replace(/video\//g,""))<0)return S(xa),!1;var d;if(b.drag_support.formdata&&(d=b.drag_support.formdata?new FormData:null),d){var e;if(b.opts.videoUploadToS3!==!1){d.append("key",b.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(c.name||"untitled")),d.append("success_action_status","201"),d.append("X-Requested-With","xhr"),d.append("Content-Type",c.type);for(e in b.opts.videoUploadToS3.params)b.opts.videoUploadToS3.params.hasOwnProperty(e)&&d.append(e,b.opts.videoUploadToS3.params[e])}for(e in b.opts.videoUploadParams)b.opts.videoUploadParams.hasOwnProperty(e)&&d.append(e,b.opts.videoUploadParams[e]);d.append(b.opts.videoUploadParam,c);var f=b.opts.videoUploadURL;b.opts.videoUploadToS3&&(f=b.opts.videoUploadToS3.uploadURL?b.opts.videoUploadToS3.uploadURL:"https://"+b.opts.videoUploadToS3.region+".amazonaws.com/"+b.opts.videoUploadToS3.bucket);var g=b.core.getXHR(f,b.opts.videoUploadMethod);O(g,d,c)}}}function Q(c){b.events.$on(c,"dragover dragenter",".fr-video-upload-layer",function(){return a(this).addClass("fr-drop"),!1}),b.events.$on(c,"dragleave dragend",".fr-video-upload-layer",function(){return a(this).removeClass("fr-drop"),!1}),b.events.$on(c,"drop",".fr-upload-upload-layer",function(d){d.preventDefault(),d.stopPropagation(),a(this).removeClass("fr-drop");var e=d.originalEvent.dataTransfer;if(e&&e.files){var f=c.data("instance")||b;f.events.disableBlur(),f.video.upload(e.files),f.events.enableBlur()}}),b.events.$on(c,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var d=c.data("instance")||b;d.events.disableBlur(),c.find("input:focus").blur(),d.events.enableBlur(),d.video.upload(this.files)}a(this).val("")})}function R(){b.events.on("mousedown window.mousedown",L),b.events.on("window.touchmove",M),b.events.on("mouseup window.mouseup",K),b.events.on("commands.mousedown",function(a){a.parents(".fr-toolbar").length>0&&K()}),b.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){K(!0)})}function S(a,c){b.edit.on(),ra&&ra.find("video").addClass("fr-error"),q(b.language.translate("Something went wrong. Please try again.")),b.events.trigger("video.error",[{code:a,message:za[a]},c])}function T(){var a="";if(b.opts.videoEditButtons.length>0){a+='<div class="fr-buttons">',a+=b.button.buildList(b.opts.videoEditButtons),a+="</div>";var c={buttons:a},d=b.popups.create("video.edit",c);return b.events.$on(b.$wp,"scroll.video-edit",function(){ra&&b.popups.isVisible("video.edit")&&(b.events.disableBlur(),t(ra))}),d}return!1}function U(){if(ra){var a=b.popups.get("video.size"),c=ra.find("iframe, embed, video");a.find('input[name="width"]').val(c.get(0).style.width||c.attr("width")).trigger("change"),a.find('input[name="height"]').val(c.get(0).style.height||c.attr("height")).trigger("change")}}function V(){var a=b.popups.get("video.size");a||(a=W()),o(),b.popups.refresh("video.size"),b.popups.setContainer("video.size",b.$sc);var c=ra.find("iframe, embed, video"),d=c.offset().left+c.width()/2,e=c.offset().top+c.height();b.popups.show("video.size",d,e,c.height())}function W(a){if(a)return b.popups.onRefresh("video.size",U),!0;var c="";c='<div class="fr-buttons">'+b.button.buildList(b.opts.videoSizeButtons)+"</div>";var d="";d='<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'+b.id+'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-'+b.id+'" type="text" name="width" placeholder="'+b.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-'+b.id+'" type="text" name="height" placeholder="'+b.language.translate("Height")+'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">'+b.language.translate("Update")+"</button></div></div>";var e={buttons:c,size_layer:d},f=b.popups.create("video.size",e);return b.events.$on(b.$wp,"scroll",function(){ra&&b.popups.isVisible("video.size")&&(b.events.disableBlur(),t(ra))}),f}function X(a){if("undefined"==typeof a&&(a=ra),a){if(a.hasClass("fr-fvl"))return"left";if(a.hasClass("fr-fvr"))return"right";if(a.hasClass("fr-dvb")||a.hasClass("fr-dvi"))return"center";if("block"==a.css("display")){if("left"==a.css("text-algin"))return"left";if("right"==a.css("text-align"))return"right"}else{if("left"==a.css("float"))return"left";if("right"==a.css("float"))return"right"}}return"center"}function Y(a){ra.removeClass("fr-fvr fr-fvl"),!b.opts.htmlUntouched&&b.opts.useClasses?"left"==a?ra.addClass("fr-fvl"):"right"==a&&ra.addClass("fr-fvr"):fa(ra,_(),a),I(),e()}function Z(a){return!!ra&&void a.find("> *:first").replaceWith(b.icon.create("video-align-"+X()))}function $(a,b){ra&&b.find('.fr-command[data-param1="'+X()+'"]').addClass("fr-active").attr("aria-selected",!0)}function _(a){"undefined"==typeof a&&(a=ra);var b=a.css("float");return a.css("float","none"),"block"==a.css("display")?(a.css("float",""),a.css("float")!=b&&a.css("float",b),"block"):(a.css("float",""),a.css("float")!=b&&a.css("float",b),"inline")}function aa(a){ra.removeClass("fr-dvi fr-dvb"),!b.opts.htmlUntouched&&b.opts.useClasses?"inline"==a?ra.addClass("fr-dvi"):"block"==a&&ra.addClass("fr-dvb"):fa(ra,a,X()),I(),e()}function ba(a,b){ra&&b.find('.fr-command[data-param1="'+_()+'"]').addClass("fr-active").attr("aria-selected",!0)}function ca(){var a=b.popups.get("video.insert");a||(a=f()),b.popups.isVisible("video.insert")||(o(),b.popups.refresh("video.insert"),b.popups.setContainer("video.insert",b.$sc));var c=ra.offset().left+ra.width()/2,d=ra.offset().top+ra.height();b.popups.show("video.insert",c,d,ra.outerHeight())}function da(){if(ra&&b.events.trigger("video.beforeRemove",[ra])!==!1){var a=ra;b.popups.hideAll(),K(!0),b.selection.setBefore(a.get(0))||b.selection.setAfter(a.get(0)),a.remove(),b.selection.restore(),b.html.fillEmptyBlocks(),b.events.trigger("video.removed",[a])}}function ea(){o()}function fa(a,c,d){!b.opts.htmlUntouched&&b.opts.useClasses?(a.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),a.addClass("fr-fv"+d[0]+" fr-dv"+c[0])):"inline"==c?(a.css({display:"inline-block"}),"center"==d?a.css({float:"none"}):"left"==d?a.css({float:"left"}):a.css({float:"right"})):(a.css({display:"block",clear:"both"}),"left"==d?a.css({textAlign:"left"}):"right"==d?a.css({textAlign:"right"}):a.css({textAlign:"center"}))}function ga(a){a.hasClass("fr-dvi")||a.hasClass("fr-dvb")||(a.addClass("fr-fi"+X(a)[0]),a.addClass("fr-di"+_(a)[0]))}function ha(a){var b=a.hasClass("fr-dvb")?"block":a.hasClass("fr-dvi")?"inline":null,c=a.hasClass("fr-fvl")?"left":a.hasClass("fr-fvr")?"right":X(a);fa(a,b,c),a.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl")}function ia(){b.$el.find("video").filter(function(){return 0===a(this).parents("span.fr-video").length}).wrap('<span class="fr-video" contenteditable="false"></span>'),b.$el.find("embed, iframe").filter(function(){if(b.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),a(this).parents("span.fr-video").length>0)return!1;for(var c=a(this).attr("src"),d=0;d<a.FE.VIDEO_PROVIDERS.length;d++){var e=a.FE.VIDEO_PROVIDERS[d];if(e.test_regex.test(c))return!0}return!1}).map(function(){return 0===a(this).parents("object").length?this:a(this).parents("object").get(0)}).wrap('<span class="fr-video" contenteditable="false"></span>');for(var c=b.$el.find("span.fr-video, video"),d=0;d<c.length;d++){var e=a(c[d]);!b.opts.htmlUntouched&&b.opts.useClasses?(ga(e),b.opts.videoTextNear||e.removeClass("fr-dvi").addClass("fr-dvb")):b.opts.htmlUntouched||b.opts.useClasses||ha(e)}c.toggleClass("fr-draggable",b.opts.videoMove)}function ja(){R(),b.helpers.isMobile()&&(b.events.$on(b.$el,"touchstart","span.fr-video",function(){Ba=!1}),b.events.$on(b.$el,"touchmove",function(){Ba=!0})),b.events.on("html.set",ia),ia(),b.events.$on(b.$el,"mousedown","span.fr-video",function(a){a.stopPropagation()}),b.events.$on(b.$el,"click touchend","span.fr-video",J),b.events.on("keydown",function(c){var d=c.which;return!ra||d!=a.FE.KEYCODE.BACKSPACE&&d!=a.FE.KEYCODE.DELETE?ra&&d==a.FE.KEYCODE.ESC?(K(!0),c.preventDefault(),!1):ra&&d!=a.FE.KEYCODE.F10&&!b.keys.isBrowserAction(c)?(c.preventDefault(),!1):void 0:(c.preventDefault(),da(),!1)},!0),b.events.on("toolbar.esc",function(){if(ra)return b.events.disableBlur(),b.events.focus(),!1},!0),b.events.on("toolbar.focusEditor",function(){if(ra)return!1},!0),b.events.on("keydown",function(){b.$el.find("span.fr-video:empty").remove()}),f(!0),W(!0)}function ka(){if(ra){b.selection.clear();var a=b.doc.createRange();a.selectNode(ra.get(0));var c=b.selection.get();c.addRange(a)}}function la(){ra?(b.events.disableBlur(),ra.trigger("click")):(b.events.disableBlur(),b.selection.restore(),b.events.enableBlur(),b.popups.hide("video.insert"),b.toolbar.showInline())}function ma(a,c){if(ra){var d=b.popups.get("video.size"),e=ra.find("iframe, embed, video");e.css("width",a||d.find('input[name="width"]').val()),e.css("height",c||d.find('input[name="height"]').val()),e.get(0).style.width&&e.removeAttr("width"),e.get(0).style.height&&e.removeAttr("height"),d.find("input:focus").blur(),setTimeout(function(){ra.trigger("click")},b.helpers.isAndroid()?50:0)}}function na(){return ra}var oa,pa,qa,ra,sa=1,ta=2,ua=3,va=4,wa=5,xa=6,ya=7,za={};za[sa]="Video cannot be loaded from the passed link.",za[ta]="No link in upload response.",za[ua]="Error during file upload.",za[va]="Parsing response failed.",za[wa]="File is too large.",za[xa]="Video file type is invalid.",za[ya]="Files can be uploaded only to same domain in IE 8 and IE 9.";var Aa,Ba;return b.shared.vid_exit_flag=!1,{_init:ja,showInsertPopup:d,showLayer:g,refreshByURLButton:h,refreshEmbedButton:i,refreshUploadButton:j,upload:P,insertByURL:r,insertEmbed:s,insert:k,align:Y,refreshAlign:Z,refreshAlignOnShow:$,display:aa,refreshDisplayOnShow:ba,remove:da,hideProgressBar:o,showSizePopup:V,replace:ca,back:la,setSize:ma,get:na}},a.FE.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),a.FE.DefineIcon("insertVideo",{NAME:"video-camera"}),a.FE.DefineIcon("videoByURL",{NAME:"link"}),a.FE.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(a){this.video.refreshByURLButton(a)}}),a.FE.DefineIcon("videoEmbed",{NAME:"code"}),a.FE.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(a){this.video.refreshEmbedButton(a)}}),a.FE.DefineIcon("videoUpload",{NAME:"upload"}),a.FE.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(a){this.video.refreshUploadButton(a)}}),a.FE.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),a.FE.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),a.FE.DefineIcon("videoDisplay",{NAME:"star"}),a.FE.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(a,b){this.video.display(b)},refresh:function(a){this.opts.videoTextNear||a.addClass("fr-hidden")},refreshOnShow:function(a,b){this.video.refreshDisplayOnShow(a,b)}}),a.FE.DefineIcon("video-align",{NAME:"align-left"}),a.FE.DefineIcon("video-align-left",{NAME:"align-left"}),a.FE.DefineIcon("video-align-right",{NAME:"align-right"}),a.FE.DefineIcon("video-align-center",{NAME:"align-justify"}),a.FE.DefineIcon("videoAlign",{NAME:"align-center"}),a.FE.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var b='<ul class="fr-dropdown-list" role="presentation">',c=a.FE.COMMANDS.videoAlign.options;for(var d in c)c.hasOwnProperty(d)&&(b+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'+d+'" title="'+this.language.translate(c[d])+'">'+this.icon.create("video-align-"+d)+'<span class="fr-sr-only">'+this.language.translate(c[d])+"</span></a></li>");return b+="</ul>"},callback:function(a,b){this.video.align(b)},refresh:function(a){this.video.refreshAlign(a)},refreshOnShow:function(a,b){this.video.refreshAlignOnShow(a,b)}}),a.FE.DefineIcon("videoReplace",{NAME:"exchange"}),a.FE.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),a.FE.DefineIcon("videoRemove",{NAME:"trash"}),a.FE.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),a.FE.DefineIcon("videoSize",{NAME:"arrows-alt"}),a.FE.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),a.FE.DefineIcon("videoBack",{NAME:"arrow-left"}),a.FE.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(a){var b=this.video.get();b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FE.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0);
|
8
|
-
}}),a.FE.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})});
|
7
|
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){a.extend(a.FE.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),a.extend(a.FE.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","|","videoDisplay","videoAlign","videoSize"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadURL:"https://i.froala.com/upload"}),a.FE.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"//www.youtube.com/embed/$1",html:'<iframe width="640" height="360" src="{url}?wmode=opaque" frameborder="0" allowfullscreen></iframe>'},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?/i,url_text:"//player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>'},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"//www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>'},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>'},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"//rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>'},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"//play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>'}],a.FE.VIDEO_EMBED_REGEX=/^\W*((<iframe.*><\/iframe>)|(<embed.*>))\W*$/i,a.FE.PLUGINS.video=function(b){function c(){var a=b.popups.get("video.insert"),c=a.find(".fr-video-by-url-layer input");c.val("").trigger("change");var d=a.find(".fr-video-embed-layer textarea");d.val("").trigger("change"),d=a.find(".fr-video-upload-layer input"),d.val("").trigger("change")}function d(){var a=b.$tb.find('.fr-command[data-cmd="insertVideo"]'),c=b.popups.get("video.insert");if(c||(c=f()),o(),!c.hasClass("fr-active")){b.popups.refresh("video.insert"),b.popups.setContainer("video.insert",b.$tb);var d=a.offset().left+a.outerWidth()/2,e=a.offset().top+(b.opts.toolbarBottom?10:a.outerHeight()-10);b.popups.show("video.insert",d,e,a.outerHeight())}}function e(){var a=b.popups.get("video.edit");if(a||(a=T()),a){b.popups.setContainer("video.edit",b.$sc),b.popups.refresh("video.edit");var c=ra.find("iframe, embed, video"),d=c.offset().left+c.outerWidth()/2,e=c.offset().top+c.outerHeight();b.popups.show("video.edit",d,e,c.outerHeight())}}function f(a){if(a)return b.popups.onRefresh("video.insert",c),b.popups.onHide("image.insert",ea),!0;var d="";b.opts.videoInsertButtons.length>1&&(d='<div class="fr-buttons">'+b.button.buildList(b.opts.videoInsertButtons)+"</div>");var e,f="",g=b.opts.videoInsertButtons.indexOf("videoUpload"),h=b.opts.videoInsertButtons.indexOf("videoByURL"),i=b.opts.videoInsertButtons.indexOf("videoEmbed");h>=0&&(e=" fr-active",(h>g&&g>=0||h>i&&i>=0)&&(e=""),f='<div class="fr-video-by-url-layer fr-layer'+e+'" id="fr-video-by-url-layer-'+b.id+'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-'+b.id+'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">'+b.language.translate("Insert")+"</button></div></div>");var j="";i>=0&&(e=" fr-active",(i>g&&g>=0||i>h&&h>=0)&&(e=""),j='<div class="fr-video-embed-layer fr-layer'+e+'" id="fr-video-embed-layer-'+b.id+'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text'+b.id+'" type="text" placeholder="'+b.language.translate("Embedded Code")+'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">'+b.language.translate("Insert")+"</button></div></div>");var k="";g>=0&&(e=" fr-active",(g>i&&i>=0||g>h&&h>=0)&&(e=""),k='<div class="fr-video-upload-layer fr-layer'+e+'" id="fr-video-upload-layer-'+b.id+'"><strong>'+b.language.translate("Drop video")+"</strong><br>("+b.language.translate("or click")+')<div class="fr-form"><input type="file" accept="video/'+b.opts.videoAllowedTypes.join(", video/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-'+b.id+'" role="button"></div></div>');var l='<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>',m={buttons:d,by_url_layer:f,embed_layer:j,upload_layer:k,progress_bar:l},n=b.popups.create("video.insert",m);return Q(n),n}function g(a){var c,d,e=b.popups.get("video.insert");if(!ra&&!b.opts.toolbarInline){var f=b.$tb.find('.fr-command[data-cmd="insertVideo"]');c=f.offset().left+f.outerWidth()/2,d=f.offset().top+(b.opts.toolbarBottom?10:f.outerHeight()-10)}b.opts.toolbarInline&&(d=e.offset().top-b.helpers.getPX(e.css("margin-top")),e.hasClass("fr-above")&&(d+=e.outerHeight())),e.find(".fr-layer").removeClass("fr-active"),e.find(".fr-"+a+"-layer").addClass("fr-active"),b.popups.show("video.insert",c,d,0),b.accessibility.focusPopup(e)}function h(a){var c=b.popups.get("video.insert");c.find(".fr-video-by-url-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function i(a){var c=b.popups.get("video.insert");c.find(".fr-video-embed-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function j(a){var c=b.popups.get("video.insert");c.find(".fr-video-upload-layer").hasClass("fr-active")&&a.addClass("fr-active").attr("aria-pressed",!0)}function k(a){b.events.focus(!0),b.selection.restore();var c=!1;ra&&(da(),c=!0),b.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video">'+a+"</span>",!1,b.opts.videoSplitHTML),b.popups.hide("video.insert");var d=b.$el.find(".fr-jiv");d.removeClass("fr-jiv"),fa(d,b.opts.videoDefaultDisplay,b.opts.videoDefaultAlign),d.toggleClass("fr-draggable",b.opts.videoMove),b.events.trigger(c?"video.replaced":"video.inserted",[d])}function l(){var c=a(this);b.popups.hide("video.insert"),c.removeClass("fr-uploading"),c.parent().next().is("br")&&c.parent().next().remove(),t(c.parent()),b.events.trigger("video.loaded",[c.parent()])}function m(a,c,d,e,f){b.edit.off(),p("Loading video"),c&&(a=b.helpers.sanitizeURL(a));var g=document.createElement("video");g.oncanplay=function(){var c,g;if(e){b.undo.canDo()||e.find("video").hasClass("fr-uploading")||b.undo.saveStep();var h=e.find("video").data("fr-old-src"),i=e.data("fr-replaced");e.data("fr-replaced",!1),b.$wp?(c=e.clone(),c.find("video").removeData("fr-old-src").removeClass("fr-uploading"),c.find("video").off("canplay"),h&&e.find("video").attr("src",h),e.replaceWith(c)):c=e;for(var j=c.find("video").get(0).attributes,k=0;k<j.length;k++){var m=j[k];0===m.nodeName.indexOf("data-")&&c.find("video").removeAttr(m.nodeName)}if("undefined"!=typeof d)for(g in d)d.hasOwnProperty(g)&&"link"!=g&&c.find("video").attr("data-"+g,d[g]);c.find("video").on("canplay",l),c.find("video").attr("src",a),b.edit.on(),H(),b.undo.saveStep(),b.$el.blur(),b.events.trigger(i?"video.replaced":"video.inserted",[c,f])}else c=A(a,d,l),H(),b.undo.saveStep(),b.events.trigger("video.inserted",[c,f])},g.onerror=function(){S(sa)},n("Loading video"),g.src=a}function n(a){var c=b.popups.get("video.insert");if(c||(c=f()),c.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),c.find(".fr-video-progress-bar-layer").addClass("fr-active"),c.find(".fr-buttons").hide(),ra){var d=ra.find("video");b.popups.setContainer("video.insert",b.$sc);var e=d.offset().left+d.width()/2,g=d.offset().top+d.height();b.popups.show("video.insert",e,g,d.outerHeight())}"undefined"==typeof a&&p("Uploading",0)}function o(a){var c=b.popups.get("video.insert");if(c&&(c.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),c.find(".fr-video-progress-bar-layer").removeClass("fr-active"),c.find(".fr-buttons").show(),a||b.$el.find("video.fr-error").length)){if(b.events.focus(),b.$el.find("video.fr-error").length&&(b.$el.find("video.fr-error").parent().remove(),b.undo.saveStep(),b.undo.run(),b.undo.dropRedo()),!b.$wp&&ra){var d=ra;K(!0),b.selection.setAfter(d.find("video").get(0)),b.selection.restore()}b.popups.hide("video.insert")}}function p(a,c){var d=b.popups.get("video.insert");if(d){var e=d.find(".fr-video-progress-bar-layer");e.find("h3").text(a+(c?" "+c+"%":"")),e.removeClass("fr-error"),c?(e.find("div").removeClass("fr-indeterminate"),e.find("div > span").css("width",c+"%")):e.find("div").addClass("fr-indeterminate")}}function q(a){n();var c=b.popups.get("video.insert"),d=c.find(".fr-video-progress-bar-layer");d.addClass("fr-error");var e=d.find("h3");e.text(a),b.events.disableBlur(),e.focus()}function r(c){if("undefined"==typeof c){var d=b.popups.get("video.insert");c=d.find('.fr-video-by-url-layer input[type="text"]').val()||""}var e=null;if(b.helpers.isURL(c))for(var f=0;f<a.FE.VIDEO_PROVIDERS.length;f++){var g=a.FE.VIDEO_PROVIDERS[f];if(g.test_regex.test(c)){e=c.replace(g.url_regex,g.url_text),e=g.html.replace(/\{url\}/,e);break}}e?k(e):b.events.trigger("video.linkError",[c])}function s(c){if("undefined"==typeof c){var d=b.popups.get("video.insert");c=d.find(".fr-video-embed-layer textarea").val()||""}0!==c.length&&a.FE.VIDEO_EMBED_REGEX.test(c)?k(c):b.events.trigger("video.codeError",[c])}function t(a){J.call(a.get(0))}function u(c){try{if(b.events.trigger("video.uploaded",[c],!0)===!1)return b.edit.on(),!1;var d=a.parseJSON(c);return d.link?d:(S(ta,c),!1)}catch(e){return S(va,c),!1}}function v(c){try{var d=a(c).find("Location").text(),e=a(c).find("Key").text();return b.events.trigger("video.uploadedToS3",[d,e,c],!0)===!1?(b.edit.on(),!1):d}catch(f){return S(va,c),!1}}function w(a){p("Loading video");var c=this.status,d=this.response,e=this.responseXML,f=this.responseText;try{if(b.opts.videoUploadToS3)if(201==c){var g=v(e);g&&m(g,!1,[],a,d||e)}else S(va,d||e);else if(c>=200&&c<300){var h=u(f);h&&m(h.link,!1,h,a,d||f)}else S(ua,d||f)}catch(i){S(va,d||f)}}function x(){S(va,this.response||this.responseText||this.responseXML)}function y(a){if(a.lengthComputable){var b=a.loaded/a.total*100|0;p("Uploading",b)}}function z(){b.edit.on(),o(!0)}function A(c,d,e){var f,g="";if(d&&"undefined"!=typeof d)for(f in d)d.hasOwnProperty(f)&&"link"!=f&&(g+=" data-"+f+'="'+d[f]+'"');var h=b.opts.videoDefaultWidth;h&&"auto"!=h&&(h+="px");var i=a('<span contenteditable="false" draggable="true" class="fr-video fr-dv'+b.opts.videoDefaultDisplay[0]+("center"!=b.opts.videoDefaultAlign?" fr-fv"+b.opts.videoDefaultAlign[0]:"")+'"><video src="'+c+'" '+g+(h?' style="width: '+h+';"':"")+'" controls>'+b.language.translate("Your browser does not support HTML5 video.")+"</video></span>");i.toggleClass("fr-draggable",b.opts.videoMove),i.find("video").on("canplay",e),b.edit.on(),b.events.focus(!0),b.selection.restore(),b.undo.saveStep(),b.opts.videoSplitHTML?b.markers.split():b.markers.insert();var j=b.$el.find(".fr-marker");return b.node.isLastSibling(j)&&j.parent().hasClass("fr-deletable")&&j.insertAfter(j.parent()),j.replaceWith(i),b.html.wrap(),b.selection.clear(),i}function B(c){if(!b.core.sameInstance(qa))return!0;c.preventDefault(),c.stopPropagation();var d=c.pageX||(c.originalEvent.touches?c.originalEvent.touches[0].pageX:null),e=c.pageY||(c.originalEvent.touches?c.originalEvent.touches[0].pageY:null);if(!d||!e)return!1;if("mousedown"==c.type){var f=b.$oel.get(0),g=f.ownerDocument,h=g.defaultView||g.parentWindow,i=h.location!=h.parent.location;i&&(d+=b.helpers.getPX(a(h.frameElement).offset().left)+h.frameElement.clientLeft,e=c.clientY+b.helpers.getPX(a(h.frameElement).offset().top)+h.frameElement.clientTop)}b.undo.canDo()||b.undo.saveStep(),pa=a(this),pa.data("start-x",d),pa.data("start-y",e),oa.show(),b.popups.hideAll(),M()}function C(a){if(!b.core.sameInstance(qa))return!0;if(pa){a.preventDefault();var c=a.pageX||(a.originalEvent.touches?a.originalEvent.touches[0].pageX:null),d=a.pageY||(a.originalEvent.touches?a.originalEvent.touches[0].pageY:null);if(!c||!d)return!1;var e=pa.data("start-x"),f=pa.data("start-y");pa.data("start-x",c),pa.data("start-y",d);var g=c-e,h=d-f,i=ra.find("iframe, embed, video"),j=i.width(),k=i.height();(pa.hasClass("fr-hnw")||pa.hasClass("fr-hsw"))&&(g=0-g),(pa.hasClass("fr-hnw")||pa.hasClass("fr-hne"))&&(h=0-h),i.css("width",j+g),i.css("height",k+h),i.removeAttr("width"),i.removeAttr("height"),I()}}function D(a){return!b.core.sameInstance(qa)||void(pa&&ra&&(a&&a.stopPropagation(),pa=null,oa.hide(),I(),e(),b.undo.saveStep()))}function E(a){return'<div class="fr-handler fr-h'+a+'"></div>'}function F(a,b,c,d){return a.pageX=b,a.pageY=b,B.call(this,a),a.pageX=a.pageX+c*Math.floor(Math.pow(1.1,d)),a.pageY=a.pageY+c*Math.floor(Math.pow(1.1,d)),C.call(this,a),D.call(this,a),++d}function G(){var c;if(b.shared.$video_resizer?(qa=b.shared.$video_resizer,oa=b.shared.$vid_overlay,b.events.on("destroy",function(){qa.removeClass("fr-active").appendTo(a("body"))},!0)):(b.shared.$video_resizer=a('<div class="fr-video-resizer"></div>'),qa=b.shared.$video_resizer,b.events.$on(qa,"mousedown",function(a){a.stopPropagation()},!0),b.opts.videoResize&&(qa.append(E("nw")+E("ne")+E("sw")+E("se")),b.shared.$vid_overlay=a('<div class="fr-video-overlay"></div>'),oa=b.shared.$vid_overlay,c=qa.get(0).ownerDocument,a(c).find("body").append(oa))),b.events.on("shared.destroy",function(){qa.html("").removeData().remove(),qa=null,b.opts.videoResize&&(oa.remove(),oa=null)},!0),b.helpers.isMobile()||b.events.$on(a(b.o_win),"resize.video",function(){K(!0)}),b.opts.videoResize){c=qa.get(0).ownerDocument,b.events.$on(qa,b._mousedown,".fr-handler",B),b.events.$on(a(c),b._mousemove,C),b.events.$on(a(c.defaultView||c.parentWindow),b._mouseup,D),b.events.$on(oa,"mouseleave",D);var d=1,e=null,f=0;b.events.on("keydown",function(c){if(ra){var g=navigator.userAgent.indexOf("Mac OS X")!=-1?c.metaKey:c.ctrlKey,h=c.which;(h!==e||c.timeStamp-f>200)&&(d=1),(h==a.FE.KEYCODE.EQUALS||b.browser.mozilla&&h==a.FE.KEYCODE.FF_EQUALS)&&g&&!c.altKey?d=F.call(this,c,1,1,d):(h==a.FE.KEYCODE.HYPHEN||b.browser.mozilla&&h==a.FE.KEYCODE.FF_HYPHEN)&&g&&!c.altKey&&(d=F.call(this,c,2,-1,d)),e=h,f=c.timeStamp}}),b.events.on("keyup",function(){d=1})}}function H(){var c,d=Array.prototype.slice.call(b.el.querySelectorAll("video")),e=[];for(c=0;c<d.length;c++)e.push(d[c].getAttribute("src")),a(d[c]).toggleClass("fr-draggable",b.opts.videoMove),""===d[c].getAttribute("class")&&d[c].removeAttribute("class"),""===d[c].getAttribute("style")&&d[c].removeAttribute("style");if(Aa)for(c=0;c<Aa.length;c++)e.indexOf(Aa[c].getAttribute("src"))<0&&b.events.trigger("video.removed",[a(Aa[c])]);Aa=d}function I(){qa||G(),(b.$wp||b.$sc).append(qa),qa.data("instance",b);var a=ra.find("iframe, embed, video");qa.css("top",(b.opts.iframe?a.offset().top-1:a.offset().top-b.$wp.offset().top-1)+b.$wp.scrollTop()).css("left",(b.opts.iframe?a.offset().left-1:a.offset().left-b.$wp.offset().left-1)+b.$wp.scrollLeft()).css("width",a.outerWidth()).css("height",a.height()).addClass("fr-active")}function J(c){if(c&&"touchend"==c.type&&Ba)return!0;if(c&&b.edit.isDisabled())return c.stopPropagation(),c.preventDefault(),!1;if(b.edit.isDisabled())return!1;for(var d=0;d<a.FE.INSTANCES.length;d++)a.FE.INSTANCES[d]!=b&&a.FE.INSTANCES[d].events.trigger("video.hideResizer");b.toolbar.disable(),b.helpers.isMobile()&&(b.events.disableBlur(),b.$el.blur(),b.events.enableBlur()),ra=a(this),a(this).addClass("fr-active"),b.opts.iframe&&b.size.syncIframe(),ka(),I(),e(),b.selection.clear(),b.button.bulkRefresh(),b.events.trigger("image.hideResizer")}function K(a){ra&&(N()||a===!0)&&(qa.removeClass("fr-active"),b.toolbar.enable(),ra.removeClass("fr-active"),ra=null,M())}function L(){b.shared.vid_exit_flag=!0}function M(){b.shared.vid_exit_flag=!1}function N(){return b.shared.vid_exit_flag}function O(c){var d=c.originalEvent.dataTransfer;if(d&&d.files&&d.files.length){var e=d.files[0];if(e&&e.type&&e.type.indexOf("video")!==-1){b.markers.remove(),b.markers.insertAtPoint(c.originalEvent),b.$el.find(".fr-marker").replaceWith(a.FE.MARKERS),b.popups.hideAll();var g=b.popups.get("video.insert");return g||(g=f()),b.popups.setContainer("video.insert",b.$sc),b.popups.show("video.insert",c.originalEvent.pageX,c.originalEvent.pageY),n(),b.opts.videoAllowedTypes.indexOf(e.type.replace(/video\//g,""))>=0?P(d.files):S(xa),c.preventDefault(),c.stopPropagation(),!1}}}function P(a){if("undefined"!=typeof a&&a.length>0){if(b.events.trigger("video.beforeUpload",[a])===!1)return!1;var c=a[0];if(c.size>b.opts.videoMaxSize)return S(wa),!1;if(b.opts.videoAllowedTypes.indexOf(c.type.replace(/video\//g,""))<0)return S(xa),!1;var d;if(b.drag_support.formdata&&(d=b.drag_support.formdata?new FormData:null),d){var e;if(b.opts.videoUploadToS3!==!1){d.append("key",b.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(c.name||"untitled")),d.append("success_action_status","201"),d.append("X-Requested-With","xhr"),d.append("Content-Type",c.type);for(e in b.opts.videoUploadToS3.params)b.opts.videoUploadToS3.params.hasOwnProperty(e)&&d.append(e,b.opts.videoUploadToS3.params[e])}for(e in b.opts.videoUploadParams)b.opts.videoUploadParams.hasOwnProperty(e)&&d.append(e,b.opts.videoUploadParams[e]);d.append(b.opts.videoUploadParam,c);var f=b.opts.videoUploadURL;b.opts.videoUploadToS3&&(f=b.opts.videoUploadToS3.uploadURL?b.opts.videoUploadToS3.uploadURL:"https://"+b.opts.videoUploadToS3.region+".amazonaws.com/"+b.opts.videoUploadToS3.bucket);var g=b.core.getXHR(f,b.opts.videoUploadMethod);g.onload=function(){w.call(g,ra)},g.onerror=x,g.upload.onprogress=y,g.onabort=z,n(),b.edit.off();var h=b.popups.get("video.insert");h&&h.off("abortUpload").on("abortUpload",function(){4!=g.readyState&&g.abort()}),g.send(d)}}}function Q(c){b.events.$on(c,"dragover dragenter",".fr-video-upload-layer",function(){return a(this).addClass("fr-drop"),!1}),b.events.$on(c,"dragleave dragend",".fr-video-upload-layer",function(){return a(this).removeClass("fr-drop"),!1}),b.events.$on(c,"drop",".fr-video-upload-layer",function(d){d.preventDefault(),d.stopPropagation(),a(this).removeClass("fr-drop");var e=d.originalEvent.dataTransfer;if(e&&e.files){var f=c.data("instance")||b;f.events.disableBlur(),f.video.upload(e.files),f.events.enableBlur()}}),b.events.$on(c,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var d=c.data("instance")||b;d.events.disableBlur(),c.find("input:focus").blur(),d.events.enableBlur(),d.video.upload(this.files)}a(this).val("")})}function R(){b.events.on("drop",O,!0),b.events.on("mousedown window.mousedown",L),b.events.on("window.touchmove",M),b.events.on("mouseup window.mouseup",K),b.events.on("commands.mousedown",function(a){a.parents(".fr-toolbar").length>0&&K()}),b.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){K(!0)})}function S(a,c){b.edit.on(),ra&&ra.find("video").addClass("fr-error"),q(b.language.translate("Something went wrong. Please try again.")),b.events.trigger("video.error",[{code:a,message:za[a]},c])}function T(){var a="";if(b.opts.videoEditButtons.length>0){a+='<div class="fr-buttons">',a+=b.button.buildList(b.opts.videoEditButtons),a+="</div>";var c={buttons:a},d=b.popups.create("video.edit",c);return b.events.$on(b.$wp,"scroll.video-edit",function(){ra&&b.popups.isVisible("video.edit")&&(b.events.disableBlur(),t(ra))}),d}return!1}function U(){if(ra){var a=b.popups.get("video.size"),c=ra.find("iframe, embed, video");a.find('input[name="width"]').val(c.get(0).style.width||c.attr("width")).trigger("change"),a.find('input[name="height"]').val(c.get(0).style.height||c.attr("height")).trigger("change")}}function V(){var a=b.popups.get("video.size");a||(a=W()),o(),b.popups.refresh("video.size"),b.popups.setContainer("video.size",b.$sc);var c=ra.find("iframe, embed, video"),d=c.offset().left+c.width()/2,e=c.offset().top+c.height();b.popups.show("video.size",d,e,c.height())}function W(a){if(a)return b.popups.onRefresh("video.size",U),!0;var c="";c='<div class="fr-buttons">'+b.button.buildList(b.opts.videoSizeButtons)+"</div>";var d="";d='<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'+b.id+'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-'+b.id+'" type="text" name="width" placeholder="'+b.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-'+b.id+'" type="text" name="height" placeholder="'+b.language.translate("Height")+'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">'+b.language.translate("Update")+"</button></div></div>";var e={buttons:c,size_layer:d},f=b.popups.create("video.size",e);return b.events.$on(b.$wp,"scroll",function(){ra&&b.popups.isVisible("video.size")&&(b.events.disableBlur(),t(ra))}),f}function X(a){if("undefined"==typeof a&&(a=ra),a){if(a.hasClass("fr-fvl"))return"left";if(a.hasClass("fr-fvr"))return"right";if(a.hasClass("fr-dvb")||a.hasClass("fr-dvi"))return"center";if("block"==a.css("display")){if("left"==a.css("text-algin"))return"left";if("right"==a.css("text-align"))return"right"}else{if("left"==a.css("float"))return"left";if("right"==a.css("float"))return"right"}}return"center"}function Y(a){ra.removeClass("fr-fvr fr-fvl"),!b.opts.htmlUntouched&&b.opts.useClasses?"left"==a?ra.addClass("fr-fvl"):"right"==a&&ra.addClass("fr-fvr"):fa(ra,_(),a),I(),e()}function Z(a){return!!ra&&void a.find("> *:first").replaceWith(b.icon.create("video-align-"+X()))}function $(a,b){ra&&b.find('.fr-command[data-param1="'+X()+'"]').addClass("fr-active").attr("aria-selected",!0)}function _(a){"undefined"==typeof a&&(a=ra);var b=a.css("float");return a.css("float","none"),"block"==a.css("display")?(a.css("float",""),a.css("float")!=b&&a.css("float",b),"block"):(a.css("float",""),a.css("float")!=b&&a.css("float",b),"inline")}function aa(a){ra.removeClass("fr-dvi fr-dvb"),!b.opts.htmlUntouched&&b.opts.useClasses?"inline"==a?ra.addClass("fr-dvi"):"block"==a&&ra.addClass("fr-dvb"):fa(ra,a,X()),I(),e()}function ba(a,b){ra&&b.find('.fr-command[data-param1="'+_()+'"]').addClass("fr-active").attr("aria-selected",!0)}function ca(){var a=b.popups.get("video.insert");a||(a=f()),b.popups.isVisible("video.insert")||(o(),b.popups.refresh("video.insert"),b.popups.setContainer("video.insert",b.$sc));var c=ra.offset().left+ra.width()/2,d=ra.offset().top+ra.height();b.popups.show("video.insert",c,d,ra.outerHeight())}function da(){if(ra&&b.events.trigger("video.beforeRemove",[ra])!==!1){var a=ra;b.popups.hideAll(),K(!0),b.selection.setBefore(a.get(0))||b.selection.setAfter(a.get(0)),a.remove(),b.selection.restore(),b.html.fillEmptyBlocks(),b.events.trigger("video.removed",[a])}}function ea(){o()}function fa(a,c,d){!b.opts.htmlUntouched&&b.opts.useClasses?(a.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),a.addClass("fr-fv"+d[0]+" fr-dv"+c[0])):"inline"==c?(a.css({display:"inline-block"}),"center"==d?a.css({float:"none"}):"left"==d?a.css({float:"left"}):a.css({float:"right"})):(a.css({display:"block",clear:"both"}),"left"==d?a.css({textAlign:"left"}):"right"==d?a.css({textAlign:"right"}):a.css({textAlign:"center"}))}function ga(a){a.hasClass("fr-dvi")||a.hasClass("fr-dvb")||(a.addClass("fr-fi"+X(a)[0]),a.addClass("fr-di"+_(a)[0]))}function ha(a){var b=a.hasClass("fr-dvb")?"block":a.hasClass("fr-dvi")?"inline":null,c=a.hasClass("fr-fvl")?"left":a.hasClass("fr-fvr")?"right":X(a);fa(a,b,c),a.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl")}function ia(){b.$el.find("video").filter(function(){return 0===a(this).parents("span.fr-video").length}).wrap('<span class="fr-video" contenteditable="false"></span>'),b.$el.find("embed, iframe").filter(function(){if(b.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),a(this).parents("span.fr-video").length>0)return!1;for(var c=a(this).attr("src"),d=0;d<a.FE.VIDEO_PROVIDERS.length;d++){var e=a.FE.VIDEO_PROVIDERS[d];if(e.test_regex.test(c))return!0}return!1}).map(function(){return 0===a(this).parents("object").length?this:a(this).parents("object").get(0)}).wrap('<span class="fr-video" contenteditable="false"></span>');for(var c=b.$el.find("span.fr-video, video"),d=0;d<c.length;d++){var e=a(c[d]);!b.opts.htmlUntouched&&b.opts.useClasses?(ga(e),b.opts.videoTextNear||e.removeClass("fr-dvi").addClass("fr-dvb")):b.opts.htmlUntouched||b.opts.useClasses||ha(e)}c.toggleClass("fr-draggable",b.opts.videoMove)}function ja(){R(),b.helpers.isMobile()&&(b.events.$on(b.$el,"touchstart","span.fr-video",function(){Ba=!1}),b.events.$on(b.$el,"touchmove",function(){Ba=!0})),b.events.on("html.set",ia),ia(),b.events.$on(b.$el,"mousedown","span.fr-video",function(a){a.stopPropagation()}),b.events.$on(b.$el,"click touchend","span.fr-video",J),b.events.on("keydown",function(c){var d=c.which;return!ra||d!=a.FE.KEYCODE.BACKSPACE&&d!=a.FE.KEYCODE.DELETE?ra&&d==a.FE.KEYCODE.ESC?(K(!0),c.preventDefault(),!1):ra&&d!=a.FE.KEYCODE.F10&&!b.keys.isBrowserAction(c)?(c.preventDefault(),!1):void 0:(c.preventDefault(),da(),!1)},!0),b.events.on("toolbar.esc",function(){if(ra)return b.events.disableBlur(),b.events.focus(),!1},!0),b.events.on("toolbar.focusEditor",function(){if(ra)return!1},!0),b.events.on("keydown",function(){b.$el.find("span.fr-video:empty").remove()}),f(!0),W(!0)}function ka(){if(ra){b.selection.clear();var a=b.doc.createRange();a.selectNode(ra.get(0));var c=b.selection.get();c.addRange(a)}}function la(){ra?(b.events.disableBlur(),ra.trigger("click")):(b.events.disableBlur(),b.selection.restore(),b.events.enableBlur(),b.popups.hide("video.insert"),b.toolbar.showInline())}function ma(a,c){if(ra){var d=b.popups.get("video.size"),e=ra.find("iframe, embed, video");e.css("width",a||d.find('input[name="width"]').val()),e.css("height",c||d.find('input[name="height"]').val()),e.get(0).style.width&&e.removeAttr("width"),e.get(0).style.height&&e.removeAttr("height"),d.find("input:focus").blur(),setTimeout(function(){ra.trigger("click")},b.helpers.isAndroid()?50:0)}}function na(){return ra}var oa,pa,qa,ra,sa=1,ta=2,ua=3,va=4,wa=5,xa=6,ya=7,za={};za[sa]="Video cannot be loaded from the passed link.",za[ta]="No link in upload response.",za[ua]="Error during file upload.",za[va]="Parsing response failed.",za[wa]="File is too large.",za[xa]="Video file type is invalid.",za[ya]="Files can be uploaded only to same domain in IE 8 and IE 9.";var Aa,Ba;return b.shared.vid_exit_flag=!1,{_init:ja,showInsertPopup:d,showLayer:g,refreshByURLButton:h,refreshEmbedButton:i,refreshUploadButton:j,upload:P,insertByURL:r,insertEmbed:s,insert:k,align:Y,refreshAlign:Z,refreshAlignOnShow:$,display:aa,refreshDisplayOnShow:ba,remove:da,hideProgressBar:o,showSizePopup:V,replace:ca,back:la,setSize:ma,get:na}},a.FE.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),a.FE.DefineIcon("insertVideo",{NAME:"video-camera"}),a.FE.DefineIcon("videoByURL",{NAME:"link"}),a.FE.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(a){this.video.refreshByURLButton(a)}}),a.FE.DefineIcon("videoEmbed",{NAME:"code"}),a.FE.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(a){this.video.refreshEmbedButton(a)}}),a.FE.DefineIcon("videoUpload",{NAME:"upload"}),a.FE.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(a){this.video.refreshUploadButton(a)}}),a.FE.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),a.FE.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),a.FE.DefineIcon("videoDisplay",{NAME:"star"}),a.FE.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(a,b){this.video.display(b)},refresh:function(a){this.opts.videoTextNear||a.addClass("fr-hidden")},refreshOnShow:function(a,b){this.video.refreshDisplayOnShow(a,b)}}),a.FE.DefineIcon("video-align",{NAME:"align-left"}),a.FE.DefineIcon("video-align-left",{NAME:"align-left"}),a.FE.DefineIcon("video-align-right",{NAME:"align-right"}),a.FE.DefineIcon("video-align-center",{NAME:"align-justify"}),a.FE.DefineIcon("videoAlign",{NAME:"align-center"}),a.FE.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var b='<ul class="fr-dropdown-list" role="presentation">',c=a.FE.COMMANDS.videoAlign.options;for(var d in c)c.hasOwnProperty(d)&&(b+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'+d+'" title="'+this.language.translate(c[d])+'">'+this.icon.create("video-align-"+d)+'<span class="fr-sr-only">'+this.language.translate(c[d])+"</span></a></li>");return b+="</ul>"},callback:function(a,b){this.video.align(b)},refresh:function(a){this.video.refreshAlign(a)},refreshOnShow:function(a,b){this.video.refreshAlignOnShow(a,b)}}),a.FE.DefineIcon("videoReplace",{NAME:"exchange"}),a.FE.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),a.FE.DefineIcon("videoRemove",{NAME:"trash"}),a.FE.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),a.FE.DefineIcon("videoSize",{NAME:"arrows-alt"}),a.FE.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),a.FE.DefineIcon("videoBack",{NAME:"arrow-left"}),a.FE.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back();
|
8
|
+
},refresh:function(a){var b=this.video.get();b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FE.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),a.FE.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.5.
|
2
|
+
* froala_editor v2.5.1 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2017 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){a.FE.PLUGINS.wordPaste=function(b){function c(){b.events.on("paste.beforeCleanup",function(a){return b.paste.isWord(a)&&(a=a.replace(/^\n*/g,"").replace(/^ /g,""),0===a.indexOf("<colgroup>")&&(a="<table>"+a+"</table>"),a=v(a,b.paste.getRtfClipboard()),a=b.paste.removeEmptyTags(a)),a})}function d(a,b){if(b(a))for(var c=a.firstChild;c;){var e=c,f=c.previousSibling;c=c.nextSibling,d(e,b),e.previousSibling||e.nextSibling||e.parentNode||!c||f==c.previousSibling||!c.parentNode?e.previousSibling||e.nextSibling||e.parentNode||!c||c.previousSibling||c.nextSibling||c.parentNode||(f?c=f.nextSibling?f.nextSibling.nextSibling:null:a.firstChild&&(c=a.firstChild.nextSibling)):c=f?f.nextSibling:a.firstChild}}function e(a){return a.nodeType==Node.ELEMENT_NODE&&a.getAttribute("style")&&a.getAttribute("style").replace(/\n/gi,"").indexOf("mso-list:Ignore")!=-1}function f(a){if(!a.getAttribute("style")||!/mso-list:[\s]*l/gi.test(a.getAttribute("style").replace(/\n/gi,"")))return!1;try{var b=a.firstElementChild.firstElementChild,c=b.firstElementChild?b.firstElementChild:null;if(!e(b)&&!e(c))return!1}catch(d){return!1}return!0}function g(a){return a.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function h(a,b){var c=a.cloneNode(!0);if(c.firstElementChild&&"A"==c.firstElementChild.tagName&&(c=c.firstElementChild),c.firstElementChild.remove(),["H1","H2","H3","H4","H5","H6"].indexOf(a.tagName)!=-1){var e=document.createElement(a.tagName.toLowerCase());e.setAttribute("style",a.getAttribute("style")),e.innerHTML=c.innerHTML,c.innerHTML=e.outerHTML}d(c,function(a){return a.nodeType==Node.ELEMENT_NODE&&t(a,null,b),!0});var f=c.innerHTML;return f=f.replace(/<!--[\s\S]*?-->/gi,"")}function i(a,b){var c=/[0-9a-zA-Z]./gi,d=!1;a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(d=d||c.test(a.firstElementChild.firstElementChild.firstChild.data),!d&&a.firstElementChild.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstElementChild.firstChild&&(d=d||c.test(a.firstElementChild.firstElementChild.firstElementChild.firstChild.data)));var e=d?"ol":"ul",j=g(a),k="<"+e+"><li>"+h(a,b),l=a.nextElementSibling,m=a.parentNode;for(a.remove(),a=null;l&&f(l);){var n=l.previousElementSibling,o=g(l);if(o>j)k+=i(l,b).outerHTML;else{if(o<j)break;k+="</li><li>"+h(l,b)}if(j=o,l.previousElementSibling||l.nextElementSibling||l.parentNode){var p=l;l=l.nextElementSibling,p.remove(),p=null}else l=n?n.nextElementSibling:m.firstElementChild}k+="</li></"+e+">";var q=document.createElement("div");q.innerHTML=k;var r=q.firstElementChild;return r}function j(a,b){for(var c=document.createElement(b),d=0;d<a.attributes.length;d++){var e=a.attributes[d].name;c.setAttribute(e,a.getAttribute(e))}return c.innerHTML=a.innerHTML,a.parentNode.replaceChild(c,a),c}function k(a){var b=null;if(a.firstElementChild&&(b=a.firstElementChild.tagName,["SPAN","STRONG","B","S","EM","U","SUB","SUP"].indexOf(b)!=-1)){if("TD"!=a.tagName)for(var c=a.firstElementChild;c;){if("SPAN"==c.tagName){o(c,a.getAttribute("style"));break}c=c.firstElementChild}}else if("DIV"!=b){var d=a.getAttribute("style"),e=document.createElement("span");d&&(d=n(d),e.setAttribute("style",d)),e.innerHTML=a.innerHTML,a.innerHTML=e.outerHTML}}function l(c,d){b.node.clearAttributes(c);for(var e=c.firstElementChild,g=0,h=!1,i=null;e;){e.firstElementChild&&e.firstElementChild.tagName.indexOf("W:")!=-1&&(e.innerHTML=e.firstElementChild.innerHTML),i=e.getAttribute("width"),i||h||(h=!0),g+=parseInt(i,10),(!e.firstChild||e.firstChild&&e.firstChild.data==a.FE.UNICODE_NBSP)&&(e.firstChild&&e.firstChild.remove(),e.innerHTML="<br>");for(var l=e.firstElementChild,p=1==e.children.length;l;){if("P"==l.tagName&&!f(l)){var r=null;1==l.children.length&&l.firstElementChild&&"SPAN"==l.firstElementChild.tagName?(r=l.firstElementChild,p||(r=j(r,"div")),p?o(e,l.getAttribute("style")):o(r,l.getAttribute("style")),e.replaceChild(r,l)):(r=j(l,p?"span":"div"),!p&&r.getAttribute("align")&&r.removeAttribute("align")),l=r,p&&m(l)}l=l.nextElementSibling}if(d){var s=e.getAttribute("class");if(s){s=n(s);var t=s.match(/xl[0-9]+/gi);if(t){var u=t[0],v="."+u;d[v]&&o(e,d[v])}}d.td&&o(e,d.td),k(e),q(e)}var w=e.getAttribute("style");w&&(w=n(w),w&&";"!=w.slice(-1)&&(w+=";"));var x=e.getAttribute("valign");if(!x&&w){var y=w.match(/vertical-align:.+?[; "]{1,1}/gi);y&&(x=y[y.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var z=null;if(w){var A=w.match(/text-align:.+?[; "]{1,1}/gi);A&&(z=A[A.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"==z&&(z=null)}var B=null;if(w){var C=w.match(/background:.+?[; "]{1,1}/gi);C&&(B=C[C.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var D=e.getAttribute("colspan");b.node.clearAttributes(e),D&&e.setAttribute("colspan",D),x&&(e.style["vertical-align"]=x),z&&(e.style["text-align"]=z),B&&(e.style["background-color"]=B),i&&e.setAttribute("width",i),e=e.nextElementSibling}for(e=c.firstElementChild;e;)i=e.getAttribute("width"),h?e.removeAttribute("width"):e.setAttribute("width",100*parseInt(i,10)/g+"%"),e=e.nextElementSibling}function m(a){var b=a.parentNode,c=a.getAttribute("align");c&&(b&&"TD"==b.tagName?(b.setAttribute("style",b.getAttribute("style")+"text-align:"+c+";"),a.removeAttribute("align")):(a.style["text-align"]=c,a.removeAttribute("align")))}function n(a){return a.replace(/\n|\r|\n\r|"/g,"")}function o(a,b,c){if(b){var d=a.getAttribute("style");d&&";"!=d.slice(-1)&&(d+=";"),b&&";"!=b.slice(-1)&&(b+=";"),b=b.replace(/\n/gi,"");var e=null;e=c?(d||"")+b:b+(d||""),a.setAttribute("style",e)}}function p(a){var b=a.getAttribute("style");if(b){b=n(b),b&&";"!=b.slice(-1)&&(b+=";");var c=b.match(/(^|\S+?):.+?;{1,1}/gi);if(c){for(var d={},e=0;e<c.length;e++){var f=c[e],g=f.split(":");2==g.length&&("text-align"==g[0]&&"SPAN"==a.tagName||(d[g[0]]=g[1]))}var h="";for(var i in d)if(d.hasOwnProperty(i)){if("font-size"==i&&"pt;"==d[i].slice(-3)){var j=null;try{j=parseFloat(d[i].slice(0,-3),10)}catch(k){}j&&(j=Math.round(1.33*j),d[i]=j+"px;")}h+=i+":"+d[i]}h&&a.setAttribute("style",h)}}}function q(a){var b=a.getAttribute("style");if(b){b=n(b);var c=b.match(/(^|;)font-weight:.+?[; "]{1,1}/gi),d=null;if(c&&(d=c[c.length-1].replace(/(^|;)font-weight:(.+?)[; "]{1,1}/gi,"$2")),d&&(d>=700||"bold"==d)){var e=document.createElement("strong");e.innerHTML=a.innerHTML,a.innerHTML=e.outerHTML}}}function r(a){for(var b=a.match(/[0-9a-f]{2}/gi),c=[],d=0;d<b.length;d++)c.push(String.fromCharCode(parseInt(b[d],16)));var e=c.join("");return btoa(e)}function s(a,b){if(b){var c=a.getAttribute("src");if(c&&c.indexOf("file://")!=-1){var d=a.getAttribute("v:shapes");if(d){if(d.indexOf("Picture")!=-1&&a.previousSibling){var e=a.previousSibling.previousSibling;if(!e)return;var f=e.data.split('o:spid="');if(2!=f.length)return;if(f=f[1].split('"'),f.length<2)return;d=f[0]}var g="hplid"+d.substring(8),h=b.split(g);if(!h||2==h.length){var i=h[1].split("bliptag");if(!(i&&i.length<2)){var j=null;if(i[0].indexOf("pngblip")!=-1?j="image/png":i[0].indexOf("jpegblip")!=-1&&(j="image/jpeg"),j){var k=i[1].split("}");if(!(k&&k.length<2)){var l=k[0].split(" ");if(!(l&&l.length<2)){l.shift();var m=l.join(""),n=r(m),o="data:"+j+";base64,"+n;a.setAttribute("src",o)}}}}}}}}}function t(c,d){var e=c.tagName,f=e.toLowerCase();c.firstElementChild&&("I"==c.firstElementChild.tagName?j(c.firstElementChild,"em"):"B"==c.firstElementChild.tagName&&j(c.firstElementChild,"strong"));var g=["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"];if(g.indexOf(e)!=-1)return c.remove(),!1;"O:P"==e&&" "==c.innerHTML&&(c.innerHTML=a.FE.INVISIBLE_SPACE);var h=-1,i=["META","LINK","XML","ST1:","O:","W:","FONT"];for(h=0;h<i.length;h++)if(e.indexOf(i[h])!=-1)return c.innerHTML?(c.outerHTML=c.innerHTML,c.remove(),!1):(c.remove(),!1);if("TD"!=e){var p=c.getAttribute("class");if(d&&p){p=n(p);var r=p.split(" ");for(h=0;h<r.length;h++){var s=r[h],t=[],u="."+s;t.push(u),u=f+u,t.push(u);for(var v=0;v<t.length;v++)d[t[v]]&&o(c,d[t[v]])}}d&&d[f]&&o(c,d[f])}var w=["P","H1","H2","H3","H4","H5","H6","PRE"];if(w.indexOf(e)!=-1){k(c),q(c);var x=c.getAttribute("style"),y=null;if(x){var z=x.match(/text-align:.+?[; "]{1,1}/gi);z&&(y=z[z.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1"))}y?c.setAttribute("style",y):c.removeAttribute("style")}if("P"==e&&m(c),"TR"==e&&l(c,d),c.getAttribute("class")&&c.getAttribute("class").toLowerCase().indexOf("mso")!=-1){var A=n(c.getAttribute("class"));A=A.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""),A?c.setAttribute("class",A):c.removeAttribute("class")}if("A"==e&&!c.attributes.getNamedItem("href")&&c.innerHTML&&(c.outerHTML=c.innerHTML),"TD"!=e&&"TH"!=e||c.innerHTML||(c.innerHTML="<br>"),"TABLE"==e&&(b.node.clearAttributes(c),c.setAttribute("style","width: 100%;")),c.getAttribute("lang")&&c.removeAttribute("lang"),c.getAttribute("style")&&c.getAttribute("style").toLowerCase().indexOf("mso")!=-1){var B=n(c.getAttribute("style"));B=B.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""),B?c.setAttribute("style",B):c.removeAttribute("style")}return!0}function u(a){var b={},c=a.getElementsByTagName("style");if(c.length)for(var d=c[0],e=d.innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi),f=0;f<e.length;f++){var g=e[f],h=g.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),i=g.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");h=h.replace(/^[\s]|[\s]$/gm,""),i=i.replace(/^[\s]|[\s]$/gm,""),h=h.replace(/\n|\r|\n\r/g,""),i=i.replace(/\n|\r|\n\r/g,"");for(var j=h.split(", "),k=0;k<j.length;k++)b[j[k]]=i}return b}function v(c,e){var g=new DOMParser,h=g.parseFromString(c,"text/html"),j=h.children[0],k=j.children[0],l=j.children[1],m=u(k);d(l,function(b){if(b.nodeType==Node.TEXT_NODE&&/\n/.test(b.data)){if(!/\S/.test(b.data))return b.data==a.FE.UNICODE_NBSP||(b.remove(),!1);b.data=b.data.replace(/\n/gi," ")}return!0}),d(l,function(a){return a.nodeType==Node.ELEMENT_NODE&&"IMG"==a.tagName&&s(a,e),!0}),d(l,function(a){if(a.nodeType==Node.TEXT_NODE)return a.data=a.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(a.nodeType==Node.ELEMENT_NODE){if(f(a)){var b=a.parentNode,c=a.previousSibling,d=i(a,e),g=null;return g=c?c.nextSibling:b.firstChild,g?b.insertBefore(d,g):b.appendChild(d),!1}return t(a,m,e)}return a.nodeType!=Node.COMMENT_NODE||(a.remove(),!1)}),d(l,function(a){if(a.nodeType==Node.ELEMENT_NODE){var b=a.tagName;if(!a.innerHTML&&["BR","IMG"].indexOf(b)==-1){for(var c=a.parentNode;c&&(a.remove(),a=c,!a.innerHTML);)c=a.parentNode;return!1}p(a)}return!0});var n=l.outerHTML,o=b.opts.htmlAllowedStyleProps;return b.opts.htmlAllowedStyleProps=b.opts.pasteAllowedStyleProps,n=b.clean.html(n,b.opts.pasteDeniedTags,b.opts.pasteDeniedAttrs,!1),b.opts.htmlAllowedStyleProps=o,n}return{_init:c}}});
|
7
|
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){a.extend(a.FE.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color"]}),a.FE.PLUGINS.wordPaste=function(b){function c(){b.events.on("paste.beforeCleanup",function(a){return b.paste.isWord(a)&&(a=a.replace(/^\n*/g,"").replace(/^ /g,""),0===a.indexOf("<colgroup>")&&(a="<table>"+a+"</table>"),a=w(a,b.paste.getRtfClipboard()),a=b.paste.removeEmptyTags(a)),a})}function d(a){var b=a.parentNode;b&&a.parentNode.removeChild(a)}function e(a,b){if(b(a))for(var c=a.firstChild;c;){var d=c,f=c.previousSibling;c=c.nextSibling,e(d,b),d.previousSibling||d.nextSibling||d.parentNode||!c||f==c.previousSibling||!c.parentNode?d.previousSibling||d.nextSibling||d.parentNode||!c||c.previousSibling||c.nextSibling||c.parentNode||(f?c=f.nextSibling?f.nextSibling.nextSibling:null:a.firstChild&&(c=a.firstChild.nextSibling)):c=f?f.nextSibling:a.firstChild}}function f(a){return a.nodeType==Node.ELEMENT_NODE&&a.getAttribute("style")&&a.getAttribute("style").replace(/\n/gi,"").indexOf("mso-list:Ignore")!=-1}function g(a){if(!a.getAttribute("style")||!/mso-list:[\s]*l/gi.test(a.getAttribute("style").replace(/\n/gi,"")))return!1;try{var b=a.firstElementChild.firstElementChild,c=b.firstElementChild?b.firstElementChild:null;if(!f(b)&&!f(c))return!1}catch(d){return!1}return!0}function h(a){return a.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function i(a,b){var c=a.cloneNode(!0);if(c.firstElementChild&&"A"==c.firstElementChild.tagName&&(c=c.firstElementChild),d(c.firstElementChild),["H1","H2","H3","H4","H5","H6"].indexOf(a.tagName)!=-1){var f=document.createElement(a.tagName.toLowerCase());f.setAttribute("style",a.getAttribute("style")),f.innerHTML=c.innerHTML,c.innerHTML=f.outerHTML}e(c,function(a){return a.nodeType==Node.ELEMENT_NODE&&u(a,null,b),!0});var g=c.innerHTML;return g=g.replace(/<!--[\s\S]*?-->/gi,"")}function j(a,b){var c=/[0-9a-zA-Z]./gi,e=!1;a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(e=e||c.test(a.firstElementChild.firstElementChild.firstChild.data),!e&&a.firstElementChild.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstElementChild.firstChild&&(e=e||c.test(a.firstElementChild.firstElementChild.firstElementChild.firstChild.data)));var f=e?"ol":"ul",k=h(a),l="<"+f+"><li>"+i(a,b),m=a.nextElementSibling,n=a.parentNode;for(d(a),a=null;m&&g(m);){var o=m.previousElementSibling,p=h(m);if(p>k)l+=j(m,b).outerHTML;else{if(p<k)break;l+="</li><li>"+i(m,b)}if(k=p,m.previousElementSibling||m.nextElementSibling||m.parentNode){var q=m;m=m.nextElementSibling,d(q),q=null}else m=o?o.nextElementSibling:n.firstElementChild}l+="</li></"+f+">";var r=document.createElement("div");r.innerHTML=l;var s=r.firstElementChild;return s}function k(a,b){for(var c=document.createElement(b),d=0;d<a.attributes.length;d++){var e=a.attributes[d].name;c.setAttribute(e,a.getAttribute(e))}return c.innerHTML=a.innerHTML,a.parentNode.replaceChild(c,a),c}function l(a){var b=null;if(a.firstElementChild&&(b=a.firstElementChild.tagName,["SPAN","STRONG","B","S","EM","U","SUB","SUP"].indexOf(b)!=-1)){if("TD"!=a.tagName)for(var c=a.firstElementChild;c;){if("SPAN"==c.tagName){p(c,a.getAttribute("style"));break}c=c.firstElementChild}}else if("DIV"!=b){var d=a.getAttribute("style"),e=document.createElement("span");d&&(d=o(d),e.setAttribute("style",d)),e.innerHTML=a.innerHTML,a.innerHTML=e.outerHTML}}function m(c,e){b.node.clearAttributes(c);for(var f=c.firstElementChild,h=0,i=!1,j=null;f;){f.firstElementChild&&f.firstElementChild.tagName.indexOf("W:")!=-1&&(f.innerHTML=f.firstElementChild.innerHTML),j=f.getAttribute("width"),j||i||(i=!0),h+=parseInt(j,10),(!f.firstChild||f.firstChild&&f.firstChild.data==a.FE.UNICODE_NBSP)&&(f.firstChild&&d(f.firstChild),f.innerHTML="<br>");for(var m=f.firstElementChild,q=1==f.children.length;m;){if("P"==m.tagName&&!g(m)){var s=null;1==m.children.length&&m.firstElementChild&&"SPAN"==m.firstElementChild.tagName?(s=m.firstElementChild,q||(s=k(s,"div")),q?p(f,m.getAttribute("style")):p(s,m.getAttribute("style")),f.replaceChild(s,m)):(s=k(m,q?"span":"div"),!q&&s.getAttribute("align")&&s.removeAttribute("align")),m=s,q&&n(m)}m=m.nextElementSibling}if(e){var t=f.getAttribute("class");if(t){t=o(t);var u=t.match(/xl[0-9]+/gi);if(u){var v=u[0],w="."+v;e[w]&&p(f,e[w])}}e.td&&p(f,e.td),l(f),r(f)}var x=f.getAttribute("style");x&&(x=o(x),x&&";"!=x.slice(-1)&&(x+=";"));var y=f.getAttribute("valign");if(!y&&x){var z=x.match(/vertical-align:.+?[; "]{1,1}/gi);z&&(y=z[z.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var A=null;if(x){var B=x.match(/text-align:.+?[; "]{1,1}/gi);B&&(A=B[B.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"==A&&(A=null)}var C=null;if(x){var D=x.match(/background:.+?[; "]{1,1}/gi);D&&(C=D[D.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var E=f.getAttribute("colspan");b.node.clearAttributes(f),E&&f.setAttribute("colspan",E),y&&(f.style["vertical-align"]=y),A&&(f.style["text-align"]=A),C&&(f.style["background-color"]=C),j&&f.setAttribute("width",j),f=f.nextElementSibling}for(f=c.firstElementChild;f;)j=f.getAttribute("width"),i?f.removeAttribute("width"):f.setAttribute("width",100*parseInt(j,10)/h+"%"),f=f.nextElementSibling}function n(a){var b=a.parentNode,c=a.getAttribute("align");c&&(b&&"TD"==b.tagName?(b.setAttribute("style",b.getAttribute("style")+"text-align:"+c+";"),a.removeAttribute("align")):(a.style["text-align"]=c,a.removeAttribute("align")))}function o(a){return a.replace(/\n|\r|\n\r|"/g,"")}function p(a,b,c){if(b){var d=a.getAttribute("style");d&&";"!=d.slice(-1)&&(d+=";"),b&&";"!=b.slice(-1)&&(b+=";"),b=b.replace(/\n/gi,"");var e=null;e=c?(d||"")+b:b+(d||""),a.setAttribute("style",e)}}function q(a){var b=a.getAttribute("style");if(b){b=o(b),b&&";"!=b.slice(-1)&&(b+=";");var c=b.match(/(^|\S+?):.+?;{1,1}/gi);if(c){for(var d={},e=0;e<c.length;e++){var f=c[e],g=f.split(":");2==g.length&&("text-align"==g[0]&&"SPAN"==a.tagName||(d[g[0]]=g[1]))}var h="";for(var i in d)if(d.hasOwnProperty(i)){if("font-size"==i&&"pt;"==d[i].slice(-3)){var j=null;try{j=parseFloat(d[i].slice(0,-3),10)}catch(k){}j&&(j=Math.round(1.33*j),d[i]=j+"px;")}h+=i+":"+d[i]}h&&a.setAttribute("style",h)}}}function r(a){var b=a.getAttribute("style");if(b){b=o(b);var c=b.match(/(^|;)font-weight:.+?[; "]{1,1}/gi),d=null;if(c&&(d=c[c.length-1].replace(/(^|;)font-weight:(.+?)[; "]{1,1}/gi,"$2")),d&&(d>=700||"bold"==d)){var e=document.createElement("strong");e.innerHTML=a.innerHTML,a.innerHTML=e.outerHTML}}}function s(a){for(var b=a.match(/[0-9a-f]{2}/gi),c=[],d=0;d<b.length;d++)c.push(String.fromCharCode(parseInt(b[d],16)));var e=c.join("");return btoa(e)}function t(a,b){if(b){var c=a.getAttribute("src");if(c&&c.indexOf("file://")!=-1){var d=a.getAttribute("v:shapes");if(d){if(d.indexOf("Picture")!=-1&&a.previousSibling){var e=a.previousSibling.previousSibling;if(!e)return;var f=e.data.split('o:spid="');if(2!=f.length)return;if(f=f[1].split('"'),f.length<2)return;d=f[0]}var g="hplid"+d.substring(8),h=b.split(g);if(!h||2==h.length){var i=h[1].split("bliptag");if(!(i&&i.length<2)){var j=null;if(i[0].indexOf("pngblip")!=-1?j="image/png":i[0].indexOf("jpegblip")!=-1&&(j="image/jpeg"),j){var k=i[1].split("}");if(!(k&&k.length<2)){var l;if(k.length>2&&k[0].indexOf("blipuid")!=-1)l=k[1].split(" ");else{if(l=k[0].split(" "),l&&l.length<2)return;l.shift()}var m=l.join(""),n=s(m),o="data:"+j+";base64,"+n;a.setAttribute("src",o)}}}}}}}}function u(c,e){var f=c.tagName,g=f.toLowerCase();c.firstElementChild&&("I"==c.firstElementChild.tagName?k(c.firstElementChild,"em"):"B"==c.firstElementChild.tagName&&k(c.firstElementChild,"strong"));var h=["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"];if(h.indexOf(f)!=-1)return d(c),!1;"O:P"==f&&" "==c.innerHTML&&(c.innerHTML=a.FE.INVISIBLE_SPACE);var i=-1,j=["META","LINK","XML","ST1:","O:","W:","FONT"];for(i=0;i<j.length;i++)if(f.indexOf(j[i])!=-1)return c.innerHTML?(c.outerHTML=c.innerHTML,d(c),!1):(d(c),!1);if("TD"!=f){var q=c.getAttribute("class");if(e&&q){q=o(q);var s=q.split(" ");for(i=0;i<s.length;i++){var t=s[i],u=[],v="."+t;u.push(v),v=g+v,u.push(v);for(var w=0;w<u.length;w++)e[u[w]]&&p(c,e[u[w]])}}e&&e[g]&&p(c,e[g])}var x=["P","H1","H2","H3","H4","H5","H6","PRE"];if(x.indexOf(f)!=-1){l(c),r(c);var y=c.getAttribute("style"),z=null;if(y){var A=y.match(/text-align:.+?[; "]{1,1}/gi);A&&(z=A[A.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1"))}z?c.setAttribute("style",z):c.removeAttribute("style")}if("P"==f&&n(c),"TR"==f&&m(c,e),c.getAttribute("class")&&c.getAttribute("class").toLowerCase().indexOf("mso")!=-1){var B=o(c.getAttribute("class"));B=B.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""),B?c.setAttribute("class",B):c.removeAttribute("class")}if("A"==f&&!c.attributes.getNamedItem("href")&&c.innerHTML&&(c.outerHTML=c.innerHTML),"TD"!=f&&"TH"!=f||c.innerHTML||(c.innerHTML="<br>"),"TABLE"==f&&(b.node.clearAttributes(c),c.setAttribute("style","width: 100%;")),c.getAttribute("lang")&&c.removeAttribute("lang"),c.getAttribute("style")&&c.getAttribute("style").toLowerCase().indexOf("mso")!=-1){var C=o(c.getAttribute("style"));C=C.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""),C?c.setAttribute("style",C):c.removeAttribute("style")}return!0}function v(a){var b={},c=a.getElementsByTagName("style");if(c.length){var d=c[0],e=d.innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(e)for(var f=0;f<e.length;f++){var g=e[f],h=g.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),i=g.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");h=h.replace(/^[\s]|[\s]$/gm,""),i=i.replace(/^[\s]|[\s]$/gm,""),h=h.replace(/\n|\r|\n\r/g,""),i=i.replace(/\n|\r|\n\r/g,"");for(var j=h.split(", "),k=0;k<j.length;k++)b[j[k]]=i}}return b}function w(c,f){c=c.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/gi,"$1");var h=new DOMParser,i=h.parseFromString(c,"text/html"),k=i.head,l=i.body,m=v(k);e(l,function(b){if(b.nodeType==Node.TEXT_NODE&&/\n/.test(b.data)){if(!/\S/.test(b.data))return b.data==a.FE.UNICODE_NBSP||(d(b),!1);b.data=b.data.replace(/\n/gi," ")}return!0}),e(l,function(a){return a.nodeType==Node.ELEMENT_NODE&&"IMG"==a.tagName&&t(a,f),!0}),e(l,function(a){if(a.nodeType==Node.TEXT_NODE)return a.data=a.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(a.nodeType==Node.ELEMENT_NODE){if(g(a)){var b=a.parentNode,c=a.previousSibling,e=j(a,f),h=null;return h=c?c.nextSibling:b.firstChild,h?b.insertBefore(e,h):b.appendChild(e),!1}return u(a,m,f)}return a.nodeType!=Node.COMMENT_NODE||(d(a),!1)}),e(l,function(a){if(a.nodeType==Node.ELEMENT_NODE){var b=a.tagName;if(!a.innerHTML&&["BR","IMG"].indexOf(b)==-1){for(var c=a.parentNode;c&&(d(a),a=c,!a.innerHTML);)c=a.parentNode;return!1}q(a)}return!0});var n=l.outerHTML,o=b.opts.htmlAllowedStyleProps;return b.opts.htmlAllowedStyleProps=b.opts.wordAllowedStyleProps,n=b.clean.html(n,b.opts.wordDeniedTags,b.opts.wordDeniedAttrs,!1),b.opts.htmlAllowedStyleProps=o,n}return{_init:c}}});
|
@@ -0,0 +1,1190 @@
|
|
1
|
+
/*!
|
2
|
+
* froala_editor v2.5.1 (https://www.froala.com/wysiwyg-editor)
|
3
|
+
* License https://froala.com/wysiwyg-editor/terms/
|
4
|
+
* Copyright 2014-2017 Froala Labs
|
5
|
+
*/
|
6
|
+
|
7
|
+
.clearfix::after {
|
8
|
+
clear: both;
|
9
|
+
display: block;
|
10
|
+
content: "";
|
11
|
+
height: 0;
|
12
|
+
}
|
13
|
+
.hide-by-clipping {
|
14
|
+
position: absolute;
|
15
|
+
width: 1px;
|
16
|
+
height: 1px;
|
17
|
+
padding: 0;
|
18
|
+
margin: -1px;
|
19
|
+
overflow: hidden;
|
20
|
+
clip: rect(0, 0, 0, 0);
|
21
|
+
border: 0;
|
22
|
+
}
|
23
|
+
.fr-element,
|
24
|
+
.fr-element:focus {
|
25
|
+
outline: 0px solid transparent;
|
26
|
+
}
|
27
|
+
.fr-box.fr-basic .fr-element {
|
28
|
+
color: #000000;
|
29
|
+
padding: 10px;
|
30
|
+
-webkit-box-sizing: border-box;
|
31
|
+
-moz-box-sizing: border-box;
|
32
|
+
box-sizing: border-box;
|
33
|
+
overflow-x: auto;
|
34
|
+
min-height: 40px;
|
35
|
+
}
|
36
|
+
.fr-element {
|
37
|
+
background: transparent;
|
38
|
+
position: relative;
|
39
|
+
z-index: 2;
|
40
|
+
-webkit-user-select: auto;
|
41
|
+
}
|
42
|
+
.fr-element a {
|
43
|
+
user-select: auto;
|
44
|
+
-o-user-select: auto;
|
45
|
+
-moz-user-select: auto;
|
46
|
+
-khtml-user-select: auto;
|
47
|
+
-webkit-user-select: auto;
|
48
|
+
-ms-user-select: auto;
|
49
|
+
}
|
50
|
+
.fr-element.fr-disabled {
|
51
|
+
user-select: none;
|
52
|
+
-o-user-select: none;
|
53
|
+
-moz-user-select: none;
|
54
|
+
-khtml-user-select: none;
|
55
|
+
-webkit-user-select: none;
|
56
|
+
-ms-user-select: none;
|
57
|
+
}
|
58
|
+
.fr-element [contenteditable="false"] {
|
59
|
+
user-select: none;
|
60
|
+
-o-user-select: none;
|
61
|
+
-moz-user-select: none;
|
62
|
+
-khtml-user-select: none;
|
63
|
+
-webkit-user-select: none;
|
64
|
+
-ms-user-select: none;
|
65
|
+
}
|
66
|
+
.fr-element [contenteditable="true"] {
|
67
|
+
outline: 0px solid transparent;
|
68
|
+
}
|
69
|
+
.fr-box a.fr-floating-btn {
|
70
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
71
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
72
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
73
|
+
border-radius: 100%;
|
74
|
+
-moz-border-radius: 100%;
|
75
|
+
-webkit-border-radius: 100%;
|
76
|
+
-moz-background-clip: padding;
|
77
|
+
-webkit-background-clip: padding-box;
|
78
|
+
background-clip: padding-box;
|
79
|
+
height: 32px;
|
80
|
+
width: 32px;
|
81
|
+
background: #ffffff;
|
82
|
+
color: #1e88e5;
|
83
|
+
-webkit-transition: background 0.2s ease 0s, color 0.2s ease 0s, transform 0.2s ease 0s;
|
84
|
+
-moz-transition: background 0.2s ease 0s, color 0.2s ease 0s, transform 0.2s ease 0s;
|
85
|
+
-ms-transition: background 0.2s ease 0s, color 0.2s ease 0s, transform 0.2s ease 0s;
|
86
|
+
-o-transition: background 0.2s ease 0s, color 0.2s ease 0s, transform 0.2s ease 0s;
|
87
|
+
outline: none;
|
88
|
+
left: 0;
|
89
|
+
top: 0;
|
90
|
+
line-height: 32px;
|
91
|
+
-webkit-transform: scale(0);
|
92
|
+
-moz-transform: scale(0);
|
93
|
+
-ms-transform: scale(0);
|
94
|
+
-o-transform: scale(0);
|
95
|
+
text-align: center;
|
96
|
+
display: block;
|
97
|
+
-webkit-box-sizing: border-box;
|
98
|
+
-moz-box-sizing: border-box;
|
99
|
+
box-sizing: border-box;
|
100
|
+
border: none;
|
101
|
+
}
|
102
|
+
.fr-box a.fr-floating-btn svg {
|
103
|
+
-webkit-transition: transform 0.2s ease 0s;
|
104
|
+
-moz-transition: transform 0.2s ease 0s;
|
105
|
+
-ms-transition: transform 0.2s ease 0s;
|
106
|
+
-o-transition: transform 0.2s ease 0s;
|
107
|
+
fill: #1e88e5;
|
108
|
+
}
|
109
|
+
.fr-box a.fr-floating-btn i {
|
110
|
+
font-size: 14px;
|
111
|
+
line-height: 32px;
|
112
|
+
}
|
113
|
+
.fr-box a.fr-floating-btn.fr-btn + .fr-btn {
|
114
|
+
margin-left: 10px;
|
115
|
+
}
|
116
|
+
.fr-box a.fr-floating-btn:hover {
|
117
|
+
background: #ebebeb;
|
118
|
+
cursor: pointer;
|
119
|
+
}
|
120
|
+
.fr-box a.fr-floating-btn:hover svg {
|
121
|
+
fill: #1e88e5;
|
122
|
+
}
|
123
|
+
.fr-box .fr-visible a.fr-floating-btn {
|
124
|
+
-webkit-transform: scale(1);
|
125
|
+
-moz-transform: scale(1);
|
126
|
+
-ms-transform: scale(1);
|
127
|
+
-o-transform: scale(1);
|
128
|
+
}
|
129
|
+
iframe.fr-iframe {
|
130
|
+
width: 100%;
|
131
|
+
border: none;
|
132
|
+
position: relative;
|
133
|
+
display: block;
|
134
|
+
z-index: 2;
|
135
|
+
-webkit-box-sizing: border-box;
|
136
|
+
-moz-box-sizing: border-box;
|
137
|
+
box-sizing: border-box;
|
138
|
+
}
|
139
|
+
.fr-wrapper {
|
140
|
+
position: relative;
|
141
|
+
z-index: 1;
|
142
|
+
}
|
143
|
+
.fr-wrapper::after {
|
144
|
+
clear: both;
|
145
|
+
display: block;
|
146
|
+
content: "";
|
147
|
+
height: 0;
|
148
|
+
}
|
149
|
+
.fr-wrapper .fr-placeholder {
|
150
|
+
position: absolute;
|
151
|
+
font-size: 12px;
|
152
|
+
color: #aaaaaa;
|
153
|
+
z-index: 1;
|
154
|
+
display: none;
|
155
|
+
top: 0;
|
156
|
+
left: 0;
|
157
|
+
right: 0;
|
158
|
+
overflow: hidden;
|
159
|
+
}
|
160
|
+
.fr-wrapper.show-placeholder .fr-placeholder {
|
161
|
+
display: block;
|
162
|
+
}
|
163
|
+
.fr-wrapper ::selection {
|
164
|
+
background: #b5d6fd;
|
165
|
+
color: #000000;
|
166
|
+
}
|
167
|
+
.fr-wrapper ::-moz-selection {
|
168
|
+
background: #b5d6fd;
|
169
|
+
color: #000000;
|
170
|
+
}
|
171
|
+
.fr-box.fr-basic .fr-wrapper {
|
172
|
+
background: #ffffff;
|
173
|
+
border: 0px;
|
174
|
+
border-top: 0;
|
175
|
+
top: 0;
|
176
|
+
left: 0;
|
177
|
+
}
|
178
|
+
.fr-box.fr-basic.fr-top .fr-wrapper {
|
179
|
+
border-top: 0;
|
180
|
+
border-radius: 0 0 2px 2px;
|
181
|
+
-moz-border-radius: 0 0 2px 2px;
|
182
|
+
-webkit-border-radius: 0 0 2px 2px;
|
183
|
+
-moz-background-clip: padding;
|
184
|
+
-webkit-background-clip: padding-box;
|
185
|
+
background-clip: padding-box;
|
186
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
187
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
188
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
189
|
+
}
|
190
|
+
.fr-box.fr-basic.fr-bottom .fr-wrapper {
|
191
|
+
border-bottom: 0;
|
192
|
+
border-radius: 2px 2px 0 0;
|
193
|
+
-moz-border-radius: 2px 2px 0 0;
|
194
|
+
-webkit-border-radius: 2px 2px 0 0;
|
195
|
+
-moz-background-clip: padding;
|
196
|
+
-webkit-background-clip: padding-box;
|
197
|
+
background-clip: padding-box;
|
198
|
+
-webkit-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 1px 1px rgba(0, 0, 0, 0.16);
|
199
|
+
-moz-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 1px 1px rgba(0, 0, 0, 0.16);
|
200
|
+
box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 1px 1px rgba(0, 0, 0, 0.16);
|
201
|
+
}
|
202
|
+
.fr-tooltip {
|
203
|
+
position: absolute;
|
204
|
+
top: 0;
|
205
|
+
left: 0;
|
206
|
+
padding: 0 8px;
|
207
|
+
border-radius: 2px;
|
208
|
+
-moz-border-radius: 2px;
|
209
|
+
-webkit-border-radius: 2px;
|
210
|
+
-moz-background-clip: padding;
|
211
|
+
-webkit-background-clip: padding-box;
|
212
|
+
background-clip: padding-box;
|
213
|
+
-webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 2px 2px 1px rgba(0, 0, 0, 0.14);
|
214
|
+
-moz-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 2px 2px 1px rgba(0, 0, 0, 0.14);
|
215
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 2px 2px 1px rgba(0, 0, 0, 0.14);
|
216
|
+
background: #222222;
|
217
|
+
color: #ffffff;
|
218
|
+
font-size: 11px;
|
219
|
+
line-height: 22px;
|
220
|
+
font-family: Arial, Helvetica, sans-serif;
|
221
|
+
-webkit-transition: opacity 0.2s ease 0s;
|
222
|
+
-moz-transition: opacity 0.2s ease 0s;
|
223
|
+
-ms-transition: opacity 0.2s ease 0s;
|
224
|
+
-o-transition: opacity 0.2s ease 0s;
|
225
|
+
-webkit-opacity: 0;
|
226
|
+
-moz-opacity: 0;
|
227
|
+
opacity: 0;
|
228
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
229
|
+
left: -3000px;
|
230
|
+
user-select: none;
|
231
|
+
-o-user-select: none;
|
232
|
+
-moz-user-select: none;
|
233
|
+
-khtml-user-select: none;
|
234
|
+
-webkit-user-select: none;
|
235
|
+
-ms-user-select: none;
|
236
|
+
z-index: 9997;
|
237
|
+
text-rendering: optimizelegibility;
|
238
|
+
-webkit-font-smoothing: antialiased;
|
239
|
+
-moz-osx-font-smoothing: grayscale;
|
240
|
+
}
|
241
|
+
.fr-tooltip.fr-visible {
|
242
|
+
-webkit-opacity: 1;
|
243
|
+
-moz-opacity: 1;
|
244
|
+
opacity: 1;
|
245
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
246
|
+
}
|
247
|
+
.fr-toolbar .fr-command.fr-btn,
|
248
|
+
.fr-popup .fr-command.fr-btn {
|
249
|
+
background: transparent;
|
250
|
+
color: #222222;
|
251
|
+
-moz-outline: 0;
|
252
|
+
outline: 0;
|
253
|
+
border: 0;
|
254
|
+
line-height: 1;
|
255
|
+
cursor: pointer;
|
256
|
+
text-align: left;
|
257
|
+
margin: 0px 2px;
|
258
|
+
-webkit-transition: background 0.2s ease 0s;
|
259
|
+
-moz-transition: background 0.2s ease 0s;
|
260
|
+
-ms-transition: background 0.2s ease 0s;
|
261
|
+
-o-transition: background 0.2s ease 0s;
|
262
|
+
border-radius: 0;
|
263
|
+
-moz-border-radius: 0;
|
264
|
+
-webkit-border-radius: 0;
|
265
|
+
-moz-background-clip: padding;
|
266
|
+
-webkit-background-clip: padding-box;
|
267
|
+
background-clip: padding-box;
|
268
|
+
z-index: 2;
|
269
|
+
position: relative;
|
270
|
+
-webkit-box-sizing: border-box;
|
271
|
+
-moz-box-sizing: border-box;
|
272
|
+
box-sizing: border-box;
|
273
|
+
text-decoration: none;
|
274
|
+
user-select: none;
|
275
|
+
-o-user-select: none;
|
276
|
+
-moz-user-select: none;
|
277
|
+
-khtml-user-select: none;
|
278
|
+
-webkit-user-select: none;
|
279
|
+
-ms-user-select: none;
|
280
|
+
float: left;
|
281
|
+
padding: 0;
|
282
|
+
width: 38px;
|
283
|
+
height: 38px;
|
284
|
+
}
|
285
|
+
.fr-toolbar .fr-command.fr-btn::-moz-focus-inner,
|
286
|
+
.fr-popup .fr-command.fr-btn::-moz-focus-inner {
|
287
|
+
border: 0;
|
288
|
+
padding: 0;
|
289
|
+
}
|
290
|
+
.fr-toolbar .fr-command.fr-btn.fr-btn-text,
|
291
|
+
.fr-popup .fr-command.fr-btn.fr-btn-text {
|
292
|
+
width: auto;
|
293
|
+
}
|
294
|
+
.fr-toolbar .fr-command.fr-btn i,
|
295
|
+
.fr-popup .fr-command.fr-btn i {
|
296
|
+
display: block;
|
297
|
+
font-size: 14px;
|
298
|
+
width: 14px;
|
299
|
+
margin: 12px 12px;
|
300
|
+
text-align: center;
|
301
|
+
float: none;
|
302
|
+
}
|
303
|
+
.fr-toolbar .fr-command.fr-btn span.fr-sr-only,
|
304
|
+
.fr-popup .fr-command.fr-btn span.fr-sr-only {
|
305
|
+
position: absolute;
|
306
|
+
width: 1px;
|
307
|
+
height: 1px;
|
308
|
+
padding: 0;
|
309
|
+
margin: -1px;
|
310
|
+
overflow: hidden;
|
311
|
+
clip: rect(0, 0, 0, 0);
|
312
|
+
border: 0;
|
313
|
+
}
|
314
|
+
.fr-toolbar .fr-command.fr-btn span,
|
315
|
+
.fr-popup .fr-command.fr-btn span {
|
316
|
+
font-size: 14px;
|
317
|
+
display: block;
|
318
|
+
line-height: 17px;
|
319
|
+
min-width: 38px;
|
320
|
+
float: left;
|
321
|
+
text-overflow: ellipsis;
|
322
|
+
overflow: hidden;
|
323
|
+
white-space: nowrap;
|
324
|
+
height: 17px;
|
325
|
+
font-weight: bold;
|
326
|
+
padding: 0 2px;
|
327
|
+
}
|
328
|
+
.fr-toolbar .fr-command.fr-btn img,
|
329
|
+
.fr-popup .fr-command.fr-btn img {
|
330
|
+
margin: 12px 12px;
|
331
|
+
width: 14px;
|
332
|
+
}
|
333
|
+
.fr-toolbar .fr-command.fr-btn.fr-active,
|
334
|
+
.fr-popup .fr-command.fr-btn.fr-active {
|
335
|
+
color: #1e88e5;
|
336
|
+
background: transparent;
|
337
|
+
}
|
338
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-selection,
|
339
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown.fr-selection {
|
340
|
+
width: auto;
|
341
|
+
}
|
342
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-selection span,
|
343
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown.fr-selection span {
|
344
|
+
font-weight: normal;
|
345
|
+
}
|
346
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown i,
|
347
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown i,
|
348
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown span,
|
349
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown span,
|
350
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown img,
|
351
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown img {
|
352
|
+
margin-left: 8px;
|
353
|
+
margin-right: 16px;
|
354
|
+
}
|
355
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-active,
|
356
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown.fr-active {
|
357
|
+
color: #222222;
|
358
|
+
background: #d6d6d6;
|
359
|
+
}
|
360
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-active:hover,
|
361
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown.fr-active:hover,
|
362
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-active:focus,
|
363
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown.fr-active:focus {
|
364
|
+
background: #d6d6d6 !important;
|
365
|
+
color: #222222 !important;
|
366
|
+
}
|
367
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-active:hover::after,
|
368
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown.fr-active:hover::after,
|
369
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-active:focus::after,
|
370
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown.fr-active:focus::after {
|
371
|
+
border-top-color: #222222 !important;
|
372
|
+
}
|
373
|
+
.fr-toolbar .fr-command.fr-btn.fr-dropdown::after,
|
374
|
+
.fr-popup .fr-command.fr-btn.fr-dropdown::after {
|
375
|
+
position: absolute;
|
376
|
+
width: 0;
|
377
|
+
height: 0;
|
378
|
+
border-left: 4px solid transparent;
|
379
|
+
border-right: 4px solid transparent;
|
380
|
+
border-top: 4px solid #222222;
|
381
|
+
right: 4px;
|
382
|
+
top: 17px;
|
383
|
+
content: "";
|
384
|
+
}
|
385
|
+
.fr-toolbar .fr-command.fr-btn.fr-disabled,
|
386
|
+
.fr-popup .fr-command.fr-btn.fr-disabled {
|
387
|
+
color: #bdbdbd;
|
388
|
+
cursor: default;
|
389
|
+
}
|
390
|
+
.fr-toolbar .fr-command.fr-btn.fr-disabled::after,
|
391
|
+
.fr-popup .fr-command.fr-btn.fr-disabled::after {
|
392
|
+
border-top-color: #bdbdbd !important;
|
393
|
+
}
|
394
|
+
.fr-toolbar .fr-command.fr-btn.fr-hidden,
|
395
|
+
.fr-popup .fr-command.fr-btn.fr-hidden {
|
396
|
+
display: none;
|
397
|
+
}
|
398
|
+
.fr-toolbar.fr-disabled .fr-btn,
|
399
|
+
.fr-popup.fr-disabled .fr-btn,
|
400
|
+
.fr-toolbar.fr-disabled .fr-btn.fr-active,
|
401
|
+
.fr-popup.fr-disabled .fr-btn.fr-active {
|
402
|
+
color: #bdbdbd;
|
403
|
+
}
|
404
|
+
.fr-toolbar.fr-disabled .fr-btn.fr-dropdown::after,
|
405
|
+
.fr-popup.fr-disabled .fr-btn.fr-dropdown::after,
|
406
|
+
.fr-toolbar.fr-disabled .fr-btn.fr-active.fr-dropdown::after,
|
407
|
+
.fr-popup.fr-disabled .fr-btn.fr-active.fr-dropdown::after {
|
408
|
+
border-top-color: #bdbdbd;
|
409
|
+
}
|
410
|
+
.fr-toolbar.fr-rtl .fr-command.fr-btn,
|
411
|
+
.fr-popup.fr-rtl .fr-command.fr-btn {
|
412
|
+
float: right;
|
413
|
+
}
|
414
|
+
.fr-toolbar.fr-inline .fr-command.fr-btn {
|
415
|
+
display: -webkit-inline-flex;
|
416
|
+
display: -ms-inline-flexbox;
|
417
|
+
display: inline-flex;
|
418
|
+
float: none;
|
419
|
+
}
|
420
|
+
.fr-desktop .fr-command:hover,
|
421
|
+
.fr-desktop .fr-command:focus {
|
422
|
+
outline: 0;
|
423
|
+
color: #222222;
|
424
|
+
background: #ebebeb;
|
425
|
+
}
|
426
|
+
.fr-desktop .fr-command:hover::after,
|
427
|
+
.fr-desktop .fr-command:focus::after {
|
428
|
+
border-top-color: #222222 !important;
|
429
|
+
}
|
430
|
+
.fr-desktop .fr-command.fr-selected {
|
431
|
+
color: #222222;
|
432
|
+
background: #d6d6d6;
|
433
|
+
}
|
434
|
+
.fr-desktop .fr-command.fr-active:hover,
|
435
|
+
.fr-desktop .fr-command.fr-active:focus {
|
436
|
+
color: #1e88e5;
|
437
|
+
background: #ebebeb;
|
438
|
+
}
|
439
|
+
.fr-desktop .fr-command.fr-active.fr-selected {
|
440
|
+
color: #1e88e5;
|
441
|
+
background: #d6d6d6;
|
442
|
+
}
|
443
|
+
.fr-desktop .fr-command.fr-disabled:hover,
|
444
|
+
.fr-desktop .fr-command.fr-disabled:focus,
|
445
|
+
.fr-desktop .fr-command.fr-disabled.fr-selected {
|
446
|
+
background: transparent;
|
447
|
+
}
|
448
|
+
.fr-desktop.fr-disabled .fr-command:hover,
|
449
|
+
.fr-desktop.fr-disabled .fr-command:focus,
|
450
|
+
.fr-desktop.fr-disabled .fr-command.fr-selected {
|
451
|
+
background: transparent;
|
452
|
+
}
|
453
|
+
.fr-toolbar.fr-mobile .fr-command.fr-blink,
|
454
|
+
.fr-popup.fr-mobile .fr-command.fr-blink {
|
455
|
+
background: transparent;
|
456
|
+
}
|
457
|
+
.fr-command.fr-btn + .fr-dropdown-menu {
|
458
|
+
display: inline-block;
|
459
|
+
position: absolute;
|
460
|
+
right: auto;
|
461
|
+
bottom: auto;
|
462
|
+
height: auto;
|
463
|
+
z-index: 4;
|
464
|
+
-webkit-overflow-scrolling: touch;
|
465
|
+
overflow: hidden;
|
466
|
+
border-radius: 0 0 2px 2px;
|
467
|
+
-moz-border-radius: 0 0 2px 2px;
|
468
|
+
-webkit-border-radius: 0 0 2px 2px;
|
469
|
+
-moz-background-clip: padding;
|
470
|
+
-webkit-background-clip: padding-box;
|
471
|
+
background-clip: padding-box;
|
472
|
+
}
|
473
|
+
.fr-command.fr-btn + .fr-dropdown-menu .fr-dropdown-wrapper {
|
474
|
+
background: #ffffff;
|
475
|
+
padding: 0;
|
476
|
+
margin: auto;
|
477
|
+
display: inline-block;
|
478
|
+
text-align: left;
|
479
|
+
position: relative;
|
480
|
+
-webkit-box-sizing: border-box;
|
481
|
+
-moz-box-sizing: border-box;
|
482
|
+
box-sizing: border-box;
|
483
|
+
-webkit-transition: max-height 0.2s ease 0s;
|
484
|
+
-moz-transition: max-height 0.2s ease 0s;
|
485
|
+
-ms-transition: max-height 0.2s ease 0s;
|
486
|
+
-o-transition: max-height 0.2s ease 0s;
|
487
|
+
margin-top: 0;
|
488
|
+
float: left;
|
489
|
+
max-height: 0;
|
490
|
+
height: 0;
|
491
|
+
margin-top: 0 !important;
|
492
|
+
}
|
493
|
+
.fr-command.fr-btn + .fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content {
|
494
|
+
overflow: auto;
|
495
|
+
position: relative;
|
496
|
+
max-height: 275px;
|
497
|
+
}
|
498
|
+
.fr-command.fr-btn + .fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list {
|
499
|
+
list-style-type: none;
|
500
|
+
margin: 0;
|
501
|
+
padding: 0;
|
502
|
+
}
|
503
|
+
.fr-command.fr-btn + .fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li {
|
504
|
+
padding: 0;
|
505
|
+
margin: 0;
|
506
|
+
font-size: 15px;
|
507
|
+
}
|
508
|
+
.fr-command.fr-btn + .fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a {
|
509
|
+
padding: 0 24px;
|
510
|
+
line-height: 200%;
|
511
|
+
display: block;
|
512
|
+
cursor: pointer;
|
513
|
+
white-space: nowrap;
|
514
|
+
color: inherit;
|
515
|
+
text-decoration: none;
|
516
|
+
}
|
517
|
+
.fr-command.fr-btn + .fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a.fr-active {
|
518
|
+
background: #d6d6d6;
|
519
|
+
}
|
520
|
+
.fr-command.fr-btn + .fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a.fr-disabled {
|
521
|
+
color: #bdbdbd;
|
522
|
+
cursor: default;
|
523
|
+
}
|
524
|
+
.fr-command.fr-btn.fr-active + .fr-dropdown-menu {
|
525
|
+
display: inline-block;
|
526
|
+
-webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 2px 2px 1px rgba(0, 0, 0, 0.14);
|
527
|
+
-moz-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 2px 2px 1px rgba(0, 0, 0, 0.14);
|
528
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 2px 2px 1px rgba(0, 0, 0, 0.14);
|
529
|
+
}
|
530
|
+
.fr-command.fr-btn.fr-active + .fr-dropdown-menu .fr-dropdown-wrapper {
|
531
|
+
height: auto;
|
532
|
+
max-height: 275px;
|
533
|
+
}
|
534
|
+
.fr-bottom > .fr-command.fr-btn + .fr-dropdown-menu {
|
535
|
+
border-radius: 2px 2px 0 0;
|
536
|
+
-moz-border-radius: 2px 2px 0 0;
|
537
|
+
-webkit-border-radius: 2px 2px 0 0;
|
538
|
+
-moz-background-clip: padding;
|
539
|
+
-webkit-background-clip: padding-box;
|
540
|
+
background-clip: padding-box;
|
541
|
+
}
|
542
|
+
.fr-toolbar.fr-rtl .fr-dropdown-wrapper,
|
543
|
+
.fr-popup.fr-rtl .fr-dropdown-wrapper {
|
544
|
+
text-align: right !important;
|
545
|
+
}
|
546
|
+
body.prevent-scroll {
|
547
|
+
overflow: hidden;
|
548
|
+
}
|
549
|
+
body.prevent-scroll.fr-mobile {
|
550
|
+
position: fixed;
|
551
|
+
-webkit-overflow-scrolling: touch;
|
552
|
+
}
|
553
|
+
.fr-modal {
|
554
|
+
color: #222222;
|
555
|
+
font-family: Arial, Helvetica, sans-serif;
|
556
|
+
position: fixed;
|
557
|
+
overflow-x: auto;
|
558
|
+
overflow-y: scroll;
|
559
|
+
top: 0;
|
560
|
+
left: 0;
|
561
|
+
bottom: 0;
|
562
|
+
right: 0;
|
563
|
+
width: 100%;
|
564
|
+
z-index: 9999;
|
565
|
+
text-rendering: optimizelegibility;
|
566
|
+
-webkit-font-smoothing: antialiased;
|
567
|
+
-moz-osx-font-smoothing: grayscale;
|
568
|
+
text-align: center;
|
569
|
+
}
|
570
|
+
.fr-modal .fr-modal-wrapper {
|
571
|
+
border-radius: 2px;
|
572
|
+
-moz-border-radius: 2px;
|
573
|
+
-webkit-border-radius: 2px;
|
574
|
+
-moz-background-clip: padding;
|
575
|
+
-webkit-background-clip: padding-box;
|
576
|
+
background-clip: padding-box;
|
577
|
+
margin: 20px auto;
|
578
|
+
display: inline-block;
|
579
|
+
background: #ffffff;
|
580
|
+
min-width: 300px;
|
581
|
+
-webkit-box-shadow: 0 5px 8px rgba(0, 0, 0, 0.19), 0 4px 3px 1px rgba(0, 0, 0, 0.14);
|
582
|
+
-moz-box-shadow: 0 5px 8px rgba(0, 0, 0, 0.19), 0 4px 3px 1px rgba(0, 0, 0, 0.14);
|
583
|
+
box-shadow: 0 5px 8px rgba(0, 0, 0, 0.19), 0 4px 3px 1px rgba(0, 0, 0, 0.14);
|
584
|
+
border: 0px;
|
585
|
+
border-top: 5px solid #222222;
|
586
|
+
overflow: hidden;
|
587
|
+
width: 90%;
|
588
|
+
padding-bottom: 10px;
|
589
|
+
position: relative;
|
590
|
+
}
|
591
|
+
@media (min-width: 768px) and (max-width: 991px) {
|
592
|
+
.fr-modal .fr-modal-wrapper {
|
593
|
+
margin: 30px auto;
|
594
|
+
width: 70%;
|
595
|
+
}
|
596
|
+
}
|
597
|
+
@media (min-width: 992px) {
|
598
|
+
.fr-modal .fr-modal-wrapper {
|
599
|
+
margin: 50px auto;
|
600
|
+
width: 600px;
|
601
|
+
}
|
602
|
+
}
|
603
|
+
.fr-modal .fr-modal-wrapper .fr-modal-head {
|
604
|
+
background: #ffffff;
|
605
|
+
-webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 2px 2px 1px rgba(0, 0, 0, 0.14);
|
606
|
+
-moz-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 2px 2px 1px rgba(0, 0, 0, 0.14);
|
607
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 2px 2px 1px rgba(0, 0, 0, 0.14);
|
608
|
+
border-bottom: 0px;
|
609
|
+
overflow: hidden;
|
610
|
+
position: absolute;
|
611
|
+
width: 100%;
|
612
|
+
min-height: 42px;
|
613
|
+
z-index: 3;
|
614
|
+
-webkit-transition: height 0.2s ease 0s;
|
615
|
+
-moz-transition: height 0.2s ease 0s;
|
616
|
+
-ms-transition: height 0.2s ease 0s;
|
617
|
+
-o-transition: height 0.2s ease 0s;
|
618
|
+
}
|
619
|
+
.fr-modal .fr-modal-wrapper .fr-modal-head i {
|
620
|
+
padding: 12px;
|
621
|
+
width: 20px;
|
622
|
+
font-size: 16px;
|
623
|
+
cursor: pointer;
|
624
|
+
line-height: 18px;
|
625
|
+
color: #222222;
|
626
|
+
-webkit-box-sizing: content-box;
|
627
|
+
-moz-box-sizing: content-box;
|
628
|
+
box-sizing: content-box;
|
629
|
+
}
|
630
|
+
.fr-modal .fr-modal-wrapper .fr-modal-head i.fr-modal-close {
|
631
|
+
position: absolute;
|
632
|
+
top: 0;
|
633
|
+
right: 0;
|
634
|
+
-webkit-transition: color 0.2s ease 0s;
|
635
|
+
-moz-transition: color 0.2s ease 0s;
|
636
|
+
-ms-transition: color 0.2s ease 0s;
|
637
|
+
-o-transition: color 0.2s ease 0s;
|
638
|
+
}
|
639
|
+
.fr-modal .fr-modal-wrapper .fr-modal-head h4 {
|
640
|
+
font-size: 18px;
|
641
|
+
padding: 12px 10px;
|
642
|
+
margin: 0;
|
643
|
+
font-weight: 400;
|
644
|
+
line-height: 18px;
|
645
|
+
display: inline-block;
|
646
|
+
float: left;
|
647
|
+
}
|
648
|
+
.fr-modal .fr-modal-wrapper div.fr-modal-body {
|
649
|
+
height: 100%;
|
650
|
+
min-height: 150px;
|
651
|
+
overflow-y: scroll;
|
652
|
+
}
|
653
|
+
.fr-modal .fr-modal-wrapper div.fr-modal-body:focus {
|
654
|
+
outline: 0;
|
655
|
+
}
|
656
|
+
.fr-desktop .fr-modal-wrapper .fr-modal-head i:hover {
|
657
|
+
background: #ebebeb;
|
658
|
+
}
|
659
|
+
.fr-overlay {
|
660
|
+
position: fixed;
|
661
|
+
top: 0;
|
662
|
+
bottom: 0;
|
663
|
+
left: 0;
|
664
|
+
right: 0;
|
665
|
+
background: #000000;
|
666
|
+
-webkit-opacity: 0.5;
|
667
|
+
-moz-opacity: 0.5;
|
668
|
+
opacity: 0.5;
|
669
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
670
|
+
z-index: 9998;
|
671
|
+
}
|
672
|
+
.fr-popup {
|
673
|
+
position: absolute;
|
674
|
+
display: none;
|
675
|
+
color: #222222;
|
676
|
+
background: #ffffff;
|
677
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
678
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
679
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
680
|
+
border-radius: 2px;
|
681
|
+
-moz-border-radius: 2px;
|
682
|
+
-webkit-border-radius: 2px;
|
683
|
+
-moz-background-clip: padding;
|
684
|
+
-webkit-background-clip: padding-box;
|
685
|
+
background-clip: padding-box;
|
686
|
+
font-family: Arial, Helvetica, sans-serif;
|
687
|
+
-webkit-box-sizing: border-box;
|
688
|
+
-moz-box-sizing: border-box;
|
689
|
+
box-sizing: border-box;
|
690
|
+
user-select: none;
|
691
|
+
-o-user-select: none;
|
692
|
+
-moz-user-select: none;
|
693
|
+
-khtml-user-select: none;
|
694
|
+
-webkit-user-select: none;
|
695
|
+
-ms-user-select: none;
|
696
|
+
margin-top: 10px;
|
697
|
+
z-index: 9995;
|
698
|
+
text-align: left;
|
699
|
+
border: 0px;
|
700
|
+
border-top: 5px solid #222222;
|
701
|
+
text-rendering: optimizelegibility;
|
702
|
+
-webkit-font-smoothing: antialiased;
|
703
|
+
-moz-osx-font-smoothing: grayscale;
|
704
|
+
}
|
705
|
+
.fr-popup .fr-input-focus {
|
706
|
+
background: #f5f5f5;
|
707
|
+
}
|
708
|
+
.fr-popup.fr-above {
|
709
|
+
margin-top: -10px;
|
710
|
+
border-top: 0;
|
711
|
+
border-bottom: 5px solid #222222;
|
712
|
+
-webkit-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 1px 1px rgba(0, 0, 0, 0.16);
|
713
|
+
-moz-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 1px 1px rgba(0, 0, 0, 0.16);
|
714
|
+
box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 1px 1px rgba(0, 0, 0, 0.16);
|
715
|
+
}
|
716
|
+
.fr-popup.fr-active {
|
717
|
+
display: block;
|
718
|
+
}
|
719
|
+
.fr-popup.fr-hidden {
|
720
|
+
-webkit-opacity: 0;
|
721
|
+
-moz-opacity: 0;
|
722
|
+
opacity: 0;
|
723
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
724
|
+
}
|
725
|
+
.fr-popup .fr-hs {
|
726
|
+
display: block !important;
|
727
|
+
}
|
728
|
+
.fr-popup .fr-hs.fr-hidden {
|
729
|
+
display: none !important;
|
730
|
+
}
|
731
|
+
.fr-popup .fr-input-line {
|
732
|
+
position: relative;
|
733
|
+
padding: 8px 0;
|
734
|
+
}
|
735
|
+
.fr-popup .fr-input-line input[type="text"],
|
736
|
+
.fr-popup .fr-input-line textarea {
|
737
|
+
width: 100%;
|
738
|
+
margin: 0px 0 1px 0;
|
739
|
+
border: none;
|
740
|
+
border-bottom: solid 1px #bdbdbd;
|
741
|
+
color: #222222;
|
742
|
+
font-size: 14px;
|
743
|
+
padding: 6px 0 2px;
|
744
|
+
background: rgba(0, 0, 0, 0);
|
745
|
+
position: relative;
|
746
|
+
z-index: 2;
|
747
|
+
-webkit-box-sizing: border-box;
|
748
|
+
-moz-box-sizing: border-box;
|
749
|
+
box-sizing: border-box;
|
750
|
+
}
|
751
|
+
.fr-popup .fr-input-line input[type="text"]:focus,
|
752
|
+
.fr-popup .fr-input-line textarea:focus {
|
753
|
+
border-bottom: solid 2px #1e88e5;
|
754
|
+
margin-bottom: 0px;
|
755
|
+
}
|
756
|
+
.fr-popup .fr-input-line input + label,
|
757
|
+
.fr-popup .fr-input-line textarea + label {
|
758
|
+
position: absolute;
|
759
|
+
top: 0;
|
760
|
+
left: 0;
|
761
|
+
font-size: 12px;
|
762
|
+
color: rgba(0, 0, 0, 0);
|
763
|
+
-webkit-transition: color 0.2s ease 0s;
|
764
|
+
-moz-transition: color 0.2s ease 0s;
|
765
|
+
-ms-transition: color 0.2s ease 0s;
|
766
|
+
-o-transition: color 0.2s ease 0s;
|
767
|
+
z-index: 3;
|
768
|
+
width: 100%;
|
769
|
+
display: block;
|
770
|
+
background: #ffffff;
|
771
|
+
}
|
772
|
+
.fr-popup .fr-input-line input.fr-not-empty:focus + label,
|
773
|
+
.fr-popup .fr-input-line textarea.fr-not-empty:focus + label {
|
774
|
+
color: #1e88e5;
|
775
|
+
}
|
776
|
+
.fr-popup .fr-input-line input.fr-not-empty + label,
|
777
|
+
.fr-popup .fr-input-line textarea.fr-not-empty + label {
|
778
|
+
color: #808080;
|
779
|
+
}
|
780
|
+
.fr-popup input,
|
781
|
+
.fr-popup textarea {
|
782
|
+
user-select: text;
|
783
|
+
-o-user-select: text;
|
784
|
+
-moz-user-select: text;
|
785
|
+
-khtml-user-select: text;
|
786
|
+
-webkit-user-select: text;
|
787
|
+
-ms-user-select: text;
|
788
|
+
border-radius: 0;
|
789
|
+
-moz-border-radius: 0;
|
790
|
+
-webkit-border-radius: 0;
|
791
|
+
-moz-background-clip: padding;
|
792
|
+
-webkit-background-clip: padding-box;
|
793
|
+
background-clip: padding-box;
|
794
|
+
outline: none;
|
795
|
+
}
|
796
|
+
.fr-popup textarea {
|
797
|
+
resize: none;
|
798
|
+
}
|
799
|
+
.fr-popup .fr-buttons {
|
800
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
801
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
802
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
803
|
+
padding: 0 2px;
|
804
|
+
white-space: nowrap;
|
805
|
+
line-height: 0;
|
806
|
+
border-bottom: 0px;
|
807
|
+
}
|
808
|
+
.fr-popup .fr-buttons::after {
|
809
|
+
clear: both;
|
810
|
+
display: block;
|
811
|
+
content: "";
|
812
|
+
height: 0;
|
813
|
+
}
|
814
|
+
.fr-popup .fr-buttons .fr-btn {
|
815
|
+
display: inline-block;
|
816
|
+
float: none;
|
817
|
+
}
|
818
|
+
.fr-popup .fr-buttons .fr-btn i {
|
819
|
+
float: left;
|
820
|
+
}
|
821
|
+
.fr-popup .fr-buttons .fr-separator {
|
822
|
+
display: inline-block;
|
823
|
+
float: none;
|
824
|
+
}
|
825
|
+
.fr-popup .fr-layer {
|
826
|
+
width: 225px;
|
827
|
+
-webkit-box-sizing: border-box;
|
828
|
+
-moz-box-sizing: border-box;
|
829
|
+
box-sizing: border-box;
|
830
|
+
margin: 10px;
|
831
|
+
display: none;
|
832
|
+
}
|
833
|
+
@media (min-width: 768px) {
|
834
|
+
.fr-popup .fr-layer {
|
835
|
+
width: 300px;
|
836
|
+
}
|
837
|
+
}
|
838
|
+
.fr-popup .fr-layer.fr-active {
|
839
|
+
display: inline-block;
|
840
|
+
}
|
841
|
+
.fr-popup .fr-action-buttons {
|
842
|
+
z-index: 7;
|
843
|
+
height: 36px;
|
844
|
+
text-align: right;
|
845
|
+
}
|
846
|
+
.fr-popup .fr-action-buttons button.fr-command {
|
847
|
+
height: 36px;
|
848
|
+
line-height: 1;
|
849
|
+
color: #1e88e5;
|
850
|
+
padding: 10px;
|
851
|
+
cursor: pointer;
|
852
|
+
text-decoration: none;
|
853
|
+
border: none;
|
854
|
+
background: none;
|
855
|
+
font-size: 16px;
|
856
|
+
outline: none;
|
857
|
+
-webkit-transition: background 0.2s ease 0s;
|
858
|
+
-moz-transition: background 0.2s ease 0s;
|
859
|
+
-ms-transition: background 0.2s ease 0s;
|
860
|
+
-o-transition: background 0.2s ease 0s;
|
861
|
+
}
|
862
|
+
.fr-popup .fr-action-buttons button.fr-command + button {
|
863
|
+
margin-left: 24px;
|
864
|
+
}
|
865
|
+
.fr-popup .fr-action-buttons button.fr-command:hover,
|
866
|
+
.fr-popup .fr-action-buttons button.fr-command:focus {
|
867
|
+
background: #ebebeb;
|
868
|
+
color: #1e88e5;
|
869
|
+
}
|
870
|
+
.fr-popup .fr-action-buttons button.fr-command:active {
|
871
|
+
background: #d6d6d6;
|
872
|
+
color: #1e88e5;
|
873
|
+
}
|
874
|
+
.fr-popup .fr-action-buttons button::-moz-focus-inner {
|
875
|
+
border: 0;
|
876
|
+
}
|
877
|
+
.fr-popup .fr-checkbox {
|
878
|
+
position: relative;
|
879
|
+
display: inline-block;
|
880
|
+
width: 16px;
|
881
|
+
height: 16px;
|
882
|
+
line-height: 1;
|
883
|
+
-webkit-box-sizing: content-box;
|
884
|
+
-moz-box-sizing: content-box;
|
885
|
+
box-sizing: content-box;
|
886
|
+
vertical-align: middle;
|
887
|
+
}
|
888
|
+
.fr-popup .fr-checkbox svg {
|
889
|
+
margin-left: 2px;
|
890
|
+
margin-top: 2px;
|
891
|
+
display: none;
|
892
|
+
width: 10px;
|
893
|
+
height: 10px;
|
894
|
+
}
|
895
|
+
.fr-popup .fr-checkbox span {
|
896
|
+
border: solid 1px #222222;
|
897
|
+
border-radius: 2px;
|
898
|
+
-moz-border-radius: 2px;
|
899
|
+
-webkit-border-radius: 2px;
|
900
|
+
-moz-background-clip: padding;
|
901
|
+
-webkit-background-clip: padding-box;
|
902
|
+
background-clip: padding-box;
|
903
|
+
width: 16px;
|
904
|
+
height: 16px;
|
905
|
+
display: inline-block;
|
906
|
+
position: relative;
|
907
|
+
z-index: 1;
|
908
|
+
-webkit-box-sizing: border-box;
|
909
|
+
-moz-box-sizing: border-box;
|
910
|
+
box-sizing: border-box;
|
911
|
+
-webkit-transition: background 0.2s ease 0s, border-color 0.2s ease 0s;
|
912
|
+
-moz-transition: background 0.2s ease 0s, border-color 0.2s ease 0s;
|
913
|
+
-ms-transition: background 0.2s ease 0s, border-color 0.2s ease 0s;
|
914
|
+
-o-transition: background 0.2s ease 0s, border-color 0.2s ease 0s;
|
915
|
+
}
|
916
|
+
.fr-popup .fr-checkbox input {
|
917
|
+
position: absolute;
|
918
|
+
z-index: 2;
|
919
|
+
-webkit-opacity: 0;
|
920
|
+
-moz-opacity: 0;
|
921
|
+
opacity: 0;
|
922
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
923
|
+
border: 0 none;
|
924
|
+
cursor: pointer;
|
925
|
+
height: 16px;
|
926
|
+
margin: 0;
|
927
|
+
padding: 0;
|
928
|
+
width: 16px;
|
929
|
+
top: 1px;
|
930
|
+
left: 1px;
|
931
|
+
}
|
932
|
+
.fr-popup .fr-checkbox input:checked + span {
|
933
|
+
background: #1e88e5;
|
934
|
+
border-color: #1e88e5;
|
935
|
+
}
|
936
|
+
.fr-popup .fr-checkbox input:checked + span svg {
|
937
|
+
display: block;
|
938
|
+
}
|
939
|
+
.fr-popup .fr-checkbox input:focus + span {
|
940
|
+
border-color: #1e88e5;
|
941
|
+
}
|
942
|
+
.fr-popup .fr-checkbox-line {
|
943
|
+
font-size: 14px;
|
944
|
+
line-height: 1.4px;
|
945
|
+
margin-top: 10px;
|
946
|
+
}
|
947
|
+
.fr-popup .fr-checkbox-line label {
|
948
|
+
cursor: pointer;
|
949
|
+
margin: 0 5px;
|
950
|
+
vertical-align: middle;
|
951
|
+
}
|
952
|
+
.fr-popup.fr-rtl {
|
953
|
+
direction: rtl;
|
954
|
+
text-align: right;
|
955
|
+
}
|
956
|
+
.fr-popup.fr-rtl .fr-action-buttons {
|
957
|
+
text-align: left;
|
958
|
+
}
|
959
|
+
.fr-popup.fr-rtl .fr-input-line input + label,
|
960
|
+
.fr-popup.fr-rtl .fr-input-line textarea + label {
|
961
|
+
left: auto;
|
962
|
+
right: 0;
|
963
|
+
}
|
964
|
+
.fr-popup.fr-rtl .fr-buttons .fr-separator.fr-vs {
|
965
|
+
float: right;
|
966
|
+
}
|
967
|
+
.fr-popup .fr-arrow {
|
968
|
+
width: 0;
|
969
|
+
height: 0;
|
970
|
+
border-left: 5px solid transparent;
|
971
|
+
border-right: 5px solid transparent;
|
972
|
+
border-bottom: 5px solid #222222;
|
973
|
+
position: absolute;
|
974
|
+
top: -9px;
|
975
|
+
left: 50%;
|
976
|
+
margin-left: -5px;
|
977
|
+
display: inline-block;
|
978
|
+
}
|
979
|
+
.fr-popup.fr-above .fr-arrow {
|
980
|
+
top: auto;
|
981
|
+
bottom: -9px;
|
982
|
+
border-bottom: 0;
|
983
|
+
border-top: 5px solid #222222;
|
984
|
+
}
|
985
|
+
.fr-text-edit-layer {
|
986
|
+
width: 250px;
|
987
|
+
-webkit-box-sizing: border-box;
|
988
|
+
-moz-box-sizing: border-box;
|
989
|
+
box-sizing: border-box;
|
990
|
+
display: block !important;
|
991
|
+
}
|
992
|
+
.fr-toolbar {
|
993
|
+
color: #222222;
|
994
|
+
background: #ffffff;
|
995
|
+
position: relative;
|
996
|
+
z-index: 4;
|
997
|
+
font-family: Arial, Helvetica, sans-serif;
|
998
|
+
-webkit-box-sizing: border-box;
|
999
|
+
-moz-box-sizing: border-box;
|
1000
|
+
box-sizing: border-box;
|
1001
|
+
user-select: none;
|
1002
|
+
-o-user-select: none;
|
1003
|
+
-moz-user-select: none;
|
1004
|
+
-khtml-user-select: none;
|
1005
|
+
-webkit-user-select: none;
|
1006
|
+
-ms-user-select: none;
|
1007
|
+
padding: 0 2px;
|
1008
|
+
border-radius: 2px;
|
1009
|
+
-moz-border-radius: 2px;
|
1010
|
+
-webkit-border-radius: 2px;
|
1011
|
+
-moz-background-clip: padding;
|
1012
|
+
-webkit-background-clip: padding-box;
|
1013
|
+
background-clip: padding-box;
|
1014
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
1015
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
1016
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
1017
|
+
text-align: left;
|
1018
|
+
border: 0px;
|
1019
|
+
border-top: 5px solid #222222;
|
1020
|
+
text-rendering: optimizelegibility;
|
1021
|
+
-webkit-font-smoothing: antialiased;
|
1022
|
+
-moz-osx-font-smoothing: grayscale;
|
1023
|
+
}
|
1024
|
+
.fr-toolbar::after {
|
1025
|
+
clear: both;
|
1026
|
+
display: block;
|
1027
|
+
content: "";
|
1028
|
+
height: 0;
|
1029
|
+
}
|
1030
|
+
.fr-toolbar.fr-rtl {
|
1031
|
+
text-align: right;
|
1032
|
+
}
|
1033
|
+
.fr-toolbar.fr-inline {
|
1034
|
+
display: none;
|
1035
|
+
white-space: nowrap;
|
1036
|
+
position: absolute;
|
1037
|
+
margin-top: 10px;
|
1038
|
+
}
|
1039
|
+
.fr-toolbar.fr-inline .fr-arrow {
|
1040
|
+
width: 0;
|
1041
|
+
height: 0;
|
1042
|
+
border-left: 5px solid transparent;
|
1043
|
+
border-right: 5px solid transparent;
|
1044
|
+
border-bottom: 5px solid #222222;
|
1045
|
+
position: absolute;
|
1046
|
+
top: -9px;
|
1047
|
+
left: 50%;
|
1048
|
+
margin-left: -5px;
|
1049
|
+
display: inline-block;
|
1050
|
+
}
|
1051
|
+
.fr-toolbar.fr-inline.fr-above {
|
1052
|
+
margin-top: -10px;
|
1053
|
+
-webkit-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 1px 1px rgba(0, 0, 0, 0.16);
|
1054
|
+
-moz-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 1px 1px rgba(0, 0, 0, 0.16);
|
1055
|
+
box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 1px 1px rgba(0, 0, 0, 0.16);
|
1056
|
+
border-bottom: 5px solid #222222;
|
1057
|
+
border-top: 0;
|
1058
|
+
}
|
1059
|
+
.fr-toolbar.fr-inline.fr-above .fr-arrow {
|
1060
|
+
top: auto;
|
1061
|
+
bottom: -9px;
|
1062
|
+
border-bottom: 0;
|
1063
|
+
border-top-color: inherit;
|
1064
|
+
border-top-style: solid;
|
1065
|
+
border-top-width: 5px;
|
1066
|
+
}
|
1067
|
+
.fr-toolbar.fr-top {
|
1068
|
+
top: 0;
|
1069
|
+
border-radius: 2px 2px 0 0;
|
1070
|
+
-moz-border-radius: 2px 2px 0 0;
|
1071
|
+
-webkit-border-radius: 2px 2px 0 0;
|
1072
|
+
-moz-background-clip: padding;
|
1073
|
+
-webkit-background-clip: padding-box;
|
1074
|
+
background-clip: padding-box;
|
1075
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
1076
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
1077
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
1078
|
+
}
|
1079
|
+
.fr-toolbar.fr-bottom {
|
1080
|
+
bottom: 0;
|
1081
|
+
border-radius: 0 0 2px 2px;
|
1082
|
+
-moz-border-radius: 0 0 2px 2px;
|
1083
|
+
-webkit-border-radius: 0 0 2px 2px;
|
1084
|
+
-moz-background-clip: padding;
|
1085
|
+
-webkit-background-clip: padding-box;
|
1086
|
+
background-clip: padding-box;
|
1087
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
1088
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
1089
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
|
1090
|
+
}
|
1091
|
+
.fr-separator {
|
1092
|
+
background: #ebebeb;
|
1093
|
+
display: block;
|
1094
|
+
vertical-align: top;
|
1095
|
+
float: left;
|
1096
|
+
}
|
1097
|
+
.fr-separator + .fr-separator {
|
1098
|
+
display: none;
|
1099
|
+
}
|
1100
|
+
.fr-separator.fr-vs {
|
1101
|
+
height: 34px;
|
1102
|
+
width: 1px;
|
1103
|
+
margin: 2px;
|
1104
|
+
}
|
1105
|
+
.fr-separator.fr-hs {
|
1106
|
+
clear: both;
|
1107
|
+
height: 1px;
|
1108
|
+
width: calc(100% - (2 * 2px));
|
1109
|
+
margin: 0 2px;
|
1110
|
+
}
|
1111
|
+
.fr-separator.fr-hidden {
|
1112
|
+
display: none !important;
|
1113
|
+
}
|
1114
|
+
.fr-rtl .fr-separator {
|
1115
|
+
float: right;
|
1116
|
+
}
|
1117
|
+
.fr-toolbar.fr-inline .fr-separator.fr-hs {
|
1118
|
+
float: none;
|
1119
|
+
}
|
1120
|
+
.fr-toolbar.fr-inline .fr-separator.fr-vs {
|
1121
|
+
float: none;
|
1122
|
+
display: inline-block;
|
1123
|
+
}
|
1124
|
+
.fr-visibility-helper {
|
1125
|
+
display: none;
|
1126
|
+
margin-left: 0px !important;
|
1127
|
+
}
|
1128
|
+
@media (min-width: 768px) {
|
1129
|
+
.fr-visibility-helper {
|
1130
|
+
margin-left: 1px !important;
|
1131
|
+
}
|
1132
|
+
}
|
1133
|
+
@media (min-width: 992px) {
|
1134
|
+
.fr-visibility-helper {
|
1135
|
+
margin-left: 2px !important;
|
1136
|
+
}
|
1137
|
+
}
|
1138
|
+
@media (min-width: 1200px) {
|
1139
|
+
.fr-visibility-helper {
|
1140
|
+
margin-left: 3px !important;
|
1141
|
+
}
|
1142
|
+
}
|
1143
|
+
.fr-opacity-0 {
|
1144
|
+
-webkit-opacity: 0;
|
1145
|
+
-moz-opacity: 0;
|
1146
|
+
opacity: 0;
|
1147
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
1148
|
+
}
|
1149
|
+
.fr-box {
|
1150
|
+
position: relative;
|
1151
|
+
}
|
1152
|
+
/**
|
1153
|
+
* Postion sticky hacks.
|
1154
|
+
*/
|
1155
|
+
.fr-sticky {
|
1156
|
+
position: -webkit-sticky;
|
1157
|
+
position: -moz-sticky;
|
1158
|
+
position: -ms-sticky;
|
1159
|
+
position: -o-sticky;
|
1160
|
+
position: sticky;
|
1161
|
+
}
|
1162
|
+
.fr-sticky-off {
|
1163
|
+
position: relative;
|
1164
|
+
}
|
1165
|
+
.fr-sticky-on {
|
1166
|
+
position: fixed;
|
1167
|
+
}
|
1168
|
+
.fr-sticky-on.fr-sticky-ios {
|
1169
|
+
position: absolute;
|
1170
|
+
left: 0;
|
1171
|
+
right: 0;
|
1172
|
+
width: auto !important;
|
1173
|
+
}
|
1174
|
+
.fr-sticky-dummy {
|
1175
|
+
display: none;
|
1176
|
+
}
|
1177
|
+
.fr-sticky-on + .fr-sticky-dummy,
|
1178
|
+
.fr-sticky-box > .fr-sticky-dummy {
|
1179
|
+
display: block;
|
1180
|
+
}
|
1181
|
+
span.fr-sr-only {
|
1182
|
+
position: absolute;
|
1183
|
+
width: 1px;
|
1184
|
+
height: 1px;
|
1185
|
+
padding: 0;
|
1186
|
+
margin: -1px;
|
1187
|
+
overflow: hidden;
|
1188
|
+
clip: rect(0, 0, 0, 0);
|
1189
|
+
border: 0;
|
1190
|
+
}
|