diff --git a/build/index.asset.php b/build/index.asset.php index 5f68ce4..9105bb5 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render', 'wp-url'), 'version' => '8a2696270d02647e8bd2'); + array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render', 'wp-url'), 'version' => '706365f9252e49b89e64'); diff --git a/build/index.js b/build/index.js index d34b066..20021a5 100644 --- a/build/index.js +++ b/build/index.js @@ -1 +1 @@ -!function(){var e,t={280:function(e,t,n){"use strict";var l=window.wp.element,o=window.wp.i18n,r=n(184),a=n.n(r),i=window.wp.blocks,c=window.wp.blockEditor,s=window.wp.serverSideRender,u=n.n(s),b=window.wp.components,m=window.lodash,k=window.wp.data,p=window.wp.url;const{Component:d}=wp.element,{getBlockTypes:h,getBlockType:v}=wp.blocks,{BlockIcon:f}=wp.blockEditor,{SelectControl:w}=wp.components;function g(e){let{value:t,onChange:n,...r}=e;const a=h().map((e=>y(e))).filter(_).map((e=>function(e){return{label:e,value:e}}(e)));return a.sort(E),(0,l.createElement)(w,{label:(0,o.__)("Prefix","oik-blocks"),value:t,options:a,onChange:n})}function E(e,t){return e.valuet.value?1:0}function _(e,t,n){return n.indexOf(e)===t}function y(e){return e.name.split("/")[0]}function C(e,t,n,o,r){const a=e.split("/")[0];var c=(0,i.getBlockTypes)(),s=(c=(c=c.filter(B,a)).sort(((e,t)=>e.title.localeCompare(t.title)))).length,u=R(c),b=null;n&&o&&(b=t?u.map((e=>P(e,r))):u.map((e=>T(e))));var m=null;if(o)t?m=(0,l.createElement)("pre",null,"rem Blocks ",s,(0,l.createElement)("br",null),"rem Variations ",u.length,(0,l.createElement)("br",null),c.map((e=>P(e,r))),b):(c=c.sort(((e,t)=>e.name.localeCompare(t.name))),m=(0,l.createElement)("pre",null,"rem Block ",s,(0,l.createElement)("br",null),"rem Variations ",u.length,(0,l.createElement)("br",null),c.map((e=>T(e))),b));else if(m=(0,l.createElement)("dl",null,c.map((e=>A(e,t)))),n){var k=(0,l.createElement)("dl",null,u.map((e=>A(e,t))));m=(0,l.createElement)(l.Fragment,null,m,(0,l.createElement)("h3",null,"Variations"),k)}return m}function B(e,t,n){return this==y(e)}function A(e,t){var n=null;t&&(n=void 0===e.block_name||""===e.block_name?function(e){var t=e.title.replace(/ /g,"-");t=(t=t.replace("/","-")).toLowerCase();var n=e.name.replace("/","-"),l=null,o=(0,k.select)("core/editor").getPermalinkParts();if(null!==o){var r=(0,k.select)("core/editor").getCurrentPostType();l=o.prefix.replace(r,"block")}else console.log("SiteURL's null");return`${l}${t}-${n}`}(e):function(e){var t=L(e.block_title),n=(window.location.href,(window.location.origin+window.location.pathname).replace("wp-admin/post.php","")+"block/"),l=L(e.title),o=e.block_name.replace("/","-");return`${n}${t}-${o}/${l}-${o}`}(e));var r,a,i;return r=void 0===e.block_name||""===e.block_name?"":" : ",a=D(e),i=x(e.description),(0,l.createElement)(l.Fragment,{key:e.block_name+"|"+e.name},(0,l.createElement)("dt",null,(0,l.createElement)(b.Icon,{icon:e.icon&&e.icon.src?e.icon.src:e.icon})),(0,l.createElement)("dd",null,t&&(0,l.createElement)("a",{href:n,title:(0,o.__)("View block","oik-blocks")},e.block_title,r,e.title," - ",e.block_name," ",e.name),!t&&(0,l.createElement)("span",null,e.block_title,r,e.title," - ",e.block_name," ",e.name),a,(0,l.createElement)("br",null),i,(0,l.createElement)("br",null)))}function P(e,t){var n=ajaxurl,o=x(e.description),r=e.keywords?e.keywords.join():null;return n=(0,p.addQueryArgs)(n,{action:"oiksc_create_or_update_block"}),n=(0,p.addQueryArgs)(n,{title:e.title}),n=(0,p.addQueryArgs)(n,{name:e.name}),n=(0,p.addQueryArgs)(n,{description:o}),n=(0,p.addQueryArgs)(n,{component:t}),n=(0,p.addQueryArgs)(n,{keywords:r}),n=(0,p.addQueryArgs)(n,{category:e.category}),n=(0,p.addQueryArgs)(n,{variation:e.block_name}),(0,l.createElement)("a",{key:e.name,href:n},"Create/Update: ",e.title," - ",e.name,(0,l.createElement)("br",null))}function T(e,t){var n="";void 0!==e.block_name&&(n=n.concat(e.block_name," ")),n=n.concat(e.name);var o="";return void 0!==e.block_title&&(o=o.concat(e.block_title," ")),o=o.concat(e.title),(0,l.createElement)(l.Fragment,null,n,",",o,(0,l.createElement)("br",null))}function x(e){if(void 0===e)return"";if("boolean"==typeof e)return"";if("string"==typeof e)return e;var t="TBC",n=e.props.children;return"p"===n[0].type&&(t=n[0].props.children),t}function S(e){if(void 0===e.variations)return null;var t=e.variations;return t=(t=t.filter(I)).filter($),(0,l.createElement)("dl",null,t.map((t=>function(e,t){return A(O(e,t),!0)}(t,e))))}function R(e){return e.map((e=>function(e){var t=e.variations;return"core/template-part"===e.name?t=t.filter(I):"core/post-terms"===e.name&&(t=t.filter($)),t.map((t=>O(t,e)))}(e))).flat()}function I(e,t,n){return!e.attributes.hasOwnProperty("theme")}function $(e,t,n){return"category"===e.name||"post_tag"===e.name}function O(e,t){var n=Object.assign({},e);return void 0===n.title&&(n.title=t.title),void 0===n.icon&&(n.icon=t.icon),void 0===n.description&&(n.description=t.description),n.block_name=t.name,n.block_title=t.title,n}function L(e){var t=e;return(t=(t=(t=t.replace(/ /g,"-")).replace(/\//g,"")).replace(/--/g,"-")).toLowerCase()}function N(e){let{value:t,onChange:n,...r}=e;const a=function(){var e=(0,i.getBlockTypes)(),t=R(e),n=e.map((e=>function(e){var t=function(e){return`${e.name} - ${e.title}`}(e);return{label:t,value:e.name}}(e)));const l=t.map((e=>function(e){var t=function(e){return`${e.block_name} - ${e.name} - ${e.title}`}(e);return{label:t,value:e.block_name+"|"+e.name}}(e)));return n.concat(l)}();return a.sort(F),(0,l.createElement)(b.SelectControl,{label:(0,o.__)("Blocks","oik-blocks"),value:t,options:a,onChange:n})}function F(e,t){return e.valuet.value?1:0}function V(e){for(var t=j(e),n=arguments.length,o=new Array(n>1?n-1:0),r=1;r1&&(o=t[1],void 0!==l.variations)){var r=l.variations.find((e=>e.name===o));r&&(l=O(r,l))}return void 0===l.block_name&&(l.block_name="",l.block_title=""),l}function D(e){return(0,i.hasBlockSupport)(e,"inserter",!0)?"":" ( Not insertable )"}function Q(e,t,n,o,r,a,i,c,s){var u=j(e);if(t){var b=A(u,t);return(0,l.createElement)("dl",null,b)}for(var m=arguments.length,k=new Array(m>9?m-9:0),p=9;p{const{attributes:t,setAttributes:n,instanceId:o,focus:r,isSelected:i}=e,{textAlign:s,label:u}=e.attributes,m=(0,c.useBlockProps)({className:a()({[`has-text-align-${s}`]:s})});var k=V(e.attributes.blockicon,e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(N,{value:e.attributes.blockicon,onChange:t=>{e.setAttributes({blockicon:t})}})))),(0,l.createElement)("div",m,k))},save:e=>{const t=c.useBlockProps.save();var n=V(e.attributes.blockicon,e);return(0,l.createElement)("div",t,n)}}),(0,i.registerBlockType)("oik-block/blockinfo",{example:{},transforms:{from:[{type:"block",blocks:["oik-block/blockicon"],transform:function(e){return(0,i.createBlock)("oik-block/blockinfo",{blockicon:e.blockicon})}}],to:[{type:"block",blocks:["oik-block/blockicon"],transform:function(e){return(0,i.createBlock)("oik-block/blockicon",{blockicon:e.blockicon})}}]},edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:u,label:m}=e.attributes,k=(0,c.useBlockProps)({className:a()({[`has-text-align-${u}`]:u})});var p=Q(e.attributes.blockicon,e.attributes.showBlockLink,e.attributes.showBlockIcon,e.attributes.showBlockTypeName,e.attributes.showTitle,e.attributes.showDescription,e.attributes.showCategory,e.attributes.showKeywords,e.attributes.showVariations,e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(N,{value:e.attributes.blockicon,onChange:t=>{e.setAttributes({blockicon:t})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block link","oik-blocks"),checked:!!e.attributes.showBlockLink,onChange:t=>{e.setAttributes({showBlockLink:!e.attributes.showBlockLink})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block icon","oik-blocks"),checked:!!e.attributes.showBlockIcon,onChange:t=>{e.setAttributes({showBlockIcon:!e.attributes.showBlockIcon})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block type name","oik-blocks"),checked:!!e.attributes.showBlockTypeName,onChange:t=>{e.setAttributes({showBlockTypeName:!e.attributes.showBlockTypeName})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block title","oik-blocks"),checked:!!e.attributes.showTitle,onChange:t=>{e.setAttributes({showTitle:!e.attributes.showTitle})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block description","oik-blocks"),checked:!!e.attributes.showDescription,onChange:t=>{e.setAttributes({showDescription:!e.attributes.showDescription})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show category","oik-blocks"),checked:!!e.attributes.showCategory,onChange:t=>{e.setAttributes({showCategory:!e.attributes.showCategory})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show keywords","oik-blocks"),checked:!!e.attributes.showKeywords,onChange:t=>{e.setAttributes({showKeywords:!e.attributes.showKeywords})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show variations","oik-blocks"),checked:!!e.attributes.showVariations,onChange:t=>{e.setAttributes({showVariations:!e.attributes.showVariations})}})))),(0,l.createElement)("div",k,p))},save:e=>{const t=c.useBlockProps.save();var n=Q(e.attributes.blockicon,e.attributes.showBlockLink,e.attributes.showBlockIcon,e.attributes.showBlockTypeName,e.attributes.showTitle,e.attributes.showDescription,e.attributes.showCategory,e.attributes.showKeywords,e.attributes.showVariations,e);return(0,l.createElement)("div",t,n)}}),(0,i.registerBlockType)("oik-block/blocklist",{example:{attributes:{showBlockLink:!1,prefix:"oik-block"}},edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:u,label:m}=e.attributes,k=(0,c.useBlockProps)({className:a()({[`has-text-align-${u}`]:u})});var p=C(e.attributes.prefix,e.attributes.showBlockLink,e.attributes.showVariations,e.attributes.showBatch,e.attributes.component);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(g,{value:e.attributes.prefix,onChange:t=>{e.setAttributes({prefix:t})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block link","oik-blocks"),checked:!!e.attributes.showBlockLink,onChange:t=>{e.setAttributes({showBlockLink:!e.attributes.showBlockLink})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block variations","oik-blocks"),checked:!!e.attributes.showVariations,onChange:t=>{e.setAttributes({showVariations:!e.attributes.showVariations})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show batch commands","oik-blocks"),checked:!!e.attributes.showBatch,onChange:t=>{e.setAttributes({showBatch:!e.attributes.showBatch})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Determine updates to apply","oik-blocks"),checked:!!e.attributes.determineUpdates,onChange:t=>{e.setAttributes({determineUpdates:!e.attributes.determineUpdates})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.TextControl,{label:(0,o.__)("Component","oik-blocks"),value:e.attributes.component,onChange:t=>{e.setAttributes({component:t})}})))),(0,l.createElement)("div",k,p))},save:e=>{const t=c.useBlockProps.save();var n=C(e.attributes.prefix,e.attributes.showBlockLink,e.attributes.showVariations,e.attributes.showBatch,e.attributes.component);return(0,l.createElement)("div",t,n)}});const U={none:(0,o.__)("All","oik-blocks"),featured:(0,o.__)("Featured image","oik-blocks"),file_size:(0,o.__)("File size of attachment","oik-blocks"),dimensions:(0,o.__)("Image dimensions","oik-blocks"),thumbnail:(0,o.__)("Thumbnail","oik-blocks"),googlemap:(0,o.__)("Google Maps Map","oik-blocks"),template:(0,o.__)("Page template name","oik-blocks"),post_date:(0,o.__)("Post date","oik-blocks"),post_modified:(0,o.__)("Post modified date","oik-blocks"),author_name:(0,o.__)("Author name","oik-blocks")};(0,i.registerBlockType)("oik-block/fields",{example:{},edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:k,label:p}=e.attributes,d=(0,c.useBlockProps)({className:a()({[`has-text-align-${k}`]:k})});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.SelectControl,{label:(0,o.__)("Fields","oik-blocks"),value:e.attributes.fields,options:(0,m.map)(U,((e,t)=>({value:t,label:e}))),onChange:(0,m.partial)((function(t,n){e.setAttributes({[t]:n})}),"fields")})))),(0,l.createElement)("div",d,(0,l.createElement)(u(),{block:"oik-block/fields",attributes:e.attributes})))},save(){return null}});const K={default:(0,o.__)("Default","oik-blocks"),bar:(0,o.__)("Bar","oik-blocks")};(0,i.registerBlockType)("oik-block/nivo",{edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:u,label:k}=e.attributes,p=(0,c.useBlockProps)({className:a()({[`has-text-align-${u}`]:u})});function d(t,n){e.setAttributes({[t]:n})}var h=e.attributes,v="[nivo";for(var f of Object.keys(h)){var w=h[f];w&&(v=v+" "+f+'="'+w+'"')}return v+="]",[(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.TextControl,{label:(0,o.__)("Theme","oik-blocks"),value:e.attributes.theme,id:"theme",onChange:t=>{e.setAttributes({theme:t})}}),(0,l.createElement)(b.TextControl,{label:(0,o.__)("IDs","oik-blocks"),value:e.attributes.id,onChange:t=>{e.setAttributes({id:t})}}),(0,l.createElement)(b.TextControl,{label:(0,o.__)("Effect","oik-blocks"),value:e.attributes.effect,onChange:(0,m.partial)(d,"effect")}),(0,l.createElement)(b.SelectControl,{label:"t2",value:e.attributes.theme,options:(0,m.map)(K,((e,t)=>({value:t,label:e}))),onChange:(0,m.partial)(d,"theme")}))),(0,l.createElement)("div",p,(0,l.createElement)(l.Fragment,null,v))]},save:e=>{const t=c.useBlockProps.save();var n=e.attributes,o="[nivo";for(var r of Object.keys(n)){var a=n[r];a&&(o=o+" "+r+'="'+a+'"')}return o+="]",(0,l.createElement)(l.RawHTML,t,o)}});var M={none:(0,o.__)("Logos","oik-blocks"),gener:(0,o.__)("Genericons","oik-blocks")};M=(0,m.map)(M,((e,t)=>({value:t,label:e}))),(0,i.registerBlockType)("oik-block/person",{edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:m,label:k}=e.attributes,p=(0,c.useBlockProps)({className:a()({[`has-text-align-${m}`]:m})});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.TextControl,{label:(0,o.__)("User","oik-blocks"),value:e.attributes.user,onChange:t=>{e.setAttributes({user:t})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.SelectControl,{label:(0,o.__)("Follow me icons style","oik-blocks"),value:e.attributes.theme,options:M,onChange:t=>{e.setAttributes({theme:t})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.TextControl,{label:(0,o.__)("Fields","oik-blocks"),value:e.attributes.fields,onChange:t=>{e.setAttributes({fields:t})}})))),(0,l.createElement)("div",p,(0,l.createElement)(u(),{block:"oik-block/person",attributes:e.attributes})))},save(e){let{attributes:t}=e;return null}})},184:function(e,t){var n;!function(){"use strict";var l={}.hasOwnProperty;function o(){for(var e=[],t=0;t=r)&&Object.keys(l.O).every((function(e){return l.O[e](n[c])}))?n.splice(c--,1):(i=!1,r0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[n,o,r]},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};l.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,r,a=n[0],i=n[1],c=n[2],s=0;if(a.some((function(t){return 0!==e[t]}))){for(o in i)l.o(i,o)&&(l.m[o]=i[o]);if(c)var u=c(l)}for(t&&t(n);sy(e))).filter(_).map((e=>function(e){return{label:e,value:e}}(e)));return a.sort(E),(0,l.createElement)(w,{label:(0,o.__)("Prefix","oik-blocks"),value:t,options:a,onChange:n})}function E(e,t){return e.valuet.value?1:0}function _(e,t,n){return n.indexOf(e)===t}function y(e){return e.name.split("/")[0]}function C(e,t,n,o,r){const a=e.split("/")[0];var c=(0,i.getBlockTypes)(),s=(c=(c=c.filter(B,a)).sort(((e,t)=>e.title.localeCompare(t.title)))).length,u=R(c),b=null;n&&o&&(b=t?u.map((e=>P(e,r))):u.map((e=>T(e))));var m=null;if(o)t?m=(0,l.createElement)("pre",null,"rem Blocks ",s,(0,l.createElement)("br",null),"rem Variations ",u.length,(0,l.createElement)("br",null),c.map((e=>P(e,r))),b):(c=c.sort(((e,t)=>e.name.localeCompare(t.name))),m=(0,l.createElement)("pre",null,"rem Block ",s,(0,l.createElement)("br",null),"rem Variations ",u.length,(0,l.createElement)("br",null),c.map((e=>T(e))),b));else if(m=(0,l.createElement)("dl",null,c.map((e=>A(e,t)))),n){var k=(0,l.createElement)("dl",null,u.map((e=>A(e,t))));m=(0,l.createElement)(l.Fragment,null,m,(0,l.createElement)("h3",null,"Variations"),k)}return m}function B(e,t,n){return this==y(e)}function A(e,t){var n=null;t&&(n=void 0===e.block_name||""===e.block_name?function(e){var t=e.title.replace(/ /g,"-");t=(t=t.replace("/","-")).toLowerCase();var n=e.name.replace("/","-"),l=null,o=(0,k.select)("core/editor").getPermalinkParts();if(null!==o){var r=(0,k.select)("core/editor").getCurrentPostType();l=o.prefix.replace(r,"block")}else console.log("SiteURL's null");return`${l}${t}-${n}`}(e):function(e){var t=N(e.block_title),n=(window.location.href,(window.location.origin+window.location.pathname).replace("wp-admin/post.php","")+"block/"),l=N(e.title),o=e.block_name.replace("/","-");return`${n}${t}-${o}/${l}-${o}`}(e));var r,a,i;return r=void 0===e.block_name||""===e.block_name?"":" : ",a=Q(e),i=x(e.description),(0,l.createElement)(l.Fragment,{key:e.block_name+"|"+e.name},(0,l.createElement)("dt",null,(0,l.createElement)(b.Icon,{icon:e.icon&&e.icon.src?e.icon.src:e.icon})),(0,l.createElement)("dd",null,t&&(0,l.createElement)("a",{href:n,title:(0,o.__)("View block","oik-blocks")},e.block_title,r,e.title," - ",e.block_name," ",e.name),!t&&(0,l.createElement)("span",null,e.block_title,r,e.title," - ",e.block_name," ",e.name),a,(0,l.createElement)("br",null),i,(0,l.createElement)("br",null)))}function P(e,t){var n=ajaxurl,o=x(e.description),r=e.keywords?e.keywords.join():null;return n=(0,p.addQueryArgs)(n,{action:"oiksc_create_or_update_block"}),n=(0,p.addQueryArgs)(n,{title:e.title}),n=(0,p.addQueryArgs)(n,{name:e.name}),n=(0,p.addQueryArgs)(n,{description:o}),n=(0,p.addQueryArgs)(n,{component:t}),n=(0,p.addQueryArgs)(n,{keywords:r}),n=(0,p.addQueryArgs)(n,{category:e.category}),n=(0,p.addQueryArgs)(n,{variation:e.block_name}),(0,l.createElement)("a",{key:e.name,href:n},"Create/Update: ",e.title," - ",e.name,(0,l.createElement)("br",null))}function T(e,t){var n="";void 0!==e.block_name&&(n=n.concat(e.block_name," ")),n=n.concat(e.name);var o="";return void 0!==e.block_title&&(o=o.concat(e.block_title," ")),o=o.concat(e.title),(0,l.createElement)(l.Fragment,null,n,",",o,(0,l.createElement)("br",null))}function x(e){if(void 0===e)return"";if("boolean"==typeof e)return"";if("string"==typeof e)return e;var t="TBC",n=e.props.children;return"p"===n[0].type&&(t=n[0].props.children),t}function S(e){if(void 0===e.variations)return null;var t=e.variations;return t=I(t,e.name),(0,l.createElement)("dl",null,t.map((t=>function(e,t){return A(L(e,t),!0)}(t,e))))}function R(e){return e.map((e=>function(e){var t=e.variations;return(t=I(t,e.name)).map((t=>L(t,e)))}(e))).flat()}function I(e,t){return"core/template-part"===t?e=e.filter($):"core/post-terms"===t&&(e=e.filter(O)),e}function $(e,t,n){return!e.attributes.hasOwnProperty("theme")}function O(e,t,n){return"category"===e.name||"post_tag"===e.name}function L(e,t){var n=Object.assign({},e);return void 0===n.title&&(n.title=t.title),void 0===n.icon&&(n.icon=t.icon),void 0===n.description&&(n.description=t.description),n.block_name=t.name,n.block_title=t.title,n}function N(e){var t=e;return(t=(t=(t=t.replace(/ /g,"-")).replace(/\//g,"")).replace(/--/g,"-")).toLowerCase()}function F(e){let{value:t,onChange:n,...r}=e;const a=function(){var e=(0,i.getBlockTypes)(),t=R(e),n=e.map((e=>function(e){var t=function(e){return`${e.name} - ${e.title}`}(e);return{label:t,value:e.name}}(e)));const l=t.map((e=>function(e){var t=function(e){return`${e.block_name} - ${e.name} - ${e.title}`}(e);return{label:t,value:e.block_name+"|"+e.name}}(e)));return n.concat(l)}();return a.sort(V),(0,l.createElement)(b.SelectControl,{label:(0,o.__)("Blocks","oik-blocks"),value:t,options:a,onChange:n})}function V(e,t){return e.valuet.value?1:0}function j(e){for(var t=D(e),n=arguments.length,o=new Array(n>1?n-1:0),r=1;r1&&(o=t[1],void 0!==l.variations)){var r=l.variations.find((e=>e.name===o));r&&(l=L(r,l))}return void 0===l.block_name&&(l.block_name="",l.block_title=""),l}function Q(e){return(0,i.hasBlockSupport)(e,"inserter",!0)?"":" ( Not insertable )"}function U(e,t,n,o,r,a,i,c,s){var u=D(e);if(t){var b=A(u,t);return(0,l.createElement)("dl",null,b)}for(var m=arguments.length,k=new Array(m>9?m-9:0),p=9;p{const{attributes:t,setAttributes:n,instanceId:o,focus:r,isSelected:i}=e,{textAlign:s,label:u}=e.attributes,m=(0,c.useBlockProps)({className:a()({[`has-text-align-${s}`]:s})});var k=j(e.attributes.blockicon,e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(F,{value:e.attributes.blockicon,onChange:t=>{e.setAttributes({blockicon:t})}})))),(0,l.createElement)("div",m,k))},save:e=>{const t=c.useBlockProps.save();var n=j(e.attributes.blockicon,e);return(0,l.createElement)("div",t,n)}}),(0,i.registerBlockType)("oik-block/blockinfo",{example:{},transforms:{from:[{type:"block",blocks:["oik-block/blockicon"],transform:function(e){return(0,i.createBlock)("oik-block/blockinfo",{blockicon:e.blockicon})}}],to:[{type:"block",blocks:["oik-block/blockicon"],transform:function(e){return(0,i.createBlock)("oik-block/blockicon",{blockicon:e.blockicon})}}]},edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:u,label:m}=e.attributes,k=(0,c.useBlockProps)({className:a()({[`has-text-align-${u}`]:u})});var p=U(e.attributes.blockicon,e.attributes.showBlockLink,e.attributes.showBlockIcon,e.attributes.showBlockTypeName,e.attributes.showTitle,e.attributes.showDescription,e.attributes.showCategory,e.attributes.showKeywords,e.attributes.showVariations,e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(F,{value:e.attributes.blockicon,onChange:t=>{e.setAttributes({blockicon:t})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block link","oik-blocks"),checked:!!e.attributes.showBlockLink,onChange:t=>{e.setAttributes({showBlockLink:!e.attributes.showBlockLink})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block icon","oik-blocks"),checked:!!e.attributes.showBlockIcon,onChange:t=>{e.setAttributes({showBlockIcon:!e.attributes.showBlockIcon})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block type name","oik-blocks"),checked:!!e.attributes.showBlockTypeName,onChange:t=>{e.setAttributes({showBlockTypeName:!e.attributes.showBlockTypeName})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block title","oik-blocks"),checked:!!e.attributes.showTitle,onChange:t=>{e.setAttributes({showTitle:!e.attributes.showTitle})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block description","oik-blocks"),checked:!!e.attributes.showDescription,onChange:t=>{e.setAttributes({showDescription:!e.attributes.showDescription})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show category","oik-blocks"),checked:!!e.attributes.showCategory,onChange:t=>{e.setAttributes({showCategory:!e.attributes.showCategory})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show keywords","oik-blocks"),checked:!!e.attributes.showKeywords,onChange:t=>{e.setAttributes({showKeywords:!e.attributes.showKeywords})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show variations","oik-blocks"),checked:!!e.attributes.showVariations,onChange:t=>{e.setAttributes({showVariations:!e.attributes.showVariations})}})))),(0,l.createElement)("div",k,p))},save:e=>{const t=c.useBlockProps.save();var n=U(e.attributes.blockicon,e.attributes.showBlockLink,e.attributes.showBlockIcon,e.attributes.showBlockTypeName,e.attributes.showTitle,e.attributes.showDescription,e.attributes.showCategory,e.attributes.showKeywords,e.attributes.showVariations,e);return(0,l.createElement)("div",t,n)}}),(0,i.registerBlockType)("oik-block/blocklist",{example:{attributes:{showBlockLink:!1,prefix:"oik-block"}},edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:u,label:m}=e.attributes,k=(0,c.useBlockProps)({className:a()({[`has-text-align-${u}`]:u})});var p=C(e.attributes.prefix,e.attributes.showBlockLink,e.attributes.showVariations,e.attributes.showBatch,e.attributes.component);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(g,{value:e.attributes.prefix,onChange:t=>{e.setAttributes({prefix:t})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block link","oik-blocks"),checked:!!e.attributes.showBlockLink,onChange:t=>{e.setAttributes({showBlockLink:!e.attributes.showBlockLink})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show block variations","oik-blocks"),checked:!!e.attributes.showVariations,onChange:t=>{e.setAttributes({showVariations:!e.attributes.showVariations})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Show batch commands","oik-blocks"),checked:!!e.attributes.showBatch,onChange:t=>{e.setAttributes({showBatch:!e.attributes.showBatch})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.ToggleControl,{label:(0,o.__)("Determine updates to apply","oik-blocks"),checked:!!e.attributes.determineUpdates,onChange:t=>{e.setAttributes({determineUpdates:!e.attributes.determineUpdates})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.TextControl,{label:(0,o.__)("Component","oik-blocks"),value:e.attributes.component,onChange:t=>{e.setAttributes({component:t})}})))),(0,l.createElement)("div",k,p))},save:e=>{const t=c.useBlockProps.save();var n=C(e.attributes.prefix,e.attributes.showBlockLink,e.attributes.showVariations,e.attributes.showBatch,e.attributes.component);return(0,l.createElement)("div",t,n)}});const K={none:(0,o.__)("All","oik-blocks"),featured:(0,o.__)("Featured image","oik-blocks"),file_size:(0,o.__)("File size of attachment","oik-blocks"),dimensions:(0,o.__)("Image dimensions","oik-blocks"),thumbnail:(0,o.__)("Thumbnail","oik-blocks"),googlemap:(0,o.__)("Google Maps Map","oik-blocks"),template:(0,o.__)("Page template name","oik-blocks"),post_date:(0,o.__)("Post date","oik-blocks"),post_modified:(0,o.__)("Post modified date","oik-blocks"),author_name:(0,o.__)("Author name","oik-blocks")};(0,i.registerBlockType)("oik-block/fields",{example:{},edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:k,label:p}=e.attributes,d=(0,c.useBlockProps)({className:a()({[`has-text-align-${k}`]:k})});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.SelectControl,{label:(0,o.__)("Fields","oik-blocks"),value:e.attributes.fields,options:(0,m.map)(K,((e,t)=>({value:t,label:e}))),onChange:(0,m.partial)((function(t,n){e.setAttributes({[t]:n})}),"fields")})))),(0,l.createElement)("div",d,(0,l.createElement)(u(),{block:"oik-block/fields",attributes:e.attributes})))},save(){return null}});const M={default:(0,o.__)("Default","oik-blocks"),bar:(0,o.__)("Bar","oik-blocks")};(0,i.registerBlockType)("oik-block/nivo",{edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:u,label:k}=e.attributes,p=(0,c.useBlockProps)({className:a()({[`has-text-align-${u}`]:u})});function d(t,n){e.setAttributes({[t]:n})}var h=e.attributes,v="[nivo";for(var f of Object.keys(h)){var w=h[f];w&&(v=v+" "+f+'="'+w+'"')}return v+="]",[(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.TextControl,{label:(0,o.__)("Theme","oik-blocks"),value:e.attributes.theme,id:"theme",onChange:t=>{e.setAttributes({theme:t})}}),(0,l.createElement)(b.TextControl,{label:(0,o.__)("IDs","oik-blocks"),value:e.attributes.id,onChange:t=>{e.setAttributes({id:t})}}),(0,l.createElement)(b.TextControl,{label:(0,o.__)("Effect","oik-blocks"),value:e.attributes.effect,onChange:(0,m.partial)(d,"effect")}),(0,l.createElement)(b.SelectControl,{label:"t2",value:e.attributes.theme,options:(0,m.map)(M,((e,t)=>({value:t,label:e}))),onChange:(0,m.partial)(d,"theme")}))),(0,l.createElement)("div",p,(0,l.createElement)(l.Fragment,null,v))]},save:e=>{const t=c.useBlockProps.save();var n=e.attributes,o="[nivo";for(var r of Object.keys(n)){var a=n[r];a&&(o=o+" "+r+'="'+a+'"')}return o+="]",(0,l.createElement)(l.RawHTML,t,o)}});var z={none:(0,o.__)("Logos","oik-blocks"),gener:(0,o.__)("Genericons","oik-blocks")};z=(0,m.map)(z,((e,t)=>({value:t,label:e}))),(0,i.registerBlockType)("oik-block/person",{edit:e=>{const{attributes:t,setAttributes:n,instanceId:r,focus:i,isSelected:s}=e,{textAlign:m,label:k}=e.attributes,p=(0,c.useBlockProps)({className:a()({[`has-text-align-${m}`]:m})});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.TextControl,{label:(0,o.__)("User","oik-blocks"),value:e.attributes.user,onChange:t=>{e.setAttributes({user:t})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.SelectControl,{label:(0,o.__)("Follow me icons style","oik-blocks"),value:e.attributes.theme,options:z,onChange:t=>{e.setAttributes({theme:t})}})),(0,l.createElement)(b.PanelRow,null,(0,l.createElement)(b.TextControl,{label:(0,o.__)("Fields","oik-blocks"),value:e.attributes.fields,onChange:t=>{e.setAttributes({fields:t})}})))),(0,l.createElement)("div",p,(0,l.createElement)(u(),{block:"oik-block/person",attributes:e.attributes})))},save(e){let{attributes:t}=e;return null}})},184:function(e,t){var n;!function(){"use strict";var l={}.hasOwnProperty;function o(){for(var e=[],t=0;t=r)&&Object.keys(l.O).every((function(e){return l.O[e](n[c])}))?n.splice(c--,1):(i=!1,r0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[n,o,r]},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};l.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,r,a=n[0],i=n[1],c=n[2],s=0;if(a.some((function(t){return 0!==e[t]}))){for(o in i)l.o(i,o)&&(l.m[o]=i[o]);if(c)var u=c(l)}for(t&&t(n);s