(()=>{"use strict";var e={338:(e,t,s)=>{var n=s(795);t.H=n.createRoot,n.hydrateRoot},795:e=>{e.exports=window.ReactDOM}},t={};function s(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const n=window.React;var r=s.n(n),a=s(338);const o=({title:e,message:t,nonce:s,slug:a})=>{const o=r().useRef(null),{data:c,error:l,refetch:d}=((e,t={},s=!1)=>{const[r,a]=(0,n.useState)(!s),[o,c]=(0,n.useState)(!1),[l,d]=(0,n.useState)(null),[i,u]=(0,n.useState)(null),f=(s={})=>{wp.ajax?(a(!0),c(!1),d(null),wp.ajax.post(e,{...t,...s}).done(e=>{u(e),a(!1)}).fail(e=>{c(!0),d(e),a(!1)})):console.error("Please use wp-util as a dependency")},p=async(e={})=>{f(e)};return(0,n.useEffect)(()=>{s||f(t)},[]),{data:i,saveData:p,refetch:p,isLoading:r,isError:o,error:l}})(`fs_notice_dismiss_${a}`,{nonce:s},!0);return r().useEffect(()=>{setTimeout(()=>{const e=o.current?.nextElementSibling;e?.addEventListener("click",()=>{d(t)})},2e3)},[]),(0,n.createElement)("p",{ref:o,style:{color:"green",fontSize:"15px"}},e?(0,n.createElement)("b",null,e," "):"",t)};document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".fs_notice_board").forEach(e=>{const t={...e.dataset}||{};Object.keys(e.dataset).map(t=>delete e.dataset[t]);const s=(e=>{let t=null;try{t=JSON.parse(e)}catch(e){console.warn(e.message)}return t})(t.notice);s.message&&(e.classList.add("notice"),e.classList.add("notice-success"),e.classList.add("is-dismissible"),e.setAttribute("id","message")),(0,a.H)(e).render((0,n.createElement)(o,{...s,nonce:t.nonce,slug:t.slug}))})})})();