PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-includes
/
js
/
dist
/*! This file is auto-generated */ (()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},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,{ReusableBlocksMenuItems:()=>f,store:()=>b});var n={};e.r(n),e.d(n,{__experimentalConvertBlockToStatic:()=>i,__experimentalConvertBlocksToReusable:()=>a,__experimentalDeleteReusableBlock:()=>d,__experimentalSetEditingReusableBlock:()=>p});var o={};e.r(o),e.d(o,{__experimentalIsEditingReusableBlock:()=>_});const s=window.wp.data,r=window.wp.blockEditor,c=window.wp.blocks,l=window.wp.i18n,i=e=>({registry:t})=>{const n=t.select(r.store).getBlock(e),o=t.select("core").getEditedEntityRecord("postType","wp_block",n.attributes.ref),s=(0,c.parse)("function"==typeof o.content?o.content(o):o.content);t.dispatch(r.store).replaceBlocks(n.clientId,s)},a=(e,t,n)=>async({registry:o,dispatch:s})=>{const i="unsynced"===n?{wp_pattern_sync_status:n}:void 0,a={title:t||(0,l.__)("Untitled pattern block"),content:(0,c.serialize)(o.select(r.store).getBlocksByClientId(e)),status:"publish",meta:i},d=await o.dispatch("core").saveEntityRecord("postType","wp_block",a);if("unsynced"===n)return;const p=(0,c.createBlock)("core/block",{ref:d.id});o.dispatch(r.store).replaceBlocks(e,p),s.__experimentalSetEditingReusableBlock(p.clientId,!0)},d=e=>async({registry:t})=>{if(!t.select("core").getEditedEntityRecord("postType","wp_block",e))return;const n=t.select(r.store).getBlocks().filter((t=>(0,c.isReusableBlock)(t)&&t.attributes.ref===e)).map((e=>e.clientId));n.length&&t.dispatch(r.store).removeBlocks(n),await t.dispatch("core").deleteEntityRecord("postType","wp_block",e)};function p(e,t){return{type:"SET_EDITING_REUSABLE_BLOCK",clientId:e,isEditing:t}}var u=(0,s.combineReducers)({isEditingReusableBlock:function(e={},t){return"SET_EDITING_REUSABLE_BLOCK"===t?.type?{...e,[t.clientId]:t.isEditing}:e}});function _(e,t){return e.isEditingReusableBlock[t]}const b=(0,s.createReduxStore)("core/reusable-blocks",{actions:n,reducer:u,selectors:o});(0,s.register)(b);const k=window.ReactJSXRuntime,w=window.wp.element,m=window.wp.components,y=window.wp.primitives;var g=(0,k.jsx)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,k.jsx)(y.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});const h=window.wp.notices,x=window.wp.coreData;function B({clientIds:e,rootClientId:t,onClose:n}){const[o,i]=(0,w.useState)(void 0),[a,d]=(0,w.useState)(!1),[p,u]=(0,w.useState)(""),_=(0,s.useSelect)((n=>{const{canUser:o}=n(x.store),{getBlocksByClientId:s,canInsertBlockType:l,getBlockRootClientId:i}=n(r.store),a=t||(e.length>0?i(e[0]):void 0),d=s(e)??[];return!(1===d.length&&d[0]&&(0,c.isReusableBlock)(d[0])&&!!n(x.store).getEntityRecord("postType","wp_block",d[0].attributes.ref))&&l("core/block",a)&&d.every((e=>!!e&&e.isValid&&(0,c.hasBlockSupport)(e.name,"reusable",!0)))&&!!o("create",{kind:"postType",name:"wp_block"})}),[e,t]),{__experimentalConvertBlocksToReusable:y}=(0,s.useDispatch)(b),{createSuccessNotice:B,createErrorNotice:v}=(0,s.useDispatch)(h.store),S=(0,w.useCallback)((async function(t){try{await y(e,t,o),B(o?(0,l.sprintf)((0,l.__)("Unsynced pattern created: %s"),t):(0,l.sprintf)((0,l.__)("Synced pattern created: %s"),t),{type:"snackbar",id:"convert-to-reusable-block-success"})}catch(e){v(e.message,{type:"snackbar",id:"convert-to-reusable-block-error"})}}),[y,e,o,B,v]);return _?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(m.MenuItem,{icon:g,onClick:()=>d(!0),children:(0,l.__)("Create pattern")}),a&&(0,k.jsx)(m.Modal,{title:(0,l.__)("Create pattern"),onRequestClose:()=>{d(!1),u("")},overlayClassName:"reusable-blocks-menu-items__convert-modal",children:(0,k.jsx)("form",{onSubmit:e=>{e.preventDefault(),S(p),d(!1),u(""),n()},children:(0,k.jsxs)(m.__experimentalVStack,{spacing:"5",children:[(0,k.jsx)(m.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Name"),value:p,onChange:u,placeholder:(0,l.__)("My pattern")}),(0,k.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l._x)("Synced","pattern (singular)"),help:(0,l.__)("Sync this pattern across multiple locations."),checked:!o,onChange:()=>{i(o?void 0:"unsynced")}}),(0,k.jsxs)(m.__experimentalHStack,{justify:"right",children:[(0,k.jsx)(m.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{d(!1),u("")},children:(0,l.__)("Cancel")}),(0,k.jsx)(m.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,l.__)("Create")})]})]})})})]}):null}const v=window.wp.url;var S=function({clientId:e}){const{canRemove:t,isVisible:n,managePatternsUrl:o}=(0,s.useSelect)((t=>{const{getBlock:n,canRemoveBlock:o}=t(r.store),{canUser:s}=t(x.store),l=n(e);return{canRemove:o(e),isVisible:!!l&&(0,c.isReusableBlock)(l)&&!!s("update",{kind:"postType",name:"wp_block",id:l.attributes.ref}),managePatternsUrl:s("create",{kind:"postType",name:"wp_template"})?(0,v.addQueryArgs)("site-editor.php",{p:"/pattern"}):(0,v.addQueryArgs)("edit.php",{post_type:"wp_block"})}}),[e]),{__experimentalConvertBlockToStatic:i}=(0,s.useDispatch)(b);return n?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(m.MenuItem,{href:o,children:(0,l.__)("Manage patterns")}),t&&(0,k.jsx)(m.MenuItem,{onClick:()=>i(e),children:(0,l.__)("Detach")})]}):null};function f({rootClientId:e}){return(0,k.jsx)(r.BlockSettingsMenuControls,{children:({onClose:t,selectedClientIds:n})=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(B,{clientIds:n,rootClientId:e,onClose:t}),1===n.length&&(0,k.jsx)(S,{clientId:n[0]})]})})}(window.wp=window.wp||{}).reusableBlocks=t})();
[-] dom-ready.js
[edit]
[-] block-library.js
[edit]
[-] private-apis.min.js
[edit]
[-] customize-widgets.js
[edit]
[-] admin-ui.js
[edit]
[-] blocks.js
[edit]
[-] warning.js
[edit]
[-] components.js
[edit]
[-] blob.min.js
[edit]
[-] list-reusable-blocks.js
[edit]
[-] escape-html.min.js
[edit]
[-] nux.js
[edit]
[-] server-side-render.js
[edit]
[-] annotations.js
[edit]
[-] element.min.js
[edit]
[-] annotations.min.js
[edit]
[-] format-library.js
[edit]
[-] keycodes.js
[edit]
[-] notices.js
[edit]
[-] keyboard-shortcuts.js
[edit]
[-] url.min.js
[edit]
[-] priority-queue.min.js
[edit]
[-] base-styles.min.js
[edit]
[-] preferences.js
[edit]
[-] preferences-persistence.js
[edit]
[-] block-serialization-default-parser.min.js
[edit]
[+]
vendor
[-] widgets.js
[edit]
[-] preferences.min.js
[edit]
[-] data-controls.js
[edit]
[-] views.min.js
[edit]
[-] dom.js
[edit]
[-] preferences-persistence.min.js
[edit]
[-] html-entities.min.js
[edit]
[-] deprecated.js
[edit]
[-] patterns.js
[edit]
[-] latex-to-mathml.min.js
[edit]
[+]
script-modules
[-] keyboard-shortcuts.min.js
[edit]
[-] i18n.js
[edit]
[-] warning.min.js
[edit]
[-] date.min.js
[edit]
[-] data.js
[edit]
[-] a11y.js
[edit]
[-] data-controls.min.js
[edit]
[-] commands.js
[edit]
[-] data.min.js
[edit]
[-] block-library.min.js
[edit]
[-] editor.js
[edit]
[-] wordcount.min.js
[edit]
[-] dom-ready.min.js
[edit]
[-] token-list.min.js
[edit]
[-] style-engine.js
[edit]
[-] html-entities.js
[edit]
[-] router.min.js
[edit]
[-] blocks.min.js
[edit]
[-] redux-routine.min.js
[edit]
[-] reusable-blocks.min.js
[edit]
[-] core-data.js
[edit]
[-] escape-html.js
[edit]
[-] reusable-blocks.js
[edit]
[-] block-directory.min.js
[edit]
[-] block-directory.js
[edit]
[-] block-editor.min.js
[edit]
[-] style-engine.min.js
[edit]
[-] media-utils.min.js
[edit]
[-] date.js
[edit]
[-] wordcount.js
[edit]
[-] views.js
[edit]
[-] block-serialization-default-parser.js
[edit]
[-] deprecated.min.js
[edit]
[-] edit-site.min.js
[edit]
[-] dom.min.js
[edit]
[-] private-apis.js
[edit]
[-] element.js
[edit]
[-] server-side-render.min.js
[edit]
[-] hooks.min.js
[edit]
[-] format-library.min.js
[edit]
[-] compose.min.js
[edit]
[-] autop.js
[edit]
[-] edit-site.js
[edit]
[-] customize-widgets.min.js
[edit]
[-] components.min.js
[edit]
[-] plugins.js
[edit]
[-] primitives.js
[edit]
[-] is-shallow-equal.min.js
[edit]
[-] redux-routine.js
[edit]
[-] rich-text.min.js
[edit]
[-] priority-queue.js
[edit]
[-] patterns.min.js
[edit]
[-] list-reusable-blocks.min.js
[edit]
[-] plugins.min.js
[edit]
[-] api-fetch.js
[edit]
[-] edit-post.js
[edit]
[-] i18n.min.js
[edit]
[-] edit-widgets.js
[edit]
[-] keycodes.min.js
[edit]
[-] core-commands.js
[edit]
[-] block-editor.js
[edit]
[-] blob.js
[edit]
[-] edit-post.min.js
[edit]
[-] edit-widgets.min.js
[edit]
[-] media-utils.js
[edit]
[-] autop.min.js
[edit]
[+]
..
[-] compose.js
[edit]
[-] editor.min.js
[edit]
[-] admin-ui.min.js
[edit]
[-] shortcode.js
[edit]
[-] viewport.js
[edit]
[-] api-fetch.min.js
[edit]
[-] notices.min.js
[edit]
[-] base-styles.js
[edit]
[-] latex-to-mathml.js
[edit]
[-] commands.min.js
[edit]
[-] shortcode.min.js
[edit]
[-] token-list.js
[edit]
[-] is-shallow-equal.js
[edit]
[-] url.js
[edit]
[+]
development
[-] rich-text.js
[edit]
[-] widgets.min.js
[edit]
[-] a11y.min.js
[edit]
[-] viewport.min.js
[edit]
[-] core-data.min.js
[edit]
[-] nux.min.js
[edit]
[-] core-commands.min.js
[edit]
[-] primitives.min.js
[edit]
[-] hooks.js
[edit]
[-] router.js
[edit]