(()=>{"use strict";window.wp.i18n;for(var t=document.getElementsByClassName("fea-wysiwyg-frontend"),e=(window.feaSettings,function(){var e=t[n],a=window.feaTextEditorSettings||{rows:10,default_value:"",maxlength:0},o=parseInt(a.maxlength,10)||0;e.style.border="1px solid #ccc",e.style.padding="2px 8px",a.rows&&(e.style.minHeight=20*a.rows+"px"),tinymce.init({target:e,inline:!0,wpautop:!1,toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",menubar:!1,setup:function(t){t.on("change keyup NodeChange",(function(){t.on("change keyup NodeChange",(function(){var e=t.getElement().closest(".acf-input"),n=null==e?void 0:e.querySelector("textarea.fea-wysiwyg-frontend-textarea");n&&(n.value=t.getContent())}))})),t.on("keydown paste",(function(e){if(!(o<=0)){var n=e.key;if("Backspace"!==n&&"Delete"!==n&&"ArrowLeft"!==n&&"ArrowRight"!==n&&"ArrowUp"!==n&&"ArrowDown"!==n&&"Tab"!==n)return(t.getBody().textContent||"").length+1>o?(e.preventDefault(),e.stopPropagation(),!1):void 0}})),t.on("paste",(function(e){if(!(o<=0)){var n=t.getBody().textContent||"",a=(e.clipboardData||window.clipboardData).getData("text");if(n.length+a.length>o){e.preventDefault();var i=o-n.length;if(i>0){var r=a.substring(0,i);t.insertContent(r)}return!1}}}))}})}),n=0;n<t.length;n++)e()})();