(()=>{"use strict";var e={d:(t,o)=>{for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{useMetaState:()=>d,useSiteOption:()=>i,useSiteOptionJSON:()=>n});const o=window.wp.data,i=function(e){const{editEntityRecord:t}=(0,o.useDispatch)("core"),{setting:i,isResolving:n}=(0,o.useSelect)((t=>({setting:t("core").getEditedEntityRecord("root","site")[e],isResolving:t("core").isResolving("getEditedEntityRecord",["root","site"])})),[e]);return{value:i,onChange:o=>{n||t("root","site",void 0,{[e]:o})},isResolving:n}},n=function(e){const{value:t,onChange:o,...n}=i(e);return{value:n.isResolving?{}:t?JSON.parse(t):{},onChange:e=>o(JSON.stringify({...e})),...n}};var r;function s(e,t="{}",i=[]){const n=(0,o.useSelect)((o=>{const i=o("core/editor").getEditedPostAttribute("meta")||{};return JSON.parse(i[e]||t)}),i),{editPost:r}=(0,o.useDispatch)("core/editor");return[n,o=>{let i="function"==typeof o?o(n):o;"object"==typeof i&&null!==i||(i=JSON.parse(t)),r({meta:{[e]:JSON.stringify(i)}})}]}window.JetFBHooks=null!==(r=window.JetFBHooks)&&void 0!==r?r:{},window.JetFBHooks.useMetaState=s;const d=s;(window.jfb=window.jfb||{}).data=t})();