UNPKG

froala-pages

Version:

The next generation JavaScript Page Builder made by devs for devs. A plug and play web page design and editing JavaScript tool for your web application and loved by designers.

6 lines 67.8 kB
/*! * Froala Pages v1.2.0 (https://github.com/froala-labs/froala-pages#readme) * Copyright 2017-2020 * Licensed under Froala Pages Terms (https://www.froala.com/pages/terms) */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.FroalaPages=e()}(this,function(){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},c=function(){function t(){s(this,t)}return t.createElement=function(t){var e=document.createElement("DIV");return e.innerHTML=t,e.firstChild},t.prepend=function(t,e){t.firstChild?t.insertBefore(e,t.firstChild):t.append(e)},t.append=function(t,e){t.appendChild(e)},t.after=function(t,e){t.parentNode.insertBefore(e,t.nextSibling)},t.before=function(t,e){t.parentNode.insertBefore(e,t)},t.remove=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},t.offset=function(t){var e=t.getBoundingClientRect();return{top:e.top,left:e.left}},t.outerHeight=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=t.offsetHeight;if(e){var i=getComputedStyle(t);return n+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)}return n},t.outerWidth=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=t.offsetWidth;if(e){var i=getComputedStyle(t);return n+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)}return 0},t.underscores=function(t){return t.toLowerCase().split(" ").join("_")},t.scrollTo=function(t){t.scrollIntoView({behavior:"smooth",block:"end"})},t.setDownloadBtnsStatus=function(t,e,n){t.pageToolbar.el.querySelectorAll(".fp-download-btn").forEach(function(t){t&&(t.style.display=n?"none":"flex",e?t.setAttribute("disabled","disabled"):t.removeAttribute("disabled"))})},t}(),t=function t(e){s(this,t),this.page=e,this.events=e.events,this.doc=e.doc,this.opts=e.opts;for(var n=arguments.length,i=Array(1<n?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.init.apply(this,i)},a=function(t){function n(){return s(this,n),o(this,t.apply(this,arguments))}return i(n,t),n.prototype.init=function(t){var e=this;this.designBlock=t,this.id=++n.ID,this.el=c.createElement(t.render({imagesDir:this.opts.designsImagesDir})),this.el.setAttribute("data-block-type",c.underscores(t.blockType)),this.el.setAttribute("data-id",this.id),this.events.on(this.el,"mouseenter",function(){return e._mouseEnter()})},n.prototype._mouseEnter=function(){this.events.emit("block.mouseenter",this)},n}(t);a.ID=0;var l=function(t){function e(){return s(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.init=function(t,e){var n=this;this.el=document.createElement("IMG"),this.el.setAttribute("draggable",!0),this.blockType=t,this.template=e.template,this.image=e.image,this.el.setAttribute("src",""+(this.opts.designsThumbsDir||"")+this.image),this.events.on(this.el,"click",function(){return n.click()}),this.events.on(this.el,"dragstart",function(t){return n.dragstart(t)})},e.prototype.click=function(){this.events.emit("designBlock.click",this)},e.prototype.dragstart=function(t){0<=navigator.userAgent.search("Firefox")?this.dragImage=c.createElement('<span><img src="'+this.el.src+'" height="50" /></span>'):this.dragImage=c.createElement('<img src="'+this.el.src+'" height="50" />'),this.dragImage.style.position="absolute",c.append(this.page.body,this.dragImage),t.dataTransfer.setDragImage(this.dragImage,0,0),t.dataTransfer.setData("text/html",""),this.events.emit("designBlock.willDrag",this)},e.prototype.render=function(n){return this.template.replace(/{{[a-zA-Z_]*}}/g,function(t){var e=t.replace(/{|}/g,"").trim();return n[e]||"{{"+e+"}}"})},e}(t);l.BLOCKS={},l.HEADER="Headers",l.FOOTER="Footers",l.Register=function(t,e,n){l.BLOCKS[t]||(l.BLOCKS[t]=[]),l.BLOCKS[t].push({template:e,image:n})};var p=1,d=2,e=100,n=1024,h=768,f=375,u=function(t){function n(){return s(this,n),o(this,t.apply(this,arguments))}return i(n,t),n.prototype.init=function(t){var e=this;if(this.props=n._[t],!this.props)throw new Error("A button with the name "+t+" could not be found");this._render(t),this.events.on(this.el,"click",function(){return e._click()}),this.events.listen("button.refresh",function(){return e._refresh()}),"loadhtml"===t&&this.events.on(this.el.querySelector("#load_template"),"change",function(t){t.target.files.length&&(e.page.uploadTemplate(t.target.files[0]),t.target.value="")}),this.props.afterBuild&&this.props.afterBuild.apply(this)},n.prototype._refresh=function(){this.props.refresh&&this.props.refresh.apply(this)},n.prototype._render=function(t){this.el=this.doc.createElement("BUTTON"),this.el.innerHTML=this.props.icon.template,this.el.classList.add("fp-btn","fp-"+t+"-btn","fr-btn-type-"+this.props.icon.type),this.el.setAttribute("title",this.props.title)},n.prototype._click=function(){this.props.callback.apply(this),this.events.emit("button.refresh")},n}(t);u.Register=function(t,e){u._||(u._={}),u._[t]=e},u.Register("layout",{title:"Layout",icon:{type:"svg",template:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M2 21h19v-3H2v3zM20 8H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zM2 3v3h19V3H2z"/>\n </svg>'},callback:function(){this.page.setView(p),this.page.designsPanel.show(),this.doc.getElementsByClassName("fp-pageTop-toolbar")[0].style.display="flex"},refresh:function(){this.el.classList.toggle("fp-active",this.page.activeView===p)}}),u.Register("moveUp",{title:"Move Up",icon:{type:"svg",template:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n </svg>'},callback:function(){for(var t=this.page.activeBlock,e=t.el.previousSibling;e&&(!e.classList||!e.classList.contains("fdb-block"));)e=e.previousSibling;window.a=e,window.b=t.el,e&&c.before(e,t.el),this.page.activeView===d&&c.scrollTo(t.el),this.page.blockToolbar.hide(),this.page.blockToolbar.refreshPosition()},refresh:function(){if(this.page.activeBlock){this.el.classList.toggle("fp-hidden",0<=[l.HEADER,l.FOOTER].indexOf(this.page.activeBlock.designBlock.blockType));for(var t=this.page.activeBlock.el.previousSibling;t&&(!t.classList||!t.classList.contains("fdb-block"));)t=t.previousSibling;t?(this.el.classList.remove("fp-disabled"),this.el.removeAttribute("disabled")):(this.el.classList.add("fp-disabled"),this.el.setAttribute("disabled","disabled"))}}}),u.Register("remove",{title:"Remove",icon:{type:"svg",template:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n </svg>'},callback:function(){if(this.page.activeBlock&&confirm("Are you sure you want to remove this design block?")){var e=this.page.activeBlock;this.page.blockToolbar.hide(),c.remove(e.el),this.page.editor.FroalaEditor&&this.page.editor.FroalaEditor.INSTANCES.forEach(function(t){e.el.contains(t.$oel.get(0))&&t.popups&&t.popups.hideAll()}),this.page.refreshBlocks()}},afterBuild:function(){this.el.classList.add("fp-remove-btn")}}),u.Register("edit",{title:"Edit",icon:{type:"svg",template:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n </svg>'},callback:function(){this.doc.getElementsByClassName("fp-pageTop-toolbar")[0].style.display="none",this.page.setView(d),this.page.designsPanel.hide(),this.page.editor.enable()},refresh:function(){this.el.classList.toggle("fp-active",this.page.activeView===d)}}),u.Register("download",{title:"Download",icon:{type:"html",template:'\n <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n </svg>\n <span>Download</span>'},callback:function(){var o=this,t=!this.page.iframeBody.querySelector("[data-block-type]");t?c.setDownloadBtnsStatus(this.page,t,!0):this.page.getHTML().then(function(t){o.page.sharewindow&&o.page.sharewindow.show();var e=new Blob([t],{type:"text/html"}),n=window.URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download="froala_design_blocks_website.html",i.click()},function(t){console.log(t)})}}),u.Register("desktop",{title:"Desktop",icon:{type:"svg",template:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7l-2 3v1h8v-1l-2-3h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 12H3V4h18v10z"/>\n </svg>'},callback:function(){this.page.screenSize=e,this.page.iframe.style.width=null,this.page.el.classList.remove("fp-view-small"),this.page.refreshIframeSize()},refresh:function(){this.el.classList.toggle("fp-active",this.page.screenSize===e)},afterBuild:function(){this.page.screenSize=e}}),u.Register("tablet_landscape",{title:"Tablet Landscape",icon:{type:"svg",template:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2zm-2 14H5V6h14v12z"/>\n </svg>'},callback:function(){this.page.screenSize=n,this.page.iframe.style.width=n+"px",this.page.el.classList.add("fp-view-small"),this.page.refreshIframeSize()},refresh:function(){this.el.classList.toggle("fp-active",this.page.screenSize===n)}}),u.Register("tablet_portrait",{title:"Tablet Portrait",icon:{type:"svg",template:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M18.5 0h-14C3.12 0 2 1.12 2 2.5v19C2 22.88 3.12 24 4.5 24h14c1.38 0 2.5-1.12 2.5-2.5v-19C21 1.12 19.88 0 18.5 0zm-7 23c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm7.5-4H4V3h15v16z"/>\n </svg>'},callback:function(){this.page.screenSize=h,this.page.iframe.style.width=h+"px",this.page.el.classList.add("fp-view-small"),this.page.refreshIframeSize()},refresh:function(){this.el.classList.toggle("fp-active",this.page.screenSize===h)}}),u.Register("phone",{title:"Phone",icon:{type:"svg",template:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n </svg>'},callback:function(){this.page.screenSize=f,this.page.iframe.style.width=f+"px",this.page.el.classList.add("fp-view-small"),this.page.refreshIframeSize()},refresh:function(){this.el.classList.toggle("fp-active",this.page.screenSize===f)}}),u.Register("loadhtml",{title:"Load HTML",icon:{type:"svg",template:'<label for="load_template"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">\n <path d="M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm65.18 216.01H224v80c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-80H94.82c-14.28 0-21.41-17.29-11.27-27.36l96.42-95.7c6.65-6.61 17.39-6.61 24.04 0l96.42 95.7c10.15 10.07 3.03 27.36-11.25 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"></path>\n </svg></label><input type="file" id="load_template" style="display: none;" />'},callback:function(){},refresh:function(){this.el.classList.toggle("fp-active",!1)}});var m=function(t){function e(){return s(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.init=function(){this.el=this.doc.createElement("DIV"),this.el.classList.add("fp-block-toolbar"),c.append(this.page.body,this.el),this._addButtons(),this._initEvents()},e.prototype._initEvents=function(){var e=this;this.events.listen("block.mouseenter",function(t){return e.showForBlock(t)}),this.events.on(this.page.iframeDoc,"mouseleave",function(){return e._doLeave()}),this.events.on(this.el,"mouseenter",function(){return clearTimeout(e.leaveTimeout)}),this.events.on(this.el,"mouseleave",function(){return e._doLeave()}),this.events.on(this.page.iframeDoc,"scroll",function(){return e.refreshPosition()}),this.events.on(this.page.el,"scroll",function(){return e.refreshPosition()})},e.prototype._doLeave=function(){var t=this;this.leaveTimeout=setTimeout(function(){return t.hide()},50)},e.prototype._addButtons=function(){var n=this;this.opts.blockButtons.forEach(function(t){var e=new u(n.page,t);c.append(n.el,e.el)})},e.prototype.refreshPosition=function(){this.isVisible()&&this.showForBlock(this.page.activeBlock),this.events.emit("button.refresh")},e.prototype.showForBlock=function(t){clearTimeout(this.leaveTimeout);var e=c.offset(t.el);this.page.activeBlock=t;var n=this.page.iframeBody.querySelector(".fp-active");n&&n.classList.remove("fp-active"),t.el.classList.add("fp-active"),this.show(e.left,e.top)},e.prototype.show=function(t,e){this.el.classList.add("fp-visible"),this.el.style.left=t+c.offset(this.page.iframe).left+"px",this.el.style.top=Math.max(0,e)/(this.page.activeView===p?4:1)+c.offset(this.page.iframe).top+"px",this.events.emit("button.refresh")},e.prototype.hide=function(){this.el.classList.remove("fp-visible")},e.prototype.isVisible=function(){return this.el.classList.contains("fp-visible")},e}(t),g=function(){for(var t=0,e=document.domain,n=e.split("."),i="_gd"+(new Date).getTime();t<n.length-1&&-1==document.cookie.indexOf(i+"="+i);)e=n.slice(-1-++t).join("."),document.cookie=i+"="+i+";domain="+e+";";return document.cookie=i+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain="+e+";",(e||"").replace(/(^\.*)|(\.*$)/g,"")}(),v=function(t){function e(){return s(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.init=function(){var t=this,e=t.page.opts.key||[""],n=t.page.pageToolbar,i=t._decrypt(t._foo("ziRA1E3B9pA5B-11D-11xg1A3ZB5D1D4B-11ED2EG2pdeoC1clIH4wB-22yQD5uF4YE3E3A9=="));"string"==typeof e&&(e=[e]),n.ul=!0;for(var o=!1,s=0,r=0;r<e.length;r++){var a=t._parse(e[r]),l=a[2];if(l===t._decrypt(t._foo(t._decrypt("LGnD1KNZf1CPBYCAZB-8F3UDSLLSG1VFf1A3C2==")))||0<=l.indexOf(g,l.length-g.length)||t._isAllowedSubdomain(g)){if(!(t._isExpired(a[1])&&0<(g||"").length)||t._isAllowedSubdomain(g)){n.ul=!1;break}o=!0,s=a[0]||-1}}var c=new Image;!0===n.ul&&(c.src=o?t._foo(t._decrypt(i))+"e="+s:t._foo(t._decrypt(i))+"u"),navigator.connection&&navigator.connection.addEventListener("change",function(){t._testConnection(t)})},e.prototype._testConnection=function(t){var e=t._decrypt(t._foo("DkpqvtD2A27A14C-22D-17zD6ibB-7sB-31uC2xrlF2H-8kuA5hB4A3qcdavA6=="))+"keep_alive";!t.domain&&t.makeRequest(e,"GET")},e.prototype._remove=function(){var t=document.getElementsByClassName("fp-connectin-error");if(t.length){for(var e=0;e<t.length;e++)t[e].remove();var n=!this.page.iframeBody.querySelector("[data-block-type]");c.setDownloadBtnsStatus(this.page,n,n)}},e.prototype._add=function(t,e){var n=this._decrypt(this._foo(t)),i=c.createElement(n);e=e||"",i&&(i.setAttribute("class","fp-license-error "+e),c.prepend(this.page.body,i),c.setDownloadBtnsStatus(this.page,!0,!0))},e.prototype._decrypt=function(t){if(!t)return t;for(var e="",n=this._foo("charCodeAt"),i=this._foo("fromCharCode"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".indexOf(t[0]),s=1;s<t.length-2;s++){for(var r=this._sumDigits(++o),a=t[n](s),l="";/[0-9-]/.test(t[s+1]);)l+=t[++s];l=parseInt(l,10)||0,a=this._fromRange(a,r,l),a^=o-1&31,e+=String[i](a)}return e},e.prototype._isAllowedSubdomain=function(t){for(var e=[this._decrypt("tkC-22d1qC-13sD1wzF-7==")],n=0;n<e.length;n++)if(String.prototype.endsWith||(String.prototype.endsWith=function(t,e){return(void 0===e||e>this.length)&&(e=this.length),this.substring(e-t.length,e)===t}),t.endsWith(e[n]))return!0;return!1},e.prototype._parse=function(t){var e=(this._decrypt(t)||"").split("|");return 4===e.length&&"V3"===e[0]?[e[1],e[3],e[2]]:[null,null,""]},e.prototype._isExpired=function(t){return null===t||new Date(t)<new Date(this._decrypt("3C10D7D5B4B2A3G3E2A2A5=="))},e.prototype._sumDigits=function(t){for(var e=t.toString(),n=0,i=0;i<e.length;i++)n+=parseInt(e.charAt(i),10);return 10<n?n%9+1:n},e.prototype._fromRange=function(t,e,n){for(var i=Math.abs(n);0<i--;)t-=e;return n<0&&(t+=123),t},e.prototype._foo=function(t){return t},e._getData=function(t,e,n,i){var o=t.page,s=o._getHeadHTML(),r=o._getBodyHTML();if(t.domain){o.editor.disable();var a="<!DOCTYPE html>\n <html>\n <head>\n "+s+"\n </head>\n <body>\n "+r+"\n </body>\n </html>\n ";o.editor.enable(),e(a),c.setDownloadBtnsStatus(o,!1)}else{c.setDownloadBtnsStatus(o,!0),o.editor.disable();var l="";i?(l={style:o._getLinks(),inlineStyle:o._getInlineStyle(),scripts:o._getScripts(),blocks:o._getBlockHTML()},l=JSON.stringify(l)):l="<!DOCTYPE html>\n <html>\n <head>\n "+s+"\n </head>\n <body>\n "+r+"\n </body>\n </html>\n ",o.editor.enable(),e(l),c.setDownloadBtnsStatus(o,!1)}},e.prototype.makeRequest=function(t,e,n,i,o){var s=this,r=new XMLHttpRequest,a="POST"===e?JSON.stringify({key:s.opts.key}):{};r.onreadystatechange=function(){4===r.readyState&&(s._remove(),200===r.status?n&&n(r.responseText,i,o):r.responseText&&(s._add("MD5igyH3bfjxpD5A2bD2suxxfC6D6F2C1C1G1A1qnlD-11bA2G3F1A1C1D3C5D3cH-9fJ-7cqvtE6C1A-8I-8lomwwaE1F4smqC-16D6maghB-7I3qvzaseC1B3D3zD2njfldA2A32tdbcagmC2J3B5B-21wD4D6E5clB2uxtvhD5D1G1XYFB2vfG-10qF3cmjeymygi1I-7C8B4C-13B-11B-11sD3zxypA-13oqjneB1A10C7E1F1G3C1D1C1D2hdC-13F-11G-10pkD3H2wzxB-11rA4A-7ssjB4shxfG1A28A5B8xqE4A4A3yoH-7wtfB4B2JtH-8ywqA2E7NqreujjjbD5pmgI-7C8D-17E-13aawG1D2CxpwdA-9G2ytriD-16B-13tD5qvtuiuB-13A4kD-8G3B-7F-7C-21d1D-13f1gTsdxyuA-13A2C-9rsA30A9c1D2D1C4aoqA11=="),o&&o(r.responseText)))},r.onerror=function(){s._add("DC1e1lpG4H-8A-63sgiD4D4uE1xG-7wqmE5C2D5H5G4J4B9jwA-13tiH2G4I2A4B3B8B3A4zdC-7dzfE-13E-13F5A2uwextlnE-11C4E1jzxuC4bhlaiF2joexhA-8E3I3A2sC4gaoH-9A-7H4B1kB-16yzvnfA9A30A8uC-16E6E2G2zsA1nacE-13cD4C2I2SPQC8mF-11chB2zzcnpbpliiA5A6ddbhE2mqrytfzcyI-8A3C3D3Ya1G4A3E2C2C1gmvvkipB2I3naalF-10B3tI-8zaC2dqcD-8E4A5J3C8oxF2C5C4pdtb1mB-16A2A4SobnB-21zD5A4RgyvtxB2kC-13zF-10lD4sgrqltbH-9D3cexhC-11aueD2pB-22D-17xrF-10mstrC6B1OldcpaC3eomjaC3obj1aurfzH-9H-8A11xjA2nieE1C-7xahlA6hdrbzA13B4B10mB3D3C5txdB7==","fp-connectin-error"),o&&o("Error, Please retry!")},r.open(e,t),r.setRequestHeader("Content-Type","application/json; charset=utf-8"),r.send(a)},e}(t),y={designsThumbsDir:"https://cdn.jsdelivr.net/gh/froala/design-blocks@master/screenshots/",designsImagesDir:"https://cdn.jsdelivr.net/gh/froala/design-blocks@master/dist/imgs/",designsDefaultBlocks:"Contents",designStylesheets:[],designJavascripts:[],appStyle:'\nbody, html {\n margin: 0;\n height: 100%;\n}\nbody.no-block {\n flex-flow: column;\n overflow-x: hidden;\n display: flex;\n}\nbody {\n background: #DEDEDE;\n}\n.fp-no-block {\n align-items: center;\n justify-content: center;\n font-size: 20px;\n flex-direction: column;\n cursor: pointer;\n color: #444;\n display: none;\n font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;\n text-align: center;\n background: #FFF;\n transition: margin 0.25s linear 0.25s;\n}\n.fp-no-block:hover {\n background: #EFEFEF;\n}\n.fp-no-block.fp-visible {\n display: flex;\n}\n.fp-no-sections {\n flex: 2;\n}\n.fr-wrapper{\n width: 100%;\n}\n.navbar .fr-view{\n display: flex;\n align-items: center;\n}\n.fr-popup.fr-desktop.fr-inline.fr-active{\n}\n\n\n.fr-popup.fr-desktop.fr-inline.fr-imageProButton.fr-active{\n display:flex;\n padding-right: 12px; \n}\n\n.fr-float-left{\n align-items: flex-end;\n display: flex;\n border-top: 1px solid #ebebeb;\n margin-top: 53px;\n padding-bottom: 12px;\n margin-left: -10px;\n padding-left: 10px;\n}\n#myModal2 .try_fro_content_footer{\n justify-content: center;\n padding-bottom: 20px;\n}\n#myModal2 .modal-dialog{\n max-width: 450px;\n}\n#myModal2 .try_fro {\n padding: 45px 22px;\n border-bottom-right-radius: 75%;\n border-bottom-left-radius: 75%;\n}\n#myModal2 .try_fro_content {\n padding: 40px 22px 0px 22px;\n}\n#myModal2 .try_fro p {\n color: #fff;\n font-size: 25px;\n margin: 0px;\n text-align: center;\n}\n.fr-wrapper p{\n margin: 0px;\n}\n.fr-box.fr-inline .fr-wrapper .fr-element.fr-view ul{\n display: inline-block !important;\n list-style: none; \n}\n\n[role="application"] .fr-view ul{\n display: flex !important;\n list-style: none;\n}\n\n\n.fp-no-block p {\n margin: 0;\n}\n.fp-no-sections p + p {\n font-size: 16px;\n margin-top: 5px;\n}\n.fdb-block {\n box-shadow: 0;\n margin-bottom: 0;\n transition: margin 0.25s linear 0.25s;\n margin-top: -5px;\n}\n.tui-image-editor-container .tui-image-editor-checkbox-wrap.fixed-width{\n width: 187px !important;\n}\n\n.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-submenu-item li{\n margin-top: 8px;\n}\n.tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-submenu-item li:nth-child(1){\n margin-top: -20px;\n}\n\n.fp-active {\n box-shadow: 0px 0px 20px rgba(0,0,0,0.14), 0 0px 6px rgba(0,0,0,0.16);\n -moz-box-shadow: 0px 0px 20px rgba(0,0,0,0.14), 0 0px 6px rgba(0,0,0,0.16);\n -webkit-box-shadow: 0px 0px 20px rgba(0,0,0,0.14), 0 0px 6px rgba(0,0,0,0.16);\n}\n.paddremov{\n padding:0px;\n}\n.try_fro{\n background-color: #0092FA;\n color: #7DFEFF;\n padding: 35px 22px;\n border-bottom-right-radius: 75%;\n}\n.try_fro_content{\n padding: 25px 22px 4px 22px;\n}\n.try_fro_content p{\n color: #000;\n}\n.try_fro_content_bottom{\n padding: 0px 22px;\n}\n.try_fro_content_bottom p{\n color: #000;\n font-size: 14px;\n}\n.try_fro_content_footer ul{\n font-size: 14px;\n padding:0px;\n color: #000;\n}\n.fr-toolbar .fr-btn-grp:nth-child(1){\n display: block;\n float: none;\n}\n.fr-toolbar .fr-btn-grp{\n margin: 0px 8px 0 -12px;\n padding-bottom: 0px;\n}\n\n\n.fr-toolbar.fr-inline{\n z-index: 999;\n}\n.pro-btn button{\n background-color: #0789DC;\n border: none;\n color: #fff;\n padding: 7px 12px;\n border-radius: 2px;\n cursor: pointer;\n margin-top: 7px;\n outline: none !important;\n}\n.popupp{\n z-index: 9999999999;\n}\n.download_botton button{\n padding: 10px 25px;\n font-size: 20px;\n font-weight: 700;\n line-height: 25px;\n}\n.try_fro_content_footer{\n display: flex;\n justify-content: space-around;\n padding: 0px 10px;\n}\n.try_fro h1{\n font-weight: 300;\n color: #7DFEFF;\n margin: 0px;\n line-height: 47px;\n}\n.fr-custom{\n display: block !important;\n}\n.try_fro p{\n color: #fff;\n font-size: 35px;\n margin: 0px;\n}\nbody.fp-add-view [data-block-type],\nbody.fp-add-view .fp-no-block {\n margin-bottom: 20px;\n}\nbody.fp-add-view [data-block-type] {\n user-select: none;\n position: relative;\n}\nbody.fp-add-view section[data-block-type] {\n cursor: move;\n}\nbody.fp-add-view [data-block-type]:after {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: block;\n z-index: 10000;\n content: "";\n}\n.fp-drop-placeholder {\n height: 200px;\n width: 100%;\n border: solid 10px #0098f7;\n background: #FFF;\n margin-bottom: 20px;\n}\n.fp-dragging {\n display: none;\n}\n.fr-popup {\n z-index: 999 !important;\n}\n\n.tui-image-editor-container.left .tui-image-editor-submenu{\n position: relative;\n}\n.fp-active{\n display: inline-block;\n width: 100%;\n}\nimg.fr-dib {\n margin: 5px auto;\n display: block;\n float: none;\n vertical-align: top;\n}\nspan.fr-emoticon.fr-emoticon-img {\n background-repeat: no-repeat !important;\n font-size: inherit;\n height: 1em;\n width: 1em;\n min-height: 20px;\n min-width: 20px;\n display: inline-block;\n margin: -.1em .1em .1em;\n line-height: 1;\n vertical-align: middle;\n}\n@media only screen and (max-width: 767px) {\n .navbar .fr-view {\n display: block;\n align-items: unset;\n}\n}\n',blockButtons:["moveUp","remove"],key:"",showDownloadCounter:!0,pageTopButtons:[["edit"]],pageLeftButtons:[["edit","layout","loadhtml"],["desktop","tablet_landscape","tablet_portrait","phone"]],pageCenterButtons:['<div style="display: flex;"><span style="margin-top: 5px;">Powered by </span><a href="https://www.froala.com" style="display: inline-block; height: 20px; margin-left: 10px;" title="Froala" target="_blank"><svg style="height: 100%;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 822.8 225.8"><defs><style>.cls-1,.cls-2{fill:#0098f7;}.cls-2{stroke:#231f20;stroke-miterlimit:10;stroke-width:5px;}</style></defs><title>Froala Pages</title><path class="cls-1" d="M123.58,78.65A16.16,16.16,0,0,0,111.13,73H16.6C7.6,73,0,80.78,0,89.94V128.3a16.45,16.45,0,0,0,32.9,0V104.14h78.5A15.63,15.63,0,0,0,126.87,91.2,15.14,15.14,0,0,0,123.58,78.65Z" transform="translate(0 -61.94)"/><path class="cls-1" d="M103.54,170a16.05,16.05,0,0,0-11.44-4.85H15.79A15.81,15.81,0,0,0,0,180.93v88.69a16.88,16.88,0,0,0,5,11.92,16,16,0,0,0,11.35,4.7h.17a16.45,16.45,0,0,0,16.41-16.6v-73.4H92.2A15.61,15.61,0,0,0,107.89,181,15.1,15.1,0,0,0,103.54,170Z" transform="translate(0 -61.94)"/><path class="cls-2" d="M30.4,167.64" transform="translate(0 -61.94)"/><path class="cls-1" d="M233,144.17c-5.29-6.22-16-7.52-24.14-7.52-16.68,0-28.72,7.71-36.5,23.47v-5.67a16.15,16.15,0,1,0-32.3,0v115.5a16.15,16.15,0,1,0,32.3,0v-38.7c0-19.09,3.5-63.5,35.9-63.5a44.73,44.73,0,0,1,5.95.27h.12c12.79,1.2,20.06-2.73,21.6-11.69C236.76,151.48,235.78,147.39,233,144.17Z" transform="translate(0 -61.94)"/><path class="cls-1" d="M371.83,157c-13.93-13.11-32.9-20.33-53.43-20.33S279,143.86,265.12,157c-14.67,13.88-22.42,32.82-22.42,54.77,0,21.68,8,41.28,22.4,55.2,13.92,13.41,32.85,20.8,53.3,20.8s39.44-7.38,53.44-20.79c14.55-13.94,22.56-33.54,22.56-55.21S386.39,170.67,371.83,157Zm-9.73,54.77c0,25.84-18.38,44.6-43.7,44.6s-43.7-18.76-43.7-44.6c0-25.15,18.38-43.4,43.7-43.4S362.1,186.59,362.1,211.74Z" transform="translate(0 -61.94)"/><path class="cls-1" d="M552.7,138.14a16.17,16.17,0,0,0-16,16.3v1C526.41,143.85,509,136.64,490,136.64c-19.83,0-38.19,7.24-51.69,20.4C424,171,416.4,190,416.4,212c0,21.61,7.78,41.16,21.9,55,13.56,13.33,31.92,20.67,51.7,20.67,18.83,0,36.29-7.41,46.7-19.37v1.57a16.15,16.15,0,1,0,32.3,0V154.44A16.32,16.32,0,0,0,552.7,138.14Zm-16.3,73.6c0,30.44-22.81,44.3-44,44.3-24.57,0-43.1-19-43.1-44.3s18.13-43.4,43.1-43.4C513.73,168.34,536.4,183.55,536.4,211.74Z" transform="translate(0 -61.94)"/><path class="cls-1" d="M623.5,61.94a16.17,16.17,0,0,0-16,16.3v191.7a16.15,16.15,0,1,0,32.3,0V78.24A16.32,16.32,0,0,0,623.5,61.94Z" transform="translate(0 -61.94)"/><path class="cls-1" d="M806.5,138.14a16.17,16.17,0,0,0-16,16.3v1c-10.29-11.63-27.74-18.84-46.7-18.84-19.83,0-38.19,7.24-51.69,20.4-14.33,14-21.91,33-21.91,55,0,21.61,7.78,41.16,21.9,55,13.56,13.33,31.92,20.67,51.7,20.67,18.83,0,36.29-7.41,46.7-19.37v1.57a16.15,16.15,0,1,0,32.3,0V154.44A16.32,16.32,0,0,0,806.5,138.14Zm-16.3,73.6c0,30.44-22.81,44.3-44,44.3-24.57,0-43.1-19-43.1-44.3s18.13-43.4,43.1-43.4C767.53,168.34,790.2,183.55,790.2,211.74Z" transform="translate(0 -61.94)"/></svg></a></div>'],pageRightButtons:[["download"]],editorOptions:{iconsTemplate:"font_awesome_5",linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{text:"Facebook",href:"https://facebook.com"}]}},b=function(t){function e(){return s(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.render=function(){this._initFilters(),this._initPanel(),this.loadedDesigns={}},e.prototype._initFilters=function(){var n=this,i=document.createElement("DIV");i.classList.add("fp-panel-filter"),c.append(this.head,i);var t=function(t){if(Object.prototype.hasOwnProperty.call(l.BLOCKS,t)){var e=n.doc.createElement("A");e.setAttribute("data-block-type",c.underscores(t)),e.innerHTML=t,c.append(i,e),n.events.on(e,"click",function(){return n.setActiveBlock(t)})}};for(var e in l.BLOCKS)t(e);this.filter=i},e.prototype._initPanel=function(){var t=document.createElement("DIV");t.classList.add("fp-panel-panel"),this.panel=t,c.append(this.body,t)},e.prototype._refreshFilters=function(t){var e=this.panel.querySelector(".fp-panel-blocks-wrapper.fp-visible");e&&(e.classList.remove("fp-visible"),this.filter.querySelector("a.fp-active").classList.remove("fp-active")),this.filter.querySelector('a[data-block-type="'+c.underscores(t)+'"]').classList.add("fp-active")},e.prototype._refreshDesigns=function(t){var e=void 0;if(this.loadedDesigns[c.underscores(t)])e=this.panel.querySelector('div.fp-panel-blocks-wrapper[data-block-type="'+c.underscores(t)+'"]');else{(e=document.createElement("DIV")).setAttribute("data-block-type",c.underscores(t)),e.classList.add("fp-panel-blocks-wrapper"),c.append(this.panel,e);for(var n=1;n<=l.BLOCKS[t].length;n++){var i=new l(this,t,l.BLOCKS[t][n-1]);c.append(e,i.el)}this.loadedDesigns[c.underscores(t)]=!0}e.classList.add("fp-visible")},e.prototype.setActiveBlock=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"Sections";"Sections"===t&&(t=this.opts.designsDefaultBlocks),this._refreshFilters(t),this._refreshDesigns(t)},e}(function(t){function e(){return s(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.init=function(t,e){this.el=this.doc.createElement("DIV"),this.el.setAttribute("class","fp-panel"),this._addTitle(t),this._addContent(e),c.append(this.page.container,this.el),this.render()},e.prototype._addContent=function(t){var e=this.doc.createElement("DIV");e.setAttribute("class","fp-panel-body"),t&&(e.innerHTML=t),c.append(this.el,e),this.body=e},e.prototype._addTitle=function(t){var e=this.doc.createElement("DIV");if(e.setAttribute("class","fp-panel-head"),t){var n=this.doc.createElement("H2");n.innerHTML=t,c.append(e,n)}c.append(this.el,e),this.head=e},e.prototype.show=function(){this.el.classList.add("fp-visible")},e.prototype.hide=function(){this.el.classList.remove("fp-visible")},e.prototype.isVisible=function(){return this.el.classList.contains("fp-visible")},e}(t)),w=function(t){function e(){return s(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.init=function(){},e.prototype._mergeEditorOpts=function(o,s){var t=function(n){if("events"===n&&o[n]&&o[n].hasOwnProperty("initialized")){var t=s[n].initialized,e=o[n].initialized,i=Object.assign({},s[n],{initialized:function(){new Function(t.apply(this)).call(),new Function(e.apply(this)).call()}});Object.assign(o[n],i)}else"object"===r(o[n])?Array.isArray(o[n])?(o[n]=[].concat(o[n],s[n]),o[n]=o[n].filter(function(t,e){return o[n].indexOf(t)===e})):Object.assign(o[n],s[n]):o.hasOwnProperty(n)||(o[n]=s[n])};for(var e in s)t(e);return o},e.prototype._preventTypingInLinks=function(e){e.events.on("keydown",function(t){return!e.link.get()||(t.preventDefault(),!1)},!0)},e.prototype._isTrialExpire=function(){var t=window.localStorage.getItem("FroalaTrialExpiry");return t?t<(new Date).getTime()?"expire":"in-trial":"not-in-trial"},e.prototype._createButton=function(t){var e="expire"===this._isTrialExpire()?"#myModal2":"#myModal",n=document.createElement("BUTTON");n.innerHTML="Upgrade to Pro!",n.setAttribute("type","button"),n.setAttribute("data-toggle","modal"),n.setAttribute("data-target",e),n.addEventListener("touchstart",function(){document.getElementById("froala-pages").contentWindow.document.getElementsByClassName("fr-mobile")[0].classList.add("fr-custom")});var i=document.createElement("DIV");return i.setAttribute("class","fr-btn-grp fr-float-left pro-btn "+t),i.appendChild(n),i},e.prototype._addProButtonForText=function(){var t=document.getElementById("froala-pages");if(0<!t.contentWindow.document.getElementsByClassName("pro-btn-text").length){var e=this._createButton("pro-btn-text"),n=t.contentWindow.document.getElementsByClassName("fr-newline"),i=t.contentWindow.document.getElementsByClassName("fr-toolbar");i[0].insertBefore(e,n[0]);for(var o=i[0].childNodes[1].getElementsByTagName("button"),s=0;s<o.length;s++)o[s].classList.add("fr-disabled","pro-toolbar")}},e.prototype._addProButtonForImage=function(){var t=document.getElementById("froala-pages");if(0<!t.contentWindow.document.getElementsByClassName("pro-btn-image").length){var e=this._createButton("pro-btn-image"),n=t.contentWindow.document.getElementsByClassName("fr-popup"),i=t.contentWindow.document.getElementsByClassName("fr-tooltip");n[0].insertBefore(e,i[0]);for(var o=n[0].childNodes[0].getElementsByTagName("button"),s=1;s<o.length;s++)o[s].classList.add("fr-disabled","pro-toolbar");n[0].classList.add("fr-imageProButton")}},e.prototype._downloadEditor=function(){var t=new Date,e=new Date(t.setDate(t.getDate()+7)).getTime();window.localStorage.setItem("FroalaTrialExpiry",e);for(var n=document.getElementById("froala-pages").contentWindow.document.getElementsByClassName("pro-toolbar"),i=0;i<n.length;i++)n[i].classList.remove("fr-disabled","pro-toolbar");window.open("https://froala.com/wysiwyg-editor/"),window.location.reload()},e.prototype._addDownloadModal=function(){var t=document.createElement("div");t.id="trial_popup",t.innerHTML='\n <div class="modal popupp fade" id="myModal">\n <div class="modal-dialog modal-dialog-centered">\n <div class="modal-content">\n \x3c!-- Modal Header --\x3e\n \x3c!-- Modal body --\x3e\n <div class="modal-body paddremov">\n <div class="try_fro">\n <h1>Try Froala Editor</h1>\n <p><b>For Free</b></p>\n </div>\n <div class="try_fro_content">\n <p>Start your trial today and receive <b>7 days of free technical support </b> to get you started. </p>\n </div>\n <div class="try_fro_content_bottom">\n <p>Here are some of the benefits you\'ll get from using froala WYSIWIG Editor:</p>\n </div>\n <div class="try_fro_content_footer">\n <ul>\n <li>7 days of free technical support</li>\n <li>Developer Friendly</li>\n <li>Out-of-the-box plugins</li>\n <li>Easy to Extend</li>\n </ul>\n <div class="download_botton">\n <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="downloadEditor()">\n Download <br/> now!\n </button>\n </div>\n </div>\n </div>\n \x3c!-- Modal footer --\x3e\n </div>\n </div>\n </div>\n <div class="modal popupp fade" id="myModal2">\n <div class="modal-dialog modal-dialog-centered">\n <div class="modal-content">\n \x3c!-- Modal Header --\x3e\n \x3c!-- Modal body --\x3e\n <div class="modal-body paddremov">\n <div class="try_fro">\n <p><b>Your trial period has expired</b></p>\n </div>\n <div class="try_fro_content">\n <p></p>\n </div>\n <div class="try_fro_content_bottom">\n <p></p>\n </div>\n <div class="try_fro_content_footer">\n <ul>\n </ul>\n <div class="download_botton">\n <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="window.open(\'https://froala.com/wysiwyg-editor/pricing/\')">\n Purchase Now!\n </button>\n </div>\n </div>\n </div>\n \x3c!-- Modal footer --\x3e\n </div>\n </div>\n </div>\n ',document.getElementById("froala-pages").contentWindow.document.getElementsByClassName("container")[0].appendChild(t),document.getElementById("froala-pages").contentWindow.downloadEditor=this._downloadEditor},e.prototype.enable=function(){this.FroalaEditor=this.page.iframeDoc.defaultView.FroalaEditor,this._defineLinkButtons(),this._addDownloadModal();var e=this;e._mergeEditorOpts(e.opts.editorOptions,{toolbarInline:!0,pluginsEnabled:["image","link","align","colors","emoticons","video","paragraphFormat","fontSize","fontFamily","table","lists","lineHeight","fontAwesome","imageTUI"],toolbarButtons:["bold","italic","textColor","backgroundColor","paragraphFormat","align","emoticons","insertLink","insertImage","undo","redo","-","underline","subscript","superscript","fontSize","fontFamily","insertTable","formatOL","formatUL","lineHeight","insertVideo","fontAwesome"],initOnClick:!0,colorsHEXInput:!1,keepFormatOnDelete:!0,toolbarVisibleWithoutSelection:!0,listAdvancedTypes:!0,imageEditButtons:["imageReplace","-","imageAlign","imageRemove","imageLink","linkEdit","linkRemove","imageAlt","imageDisplay","imageStyle","imageSize","imageTUI"],linkEditButtons:["linkEdit","linkButton","linkRemove"],htmlAllowedTags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","br","button","canvas","caption","cite","code","col","colgroup","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","queue","rp","rt","ruby","s","samp","script","style","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video","wbr","svg","path"],htmlAllowedAttrs:["accept","accept-charset","accesskey","action","align","allowfullscreen","allowtransparency","alt","aria-.*","async","autocomplete","autofocus","autoplay","autosave","background","bgcolor","border","charset","cellpadding","cellspacing","checked","cite","class","color","cols","colspan","content","contenteditable","contextmenu","controls","coords","data","data-.*","datetime","default","defer","dir","dirname","disabled","download","draggable","dropzone","enctype","for","form","formaction","frameborder","headers","height","hidden","high","href","hreflang","http-equiv","icon","id","ismap","itemprop","keytype","kind","label","lang","language","list","loop","low","max","maxlength","media","method","min","mozallowfullscreen","multiple","muted","name","novalidate","open","optimum","pattern","ping","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","reversed","rows","rowspan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","src","srcdoc","srclang","srcset","start","step","summary","spellcheck","style","tabindex","target","title","type","translate","usemap","value","valign","webkitallowfullscreen","width","wrap","fill","viewBox","xmlns","d"],events:{initialized:function(){e._preventTypingInLinks(this),e._replaceImageSourceWithBase64(this),(e.page.pageToolbar.ul&&"not-in-trial"===e._isTrialExpire()||"expire"===e._isTrialExpire())&&(e._addProButtonForText(),this.$el.on("click","img",function(){return e._addProButtonForImage()}))}}}),this.page.iframeBody.querySelectorAll("[data-block-type]").forEach(function(t){t.querySelectorAll('[class*="col"]').forEach(function(t){t.querySelector(".nav-link")||new e.FroalaEditor('[class*="col"]',e.opts.editorOptions)}),new e.FroalaEditor("header .nav-link, header nav a.btn",Object.assign({},e.opts.editorOptions,{linkEditButtons:["linkEdit","linkButton","linkAdd","linkDestroy"],linkInsertButtons:[]})),new e.FroalaEditor("footer .nav-link, footer nav a.btn",Object.assign({},e.opts.editorOptions,{linkEditButtons:["linkEdit","linkAdd","linkDestroy"],linkInsertButtons:[]}))})},e.prototype.disable=function(){this.page.iframeBody.querySelectorAll("[data-block-type]").forEach(function(t){t.querySelectorAll('[class*="col"]').forEach(function(t){t["data-froala.editor"]&&t["data-froala.editor"].destroy()}),t.querySelectorAll("footer .nav-link, footer nav a.btn, header .nav-link, header nav a.btn").forEach(function(t){t.contentEditable=!1})})},e.prototype._defineLinkButtons=function(){var e=this;this.FroalaEditor.DefineIcon("linkDestroy",{NAME:"trash"}),this.FroalaEditor.RegisterCommand("linkDestroy",{type:"button",title:"Remove Link",callback:function(){var t=this.$oel;this.destroy(),0===t.parents(".nav-item").length?t.remove():t.parent().remove()},refresh:function(t){0===this.$oel.parent(".nav-item").length?t.get(0).classList.toggle("fr-disabled",0===this.$oel.siblings(".nav-link").length):t.get(0).classList.toggle("fr-disabled",0===this.$oel.parents(".nav-item").siblings(".nav-item").length),e.enable()}}),this.FroalaEditor.DefineIcon("linkAdd",{NAME:"plus"}),this.FroalaEditor.RegisterCommand("imageTUI",{title:"Advanced Edit",undo:!1,focus:!1,callback:function(t,e){var n=document.getElementsByClassName("fp-block-toolbar");0<n.length&&n[0].classList.remove("fp-visible"),this.imageTUI.launch(this,!0)},plugin:"imageTUI"}),this.FroalaEditor.RegisterCommand("linkAdd",{type:"button",title:"Add Link",callback:function(){var t=this.$oel;0===t.parents(".nav-item").length?t.after('<a class="nav-link" href="https://www.froala.com">Link</a>'):t.parent().after('<li class="nav-item"><a class="nav-link" href="https://www.froala.com">Link</a></li>')}}),this.FroalaEditor.DefineIcon("linkButton",{NAME:"star"}),this.FroalaEditor.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"video",SVG_KEY:"insertVideo"}),this.FroalaEditor.RegisterCommand("linkButton",{type:"dropdown",title:"Choose Style",options:{link:"Link",button:"Button",outline:"Outline"},callback:function(t,e){var n=this.link.get();"link"===e?(n.classList.add("nav-link"),n.classList.remove("btn","btn-primary","btn-outline-primary")):"button"===e?(n.classList.remove("nav-link","btn-outline-primary"),n.classList.add("btn","btn-primary")):"outline"===e&&(n.classList.remove("nav-link","btn-primary"),n.classList.add("btn","btn-outline-primary"))}})},e.prototype._replaceImageSourceWithBase64=function(t){t.events.on("image.inserted",function(e){e=e[0];var n=new XMLHttpRequest;n.responseType="blob",n.onreadystatechange=function(){if(4===n.readyState&&200===n.status){var t=new FileReader;t.readAsDataURL(n.response),t.onloadend=function(){e.src=t.result}}},n.open("GET",e.src,!0),n.send()})},e}(t),k=function(t){function e(){return s(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.init=function(t){var e=this;this.name=t.name,this.template=t.template;var n=this.doc.createElement("DIV");n.classList.add("fp-no-block","fp-no-"+this.name.toLowerCase()),n.setAttribute("data-fp","true"),n.innerHTML=this.template,this.el=n,this.events.on(n,"click",function(){return e.click()}),this.events.on(n,"mouseenter",function(){return e._mouseEnter()})},e.prototype.click=function(){this.events.emit("emptyBlock.click",this)},e.prototype._mouseEnter=function(){this.page.blockToolbar.hide()},e}(t);k.HEADER={name:"Headers",template:"<p>Header</p>"},k.FOOTER={name:"Footers",template:"<p>Footer</p>"},k.SECTION={name:"Sections",template:"<h1>Blank Website</h1><p>(click to add a design block)</p>"};var x=function(){function t(){s(this,t),this.domEvents={},this.internalEvents={}}return t.prototype._id=function(t){return this._ids||(this._ids={}),this._ids[t]||(this._ids[t]=Object.keys(this._ids).length+1),this._ids[t]},t.prototype.on=function(n,t,i){var o=this,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};t.split(" ").forEach(function(t){var e=o._id(n);o.domEvents[e]||(o.domEvents[e]={}),o.domEvents[e][t]||(o.domEvents[e][t]=[]),o.domEvents[e][t].push({callback:i,options:s}),n.addEventListener(t,i,s)})},t.prototype.off=function(n,t){var i=this;t.split(" ").forEach(function(e){var t=i._id(n);i.domEvents[t]&&i.domEvents[t][e]&&i.domEvents[t][e].forEach(function(t){n.removeEventListener(e,t.callback,t.options)})})},t.prototype.once=function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};i.once=!0,this.on(t,e,n,i)},t.prototype.listen=function(t,e){var n=this;t.split(" ").forEach(function(t){n.internalEvents[t]||(n.internalEvents[t]=[]),n.internalEvents[t].push(e)})},t.prototype.emit=function(t){for(var e=arguments.length,n=Array(1<e?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.internalEvents[t]&&this.internalEvents[t].forEach(function(t){t.apply(void 0,n)})},t}(),B=function(t){function e(){return s(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.init=function(){this.shareUrl="https://froala.com/pages",this.shareText="Share your Froala Pages project and get your friends to build with Froala Pages for free!",this.el=c.createElement('<div class="fp-share-popup-wrap fp-hidden"><div class="fp-share-popup">\n <div class="fp-popup-close-toolbar"><span>Share with:</span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" fill="#2196f3" width="20"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg></div>\n <div class="fp-popup-text-row">\n <span class="twitter-share"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="twitter-square" class="svg-inline--fa fa-twitter-square fa-w-14" role="img" viewBox="0 0 448 512" width="40"><path fill="#1da1f2" d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-48.9 158.8c.2 2.8.2 5.7.2 8.5 0 86.7-66 186.6-186.6 186.6-37.2 0-71.7-10.8-100.7-29.4 5.3.6 10.4.8 15.8.8 30.7 0 58.9-10.4 81.4-28-28.8-.6-53-19.5-61.3-45.5 10.1 1.5 19.2 1.5 29.6-1.2-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3a65.447 65.447 0 0 1-29.2-54.6c0-12.2 3.2-23.4 8.9-33.1 32.3 39.8 80.8 65.8 135.2 68.6-9.3-44.5 24-80.6 64-80.6 18.9 0 35.9 7.9 47.9 20.7 14.8-2.8 29-8.3 41.6-15.8-4.9 15.2-15.2 28-28.8 36.1 13.2-1.4 26-5.1 37.8-10.2-8.9 13.1-20.1 24.7-32.9 34z"/></svg></span>\n <span class="fb-share"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="facebook-square" class="svg-inline--fa fa-facebook-square fa-w-14" role="img" viewBox="0 0 448 512" width="40"><path fill="#4267b2" d="M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h137.25V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.27c-30.81 0-40.42 19.12-40.42 38.73V256h68.78l-11 71.69h-57.78V480H400a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z"/></svg></span>\n <span class="li-share"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="linkedin" class="svg-inline--fa fa-linkedin fa-w-14" role="img" viewBox="0 0 448 512" width="40"><path fill="#0077b5" d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"/></svg></span>\n <span class="mail-share"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="at" class="svg-inline--fa fa-at fa-w-16" role="img" viewBox="0 0 512 512" width="40"><path fill="#006fc1" d="M256 8C118.941 8 8 118.919 8 256c0 137.059 110.919 248 248 248 48.154 0 95.342-14.14 135.408-40.223 12.005-7.815 14.625-24.288 5.552-35.372l-10.177-12.433c-7.671-9.371-21.179-11.667-31.373-5.129C325.92 429.757 291.314 440 256 440c-101.458 0-184-82.542-184-184S154.542 72 256 72c100.139 0 184 57.619 184 160 0 38.786-21.093 79.742-58.17 83.693-17.349-.454-16.91-12.857-13.476-30.024l23.433-121.11C394.653 149.75 383.308 136 368.225 136h-44.981a13.518 13.518 0 0 0-13.432 11.993l-.01.092c-14.697-17.901-40.448-21.775-59.971-21.775-74.58 0-137.831 62.234-137.831 151.46 0 65.303 36.785 105.87 96 105.87 26.984 0 57.369-15.637 74.991-38.333 9.522 34.104 40.613 34.103 70.71 34.103C462.609 379.41 504 307.798 504 232 504 95.653 394.023 8 256 8zm-21.68 304.43c-22.249 0-36.07-15.623-36.07-40.771 0-44.993 30.779-72.729 58.63-72.729 22.292 0 35.601 15.241 35.601 40.77 0 45.061-33.875 72.73-58.161 72.73z"/></svg></span>\n </div>\n </div></div>'),c.append(this.page.selector,this.el),this._bindButtonEvents()},e.prototype.show=function(){this.el.classList.remove("fp-hidden")},e.prototype.hide=function(){this.el.classList.add("fp-hidden")},e.prototype._shareWithTwitter=function(){this._openChildWindow("http://twitter.com/share?url="+this.shareUrl+"&text="+this.shareText)},e.prototype._shareWithFb=function(){this._openChildWindow("https://www.facebook.com/sharer/sharer.php?u="+this.shareUrl+"&quote="+this.shareText)},e.prototype._shareWithLinkedIn=function(){this._openChildWindow("https://www.linkedin.com/shareArticle?mini=true&url="+t