!function(){var e={59588:function(e){e.exports=function(e,n){var t,r,i=0;function u(){var u,o,s=t,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(o=0;o<l;o++)if(s.args[o]!==arguments[o]){s=s.next;continue e}return s!==t&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=t,s.prev=null,t.prev=s,t=s),s.val}s=s.next}for(u=new Array(l),o=0;o<l;o++)u[o]=arguments[o];return s={args:u,val:e.apply(null,u)},t?(t.prev=s,s.next=t):r=s,i===n.maxSize?(r=r.prev).next=null:i++,t=s,s.val}return n=n||{},u.clear=function(){t=null,r=null,i=0},u}}},n={};function t(r){var i=n[r];if(void 0!==i)return i.exports;var u=n[r]={exports:{}};return e[r](u,u.exports,t),u.exports}t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";t.r(r),t.d(r,{PluginArea:function(){return h},canUserCreate:function(){return b},canUserEdit:function(){return P},getBlockTypes:function(){return u},getMenu:function(){return y},getPlugins:function(){return m},getSearchTypes:function(){return l},isFeatureActive:function(){return w},registerBlockRender:function(){return i},registerPlugin:function(){return v},registerSearchRender:function(){return s}});var e=window.wp.hooks;const n={};function i(t,r){return n[t]={name:t,...r},(0,e.doAction)("nisjeblocks.typesRegistered",r,t),r}function u(){return Object.values(n)}const o={};function s(n,t){return o[n]={name:n,...t},(0,e.doAction)("search.typesRegistered",t,n),t}function l(){return Object.values(o)}var c=window.wp.element,a=window.React,g=window.lodash,p=t(59588),d=t.n(p);const f={};function v(n,t){return f[n]={name:n,...t},(0,e.doAction)("plugins.pluginRegistered",t,n),t}function m(){return Object.values(f)}class h extends a.Component{constructor(){super(...arguments),this.setPlugins=this.setPlugins.bind(this),this.memoizedContext=d()((e=>({name:e}))),this.state=this.getCurrentPluginsState()}getCurrentPluginsState(){return{plugins:(0,g.map)(m(this.props.scope),(e=>{let{name:n,render:t}=e;return{Plugin:t,context:this.memoizedContext(n)}}))}}componentDidMount(){(0,e.addAction)("plugins.pluginRegistered","nisje/plugins/plugin-area/plugins-registered",this.setPlugins)}componentWillUnmount(){(0,e.removeAction)("plugins.pluginRegistered","nisje/plugins/plugin-area/plugins-registered")}setPlugins(){this.setState(this.getCurrentPluginsState)}render(){return(0,c.createElement)("div",{style:{display:"none"}},(0,g.map)(this.state.plugins,(e=>{let{context:n,Plugin:t}=e;return(0,c.createElement)(t,{key:n.name})})))}}const x=window?.nisjeSettings||{};function w(e){var n;return null!==(n=x?.features?.[e])&&void 0!==n&&n}function y(e){return x?.menus[e]}function P(e){var n;return null!==(n=x?.userCapabilities?.edit?.[e])&&void 0!==n&&n}function b(e){var n;return null!==(n=x?.userCapabilities?.create?.[e])&&void 0!==n&&n}}(),(window.nisje=window.nisje||{}).settings=r}();