",value:"button"}]}),Q&&(0,Nn.jsx)(Fh.TextControl,{label:(0,ul.__)("Link relation"),help:(0,In.createInterpolateElement)((0,ul.__)("The Link Relation attribute defines the relationship between a linked resource and the current document."),{a:(0,Nn.jsx)(cu,{openInNewTab:!0,href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:d||"",onChange:fe=>r({rel:fe})})]})]})}var pW=wxe;var rw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{tagName:{type:"string",enum:["a","button"],default:"a"},type:{type:"string",default:"button"},url:{type:"string",source:"attribute",selector:"a",attribute:"href",role:"content"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",role:"content"},text:{type:"rich-text",source:"rich-text",selector:"a,button",role:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",role:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",role:"content"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"}},supports:{anchor:!0,splitting:!0,align:!1,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},dimensions:{width:!0,__experimentalSkipSerialization:["width"],__experimentalDefaultControls:{width:!0}},typography:{__experimentalSkipSerialization:["fontSize","lineHeight","textAlign","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:{__experimentalSkipSerialization:!0},spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},interactivity:{clientNavigation:!0}},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button",selectors:{root:".wp-block-button .wp-block-button__link",typography:{writingMode:".wp-block-button"},dimensions:{root:".wp-block-button",width:".wp-block-button"}}};var Dn=n(E(),1),ID=n(y(),1);function mW({attributes:e}){let{tagName:t,type:r,fontSize:o,linkTarget:a,rel:i,style:l,text:s,title:c,url:u}=e,p=t||"a",m=p==="button",d=r||"button",f=(0,Dn.__experimentalGetBorderClassesAndStyles)(e),h=(0,Dn.__experimentalGetColorClassesAndStyles)(e),g=(0,Dn.__experimentalGetSpacingClassesAndStyles)(e),v=(0,Dn.__experimentalGetShadowClassesAndStyles)(e),b=(0,Dn.getTypographyClassesAndStyles)(e),_=S("wp-block-button__link",h.className,f.className,b.className,{"no-border-radius":l?.border?.radius===0,"has-custom-font-size":o||l?.typography?.fontSize},(0,Dn.__experimentalGetElementClassName)("button")),k={...f.style,...h.style,...g.style,...v.style,...b.style,writingMode:void 0};return(0,ID.jsx)("div",{...Dn.useBlockProps.save(),children:(0,ID.jsx)(Dn.RichText.Content,{tagName:p,type:m?d:null,className:_,href:m?null:u,title:c,style:k,value:s,target:m?null:a,rel:m?null:i})})}var{fieldsKey:Sxe,formKey:Txe}=U(dW.privateApis),{name:fW}=rw,nw={icon:lP,example:{attributes:{className:"is-style-fill",text:(0,ow.__)("Call to action")}},edit:pW,save:mW,deprecated:mU,merge:(e,{text:t=""})=>({...e,text:(e.text||"")+t}),__experimentalLabel(e,{context:t}){let{text:r}=e,o=e?.metadata?.name,a=r?.trim().length>0;if(t==="list-view"&&(o||a))return o||r;if(t==="breadcrumb"&&o)return o}};window.__experimentalContentOnlyInspectorFields&&(nw[Sxe]=[{id:"text",label:(0,ow.__)("Content"),type:"text",Edit:"rich-text"},{id:"link",label:(0,ow.__)("Link"),type:"url",Edit:"link",getValue:({item:e})=>({url:e.url,rel:e.rel,linkTarget:e.linkTarget}),setValue:({value:e})=>({url:e.url,rel:e.rel,linkTarget:e.linkTarget})}],nw[Txe]={fields:["text","link"]});var Pxe=()=>R({name:fW,metadata:rw,settings:nw});var AD={};K(AD,{init:()=>Lxe,metadata:()=>iw,name:()=>wW,settings:()=>CW});var RD=n(N(),1);var gb=n(E(),1),hb=n(y(),1),hW=e=>{if(e.layout)return e;let{contentJustification:t,orientation:r,...o}=e;return(t||r)&&Object.assign(o,{layout:{type:"flex",...t&&{justifyContent:t},...r&&{orientation:r}}}),o},Exe=[{attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}}},isEligible:({contentJustification:e,orientation:t})=>!!e||!!t,migrate:hW,save({attributes:{contentJustification:e,orientation:t}}){return(0,hb.jsx)("div",{...gb.useBlockProps.save({className:S({[`is-content-justification-${e}`]:e,"is-vertical":t==="vertical"})}),children:(0,hb.jsx)(gb.InnerBlocks.Content,{})})}},{supports:{align:["center","left","right"],anchor:!0},save(){return(0,hb.jsx)("div",{children:(0,hb.jsx)(gb.InnerBlocks.Content,{})})},isEligible({align:e}){return e&&["center","left","right"].includes(e)},migrate(e){return hW({...e,align:void 0,contentJustification:e.align})}}],gW=Exe;var bb=n(q(),1),LD=n(Xl(),1);var vb=n(q(),1);function pu(e,t,r=null){if(!e)return;let o=(0,vb.getBlockType)(t);if(!o)return;let a={};if((0,vb.hasBlockSupport)(o,"anchor")&&e.anchor&&(a.anchor=e.anchor),(0,vb.hasBlockSupport)(o,"ariaLabel")&&e.ariaLabel&&(a.ariaLabel=e.ariaLabel),e.metadata){let i=[];if(r&&i.push("id","bindings"),i.length>0){let l=Object.entries(e.metadata).reduce((s,[c,u])=>(i.includes(c)&&(s[c]=c==="bindings"?r(u):u),s),{});Object.keys(l).length>0&&(a.metadata=l)}}if(Object.keys(a).length!==0)return a}var Bxe={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,bb.createBlock)("core/buttons",{},e.map(t=>(0,bb.createBlock)("core/button",t)))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,bb.createBlock)("core/buttons",{},e.map(t=>{let{content:r}=t,o=(0,LD.__unstableCreateElement)(document,r),a=o.innerText||"",l=o.querySelector("a")?.getAttribute("href");return(0,bb.createBlock)("core/button",{...t,...pu(t,"core/button",({content:s})=>({text:s})),text:a,url:l})})),isMatch:e=>e.every(t=>{let r=(0,LD.__unstableCreateElement)(document,t.content),o=r.innerText||"",a=r.querySelectorAll("a");return o.length<=30&&a.length<=1})}]},bW=Bxe;var aw=n(E(),1),yW=n(y(),1),Nxe={name:"core/button",attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};function Ixe({attributes:e,className:t}){let{fontSize:r,layout:o,style:a}=e,i=(0,aw.useBlockProps)({className:S(t,{"has-custom-font-size":r||a?.typography?.fontSize})}),l=(0,aw.useInnerBlocksProps)(i,{defaultBlock:Nxe,template:[["core/button"]],templateInsertUpdatesSelection:!0,orientation:o?.orientation??"horizontal"});return(0,yW.jsx)("div",{...l})}var _W=Ixe;var iw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/buttons",title:"Buttons",category:"design",allowedBlocks:["core/button"],description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],html:!1,__experimentalExposeControlsToChildren:!0,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{blockGap:["horizontal","vertical"],padding:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0},listView:!0,contentRole:!0},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"};var lw=n(E(),1),xW=n(y(),1);function kW({attributes:e,className:t}){let{fontSize:r,style:o}=e,a=lw.useBlockProps.save({className:S(t,{"has-custom-font-size":r||o?.typography?.fontSize})}),i=lw.useInnerBlocksProps.save(a);return(0,xW.jsx)("div",{...i})}var{name:wW}=iw,CW={icon:cP,example:{attributes:{layout:{type:"flex",justifyContent:"center"}},innerBlocks:[{name:"core/button",attributes:{text:(0,RD.__)("Find out more")}},{name:"core/button",attributes:{text:(0,RD.__)("Contact us")}}]},deprecated:gW,transforms:bW,edit:_W,save:kW},Lxe=()=>R({name:wW,metadata:iw,settings:CW});var zD={};K(zD,{init:()=>zxe,metadata:()=>sw,name:()=>DW,settings:()=>LW});var sw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site\u2019s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{anchor:!0,align:!0,html:!1,color:{link:!0,__experimentalSkipSerialization:["text","background"],__experimentalDefaultControls:{background:!0,text:!0},__experimentalSelector:"table, th"},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-calendar"};var yb=n(O(),1),SW=n(F(),1),TW=n(lp(),1),PW=n(E(),1),EW=n(re(),1),Hh=n(N(),1),BW=n(ve(),1);var vi=n(y(),1),Axe=Sh(e=>{if(!e)return{};let t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}});function NW({attributes:e,name:t}){let{date:r,hasPosts:o,hasPostsResolved:a}=(0,SW.useSelect)(p=>{let{getEntityRecords:m,hasFinishedResolution:d}=p(EW.store),f={status:"publish",per_page:1},h=m("postType","post",f),g=d("getEntityRecords",["postType","post",f]),v,b=p("core/editor");return b&&b.getEditedPostAttribute("type")==="post"&&(v=b.getEditedPostAttribute("date")),{date:v,hasPostsResolved:g,hasPosts:g&&h?.length===1}},[]),{content:i,status:l,error:s}=(0,TW.useServerSideRender)({attributes:{...e,...Axe(r)},block:t}),c=(0,BW.useDisabled)(),u=(0,PW.useBlockProps)({ref:c});return o?(0,vi.jsxs)(vi.Fragment,{children:[l==="loading"&&(0,vi.jsx)("div",{...u,children:(0,vi.jsx)(yb.Spinner,{})}),l==="error"&&(0,vi.jsx)("div",{...u,children:(0,vi.jsx)("p",{children:(0,Hh.sprintf)((0,Hh.__)("Error: %s"),s)})}),l==="success"&&(0,vi.jsx)(xo,{wrapperProps:u,html:i})]}):(0,vi.jsx)("div",{...u,children:(0,vi.jsx)(yb.Placeholder,{icon:$1,label:(0,Hh.__)("Calendar"),children:a?(0,Hh.__)("No published posts found."):(0,vi.jsx)(yb.Spinner,{})})})}var MD=n(q(),1),Mxe={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,MD.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,MD.createBlock)("core/archives")}]},IW=Mxe;var{name:DW}=sw,LW={icon:$1,example:{},edit:NW,transforms:IW},zxe=()=>R({name:DW,metadata:sw,settings:LW});var FD={};K(FD,{init:()=>Fxe,metadata:()=>cw,name:()=>OW,settings:()=>FW});var cw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/categories",title:"Terms List",category:"widgets",description:"Display a list of all terms of a given taxonomy.",keywords:["categories"],textdomain:"default",attributes:{taxonomy:{type:"string",default:"category"},displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1},showOnlyTopLevel:{type:"boolean",default:!1},showEmpty:{type:"boolean",default:!1},label:{type:"string",role:"content"},showLabel:{type:"boolean",default:!0}},usesContext:["enhancedPagination"],supports:{anchor:!0,align:!0,html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"};var Pr=n(O(),1),RW=n(ve(),1),jh=n(E(),1),AW=n(en(),1),Tr=n(N(),1);var VD=n(re(),1),MW=n(F(),1);var zW=n(Sr(),1);var vt=n(y(),1);function OD({attributes:{displayAsDropdown:e,showHierarchy:t,showPostCounts:r,showOnlyTopLevel:o,showEmpty:a,label:i,showLabel:l,taxonomy:s},setAttributes:c,className:u,clientId:p}){let m=(0,RW.useInstanceId)(OD,"blocks-category-select"),{records:d,isResolvingTaxonomies:f}=(0,VD.useEntityRecords)("root","taxonomy",{per_page:-1}),h=d?.filter(W=>W.visibility.public),g=h?.find(W=>W.slug===s),v=!f&&g?.hierarchical,b={per_page:-1,hide_empty:!a,context:"view"};v&&o&&(b.parent=0);let{records:_,isResolving:k}=(0,VD.useEntityRecords)("taxonomy",s,b),{createWarningNotice:x}=(0,MW.useDispatch)(zW.store),w=W=>{W.preventDefault(),x((0,Tr.__)("Links are disabled in the editor."),{id:`block-library/core/categories/redirection-prevented/${p}`,type:"snackbar"})},C=W=>_?.length?W===null?_:_.filter(({parent:$})=>$===W):[],P=W=>$=>c({[W]:$}),B=W=>W?(0,AW.decodeEntities)(W).trim():(0,Tr.__)("(Untitled)"),I=()=>C(v&&t?0:null).map(V=>D(V)),D=W=>{let $=C(W.id),{id:V,link:Q,count:Y,name:ee}=W;return(0,vt.jsxs)("li",{className:`cat-item cat-item-${V}`,children:[(0,vt.jsx)("a",{href:Q,onClick:w,children:B(ee)}),r&&` (${Y})`,v&&t&&!!$.length&&(0,vt.jsx)("ul",{className:"children",children:$.map(te=>D(te))})]},V)},T=()=>{let $=C(v&&t?0:null);return(0,vt.jsxs)(vt.Fragment,{children:[l?(0,vt.jsx)(jh.RichText,{className:"wp-block-categories__label","aria-label":(0,Tr.__)("Label text"),placeholder:g?.name,withoutInteractiveFormatting:!0,value:i,onChange:V=>c({label:V})}):(0,vt.jsx)(gi,{render:(0,vt.jsx)("label",{htmlFor:m}),children:i||g?.name}),(0,vt.jsxs)("select",{id:m,children:[(0,vt.jsx)("option",{children:(0,Tr.sprintf)((0,Tr.__)("Select %s"),g?.labels?.singular_name)}),$.map(V=>L(V,0))]})]})},L=(W,$)=>{let{id:V,count:Q,name:Y}=W,ee=C(V);return[(0,vt.jsxs)("option",{className:`level-${$}`,children:[Array.from({length:$*3}).map(()=>"\xA0"),B(Y),r&&` (${Q})`]},V),v&&t&&!!ee.length&&ee.map(te=>L(te,$+1))]},A=_?.length&&!e&&!k?"ul":"div",z=S(u,`wp-block-categories-taxonomy-${s}`,{"wp-block-categories-list":!!_?.length&&!e&&!k,"wp-block-categories-dropdown":!!_?.length&&e&&!k}),j=(0,jh.useBlockProps)({className:z}),G=Z();return(0,vt.jsxs)(A,{...j,children:[(0,vt.jsx)(jh.InspectorControls,{children:(0,vt.jsxs)(Pr.__experimentalToolsPanel,{label:(0,Tr.__)("Settings"),resetAll:()=>{c({taxonomy:"category",displayAsDropdown:!1,showHierarchy:!1,showPostCounts:!1,showOnlyTopLevel:!1,showEmpty:!1,showLabel:!0})},dropdownMenuProps:G,children:[Array.isArray(h)&&(0,vt.jsx)(Pr.__experimentalToolsPanelItem,{hasValue:()=>s!=="category",label:(0,Tr.__)("Taxonomy"),onDeselect:()=>{c({taxonomy:"category"})},isShownByDefault:!0,children:(0,vt.jsx)(Pr.SelectControl,{label:(0,Tr.__)("Taxonomy"),options:h.map(W=>({label:W.name,value:W.slug})),value:s,onChange:W=>c({taxonomy:W})})}),(0,vt.jsx)(Pr.__experimentalToolsPanelItem,{hasValue:()=>!!e,label:(0,Tr.__)("Display as dropdown"),onDeselect:()=>c({displayAsDropdown:!1}),isShownByDefault:!0,children:(0,vt.jsx)(Pr.ToggleControl,{label:(0,Tr.__)("Display as dropdown"),checked:e,onChange:P("displayAsDropdown")})}),e&&(0,vt.jsx)(Pr.__experimentalToolsPanelItem,{hasValue:()=>!l,label:(0,Tr.__)("Show label"),onDeselect:()=>c({showLabel:!0}),isShownByDefault:!0,children:(0,vt.jsx)(Pr.ToggleControl,{className:"wp-block-categories__indentation",label:(0,Tr.__)("Show label"),checked:l,onChange:P("showLabel")})}),(0,vt.jsx)(Pr.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,Tr.__)("Show post counts"),onDeselect:()=>c({showPostCounts:!1}),isShownByDefault:!0,children:(0,vt.jsx)(Pr.ToggleControl,{label:(0,Tr.__)("Show post counts"),checked:r,onChange:P("showPostCounts")})}),v&&(0,vt.jsx)(Pr.__experimentalToolsPanelItem,{hasValue:()=>!!o,label:(0,Tr.__)("Show only top level terms"),onDeselect:()=>c({showOnlyTopLevel:!1}),isShownByDefault:!0,children:(0,vt.jsx)(Pr.ToggleControl,{label:(0,Tr.__)("Show only top level terms"),checked:o,onChange:P("showOnlyTopLevel")})}),(0,vt.jsx)(Pr.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,Tr.__)("Show empty terms"),onDeselect:()=>c({showEmpty:!1}),isShownByDefault:!0,children:(0,vt.jsx)(Pr.ToggleControl,{label:(0,Tr.__)("Show empty terms"),checked:a,onChange:P("showEmpty")})}),v&&!o&&(0,vt.jsx)(Pr.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,Tr.__)("Show hierarchy"),onDeselect:()=>c({showHierarchy:!1}),isShownByDefault:!0,children:(0,vt.jsx)(Pr.ToggleControl,{label:(0,Tr.__)("Show hierarchy"),checked:t,onChange:P("showHierarchy")})})]})}),k&&(0,vt.jsx)(Pr.Placeholder,{icon:vv,label:(0,Tr.__)("Terms"),children:(0,vt.jsx)(Pr.Spinner,{})}),!k&&_?.length===0&&(0,vt.jsx)("p",{children:g.labels.no_terms}),!k&&_?.length>0&&(e?T():I())]})}var uw=n(N(),1);var Oxe=[{name:"terms",title:(0,uw.__)("Terms List"),icon:up,attributes:{taxonomy:"post_tag"},isActive:e=>e.taxonomy!=="category"},{name:"categories",title:(0,uw.__)("Categories List"),description:(0,uw.__)("Display a list of all categories."),icon:up,attributes:{taxonomy:"category"},isActive:["taxonomy"],isDefault:!0}],VW=Oxe;var{name:OW}=cw,FW={icon:up,example:{},edit:OD,variations:VW},Fxe=()=>R({name:OW,metadata:cw,settings:FW});var jD={};K(jD,{init:()=>Wxe,metadata:()=>fw,name:()=>xb,settings:()=>e$});var mu=n(E(),1),KW=n(F(),1),du=n(O(),1),Gh=n(H(),1),_b=n(N(),1);var HW=n(N(),1),jW=n(O(),1),pw=n(F(),1),mw=n(q(),1),HD=n(E(),1),UW=n(y(),1),Hxe=({clientId:e})=>{let{replaceBlocks:t}=(0,pw.useDispatch)(HD.store),r=(0,pw.useSelect)(o=>o(HD.store).getBlock(e),[e]);return(0,UW.jsx)(jW.ToolbarButton,{onClick:()=>t(r.clientId,(0,mw.rawHandler)({HTML:(0,mw.serialize)(r)})),children:(0,HW.__)("Convert to blocks")})},GW=Hxe;var WW=n(E(),1),Jl=n(O(),1),dw=n(H(),1),Uh=n(N(),1),$W=n(F(),1);var qW=n(ve(),1),pl=n(y(),1);function jxe({onClick:e,isModalFullScreen:t}){return(0,qW.useViewportMatch)("small","<")?null:(0,pl.jsx)(Jl.Button,{size:"compact",onClick:e,icon:Jm,isPressed:t,label:t?(0,Uh.__)("Exit fullscreen"):(0,Uh.__)("Enter fullscreen")})}function Uxe(e){let t=(0,$W.useSelect)(r=>r(WW.store).getSettings().styles);return(0,dw.useEffect)(()=>{let{baseURL:r,suffix:o,settings:a}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:r,suffix:o}),window.wp.oldEditor.initialize(e.id,{tinymce:{...a,setup(i){i.on("init",()=>{let l=i.getDoc();t.forEach(({css:s})=>{let c=l.createElement("style");c.innerHTML=s,l.head.appendChild(c)})})}}}),()=>{window.wp.oldEditor.remove(e.id)}},[]),(0,pl.jsx)("textarea",{...e})}function ZW({clientId:e,content:t,onClose:r,onChange:o}){let[a,i]=(0,dw.useState)(!1),l=`editor-${e}`;return(0,pl.jsxs)(Jl.Modal,{title:(0,Uh.__)("Classic Editor"),onRequestClose:r,shouldCloseOnClickOutside:!1,overlayClassName:"block-editor-freeform-modal",isFullScreen:a,className:"block-editor-freeform-modal__content",headerActions:(0,pl.jsx)(jxe,{onClick:()=>i(!a),isModalFullScreen:a}),children:[(0,pl.jsx)(Uxe,{id:l,defaultValue:t}),(0,pl.jsxs)(Jl.Flex,{className:"block-editor-freeform-modal__actions",justify:"flex-end",expanded:!1,children:[(0,pl.jsx)(Jl.FlexItem,{children:(0,pl.jsx)(Jl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,Uh.__)("Cancel")})}),(0,pl.jsx)(Jl.FlexItem,{children:(0,pl.jsx)(Jl.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{o(window.wp.oldEditor.getContent(l)),r()},children:(0,Uh.__)("Save")})})]})]})}var rn=n(y(),1);function YW({attributes:e,setAttributes:t,clientId:r}){let{content:o}=e,[a,i]=(0,Gh.useState)(!1),l=(0,Gh.useRef)(null),s=(0,KW.useSelect)(c=>c(mu.store).canRemoveBlock(r),[r]);return(0,rn.jsxs)(rn.Fragment,{children:[s&&(0,rn.jsx)(mu.BlockControls,{children:(0,rn.jsx)(du.ToolbarGroup,{children:(0,rn.jsx)(GW,{clientId:r})})}),(0,rn.jsx)(mu.BlockControls,{children:(0,rn.jsx)(du.ToolbarGroup,{children:(0,rn.jsx)(du.ToolbarButton,{ref:l,onClick:()=>i(!0),children:(0,_b.__)("Edit")})})}),(0,rn.jsxs)("div",{...(0,mu.useBlockProps)(),children:[o?(0,rn.jsx)(Gh.RawHTML,{children:o}):(0,rn.jsx)(du.Placeholder,{icon:(0,rn.jsx)(mu.BlockIcon,{icon:Z1}),label:(0,_b.__)("Classic"),instructions:(0,_b.__)("Use the classic editor to add content."),children:(0,rn.jsx)(du.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>i(!0),children:(0,_b.__)("Edit contents")})}),a&&(0,rn.jsx)(ZW,{clientId:r,content:o,onClose:()=>{i(!1),l.current&&l.current.focus()},onChange:c=>t({content:c})})]})]})}var fw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,lock:!1,reusable:!1,renaming:!1,visibility:!1,customCSS:!1},editorStyle:"wp-block-freeform-editor"};var QW=n(H(),1),XW=n(y(),1);function JW({attributes:e}){let{content:t}=e;return(0,XW.jsx)(QW.RawHTML,{children:t})}var{name:xb}=fw,e$={icon:Z1,edit:YW,save:JW},Wxe=()=>R({name:xb,metadata:fw,settings:e$});var qD={};K(qD,{init:()=>Xxe,metadata:()=>vw,name:()=>l$,settings:()=>_w});var $D=n(N(),1);var i$=n(q(),1);var UD=n(N(),1),hw=n(E(),1),gw=n(q(),1),GD=n(y(),1);function t$({attributes:e,setAttributes:t,onRemove:r,insertBlocksAfter:o,mergeBlocks:a}){let i=(0,hw.useBlockProps)();return(0,GD.jsx)("pre",{...i,children:(0,GD.jsx)(hw.RichText,{tagName:"code",identifier:"content",value:e.content,onChange:l=>t({content:l}),onRemove:r,onMerge:a,placeholder:(0,UD.__)("Write code\u2026"),"aria-label":(0,UD.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:o?()=>o((0,gw.createBlock)((0,gw.getDefaultBlockName)())):void 0,style:{whiteSpace:"break-spaces"}})})}var vw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"code",__unstablePreserveWhiteSpace:!0,role:"content"}},supports:{align:["wide"],anchor:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-code"};var bw=n(E(),1);var r$=n(ve(),1);function o$(e){return(0,r$.pipe)(qxe,Zxe)(e||"")}function qxe(e){return e.replace(/\[/g,"[")}function Zxe(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}var WD=n(y(),1);function n$({attributes:e}){return(0,WD.jsx)("pre",{...bw.useBlockProps.save(),children:(0,WD.jsx)(bw.RichText.Content,{tagName:"code",value:o$(typeof e.content=="string"?e.content:e.content.toHTMLString({preserveWhiteSpace:!0}))})})}var wd=n(q(),1),yw=n(Xl(),1);var Kxe={from:[{type:"input",regExp:/^```$/,transform:()=>(0,wd.createBlock)("core/code")},{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,wd.createBlock)("core/code",{...e,...pu(e,"core/code"),content:t})}},{type:"block",blocks:["core/html"],__experimentalConvert(e){let{attributes:t}=e;return(0,wd.createBlock)("core/code",{...t,...pu(t,"core/code"),content:(0,yw.toHTMLString)({value:(0,yw.create)({text:(0,wd.getBlockContent)(e)})})})}},{type:"raw",isMatch:e=>e.nodeName==="PRE"&&e.children.length===1&&e.firstChild.nodeName==="CODE",schema:{pre:{children:{code:{children:{"#text":{}}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,wd.createBlock)("core/paragraph",{...pu(e,"core/paragraph"),content:t})}}]},a$=Kxe;var{fieldsKey:Yxe,formKey:Qxe}=U(i$.privateApis),{name:l$}=vw,_w={icon:K1,example:{attributes:{content:(0,$D.__)(`// A \u201Cblock\u201D is the abstract term used
// to describe units of markup that
// when composed together, form the
// content or layout of a page.
registerBlockType( name, settings );`)}},merge(e,t){return{content:e.content+`
`+t.content}},transforms:a$,edit:t$,save:n$};window.__experimentalContentOnlyInspectorFields&&(_w[Yxe]=[{id:"content",label:(0,$D.__)("Code"),type:"text",Edit:"rich-text"}],_w[Qxe]={fields:["content"]});var Xxe=()=>R({name:l$,metadata:vw,settings:_w});var KD={};K(KD,{init:()=>oke,metadata:()=>kw,name:()=>d$,settings:()=>f$});var s$=n(E(),1),ZD=n(y(),1),Jxe=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible({width:e}){return isFinite(e)},migrate(e){return{...e,width:`${e.width}%`}},save({attributes:e}){let{verticalAlignment:t,width:r}=e,o=S({[`is-vertically-aligned-${t}`]:t}),a={flexBasis:r+"%"};return(0,ZD.jsx)("div",{className:o,style:a,children:(0,ZD.jsx)(s$.InnerBlocks.Content,{})})}}],c$=Jxe;var on=n(E(),1),Tp=n(O(),1),xw=n(F(),1),Cd=n(N(),1);var bi=n(y(),1);function eke({width:e,setAttributes:t}){let[r]=(0,on.useSettings)("spacing.units"),o=(0,Tp.__experimentalUseCustomUnits)({availableUnits:r||["%","px","em","rem","vw"]}),a=Z();return(0,bi.jsx)(Tp.__experimentalToolsPanel,{label:(0,Cd.__)("Settings"),resetAll:()=>{t({width:void 0})},dropdownMenuProps:a,children:(0,bi.jsx)(Tp.__experimentalToolsPanelItem,{hasValue:()=>e!==void 0,label:(0,Cd.__)("Width"),onDeselect:()=>t({width:void 0}),isShownByDefault:!0,children:(0,bi.jsx)(Tp.__experimentalUnitControl,{label:(0,Cd.__)("Width"),__unstableInputWidth:"calc(50% - 8px)",value:e||"",onChange:i=>{i=0>parseFloat(i)?"0":i,t({width:i})},units:o})})})}function tke({attributes:{verticalAlignment:e,width:t,templateLock:r,allowedBlocks:o},setAttributes:a,clientId:i}){let l=S("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),{columnsIds:s,hasChildBlocks:c,rootClientId:u}=(0,xw.useSelect)(_=>{let{getBlockOrder:k,getBlockRootClientId:x}=_(on.store),w=x(i);return{hasChildBlocks:k(i).length>0,rootClientId:w,columnsIds:k(w)}},[i]),{updateBlockAttributes:p}=(0,xw.useDispatch)(on.store),m=_=>{a({verticalAlignment:_}),p(u,{verticalAlignment:null})},d=Number.isFinite(t)?t+"%":t,f=(0,on.useBlockProps)({className:l,style:d?{flexBasis:d}:void 0}),h=s.length,g=s.indexOf(i)+1,v=(0,Cd.sprintf)((0,Cd.__)("%1$s (%2$d of %3$d)"),f["aria-label"],g,h),b=(0,on.useInnerBlocksProps)({...f,"aria-label":v},{templateLock:r,allowedBlocks:o,renderAppender:c?void 0:on.InnerBlocks.ButtonBlockAppender});return(0,bi.jsxs)(bi.Fragment,{children:[(0,bi.jsx)(on.BlockControls,{children:(0,bi.jsx)(on.BlockVerticalAlignmentToolbar,{onChange:m,value:e,controls:["top","center","bottom","stretch"]})}),(0,bi.jsx)(on.InspectorControls,{children:(0,bi.jsx)(eke,{width:t,setAttributes:a})}),(0,bi.jsx)("div",{...b})]})}var u$=tke;var kw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/column",title:"Column",category:"design",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{__experimentalOnEnter:!0,anchor:!0,reusable:!1,html:!1,color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},shadow:!0,spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0,interactivity:{clientNavigation:!0},allowedBlocks:!0}};var ww=n(E(),1),p$=n(y(),1);function m$({attributes:e}){let{verticalAlignment:t,width:r}=e,o=S({[`is-vertically-aligned-${t}`]:t}),a;if(r&&/\d/.test(r)){let s=Number.isFinite(r)?r+"%":r;!Number.isFinite(r)&&r?.endsWith("%")&&(s=Math.round(Number.parseFloat(r)*1e12)/1e12+"%"),a={flexBasis:s}}let i=ww.useBlockProps.save({className:o,style:a}),l=ww.useInnerBlocksProps.save(i);return(0,p$.jsx)("div",{...l})}var{name:d$}=kw,f$={icon:PP,edit:u$,save:m$,deprecated:c$},oke=()=>R({name:d$,metadata:kw,settings:f$});var XD={};K(XD,{init:()=>bke,metadata:()=>Tw,name:()=>C$,settings:()=>S$});var kb=n(N(),1);var h$=n(q(),1),Td=n(E(),1),Sd=n(y(),1);function Cw(e){let{doc:t}=Cw;t||(t=document.implementation.createHTMLDocument(""),Cw.doc=t);let r;t.body.innerHTML=e;for(let o of t.body.firstChild.classList)if(r=o.match(/^layout-column-(\d+)$/))return Number(r[1])-1}var nke=e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;let t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);let{customTextColor:r,customBackgroundColor:o,...a}=e;return{...a,style:t,isStackedOnMobile:!0}},g$=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:nke,save({attributes:e}){let{verticalAlignment:t,backgroundColor:r,customBackgroundColor:o,textColor:a,customTextColor:i}=e,l=(0,Td.getColorClassName)("background-color",r),s=(0,Td.getColorClassName)("color",a),c=S({"has-background":r||o,"has-text-color":a||i,[l]:l,[s]:s,[`are-vertically-aligned-${t}`]:t});return(0,Sd.jsx)("div",{className:c||void 0,style:{backgroundColor:l?void 0:o,color:s?void 0:i},children:(0,Sd.jsx)(Td.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},isEligible(e,t){return t.some(o=>/layout-column-\d+/.test(o.originalContent))?t.some(o=>Cw(o.originalContent)!==void 0):!1},migrate(e,t){let o=t.reduce((l,s)=>{let{originalContent:c}=s,u=Cw(c);return u===void 0&&(u=0),l[u]||(l[u]=[]),l[u].push(s),l},[]).map(l=>(0,h$.createBlock)("core/column",{},l)),{columns:a,...i}=e;return[{...i,isStackedOnMobile:!0},o]},save({attributes:e}){let{columns:t}=e;return(0,Sd.jsx)("div",{className:`has-${t}-columns`,children:(0,Sd.jsx)(Td.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){let{columns:r,...o}=e;return e={...o,isStackedOnMobile:!0},[e,t]},save({attributes:e}){let{verticalAlignment:t,columns:r}=e,o=S(`has-${r}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,Sd.jsx)("div",{className:o,children:(0,Sd.jsx)(Td.InnerBlocks.Content,{})})}}];var Pd=n(N(),1),dl=n(O(),1),Zr=n(E(),1),ml=n(F(),1),Ed=n(q(),1);var Sw=e=>{let t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function v$(e,t){let{width:r=100/t}=e.attributes;return Sw(r)}function ake(e,t=e.length){return e.reduce((r,o)=>r+v$(o,t),0)}function ike(e,t=e.length){return e.reduce((r,o)=>{let a=v$(o,t);return Object.assign(r,{[o.clientId]:a})},{})}function YD(e,t,r=e.length){let o=ake(e,r);return Object.fromEntries(Object.entries(ike(e,r)).map(([a,i])=>{let l=t*i/o;return[a,Sw(l)]}))}function b$(e){return e.every(t=>{let r=t.attributes.width;return Number.isFinite(r?.endsWith?.("%")?parseFloat(r):r)})}function QD(e,t){return e.map(r=>({...r,attributes:{...r.attributes,width:`${t[r.clientId]}%`}}))}var ko=n(y(),1),lke={name:"core/column"};function ske({clientId:e,setAttributes:t,isStackedOnMobile:r}){let{count:o,canInsertColumnBlock:a,minCount:i}=(0,ml.useSelect)(p=>{let{canInsertBlockType:m,canRemoveBlock:d,getBlockOrder:f}=p(Zr.store),h=f(e),g=h.reduce((v,b,_)=>(d(b)||v.push(_),v),[]);return{count:h.length,canInsertColumnBlock:m("core/column",e),minCount:Math.max(...g)+1}},[e]),{getBlocks:l}=(0,ml.useSelect)(Zr.store),{replaceInnerBlocks:s}=(0,ml.useDispatch)(Zr.store);function c(p,m){let d=l(e),f=b$(d),h=m>p;if(h&&f){let g=Sw(100/m),v=m-p,b=YD(d,100-g*v);d=[...QD(d,b),...Array.from({length:v}).map(()=>(0,Ed.createBlock)("core/column",{width:`${g}%`}))]}else if(h)d=[...d,...Array.from({length:m-p}).map(()=>(0,Ed.createBlock)("core/column"))];else if(m{t({isStackedOnMobile:!0})},dropdownMenuProps:u,children:[a&&(0,ko.jsxs)(dl.__experimentalVStack,{spacing:4,style:{gridColumn:"1 / -1"},children:[(0,ko.jsx)(dl.RangeControl,{label:(0,Pd.__)("Columns"),value:o,onChange:p=>c(o,Math.max(i,p)),min:Math.max(1,i),max:Math.max(6,o)}),o>6&&(0,ko.jsx)(dl.Notice,{status:"warning",isDismissible:!1,children:(0,Pd.__)("This column count exceeds the recommended amount and may cause visual breakage.")})]}),(0,ko.jsx)(dl.__experimentalToolsPanelItem,{label:(0,Pd.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>r!==!0,onDeselect:()=>t({isStackedOnMobile:!0}),children:(0,ko.jsx)(dl.ToggleControl,{label:(0,Pd.__)("Stack on mobile"),checked:r,onChange:()=>t({isStackedOnMobile:!r})})})]})}function cke({attributes:e,setAttributes:t,clientId:r}){let{isStackedOnMobile:o,verticalAlignment:a,templateLock:i}=e,l=(0,ml.useRegistry)(),{getBlockOrder:s}=(0,ml.useSelect)(Zr.store),{updateBlockAttributes:c}=(0,ml.useDispatch)(Zr.store),u=S({[`are-vertically-aligned-${a}`]:a,"is-not-stacked-on-mobile":!o}),p=(0,Zr.useBlockProps)({className:u}),m=(0,Zr.useInnerBlocksProps)(p,{defaultBlock:lke,directInsert:!0,orientation:"horizontal",renderAppender:!1,templateLock:i});function d(f){let h=s(r);l.batch(()=>{t({verticalAlignment:f}),c(h,{verticalAlignment:f})})}return(0,ko.jsxs)(ko.Fragment,{children:[(0,ko.jsx)(Zr.BlockControls,{children:(0,ko.jsx)(Zr.BlockVerticalAlignmentToolbar,{onChange:d,value:a})}),(0,ko.jsx)(Zr.InspectorControls,{children:(0,ko.jsx)(ske,{clientId:r,setAttributes:t,isStackedOnMobile:o})}),(0,ko.jsx)("div",{...m})]})}function uke({clientId:e,name:t,setAttributes:r}){let{blockType:o,variations:a}=(0,ml.useSelect)(s=>{let{getBlockVariations:c,getBlockType:u}=s(Ed.store);return{blockType:u(t),variations:c(t,"block")}},[t]),{replaceInnerBlocks:i}=(0,ml.useDispatch)(Zr.store),l=(0,Zr.useBlockProps)();return(0,ko.jsx)("div",{...l,children:(0,ko.jsx)(Zr.__experimentalBlockVariationPicker,{icon:o?.icon?.src,label:o?.title,variations:a,instructions:(0,Pd.__)("Divide into columns. Select a layout:"),onSelect:s=>{s.attributes&&r(s.attributes),s.innerBlocks&&i(e,(0,Ed.createBlocksFromInnerBlocksTemplate)(s.innerBlocks),!0)}})})}var pke=e=>{let{clientId:t}=e,o=(0,ml.useSelect)(a=>a(Zr.store).getBlocks(t).length>0,[t])?cke:uke;return(0,ko.jsx)(o,{...e})},y$=pke;var Tw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/columns",title:"Columns",category:"design",allowedBlocks:["core/column"],description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,heading:!0,button:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex",flexWrap:"nowrap"}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},shadow:!0},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"};var Pw=n(E(),1),_$=n(y(),1);function x$({attributes:e}){let{isStackedOnMobile:t,verticalAlignment:r}=e,o=S({[`are-vertically-aligned-${r}`]:r,"is-not-stacked-on-mobile":!t}),a=Pw.useBlockProps.save({className:o}),i=Pw.useInnerBlocksProps.save(a);return(0,_$.jsx)("div",{...i})}var Ha=n(O(),1),yi=n(N(),1),_i=n(y(),1),dke=[{name:"one-column-full",title:(0,yi.__)("100"),description:(0,yi.__)("One column"),icon:(0,_i.jsx)(Ha.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,_i.jsx)(Ha.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:(0,yi.__)("50 / 50"),description:(0,yi.__)("Two columns; equal split"),icon:(0,_i.jsx)(Ha.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,_i.jsx)(Ha.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:(0,yi.__)("33 / 66"),description:(0,yi.__)("Two columns; one-third, two-thirds split"),icon:(0,_i.jsx)(Ha.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,_i.jsx)(Ha.Path,{d:"M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:(0,yi.__)("66 / 33"),description:(0,yi.__)("Two columns; two-thirds, one-third split"),icon:(0,_i.jsx)(Ha.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,_i.jsx)(Ha.Path,{d:"M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:(0,yi.__)("33 / 33 / 33"),description:(0,yi.__)("Three columns; equal split"),icon:(0,_i.jsx)(Ha.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,_i.jsx)(Ha.Path,{d:"M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:(0,yi.__)("25 / 50 / 25"),description:(0,yi.__)("Three columns; wide center column"),icon:(0,_i.jsx)(Ha.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,_i.jsx)(Ha.Path,{d:"M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}],k$=dke;var Js=n(q(),1),fke=6,hke=(e,t)=>{let r=+(100/t).toFixed(2),o=Array.from({length:t},(a,i)=>["core/column",{width:`${r}%`},e.filter((l,s)=>s%t===i)]);return(0,Js.createBlocksFromInnerBlocksTemplate)(o)},gke=e=>e.flatMap(t=>{let r=t.innerBlocks||[];return r.length>1?[(0,Js.createBlock)("core/group",{layout:{type:"constrained"}},r)]:r}),vke={from:[{type:"block",blocks:["core/group"],priority:1,transform:(e,t)=>{let{layout:r,...o}=e,{columnCount:a}=r;return(0,Js.createBlock)("core/columns",o,hke(t,a))},isMatch:({layout:e})=>e?.type==="grid"&&Number.isInteger(e?.columnCount)&&e.columnCount>0},{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{let t=+(100/e.length).toFixed(2),r=e.map(({name:o,attributes:a,innerBlocks:i,innerContent:l})=>["core/column",{width:`${t}%`},[[o,{...a},i,l]]]);return(0,Js.createBlock)("core/columns",{},(0,Js.createBlocksFromInnerBlocksTemplate)(r))},isMatch:({length:e},t)=>t.length===1&&t[0].name==="core/columns"?!1:e&&e<=fke},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{let{align:r,backgroundColor:o,textColor:a,style:i,mediaAlt:l,mediaId:s,mediaPosition:c,mediaSizeSlug:u,mediaType:p,mediaUrl:m,mediaWidth:d,verticalAlignment:f}=e,h;if(p==="image"||!p){let v={id:s,alt:l,url:m,sizeSlug:u},b={href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel};h=["core/image",{...v,...b}]}else h=["core/video",{id:s,src:m}];let g=[["core/column",{width:`${d}%`},[h]],["core/column",{width:`${100-d}%`},t]];return c==="right"&&g.reverse(),(0,Js.createBlock)("core/columns",{align:r,backgroundColor:o,textColor:a,style:i,verticalAlignment:f},(0,Js.createBlocksFromInnerBlocksTemplate)(g))}}],to:[{type:"block",blocks:["core/group"],variationName:"group-grid",transform:(e,t)=>{let r=t.length;return(0,Js.createBlock)("core/group",{...e,isStackedOnMobile:void 0,verticalAlignment:void 0,layout:{type:"grid",...r&&{columnCount:r}}},gke(t))}}],ungroup:(e,t)=>t.flatMap(r=>r.innerBlocks)},w$=vke;var{name:C$}=Tw,S$={icon:BP,variations:k$,example:{viewportWidth:782,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,kb.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,kb.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,kb.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,kb.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:g$,edit:y$,save:x$,transforms:w$},bke=()=>R({name:C$,metadata:Tw,settings:S$});var rL={};K(rL,{init:()=>Cke,metadata:()=>Ew,name:()=>U$,settings:()=>G$});var Ew={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments",title:"Comments",category:"theme",description:"An advanced block that allows displaying post comments using different visual configurations.",textdomain:"default",attributes:{tagName:{type:"string",default:"div"},legacy:{type:"boolean",default:!1}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,heading:!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}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-comments-editor",usesContext:["postId","postType"]};var Bw=n(E(),1),JD=n(y(),1),_ke={attributes:{tagName:{type:"string",default:"div"}},apiVersion:3,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save({attributes:{tagName:e}}){let t=Bw.useBlockProps.save(),{className:r}=t,a=(r?.split(" ")||[])?.filter(l=>l!=="wp-block-comments"),i={...t,className:a.join(" ")};return(0,JD.jsx)(e,{...i,children:(0,JD.jsx)(Bw.InnerBlocks.Content,{})})}},T$=[_ke];var Lw=n(E(),1);var P$=n(N(),1),wb=n(E(),1);var Nw=n(y(),1),{HTMLElementControl:xke}=U(wb.privateApis);function E$({attributes:{tagName:e},setAttributes:t}){return(0,Nw.jsx)(wb.InspectorControls,{children:(0,Nw.jsx)(wb.InspectorControls,{group:"advanced",children:(0,Nw.jsx)(xke,{tagName:e,onChange:r=>t({tagName:r}),options:[{label:(0,P$.__)("Default (
)"),value:"div"},{label:"
",value:"section"},{label:"",value:"aside"}]})})})}var Ep=n(E(),1),tL=n(N(),1),z$=n(O(),1);var D$=n(E(),1),ao=n(N(),1),L$=n(F(),1),R$=n(re(),1),A$=n(H(),1);var fl=n(N(),1),Pp=n(E(),1),B$=n(O(),1),N$=n(ve(),1),Iw=n(re(),1),eL=n(F(),1),ca=n(y(),1),I$=()=>{let e=(0,N$.useInstanceId)(I$);return(0,ca.jsxs)("div",{className:"comment-respond",children:[(0,ca.jsx)("h3",{className:"comment-reply-title",children:(0,fl.__)("Leave a Reply")}),(0,ca.jsxs)("form",{noValidate:!0,className:"comment-form",onSubmit:t=>t.preventDefault(),children:[(0,ca.jsxs)("p",{children:[(0,ca.jsx)("label",{htmlFor:`comment-${e}`,children:(0,fl.__)("Comment")}),(0,ca.jsx)("textarea",{id:`comment-${e}`,name:"comment",cols:"45",rows:"8",readOnly:!0})]}),(0,ca.jsx)("p",{className:"form-submit wp-block-button",children:(0,ca.jsx)("input",{name:"submit",type:"submit",className:S("wp-block-button__link",(0,Pp.__experimentalGetElementClassName)("button")),label:(0,fl.__)("Post Comment"),value:(0,fl.__)("Post Comment"),"aria-disabled":"true"})})]})]})},kke=({postId:e,postType:t})=>{let[r,o]=(0,Iw.useEntityProp)("postType",t,"comment_status",e),a=t===void 0||e===void 0,i=(0,eL.useSelect)(s=>s(Pp.store).getSettings().__experimentalDiscussionSettings?.defaultCommentStatus,[]),l=(0,eL.useSelect)(s=>t?!!s(Iw.store).getPostType(t)?.supports.comments:!1);if(!a&&r!=="open")if(r==="closed"){let s=[(0,ca.jsx)(B$.Button,{__next40pxDefaultSize:!0,onClick:()=>o("open"),variant:"primary",children:(0,fl._x)("Enable comments","action that affects the current post")},"enableComments")];return(0,ca.jsx)(Pp.Warning,{actions:s,children:(0,fl.__)("Post Comments Form block: Comments are not enabled for this item.")})}else if(l){if(i!=="open")return(0,ca.jsx)(Pp.Warning,{children:(0,fl.__)("Post Comments Form block: Comments are not enabled.")})}else return(0,ca.jsx)(Pp.Warning,{children:(0,fl.sprintf)((0,fl.__)("Post Comments Form block: Comments are not enabled for this post type (%s)."),t)});return(0,ca.jsx)(I$,{})},Dw=kke;var lt=n(y(),1);function M$({postType:e,postId:t}){let[r]=(0,R$.useEntityProp)("postType",e,"title",t);r=r||(0,ao.__)("Post Title");let o=(0,L$.useSelect)(a=>a(D$.store).getSettings().__experimentalDiscussionSettings?.avatarURL,[]);return(0,lt.jsxs)("div",{className:"wp-block-comments__legacy-placeholder",inert:"true",children:[(0,lt.jsx)("h3",{children:(0,ao.sprintf)((0,ao.__)("One response to %s"),r)}),(0,lt.jsxs)("div",{className:"navigation",children:[(0,lt.jsx)("div",{className:"alignleft",children:(0,lt.jsxs)("a",{href:"#top",children:["\xAB ",(0,ao.__)("Older Comments")]})}),(0,lt.jsx)("div",{className:"alignright",children:(0,lt.jsxs)("a",{href:"#top",children:[(0,ao.__)("Newer Comments")," \xBB"]})})]}),(0,lt.jsx)("ol",{className:"commentlist",children:(0,lt.jsx)("li",{className:"comment even thread-even depth-1",children:(0,lt.jsxs)("article",{className:"comment-body",children:[(0,lt.jsxs)("footer",{className:"comment-meta",children:[(0,lt.jsxs)("div",{className:"comment-author vcard",children:[(0,lt.jsx)("img",{alt:(0,ao.__)("Commenter Avatar"),src:o,className:"avatar avatar-32 photo",height:"32",width:"32",loading:"lazy"}),(0,lt.jsx)("b",{className:"fn",children:(0,lt.jsx)("a",{href:"#top",className:"url",children:(0,ao.__)("A WordPress Commenter")})})," ",(0,lt.jsxs)("span",{className:"says",children:[(0,ao.__)("says"),":"]})]}),(0,lt.jsxs)("div",{className:"comment-metadata",children:[(0,lt.jsx)("a",{href:"#top",children:(0,lt.jsx)("time",{dateTime:"2000-01-01T00:00:00+00:00",children:(0,ao.__)("January 1, 2000 at 00:00 am")})})," ",(0,lt.jsx)("span",{className:"edit-link",children:(0,lt.jsx)("a",{className:"comment-edit-link",href:"#top",children:(0,ao.__)("Edit")})})]})]}),(0,lt.jsx)("div",{className:"comment-content",children:(0,lt.jsxs)("p",{children:[(0,ao.__)("Hi, this is a comment."),(0,lt.jsx)("br",{}),(0,ao.__)("To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."),(0,lt.jsx)("br",{}),(0,A$.createInterpolateElement)((0,ao.__)("Commenter avatars come from Gravatar ."),{a:(0,lt.jsx)("a",{href:"https://gravatar.com/"})})]})}),(0,lt.jsx)("div",{className:"reply",children:(0,lt.jsx)("a",{className:"comment-reply-link",href:"#top","aria-label":(0,ao.__)("Reply to A WordPress Commenter"),children:(0,ao._x)("Reply","verb")})})]})})}),(0,lt.jsxs)("div",{className:"navigation",children:[(0,lt.jsx)("div",{className:"alignleft",children:(0,lt.jsxs)("a",{href:"#top",children:["\xAB ",(0,ao.__)("Older Comments")]})}),(0,lt.jsx)("div",{className:"alignright",children:(0,lt.jsxs)("a",{href:"#top",children:[(0,ao.__)("Newer Comments")," \xBB"]})})]}),(0,lt.jsx)(Dw,{postId:t,postType:e})]})}var es=n(y(),1);function V$({attributes:e,setAttributes:t,context:{postType:r,postId:o}}){let{textAlign:a}=e,i=[(0,es.jsx)(z$.Button,{__next40pxDefaultSize:!0,onClick:()=>{t({legacy:!1})},variant:"primary",children:(0,tL.__)("Switch to editable mode")},"convert")],l=(0,Ep.useBlockProps)({className:S({[`has-text-align-${a}`]:a})});return(0,es.jsxs)(es.Fragment,{children:[(0,es.jsx)(Ep.BlockControls,{group:"block",children:(0,es.jsx)(Ep.AlignmentControl,{value:a,onChange:s=>{t({textAlign:s})}})}),(0,es.jsxs)("div",{...l,children:[(0,es.jsx)(Ep.Warning,{actions:i,children:(0,tL.__)("Comments block: You\u2019re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode.")}),(0,es.jsx)(M$,{postId:o,postType:r})]})]})}var wke=[["core/comments-title"],["core/comment-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/comment-author-name",{fontSize:"small"}],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["core/comment-date",{fontSize:"small"}],["core/comment-edit-link",{fontSize:"small"}]]],["core/comment-content"],["core/comment-reply-link",{fontSize:"small"}]]]]]]],["core/comments-pagination"],["core/post-comments-form"]],O$=wke;var Bp=n(y(),1);function F$(e){let{attributes:t,setAttributes:r,clientId:o}=e,{tagName:a,legacy:i}=t,l=(0,Lw.useBlockProps)(),s=(0,Lw.useInnerBlocksProps)(l,{template:O$});return i?(0,Bp.jsx)(V$,{...e}):(0,Bp.jsxs)(Bp.Fragment,{children:[(0,Bp.jsx)(E$,{attributes:t,setAttributes:r,clientId:o}),(0,Bp.jsx)(a,{...s})]})}var Rw=n(E(),1),H$=n(y(),1);function j$({attributes:{tagName:e,legacy:t}}){let r=Rw.useBlockProps.save(),o=Rw.useInnerBlocksProps.save(r);return t?null:(0,H$.jsx)(e,{...o})}var{name:U$}=Ew,G$={icon:zB,example:{},edit:F$,save:j$,deprecated:T$},Cke=()=>R({name:U$,metadata:Ew,settings:G$});var nL={};K(nL,{init:()=>Tke,metadata:()=>Aw,name:()=>q$,settings:()=>Z$});var Aw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/comment-author-avatar",title:"Comment Author Avatar (deprecated)",category:"theme",ancestor:["core/comment-template"],description:"This block is deprecated. Please use the Avatar block instead.",textdomain:"default",attributes:{width:{type:"number",default:96},height:{type:"number",default:96}},usesContext:["commentId"],supports:{html:!1,inserter:!1,__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},color:{background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{__experimentalSkipSerialization:!0,margin:!0,padding:!0},interactivity:{clientNavigation:!0}}};var Np=n(E(),1),Wh=n(O(),1),oL=n(re(),1),W$=n(F(),1),Bd=n(N(),1),ts=n(y(),1);function $$({attributes:e,context:{commentId:t},setAttributes:r,isSelected:o}){let{height:a,width:i}=e,[l]=(0,oL.useEntityProp)("root","comment","author_avatar_urls",t),[s]=(0,oL.useEntityProp)("root","comment","author_name",t),c=l?Object.values(l):null,u=l?Object.keys(l):null,p=u?u[0]:24,m=u?u[u.length-1]:96,d=(0,Np.useBlockProps)(),f=(0,Np.__experimentalGetSpacingClassesAndStyles)(e),h=Math.floor(m*2.5),g=(0,W$.useSelect)(_=>{let{__experimentalDiscussionSettings:k}=_(Np.store).getSettings();return k?.avatarURL},[]),v=(0,ts.jsx)(Np.InspectorControls,{children:(0,ts.jsx)(Wh.PanelBody,{title:(0,Bd.__)("Settings"),children:(0,ts.jsx)(Wh.RangeControl,{label:(0,Bd.__)("Image size"),onChange:_=>r({width:_,height:_}),min:p,max:h,initialPosition:i,value:i})})}),b=(0,ts.jsx)(Wh.ResizableBox,{size:{width:i,height:a},showHandle:o,onResizeStop:(_,k,x,w)=>{r({height:parseInt(a+w.height,10),width:parseInt(i+w.width,10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,Bd.isRTL)(),bottom:!0,left:(0,Bd.isRTL)()},minWidth:p,maxWidth:h,children:(0,ts.jsx)("img",{src:c?c[c.length-1]:g,alt:`${s} ${(0,Bd.__)("Avatar")}`,...d})});return(0,ts.jsxs)(ts.Fragment,{children:[v,(0,ts.jsx)("div",{...f,children:b})]})}var{name:q$}=Aw,Z$={icon:Y1,edit:$$},Tke=()=>R({name:q$,metadata:Aw,settings:Z$});var aL={};K(aL,{init:()=>Nke,metadata:()=>Mw,name:()=>J$,settings:()=>eq});var Mw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-author-name",title:"Comment Author Name",category:"theme",ancestor:["core/comment-template"],description:"Displays the name of the author of the comment.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},usesContext:["commentId"],supports:{anchor:!0,html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,textAlign:!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}}},style:"wp-block-comment-author-name"};var fu=n(N(),1),K$=n(F(),1),zw=n(E(),1),Y$=n(re(),1),Ip=n(O(),1);var xi=n(y(),1);function Q$(e){let{attributes:{isLink:t,linkTarget:r},context:{commentId:o},setAttributes:a}=e;Ct(e);let i=Z(),l=(0,zw.useBlockProps)(),s=(0,K$.useSelect)(p=>{let{getEntityRecord:m}=p(Y$.store),d=m("root","comment",o),f=d?.author_name;return d&&!f?m("root","user",d.author)?.name??(0,fu.__)("Anonymous"):f??""},[o]),c=(0,xi.jsx)(zw.InspectorControls,{children:(0,xi.jsxs)(Ip.__experimentalToolsPanel,{label:(0,fu.__)("Settings"),resetAll:()=>{a({isLink:!0,linkTarget:"_self"})},dropdownMenuProps:i,children:[(0,xi.jsx)(Ip.__experimentalToolsPanelItem,{label:(0,fu.__)("Link to authors URL"),isShownByDefault:!0,hasValue:()=>!t,onDeselect:()=>a({isLink:!0}),children:(0,xi.jsx)(Ip.ToggleControl,{label:(0,fu.__)("Link to authors URL"),onChange:()=>a({isLink:!t}),checked:t})}),t&&(0,xi.jsx)(Ip.__experimentalToolsPanelItem,{label:(0,fu.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>r!=="_self",onDeselect:()=>a({linkTarget:"_self"}),children:(0,xi.jsx)(Ip.ToggleControl,{label:(0,fu.__)("Open in new tab"),onChange:p=>a({linkTarget:p?"_blank":"_self"}),checked:r==="_blank"})})]})});return(!o||!s)&&(s=(0,fu._x)("Comment Author","block title")),(0,xi.jsxs)(xi.Fragment,{children:[c,(0,xi.jsx)("div",{...l,children:t?(0,xi.jsx)("a",{href:"#comment-author-pseudo-link",onClick:p=>p.preventDefault(),children:s}):s})]})}var Eke={attributes:{isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},usesContext:["commentId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},save(){return null},migrate:be,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},Bke={attributes:{isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save(){return null},migrate:Zt,isEligible({style:e}){return e?.typography?.fontFamily}},X$=[Eke,Bke];var{name:J$}=Mw,eq={icon:IP,edit:Q$,deprecated:X$,example:{}},Nke=()=>R({name:J$,metadata:Mw,settings:eq});var iL={};K(iL,{init:()=>Lke,metadata:()=>Vw,name:()=>sq,settings:()=>cq});var Vw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-content",title:"Comment Content",category:"theme",ancestor:["core/comment-template"],description:"Displays the contents of a comment.",textdomain:"default",usesContext:["commentId"],supports:{anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},spacing:{padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},html:!1},style:"wp-block-comment-content"};var tq=n(N(),1),rq=n(H(),1),oq=n(O(),1),nq=n(re(),1),aq=n(E(),1);var rs=n(y(),1);function iq(e){let{context:{commentId:t}}=e;Ct(e);let r=(0,aq.useBlockProps)(),[o]=(0,nq.useEntityProp)("root","comment","content",t);return!t||!o?(0,rs.jsx)(rs.Fragment,{children:(0,rs.jsx)("div",{...r,children:(0,rs.jsx)("p",{children:(0,tq._x)("Comment Content","block title")})})}):(0,rs.jsx)(rs.Fragment,{children:(0,rs.jsx)("div",{...r,children:(0,rs.jsx)(oq.Disabled,{children:(0,rs.jsx)(rq.RawHTML,{children:o.rendered},"html")})})})}var Dke={attributes:{textAlign:{type:"string"}},usesContext:["commentId"],supports:{anchor:!0,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},spacing:{padding:["horizontal","vertical"]},html:!1},save(){return null},migrate:be,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},lq=[Dke];var{name:sq}=Vw,cq={icon:LP,edit:iq,deprecated:lq,example:{}},Lke=()=>R({name:sq,metadata:Vw,settings:cq});var sL={};K(sL,{init:()=>Mke,metadata:()=>Ow,name:()=>dq,settings:()=>fq});var Ow={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-date",title:"Comment Date",category:"theme",ancestor:["core/comment-template"],description:"Displays the date on which the comment was posted.",textdomain:"default",attributes:{format:{type:"string"},isLink:{type:"boolean",default:!0}},usesContext:["commentId"],supports:{anchor:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,textAlign:!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}}},style:"wp-block-comment-date"};var lL=n(re(),1),Id=n(Fw(),1),$h=n(E(),1),Dd=n(O(),1),Nd=n(N(),1);var ua=n(y(),1);function pq({attributes:{format:e,isLink:t},context:{commentId:r},setAttributes:o}){let a=(0,$h.useBlockProps)(),i=Z(),[l]=(0,lL.useEntityProp)("root","comment","date",r),[s=(0,Id.getSettings)().formats.date]=(0,lL.useEntityProp)("root","site","date_format"),c=(0,ua.jsx)($h.InspectorControls,{children:(0,ua.jsxs)(Dd.__experimentalToolsPanel,{label:(0,Nd.__)("Settings"),resetAll:()=>{o({format:void 0,isLink:!0})},dropdownMenuProps:i,children:[(0,ua.jsx)(Dd.__experimentalToolsPanelItem,{label:(0,Nd.__)("Date format"),hasValue:()=>e!==void 0,onDeselect:()=>o({format:void 0}),isShownByDefault:!0,children:(0,ua.jsx)($h.__experimentalDateFormatPicker,{format:e,defaultFormat:s,onChange:p=>o({format:p})})}),(0,ua.jsx)(Dd.__experimentalToolsPanelItem,{label:(0,Nd.__)("Link to comment"),hasValue:()=>!t,onDeselect:()=>o({isLink:!0}),isShownByDefault:!0,children:(0,ua.jsx)(Dd.ToggleControl,{label:(0,Nd.__)("Link to comment"),onChange:()=>o({isLink:!t}),checked:t})})]})});(!r||!l)&&(l=(0,Nd._x)("Comment Date","block title"));let u=l instanceof Date?(0,ua.jsx)("time",{dateTime:(0,Id.dateI18n)("c",l),children:e==="human-diff"?(0,Id.humanTimeDiff)(l):(0,Id.dateI18n)(e||s,l)}):(0,ua.jsx)("time",{children:l});return t&&(u=(0,ua.jsx)("a",{href:"#comment-date-pseudo-link",onClick:p=>p.preventDefault(),children:u})),(0,ua.jsxs)(ua.Fragment,{children:[c,(0,ua.jsx)("div",{...a,children:u})]})}var Ake={attributes:{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(){return null},migrate:Zt,isEligible({style:e}){return e?.typography?.fontFamily}},mq=[Ake];var{name:dq}=Ow,fq={icon:kv,edit:pq,deprecated:mq,example:{}},Mke=()=>R({name:dq,metadata:Ow,settings:fq});var cL={};K(cL,{init:()=>Oke,metadata:()=>Hw,name:()=>vq,settings:()=>bq});var Hw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-edit-link",title:"Comment Edit Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",textdomain:"default",usesContext:["commentId"],attributes:{linkTarget:{type:"string",default:"_self"}},supports:{anchor:!0,html:!1,color:{link:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,textAlign:!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}},style:"wp-block-comment-edit-link"};var jw=n(E(),1),qh=n(O(),1),Cb=n(N(),1);var os=n(y(),1);function hq(e){let{attributes:t,setAttributes:r}=e,{linkTarget:o}=t;Ct(e);let a=(0,jw.useBlockProps)(),i=Z(),l=(0,os.jsx)(jw.InspectorControls,{children:(0,os.jsx)(qh.__experimentalToolsPanel,{label:(0,Cb.__)("Settings"),resetAll:()=>{r({linkTarget:"_self"})},dropdownMenuProps:i,children:(0,os.jsx)(qh.__experimentalToolsPanelItem,{label:(0,Cb.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>o==="_blank",onDeselect:()=>r({linkTarget:"_self"}),children:(0,os.jsx)(qh.ToggleControl,{label:(0,Cb.__)("Open in new tab"),onChange:s=>r({linkTarget:s?"_blank":"_self"}),checked:o==="_blank"})})})});return(0,os.jsxs)(os.Fragment,{children:[l,(0,os.jsx)("div",{...a,children:(0,os.jsx)("a",{href:"#edit-comment-pseudo-link",onClick:s=>s.preventDefault(),children:(0,Cb.__)("Edit")})})]})}var Vke={attributes:{linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},usesContext:["commentId"],supports:{anchor:!0,html:!1,color:{link:!0,gradients:!0,text:!1},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},save(){return null},migrate:be,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},gq=[Vke];var{name:vq}=Hw,bq={icon:AP,edit:hq,deprecated:gq,example:{}},Oke=()=>R({name:vq,metadata:Hw,settings:bq});var uL={};K(uL,{init:()=>Uke,metadata:()=>Uw,name:()=>wq,settings:()=>Cq});var Uw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-reply-link",title:"Comment Reply Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to reply to a comment.",textdomain:"default",usesContext:["commentId"],supports:{anchor:!0,color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},html:!1},style:"wp-block-comment-reply-link"};var yq=n(N(),1),_q=n(E(),1);var Zh=n(y(),1);function Hke(e){Ct(e);let t=(0,_q.useBlockProps)();return(0,Zh.jsx)(Zh.Fragment,{children:(0,Zh.jsx)("div",{...t,children:(0,Zh.jsx)("a",{href:"#comment-reply-pseudo-link",onClick:r=>r.preventDefault(),children:(0,yq._x)("Reply","verb")})})})}var xq=Hke;var jke={attributes:{textAlign:{type:"string"}},usesContext:["commentId"],supports:{anchor:!0,color:{gradients:!0,link:!0,text:!1},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},html:!1},save(){return null},migrate:be,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},kq=[jke];var{name:wq}=Uw,Cq={edit:xq,icon:zP,deprecated:kq,example:{}},Uke=()=>R({name:wq,metadata:Uw,settings:Cq});var mL={};K(mL,{init:()=>Qke,metadata:()=>Gw,name:()=>Hq,settings:()=>jq});var Gw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-template",title:"Comment Template",category:"design",parent:["core/comments"],description:"Contains the block elements used to display a comment, like the title, date, author, avatar and more.",textdomain:"default",usesContext:["postId"],supports:{anchor:!0,align:!0,html:!1,reusable:!1,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}}},style:"wp-block-comment-template"};var Ww=n(H(),1),pL=n(F(),1),Lq=n(N(),1),ns=n(E(),1),Rq=n(O(),1),Aq=n(re(),1);var Ld=n(H(),1),Pq=n(F(),1),Eq=n(E(),1),Bq=n(ir(),1),Nq=n(Sb(),1),Tq=100,Iq=({postId:e})=>{let t={status:"approve",order:"asc",context:"embed",parent:0,_embed:"children"},{pageComments:r,commentsPerPage:o,defaultCommentsPage:a}=(0,Pq.useSelect)(s=>{let{getSettings:c}=s(Eq.store),{__experimentalDiscussionSettings:u}=c();return u??{}},[]),i=r?Math.min(o,Tq):Tq,l=Wke({defaultPage:a,postId:e,perPage:i,queryArgs:t});return(0,Ld.useMemo)(()=>l?{...t,post:e,per_page:i,page:l}:null,[e,i,l])},Wke=({defaultPage:e,postId:t,perPage:r,queryArgs:o})=>{let[a,i]=(0,Ld.useState)({}),l=`${t}_${r}`,s=a[l]||0;return(0,Ld.useEffect)(()=>{s||e!=="newest"||(0,Nq.default)({path:(0,Bq.addQueryArgs)("/wp/v2/comments",{...o,post:t,per_page:r,_fields:"id"}),method:"HEAD",parse:!1}).then(c=>{let u=parseInt(c.headers.get("X-WP-TotalPages"));i({...a,[l]:u<=1?1:u})}).catch(()=>{i({...a,[l]:1})})},[e,t,r,i]),e==="newest"?s:1},Dq=e=>(0,Ld.useMemo)(()=>e?.map(({id:r,_embedded:o})=>{let[a]=o?.children||[[]];return{commentId:r,children:a.map(i=>({commentId:i.id}))}}),[e]);var ki=n(y(),1),$ke=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]],qke=({perPage:e,pageComments:t,threadComments:r,threadCommentsDepth:o})=>{let a=r?Math.min(o,3):1,i=s=>{if(s=2)&&a<3&&l.push({commentId:-2,children:[]}),(!t||e>=3)&&a<2&&l.push({commentId:-3,children:[]}),l};function Zke({comment:e,activeCommentId:t,setActiveCommentId:r,firstCommentId:o,blocks:a}){let{children:i,...l}=(0,ns.useInnerBlocksProps)({},{template:$ke});return(0,ki.jsxs)("li",{...l,children:[e.commentId===(t||o)?i:null,(0,ki.jsx)(Yke,{blocks:a,commentId:e.commentId,setActiveCommentId:r,isHidden:e.commentId===(t||o)}),e?.children?.length>0?(0,ki.jsx)(Mq,{comments:e.children,activeCommentId:t,setActiveCommentId:r,blocks:a,firstCommentId:o}):null]})}var Kke=({blocks:e,commentId:t,setActiveCommentId:r,isHidden:o})=>{let a=(0,ns.__experimentalUseBlockPreview)({blocks:e}),i=()=>{r(t)};return(0,ki.jsx)("div",{...a,tabIndex:0,role:"button",style:{display:o?"none":void 0},onClick:i,onKeyPress:i})},Yke=(0,Ww.memo)(Kke),Mq=({comments:e,blockProps:t,activeCommentId:r,setActiveCommentId:o,blocks:a,firstCommentId:i})=>(0,ki.jsx)("ol",{...t,children:e&&e.map(({commentId:l,...s},c)=>(0,ki.jsx)(ns.BlockContextProvider,{value:{commentId:l<0?null:l},children:(0,ki.jsx)(Zke,{comment:{commentId:l,...s},activeCommentId:r,setActiveCommentId:o,blocks:a,firstCommentId:i})},s.commentId||c))});function zq({clientId:e,context:{postId:t}}){let r=(0,ns.useBlockProps)(),[o,a]=(0,Ww.useState)(),{commentOrder:i,threadCommentsDepth:l,threadComments:s,commentsPerPage:c,pageComments:u}=(0,pL.useSelect)(h=>{let{getSettings:g}=h(ns.store);return g().__experimentalDiscussionSettings??{}},[]),p=Iq({postId:t}),{topLevelComments:m,blocks:d}=(0,pL.useSelect)(h=>{let{getEntityRecords:g}=h(Aq.store),{getBlocks:v}=h(ns.store);return{topLevelComments:p?g("root","comment",p):null,blocks:v(e)}},[e,p]),f=Dq(i==="desc"&&m?[...m].reverse():m);return m?(t||(f=qke({perPage:c,pageComments:u,threadComments:s,threadCommentsDepth:l})),f.length?(0,ki.jsx)(Mq,{comments:f,blockProps:r,blocks:d,activeCommentId:o,setActiveCommentId:a,firstCommentId:f[0]?.commentId}):(0,ki.jsx)("p",{...r,children:(0,Lq.__)("No results found.")})):(0,ki.jsx)("p",{...r,children:(0,ki.jsx)(Rq.Spinner,{})})}var Vq=n(E(),1),Oq=n(y(),1);function Fq(){return(0,Oq.jsx)(Vq.InnerBlocks.Content,{})}var{name:Hq}=Gw,jq={icon:td,edit:zq,save:Fq},Qke=()=>R({name:Hq,metadata:Gw,settings:jq});var fL={};K(fL,{init:()=>e5e,metadata:()=>$w,name:()=>Wq,settings:()=>$q});var Gq=n(N(),1);var $w={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-previous",title:"Comments Previous Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the previous comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}};var dL=n(N(),1),qw=n(E(),1),Tb=n(y(),1),Jke={none:"",arrow:"\u2190",chevron:"\xAB"};function Uq({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":r}}){let o=Jke[r];return(0,Tb.jsxs)("a",{href:"#comments-pagination-previous-pseudo-link",onClick:a=>a.preventDefault(),...(0,qw.useBlockProps)(),children:[o&&(0,Tb.jsx)("span",{className:`wp-block-comments-pagination-previous-arrow is-arrow-${r}`,children:o}),(0,Tb.jsx)(qw.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,dL.__)("Older comments page link"),placeholder:(0,dL.__)("Older Comments"),value:e,onChange:a=>t({label:a})})]})}var{name:Wq}=$w,$q={icon:Tv,edit:Uq,example:{attributes:{label:(0,Gq.__)("Older Comments")}}},e5e=()=>R({name:Wq,metadata:$w,settings:$q});var gL={};K(gL,{init:()=>o5e,metadata:()=>Zw,name:()=>Xq,settings:()=>Jq});var Zw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination",title:"Comments Pagination",category:"theme",parent:["core/comments"],allowedBlocks:["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],description:"Displays a paginated navigation to next/previous set of comments, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"}},example:{attributes:{paginationArrow:"none"}},providesContext:{"comments/paginationArrow":"paginationArrow"},supports:{anchor:!0,align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-comments-pagination-editor",style:"wp-block-comments-pagination"};var Kw=n(N(),1),is=n(E(),1),hL=n(F(),1),Yw=n(O(),1);var Rd=n(N(),1),Kh=n(O(),1),Yh=n(y(),1);function qq({value:e,onChange:t}){return(0,Yh.jsxs)(Kh.__experimentalToggleGroupControl,{label:(0,Rd.__)("Arrow"),value:e,onChange:t,help:(0,Rd.__)("A decorative arrow appended to the next and previous comments link."),isBlock:!0,children:[(0,Yh.jsx)(Kh.__experimentalToggleGroupControlOption,{value:"none",label:(0,Rd._x)("None","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Yh.jsx)(Kh.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,Rd._x)("Arrow","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Yh.jsx)(Kh.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,Rd._x)("Chevron","Arrow option for Comments Pagination Next/Previous blocks")})]})}var as=n(y(),1),r5e=[["core/comments-pagination-previous"],["core/comments-pagination-numbers"],["core/comments-pagination-next"]];function Zq({attributes:{paginationArrow:e},setAttributes:t,clientId:r}){let o=(0,hL.useSelect)(c=>{let{getBlocks:u}=c(is.store);return u(r)?.find(m=>["core/comments-pagination-previous","core/comments-pagination-next"].includes(m.name))},[]),a=(0,is.useBlockProps)(),i=Z(),l=(0,is.useInnerBlocksProps)(a,{template:r5e});return(0,hL.useSelect)(c=>{let{getSettings:u}=c(is.store),{__experimentalDiscussionSettings:p}=u();return p?.pageComments},[])?(0,as.jsxs)(as.Fragment,{children:[o&&(0,as.jsx)(is.InspectorControls,{children:(0,as.jsx)(Yw.__experimentalToolsPanel,{label:(0,Kw.__)("Settings"),dropdownMenuProps:i,resetAll:()=>t({paginationArrow:"none"}),children:(0,as.jsx)(Yw.__experimentalToolsPanelItem,{label:(0,Kw.__)("Arrow"),hasValue:()=>e!=="none",onDeselect:()=>t({paginationArrow:"none"}),isShownByDefault:!0,children:(0,as.jsx)(qq,{value:e,onChange:c=>{t({paginationArrow:c})}})})})}),(0,as.jsx)("div",{...l})]}):(0,as.jsx)(is.Warning,{children:(0,Kw.__)("Comments Pagination block: paging comments is disabled in the Discussion Settings")})}var Kq=n(E(),1),Yq=n(y(),1);function Qq(){return(0,Yq.jsx)(Kq.InnerBlocks.Content,{})}var{name:Xq}=Zw,Jq={icon:Pv,edit:Zq,save:Qq},o5e=()=>R({name:Xq,metadata:Zw,settings:Jq});var bL={};K(bL,{init:()=>i5e,metadata:()=>Qw,name:()=>rZ,settings:()=>oZ});var tZ=n(N(),1);var Qw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-next",title:"Comments Next Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the next comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}};var vL=n(N(),1),Xw=n(E(),1),Pb=n(y(),1),a5e={none:"",arrow:"\u2192",chevron:"\xBB"};function eZ({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":r}}){let o=a5e[r];return(0,Pb.jsxs)("a",{href:"#comments-pagination-next-pseudo-link",onClick:a=>a.preventDefault(),...(0,Xw.useBlockProps)(),children:[(0,Pb.jsx)(Xw.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,vL.__)("Newer comments page link"),placeholder:(0,vL.__)("Newer Comments"),value:e,onChange:a=>t({label:a})}),o&&(0,Pb.jsx)("span",{className:`wp-block-comments-pagination-next-arrow is-arrow-${r}`,children:o})]})}var{name:rZ}=Qw,oZ={icon:Cv,edit:eZ,example:{attributes:{label:(0,tZ.__)("Newer Comments")}}},i5e=()=>R({name:rZ,metadata:Qw,settings:oZ});var yL={};K(yL,{init:()=>s5e,metadata:()=>Jw,name:()=>iZ,settings:()=>lZ});var Jw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-numbers",title:"Comments Page Numbers",category:"theme",parent:["core/comments-pagination"],description:"Displays a list of page numbers for comments pagination.",textdomain:"default",usesContext:["postId"],supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{padding:!0}}}};var nZ=n(E(),1),hl=n(y(),1),Ad=({content:e,tag:t="a",extraClass:r=""})=>t==="a"?(0,hl.jsx)(t,{className:`page-numbers ${r}`,href:"#comments-pagination-numbers-pseudo-link",onClick:o=>o.preventDefault(),children:e}):(0,hl.jsx)(t,{className:`page-numbers ${r}`,children:e});function aZ(){return(0,hl.jsxs)("div",{...(0,nZ.useBlockProps)(),children:[(0,hl.jsx)(Ad,{content:"1"}),(0,hl.jsx)(Ad,{content:"2"}),(0,hl.jsx)(Ad,{content:"3",tag:"span",extraClass:"current"}),(0,hl.jsx)(Ad,{content:"4"}),(0,hl.jsx)(Ad,{content:"5"}),(0,hl.jsx)(Ad,{content:"...",tag:"span",extraClass:"dots"}),(0,hl.jsx)(Ad,{content:"8"})]})}var{name:iZ}=Jw,lZ={icon:Sv,edit:aZ,example:{}},s5e=()=>R({name:iZ,metadata:Jw,settings:lZ});var _L={};K(_L,{init:()=>m5e,metadata:()=>e3,name:()=>fZ,settings:()=>hZ});var e3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments.",textdomain:"default",usesContext:["postId","postType"],attributes:{showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2},levelOptions:{type:"array"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}}};var ec=n(E(),1),zr=n(N(),1),sZ=n(re(),1),Dp=n(O(),1),t3=n(H(),1),cZ=n(F(),1),uZ=n(Sb(),1),pZ=n(ir(),1);var ja=n(y(),1);function mZ(e){Ct(e);let{attributes:t,setAttributes:r,context:o}=e,{showPostTitle:a,showCommentsCount:i,level:l=2,levelOptions:s}=t,{postId:c,postType:u}=o,p="h"+l,[m,d]=(0,t3.useState)(),[f]=(0,sZ.useEntityProp)("postType",u,"title",c),h=typeof c>"u",g=(0,ec.useBlockProps)(),{threadCommentsDepth:v,threadComments:b,commentsPerPage:_,pageComments:k}=(0,cZ.useSelect)(I=>{let{getSettings:D}=I(ec.store);return D().__experimentalDiscussionSettings??{}},[]),x=Z();(0,t3.useEffect)(()=>{if(h){let D=b?Math.min(v,3)-1:0,T=k?_:3,L=parseInt(D)+parseInt(T);d(Math.min(L,3));return}let I=c;(0,uZ.default)({path:(0,pZ.addQueryArgs)("/wp/v2/comments",{post:c,_fields:"id"}),method:"HEAD",parse:!1}).then(D=>{I===c&&d(parseInt(D.headers.get("X-WP-Total")))}).catch(()=>{d(0)})},[c]);let w=(0,ja.jsx)(ec.BlockControls,{group:"block",children:(0,ja.jsx)(ec.HeadingLevelDropdown,{value:l,options:s,onChange:I=>r({level:I})})}),C=(0,ja.jsx)(ec.InspectorControls,{children:(0,ja.jsxs)(Dp.__experimentalToolsPanel,{label:(0,zr.__)("Settings"),resetAll:()=>{r({showPostTitle:!0,showCommentsCount:!0})},dropdownMenuProps:x,children:[(0,ja.jsx)(Dp.__experimentalToolsPanelItem,{label:(0,zr.__)("Show post title"),isShownByDefault:!0,hasValue:()=>!a,onDeselect:()=>r({showPostTitle:!0}),children:(0,ja.jsx)(Dp.ToggleControl,{label:(0,zr.__)("Show post title"),checked:a,onChange:I=>r({showPostTitle:I})})}),(0,ja.jsx)(Dp.__experimentalToolsPanelItem,{label:(0,zr.__)("Show comments count"),isShownByDefault:!0,hasValue:()=>!i,onDeselect:()=>r({showCommentsCount:!0}),children:(0,ja.jsx)(Dp.ToggleControl,{label:(0,zr.__)("Show comments count"),checked:i,onChange:I=>r({showCommentsCount:I})})})]})}),P=h?(0,zr.__)("Post Title"):f,B;return i&&m!==void 0?a?m===1?B=(0,zr.sprintf)((0,zr.__)('One response to "%s"'),P):B=(0,zr.sprintf)((0,zr._n)('%1$s response to "%2$s"','%1$s responses to "%2$s"',m),m,P):m===1?B=(0,zr.__)("One response"):B=(0,zr.sprintf)((0,zr._n)("%s response","%s responses",m),m):a?m===1?B=(0,zr.sprintf)((0,zr.__)('Response to "%s"'),P):B=(0,zr.sprintf)((0,zr.__)('Responses to "%s"'),P):m===1?B=(0,zr.__)("Response"):B=(0,zr.__)("Responses"),(0,ja.jsxs)(ja.Fragment,{children:[w,C,(0,ja.jsx)(p,{...g,children:B})]})}var u5e={attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2},levelOptions:{type:"array"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!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,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}},migrate:e=>{let{singleCommentLabel:t,multipleCommentsLabel:r,...o}=e;return be(o)},isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},p5e={attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2},levelOptions:{type:"array"},singleCommentLabel:{type:"string"},multipleCommentsLabel:{type:"string"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!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,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}},migrate:e=>{let{singleCommentLabel:t,multipleCommentsLabel:r,...o}=e;return be(o)},isEligible:({multipleCommentsLabel:e,singleCommentLabel:t})=>e||t,save:()=>null},dZ=[u5e,p5e];var{name:fZ}=e3,hZ={icon:$l,edit:mZ,deprecated:dZ,example:{}},m5e=()=>R({name:fZ,metadata:e3,settings:hZ});var OL={};K(OL,{init:()=>Dwe,metadata:()=>y3,name:()=>yK,settings:()=>x3});var VL=n(N(),1);var bK=n(q(),1);var n3=n(q(),1),Ne=n(E(),1),a3=n(N(),1),Eb=n(ve(),1);var r3=n(Ar(),1),d5e={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"},Yt="image",Er="video",hu="embed-video",gZ=50;var f5e={x:.5,y:.5},o3=["image","video"];function nn({x:e,y:t}=f5e){return`${Math.round(e*100)}% ${Math.round(t*100)}%`}function gl(e){return e===50||e===void 0?null:"has-background-dim-"+10*Math.round(e/10)}function vZ(e){if(!e||!e.url&&!e.src)return{url:void 0,id:void 0};(0,r3.isBlobURL)(e.url)&&(e.type=(0,r3.getBlobTypeByURL)(e.url));let t;if(e.media_type)e.media_type===Yt?t=Yt:t=Er;else if(e.type&&(e.type===Yt||e.type===Er))t=e.type;else return;return{url:e.url||e.src,id:e.id,alt:e?.alt,backgroundType:t,...t===Er?{hasParallax:void 0}:{}}}function pa(e){return!e||e==="center center"||e==="center"}function Ua(e){return pa(e)?"":d5e[e]}var he=n(y(),1);function tc(e){return e?{backgroundImage:`url(${e})`}:{}}function Md(e){return e===0||e===50||!e?null:"has-background-dim-"+10*Math.round(e/10)}function i3(e){return{...e,dimRatio:e.url?e.dimRatio:100}}function Lp(e){return e.tagName||(e={...e,tagName:"div"}),{...e}}var zd={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},Bb={url:{type:"string"},id:{type:"number"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},xL={...Bb,useFeaturedImage:{type:"boolean",default:!1},tagName:{type:"string",default:"div"}},h5e={...xL,isUserOverlayColor:{type:"boolean"},sizeSlug:{type:"string"},alt:{type:"string",default:""}},Qh={anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},kL={...Qh,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1}},g5e={...kL,shadow:!0,dimensions:{aspectRatio:!0},interactivity:{clientNavigation:!0}},v5e={attributes:h5e,supports:g5e,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:p,isRepeated:m,overlayColor:d,url:f,alt:h,id:g,minHeight:v,minHeightUnit:b,tagName:_,sizeSlug:k}=e,x=(0,Ne.getColorClassName)("background-color",d),w=(0,Ne.__experimentalGetGradientClass)(r),C=v&&b?`${v}${b}`:v,P=Yt===t,B=Er===t,I=!(u||m),D={minHeight:C||void 0},T={backgroundColor:x?void 0:i,background:a||void 0},L=s&&I?nn(s):void 0,A=f?`url(${f})`:void 0,z=nn(s),j=S({"is-light":!p,"has-parallax":u,"is-repeated":m,"has-custom-content-position":!pa(o)},Ua(o)),G=S("wp-block-cover__image-background",g?`wp-image-${g}`:null,{[`size-${k}`]:k,"has-parallax":u,"is-repeated":m}),W=r||a;return(0,he.jsxs)(_,{...Ne.useBlockProps.save({className:j,style:D}),children:[(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__background",x,gl(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&W&&l!==0,"has-background-gradient":W,[w]:w}),style:T}),!c&&P&&f&&(I?(0,he.jsx)("img",{className:G,alt:h,src:f,style:{objectPosition:L},"data-object-fit":"cover","data-object-position":L}):(0,he.jsx)("div",{role:h?"img":void 0,"aria-label":h||void 0,className:G,style:{backgroundPosition:z,backgroundImage:A}})),B&&f&&(0,he.jsx)("video",{className:S("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:L},"data-object-fit":"cover","data-object-position":L}),(0,he.jsx)("div",{...Ne.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},b5e={attributes:xL,supports:kL,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:p,isRepeated:m,overlayColor:d,url:f,alt:h,id:g,minHeight:v,minHeightUnit:b,tagName:_}=e,k=(0,Ne.getColorClassName)("background-color",d),x=(0,Ne.__experimentalGetGradientClass)(r),w=v&&b?`${v}${b}`:v,C=Yt===t,P=Er===t,B=!(u||m),I={minHeight:w||void 0},D={backgroundColor:k?void 0:i,background:a||void 0},T=s&&B?nn(s):void 0,L=f?`url(${f})`:void 0,A=nn(s),z=S({"is-light":!p,"has-parallax":u,"is-repeated":m,"has-custom-content-position":!pa(o)},Ua(o)),j=S("wp-block-cover__image-background",g?`wp-image-${g}`:null,{"has-parallax":u,"is-repeated":m}),G=r||a;return(0,he.jsxs)(_,{...Ne.useBlockProps.save({className:z,style:I}),children:[(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__background",k,gl(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&G&&l!==0,"has-background-gradient":G,[x]:x}),style:D}),!c&&C&&f&&(B?(0,he.jsx)("img",{className:j,alt:h,src:f,style:{objectPosition:T},"data-object-fit":"cover","data-object-position":T}):(0,he.jsx)("div",{role:"img",className:j,style:{backgroundPosition:A,backgroundImage:L}})),P&&f&&(0,he.jsx)("video",{className:S("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:T},"data-object-fit":"cover","data-object-position":T}),(0,he.jsx)("div",{...Ne.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},y5e={attributes:xL,supports:kL,isEligible(e){return(e.customOverlayColor!==void 0||e.overlayColor!==void 0)&&e.isUserOverlayColor===void 0},migrate(e){return{...e,isUserOverlayColor:!0}},save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:p,isRepeated:m,overlayColor:d,url:f,alt:h,id:g,minHeight:v,minHeightUnit:b,tagName:_}=e,k=(0,Ne.getColorClassName)("background-color",d),x=(0,Ne.__experimentalGetGradientClass)(r),w=v&&b?`${v}${b}`:v,C=Yt===t,P=Er===t,B=!(u||m),I={minHeight:w||void 0},D={backgroundColor:k?void 0:i,background:a||void 0},T=s&&B?nn(s):void 0,L=f?`url(${f})`:void 0,A=nn(s),z=S({"is-light":!p,"has-parallax":u,"is-repeated":m,"has-custom-content-position":!pa(o)},Ua(o)),j=S("wp-block-cover__image-background",g?`wp-image-${g}`:null,{"has-parallax":u,"is-repeated":m}),G=r||a;return(0,he.jsxs)(_,{...Ne.useBlockProps.save({className:z,style:I}),children:[(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__background",k,gl(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&G&&l!==0,"has-background-gradient":G,[x]:x}),style:D}),!c&&C&&f&&(B?(0,he.jsx)("img",{className:j,alt:h,src:f,style:{objectPosition:T},"data-object-fit":"cover","data-object-position":T}):(0,he.jsx)("div",{role:"img",className:j,style:{backgroundPosition:A,backgroundImage:L}})),P&&f&&(0,he.jsx)("video",{className:S("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:T},"data-object-fit":"cover","data-object-position":T}),(0,he.jsx)("div",{...Ne.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},_5e={attributes:Bb,supports:Qh,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:p,isRepeated:m,overlayColor:d,url:f,alt:h,id:g,minHeight:v,minHeightUnit:b}=e,_=(0,Ne.getColorClassName)("background-color",d),k=(0,Ne.__experimentalGetGradientClass)(r),x=v&&b?`${v}${b}`:v,w=Yt===t,C=Er===t,P=!(u||m),B={minHeight:x||void 0},I={backgroundColor:_?void 0:i,background:a||void 0},D=s&&P?nn(s):void 0,T=f?`url(${f})`:void 0,L=nn(s),A=S({"is-light":!p,"has-parallax":u,"is-repeated":m,"has-custom-content-position":!pa(o)},Ua(o)),z=S("wp-block-cover__image-background",g?`wp-image-${g}`:null,{"has-parallax":u,"is-repeated":m}),j=r||a;return(0,he.jsxs)("div",{...Ne.useBlockProps.save({className:A,style:B}),children:[(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__background",_,gl(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&j&&l!==0,"has-background-gradient":j,[k]:k}),style:I}),!c&&w&&f&&(P?(0,he.jsx)("img",{className:z,alt:h,src:f,style:{objectPosition:D},"data-object-fit":"cover","data-object-position":D}):(0,he.jsx)("div",{role:"img",className:z,style:{backgroundPosition:L,backgroundImage:T}})),C&&f&&(0,he.jsx)("video",{className:S("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:D},"data-object-fit":"cover","data-object-position":D}),(0,he.jsx)("div",{...Ne.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:Lp},x5e={attributes:Bb,supports:Qh,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:p,isRepeated:m,overlayColor:d,url:f,alt:h,id:g,minHeight:v,minHeightUnit:b}=e,_=(0,Ne.getColorClassName)("background-color",d),k=(0,Ne.__experimentalGetGradientClass)(r),x=v&&b?`${v}${b}`:v,w=Yt===t,C=Er===t,P=!(u||m),B={...w&&!P&&!c?tc(f):{},minHeight:x||void 0},I={backgroundColor:_?void 0:i,background:a||void 0},D=s&&P?`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`:void 0,T=S({"is-light":!p,"has-parallax":u,"is-repeated":m,"has-custom-content-position":!pa(o)},Ua(o)),L=r||a;return(0,he.jsxs)("div",{...Ne.useBlockProps.save({className:T,style:B}),children:[(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__background",_,gl(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&L&&l!==0,"has-background-gradient":L,[k]:k}),style:I}),!c&&w&&P&&f&&(0,he.jsx)("img",{className:S("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:h,src:f,style:{objectPosition:D},"data-object-fit":"cover","data-object-position":D}),C&&f&&(0,he.jsx)("video",{className:S("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:D},"data-object-fit":"cover","data-object-position":D}),(0,he.jsx)("div",{...Ne.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:Lp},k5e={attributes:Bb,supports:Qh,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,hasParallax:c,isDark:u,isRepeated:p,overlayColor:m,url:d,alt:f,id:h,minHeight:g,minHeightUnit:v}=e,b=(0,Ne.getColorClassName)("background-color",m),_=(0,Ne.__experimentalGetGradientClass)(r),k=v?`${g}${v}`:g,x=Yt===t,w=Er===t,C=!(c||p),P={...x&&!C?tc(d):{},minHeight:k||void 0},B={backgroundColor:b?void 0:i,background:a||void 0},I=s&&C?`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`:void 0,D=S({"is-light":!u,"has-parallax":c,"is-repeated":p,"has-custom-content-position":!pa(o)},Ua(o)),T=r||a;return(0,he.jsxs)("div",{...Ne.useBlockProps.save({className:D,style:P}),children:[(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__background",b,gl(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":d&&T&&l!==0,"has-background-gradient":T,[_]:_}),style:B}),x&&C&&d&&(0,he.jsx)("img",{className:S("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:f,src:d,style:{objectPosition:I},"data-object-fit":"cover","data-object-position":I}),w&&d&&(0,he.jsx)("video",{className:S("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:I},"data-object-fit":"cover","data-object-position":I}),(0,he.jsx)("div",{...Ne.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:Lp},w5e={attributes:Bb,supports:Qh,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,hasParallax:c,isDark:u,isRepeated:p,overlayColor:m,url:d,alt:f,id:h,minHeight:g,minHeightUnit:v}=e,b=(0,Ne.getColorClassName)("background-color",m),_=(0,Ne.__experimentalGetGradientClass)(r),k=v?`${g}${v}`:g,x=Yt===t,w=Er===t,C=!(c||p),P={...x&&!C?tc(d):{},minHeight:k||void 0},B={backgroundColor:b?void 0:i,background:a||void 0},I=s&&C?`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`:void 0,D=S({"is-light":!u,"has-parallax":c,"is-repeated":p,"has-custom-content-position":!pa(o)},Ua(o));return(0,he.jsxs)("div",{...Ne.useBlockProps.save({className:D,style:P}),children:[(0,he.jsx)("span",{"aria-hidden":"true",className:S(b,gl(l),"wp-block-cover__gradient-background",_,{"has-background-dim":l!==void 0,"has-background-gradient":r||a,[_]:!d&&_}),style:B}),x&&C&&d&&(0,he.jsx)("img",{className:S("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:f,src:d,style:{objectPosition:I},"data-object-fit":"cover","data-object-position":I}),w&&d&&(0,he.jsx)("video",{className:S("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:I},"data-object-fit":"cover","data-object-position":I}),(0,he.jsx)("div",{...Ne.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:Lp},C5e={attributes:{...zd,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""}},supports:Qh,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,hasParallax:c,isRepeated:u,overlayColor:p,url:m,alt:d,id:f,minHeight:h,minHeightUnit:g}=e,v=(0,Ne.getColorClassName)("background-color",p),b=(0,Ne.__experimentalGetGradientClass)(r),_=g?`${h}${g}`:h,k=Yt===t,x=Er===t,w=!(c||u),C={...k&&!w?tc(m):{},backgroundColor:v?void 0:i,background:a&&!m?a:void 0,minHeight:_||void 0},P=s&&w?`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`:void 0,B=S(Md(l),v,{"has-background-dim":l!==0,"has-parallax":c,"is-repeated":u,"has-background-gradient":r||a,[b]:!m&&b,"has-custom-content-position":!pa(o)},Ua(o));return(0,he.jsxs)("div",{...Ne.useBlockProps.save({className:B,style:C}),children:[m&&(r||a)&&l!==0&&(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__gradient-background",b),style:a?{background:a}:void 0}),k&&w&&m&&(0,he.jsx)("img",{className:S("wp-block-cover__image-background",f?`wp-image-${f}`:null),alt:d,src:m,style:{objectPosition:P},"data-object-fit":"cover","data-object-position":P}),x&&m&&(0,he.jsx)("video",{className:S("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:P},"data-object-fit":"cover","data-object-position":P}),(0,he.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,he.jsx)(Ne.InnerBlocks.Content,{})})]})},migrate:(0,Eb.compose)(i3,Lp)},S5e={attributes:{...zd,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,hasParallax:c,isRepeated:u,overlayColor:p,url:m,minHeight:d,minHeightUnit:f}=e,h=(0,Ne.getColorClassName)("background-color",p),g=(0,Ne.__experimentalGetGradientClass)(r),v=f?`${d}${f}`:d,b=Yt===t,_=Er===t,k=b?tc(m):{},x={};h||(k.backgroundColor=i),a&&!m&&(k.background=a),k.minHeight=v||void 0;let w;s&&(w=`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`,b&&!c&&(k.backgroundPosition=w),_&&(x.objectPosition=w));let C=S(Md(l),h,{"has-background-dim":l!==0,"has-parallax":c,"is-repeated":u,"has-background-gradient":r||a,[g]:!m&&g,"has-custom-content-position":!pa(o)},Ua(o));return(0,he.jsxs)("div",{...Ne.useBlockProps.save({className:C,style:k}),children:[m&&(r||a)&&l!==0&&(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__gradient-background",g),style:a?{background:a}:void 0}),_&&m&&(0,he.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:x}),(0,he.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,he.jsx)(Ne.InnerBlocks.Content,{})})]})},migrate:(0,Eb.compose)(i3,Lp)},T5e={attributes:{...zd,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){let{backgroundType:t,gradient:r,customGradient:o,customOverlayColor:a,dimRatio:i,focalPoint:l,hasParallax:s,overlayColor:c,url:u,minHeight:p}=e,m=(0,Ne.getColorClassName)("background-color",c),d=(0,Ne.__experimentalGetGradientClass)(r),f=t===Yt?tc(u):{};m||(f.backgroundColor=a),l&&!s&&(f.backgroundPosition=`${Math.round(l.x*100)}% ${Math.round(l.y*100)}%`),o&&!u&&(f.background=o),f.minHeight=p||void 0;let h=S(Md(i),m,{"has-background-dim":i!==0,"has-parallax":s,"has-background-gradient":o,[d]:!u&&d});return(0,he.jsxs)("div",{className:h,style:f,children:[u&&(r||o)&&i!==0&&(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__gradient-background",d),style:o?{background:o}:void 0}),Er===t&&u&&(0,he.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),(0,he.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,he.jsx)(Ne.InnerBlocks.Content,{})})]})},migrate:(0,Eb.compose)(i3,Lp)},P5e={attributes:{...zd,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){let{backgroundType:t,gradient:r,customGradient:o,customOverlayColor:a,dimRatio:i,focalPoint:l,hasParallax:s,overlayColor:c,url:u,minHeight:p}=e,m=(0,Ne.getColorClassName)("background-color",c),d=(0,Ne.__experimentalGetGradientClass)(r),f=t===Yt?tc(u):{};m||(f.backgroundColor=a),l&&!s&&(f.backgroundPosition=`${l.x*100}% ${l.y*100}%`),o&&!u&&(f.background=o),f.minHeight=p||void 0;let h=S(Md(i),m,{"has-background-dim":i!==0,"has-parallax":s,"has-background-gradient":o,[d]:!u&&d});return(0,he.jsxs)("div",{className:h,style:f,children:[u&&(r||o)&&i!==0&&(0,he.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__gradient-background",d),style:o?{background:o}:void 0}),Er===t&&u&&(0,he.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),(0,he.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,he.jsx)(Ne.InnerBlocks.Content,{})})]})},migrate:(0,Eb.compose)(i3,Lp)},E5e={attributes:{...zd,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save({attributes:e}){let{backgroundType:t,contentAlign:r,customOverlayColor:o,dimRatio:a,focalPoint:i,hasParallax:l,overlayColor:s,title:c,url:u}=e,p=(0,Ne.getColorClassName)("background-color",s),m=t===Yt?tc(u):{};p||(m.backgroundColor=o),i&&!l&&(m.backgroundPosition=`${i.x*100}% ${i.y*100}%`);let d=S(Md(a),p,{"has-background-dim":a!==0,"has-parallax":l,[`has-${r}-content`]:r!=="center"});return(0,he.jsxs)("div",{className:d,style:m,children:[Er===t&&u&&(0,he.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!Ne.RichText.isEmpty(c)&&(0,he.jsx)(Ne.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:c})]})},migrate(e){let t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:r,contentAlign:o,...a}=t;return[a,[(0,n3.createBlock)("core/paragraph",{content:e.title,style:{typography:{textAlign:e.contentAlign}},fontSize:"large",placeholder:(0,a3.__)("Write title\u2026")})]]}},B5e={attributes:{...zd,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save({attributes:e}){let{url:t,title:r,hasParallax:o,dimRatio:a,align:i,contentAlign:l,overlayColor:s,customOverlayColor:c}=e,u=(0,Ne.getColorClassName)("background-color",s),p=tc(t);u||(p.backgroundColor=c);let m=S("wp-block-cover-image",Md(a),u,{"has-background-dim":a!==0,"has-parallax":o,[`has-${l}-content`]:l!=="center"},i?`align${i}`:null);return(0,he.jsx)("div",{className:m,style:p,children:!Ne.RichText.isEmpty(r)&&(0,he.jsx)(Ne.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r})})},migrate(e){let t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:r,contentAlign:o,align:a,...i}=t;return[i,[(0,n3.createBlock)("core/paragraph",{content:e.title,style:{typography:{textAlign:e.contentAlign}},fontSize:"large",placeholder:(0,a3.__)("Write title\u2026")})]]}},N5e={attributes:{...zd,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save({attributes:e}){let{url:t,title:r,hasParallax:o,dimRatio:a,align:i}=e,l=tc(t),s=S("wp-block-cover-image",Md(a),{"has-background-dim":a!==0,"has-parallax":o},i?`align${i}`:null);return(0,he.jsx)("section",{className:s,style:l,children:(0,he.jsx)(Ne.RichText.Content,{tagName:"h2",value:r})})},migrate(e){let t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:r,contentAlign:o,align:a,...i}=t;return[i,[(0,n3.createBlock)("core/paragraph",{content:e.title,style:{typography:{textAlign:e.contentAlign}},fontSize:"large",placeholder:(0,a3.__)("Write title\u2026")})]]}},bZ=[v5e,b5e,y5e,_5e,x5e,k5e,w5e,C5e,S5e,T5e,P5e,E5e,B5e,N5e];var Lb=n(re(),1),Rn=n(H(),1),Hd=n(O(),1),b3=n(ve(),1),Kr=n(E(),1),ML=n(N(),1),bu=n(F(),1),pK=n(Ar(),1),mK=n(Sr(),1);var PZ=n(H(),1),lr=n(O(),1),EZ=n(ve(),1),an=n(E(),1),wo=n(N(),1),CL=n(F(),1),BZ=n(re(),1);var yZ=n(E(),1);var{cleanEmptyObject:l3,getStyleForState:I5e,setStyleForState:_Z}=U(yZ.privateApis);function wL(e,t){return I5e(e,t)||{}}function D5e(e,t={}){return Object.fromEntries(Object.entries(e).map(([r,o])=>[t[r]||r,o]))}function L5e(e,t){return t?Object.fromEntries(t.map(r=>[r,e[r]])):e}function Xh(e){return[e?.viewport||"default",e?.pseudo||"default"].join(":")}function R5e(e,t){return wL(e,t)?.dimensions||{}}function wi(e={}){let{attributes:t={},style:r=t?.style,selectedState:o,hasSelectedStyleState:a,attributeKey:i,styleKey:l=i,rootValue:s}=e;return a?R5e(r,o)?.[l]:Object.hasOwn(e,"rootValue")?s:t?.[i]}function A5e(e,t,r){let o=wL(e,t);return _Z(e,t,l3({...o,dimensions:l3({...o?.dimensions,...r})}))}function Jh({style:e,selectedState:t,hasSelectedStyleState:r,nextDimensions:o,dimensionKeyMap:a,dimensionKeys:i}){let l=L5e(o,i);return r?{style:A5e(e,t,D5e(l,a))}:l}function xZ(e,t){let r=Object.fromEntries(t.map(o=>[o,void 0]));return l3({...e,dimensions:l3({...e?.dimensions,...r})})}function M5e(e,t,r){return _Z(e,t,xZ(wL(e,t),r))}function eg({attributes:e={},style:t=e?.style,selectedState:r,hasSelectedStyleState:o,keys:a,defaultAttributes:i={}}){return{...o?{}:{...e,...i},style:o?M5e(t,r,a):xZ(t,a)}}var Vd="full";var tg=n(E(),1),wZ=n(Sr(),1),ma=n(O(),1),CZ=n(Ar(),1),Ci=n(N(),1),s3=n(H(),1),SZ=n(ve(),1),c3=n(F(),1),Ln=n(y(),1),kZ=["image"];function TZ({poster:e,onChange:t}){let r=(0,s3.useRef)(),[o,a]=(0,s3.useState)(!1),i=(0,SZ.useInstanceId)(TZ,"block-library-poster-image-description"),{getSettings:l}=(0,c3.useSelect)(tg.store),{createErrorNotice:s}=(0,c3.useDispatch)(wZ.store),c=p=>{l().mediaUpload({allowedTypes:kZ,filesList:p,onFileChange:([m])=>{if((0,CZ.isBlobURL)(m?.url)){a(!0);return}m&&t(m),a(!1)},onError:m=>{s(m,{id:"poster-image-upload-notice",type:"snackbar"}),a(!1)},multiple:!1})},u=()=>!e&&o?(0,Ln.jsx)(ma.Spinner,{}):e?(0,Ci.__)("Replace"):(0,Ci.__)("Set poster image");return(0,Ln.jsx)(tg.MediaUploadCheck,{children:(0,Ln.jsxs)(ma.__experimentalToolsPanelItem,{label:(0,Ci.__)("Poster image"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>t(void 0),children:[(0,Ln.jsx)(ma.BaseControl.VisualLabel,{children:(0,Ci.__)("Poster image")}),(0,Ln.jsx)(tg.MediaUpload,{title:(0,Ci.__)("Select poster image"),onSelect:t,allowedTypes:kZ,render:({open:p})=>(0,Ln.jsxs)("div",{className:"block-library-poster-image__container",children:[e&&(0,Ln.jsxs)(ma.Button,{__next40pxDefaultSize:!0,onClick:p,"aria-haspopup":"dialog","aria-label":(0,Ci.__)("Edit or replace the poster image."),className:"block-library-poster-image__preview",disabled:o,accessibleWhenDisabled:!0,children:[(0,Ln.jsx)("img",{src:e,alt:(0,Ci.__)("Poster image preview"),className:"block-library-poster-image__preview-image"}),o&&(0,Ln.jsx)(ma.Spinner,{})]}),(0,Ln.jsxs)(ma.__experimentalHStack,{className:S("block-library-poster-image__actions",{"block-library-poster-image__actions-select":!e}),children:[(0,Ln.jsx)(ma.Button,{__next40pxDefaultSize:!0,onClick:p,ref:r,className:"block-library-poster-image__action","aria-describedby":i,"aria-haspopup":"dialog",variant:e?void 0:"secondary",disabled:o,accessibleWhenDisabled:!0,children:u()}),(0,Ln.jsx)("p",{id:i,hidden:!0,children:e?(0,Ci.sprintf)((0,Ci.__)("The current poster image url is %s."),e):(0,Ci.__)("There is no poster image currently selected.")}),!!e&&(0,Ln.jsx)(ma.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(void 0),r.current.focus()},className:"block-library-poster-image__action",disabled:o,accessibleWhenDisabled:!0,children:(0,Ci.__)("Remove")})]}),(0,Ln.jsx)(ma.DropZone,{onFilesDrop:c})]})})]})})}var u3=TZ;var _t=n(y(),1),{cleanEmptyObject:z5e,isDefaultBlockStyleState:V5e,ResolutionTool:O5e,HTMLElementControl:F5e}=U(an.privateApis);function H5e({onChange:e,onUnitChange:t,unit:r="px",value:o=""}){let i=`block-cover-height-input-${(0,EZ.useInstanceId)(lr.__experimentalUnitControl)}`,l=r==="px",[s]=(0,an.useSettings)("spacing.units"),c=(0,lr.__experimentalUseCustomUnits)({availableUnits:s||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),u=d=>{let f=d!==""?parseFloat(d):void 0;isNaN(f)&&f!==void 0||e(f)},p=(0,PZ.useMemo)(()=>{let[d]=(0,lr.__experimentalParseQuantityAndUnitFromRawValue)(o);return[d,r].join("")},[r,o]),m=l?gZ:0;return(0,_t.jsx)(lr.__experimentalUnitControl,{label:(0,wo.__)("Minimum height"),id:i,isResetValueOnUnitChange:!0,min:m,onChange:u,onUnitChange:t,units:c,value:p})}function NZ({attributes:e,setAttributes:t,clientId:r,setOverlayColor:o,coverRef:a,currentSettings:i,updateDimRatio:l,featuredImage:s}){let{useFeaturedImage:c,id:u,dimRatio:p,focalPoint:m,hasParallax:d,isRepeated:f,minHeight:h,minHeightUnit:g,alt:v,tagName:b,poster:_}=e,{isVideoBackground:k,isImageBackground:x,mediaElement:w,url:C,overlayColor:P}=i,B=e.sizeSlug||Vd,{gradientValue:I,setGradient:D}=(0,an.__experimentalUseGradient)(),{imageSizes:T,selectedStyleState:L}=(0,CL.useSelect)(le=>{let{getSettings:Pe,getSelectedBlockStyleState:Ee}=U(le(an.store));return{imageSizes:Pe()?.imageSizes,selectedStyleState:Ee(r)}},[r]),A=!V5e(L),z=Xh(L),j=wi({attributes:e,selectedState:L,hasSelectedStyleState:A,attributeKey:"minHeight",styleKey:"minHeight",rootValue:void 0}),[G,W]=(0,lr.__experimentalParseQuantityAndUnitFromRawValue)(j||""),$=A?G:h,V=A&&W||g,Q=wi({attributes:e,selectedState:L,hasSelectedStyleState:A,attributeKey:"aspectRatio",rootValue:e?.style?.dimensions?.aspectRatio}),Y=(0,CL.useSelect)(le=>u&&x?le(BZ.store).getEntityRecord("postType","attachment",u,{context:"view"}):null,[u,x]),ee=c?s:Y;function te(le){let Pe=ee?.media_details?.sizes?.[le]?.source_url;if(!Pe)return null;t({url:Pe,sizeSlug:le})}let ae=T?.filter(({slug:le})=>ee?.media_details?.sizes?.[le]?.source_url)?.map(({name:le,slug:Pe})=>({value:Pe,label:le})),J=()=>{t({hasParallax:!d,...d?{}:{focalPoint:void 0}})},ce=()=>{t({isRepeated:!f})},ie=k||x,we=le=>{let[Pe,Ee]=w.current?[w.current.style,"objectPosition"]:[a.current.style,"backgroundPosition"];Pe[Ee]=nn(le)},se=(0,an.__experimentalUseMultipleOriginColorsAndGradients)(),de=se.hasColorsOrGradients&&!A,ge=(le,Pe)=>{if(A){t(Jh({style:e.style,selectedState:L,hasSelectedStyleState:A,nextDimensions:{minHeight:le===void 0?void 0:`${le}${Pe||V||"px"}`,aspectRatio:void 0}}));return}t({minHeight:le,style:z5e({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})})},oe=(le=e)=>eg({style:le.style,selectedState:L,hasSelectedStyleState:A,keys:["minHeight"],defaultAttributes:{minHeight:void 0,minHeightUnit:void 0}}),me=Z();return(0,_t.jsxs)(_t.Fragment,{children:[(!!C||c)&&(0,_t.jsx)(an.InspectorControls,{children:(0,_t.jsxs)(lr.__experimentalToolsPanel,{label:(0,wo.__)("Settings"),resetAll:()=>{t({hasParallax:!1,focalPoint:void 0,isRepeated:!1,alt:"",poster:void 0}),te(Vd)},dropdownMenuProps:me,children:[x&&(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(lr.__experimentalToolsPanelItem,{label:(0,wo.__)("Fixed background"),isShownByDefault:!0,hasValue:()=>!!d,onDeselect:()=>t({hasParallax:!1,focalPoint:void 0}),children:(0,_t.jsx)(lr.ToggleControl,{label:(0,wo.__)("Fixed background"),checked:!!d,onChange:J})}),(0,_t.jsx)(lr.__experimentalToolsPanelItem,{label:(0,wo.__)("Repeated background"),isShownByDefault:!0,hasValue:()=>f,onDeselect:()=>t({isRepeated:!1}),children:(0,_t.jsx)(lr.ToggleControl,{label:(0,wo.__)("Repeated background"),checked:f,onChange:ce})})]}),ie&&(0,_t.jsx)(lr.__experimentalToolsPanelItem,{label:(0,wo.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!m,onDeselect:()=>t({focalPoint:void 0}),children:(0,_t.jsx)(lr.FocalPointPicker,{label:(0,wo.__)("Focal point"),url:C,value:m,onDragStart:we,onDrag:we,onChange:le=>t({focalPoint:le})})}),k&&(0,_t.jsx)(u3,{poster:_,onChange:le=>t({poster:le?.url})}),!c&&C&&!k&&(0,_t.jsx)(lr.__experimentalToolsPanelItem,{label:(0,wo.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!v,onDeselect:()=>t({alt:""}),children:(0,_t.jsx)(lr.TextareaControl,{label:(0,wo.__)("Alternative text"),value:v,onChange:le=>t({alt:le}),help:(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(cu,{openInNewTab:!0,href:(0,wo.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,wo.__)("Describe the purpose of the image.")}),(0,_t.jsx)("br",{}),(0,wo.__)("Leave empty if decorative.")]})})}),!!ae?.length&&(0,_t.jsx)(O5e,{value:B,onChange:te,options:ae,defaultValue:Vd})]})}),de&&(0,_t.jsxs)(an.InspectorControls,{group:"color",children:[(0,_t.jsx)(an.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:P.color,gradientValue:I,label:(0,wo.__)("Overlay"),onColorChange:o,onGradientChange:D,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:r,...se}),(0,_t.jsx)(lr.__experimentalToolsPanelItem,{hasValue:()=>p===void 0?!1:p!==(C?50:100),label:(0,wo.__)("Overlay opacity"),onDeselect:()=>l(C?50:100),resetAllFilter:()=>({dimRatio:C?50:100}),isShownByDefault:!0,panelId:r,children:(0,_t.jsx)(lr.RangeControl,{label:(0,wo.__)("Overlay opacity"),value:p,onChange:le=>l(le),min:0,max:100,step:10,required:!0})})]}),(0,_t.jsx)(an.InspectorControls,{group:"dimensions",children:(0,_t.jsx)(lr.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!$,label:(0,wo.__)("Minimum height"),onDeselect:()=>t(oe()),resetAllFilter:oe,isShownByDefault:!0,panelId:r,children:(0,_t.jsx)(H5e,{value:Q?"":$,unit:V,onChange:le=>ge(le),onUnitChange:le=>{if(A){$!==void 0&&ge($,le);return}t({minHeightUnit:le})}})},z)}),(0,_t.jsx)(an.InspectorControls,{group:"advanced",children:(0,_t.jsx)(F5e,{tagName:b,onChange:le=>t({tagName:le}),clientId:r,options:[{label:(0,wo.__)("Default ()"),value:"div"},{label:"
",value:"header"},{label:"",value:"main"},{label:"",value:"section"},{label:"",value:"article"},{label:"",value:"aside"},{label:"",value:"footer"}]})})]})}var p3=n(H(),1),ls=n(E(),1),ng=n(N(),1),m3=n(O(),1);var SL=n(H(),1),og=n(O(),1),Od=n(N(),1);var IZ=n(q(),1);var j5e="core/embed",DZ=["youtube","vimeo","videopress","animoto","tiktok","wordpress-tv"];function LZ(e){return Array.isArray(e)?DZ.filter(t=>e.includes(t)):[]}function RZ(e,t){return e?U5e(e,t)!==null:!1}function U5e(e,t=DZ){let r=(0,IZ.getBlockVariations)(j5e);if(!r)return null;let o=r.find(({patterns:a})=>EI(e,a));return!o||!t.includes(o.name)?null:o}function AZ(e){let t=e?.match(/src=["']([^"']+)["']/);if(!t)return null;let r=t[1],o=W5e(r);return e.replace(r,o)}function G5e(e){if(!e)return null;let t=e.toLowerCase();return t.includes("youtube.com")||t.includes("youtu.be")?"youtube":t.includes("vimeo.com")?"vimeo":t.includes("videopress.com")?"videopress":t.includes("animoto.com")?"animoto":t.includes("tiktok.com")?"tiktok":t.includes("wordpress.tv")?"wordpress-tv":null}function W5e(e){if(!e)return e;try{let t=new URL(e);switch(G5e(e)){case"youtube":t.searchParams.set("autoplay","1"),t.searchParams.set("mute","1"),t.searchParams.set("loop","1"),t.searchParams.set("controls","0"),t.searchParams.set("showinfo","0"),t.searchParams.set("modestbranding","1"),t.searchParams.set("playsinline","1"),t.searchParams.set("rel","0");let o=t.pathname.split("/").pop();o&&t.searchParams.set("playlist",o);break;case"vimeo":t.searchParams.set("autoplay","1"),t.searchParams.set("muted","1"),t.searchParams.set("loop","1"),t.searchParams.set("background","1"),t.searchParams.set("controls","0");break;case"videopress":case"wordpress-tv":t.searchParams.set("autoplay","1"),t.searchParams.set("loop","1"),t.searchParams.set("muted","1");break;default:t.searchParams.set("autoplay","1"),t.searchParams.set("muted","1"),t.searchParams.set("loop","1");break}return t.toString()}catch{return e}}var rg=n(y(),1);function MZ({onSubmit:e,onClose:t,initialUrl:r="",allowedVideoProviders:o}){let[a,i]=(0,SL.useState)(r),[l,s]=(0,SL.useState)("");return(0,rg.jsx)(og.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{if(!a){s((0,Od.__)("Please enter a URL."));return}if(!RZ(a,o)){s((0,Od.__)("This URL is not supported. Please enter a valid video link from a supported provider."));return}e(a),t()},onCancel:t,confirmButtonText:(0,Od.__)("Add video"),size:"medium",children:(0,rg.jsxs)(kp,{direction:"column",gap:"lg",children:[l&&(0,rg.jsx)(og.Notice,{status:"error",isDismissible:!1,children:l}),(0,rg.jsx)(og.TextControl,{type:"url",label:(0,Od.__)("Video URL"),value:a,onChange:u=>{i(u),s("")},placeholder:(0,Od.__)("Enter YouTube, Vimeo, or other video URL"),help:(0,Od.__)("Add a background video to the cover block that will autoplay in a loop.")})]})})}var Si=n(y(),1),{cleanEmptyObject:$5e}=U(ls.privateApis);function zZ({attributes:e,setAttributes:t,onSelectMedia:r,currentSettings:o,toggleUseFeaturedImage:a,onClearMedia:i,onSelectEmbedUrl:l,onEditMedia:s,editMediaButtonRef:c,showEditMediaButton:u,isEditMediaDisabled:p,blockEditingMode:m}){let{contentPosition:d,id:f,useFeaturedImage:h,minHeight:g,minHeightUnit:v,backgroundType:b,allowedVideoProviders:_}=e,{hasInnerBlocks:k,url:x}=o,w=LZ(_),C=w.length>0,[P,B]=(0,p3.useState)(g),[I,D]=(0,p3.useState)(v),[T,L]=(0,p3.useState)(!1),A=v==="vh"&&g===100&&!e?.style?.dimensions?.aspectRatio,z=m==="contentOnly",j=()=>A?t(I==="vh"&&P===100?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:P,minHeightUnit:I}):(B(g),D(v),t({minHeight:100,minHeightUnit:"vh",style:$5e({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})}));return(0,Si.jsxs)(Si.Fragment,{children:[!z&&(0,Si.jsxs)(ls.BlockControls,{group:"block",children:[(0,Si.jsx)(ls.__experimentalBlockAlignmentMatrixControl,{label:(0,ng.__)("Change content position"),value:d,onChange:G=>t({contentPosition:G}),isDisabled:!k}),(0,Si.jsx)(ls.__experimentalBlockFullHeightAligmentControl,{isActive:A,onToggle:j,isDisabled:!k}),u&&(0,Si.jsx)(m3.ToolbarButton,{ref:c,icon:Xm,label:(0,ng.__)("Crop background image"),onClick:s,"aria-haspopup":"dialog",disabled:p})]}),(0,Si.jsx)(ls.BlockControls,{group:"other",children:(0,Si.jsx)(ls.MediaReplaceFlow,{mediaId:f,mediaURL:x,allowedTypes:o3,onSelect:r,onToggleFeaturedImage:a,useFeaturedImage:h,name:x?(0,ng.__)("Replace"):(0,ng.__)("Add media"),onReset:i,variant:"toolbar",children:({onClose:G})=>C?(0,Si.jsx)(m3.MenuItem,{icon:di,onClick:()=>{L(!0),G()},children:(0,ng.__)("Embed video from URL")}):null})}),T&&(0,Si.jsx)(MZ,{onSubmit:G=>{l(G)},onClose:()=>L(!1),initialUrl:b===hu?x:"",allowedVideoProviders:w})]})}var d3=n(E(),1),VZ=n(N(),1);var OZ=n(Ar(),1);var TL=n(y(),1);function PL({disableMediaButtons:e=!1,children:t,onSelectMedia:r,onError:o,style:a,toggleUseFeaturedImage:i}){let l=s=>{s.length===1&&r({url:(0,OZ.createBlobURL)(s[0])})};return(0,TL.jsx)(d3.MediaPlaceholder,{icon:(0,TL.jsx)(d3.BlockIcon,{icon:Qm}),labels:{title:(0,VZ.__)("Cover")},onSelect:r,allowedTypes:o3,disableMediaButtons:e,onToggleFeaturedImage:i,onFilesPreUpload:l,onError:o,style:a,children:t})}var FZ=n(H(),1),HZ=n(E(),1);var jZ=n(y(),1),q5e={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},{ResizableBoxPopover:Z5e}=U(HZ.privateApis);function EL({className:e,height:t,minHeight:r,onResize:o,onResizeStart:a,onResizeStop:i,showHandle:l,size:s,width:c,...u}){let[p,m]=(0,FZ.useState)(!1),d={className:S(e,{"is-resizing":p}),enable:q5e,onResizeStart:(f,h,g)=>{a(g.clientHeight),o(g.clientHeight)},onResize:(f,h,g)=>{o(g.clientHeight),p||m(!0)},onResizeStop:(f,h,g)=>{i(g.clientHeight),m(!1)},showHandle:l,size:s,__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"y",position:"bottom",isVisible:p}};return(0,jZ.jsx)(Z5e,{className:"block-library-cover__resizable-box-popover",resizableBoxProps:d,...u})}var K5e={grad:.9,turn:360,rad:360/(2*Math.PI)},gu=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},zo=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},vl=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},YZ=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},UZ=function(e){return{r:vl(e.r,0,255),g:vl(e.g,0,255),b:vl(e.b,0,255),a:vl(e.a)}},BL=function(e){return{r:zo(e.r),g:zo(e.g),b:zo(e.b),a:zo(e.a,3)}},Y5e=/^#([0-9a-f]{3,8})$/i,f3=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},QZ=function(e){var t=e.r,r=e.g,o=e.b,a=e.a,i=Math.max(t,r,o),l=i-Math.min(t,r,o),s=l?i===t?(r-o)/l:i===r?2+(o-t)/l:4+(t-r)/l:0;return{h:60*(s<0?s+6:s),s:i?l/i*100:0,v:i/255*100,a}},XZ=function(e){var t=e.h,r=e.s,o=e.v,a=e.a;t=t/360*6,r/=100,o/=100;var i=Math.floor(t),l=o*(1-r),s=o*(1-(t-i)*r),c=o*(1-(1-t+i)*r),u=i%6;return{r:255*[o,s,l,l,c,o][u],g:255*[c,o,o,s,l,l][u],b:255*[l,l,c,o,o,s][u],a}},GZ=function(e){return{h:YZ(e.h),s:vl(e.s,0,100),l:vl(e.l,0,100),a:vl(e.a)}},WZ=function(e){return{h:zo(e.h),s:zo(e.s),l:zo(e.l),a:zo(e.a,3)}},$Z=function(e){return XZ((r=(t=e).s,{h:t.h,s:(r*=((o=t.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:t.a}));var t,r,o},Nb=function(e){return{h:(t=QZ(e)).h,s:(a=(200-(r=t.s))*(o=t.v)/100)>0&&a<200?r*o/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,r,o,a},Q5e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,X5e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,J5e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ewe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,DL={string:[[function(e){var t=Y5e.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?zo(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?zo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=J5e.exec(e)||ewe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:UZ({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Q5e.exec(e)||X5e.exec(e);if(!t)return null;var r,o,a=GZ({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(K5e[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return $Z(a)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,o=e.b,a=e.a,i=a===void 0?1:a;return gu(t)&&gu(r)&&gu(o)?UZ({r:Number(t),g:Number(r),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,o=e.l,a=e.a,i=a===void 0?1:a;if(!gu(t)||!gu(r)||!gu(o))return null;var l=GZ({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return $Z(l)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,a=e.a,i=a===void 0?1:a;if(!gu(t)||!gu(r)||!gu(o))return null;var l=(function(s){return{h:YZ(s.h),s:vl(s.s,0,100),v:vl(s.v,0,100),a:vl(s.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return XZ(l)},"hsv"]]},qZ=function(e,t){for(var r=0;r=.5},e.prototype.toHex=function(){return t=BL(this.rgba),r=t.r,o=t.g,a=t.b,l=(i=t.a)<1?f3(zo(255*i)):"","#"+f3(r)+f3(o)+f3(a)+l;var t,r,o,a,i,l},e.prototype.toRgb=function(){return BL(this.rgba)},e.prototype.toRgbString=function(){return t=BL(this.rgba),r=t.r,o=t.g,a=t.b,(i=t.a)<1?"rgba("+r+", "+o+", "+a+", "+i+")":"rgb("+r+", "+o+", "+a+")";var t,r,o,a,i},e.prototype.toHsl=function(){return WZ(Nb(this.rgba))},e.prototype.toHslString=function(){return t=WZ(Nb(this.rgba)),r=t.h,o=t.s,a=t.l,(i=t.a)<1?"hsla("+r+", "+o+"%, "+a+"%, "+i+")":"hsl("+r+", "+o+"%, "+a+"%)";var t,r,o,a,i},e.prototype.toHsv=function(){return t=QZ(this.rgba),{h:zo(t.h),s:zo(t.s),v:zo(t.v),a:zo(t.a,3)};var t},e.prototype.invert=function(){return Br({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Br(NL(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Br(NL(this.rgba,-t))},e.prototype.grayscale=function(){return Br(NL(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Br(ZZ(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Br(ZZ(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Br({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):zo(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Nb(this.rgba);return typeof t=="number"?Br({h:t,s:r.s,l:r.l,a:r.a}):zo(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Br(t).toHex()},e})(),Br=function(e){return e instanceof LL?e:new LL(e)},KZ=[],JZ=function(e){e.forEach(function(t){KZ.indexOf(t)<0&&(t(LL,DL),KZ.push(t))})};function eK(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var a in r)o[r[a]]=a;var i={};e.prototype.toName=function(l){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var s,c,u=o[this.toHex()];if(u)return u;if(l?.closest){var p=this.toRgb(),m=1/0,d="black";if(!i.length)for(var f in r)i[f]=new e(r[f]).toRgb();for(var h in r){var g=(s=p,c=i[h],Math.pow(s.r-c.r,2)+Math.pow(s.g-c.g,2)+Math.pow(s.b-c.b,2));g=t-r&&e<=t+r}function cwe(e,t,r){var o=r[0],a=r[1],i=r[2],l=r[3],s=r[4],c=e[t+3],u=h3(c,l,s);return l?!!(!c&&u||h3(e[t],o,s)&&h3(e[t+1],a,s)&&h3(e[t+2],i,s)&&u):u}function uwe(e,t,r){for(var o={},a=24,i=r.ignoredColor,l=r.step,s=[0,0,0,0,0],c=0;ci?(c=a/i,l=RL,s=Math.round(l/c)):(c=i/a,s=RL,l=Math.round(s/c)),(l>a||s>i||l"u";function xwe(){return _we?new OffscreenCanvas(1,1):document.createElement("canvas")}var iK="FastAverageColor: ";function g3(e,t,r){t||(console.error(iK+e),r&&console.error(r))}function Ib(e){return Error(iK+e)}var lK=(function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(t,r){if(!t)return Promise.reject(Ib("call .getColorAsync() without resource."));if(typeof t=="string"){if(typeof Image>"u")return Promise.reject(Ib("resource as string is not supported in this environment"));var o=new Image;return o.crossOrigin=r&&r.crossOrigin||"",o.src=t,this.bindImageEvents(o,r)}else{if(aK(t)&&!t.complete)return this.bindImageEvents(t,r);var a=this.getColor(t,r);return a.error?Promise.reject(a.error):Promise.resolve(a)}},e.prototype.getColor=function(t,r){r=r||{};var o=rK(r);if(!t)return g3("call .getColor(null) without resource",r.silent),this.prepareResult(o);var a=fwe(t),i=ywe(a,r);if(!i.srcWidth||!i.srcHeight||!i.destWidth||!i.destHeight)return g3('incorrect sizes for resource "'.concat(nK(t),'"'),r.silent),this.prepareResult(o);if(this.canvas||(this.canvas=xwe()),!this.ctx&&(this.ctx=this.canvas.getContext&&this.canvas.getContext("2d"),!this.ctx))return g3("Canvas Context 2D is not supported in this browser",r.silent),this.prepareResult(o);this.canvas.width=i.destWidth,this.canvas.height=i.destHeight;var l=o;try{this.ctx.clearRect(0,0,i.destWidth,i.destHeight),this.ctx.drawImage(t,i.srcLeft,i.srcTop,i.srcWidth,i.srcHeight,0,0,i.destWidth,i.destHeight);var s=this.ctx.getImageData(0,0,i.destWidth,i.destHeight).data;l=this.getColorFromArray4(s,r)}catch(c){g3("security error (CORS) for resource ".concat(nK(t),`.
Details: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image`),r.silent,c)}return this.prepareResult(l)},e.prototype.getColorFromArray4=function(t,r){r=r||{};var o=4,a=t.length,i=rK(r);if(a{if(!e)return ag;let{r:t,g:r,b:o,a}=Br(ag).toRgb();try{let i=(0,cK.applyFilters)("media.crossOrigin",void 0,e);return(await v3().getColorAsync(e,{defaultColor:[t,r,o,a*255],silent:!0,crossOrigin:i})).hex}catch{return ag}});function Rp(e,t,r){if(t===r||e===100)return Br(t).isDark();let o=Br(t).alpha(e/100).toRgb(),a=Br(r).toRgb(),i=kwe(o,a);return Br(i).isDark()}var Qt=n(y(),1),{openMediaEditorModalKey:wwe}=U(Kr.privateApis);function Cwe(e){return[["core/paragraph",{style:{typography:{textAlign:"center"}},placeholder:(0,ML.__)("Write title\u2026"),...e}]]}var Swe=(e,t)=>!e&&(0,pK.isBlobURL)(t);function Twe({attributes:e,clientId:t,isSelected:r,overlayColor:o,setAttributes:a,setOverlayColor:i,toggleSelection:l,context:{postId:s,postType:c}}){let{contentPosition:u,id:p,url:m,backgroundType:d,useFeaturedImage:f,dimRatio:h,focalPoint:g,hasParallax:v,isDark:b,isRepeated:_,minHeight:k,minHeightUnit:x,alt:w,allowedBlocks:C,templateLock:P,tagName:B="div",isUserOverlayColor:I,sizeSlug:D,poster:T}=e,[L]=(0,Lb.useEntityProp)("postType",c,"featured_media",s),{getSettings:A}=(0,bu.useSelect)(Kr.store),z=(0,bu.useSelect)(Se=>Se(Kr.store).getSettings()[wwe],[]),{__unstableMarkNextChangeAsNotPersistent:j}=(0,bu.useDispatch)(Kr.store),G=(0,Rn.useRef)({attributes:e,overlayColor:o});(0,Rn.useLayoutEffect)(()=>{G.current={attributes:e,overlayColor:o}});let{media:W}=(0,bu.useSelect)(Se=>({media:L&&f?Se(Lb.store).getEntityRecord("postType","attachment",L,{context:"view"}):void 0}),[L,f]),$=W?.media_details?.sizes?.[D]?.source_url??W?.source_url;(0,Rn.useEffect)(()=>{(async()=>{if(!f)return;let Se=await Fd($),{attributes:it,overlayColor:hr}=G.current,wr=hr.color;it.isUserOverlayColor||(wr=Se,j(),i(wr));let Ro=Rp(it.dimRatio,wr,Se);j(),a({isDark:Ro,isUserOverlayColor:it.isUserOverlayColor||!1})})()},[$,j,a,i,f]);let V=f?$:m?.replaceAll("&","&"),Q=f?Yt:d,{createErrorNotice:Y}=(0,bu.useDispatch)(mK.store),{gradientClass:ee,gradientValue:te}=(0,Kr.__experimentalUseGradient)(),ae=async Se=>{let it=vZ(Se),hr=[Se?.type,Se?.media_type].includes(Yt),wr=await Fd(hr?Se?.url:void 0),{attributes:Ro,overlayColor:rl}=G.current,Aa=rl.color;Ro.isUserOverlayColor||(Aa=wr,i(Aa),j());let Fs=Ro.url===void 0&&Ro.dimRatio===100?50:Ro.dimRatio,Ma=Rp(Fs,Aa,wr);if(Q===Yt&&it?.id){let{imageDefaultSize:ol}=A();D&&(Se?.sizes?.[D]||Se?.media_details?.sizes?.[D])?(it.sizeSlug=D,it.url=Se?.sizes?.[D]?.url||Se?.media_details?.sizes?.[D]?.source_url):Se?.sizes?.[ol]||Se?.media_details?.sizes?.[ol]?(it.sizeSlug=ol,it.url=Se?.sizes?.[ol]?.url||Se?.media_details?.sizes?.[ol]?.source_url):it.sizeSlug=Vd}a({...it,focalPoint:void 0,useFeaturedImage:void 0,dimRatio:Fs,isDark:Ma,isUserOverlayColor:Ro.isUserOverlayColor||!1})},J=()=>{let Se=o.color;!I&&o.color&&(Se=uK,i(void 0),j());let it=Rp(h,Se,ag);a({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0,isDark:it})},ce=async Se=>{let it=await Fd(V),{attributes:hr}=G.current,wr=Rp(hr.dimRatio,Se,it);i(Se),j(),a({isUserOverlayColor:!0,isDark:wr})},ie=async Se=>{let it=await Fd(V),{overlayColor:hr}=G.current,wr=Rp(Se,hr.color,it);a({dimRatio:Se,isDark:wr})},we=Se=>{Y(Se,{type:"snackbar"})},se=Se=>{a({url:Se,backgroundType:hu,dimRatio:m===void 0&&h===100?50:h,id:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0})},{embedPreview:de,isFetchingEmbed:ge}=(0,bu.useSelect)(Se=>{if(Q!==hu||!V)return{embedPreview:void 0,isFetchingEmbed:!1};let{getEmbedPreview:it,isRequestingEmbedPreview:hr}=Se(Lb.store);return{embedPreview:it(V),isFetchingEmbed:hr(V)}},[V,Q]),oe=(0,Rn.useMemo)(()=>Q!==hu||!de?.html?null:AZ(de.html),[de,Q]),[me,le]=(0,Rn.useState)(!1),Pe=Swe(p,V),Ee=Yt===Q,X=Er===Q,Ce=hu===Q,pe=(0,Kr.useBlockEditingMode)(),$e=pe==="default",[fe,{height:Ae,width:Ft}]=(0,b3.useResizeObserver)(),ze=(0,Rn.useMemo)(()=>({height:x==="px"&&k?k:"auto",width:"auto"}),[k,x]),ro=k&&x?`${k}${x}`:k,oo=!(v||_),vo={minHeight:ro||void 0},bo=V?`url(${V})`:void 0,ta=nn(g),Ra={backgroundColor:o.color},ne={objectPosition:g&&oo?nn(g):void 0},Ve=!!(V||o.color||te),Je=(0,bu.useSelect)(Se=>Se(Kr.store).getBlock(t).innerBlocks.length>0,[t]),St=(0,Rn.useRef)(),qe=(0,Kr.useBlockProps)({ref:St}),[yo]=(0,Kr.useSettings)("typography.fontSizes"),Tn=yo?.length>0,Hl=Cwe({fontSize:Tn?"large":void 0}),ot=(0,Kr.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:Je?void 0:Hl,templateInsertUpdatesSelection:!0,allowedBlocks:C,templateLock:P,dropZoneElement:St.current}),Lo=(0,Rn.useRef)(),tp=(0,Rn.useRef)(),pi={isVideoBackground:X,isImageBackground:Ee,mediaElement:Lo,hasInnerBlocks:Je,url:V,isImgElement:oo,overlayColor:o},sh=(0,Rn.useCallback)(()=>{!p||!z||z({id:p,onClose:()=>{tp.current?.focus()},onUpdate:async({id:Se,url:it})=>{if(typeof Se!="number")return;Se!==p&&it&&le(!0);let hr={id:Se,backgroundType:Yt,...it?{url:it}:{},...Se!==p?{sizeSlug:Vd}:{}};if(it){let rl=await Fd(it),{attributes:Aa,overlayColor:Fs}=G.current,Ma=Fs.color;Aa.isUserOverlayColor||(Ma=rl,i(Ma),j()),hr.isDark=Rp(Aa.dimRatio,Ma,rl),hr.isUserOverlayColor=Aa.isUserOverlayColor||!1}a(hr);let{hasParallax:wr,isRepeated:Ro}=G.current.attributes;(wr||Ro)&&le(!1)}})},[p,z,a,i,j]),Fm=$e&&!f&&Ee&&!!p&&!!V&&!Pe&&!!z,Ko=async()=>{let Se=!f,it=Se?await Fd($):ag,{attributes:hr,overlayColor:wr}=G.current,Ro=hr.isUserOverlayColor?wr.color:it;hr.isUserOverlayColor||(i(Se?Ro:void 0),j());let rl=hr.dimRatio===100?50:hr.dimRatio,Aa=Rp(rl,Ro,it);a({id:void 0,url:void 0,useFeaturedImage:Se,dimRatio:rl,backgroundType:f?Yt:void 0,isDark:Aa})},ra=(0,Qt.jsx)(zZ,{attributes:e,setAttributes:a,onSelectMedia:ae,onSelectEmbedUrl:se,currentSettings:pi,toggleUseFeaturedImage:Ko,onClearMedia:J,blockEditingMode:pe,onEditMedia:sh,editMediaButtonRef:tp,showEditMediaButton:Fm,isEditMediaDisabled:me}),Xc=(0,Qt.jsx)(NZ,{attributes:e,setAttributes:a,clientId:t,setOverlayColor:ce,coverRef:St,currentSettings:pi,toggleUseFeaturedImage:Ko,updateDimRatio:ie,onClearMedia:J,featuredImage:W}),ch={className:"block-library-cover__resize-container",clientId:t,height:Ae,minHeight:ro,onResizeStart:()=>{a({minHeightUnit:"px"}),l(!1)},onResize:Se=>{a({minHeight:Se})},onResizeStop:Se=>{l(!0),a({minHeight:Se})},showHandle:!e.style?.dimensions?.aspectRatio,size:ze,width:Ft};if(!f&&!Je&&!Ve)return(0,Qt.jsxs)(Qt.Fragment,{children:[ra,Xc,$e&&r&&(0,Qt.jsx)(EL,{...ch}),(0,Qt.jsxs)(B,{...qe,className:S("is-placeholder",qe.className),style:{...qe.style,minHeight:ro||void 0},children:[fe,(0,Qt.jsx)(PL,{onSelectMedia:ae,onError:we,toggleUseFeaturedImage:Ko,children:(0,Qt.jsx)("div",{className:"wp-block-cover__placeholder-background-options",children:(0,Qt.jsx)(Kr.ColorPalette,{disableCustomColors:!0,value:o.color,onChange:ce,clearable:!1,asButtons:!0,"aria-label":(0,ML.__)("Overlay color")})})})]})]});let rp=S({"is-dark-theme":b,"is-light":!b,"is-transient":Pe||me,"has-parallax":v,"is-repeated":_,"has-custom-content-position":!pa(u)},Ua(u)),uh=V||!f||f&&!V;return(0,Qt.jsxs)(Qt.Fragment,{children:[ra,Xc,(0,Qt.jsxs)(B,{...qe,className:S(rp,qe.className),style:{...vo,...qe.style},"data-url":V,children:[fe,!V&&f&&(0,Qt.jsx)(Hd.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),V&&Ee&&(oo?(0,Qt.jsx)("img",{ref:Lo,className:"wp-block-cover__image-background",alt:w,src:V,style:ne,onLoad:()=>le(!1),onError:()=>le(!1)}):(0,Qt.jsx)("div",{ref:Lo,role:w?"img":void 0,"aria-label":w||void 0,className:S(rp,"wp-block-cover__image-background"),style:{backgroundImage:bo,backgroundPosition:ta}})),V&&X&&(0,Qt.jsx)("video",{ref:Lo,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:V,poster:T,style:ne}),Ce&&oe&&(0,Qt.jsx)("div",{ref:Lo,className:"wp-block-cover__video-background wp-block-cover__embed-background",style:ne,children:(0,Qt.jsx)(Hd.SandBox,{allowSameOrigin:!0,html:oe,title:"Background video",styles:["iframe{position:fixed;top:0;left:0;width:100%;height:100%;}"]})}),Ce&&!oe&&ge&&(0,Qt.jsx)(Hd.Spinner,{}),uh&&(0,Qt.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__background",gl(h),{[o.class]:o.class,"has-background-dim":h!==void 0,"wp-block-cover__gradient-background":V&&te&&h!==0,"has-background-gradient":te,[ee]:ee}),style:{backgroundImage:te,...Ra}}),(Pe||me)&&(0,Qt.jsx)(Hd.Spinner,{}),(0,Qt.jsx)(PL,{disableMediaButtons:!0,onSelectMedia:ae,onError:we,toggleUseFeaturedImage:Ko}),(0,Qt.jsx)("div",{...ot})]}),$e&&r&&(0,Qt.jsx)(EL,{...ch})]})}var dK=(0,b3.compose)([(0,Kr.withColors)({overlayColor:"background-color"})])(Twe);var y3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/cover",title:"Cover",category:"media",description:"Add an image or video with a text overlay.",textdomain:"default",attributes:{url:{type:"string",role:"content"},useFeaturedImage:{type:"boolean",default:!1},id:{type:"number"},alt:{type:"string",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},isUserOverlayColor:{type:"boolean"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]},tagName:{type:"string",default:"div"},sizeSlug:{type:"string"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},allowedVideoProviders:{type:"array",default:["youtube","vimeo","videopress","animoto","tiktok","wordpress-tv"]}},usesContext:["postId","postType"],supports:{anchor:!0,align:!0,html:!1,shadow:!0,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},dimensions:{aspectRatio:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1},interactivity:{clientNavigation:!0},filter:{duotone:!0},allowedBlocks:!0},selectors:{filter:{duotone:".wp-block-cover > .wp-block-cover__image-background, .wp-block-cover > .wp-block-cover__video-background"}},editorStyle:"wp-block-cover-editor",style:"wp-block-cover"};var Ap=n(E(),1);var rc=n(y(),1);function fK({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:p,isRepeated:m,overlayColor:d,url:f,alt:h,id:g,minHeight:v,minHeightUnit:b,tagName:_,sizeSlug:k,poster:x}=e,w=(0,Ap.getColorClassName)("background-color",d),C=(0,Ap.__experimentalGetGradientClass)(r),P=v&&b?`${v}${b}`:v,B=Yt===t,I=Er===t,D=hu===t,T=!(u||m),L={minHeight:P||void 0},A={backgroundColor:w?void 0:i,background:a||void 0},z=s&&T?nn(s):void 0,j=f?`url(${f})`:void 0,G=nn(s),W=S({"is-light":!p,"has-parallax":u,"is-repeated":m,"has-custom-content-position":!pa(o)},Ua(o)),$=S("wp-block-cover__image-background",g?`wp-image-${g}`:null,{[`size-${k}`]:k,"has-parallax":u,"is-repeated":m}),V=r||a;return(0,rc.jsxs)(_,{...Ap.useBlockProps.save({className:W,style:L}),children:[!c&&B&&f&&(T?(0,rc.jsx)("img",{className:$,alt:h,src:f,style:{objectPosition:z},"data-object-fit":"cover","data-object-position":z}):(0,rc.jsx)("div",{role:h?"img":void 0,"aria-label":h||void 0,className:$,style:{backgroundPosition:G,backgroundImage:j}})),I&&f&&(0,rc.jsx)("video",{className:S("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,poster:x,style:{objectPosition:z},"data-object-fit":"cover","data-object-position":z}),D&&f&&(0,rc.jsx)("figure",{className:S("wp-block-cover__video-background","wp-block-cover__embed-background","wp-block-embed"),children:(0,rc.jsx)("div",{className:"wp-block-embed__wrapper",children:f})}),(0,rc.jsx)("span",{"aria-hidden":"true",className:S("wp-block-cover__background",w,gl(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&V&&l!==0,"has-background-gradient":V,[C]:C}),style:A}),(0,rc.jsx)("div",{...Ap.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}var Ti=n(q(),1),hK=n(E(),1);var{cleanEmptyObject:_3}=U(hK.privateApis),Ewe={from:[{type:"block",blocks:["core/image"],transform:({caption:e,url:t,alt:r,align:o,id:a,anchor:i,style:l})=>(0,Ti.createBlock)("core/cover",{dimRatio:50,url:t,alt:r,align:o,id:a,anchor:i,style:{color:{duotone:l?.color?.duotone}}},[(0,Ti.createBlock)("core/paragraph",{content:e,fontSize:"large",style:{typography:{textAlign:"center"}}})])},{type:"block",blocks:["core/video"],transform:({caption:e,src:t,align:r,id:o,anchor:a})=>(0,Ti.createBlock)("core/cover",{dimRatio:50,url:t,align:r,id:o,backgroundType:Er,anchor:a},[(0,Ti.createBlock)("core/paragraph",{content:e,fontSize:"large",style:{typography:{textAlign:"center"}}})])},{type:"block",blocks:["core/group"],transform:(e,t)=>{let{align:r,anchor:o,backgroundColor:a,gradient:i,style:l}=e;if(t?.length===1&&t[0]?.name==="core/cover")return(0,Ti.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);let s=a||i||l?.color?.background||l?.color?.gradient?void 0:50,c={align:r,anchor:o,dimRatio:s,overlayColor:a,customOverlayColor:l?.color?.background,gradient:i,customGradient:l?.color?.gradient},u={...e,backgroundColor:void 0,gradient:void 0,style:_3({...e?.style,color:l?.color?{...l?.color,background:void 0,gradient:void 0}:void 0})};return(0,Ti.createBlock)("core/cover",c,[(0,Ti.createBlock)("core/group",u,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:({backgroundType:e,url:t,overlayColor:r,customOverlayColor:o,gradient:a,customGradient:i})=>t?e===Yt:!r&&!o&&!a&&!i,transform:({title:e,url:t,alt:r,align:o,id:a,anchor:i,style:l})=>(0,Ti.createBlock)("core/image",{caption:e,url:t,alt:r,align:o,id:a,anchor:i,style:{color:{duotone:l?.color?.duotone}}})},{type:"block",blocks:["core/video"],isMatch:({backgroundType:e,url:t,overlayColor:r,customOverlayColor:o,gradient:a,customGradient:i})=>t?e===Er:!r&&!o&&!a&&!i,transform:({title:e,url:t,align:r,id:o,anchor:a})=>(0,Ti.createBlock)("core/video",{caption:e,src:t,id:o,align:r,anchor:a})},{type:"block",blocks:["core/group"],isMatch:({url:e,useFeaturedImage:t})=>!(e||t),transform:(e,t)=>{let r={backgroundColor:e?.overlayColor,gradient:e?.gradient,style:_3({...e?.style,color:e?.customOverlayColor||e?.customGradient||e?.style?.color?{background:e?.customOverlayColor,gradient:e?.customGradient,...e?.style?.color}:void 0})};if(t?.length===1&&t[0]?.name==="core/group"){let o=_3(t[0].attributes||{});return o?.backgroundColor||o?.gradient||o?.style?.color?.background||o?.style?.color?.gradient?(0,Ti.createBlock)("core/group",o,t[0]?.innerBlocks):(0,Ti.createBlock)("core/group",{...r,...o,style:_3({...o?.style,color:r?.style?.color||o?.style?.color?{...r?.style?.color,...o?.style?.color}:void 0})},t[0]?.innerBlocks)}return(0,Ti.createBlock)("core/group",{...e,...r},t)}}]},gK=Ewe;var zL=n(N(),1);var Bwe=[{name:"cover",title:(0,zL.__)("Cover"),description:(0,zL.__)("Add an image or video with a text overlay."),attributes:{layout:{type:"constrained"}},isDefault:!0,icon:Qm}],vK=Bwe;var{fieldsKey:Nwe,formKey:Iwe}=U(bK.privateApis),{name:yK}=y3,x3={icon:Qm,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg",style:{typography:{fontSize:48},color:{text:"white"}}},innerBlocks:[{name:"core/paragraph",attributes:{content:`${(0,VL.__)("Snow Patrol")} `,style:{typography:{textAlign:"center"}}}}]},transforms:gK,save:fK,edit:dK,deprecated:bZ,variations:vK};window.__experimentalContentOnlyInspectorFields&&(x3[Nwe]=[{id:"background",label:(0,VL.__)("Background"),type:"media",Edit:{control:"media",allowedTypes:["image","video"],multiple:!1,useFeaturedImage:!0},getValue:({item:e})=>({id:e.id,url:e.url,alt:e.alt,mediaType:e.backgroundType,featuredImage:e.useFeaturedImage}),setValue:({value:e})=>({id:e.id,url:e.url,alt:e.alt,mediaType:e.backgroundType,useFeaturedImage:e.featuredImage})}],x3[Iwe]={fields:["background"]});var Dwe=()=>R({name:yK,metadata:y3,settings:x3});var FL={};K(FL,{init:()=>Owe,metadata:()=>k3,name:()=>TK,settings:()=>C3});var Mp=n(N(),1),SK=n(q(),1);var k3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/details",title:"Details",category:"text",description:"Hide and show additional content.",keywords:["summary","toggle","disclosure"],textdomain:"default",attributes:{showContent:{type:"boolean",default:!1},summary:{type:"rich-text",source:"rich-text",selector:"summary",role:"content"},name:{type:"string",source:"attribute",attribute:"name",selector:".wp-block-details"},placeholder:{type:"string"}},supports:{__experimentalOnEnter:!0,align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalBorder:{color:!0,width:!0,style:!0},html:!1,spacing:{margin:!0,padding:!0,blockGap:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowEditing:!1},interactivity:{clientNavigation:!0},allowedBlocks:!0},editorStyle:"wp-block-details-editor",style:"wp-block-details"};var ss=n(E(),1),oc=n(O(),1),yu=n(N(),1),_K=n(H(),1),xK=n(F(),1);var Ga=n(y(),1),{withIgnoreIMEEvents:Rwe}=U(oc.privateApis),Awe=[["core/paragraph",{placeholder:(0,yu.__)("Type / to add a hidden block")}]];function Mwe({attributes:e,setAttributes:t,clientId:r}){let{name:o,showContent:a,summary:i,allowedBlocks:l,placeholder:s}=e,c=(0,ss.useBlockProps)(),u=(0,ss.useInnerBlocksProps)(c,{template:Awe,__experimentalCaptureToolbars:!0,allowedBlocks:l}),[p,m]=(0,_K.useState)(a),d=Z(),f=(0,xK.useSelect)(v=>v(ss.store).hasSelectedInnerBlock(r,!0),[r]),h=v=>{v.key==="Enter"&&!v.shiftKey&&(m(b=>!b),v.preventDefault())},g=v=>{v.key===" "&&v.preventDefault()};return(0,Ga.jsxs)(Ga.Fragment,{children:[(0,Ga.jsx)(ss.InspectorControls,{children:(0,Ga.jsx)(oc.__experimentalToolsPanel,{label:(0,yu.__)("Settings"),resetAll:()=>{t({showContent:!1})},dropdownMenuProps:d,children:(0,Ga.jsx)(oc.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,yu.__)("Open by default"),hasValue:()=>a,onDeselect:()=>{t({showContent:!1})},children:(0,Ga.jsx)(oc.ToggleControl,{label:(0,yu.__)("Open by default"),checked:a,onChange:()=>t({showContent:!a})})})})}),(0,Ga.jsx)(ss.InspectorControls,{group:"advanced",children:(0,Ga.jsx)(oc.TextControl,{label:(0,yu.__)("Name attribute"),value:o||"",onChange:v=>t({name:v}),help:(0,yu.__)("Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time.")})}),(0,Ga.jsxs)("details",{...u,open:p||f,onToggle:v=>m(v.target.open),name:o||"",children:[(0,Ga.jsx)("summary",{onKeyDown:Rwe(h),onKeyUp:g,children:(0,Ga.jsx)(ss.RichText,{identifier:"summary","aria-label":(0,yu.__)("Write summary. Press Enter to expand or collapse the details."),placeholder:s||(0,yu.__)("Write summary\u2026"),withoutInteractiveFormatting:!0,value:i,onChange:v=>t({summary:v})})}),u.children]})]})}var kK=Mwe;var lg=n(E(),1),ig=n(y(),1);function wK({attributes:e}){let{name:t,showContent:r}=e,o=e.summary?e.summary:"Details",a=lg.useBlockProps.save();return(0,ig.jsxs)("details",{...a,name:t||void 0,open:r,children:[(0,ig.jsx)("summary",{children:(0,ig.jsx)(lg.RichText.Content,{value:o})}),(0,ig.jsx)(lg.InnerBlocks.Content,{})]})}var w3=n(q(),1),CK={from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch({},e){return!(e.length===1&&e[0].name==="core/details")},__experimentalConvert(e){return(0,w3.createBlock)("core/details",{},e.map(t=>(0,w3.cloneSanitizedBlock)(t)))}}]};var{fieldsKey:zwe,formKey:Vwe}=U(SK.privateApis),{name:TK}=k3,C3={icon:WP,example:{attributes:{summary:(0,Mp.__)("La Mancha"),showContent:!0},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Mp.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}}]},__experimentalLabel(e,{context:t}){let{summary:r}=e,o=e?.metadata?.name,a=r?.trim().length>0;if(t==="list-view"&&(o||a))return o||r;if(t==="breadcrumb"&&o)return o;if(t==="accessibility")return a?(0,Mp.sprintf)((0,Mp.__)("Details. %s"),r):(0,Mp.__)("Details. Empty.")},save:wK,edit:kK,transforms:CK};window.__experimentalContentOnlyInspectorFields&&(C3[zwe]=[{id:"summary",label:(0,Mp.__)("Summary"),type:"text",Edit:"rich-text"}],C3[Vwe]={fields:["summary"]});var Owe=()=>R({name:TK,metadata:k3,settings:C3});var WL={};K(WL,{init:()=>Kwe,metadata:()=>$s,name:()=>sY,settings:()=>cY});var Ud=n(N(),1),pg=n(H(),1),Rb=n(F(),1),B3=n(E(),1),GL=n(re(),1);var jd=n(N(),1),nc=n(O(),1),S3=n(E(),1);var bl=n(y(),1);function Fwe(e){return e?(0,jd.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,jd.__)("This embed may not preserve its aspect ratio when the browser is resized.")}var Hwe=({blockSupportsResponsive:e,showEditButton:t,themeSupportsResponsive:r,allowResponsive:o,toggleResponsive:a,switchBackToURLInput:i})=>{let l=Z();return(0,bl.jsxs)(bl.Fragment,{children:[(0,bl.jsx)(S3.BlockControls,{children:(0,bl.jsx)(nc.ToolbarGroup,{children:t&&(0,bl.jsx)(nc.ToolbarButton,{className:"components-toolbar__control",label:(0,jd.__)("Edit URL"),icon:nd,onClick:i})})}),r&&e&&(0,bl.jsx)(S3.InspectorControls,{children:(0,bl.jsx)(nc.__experimentalToolsPanel,{label:(0,jd.__)("Media settings"),resetAll:()=>{a(!0)},dropdownMenuProps:l,children:(0,bl.jsx)(nc.__experimentalToolsPanelItem,{label:(0,jd.__)("Media settings"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>{a(!o)},children:(0,bl.jsx)(nc.ToggleControl,{label:(0,jd.__)("Resize for smaller devices"),checked:o,help:Fwe,onChange:a})})})})]})},PK=Hwe;var Te=n(O(),1),Ie=n(y(),1),cs=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ie.jsx)(Te.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})}),T3=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ie.jsx)(Te.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z"})}),HL=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ie.jsx)(Te.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})}),sg=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ie.jsx)(Te.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z"})}),EK={foreground:"#000000",src:(0,Ie.jsx)(Te.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.Path,{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z"})})},BK={foreground:"#ff0000",src:(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.Path,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"})})},NK={foreground:"#3b5998",src:(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"})})},IK=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.G,{children:(0,Ie.jsx)(Te.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})})}),DK={foreground:"#0073AA",src:(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.G,{children:(0,Ie.jsx)(Te.Path,{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})})})},LK={foreground:"#1db954",src:(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.Path,{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"})})},RK=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.Path,{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})}),AK={foreground:"#1ab7ea",src:(0,Ie.jsx)(Te.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.G,{children:(0,Ie.jsx)(Te.Path,{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})})})},MK=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"})}),zK={foreground:"#35465c",src:(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.Path,{d:"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z"})})},VK=(0,Ie.jsxs)(Te.SVG,{viewBox:"0 0 24 24",children:[(0,Ie.jsx)(Te.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),(0,Ie.jsx)(Te.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),(0,Ie.jsx)(Te.Path,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})]}),OK=(0,Ie.jsxs)(Te.SVG,{viewBox:"0 0 24 24",children:[(0,Ie.jsx)(Te.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,Ie.jsx)(Te.Path,{d:"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",fill:"#d4cdcb"}),(0,Ie.jsx)(Te.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,Ie.jsx)(Te.Path,{d:"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",fill:"#e4ecb0"}),(0,Ie.jsx)(Te.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,Ie.jsx)(Te.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})]}),FK=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.Path,{d:"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",fill:"#333436"})}),HK=(0,Ie.jsx)(Te.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,Ie.jsx)(Te.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})}),jK=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 44 44",children:(0,Ie.jsx)(Te.Path,{d:"M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z"})}),UK={foreground:"#f43e37",src:(0,Ie.jsxs)(Te.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ie.jsx)(Te.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,Ie.jsx)(Te.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",fill:"#fff"})]})},GK=(0,Ie.jsx)(Te.SVG,{viewBox:"0 0 24 24",children:(0,Ie.jsx)(Te.Path,{fill:"#0a7aff",d:"M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"})});var WK=n(O(),1),jL=n(y(),1),jwe=()=>(0,jL.jsx)("div",{className:"wp-block-embed is-loading",children:(0,jL.jsx)(WK.Spinner,{})}),$K=jwe;var ac=n(N(),1),zp=n(O(),1),qK=n(E(),1);var Wa=n(y(),1);function ZK({icon:e,label:t,value:r,onSubmit:o,onChange:a,cannotEmbed:i,fallback:l,tryAgain:s}){return(0,Wa.jsxs)(zp.Placeholder,{icon:(0,Wa.jsx)(qK.BlockIcon,{icon:e,showColors:!0}),label:t,className:"wp-block-embed",instructions:(0,ac.__)("Paste a link to the content you want to display on your site."),children:[(0,Wa.jsxs)("form",{onSubmit:o,children:[(0,Wa.jsx)(zp.__experimentalInputControl,{type:"url",value:r||"",className:"wp-block-embed__placeholder-input",label:t,hideLabelFromVision:!0,placeholder:(0,ac.__)("Enter URL to embed here\u2026"),onChange:a}),(0,Wa.jsx)(zp.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,ac._x)("Embed","button label")})]}),(0,Wa.jsx)("div",{className:"wp-block-embed__learn-more",children:(0,Wa.jsx)(cu,{openInNewTab:!0,href:(0,ac.__)("https://wordpress.org/documentation/article/embeds/"),children:(0,ac.__)("Learn more about embeds")})}),i&&(0,Wa.jsxs)(kp,{direction:"column",gap:"md",className:"components-placeholder__error",children:[(0,Wa.jsx)("div",{className:"components-placeholder__instructions",children:(0,ac.__)("Sorry, this content could not be embedded.")}),(0,Wa.jsxs)(kp,{direction:"row",gap:"md",justify:"flex-start",children:[(0,Wa.jsx)(zp.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:s,children:(0,ac._x)("Try again","button label")}),l&&(0,Wa.jsx)(zp.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:l,children:(0,ac._x)("Convert to link","button label")})]})]})]})}var ug=n(N(),1),E3=n(O(),1),YK=n(E(),1),QK=n(H(),1),XK=n(ir(),1);var P3=n(ve(),1),cg=n(H(),1),UL=n(y(),1),Uwe={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function KK({html:e}){let t=(0,cg.useRef)(),r=(0,cg.useMemo)(()=>{let a=new window.DOMParser().parseFromString(e,"text/html").querySelector("iframe"),i={};return a&&Array.from(a.attributes).forEach(({name:l,value:s})=>{l!=="style"&&(i[Uwe[l]||l]=s)}),i},[e]);return(0,cg.useEffect)(()=>{let{ownerDocument:o}=t.current,{defaultView:a}=o;function i({data:{secret:l,message:s,value:c}={}}){s!=="height"||l!==r["data-secret"]||(t.current.height=c)}return a.addEventListener("message",i),()=>{a.removeEventListener("message",i)}},[]),(0,UL.jsx)("div",{className:"wp-block-embed__wrapper",children:(0,UL.jsx)("iframe",{ref:(0,P3.useMergeRefs)([t,(0,P3.useFocusableIframe)()]),title:r.title,...r})})}var $a=n(y(),1);function JK({preview:e,previewable:t,url:r,type:o,isSelected:a,className:i,icon:l,label:s}){let[c,u]=(0,QK.useState)(!1);!a&&c&&u(!1);let p=()=>{u(!0)},{scripts:m}=e,d=o==="photo"?Uj(e):e.html,f=(0,XK.getAuthority)(r),h=(0,ug.sprintf)((0,ug.__)("Embedded content from %s"),f),g=S(o,i,"wp-block-embed__wrapper");return(0,$a.jsx)($a.Fragment,{children:t?o==="wp-embed"?(0,$a.jsx)(KK,{html:d}):(0,$a.jsxs)("div",{className:"wp-block-embed__wrapper",children:[(0,$a.jsx)(E3.SandBox,{allowSameOrigin:!0,html:d,scripts:m,title:h,type:g,onFocus:p}),!c&&(0,$a.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:p})]}):(0,$a.jsxs)(E3.Placeholder,{icon:(0,$a.jsx)(YK.BlockIcon,{icon:l,showColors:!0}),label:s,children:[(0,$a.jsx)("p",{className:"components-placeholder__error",children:(0,$a.jsx)("a",{href:r,children:r})}),(0,$a.jsx)("p",{className:"components-placeholder__error",children:(0,ug.sprintf)((0,ug.__)("Embedded content from %s can't be previewed in the editor."),f)})]})})}var Pi=n(y(),1),Gwe=e=>{let{attributes:{providerNameSlug:t,previewable:r,responsive:o,url:a},attributes:i,isSelected:l,onReplace:s,setAttributes:c,insertBlocksAfter:u,onFocus:p}=e,m={title:(0,Ud._x)("Embed","block title"),icon:cs},{icon:d,title:f}=Hj(t)||m,[h,g]=(0,pg.useState)(a),[v,b]=(0,pg.useState)(!1),{invalidateResolution:_}=(0,Rb.useDispatch)(GL.store),{__unstableMarkNextChangeAsNotPersistent:k}=(0,Rb.useDispatch)(B3.store),{preview:x,fetching:w,themeSupportsResponsive:C,cannotEmbed:P,hasResolved:B}=(0,Rb.useSelect)(V=>{let{getEmbedPreview:Q,isPreviewEmbedFallback:Y,isRequestingEmbedPreview:ee,getThemeSupports:te,hasFinishedResolution:ae}=V(GL.store);if(!a)return{fetching:!1,cannotEmbed:!1};let J=Q(a),ce=Y(a),ie=J?.html===!1&&J?.type===void 0,we=J?.data?.status===404,se=!!J&&!ie&&!we;return{preview:se?J:void 0,fetching:ee(a),themeSupportsResponsive:te()["responsive-embeds"],cannotEmbed:!se||ce,hasResolved:ae("getEmbedPreview",[a])}},[a]),I=()=>Wj(i,x,f,o);function D(V){let{className:Q}=i,{html:Y}=x;c({allowResponsive:V,className:BI(Y,Q,o&&V)})}(0,pg.useEffect)(()=>{if(!P||!B||!a)return;let V=a.replace(/\/$/,"");V!==a&&(g(V),b(!1),k(),c({url:V}))},[a,P,B,c,k]),(0,pg.useEffect)(()=>{if(!x||v)return;let V=I();if(s){let Y=vp(e,V);if(Y){k(),c(Y.attributes);return}}Object.keys(V).some(Y=>V[Y]!==i[Y])&&(k(),c(V))},[x,v]);let T=(0,B3.useBlockProps)();if(w)return(0,Pi.jsx)("div",{...T,children:(0,Pi.jsx)($K,{})});let L=(0,Ud.sprintf)((0,Ud.__)("%s URL"),f);if(!x||P||v)return(0,Pi.jsx)("div",{...T,children:(0,Pi.jsx)(ZK,{icon:d,label:L,onFocus:p,onSubmit:V=>{V&&V.preventDefault();let Q=Zv(h),Y=gp(i.className);g(Q),c({url:Q,...Ph(Q)?.attributes,className:Y}),b(!1)},value:h,cannotEmbed:P,onChange:V=>g(V),fallback:s?()=>Gj(h,s):void 0,tryAgain:()=>{_("getEmbedPreview",[h])}})});let{caption:z,type:j,allowResponsive:G,className:W}=I(),$=S(W,e.className);return(0,Pi.jsxs)(Pi.Fragment,{children:[(0,Pi.jsx)(PK,{showEditButton:x&&!P,themeSupportsResponsive:C,blockSupportsResponsive:o,allowResponsive:G,toggleResponsive:D,switchBackToURLInput:()=>b(!0)}),(0,Pi.jsxs)("figure",{...T,className:S(T.className,$,{[`is-type-${j}`]:j,[`is-provider-${t}`]:t,[`wp-block-embed-${t}`]:t}),children:[(0,Pi.jsx)(JK,{preview:x,previewable:r,className:$,url:h,type:j,caption:z,onCaptionChange:V=>c({caption:V}),isSelected:l,icon:d,label:L,insertBlocksAfter:u,attributes:i,setAttributes:c}),(0,Pi.jsx)(Mo,{attributes:i,setAttributes:c,isSelected:l,insertBlocksAfter:u,label:(0,Ud.__)("Embed caption text"),showToolbarButton:l})]})]})},eY=Gwe;var Gd=n(E(),1),Ab=n(y(),1);function tY({attributes:e}){let{url:t,caption:r,type:o,providerNameSlug:a}=e;if(!t)return null;let i=S("wp-block-embed",{[`is-type-${o}`]:o,[`is-provider-${a}`]:a,[`wp-block-embed-${a}`]:a});return(0,Ab.jsxs)("figure",{...Gd.useBlockProps.save({className:i}),children:[(0,Ab.jsx)("div",{className:"wp-block-embed__wrapper",children:`
${t}
`}),!Gd.RichText.isEmpty(r)&&(0,Ab.jsx)(Gd.RichText.Content,{className:(0,Gd.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:r})]})}var N3=n(q(),1),I3=n(ir(),1);var{name:rY}=$s,Wwe={from:[{type:"raw",isMatch:e=>{if(e.nodeName!=="P")return!1;let t=e.textContent.trim();return!(0,I3.isURL)(t)||!/^https:\/\//i.test(t)||t.match(/https:\/\//gi)?.length!==1?!1:!/\.(?!(html?|php)$)[a-z0-9]+$/i.test((0,I3.getFilename)(t)||"")},transform:e=>{let t=Zv(e.textContent.trim());return(0,N3.createBlock)(rY,{url:t,...Ph(t)?.attributes})}},{type:"shortcode",tag:"embed",transform:(e,{shortcode:t})=>{let r=Zv(t.content?.trim());return(0,N3.createBlock)(rY,{url:r,...Ph(r)?.attributes})}}],to:[{type:"block",blocks:["core/paragraph"],isMatch:({url:e})=>!!e,transform:({url:e,caption:t,className:r})=>{let o=`${e} `;return t?.trim()&&(o+=` ${t}`),(0,N3.createBlock)("core/paragraph",{content:o,className:gp(r)})}}]},oY=Wwe;var ke=n(N(),1);function xt(e){return(0,ke.sprintf)((0,ke.__)("%s Embed"),e)}var nY=[{name:"twitter",title:xt("X"),icon:EK,keywords:["x","twitter","tweet",(0,ke.__)("social")],description:(0,ke.__)("Embed an X post."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:xt("YouTube"),icon:BK,keywords:[(0,ke.__)("music"),(0,ke.__)("video")],description:(0,ke.__)("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:xt("Facebook"),icon:NK,keywords:[(0,ke.__)("social")],description:(0,ke.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:xt("Instagram"),icon:IK,keywords:[(0,ke.__)("image"),(0,ke.__)("social")],description:(0,ke.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:xt("WordPress"),icon:DK,keywords:[(0,ke.__)("post"),(0,ke.__)("blog")],description:(0,ke.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:xt("SoundCloud"),icon:T3,keywords:[(0,ke.__)("music"),(0,ke.__)("audio")],description:(0,ke.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:xt("Spotify"),icon:LK,keywords:[(0,ke.__)("music"),(0,ke.__)("audio")],description:(0,ke.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:xt("Flickr"),icon:RK,keywords:[(0,ke.__)("image")],description:(0,ke.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:xt("Vimeo"),icon:AK,keywords:[(0,ke.__)("video")],description:(0,ke.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:xt("Animoto"),icon:OK,description:(0,ke.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:xt("Cloudup"),icon:cs,description:(0,ke.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:xt("CollegeHumor"),icon:sg,description:(0,ke.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:xt("Crowdsignal"),icon:cs,keywords:["polldaddy",(0,ke.__)("survey")],description:(0,ke.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:xt("Dailymotion"),icon:FK,keywords:[(0,ke.__)("video")],description:(0,ke.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:xt("Imgur"),icon:HL,description:(0,ke.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:xt("Issuu"),icon:cs,description:(0,ke.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:xt("Kickstarter"),icon:cs,description:(0,ke.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:xt("Mixcloud"),icon:T3,keywords:[(0,ke.__)("music"),(0,ke.__)("audio")],description:(0,ke.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocket-casts",title:xt("Pocket Casts"),icon:UK,keywords:[(0,ke.__)("podcast"),(0,ke.__)("audio")],description:(0,ke.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocket-casts",responsive:!0}},{name:"reddit",title:xt("Reddit"),icon:MK,description:(0,ke.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:xt("ReverbNation"),icon:T3,description:(0,ke.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"scribd",title:xt("Scribd"),icon:cs,description:(0,ke.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"smugmug",title:xt("SmugMug"),icon:HL,description:(0,ke.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:xt("Speaker Deck"),icon:cs,description:(0,ke.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:xt("TikTok"),icon:sg,keywords:[(0,ke.__)("video")],description:(0,ke.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:xt("TED"),icon:sg,description:(0,ke.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:xt("Tumblr"),icon:zK,keywords:[(0,ke.__)("social")],description:(0,ke.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(.+)\.tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:xt("VideoPress"),icon:sg,keywords:[(0,ke.__)("video")],description:(0,ke.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:xt("WordPress.tv"),icon:sg,description:(0,ke.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:xt("Amazon Kindle"),icon:VK,keywords:[(0,ke.__)("ebook")],description:(0,ke.__)("Embed Amazon Kindle content."),patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],attributes:{providerNameSlug:"amazon-kindle"}},{name:"pinterest",title:xt("Pinterest"),icon:HK,keywords:[(0,ke.__)("social"),(0,ke.__)("bookmark")],description:(0,ke.__)("Embed Pinterest pins, boards, and profiles."),patterns:[/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i],attributes:{providerNameSlug:"pinterest"}},{name:"wolfram-cloud",title:xt("Wolfram"),icon:jK,description:(0,ke.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}},{name:"bluesky",title:xt("Bluesky"),icon:GK,description:(0,ke.__)("Embed a Bluesky post."),patterns:[/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],attributes:{providerNameSlug:"bluesky"}}];nY.forEach(e=>{e.isActive||(e.isActive=(t,r)=>t.providerNameSlug===r.providerNameSlug)});var aY=nY;var Wd=n(E(),1),$d=n(y(),1),{attributes:iY}=$s,$we={attributes:iY,save({attributes:e}){let{url:t,caption:r,type:o,providerNameSlug:a}=e;if(!t)return null;let i=S("wp-block-embed",{[`is-type-${o}`]:o,[`is-provider-${a}`]:a,[`wp-block-embed-${a}`]:a});return(0,$d.jsxs)("figure",{...Wd.useBlockProps.save({className:i}),children:[(0,$d.jsx)("div",{className:"wp-block-embed__wrapper",children:`
${t}
`}),!Wd.RichText.isEmpty(r)&&(0,$d.jsx)(Wd.RichText.Content,{tagName:"figcaption",value:r})]})}},qwe={attributes:iY,save({attributes:{url:e,caption:t,type:r,providerNameSlug:o}}){if(!e)return null;let a=S("wp-block-embed",{[`is-type-${r}`]:r,[`is-provider-${o}`]:o});return(0,$d.jsxs)("figure",{className:a,children:[`
${e}
`,!Wd.RichText.isEmpty(t)&&(0,$d.jsx)(Wd.RichText.Content,{tagName:"figcaption",value:t})]})}},Zwe=[$we,qwe],lY=Zwe;var{name:sY}=$s,cY={icon:cs,edit:eY,save:tY,transforms:oY,variations:aY,deprecated:lY},Kwe=()=>R({name:sY,metadata:$s,settings:cY});var YL={};K(YL,{init:()=>l3e,metadata:()=>L3,name:()=>NY,settings:()=>R3});var fg=n(N(),1);var BY=n(q(),1);var Co=n(E(),1),us=n(N(),1),Xt=n(y(),1),Ywe={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){let{href:t,fileId:r,fileName:o,textLinkHref:a,textLinkTarget:i,showDownloadButton:l,downloadButtonText:s,displayPreview:c,previewHeight:u}=e,p=Co.RichText.isEmpty(o)?(0,us.__)("PDF embed"):(0,us.sprintf)((0,us.__)("Embed of %s."),o),m=!Co.RichText.isEmpty(o),d=m?r:void 0;return t&&(0,Xt.jsxs)("div",{...Co.useBlockProps.save(),children:[c&&(0,Xt.jsx)(Xt.Fragment,{children:(0,Xt.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":p})}),m&&(0,Xt.jsx)("a",{id:d,href:a,target:i,rel:i?"noreferrer noopener":void 0,children:(0,Xt.jsx)(Co.RichText.Content,{value:o})}),l&&(0,Xt.jsx)("a",{href:t,className:S("wp-block-file__button",(0,Co.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":d,children:(0,Xt.jsx)(Co.RichText.Content,{value:s})})]})}},Qwe={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){let{href:t,fileId:r,fileName:o,textLinkHref:a,textLinkTarget:i,showDownloadButton:l,downloadButtonText:s,displayPreview:c,previewHeight:u}=e,p=Co.RichText.isEmpty(o)?(0,us.__)("PDF embed"):(0,us.sprintf)((0,us.__)("Embed of %s."),o),m=!Co.RichText.isEmpty(o),d=m?r:void 0;return t&&(0,Xt.jsxs)("div",{...Co.useBlockProps.save(),children:[c&&(0,Xt.jsx)(Xt.Fragment,{children:(0,Xt.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":p})}),m&&(0,Xt.jsx)("a",{id:d,href:a,target:i,rel:i?"noreferrer noopener":void 0,children:(0,Xt.jsx)(Co.RichText.Content,{value:o})}),l&&(0,Xt.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,"aria-describedby":d,children:(0,Xt.jsx)(Co.RichText.Content,{value:s})})]})}},Xwe={attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){let{href:t,fileName:r,textLinkHref:o,textLinkTarget:a,showDownloadButton:i,downloadButtonText:l,displayPreview:s,previewHeight:c}=e,u=Co.RichText.isEmpty(r)?(0,us.__)("PDF embed"):(0,us.sprintf)((0,us.__)("Embed of %s."),r);return t&&(0,Xt.jsxs)("div",{...Co.useBlockProps.save(),children:[s&&(0,Xt.jsx)(Xt.Fragment,{children:(0,Xt.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),!Co.RichText.isEmpty(r)&&(0,Xt.jsx)("a",{href:o,target:a,rel:a?"noreferrer noopener":void 0,children:(0,Xt.jsx)(Co.RichText.Content,{value:r})}),i&&(0,Xt.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,children:(0,Xt.jsx)(Co.RichText.Content,{value:l})})]})}},Jwe=[Ywe,Qwe,Xwe],uY=Jwe;var qL=n(Ar(),1),dg=n(O(),1),mg=n(F(),1),cn=n(E(),1),hY=n(H(),1),gY=n(ve(),1),_u=n(N(),1);var vY=n(re(),1),ZL=n(Sr(),1),bY=n(ir(),1);var ln=n(N(),1),sn=n(O(),1),pY=n(E(),1);var Vo=n(y(),1);function mY({hrefs:e,openInNewWindow:t,showDownloadButton:r,changeLinkDestinationOption:o,changeOpenInNewWindow:a,changeShowDownloadButton:i,displayPreview:l,changeDisplayPreview:s,previewHeight:c,changePreviewHeight:u}){let{href:p,textLinkHref:m,attachmentPage:d}=e,f=Z(),h=[{value:p,label:(0,ln.__)("URL")}];return d&&(h=[{value:p,label:(0,ln.__)("Media file")},{value:d,label:(0,ln.__)("Attachment page")}]),(0,Vo.jsx)(Vo.Fragment,{children:(0,Vo.jsxs)(pY.InspectorControls,{children:[p.endsWith(".pdf")&&(0,Vo.jsxs)(sn.__experimentalToolsPanel,{label:(0,ln.__)("PDF settings"),resetAll:()=>{s(!0),u(600)},dropdownMenuProps:f,children:[(0,Vo.jsx)(sn.__experimentalToolsPanelItem,{label:(0,ln.__)("Show inline embed"),isShownByDefault:!0,hasValue:()=>!l,onDeselect:()=>s(!0),children:(0,Vo.jsx)(sn.ToggleControl,{label:(0,ln.__)("Show inline embed"),help:l?(0,ln.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!l,onChange:s})}),l&&(0,Vo.jsx)(sn.__experimentalToolsPanelItem,{label:(0,ln.__)("Height in pixels"),isShownByDefault:!0,hasValue:()=>c!==600,onDeselect:()=>u(600),children:(0,Vo.jsx)(sn.RangeControl,{label:(0,ln.__)("Height in pixels"),min:D3,max:Math.max($L,c),value:c,onChange:u})})]}),(0,Vo.jsxs)(sn.__experimentalToolsPanel,{label:(0,ln.__)("Settings"),resetAll:()=>{o(p),a(!1),i(!0)},dropdownMenuProps:f,children:[(0,Vo.jsx)(sn.__experimentalToolsPanelItem,{label:(0,ln.__)("Link to"),isShownByDefault:!0,hasValue:()=>m!==p,onDeselect:()=>o(p),children:(0,Vo.jsx)(sn.SelectControl,{label:(0,ln.__)("Link to"),value:m,options:h,onChange:o})}),(0,Vo.jsx)(sn.__experimentalToolsPanelItem,{label:(0,ln.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>a(!1),children:(0,Vo.jsx)(sn.ToggleControl,{label:(0,ln.__)("Open in new tab"),checked:t,onChange:a})}),(0,Vo.jsx)(sn.__experimentalToolsPanelItem,{label:(0,ln.__)("Show download button"),isShownByDefault:!0,hasValue:()=>!r,onDeselect:()=>i(!0),children:(0,Vo.jsx)(sn.ToggleControl,{label:(0,ln.__)("Show download button"),checked:r,onChange:i})})]})]})})}var fY=()=>window.navigator.pdfViewerEnabled?!0:!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!(dY("AcroPDF.PDF")||dY("PDF.PdfCtrl"))),dY=e=>{let t;try{t=new window.ActiveXObject(e)}catch{t=void 0}return t};var Yr=n(y(),1),D3=200,$L=2e3;function e3e({text:e,disabled:t}){let{createNotice:r}=(0,mg.useDispatch)(ZL.store),o=(0,gY.useCopyToClipboard)(e,()=>{r("info",(0,_u.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,Yr.jsx)(dg.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:o,disabled:t,children:(0,_u.__)("Copy URL")})}function t3e({attributes:e,isSelected:t,setAttributes:r,clientId:o}){let{id:a,fileName:i,href:l,textLinkHref:s,textLinkTarget:c,showDownloadButton:u,downloadButtonText:p,displayPreview:m,previewHeight:d}=e,[f,h]=(0,hY.useState)(e.blob),{media:g}=(0,mg.useSelect)(A=>({media:a?A(vY.store).getEntityRecord("postType","attachment",a,{context:"view"}):void 0}),[a]),{createErrorNotice:v}=(0,mg.useDispatch)(ZL.store),{toggleSelection:b}=(0,mg.useDispatch)(cn.store);Gs({url:f,onChange:_,onError:k});function _(A){if(!A||!A.url){r({href:void 0,fileName:void 0,textLinkHref:void 0,id:void 0,fileId:void 0,displayPreview:void 0,previewHeight:void 0}),h();return}if((0,qL.isBlobURL)(A.url)){h(A.url);return}let z=(A.mime||A.mime_type)==="application/pdf"||(0,bY.getFilename)(A.url).toLowerCase().endsWith(".pdf"),j={displayPreview:z?e.displayPreview??!0:void 0,previewHeight:z?e.previewHeight??600:void 0};r({href:A.url,fileName:A.title,textLinkHref:A.url,id:A.id,fileId:`wp-block-file--media-${o}`,blob:void 0,...j}),h()}function k(A){r({href:void 0}),v(A,{type:"snackbar"})}function x(A){r({textLinkHref:A})}function w(A){r({textLinkTarget:A?"_blank":!1})}function C(A){r({showDownloadButton:A})}function P(A){r({displayPreview:A})}function B(A,z,j,G){b(!0);let W=parseInt(d+G.height,10);r({previewHeight:W})}function I(A){let z=Math.max(parseInt(A,10),D3);r({previewHeight:z})}let D=g&&g.link,T=(0,cn.useBlockProps)({className:S(!!f&&(0,dg.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":!!f})}),L=fY()&&m;return!l&&!f?(0,Yr.jsx)("div",{...T,children:(0,Yr.jsx)(cn.MediaPlaceholder,{icon:(0,Yr.jsx)(cn.BlockIcon,{icon:ov}),labels:{title:(0,_u.__)("File"),instructions:(0,_u.__)("Drag and drop a file, upload, or choose from your library.")},onSelect:_,onError:k,accept:"*"})}):(0,Yr.jsxs)(Yr.Fragment,{children:[(0,Yr.jsx)(mY,{hrefs:{href:l||f,textLinkHref:s,attachmentPage:D},openInNewWindow:!!c,showDownloadButton:u,changeLinkDestinationOption:x,changeOpenInNewWindow:w,changeShowDownloadButton:C,displayPreview:m,changeDisplayPreview:P,previewHeight:d,changePreviewHeight:I}),(0,Yr.jsxs)(cn.BlockControls,{group:"other",children:[(0,Yr.jsx)(cn.MediaReplaceFlow,{mediaId:a,mediaURL:l,accept:"*",onSelect:_,onError:k,onReset:()=>_(void 0)}),(0,Yr.jsx)(e3e,{text:l,disabled:(0,qL.isBlobURL)(l)})]}),(0,Yr.jsxs)("div",{...T,children:[L&&(0,Yr.jsxs)(dg.ResizableBox,{size:{height:d,width:"100%"},minHeight:D3,maxHeight:$L,grid:[1,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>b(!1),onResizeStop:B,showHandle:t,children:[(0,Yr.jsx)("object",{className:"wp-block-file__preview",data:l,type:"application/pdf","aria-label":(0,_u.__)("Embed of the selected PDF file.")}),!t&&(0,Yr.jsx)("div",{className:"wp-block-file__preview-overlay"})]}),(0,Yr.jsxs)("div",{className:"wp-block-file__content-wrapper",children:[(0,Yr.jsx)(cn.RichText,{identifier:"fileName",tagName:"a",value:i,placeholder:(0,_u.__)("Write file name\u2026"),withoutInteractiveFormatting:!0,onChange:A=>r({fileName:db(A)}),href:s}),u&&(0,Yr.jsx)("div",{className:"wp-block-file__button-richtext-wrapper",children:(0,Yr.jsx)(cn.RichText,{identifier:"downloadButtonText",tagName:"div","aria-label":(0,_u.__)("Download button text"),className:S("wp-block-file__button",(0,cn.__experimentalGetElementClassName)("button")),value:p,withoutInteractiveFormatting:!0,placeholder:(0,_u.__)("Add text\u2026"),onChange:A=>r({downloadButtonText:db(A)})})})]})]})]})}var yY=t3e;var L3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/file",title:"File",category:"media",description:"Add a link to a downloadable file.",keywords:["document","pdf","download"],textdomain:"default",attributes:{id:{type:"number"},blob:{type:"string",role:"local"},href:{type:"string",role:"content"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"rich-text",source:"rich-text",selector:"a:not([download])",role:"content"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href",role:"content"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"rich-text",source:"rich-text",selector:"a[download]",role:"content"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},interactivity:!0},editorStyle:"wp-block-file-editor",style:"wp-block-file"};var xu=n(E(),1),ps=n(y(),1);function _Y({attributes:e}){let{href:t,fileId:r,fileName:o,textLinkHref:a,textLinkTarget:i,showDownloadButton:l,downloadButtonText:s,displayPreview:c,previewHeight:u}=e,p=xu.RichText.isEmpty(o)?"PDF embed":o.toString(),m=!xu.RichText.isEmpty(o),d=m?r:void 0;return t&&(0,ps.jsxs)("div",{...xu.useBlockProps.save(),children:[c&&(0,ps.jsx)(ps.Fragment,{children:(0,ps.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":p})}),m&&(0,ps.jsx)("a",{id:d,href:a,target:i,rel:i?"noreferrer noopener":void 0,children:(0,ps.jsx)(xu.RichText.Content,{value:o})}),l&&(0,ps.jsx)("a",{href:t,className:S("wp-block-file__button",(0,xu.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":d,children:(0,ps.jsx)(xu.RichText.Content,{value:s})})]})}var Mb=n(Ar(),1),qd=n(q(),1),kY=n(F(),1),wY=n(re(),1),CY=n(N(),1),SY=n(ir(),1),xY=(0,CY._x)("Download","button label"),KL=(e,t,r)=>({type:"block",blocks:[e],isMatch:({id:o})=>{if(!o)return!1;let{getEntityRecord:a}=(0,kY.select)(wY.store),i=a("postType","attachment",o,{context:"view"});return!!i&&i.mime_type.includes(t)},transform:o=>(0,qd.createBlock)(e,{[r]:o.href,caption:o.fileName,id:o.id,anchor:o.anchor})}),o3e={from:[{type:"files",isMatch(e){return e.length>0},priority:15,transform:e=>{let t=[];return e.forEach(r=>{let o=(0,Mb.createBlobURL)(r);r.type.startsWith("video/")?t.push((0,qd.createBlock)("core/video",{blob:(0,Mb.createBlobURL)(r)})):r.type.startsWith("image/")?t.push((0,qd.createBlock)("core/image",{blob:(0,Mb.createBlobURL)(r)})):r.type.startsWith("audio/")?t.push((0,qd.createBlock)("core/audio",{blob:(0,Mb.createBlobURL)(r)})):t.push((0,qd.createBlock)("core/file",{blob:o,fileName:r.name,downloadButtonText:xY}))}),t}},{type:"block",blocks:["core/audio","core/video","core/image"],transform:e=>{let t=e.src??e.url;return(0,qd.createBlock)("core/file",{href:t,fileName:e.caption||(0,SY.getFilename)(t),textLinkHref:t,id:e.id,anchor:e.anchor,downloadButtonText:xY})}}],to:[KL("core/audio","audio","src"),KL("core/video","video","src"),KL("core/image","image","url")]},TY=o3e;var PY=n(N(),1),n3e=[{name:"default",isDefault:!0,attributes:{downloadButtonText:(0,PY._x)("Download","button label")}}],EY=n3e;var{fieldsKey:a3e,formKey:i3e}=U(BY.privateApis),{name:NY}=L3,R3={icon:ov,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,fg._x)("Armstrong_Small_Step","Name of the file")}},transforms:TY,deprecated:uY,edit:yY,save:_Y,variations:EY};window.__experimentalContentOnlyInspectorFields&&(R3[a3e]=[{id:"file",label:(0,fg.__)("File"),type:"media",Edit:{control:"media",allowedTypes:[],multiple:!1},getValue:({item:e})=>({id:e.id,url:e.href}),setValue:({value:e})=>({id:e.id,href:e.url})},{id:"fileName",label:(0,fg.__)("Filename"),type:"text",Edit:"rich-text"},{id:"downloadButtonText",label:(0,fg.__)("Button Text"),type:"text",Edit:"rich-text"}],R3[i3e]={fields:["file","fileName","downloadButtonText"]});var l3e=()=>R({name:NY,metadata:L3,settings:R3});var tR={};K(tR,{init:()=>d3e,metadata:()=>z3,name:()=>VY,settings:()=>OY});var zY=n(vu(),1);var Oo=n(N(),1),ms=n(E(),1),ds=n(O(),1),IY=n(F(),1);var QL=n(N(),1),A3=["core/form-submission-notification",{type:"success"},[["core/paragraph",{content:''+(0,QL.__)("Your form has been submitted successfully")+" "}]]],M3=["core/form-submission-notification",{type:"error"},[["core/paragraph",{content:''+(0,QL.__)("There was an error submitting your form.")+" "}]]];var da=n(y(),1),s3e=[A3,M3,["core/form-input",{type:"text",label:(0,Oo.__)("Name"),required:!0}],["core/form-input",{type:"email",label:(0,Oo.__)("Email"),required:!0}],["core/form-input",{type:"textarea",label:(0,Oo.__)("Comment"),required:!0}],["core/form-submit-button",{}]],c3e=({attributes:e,setAttributes:t,clientId:r})=>{let o=Z(),a=()=>{t({submissionMethod:"email",email:void 0,action:void 0,method:"post"})},{action:i,method:l,email:s,submissionMethod:c}=e,u=(0,ms.useBlockProps)(),{hasInnerBlocks:p}=(0,IY.useSelect)(d=>{let{getBlock:f}=d(ms.store),h=f(r);return{hasInnerBlocks:!!(h&&h.innerBlocks.length)}},[r]),m=(0,ms.useInnerBlocksProps)(u,{template:s3e,renderAppender:p?void 0:ms.InnerBlocks.ButtonBlockAppender});return(0,da.jsxs)(da.Fragment,{children:[(0,da.jsx)(ms.InspectorControls,{children:(0,da.jsxs)(ds.__experimentalToolsPanel,{dropdownMenuProps:o,label:(0,Oo.__)("Settings"),resetAll:a,children:[(0,da.jsx)(ds.__experimentalToolsPanelItem,{hasValue:()=>c!=="email",label:(0,Oo.__)("Submissions method"),onDeselect:()=>t({submissionMethod:"email"}),isShownByDefault:!0,children:(0,da.jsx)(ds.SelectControl,{label:(0,Oo.__)("Submissions method"),options:[{label:(0,Oo.__)("Send email"),value:"email"},{label:(0,Oo.__)("- Custom -"),value:"custom"}],value:c,onChange:d=>t({submissionMethod:d}),help:c==="custom"?(0,Oo.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'):(0,Oo.__)("Select the method to use for form submissions.")})}),c==="email"&&(0,da.jsx)(ds.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,Oo.__)("Email for form submissions"),onDeselect:()=>t({email:void 0,action:void 0,method:"post"}),isShownByDefault:!0,children:(0,da.jsx)(ds.TextControl,{autoComplete:"off",label:(0,Oo.__)("Email for form submissions"),value:s||"",required:!0,onChange:d=>{t({email:d}),t({action:`mailto:${d}`}),t({method:"post"})},help:(0,Oo.__)("The email address where form submissions will be sent. Separate multiple email addresses with a comma."),type:"email"})})]})}),c!=="email"&&(0,da.jsxs)(ms.InspectorControls,{group:"advanced",children:[(0,da.jsx)(ds.SelectControl,{label:(0,Oo.__)("Method"),options:[{label:"Get",value:"get"},{label:"Post",value:"post"}],value:l,onChange:d=>t({method:d}),help:(0,Oo.__)("Select the method to use for form submissions.")}),(0,da.jsx)(ds.TextControl,{autoComplete:"off",label:(0,Oo.__)("Form action"),value:i,onChange:d=>{t({action:d})},help:(0,Oo.__)("The URL where the form should be submitted."),type:"url"})]}),(0,da.jsx)("form",{...m,encType:c==="email"?"text/plain":null})]})},DY=c3e;var z3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form",title:"Form",category:"widgets",allowedBlocks:["core/paragraph","core/heading","core/form-input","core/form-submit-button","core/form-submission-notification","core/group","core/columns"],description:"A form.",keywords:["container","wrapper","row","section"],textdomain:"default",attributes:{submissionMethod:{type:"string",default:"email"},method:{type:"string",default:"post"},action:{type:"string"},email:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}}};var V3=n(E(),1),XL=n(y(),1);function LY({attributes:e}){let t=V3.useBlockProps.save(),{submissionMethod:r}=e;return(0,XL.jsx)("form",{...t,encType:r==="email"?"text/plain":null,children:(0,XL.jsx)(V3.InnerBlocks.Content,{})})}var yl=n(N(),1);var p3e=[{name:"comment-form",title:(0,yl.__)("Experimental Comment form"),description:(0,yl.__)("A comment form for posts and pages."),attributes:{submissionMethod:"custom",action:"{SITE_URL}/wp-comments-post.php",method:"post",anchor:"comment-form"},isDefault:!1,innerBlocks:[["core/form-input",{type:"text",name:"author",label:(0,yl.__)("Name"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"email",name:"email",label:(0,yl.__)("Email"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"textarea",name:"comment",label:(0,yl.__)("Comment"),required:!0,visibilityPermissions:"all"}],["core/form-submit-button",{}]],scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="text"},{name:"wp-privacy-form",title:(0,yl.__)("Experimental Privacy Request Form"),keywords:["GDPR"],description:(0,yl.__)("A form to request data exports and/or deletion."),attributes:{submissionMethod:"custom",action:"",method:"post",anchor:"gdpr-form"},isDefault:!1,innerBlocks:[A3,M3,["core/paragraph",{content:(0,yl.__)("To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps.")}],["core/form-input",{type:"email",name:"email",label:(0,yl.__)("Enter your email address."),required:!0,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"export_personal_data",label:(0,yl.__)("Request data export"),required:!1,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"remove_personal_data",label:(0,yl.__)("Request data deletion"),required:!1,visibilityPermissions:"all"}],["core/form-submit-button",{}],["core/form-input",{type:"hidden",name:"wp-action",value:"wp_privacy_send_request"}],["core/form-input",{type:"hidden",name:"wp-privacy-request",value:"1"}]],scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="text"}],RY=p3e;var ic=n(E(),1),JL=n(y(),1),m3e={supports:{},attributes:{submissionMethod:{type:"string",default:"email"},method:{type:"string",default:"post"},action:{type:"string"},email:{type:"string"},anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},fontFamily:{type:"string"},fontSize:{type:"string"}},save({attributes:e}){let{submissionMethod:t}=e,r=(0,ic.__experimentalGetColorClassesAndStyles)(e),o=(0,ic.getTypographyClassesAndStyles)(e),a=(0,ic.__experimentalGetSpacingClassesAndStyles)(e),i=ic.useBlockProps.save({style:{...r.style,...o.style,...a.style},id:e.anchor});return(0,JL.jsx)("form",{...i,className:"wp-block-form",encType:t==="email"?"text/plain":null,children:(0,JL.jsx)(ic.InnerBlocks.Content,{})})}},AY=[m3e];var O3=n(M(),1),eR=n(y(),1),MY=(0,eR.jsx)(O3.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eR.jsx)(O3.Path,{d:"M18 16H6c-1.1 0-2 .9-2 2s.9 2 2 2h12c1.1 0 2-.9 2-2s-.9-2-2-2Zm0 2.5H6c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5ZM13 13H4v1.5h9V13Zm-7-2h12c1.1 0 2-.9 2-2s-.9-2-2-2H6c-1.1 0-2 .9-2 2s.9 2 2 2Zm0-2.5h12c.3 0 .5.2.5.5s-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5s.2-.5.5-.5ZM13 4H4v1.5h9V4Z"})});var{name:VY}=z3,OY={icon:MY,edit:DY,save:LY,deprecated:AY,variations:RY,example:{}},d3e=()=>{let e=["core/form"];return(0,zY.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/preventInsertingFormIntoAnotherForm",(t,r,o,{getBlock:a,getBlockParentsByBlockName:i})=>{if(r.name!=="core/form")return t;for(let l of e)if(a(o)?.name===l||i(o,l).length)return!1;return!0}),R({name:VY,metadata:z3,settings:OY})};var oR={};K(oR,{init:()=>S3e,metadata:()=>H3,name:()=>eQ,settings:()=>tQ});var UY=n(zb(),1),fs=n(E(),1),GY=n(Pn(),1),Ei=n(y(),1),WY=e=>(0,UY.default)((0,GY.__unstableStripHTML)(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),b3e={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){let{type:t,name:r,label:o,inlineLabel:a,required:i,placeholder:l,value:s}=e,c=(0,fs.__experimentalGetBorderClassesAndStyles)(e),u=(0,fs.__experimentalGetColorClassesAndStyles)(e),p={...c.style,...u.style},m=S("wp-block-form-input__input",u.className,c.className),d=t==="textarea"?"textarea":"input",f=fs.useBlockProps.save();return t==="hidden"?(0,Ei.jsx)("input",{type:t,name:r,value:s}):(0,Ei.jsx)("div",{...f,children:(0,Ei.jsxs)("label",{className:S("wp-block-form-input__label",{"is-label-inline":a}),children:[(0,Ei.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Ei.jsx)(fs.RichText.Content,{value:o})}),(0,Ei.jsx)(d,{className:m,type:t==="textarea"?void 0:t,name:r||WY(o),required:i,"aria-required":i,placeholder:l||void 0,style:p})]})})}},y3e={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{className:!1,anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){let{type:t,name:r,label:o,inlineLabel:a,required:i,placeholder:l,value:s}=e,c=(0,fs.__experimentalGetBorderClassesAndStyles)(e),u=(0,fs.__experimentalGetColorClassesAndStyles)(e),p={...c.style,...u.style},m=S("wp-block-form-input__input",u.className,c.className),d=t==="textarea"?"textarea":"input";return t==="hidden"?(0,Ei.jsx)("input",{type:t,name:r,value:s}):(0,Ei.jsxs)("label",{className:S("wp-block-form-input__label",{"is-label-inline":a}),children:[(0,Ei.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Ei.jsx)(fs.RichText.Content,{value:o})}),(0,Ei.jsx)(d,{className:m,type:t==="textarea"?void 0:t,name:r||WY(o),required:i,"aria-required":i,placeholder:l||void 0,style:p})]})}},_3e=[b3e,y3e],$Y=_3e;var An=n(N(),1),hs=n(E(),1),gs=n(O(),1),qY=n(H(),1);var io=n(y(),1);function x3e({attributes:e,setAttributes:t,className:r}){let{type:o,name:a,label:i,inlineLabel:l,required:s,placeholder:c,value:u}=e,p=(0,hs.useBlockProps)(),m=Z(),d=(0,qY.useRef)(),f=o==="textarea"?"textarea":"input",h=(0,hs.__experimentalUseBorderProps)(e),g=(0,hs.__experimentalUseColorProps)(e);d.current&&d.current.focus();let v=o==="checkbox"||o==="radio",b=(0,io.jsxs)(io.Fragment,{children:[o!=="hidden"&&(0,io.jsx)(hs.InspectorControls,{children:(0,io.jsxs)(gs.__experimentalToolsPanel,{label:(0,An.__)("Settings"),resetAll:()=>{t({inlineLabel:!1,required:!1})},dropdownMenuProps:m,children:[o!=="checkbox"&&(0,io.jsx)(gs.__experimentalToolsPanelItem,{label:(0,An.__)("Inline label"),hasValue:()=>!!l,onDeselect:()=>t({inlineLabel:!1}),isShownByDefault:!0,children:(0,io.jsx)(gs.CheckboxControl,{label:(0,An.__)("Inline label"),checked:l,onChange:k=>{t({inlineLabel:k})}})}),(0,io.jsx)(gs.__experimentalToolsPanelItem,{label:(0,An.__)("Required"),hasValue:()=>!!s,onDeselect:()=>t({required:!1}),isShownByDefault:!0,children:(0,io.jsx)(gs.CheckboxControl,{label:(0,An.__)("Required"),checked:s,onChange:k=>{t({required:k})}})})]})}),(0,io.jsxs)(hs.InspectorControls,{group:"advanced",children:[(0,io.jsx)(gs.TextControl,{autoComplete:"off",label:(0,An.__)("Name"),value:a,onChange:k=>{t({name:k})},help:(0,An.__)('Affects the "name" attribute of the input element, and is used as a name for the form submission results.')}),o==="hidden"&&(0,io.jsx)(gs.TextControl,{autoComplete:"off",label:(0,An.__)("Value"),value:u,onChange:k=>t({value:k}),help:(0,An.__)("Sets the stored value for this hidden field.")})]})]}),_=(0,io.jsx)(hs.RichText,{tagName:"span",className:"wp-block-form-input__label-content",value:i,onChange:k=>t({label:k}),"aria-label":i?(0,An.__)("Label"):(0,An.__)("Empty label"),"data-empty":!i,placeholder:(0,An.__)("Type the label for this input")});return o==="hidden"?(0,io.jsxs)("div",{...p,children:[b,(0,io.jsx)("span",{className:"wp-block-form-input__label is-input-hidden","data-message":(0,An.__)("Hidden field")})]}):(0,io.jsxs)("div",{...p,children:[b,(0,io.jsxs)("span",{className:S("wp-block-form-input__label",{"is-label-inline":l||o==="checkbox"}),children:[!v&&_,(0,io.jsx)(f,{type:o==="textarea"?void 0:o,className:S(r,"wp-block-form-input__input",g.className,h.className),"aria-label":(0,An.__)("Optional placeholder text"),placeholder:c?void 0:(0,An.__)("Optional placeholder\u2026"),value:c,onChange:k=>t({placeholder:k.target.value}),"aria-required":s,style:{...h.style,...g.style}}),v&&_]})]})}var ZY=x3e;var H3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-input",title:"Input Field",category:"widgets",ancestor:["core/form"],description:"The basic building block for forms.",keywords:["input","form"],textdomain:"default",attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"rich-text",default:"Label",selector:".wp-block-form-input__label-content",source:"rich-text",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},style:["wp-block-form-input"]};var KY=n(zb(),1),ku=n(E(),1),YY=n(Pn(),1),lc=n(y(),1),w3e=e=>(0,KY.default)((0,YY.__unstableStripHTML)(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"");function QY({attributes:e}){let{type:t,name:r,label:o,inlineLabel:a,required:i,placeholder:l,value:s}=e,c=(0,ku.__experimentalGetBorderClassesAndStyles)(e),u=(0,ku.__experimentalGetColorClassesAndStyles)(e),p={...c.style,...u.style},m=S("wp-block-form-input__input",u.className,c.className),d=t==="textarea"?"textarea":"input",f=ku.useBlockProps.save(),h=t==="checkbox"||t==="radio";return t==="hidden"?(0,lc.jsx)("input",{type:t,name:r,value:s}):(0,lc.jsx)("div",{...f,children:(0,lc.jsxs)("label",{className:S("wp-block-form-input__label",{"is-label-inline":a}),children:[!h&&(0,lc.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,lc.jsx)(ku.RichText.Content,{value:o})}),(0,lc.jsx)(d,{className:m,type:t==="textarea"?void 0:t,name:r||w3e(o),required:i,"aria-required":i,placeholder:l||void 0,style:p}),h&&(0,lc.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,lc.jsx)(ku.RichText.Content,{value:o})})]})})}var un=n(N(),1),C3e=[{name:"text",title:(0,un.__)("Text Input"),description:(0,un.__)("A generic text input."),attributes:{type:"text"},isDefault:!0,scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="text"},{name:"textarea",title:(0,un.__)("Textarea Input"),description:(0,un.__)("A textarea input to allow entering multiple lines of text."),attributes:{type:"textarea"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="textarea"},{name:"checkbox",title:(0,un.__)("Checkbox Input"),description:(0,un.__)("A simple checkbox input."),attributes:{type:"checkbox",inlineLabel:!0},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="checkbox"},{name:"email",title:(0,un.__)("Email Input"),description:(0,un.__)("Used for email addresses."),attributes:{type:"email"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="email"},{name:"url",title:(0,un.__)("URL Input"),description:(0,un.__)("Used for URLs."),attributes:{type:"url"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="url"},{name:"tel",title:(0,un.__)("Telephone Input"),description:(0,un.__)("Used for phone numbers."),attributes:{type:"tel"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="tel"},{name:"number",title:(0,un.__)("Number Input"),description:(0,un.__)("A numeric input."),attributes:{type:"number"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="number"},{name:"hidden",title:(0,un.__)("Hidden Input"),icon:"visibility",description:(0,un.__)("A hidden input field."),attributes:{type:"hidden"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="hidden"}],XY=C3e;var j3=n(M(),1),rR=n(y(),1),JY=(0,rR.jsx)(j3.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rR.jsx)(j3.Path,{d:"M5.547 18.892A.99.99 0 0 0 6 19h.72v1H6a1.99 1.99 0 0 1-.908-.22l.455-.888ZM9.12 20H7.68v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.587-.22c-.272.14-.58.22-.907.22h-.72v-1H18a.99.99 0 0 0 .453-.108l.454.888ZM5.108 17.547a.99.99 0 0 0 0 .906l-.89.454a1.99 1.99 0 0 1 0-1.815l.89.455Zm14.672-.455a1.99 1.99 0 0 1 0 1.815l-.888-.454a.99.99 0 0 0 0-.906l.888-.455ZM6.72 17H6a.99.99 0 0 0-.453.108l-.455-.89A1.99 1.99 0 0 1 6 16h.72v1ZM18 16c.327 0 .635.08.907.219l-.454.89A.99.99 0 0 0 18 17h-.72v-1H18Zm-8.88 1H7.68v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1ZM5.5 14.28H4.25v-1H5.5v1Zm2.5 0H6.5v-1H8v1Zm2.5 0H9v-1h1.5v1Zm2.25 0H11.5v-1h1.25v1ZM18 7a2 2 0 1 1 0 4H6a2 2 0 1 1 0-4h12ZM6 8.5a.5.5 0 0 0 0 1h12a.5.5 0 0 0 0-1H6Zm7-3H4V4h9v1.5Z"})});var{name:eQ}=H3,tQ={icon:JY,deprecated:$Y,edit:ZY,save:QY,variations:XY,example:{}},S3e=()=>R({name:eQ,metadata:H3,settings:tQ});var aR={};K(aR,{init:()=>B3e,metadata:()=>G3,name:()=>iQ,settings:()=>lQ});var rQ=n(N(),1),U3=n(E(),1),oQ=n(y(),1),T3e=[["core/buttons",{},[["core/button",{text:(0,rQ.__)("Submit"),tagName:"button",type:"submit"}]]]],P3e=()=>{let e=(0,U3.useBlockProps)(),t=(0,U3.useInnerBlocksProps)(e,{template:T3e,templateLock:"all"});return(0,oQ.jsx)("div",{className:"wp-block-form-submit-wrapper",...t})},nQ=P3e;var G3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submit-button",title:"Form Submit Button",category:"widgets",icon:"button",ancestor:["core/form"],allowedBlocks:["core/buttons","core/button"],description:"A submission button for forms.",keywords:["submit","button","form"],textdomain:"default",style:["wp-block-form-submit-button"]};var W3=n(E(),1),nR=n(y(),1);function aQ(){let e=W3.useBlockProps.save();return(0,nR.jsx)("div",{className:"wp-block-form-submit-wrapper",...e,children:(0,nR.jsx)(W3.InnerBlocks.Content,{})})}var{name:iQ}=G3,lQ={edit:nQ,save:aQ,example:{}},B3e=()=>R({name:iQ,metadata:G3,settings:lQ});var iR={};K(iR,{init:()=>R3e,metadata:()=>q3,name:()=>fQ,settings:()=>hQ});var $3=n(N(),1),Vp=n(E(),1),sQ=n(F(),1);var cQ=n(y(),1),N3e=[["core/paragraph",{content:(0,$3.__)("Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options.")}]],I3e=({attributes:e,clientId:t})=>{let{type:r}=e,o=(0,Vp.useBlockProps)({className:S("wp-block-form-submission-notification",{[`form-notification-type-${r}`]:r})}),{hasInnerBlocks:a}=(0,sQ.useSelect)(l=>{let{getBlock:s}=l(Vp.store),c=s(t);return{hasInnerBlocks:!!(c&&c.innerBlocks.length)}},[t]),i=(0,Vp.useInnerBlocksProps)(o,{template:N3e,renderAppender:a?void 0:Vp.InnerBlocks.ButtonBlockAppender});return(0,cQ.jsx)("div",{...i,"data-message-success":(0,$3.__)("Submission success notification"),"data-message-error":(0,$3.__)("Submission error notification")})},uQ=I3e;var q3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submission-notification",title:"Form Submission Notification",category:"widgets",ancestor:["core/form"],description:"Provide a notification message after the form has been submitted.",keywords:["form","feedback","notification","message"],textdomain:"default",icon:"feedback",attributes:{type:{type:"string",default:"success"}}};var Z3=n(E(),1);var pQ=n(y(),1);function mQ({attributes:e}){let{type:t}=e;return(0,pQ.jsx)("div",{...Z3.useInnerBlocksProps.save(Z3.useBlockProps.save({className:S("wp-block-form-submission-notification",{[`form-notification-type-${t}`]:t})}))})}var Zd=n(N(),1),L3e=[{name:"form-submission-success",title:(0,Zd.__)("Form Submission Success"),description:(0,Zd.__)("Success message for form submissions."),attributes:{type:"success"},isDefault:!0,innerBlocks:[["core/paragraph",{content:(0,Zd.__)("Your form has been submitted successfully."),backgroundColor:"#00D084",textColor:"#000000",style:{elements:{link:{color:{text:"#000000"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="success"},{name:"form-submission-error",title:(0,Zd.__)("Form Submission Error"),description:(0,Zd.__)("Error/failure message for form submissions."),attributes:{type:"error"},isDefault:!1,innerBlocks:[["core/paragraph",{content:(0,Zd.__)("There was an error submitting your form."),backgroundColor:"#CF2E2E",textColor:"#FFFFFF",style:{elements:{link:{color:{text:"#FFFFFF"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="error"}],dQ=L3e;var{name:fQ}=q3,hQ={icon:ed,edit:uQ,save:mQ,variations:dQ,example:{}},R3e=()=>R({name:fQ,metadata:q3,settings:hQ});var _R={};K(_R,{init:()=>T4e,metadata:()=>l4,name:()=>wX,settings:()=>CX});var Vr=n(E(),1),bQ=n(q(),1);var sc="none",cc="media",hg="lightbox",uc="attachment",gQ="file",vQ="post",Vb="large";var Ue=n(y(),1),yQ="file",_Q="post";function gg(e){return Math.min(3,e?.images?.length)}function A3e(e,t){switch(t){case yQ:return{href:e?.source_url||e?.url,linkDestination:cc};case _Q:return{href:e?.link,linkDestination:uc};case cc:return{href:e?.source_url||e?.url,linkDestination:cc};case uc:return{href:e?.link,linkDestination:uc};case sc:return{href:void 0,linkDestination:sc}}return{}}function vg(e){let t=e.linkTo?e.linkTo:"none";t==="post"?t="attachment":t==="file"&&(t="media");let r=e.images.map(l=>M3e(l,e.sizeSlug,t)),{images:o,ids:a,...i}=e;return[{...i,linkTo:t,allowResize:!1},r]}function M3e(e,t,r){return(0,bQ.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...A3e(e,r)})}var z3e={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",default:[],items:{type:"object"}},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},save({attributes:e}){let{caption:t,columns:r,imageCrop:o}=e,a=S("has-nested-images",{[`columns-${r}`]:r!==void 0,"columns-default":r===void 0,"is-cropped":o}),i=Vr.useBlockProps.save({className:a}),l=Vr.useInnerBlocksProps.save(i);return(0,Ue.jsxs)("figure",{...l,children:[l.children,!Vr.RichText.isEmpty(t)&&(0,Ue.jsx)(Vr.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:t})]})}},V3e={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},save({attributes:e}){let{images:t,columns:r=gg(e),imageCrop:o,caption:a,linkTo:i}=e,l=`columns-${r} ${o?"is-cropped":""}`;return(0,Ue.jsxs)("figure",{...Vr.useBlockProps.save({className:l}),children:[(0,Ue.jsx)("ul",{className:"blocks-gallery-grid",children:t.map(s=>{let c;switch(i){case yQ:c=s.fullUrl||s.url;break;case _Q:c=s.link;break}let u=(0,Ue.jsx)("img",{src:s.url,alt:s.alt,"data-id":s.id,"data-full-url":s.fullUrl,"data-link":s.link,className:s.id?`wp-image-${s.id}`:null});return(0,Ue.jsx)("li",{className:"blocks-gallery-item",children:(0,Ue.jsxs)("figure",{children:[c?(0,Ue.jsx)("a",{href:c,children:u}):u,!Vr.RichText.isEmpty(s.caption)&&(0,Ue.jsx)(Vr.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:s.caption})]})},s.id||s.url)})}),!Vr.RichText.isEmpty(a)&&(0,Ue.jsx)(Vr.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a})]})},migrate(e){return vg(e)}},O3e={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible({linkTo:e}){return!e||e==="attachment"||e==="media"},migrate(e){return vg(e)},save({attributes:e}){let{images:t,columns:r=gg(e),imageCrop:o,caption:a,linkTo:i}=e;return(0,Ue.jsxs)("figure",{className:`columns-${r} ${o?"is-cropped":""}`,children:[(0,Ue.jsx)("ul",{className:"blocks-gallery-grid",children:t.map(l=>{let s;switch(i){case"media":s=l.fullUrl||l.url;break;case"attachment":s=l.link;break}let c=(0,Ue.jsx)("img",{src:l.url,alt:l.alt,"data-id":l.id,"data-full-url":l.fullUrl,"data-link":l.link,className:l.id?`wp-image-${l.id}`:null});return(0,Ue.jsx)("li",{className:"blocks-gallery-item",children:(0,Ue.jsxs)("figure",{children:[s?(0,Ue.jsx)("a",{href:s,children:c}):c,!Vr.RichText.isEmpty(l.caption)&&(0,Ue.jsx)(Vr.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:l.caption})]})},l.id||l.url)})}),!Vr.RichText.isEmpty(a)&&(0,Ue.jsx)(Vr.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a})]})}},F3e={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible({ids:e}){return e&&e.some(t=>typeof t=="string")},migrate(e){return vg(e)},save({attributes:e}){let{images:t,columns:r=gg(e),imageCrop:o,caption:a,linkTo:i}=e;return(0,Ue.jsxs)("figure",{className:`columns-${r} ${o?"is-cropped":""}`,children:[(0,Ue.jsx)("ul",{className:"blocks-gallery-grid",children:t.map(l=>{let s;switch(i){case"media":s=l.fullUrl||l.url;break;case"attachment":s=l.link;break}let c=(0,Ue.jsx)("img",{src:l.url,alt:l.alt,"data-id":l.id,"data-full-url":l.fullUrl,"data-link":l.link,className:l.id?`wp-image-${l.id}`:null});return(0,Ue.jsx)("li",{className:"blocks-gallery-item",children:(0,Ue.jsxs)("figure",{children:[s?(0,Ue.jsx)("a",{href:s,children:c}):c,!Vr.RichText.isEmpty(l.caption)&&(0,Ue.jsx)(Vr.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:l.caption})]})},l.id||l.url)})}),!Vr.RichText.isEmpty(a)&&(0,Ue.jsx)(Vr.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a})]})}},H3e={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){let{images:t,columns:r=gg(e),imageCrop:o,linkTo:a}=e;return(0,Ue.jsx)("ul",{className:`columns-${r} ${o?"is-cropped":""}`,children:t.map(i=>{let l;switch(a){case"media":l=i.fullUrl||i.url;break;case"attachment":l=i.link;break}let s=(0,Ue.jsx)("img",{src:i.url,alt:i.alt,"data-id":i.id,"data-full-url":i.fullUrl,"data-link":i.link,className:i.id?`wp-image-${i.id}`:null});return(0,Ue.jsx)("li",{className:"blocks-gallery-item",children:(0,Ue.jsxs)("figure",{children:[l?(0,Ue.jsx)("a",{href:l,children:s}):s,i.caption&&i.caption.length>0&&(0,Ue.jsx)(Vr.RichText.Content,{tagName:"figcaption",value:i.caption})]})},i.id||i.url)})})},migrate(e){return vg(e)}},j3e={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible({images:e,ids:t}){return e&&e.length>0&&(!t&&e||t&&e&&t.length!==e.length||e.some((r,o)=>!r&&t[o]!==null?!0:parseInt(r,10)!==t[o]))},migrate(e){return vg(e)},supports:{align:!0},save({attributes:e}){let{images:t,columns:r=gg(e),imageCrop:o,linkTo:a}=e;return(0,Ue.jsx)("ul",{className:`columns-${r} ${o?"is-cropped":""}`,children:t.map(i=>{let l;switch(a){case"media":l=i.url;break;case"attachment":l=i.link;break}let s=(0,Ue.jsx)("img",{src:i.url,alt:i.alt,"data-id":i.id,"data-link":i.link,className:i.id?`wp-image-${i.id}`:null});return(0,Ue.jsx)("li",{className:"blocks-gallery-item",children:(0,Ue.jsxs)("figure",{children:[l?(0,Ue.jsx)("a",{href:l,children:s}):s,i.caption&&i.caption.length>0&&(0,Ue.jsx)(Vr.RichText.Content,{tagName:"figcaption",value:i.caption})]})},i.id||i.url)})})}},U3e={attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){let{images:t,columns:r=gg(e),align:o,imageCrop:a,linkTo:i}=e,l=S(`columns-${r}`,{alignnone:o==="none","is-cropped":a});return(0,Ue.jsx)("div",{className:l,children:t.map(s=>{let c;switch(i){case"media":c=s.url;break;case"attachment":c=s.link;break}let u=(0,Ue.jsx)("img",{src:s.url,alt:s.alt,"data-id":s.id});return(0,Ue.jsx)("figure",{className:"blocks-gallery-image",children:c?(0,Ue.jsx)("a",{href:c,children:u}):u},s.id||s.url)})})},migrate(e){return vg(e)}},xQ=[z3e,V3e,O3e,F3e,H3e,j3e,U3e];var Tt=n(O(),1),lo=n(E(),1),Gb=n(H(),1),He=n(N(),1),Wb=n(F(),1),hX=n(q(),1),vR=n(Ar(),1),gX=n(Sr(),1);var kQ=n(E(),1);var wQ=n(y(),1),K3=(0,wQ.jsx)(kQ.BlockIcon,{icon:cv});function Y3(e){return e?Math.min(3,e):3}var Q3=(e,t="large")=>{let r=Object.fromEntries(Object.entries(e??{}).filter(([a])=>["alt","id","link"].includes(a)));r.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url||e?.source_url;let o=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return o&&(r.fullUrl=o),r};var pc=20,Kd="none",bg="media",yg="attachment",lR="custom",CQ=["noopener"],Op=["image"];var sR=["flex","grid"],Ob="full";function Fb(e,t,r,o,a){switch(r||t){case gQ:case cc:return{href:e?.source_url||e?.url,linkDestination:bg,lightbox:a?.enabled?{...o?.lightbox,enabled:!1}:void 0};case vQ:case uc:return{href:e?.link,linkDestination:yg,lightbox:a?.enabled?{...o?.lightbox,enabled:!1}:void 0};case hg:return{href:void 0,lightbox:a?.enabled?void 0:{...o?.lightbox,enabled:!0},linkDestination:Kd};case sc:return{href:void 0,linkDestination:Kd,lightbox:void 0}}return{}}function SQ(e){let[t,r=1]=e.split("/").map(Number),o=t/r;return o===1/0||o===0?NaN:o}function G3e(e){let t=e;return e!==void 0&&t&&(CQ.forEach(r=>{let o=new RegExp("\\b"+r+"\\b","gi");t=t.replace(o,"")}),t!==e&&(t=t.trim()),t||(t=void 0)),t}function Hb(e,{rel:t}){let r=e?"_blank":void 0,o;return!r&&!t?o=void 0:o=G3e(t),{linkTarget:r,rel:o}}function TQ(e,t){let r=e?.media_details?.sizes?.[t]?.source_url;return r?{url:r,width:void 0,height:void 0,sizeSlug:t}:{}}function cR(e){return Op.some(t=>e.type.indexOf(t)===0)}function Yd({x:e,y:t}={x:.5,y:.5}){return`${Math.round(e*100)}% ${Math.round(t*100)}%`}var uR=n(N(),1);var X3=n(y(),1);function PQ(e){let{attributes:t,isSelected:r,setAttributes:o,insertBlocksAfter:a,blockProps:i,__unstableLayoutClassNames:l,isContentLocked:s,multiGallerySelection:c}=e,{align:u,columns:p,imageCrop:m}=t;return(0,X3.jsxs)("figure",{...i,className:S(i.className,l,"blocks-gallery-grid",{[`align${u}`]:u,[`columns-${p}`]:p!==void 0,"columns-default":p===void 0,"is-cropped":m}),children:[i.children,(0,X3.jsx)(Mo,{attributes:t,setAttributes:o,isSelected:r,insertBlocksAfter:a,showToolbarButton:!c&&!s,className:"blocks-gallery-caption",label:(0,uR.__)("Gallery caption text"),placeholder:(0,uR.__)("Add gallery caption")})]})}var EQ=n(H(),1);function BQ(e,t,r){return(0,EQ.useMemo)(()=>o(),[e,t]);function o(){if(!e||e.length===0)return;let{imageSizes:a}=r(),i={};t&&(i=e.reduce((s,c)=>{if(!c.id)return s;let u=a.reduce((p,m)=>{let d=c.sizes?.[m.slug]?.url,f=c.media_details?.sizes?.[m.slug]?.source_url;return{...p,[m.slug]:d||f}},{});return{...s,[parseInt(c.id,10)]:u}},{}));let l=Object.values(i);return a.filter(({slug:s})=>l.some(c=>c[s])).map(({name:s,slug:c})=>({value:c,label:s}))}}var J3=n(H(),1);function NQ(e,t){let[r,o]=(0,J3.useState)([]);return(0,J3.useMemo)(()=>a(),[e,t]);function a(){let i=!1,l=r.filter(c=>e.find(u=>c.clientId===u.clientId));l.length{c.fromSavedContent&&!l.find(u=>u.id===c.id)&&(i=!0,l.push(c))});let s=e.filter(c=>!l.find(u=>c.clientId&&u.clientId===c.clientId)&&t?.find(u=>u.id===c.id)&&!c.fromSavedContent);return(i||s?.length>0)&&o([...l,...s]),s.length>0?s:null}}var DQ=n(F(),1),LQ=n(re(),1),IQ=[];function RQ(e){return(0,DQ.useSelect)(t=>{let r=e.map(o=>o.attributes.id).filter(o=>o!==void 0);return r.length===0?IQ:t(LQ.store).getEntityRecords("postType","attachment",{include:r.join(","),per_page:-1,orderby:"include"})??IQ},[e])}var vs=n(E(),1),rX=n(F(),1);var Qd=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),a=e;return o.forEach(i=>{a=a?.[i]}),a??r};var zQ=n(MQ(),1);function W3e(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,zQ.getCSSValueFromRawStyle)(Qd(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function $3e(e,t){if(!e||!t||!Array.isArray(t))return e;let r=t.find(o=>o?.name===e);return r?.href?r?.href:e}function VQ(e,t){if(!e||!t)return e;let r=W3e(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=$3e(r.url,t?._links?.["wp:theme-file"])),r}var HQ={mobile:"480px",tablet:"782px"},jQ=/^(\d+|\d*\.\d+)(px|em|rem)$/,q3e=16;function Z3e(e){return"mobile"in e||"tablet"in e}function K3e(e){return!e||typeof e!="object"?{}:Z3e(e)?e:e.settings?.viewport??{}}function Y3e(e){return typeof e=="string"&&jQ.test(e.trim())}function pR(e){if(typeof e=="number")return e;if(typeof e!="string")return;let t=e.trim().match(jQ);if(!t)return;let r=Number.parseFloat(t[1]);return t[2]==="px"?r:r*q3e}function mR(e){let t=K3e(e),r={},o={};Object.keys(HQ).forEach(s=>{let c=s,u=t[c],p=pR(u);p!==void 0&&Y3e(u)&&(r[c]=u.trim(),o[c]=p)});let a=Object.keys(r);if(!a.length)return{...HQ};if(a.length===1)return r;let i=r.mobile,l=r.tablet;return o.mobile>=o.tablet?{mobile:i}:{mobile:i,tablet:l}}function UQ(e){let t=mR(e),r={};return t.mobile&&(r["@mobile"]=`@media (width <= ${t.mobile})`),t.tablet&&(r["@tablet"]=t.mobile?`@media (${t.mobile} < width <= ${t.tablet})`:`@media (width <= ${t.tablet})`),r}function e4(e,t,r,{resolveRefs:o=!0}={}){if(!e?.styles?.blocks?.[t]?.variations?.[r])return;let a=l=>{Object.keys(l).forEach(s=>{let c=l[s];if(typeof c=="object"&&c!==null)if(c.ref!==void 0)if(typeof c.ref!="string"||c.ref.trim()==="")delete l[s];else{let u=Qd(e,c.ref);u!=null?l[s]=u:delete l[s]}else a(c),Object.keys(c).length===0&&delete l[s]})},i=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[r]));return o&&a(i),i}var hR="default";function qQ(e){let t=e?.viewport,r=e?.pseudoState;return(!t||t===hR)&&(!r||r===hR)}function Q3e(e){return qQ(e)?[]:[e.viewport,e.pseudoState].filter(t=>!!t&&t!==hR)}function X3e(e,t){let r=Q3e(t);return r.length?Qd(e,r):e}var J3e=new Set(["blocks","variations","css"]),dR=Object.freeze({value:{},sources:{}}),e4e={root:{layer:"root"},element:{layer:"element"},block:{layer:"block"},blockVariation:{layer:"blockVariation"}};function Fp(e){let t=e4e[e];return t?{...t}:null}function Hp(e,t){return!e||!t?null:{styles:e,source:t}}function t4e(e){return e.join(".")}function r4e(e){return{...e}}function ZQ(e){return e===""||e===null||typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}function fR(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&typeof e.ref=="string"}function jp(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t={};for(let r of Object.keys(e))if(!J3e.has(r)){if(r==="elements"){e.elements&&typeof e.elements=="object"&&(t.elements=e.elements);continue}ZQ(e[r])||(t[r]=e[r])}return Object.keys(t).length===0?null:t}var GQ=new Set(["backgroundImage"]);function KQ(e,t,r,o,a,i=[]){if(!t||typeof t!="object"||Array.isArray(t))return e;for(let l of Object.keys(t)){let s=t[l];if(ZQ(s))continue;if(fR(s)){if(s.ref.trim()==="")continue;let u=Qd(r,s.ref);if(u==null||fR(u))continue;s=u}let c=[...i,l];if(!GQ.has(l)&&s!==null&&typeof s=="object"&&!Array.isArray(s)&&!fR(s)){let u=e[l]&&typeof e[l]=="object"&&!Array.isArray(e[l])?e[l]:{};e[l]=KQ({...u},s,r,o,a,c)}else e[l]=GQ.has(l)&&s!==null&&typeof s=="object"&&!Array.isArray(s)?{...s}:s,o&&a&&(a[t4e(c)]=r4e(o))}return e}function t4(e,t){if(!e)return null;let r=X3e(e,t);return r&&typeof r=="object"&&!Array.isArray(r)?r:null}var o4e=["color.background","color.gradient","background","spacing","dimensions","border","shadow","filter"];function n4e(e){return e.startsWith("elements.")?!1:o4e.some(t=>e===t||e.startsWith(`${t}.`))}function YQ(e,t){if(!e||typeof e!="object")return;let[r,...o]=t;if(o.length===0){delete e[r];return}let a=e[r];a&&typeof a=="object"&&(YQ(a,o),Object.keys(a).length===0&&delete e[r])}function a4e(e,t){for(let r of Object.keys(t))t[r].layer==="root"&&n4e(r)&&(YQ(e,r.split(".")),delete t[r])}function i4e(e,t,r){let o=e?.background?.backgroundImage;if(!o)return;let a=VQ(o,{...t,_links:r??void 0});a!==void 0&&(e.background.backgroundImage=a)}function WQ(e,{blockName:t,variationName:r=null,elements:o=null,viewport:a=null,pseudoState:i=null}={}){if(!e||!e.styles||!t)return dR;let l=e.styles,s={viewport:a,pseudoState:i},c=l,u=l.blocks?.[t]??null,p=(o??[]).map(v=>l.elements?.[v]??null).filter(v=>!!v),m=r?e4(e,t,r)??null:null,d=[Hp(jp(c),Fp("root")),...p.map(v=>Hp(jp(v),Fp("element"))),u?Hp(jp(u),Fp("block")):null,m?Hp(jp(m),Fp("blockVariation")):null];qQ(s)||d.push(Hp(jp(t4(c,s)),Fp("root")),...p.map(v=>Hp(jp(t4(v,s)),Fp("element"))),u?Hp(jp(t4(u,s)),Fp("block")):null,m?Hp(jp(t4(m,s)),Fp("blockVariation")):null);let f=d.filter(Boolean);if(f.length===0)return dR;let h={},g=f.reduce((v,b)=>KQ(v,b.styles,e,b.source,h),{});return a4e(g,h),i4e(g,e,e._links??null),{value:g,sources:h}}var l4e={},$Q=new WeakMap;function QQ(e,t={}){let r=e?.styles;if(!r||typeof r!="object")return WQ(e,t);let o=$Q.get(r);o||(o=new WeakMap,$Q.set(r,o));let a=e?._links??l4e,i=o.get(a);i||(i=new Map,o.set(a,i));let l=`${t.elements?.join(",")??""}:${t.viewport??""}:${t.pseudoState??""}`,s=(t.blockName||"")+""+(t.variationName||"")+""+l;if(i.has(s))return i.get(s);let c=WQ(e,t);return i.set(s,c),c}var XQ=n(TI(),1),{lock:JQ,unlock:Cet}=(0,XQ.__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/global-styles-engine");var _g={};JQ(_g,{getResponsiveMediaQueries:UQ,getViewportBreakpoints:mR,getViewportBreakpointValueInPixels:pR,resolveStyle:QQ,getVariationStyle:e4});var{getResponsiveMediaQueries:s4e}=U(_g),{globalStylesDataKey:c4e}=U(vs.privateApis),u4e="core/gallery",r4="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )";function eX(e,t){let r=r4;return t&&(r=typeof t=="string"?(0,vs.__experimentalGetGapCSSValue)(t)||r4:(0,vs.__experimentalGetGapCSSValue)(t?.left)||r4),`${e} {
--wp--style--unstable-gallery-gap: ${r==="0"?"0px":r}
}`}function tX(e){if(Object.hasOwn(e?.spacing||{},"blockGap"))return e.spacing.blockGap}function oX({style:e,clientId:t}){let r=`#block-${t}`,[o]=(0,vs.useSettings)("viewport"),i=(0,rX.useSelect)(p=>p(vs.store).getSettings()?.[c4e],[])?.blocks?.[u4e]||{},l=tX(e),s=i?.spacing?.blockGap??r4,u=eX(r,l===void 0?s:l);return Object.entries(s4e(o)).forEach(([p,m])=>{let d=tX(e?.[p]),f=l===void 0?i?.[p]?.spacing?.blockGap:void 0,h=d===void 0?f:d;h!=null&&(u+=`${m}{${eX(r,h)}}`)}),(0,vs.useStyleOverride)({css:u}),null}var Ub=n(H(),1),wg=n(F(),1),lX=n(E(),1),a4=n(re(),1),sX=n(q(),1);var o4=n(N(),1),Up="core/attached-media",xg="date",kg="desc",p4e={[Up]:{title:(0,o4.__)("Use attached images"),description:(0,o4.__)("Images attached to the post."),emptyMessage:(0,o4.__)("Images attached to the post will appear here.")}};function n4(e){return p4e[e]}var jb=100;function nX(e,{postId:t}){let{source:r,args:o={}}=e??{};return r===Up&&t?{parent:t,per_page:jb,media_type:"image",orderby:o.orderBy==="date"||o.orderBy==="title"?o.orderBy:xg,order:o.order==="asc"||o.order==="desc"?o.order:kg}:null}var aX=[];function m4e(e,t){let{sizeSlug:r,linkTo:o,linkTarget:a,aspectRatio:i}=t,l=!!i&&i!=="auto";return{id:e.id,...Q3(e,r),...Fb(e,o),...Hb(a,t),sizeSlug:r,caption:e.caption?.raw||"",alt:e.alt_text||"",aspectRatio:l?i:void 0,scale:l?"cover":void 0}}function iX(e,t){return e.map(r=>(0,sX.createBlock)("core/image",m4e(r,t)))}function cX({attributes:e,setAttributes:t,clientId:r,postId:o,postType:a}){let{dynamicContent:i}=e,l=!!a,s=n4(i?.source),c=i?.args?.orderBy??xg,u=i?.args?.order??kg,p=(0,wg.useRegistry)(),{replaceInnerBlocks:m,__unstableMarkNextChangeAsNotPersistent:d}=(0,wg.useDispatch)(lX.store),f=(0,Ub.useMemo)(()=>i?nX(i,{postId:o}):null,[i,o]),{dynamicMedia:h,dynamicMediaTotal:g,isResolvingDynamic:v}=(0,wg.useSelect)(A=>{if(!f)return{dynamicMedia:aX,dynamicMediaTotal:0,isResolvingDynamic:!1};let z=["postType","attachment",f];return{dynamicMedia:A(a4.store).getEntityRecords(...z)??aX,dynamicMediaTotal:A(a4.store).getEntityRecordsTotalItems(...z)??0,isResolvingDynamic:!A(a4.store).hasFinishedResolution("getEntityRecords",z)}},[f]),b=g>jb,{sizeSlug:_,linkTo:k,linkTarget:x,aspectRatio:w}=e,C=(0,Ub.useMemo)(()=>({sizeSlug:_,linkTo:k,linkTarget:x,aspectRatio:w}),[_,k,x,w]),P=(0,Ub.useMemo)(()=>iX(h,C),[h,C]),B=(0,Ub.useMemo)(()=>({allowResize:e.allowResize??!1,imageCrop:e.imageCrop,fixedHeight:e.fixedHeight,navigationButtonType:e.navigationButtonType}),[e.allowResize,e.imageCrop,e.fixedHeight,e.navigationButtonType]);function I(){p.batch(()=>{t({dynamicContent:{source:Up}}),d(),m(r,[])})}function D(){p.batch(()=>{m(r,iX(h,C)),d(),t({dynamicContent:void 0})})}function T(A,z){let j={...i?.args};delete j.orderBy,delete j.order,A!==void 0&&(A!==xg||z!==kg)&&(j.orderBy=A,j.order=z);let G={...i};Object.keys(j).length?G.args=j:delete G.args,t({dynamicContent:G})}function L(){t({dynamicContent:{source:i.source}})}return{dynamicContent:i,canUseDynamicSource:l,sourceDescriptor:s,hasMoreImagesThanCap:b,dynamicMediaTotal:g,sourceOrderby:c,sourceOrder:u,dynamicMedia:h,dynamicImageBlocks:P,isResolvingDynamic:v,galleryContext:B,enableDynamicMode:I,convertToStatic:D,setSourceOrder:T,resetSource:L}}var Jt=n(N(),1),i4=n(H(),1),Or=n(O(),1),Gp=n(E(),1);var mt=n(y(),1),d4e=[{label:(0,Jt.__)("Newest to oldest"),value:"date/desc"},{label:(0,Jt.__)("Oldest to newest"),value:"date/asc"},{label:(0,Jt.__)("A \u2192 Z"),value:"title/asc"},{label:(0,Jt.__)("Z \u2192 A"),value:"title/desc"}];function f4e({orderby:e,order:t,onChange:r}){return(0,mt.jsx)(Or.SelectControl,{label:(0,Jt.__)("Order by"),value:`${e}/${t}`,options:d4e,onChange:o=>{let[a,i]=o.split("/");r({orderby:a,order:i})}})}function uX({onConfirm:e,onCancel:t}){return(0,mt.jsx)(Or.__experimentalConfirmDialog,{isOpen:!0,title:(0,Jt.__)("Detach Gallery"),__experimentalHideHeader:!1,confirmButtonText:(0,Jt.__)("Detach"),onConfirm:e,onCancel:t,size:"medium",children:(0,Jt.__)("The gallery displays the images attached to the post. Detaching will enable you to add, delete, or reorder images. However, new attachments will no longer be added automatically.")})}function pX({dynamic:e,dropdownMenuProps:t,hasImages:r}){let{dynamicContent:o,canUseDynamicSource:a,sourceDescriptor:i,sourceOrderby:l,sourceOrder:s,setSourceOrder:c,convertToStatic:u,enableDynamicMode:p,resetSource:m,isResolvingDynamic:d,hasMoreImagesThanCap:f,dynamicMediaTotal:h}=e,g=!!o,[v,b]=(0,i4.useState)(!1),[_,k]=(0,i4.useState)(!1);function x(){r?b(!0):p()}return g?(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsxs)(Or.__experimentalToolsPanel,{label:(0,Jt.__)("Source"),resetAll:m,dropdownMenuProps:t,children:[(0,mt.jsxs)("div",{className:"wp-block-gallery__source-settings",children:[(0,mt.jsx)("p",{className:"wp-block-gallery__source-description",children:i?.description??(0,Jt.__)("Dynamic images.")}),(0,mt.jsx)(Or.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>k(!0),disabled:d,accessibleWhenDisabled:!0,children:(0,Jt.__)("Detach Gallery")})]}),f&&(0,mt.jsx)(Or.Notice,{className:"wp-block-gallery__source-notice",status:"warning",isDismissible:!1,children:(0,Jt.sprintf)((0,Jt.__)("Only the first %1$d of %2$d images will be displayed."),jb,h)}),(0,mt.jsx)(Or.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,Jt.__)("Order by"),hasValue:()=>l!==xg||s!==kg,onDeselect:()=>c(void 0,void 0),children:(0,mt.jsx)(f4e,{orderby:l,order:s,onChange:({orderby:w,order:C})=>c(w,C)})})]}),_&&(0,mt.jsx)(uX,{onConfirm:()=>{u(),k(!1)},onCancel:()=>k(!1)})]}):a?(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(Or.PanelBody,{title:(0,Jt.__)("Source"),children:(0,mt.jsx)("div",{className:"wp-block-gallery__source-settings",children:(0,mt.jsx)(Or.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:x,children:(0,Jt.__)("Use images attached to the post")})})}),v&&(0,mt.jsx)(Or.__experimentalConfirmDialog,{isOpen:!0,title:(0,Jt.__)("Use images attached to the post?"),__experimentalHideHeader:!1,confirmButtonText:(0,Jt.__)("Use attached images"),onConfirm:()=>{p(),b(!1)},onCancel:()=>b(!1),size:"medium",children:(0,Jt.__)("The images in this gallery will be replaced, but will remain in the media library.")})]}):null}function h4e({imageBlocks:e}){let{children:t,ref:r,className:o}=(0,Gp.__experimentalUseBlockPreview)({blocks:e});return(0,mt.jsx)("div",{ref:r,className:o,style:{display:"contents"},children:t})}function mX({dynamic:e,blockProps:t,innerBlocksProps:r,attributes:o,setAttributes:a,isSelected:i,insertBlocksAfter:l,isContentLocked:s,multiGallerySelection:c}){let{sourceDescriptor:u,dynamicImageBlocks:p,galleryContext:m,isResolvingDynamic:d,convertToStatic:f}=e,h=(0,Gp.useBlockEditingMode)(),[g,v]=(0,i4.useState)(!1),b=d?(0,Jt.__)("Loading images\u2026"):u?.emptyMessage??(0,Jt.__)("Dynamic images will appear here.");return(0,mt.jsxs)(mt.Fragment,{children:[h==="default"&&(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(Gp.BlockControls,{group:"other",children:(0,mt.jsx)(Or.ToolbarButton,{onClick:()=>v(!0),disabled:d,children:(0,Jt.__)("Detach")})}),g&&(0,mt.jsx)(uX,{onConfirm:()=>{f(),v(!1)},onCancel:()=>v(!1)})]}),(0,mt.jsxs)("figure",{...t,children:[p.length?(0,mt.jsx)(Gp.BlockContextProvider,{value:m,children:(0,mt.jsx)(h4e,{imageBlocks:p})}):(0,mt.jsx)(Or.Placeholder,{icon:K3,label:(0,Jt.__)("Gallery"),instructions:b,children:d&&(0,mt.jsx)(Or.Spinner,{})}),(0,mt.jsx)(Mo,{attributes:o,setAttributes:a,isSelected:i,insertBlocksAfter:l,showToolbarButton:!c&&!s,className:"blocks-gallery-caption",label:(0,Jt.__)("Gallery caption text"),placeholder:(0,Jt.__)("Add gallery caption")})]}),r.children]})}var nt=n(y(),1),g4e=8,dX=[{icon:J1,label:(0,He.__)("Link images to attachment pages"),value:uc,noticeText:(0,He.__)("Attachment Pages")},{icon:pp,label:(0,He.__)("Link images to media files"),value:cc,noticeText:(0,He.__)("Media Files")},{icon:Jm,label:(0,He.__)("Enlarge on click"),value:hg,noticeText:(0,He.__)("Lightbox effect"),infoText:(0,He.__)("Scale images with a lightbox effect")},{icon:uv,label:(0,He._x)("None","Media item link option"),value:sc,noticeText:(0,He.__)("None")}],v4e=[{label:(0,He.__)("Icon"),value:"icon"},{label:(0,He.__)("Text"),value:"text"},{label:(0,He.__)("Both"),value:"both"}],gR=["image"],b4e=(0,He.__)("Drag and drop images, upload, or choose from your library."),y4e={name:"core/image"},fX=[];function vX(e){let{setAttributes:t,attributes:r,className:o,clientId:a,isSelected:i,insertBlocksAfter:l,isContentLocked:s,context:c,__unstableLayoutClassNames:u}=e,p=c?.postId,m=c?.postType,d=(0,lo.useBlockEditingMode)(),[f,h,g,v]=(0,lo.useSettings)("blocks.core/image.lightbox","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),b=f?.allowEditing?dX:dX.filter(ne=>ne.value!==hg),{align:_,navigationButtonType:k,columns:x,imageCrop:w,randomOrder:C,linkTarget:P,linkTo:B,sizeSlug:I,aspectRatio:D}=r,{__unstableMarkNextChangeAsNotPersistent:T,replaceInnerBlocks:L,updateBlockAttributes:A,selectBlock:z}=(0,Wb.useDispatch)(lo.store),{createSuccessNotice:j,createErrorNotice:G}=(0,Wb.useDispatch)(gX.store),{getBlock:W,getSettings:$,innerBlockImages:V,multiGallerySelection:Q}=(0,Wb.useSelect)(ne=>{let{getBlockName:Ve,getMultiSelectedBlockClientIds:Je,getSettings:St,getBlock:qe}=ne(lo.store),yo=Je();return{getBlock:qe,getSettings:St,innerBlockImages:qe(a)?.innerBlocks??fX,multiGallerySelection:yo.length&&yo.every(Tn=>Ve(Tn)==="core/gallery")}},[a]),Y=(0,Gb.useMemo)(()=>V?.map(ne=>({clientId:ne.clientId,id:ne.attributes.id,url:ne.attributes.url,attributes:ne.attributes,fromSavedContent:!!ne.originalContent})),[V]),ee=RQ(V),te=NQ(Y,ee),ae=!!Y.length,J=!!r.dynamicContent,ce=cX({attributes:r,setAttributes:t,clientId:a,postId:p,postType:m}),ie=J?ce.dynamicMedia.length:Y.length,we;J?we=B===hg:f?.enabled?we=Y.filter(ne=>ne.attributes?.lightbox?.enabled===void 0||ne.attributes?.lightbox?.enabled===!0).length>0:we=Y.filter(ne=>ne.attributes.lightbox?.enabled).length>0;let se=g?.map(({name:ne,ratio:Ve})=>({label:ne,value:Ve})),de=h?.map(({name:ne,ratio:Ve})=>({label:ne,value:Ve})),ge=[{label:(0,He._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...v?de||[]:[],...se||[]];(0,Gb.useEffect)(()=>{te?.forEach(ne=>{T(),A(ne.clientId,{...me(ne.attributes),id:ne.id,align:void 0})})},[te]);let oe=BQ(J?ce.dynamicMedia:ee,i,$);function me(ne){let Ve=ne.id?ee.find(({id:qe})=>qe===ne.id):null,Je;ne.className&&ne.className!==""&&(Je=ne.className);let St;return ne.linkTarget||ne.rel?St={linkTarget:ne.linkTarget,rel:ne.rel}:St=Hb(P,r),{...Q3(Ve,I),...Fb(Ve,B,ne?.linkDestination),...St,className:Je,sizeSlug:I,caption:ne.caption.length>0?ne.caption:Ve.caption?.raw,alt:ne.alt||Ve.alt_text,aspectRatio:D==="auto"?void 0:D}}function le(ne){let Ve=ne.type;return gR.some(Je=>Ve?.indexOf(Je)===0)||ne.blob}function Pe(ne){let Ve=Object.prototype.toString.call(ne)==="[object FileList]",Je=Ve?Array.from(ne).map(ot=>ot.url?ot:{blob:(0,vR.createBlobURL)(ot)}):ne;Je.every(le)||G((0,He.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});let St=Je.filter(ot=>ot.url||le(ot)).map(ot=>ot.url?ot:{blob:ot.blob||(0,vR.createBlobURL)(ot)}),qe=St.reduce((ot,Lo,tp)=>(ot[Lo.id]=tp,ot),{}),yo=Ve?V:V.filter(ot=>St.find(Lo=>Lo.id===ot.attributes.id)),Hl=St.filter(ot=>!yo.find(Lo=>ot.id===Lo.attributes.id)).map(ot=>(0,hX.createBlock)("core/image",{id:ot.id,blob:ot.blob,url:ot.url,caption:ot.caption,alt:ot.alt}));L(a,yo.concat(Hl).sort((ot,Lo)=>qe[ot.attributes.id]-qe[Lo.attributes.id])),Hl?.length>0&&z(Hl[0].clientId)}function Ee(ne){G(ne,{type:"snackbar"})}function X(ne){t({linkTo:ne});let Ve={},Je=[];W(a).innerBlocks.forEach(qe=>{Je.push(qe.clientId);let yo=qe.attributes.id?ee.find(({id:Tn})=>Tn===qe.attributes.id):null;Ve[qe.clientId]=Fb(yo,ne,!1,qe.attributes,f)}),A(Je,Ve,{uniqueByBlock:!0});let St=[...b].find(qe=>qe.value===ne);j((0,He.sprintf)((0,He.__)("All gallery image links updated to: %s"),St.noticeText),{id:"gallery-attributes-linkTo",type:"snackbar"})}function Ce(ne){t({columns:ne})}function pe(){t({imageCrop:!w})}function $e(){t({randomOrder:!C})}function fe(ne){let Ve=ne?"_blank":void 0;t({linkTarget:Ve});let Je={},St=[];W(a).innerBlocks.forEach(yo=>{St.push(yo.clientId),Je[yo.clientId]=Hb(Ve,yo.attributes)}),A(St,Je,{uniqueByBlock:!0});let qe=ne?(0,He.__)("All gallery images updated to open in new tab"):(0,He.__)("All gallery images updated to not open in new tab");j(qe,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}function Ae(ne){t({sizeSlug:ne});let Ve={},Je=[];W(a).innerBlocks.forEach(qe=>{Je.push(qe.clientId);let yo=qe.attributes.id?ee.find(({id:Tn})=>Tn===qe.attributes.id):null;Ve[qe.clientId]=TQ(yo,ne)}),A(Je,Ve,{uniqueByBlock:!0});let St=oe.find(qe=>qe.value===ne);j((0,He.sprintf)((0,He.__)("All gallery image sizes updated to: %s"),St?.label??ne),{id:"gallery-attributes-sizeSlug",type:"snackbar"})}function Ft(ne){t({aspectRatio:ne});let Ve={},Je=[];W(a).innerBlocks.forEach(qe=>{Je.push(qe.clientId),Ve[qe.clientId]={aspectRatio:ne==="auto"?void 0:ne}}),A(Je,Ve,!0);let St=ge.find(qe=>qe.value===ne);j((0,He.sprintf)((0,He.__)("All gallery images updated to aspect ratio: %s"),St?.label||ne),{id:"gallery-attributes-aspectRatio",type:"snackbar"})}(0,Gb.useEffect)(()=>{B||(T(),t({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||sc}))},[B]);let ze=ae&&Y.some(ne=>!!ne.id),oo={addToGallery:!1,disableMediaButtons:Y.some(ne=>!ne.id&&ne.url?.indexOf("blob:")===0),value:{}},vo=(0,lo.useBlockProps)({className:S(o,"has-nested-images",J&&[u,"blocks-gallery-grid",{[`align${_}`]:_,[`columns-${x}`]:x!==void 0,"columns-default":x===void 0,"is-cropped":w}])}),bo=(0,lo.useInnerBlocksProps)(vo,{defaultBlock:y4e,directInsert:!0,orientation:"horizontal",renderAppender:!1,allowedBlocks:J?fX:void 0}),ta=Z();if(!ae&&!J)return(0,nt.jsxs)("div",{...bo,children:[bo.children,(0,nt.jsx)(lo.MediaPlaceholder,{handleUpload:!1,icon:K3,labels:{title:(0,He.__)("Gallery"),instructions:b4e},onSelect:Pe,allowedTypes:gR,multiple:!0,onError:Ee,...oo,children:d==="default"&&(0,nt.jsx)(Tt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:ce.enableDynamicMode,children:n4(Up).title})})]});let Ra=B&&B!=="none";return(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)(lo.InspectorControls,{children:[(0,nt.jsx)(pX,{dynamic:ce,dropdownMenuProps:ta,hasImages:ae}),(0,nt.jsxs)(Tt.__experimentalToolsPanel,{label:(0,He.__)("Settings"),resetAll:()=>{t({navigationButtonType:"icon",columns:void 0,imageCrop:!0,randomOrder:!1}),Ft("auto"),I!==Vb&&Ae(Vb),P&&fe(!1)},dropdownMenuProps:ta,children:[ie>1&&(0,nt.jsx)(Tt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,He.__)("Columns"),hasValue:()=>!!x&&x!==ie,onDeselect:()=>Ce(void 0),children:(0,nt.jsx)(Tt.RangeControl,{label:(0,He.__)("Columns"),value:x||Y3(ie),onChange:Ce,min:1,max:Math.min(g4e,ie),required:!0})}),oe?.length>0&&(0,nt.jsx)(Tt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,He.__)("Resolution"),hasValue:()=>I!==Vb,onDeselect:()=>Ae(Vb),children:(0,nt.jsx)(Tt.SelectControl,{label:(0,He.__)("Resolution"),help:(0,He.__)("Select the size of the source images."),value:I,options:oe,onChange:Ae,hideCancelButton:!0})}),(0,nt.jsx)(Tt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,He.__)("Crop images to fit"),hasValue:()=>!w,onDeselect:()=>t({imageCrop:!0}),children:(0,nt.jsx)(Tt.ToggleControl,{label:(0,He.__)("Crop images to fit"),checked:!!w,onChange:pe})}),(0,nt.jsx)(Tt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,He.__)("Randomize order"),hasValue:()=>!!C,onDeselect:()=>t({randomOrder:!1}),children:(0,nt.jsx)(Tt.ToggleControl,{label:(0,He.__)("Randomize order"),checked:!!C,onChange:$e})}),Ra&&(0,nt.jsx)(Tt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,He.__)("Open images in new tab"),hasValue:()=>!!P,onDeselect:()=>fe(!1),children:(0,nt.jsx)(Tt.ToggleControl,{label:(0,He.__)("Open images in new tab"),checked:P==="_blank",onChange:fe})}),ge.length>1&&(0,nt.jsx)(Tt.__experimentalToolsPanelItem,{hasValue:()=>!!D&&D!=="auto",label:(0,He.__)("Aspect ratio"),onDeselect:()=>Ft("auto"),isShownByDefault:!0,children:(0,nt.jsx)(Tt.SelectControl,{label:(0,He.__)("Aspect ratio"),help:(0,He.__)("Set a consistent aspect ratio for all images in the gallery."),value:D,options:ge,onChange:Ft})}),f?.allowEditing&&we&&(0,nt.jsx)(Tt.__experimentalToolsPanelItem,{label:(0,He.__)("Navigation button type"),isShownByDefault:!0,hasValue:()=>k!=="icon",onDeselect:()=>t({navigationButtonType:"icon"}),children:(0,nt.jsx)(Tt.__experimentalToggleGroupControl,{label:(0,He.__)("Navigation button type"),value:k,onChange:ne=>t({navigationButtonType:ne}),isBlock:!0,help:(0,He.__)("Adjust the appearance of buttons in the lightbox."),children:v4e.map(ne=>(0,nt.jsx)(Tt.__experimentalToggleGroupControlOption,{value:ne.value,label:ne.label},ne.value))})})]})]}),(0,nt.jsx)(lo.BlockControls,{group:"block",children:(0,nt.jsx)(Tt.ToolbarDropdownMenu,{icon:di,label:(0,He.__)("Link"),children:({onClose:ne})=>(0,nt.jsx)(Tt.MenuGroup,{children:b.map(Ve=>{let Je=B===Ve.value;return(0,nt.jsx)(Tt.MenuItem,{isSelected:Je,className:S("components-dropdown-menu__menu-item",{"is-active":Je}),iconPosition:"left",icon:Ve.icon,onClick:()=>{X(Ve.value),ne()},role:"menuitemradio",info:Ve.infoText,children:Ve.label},Ve.value)})})})}),(0,nt.jsxs)(nt.Fragment,{children:[!Q&&!J&&(0,nt.jsx)(lo.BlockControls,{group:"other",children:(0,nt.jsx)(lo.MediaReplaceFlow,{allowedTypes:gR,handleUpload:!1,onSelect:Pe,name:(0,He.__)("Add"),multiple:!0,mediaIds:Y.filter(ne=>ne.id).map(ne=>ne.id),addToGallery:ze,variant:"toolbar"})}),(0,nt.jsx)(oX,{style:r.style,clientId:a})]}),J?(0,nt.jsx)(mX,{...e,dynamic:ce,blockProps:vo,innerBlocksProps:bo,multiGallerySelection:Q}):(0,nt.jsx)(PQ,{...e,isContentLocked:s,images:Y,blockProps:bo,insertBlocksAfter:l,multiGallerySelection:Q})]})}var l4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/gallery",title:"Gallery",category:"media",usesContext:["galleryId","postId","postType"],allowedBlocks:["core/image"],description:"Display multiple images in a rich gallery.",keywords:["images","photos"],textdomain:"default",attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},dynamicContent:{type:"object"},navigationButtonType:{type:"string",default:"icon",enum:["icon","text","both"]},shortCodeTransforms:{type:"array",items:{type:"object"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-caption",role:"content"},imageCrop:{type:"boolean",default:!0},randomOrder:{type:"boolean",default:!1},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1},aspectRatio:{type:"string",default:"auto"}},providesContext:{allowResize:"allowResize",imageCrop:"imageCrop",fixedHeight:"fixedHeight",navigationButtonType:"navigationButtonType"},supports:{anchor:!0,align:!0,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{color:!0,radius:!0}},html:!1,units:["px","em","rem","vh","vw"],spacing:{margin:!0,padding:!0,blockGap:{sides:["horizontal","vertical"],__experimentalDefault:"var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )"},__experimentalDefaultControls:{blockGap:!0,margin:!1,padding:!1}},color:{text:!1,background:!0,gradients:!0},layout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0},listView:!0},editorStyle:"wp-block-gallery-editor",style:"wp-block-gallery"};var wu=n(E(),1),s4=n(y(),1);function bX({attributes:e}){let{caption:t,columns:r,imageCrop:o,dynamicContent:a}=e,i=!wu.RichText.isEmpty(t)&&(0,s4.jsx)(wu.RichText.Content,{tagName:"figcaption",className:S("blocks-gallery-caption",(0,wu.__experimentalGetElementClassName)("caption")),value:t});if(a)return i||null;let l=S("has-nested-images",{[`columns-${r}`]:r!==void 0,"columns-default":r===void 0,"is-cropped":o}),s=wu.useBlockProps.save({className:l}),c=wu.useInnerBlocksProps.save(s);return(0,s4.jsxs)("figure",{...c,children:[c.children,i]})}var _l=n(q(),1),yX=n(Ar(),1),bR=n(vu(),1);var x4e=e=>e?e.split(",").map(t=>parseInt(t,10)):[],_X=e=>e.map(t=>(0,_l.createBlock)(t.name,t.attributes,_X(t.innerBlocks||[])));function k4e(e){if(e.name==="core/gallery"&&e.attributes?.images.length>0){let t=e.attributes.images.map(({url:r,id:o,alt:a})=>(0,_l.createBlock)("core/image",{url:r,id:o?parseInt(o,10):null,alt:a,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination}));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e}(0,bR.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",k4e);function w4e(e,t){let o=(Array.isArray(t)?t:[t]).find(a=>a.name==="core/gallery"&&a.innerBlocks.length>0&&!a.attributes.images?.length>0&&!e.name.includes("core/"));if(o){let a=o.innerBlocks.map(({attributes:{url:l,id:s,alt:c}})=>({url:l,id:s?parseInt(s,10):null,alt:c})),i=a.map(({id:l})=>l);o.attributes.images=a,o.attributes.ids=i}return e}(0,bR.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",w4e);var C4e={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:r}=e[0];t=e.every(i=>i.align===t)?t:void 0,r=e.every(i=>i.sizeSlug===r)?r:void 0;let a=e.filter(({url:i})=>i).map(i=>(i.width=void 0,i.height=void 0,(0,_l.createBlock)("core/image",i)));return(0,_l.createBlock)("core/gallery",{align:t,sizeSlug:r},a)}},{type:"shortcode",tag:"gallery",transform({named:{ids:e,columns:t=3,link:r,orderby:o,size:a}}){let i=x4e(e).map(c=>parseInt(c,10)),l=sc;return r==="post"?l=uc:r==="file"&&(l=cc),(0,_l.createBlock)("core/gallery",{columns:parseInt(t,10),linkTo:l,randomOrder:o==="rand",...a&&{sizeSlug:a}},i.map(c=>(0,_l.createBlock)("core/image",{id:c,...a&&{sizeSlug:a}})))},isMatch({named:e}){return e.ids!==void 0}},{type:"files",priority:1,isMatch(e){return e.length!==1&&e.every(t=>t.type.indexOf("image/")===0)},transform(e){let t=e.map(r=>(0,_l.createBlock)("core/image",{blob:(0,yX.createBlobURL)(r)}));return(0,_l.createBlock)("core/gallery",{},t)}}],to:[{type:"block",blocks:["core/image"],transform:({align:e},t)=>t.length>0?t.map(({attributes:{url:r,alt:o,caption:a,title:i,href:l,rel:s,linkClass:c,id:u,sizeSlug:p,linkDestination:m,linkTarget:d,anchor:f,className:h}})=>(0,_l.createBlock)("core/image",{align:e,url:r,alt:o,caption:a,title:i,href:l,rel:s,linkClass:c,id:u,sizeSlug:p,linkDestination:m,linkTarget:d,anchor:f,className:h})):(0,_l.createBlock)("core/image",{align:e})},{type:"block",blocks:["core/group"],variationName:"group-grid",transform:(e,t)=>{let{allowResize:r,aspectRatio:o,caption:a,columns:i,fixedHeight:l,ids:s,imageCrop:c,images:u,linkTarget:p,linkTo:m,navigationButtonType:d,randomOrder:f,shortCodeTransforms:h,sizeSlug:g,...v}=e;return(0,_l.createBlock)("core/group",{...v,layout:{type:"grid",columnCount:i??Y3(t.length)}},_X(t))}}]},xX=C4e;var yR=n(N(),1);var S4e=[{name:"dynamic-gallery",title:(0,yR.__)("Dynamic Gallery"),description:(0,yR.__)("Display images from a source, such as those attached to the current post."),attributes:{dynamicContent:{source:Up}},isActive:e=>!!e.dynamicContent,scope:[]}],kX=S4e;var{name:wX}=l4,CX={icon:cv,example:{attributes:{columns:2},innerBlocks:[{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}}]},transforms:xX,variations:kX,edit:vX,save:bX,deprecated:xQ},T4e=()=>R({name:wX,metadata:l4,settings:CX});var CR={};K(CR,{init:()=>M4e,metadata:()=>u4,name:()=>f4,settings:()=>VX});var d4=n(N(),1);var Mn=n(E(),1),Bi=n(y(),1),xR=e=>{if(e.tagName||(e={...e,tagName:"div"}),!e.customTextColor&&!e.customBackgroundColor)return e;let t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);let{customTextColor:r,customBackgroundColor:o,...a}=e;return{...a,style:t}},P4e=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{__experimentalOnEnter:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0},save({attributes:{tagName:e}}){return(0,Bi.jsx)(e,{...Mn.useInnerBlocksProps.save(Mn.useBlockProps.save())})},isEligible:({layout:e})=>e?.inherit||e?.contentSize&&e?.type!=="constrained",migrate:e=>{let{layout:t=null}=e;if(t?.inherit||t?.contentSize)return{...e,layout:{...t,type:"constrained"}}}},{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0},spacing:{padding:!0},__experimentalBorder:{radius:!0}},save({attributes:e}){let{tagName:t}=e;return(0,Bi.jsx)(t,{...Mn.useBlockProps.save(),children:(0,Bi.jsx)("div",{className:"wp-block-group__inner-container",children:(0,Bi.jsx)(Mn.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:xR,save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,textColor:o,customTextColor:a}=e,i=(0,Mn.getColorClassName)("background-color",t),l=(0,Mn.getColorClassName)("color",o),s=S(i,l,{"has-text-color":o||a,"has-background":t||r});return(0,Bi.jsx)("div",{className:s,style:{backgroundColor:i?void 0:r,color:l?void 0:a},children:(0,Bi.jsx)("div",{className:"wp-block-group__inner-container",children:(0,Bi.jsx)(Mn.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:xR,supports:{align:["wide","full"],anchor:!0,html:!1},save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,textColor:o,customTextColor:a}=e,i=(0,Mn.getColorClassName)("background-color",t),l=(0,Mn.getColorClassName)("color",o),s=S(i,{"has-text-color":o||a,"has-background":t||r});return(0,Bi.jsx)("div",{className:s,style:{backgroundColor:i?void 0:r,color:l?void 0:a},children:(0,Bi.jsx)("div",{className:"wp-block-group__inner-container",children:(0,Bi.jsx)(Mn.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:xR,save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r}=e,o=(0,Mn.getColorClassName)("background-color",t),a=S(o,{"has-background":t||r});return(0,Bi.jsx)("div",{className:a,style:{backgroundColor:o?void 0:r},children:(0,Bi.jsx)(Mn.InnerBlocks.Content,{})})}}],SX=P4e;var c4=n(F(),1),Ii=n(E(),1),IX=n(H(),1),DX=n(N(),1);var TX=n(F(),1),PX=n(E(),1),kR=n(N(),1),EX=n(q(),1),Za=n(O(),1),$b=n(H(),1),qa=n(y(),1),E4e=(e="group")=>({group:(0,qa.jsx)(Za.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,qa.jsx)(Za.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),"group-row":(0,qa.jsx)(Za.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,qa.jsx)(Za.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),"group-stack":(0,qa.jsx)(Za.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,qa.jsx)(Za.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z"})}),"group-grid":(0,qa.jsx)(Za.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,qa.jsx)(Za.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z"})})})?.[e];function BX({attributes:e={style:void 0,backgroundColor:void 0,textColor:void 0,fontSize:void 0},usedLayoutType:t="",hasInnerBlocks:r=!1}){let{style:o,backgroundColor:a,textColor:i,fontSize:l}=e,[s,c]=(0,$b.useState)(!r&&!a&&!l&&!i&&!o&&t!=="flex"&&t!=="grid");return(0,$b.useEffect)(()=>{(r||a||l||i||o||t==="flex")&&c(!1)},[a,l,i,o,t,r]),[s,c]}function B4e({name:e,onSelect:t}){let r=(0,TX.useSelect)(a=>a(EX.store).getBlockVariations(e,"block"),[e]),o=(0,PX.useBlockProps)({className:"wp-block-group__placeholder"});return(0,$b.useEffect)(()=>{r&&r.length===1&&t(r[0])},[t,r]),(0,qa.jsx)("div",{...o,children:(0,qa.jsx)(Za.Placeholder,{instructions:(0,kR.__)("Group blocks together. Select a layout:"),children:(0,qa.jsx)("ul",{role:"list",className:"wp-block-group-placeholder__variations","aria-label":(0,kR.__)("Block variations"),children:r.map(a=>(0,qa.jsx)("li",{children:(0,qa.jsx)(Za.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:E4e(a.name),iconSize:48,onClick:()=>t(a),className:"wp-block-group-placeholder__variation-button",label:`${a.title}: ${a.description}`})},a.name))})})})}var NX=B4e;var Ni=n(y(),1),{HTMLElementControl:N4e}=U(Ii.privateApis);function I4e({tagName:e,onSelectTagName:t,clientId:r}){return(0,Ni.jsx)(Ii.InspectorControls,{group:"advanced",children:(0,Ni.jsx)(N4e,{tagName:e,onChange:t,clientId:r,options:[{label:(0,DX.__)("Default ()"),value:"div"},{label:"
",value:"header"},{label:"",value:"main"},{label:"",value:"section"},{label:"",value:"article"},{label:"",value:"aside"},{label:"",value:"footer"}]})})}function D4e({attributes:e,name:t,setAttributes:r,clientId:o}){let{hasInnerBlocks:a,themeSupportsLayout:i}=(0,c4.useSelect)(x=>{let{getBlock:w,getSettings:C}=x(Ii.store),P=w(o);return{hasInnerBlocks:!!(P&&P.innerBlocks.length),themeSupportsLayout:C()?.supportsLayout}},[o]),{tagName:l="div",templateLock:s,allowedBlocks:c,layout:u={}}=e,{type:p="default"}=u,m=i||p==="flex"||p==="grid",d=(0,IX.useRef)(),f=(0,Ii.useBlockProps)({ref:d}),[h,g]=BX({attributes:e,usedLayoutType:p,hasInnerBlocks:a}),v;h?v=!1:a||(v=Ii.InnerBlocks.ButtonBlockAppender);let b=(0,Ii.useInnerBlocksProps)(m?f:{className:"wp-block-group__inner-container"},{dropZoneElement:d.current,templateLock:s,allowedBlocks:c,renderAppender:v}),{selectBlock:_}=(0,c4.useDispatch)(Ii.store),k=x=>{r(x.attributes),_(o,-1),g(!1)};return(0,Ni.jsxs)(Ni.Fragment,{children:[(0,Ni.jsx)(I4e,{tagName:l,onSelectTagName:x=>r({tagName:x}),clientId:o}),h&&(0,Ni.jsxs)("div",{children:[b.children,(0,Ni.jsx)(NX,{name:t,onSelect:k})]}),m&&!h&&(0,Ni.jsx)(l,{...b}),!m&&!h&&(0,Ni.jsx)(l,{...f,children:(0,Ni.jsx)("div",{...b})})]})}var LX=D4e;var u4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/group",title:"Group",category:"design",description:"Gather blocks in a layout container.",keywords:["container","wrapper","row","section"],textdomain:"default",attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{__experimentalOnEnter:!0,__experimentalOnMerge:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,background:{backgroundImage:!0,backgroundSize:!0,gradient:!0,__experimentalDefaultControls:{backgroundImage:!0,gradient:!0}},color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},shadow:!0,spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},dimensions:{minHeight:!0,minWidth:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},position:{sticky:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowSizingOnChildren:!0},interactivity:{clientNavigation:!0},allowedBlocks:!0},editorStyle:"wp-block-group-editor",style:"wp-block-group"};var p4=n(E(),1),RX=n(y(),1);function AX({attributes:{tagName:e}}){return(0,RX.jsx)(e,{...p4.useInnerBlocksProps.save(p4.useBlockProps.save())})}var m4=n(q(),1),R4e={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){let t=["wide","full"],r=e.reduce((a,i)=>{let{align:l}=i.attributes;return t.indexOf(l)>t.indexOf(a)?l:a},void 0),o=e.map(a=>(0,m4.cloneSanitizedBlock)(a));return(0,m4.createBlock)("core/group",{align:r,layout:{type:"constrained"}},o)}}]},MX=R4e;var zn=n(N(),1);var wR={innerBlocks:[{name:"core/paragraph",attributes:{content:(0,zn.__)("One.")}},{name:"core/paragraph",attributes:{content:(0,zn.__)("Two.")}},{name:"core/paragraph",attributes:{content:(0,zn.__)("Three.")}},{name:"core/paragraph",attributes:{content:(0,zn.__)("Four.")}},{name:"core/paragraph",attributes:{content:(0,zn.__)("Five.")}},{name:"core/paragraph",attributes:{content:(0,zn.__)("Six.")}}]},A4e=[{name:"group",title:(0,zn.__)("Group"),description:(0,zn.__)("Gather blocks in a container."),attributes:{layout:{type:"constrained"}},isDefault:!0,scope:["block","inserter","transform"],icon:ed},{name:"group-row",title:(0,zn._x)("Row","single horizontal line"),description:(0,zn.__)("Arrange blocks horizontally."),attributes:{layout:{type:"flex",flexWrap:"nowrap"}},scope:["block","inserter","transform"],isActive:["layout.type"],icon:bN,example:wR},{name:"group-stack",title:(0,zn.__)("Stack"),description:(0,zn.__)("Arrange blocks vertically."),attributes:{layout:{type:"flex",orientation:"vertical"}},scope:["block","inserter","transform"],isActive:["layout.type","layout.orientation"],icon:DN,example:wR},{name:"group-grid",title:(0,zn.__)("Grid"),description:(0,zn.__)("Arrange blocks in a grid."),attributes:{layout:{type:"grid"}},scope:["block","inserter","transform"],isActive:["layout.type"],icon:Gl,example:wR}],zX=A4e;var{name:f4}=u4,VX={icon:ed,example:{attributes:{layout:{type:"constrained",justifyContent:"center"},style:{spacing:{padding:{top:"4em",right:"3em",bottom:"4em",left:"3em"}}}},innerBlocks:[{name:"core/heading",attributes:{content:(0,d4.__)("La Mancha"),style:{typography:{textAlign:"center"}}}},{name:"core/paragraph",attributes:{style:{typography:{textAlign:"center"}},content:(0,d4.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},{name:"core/spacer",attributes:{height:"10px"}},{name:"core/button",attributes:{text:(0,d4.__)("Read more")}}],viewportWidth:600},transforms:MX,edit:LX,save:AX,deprecated:SX,variations:zX},M4e=()=>R({name:f4,metadata:u4,settings:VX});var BR={};K(BR,{init:()=>J4e,metadata:()=>b4,name:()=>_4,settings:()=>x4});var $p=n(N(),1),Tg=n(q(),1);var fa=n(E(),1);var mc=n(y(),1),SR={className:!1,anchor:!0},h4={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},Cg=e=>{if(!e.customTextColor)return e;let t={color:{text:e.customTextColor}},{customTextColor:r,...o}=e;return{...o,style:t}},OX=["left","right","center"],Sg=e=>{let{align:t,...r}=e;return OX.includes(t)?{...r,textAlign:t}:e},z4e={supports:SR,attributes:{...h4,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>be(Cg(Sg(e))),save({attributes:e}){let{align:t,level:r,content:o,textColor:a,customTextColor:i}=e,l="h"+r,s=(0,fa.getColorClassName)("color",a),c=S({[s]:s});return(0,mc.jsx)(fa.RichText.Content,{className:c||void 0,tagName:l,style:{textAlign:t,color:s?void 0:i},value:o})}},V4e={attributes:{...h4,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>be(Cg(Sg(e))),save({attributes:e}){let{align:t,content:r,customTextColor:o,level:a,textColor:i}=e,l="h"+a,s=(0,fa.getColorClassName)("color",i),c=S({[s]:s,[`has-text-align-${t}`]:t});return(0,mc.jsx)(fa.RichText.Content,{className:c||void 0,tagName:l,style:{color:s?void 0:o},value:r})},supports:SR},O4e={supports:SR,attributes:{...h4,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>be(Cg(Sg(e))),save({attributes:e}){let{align:t,content:r,customTextColor:o,level:a,textColor:i}=e,l="h"+a,s=(0,fa.getColorClassName)("color",i),c=S({[s]:s,"has-text-color":i||o,[`has-text-align-${t}`]:t});return(0,mc.jsx)(fa.RichText.Content,{className:c||void 0,tagName:l,style:{color:s?void 0:o},value:r})}},F4e={supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:h4,isEligible:({align:e})=>OX.includes(e),migrate:e=>be(Cg(Sg(e))),save({attributes:e}){let{align:t,content:r,level:o}=e,a="h"+o,i=S({[`has-text-align-${t}`]:t});return(0,mc.jsx)(a,{...fa.useBlockProps.save({className:i}),children:(0,mc.jsx)(fa.RichText.Content,{value:r})})}},H4e={supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",role:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},save({attributes:e}){let{textAlign:t,content:r,level:o}=e,a="h"+o,i=S({[`has-text-align-${t}`]:t});return(0,mc.jsx)(a,{...fa.useBlockProps.save({className:i}),children:(0,mc.jsx)(fa.RichText.Content,{value:r})})},migrate:e=>be(Cg(Sg(e)))},j4e={supports:{align:["wide","full"],anchor:!0,className:!0,splitting:!0,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalWritingMode:!0,fitText:!0,__experimentalDefaultControls:{fontSize:!0}},__unstablePasteTextInline:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",role:"content"},level:{type:"number",default:2},levelOptions:{type:"array"},placeholder:{type:"string"}},save({attributes:e}){let{textAlign:t,content:r,level:o}=e,a="h"+o,i=S({[`has-text-align-${t}`]:t});return(0,mc.jsx)(a,{...fa.useBlockProps.save({className:i}),children:(0,mc.jsx)(fa.RichText.Content,{value:r})})},migrate:e=>be(Cg(Sg(e))),isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},U4e=[j4e,H4e,F4e,O4e,V4e,z4e],FX=U4e;var jX=n(N(),1),UX=n(H(),1),v4=n(F(),1),Xd=n(E(),1);var HX=n(zb(),1),TR={},G4e=e=>{let t=document.createElement("div");return t.innerHTML=e,t.innerText},W4e=e=>(0,HX.default)(G4e(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),g4=(e,t)=>{let r=W4e(t);if(r==="")return null;delete TR[e];let o=r,a=0;for(;Object.values(TR).includes(o);)a+=1,o=r+"-"+a;return o},PR=(e,t)=>{TR[e]=t};var GX=n(y(),1);function $4e(e){let{attributes:t,setAttributes:r,mergeBlocks:o,onReplace:a,style:i,clientId:l}=e;Ct(e);let{content:s,level:c,placeholder:u,anchor:p}=t,m="h"+c,d=(0,Xd.useBlockProps)({style:i}),{canGenerateAnchors:f}=(0,v4.useSelect)(v=>{let{getGlobalBlockCount:b,getSettings:_}=v(Xd.store);return{canGenerateAnchors:!!_().generateAnchors||b("core/table-of-contents")>0}},[]),{__unstableMarkNextChangeAsNotPersistent:h}=(0,v4.useDispatch)(Xd.store);return(0,UX.useEffect)(()=>{if(f)return!p&&s&&(h(),r({anchor:g4(l,s)})),PR(l,p),()=>PR(l,null)},[p,s,l,f,r,h]),(0,GX.jsx)(Xd.RichText,{identifier:"content",tagName:m,value:s,onChange:v=>{let b={content:v};f&&(!p||!v||g4(l,s)===p)&&(b.anchor=g4(l,v)),r(b)},onMerge:o,onReplace:a,onRemove:a?()=>a([]):void 0,placeholder:u||(0,jX.__)("Heading"),...d})}var WX=$4e;var b4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"h1,h2,h3,h4,h5,h6",role:"content"},level:{type:"number",default:2},levelOptions:{type:"array"},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!0,splitting:!0,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalWritingMode:!0,fitText:!0,__experimentalDefaultControls:{fontSize:!0}},__unstablePasteTextInline:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"};var y4=n(E(),1),ER=n(y(),1);function $X({attributes:e}){let{content:t,level:r}=e,o="h"+r;return(0,ER.jsx)(o,{...y4.useBlockProps.save(),children:(0,ER.jsx)(y4.RichText.Content,{value:t})})}var Wp=n(q(),1);function qX(e){return Number(e.substr(1))}var Z4e={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map(t=>{let{content:r,anchor:o,style:a}=t,i=a?.typography?.textAlign;return(0,Wp.createBlock)("core/heading",{...pu(t,"core/heading",({content:l})=>({content:l})),content:r,anchor:o,...i&&{style:{typography:{textAlign:i}}}})})},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:({phrasingContentSchema:e,isPaste:t})=>{let r={children:e,attributes:t?[]:["style","id"]};return{h1:r,h2:r,h3:r,h4:r,h5:r,h6:r}},transform(e){let t=(0,Wp.getBlockAttributes)("core/heading",e.outerHTML),{textAlign:r}=e.style||{};return t.level=qX(e.nodeName),(r==="left"||r==="center"||r==="right")&&(t.style={...t.style,typography:{...t.style?.typography,textAlign:r}}),(0,Wp.createBlock)("core/heading",t)}},...[1,2,3,4,5,6].map(e=>({type:"prefix",prefix:Array(e+1).join("#"),transform(t){return(0,Wp.createBlock)("core/heading",{level:e,content:t})}})),...[1,2,3,4,5,6].map(e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:()=>(0,Wp.createBlock)("core/heading",{level:e})}))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map(t=>{let{content:r,style:o}=t,a=o?.typography?.textAlign;return(0,Wp.createBlock)("core/paragraph",{...pu(t,"core/paragraph",({content:i})=>({content:i})),content:r,...a&&{style:{typography:{textAlign:a}}}})})}]},ZX=Z4e;var qb=n(N(),1);var K4e=[yE,xE,wE,SE,PE,BE],Y4e=[...[1,2,3,4,5,6].map(e=>({name:`h${e}`,title:(0,qb.sprintf)((0,qb.__)("Heading %d"),e),description:(0,qb.__)("Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."),icon:K4e[e-1],attributes:{level:e},scope:["block","transform"],keywords:[`h${e}`],isActive:t=>t.level===e}))],KX=Y4e;var{fieldsKey:Q4e,formKey:X4e}=U(Tg.privateApis),{name:_4}=b4,x4={icon:IE,example:{attributes:{content:(0,$p.__)("Code is Poetry"),level:2,style:{typography:{textAlign:"center"}}}},__experimentalLabel(e,{context:t}){let{content:r,level:o}=e,a=e?.metadata?.name,i=r?.trim().length>0;if(t==="list-view"&&(a||i))return a||r;if(t==="breadcrumb"&&a)return a;if(t==="accessibility")return i?(0,$p.sprintf)((0,$p.__)("Level %1$s. %2$s"),o,r):(0,$p.sprintf)((0,$p.__)("Level %s. Empty."),o)},transforms:ZX,deprecated:FX,merge(e,t){return{content:(e.content||"")+(t.content||"")}},edit:WX,save:$X,variations:KX};window.__experimentalContentOnlyInspectorFields&&(x4[Q4e]=[{id:"content",label:(0,$p.__)("Content"),type:"text",Edit:"rich-text"}],x4[X4e]={fields:["content"]});var J4e=()=>{let e=R({name:_4,metadata:b4,settings:x4}),t=(0,Tg.getBlockType)(_4)?.attributes?.levelOptions?.default;return t&&[1,2,3,4,5,6].forEach(r=>{t.includes(r)||(0,Tg.unregisterBlockVariation)(_4,`h${r}`)}),e};var NR={};K(NR,{init:()=>rCe,metadata:()=>k4,name:()=>nJ,settings:()=>aJ});var oJ=n(N(),1);var k4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/home-link",category:"design",parent:["core/navigation"],title:"Home Link",description:"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.",textdomain:"default",attributes:{label:{type:"string",role:"content"},opensInNewTab:{type:"boolean",default:!1},description:{type:"string"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],supports:{anchor:!0,reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-home-link-editor",style:"wp-block-home-link"};var qp=n(E(),1),ha=n(O(),1),Ka=n(N(),1),YX=n(F(),1),QX=n(re(),1);var XX=n(Pn(),1);var So=n(y(),1),tCe=e=>e.preventDefault();function JX({attributes:e,setAttributes:t,context:r}){let{homeUrl:o,onNavigateToEntityRecord:a,frontPageId:i,frontPageTemplateId:l}=(0,YX.useSelect)(g=>{let{getEntityRecord:v,getDefaultTemplateId:b,canUser:_}=g(QX.store),k=v("root","__unstableBase")?.home,w=_("read",{kind:"root",name:"site"})?v("root","site"):null,C=w?.show_on_front==="page"?w?.page_on_front:null,P=C?null:b({slug:"front-page"});return{homeUrl:k,onNavigateToEntityRecord:g(qp.store).getSettings().onNavigateToEntityRecord,frontPageId:C,frontPageTemplateId:P}},[]),{textColor:s,backgroundColor:c,style:u}=r,{label:p,opensInNewTab:m,description:d}=e,f=Z(),h=(0,qp.useBlockProps)({className:S("wp-block-navigation-item",{"has-text-color":!!s||!!u?.color?.text,[`has-${s}-color`]:!!s,"has-background":!!c||!!u?.color?.background,[`has-${c}-background-color`]:!!c}),style:{color:u?.color?.text,backgroundColor:u?.color?.background}});return(0,So.jsxs)(So.Fragment,{children:[(0,So.jsx)(qp.InspectorControls,{group:"content",children:(0,So.jsxs)(ha.__experimentalToolsPanel,{label:(0,Ka.__)("Settings"),resetAll:()=>{t({label:"",opensInNewTab:!1,description:""})},dropdownMenuProps:f,children:[(0,So.jsx)(ha.__experimentalToolsPanelItem,{hasValue:()=>!!p,label:(0,Ka.__)("Text"),onDeselect:()=>t({label:""}),isShownByDefault:!0,children:(0,So.jsx)(ha.TextControl,{label:(0,Ka.__)("Text"),value:p?(0,XX.__unstableStripHTML)(p):"",onChange:g=>{t({label:g})},autoComplete:"off"})}),(0,So.jsx)(ha.__experimentalToolsPanelItem,{hasValue:()=>!!m,label:(0,Ka.__)("Open in new tab"),onDeselect:()=>t({opensInNewTab:!1}),isShownByDefault:!0,children:(0,So.jsx)(ha.CheckboxControl,{label:(0,Ka.__)("Open in new tab"),checked:m,onChange:g=>t({opensInNewTab:g})})}),a&&(i||l)&&(0,So.jsx)(ha.Button,{variant:"secondary",onClick:()=>{a(i?{postId:i,postType:"page"}:{postId:l,postType:"wp_template"})},__next40pxDefaultSize:!0,className:"navigation-link-to__action-button",children:(0,Ka.__)("Edit")}),o&&(0,So.jsx)(ha.Button,{variant:"secondary",href:o,target:"_blank",icon:rv,iconPosition:"right",__next40pxDefaultSize:!0,className:"navigation-link-to__action-button",children:(0,Ka.__)("View")}),(0,So.jsx)(ha.__experimentalToolsPanelItem,{hasValue:()=>!!d,label:(0,Ka.__)("Description"),onDeselect:()=>t({description:""}),isShownByDefault:!0,children:(0,So.jsx)(ha.TextareaControl,{label:(0,Ka.__)("Description"),value:d||"",onChange:g=>{t({description:g})},help:(0,Ka.__)("The description will be displayed in the menu if the current theme supports it.")})})]})}),(0,So.jsx)("div",{...h,children:(0,So.jsxs)("a",{className:"wp-block-home-link__content wp-block-navigation-item__content",href:o,onClick:tCe,children:[(0,So.jsx)(qp.RichText,{identifier:"label",className:"wp-block-home-link__label",value:p??(0,Ka.__)("Home"),onChange:g=>{t({label:g})},"aria-label":(0,Ka.__)("Home link text"),placeholder:(0,Ka.__)("Add label\u2026"),withoutInteractiveFormatting:!0}),d&&(0,So.jsx)("span",{className:"wp-block-navigation-item__description",children:d})]})})]})}var eJ=n(E(),1),tJ=n(y(),1);function rJ(){return(0,tJ.jsx)(eJ.InnerBlocks.Content,{})}var{name:nJ}=k4,aJ={icon:LE,edit:JX,save:rJ,example:{attributes:{label:(0,oJ._x)("Home Link","block example")}}},rCe=()=>R({name:nJ,metadata:k4,settings:aJ});var LR={};K(LR,{init:()=>sCe,metadata:()=>S4,name:()=>_J,settings:()=>xJ});var yJ=n(N(),1);var Pg=n(N(),1),C4=n(H(),1),Ya=n(E(),1),ef=n(q(),1),Eg=n(F(),1),fJ=n(xd(),1),bs=n(O(),1);var Di=n(N(),1),Zb=n(H(),1),mJ=n(F(),1),pn=n(O(),1),Kp=n(E(),1);var dJ=n(ve(),1);var iJ=n(H(),1),w4=n(E(),1),lJ=n(O(),1),sJ=n(F(),1),cJ=n(N(),1),Jd=n(y(),1),oCe=`
html,body,:root {
margin: 0 !important;
padding: 0 !important;
overflow: visible !important;
min-height: auto !important;
}
`;function uJ({content:e,isSelected:t}){let r=(0,sJ.useSelect)(a=>a(w4.store).getSettings().styles,[]),o=(0,iJ.useMemo)(()=>[oCe,...(0,w4.transformStyles)((r??[]).filter(a=>a.css))],[r]);return(0,Jd.jsxs)(Jd.Fragment,{children:[(0,Jd.jsx)(lJ.SandBox,{html:e,styles:o,title:(0,cJ.__)("Custom HTML Preview"),tabIndex:-1}),!t&&(0,Jd.jsx)("div",{className:"block-library-html__preview-overlay"})]})}function pJ(e=""){if(!e||!e.trim())return{html:"",css:"",js:""};let t=document.implementation.createHTMLDocument("");t.body.innerHTML=e;let r=t.body.querySelector('style[data-wp-block-html="css"]'),o=r?r.textContent.trim():"";r&&r.remove();let a=t.body.querySelector('script[data-wp-block-html="js"]'),i=a?a.textContent.trim():"";return a&&a.remove(),{html:t.body.innerHTML.trim(),css:o,js:i}}function IR({html:e="",css:t="",js:r=""}){let o=[];return t.trim()&&o.push(``),r.trim()&&o.push(`