(()=>{"use strict";var t={338:(t,e,n)=>{var o=n(795);e.H=o.createRoot,o.hydrateRoot},795:t=>{t.exports=window.ReactDOM}},e={};window.React;var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,n),r.exports}(338);const o=window.lodash;window.wp.i18n;const i=window.ReactJSXRuntime,{IconChooserModal:r}=(0,o.get)(window,["__FontAwesomeOfficialPlugin__","iconChooser"],{}),c={};function s(t,e,c){const s=new Event(a||`fontAwesomeIconChooser-${function(){let t="";for(let e=0;e<16;e++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return t}()}`,{bubbles:!0,cancelable:!1});var a;const d=document.createElement("div");return e.appendChild(d),(0,n.H)(d).render((0,i.jsx)(r,{onSubmit:function(e){c(t,function(t){const e=[];if(!t.iconName)return void console.error("Font Awesome Icon Chooser: missing required iconName attribute for shortcode");e.push(`name="${t.iconName}"`);const n=["prefix","style","class","aria-hidden","aria-label","aria-labelledby","title","role"];for(const i of n){const n=(0,o.get)(t,i);n&&e.push(`${i}="${n}"`)}return`[icon ${e.join(" ")}]`}(e.detail))},openEvent:s})),()=>{document.dispatchEvent(s)}}jQuery(document).on("click",".font-awesome-icon-chooser-media-button",function(t){const e=function(t){if(c[t])return c[t];const e=document.querySelector(`#${t}`),n=e?.parentElement;if(!n)return;const i=s(t,n,(t,e)=>{!function(t,e){const n=(0,o.get)(window,`tinymce.editors.${t}`);if(n&&!n.hidden)return void n.insertContent(e);const i=window.QTags&&QTags.getInstance(t),r=function(t){const e=window.getComputedStyle(t);if("none"===e.display)return!1;if("hidden"===e.visibility)return!1;const n=t.getBoundingClientRect();return 0!==n.width&&0!==n.height}(i.canvas);i&&r&&QTags.insertContent(e,t)}(t,e)});return c[t]=i,i}(t.target.getAttribute("data-fa-editor-id"));setTimeout(e,0)})})();