=.5},e.prototype.toHex=function(){return t=nN(this.rgba),r=t.r,a=t.g,n=t.b,l=(i=t.a)<1?n5(Po(255*i)):"","#"+n5(r)+n5(a)+n5(n)+l;var t,r,a,n,i,l},e.prototype.toRgb=function(){return nN(this.rgba)},e.prototype.toRgbString=function(){return t=nN(this.rgba),r=t.r,a=t.g,n=t.b,(i=t.a)<1?"rgba("+r+", "+a+", "+n+", "+i+")":"rgb("+r+", "+a+", "+n+")";var t,r,a,n,i},e.prototype.toHsl=function(){return xU(Q1(this.rgba))},e.prototype.toHslString=function(){return t=xU(Q1(this.rgba)),r=t.h,a=t.s,n=t.l,(i=t.a)<1?"hsla("+r+", "+a+"%, "+n+"%, "+i+")":"hsl("+r+", "+a+"%, "+n+"%)";var t,r,a,n,i},e.prototype.toHsv=function(){return t=PU(this.rgba),{h:Po(t.h),s:Po(t.s),v:Po(t.v),a:Po(t.a,3)};var t},e.prototype.invert=function(){return Ja({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),Ja(iN(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ja(iN(this.rgba,-t))},e.prototype.grayscale=function(){return Ja(iN(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ja(CU(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ja(CU(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"?Ja({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Po(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Q1(this.rgba);return typeof t=="number"?Ja({h:t,s:r.s,l:r.l,a:r.a}):Po(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ja(t).toHex()},e})(),Ja=function(e){return e instanceof cN?e:new cN(e)},SU=[],IU=function(e){e.forEach(function(t){SU.indexOf(t)<0&&(t(cN,sN),SU.push(t))})};function NU(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"},a={};for(var n in r)a[r[n]]=n;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=a[this.toHex()];if(u)return u;if(l?.closest){var m=this.toRgb(),p=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=m,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 q0e(e,t,r){var a=r[0],n=r[1],i=r[2],l=r[3],s=r[4],c=e[t+3],u=i5(c,l,s);return l?!!(!c&&u||i5(e[t],a,s)&&i5(e[t+1],n,s)&&i5(e[t+2],i,s)&&u):u}function Z0e(e,t,r){for(var a={},n=24,i=r.ignoredColor,l=r.step,s=[0,0,0,0,0],c=0;ci?(c=n/i,l=uN,s=Math.round(l/c)):(c=i/n,s=uN,l=Math.round(s/c)),(l>n||s>i||l"u";function n1e(){return a1e?new OffscreenCanvas(1,1):document.createElement("canvas")}var RU="FastAverageColor: ";function l5(e,t,r){t||(console.error(RU+e),r&&console.error(r))}function Y1(e){return Error(RU+e)}var zU=(function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(t,r){if(!t)return Promise.reject(Y1("call .getColorAsync() without resource."));if(typeof t=="string"){if(typeof Image>"u")return Promise.reject(Y1("resource as string is not supported in this environment"));var a=new Image;return a.crossOrigin=r&&r.crossOrigin||"",a.src=t,this.bindImageEvents(a,r)}else{if(AU(t)&&!t.complete)return this.bindImageEvents(t,r);var n=this.getColor(t,r);return n.error?Promise.reject(n.error):Promise.resolve(n)}},e.prototype.getColor=function(t,r){r=r||{};var a=DU(r);if(!t)return l5("call .getColor(null) without resource",r.silent),this.prepareResult(a);var n=X0e(t),i=o1e(n,r);if(!i.srcWidth||!i.srcHeight||!i.destWidth||!i.destHeight)return l5('incorrect sizes for resource "'.concat(MU(t),'"'),r.silent),this.prepareResult(a);if(this.canvas||(this.canvas=n1e()),!this.ctx&&(this.ctx=this.canvas.getContext&&this.canvas.getContext("2d"),!this.ctx))return l5("Canvas Context 2D is not supported in this browser",r.silent),this.prepareResult(a);this.canvas.width=i.destWidth,this.canvas.height=i.destHeight;var l=a;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){l5("security error (CORS) for resource ".concat(MU(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 a=4,n=t.length,i=DU(r);if(n{if(!e)return th;let{r:t,g:r,b:a,a:n}=Ja(th).toRgb();try{let i=(0,FU.applyFilters)("media.crossOrigin",void 0,e);return(await s5().getColorAsync(e,{defaultColor:[t,r,a,n*255],silent:!0,crossOrigin:i})).hex}catch{return th}});function Qp(e,t,r){if(t===r||e===100)return Ja(t).isDark();let a=Ja(t).alpha(e/100).toRgb(),n=Ja(r).toRgb(),i=i1e(a,n);return Ja(i).isDark()}var Ut=o(v(),1);function l1e(e){return[["core/paragraph",{style:{typography:{textAlign:"center"}},placeholder:(0,pN.__)("Write title\u2026"),...e}]]}var s1e=(e,t)=>!e&&(0,OU.isBlobURL)(t);function c1e({attributes:e,clientId:t,isSelected:r,overlayColor:a,setAttributes:n,setOverlayColor:i,toggleSelection:l,context:{postId:s,postType:c}}){let{contentPosition:u,id:m,url:p,backgroundType:d,useFeaturedImage:f,dimRatio:h,focalPoint:g,hasParallax:b,isDark:y,isRepeated:k,minHeight:_,minHeightUnit:x,alt:S,allowedBlocks:C,templateLock:N,tagName:B="div",isUserOverlayColor:D,sizeSlug:A,poster:H}=e,[F]=(0,J1.useEntityProp)("postType",c,"featured_media",s),{getSettings:z}=(0,um.useSelect)(Bo.store),{__unstableMarkNextChangeAsNotPersistent:I}=(0,um.useDispatch)(Bo.store),R=(0,jl.useRef)({attributes:e,overlayColor:a});(0,jl.useLayoutEffect)(()=>{R.current={attributes:e,overlayColor:a}});let{media:$}=(0,um.useSelect)(Pe=>({media:F&&f?Pe(J1.store).getEntityRecord("postType","attachment",F,{context:"view"}):void 0}),[F,f]),j=$?.media_details?.sizes?.[A]?.source_url??$?.source_url;(0,jl.useEffect)(()=>{(async()=>{if(!f)return;let Pe=await rh(j),{attributes:Ht,overlayColor:qr}=R.current,Co=qr.color;Ht.isUserOverlayColor||(Co=Pe,I(),i(Co));let So=Qp(Ht.dimRatio,Co,Pe);I(),n({isDark:So,isUserOverlayColor:Ht.isUserOverlayColor||!1})})()},[j,I,n,i,f]);let G=f?j:p?.replaceAll("&","&"),O=f?Qt:d,{createErrorNotice:J}=(0,um.useDispatch)(jU.store),{gradientClass:ee,gradientValue:oe}=(0,Bo.__experimentalUseGradient)(),X=async Pe=>{let Ht=Xj(Pe),qr=[Pe?.type,Pe?.media_type].includes(Qt),Co=await rh(qr?Pe?.url:void 0),{attributes:So,overlayColor:Sl}=R.current,qi=Sl.color;So.isUserOverlayColor||(qi=Co,i(qi),I());let Zi=So.url===void 0&&So.dimRatio===100?50:So.dimRatio,vf=Qp(Zi,qi,Co);if(O===Qt&&Ht?.id){let{imageDefaultSize:zc}=z();A&&(Pe?.sizes?.[A]||Pe?.media_details?.sizes?.[A])?(Ht.sizeSlug=A,Ht.url=Pe?.sizes?.[A]?.url||Pe?.media_details?.sizes?.[A]?.source_url):Pe?.sizes?.[zc]||Pe?.media_details?.sizes?.[zc]?(Ht.sizeSlug=zc,Ht.url=Pe?.sizes?.[zc]?.url||Pe?.media_details?.sizes?.[zc]?.source_url):Ht.sizeSlug=Xf}n({...Ht,focalPoint:void 0,useFeaturedImage:void 0,dimRatio:Zi,isDark:vf,isUserOverlayColor:So.isUserOverlayColor||!1})},te=()=>{let Pe=a.color;D||(Pe=HU,i(void 0),I());let Ht=Qp(h,Pe,th);n({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0,isDark:Ht})},ne=async Pe=>{let Ht=await rh(G),{attributes:qr}=R.current,Co=Qp(qr.dimRatio,Pe,Ht);i(Pe),I(),n({isUserOverlayColor:!0,isDark:Co})},le=async Pe=>{let Ht=await rh(G),{overlayColor:qr}=R.current,Co=Qp(Pe,qr.color,Ht);n({dimRatio:Pe,isDark:Co})},pe=Pe=>{J(Pe,{type:"snackbar"})},Ie=Pe=>{n({url:Pe,backgroundType:Kc,dimRatio:p===void 0&&h===100?50:h,id:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0})},{embedPreview:Ne,isFetchingEmbed:ae}=(0,um.useSelect)(Pe=>{if(O!==Kc||!G)return{embedPreview:void 0,isFetchingEmbed:!1};let{getEmbedPreview:Ht,isRequestingEmbedPreview:qr}=Pe(J1.store);return{embedPreview:Ht(G),isFetchingEmbed:qr(G)}},[G,O]),Re=(0,jl.useMemo)(()=>O!==Kc||!Ne?.html?null:mU(Ne.html),[Ne,O]),Ee=s1e(m,G),ie=Qt===O,fe=Cr===O,ke=Kc===O,je=(0,Bo.useBlockEditingMode)(),de=je==="default",[ct,{height:at,width:kt}]=(0,c5.useResizeObserver)(),Wr=(0,jl.useMemo)(()=>({height:x==="px"&&_?_:"auto",width:"auto"}),[_,x]),ut=_&&x?`${_}${x}`:_,br=!(b||k),mt={minHeight:ut||void 0},wo=G?`url(${G})`:void 0,Y=Qo(g),ze={backgroundColor:a.color},Me={objectPosition:g&&br?Qo(g):void 0},Xe=!!(G||a.color||oe),Te=(0,um.useSelect)(Pe=>Pe(Bo.store).getBlock(t).innerBlocks.length>0,[t]),Bt=(0,jl.useRef)(),yr=(0,Bo.useBlockProps)({ref:Bt}),[xn]=(0,Bo.useSettings)("typography.fontSizes"),Je=xn?.length>0,$r=l1e({fontSize:Je?"large":void 0}),ip=(0,Bo.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:Te?void 0:$r,templateInsertUpdatesSelection:!0,allowedBlocks:C,templateLock:N,dropZoneElement:Bt.current}),Cs=(0,jl.useRef)(),Ru={isVideoBackground:fe,isImageBackground:ie,mediaElement:Cs,hasInnerBlocks:Te,url:G,isImgElement:br,overlayColor:a},kn=async()=>{let Pe=!f,Ht=Pe?await rh(j):th,{attributes:qr,overlayColor:Co}=R.current,So=qr.isUserOverlayColor?Co.color:Ht;qr.isUserOverlayColor||(i(Pe?So:void 0),I());let Sl=qr.dimRatio===100?50:qr.dimRatio,qi=Qp(Sl,So,Ht);n({id:void 0,url:void 0,useFeaturedImage:Pe,dimRatio:Sl,backgroundType:f?Qt:void 0,isDark:qi})},ja=(0,Ut.jsx)(fU,{attributes:e,setAttributes:n,onSelectMedia:X,onSelectEmbedUrl:Ie,currentSettings:Ru,toggleUseFeaturedImage:kn,onClearMedia:te,blockEditingMode:je}),gf=(0,Ut.jsx)(sU,{attributes:e,setAttributes:n,clientId:t,setOverlayColor:ne,coverRef:Bt,currentSettings:Ru,toggleUseFeaturedImage:kn,updateDimRatio:le,onClearMedia:te,featuredImage:$}),zu={className:"block-library-cover__resize-container",clientId:t,height:at,minHeight:ut,onResizeStart:()=>{n({minHeightUnit:"px"}),l(!1)},onResize:Pe=>{n({minHeight:Pe})},onResizeStop:Pe=>{l(!0),n({minHeight:Pe})},showHandle:!e.style?.dimensions?.aspectRatio,size:Wr,width:kt};if(!f&&!Te&&!Xe)return(0,Ut.jsxs)(Ut.Fragment,{children:[ja,gf,de&&r&&(0,Ut.jsx)(aN,{...zu}),(0,Ut.jsxs)(B,{...yr,className:w("is-placeholder",yr.className),style:{...yr.style,minHeight:ut||void 0},children:[ct,(0,Ut.jsx)(oN,{onSelectMedia:X,onError:pe,toggleUseFeaturedImage:kn,children:(0,Ut.jsx)("div",{className:"wp-block-cover__placeholder-background-options",children:(0,Ut.jsx)(Bo.ColorPalette,{disableCustomColors:!0,value:a.color,onChange:ne,clearable:!1,asButtons:!0,"aria-label":(0,pN.__)("Overlay color")})})})]})]});let Ss=w({"is-dark-theme":y,"is-light":!y,"is-transient":Ee,"has-parallax":b,"is-repeated":k,"has-custom-content-position":!Ya(u)},Nn(u)),Ts=G||!f||f&&!G;return(0,Ut.jsxs)(Ut.Fragment,{children:[ja,gf,(0,Ut.jsxs)(B,{...yr,className:w(Ss,yr.className),style:{...mt,...yr.style},"data-url":G,children:[ct,!G&&f&&(0,Ut.jsx)(Yp.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),G&&ie&&(br?(0,Ut.jsx)("img",{ref:Cs,className:"wp-block-cover__image-background",alt:S,src:G,style:Me}):(0,Ut.jsx)("div",{ref:Cs,role:S?"img":void 0,"aria-label":S||void 0,className:w(Ss,"wp-block-cover__image-background"),style:{backgroundImage:wo,backgroundPosition:Y}})),G&&fe&&(0,Ut.jsx)("video",{ref:Cs,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:G,poster:H,style:Me}),ke&&Re&&(0,Ut.jsx)("div",{ref:Cs,className:"wp-block-cover__video-background wp-block-cover__embed-background",style:Me,children:(0,Ut.jsx)(Yp.SandBox,{allowSameOrigin:!0,html:Re,title:"Background video",styles:["iframe{position:fixed;top:0;left:0;width:100%;height:100%;}"]})}),ke&&!Re&&ae&&(0,Ut.jsx)(Yp.Spinner,{}),Ts&&(0,Ut.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",al(h),{[a.class]:a.class,"has-background-dim":h!==void 0,"wp-block-cover__gradient-background":G&&oe&&h!==0,"has-background-gradient":oe,[ee]:ee}),style:{backgroundImage:oe,...ze}}),Ee&&(0,Ut.jsx)(Yp.Spinner,{}),(0,Ut.jsx)(oN,{disableMediaButtons:!0,onSelectMedia:X,onError:pe,toggleUseFeaturedImage:kn}),(0,Ut.jsx)("div",{...ip})]}),de&&r&&(0,Ut.jsx)(aN,{...zu})]})}var UU=(0,c5.compose)([(0,Bo.withColors)({overlayColor:"background-color"})])(c1e);var u5={$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"}},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 mm=o(T(),1);var Vs=o(v(),1);function GU({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:m,isRepeated:p,overlayColor:d,url:f,alt:h,id:g,minHeight:b,minHeightUnit:y,tagName:k,sizeSlug:_,poster:x}=e,S=(0,mm.getColorClassName)("background-color",d),C=(0,mm.__experimentalGetGradientClass)(r),N=b&&y?`${b}${y}`:b,B=Qt===t,D=Cr===t,A=Kc===t,H=!(u||p),F={minHeight:N||void 0},z={backgroundColor:S?void 0:i,background:n||void 0},I=s&&H?Qo(s):void 0,R=f?`url(${f})`:void 0,$=Qo(s),j=w({"is-light":!m,"has-parallax":u,"is-repeated":p,"has-custom-content-position":!Ya(a)},Nn(a)),G=w("wp-block-cover__image-background",g?`wp-image-${g}`:null,{[`size-${_}`]:_,"has-parallax":u,"is-repeated":p}),O=r||n;return(0,Vs.jsxs)(k,{...mm.useBlockProps.save({className:j,style:F}),children:[!c&&B&&f&&(H?(0,Vs.jsx)("img",{className:G,alt:h,src:f,style:{objectPosition:I},"data-object-fit":"cover","data-object-position":I}):(0,Vs.jsx)("div",{role:h?"img":void 0,"aria-label":h||void 0,className:G,style:{backgroundPosition:$,backgroundImage:R}})),D&&f&&(0,Vs.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,poster:x,style:{objectPosition:I},"data-object-fit":"cover","data-object-position":I}),A&&f&&(0,Vs.jsx)("figure",{className:w("wp-block-cover__video-background","wp-block-cover__embed-background","wp-block-embed"),children:(0,Vs.jsx)("div",{className:"wp-block-embed__wrapper",children:f})}),(0,Vs.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",S,al(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&O&&l!==0,"has-background-gradient":O,[C]:C}),style:z}),(0,Vs.jsx)("div",{...mm.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}var hi=o(W(),1),WU=o(T(),1);var{cleanEmptyObject:m5}=K(WU.privateApis),m1e={from:[{type:"block",blocks:["core/image"],transform:({caption:e,url:t,alt:r,align:a,id:n,anchor:i,style:l})=>(0,hi.createBlock)("core/cover",{dimRatio:50,url:t,alt:r,align:a,id:n,anchor:i,style:{color:{duotone:l?.color?.duotone}}},[(0,hi.createBlock)("core/paragraph",{content:e,fontSize:"large",style:{typography:{textAlign:"center"}}})])},{type:"block",blocks:["core/video"],transform:({caption:e,src:t,align:r,id:a,anchor:n})=>(0,hi.createBlock)("core/cover",{dimRatio:50,url:t,align:r,id:a,backgroundType:Cr,anchor:n},[(0,hi.createBlock)("core/paragraph",{content:e,fontSize:"large",style:{typography:{textAlign:"center"}}})])},{type:"block",blocks:["core/group"],transform:(e,t)=>{let{align:r,anchor:a,backgroundColor:n,gradient:i,style:l}=e;if(t?.length===1&&t[0]?.name==="core/cover")return(0,hi.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);let s=n||i||l?.color?.background||l?.color?.gradient?void 0:50,c={align:r,anchor:a,dimRatio:s,overlayColor:n,customOverlayColor:l?.color?.background,gradient:i,customGradient:l?.color?.gradient},u={...e,backgroundColor:void 0,gradient:void 0,style:m5({...e?.style,color:l?.color?{...l?.color,background:void 0,gradient:void 0}:void 0})};return(0,hi.createBlock)("core/cover",c,[(0,hi.createBlock)("core/group",u,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:({backgroundType:e,url:t,overlayColor:r,customOverlayColor:a,gradient:n,customGradient:i})=>t?e===Qt:!r&&!a&&!n&&!i,transform:({title:e,url:t,alt:r,align:a,id:n,anchor:i,style:l})=>(0,hi.createBlock)("core/image",{caption:e,url:t,alt:r,align:a,id:n,anchor:i,style:{color:{duotone:l?.color?.duotone}}})},{type:"block",blocks:["core/video"],isMatch:({backgroundType:e,url:t,overlayColor:r,customOverlayColor:a,gradient:n,customGradient:i})=>t?e===Cr:!r&&!a&&!n&&!i,transform:({title:e,url:t,align:r,id:a,anchor:n})=>(0,hi.createBlock)("core/video",{caption:e,src:t,id:a,align:r,anchor:n})},{type:"block",blocks:["core/group"],isMatch:({url:e,useFeaturedImage:t})=>!(e||t),transform:(e,t)=>{let r={backgroundColor:e?.overlayColor,gradient:e?.gradient,style:m5({...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 a=m5(t[0].attributes||{});return a?.backgroundColor||a?.gradient||a?.style?.color?.background||a?.style?.color?.gradient?(0,hi.createBlock)("core/group",a,t[0]?.innerBlocks):(0,hi.createBlock)("core/group",{...r,...a,style:m5({...a?.style,color:r?.style?.color||a?.style?.color?{...r?.style?.color,...a?.style?.color}:void 0})},t[0]?.innerBlocks)}return(0,hi.createBlock)("core/group",{...e,...r},t)}}]},$U=m1e;var dN=o(P(),1);var p1e=[{name:"cover",title:(0,dN.__)("Cover"),description:(0,dN.__)("Add an image or video with a text overlay."),attributes:{layout:{type:"constrained"}},isDefault:!0,icon:xp}],qU=p1e;var{fieldsKey:d1e,formKey:f1e}=K(ZU.privateApis),{name:KU}=u5,p5={icon:xp,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,fN.__)("Snow Patrol")}`,style:{typography:{textAlign:"center"}}}}]},transforms:$U,save:GU,edit:UU,deprecated:Jj,variations:qU};window.__experimentalContentOnlyInspectorFields&&(p5[d1e]=[{id:"background",label:(0,fN.__)("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})}],p5[f1e]={fields:["background"]});var h1e=()=>E({name:KU,metadata:u5,settings:p5});var gN={};Z(gN,{init:()=>k1e,metadata:()=>d5,name:()=>rG,settings:()=>h5});var pm=o(P(),1),tG=o(W(),1);var d5={$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 Ul=o(T(),1),Fs=o(M(),1),Xc=o(P(),1),QU=o(U(),1),YU=o(V(),1);var En=o(v(),1),{withIgnoreIMEEvents:v1e}=K(Fs.privateApis),b1e=[["core/paragraph",{placeholder:(0,Xc.__)("Type / to add a hidden block")}]];function y1e({attributes:e,setAttributes:t,clientId:r}){let{name:a,showContent:n,summary:i,allowedBlocks:l,placeholder:s}=e,c=(0,Ul.useBlockProps)(),u=(0,Ul.useInnerBlocksProps)(c,{template:b1e,__experimentalCaptureToolbars:!0,allowedBlocks:l}),[m,p]=(0,QU.useState)(n),d=q(),f=(0,YU.useSelect)(b=>b(Ul.store).hasSelectedInnerBlock(r,!0),[r]),h=b=>{b.key==="Enter"&&!b.shiftKey&&(p(y=>!y),b.preventDefault())},g=b=>{b.key===" "&&b.preventDefault()};return(0,En.jsxs)(En.Fragment,{children:[(0,En.jsx)(Ul.InspectorControls,{children:(0,En.jsx)(Fs.__experimentalToolsPanel,{label:(0,Xc.__)("Settings"),resetAll:()=>{t({showContent:!1})},dropdownMenuProps:d,children:(0,En.jsx)(Fs.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,Xc.__)("Open by default"),hasValue:()=>n,onDeselect:()=>{t({showContent:!1})},children:(0,En.jsx)(Fs.ToggleControl,{label:(0,Xc.__)("Open by default"),checked:n,onChange:()=>t({showContent:!n})})})})}),(0,En.jsx)(Ul.InspectorControls,{group:"advanced",children:(0,En.jsx)(Fs.TextControl,{__next40pxDefaultSize:!0,label:(0,Xc.__)("Name attribute"),value:a||"",onChange:b=>t({name:b}),help:(0,Xc.__)("Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time.")})}),(0,En.jsxs)("details",{...u,open:m||f,onToggle:b=>p(b.target.open),name:a||"",children:[(0,En.jsx)("summary",{onKeyDown:v1e(h),onKeyUp:g,children:(0,En.jsx)(Ul.RichText,{identifier:"summary","aria-label":(0,Xc.__)("Write summary. Press Enter to expand or collapse the details."),placeholder:s||(0,Xc.__)("Write summary\u2026"),withoutInteractiveFormatting:!0,value:i,onChange:b=>t({summary:b})})}),u.children]})]})}var XU=y1e;var ah=o(T(),1),oh=o(v(),1);function JU({attributes:e}){let{name:t,showContent:r}=e,a=e.summary?e.summary:"Details",n=ah.useBlockProps.save();return(0,oh.jsxs)("details",{...n,name:t||void 0,open:r,children:[(0,oh.jsx)("summary",{children:(0,oh.jsx)(ah.RichText.Content,{value:a})}),(0,oh.jsx)(ah.InnerBlocks.Content,{})]})}var f5=o(W(),1),eG={from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch({},e){return!(e.length===1&&e[0].name==="core/details")},__experimentalConvert(e){return(0,f5.createBlock)("core/details",{},e.map(t=>(0,f5.cloneBlock)(t)))}}]};var{fieldsKey:_1e,formKey:x1e}=K(tG.privateApis),{name:rG}=d5,h5={icon:T9,example:{attributes:{summary:(0,pm.__)("La Mancha"),showContent:!0},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pm.__)("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,a=e?.metadata?.name,n=r?.trim().length>0;if(t==="list-view"&&(a||n))return a||r;if(t==="breadcrumb"&&a)return a;if(t==="accessibility")return n?(0,pm.sprintf)((0,pm.__)("Details. %s"),r):(0,pm.__)("Details. Empty.")},save:JU,edit:XU,transforms:eG};window.__experimentalContentOnlyInspectorFields&&(h5[_1e]=[{id:"summary",label:(0,pm.__)("Summary"),type:"text",Edit:"rich-text"}],h5[x1e]={fields:["summary"]});var k1e=()=>E({name:rG,metadata:d5,settings:h5});var wN={};Z(wN,{init:()=>M1e,metadata:()=>Ls,name:()=>FG,settings:()=>HG});var Xp=o(P(),1),Hs=o(M(),1),g5=o(T(),1);var ll=o(v(),1);function w1e(e){return e?(0,Xp.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,Xp.__)("This embed may not preserve its aspect ratio when the browser is resized.")}var C1e=({blockSupportsResponsive:e,showEditButton:t,themeSupportsResponsive:r,allowResponsive:a,toggleResponsive:n,switchBackToURLInput:i})=>{let l=q();return(0,ll.jsxs)(ll.Fragment,{children:[(0,ll.jsx)(g5.BlockControls,{children:(0,ll.jsx)(Hs.ToolbarGroup,{children:t&&(0,ll.jsx)(Hs.ToolbarButton,{className:"components-toolbar__control",label:(0,Xp.__)("Edit URL"),icon:Pp,onClick:i})})}),r&&e&&(0,ll.jsx)(g5.InspectorControls,{children:(0,ll.jsx)(Hs.__experimentalToolsPanel,{label:(0,Xp.__)("Media settings"),resetAll:()=>{n(!0)},dropdownMenuProps:l,children:(0,ll.jsx)(Hs.__experimentalToolsPanelItem,{label:(0,Xp.__)("Media settings"),isShownByDefault:!0,hasValue:()=>!a,onDeselect:()=>{n(!a)},children:(0,ll.jsx)(Hs.ToggleControl,{label:(0,Xp.__)("Resize for smaller devices"),checked:a,help:w1e,onChange:n})})})})]})},oG=C1e;var ye=o(M(),1),xe=o(v(),1),Gl=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,xe.jsx)(ye.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"})}),v5=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,xe.jsx)(ye.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"})}),vN=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,xe.jsx)(ye.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"})}),nh=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,xe.jsx)(ye.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"})}),aG={foreground:"#000000",src:(0,xe.jsx)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.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"})})},nG={foreground:"#ff0000",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.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"})})},iG={foreground:"#3b5998",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.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"})})},lG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.G,{children:(0,xe.jsx)(ye.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"})})}),sG={foreground:"#0073AA",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.G,{children:(0,xe.jsx)(ye.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"})})})},cG={foreground:"#1db954",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.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"})})},uG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.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"})}),mG={foreground:"#1ab7ea",src:(0,xe.jsx)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.G,{children:(0,xe.jsx)(ye.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"})})})},pG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.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"})}),dG={foreground:"#35465c",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.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"})})},fG=(0,xe.jsxs)(ye.SVG,{viewBox:"0 0 24 24",children:[(0,xe.jsx)(ye.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,xe.jsx)(ye.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,xe.jsx)(ye.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"})]}),hG=(0,xe.jsxs)(ye.SVG,{viewBox:"0 0 24 24",children:[(0,xe.jsx)(ye.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,xe.jsx)(ye.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,xe.jsx)(ye.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,xe.jsx)(ye.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,xe.jsx)(ye.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,xe.jsx)(ye.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})]}),gG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.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"})}),vG=(0,xe.jsx)(ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,xe.jsx)(ye.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"})}),bG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 44 44",children:(0,xe.jsx)(ye.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"})}),yG={foreground:"#f43e37",src:(0,xe.jsxs)(ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,xe.jsx)(ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,xe.jsx)(ye.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"})]})},_G=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.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 xG=o(M(),1),bN=o(v(),1),S1e=()=>(0,bN.jsx)("div",{className:"wp-block-embed is-loading",children:(0,bN.jsx)(xG.Spinner,{})}),kG=S1e;var Os=o(P(),1),Ln=o(M(),1),wG=o(T(),1),Dn=o(v(),1),T1e=({icon:e,label:t,value:r,onSubmit:a,onChange:n,cannotEmbed:i,fallback:l,tryAgain:s})=>(0,Dn.jsxs)(Ln.Placeholder,{icon:(0,Dn.jsx)(wG.BlockIcon,{icon:e,showColors:!0}),label:t,className:"wp-block-embed",instructions:(0,Os.__)("Paste a link to the content you want to display on your site."),children:[(0,Dn.jsxs)("form",{onSubmit:a,children:[(0,Dn.jsx)(Ln.__experimentalInputControl,{__next40pxDefaultSize:!0,type:"url",value:r||"",className:"wp-block-embed__placeholder-input",label:t,hideLabelFromVision:!0,placeholder:(0,Os.__)("Enter URL to embed here\u2026"),onChange:n}),(0,Dn.jsx)(Ln.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Os._x)("Embed","button label")})]}),(0,Dn.jsx)("div",{className:"wp-block-embed__learn-more",children:(0,Dn.jsx)(Ln.ExternalLink,{href:(0,Os.__)("https://wordpress.org/documentation/article/embeds/"),children:(0,Os.__)("Learn more about embeds")})}),i&&(0,Dn.jsxs)(Ln.__experimentalVStack,{spacing:3,className:"components-placeholder__error",children:[(0,Dn.jsx)("div",{className:"components-placeholder__instructions",children:(0,Os.__)("Sorry, this content could not be embedded.")}),(0,Dn.jsxs)(Ln.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",children:[(0,Dn.jsx)(Ln.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:s,children:(0,Os._x)("Try again","button label")})," ",(0,Dn.jsx)(Ln.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:l,children:(0,Os._x)("Convert to link","button label")})]})]})]}),CG=T1e;var lh=o(P(),1),y5=o(M(),1),TG=o(T(),1),PG=o(U(),1),BG=o(mr(),1);var b5=o(me(),1),ih=o(U(),1),yN=o(v(),1),P1e={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function SG({html:e}){let t=(0,ih.useRef)(),r=(0,ih.useMemo)(()=>{let n=new window.DOMParser().parseFromString(e,"text/html").querySelector("iframe"),i={};return n&&Array.from(n.attributes).forEach(({name:l,value:s})=>{l!=="style"&&(i[P1e[l]||l]=s)}),i},[e]);return(0,ih.useEffect)(()=>{let{ownerDocument:a}=t.current,{defaultView:n}=a;function i({data:{secret:l,message:s,value:c}={}}){s!=="height"||l!==r["data-secret"]||(t.current.height=c)}return n.addEventListener("message",i),()=>{n.removeEventListener("message",i)}},[]),(0,yN.jsx)("div",{className:"wp-block-embed__wrapper",children:(0,yN.jsx)("iframe",{ref:(0,b5.useMergeRefs)([t,(0,b5.useFocusableIframe)()]),title:r.title,...r})})}var Mn=o(v(),1);function IG({preview:e,previewable:t,url:r,type:a,isSelected:n,className:i,icon:l,label:s}){let[c,u]=(0,PG.useState)(!1);!n&&c&&u(!1);let m=()=>{u(!0)},{scripts:p}=e,d=a==="photo"?pF(e):e.html,f=(0,BG.getAuthority)(r),h=(0,lh.sprintf)((0,lh.__)("Embedded content from %s"),f),g=w(a,i,"wp-block-embed__wrapper");return(0,Mn.jsx)(Mn.Fragment,{children:t?a==="wp-embed"?(0,Mn.jsx)(SG,{html:d}):(0,Mn.jsxs)("div",{className:"wp-block-embed__wrapper",children:[(0,Mn.jsx)(y5.SandBox,{allowSameOrigin:!0,html:d,scripts:p,title:h,type:g,onFocus:m}),!c&&(0,Mn.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:m})]}):(0,Mn.jsxs)(y5.Placeholder,{icon:(0,Mn.jsx)(TG.BlockIcon,{icon:l,showColors:!0}),label:s,children:[(0,Mn.jsx)("p",{className:"components-placeholder__error",children:(0,Mn.jsx)("a",{href:r,children:r})}),(0,Mn.jsx)("p",{className:"components-placeholder__error",children:(0,lh.sprintf)((0,lh.__)("Embedded content from %s can't be previewed in the editor."),f)})]})})}var ed=o(P(),1),Jp=o(U(),1),_5=o(V(),1),NG=o(T(),1),_N=o(Q(),1),xN=o(L(),1),EG=o(mr(),1);var gi=o(v(),1),B1e=e=>{let{attributes:{providerNameSlug:t,previewable:r,responsive:a,url:n},attributes:i,isSelected:l,onReplace:s,setAttributes:c,insertBlocksAfter:u,onFocus:m}=e,p={title:(0,ed._x)("Embed","block title"),icon:Gl},{icon:d,title:f}=uF(t)||p,[h,g]=(0,Jp.useState)(n),[b,y]=(0,Jp.useState)(!1),{invalidateResolution:k}=(0,_5.useDispatch)(_N.store),{preview:_,fetching:x,themeSupportsResponsive:S,cannotEmbed:C,hasResolved:N}=(0,_5.useSelect)(G=>{let{getEmbedPreview:O,isPreviewEmbedFallback:J,isRequestingEmbedPreview:ee,getThemeSupports:oe,hasFinishedResolution:X}=G(_N.store);if(!n)return{fetching:!1,cannotEmbed:!1};let te=O(n),ne=J(n),le=te?.html===!1&&te?.type===void 0,pe=te?.data?.status===404,Ie=!!te&&!le&&!pe;return{preview:Ie?te:void 0,fetching:ee(n),themeSupportsResponsive:oe()["responsive-embeds"],cannotEmbed:!Ie||ne,hasResolved:X("getEmbedPreview",[n])}},[n]),B=()=>fF(i,_,f,a);function D(G){let{className:O}=i,{html:J}=_;c({allowResponsive:G,className:tI(J,O,a&&G)})}(0,Jp.useEffect)(()=>{if(_?.html||!C||!N)return;let G=n.replace(/\/$/,"");g(G),y(!1),c({url:G})},[_?.html,n,C,N,c]),(0,Jp.useEffect)(()=>{if(!(!C||x||!h)&&(0,EG.getAuthority)(h)==="x.com"){let G=new URL(h);G.host="twitter.com",c({url:G.toString()})}},[h,C,x,c]),(0,Jp.useEffect)(()=>{if(_&&!b){let G=B();if(Object.keys(G).some(J=>G[J]!==i[J])&&c(G),s){let J=Yu(e,G);J&&s(J)}}},[_,b]);let A=(0,NG.useBlockProps)();if(x)return(0,gi.jsx)(xN.View,{...A,children:(0,gi.jsx)(kG,{})});let H=(0,ed.sprintf)((0,ed.__)("%s URL"),f);if(!_||C||b)return(0,gi.jsx)(xN.View,{...A,children:(0,gi.jsx)(CG,{icon:d,label:H,onFocus:m,onSubmit:G=>{G&&G.preventDefault();let O=Qu(i.className);y(!1),c({url:h,className:O})},value:h,cannotEmbed:C,onChange:G=>g(G),fallback:()=>dF(h,s),tryAgain:()=>{k("getEmbedPreview",[h])}})});let{caption:z,type:I,allowResponsive:R,className:$}=B(),j=w($,e.className);return(0,gi.jsxs)(gi.Fragment,{children:[(0,gi.jsx)(oG,{showEditButton:_&&!C,themeSupportsResponsive:S,blockSupportsResponsive:a,allowResponsive:R,toggleResponsive:D,switchBackToURLInput:()=>y(!0)}),(0,gi.jsxs)("figure",{...A,className:w(A.className,j,{[`is-type-${I}`]:I,[`is-provider-${t}`]:t,[`wp-block-embed-${t}`]:t}),children:[(0,gi.jsx)(IG,{preview:_,previewable:r,className:j,url:h,type:I,caption:z,onCaptionChange:G=>c({caption:G}),isSelected:l,icon:d,label:H,insertBlocksAfter:u,attributes:i,setAttributes:c}),(0,gi.jsx)(_a,{attributes:i,setAttributes:c,isSelected:l,insertBlocksAfter:u,label:(0,ed.__)("Embed caption text"),showToolbarButton:l})]})]})},DG=B1e;var td=o(T(),1),ev=o(v(),1);function LG({attributes:e}){let{url:t,caption:r,type:a,providerNameSlug:n}=e;if(!t)return null;let i=w("wp-block-embed",{[`is-type-${a}`]:a,[`is-provider-${n}`]:n,[`wp-block-embed-${n}`]:n});return(0,ev.jsxs)("figure",{...td.useBlockProps.save({className:i}),children:[(0,ev.jsx)("div",{className:"wp-block-embed__wrapper",children:`
${t}
`}),!td.RichText.isEmpty(r)&&(0,ev.jsx)(td.RichText.Content,{className:(0,td.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:r})]})}var kN=o(W(),1);var{name:I1e}=Ls,N1e={from:[{type:"raw",isMatch:e=>e.nodeName==="P"&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)&&e.textContent?.match(/https/gi)?.length===1,transform:e=>(0,kN.createBlock)(I1e,{url:e.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],isMatch:({url:e})=>!!e,transform:({url:e,caption:t,className:r})=>{let a=`${e}`;return t?.trim()&&(a+=`
${t}`),(0,kN.createBlock)("core/paragraph",{content:a,className:Qu(r)})}}]},MG=N1e;var ue=o(P(),1);function ft(e){return(0,ue.sprintf)((0,ue.__)("%s Embed"),e)}var AG=[{name:"twitter",title:ft("X"),icon:aG,keywords:["x","twitter","tweet",(0,ue.__)("social")],description:(0,ue.__)("Embed an X post."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:ft("YouTube"),icon:nG,keywords:[(0,ue.__)("music"),(0,ue.__)("video")],description:(0,ue.__)("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:ft("Facebook"),icon:iG,keywords:[(0,ue.__)("social")],description:(0,ue.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:ft("Instagram"),icon:lG,keywords:[(0,ue.__)("image"),(0,ue.__)("social")],description:(0,ue.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:ft("WordPress"),icon:sG,keywords:[(0,ue.__)("post"),(0,ue.__)("blog")],description:(0,ue.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:ft("SoundCloud"),icon:v5,keywords:[(0,ue.__)("music"),(0,ue.__)("audio")],description:(0,ue.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:ft("Spotify"),icon:cG,keywords:[(0,ue.__)("music"),(0,ue.__)("audio")],description:(0,ue.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:ft("Flickr"),icon:uG,keywords:[(0,ue.__)("image")],description:(0,ue.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:ft("Vimeo"),icon:mG,keywords:[(0,ue.__)("video")],description:(0,ue.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:ft("Animoto"),icon:hG,description:(0,ue.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:ft("Cloudup"),icon:Gl,description:(0,ue.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:ft("CollegeHumor"),icon:nh,description:(0,ue.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:ft("Crowdsignal"),icon:Gl,keywords:["polldaddy",(0,ue.__)("survey")],description:(0,ue.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:ft("Dailymotion"),icon:gG,keywords:[(0,ue.__)("video")],description:(0,ue.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:ft("Imgur"),icon:vN,description:(0,ue.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:ft("Issuu"),icon:Gl,description:(0,ue.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:ft("Kickstarter"),icon:Gl,description:(0,ue.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:ft("Mixcloud"),icon:v5,keywords:[(0,ue.__)("music"),(0,ue.__)("audio")],description:(0,ue.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocket-casts",title:ft("Pocket Casts"),icon:yG,keywords:[(0,ue.__)("podcast"),(0,ue.__)("audio")],description:(0,ue.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocket-casts",responsive:!0}},{name:"reddit",title:ft("Reddit"),icon:pG,description:(0,ue.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:ft("ReverbNation"),icon:v5,description:(0,ue.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"scribd",title:ft("Scribd"),icon:Gl,description:(0,ue.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"smugmug",title:ft("SmugMug"),icon:vN,description:(0,ue.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:ft("Speaker Deck"),icon:Gl,description:(0,ue.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:ft("TikTok"),icon:nh,keywords:[(0,ue.__)("video")],description:(0,ue.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:ft("TED"),icon:nh,description:(0,ue.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:ft("Tumblr"),icon:dG,keywords:[(0,ue.__)("social")],description:(0,ue.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(.+)\.tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:ft("VideoPress"),icon:nh,keywords:[(0,ue.__)("video")],description:(0,ue.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:ft("WordPress.tv"),icon:nh,description:(0,ue.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:ft("Amazon Kindle"),icon:fG,keywords:[(0,ue.__)("ebook")],description:(0,ue.__)("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:ft("Pinterest"),icon:vG,keywords:[(0,ue.__)("social"),(0,ue.__)("bookmark")],description:(0,ue.__)("Embed Pinterest pins, boards, and profiles."),patterns:[/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i],attributes:{providerNameSlug:"pinterest"}},{name:"wolfram-cloud",title:ft("Wolfram"),icon:bG,description:(0,ue.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}},{name:"bluesky",title:ft("Bluesky"),icon:_G,description:(0,ue.__)("Embed a Bluesky post."),patterns:[/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],attributes:{providerNameSlug:"bluesky"}}];AG.forEach(e=>{e.isActive||(e.isActive=(t,r)=>t.providerNameSlug===r.providerNameSlug)});var RG=AG;var rd=o(T(),1),od=o(v(),1),{attributes:zG}=Ls,E1e={attributes:zG,save({attributes:e}){let{url:t,caption:r,type:a,providerNameSlug:n}=e;if(!t)return null;let i=w("wp-block-embed",{[`is-type-${a}`]:a,[`is-provider-${n}`]:n,[`wp-block-embed-${n}`]:n});return(0,od.jsxs)("figure",{...rd.useBlockProps.save({className:i}),children:[(0,od.jsx)("div",{className:"wp-block-embed__wrapper",children:`
${t}
`}),!rd.RichText.isEmpty(r)&&(0,od.jsx)(rd.RichText.Content,{tagName:"figcaption",value:r})]})}},D1e={attributes:zG,save({attributes:{url:e,caption:t,type:r,providerNameSlug:a}}){if(!e)return null;let n=w("wp-block-embed",{[`is-type-${r}`]:r,[`is-provider-${a}`]:a});return(0,od.jsxs)("figure",{className:n,children:[`
${e}
`,!rd.RichText.isEmpty(t)&&(0,od.jsx)(rd.RichText.Content,{tagName:"figcaption",value:t})]})}},L1e=[E1e,D1e],VG=L1e;var{name:FG}=Ls,HG={icon:Gl,edit:DG,save:LG,transforms:MG,variations:RG,deprecated:VG},M1e=()=>E({name:FG,metadata:Ls,settings:HG});var PN={};Z(PN,{init:()=>W1e,metadata:()=>w5,name:()=>eW,settings:()=>T5});var uh=o(P(),1);var JG=o(W(),1);var fo=o(T(),1),Wl=o(P(),1),Gt=o(v(),1),A1e={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:a,textLinkHref:n,textLinkTarget:i,showDownloadButton:l,downloadButtonText:s,displayPreview:c,previewHeight:u}=e,m=fo.RichText.isEmpty(a)?(0,Wl.__)("PDF embed"):(0,Wl.sprintf)((0,Wl.__)("Embed of %s."),a),p=!fo.RichText.isEmpty(a),d=p?r:void 0;return t&&(0,Gt.jsxs)("div",{...fo.useBlockProps.save(),children:[c&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})}),p&&(0,Gt.jsx)("a",{id:d,href:n,target:i,rel:i?"noreferrer noopener":void 0,children:(0,Gt.jsx)(fo.RichText.Content,{value:a})}),l&&(0,Gt.jsx)("a",{href:t,className:w("wp-block-file__button",(0,fo.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":d,children:(0,Gt.jsx)(fo.RichText.Content,{value:s})})]})}},R1e={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:a,textLinkHref:n,textLinkTarget:i,showDownloadButton:l,downloadButtonText:s,displayPreview:c,previewHeight:u}=e,m=fo.RichText.isEmpty(a)?(0,Wl.__)("PDF embed"):(0,Wl.sprintf)((0,Wl.__)("Embed of %s."),a),p=!fo.RichText.isEmpty(a),d=p?r:void 0;return t&&(0,Gt.jsxs)("div",{...fo.useBlockProps.save(),children:[c&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})}),p&&(0,Gt.jsx)("a",{id:d,href:n,target:i,rel:i?"noreferrer noopener":void 0,children:(0,Gt.jsx)(fo.RichText.Content,{value:a})}),l&&(0,Gt.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,"aria-describedby":d,children:(0,Gt.jsx)(fo.RichText.Content,{value:s})})]})}},z1e={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:a,textLinkTarget:n,showDownloadButton:i,downloadButtonText:l,displayPreview:s,previewHeight:c}=e,u=fo.RichText.isEmpty(r)?(0,Wl.__)("PDF embed"):(0,Wl.sprintf)((0,Wl.__)("Embed of %s."),r);return t&&(0,Gt.jsxs)("div",{...fo.useBlockProps.save(),children:[s&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),!fo.RichText.isEmpty(r)&&(0,Gt.jsx)("a",{href:a,target:n,rel:n?"noreferrer noopener":void 0,children:(0,Gt.jsx)(fo.RichText.Content,{value:r})}),i&&(0,Gt.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,children:(0,Gt.jsx)(fo.RichText.Content,{value:l})})]})}},V1e=[A1e,R1e,z1e],OG=V1e;var SN=o(Rr(),1),ch=o(M(),1),sh=o(V(),1),No=o(T(),1),k5=o(U(),1),$G=o(me(),1),$l=o(P(),1);var qG=o(Q(),1),TN=o(xr(),1),ZG=o(mr(),1);var Xo=o(P(),1),Jo=o(M(),1),jG=o(T(),1);var Io=o(v(),1);function UG({hrefs:e,openInNewWindow:t,showDownloadButton:r,changeLinkDestinationOption:a,changeOpenInNewWindow:n,changeShowDownloadButton:i,displayPreview:l,changeDisplayPreview:s,previewHeight:c,changePreviewHeight:u}){let{href:m,textLinkHref:p,attachmentPage:d}=e,f=q(),h=[{value:m,label:(0,Xo.__)("URL")}];return d&&(h=[{value:m,label:(0,Xo.__)("Media file")},{value:d,label:(0,Xo.__)("Attachment page")}]),(0,Io.jsx)(Io.Fragment,{children:(0,Io.jsxs)(jG.InspectorControls,{children:[m.endsWith(".pdf")&&(0,Io.jsxs)(Jo.__experimentalToolsPanel,{label:(0,Xo.__)("PDF settings"),resetAll:()=>{s(!0),u(600)},dropdownMenuProps:f,children:[(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Show inline embed"),isShownByDefault:!0,hasValue:()=>!l,onDeselect:()=>s(!0),children:(0,Io.jsx)(Jo.ToggleControl,{label:(0,Xo.__)("Show inline embed"),help:l?(0,Xo.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!l,onChange:s})}),l&&(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Height in pixels"),isShownByDefault:!0,hasValue:()=>c!==600,onDeselect:()=>u(600),children:(0,Io.jsx)(Jo.RangeControl,{__next40pxDefaultSize:!0,label:(0,Xo.__)("Height in pixels"),min:x5,max:Math.max(CN,c),value:c,onChange:u})})]}),(0,Io.jsxs)(Jo.__experimentalToolsPanel,{label:(0,Xo.__)("Settings"),resetAll:()=>{a(m),n(!1),i(!0)},dropdownMenuProps:f,children:[(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Link to"),isShownByDefault:!0,hasValue:()=>p!==m,onDeselect:()=>a(m),children:(0,Io.jsx)(Jo.SelectControl,{__next40pxDefaultSize:!0,label:(0,Xo.__)("Link to"),value:p,options:h,onChange:a})}),(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>n(!1),children:(0,Io.jsx)(Jo.ToggleControl,{label:(0,Xo.__)("Open in new tab"),checked:t,onChange:n})}),(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Show download button"),isShownByDefault:!0,hasValue:()=>!r,onDeselect:()=>i(!0),children:(0,Io.jsx)(Jo.ToggleControl,{label:(0,Xo.__)("Show download button"),checked:r,onChange:i})})]})]})})}var WG=()=>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)&&!(GG("AcroPDF.PDF")||GG("PDF.PdfCtrl"))),GG=e=>{let t;try{t=new window.ActiveXObject(e)}catch{t=void 0}return t};var Fr=o(v(),1),x5=200,CN=2e3;function F1e({text:e,disabled:t}){let{createNotice:r}=(0,sh.useDispatch)(TN.store),a=(0,$G.useCopyToClipboard)(e,()=>{r("info",(0,$l.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,Fr.jsx)(ch.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:a,disabled:t,children:(0,$l.__)("Copy URL")})}function H1e({attributes:e,isSelected:t,setAttributes:r,clientId:a}){let{id:n,fileName:i,href:l,textLinkHref:s,textLinkTarget:c,showDownloadButton:u,downloadButtonText:m,displayPreview:p,previewHeight:d}=e,[f,h]=(0,k5.useState)(e.blob),{media:g}=(0,sh.useSelect)(I=>({media:n===void 0?void 0:I(qG.store).getEntityRecord("postType","attachment",n)}),[n]),{createErrorNotice:b}=(0,sh.useDispatch)(TN.store),{toggleSelection:y,__unstableMarkNextChangeAsNotPersistent:k}=(0,sh.useDispatch)(No.store);Es({url:f,onChange:_,onError:x}),(0,k5.useEffect)(()=>{No.RichText.isEmpty(m)&&(k(),r({downloadButtonText:(0,$l._x)("Download","button label")}))},[]);function _(I){if(!I||!I.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,SN.isBlobURL)(I.url)){h(I.url);return}let R=(I.mime||I.mime_type)==="application/pdf"||(0,ZG.getFilename)(I.url).toLowerCase().endsWith(".pdf"),$={displayPreview:R?e.displayPreview??!0:void 0,previewHeight:R?e.previewHeight??600:void 0};r({href:I.url,fileName:I.title,textLinkHref:I.url,id:I.id,fileId:`wp-block-file--media-${a}`,blob:void 0,...$}),h()}function x(I){r({href:void 0}),b(I,{type:"snackbar"})}function S(I){r({textLinkHref:I})}function C(I){r({textLinkTarget:I?"_blank":!1})}function N(I){r({showDownloadButton:I})}function B(I){r({displayPreview:I})}function D(I,R,$,j){y(!0);let G=parseInt(d+j.height,10);r({previewHeight:G})}function A(I){let R=Math.max(parseInt(I,10),x5);r({previewHeight:R})}let H=g&&g.link,F=(0,No.useBlockProps)({className:w(!!f&&(0,ch.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":!!f})}),z=WG()&&p;return!l&&!f?(0,Fr.jsx)("div",{...F,children:(0,Fr.jsx)(No.MediaPlaceholder,{icon:(0,Fr.jsx)(No.BlockIcon,{icon:R0}),labels:{title:(0,$l.__)("File"),instructions:(0,$l.__)("Drag and drop a file, upload, or choose from your library.")},onSelect:_,onError:x,accept:"*"})}):(0,Fr.jsxs)(Fr.Fragment,{children:[(0,Fr.jsx)(UG,{hrefs:{href:l||f,textLinkHref:s,attachmentPage:H},openInNewWindow:!!c,showDownloadButton:u,changeLinkDestinationOption:S,changeOpenInNewWindow:C,changeShowDownloadButton:N,displayPreview:p,changeDisplayPreview:B,previewHeight:d,changePreviewHeight:A}),(0,Fr.jsxs)(No.BlockControls,{group:"other",children:[(0,Fr.jsx)(No.MediaReplaceFlow,{mediaId:n,mediaURL:l,accept:"*",onSelect:_,onError:x,onReset:()=>_(void 0)}),(0,Fr.jsx)(F1e,{text:l,disabled:(0,SN.isBlobURL)(l)})]}),(0,Fr.jsxs)("div",{...F,children:[z&&(0,Fr.jsxs)(ch.ResizableBox,{size:{height:d,width:"100%"},minHeight:x5,maxHeight:CN,grid:[1,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>y(!1),onResizeStop:D,showHandle:t,children:[(0,Fr.jsx)("object",{className:"wp-block-file__preview",data:l,type:"application/pdf","aria-label":(0,$l.__)("Embed of the selected PDF file.")}),!t&&(0,Fr.jsx)("div",{className:"wp-block-file__preview-overlay"})]}),(0,Fr.jsxs)("div",{className:"wp-block-file__content-wrapper",children:[(0,Fr.jsx)(No.RichText,{identifier:"fileName",tagName:"a",value:i,placeholder:(0,$l.__)("Write file name\u2026"),withoutInteractiveFormatting:!0,onChange:I=>r({fileName:N1(I)}),href:s}),u&&(0,Fr.jsx)("div",{className:"wp-block-file__button-richtext-wrapper",children:(0,Fr.jsx)(No.RichText,{identifier:"downloadButtonText",tagName:"div","aria-label":(0,$l.__)("Download button text"),className:w("wp-block-file__button",(0,No.__experimentalGetElementClassName)("button")),value:m,withoutInteractiveFormatting:!0,placeholder:(0,$l.__)("Add text\u2026"),onChange:I=>r({downloadButtonText:N1(I)})})})]})]})]})}var KG=H1e;var w5={$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 Jc=o(T(),1),ql=o(v(),1);function QG({attributes:e}){let{href:t,fileId:r,fileName:a,textLinkHref:n,textLinkTarget:i,showDownloadButton:l,downloadButtonText:s,displayPreview:c,previewHeight:u}=e,m=Jc.RichText.isEmpty(a)?"PDF embed":a.toString(),p=!Jc.RichText.isEmpty(a),d=p?r:void 0;return t&&(0,ql.jsxs)("div",{...Jc.useBlockProps.save(),children:[c&&(0,ql.jsx)(ql.Fragment,{children:(0,ql.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})}),p&&(0,ql.jsx)("a",{id:d,href:n,target:i,rel:i?"noreferrer noopener":void 0,children:(0,ql.jsx)(Jc.RichText.Content,{value:a})}),l&&(0,ql.jsx)("a",{href:t,className:w("wp-block-file__button",(0,Jc.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":d,children:(0,ql.jsx)(Jc.RichText.Content,{value:s})})]})}var tv=o(Rr(),1),Zl=o(W(),1),C5=o(V(),1),S5=o(Q(),1),YG=o(mr(),1),j1e={from:[{type:"files",isMatch(e){return e.length>0},priority:15,transform:e=>{let t=[];return e.forEach(r=>{let a=(0,tv.createBlobURL)(r);r.type.startsWith("video/")?t.push((0,Zl.createBlock)("core/video",{blob:(0,tv.createBlobURL)(r)})):r.type.startsWith("image/")?t.push((0,Zl.createBlock)("core/image",{blob:(0,tv.createBlobURL)(r)})):r.type.startsWith("audio/")?t.push((0,Zl.createBlock)("core/audio",{blob:(0,tv.createBlobURL)(r)})):t.push((0,Zl.createBlock)("core/file",{blob:a,fileName:r.name}))}),t}},{type:"block",blocks:["core/audio"],transform:e=>(0,Zl.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>(0,Zl.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>(0,Zl.createBlock)("core/file",{href:e.url,fileName:e.caption||(0,YG.getFilename)(e.url),textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;let{getEntityRecord:t}=(0,C5.select)(S5.store),r=t("postType","attachment",e);return!!r&&r.mime_type.includes("audio")},transform:e=>(0,Zl.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;let{getEntityRecord:t}=(0,C5.select)(S5.store),r=t("postType","attachment",e);return!!r&&r.mime_type.includes("video")},transform:e=>(0,Zl.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;let{getEntityRecord:t}=(0,C5.select)(S5.store),r=t("postType","attachment",e);return!!r&&r.mime_type.includes("image")},transform:e=>(0,Zl.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]},XG=j1e;var{fieldsKey:U1e,formKey:G1e}=K(JG.privateApis),{name:eW}=w5,T5={icon:R0,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,uh._x)("Armstrong_Small_Step","Name of the file")}},transforms:XG,deprecated:OG,edit:KG,save:QG};window.__experimentalContentOnlyInspectorFields&&(T5[U1e]=[{id:"file",label:(0,uh.__)("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,uh.__)("Filename"),type:"text",Edit:"rich-text"},{id:"downloadButtonText",label:(0,uh.__)("Button Text"),type:"text",Edit:"rich-text"}],T5[G1e]={fields:["file","fileName","downloadButtonText"]});var W1e=()=>E({name:eW,metadata:w5,settings:T5});var DN={};Z(DN,{init:()=>Y1e,metadata:()=>I5,name:()=>sW,settings:()=>cW});var lW=o(Yc(),1);var Eo=o(P(),1),Kl=o(T(),1),Ql=o(M(),1),tW=o(V(),1);var BN=o(P(),1),P5=["core/form-submission-notification",{type:"success"},[["core/paragraph",{content:''+(0,BN.__)("Your form has been submitted successfully")+""}]]],B5=["core/form-submission-notification",{type:"error"},[["core/paragraph",{content:''+(0,BN.__)("There was an error submitting your form.")+""}]]];var en=o(v(),1),$1e=[P5,B5,["core/form-input",{type:"text",label:(0,Eo.__)("Name"),required:!0}],["core/form-input",{type:"email",label:(0,Eo.__)("Email"),required:!0}],["core/form-input",{type:"textarea",label:(0,Eo.__)("Comment"),required:!0}],["core/form-submit-button",{}]],q1e=({attributes:e,setAttributes:t,clientId:r})=>{let a=q(),n=()=>{t({submissionMethod:"email",email:void 0,action:void 0,method:"post"})},{action:i,method:l,email:s,submissionMethod:c}=e,u=(0,Kl.useBlockProps)(),{hasInnerBlocks:m}=(0,tW.useSelect)(d=>{let{getBlock:f}=d(Kl.store),h=f(r);return{hasInnerBlocks:!!(h&&h.innerBlocks.length)}},[r]),p=(0,Kl.useInnerBlocksProps)(u,{template:$1e,renderAppender:m?void 0:Kl.InnerBlocks.ButtonBlockAppender});return(0,en.jsxs)(en.Fragment,{children:[(0,en.jsx)(Kl.InspectorControls,{children:(0,en.jsxs)(Ql.__experimentalToolsPanel,{dropdownMenuProps:a,label:(0,Eo.__)("Settings"),resetAll:n,children:[(0,en.jsx)(Ql.__experimentalToolsPanelItem,{hasValue:()=>c!=="email",label:(0,Eo.__)("Submissions method"),onDeselect:()=>t({submissionMethod:"email"}),isShownByDefault:!0,children:(0,en.jsx)(Ql.SelectControl,{__next40pxDefaultSize:!0,label:(0,Eo.__)("Submissions method"),options:[{label:(0,Eo.__)("Send email"),value:"email"},{label:(0,Eo.__)("- Custom -"),value:"custom"}],value:c,onChange:d=>t({submissionMethod:d}),help:c==="custom"?(0,Eo.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'):(0,Eo.__)("Select the method to use for form submissions.")})}),c==="email"&&(0,en.jsx)(Ql.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,Eo.__)("Email for form submissions"),onDeselect:()=>t({email:void 0,action:void 0,method:"post"}),isShownByDefault:!0,children:(0,en.jsx)(Ql.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,Eo.__)("Email for form submissions"),value:s||"",required:!0,onChange:d=>{t({email:d}),t({action:`mailto:${d}`}),t({method:"post"})},help:(0,Eo.__)("The email address where form submissions will be sent. Separate multiple email addresses with a comma."),type:"email"})})]})}),c!=="email"&&(0,en.jsxs)(Kl.InspectorControls,{group:"advanced",children:[(0,en.jsx)(Ql.SelectControl,{__next40pxDefaultSize:!0,label:(0,Eo.__)("Method"),options:[{label:"Get",value:"get"},{label:"Post",value:"post"}],value:l,onChange:d=>t({method:d}),help:(0,Eo.__)("Select the method to use for form submissions.")}),(0,en.jsx)(Ql.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,Eo.__)("Form action"),value:i,onChange:d=>{t({action:d})},help:(0,Eo.__)("The URL where the form should be submitted."),type:"url"})]}),(0,en.jsx)("form",{...p,encType:c==="email"?"text/plain":null})]})},rW=q1e;var I5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form",title:"Form",category:"common",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 N5=o(T(),1),IN=o(v(),1);function oW({attributes:e}){let t=N5.useBlockProps.save(),{submissionMethod:r}=e;return(0,IN.jsx)("form",{...t,encType:r==="email"?"text/plain":null,children:(0,IN.jsx)(N5.InnerBlocks.Content,{})})}var sl=o(P(),1);var K1e=[{name:"comment-form",title:(0,sl.__)("Experimental Comment form"),description:(0,sl.__)("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,sl.__)("Name"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"email",name:"email",label:(0,sl.__)("Email"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"textarea",name:"comment",label:(0,sl.__)("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,sl.__)("Experimental Privacy Request Form"),keywords:["GDPR"],description:(0,sl.__)("A form to request data exports and/or deletion."),attributes:{submissionMethod:"custom",action:"",method:"post",anchor:"gdpr-form"},isDefault:!1,innerBlocks:[P5,B5,["core/paragraph",{content:(0,sl.__)("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,sl.__)("Enter your email address."),required:!0,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"export_personal_data",label:(0,sl.__)("Request data export"),required:!1,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"remove_personal_data",label:(0,sl.__)("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"}],aW=K1e;var js=o(T(),1),NN=o(v(),1),Q1e={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,js.__experimentalGetColorClassesAndStyles)(e),a=(0,js.getTypographyClassesAndStyles)(e),n=(0,js.__experimentalGetSpacingClassesAndStyles)(e),i=js.useBlockProps.save({style:{...r.style,...a.style,...n.style},id:e.anchor});return(0,NN.jsx)("form",{...i,className:"wp-block-form",encType:t==="email"?"text/plain":null,children:(0,NN.jsx)(js.InnerBlocks.Content,{})})}},nW=[Q1e];var E5=o(L(),1),EN=o(v(),1),iW=(0,EN.jsx)(E5.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EN.jsx)(E5.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:sW}=I5,cW={icon:iW,edit:rW,save:oW,deprecated:nW,variations:aW,example:{}},Y1e=()=>{let e=["core/form"];return(0,lW.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/preventInsertingFormIntoAnotherForm",(t,r,a,{getBlock:n,getBlockParentsByBlockName:i})=>{if(r.name!=="core/form")return t;for(let l of e)if(n(a)?.name===l||i(a,l).length)return!1;return!0}),E({name:sW,metadata:I5,settings:cW})};var MN={};Z(MN,{init:()=>cve,metadata:()=>L5,name:()=>CW,settings:()=>SW});var dW=o(rv(),1),Yl=o(T(),1),fW=o(ai(),1),vi=o(v(),1),hW=e=>(0,dW.default)((0,fW.__unstableStripHTML)(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),rve={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:a,inlineLabel:n,required:i,placeholder:l,value:s}=e,c=(0,Yl.__experimentalGetBorderClassesAndStyles)(e),u=(0,Yl.__experimentalGetColorClassesAndStyles)(e),m={...c.style,...u.style},p=w("wp-block-form-input__input",u.className,c.className),d=t==="textarea"?"textarea":"input",f=Yl.useBlockProps.save();return t==="hidden"?(0,vi.jsx)("input",{type:t,name:r,value:s}):(0,vi.jsx)("div",{...f,children:(0,vi.jsxs)("label",{className:w("wp-block-form-input__label",{"is-label-inline":n}),children:[(0,vi.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,vi.jsx)(Yl.RichText.Content,{value:a})}),(0,vi.jsx)(d,{className:p,type:t==="textarea"?void 0:t,name:r||hW(a),required:i,"aria-required":i,placeholder:l||void 0,style:m})]})})}},ove={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:a,inlineLabel:n,required:i,placeholder:l,value:s}=e,c=(0,Yl.__experimentalGetBorderClassesAndStyles)(e),u=(0,Yl.__experimentalGetColorClassesAndStyles)(e),m={...c.style,...u.style},p=w("wp-block-form-input__input",u.className,c.className),d=t==="textarea"?"textarea":"input";return t==="hidden"?(0,vi.jsx)("input",{type:t,name:r,value:s}):(0,vi.jsxs)("label",{className:w("wp-block-form-input__label",{"is-label-inline":n}),children:[(0,vi.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,vi.jsx)(Yl.RichText.Content,{value:a})}),(0,vi.jsx)(d,{className:p,type:t==="textarea"?void 0:t,name:r||hW(a),required:i,"aria-required":i,placeholder:l||void 0,style:m})]})}},ave=[rve,ove],gW=ave;var An=o(P(),1),Xl=o(T(),1),Us=o(M(),1),vW=o(U(),1);var Yr=o(v(),1);function nve({attributes:e,setAttributes:t,className:r}){let{type:a,name:n,label:i,inlineLabel:l,required:s,placeholder:c,value:u}=e,m=(0,Xl.useBlockProps)(),p=q(),d=(0,vW.useRef)(),f=a==="textarea"?"textarea":"input",h=(0,Xl.__experimentalUseBorderProps)(e),g=(0,Xl.__experimentalUseColorProps)(e);d.current&&d.current.focus();let b=a==="checkbox"||a==="radio",y=(0,Yr.jsxs)(Yr.Fragment,{children:[a!=="hidden"&&(0,Yr.jsx)(Xl.InspectorControls,{children:(0,Yr.jsxs)(Us.__experimentalToolsPanel,{label:(0,An.__)("Settings"),resetAll:()=>{t({inlineLabel:!1,required:!1})},dropdownMenuProps:p,children:[a!=="checkbox"&&(0,Yr.jsx)(Us.__experimentalToolsPanelItem,{label:(0,An.__)("Inline label"),hasValue:()=>!!l,onDeselect:()=>t({inlineLabel:!1}),isShownByDefault:!0,children:(0,Yr.jsx)(Us.CheckboxControl,{label:(0,An.__)("Inline label"),checked:l,onChange:_=>{t({inlineLabel:_})}})}),(0,Yr.jsx)(Us.__experimentalToolsPanelItem,{label:(0,An.__)("Required"),hasValue:()=>!!s,onDeselect:()=>t({required:!1}),isShownByDefault:!0,children:(0,Yr.jsx)(Us.CheckboxControl,{label:(0,An.__)("Required"),checked:s,onChange:_=>{t({required:_})}})})]})}),(0,Yr.jsx)(Xl.InspectorControls,{group:"advanced",children:(0,Yr.jsx)(Us.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,An.__)("Name"),value:n,onChange:_=>{t({name:_})},help:(0,An.__)('Affects the "name" attribute of the input element, and is used as a name for the form submission results.')})})]}),k=(0,Yr.jsx)(Xl.RichText,{tagName:"span",className:"wp-block-form-input__label-content",value:i,onChange:_=>t({label:_}),"aria-label":i?(0,An.__)("Label"):(0,An.__)("Empty label"),"data-empty":!i,placeholder:(0,An.__)("Type the label for this input")});return a==="hidden"?(0,Yr.jsxs)(Yr.Fragment,{children:[y,(0,Yr.jsx)("input",{type:"hidden",className:w(r,"wp-block-form-input__input",g.className,h.className),"aria-label":(0,An.__)("Value"),value:u,onChange:_=>t({value:_.target.value})})]}):(0,Yr.jsxs)("div",{...m,children:[y,(0,Yr.jsxs)("span",{className:w("wp-block-form-input__label",{"is-label-inline":l||a==="checkbox"}),children:[!b&&k,(0,Yr.jsx)(f,{type:a==="textarea"?void 0:a,className:w(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:_=>t({placeholder:_.target.value}),"aria-required":s,style:{...h.style,...g.style}}),b&&k]})]})}var bW=nve;var L5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-input",title:"Input Field",category:"common",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 yW=o(rv(),1),eu=o(T(),1),_W=o(ai(),1),Gs=o(v(),1),lve=e=>(0,yW.default)((0,_W.__unstableStripHTML)(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"");function xW({attributes:e}){let{type:t,name:r,label:a,inlineLabel:n,required:i,placeholder:l,value:s}=e,c=(0,eu.__experimentalGetBorderClassesAndStyles)(e),u=(0,eu.__experimentalGetColorClassesAndStyles)(e),m={...c.style,...u.style},p=w("wp-block-form-input__input",u.className,c.className),d=t==="textarea"?"textarea":"input",f=eu.useBlockProps.save(),h=t==="checkbox"||t==="radio";return t==="hidden"?(0,Gs.jsx)("input",{type:t,name:r,value:s}):(0,Gs.jsx)("div",{...f,children:(0,Gs.jsxs)("label",{className:w("wp-block-form-input__label",{"is-label-inline":n}),children:[!h&&(0,Gs.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Gs.jsx)(eu.RichText.Content,{value:a})}),(0,Gs.jsx)(d,{className:p,type:t==="textarea"?void 0:t,name:r||lve(a),required:i,"aria-required":i,placeholder:l||void 0,style:m}),h&&(0,Gs.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Gs.jsx)(eu.RichText.Content,{value:a})})]})})}var tn=o(P(),1),sve=[{name:"text",title:(0,tn.__)("Text Input"),description:(0,tn.__)("A generic text input."),attributes:{type:"text"},isDefault:!0,scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="text"},{name:"textarea",title:(0,tn.__)("Textarea Input"),description:(0,tn.__)("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,tn.__)("Checkbox Input"),description:(0,tn.__)("A simple checkbox input."),attributes:{type:"checkbox",inlineLabel:!0},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="checkbox"},{name:"email",title:(0,tn.__)("Email Input"),description:(0,tn.__)("Used for email addresses."),attributes:{type:"email"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="email"},{name:"url",title:(0,tn.__)("URL Input"),description:(0,tn.__)("Used for URLs."),attributes:{type:"url"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="url"},{name:"tel",title:(0,tn.__)("Telephone Input"),description:(0,tn.__)("Used for phone numbers."),attributes:{type:"tel"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="tel"},{name:"number",title:(0,tn.__)("Number Input"),description:(0,tn.__)("A numeric input."),attributes:{type:"number"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="number"}],kW=sve;var M5=o(L(),1),LN=o(v(),1),wW=(0,LN.jsx)(M5.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LN.jsx)(M5.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:CW}=L5,SW={icon:wW,deprecated:gW,edit:bW,save:xW,variations:kW,example:{}},cve=()=>E({name:CW,metadata:L5,settings:SW});var RN={};Z(RN,{init:()=>dve,metadata:()=>R5,name:()=>NW,settings:()=>EW});var TW=o(P(),1),A5=o(T(),1),PW=o(v(),1),uve=[["core/buttons",{},[["core/button",{text:(0,TW.__)("Submit"),tagName:"button",type:"submit"}]]]],mve=()=>{let e=(0,A5.useBlockProps)(),t=(0,A5.useInnerBlocksProps)(e,{template:uve,templateLock:"all"});return(0,PW.jsx)("div",{className:"wp-block-form-submit-wrapper",...t})},BW=mve;var R5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submit-button",title:"Form Submit Button",category:"common",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 z5=o(T(),1),AN=o(v(),1);function IW(){let e=z5.useBlockProps.save();return(0,AN.jsx)("div",{className:"wp-block-form-submit-wrapper",...e,children:(0,AN.jsx)(z5.InnerBlocks.Content,{})})}var{name:NW}=R5,EW={edit:BW,save:IW,example:{}},dve=()=>E({name:NW,metadata:R5,settings:EW});var zN={};Z(zN,{init:()=>bve,metadata:()=>F5,name:()=>VW,settings:()=>FW});var V5=o(P(),1),dm=o(T(),1),DW=o(V(),1);var LW=o(v(),1),fve=[["core/paragraph",{content:(0,V5.__)("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.")}]],hve=({attributes:e,clientId:t})=>{let{type:r}=e,a=(0,dm.useBlockProps)({className:w("wp-block-form-submission-notification",{[`form-notification-type-${r}`]:r})}),{hasInnerBlocks:n}=(0,DW.useSelect)(l=>{let{getBlock:s}=l(dm.store),c=s(t);return{hasInnerBlocks:!!(c&&c.innerBlocks.length)}},[t]),i=(0,dm.useInnerBlocksProps)(a,{template:fve,renderAppender:n?void 0:dm.InnerBlocks.ButtonBlockAppender});return(0,LW.jsx)("div",{...i,"data-message-success":(0,V5.__)("Submission success notification"),"data-message-error":(0,V5.__)("Submission error notification")})},MW=hve;var F5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submission-notification",title:"Form Submission Notification",category:"common",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 H5=o(T(),1);var AW=o(v(),1);function RW({attributes:e}){let{type:t}=e;return(0,AW.jsx)("div",{...H5.useInnerBlocksProps.save(H5.useBlockProps.save({className:w("wp-block-form-submission-notification",{[`form-notification-type-${t}`]:t})}))})}var ad=o(P(),1),vve=[{name:"form-submission-success",title:(0,ad.__)("Form Submission Success"),description:(0,ad.__)("Success message for form submissions."),attributes:{type:"success"},isDefault:!0,innerBlocks:[["core/paragraph",{content:(0,ad.__)("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,ad.__)("Form Submission Error"),description:(0,ad.__)("Error/failure message for form submissions."),attributes:{type:"error"},isDefault:!1,innerBlocks:[["core/paragraph",{content:(0,ad.__)("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"}],zW=vve;var{name:VW}=F5,FW={icon:wp,edit:MW,save:RW,variations:zW,example:{}},bve=()=>E({name:VW,metadata:F5,settings:FW});var ZN={};Z(ZN,{init:()=>Fve,metadata:()=>j5,name:()=>b$,settings:()=>y$});var Ir=o(T(),1),jW=o(W(),1);var Ws="none",$s="media",ov="lightbox",qs="attachment",HW="file",OW="post",av="large";var Fe=o(v(),1),UW="file",GW="post";function mh(e){return Math.min(3,e?.images?.length)}function yve(e,t){switch(t){case UW:return{href:e?.source_url||e?.url,linkDestination:$s};case GW:return{href:e?.link,linkDestination:qs};case $s:return{href:e?.source_url||e?.url,linkDestination:$s};case qs:return{href:e?.link,linkDestination:qs};case Ws:return{href:void 0,linkDestination:Ws}}return{}}function ph(e){let t=e.linkTo?e.linkTo:"none";t==="post"?t="attachment":t==="file"&&(t="media");let r=e.images.map(l=>_ve(l,e.sizeSlug,t)),{images:a,ids:n,...i}=e;return[{...i,linkTo:t,allowResize:!1},r]}function _ve(e,t,r){return(0,jW.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...yve(e,r)})}var xve={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:a}=e,n=w("has-nested-images",{[`columns-${r}`]:r!==void 0,"columns-default":r===void 0,"is-cropped":a}),i=Ir.useBlockProps.save({className:n}),l=Ir.useInnerBlocksProps.save(i);return(0,Fe.jsxs)("figure",{...l,children:[l.children,!Ir.RichText.isEmpty(t)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:t})]})}},kve={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=mh(e),imageCrop:a,caption:n,linkTo:i}=e,l=`columns-${r} ${a?"is-cropped":""}`;return(0,Fe.jsxs)("figure",{...Ir.useBlockProps.save({className:l}),children:[(0,Fe.jsx)("ul",{className:"blocks-gallery-grid",children:t.map(s=>{let c;switch(i){case UW:c=s.fullUrl||s.url;break;case GW:c=s.link;break}let u=(0,Fe.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,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[c?(0,Fe.jsx)("a",{href:c,children:u}):u,!Ir.RichText.isEmpty(s.caption)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:s.caption})]})},s.id||s.url)})}),!Ir.RichText.isEmpty(n)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:n})]})},migrate(e){return ph(e)}},wve={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 ph(e)},save({attributes:e}){let{images:t,columns:r=mh(e),imageCrop:a,caption:n,linkTo:i}=e;return(0,Fe.jsxs)("figure",{className:`columns-${r} ${a?"is-cropped":""}`,children:[(0,Fe.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,Fe.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,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[s?(0,Fe.jsx)("a",{href:s,children:c}):c,!Ir.RichText.isEmpty(l.caption)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:l.caption})]})},l.id||l.url)})}),!Ir.RichText.isEmpty(n)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:n})]})}},Cve={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 ph(e)},save({attributes:e}){let{images:t,columns:r=mh(e),imageCrop:a,caption:n,linkTo:i}=e;return(0,Fe.jsxs)("figure",{className:`columns-${r} ${a?"is-cropped":""}`,children:[(0,Fe.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,Fe.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,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[s?(0,Fe.jsx)("a",{href:s,children:c}):c,!Ir.RichText.isEmpty(l.caption)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:l.caption})]})},l.id||l.url)})}),!Ir.RichText.isEmpty(n)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:n})]})}},Sve={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=mh(e),imageCrop:a,linkTo:n}=e;return(0,Fe.jsx)("ul",{className:`columns-${r} ${a?"is-cropped":""}`,children:t.map(i=>{let l;switch(n){case"media":l=i.fullUrl||i.url;break;case"attachment":l=i.link;break}let s=(0,Fe.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,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[l?(0,Fe.jsx)("a",{href:l,children:s}):s,i.caption&&i.caption.length>0&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",value:i.caption})]})},i.id||i.url)})})},migrate(e){return ph(e)}},Tve={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,a)=>!r&&t[a]!==null?!0:parseInt(r,10)!==t[a]))},migrate(e){return ph(e)},supports:{align:!0},save({attributes:e}){let{images:t,columns:r=mh(e),imageCrop:a,linkTo:n}=e;return(0,Fe.jsx)("ul",{className:`columns-${r} ${a?"is-cropped":""}`,children:t.map(i=>{let l;switch(n){case"media":l=i.url;break;case"attachment":l=i.link;break}let s=(0,Fe.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,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[l?(0,Fe.jsx)("a",{href:l,children:s}):s,i.caption&&i.caption.length>0&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",value:i.caption})]})},i.id||i.url)})})}},Pve={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=mh(e),align:a,imageCrop:n,linkTo:i}=e,l=w(`columns-${r}`,{alignnone:a==="none","is-cropped":n});return(0,Fe.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,Fe.jsx)("img",{src:s.url,alt:s.alt,"data-id":s.id});return(0,Fe.jsx)("figure",{className:"blocks-gallery-image",children:c?(0,Fe.jsx)("a",{href:c,children:u}):u},s.id||s.url)})})},migrate(e){return ph(e)}},WW=[xve,kve,wve,Cve,Sve,Tve,Pve];var Ke=o(M(),1),Do=o(T(),1),ea=o(U(),1),he=o(P(),1),sv=o(V(),1),m$=o(L(),1),p$=o(W(),1),$N=o(Rr(),1),d$=o(xr(),1);var $W=o(T(),1);var qW=o(v(),1),ZW=(0,qW.jsx)($W.BlockIcon,{icon:j0});function VN(e){return e?Math.min(3,e):3}var KW=(e,t="large")=>{let r=Object.fromEntries(Object.entries(e??{}).filter(([n])=>["alt","id","link"].includes(n)));r.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url||e?.source_url;let a=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return a&&(r.fullUrl=a),r};var Zs=20,nd="none",dh="media",fh="attachment",FN="custom",QW=["noreferrer","noopener"],tu=["image"];var HN=["flex","grid"],nv="full";function ON(e,t,r,a,n){switch(r||t){case HW:case $s:return{href:e?.source_url||e?.url,linkDestination:dh,lightbox:n?.enabled?{...a?.lightbox,enabled:!1}:void 0};case OW:case qs:return{href:e?.link,linkDestination:fh,lightbox:n?.enabled?{...a?.lightbox,enabled:!1}:void 0};case ov:return{href:void 0,lightbox:n?.enabled?void 0:{...a?.lightbox,enabled:!0},linkDestination:nd};case Ws:return{href:void 0,linkDestination:nd,lightbox:void 0}}return{}}function YW(e){let[t,r=1]=e.split("/").map(Number),a=t/r;return a===1/0||a===0?NaN:a}function Bve(e){let t=e;return e!==void 0&&t&&(QW.forEach(r=>{let a=new RegExp("\\b"+r+"\\b","gi");t=t.replace(a,"")}),t!==e&&(t=t.trim()),t||(t=void 0)),t}function jN(e,{rel:t}){let r=e?"_blank":void 0,a;return!r&&!t?a=void 0:a=Bve(t),{linkTarget:r,rel:a}}function XW(e,t){let r=e?.media_details?.sizes?.[t]?.source_url;return r?{url:r,width:void 0,height:void 0,sizeSlug:t}:{}}function UN(e){return tu.some(t=>e.type.indexOf(t)===0)}function iv({x:e,y:t}={x:.5,y:.5}){return`${Math.round(e*100)}% ${Math.round(t*100)}%`}var GN=o(P(),1),JW=o(L(),1);var lv=o(v(),1);function e$(e){let{attributes:t,isSelected:r,setAttributes:a,mediaPlaceholder:n,insertBlocksAfter:i,blockProps:l,__unstableLayoutClassNames:s,isContentLocked:c,multiGallerySelection:u}=e,{align:m,columns:p,imageCrop:d}=t;return(0,lv.jsxs)("figure",{...l,className:w(l.className,s,"blocks-gallery-grid",{[`align${m}`]:m,[`columns-${p}`]:p!==void 0,"columns-default":p===void 0,"is-cropped":d}),children:[l.children,r&&!l.children&&(0,lv.jsx)(JW.View,{className:"blocks-gallery-media-placeholder-wrapper",children:n}),(0,lv.jsx)(_a,{attributes:t,setAttributes:a,isSelected:r,insertBlocksAfter:i,showToolbarButton:!u&&!c,className:"blocks-gallery-caption",label:(0,GN.__)("Gallery caption text"),placeholder:(0,GN.__)("Add gallery caption")})]})}var t$=o(U(),1);function r$(e,t,r){return(0,t$.useMemo)(()=>a(),[e,t]);function a(){if(!e||e.length===0)return;let{imageSizes:n}=r(),i={};t&&(i=e.reduce((s,c)=>{if(!c.id)return s;let u=n.reduce((m,p)=>{let d=c.sizes?.[p.slug]?.url,f=c.media_details?.sizes?.[p.slug]?.source_url;return{...m,[p.slug]:d||f}},{});return{...s,[parseInt(c.id,10)]:u}},{}));let l=Object.values(i);return n.filter(({slug:s})=>l.some(c=>c[s])).map(({name:s,slug:c})=>({value:c,label:s}))}}var O5=o(U(),1);function o$(e,t){let[r,a]=(0,O5.useState)([]);return(0,O5.useMemo)(()=>n(),[e,t]);function n(){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)&&a([...l,...s]),s.length>0?s:null}}var n$=o(V(),1),i$=o(Q(),1),a$=[];function l$(e){return(0,n$.useSelect)(t=>{let r=e.map(a=>a.attributes.id).filter(a=>a!==void 0);return r.length===0?a$:t(i$.store).getEntityRecords("postType","attachment",{include:r.join(","),per_page:-1,orderby:"include"})??a$},[e])}var id=o(T(),1);function s$({blockGap:e,clientId:t}){let r="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )",a=r,n=r,i;e&&(i=typeof e=="string"?(0,id.__experimentalGetGapCSSValue)(e):(0,id.__experimentalGetGapCSSValue)(e?.top)||r,n=typeof e=="string"?(0,id.__experimentalGetGapCSSValue)(e):(0,id.__experimentalGetGapCSSValue)(e?.left)||r,a=i===n?i:`${i} ${n}`);let l=`#block-${t} {
--wp--style--unstable-gallery-gap: ${n==="0"?"0px":n};
gap: ${a}
}`;return(0,id.useStyleOverride)({css:l}),null}var He=o(v(),1),c$=8,u$=[{icon:L0,label:(0,he.__)("Link images to attachment pages"),value:qs,noticeText:(0,he.__)("Attachment Pages")},{icon:Wu,label:(0,he.__)("Link images to media files"),value:$s,noticeText:(0,he.__)("Media Files")},{icon:kp,label:(0,he.__)("Enlarge on click"),value:ov,noticeText:(0,he.__)("Lightbox effect"),infoText:(0,he.__)("Scale images with a lightbox effect")},{icon:U0,label:(0,he._x)("None","Media item link option"),value:Ws,noticeText:(0,he.__)("None")}],Ive=[{label:(0,he.__)("Icon"),value:"icon"},{label:(0,he.__)("Text"),value:"text"},{label:(0,he.__)("Both"),value:"both"}],WN=["image"],Nve=ea.Platform.isNative?(0,he.__)("Add media"):(0,he.__)("Drag and drop images, upload, or choose from your library."),Eve=ea.Platform.isNative?{type:"stepper"}:{},Dve={name:"core/image"},Lve=[];function f$(e){let{setAttributes:t,attributes:r,className:a,clientId:n,isSelected:i,insertBlocksAfter:l,isContentLocked:s,onFocus:c}=e,[u,m,p,d]=(0,Do.useSettings)("blocks.core/image.lightbox","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.allowEditing?u$:u$.filter(Y=>Y.value!==ov),{navigationButtonType:h,columns:g,imageCrop:b,randomOrder:y,linkTarget:k,linkTo:_,sizeSlug:x,aspectRatio:S}=r,{__unstableMarkNextChangeAsNotPersistent:C,replaceInnerBlocks:N,updateBlockAttributes:B,selectBlock:D}=(0,sv.useDispatch)(Do.store),{createSuccessNotice:A,createErrorNotice:H}=(0,sv.useDispatch)(d$.store),{getBlock:F,getSettings:z,innerBlockImages:I,blockWasJustInserted:R,multiGallerySelection:$}=(0,sv.useSelect)(Y=>{let{getBlockName:ze,getMultiSelectedBlockClientIds:Me,getSettings:Xe,getBlock:Te,wasBlockJustInserted:Bt}=Y(Do.store),yr=Me();return{getBlock:Te,getSettings:Xe,innerBlockImages:Te(n)?.innerBlocks??Lve,blockWasJustInserted:Bt(n,"inserter_menu"),multiGallerySelection:yr.length&&yr.every(xn=>ze(xn)==="core/gallery")}},[n]),j=(0,ea.useMemo)(()=>I?.map(Y=>({clientId:Y.clientId,id:Y.attributes.id,url:Y.attributes.url,attributes:Y.attributes,fromSavedContent:!!Y.originalContent})),[I]),G=l$(I),O=o$(j,G),J=u?.enabled?j.filter(Y=>Y.attributes?.lightbox?.enabled===void 0||Y.attributes?.lightbox?.enabled===!0).length>0:j.filter(Y=>Y.attributes.lightbox?.enabled).length>0,ee=p?.map(({name:Y,ratio:ze})=>({label:Y,value:ze})),oe=m?.map(({name:Y,ratio:ze})=>({label:Y,value:ze})),X=[{label:(0,he._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?oe||[]:[],...ee||[]];(0,ea.useEffect)(()=>{O?.forEach(Y=>{C(),B(Y.clientId,{...ne(Y.attributes),id:Y.id,align:void 0})})},[O]);let te=r$(G,i,z);function ne(Y){let ze=Y.id?G.find(({id:Te})=>Te===Y.id):null,Me;Y.className&&Y.className!==""&&(Me=Y.className);let Xe;return Y.linkTarget||Y.rel?Xe={linkTarget:Y.linkTarget,rel:Y.rel}:Xe=jN(k,r),{...KW(ze,x),...ON(ze,_,Y?.linkDestination),...Xe,className:Me,sizeSlug:x,caption:Y.caption.length>0?Y.caption:ze.caption?.raw,alt:Y.alt||ze.alt_text,aspectRatio:S==="auto"?void 0:S}}function le(Y){let ze=ea.Platform.isNative&&Y.id?G.find(({id:Xe})=>Xe===Y.id):null,Me=ze?ze?.media_type:Y.type;return WN.some(Xe=>Me?.indexOf(Xe)===0)||Y.blob}function pe(Y){let ze=Object.prototype.toString.call(Y)==="[object FileList]",Me=ze?Array.from(Y).map(Je=>Je.url?Je:{blob:(0,$N.createBlobURL)(Je)}):Y;Me.every(le)||H((0,he.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});let Xe=Me.filter(Je=>Je.url||le(Je)).map(Je=>Je.url?Je:{blob:Je.blob||(0,$N.createBlobURL)(Je)}),Te=Xe.reduce((Je,$r,ip)=>(Je[$r.id]=ip,Je),{}),Bt=ze?I:I.filter(Je=>Xe.find($r=>$r.id===Je.attributes.id)),xn=Xe.filter(Je=>!Bt.find($r=>Je.id===$r.attributes.id)).map(Je=>(0,p$.createBlock)("core/image",{id:Je.id,blob:Je.blob,url:Je.url,caption:Je.caption,alt:Je.alt}));N(n,Bt.concat(xn).sort((Je,$r)=>Te[Je.attributes.id]-Te[$r.attributes.id])),xn?.length>0&&D(xn[0].clientId)}function Ie(Y){H(Y,{type:"snackbar"})}function Ne(Y){t({linkTo:Y});let ze={},Me=[];F(n).innerBlocks.forEach(Te=>{Me.push(Te.clientId);let Bt=Te.attributes.id?G.find(({id:yr})=>yr===Te.attributes.id):null;ze[Te.clientId]=ON(Bt,Y,!1,Te.attributes,u)}),B(Me,ze,{uniqueByBlock:!0});let Xe=[...f].find(Te=>Te.value===Y);A((0,he.sprintf)((0,he.__)("All gallery image links updated to: %s"),Xe.noticeText),{id:"gallery-attributes-linkTo",type:"snackbar"})}function ae(Y){t({columns:Y})}function Re(){t({imageCrop:!b})}function Ee(){t({randomOrder:!y})}function ie(Y){let ze=Y?"_blank":void 0;t({linkTarget:ze});let Me={},Xe=[];F(n).innerBlocks.forEach(Bt=>{Xe.push(Bt.clientId),Me[Bt.clientId]=jN(ze,Bt.attributes)}),B(Xe,Me,{uniqueByBlock:!0});let Te=Y?(0,he.__)("All gallery images updated to open in new tab"):(0,he.__)("All gallery images updated to not open in new tab");A(Te,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}function fe(Y){t({sizeSlug:Y});let ze={},Me=[];F(n).innerBlocks.forEach(Te=>{Me.push(Te.clientId);let Bt=Te.attributes.id?G.find(({id:yr})=>yr===Te.attributes.id):null;ze[Te.clientId]=XW(Bt,Y)}),B(Me,ze,{uniqueByBlock:!0});let Xe=te.find(Te=>Te.value===Y);A((0,he.sprintf)((0,he.__)("All gallery image sizes updated to: %s"),Xe?.label??Y),{id:"gallery-attributes-sizeSlug",type:"snackbar"})}function ke(Y){t({aspectRatio:Y});let ze={},Me=[];F(n).innerBlocks.forEach(Te=>{Me.push(Te.clientId),ze[Te.clientId]={aspectRatio:Y==="auto"?void 0:Y}}),B(Me,ze,!0);let Xe=X.find(Te=>Te.value===Y);A((0,he.sprintf)((0,he.__)("All gallery images updated to aspect ratio: %s"),Xe?.label||Y),{id:"gallery-attributes-aspectRatio",type:"snackbar"})}(0,ea.useEffect)(()=>{_||(C(),t({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||Ws}))},[_]);let je=!!j.length,de=je&&j.some(Y=>!!Y.id),ct=j.some(Y=>ea.Platform.isNative?Y.url?.indexOf("file:")===0:!Y.id&&Y.url?.indexOf("blob:")===0),at=ea.Platform.select({web:{addToGallery:!1,disableMediaButtons:ct,value:{}},native:{addToGallery:de,isAppender:je,disableMediaButtons:je&&!i||ct,value:de?j:{},autoOpenMediaUpload:!je&&i&&R,onFocus:c}}),kt=(0,He.jsx)(Do.MediaPlaceholder,{handleUpload:!1,icon:ZW,labels:{title:(0,he.__)("Gallery"),instructions:Nve},onSelect:pe,allowedTypes:WN,multiple:!0,onError:Ie,...at}),Wr=(0,Do.useBlockProps)({className:w(a,"has-nested-images")}),ut=ea.Platform.isNative&&{marginHorizontal:0,marginVertical:0},br=(0,Do.useInnerBlocksProps)(Wr,{defaultBlock:Dve,directInsert:!0,orientation:"horizontal",renderAppender:!1,...ut}),mt=q();if(!je)return(0,He.jsxs)(m$.View,{...br,children:[br.children,kt]});let wo=_&&_!=="none";return(0,He.jsxs)(He.Fragment,{children:[(0,He.jsxs)(Do.InspectorControls,{children:[ea.Platform.isWeb&&(0,He.jsxs)(Ke.__experimentalToolsPanel,{label:(0,he.__)("Settings"),resetAll:()=>{t({navigationButtonType:"icon",columns:void 0,imageCrop:!0,randomOrder:!1}),ke("auto"),x!==av&&fe(av),k&&ie(!1)},dropdownMenuProps:mt,children:[j.length>1&&(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Columns"),hasValue:()=>!!g&&g!==j.length,onDeselect:()=>ae(void 0),children:(0,He.jsx)(Ke.RangeControl,{label:(0,he.__)("Columns"),value:g||VN(j.length),onChange:ae,min:1,max:Math.min(c$,j.length),required:!0,__next40pxDefaultSize:!0})}),te?.length>0&&(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Resolution"),hasValue:()=>x!==av,onDeselect:()=>fe(av),children:(0,He.jsx)(Ke.SelectControl,{label:(0,he.__)("Resolution"),help:(0,he.__)("Select the size of the source images."),value:x,options:te,onChange:fe,hideCancelButton:!0,size:"__unstable-large"})}),(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Crop images to fit"),hasValue:()=>!b,onDeselect:()=>t({imageCrop:!0}),children:(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Crop images to fit"),checked:!!b,onChange:Re})}),(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Randomize order"),hasValue:()=>!!y,onDeselect:()=>t({randomOrder:!1}),children:(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Randomize order"),checked:!!y,onChange:Ee})}),wo&&(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Open images in new tab"),hasValue:()=>!!k,onDeselect:()=>ie(!1),children:(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Open images in new tab"),checked:k==="_blank",onChange:ie})}),X.length>1&&(0,He.jsx)(Ke.__experimentalToolsPanelItem,{hasValue:()=>!!S&&S!=="auto",label:(0,he.__)("Aspect ratio"),onDeselect:()=>ke("auto"),isShownByDefault:!0,children:(0,He.jsx)(Ke.SelectControl,{__next40pxDefaultSize:!0,label:(0,he.__)("Aspect ratio"),help:(0,he.__)("Set a consistent aspect ratio for all images in the gallery."),value:S,options:X,onChange:ke})}),(0,He.jsx)(Ke.__experimentalToolsPanelItem,{label:(0,he.__)("Navigation button type"),isShownByDefault:!0,hasValue:()=>h!=="icon",onDeselect:()=>t({navigationButtonType:"icon"}),children:J&&(0,He.jsx)(Ke.__experimentalToggleGroupControl,{label:(0,he.__)("Navigation button type"),value:h,onChange:Y=>t({navigationButtonType:Y}),isBlock:!0,__next40pxDefaultSize:!0,help:(0,he.__)("Adjust the appearance of buttons in the lightbox."),children:Ive.map(Y=>(0,He.jsx)(Ke.__experimentalToggleGroupControlOption,{value:Y.value,label:Y.label},Y.value))})})]}),ea.Platform.isNative&&(0,He.jsxs)(Ke.PanelBody,{title:(0,he.__)("Settings"),children:[j.length>1&&(0,He.jsx)(Ke.RangeControl,{label:(0,he.__)("Columns"),value:g||VN(j.length),onChange:ae,min:1,max:Math.min(c$,j.length),...Eve,required:!0,__next40pxDefaultSize:!0}),te?.length>0&&(0,He.jsx)(Ke.SelectControl,{label:(0,he.__)("Resolution"),help:(0,he.__)("Select the size of the source images."),value:x,options:te,onChange:fe,hideCancelButton:!0,size:"__unstable-large"}),(0,He.jsx)(Ke.SelectControl,{label:(0,he.__)("Link"),value:_,onChange:Ne,options:f,hideCancelButton:!0,size:"__unstable-large"}),(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Crop images to fit"),checked:!!b,onChange:Re}),(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Randomize order"),checked:!!y,onChange:Ee}),wo&&(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Open images in new tab"),checked:k==="_blank",onChange:ie}),X.length>1&&(0,He.jsx)(Ke.SelectControl,{label:(0,he.__)("Aspect Ratio"),help:(0,he.__)("Set a consistent aspect ratio for all images in the gallery."),value:S,options:X,onChange:ke,hideCancelButton:!0,size:"__unstable-large"})]})]}),ea.Platform.isWeb?(0,He.jsx)(Do.BlockControls,{group:"block",children:(0,He.jsx)(Ke.ToolbarDropdownMenu,{icon:ii,label:(0,he.__)("Link"),children:({onClose:Y})=>(0,He.jsx)(Ke.MenuGroup,{children:f.map(ze=>{let Me=_===ze.value;return(0,He.jsx)(Ke.MenuItem,{isSelected:Me,className:w("components-dropdown-menu__menu-item",{"is-active":Me}),iconPosition:"left",icon:ze.icon,onClick:()=>{Ne(ze.value),Y()},role:"menuitemradio",info:ze.infoText,children:ze.label},ze.value)})})})}):null,ea.Platform.isWeb&&(0,He.jsxs)(He.Fragment,{children:[!$&&(0,He.jsx)(Do.BlockControls,{group:"other",children:(0,He.jsx)(Do.MediaReplaceFlow,{allowedTypes:WN,handleUpload:!1,onSelect:pe,name:(0,he.__)("Add"),multiple:!0,mediaIds:j.filter(Y=>Y.id).map(Y=>Y.id),addToGallery:de,variant:"toolbar"})}),(0,He.jsx)(s$,{blockGap:r.style?.spacing?.blockGap,clientId:n})]}),(0,He.jsx)(e$,{...e,isContentLocked:s,images:j,mediaPlaceholder:!je||ea.Platform.isNative?kt:void 0,blockProps:br,insertBlocksAfter:l,multiGallerySelection:$})]})}var j5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/gallery",title:"Gallery",category:"media",usesContext:["galleryId"],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:[]},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:["horizontal","vertical"],__experimentalSkipSerialization:["blockGap"],__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 ru=o(T(),1),U5=o(v(),1);function h$({attributes:e}){let{caption:t,columns:r,imageCrop:a}=e,n=w("has-nested-images",{[`columns-${r}`]:r!==void 0,"columns-default":r===void 0,"is-cropped":a}),i=ru.useBlockProps.save({className:n}),l=ru.useInnerBlocksProps.save(i);return(0,U5.jsxs)("figure",{...l,children:[l.children,!ru.RichText.isEmpty(t)&&(0,U5.jsx)(ru.RichText.Content,{tagName:"figcaption",className:w("blocks-gallery-caption",(0,ru.__experimentalGetElementClassName)("caption")),value:t})]})}var Ks=o(W(),1),g$=o(Rr(),1),qN=o(Yc(),1);var Ave=e=>e?e.split(",").map(t=>parseInt(t,10)):[];function Rve(e){if(e.name==="core/gallery"&&e.attributes?.images.length>0){let t=e.attributes.images.map(({url:r,id:a,alt:n})=>(0,Ks.createBlock)("core/image",{url:r,id:a?parseInt(a,10):null,alt:n,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination}));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e}(0,qN.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",Rve);function zve(e,t){let a=(Array.isArray(t)?t:[t]).find(n=>n.name==="core/gallery"&&n.innerBlocks.length>0&&!n.attributes.images?.length>0&&!e.name.includes("core/"));if(a){let n=a.innerBlocks.map(({attributes:{url:l,id:s,alt:c}})=>({url:l,id:s?parseInt(s,10):null,alt:c})),i=n.map(({id:l})=>l);a.attributes.images=n,a.attributes.ids=i}return e}(0,qN.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",zve);var Vve={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 n=e.filter(({url:i})=>i).map(i=>(i.width=void 0,i.height=void 0,(0,Ks.createBlock)("core/image",i)));return(0,Ks.createBlock)("core/gallery",{align:t,sizeSlug:r},n)}},{type:"shortcode",tag:"gallery",transform({named:{ids:e,columns:t=3,link:r,orderby:a,size:n}}){let i=Ave(e).map(c=>parseInt(c,10)),l=Ws;return r==="post"?l=qs:r==="file"&&(l=$s),(0,Ks.createBlock)("core/gallery",{columns:parseInt(t,10),linkTo:l,randomOrder:a==="rand",...n&&{sizeSlug:n}},i.map(c=>(0,Ks.createBlock)("core/image",{id:c,...n&&{sizeSlug:n}})))},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,Ks.createBlock)("core/image",{blob:(0,g$.createBlobURL)(r)}));return(0,Ks.createBlock)("core/gallery",{},t)}}],to:[{type:"block",blocks:["core/image"],transform:({align:e},t)=>t.length>0?t.map(({attributes:{url:r,alt:a,caption:n,title:i,href:l,rel:s,linkClass:c,id:u,sizeSlug:m,linkDestination:p,linkTarget:d,anchor:f,className:h}})=>(0,Ks.createBlock)("core/image",{align:e,url:r,alt:a,caption:n,title:i,href:l,rel:s,linkClass:c,id:u,sizeSlug:m,linkDestination:p,linkTarget:d,anchor:f,className:h})):(0,Ks.createBlock)("core/image",{align:e})}]},v$=Vve;var{name:b$}=j5,y$={icon:j0,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:v$,edit:f$,save:h$,deprecated:WW},Fve=()=>E({name:b$,metadata:j5,settings:y$});var JN={};Z(JN,{init:()=>Kve,metadata:()=>W5,name:()=>Z5,settings:()=>M$});var q5=o(P(),1);var Ca=o(T(),1),bi=o(v(),1),KN=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:a,...n}=e;return{...n,style:t}},Hve=[{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,{...Ca.useInnerBlocksProps.save(Ca.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,{...Ca.useBlockProps.save(),children:(0,bi.jsx)("div",{className:"wp-block-group__inner-container",children:(0,bi.jsx)(Ca.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:KN,save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,textColor:a,customTextColor:n}=e,i=(0,Ca.getColorClassName)("background-color",t),l=(0,Ca.getColorClassName)("color",a),s=w(i,l,{"has-text-color":a||n,"has-background":t||r});return(0,bi.jsx)("div",{className:s,style:{backgroundColor:i?void 0:r,color:l?void 0:n},children:(0,bi.jsx)("div",{className:"wp-block-group__inner-container",children:(0,bi.jsx)(Ca.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:KN,supports:{align:["wide","full"],anchor:!0,html:!1},save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,textColor:a,customTextColor:n}=e,i=(0,Ca.getColorClassName)("background-color",t),l=(0,Ca.getColorClassName)("color",a),s=w(i,{"has-text-color":a||n,"has-background":t||r});return(0,bi.jsx)("div",{className:s,style:{backgroundColor:i?void 0:r,color:l?void 0:n},children:(0,bi.jsx)("div",{className:"wp-block-group__inner-container",children:(0,bi.jsx)(Ca.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:KN,save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r}=e,a=(0,Ca.getColorClassName)("background-color",t),n=w(a,{"has-background":t||r});return(0,bi.jsx)("div",{className:n,style:{backgroundColor:a?void 0:r},children:(0,bi.jsx)(Ca.InnerBlocks.Content,{})})}}],_$=Hve;var G5=o(V(),1),_i=o(T(),1),T$=o(U(),1),P$=o(P(),1),B$=o(L(),1);var x$=o(V(),1),k$=o(T(),1),QN=o(P(),1),w$=o(W(),1),zn=o(M(),1),cv=o(U(),1),Rn=o(v(),1),Ove=(e="group")=>({group:(0,Rn.jsx)(zn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Rn.jsx)(zn.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,Rn.jsx)(zn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Rn.jsx)(zn.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,Rn.jsx)(zn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Rn.jsx)(zn.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,Rn.jsx)(zn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Rn.jsx)(zn.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 C$({attributes:e={style:void 0,backgroundColor:void 0,textColor:void 0,fontSize:void 0},usedLayoutType:t="",hasInnerBlocks:r=!1}){let{style:a,backgroundColor:n,textColor:i,fontSize:l}=e,[s,c]=(0,cv.useState)(!r&&!n&&!l&&!i&&!a&&t!=="flex"&&t!=="grid");return(0,cv.useEffect)(()=>{(r||n||l||i||a||t==="flex")&&c(!1)},[n,l,i,a,t,r]),[s,c]}function jve({name:e,onSelect:t}){let r=(0,x$.useSelect)(n=>n(w$.store).getBlockVariations(e,"block"),[e]),a=(0,k$.useBlockProps)({className:"wp-block-group__placeholder"});return(0,cv.useEffect)(()=>{r&&r.length===1&&t(r[0])},[t,r]),(0,Rn.jsx)("div",{...a,children:(0,Rn.jsx)(zn.Placeholder,{instructions:(0,QN.__)("Group blocks together. Select a layout:"),children:(0,Rn.jsx)("ul",{role:"list",className:"wp-block-group-placeholder__variations","aria-label":(0,QN.__)("Block variations"),children:r.map(n=>(0,Rn.jsx)("li",{children:(0,Rn.jsx)(zn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:Ove(n.name),iconSize:48,onClick:()=>t(n),className:"wp-block-group-placeholder__variation-button",label:`${n.title}: ${n.description}`})},n.name))})})})}var S$=jve;var yi=o(v(),1),{HTMLElementControl:Uve}=K(_i.privateApis);function Gve({tagName:e,onSelectTagName:t,clientId:r}){return(0,yi.jsx)(_i.InspectorControls,{group:"advanced",children:(0,yi.jsx)(Uve,{tagName:e,onChange:t,clientId:r,options:[{label:(0,P$.__)("Default ()"),value:"div"},{label:"
",value:"header"},{label:"",value:"main"},{label:"",value:"section"},{label:"",value:"article"},{label:"