",value:"article"}]})})}const{name:Yf}=$f,Xf={icon:Gf,edit:function({context:e,attributes:{tagName:t="div"},setAttributes:o,clientId:n,__unstableLayoutClassNames:r,__unstableParentLayout:a}){const{postId:i,postType:s}=e,l=(0,ct.useHasRecursion)(i);return i&&s&&l?(0,it.jsx)(Qf,{}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Kf,{tagName:t,onSelectTagName:e=>{o({tagName:e})},clientId:n}),(0,it.jsx)(ct.RecursionProvider,{uniqueId:i,children:i&&s?(0,it.jsx)(Zf,{context:e,parentLayout:a,layoutClassNames:r}):(0,it.jsx)(Jf,{layoutClassNames:r})})]})}},ey=()=>jt({name:Yf,metadata:$f,settings:Xf}),ty=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-date","title":"Date","category":"theme","description":"Display a custom date.","textdomain":"default","attributes":{"datetime":{"type":"string","role":"content"},"textAlign":{"type":"string"},"format":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');function oy(e){return/(?:^|[^\\])[aAgh]/.test(e)}const ny={attributes:{datetime:{type:"string",role:"content"},textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"}},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},save:()=>null,migrate:({metadata:{bindings:{datetime:{source:e,args:{key:t,...o}},...n},...r},...a})=>({metadata:{bindings:{datetime:{source:e,args:{field:t,...o}},...n},...r},...a}),isEligible:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&!!e?.metadata?.bindings?.datetime?.args?.key},ry={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"},displayType:{type:"string",default:"date"}},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},save:()=>null,migrate({className:e,displayType:t,metadata:o,...n}){if("date"===t||"modified"===t)return"modified"===t&&(e=Dt(e,"wp-block-post-date__modified-date")),{...n,className:e,metadata:{...o,bindings:{datetime:{source:"core/post-data",args:{field:t}}}}}},isEligible:e=>!e.datetime&&!e?.metadata?.bindings?.datetime},ay={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var iy=[ny,ry,ay];const sy=[{name:"post-date",title:(0,pt.__)("Post Date"),description:(0,pt.__)("Display a post's publish date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}},scope:["inserter","transform"],isActive:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&"date"===e?.metadata?.bindings?.datetime?.args?.field},{name:"post-date-modified",title:(0,pt.__)("Modified Date"),description:(0,pt.__)("Display a post's last updated date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"modified"}}}},className:"wp-block-post-date__modified-date"},scope:["inserter","transform"],isActive:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&"modified"===e?.metadata?.bindings?.datetime?.args?.field}];var ly=sy;const{name:cy}=ty,uy={icon:wa,edit:function({attributes:e,context:{postType:t,queryId:o},setAttributes:n,name:r}){const{datetime:a,textAlign:i,format:s,isLink:l}=e,c=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${i}`]:i})}),u=vt(),[d,p]=(0,gt.useState)(null),m=(0,gt.useMemo)((()=>({anchor:d})),[d]),{__unstableMarkNextChangeAsNotPersistent:g}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{void 0===a&&(g(),n({datetime:new Date}))}),[a]);const h=Number.isFinite(o),_=(0,ja.getSettings)(),{postType:x,siteFormat:b=_.formats.date,siteTimeFormat:f=_.formats.time}=(0,lt.useSelect)((e=>{const{getPostType:o,getEntityRecord:n}=e(_t.store),r=n("root","site");return{siteFormat:r?.date_format,siteTimeFormat:r?.time_format,postType:t?o(t):null}}),[t]),y=(0,lt.useSelect)((t=>t(st.store).getActiveBlockVariation(r,e)?.name),[r,e]),v=(0,ct.useBlockEditingMode)();let k=(0,it.jsx)("time",{dateTime:(0,ja.dateI18n)("c",a),ref:p,children:"human-diff"===s?(0,ja.humanTimeDiff)(a):(0,ja.dateI18n)(s||b,a)});return l&&a&&(k=(0,it.jsx)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault(),children:k})),(0,it.jsxs)(it.Fragment,{children:[("default"===v||!h)&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.AlignmentControl,{value:i,onChange:e=>{n({textAlign:e})}}),"post-date-modified"!==y&&(!h||!y)&&(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.Dropdown,{popoverProps:m,renderContent:({onClose:e})=>(0,it.jsx)(ct.__experimentalPublishDateTimePicker,{title:"post-date"===y?(0,pt.__)("Publish Date"):(0,pt.__)("Date"),currentDate:a,onChange:e=>n({datetime:e}),is12Hour:oy(f),onClose:e,dateOrder:(0,pt._x)("dmy","date order")}),renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{"aria-expanded":e,icon:$l,title:(0,pt.__)("Change Date"),onClick:t,onKeyDown:o=>{e||o.keyCode!==mn.DOWN||(o.preventDefault(),t())}})})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({datetime:void 0,format:void 0,isLink:!1})},dropdownMenuProps:u,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Date Format"),onDeselect:()=>n({format:void 0}),isShownByDefault:!0,children:(0,it.jsx)(ct.__experimentalDateFormatPicker,{format:s,defaultFormat:b,onChange:e=>n({format:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==l,label:x?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),x.labels.singular_name.toLowerCase()):(0,pt.__)("Link to post"),onDeselect:()=>n({isLink:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:x?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),x.labels.singular_name.toLowerCase()):(0,pt.__)("Link to post"),onChange:()=>n({isLink:!l}),checked:l})})]})}),(0,it.jsx)("div",{...c,children:k})]})},deprecated:iy,variations:ly},dy=()=>jt({name:cy,metadata:ty,settings:uy});var py=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})});const my=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-excerpt","title":"Excerpt","category":"theme","description":"Display the excerpt.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"moreText":{"type":"string","role":"content"},"showMoreOnNewLine":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":55}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-excerpt-editor","style":"wp-block-post-excerpt"}');var gy={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,st.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,st.createBlock)("core/post-content")}]};const{name:hy}=my,_y={icon:py,transforms:gy,edit:function({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:o,excerptLength:n},setAttributes:r,isSelected:a,context:{postId:i,postType:s,queryId:l}}){const c="default"===(0,ct.useBlockEditingMode)(),u=Number.isFinite(l),d=bt("postType",s,i),[p,m,{rendered:g,protected:h}={}]=(0,_t.useEntityProp)("postType",s,"excerpt",i),_=vt(),x=(0,lt.useSelect)((e=>"page"===s||!!e(_t.store).getPostType(s)?.supports?.excerpt),[s]),b=d&&!u&&x,f=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${e}`]:e})}),y=(0,pt._x)("words","Word count type. Do not translate!"),v=(0,gt.useMemo)((()=>{if(!g)return"";const e=(new window.DOMParser).parseFromString(g,"text/html");return e.body.textContent||e.body.innerText||""}),[g]);if(!s||!i)return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,it.jsx)("div",{...f,children:(0,it.jsx)("p",{children:(0,pt.__)("This block will display the excerpt.")})})]});if(h&&!d)return(0,it.jsx)("div",{...f,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("The content is currently protected and does not have the available excerpt.")})});const k=(0,it.jsx)(ct.RichText,{identifier:"moreText",className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,pt.__)("“Read more” link text"),placeholder:(0,pt.__)('Add "read more" link text'),value:t,onChange:e=>r({moreText:e}),withoutInteractiveFormatting:!0}),w=Dt("wp-block-post-excerpt__excerpt",{"is-inline":!o}),C=(p||v).trim();let j="";if("words"===y)j=C.split(" ",n).join(" ");else if("characters_excluding_spaces"===y){const e=C.split("",n).join(""),t=e.length-e.replaceAll(" ","").length;j=C.split("",n+t).join("")}else"characters_including_spaces"===y&&(j=C.split("",n).join(""));const S=j!==C,B=b?(0,it.jsx)(ct.RichText,{className:w,"aria-label":(0,pt.__)("Excerpt text"),value:a?C:(S?j+"…":C)||(0,pt.__)("No excerpt found"),onChange:m,tagName:"p"}):(0,it.jsx)("p",{className:w,children:S?j+"…":C||(0,pt.__)("No excerpt found")});return(0,it.jsxs)(it.Fragment,{children:[c&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{r({showMoreOnNewLine:!0,excerptLength:55})},dropdownMenuProps:_,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!0!==o,label:(0,pt.__)("Show link on new line"),onDeselect:()=>r({showMoreOnNewLine:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show link on new line"),checked:o,onChange:e=>r({showMoreOnNewLine:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>55!==n,label:(0,pt.__)("Max number of words"),onDeselect:()=>r({excerptLength:55}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Max number of words"),value:n,onChange:e=>{r({excerptLength:e})},min:"10",max:"100"})})]})}),(0,it.jsxs)("div",{...f,children:[B,!o&&" ",o?(0,it.jsx)("p",{className:"wp-block-post-excerpt__more-text",children:k}):k]})]})}},xy=()=>jt({name:hy,metadata:my,settings:_y});var by=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})});const fy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-featured-image","title":"Featured Image","category":"theme","description":"Display a post\'s featured image.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":false,"role":"content"},"aspectRatio":{"type":"string"},"width":{"type":"string"},"height":{"type":"string"},"scale":{"type":"string","default":"cover"},"sizeSlug":{"type":"string"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"dimRatio":{"type":"number","default":0},"gradient":{"type":"string"},"customGradient":{"type":"string"},"useFirstImageFromPost":{"type":"boolean","default":false}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"align":["left","right","center","wide","full"],"color":{"text":false,"background":false},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"filter":{"duotone":true},"shadow":{"__experimentalSkipSerialization":true},"html":false,"spacing":{"margin":true,"padding":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay","shadow":".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder","filter":{"duotone":".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"}},"editorStyle":"wp-block-post-featured-image-editor","style":"wp-block-post-featured-image"}'),yy=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"cover",label:(0,pt._x)("Cover","Scale option for Image dimension control")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"contain",label:(0,pt._x)("Contain","Scale option for Image dimension control")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"fill",label:(0,pt._x)("Fill","Scale option for Image dimension control")})]}),vy="cover",ky={cover:(0,pt.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,pt.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,pt.__)("Image will be stretched and distorted to completely fill the space.")};var wy=({clientId:e,attributes:{aspectRatio:t,width:o,height:n,scale:r},setAttributes:a})=>{const[i,s,l,c]=(0,ct.useSettings)("spacing.units","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),u=(0,mt.__experimentalUseCustomUnits)({availableUnits:i||["px","%","vw","em","rem"]}),d=(e,t)=>{const o=parseFloat(t);isNaN(o)&&t||a({[e]:o<0?"0":t})},p=(0,pt._x)("Scale","Image scaling options"),m=n||t&&"auto"!==t,g=l?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=s?.map((({name:e,ratio:t})=>({label:e,value:t}))),_=[{label:(0,pt._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...c?h:[],...g||[]];return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,pt.__)("Aspect ratio"),onDeselect:()=>a({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Aspect ratio"),value:t,options:_,onChange:e=>a({aspectRatio:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,pt.__)("Height"),onDeselect:()=>a({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Height"),labelPosition:"top",value:n||"",min:0,onChange:e=>d("height",e),units:u})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!o,label:(0,pt.__)("Width"),onDeselect:()=>a({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Width"),labelPosition:"top",value:o||"",min:0,onChange:e=>d("width",e),units:u})}),m&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!r&&r!==vy,label:p,onDeselect:()=>a({scale:vy}),resetAllFilter:()=>({scale:vy}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:p,value:r,help:ky[r],onChange:e=>a({scale:e}),isBlock:!0,children:yy})})]})};var Cy=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((({clientId:e,attributes:t,setAttributes:o,overlayColor:n,setOverlayColor:r})=>{const{dimRatio:a}=t,{gradientValue:i,setGradient:s}=(0,ct.__experimentalUseGradient)(),l=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)();return l.hasColorsOrGradients?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:n.color,gradientValue:i,label:(0,pt.__)("Overlay"),onColorChange:r,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:e,...l}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==a,label:(0,pt.__)("Overlay opacity"),onDeselect:()=>o({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Overlay opacity"),value:a,onChange:e=>o({dimRatio:e}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}):null}));var jy=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((({attributes:e,overlayColor:t})=>{const{dimRatio:o}=e,{gradientClass:n,gradientValue:r}=(0,ct.__experimentalUseGradient)(),a=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)(),i=(0,ct.__experimentalUseBorderProps)(e),s={backgroundColor:t.color,backgroundImage:r,...i.style};return a.hasColorsOrGradients&&o?(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-post-featured-image__overlay",(l=o,void 0===l?null:"has-background-dim-"+10*Math.round(l/10)),{[t.class]:t.class,"has-background-dim":void 0!==o,"has-background-gradient":r,[n]:n},i.className),style:s}):null;var l}));const Sy=["image"],{ResolutionTool:By}=jo(ct.privateApis),Ty="full";function Ny({image:e,value:t,onChange:o}){const{imageSizes:n}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return{imageSizes:t().imageSizes}}),[]);if(!n?.length)return null;const r=n.filter((({slug:t})=>e?.media_details?.sizes?.[t]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));return(0,it.jsx)(By,{value:t,defaultValue:Ty,options:r,onChange:o})}const{name:Py}=fy,Iy={icon:by,edit:function({clientId:e,attributes:t,setAttributes:o,context:{postId:n,postType:r,queryId:a}}){const i=Number.isFinite(a),{isLink:s,aspectRatio:l,height:c,width:u,scale:d,sizeSlug:p,rel:m,linkTarget:g,useFirstImageFromPost:h}=t,[_,x]=(0,gt.useState)(),[b,f]=(0,_t.useEntityProp)("postType",r,"featured_media",n),[y]=(0,_t.useEntityProp)("postType",r,"content",n),v=(0,gt.useMemo)((()=>{if(b)return b;if(!h)return;const e=/).)*)?}\s+)?-->/.exec(y);return e?.groups?.attrs&&JSON.parse(e.groups.attrs)?.id}),[b,h,y]),{media:k,postType:w,postPermalink:C}=(0,lt.useSelect)((e=>{const{getEntityRecord:t,getPostType:o,getEditedEntityRecord:a}=e(_t.store);return{media:v&&t("postType","attachment",v,{context:"view"}),postType:r&&o(r),postPermalink:a("postType",r,n)?.link}}),[v,r,n]),j=k?.media_details?.sizes?.[p]?.source_url||k?.source_url,S=(0,ct.useBlockProps)({style:{width:u,height:c,aspectRatio:l},className:Dt({"is-transient":_})}),B=(0,ct.__experimentalUseBorderProps)(t),T=(0,ct.__experimentalGetShadowClassesAndStyles)(t),N=(0,ct.useBlockEditingMode)(),P=e=>(0,it.jsx)(mt.Placeholder,{className:Dt("block-editor-media-placeholder",B.className),withIllustration:!0,style:{height:!!l&&"100%",width:!!l&&"100%",...B.style,...T.style},children:e}),I=e=>{e?.id&&f(e.id),e?.url&&(0,ht.isBlobURL)(e.url)&&x(e.url)};(0,gt.useEffect)((()=>{j&&_&&x()}),[j,_]);const{createErrorNotice:D}=(0,lt.useDispatch)(bo.store),M=e=>{D(e,{type:"snackbar"}),x()},z=vt(),A="default"===N&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{group:"color",children:(0,it.jsx)(Cy,{attributes:t,setAttributes:o,clientId:e})}),(0,it.jsx)(ct.InspectorControls,{group:"dimensions",children:(0,it.jsx)(wy,{clientId:e,attributes:t,setAttributes:o,media:k})}),(v||i||!n)&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:Ty})},dropdownMenuProps:z,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:w?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),w.labels.singular_name):(0,pt.__)("Link to post"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:w?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),w.labels.singular_name):(0,pt.__)("Link to post"),onChange:()=>o({isLink:!s}),checked:s})}),s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==g,onDeselect:()=>o({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g})}),s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!m,onDeselect:()=>o({rel:""}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The Link Relation attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:m,onChange:e=>o({rel:e})})}),!!k&&(0,it.jsx)(Ny,{image:k,value:p,onChange:e=>o({sizeSlug:e})})]})})]});let L;if(!v&&(i||!n))return(0,it.jsxs)(it.Fragment,{children:[A,(0,it.jsxs)("div",{...S,children:[s?(0,it.jsx)("a",{href:C,target:g,children:P()}):P(),(0,it.jsx)(jy,{attributes:t,setAttributes:o,clientId:e})]})]});const H=(0,pt.__)("Add a featured image"),R={...B.style,...T.style,height:l?"100%":c,width:!!l&&"100%",objectFit:!(!c&&!l)&&d};return L=v||_?k||_?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("img",{className:B.className,src:_||j,alt:k&&k?.alt_text?(0,pt.sprintf)((0,pt.__)("Featured image: %s"),k.alt_text):(0,pt.__)("Featured image"),style:R}),_&&(0,it.jsx)(mt.Spinner,{})]}):P():(0,it.jsx)(ct.MediaPlaceholder,{onSelect:I,accept:"image/*",allowedTypes:Sy,onError:M,placeholder:P,mediaLibraryButton:({open:e})=>(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,icon:Jp,variant:"primary",label:H,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}),(0,it.jsxs)(it.Fragment,{children:[!_&&A,!!k&&!i&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:v,mediaURL:j,allowedTypes:Sy,accept:"image/*",onSelect:I,onError:M,onReset:()=>{o({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:void 0}),f(0)}})}),(0,it.jsxs)("figure",{...S,children:[s?(0,it.jsx)("a",{href:C,target:g,children:L}):L,(0,it.jsx)(jy,{attributes:t,setAttributes:o,clientId:e})]})]})}},Dy=()=>jt({name:Py,metadata:fy,settings:Iy}),My=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-navigation-link","title":"Post Navigation Link","category":"theme","description":"Displays the next or previous post link that is adjacent to the current post.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"type":{"type":"string","default":"next"},"label":{"type":"string","role":"content"},"showTitle":{"type":"boolean","default":false},"linkLabel":{"type":"boolean","default":false},"arrow":{"type":"string","default":"none"},"taxonomy":{"type":"string","default":""}},"usesContext":["postType"],"supports":{"reusable":false,"html":false,"color":{"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-navigation-link"}');var zy=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})}),Ay=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});const Ly=[{name:"post-previous",title:(0,pt.__)("Previous Post"),description:(0,pt.__)("Displays the post link that precedes the current post."),icon:zy,attributes:{type:"previous"},scope:["inserter","transform"],example:{attributes:{label:(0,pt.__)("Previous post"),arrow:"arrow"}}},{isDefault:!0,name:"post-next",title:(0,pt.__)("Next Post"),description:(0,pt.__)("Displays the post link that follows the current post."),icon:Ay,attributes:{type:"next"},scope:["inserter","transform"],example:{attributes:{label:(0,pt.__)("Next post"),arrow:"arrow"}}}];Ly.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));var Hy=Ly;const{name:Ry}=My,Vy={edit:function({context:{postType:e},attributes:{type:t,label:o,showTitle:n,textAlign:r,linkLabel:a,arrow:i,taxonomy:s},setAttributes:l}){const c="default"===(0,ct.useBlockEditingMode)(),u="next"===t;let d=u?(0,pt.__)("Next"):(0,pt.__)("Previous");const p={none:"",arrow:u?"→":"←",chevron:u?"»":"«"}[i];n&&(d=u?(0,pt.__)("Next: "):(0,pt.__)("Previous: "));const m=u?(0,pt.__)("Next post"):(0,pt.__)("Previous post"),g=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),h=(0,lt.useSelect)((t=>{const{getTaxonomies:o}=t(_t.store);return o({type:e,per_page:-1})}),[e]),_=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{l({showTitle:!1,linkLabel:!1,arrow:"none"})},dropdownMenuProps:_,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display the title as a link"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>l({showTitle:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display the title as a link"),help:(0,pt.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!n,onChange:()=>l({showTitle:!n})})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Include the label as part of the link"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>l({linkLabel:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Include the label as part of the link"),checked:!!a,onChange:()=>l({linkLabel:!a})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Arrow"),isShownByDefault:!0,hasValue:()=>"none"!==i,onDeselect:()=>l({arrow:"none"}),children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Arrow"),value:i,onChange:e=>{l({arrow:e})},help:(0,pt.__)("A decorative arrow for the next and previous link."),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"none",label:(0,pt._x)("None","Arrow option for Next/Previous link")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,pt._x)("Arrow","Arrow option for Next/Previous link")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,pt._x)("Chevron","Arrow option for Next/Previous link")})]})})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Filter by taxonomy"),value:s,options:[{label:(0,pt.__)("Unfiltered"),value:""},...(h??[]).filter((({visibility:e})=>!!e?.publicly_queryable)).map((e=>({value:e.slug,label:e.name})))],onChange:e=>l({taxonomy:e}),help:(0,pt.__)("Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.")})}),c&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:r,onChange:e=>{l({textAlign:e})}})}),(0,it.jsxs)("div",{...g,children:[!u&&p&&(0,it.jsx)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${i}`,children:p}),(0,it.jsx)(ct.RichText,{tagName:"a",identifier:"label","aria-label":m,placeholder:d,value:o,withoutInteractiveFormatting:!0,onChange:e=>l({label:e})}),n&&(0,it.jsx)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault(),children:(0,pt.__)("An example title")}),u&&p&&(0,it.jsx)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${i}`,"aria-hidden":!0,children:p})]})]})},variations:Hy,example:{attributes:{label:(0,pt.__)("Next post"),arrow:"arrow"}}},Fy=()=>jt({name:Ry,metadata:My,settings:Vy}),Ey=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-template","title":"Post Template","category":"theme","ancestor":["core/query"],"description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","usesContext":["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination","postType"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-post-template","editorStyle":"wp-block-post-template-editor"}'),Oy=[["core/post-title"],["core/post-date",{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}],["core/post-excerpt"]];function Gy({classList:e}){const t=(0,ct.useInnerBlocksProps)({className:Dt("wp-block-post",e)},{template:Oy,__unstableDisableLayoutClassNames:!0});return(0,it.jsx)("li",{...t})}const $y=(0,gt.memo)((function({blocks:e,blockContextId:t,classList:o,isHidden:n,setActiveBlockContextId:r}){const a=(0,ct.__experimentalUseBlockPreview)({blocks:e,props:{className:Dt("wp-block-post",o)}}),i=()=>{r(t)},s={display:n?"none":void 0};return(0,it.jsx)("li",{...a,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:s})}));const{name:Uy}=Ey,qy={icon:Oa,edit:function({setAttributes:e,clientId:t,context:{query:{perPage:o,offset:n=0,postType:r,order:a,orderBy:i,author:s,search:l,exclude:c,sticky:u,inherit:d,taxQuery:p,parents:m,pages:g,format:h,..._}={},templateSlug:x,previewPostType:b},attributes:{layout:f},__unstableLayoutClassNames:y}){const{type:v,columnCount:k=3}=f||{},[w,C]=(0,gt.useState)(),{posts:j,blocks:S}=(0,lt.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:f}=e(_t.store),{getBlocks:y}=e(ct.store),v=d&&x?.startsWith("category-")&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:x.replace("category-","")}),k=d&&x?.startsWith("tag-")&&g("taxonomy","post_tag",{context:"view",per_page:1,_fields:["id"],slug:x.replace("tag-","")}),w={offset:n||0,order:a,orderby:i};if(p&&!d){const e=f({type:r,per_page:-1,context:"view"}),t=Object.entries(p).reduce(((t,[o,n])=>{const r=e?.find((({slug:e})=>e===o));return r?.rest_base&&(t[r?.rest_base]=n),t}),{});Object.keys(t).length&&Object.assign(w,t)}o&&(w.per_page=o),s&&(w.author=s),l&&(w.search=l),c?.length&&(w.exclude=c),m?.length&&(w.parent=m),h?.length&&(w.format=h),["exclude","only"].includes(u)&&(w.sticky="only"===u),["","ignore"].includes(u)&&(delete w.sticky,w.ignore_sticky="ignore"===u);let C=r;d&&(x?.startsWith("archive-")?(w.postType=x.replace("archive-",""),C=w.postType):v?w.categories=v[0]?.id:k?w.tags=k[0]?.id:x?.startsWith("taxonomy-post_format")&&(w.format=x.replace("taxonomy-post_format-post-format-","")));return{posts:g("postType",b||C,{...w,..._}),blocks:y(t)}}),[o,n,a,i,t,s,l,r,c,u,d,x,p,m,h,_,b]),B=(0,gt.useMemo)((()=>j?.map((e=>({postType:e.type,postId:e.id,classList:e.class_list??""})))),[j]),T=(0,ct.useBlockProps)({className:Dt(y,{[`columns-${k}`]:"grid"===v&&k})});if(!j)return(0,it.jsx)("p",{...T,children:(0,it.jsx)(mt.Spinner,{})});if(!j.length)return(0,it.jsxs)("p",{...T,children:[" ",(0,pt.__)("No results found.")]});const N=t=>e({layout:{...f,...t}}),P=[{icon:Bm,title:(0,pt._x)("List view","Post template block display setting"),onClick:()=>N({type:"default"}),isActive:"default"===v||"constrained"===v},{icon:qd,title:(0,pt._x)("Grid view","Post template block display setting"),onClick:()=>N({type:"grid",columnCount:k}),isActive:"grid"===v}];return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:P})}),(0,it.jsx)("ul",{...T,children:B&&B.map((e=>(0,it.jsxs)(ct.BlockContextProvider,{value:e,children:[e.postId===(w||B[0]?.postId)?(0,it.jsx)(Gy,{classList:e.classList}):null,(0,it.jsx)($y,{blocks:S,blockContextId:e.postId,classList:e.classList,setActiveBlockContextId:C,isHidden:e.postId===(w||B[0]?.postId)})]},e.postId)))})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})}},Wy=()=>jt({name:Uy,metadata:Ey,settings:qy});var Zy=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",fillRule:"evenodd",clipRule:"evenodd"})});const Jy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-terms","title":"Post Terms","category":"theme","description":"Post terms.","textdomain":"default","attributes":{"term":{"type":"string"},"textAlign":{"type":"string"},"separator":{"type":"string","default":", "},"prefix":{"type":"string","default":"","role":"content"},"suffix":{"type":"string","default":"","role":"content"}},"usesContext":["postId","postType"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-terms"}'),Qy=[];const Ky=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];var Yy=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});const Xy={category:Zy,post_tag:Yy};function ev(e,t){if("core/post-terms"!==t)return e;const o=e.variations.map((e=>({...e,icon:Xy[e.name]??Zy})));return{...e,variations:o}}const{name:tv}=Jy,ov={icon:Zy,edit:function({attributes:e,clientId:t,context:o,isSelected:n,setAttributes:r,insertBlocksAfter:a}){const{term:i,textAlign:s,separator:l,prefix:c,suffix:u}=e,{postId:d,postType:p}=o,m="default"===(0,ct.useBlockEditingMode)(),g=(0,lt.useSelect)((e=>{if(!i)return{};const{getTaxonomy:t}=e(_t.store),o=t(i);return o?.visibility?.publicly_queryable?o:{}}),[i]),{postTerms:h,hasPostTerms:_,isLoading:x}=function({postId:e,term:t}){const{slug:o}=t;return(0,lt.useSelect)((n=>{const r=t?.visibility?.publicly_queryable;if(!r)return{postTerms:Qy,isLoading:!1,hasPostTerms:!1};const{getEntityRecords:a,isResolving:i}=n(_t.store),s=["taxonomy",o,{post:e,per_page:-1,context:"view"}],l=a(...s);return{postTerms:l,isLoading:i("getEntityRecords",s),hasPostTerms:!!l?.length}}),[e,t?.visibility?.publicly_queryable,o])}({postId:d,term:g}),b=d&&p,f=(0,ct.useBlockDisplayInformation)(t),y=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${s}`]:s,[`taxonomy-${i}`]:i})});return(0,it.jsxs)(it.Fragment,{children:[m&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:s,onChange:e=>{r({textAlign:e})}})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,pt.__)("Separator"),value:l||"",onChange:e=>{r({separator:e})},help:(0,pt.__)("Enter character(s) used to separate terms.")})}),(0,it.jsxs)("div",{...y,children:[x&&b&&(0,it.jsx)(mt.Spinner,{}),!x&&(n||c)&&(0,it.jsx)(ct.RichText,{identifier:"prefix",allowedFormats:Ky,className:"wp-block-post-terms__prefix","aria-label":(0,pt.__)("Prefix"),placeholder:(0,pt.__)("Prefix")+" ",value:c,onChange:e=>r({prefix:e}),tagName:"span"}),(!b||!i)&&(0,it.jsx)("span",{children:f.title}),b&&!x&&_&&h.map((e=>(0,it.jsx)("a",{href:e.link,onClick:e=>e.preventDefault(),rel:"tag",children:(0,ao.decodeEntities)(e.name)},e.id))).reduce(((e,t)=>(0,it.jsxs)(it.Fragment,{children:[e,(0,it.jsx)("span",{className:"wp-block-post-terms__separator",children:l||" "}),t]}))),b&&!x&&!_&&(g?.labels?.no_terms||(0,pt.__)("Term items not found.")),!x&&(n||u)&&(0,it.jsx)(ct.RichText,{identifier:"suffix",allowedFormats:Ky,className:"wp-block-post-terms__suffix","aria-label":(0,pt.__)("Suffix"),placeholder:" "+(0,pt.__)("Suffix"),value:u,onChange:e=>r({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>a((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})]})}},nv=()=>((0,vl.addFilter)("blocks.registerBlockType","core/template-part",ev),jt({name:tv,metadata:Jy,settings:ov}));var rv=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z"})});const av=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-time-to-read","title":"Time to Read","category":"theme","description":"Show minutes required to finish reading the post. Can also show a word count.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"displayAsRange":{"type":"boolean","default":true},"displayMode":{"type":"string","default":"time"},"averageReadingSpeed":{"type":"number","default":189}},"supports":{"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}}}'),iv=window.wp.wordcount;var sv=function({attributes:e,setAttributes:t,context:o}){const{textAlign:n,displayAsRange:r,displayMode:a,averageReadingSpeed:i}=e,{postId:s,postType:l}=o,c=vt(),[u]=(0,_t.useEntityProp)("postType",l,"content",s),[d]=(0,_t.useEntityBlockEditor)("postType",l,{id:s}),p=(0,gt.useMemo)((()=>{let e;e=u instanceof Function?u({blocks:d}):d?(0,st.__unstableSerializeAndClean)(d):u;const t=(0,pt._x)("words","Word count type. Do not translate!"),o=(0,iv.count)(e||"",t);if("time"===a){if(r){let e=Math.max(1,Math.round(o/i*1.2));const t=Math.max(1,Math.round(o/i*.8));t===e&&(e+=1);const n=(0,pt._x)("%1$s–%2$s minutes","Range of minutes to read");return(0,pt.sprintf)(n,t,e)}const e=Math.max(1,Math.round(o/i));return(0,pt.sprintf)((0,pt._n)("%s minute","%s minutes",e),e)}if("words"===a)return"words"===t?(0,pt.sprintf)((0,pt._n)("%s word","%s words",o),o.toLocaleString()):(0,pt.sprintf)((0,pt._n)("%s character","%s characters",o),o.toLocaleString())}),[u,d,r,a,i]),m=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{t({textAlign:e})}})}),"time"===a&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({displayAsRange:!0})},dropdownMenuProps:c,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt._x)("Display as range","Turns reading time range display on or off"),hasValue:()=>!r,onDeselect:()=>{t({displayAsRange:!0})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display as range"),checked:!!r,onChange:()=>t({displayAsRange:!r})})})})}),(0,it.jsx)("div",{...m,children:p})]})},lv=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z"})});const cv=[{name:"time-to-read",title:(0,pt.__)("Time to Read"),description:(0,pt.__)("Show minutes required to finish reading the post."),attributes:{displayMode:"time"},scope:["inserter","transform"],isActive:e=>"time"===e?.displayMode,icon:rv,isDefault:!0},{name:"word-count",title:(0,pt.__)("Word Count"),description:(0,pt.__)("Show the number of words in the post."),attributes:{displayMode:"words"},scope:["inserter","transform"],isActive:e=>"words"===e?.displayMode,icon:lv}];var uv=cv;const{name:dv}=av,pv={icon:rv,edit:sv,variations:uv,example:{}},mv=()=>jt({name:dv,metadata:av,settings:pv}),gv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-title","title":"Title","category":"theme","description":"Displays the title of a post, page, or any other content-type.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"isLink":{"type":"boolean","default":false,"role":"content"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-title"}');const hv={attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var _v=[hv];const{name:xv}=gv,bv={icon:ji,edit:function({attributes:{level:e,levelOptions:t,textAlign:o,isLink:n,rel:r,linkTarget:a},setAttributes:i,context:{postType:s,postId:l,queryId:c},insertBlocksAfter:u}){const d=0===e?"p":`h${e}`,p=Number.isFinite(c),m=(0,lt.useSelect)((e=>!p&&e(_t.store).canUser("update",{kind:"postType",name:s,id:l})),[p,s,l]),[g="",h,_]=(0,_t.useEntityProp)("postType",s,"title",l),[x]=(0,_t.useEntityProp)("postType",s,"link",l),b=()=>{u((0,st.createBlock)((0,st.getDefaultBlockName)()))},f=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),y=(0,ct.useBlockEditingMode)(),v=vt();let k=(0,it.jsx)(d,{...f,children:(0,pt.__)("Title")});return s&&l&&(k=m?(0,it.jsx)(ct.PlainText,{tagName:d,placeholder:(0,pt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b,...f}):(0,it.jsx)(d,{...f,dangerouslySetInnerHTML:{__html:_?.rendered}})),n&&s&&l&&(k=m?(0,it.jsx)(d,{...f,children:(0,it.jsx)(ct.PlainText,{tagName:"a",href:x,target:a,rel:r,placeholder:g.length?null:(0,pt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b})}):(0,it.jsx)(d,{...f,children:(0,it.jsx)("a",{href:x,target:a,rel:r,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:_?.rendered}})})),(0,it.jsxs)(it.Fragment,{children:["default"===y&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:e,options:t,onChange:e=>i({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{i({textAlign:e})}})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({rel:"",linkTarget:"_self",isLink:!1})},dropdownMenuProps:v,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Make title a link"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>i({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Make title a link"),onChange:()=>i({isLink:!n}),checked:n})}),n&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_blank"===a,onDeselect:()=>i({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>i({linkTarget:e?"_blank":"_self"}),checked:"_blank"===a})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>i({rel:""}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The Link Relation attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:r,onChange:e=>i({rel:e})})})]})]})})]}),k]})},deprecated:_v},fv=()=>jt({name:xv,metadata:gv,settings:bv});var yv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"})});const vv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/preformatted","title":"Preformatted","category":"text","description":"Add text that respects your spacing and tabs, and also allows styling.","textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"anchor":true,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-preformatted"}');const kv={from:[{type:"block",blocks:["core/code","core/paragraph","core/verse"],transform:({content:e,anchor:t})=>(0,st.createBlock)("core/preformatted",{content:e,anchor:t})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName),schema:({phrasingContentSchema:e})=>({pre:{children:e}})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,st.createBlock)("core/code",e)},{type:"block",blocks:["core/verse"],transform:e=>(0,st.createBlock)("core/verse",e)}]};var wv=kv;const{name:Cv}=vv,jv={icon:yv,example:{attributes:{content:(0,pt.__)("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:wv,edit:function({attributes:e,mergeBlocks:t,setAttributes:o,onRemove:n,insertBlocksAfter:r,style:a}){const{content:i}=e,s=(0,ct.useBlockProps)({style:a});return(0,it.jsx)(ct.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:i,onChange:e=>{o({content:e})},onRemove:n,"aria-label":(0,pt.__)("Preformatted text"),placeholder:(0,pt.__)("Write preformatted text…"),onMerge:t,...s,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>r((0,st.createBlock)((0,st.getDefaultBlockName)()))})},save:function({attributes:e}){const{content:t}=e;return(0,it.jsx)("pre",{...ct.useBlockProps.save(),children:(0,it.jsx)(ct.RichText.Content,{value:t})})},merge:(e,t)=>({content:e.content+"\n\n"+t.content})},Sv=()=>jt({name:Cv,metadata:vv,settings:jv});var Bv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})});const Tv="is-style-solid-color",Nv={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function Pv(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function Iv(e){const t=`${e=e||""}`.split("
");return t.shift(),t.pop(),t.join("
")}const Dv={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,citation:o,value:n}=e,r=!ct.RichText.isEmpty(o);return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:Dt({[`has-text-align-${t}`]:t})}),children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{value:n,multiline:!0}),r&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})})},migrate:({value:e,...t})=>({value:Iv(e),...t})},Mv={attributes:{...Nv},save({attributes:e}){const{mainColor:t,customMainColor:o,customTextColor:n,textColor:r,value:a,citation:i,className:s}=e,l=s?.includes(Tv);let c,u;if(l){const e=(0,ct.getColorClassName)("background-color",t);c=Dt({"has-background":e||o,[e]:e}),u={backgroundColor:e?void 0:o}}else o&&(u={borderColor:o});const d=(0,ct.getColorClassName)("color",r),p=Dt({"has-text-color":r||n,[d]:d}),m=d?void 0:{color:n};return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:c,style:u}),children:(0,it.jsxs)("blockquote",{className:p,style:m,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(Tv);let s;return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:Iv(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},zv={attributes:{...Nv,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:r,value:a,citation:i,className:s,figureStyle:l}=e,c=s?.includes(Tv);let u,d;if(c){const e=(0,ct.getColorClassName)("background-color",t);u=Dt({"has-background":e||o,[e]:e}),d={backgroundColor:e?void 0:o}}else if(o)d={borderColor:o};else if(t){d={borderColor:Pv(l)}}const p=(0,ct.getColorClassName)("color",n),m=(n||r)&&Dt("has-text-color",{[p]:p}),g=p?void 0:{color:r};return(0,it.jsx)("figure",{className:u,style:d,children:(0,it.jsxs)("blockquote",{className:m,style:g,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,figureStyle:o,mainColor:n,customMainColor:r,customTextColor:a,...i}){const s=t?.includes(Tv);let l;if(r&&(l=s?{color:{background:r}}:{border:{color:r}}),a&&l&&(l.color={...l.color,text:a}),!s&&n&&o){const n=Pv(o);if(n)return{value:Iv(e),...i,className:t,style:{border:{color:n}}}}return{value:Iv(e),className:t,backgroundColor:s?n:void 0,borderColor:s?void 0:n,textAlign:s?"left":void 0,style:l,...i}}},Av={attributes:Nv,save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:r,value:a,citation:i,className:s}=e,l=s?.includes(Tv);let c,u;if(l)c=(0,ct.getColorClassName)("background-color",t),c||(u={backgroundColor:o});else if(o)u={borderColor:o};else if(t){const e=(0,lt.select)(ct.store).getSettings().colors??[];u={borderColor:(0,ct.getColorObjectByAttributeValues)(e,t).color}}const d=(0,ct.getColorClassName)("color",n),p=n||r?Dt("has-text-color",{[d]:d}):void 0,m=d?void 0:{color:r};return(0,it.jsx)("figure",{className:c,style:u,children:(0,it.jsxs)("blockquote",{className:p,style:m,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(Tv);let s={};return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:Iv(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},Lv={attributes:{...Nv},save({attributes:e}){const{value:t,citation:o}=e;return(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{value:t,multiline:!0}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})},migrate:({value:e,...t})=>({value:Iv(e),...t})},Hv={attributes:{...Nv,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save({attributes:e}){const{value:t,citation:o,align:n}=e;return(0,it.jsxs)("blockquote",{className:`align${n}`,children:[(0,it.jsx)(ct.RichText.Content,{value:t,multiline:!0}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"footer",value:o})]})},migrate:({value:e,...t})=>({value:Iv(e),...t})};var Rv=[Dv,Mv,zv,Av,Lv,Hv];const Vv="web"===gt.Platform.OS;var Fv=function({attributes:e,setAttributes:t,isSelected:o,insertBlocksAfter:n}){const{textAlign:r,citation:a,value:i}=e,s=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),l=!ct.RichText.isEmpty(a)||o;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{t({textAlign:e})}})}),(0,it.jsx)("figure",{...s,children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText,{identifier:"value",tagName:"p",value:i,onChange:e=>t({value:e}),"aria-label":(0,pt.__)("Pullquote text"),placeholder:(0,pt.__)("Add quote"),textAlign:"center"}),l&&(0,it.jsx)(ct.RichText,{identifier:"citation",tagName:Vv?"cite":void 0,style:{display:"block"},value:a,"aria-label":(0,pt.__)("Pullquote citation text"),placeholder:(0,pt.__)("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>n((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})})]})};const Ev=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pullquote","title":"Pullquote","category":"text","description":"Give special visual emphasis to a quote from your text.","textdomain":"default","attributes":{"value":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"background":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalStyle":{"typography":{"fontSize":"1.5em","lineHeight":"1.6"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-pullquote-editor","style":"wp-block-pullquote"}');const Ov={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/pullquote",{value:(0,Tn.toHTMLString)({value:(0,Tn.join)(e.map((({content:e})=>(0,Tn.create)({html:e}))),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,st.createBlock)("core/pullquote",{value:e,anchor:t})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{const o=[];return e&&o.push((0,st.createBlock)("core/paragraph",{content:e})),t&&o.push((0,st.createBlock)("core/paragraph",{content:t})),0===o.length?(0,st.createBlock)("core/paragraph",{content:""}):o}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,st.createBlock)("core/heading",{content:t});const o=(0,st.createBlock)("core/heading",{content:e});return t?[o,(0,st.createBlock)("core/heading",{content:t})]:o}}]};var Gv=Ov;const{name:$v}=Ev,Uv={icon:Bv,example:{attributes:{value:(0,pt.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,pt.__)("Matt Mullenweg")}},transforms:Gv,edit:Fv,save:function({attributes:e}){const{textAlign:t,citation:o,value:n}=e,r=!ct.RichText.isEmpty(o);return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:Dt({[`has-text-align-${t}`]:t})}),children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{tagName:"p",value:n}),r&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})})},deprecated:Rv},qv=()=>jt({name:$v,metadata:Ev,settings:Uv});var Wv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})});const Zv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query","title":"Query Loop","category":"theme","description":"An advanced block that allows displaying post types based on different query parameters and visual configurations.","keywords":["posts","list","blog","blogs","custom post types"],"textdomain":"default","attributes":{"queryId":{"type":"number"},"query":{"type":"object","default":{"perPage":null,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[],"format":[]}},"tagName":{"type":"string","default":"div"},"namespace":{"type":"string"},"enhancedPagination":{"type":"boolean","default":false}},"usesContext":["templateSlug"],"providesContext":{"queryId":"queryId","query":"query","displayLayout":"displayLayout","enhancedPagination":"enhancedPagination"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true,"contentRole":true},"editorStyle":"wp-block-query-editor"}'),Jv=e=>{const t=e?.reduce(((e,t)=>{const{mapById:o,mapByName:n,names:r}=e;return o[t.id]=t,n[t.name]=t,r.push(t.name),e}),{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},Qv=(e,t)=>{const o=t.split(".");let n=e;return o.forEach((e=>{n=n?.[e]})),n},Kv=(e,t)=>(e||[]).map((e=>({...e,name:(0,ao.decodeEntities)(Qv(e,t))}))),Yv=e=>{const t=(0,lt.useSelect)((t=>{const{getTaxonomies:o,getPostType:n}=t(_t.store);return n(e)?.taxonomies?.length>0?o({type:e,per_page:-1}):[]}),[e]);return(0,gt.useMemo)((()=>t?.filter((({visibility:e})=>!!e?.publicly_queryable))),[t])};function Xv(e,t){return!e||e.includes(t)}const ek=e=>(0,lt.useSelect)((t=>{const{getClientIdsOfDescendants:o,getBlockName:n}=t(ct.store);return o(e).some((e=>{const t=n(e),o=Object.is((0,st.getBlockSupport)(t,"interactivity"),!0),r=(0,st.getBlockSupport)(t,"interactivity.clientNavigation");return!o&&!r}))}),[e]);function tk({enhancedPagination:e,setAttributes:t,clientId:o}){const n=ek(o);let r=(0,pt.__)("Reload the full page—instead of just the posts list—when visitors navigate between pages.");return n&&(r=(0,pt.__)("Enhancement disabled because there are non-compatible blocks inside the Query block.")),(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Reload full page"),help:r,checked:!e,disabled:n,onChange:e=>{t({enhancedPagination:!e})}})})}const ok=[{label:(0,pt.__)("Newest to oldest"),value:"date/desc"},{label:(0,pt.__)("Oldest to newest"),value:"date/asc"},{label:(0,pt.__)("A → Z"),value:"title/asc"},{label:(0,pt.__)("Z → A"),value:"title/desc"}];var nk=function({order:e,orderBy:t,orderByOptions:o=ok,onChange:n}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Order by"),value:`${t}/${e}`,options:o,onChange:e=>{const[t,o]=e.split("/");n({order:o,orderBy:t})}})};const rk={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var ak=function({value:e,onChange:t}){const o=(0,lt.useSelect)((e=>{const{getUsers:t}=e(_t.store);return t(rk)}),[]);if(!o)return null;const n=Jv(o),r=(e?e.toString().split(","):[]).reduce(((e,t)=>{const o=n.mapById[t];return o&&e.push({id:t,value:o.name}),e}),[]);return(0,it.jsx)(mt.FormTokenField,{label:(0,pt.__)("Authors"),value:r,suggestions:n.names,onChange:e=>{const o=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>{const o=t?.id||e[t]?.id;if(o)return o})(n.mapByName,t);return o&&e.add(o),e}),new Set));t({author:o.join(",")})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})};const ik=[],sk={order:"asc",_fields:"id,title",context:"view"};var lk=function({parents:e,postType:t,onChange:o}){const[n,r]=(0,gt.useState)(""),[a,i]=(0,gt.useState)(ik),[s,l]=(0,gt.useState)(ik),c=(0,xt.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,lt.useSelect)((o=>{if(!n)return{searchResults:ik,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(_t.store),i=["postType",t,{...sk,search:n,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,t,e]),p=(0,lt.useSelect)((o=>{if(!e?.length)return ik;const{getEntityRecords:n}=o(_t.store);return n("postType",t,{...sk,include:e,per_page:e.length})}),[e,t]);(0,gt.useEffect)((()=>{if(e?.length||i(ik),!p?.length)return;const t=Jv(Kv(p,"title.rendered")),o=e.reduce(((e,o)=>{const n=t.mapById[o];return n&&e.push({id:o,value:n.name}),e}),[]);i(o)}),[e,p]);const m=(0,gt.useMemo)((()=>u?.length?Jv(Kv(u,"title.rendered")):ik),[u]);return(0,gt.useEffect)((()=>{d&&l(m.names)}),[m.names,d]),(0,it.jsx)(mt.FormTokenField,{__next40pxDefaultSize:!0,label:(0,pt.__)("Parents"),value:a,onInputChange:c,suggestions:s,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>{const o=t?.id||e?.[t]?.id;if(o)return o})(m.mapByName,t);return o&&e.add(o),e}),new Set));l(ik),o({parents:t})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0})};const ck=[],uk={order:"asc",_fields:"id,name",context:"view"},dk=(e,t)=>{const o=t?.id||e?.find((e=>e.name===t))?.id;if(o)return o;const n=t.toLocaleLowerCase();return e?.find((e=>e.name.toLocaleLowerCase()===n))?.id};function pk({onChange:e,query:t}){const{postType:o,taxQuery:n}=t,r=Yv(o);return r&&0!==r.length?(0,it.jsx)(mt.__experimentalVStack,{spacing:4,children:r.map((t=>{const o=n?.[t.slug]||[];return(0,it.jsx)(mk,{taxonomy:t,termIds:o,onChange:o=>e({taxQuery:{...n,[t.slug]:o}})},t.slug)}))}):null}function mk({taxonomy:e,termIds:t,onChange:o}){const[n,r]=(0,gt.useState)(""),[a,i]=(0,gt.useState)(ck),[s,l]=(0,gt.useState)(ck),c=(0,xt.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,lt.useSelect)((o=>{if(!n)return{searchResults:ck,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(_t.store),i=["taxonomy",e.slug,{...uk,search:n,orderby:"name",exclude:t,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,e.slug,t]),p=(0,lt.useSelect)((o=>{if(!t?.length)return ck;const{getEntityRecords:n}=o(_t.store);return n("taxonomy",e.slug,{...uk,include:t,per_page:t.length})}),[e.slug,t]);(0,gt.useEffect)((()=>{if(t?.length||i(ck),!p?.length)return;const e=t.reduce(((e,t)=>{const o=p.find((e=>e.id===t));return o&&e.push({id:t,value:o.name}),e}),[]);i(e)}),[t,p]),(0,gt.useEffect)((()=>{d&&l(u.map((e=>e.name)))}),[u,d]);return(0,it.jsx)("div",{className:"block-library-query-inspector__taxonomy-control",children:(0,it.jsx)(mt.FormTokenField,{label:e.name,value:a,onInputChange:c,suggestions:s,displayTransform:ao.decodeEntities,onChange:e=>{const t=new Set;for(const o of e){const e=dk(u,o);e&&t.add(e)}l(ck),o(Array.from(t))},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})}const gk=[{value:"aside",label:(0,pt.__)("Aside")},{value:"audio",label:(0,pt.__)("Audio")},{value:"chat",label:(0,pt.__)("Chat")},{value:"gallery",label:(0,pt.__)("Gallery")},{value:"image",label:(0,pt.__)("Image")},{value:"link",label:(0,pt.__)("Link")},{value:"quote",label:(0,pt.__)("Quote")},{value:"standard",label:(0,pt.__)("Standard")},{value:"status",label:(0,pt.__)("Status")},{value:"video",label:(0,pt.__)("Video")}].sort(((e,t)=>{const o=e.label.toUpperCase(),n=t.label.toUpperCase();return on?1:0}));function hk(e,t){return e.map((e=>t.find((t=>t.label.toLocaleLowerCase()===e.toLocaleLowerCase()))?.value)).filter(Boolean)}function _k({onChange:e,query:{format:t}}){const o=Array.isArray(t)?t:[t],{supportedFormats:n}=(0,lt.useSelect)((e=>({supportedFormats:e(_t.store).getThemeSupports().formats})),[]),r=gk.filter((e=>n.includes(e.value))),a=o.map((e=>r.find((t=>t.value===e))?.label)).filter(Boolean),i=r.filter((e=>!o.includes(e.value))).map((e=>e.label));return(0,it.jsx)(mt.FormTokenField,{label:(0,pt.__)("Formats"),value:a,suggestions:i,onChange:t=>{e({format:hk(t,r)})},__experimentalShowHowTo:!1,__experimentalExpandOnFocus:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}const xk=[{label:(0,pt.__)("Include"),value:""},{label:(0,pt.__)("Ignore"),value:"ignore"},{label:(0,pt.__)("Exclude"),value:"exclude"},{label:(0,pt.__)("Only"),value:"only"}];function bk({value:e,onChange:t}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Sticky posts"),options:xk,value:e,onChange:t,help:(0,pt.__)("Sticky posts always appear first, regardless of their publish date.")})}var fk=({perPage:e,offset:t=0,onChange:o})=>(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Items per page"),min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||o({perPage:e,offset:t})},value:parseInt(e,10)});var yk=({offset:e=0,onChange:t})=>(0,it.jsx)(mt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Offset"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||e>100||t({offset:e})}});var vk=({pages:e,onChange:t})=>(0,it.jsx)(mt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Max pages to show"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||t({pages:e})},help:(0,pt.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")});function kk(e){const{attributes:t,setQuery:o,isSingular:n}=e,{query:r}=t,{order:a,orderBy:i,author:s,pages:l,postType:c,perPage:u,offset:d,sticky:p,inherit:m,taxQuery:g,parents:h,format:_}=r,x=function(e){return(0,lt.useSelect)((t=>t(st.store).getActiveBlockVariation("core/query",e)?.allowedControls),[e])}(t),b="post"===c,{postTypesTaxonomiesMap:f,postTypesSelectOptions:y,postTypeFormatSupportMap:v}=(()=>{const e=(0,lt.useSelect)((e=>{const{getPostTypes:t}=e(_t.store),o=["attachment"],n=t({per_page:-1})?.filter((({viewable:e,slug:t})=>e&&!o.includes(t)));return n}),[]);return{postTypesTaxonomiesMap:(0,gt.useMemo)((()=>{if(e?.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,gt.useMemo)((()=>(e||[]).map((({labels:e,slug:t})=>({label:e.singular_name,value:t})))),[e]),postTypeFormatSupportMap:(0,gt.useMemo)((()=>e?.length?e.reduce(((e,t)=>(e[t.slug]=t.supports?.["post-formats"]||!1,e)),{}):{}),[e])}})(),k=Yv(c),w=function(e){return(0,lt.useSelect)((t=>{const o=t(_t.store).getPostType(e);return o?.viewable&&o?.hierarchical}),[e])}(c),C=e=>{const t={postType:e},n=f[e],r=Object.entries(g||{}).reduce(((e,[t,o])=>(n.includes(t)&&(e[t]=o),e)),{});t.taxQuery=Object.keys(r).length?r:void 0,"post"!==e&&(t.sticky=""),t.parents=[];v[e]||(t.format=[]),o(t)},[j,S]=(0,gt.useState)(r.search),B=(0,gt.useMemo)((()=>(0,xt.debounce)((e=>{o({search:e})}),250)),[o]),T=function(e){const t=(0,lt.useSelect)((t=>{const o=t(_t.store).getPostType(e);return!!o?.supports?.["page-attributes"]}),[e]);return(0,gt.useMemo)((()=>{const e=[{label:(0,pt.__)("Newest to oldest"),value:"date/desc"},{label:(0,pt.__)("Oldest to newest"),value:"date/asc"},{label:(0,pt.__)("A → Z"),value:"title/asc"},{label:(0,pt.__)("Z → A"),value:"title/desc"}];return t&&e.push({label:(0,pt.__)("Ascending by order"),value:"menu_order/asc"},{label:(0,pt.__)("Descending by order"),value:"menu_order/desc"}),e}),[t])}(c),N=Xv(x,"inherit"),P=!m&&Xv(x,"postType"),I=(0,pt.__)("Post type"),D=(0,pt.__)("Select the type of content to display: posts, pages, or custom post types."),M=!m&&Xv(x,"order"),z=!m&&b&&Xv(x,"sticky"),A=N||P||M||z,L=!!k?.length&&Xv(x,"taxQuery"),H=Xv(x,"author"),R=Xv(x,"search"),V=Xv(x,"parents")&&w,F=v[c],E=(0,lt.useSelect)((e=>{if(!F||!Xv(x,"format"))return!1;const t=e(_t.store).getThemeSupports();return t.formats&&t.formats.length>0&&t.formats.some((e=>"standard"!==e))}),[x,F]),O=L||H||R||V||E,G=vt(),$=Xv(x,"postCount"),U=Xv(x,"offset"),q=Xv(x,"pages"),W=$||U||q,Z=n&&m;return(0,it.jsxs)(it.Fragment,{children:[A&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({postType:"post",order:"desc",orderBy:"date",sticky:"",inherit:!0})},dropdownMenuProps:G,children:[N&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!m,label:(0,pt.__)("Query type"),onDeselect:()=>o({inherit:!0}),isShownByDefault:!0,children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:4,children:[(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Query type"),isBlock:!0,onChange:e=>{o({inherit:"default"===e})},help:m?(0,pt.__)("Display a list of posts or custom post types based on the current template."):(0,pt.__)("Display a list of posts or custom post types based on specific criteria."),value:m?"default":"custom",children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"default",label:(0,pt.__)("Default")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"custom",label:(0,pt.__)("Custom")})]}),Z&&(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank).")})]})}),P&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"post"!==c,label:I,onDeselect:()=>C("post"),isShownByDefault:!0,children:y.length>2?(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:y,value:c,label:I,onChange:C,help:D}):(0,it.jsx)(mt.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,value:c,label:I,onChange:C,help:D,children:y.map((e=>(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:e.value,label:e.label},e.value)))})}),M&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"desc"!==a||"date"!==i,label:(0,pt.__)("Order by"),onDeselect:()=>o({order:"desc",orderBy:"date"}),isShownByDefault:!0,children:(0,it.jsx)(nk,{order:a,orderBy:i,orderByOptions:T,onChange:o})}),z&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!p,label:(0,pt.__)("Sticky posts"),onDeselect:()=>o({sticky:""}),isShownByDefault:!0,children:(0,it.jsx)(bk,{value:p,onChange:e=>o({sticky:e})})})]}),!m&&W&&(0,it.jsxs)(mt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__display",label:(0,pt.__)("Display"),resetAll:()=>{o({offset:0,pages:0})},dropdownMenuProps:G,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Items per page"),hasValue:()=>u>0,children:(0,it.jsx)(fk,{perPage:u,offset:d,onChange:o})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Offset"),hasValue:()=>d>0,onDeselect:()=>o({offset:0}),children:(0,it.jsx)(yk,{offset:d,onChange:o})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Max pages to show"),hasValue:()=>l>0,onDeselect:()=>o({pages:0}),children:(0,it.jsx)(vk,{pages:l,onChange:o})})]}),!m&&O&&(0,it.jsxs)(mt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,pt.__)("Filters"),resetAll:()=>{o({author:"",parents:[],search:"",taxQuery:null,format:[]}),S("")},dropdownMenuProps:G,children:[L&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Taxonomies"),hasValue:()=>Object.values(g||{}).some((e=>!!e.length)),onDeselect:()=>o({taxQuery:null}),children:(0,it.jsx)(pk,{onChange:o,query:r})}),H&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Authors"),onDeselect:()=>o({author:""}),children:(0,it.jsx)(ak,{value:s,onChange:o})}),R&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!j,label:(0,pt.__)("Keyword"),onDeselect:()=>{o({search:""}),S("")},children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Keyword"),value:j,onChange:e=>{B(e),S(e)}})}),V&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!h?.length,label:(0,pt.__)("Parents"),onDeselect:()=>o({parents:[]}),children:(0,it.jsx)(lk,{parents:h,postType:c,onChange:o})}),E&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!_?.length,label:(0,pt.__)("Formats"),onDeselect:()=>o({format:[]}),children:(0,it.jsx)(_k,{onChange:o,query:r})})]})]})}const wk="wp-block-query-enhanced-pagination-modal__description";function Ck({clientId:e,attributes:{enhancedPagination:t},setAttributes:o}){const[n,r]=(0,gt.useState)(!1),a=ek(e);(0,gt.useEffect)((()=>{t&&a&&(o({enhancedPagination:!1}),r(!0))}),[t,a,o]);const i=()=>{r(!1)},s=(0,pt.__)("Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block.")+" "+(0,pt.__)('If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.');return n&&(0,it.jsx)(mt.Modal,{title:(0,pt.__)("Query block: Reload full page enabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:wk},role:"alertdialog",focusOnMount:"firstElement",isDismissible:!1,onRequestClose:i,children:(0,it.jsxs)(mt.__experimentalVStack,{alignment:"right",spacing:5,children:[(0,it.jsx)("span",{id:wk,children:s}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:i,children:(0,pt.__)("OK")})]})})}function jk(e=""){return e=(e=su()(e)).trim().toLowerCase()}function Sk(e,t){const o=jk(t),n=jk(e.title);let r=0;if(o===n)r+=30;else if(n.startsWith(o))r+=20;else{o.split(" ").every((e=>n.includes(e)))&&(r+=10)}return r}function Bk(e=[],t=""){if(!t)return e;const o=e.map((e=>[e,Sk(e,t)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))}function Tk({clientId:e,attributes:t,setIsPatternSelectionModalOpen:o}){return(0,it.jsx)(mt.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,pt.__)("Choose a pattern"),onRequestClose:()=>o(!1),isFullScreen:!0,children:(0,it.jsx)(Pk,{clientId:e,attributes:t})})}function Nk(e,t){const o=function(e,t){return(0,lt.useSelect)((o=>{const n=o(st.store).getActiveBlockVariation("core/query",t)?.name;if(!n)return"core/query";const{getBlockRootClientId:r,getPatternsByBlockTypes:a}=o(ct.store);return a(`core/query/${n}`,r(e)).length>0?`core/query/${n}`:"core/query"}),[e,t])}(e,t),n=((e,t)=>(0,lt.useSelect)((o=>{const{getBlockRootClientId:n,getPatternsByBlockTypes:r}=o(ct.store),a=n(e);return r(t,a)}),[t,e]))(e,o);return(0,gt.useMemo)((()=>n.filter((e=>e.blocks?.[0]?.name===o))),[n,o])}function Pk({clientId:e,attributes:t,showTitlesAsTooltip:o=!1,showSearch:n=!0}){const[r,a]=(0,gt.useState)(""),{replaceBlock:i,selectBlock:s}=(0,lt.useDispatch)(ct.store),l=Nk(e,t),c=(0,gt.useMemo)((()=>({previewPostType:t.query.postType})),[t.query.postType]),u=(0,gt.useMemo)((()=>Bk(l,r)),[l,r]);return(0,it.jsxs)("div",{className:"block-library-query-pattern__selection-content",children:[n&&(0,it.jsx)("div",{className:"block-library-query-pattern__selection-search",children:(0,it.jsx)(mt.SearchControl,{__nextHasNoMarginBottom:!0,onChange:a,value:r,label:(0,pt.__)("Search"),placeholder:(0,pt.__)("Search")})}),(0,it.jsx)(ct.BlockContextProvider,{value:c,children:(0,it.jsx)(ct.__experimentalBlockPatternsList,{blockPatterns:u,onClickPattern:(o,n)=>{const{newBlocks:r,queryClientIds:a}=((e,t)=>{const{query:{postType:o,inherit:n},namespace:r}=t,a=e.map((e=>(0,st.cloneBlock)(e))),i=[],s=[...a];for(;s.length>0;){const e=s.shift();"core/query"===e.name&&(e.attributes.query={...e.attributes.query,postType:o,inherit:n},r&&(e.attributes.namespace=r),i.push(e.clientId)),e.innerBlocks?.forEach((e=>{s.push(e)}))}return{newBlocks:a,queryClientIds:i}})(n,t);i(e,r),a[0]&&s(a[0])},showTitlesAsTooltip:o})})]})}function Ik({clientId:e,attributes:t,hasInnerBlocks:o}){if(!Nk(e,t).length)return null;const n=o?(0,pt.__)("Change design"):(0,pt.__)("Choose pattern");return(0,it.jsx)(mt.ToolbarGroup,{className:"wp-block-template-part__block-control-group",children:(0,it.jsx)(mt.__experimentalDropdownContentWrapper,{children:(0,it.jsx)(mt.Dropdown,{contentClassName:"block-editor-block-settings-menu__popover",focusOnMount:"firstElement",expandOnMobile:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{"aria-haspopup":"true","aria-expanded":e,onClick:t,children:n}),renderContent:()=>(0,it.jsx)(Pk,{clientId:e,attributes:t,showSearch:!1,showTitlesAsTooltip:!0})})})})}const{HTMLElementControl:Dk}=jo(ct.privateApis),Mk=[["core/post-template"]];function zk({attributes:e,setAttributes:t,clientId:o,context:n,name:r}){const{queryId:a,query:i,enhancedPagination:s,tagName:l="div",query:{inherit:c}={}}=e,{templateSlug:u}=n,{isSingular:d}=function(e){if(!e)return{isSingular:!0};let t=!1,o="wp"===e?"custom":e;const n=e.includes("-")?e.split("-",1)[0]:e;return(e.includes("-")?e.split("-").slice(1).join("-"):"")&&(o=n),t=["404","blank","single","page","custom"].includes(o),{isSingular:t,templateType:o}}(u),{__unstableMarkNextChangeAsNotPersistent:p}=(0,lt.useDispatch)(ct.store),m=(0,xt.useInstanceId)(zk),g=(0,ct.useBlockProps)(),h=(0,ct.useInnerBlocksProps)(g,{template:Mk}),{postsPerPage:_}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{getEntityRecord:o,getEntityRecordEdits:n,canUser:r}=e(_t.store),a=r("read",{kind:"root",name:"site"})?+o("root","site")?.posts_per_page:+t().postsPerPage;return{postsPerPage:+n("root","site")?.posts_per_page||a||3}}),[]),x=(0,gt.useCallback)((e=>t((t=>({query:{...t.query,...e}})))),[t]);return(0,gt.useEffect)((()=>{const e={};(c&&i.perPage!==_||!i.perPage&&_)&&(e.perPage=_),Object.keys(e).length&&(p(),x(e))}),[i.perPage,c,_,p,x]),(0,gt.useEffect)((()=>{Number.isFinite(a)||(p(),t({queryId:m}))}),[a,m,p,t]),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(Ik,{clientId:o,attributes:e,hasInnerBlocks:!0})}),(0,it.jsx)(Ck,{attributes:e,setAttributes:t,clientId:o}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(kk,{name:r,attributes:e,setQuery:x,setAttributes:t,clientId:o,isSingular:d})}),(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[(0,it.jsx)(Dk,{tagName:l,onChange:e=>t({tagName:e}),clientId:o,options:[{label:(0,pt.__)("Default ()"),value:"div"},{label:"
",value:"main"},{label:"",value:"section"},{label:"