/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.blockLibrary=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="K51g")}({"+WrK":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));t.a=a},"//kF":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=a},"1CF3":function(e,t){e.exports=window.wp.dom},"1Yn1":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));t.a=a},"1ZqX":function(e,t){e.exports=window.wp.data},"1iEr":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=a},"2gm7":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=a},"4eJC":function(e,t,n){e.exports=function(e,t){var n,r,o=0;function a(){var a,l,c=n,i=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(l=0;ll?(n=a/l,c=100,i=Math.round(c/n)):(n=l/a,i=100,c=Math.round(i/n)),(c>a||i>l||c<10||i<10)&&(c=a,i=l)),{srcLeft:r,srcTop:o,srcWidth:a,srcHeight:l,destWidth:c,destHeight:i}}},{key:"_simpleAlgorithm",value:function(e,t,n){for(var r=0,o=0,a=0,l=0,c=0,i=0;ir?-1:n===r?0:1}))[0],5),d=m[0],b=m[1],p=m[2],g=m[3],h=m[4];return g?[Math.round(d/g),Math.round(b/g),Math.round(p/g),Math.round(g/h)]:[0,0,0,0]}},{key:"_bindImageEvents",value:function(e,t,n){var r=this,o=(n=n||{})&&n.data,a=this._getDefaultColor(n),l=function(){s(),t.call(e,r.getColor(e,n),o)},c=function(){s(),t.call(e,r._prepareResult(a,new Error("Image error")),o)},i=function(){s(),t.call(e,r._prepareResult(a,new Error("Image abort")),o)},s=function(){e.removeEventListener("load",l),e.removeEventListener("error",c),e.removeEventListener("abort",i)};e.addEventListener("load",l),e.addEventListener("error",c),e.addEventListener("abort",i)}},{key:"_prepareResult",value:function(e,t){var n=e.slice(0,3),r=[].concat(n,e[3]/255),o=this._isDark(e);return{error:t,value:e,rgb:"rgb("+n.join(",")+")",rgba:"rgba("+r.join(",")+")",hex:this._arrayToHex(n),hexa:this._arrayToHex(e),isDark:o,isLight:!o}}},{key:"_getOriginalSize",value:function(e){return e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}},{key:"_toHex",value:function(e){var t=e.toString(16);return 1===t.length?"0"+t:t}},{key:"_arrayToHex",value:function(e){return"#"+e.map(this._toHex).join("")}},{key:"_isDark",value:function(e){return(299*e[0]+587*e[1]+114*e[2])/1e3<128}},{key:"_makeCanvas",value:function(){return"undefined"==typeof window?new OffscreenCanvas(1,1):document.createElement("canvas")}}])&&e(r.prototype,o),a&&e(r,a),n}()}()},FqII:function(e,t){e.exports=window.wp.date},G8mJ:function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=a},GRId:function(e,t){e.exports=window.wp.element},HSyU:function(e,t){e.exports=window.wp.blocks},JREk:function(e,t){e.exports=window.wp.serverSideRender},K51g:function(e,t,n){"use strict";n.r(t),n.d(t,"__experimentalGetCoreBlocks",(function(){return Pp})),n.d(t,"registerCoreBlocks",(function(){return zp})),n.d(t,"__experimentalRegisterExperimentalCoreBlocks",(function(){return Ip}));var r={};n.r(r),n.d(r,"metadata",(function(){return xe})),n.d(r,"name",(function(){return Se})),n.d(r,"settings",(function(){return Be}));var o={};n.r(o),n.d(o,"metadata",(function(){return Je})),n.d(o,"name",(function(){return Qe})),n.d(o,"settings",(function(){return Ye}));var a={};n.r(a),n.d(a,"metadata",(function(){return vt})),n.d(a,"name",(function(){return Ot})),n.d(a,"settings",(function(){return jt}));var l={};n.r(l),n.d(l,"metadata",(function(){return St})),n.d(l,"name",(function(){return Bt})),n.d(l,"settings",(function(){return Tt}));var c={};n.r(c),n.d(c,"metadata",(function(){return Rt})),n.d(c,"name",(function(){return Lt})),n.d(c,"settings",(function(){return Vt}));var i={};n.r(i),n.d(i,"metadata",(function(){return Ft})),n.d(i,"name",(function(){return Dt})),n.d(i,"settings",(function(){return Gt}));var s={};n.r(s),n.d(s,"metadata",(function(){return $t})),n.d(s,"name",(function(){return Zt})),n.d(s,"settings",(function(){return Kt}));var u={};n.r(u),n.d(u,"metadata",(function(){return en})),n.d(u,"name",(function(){return tn})),n.d(u,"settings",(function(){return nn}));var m={};n.r(m),n.d(m,"metadata",(function(){return ln})),n.d(m,"name",(function(){return cn})),n.d(m,"settings",(function(){return sn}));var d={};n.r(d),n.d(d,"metadata",(function(){return En})),n.d(d,"name",(function(){return Cn})),n.d(d,"settings",(function(){return xn}));var b={};n.r(b),n.d(b,"metadata",(function(){return Yn})),n.d(b,"name",(function(){return Xn})),n.d(b,"settings",(function(){return er}));var p={};n.r(p),n.d(p,"metadata",(function(){return Rr})),n.d(p,"name",(function(){return Lr})),n.d(p,"settings",(function(){return Vr}));var g={};n.r(g),n.d(g,"metadata",(function(){return Qr})),n.d(g,"name",(function(){return Yr})),n.d(g,"settings",(function(){return Xr}));var h={};n.r(h),n.d(h,"metadata",(function(){return Fo})),n.d(h,"name",(function(){return Do})),n.d(h,"settings",(function(){return Go}));var v={};n.r(v),n.d(v,"metadata",(function(){return Jo})),n.d(v,"name",(function(){return Qo})),n.d(v,"settings",(function(){return Yo}));var O={};n.r(O),n.d(O,"metadata",(function(){return va})),n.d(O,"name",(function(){return Oa})),n.d(O,"settings",(function(){return ja}));var j={};n.r(j),n.d(j,"metadata",(function(){return _a})),n.d(j,"name",(function(){return ka})),n.d(j,"settings",(function(){return wa}));var y={};n.r(y),n.d(y,"metadata",(function(){return La})),n.d(y,"name",(function(){return Va})),n.d(y,"settings",(function(){return Aa}));var f={};n.r(f),n.d(f,"metadata",(function(){return Fa})),n.d(f,"name",(function(){return Da})),n.d(f,"settings",(function(){return Ga}));var _={};n.r(_),n.d(_,"metadata",(function(){return Ya})),n.d(_,"name",(function(){return Xa})),n.d(_,"settings",(function(){return el}));var k={};n.r(k),n.d(k,"metadata",(function(){return bl})),n.d(k,"name",(function(){return pl})),n.d(k,"settings",(function(){return gl}));var w={};n.r(w),n.d(w,"metadata",(function(){return vl})),n.d(w,"name",(function(){return Ol})),n.d(w,"settings",(function(){return jl}));var E={};n.r(E),n.d(E,"metadata",(function(){return Vl})),n.d(E,"name",(function(){return Al})),n.d(E,"settings",(function(){return Hl}));var C={};n.r(C),n.d(C,"metadata",(function(){return Gl})),n.d(C,"name",(function(){return Ul})),n.d(C,"settings",(function(){return ql}));var x={};n.r(x),n.d(x,"metadata",(function(){return Kl})),n.d(x,"name",(function(){return Jl})),n.d(x,"settings",(function(){return Ql}));var S={};n.r(S),n.d(S,"metadata",(function(){return Vc})),n.d(S,"name",(function(){return Ac})),n.d(S,"settings",(function(){return Hc}));var B={};n.r(B),n.d(B,"metadata",(function(){return ti})),n.d(B,"name",(function(){return ni})),n.d(B,"settings",(function(){return ri}));var T={};n.r(T),n.d(T,"metadata",(function(){return di})),n.d(T,"name",(function(){return bi})),n.d(T,"settings",(function(){return pi}));var N={};n.r(N),n.d(N,"metadata",(function(){return vi})),n.d(N,"name",(function(){return Oi})),n.d(N,"settings",(function(){return ji}));var P={};n.r(P),n.d(P,"metadata",(function(){return fi})),n.d(P,"name",(function(){return _i})),n.d(P,"settings",(function(){return ki}));var z={};n.r(z),n.d(z,"metadata",(function(){return Ni})),n.d(z,"name",(function(){return Pi})),n.d(z,"settings",(function(){return zi}));var I={};n.r(I),n.d(I,"metadata",(function(){return Ui})),n.d(I,"name",(function(){return qi})),n.d(I,"settings",(function(){return Wi}));var M={};n.r(M),n.d(M,"metadata",(function(){return Ki})),n.d(M,"name",(function(){return Ji})),n.d(M,"settings",(function(){return Qi}));var R={};n.r(R),n.d(R,"metadata",(function(){return es})),n.d(R,"name",(function(){return ts})),n.d(R,"settings",(function(){return ns}));var L={};n.r(L),n.d(L,"metadata",(function(){return us})),n.d(L,"name",(function(){return ms})),n.d(L,"settings",(function(){return ds}));var V={};n.r(V),n.d(V,"metadata",(function(){return gs})),n.d(V,"name",(function(){return hs})),n.d(V,"settings",(function(){return vs}));var A={};n.r(A),n.d(A,"metadata",(function(){return js})),n.d(A,"name",(function(){return ys})),n.d(A,"settings",(function(){return fs}));var H={};n.r(H),n.d(H,"metadata",(function(){return Ts})),n.d(H,"name",(function(){return Ns})),n.d(H,"settings",(function(){return Ps}));var F={};n.r(F),n.d(F,"metadata",(function(){return Ls})),n.d(F,"name",(function(){return Vs})),n.d(F,"settings",(function(){return As}));var D={};n.r(D),n.d(D,"metadata",(function(){return Us})),n.d(D,"name",(function(){return qs})),n.d(D,"settings",(function(){return Ws}));var G={};n.r(G),n.d(G,"metadata",(function(){return Ks})),n.d(G,"name",(function(){return Js})),n.d(G,"settings",(function(){return Qs}));var U={};n.r(U),n.d(U,"metadata",(function(){return Xs})),n.d(U,"name",(function(){return eu})),n.d(U,"settings",(function(){return tu}));var q={};n.r(q),n.d(q,"metadata",(function(){return ou})),n.d(q,"name",(function(){return au})),n.d(q,"settings",(function(){return lu}));var W={};n.r(W),n.d(W,"metadata",(function(){return bu})),n.d(W,"name",(function(){return pu})),n.d(W,"settings",(function(){return gu}));var $={};n.r($),n.d($,"metadata",(function(){return Ru})),n.d($,"name",(function(){return Lu})),n.d($,"settings",(function(){return Vu}));var Z={};n.r(Z),n.d(Z,"metadata",(function(){return Gu})),n.d(Z,"name",(function(){return Uu})),n.d(Z,"settings",(function(){return qu}));var K={};n.r(K),n.d(K,"metadata",(function(){return Zu})),n.d(K,"name",(function(){return Ku})),n.d(K,"settings",(function(){return Ju}));var J={};n.r(J),n.d(J,"metadata",(function(){return Xu})),n.d(J,"name",(function(){return em})),n.d(J,"settings",(function(){return tm}));var Q={};n.r(Q),n.d(Q,"metadata",(function(){return om})),n.d(Q,"name",(function(){return am})),n.d(Q,"settings",(function(){return lm}));var Y={};n.r(Y),n.d(Y,"metadata",(function(){return dm})),n.d(Y,"name",(function(){return bm})),n.d(Y,"settings",(function(){return pm}));var X={};n.r(X),n.d(X,"metadata",(function(){return ym})),n.d(X,"name",(function(){return fm})),n.d(X,"settings",(function(){return _m}));var ee={};n.r(ee),n.d(ee,"metadata",(function(){return Cm})),n.d(ee,"name",(function(){return xm})),n.d(ee,"settings",(function(){return Sm}));var te={};n.r(te),n.d(te,"metadata",(function(){return Tm})),n.d(te,"name",(function(){return Nm})),n.d(te,"settings",(function(){return Pm}));var ne={};n.r(ne),n.d(ne,"metadata",(function(){return Hm})),n.d(ne,"name",(function(){return Fm})),n.d(ne,"settings",(function(){return Dm}));var re={};n.r(re),n.d(re,"metadata",(function(){return $m})),n.d(re,"name",(function(){return Zm})),n.d(re,"settings",(function(){return Km}));var oe={};n.r(oe),n.d(oe,"metadata",(function(){return Xm})),n.d(oe,"name",(function(){return ed})),n.d(oe,"settings",(function(){return td}));var ae={};n.r(ae),n.d(ae,"metadata",(function(){return ad})),n.d(ae,"name",(function(){return ld})),n.d(ae,"settings",(function(){return cd}));var le={};n.r(le),n.d(le,"metadata",(function(){return ud})),n.d(le,"name",(function(){return md})),n.d(le,"settings",(function(){return dd}));var ce={};n.r(ce),n.d(ce,"metadata",(function(){return vd})),n.d(ce,"name",(function(){return Od})),n.d(ce,"settings",(function(){return jd}));var ie={};n.r(ie),n.d(ie,"metadata",(function(){return xd})),n.d(ie,"name",(function(){return Sd})),n.d(ie,"settings",(function(){return Bd}));var se={};n.r(se),n.d(se,"metadata",(function(){return Rd})),n.d(se,"name",(function(){return Ld})),n.d(se,"settings",(function(){return Vd}));var ue={};n.r(ue),n.d(ue,"metadata",(function(){return Fd})),n.d(ue,"name",(function(){return Dd})),n.d(ue,"settings",(function(){return Gd}));var me={};n.r(me),n.d(me,"metadata",(function(){return vb})),n.d(me,"name",(function(){return Ob})),n.d(me,"settings",(function(){return jb}));var de={};n.r(de),n.d(de,"metadata",(function(){return fb})),n.d(de,"name",(function(){return _b})),n.d(de,"settings",(function(){return kb}));var be={};n.r(be),n.d(be,"metadata",(function(){return qb})),n.d(be,"name",(function(){return Wb})),n.d(be,"settings",(function(){return $b}));var pe={};n.r(pe),n.d(pe,"metadata",(function(){return Jb})),n.d(pe,"name",(function(){return Qb})),n.d(pe,"settings",(function(){return Yb}));var ge={};n.r(ge),n.d(ge,"metadata",(function(){return np})),n.d(ge,"name",(function(){return rp})),n.d(ge,"settings",(function(){return op}));var he={};n.r(he),n.d(he,"metadata",(function(){return ip})),n.d(he,"name",(function(){return sp})),n.d(he,"settings",(function(){return up}));var ve={};n.r(ve),n.d(ve,"metadata",(function(){return Sp})),n.d(ve,"name",(function(){return Bp})),n.d(ve,"settings",(function(){return Tp}));var Oe=n("HSyU"),je=n("GRId"),ye=n("Tqx9");var fe=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(ye.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z"})),_e=n("tI+e"),ke=n("l3Sj"),we=n("axFQ"),Ee=n("JREk"),Ce=n.n(Ee);const xe={apiVersion:2,name:"core/archives",title:"Archives",category:"widgets",description:"Display a monthly archive of your posts.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1}},supports:{align:!0,html:!1},editorStyle:"wp-block-archives-editor"},{name:Se}=xe,Be={icon:fe,example:{},edit:function(e){let{attributes:t,setAttributes:n}=e;const{showPostCounts:r,displayAsDropdown:o}=t;return Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.InspectorControls,null,Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Archives settings")},Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Display as dropdown"),checked:o,onChange:()=>n({displayAsDropdown:!o})}),Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Show post counts"),checked:r,onChange:()=>n({showPostCounts:!r})}))),Object(je.createElement)("div",Object(we.useBlockProps)(),Object(je.createElement)(_e.Disabled,null,Object(je.createElement)(Ce.a,{block:"core/archives",attributes:t}))))}};var Te=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(ye.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})),Ne=[{attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{align:!0},save(e){let{attributes:t}=e;const{autoplay:n,caption:r,loop:o,preload:a,src:l}=t;return Object(je.createElement)("figure",null,Object(je.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:o,preload:a}),!we.RichText.isEmpty(r)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",value:r}))}}],Pe=n("xTGt"),ze=n("1ZqX");const Ie=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}];var Me=n("YLtl"),Re=n("A/WM"),Le=n.n(Re),Ve=n("4eJC"),Ae=n.n(Ve);const{name:He}={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Fe=e=>{var t;return null===(t=Object(Oe.getBlockVariations)(He))||void 0===t?void 0:t.find(t=>{let{patterns:n}=t;return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some(t=>e.match(t))}(e,n)})},De=e=>e&&e.includes('class="wp-embedded-content"'),Ge=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{preview:r,attributes:o={}}=e,{url:a,providerNameSlug:l,type:c,...i}=o;if(!a||!Object(Oe.getBlockType)(He))return;const s=Fe(a),u="wordpress"===l||"wp-embed"===c,m=!u&&s&&(s.attributes.providerNameSlug!==l||!l);if(m)return Object(Oe.createBlock)(He,{url:a,...i,...s.attributes});const d=null===(t=Object(Oe.getBlockVariations)(He))||void 0===t?void 0:t.find(e=>{let{name:t}=e;return"wordpress"===t});return d&&r&&De(r.html)&&!u?Object(Oe.createBlock)(He,{url:a,...d.attributes,...n}):void 0},Ue=e=>{if(!e)return e;const t=Ie.reduce((e,t)=>{let{className:n}=t;return e[n]=!1,e},{"wp-has-aspect-ratio":!1});return Le()(e,t)};function qe(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return Ue(t);const r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;const o=r.body.querySelector("iframe");if(o&&o.height&&o.width){const e=(o.width/o.height).toFixed(2);for(let n=0;n=r.ratio){return e-r.ratio>.1?Ue(t):Le()(Ue(t),r.className,"wp-has-aspect-ratio")}}}return t}const We=Ae()((function(e,t,n,r){let o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};const a={};let{type:l="rich"}=e;const{html:c,provider_name:i}=e,s=Object(Me.kebabCase)((i||t).toLowerCase());return De(c)&&(l="wp-embed"),(c||"photo"===l)&&(a.type=l,a.providerNameSlug=s),a.className=qe(c,n,r&&o),a})),$e=["audio"];var Ze=Object(_e.withNotices)((function(e){let{attributes:t,noticeOperations:n,setAttributes:r,onReplace:o,isSelected:a,noticeUI:l,insertBlocksAfter:c}=e;const{id:i,autoplay:s,caption:u,loop:m,preload:d,src:b}=t,p=Object(we.useBlockProps)(),g=Object(ze.useSelect)(e=>{const{getSettings:t}=e(we.store);return t().mediaUpload},[]);function h(e){return t=>{r({[e]:t})}}function v(e){if(e!==b){const t=Ge({attributes:{url:e}});if(void 0!==t)return void o(t);r({src:e,id:void 0})}}function O(e){n.removeAllNotices(),n.createErrorNotice(e)}function j(e){e&&e.url?r({src:e.url,id:e.id}):r({src:void 0,id:void 0})}return Object(je.useEffect)(()=>{if(!i&&Object(Pe.isBlobURL)(b)){const e=Object(Pe.getBlobByURL)(b);e&&g({filesList:[e],onFileChange:e=>{let[{id:t,url:n}]=e;r({id:t,src:n})},onError:e=>{r({src:void 0,id:void 0}),n.createErrorNotice(e)},allowedTypes:$e})}},[]),b?Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.BlockControls,{group:"other"},Object(je.createElement)(we.MediaReplaceFlow,{mediaId:i,mediaURL:b,allowedTypes:$e,accept:"audio/*",onSelect:j,onSelectURL:v,onError:O})),Object(je.createElement)(we.InspectorControls,null,Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Audio settings")},Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Autoplay"),onChange:h("autoplay"),checked:s,help:function(e){return e?Object(ke.__)("Autoplay may cause usability issues for some users."):null}}),Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Loop"),onChange:h("loop"),checked:m}),Object(je.createElement)(_e.SelectControl,{label:Object(ke._x)("Preload","noun; Audio block parameter"),value:d||"",onChange:e=>r({preload:e||void 0}),options:[{value:"",label:Object(ke.__)("Browser default")},{value:"auto",label:Object(ke.__)("Auto")},{value:"metadata",label:Object(ke.__)("Metadata")},{value:"none",label:Object(ke._x)("None",'"Preload" value')}]}))),Object(je.createElement)("figure",p,Object(je.createElement)(_e.Disabled,{isDisabled:!a},Object(je.createElement)("audio",{controls:"controls",src:b})),(!we.RichText.isEmpty(u)||a)&&Object(je.createElement)(we.RichText,{tagName:"figcaption","aria-label":Object(ke.__)("Audio caption text"),placeholder:Object(ke.__)("Add caption"),value:u,onChange:e=>r({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>c(Object(Oe.createBlock)("core/paragraph"))}))):Object(je.createElement)("div",p,Object(je.createElement)(we.MediaPlaceholder,{icon:Object(je.createElement)(we.BlockIcon,{icon:Te}),onSelect:j,onSelectURL:v,accept:"audio/*",allowedTypes:$e,value:t,notices:l,onError:O}))}));var Ke={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform(e){const t=e[0];return Object(Oe.createBlock)("core/audio",{src:Object(Pe.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:e=>{let{named:{src:t,mp3:n,m4a:r,ogg:o,wav:a,wma:l}}=e;return t||n||r||o||a||l}},loop:{type:"string",shortcode:e=>{let{named:{loop:t}}=e;return t}},autoplay:{type:"string",shortcode:e=>{let{named:{autoplay:t}}=e;return t}},preload:{type:"string",shortcode:e=>{let{named:{preload:t}}=e;return t}}}}]};const Je={apiVersion:2,name:"core/audio",title:"Audio",category:"media",description:"Embed a simple audio player.",keywords:["music","sound","podcast","recording"],textdomain:"default",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{anchor:!0,align:!0},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:Qe}=Je,Ye={icon:Te,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"}},transforms:Ke,deprecated:Ne,edit:Ze,save:function(e){let{attributes:t}=e;const{autoplay:n,caption:r,loop:o,preload:a,src:l}=t;return l&&Object(je.createElement)("figure",we.useBlockProps.save(),Object(je.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:o,preload:a}),!we.RichText.isEmpty(r)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",value:r}))}};var Xe=n("oMoS"),et=n("TSYQ"),tt=n.n(et),nt=n("K9lf");const rt=e=>{if(!Object(Me.isObject)(e)||Array.isArray(e))return e;const t=Object(Me.pickBy)(Object(Me.mapValues)(e,rt),Me.identity);return Object(Me.isEmpty)(t)?void 0:t};var ot=rt,at=function(e){var t,n;if(null==e||null===(t=e.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.fontFamily)return e;const r=Object(Me.cloneDeep)(e),o=r.style.typography.fontFamily.split("|").pop();return delete r.style.typography.fontFamily,r.style=ot(r.style),{...r,fontFamily:o}};const lt=e=>{var t,n,r;const{borderRadius:o,...a}=e,l=[o,null===(t=a.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius].find(e=>"number"==typeof e&&0!==e);return l?{...a,style:{...a.style,border:{...null===(r=a.style)||void 0===r?void 0:r.border,radius:l+"px"}}}:a},ct=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient),{...Object(Me.omit)(e,["customTextColor","customBackgroundColor","customGradient"]),style:t}},it=e=>ct(Object(Me.omit)({...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0},["color","textColor"])),st={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}};var ut=[{attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:r,className:o}=e;const{fontSize:a,linkTarget:l,rel:c,style:i,text:s,title:u,url:m,width:d}=r;if(!s)return null;const b=Object(we.__experimentalGetBorderClassesAndStyles)(r),p=Object(we.__experimentalGetColorClassesAndStyles)(r),g=Object(we.__experimentalGetSpacingClassesAndStyles)(r),h=tt()("wp-block-button__link",p.className,b.className,{"no-border-radius":0===(null==i||null===(t=i.border)||void 0===t?void 0:t.radius)}),v={...b.style,...p.style,...g.style},O=tt()(o,{["has-custom-width wp-block-button__width-"+d]:d,"has-custom-font-size":a||(null==i||null===(n=i.typography)||void 0===n?void 0:n.fontSize)});return Object(je.createElement)("div",we.useBlockProps.save({className:O}),Object(je.createElement)(we.RichText.Content,{tagName:"a",className:h,href:m,title:u,style:v,value:s,target:l,rel:c}))},migrate:at,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...st,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible(e){var t;let{style:n}=e;return"number"==typeof(null==n||null===(t=n.border)||void 0===t?void 0:t.radius)},save(e){var t,n,r;let{attributes:o,className:a}=e;const{fontSize:l,linkTarget:c,rel:i,style:s,text:u,title:m,url:d,width:b}=o;if(!u)return null;const p=null==s||null===(t=s.border)||void 0===t?void 0:t.radius,g=Object(we.__experimentalGetColorClassesAndStyles)(o),h=tt()("wp-block-button__link",g.className,{"no-border-radius":0===(null==s||null===(n=s.border)||void 0===n?void 0:n.radius)}),v={borderRadius:p||void 0,...g.style},O=tt()(a,{["has-custom-width wp-block-button__width-"+b]:b,"has-custom-font-size":l||(null==s||null===(r=s.typography)||void 0===r?void 0:r.fontSize)});return Object(je.createElement)("div",we.useBlockProps.save({className:O}),Object(je.createElement)(we.RichText.Content,{tagName:"a",className:h,href:d,title:m,style:v,value:u,target:c,rel:i}))},migrate:Object(nt.compose)(at,lt)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...st,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:r,linkTarget:o,rel:a,text:l,title:c,url:i,width:s}=t,u=Object(we.__experimentalGetColorClassesAndStyles)(t),m=tt()("wp-block-button__link",u.className,{"no-border-radius":0===r}),d={borderRadius:r?r+"px":void 0,...u.style},b=tt()(n,{["has-custom-width wp-block-button__width-"+s]:s});return Object(je.createElement)("div",we.useBlockProps.save({className:b}),Object(je.createElement)(we.RichText.Content,{tagName:"a",className:m,href:i,title:c,style:d,value:l,target:o,rel:a}))},migrate:Object(nt.compose)(at,lt)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...st,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:r,linkTarget:o,rel:a,text:l,title:c,url:i,width:s}=t,u=Object(we.__experimentalGetColorClassesAndStyles)(t),m=tt()("wp-block-button__link",u.className,{"no-border-radius":0===r}),d={borderRadius:r?r+"px":void 0,...u.style},b=tt()(n,{["has-custom-width wp-block-button__width-"+s]:s});return Object(je.createElement)("div",we.useBlockProps.save({className:b}),Object(je.createElement)(we.RichText.Content,{tagName:"a",className:m,href:i,title:c,style:d,value:l,target:o,rel:a}))},migrate:Object(nt.compose)(at,lt)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...st,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save(e){let{attributes:t}=e;const{borderRadius:n,linkTarget:r,rel:o,text:a,title:l,url:c}=t,i=tt()("wp-block-button__link",{"no-border-radius":0===n}),s={borderRadius:n?n+"px":void 0};return Object(je.createElement)(we.RichText.Content,{tagName:"a",className:i,href:c,title:l,style:s,value:a,target:r,rel:o})},migrate:lt},{supports:{align:!0,alignWide:!1},attributes:{...st,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!e.customTextColor||!!e.customBackgroundColor||!!e.customGradient,migrate:Object(nt.compose)(lt,ct),save(e){let{attributes:t}=e;const{backgroundColor:n,borderRadius:r,customBackgroundColor:o,customTextColor:a,customGradient:l,linkTarget:c,gradient:i,rel:s,text:u,textColor:m,title:d,url:b}=t,p=Object(we.getColorClassName)("color",m),g=!l&&Object(we.getColorClassName)("background-color",n),h=Object(we.__experimentalGetGradientClass)(i),v=tt()("wp-block-button__link",{"has-text-color":m||a,[p]:p,"has-background":n||o||l||i,[g]:g,"no-border-radius":0===r,[h]:h}),O={background:l||void 0,backgroundColor:g||l||i?void 0:o,color:p?void 0:a,borderRadius:r?r+"px":void 0};return Object(je.createElement)("div",null,Object(je.createElement)(we.RichText.Content,{tagName:"a",className:v,href:b,title:d,style:O,value:u,target:c,rel:s}))}},{attributes:{...st,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible:e=>e.className&&e.className.includes("is-style-squared"),migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),lt(ct({...e,className:t||void 0,borderRadius:0}))},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:r,customTextColor:o,linkTarget:a,rel:l,text:c,textColor:i,title:s,url:u}=t,m=Object(we.getColorClassName)("color",i),d=Object(we.getColorClassName)("background-color",n),b=tt()("wp-block-button__link",{"has-text-color":i||o,[m]:m,"has-background":n||r,[d]:d}),p={backgroundColor:d?void 0:r,color:m?void 0:o};return Object(je.createElement)("div",null,Object(je.createElement)(we.RichText.Content,{tagName:"a",className:b,href:u,title:s,style:p,value:c,target:a,rel:l}))}},{attributes:{...st,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:it,save(e){let{attributes:t}=e;const{url:n,text:r,title:o,backgroundColor:a,textColor:l,customBackgroundColor:c,customTextColor:i}=t,s=Object(we.getColorClassName)("color",l),u=Object(we.getColorClassName)("background-color",a),m=tt()("wp-block-button__link",{"has-text-color":l||i,[s]:s,"has-background":a||c,[u]:u}),d={backgroundColor:u?void 0:c,color:s?void 0:i};return Object(je.createElement)("div",null,Object(je.createElement)(we.RichText.Content,{tagName:"a",className:m,href:n,title:o,style:d,value:r}))}},{attributes:{...st,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:r,title:o,align:a,color:l,textColor:c}=t,i={backgroundColor:l,color:c};return Object(je.createElement)("div",{className:"align"+a},Object(je.createElement)(we.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:o,style:i,value:r}))},migrate:it},{attributes:{...st,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:r,title:o,align:a,color:l,textColor:c}=t;return Object(je.createElement)("div",{className:"align"+a,style:{backgroundColor:l}},Object(je.createElement)(we.RichText.Content,{tagName:"a",href:n,title:o,style:{color:c},value:r}))},migrate:it}],mt=n("wx14"),dt=n("RxS6"),bt=n("Bpkj"),pt=n("Mp0b");function gt(e){let{selectedWidth:t,setAttributes:n}=e;return Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Width settings")},Object(je.createElement)(_e.ButtonGroup,{"aria-label":Object(ke.__)("Button width")},[25,50,75,100].map(e=>Object(je.createElement)(_e.Button,{key:e,isSmall:!0,variant:e===t?"primary":void 0,onClick:()=>{var r;n({width:t===(r=e)?void 0:r})}},e,"%"))))}var ht=function(e){var t;const{attributes:n,setAttributes:r,className:o,isSelected:a,onReplace:l,mergeBlocks:c}=e,{linkTarget:i,placeholder:s,rel:u,style:m,text:d,url:b,width:p}=n,g=Object(je.useCallback)(e=>{r({rel:e})},[r]),h=Object(we.__experimentalUseBorderProps)(n),v=Object(we.__experimentalUseColorProps)(n),O=Object(we.__experimentalGetSpacingClassesAndStyles)(n),j=Object(je.useRef)(),y=Object(je.useRef)(),f=Object(we.useBlockProps)({ref:j,onKeyDown:function(e){if(dt.isKeyboardEvent.primary(e,"k"))C(e);else if(dt.isKeyboardEvent.primaryShift(e,"k")){var t;x(),null===(t=y.current)||void 0===t||t.focus()}}}),[_,k]=Object(je.useState)(!1),w=!!b,E="_blank"===i;function C(e){e.preventDefault(),k(!0)}function x(){r({url:void 0,linkTarget:void 0,rel:void 0}),k(!1)}return Object(je.useEffect)(()=>{a||k(!1)},[a]),Object(je.createElement)(je.Fragment,null,Object(je.createElement)("div",Object(mt.a)({},f,{className:tt()(f.className,{["has-custom-width wp-block-button__width-"+p]:p,"has-custom-font-size":f.style.fontSize})}),Object(je.createElement)(we.RichText,{ref:y,"aria-label":Object(ke.__)("Button text"),placeholder:s||Object(ke.__)("Add text…"),value:d,onChange:e=>{r({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:tt()(o,"wp-block-button__link",v.className,h.className,{"no-border-radius":0===(null==m||null===(t=m.border)||void 0===t?void 0:t.radius)}),style:{...h.style,...v.style,...O.style},onSplit:e=>Object(Oe.createBlock)("core/button",{...n,text:e}),onReplace:l,onMerge:c,identifier:"text"})),Object(je.createElement)(we.BlockControls,{group:"block"},!w&&Object(je.createElement)(_e.ToolbarButton,{name:"link",icon:bt.a,title:Object(ke.__)("Link"),shortcut:dt.displayShortcut.primary("k"),onClick:C}),w&&Object(je.createElement)(_e.ToolbarButton,{name:"link",icon:pt.a,title:Object(ke.__)("Unlink"),shortcut:dt.displayShortcut.primaryShift("k"),onClick:x,isActive:!0})),a&&(_||w)&&Object(je.createElement)(_e.Popover,{position:"bottom center",onClose:()=>{var e;k(!1),null===(e=y.current)||void 0===e||e.focus()},anchorRef:null==j?void 0:j.current,focusOnMount:!!_&&"firstElement"},Object(je.createElement)(we.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:b,opensInNewTab:E},onChange:e=>{let{url:t="",opensInNewTab:n}=e;r({url:t}),E!==n&&function(e){const t=e?"_blank":void 0;let n=u;t&&!u?n="noreferrer noopener":t||"noreferrer noopener"!==u||(n=void 0),r({linkTarget:t,rel:n})}(n)},onRemove:()=>{var e;x(),null===(e=y.current)||void 0===e||e.focus()},forceIsEditingLink:_})),Object(je.createElement)(we.InspectorControls,null,Object(je.createElement)(gt,{selectedWidth:p,setAttributes:r})),Object(je.createElement)(we.InspectorControls,{__experimentalGroup:"advanced"},Object(je.createElement)(_e.TextControl,{label:Object(ke.__)("Link rel"),value:u||"",onChange:g})))};const vt={apiVersion:2,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"},{name:Ot}=vt,jt={icon:Xe.a,example:{attributes:{className:"is-style-fill",text:Object(ke.__)("Call to Action")}},edit:ht,save:function(e){var t,n;let{attributes:r,className:o}=e;const{fontSize:a,linkTarget:l,rel:c,style:i,text:s,title:u,url:m,width:d}=r;if(!s)return null;const b=Object(we.__experimentalGetBorderClassesAndStyles)(r),p=Object(we.__experimentalGetColorClassesAndStyles)(r),g=Object(we.__experimentalGetSpacingClassesAndStyles)(r),h=tt()("wp-block-button__link",p.className,b.className,{"no-border-radius":0===(null==i||null===(t=i.border)||void 0===t?void 0:t.radius)}),v={...b.style,...p.style,...g.style},O=tt()(o,{["has-custom-width wp-block-button__width-"+d]:d,"has-custom-font-size":a||(null==i||null===(n=i.typography)||void 0===n?void 0:n.fontSize)});return Object(je.createElement)("div",we.useBlockProps.save({className:O}),Object(je.createElement)(we.RichText.Content,{tagName:"a",className:h,href:m,title:u,style:v,value:s,target:l,rel:c}))},deprecated:ut,merge:(e,t)=>{let{text:n=""}=t;return{...e,text:(e.text||"")+n}}};var yt=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(ye.Path,{d:"M17 3H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5V6.2h-5v1.6zM17 13H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5v-1.5h-5v1.5z"}));const ft=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...r}=e;return(t||n)&&Object.assign(r,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),r};var _t=[{attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}}},isEligible:e=>{let{contentJustification:t,orientation:n}=e;return!!t||!!n},migrate:ft,save(e){let{attributes:{contentJustification:t,orientation:n}}=e;return Object(je.createElement)("div",we.useBlockProps.save({className:tt()({["is-content-justification-"+t]:t,"is-vertical":"vertical"===n})}),Object(je.createElement)(we.InnerBlocks.Content,null))}},{supports:{align:["center","left","right"],anchor:!0},save:()=>Object(je.createElement)("div",null,Object(je.createElement)(we.InnerBlocks.Content,null)),isEligible(e){let{align:t}=e;return t&&["center","left","right"].includes(t)},migrate:e=>ft({...e,align:void 0,contentJustification:e.align})}],kt=n("qRz9");const{name:wt}={apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"};var Et={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>Object(Oe.createBlock)(wt,{},e.map(e=>Object(Oe.createBlock)("core/button",e)))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>Object(Oe.createBlock)(wt,{},e.map(e=>{const t=Object(kt.__unstableCreateElement)(document,e.content),n=t.innerText||"",r=t.querySelector("a"),o=null==r?void 0:r.getAttribute("href");return Object(Oe.createBlock)("core/button",{text:n,url:o})})),isMatch:e=>e.every(e=>{const t=Object(kt.__unstableCreateElement)(document,e.content),n=t.innerText||"",r=t.querySelectorAll("a");return n.length<=30&&r.length<=1})}]};const Ct=[Ot];var xt=function(e){let{attributes:{layout:t={}}}=e;const n=Object(we.useBlockProps)(),r=Object(ze.useSelect)(e=>{var t;const n=e(we.store).getSettings().__experimentalPreferredStyleVariations;return null==n||null===(t=n.value)||void 0===t?void 0:t[Ot]},[]),o=Object(we.useInnerBlocksProps)(n,{allowedBlocks:Ct,template:[[Ot,{className:r&&"is-style-"+r}]],__experimentalLayout:t,templateInsertUpdatesSelection:!0});return Object(je.createElement)(je.Fragment,null,Object(je.createElement)("div",o))};const St={apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:Bt}=St,Tt={icon:yt,example:{innerBlocks:[{name:"core/button",attributes:{text:Object(ke.__)("Find out more")}},{name:"core/button",attributes:{text:Object(ke.__)("Contact us")}}]},deprecated:_t,transforms:Et,edit:xt,save:function(){const e=we.useInnerBlocksProps.save(we.useBlockProps.save());return Object(je.createElement)("div",e)}};var Nt=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(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-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})),Pt=n("wy2R"),zt=n.n(Pt),It=n("jZUy");const Mt=Ae()(e=>{if(!e)return{};const t=zt()(e);return{year:t.year(),month:t.month()+1}});const Rt={apiVersion:2,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site’s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{align:!0},style:"wp-block-calendar"},{name:Lt}=Rt,Vt={icon:Nt,example:{},edit:function(e){let{attributes:t}=e;const n=Object(we.useBlockProps)(),{date:r,hasPosts:o,hasPostsResolved:a}=Object(ze.useSelect)(e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(It.store),r={status:"publish",per_page:1},o=t("postType","post",r),a=n("getEntityRecords",["postType","post",r]);let l;const c=e("core/editor");if(c){"post"===c.getEditedPostAttribute("type")&&(l=c.getEditedPostAttribute("date"))}return{date:l,hasPostsResolved:a,hasPosts:a&&1===(null==o?void 0:o.length)}},[]);return o?Object(je.createElement)("div",n,Object(je.createElement)(_e.Disabled,null,Object(je.createElement)(Ce.a,{block:"core/calendar",attributes:{...t,...Mt(r)}}))):Object(je.createElement)("div",n,Object(je.createElement)(_e.Placeholder,{icon:Nt,label:Object(ke.__)("Calendar")},a?Object(ke.__)("No published posts found."):Object(je.createElement)(_e.Spinner,null)))}};var At=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(ye.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"}));var Ht=Object(je.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(je.createElement)(ye.Path,{d:"M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z"}));const Ft={apiVersion:2,name:"core/categories",title:"Categories",category:"widgets",description:"Display a list of all categories.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1},showOnlyTopLevel:{type:"boolean",default:!1}},supports:{align:!0,html:!1},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:Dt}=Ft,Gt={icon:At,example:{},edit:function e(t){let{attributes:{displayAsDropdown:n,showHierarchy:r,showPostCounts:o,showOnlyTopLevel:a},setAttributes:l}=t;const c=Object(nt.useInstanceId)(e,"blocks-category-select"),{categories:i,isRequesting:s}=Object(ze.useSelect)(e=>{const{getEntityRecords:t,isResolving:n}=e(It.store),r={per_page:-1,hide_empty:!0,context:"view"};return a&&(r.parent=0),{categories:t("taxonomy","category",r),isRequesting:n("getEntityRecords",["taxonomy","category",r])}},[a]),u=e=>null!=i&&i.length?null===e?i:i.filter(t=>{let{parent:n}=t;return n===e}):[],m=e=>"wp-block-categories__list wp-block-categories__list-level-"+e,d=e=>t=>l({[e]:t}),b=e=>e?Object(Me.unescape)(e).trim():Object(ke.__)("(Untitled)"),p=(e,t)=>{const n=u(e.id),{id:a,link:l,count:c,name:i}=e;return Object(je.createElement)("li",{key:a},Object(je.createElement)("a",{href:l,target:"_blank",rel:"noreferrer noopener"},b(i)),o&&Object(je.createElement)("span",{className:"wp-block-categories__post-count"},` (${c})`),r&&!!n.length&&Object(je.createElement)("ul",{className:m(t+1)},n.map(e=>p(e,t+1))))},g=(e,t)=>{const{id:n,count:a,name:l}=e,c=u(n);return[Object(je.createElement)("option",{key:n},Object(Me.times)(3*t,()=>" "),b(l),o&&` (${a})`),r&&!!c.length&&c.map(e=>g(e,t+1))]};return Object(je.createElement)("div",Object(we.useBlockProps)(),Object(je.createElement)(we.InspectorControls,null,Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Categories settings")},Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Display as dropdown"),checked:n,onChange:d("displayAsDropdown")}),Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Show post counts"),checked:o,onChange:d("showPostCounts")}),Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Show only top level categories"),checked:a,onChange:d("showOnlyTopLevel")}),!a&&Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Show hierarchy"),checked:r,onChange:d("showHierarchy")}))),s&&Object(je.createElement)(_e.Placeholder,{icon:Ht,label:Object(ke.__)("Categories")},Object(je.createElement)(_e.Spinner,null)),!s&&0===(null==i?void 0:i.length)&&Object(je.createElement)("p",null,Object(ke.__)("Your site does not have any posts, so there is nothing to display here at the moment.")),!s&&(null==i?void 0:i.length)>0&&(n?(()=>{const e=u(r?0:null);return Object(je.createElement)(je.Fragment,null,Object(je.createElement)(_e.VisuallyHidden,{as:"label",htmlFor:c},Object(ke.__)("Categories")),Object(je.createElement)("select",{id:c,className:"wp-block-categories__dropdown"},e.map(e=>g(e,0))))})():(()=>{const e=u(r?0:null);return Object(je.createElement)("ul",{className:m(0)},e.map(e=>p(e,0)))})()))}};var Ut=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(ye.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"}));var qt=e=>{let{clientId:t}=e;const{replaceBlocks:n}=Object(ze.useDispatch)(we.store),r=Object(ze.useSelect)(e=>e(we.store).getBlock(t),[t]);return Object(je.createElement)(_e.ToolbarButton,{onClick:()=>n(r.clientId,Object(Oe.rawHandler)({HTML:Object(Oe.serialize)(r)}))},Object(ke.__)("Convert to blocks"))};const{wp:Wt}=window;const $t={apiVersion:2,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-freeform-editor"},{name:Zt}=$t,Kt={icon:Ut,edit:function(e){let{clientId:t,attributes:{content:n},setAttributes:r,onReplace:o}=e;const{getMultiSelectedBlockClientIds:a}=Object(ze.useSelect)(we.store),l=Object(je.useRef)(!1);return Object(je.useEffect)(()=>{if(!l.current)return;const e=window.tinymce.get("editor-"+t);(null==e?void 0:e.getContent())!==n&&e.setContent(n||"")},[n]),Object(je.useEffect)(()=>{const{baseURL:e,suffix:c}=window.wpEditorL10n.tinymce;function i(e){let t;n&&e.on("loadContent",()=>e.setContent(n)),e.on("blur",()=>{var n;t=e.selection.getBookmark(2,!0);const o=document.querySelector(".interface-interface-skeleton__content"),l=o.scrollTop;return null!==(n=a())&&void 0!==n&&n.length||r({content:e.getContent()}),e.once("focus",()=>{t&&(e.selection.moveToBookmark(t),o.scrollTop!==l&&(o.scrollTop=l))}),!1}),e.on("mousedown touchstart",()=>{t=null});const l=Object(Me.debounce)(()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,r({content:t}))},250);e.on("Paste Change input Undo Redo",l),e.on("remove",l.cancel),e.on("keydown",t=>{dt.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==dt.BACKSPACE&&t.keyCode!==dt.DELETE||!function(e){const t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(o([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===dt.F10&&t.stopPropagation()}),e.on("init",()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())})}function s(){const{settings:e}=window.wpEditorL10n.tinymce;Wt.oldEditor.initialize("editor-"+t,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:"#toolbar-"+t,setup:i}})}function u(){"complete"===document.readyState&&s()}return l.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:e,suffix:c}),"complete"===document.readyState?s():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),Wt.oldEditor.remove("editor-"+t)}},[]),Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.BlockControls,null,Object(je.createElement)(_e.ToolbarGroup,null,Object(je.createElement)(qt,{clientId:t}))),Object(je.createElement)("div",Object(we.useBlockProps)(),Object(je.createElement)("div",{key:"toolbar",id:"toolbar-"+t,className:"block-library-classic__toolbar",onClick:function(){const e=window.tinymce.get("editor-"+t);e&&e.focus()},"data-placeholder":Object(ke.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),Object(je.createElement)("div",{key:"editor",id:"editor-"+t,className:"wp-block-freeform block-library-rich-text__tinymce"})))},save:function(e){let{attributes:t}=e;const{content:n}=t;return Object(je.createElement)(je.RawHTML,null,n)}};var Jt=n("1Yn1");function Qt(e){return e.replace(/\[/g,"[")}function Yt(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}var Xt={from:[{type:"enter",regExp:/^```$/,transform:()=>Object(Oe.createBlock)("core/code")},{type:"block",blocks:["core/html"],transform:e=>{let{content:t}=e;return Object(Oe.createBlock)("core/code",{content:t})}},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName,schema:{pre:{children:{code:{children:{"#text":{}}}}}}}]};const en={apiVersion:2,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"code"}},supports:{anchor:!0,__experimentalSelector:".wp-block-code > code",typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{text:!0,background:!0,gradients:!0}},style:"wp-block-code"},{name:tn}=en,nn={icon:Jt.a,example:{attributes:{content:Object(ke.__)('// A "block" is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );')}},transforms:Xt,edit:function(e){let{attributes:t,setAttributes:n,onRemove:r}=e;const o=Object(we.useBlockProps)();return Object(je.createElement)("pre",o,Object(je.createElement)(we.RichText,{tagName:"code",value:t.content,onChange:e=>n({content:e}),onRemove:r,placeholder:Object(ke.__)("Write code…"),"aria-label":Object(ke.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0}))},save:function(e){let{attributes:t}=e;return Object(je.createElement)("pre",we.useBlockProps.save(),Object(je.createElement)(we.RichText.Content,{tagName:"code",value:(n=t.content,Object(Me.flow)(Qt,Yt)(n||""))}));var n}};var rn=Object(je.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(je.createElement)(ye.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"}));var on=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible(e){let{width:t}=e;return isFinite(t)},migrate:e=>({...e,width:e.width+"%"}),save(e){let{attributes:t}=e;const{verticalAlignment:n,width:r}=t,o=tt()({["is-vertically-aligned-"+n]:n}),a={flexBasis:r+"%"};return Object(je.createElement)("div",{className:o,style:a},Object(je.createElement)(we.InnerBlocks.Content,null))}}];var an=function(e){let{attributes:{verticalAlignment:t,width:n,templateLock:r=!1,allowedBlocks:o},setAttributes:a,clientId:l}=e;const c=tt()("block-core-columns",{["is-vertically-aligned-"+t]:t}),i=Object(_e.__experimentalUseCustomUnits)({availableUnits:Object(we.useSetting)("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:s,hasChildBlocks:u,rootClientId:m}=Object(ze.useSelect)(e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(we.store),r=n(l);return{hasChildBlocks:t(l).length>0,rootClientId:r,columnsIds:t(r)}},[l]),{updateBlockAttributes:d}=Object(ze.useDispatch)(we.store),b=Number.isFinite(n)?n+"%":n,p=Object(we.useBlockProps)({className:c,style:b?{flexBasis:b}:void 0}),g=s.length,h=s.indexOf(l)+1,v=Object(ke.sprintf)(Object(ke.__)("%1$s (%2$d of %3$d)"),p["aria-label"],h,g),O=Object(we.useInnerBlocksProps)({...p,"aria-label":v},{templateLock:r,allowedBlocks:o,renderAppender:u?void 0:we.InnerBlocks.ButtonBlockAppender});return Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.BlockControls,null,Object(je.createElement)(we.BlockVerticalAlignmentToolbar,{onChange:e=>{a({verticalAlignment:e}),d(m,{verticalAlignment:null})},value:t})),Object(je.createElement)(we.InspectorControls,null,Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Column settings")},Object(je.createElement)(_e.__experimentalUnitControl,{label:Object(ke.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:n||"",onChange:e=>{e=0>parseFloat(e)?"0":e,a({width:e})},units:i}))),Object(je.createElement)("div",O))};const ln={apiVersion:2,name:"core/column",title:"Column",category:"text",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}}}},{name:cn}=ln,sn={icon:rn,edit:an,save:function(e){let{attributes:t}=e;const{verticalAlignment:n,width:r}=t,o=tt()({["is-vertically-aligned-"+n]:n});let a;if(r&&/\d/.test(r)){let e=Number.isFinite(r)?r+"%":r;if(!Number.isFinite(r)&&null!=r&&r.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(r)*t)/t+"%"}a={flexBasis:e}}const l=we.useBlockProps.save({className:o,style:a}),c=we.useInnerBlocksProps.save(l);return Object(je.createElement)("div",c)},deprecated:on};var un=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(ye.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));function mn(e){let t,{doc:n}=mn;n||(n=document.implementation.createHTMLDocument(""),mn.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var dn=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),{...Object(Me.omit)(e,["customTextColor","customBackgroundColor"]),style:t,isStackedOnMobile:!0}},save(e){let{attributes:t}=e;const{verticalAlignment:n,backgroundColor:r,customBackgroundColor:o,textColor:a,customTextColor:l}=t,c=Object(we.getColorClassName)("background-color",r),i=Object(we.getColorClassName)("color",a),s=tt()({"has-background":r||o,"has-text-color":a||l,[c]:c,[i]:i,["are-vertically-aligned-"+n]:n}),u={backgroundColor:c?void 0:o,color:i?void 0:l};return Object(je.createElement)("div",{className:s||void 0,style:u},Object(je.createElement)(we.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some(e=>/layout-column-\d+/.test(e.originalContent))&&t.some(e=>void 0!==mn(e.originalContent)),migrate(e,t){const n=t.reduce((e,t)=>{const{originalContent:n}=t;let r=mn(n);return void 0===r&&(r=0),e[r]||(e[r]=[]),e[r].push(t),e},[]).map(e=>Object(Oe.createBlock)("core/column",{},e));return[{...Object(Me.omit)(e,["columns"]),isStackedOnMobile:!0},n]},save(e){let{attributes:t}=e;const{columns:n}=t;return Object(je.createElement)("div",{className:`has-${n}-columns`},Object(je.createElement)(we.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate:(e,t)=>[e={...Object(Me.omit)(e,["columns"]),isStackedOnMobile:!0},t],save(e){let{attributes:t}=e;const{verticalAlignment:n,columns:r}=t,o=tt()(`has-${r}-columns`,{["are-vertically-aligned-"+n]:n});return Object(je.createElement)("div",{className:o},Object(je.createElement)(we.InnerBlocks.Content,null))}}];const bn=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function pn(e,t){const{width:n=100/t}=e.attributes;return bn(n)}function gn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return Object(Me.sumBy)(e,e=>pn(e,t))}function hn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce((e,n)=>{const r=pn(n,t);return Object.assign(e,{[n.clientId]:r})},{})}function vn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const r=gn(e,n);return Object(Me.mapValues)(hn(e,n),e=>bn(t*e/r))}function On(e,t){return e.map(e=>Object(Me.merge)({},e,{attributes:{width:t[e.clientId]+"%"}}))}const jn=["core/column"];const yn=Object(ze.withDispatch)((e,t,n)=>({updateAlignment(r){const{clientId:o,setAttributes:a}=t,{updateBlockAttributes:l}=e(we.store),{getBlockOrder:c}=n.select(we.store);a({verticalAlignment:r});c(o).forEach(e=>{l(e,{verticalAlignment:r})})},updateColumns(r,o){const{clientId:a}=t,{replaceInnerBlocks:l}=e(we.store),{getBlocks:c}=n.select(we.store);let i=c(a);const s=i.every(e=>{var t;const n=e.attributes.width;return Number.isFinite(null!=n&&null!==(t=n.endsWith)&&void 0!==t&&t.call(n,"%")?parseFloat(n):n)});const u=o>r;if(u&&s){const e=bn(100/o);i=[...On(i,vn(i,100-e)),...Object(Me.times)(o-r,()=>Object(Oe.createBlock)("core/column",{width:e+"%"}))]}else if(u)i=[...i,...Object(Me.times)(o-r,()=>Object(Oe.createBlock)("core/column"))];else if(i=Object(Me.dropRight)(i,r-o),s){i=On(i,vn(i,100))}l(a,i)}}))((function(e){let{attributes:t,setAttributes:n,updateAlignment:r,updateColumns:o,clientId:a}=e;const{isStackedOnMobile:l,verticalAlignment:c}=t,{count:i}=Object(ze.useSelect)(e=>({count:e(we.store).getBlockCount(a)}),[a]),s=tt()({["are-vertically-aligned-"+c]:c,"is-not-stacked-on-mobile":!l}),u=Object(we.useBlockProps)({className:s}),m=Object(we.useInnerBlocksProps)(u,{allowedBlocks:jn,orientation:"horizontal",renderAppender:!1});return Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.BlockControls,null,Object(je.createElement)(we.BlockVerticalAlignmentToolbar,{onChange:r,value:c})),Object(je.createElement)(we.InspectorControls,null,Object(je.createElement)(_e.PanelBody,null,Object(je.createElement)(_e.RangeControl,{label:Object(ke.__)("Columns"),value:i,onChange:e=>o(i,e),min:1,max:Math.max(6,i)}),i>6&&Object(je.createElement)(_e.Notice,{status:"warning",isDismissible:!1},Object(ke.__)("This column count exceeds the recommended amount and may cause visual breakage.")),Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Stack on mobile"),checked:l,onChange:()=>n({isStackedOnMobile:!l})}))),Object(je.createElement)("div",m))}));function fn(e){let{clientId:t,name:n,setAttributes:r}=e;const{blockType:o,defaultVariation:a,variations:l}=Object(ze.useSelect)(e=>{const{getBlockVariations:t,getBlockType:r,getDefaultBlockVariation:o}=e(Oe.store);return{blockType:r(n),defaultVariation:o(n,"block"),variations:t(n,"block")}},[n]),{replaceInnerBlocks:c}=Object(ze.useDispatch)(we.store),i=Object(we.useBlockProps)();return Object(je.createElement)("div",i,Object(je.createElement)(we.__experimentalBlockVariationPicker,{icon:Object(Me.get)(o,["icon","src"]),label:Object(Me.get)(o,["title"]),variations:l,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;e.attributes&&r(e.attributes),e.innerBlocks&&c(t,Object(Oe.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0}))}var _n=e=>{const{clientId:t}=e,n=Object(ze.useSelect)(e=>e(we.store).getBlocks(t).length>0,[t])?yn:fn;return Object(je.createElement)(n,e)};var kn=[{name:"one-column-full",title:Object(ke.__)("100"),description:Object(ke.__)("One column"),icon:Object(je.createElement)(_e.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"})),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:Object(ke.__)("50 / 50"),description:Object(ke.__)("Two columns; equal split"),icon:Object(je.createElement)(_e.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:Object(ke.__)("30 / 70"),description:Object(ke.__)("Two columns; one-third, two-thirds split"),icon:Object(je.createElement)(_e.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:Object(ke.__)("70 / 30"),description:Object(ke.__)("Two columns; two-thirds, one-third split"),icon:Object(je.createElement)(_e.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:Object(ke.__)("33 / 33 / 33"),description:Object(ke.__)("Three columns; equal split"),icon:Object(je.createElement)(_e.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:Object(ke.__)("25 / 50 / 25"),description:Object(ke.__)("Three columns; wide center column"),icon:Object(je.createElement)(_e.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}];var wn={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map(e=>{let{name:n,attributes:r,innerBlocks:o}=e;return["core/column",{width:t+"%"},[[n,{...r},o]]]});return Object(Oe.createBlock)("core/columns",{},Object(Oe.createBlocksFromInnerBlocksTemplate)(n))},isMatch:e=>{let{length:t}=e;return t&&t<=6}},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:r,textColor:o,style:a,mediaAlt:l,mediaId:c,mediaPosition:i,mediaSizeSlug:s,mediaType:u,mediaUrl:m,mediaWidth:d,verticalAlignment:b}=e;let p;if("image"!==u&&u)p=["core/video",{id:c,src:m}];else{p=["core/image",{...{id:c,alt:l,url:m,sizeSlug:s},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const g=[["core/column",{width:d+"%"},[p]],["core/column",{width:100-d+"%"},t]];return"right"===i&&g.reverse(),Object(Oe.createBlock)("core/columns",{align:n,backgroundColor:r,textColor:o,style:a,verticalAlignment:b},Object(Oe.createBlocksFromInnerBlocksTemplate)(g))}}]};const En={apiVersion:2,name:"core/columns",title:"Columns",category:"design",description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:Cn}=En,xn={icon:un,variations:kn,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:Object(ke.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:Object(ke.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:Object(ke.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:Object(ke.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:dn,edit:_n,save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,verticalAlignment:r}=t,o=tt()({["are-vertically-aligned-"+r]:r,"is-not-stacked-on-mobile":!n}),a=we.useBlockProps.save({className:o}),l=we.useInnerBlocksProps.save(a);return Object(je.createElement)("div",l)},transforms:wn};var Sn=Object(je.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(je.createElement)(ye.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"}));const Bn={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"};function Tn(e){return e?{backgroundImage:`url(${e})`}:{}}const Nn=["image","video"];function Pn(e){return 50===e||void 0===!e?null:"has-background-dim-"+10*Math.round(e/10)}function zn(e){return!e||"center center"===e||"center"===e}function In(e){return zn(e)?"":Bn[e]}function Mn(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function Rn(e){return{...e,dimRatio:e.url?e.dimRatio:100}}const Ln={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}};var Vn=[{attributes:{...Ln,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""}},supports:{anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:l,dimRatio:c,focalPoint:i,hasParallax:s,isRepeated:u,overlayColor:m,url:d,alt:b,id:p,minHeight:g,minHeightUnit:h}=t,v=Object(we.getColorClassName)("background-color",m),O=Object(we.__experimentalGetGradientClass)(r),j=h?`${g}${h}`:g,y="image"===n,f="video"===n,_=!(s||u),k={...y&&!_?Tn(d):{},backgroundColor:v?void 0:l,background:a&&!d?a:void 0,minHeight:j||void 0},w=i&&_?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,E=tt()(Mn(c),v,{"has-background-dim":0!==c,"has-parallax":s,"is-repeated":u,"has-background-gradient":r||a,[O]:!d&&O,"has-custom-content-position":!zn(o)},In(o));return Object(je.createElement)("div",we.useBlockProps.save({className:E,style:k}),d&&(r||a)&&0!==c&&Object(je.createElement)("span",{"aria-hidden":"true",className:tt()("wp-block-cover__gradient-background",O),style:a?{background:a}:void 0}),y&&_&&d&&Object(je.createElement)("img",{className:tt()("wp-block-cover__image-background",p?"wp-image-"+p:null),alt:b,src:d,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),f&&d&&Object(je.createElement)("video",{className:tt()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),Object(je.createElement)("div",{className:"wp-block-cover__inner-container"},Object(je.createElement)(we.InnerBlocks.Content,null)))},migrate:Rn},{attributes:{...Ln,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:l,dimRatio:c,focalPoint:i,hasParallax:s,isRepeated:u,overlayColor:m,url:d,minHeight:b,minHeightUnit:p}=t,g=Object(we.getColorClassName)("background-color",m),h=Object(we.__experimentalGetGradientClass)(r),v=p?`${b}${p}`:b,O="image"===n,j="video"===n,y=O?Tn(d):{},f={};let _;g||(y.backgroundColor=l),a&&!d&&(y.background=a),y.minHeight=v||void 0,i&&(_=`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`,O&&!s&&(y.backgroundPosition=_),j&&(f.objectPosition=_));const k=tt()(Mn(c),g,{"has-background-dim":0!==c,"has-parallax":s,"is-repeated":u,"has-background-gradient":r||a,[h]:!d&&h,"has-custom-content-position":!zn(o)},In(o));return Object(je.createElement)("div",we.useBlockProps.save({className:k,style:y}),d&&(r||a)&&0!==c&&Object(je.createElement)("span",{"aria-hidden":"true",className:tt()("wp-block-cover__gradient-background",h),style:a?{background:a}:void 0}),j&&d&&Object(je.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:f}),Object(je.createElement)("div",{className:"wp-block-cover__inner-container"},Object(je.createElement)(we.InnerBlocks.Content,null)))},migrate:Rn},{attributes:{...Ln,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,customGradient:o,customOverlayColor:a,dimRatio:l,focalPoint:c,hasParallax:i,overlayColor:s,url:u,minHeight:m}=t,d=Object(we.getColorClassName)("background-color",s),b=Object(we.__experimentalGetGradientClass)(r),p="image"===n?Tn(u):{};d||(p.backgroundColor=a),c&&!i&&(p.backgroundPosition=`${Math.round(100*c.x)}% ${Math.round(100*c.y)}%`),o&&!u&&(p.background=o),p.minHeight=m||void 0;const g=tt()(Mn(l),d,{"has-background-dim":0!==l,"has-parallax":i,"has-background-gradient":o,[b]:!u&&b});return Object(je.createElement)("div",{className:g,style:p},u&&(r||o)&&0!==l&&Object(je.createElement)("span",{"aria-hidden":"true",className:tt()("wp-block-cover__gradient-background",b),style:o?{background:o}:void 0}),"video"===n&&u&&Object(je.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),Object(je.createElement)("div",{className:"wp-block-cover__inner-container"},Object(je.createElement)(we.InnerBlocks.Content,null)))},migrate:Rn},{attributes:{...Ln,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,customGradient:o,customOverlayColor:a,dimRatio:l,focalPoint:c,hasParallax:i,overlayColor:s,url:u,minHeight:m}=t,d=Object(we.getColorClassName)("background-color",s),b=Object(we.__experimentalGetGradientClass)(r),p="image"===n?Tn(u):{};d||(p.backgroundColor=a),c&&!i&&(p.backgroundPosition=`${100*c.x}% ${100*c.y}%`),o&&!u&&(p.background=o),p.minHeight=m||void 0;const g=tt()(Mn(l),d,{"has-background-dim":0!==l,"has-parallax":i,"has-background-gradient":o,[b]:!u&&b});return Object(je.createElement)("div",{className:g,style:p},u&&(r||o)&&0!==l&&Object(je.createElement)("span",{"aria-hidden":"true",className:tt()("wp-block-cover__gradient-background",b),style:o?{background:o}:void 0}),"video"===n&&u&&Object(je.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),Object(je.createElement)("div",{className:"wp-block-cover__inner-container"},Object(je.createElement)(we.InnerBlocks.Content,null)))},migrate:Rn},{attributes:{...Ln,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,contentAlign:r,customOverlayColor:o,dimRatio:a,focalPoint:l,hasParallax:c,overlayColor:i,title:s,url:u}=t,m=Object(we.getColorClassName)("background-color",i),d="image"===n?Tn(u):{};m||(d.backgroundColor=o),l&&!c&&(d.backgroundPosition=`${100*l.x}% ${100*l.y}%`);const b=tt()(Mn(a),m,{"has-background-dim":0!==a,"has-parallax":c,[`has-${r}-content`]:"center"!==r});return Object(je.createElement)("div",{className:b,style:d},"video"===n&&u&&Object(je.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!we.RichText.isEmpty(s)&&Object(je.createElement)(we.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:s}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100};return[Object(Me.omit)(t,["title","contentAlign"]),[Object(Oe.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(ke.__)("Write title…")})]]}},{attributes:{...Ln,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save(e){let{attributes:t}=e;const{url:n,title:r,hasParallax:o,dimRatio:a,align:l,contentAlign:c,overlayColor:i,customOverlayColor:s}=t,u=Object(we.getColorClassName)("background-color",i),m=Tn(n);u||(m.backgroundColor=s);const d=tt()("wp-block-cover-image",Mn(a),u,{"has-background-dim":0!==a,"has-parallax":o,[`has-${c}-content`]:"center"!==c},l?"align"+l:null);return Object(je.createElement)("div",{className:d,style:m},!we.RichText.isEmpty(r)&&Object(je.createElement)(we.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100};return[Object(Me.omit)(t,["title","contentAlign","align"]),[Object(Oe.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(ke.__)("Write title…")})]]}},{attributes:{...Ln,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save(e){let{attributes:t}=e;const{url:n,title:r,hasParallax:o,dimRatio:a,align:l}=t,c=Tn(n),i=tt()("wp-block-cover-image",Mn(a),{"has-background-dim":0!==a,"has-parallax":o},l?"align"+l:null);return Object(je.createElement)("section",{className:i,style:c},Object(je.createElement)(we.RichText.Content,{tagName:"h2",value:r}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100};return[Object(Me.omit)(t,["title","contentAlign","align"]),[Object(Oe.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(ke.__)("Write title…")})]]}}],An=n("FEKF"),Hn=n.n(An),Fn=n("fHnH"),Dn=n("abaT");Object(Fn.b)([Dn.a]);const{__Visualizer:Gn}=_e.__experimentalBoxControl;function Un(){return Un.fastAverageColor||(Un.fastAverageColor=new Hn.a),Un.fastAverageColor}function qn(e){let{onChange:t,onUnitChange:n,unit:r="px",value:o=""}=e;const[a,l]=Object(je.useState)(null),c="block-cover-height-input-"+Object(nt.useInstanceId)(we.__experimentalUnitControl),i="px"===r,s=Object(_e.__experimentalUseCustomUnits)({availableUnits:Object(we.useSetting)("spacing.units")||["px","em","rem","vw","vh"],defaultValues:{px:"430",em:"20",rem:"20",vw:"20",vh:"50"}}),u=null!==a?a:o,m=i?50:0;return Object(je.createElement)(_e.BaseControl,{label:Object(ke.__)("Minimum height of cover"),id:c},Object(je.createElement)(we.__experimentalUnitControl,{id:c,isResetValueOnUnitChange:!0,min:m,onBlur:()=>{null!==a&&l(null)},onChange:e=>{const r=""!==e?parseFloat(e):void 0;isNaN(r)&&void 0!==r?l(e):(l(null),t(r),void 0===r&&n())},onUnitChange:n,style:{maxWidth:80},unit:r,units:s,value:u}))}const Wn={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};function $n(e){let{className:t,onResizeStart:n,onResize:r,onResizeStop:o,...a}=e;const[l,c]=Object(je.useState)(!1);return Object(je.createElement)(_e.ResizableBox,Object(mt.a)({className:tt()(t,{"is-resizing":l}),enable:Wn,onResizeStart:(e,t,o)=>{n(o.clientHeight),r(o.clientHeight)},onResize:(e,t,n)=>{r(n.clientHeight),l||c(!0)},onResizeStop:(e,t,n)=>{o(n.clientHeight),c(!1)}},a))}function Zn(e){let{x:t,y:n}=e;return`${Math.round(100*t)}% ${Math.round(100*n)}%`}function Kn(e){let{disableMediaButtons:t=!1,children:n,noticeUI:r,noticeOperations:o,onSelectMedia:a,style:l}=e;const{removeAllNotices:c,createErrorNotice:i}=o;return Object(je.createElement)(we.MediaPlaceholder,{icon:Object(je.createElement)(we.BlockIcon,{icon:Sn}),labels:{title:Object(ke.__)("Cover"),instructions:Object(ke.__)("Drag and drop onto this block, upload, or select existing media from your library.")},onSelect:a,accept:"image/*,video/*",allowedTypes:Nn,notices:r,disableMediaButtons:t,onError:e=>{c(),i(e)},style:l},n)}var Jn=Object(nt.compose)([Object(ze.withDispatch)(e=>{const{toggleSelection:t,__unstableMarkNextChangeAsNotPersistent:n}=e(we.store);return{toggleSelection:t,markNextChangeAsNotPersistent:n}}),Object(we.withColors)({overlayColor:"background-color"}),_e.withNotices,nt.withInstanceId])((function(e){var t,n,r;let{attributes:o,clientId:a,isSelected:l,noticeUI:c,noticeOperations:i,overlayColor:s,setAttributes:u,setOverlayColor:m,toggleSelection:d,markNextChangeAsNotPersistent:b}=e;const{contentPosition:p,id:g,backgroundType:h,dimRatio:v,focalPoint:O,hasParallax:j,isDark:y,isRepeated:f,minHeight:_,minHeightUnit:k,style:w,url:E,alt:C,allowedBlocks:x,templateLock:S}=o,{gradientClass:B,gradientValue:T,setGradient:N}=Object(we.__experimentalUseGradient)(),P=function(e,t){return n=>{if(!n||!n.url)return void e({url:void 0,id:void 0});let r;if(Object(Pe.isBlobURL)(n.url)&&(n.type=Object(Pe.getBlobTypeByURL)(n.url)),n.media_type)r="image"===n.media_type?"image":"video";else{if("image"!==n.type&&"video"!==n.type)return;r=n.type}e({dimRatio:100===t?50:t,url:n.url,id:n.id,alt:null==n?void 0:n.alt,backgroundType:r,..."video"===r?{focalPoint:void 0,hasParallax:void 0}:{}})}}(u,v),z=((e,t)=>!e&&Object(Pe.isBlobURL)(t))(g,E),[I,M]=Object(je.useState)(_),[R,L]=Object(je.useState)(k),V="vh"===k&&100===_,A=Object(je.useRef)(),H=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const[o,a]=Object(je.useState)(!1);return Object(je.useEffect)(()=>{e&&t<=50&&r.current&&Un().getColorAsync(r.current,e=>{a(e.isDark)})},[e,e&&t<=50&&r.current,a]),Object(je.useEffect)(()=>{if(t>50||!e){if(!n)return void a(!0);a(Object(Fn.a)(n).isDark())}},[n,t>50||!e,a]),Object(je.useEffect)(()=>{e||n||a(!1)},[!e&&!n,a]),o}(E,v,s.color,A);Object(je.useEffect)(()=>{b(),u({isDark:H})},[H]);const F="image"===h,D="video"===h,[G,U]=Object(je.useState)(null),q=k?`${_}${k}`:_,W=!(j||f),$={...F&&!W?Tn(E):void 0,minHeight:G||q||void 0},Z={backgroundColor:s.color},K={objectPosition:O&&W?Zn(O):void 0},J=!!(E||s.color||T),Q=D||F&&(!j||f),Y=e=>{const[t,n]=A.current?[A.current.style,"objectPosition"]:[te.current.style,"backgroundPosition"];t[n]=Zn(e)},X=Object(ze.useSelect)(e=>e(we.store).getBlock(a).innerBlocks.length>0,[a]),ee=Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.BlockControls,{group:"block"},Object(je.createElement)(we.__experimentalBlockAlignmentMatrixControl,{label:Object(ke.__)("Change content position"),value:p,onChange:e=>u({contentPosition:e}),isDisabled:!X}),Object(je.createElement)(we.__experimentalBlockFullHeightAligmentControl,{isActive:V,onToggle:()=>V?u("vh"===R&&100===I?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:I,minHeightUnit:R}):(M(_),L(k),u({minHeight:100,minHeightUnit:"vh"})),isDisabled:!X})),Object(je.createElement)(we.BlockControls,{group:"other"},Object(je.createElement)(we.MediaReplaceFlow,{mediaId:g,mediaURL:E,allowedTypes:Nn,accept:"image/*,video/*",onSelect:P,name:E?Object(ke.__)("Replace"):Object(ke.__)("Add Media")})),Object(je.createElement)(we.InspectorControls,null,!!E&&Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Media settings")},F&&Object(je.createElement)(je.Fragment,null,Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Fixed background"),checked:j,onChange:()=>{u({hasParallax:!j,...j?{}:{focalPoint:void 0}})}}),Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Repeated background"),checked:f,onChange:()=>{u({isRepeated:!f})}})),Q&&Object(je.createElement)(_e.FocalPointPicker,{label:Object(ke.__)("Focal point picker"),url:E,value:O,onDragStart:Y,onDrag:Y,onChange:e=>u({focalPoint:e})}),E&&F&&W&&Object(je.createElement)(_e.TextareaControl,{label:Object(ke.__)("Alt text (alternative text)"),value:C,onChange:e=>u({alt:e}),help:Object(je.createElement)(je.Fragment,null,Object(je.createElement)(_e.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},Object(ke.__)("Describe the purpose of the image")),Object(ke.__)("Leave empty if the image is purely decorative."))}),Object(je.createElement)(_e.PanelRow,null,Object(je.createElement)(_e.Button,{variant:"secondary",isSmall:!0,className:"block-library-cover__reset-button",onClick:()=>u({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0})},Object(ke.__)("Clear Media")))),Object(je.createElement)(we.__experimentalPanelColorGradientSettings,{__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,title:Object(ke.__)("Overlay"),initialOpen:!0,settings:[{colorValue:s.color,gradientValue:T,onColorChange:m,onGradientChange:N,label:Object(ke.__)("Color")}]},Object(je.createElement)(_e.RangeControl,{label:Object(ke.__)("Opacity"),value:v,onChange:e=>u({dimRatio:e}),min:0,max:100,step:10,required:!0}))),Object(je.createElement)(we.InspectorControls,{__experimentalGroup:"dimensions"},Object(je.createElement)(_e.__experimentalToolsPanelItem,{hasValue:()=>!!_,label:Object(ke.__)("Minimum height"),onDeselect:()=>u({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:a},Object(je.createElement)(qn,{value:G||_,unit:k,onChange:e=>u({minHeight:e}),onUnitChange:e=>u({minHeightUnit:e})})))),te=Object(je.useRef)(),ne=Object(we.useBlockProps)({ref:te}),re=function(e){return[["core/paragraph",{align:"center",placeholder:Object(ke.__)("Write title…"),...e}]]}({fontSize:!(null===(t=Object(we.useSetting)("typography.fontSizes"))||void 0===t||!t.length)?"large":void 0}),oe=Object(we.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:re,templateInsertUpdatesSelection:!0,allowedBlocks:x,templateLock:S});if(!X&&!J)return Object(je.createElement)(je.Fragment,null,ee,Object(je.createElement)("div",Object(mt.a)({},ne,{className:tt()("is-placeholder",ne.className)}),Object(je.createElement)(Kn,{noticeUI:c,onSelectMedia:P,noticeOperations:i,style:{minHeight:G||q||void 0}},Object(je.createElement)("div",{className:"wp-block-cover__placeholder-background-options"},Object(je.createElement)(we.ColorPalette,{disableCustomColors:!0,value:s.color,onChange:m,clearable:!1}))),Object(je.createElement)($n,{className:"block-library-cover__resize-container",onResizeStart:()=>{u({minHeightUnit:"px"}),d(!1)},onResize:U,onResizeStop:e=>{d(!0),u({minHeight:e}),U(null)},showHandle:l})));const ae=tt()({"is-dark-theme":y,"is-light":!y,"is-transient":z,"has-parallax":j,"is-repeated":f,"has-custom-content-position":!zn(p)},In(p));return Object(je.createElement)(je.Fragment,null,ee,Object(je.createElement)("div",Object(mt.a)({},ne,{className:tt()(ae,ne.className),style:{...$,...ne.style},"data-url":E}),Object(je.createElement)(Gn,{values:null==w||null===(n=w.spacing)||void 0===n?void 0:n.padding,showValues:null==w||null===(r=w.visualizers)||void 0===r?void 0:r.padding}),Object(je.createElement)($n,{className:"block-library-cover__resize-container",onResizeStart:()=>{u({minHeightUnit:"px"}),d(!1)},onResize:U,onResizeStop:e=>{d(!0),u({minHeight:e}),U(null)},showHandle:l}),Object(je.createElement)("span",{"aria-hidden":"true",className:tt()(Pn(v),{[s.class]:s.class},"wp-block-cover__gradient-background",B,{"has-background-dim":void 0!==v,"has-background-gradient":T,[B]:!E&&B}),style:{backgroundImage:T,...Z}}),E&&F&&W&&Object(je.createElement)("img",{ref:A,className:"wp-block-cover__image-background",alt:C,src:E,style:K}),E&&D&&Object(je.createElement)("video",{ref:A,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:E,style:K}),z&&Object(je.createElement)(_e.Spinner,null),Object(je.createElement)(Kn,{disableMediaButtons:!0,noticeUI:c,onSelectMedia:P,noticeOperations:i}),Object(je.createElement)("div",oe)))}));var Qn={from:[{type:"block",blocks:["core/image"],transform:e=>{var t;let{caption:n,url:r,alt:o,align:a,id:l,anchor:c,style:i}=e;return Object(Oe.createBlock)("core/cover",{dimRatio:50,url:r,alt:o,align:a,id:l,anchor:c,style:{color:{duotone:null==i||null===(t=i.color)||void 0===t?void 0:t.duotone}}},[Object(Oe.createBlock)("core/paragraph",{content:n,fontSize:"large"})])}},{type:"block",blocks:["core/video"],transform:e=>{let{caption:t,src:n,align:r,id:o,anchor:a}=e;return Object(Oe.createBlock)("core/cover",{dimRatio:50,url:n,align:r,id:o,backgroundType:"video",anchor:a},[Object(Oe.createBlock)("core/paragraph",{content:t,fontSize:"large"})])}},{type:"block",blocks:["core/group"],isMatch:e=>{var t,n;let{backgroundColor:r,gradient:o,style:a}=e;return r||(null==a||null===(t=a.color)||void 0===t?void 0:t.background)||(null==a||null===(n=a.color)||void 0===n?void 0:n.gradient)||o},transform:(e,t)=>{var n,r;let{align:o,anchor:a,backgroundColor:l,gradient:c,style:i}=e;return Object(Oe.createBlock)("core/cover",{align:o,anchor:a,overlayColor:l,customOverlayColor:null==i||null===(n=i.color)||void 0===n?void 0:n.background,gradient:c,customGradient:null==i||null===(r=i.color)||void 0===r?void 0:r.gradient},t)}}],to:[{type:"block",blocks:["core/image"],isMatch:e=>{let{backgroundType:t,url:n,overlayColor:r,customOverlayColor:o,gradient:a,customGradient:l}=e;return n?"image"===t:!(r||o||a||l)},transform:e=>{var t;let{title:n,url:r,alt:o,align:a,id:l,anchor:c,style:i}=e;return Object(Oe.createBlock)("core/image",{caption:n,url:r,alt:o,align:a,id:l,anchor:c,style:{color:{duotone:null==i||null===(t=i.color)||void 0===t?void 0:t.duotone}}})}},{type:"block",blocks:["core/video"],isMatch:e=>{let{backgroundType:t,url:n,overlayColor:r,customOverlayColor:o,gradient:a,customGradient:l}=e;return n?"video"===t:!(r||o||a||l)},transform:e=>{let{title:t,url:n,align:r,id:o,anchor:a}=e;return Object(Oe.createBlock)("core/video",{caption:t,src:n,id:o,align:r,anchor:a})}}]};const Yn={apiVersion:2,name:"core/cover",title:"Cover",category:"media",description:"Add an image or video with a text overlay — great for headers.",textdomain:"default",attributes:{url:{type:"string"},id:{type:"number"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},editorStyle:"wp-block-cover-editor",style:"wp-block-cover"},{name:Xn}=Yn,er={icon:Sn,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{customFontSize:48,content:Object(ke.__)("Snow Patrol"),align:"center"}}]},transforms:Qn,save:function(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,contentPosition:o,customGradient:a,customOverlayColor:l,dimRatio:c,focalPoint:i,hasParallax:s,isDark:u,isRepeated:m,overlayColor:d,url:b,alt:p,id:g,minHeight:h,minHeightUnit:v}=t,O=Object(we.getColorClassName)("background-color",d),j=Object(we.__experimentalGetGradientClass)(r),y=v?`${h}${v}`:h,f="image"===n,_="video"===n,k=!(s||m),w={...f&&!k?Tn(b):{},minHeight:y||void 0},E={backgroundColor:O?void 0:l,background:a||void 0},C=i&&k?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,x=tt()({"is-light":!u,"has-parallax":s,"is-repeated":m,"has-custom-content-position":!zn(o)},In(o));return Object(je.createElement)("div",we.useBlockProps.save({className:x,style:w}),Object(je.createElement)("span",{"aria-hidden":"true",className:tt()(O,Pn(c),"wp-block-cover__gradient-background",j,{"has-background-dim":void 0!==c,"has-background-gradient":r||a,[j]:!b&&j}),style:E}),f&&k&&b&&Object(je.createElement)("img",{className:tt()("wp-block-cover__image-background",g?"wp-image-"+g:null),alt:p,src:b,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),_&&b&&Object(je.createElement)("video",{className:tt()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:b,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),Object(je.createElement)("div",we.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))},edit:Jn,deprecated:Vn};var tr=n("B9Az");function nr(e){return e?Object(ke.__)("This embed will preserve its aspect ratio when the browser is resized."):Object(ke.__)("This embed may not preserve its aspect ratio when the browser is resized.")}var rr=e=>{let{blockSupportsResponsive:t,showEditButton:n,themeSupportsResponsive:r,allowResponsive:o,toggleResponsive:a,switchBackToURLInput:l}=e;return Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.BlockControls,null,Object(je.createElement)(_e.ToolbarGroup,null,n&&Object(je.createElement)(_e.ToolbarButton,{className:"components-toolbar__control",label:Object(ke.__)("Edit URL"),icon:tr.a,onClick:l}))),r&&t&&Object(je.createElement)(we.InspectorControls,null,Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Media settings"),className:"blocks-responsive"},Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Resize for smaller devices"),checked:o,help:nr,onChange:a}))))};const or=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.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"})),ar=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.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"})),lr=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.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"})),cr=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(_e.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"})),ir={foreground:"#1da1f2",src:Object(je.createElement)(_e.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(je.createElement)(_e.G,null,Object(je.createElement)(_e.Path,{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})))},sr={foreground:"#ff0000",src:Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.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"}))},ur={foreground:"#3b5998",src:Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.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"}))},mr=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.G,null,Object(je.createElement)(_e.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"}))),dr={foreground:"#0073AA",src:Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.G,null,Object(je.createElement)(_e.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"})))},br={foreground:"#1db954",src:Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.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"}))},pr=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.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"})),gr={foreground:"#1ab7ea",src:Object(je.createElement)(_e.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(je.createElement)(_e.G,null,Object(je.createElement)(_e.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"})))},hr=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.Path,{d:"M22 11.816c0-1.256-1.02-2.277-2.277-2.277-.593 0-1.122.24-1.526.613-1.48-.965-3.455-1.594-5.647-1.69l1.17-3.702 3.18.75c.01 1.027.847 1.86 1.877 1.86 1.035 0 1.877-.84 1.877-1.877 0-1.035-.842-1.877-1.877-1.877-.77 0-1.43.466-1.72 1.13L13.55 3.92c-.204-.047-.4.067-.46.26l-1.35 4.27c-2.317.037-4.412.67-5.97 1.67-.402-.355-.917-.58-1.493-.58C3.02 9.54 2 10.56 2 11.815c0 .814.433 1.523 1.078 1.925-.037.222-.06.445-.06.673 0 3.292 4.01 5.97 8.94 5.97s8.94-2.678 8.94-5.97c0-.214-.02-.424-.052-.632.687-.39 1.154-1.12 1.154-1.964zm-3.224-7.422c.606 0 1.1.493 1.1 1.1s-.493 1.1-1.1 1.1-1.1-.494-1.1-1.1.493-1.1 1.1-1.1zm-16 7.422c0-.827.673-1.5 1.5-1.5.313 0 .598.103.838.27-.85.675-1.477 1.478-1.812 2.36-.32-.274-.525-.676-.525-1.13zm9.183 7.79c-4.502 0-8.165-2.33-8.165-5.193S7.457 9.22 11.96 9.22s8.163 2.33 8.163 5.193-3.663 5.193-8.164 5.193zM20.635 13c-.326-.89-.948-1.7-1.797-2.383.247-.186.55-.3.882-.3.827 0 1.5.672 1.5 1.5 0 .482-.23.91-.586 1.184zm-11.64 1.704c-.76 0-1.397-.616-1.397-1.376 0-.76.636-1.397 1.396-1.397.76 0 1.376.638 1.376 1.398 0 .76-.616 1.376-1.376 1.376zm7.405-1.376c0 .76-.615 1.376-1.375 1.376s-1.4-.616-1.4-1.376c0-.76.64-1.397 1.4-1.397.76 0 1.376.638 1.376 1.398zm-1.17 3.38c.15.152.15.398 0 .55-.675.674-1.728 1.002-3.22 1.002l-.01-.002-.012.002c-1.492 0-2.544-.328-3.218-1.002-.152-.152-.152-.398 0-.55.152-.152.4-.15.55 0 .52.52 1.394.775 2.67.775l.01.002.01-.002c1.276 0 2.15-.253 2.67-.775.15-.152.398-.152.55 0z"})),vr={foreground:"#35465c",src:Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.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"}))},Or=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.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"}),Object(je.createElement)(_e.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"}),Object(je.createElement)(_e.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"})),jr=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),Object(je.createElement)(_e.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"}),Object(je.createElement)(_e.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),Object(je.createElement)(_e.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"}),Object(je.createElement)(_e.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),Object(je.createElement)(_e.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})),yr=Object(je.createElement)(_e.SVG,{viewBox:"0 0 24 24"},Object(je.createElement)(_e.Path,{d:"m12.1479 18.5957c-2.4949 0-4.28131-1.7558-4.28131-4.0658 0-2.2176 1.78641-4.0965 4.09651-4.0965 2.2793 0 4.0349 1.7864 4.0349 4.1581 0 2.2794-1.7556 4.0042-3.8501 4.0042zm8.3521-18.5957-4.5329 1v7c-1.1088-1.41691-2.8028-1.8787-4.8049-1.8787-2.09443 0-3.97329.76993-5.5133 2.27917-1.72483 1.66323-2.6489 3.78863-2.6489 6.16033 0 2.5873.98562 4.8049 2.89526 6.499 1.44763 1.2936 3.17251 1.9402 5.17454 1.9402 1.9713 0 3.4498-.5236 4.8973-1.9402v1.9402h4.5329c0-7.6359 0-15.3641 0-23z",fill:"#333436"})),fr=Object(je.createElement)(_e.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},Object(je.createElement)(_e.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"})),_r=Object(je.createElement)(_e.SVG,{viewBox:"0 0 44 44"},Object(je.createElement)(_e.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"}));var kr=()=>Object(je.createElement)("div",{className:"wp-block-embed is-loading"},Object(je.createElement)(_e.Spinner,null),Object(je.createElement)("p",null,Object(ke.__)("Embedding…")));var wr=e=>{let{icon:t,label:n,value:r,onSubmit:o,onChange:a,cannotEmbed:l,fallback:c,tryAgain:i}=e;return Object(je.createElement)(_e.Placeholder,{icon:Object(je.createElement)(we.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-embed",instructions:Object(ke.__)("Paste a link to the content you want to display on your site.")},Object(je.createElement)("form",{onSubmit:o},Object(je.createElement)("input",{type:"url",value:r||"",className:"components-placeholder__input","aria-label":n,placeholder:Object(ke.__)("Enter URL to embed here…"),onChange:a}),Object(je.createElement)(_e.Button,{variant:"primary",type:"submit"},Object(ke._x)("Embed","button label"))),Object(je.createElement)("div",{className:"components-placeholder__learn-more"},Object(je.createElement)(_e.ExternalLink,{href:Object(ke.__)("https://wordpress.org/support/article/embeds/")},Object(ke.__)("Learn more about embeds"))),l&&Object(je.createElement)("div",{className:"components-placeholder__error"},Object(je.createElement)("div",{className:"components-placeholder__instructions"},Object(ke.__)("Sorry, this content could not be embedded.")),Object(je.createElement)(_e.Button,{variant:"secondary",onClick:i},Object(ke._x)("Try again","button label"))," ",Object(je.createElement)(_e.Button,{variant:"secondary",onClick:c},Object(ke._x)("Convert to link","button label"))))};const Er={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function Cr(e){let{html:t}=e;const n=Object(je.useRef)(),r=Object(je.useMemo)(()=>{const e=(new window.DOMParser).parseFromString(t,"text/html").querySelector("iframe"),n={};return e?(Array.from(e.attributes).forEach(e=>{let{name:t,value:r}=e;"style"!==t&&(n[Er[t]||t]=r)}),n):n},[t]);return Object(je.useEffect)(()=>{const{ownerDocument:e}=n.current,{defaultView:t}=e;function o(e){let{data:{secret:t,message:o,value:a}={}}=e;"height"===o&&t===r["data-secret"]&&(n.current.height=a)}return t.addEventListener("message",o),()=>{t.removeEventListener("message",o)}},[]),Object(je.createElement)("div",{className:"wp-block-embed__wrapper"},Object(je.createElement)("iframe",Object(mt.a)({ref:Object(nt.useMergeRefs)([n,Object(nt.useFocusableIframe)()]),title:r.title},r)))}class xr extends je.Component{constructor(){super(...arguments),this.hideOverlay=this.hideOverlay.bind(this),this.state={interactive:!1}}static getDerivedStateFromProps(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}hideOverlay(){this.setState({interactive:!0})}render(){const{preview:e,previewable:t,url:n,type:r,caption:o,onCaptionChange:a,isSelected:l,className:c,icon:i,label:s,insertBlocksAfter:u}=this.props,{scripts:m}=e,{interactive:d}=this.state,b="photo"===r?(e=>{const t=e.thumbnail_url||e.url,n=Object(je.createElement)("p",null,Object(je.createElement)("img",{src:t,alt:e.title,width:"100%"}));return Object(je.renderToString)(n)})(e):e.html,p=new URL(n).host.split("."),g=p.splice(p.length-2,p.length-1).join("."),h=Object(ke.sprintf)(Object(ke.__)("Embedded content from %s"),g),v=Le()(r,c,"wp-block-embed__wrapper"),O="wp-embed"===r?Object(je.createElement)(Cr,{html:b}):Object(je.createElement)("div",{className:"wp-block-embed__wrapper"},Object(je.createElement)(_e.SandBox,{html:b,scripts:m,title:h,type:v,onFocus:this.hideOverlay}),!d&&Object(je.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}));return Object(je.createElement)("figure",{className:Le()(c,"wp-block-embed",{"is-type-video":"video"===r})},t?O:Object(je.createElement)(_e.Placeholder,{icon:Object(je.createElement)(we.BlockIcon,{icon:i,showColors:!0}),label:s},Object(je.createElement)("p",{className:"components-placeholder__error"},Object(je.createElement)("a",{href:n},n)),Object(je.createElement)("p",{className:"components-placeholder__error"},Object(ke.sprintf)(Object(ke.__)("Embedded content from %s can't be previewed in the editor."),g))),(!we.RichText.isEmpty(o)||l)&&Object(je.createElement)(we.RichText,{tagName:"figcaption",placeholder:Object(ke.__)("Add caption"),value:o,onChange:a,inlineToolbar:!0,__unstableOnSplitAtEnd:()=>u(Object(Oe.createBlock)("core/paragraph"))}))}}var Sr=xr;var Br=e=>{const{attributes:{providerNameSlug:t,previewable:n,responsive:r,url:o},attributes:a,isSelected:l,onReplace:c,setAttributes:i,insertBlocksAfter:s,onFocus:u}=e,m={title:Object(ke._x)("Embed","block title"),icon:or},{icon:d,title:b}=(p=t,(null===(g=Object(Oe.getBlockVariations)(He))||void 0===g?void 0:g.find(e=>{let{name:t}=e;return t===p}))||m);var p,g;const[h,v]=Object(je.useState)(o),[O,j]=Object(je.useState)(!1),{invalidateResolution:y}=Object(ze.useDispatch)(It.store),{preview:f,fetching:_,themeSupportsResponsive:k,cannotEmbed:w}=Object(ze.useSelect)(e=>{var t;const{getEmbedPreview:n,isPreviewEmbedFallback:r,isRequestingEmbedPreview:a,getThemeSupports:l}=e(It.store);if(!o)return{fetching:!1,cannotEmbed:!1};const c=n(o),i=r(o),s=!1===(null==c?void 0:c.html)&&void 0===(null==c?void 0:c.type),u=404===(null==c||null===(t=c.data)||void 0===t?void 0:t.status),m=!!c&&!s&&!u;return{preview:m?c:void 0,fetching:a(o),themeSupportsResponsive:l()["responsive-embeds"],cannotEmbed:!m||i}},[o]),E=()=>{const{allowResponsive:e,className:t}=a;return{...a,...We(f,b,t,r,e)}};Object(je.useEffect)(()=>{if(null==f||!f.html||!w||_)return;const e=o.replace(/\/$/,"");v(e),j(!1),i({url:e})},[null==f?void 0:f.html,o]),Object(je.useEffect)(()=>{if(f&&!O&&(i(E()),c)){const t=Ge(e,E());t&&c(t)}},[f,O]);const C=Object(we.useBlockProps)();if(_)return Object(je.createElement)(ye.View,C,Object(je.createElement)(kr,null));const x=Object(ke.sprintf)(Object(ke.__)("%s URL"),b);if(!f||w||O)return Object(je.createElement)(ye.View,C,Object(je.createElement)(wr,{icon:d,label:x,onFocus:u,onSubmit:e=>{e&&e.preventDefault(),j(!1),i({url:h})},value:h,cannotEmbed:w,onChange:e=>v(e.target.value),fallback:()=>function(e,t){const n=Object(je.createElement)("a",{href:e},e);t(Object(Oe.createBlock)("core/paragraph",{content:Object(je.renderToString)(n)}))}(h,c),tryAgain:()=>{y("getEmbedPreview",[h])}}));const{caption:S,type:B,allowResponsive:T,className:N}=E(),P=tt()(N,e.className);return Object(je.createElement)(je.Fragment,null,Object(je.createElement)(rr,{showEditButton:f&&!w,themeSupportsResponsive:k,blockSupportsResponsive:r,allowResponsive:T,toggleResponsive:()=>{const{allowResponsive:e,className:t}=a,{html:n}=f,o=!e;i({allowResponsive:o,className:qe(n,t,r&&o)})},switchBackToURLInput:()=>j(!0)}),Object(je.createElement)(ye.View,C,Object(je.createElement)(Sr,{preview:f,previewable:n,className:P,url:h,type:B,caption:S,onCaptionChange:e=>i({caption:e}),isSelected:l,icon:d,label:x,insertBlocksAfter:s})))};const{name:Tr}={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"};var Nr={from:[{type:"raw",isMatch:e=>{var t,n;return"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)&&1===(null===(t=e.textContent)||void 0===t||null===(n=t.match(/https/gi))||void 0===n?void 0:n.length)},transform:e=>Object(Oe.createBlock)(Tr,{url:e.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],isMatch:e=>{let{url:t}=e;return!!t},transform:e=>{let{url:t,caption:n}=e,r=`${t}`;return null!=n&&n.trim()&&(r+="
"+n),Object(Oe.createBlock)("core/paragraph",{content:r})}}]};const Pr=[{name:"twitter",title:"Twitter",icon:ir,keywords:["tweet",Object(ke.__)("social")],description:Object(ke.__)("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:"YouTube",icon:sr,keywords:[Object(ke.__)("music"),Object(ke.__)("video")],description:Object(ke.__)("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:"Facebook",icon:ur,keywords:[Object(ke.__)("social")],description:Object(ke.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:"Instagram",icon:mr,keywords:[Object(ke.__)("image"),Object(ke.__)("social")],description:Object(ke.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:"WordPress",icon:dr,keywords:[Object(ke.__)("post"),Object(ke.__)("blog")],description:Object(ke.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:"SoundCloud",icon:ar,keywords:[Object(ke.__)("music"),Object(ke.__)("audio")],description:Object(ke.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:"Spotify",icon:br,keywords:[Object(ke.__)("music"),Object(ke.__)("audio")],description:Object(ke.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:"Flickr",icon:pr,keywords:[Object(ke.__)("image")],description:Object(ke.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:"Vimeo",icon:gr,keywords:[Object(ke.__)("video")],description:Object(ke.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:"Animoto",icon:jr,description:Object(ke.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:"Cloudup",icon:or,description:Object(ke.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:"CollegeHumor",icon:cr,description:Object(ke.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:"Crowdsignal",icon:or,keywords:["polldaddy",Object(ke.__)("survey")],description:Object(ke.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:"Dailymotion",icon:yr,keywords:[Object(ke.__)("video")],description:Object(ke.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:"Imgur",icon:lr,description:Object(ke.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:"Issuu",icon:or,description:Object(ke.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:"Kickstarter",icon:or,description:Object(ke.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:"Mixcloud",icon:ar,keywords:[Object(ke.__)("music"),Object(ke.__)("audio")],description:Object(ke.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"reddit",title:"Reddit",icon:hr,description:Object(ke.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:"ReverbNation",icon:ar,description:Object(ke.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"screencast",title:"Screencast",icon:cr,description:Object(ke.__)("Embed Screencast content."),patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i],attributes:{providerNameSlug:"screencast",responsive:!0}},{name:"scribd",title:"Scribd",icon:or,description:Object(ke.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"slideshare",title:"Slideshare",icon:or,description:Object(ke.__)("Embed Slideshare content."),patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i],attributes:{providerNameSlug:"slideshare",responsive:!0}},{name:"smugmug",title:"SmugMug",icon:lr,description:Object(ke.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:"Speaker Deck",icon:or,description:Object(ke.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:"TikTok",icon:cr,keywords:[Object(ke.__)("video")],description:Object(ke.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:"TED",icon:cr,description:Object(ke.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:"Tumblr",icon:vr,keywords:[Object(ke.__)("social")],description:Object(ke.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(www\.)?tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:"VideoPress",icon:cr,keywords:[Object(ke.__)("video")],description:Object(ke.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:"WordPress.tv",icon:cr,description:Object(ke.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:"Amazon Kindle",icon:Or,keywords:[Object(ke.__)("ebook")],description:Object(ke.__)("Embed Amazon Kindle content."),patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],attributes:{providerNameSlug:"amazon-kindle"}},{name:"pinterest",title:"Pinterest",icon:fr,keywords:[Object(ke.__)("social"),Object(ke.__)("bookmark")],description:Object(ke.__)("Embed Pinterest pins, boards, and profiles."),patterns:[/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i],attributes:{providerNameSlug:"pinterest"}},{name:"wolfram-cloud",title:"Wolfram Cloud",icon:_r,description:Object(ke.__)("Embed Wolfram Cloud notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}}];Pr.forEach(e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)});var zr=Pr;const{attributes:Ir}={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"};var Mr=[{attributes:Ir,save(e){let{attributes:{url:t,caption:n,type:r,providerNameSlug:o}}=e;if(!t)return null;const a=tt()("wp-block-embed",{["is-type-"+r]:r,["is-provider-"+o]:o});return Object(je.createElement)("figure",{className:a},`\n${t}\n`,!we.RichText.isEmpty(n)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",value:n}))}}];const Rr={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},{name:Lr}=Rr,Vr={icon:or,edit:Br,save:function(e){let{attributes:t}=e;const{url:n,caption:r,type:o,providerNameSlug:a}=t;if(!n)return null;const l=Le()("wp-block-embed",{["is-type-"+o]:o,["is-provider-"+a]:a,["wp-block-embed-"+a]:a});return Object(je.createElement)("figure",we.useBlockProps.save({className:l}),Object(je.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${n}\n`),!we.RichText.isEmpty(r)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",value:r}))},transforms:Nr,variations:zr,deprecated:Mr};var Ar=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(ye.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"}));var Hr=[{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(e){let{attributes:t}=e;const{href:n,fileName:r,textLinkHref:o,textLinkTarget:a,showDownloadButton:l,downloadButtonText:c,displayPreview:i,previewHeight:s}=t,u=we.RichText.isEmpty(r)?Object(ke.__)("PDF embed"):Object(ke.sprintf)(Object(ke.__)("Embed of %s."),r);return n&&Object(je.createElement)("div",we.useBlockProps.save(),i&&Object(je.createElement)(je.Fragment,null,Object(je.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:s+"px"},"aria-label":u})),!we.RichText.isEmpty(r)&&Object(je.createElement)("a",{href:o,target:a,rel:a?"noreferrer noopener":void 0},Object(je.createElement)(we.RichText.Content,{value:r})),l&&Object(je.createElement)("a",{href:n,className:"wp-block-file__button",download:!0},Object(je.createElement)(we.RichText.Content,{value:c})))}}],Fr=n("onLe");function Dr(e){let{hrefs:t,openInNewWindow:n,showDownloadButton:r,changeLinkDestinationOption:o,changeOpenInNewWindow:a,changeShowDownloadButton:l,displayPreview:c,changeDisplayPreview:i,previewHeight:s,changePreviewHeight:u}=e;const{href:m,textLinkHref:d,attachmentPage:b}=t;let p=[{value:m,label:Object(ke.__)("URL")}];return b&&(p=[{value:m,label:Object(ke.__)("Media file")},{value:b,label:Object(ke.__)("Attachment page")}]),Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.InspectorControls,null,m.endsWith(".pdf")&&Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("PDF settings")},Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Show inline embed"),help:c?Object(ke.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!c,onChange:i}),c&&Object(je.createElement)(_e.RangeControl,{label:Object(ke.__)("Height in pixels"),min:qr,max:Math.max(Wr,s),value:s,onChange:u})),Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Text link settings")},Object(je.createElement)(_e.SelectControl,{label:Object(ke.__)("Link to"),value:d,options:p,onChange:o}),Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Open in new tab"),checked:n,onChange:a})),Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Download button settings")},Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Show download button"),checked:r,onChange:l}))))}const Gr=()=>!(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)&&!Ur("AcroPDF.PDF")&&!Ur("PDF.PdfCtrl")))),Ur=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t},qr=200,Wr=2e3;function $r(e){let{text:t,disabled:n}=e;const{createNotice:r}=Object(ze.useDispatch)(Fr.store),o=Object(nt.useCopyToClipboard)(t,()=>{r("info",Object(ke.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})});return Object(je.createElement)(_e.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:o,disabled:n},Object(ke.__)("Copy URL"))}var Zr=Object(_e.withNotices)((function(e){let{attributes:t,isSelected:n,setAttributes:r,noticeUI:o,noticeOperations:a,clientId:l}=e;const{id:c,fileName:i,href:s,textLinkHref:u,textLinkTarget:m,showDownloadButton:d,downloadButtonText:b,displayPreview:p,previewHeight:g}=t,[h,v]=Object(je.useState)(!1),{media:O,mediaUpload:j}=Object(ze.useSelect)(e=>({media:void 0===c?void 0:e(It.store).getMedia(c),mediaUpload:e(we.store).getSettings().mediaUpload}),[c]),{toggleSelection:y}=Object(ze.useDispatch)(we.store);function f(e){if(e&&e.url){v(!1);const t=e.url.endsWith(".pdf");r({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id,displayPreview:!!t||void 0,previewHeight:t?600:void 0})}}function _(e){v(!0),a.removeAllNotices(),a.createErrorNotice(e)}function k(e){r({downloadButtonText:e.replace(/<\/?a[^>]*>/g,"")})}Object(je.useEffect)(()=>{if(Object(Pe.isBlobURL)(s)){const e=Object(Pe.getBlobByURL)(s);j({filesList:[e],onFileChange:e=>{let[t]=e;return f(t)},onError:e=>{v(!0),a.createErrorNotice(e)}}),Object(Pe.revokeBlobURL)(s)}void 0===b&&k(Object(ke._x)("Download","button label"))},[]),Object(je.useEffect)(()=>{r({fileId:"wp-block-file--media-"+l})},[l]);const w=O&&O.link,E=Object(we.useBlockProps)({className:tt()(Object(Pe.isBlobURL)(s)&&Object(_e.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":Object(Pe.isBlobURL)(s)})}),C=Gr()&&p;return!s||h?Object(je.createElement)("div",E,Object(je.createElement)(we.MediaPlaceholder,{icon:Object(je.createElement)(we.BlockIcon,{icon:Ar}),labels:{title:Object(ke.__)("File"),instructions:Object(ke.__)("Upload a file or pick one from your media library.")},onSelect:f,notices:o,onError:_,accept:"*"})):Object(je.createElement)(je.Fragment,null,Object(je.createElement)(Dr,{hrefs:{href:s,textLinkHref:u,attachmentPage:w},openInNewWindow:!!m,showDownloadButton:d,changeLinkDestinationOption:function(e){r({textLinkHref:e})},changeOpenInNewWindow:function(e){r({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){r({showDownloadButton:e})},displayPreview:p,changeDisplayPreview:function(e){r({displayPreview:e})},previewHeight:g,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),qr);r({previewHeight:t})}}),Object(je.createElement)(we.BlockControls,{group:"other"},Object(je.createElement)(we.MediaReplaceFlow,{mediaId:c,mediaURL:s,accept:"*",onSelect:f,onError:_}),Object(je.createElement)($r,{text:s,disabled:Object(Pe.isBlobURL)(s)})),Object(je.createElement)("div",E,C&&Object(je.createElement)(_e.ResizableBox,{size:{height:g},minHeight:qr,maxHeight:Wr,minWidth:"100%",grid:[10,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>y(!1),onResizeStop:function(e,t,n,o){y(!0);const a=parseInt(g+o.height,10);r({previewHeight:a})},showHandle:n},Object(je.createElement)("object",{className:"wp-block-file__preview",data:s,type:"application/pdf","aria-label":Object(ke.__)("Embed of the selected PDF file.")}),!n&&Object(je.createElement)("div",{className:"wp-block-file__preview-overlay"})),Object(je.createElement)("div",{className:"wp-block-file__content-wrapper"},Object(je.createElement)(we.RichText,{tagName:"a",value:i,placeholder:Object(ke.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>r({fileName:e}),href:u}),d&&Object(je.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},Object(je.createElement)(we.RichText,{tagName:"div","aria-label":Object(ke.__)("Download button text"),className:"wp-block-file__button",value:b,withoutInteractiveFormatting:!0,placeholder:Object(ke.__)("Add text…"),onChange:e=>k(e)})))))}));var Kr=n("Mmq9");var Jr={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach(e=>{const n=Object(Pe.createBlobURL)(e);t.push(Object(Oe.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))}),t}},{type:"block",blocks:["core/audio"],transform:e=>Object(Oe.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=>Object(Oe.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=>Object(Oe.createBlock)("core/file",{href:e.url,fileName:e.caption||Object(Kr.getFilename)(e.url),textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:e=>{let{id:t}=e;if(!t)return!1;const{getMedia:n}=Object(ze.select)(It.store),r=n(t);return!!r&&Object(Me.includes)(r.mime_type,"audio")},transform:e=>Object(Oe.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:e=>{let{id:t}=e;if(!t)return!1;const{getMedia:n}=Object(ze.select)(It.store),r=n(t);return!!r&&Object(Me.includes)(r.mime_type,"video")},transform:e=>Object(Oe.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:e=>{let{id:t}=e;if(!t)return!1;const{getMedia:n}=Object(ze.select)(It.store),r=n(t);return!!r&&Object(Me.includes)(r.mime_type,"image")},transform:e=>Object(Oe.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]};const Qr={apiVersion:2,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"},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},viewScript:"file:./view.min.js",editorStyle:"wp-block-file-editor",style:"wp-block-file"},{name:Yr}=Qr,Xr={icon:Ar,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:Object(ke._x)("Armstrong_Small_Step","Name of the file")}},transforms:Jr,deprecated:Hr,edit:Zr,save:function(e){let{attributes:t}=e;const{href:n,fileId:r,fileName:o,textLinkHref:a,textLinkTarget:l,showDownloadButton:c,downloadButtonText:i,displayPreview:s,previewHeight:u}=t,m=we.RichText.isEmpty(o)?Object(ke.__)("PDF embed"):Object(ke.sprintf)(Object(ke.__)("Embed of %s."),o);return n&&Object(je.createElement)("div",we.useBlockProps.save(),s&&Object(je.createElement)(je.Fragment,null,Object(je.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:u+"px"},"aria-label":m})),!we.RichText.isEmpty(o)&&Object(je.createElement)("a",{id:r,href:a,target:l,rel:l?"noreferrer noopener":void 0},Object(je.createElement)(we.RichText.Content,{value:o})),c&&Object(je.createElement)("a",{href:n,className:"wp-block-file__button",download:!0,"aria-describedby":r},Object(je.createElement)(we.RichText.Content,{value:i})))}};var eo=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(ye.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8h-1.5zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zM4.5 4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1V12l-2.3-1.7c-.3-.2-.6-.2-.9 0l-2.9 2.1L8 11.3c-.2-.1-.5-.1-.7 0l-2.9 1.5V4.6zm0 11.8v-1.8l3.2-1.7 2.4 1.2c.2.1.5.1.8-.1l2.8-2 2.8 2v2.5c0 .1-.1.1-.1.1H4.6c0-.1-.1-.2-.1-.2z"}));const to=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large";const n=Object(Me.pick)(e,["alt","id","link","caption"]);n.url=Object(Me.get)(e,["sizes",t,"url"])||Object(Me.get)(e,["media_details","sizes",t,"source_url"])||e.url;const r=Object(Me.get)(e,["sizes","full","url"])||Object(Me.get)(e,["media_details","sizes","full","source_url"]);return r&&(n.fullUrl=r),n};function no(e){var t;return Math.min(3,null==e||null===(t=e.images)||void 0===t?void 0:t.length)}function ro(e,t){switch(t){case"file":return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:"media"};case"post":return{href:null==e?void 0:e.link,linkDestination:"attachment"};case"media":return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:"media"};case"attachment":return{href:null==e?void 0:e.link,linkDestination:"attachment"};case"none":return{href:void 0,linkDestination:"none"}}return{}}function oo(e){let t=e.linkTo?e.linkTo:"none";"post"===t?t="attachment":"file"===t&&(t="media");const n=e.images.map(n=>function(e,t,n){return Object(Oe.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...ro(e,n)})}(n,e.sizeSlug,t));return[{caption:e.caption,columns:e.columns,imageCrop:e.imageCrop,linkTo:t,sizeSlug:e.sizeSlug,allowResize:!1},n]}var ao=[{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"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},save(e){let{attributes:t}=e;const{images:n,columns:r=no(t),imageCrop:o,caption:a,linkTo:l}=t,c=`columns-${r} ${o?"is-cropped":""}`;return Object(je.createElement)("figure",we.useBlockProps.save({className:c}),Object(je.createElement)("ul",{className:"blocks-gallery-grid"},n.map(e=>{let t;switch(l){case"file":t=e.fullUrl||e.url;break;case"post":t=e.link}const n=Object(je.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-"+e.id:null});return Object(je.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(je.createElement)("figure",null,t?Object(je.createElement)("a",{href:t},n):n,!we.RichText.isEmpty(e.caption)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))})),!we.RichText.isEmpty(a)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))},migrate:e=>oo(e)},{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(e){let{linkTo:t}=e;return!t||"attachment"===t||"media"===t},migrate:e=>oo(e),save(e){let{attributes:t}=e;const{images:n,columns:r=no(t),imageCrop:o,caption:a,linkTo:l}=t;return Object(je.createElement)("figure",{className:`columns-${r} ${o?"is-cropped":""}`},Object(je.createElement)("ul",{className:"blocks-gallery-grid"},n.map(e=>{let t;switch(l){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=Object(je.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-"+e.id:null});return Object(je.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(je.createElement)("figure",null,t?Object(je.createElement)("a",{href:t},n):n,!we.RichText.isEmpty(e.caption)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))})),!we.RichText.isEmpty(a)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))}},{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(e){let{ids:t}=e;return t&&t.some(e=>"string"==typeof e)},migrate:e=>oo(e),save(e){let{attributes:t}=e;const{images:n,columns:r=no(t),imageCrop:o,caption:a,linkTo:l}=t;return Object(je.createElement)("figure",{className:`columns-${r} ${o?"is-cropped":""}`},Object(je.createElement)("ul",{className:"blocks-gallery-grid"},n.map(e=>{let t;switch(l){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=Object(je.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-"+e.id:null});return Object(je.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(je.createElement)("figure",null,t?Object(je.createElement)("a",{href:t},n):n,!we.RichText.isEmpty(e.caption)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))})),!we.RichText.isEmpty(a)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))}},{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:"array",source:"children",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save(e){let{attributes:t}=e;const{images:n,columns:r=no(t),imageCrop:o,linkTo:a}=t;return Object(je.createElement)("ul",{className:`columns-${r} ${o?"is-cropped":""}`},n.map(e=>{let t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=Object(je.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-"+e.id:null});return Object(je.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(je.createElement)("figure",null,t?Object(je.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",value:e.caption})))}))},migrate:e=>oo(e)},{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:"array",source:"children",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible(e){let{images:t,ids:n}=e;return t&&t.length>0&&(!n&&t||n&&t&&n.length!==t.length||Object(Me.some)(t,(e,t)=>!e&&null!==n[t]||parseInt(e,10)!==n[t]))},migrate:e=>oo(e),supports:{align:!0},save(e){let{attributes:t}=e;const{images:n,columns:r=no(t),imageCrop:o,linkTo:a}=t;return Object(je.createElement)("ul",{className:`columns-${r} ${o?"is-cropped":""}`},n.map(e=>{let t;switch(a){case"media":t=e.url;break;case"attachment":t=e.link}const n=Object(je.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-"+e.id:null});return Object(je.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(je.createElement)("figure",null,t?Object(je.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",value:e.caption})))}))}},{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(e){let{attributes:t}=e;const{images:n,columns:r=no(t),align:o,imageCrop:a,linkTo:l}=t,c=tt()("columns-"+r,{alignnone:"none"===o,"is-cropped":a});return Object(je.createElement)("div",{className:c},n.map(e=>{let t;switch(l){case"media":t=e.url;break;case"attachment":t=e.link}const n=Object(je.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object(je.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object(je.createElement)("a",{href:t},n):n)}))},migrate:e=>oo(e)}],lo=n("KEfo");const co=Object(je.createElement)(we.BlockIcon,{icon:eo}),io=["noreferrer","noopener"],so=["image"];function uo(e,t){switch(t){case"media":return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:"media"};case"attachment":return{href:null==e?void 0:e.link,linkDestination:"attachment"};case"none":return{href:void 0,linkDestination:"none"}}return{}}function mo(e,t){let{rel:n}=t;const r=e?"_blank":void 0;let o;return o=r||n?function(e){let t=e;return void 0===e||Object(Me.isEmpty)(t)||Object(Me.isEmpty)(t)||(Object(Me.each)(io,e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")}),t!==e&&(t=t.trim()),Object(Me.isEmpty)(t)&&(t=void 0)),t}(n):void 0,{linkTarget:r,rel:o}}const bo=["core/image"];function po(e){let{isHidden:t,captionFocused:n,onFocusCaption:r,className:o,value:a,placeholder:l,tagName:c,captionRef:i,...s}=e;return t?Object(je.createElement)(_e.VisuallyHidden,Object(mt.a)({as:we.RichText},s)):Object(je.createElement)(we.RichText,Object(mt.a)({ref:i,value:a,placeholder:l,className:o,tagName:c,isSelected:n,onClick:r},s))}var go=e=>{const{attributes:t,isSelected:n,setAttributes:r,mediaPlaceholder:o,insertBlocksAfter:a,blockProps:l}=e,{align:c,columns:i,caption:s,imageCrop:u}=t,{children:m,...d}=Object(we.useInnerBlocksProps)(l,{allowedBlocks:bo,orientation:"horizontal",renderAppender:!1,__experimentalLayout:{type:"default",alignments:[]}}),[b,p]=Object(je.useState)(!1);return Object(je.useEffect)(()=>{n||p(!1)},[n]),Object(je.createElement)("figure",Object(mt.a)({},d,{className:tt()(l.className,"blocks-gallery-grid",{["align"+c]:c,["columns-"+i]:void 0!==i,"columns-default":void 0===i,"is-cropped":u})}),m,Object(je.createElement)(ye.View,{className:"blocks-gallery-media-placeholder-wrapper",onClick:function(){b&&p(!1)}},o),Object(je.createElement)(po,{isHidden:!n&&we.RichText.isEmpty(s),captionFocused:b,onFocusCaption:function(){b||p(!0)},tagName:"figcaption",className:"blocks-gallery-caption","aria-label":Object(ke.__)("Gallery caption text"),placeholder:Object(ke.__)("Write gallery caption…"),value:s,onChange:e=>r({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>a(Object(Oe.createBlock)("core/paragraph"))}))};function ho(e,t,n){return Object(je.useMemo)(()=>function(){if(!e||0===e.length)return;const{imageSizes:r}=n();let o={};t&&(o=e.reduce((e,t)=>{if(!t.id)return e;const n=r.reduce((e,n)=>{const r=Object(Me.get)(t,["sizes",n.slug,"url"]),o=Object(Me.get)(t,["media_details","sizes",n.slug,"source_url"]);return{...e,[n.slug]:r||o}},{});return{...e,[parseInt(t.id,10)]:n}},{}));return r.filter(e=>{let{slug:t}=e;return Object(Me.some)(o,e=>e[t])}).map(e=>{let{name:t,slug:n}=e;return{value:n,label:t}})}(),[e,t])}function vo(e,t){const[n,r]=Object(je.useState)([]);return Object(je.useMemo)(()=>function(){let o=!1;const a=n.filter(t=>e.find(e=>t.clientId===e.clientId));a.length{e.fromSavedContent&&!a.find(t=>t.id===e.id)&&(o=!0,a.push(e))});const l=e.filter(e=>!a.find(t=>e.clientId&&t.clientId===e.clientId)&&(null==t?void 0:t.find(t=>t.id===e.id))&&!e.fromSavedConent);(o||(null==l?void 0:l.length)>0)&&r([...a,...l]);return l.length>0?l:null}(),[e,t])}var Oo=n("U60i");const jo=[{value:"attachment",label:Object(ke.__)("Attachment Page")},{value:"media",label:Object(ke.__)("Media File")},{value:"none",label:Object(ke._x)("None","Media item link option")}],yo=["image"],fo=je.Platform.isNative?Object(ke.__)("ADD MEDIA"):Object(ke.__)("Drag images, upload new ones or select files from your library."),_o=je.Platform.isNative?{type:"stepper"}:{};var ko=Object(nt.compose)([_e.withNotices,Object(lo.withViewportMatch)({isNarrow:"< small"})])((function(e){const{setAttributes:t,attributes:n,className:r,clientId:o,noticeOperations:a,isSelected:l,noticeUI:c,insertBlocksAfter:i}=e,{columns:s,imageCrop:u,linkTarget:m,linkTo:d,shortCodeTransforms:b,sizeSlug:p}=n,{__unstableMarkNextChangeAsNotPersistent:g,replaceInnerBlocks:h,updateBlockAttributes:v}=Object(ze.useDispatch)(we.store),{createSuccessNotice:O}=Object(ze.useDispatch)(Fr.store),{getBlock:j,getSettings:y,preferredStyle:f}=Object(ze.useSelect)(e=>{var t;const n=e(we.store).getSettings().__experimentalPreferredStyleVariations;return{getBlock:e(we.store).getBlock,getSettings:e(we.store).getSettings,preferredStyle:null==n||null===(t=n.value)||void 0===t?void 0:t["core/image"]}},[]),_=Object(ze.useSelect)(e=>{var t;return null===(t=e(we.store).getBlock(o))||void 0===t?void 0:t.innerBlocks},[o]),k=Object(je.useMemo)(()=>null==_?void 0:_.map(e=>({clientId:e.clientId,id:e.attributes.id,url:e.attributes.url,attributes:e.attributes,fromSavedContent:Boolean(e.originalContent)})),[_]),w=function(e){const[t,n]=Object(je.useState)([]),r=Object(ze.useSelect)(n=>{if(null==e||!e.length)return t;const r=e.map(e=>e.attributes.id).filter(e=>void 0!==e);return 0===r.length?t:n(It.store).getMediaItems({include:r.join(","),per_page:-1})},[e]);return(null==r?void 0:r.length)!==(null==t?void 0:t.length)||null!=r&&r.some(e=>!t.find(t=>t.id===e.id))?(n(r),r):t}(_),E=vo(k,w);!function(e){const{createWarningNotice:t}=Object(ze.useDispatch)(Fr.store),{toggleFeature:n}=Object(ze.useDispatch)(Oo.i);Object(ze.useSelect)(e=>{const{isFeatureActive:t}=e(Oo.i);return t("core/edit-post","mobileGalleryWarning")},[])&&e&&(t(Object(ke.__)("If you want to edit the gallery you just added in the mobile app, to avoid losing any data please make sure you use version 18.2 of the app or above."),{type:"snackbar",explicitDismiss:!0}),n("core/edit-post","mobileGalleryWarning"))}(E),Object(je.useEffect)(()=>{null==E||E.forEach(e=>{v(e.clientId,{...S(e.attributes),id:e.id,align:void 0})})},[E]);const C=function(e){const t=Object(ze.useSelect)(t=>{if(!e||0===e.length)return;const n=t(It.store).getMedia;return e.map(e=>{const t=n(e.id);if(t)return{id:t.id,type:"image",url:t.source_url,mime:t.mime_type,alt:t.alt_text,link:t.link}})},[e]);if(t)return Object(Me.every)(t,e=>e&&e.url)?t:void 0}(b);Object(je.useEffect)(()=>{b&&C&&(T(C),t({shortCodeTransforms:void 0}))},[b,C]);const x=ho(w,l,y);function S(e){const t=e.id?Object(Me.find)(w,{id:e.id}):null;let r;return r=e.className&&""!==e.className?e.className:f?"is-style-"+f:void 0,{...to(e,p),...uo(t,d),...mo(m,n),className:r,sizeSlug:p}}function B(e){var t;return yo.some(t=>{var n;return 0===(null===(n=e.type)||void 0===n?void 0:n.indexOf(t))})||0===(null===(t=e.url)||void 0===t?void 0:t.indexOf("blob:"))}function T(e){const t="[object FileList]"===Object.prototype.toString.call(e),n=t?Array.from(e).map(e=>e.url?e:to({url:Object(Pe.createBlobURL)(e)})):e;n.every(B)||(a.removeAllNotices(),a.createErrorNotice(Object(ke.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file"}));const r=n.filter(e=>e.url||B(e)).map(e=>e.url?e:to({url:Object(Pe.createBlobURL)(e)})),l=r.reduce((e,t,n)=>(e[t.id]=n,e),{}),c=t?_:_.filter(e=>r.find(t=>t.id===e.attributes.id)),i=r.filter(e=>!c.find(t=>e.id===t.attributes.id)).map(e=>Object(Oe.createBlock)("core/image",{id:e.id,url:e.url,caption:e.caption,alt:e.alt}));h(o,Object(Me.concat)(c,i).sort((e,t)=>l[e.attributes.id]-l[t.attributes.id]))}Object(je.useEffect)(()=>{var e,n,r,o,a,l;d||(g(),t({linkTo:(null===(e=window)||void 0===e||null===(n=e.wp)||void 0===n||null===(r=n.media)||void 0===r||null===(o=r.view)||void 0===o||null===(a=o.settings)||void 0===a||null===(l=a.defaultProps)||void 0===l?void 0:l.link)||"none"}))},[d]);const N=!!k.length,P=N&&k.some(e=>!!e.id),z=k.some(e=>{var t;return!e.id&&0===(null===(t=e.url)||void 0===t?void 0:t.indexOf("blob:"))}),I=Object(je.createElement)(we.MediaPlaceholder,{addToGallery:P,handleUpload:!1,isAppender:N,disableMediaButtons:N&&!l||z,icon:!N&&co,labels:{title:!N&&Object(ke.__)("Gallery"),instructions:!N&&fo},onSelect:T,accept:"image/*",allowedTypes:yo,multiple:!0,value:P?k:{},onError:function(e){a.removeAllNotices(),a.createErrorNotice(e)},notices:N?void 0:c}),M=Object(we.useBlockProps)({className:tt()(r,"has-nested-images")});if(!N)return Object(je.createElement)(ye.View,M,I);const R=d&&"none"!==d;return Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.InspectorControls,null,Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Gallery settings")},k.length>1&&Object(je.createElement)(_e.RangeControl,Object(mt.a)({label:Object(ke.__)("Columns"),value:s||(L=k.length,L?Math.min(3,L):3),onChange:function(e){t({columns:e})},min:1,max:Math.min(8,k.length)},_o,{required:!0})),Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Crop images"),checked:!!u,onChange:function(){t({imageCrop:!u})},help:function(e){return e?Object(ke.__)("Thumbnails are cropped to align."):Object(ke.__)("Thumbnails are not cropped.")}}),Object(je.createElement)(_e.SelectControl,{label:Object(ke.__)("Link to"),value:d,onChange:function(e){t({linkTo:e});const n={},r=[];j(o).innerBlocks.forEach(t=>{r.push(t.clientId);const o=t.attributes.id?Object(Me.find)(w,{id:t.attributes.id}):null;n[t.clientId]=uo(o,e)}),v(r,n,!0);const a=[...jo].find(t=>t.value===e);O(Object(ke.sprintf)(Object(ke.__)("All gallery image links updated to: %s"),a.label),{id:"gallery-attributes-linkTo",type:"snackbar"})},options:jo,hideCancelButton:!0}),R&&Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Open in new tab"),checked:"_blank"===m,onChange:function(e){const n=e?"_blank":void 0;t({linkTarget:n});const r={},a=[];j(o).innerBlocks.forEach(e=>{a.push(e.clientId),r[e.clientId]=mo(n,e.attributes)}),v(a,r,!0);const l=e?Object(ke.__)("All gallery images updated to open in new tab"):Object(ke.__)("All gallery images updated to not open in new tab");O(l,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}}),(null==x?void 0:x.length)>0&&Object(je.createElement)(_e.SelectControl,{label:Object(ke.__)("Image size"),value:p,options:x,onChange:function(e){t({sizeSlug:e});const n={},r=[];j(o).innerBlocks.forEach(t=>{r.push(t.clientId);const o=t.attributes.id?Object(Me.find)(w,{id:t.attributes.id}):null;n[t.clientId]=function(e,t){const n=Object(Me.get)(e,["media_details","sizes",t,"source_url"]);return n?{url:n,width:void 0,height:void 0,sizeSlug:t}:{}}(o,e)}),v(r,n,!0);const a=x.find(t=>t.value===e);O(Object(ke.sprintf)(Object(ke.__)("All gallery image sizes updated to: %s"),a.label),{id:"gallery-attributes-sizeSlug",type:"snackbar"})},hideCancelButton:!0}),je.Platform.isWeb&&!x&&P&&Object(je.createElement)(_e.BaseControl,{className:"gallery-image-sizes"},Object(je.createElement)(_e.BaseControl.VisualLabel,null,Object(ke.__)("Image size")),Object(je.createElement)(ye.View,{className:"gallery-image-sizes__loading"},Object(je.createElement)(_e.Spinner,null),Object(ke.__)("Loading options…"))))),c,Object(je.createElement)(go,Object(mt.a)({},e,{images:k,mediaPlaceholder:I,blockProps:M,insertBlocksAfter:i})));var L}));const wo=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large";const n=Object(Me.pick)(e,["alt","id","link","caption"]);n.url=Object(Me.get)(e,["sizes",t,"url"])||Object(Me.get)(e,["media_details","sizes",t,"source_url"])||e.url;const r=Object(Me.get)(e,["sizes","full","url"])||Object(Me.get)(e,["media_details","sizes","full","source_url"]);return r&&(n.fullUrl=r),n};var Eo=Object(je.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(je.createElement)(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-2zM5 4.5h14c.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.6V5c-.1-.3.1-.5.4-.5zm14 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"})),Co=n("2gm7"),xo=n("1iEr"),So=n("bWcr");class Bo extends je.Component{constructor(){super(...arguments),this.onSelectImage=this.onSelectImage.bind(this),this.onRemoveImage=this.onRemoveImage.bind(this),this.bindContainer=this.bindContainer.bind(this),this.onEdit=this.onEdit.bind(this),this.onSelectImageFromLibrary=this.onSelectImageFromLibrary.bind(this),this.onSelectCustomURL=this.onSelectCustomURL.bind(this),this.state={isEditing:!1}}bindContainer(e){this.container=e}onSelectImage(){this.props.isSelected||this.props.onSelect()}onRemoveImage(e){this.container===this.container.ownerDocument.activeElement&&this.props.isSelected&&-1!==[dt.BACKSPACE,dt.DELETE].indexOf(e.keyCode)&&(e.preventDefault(),this.props.onRemove())}onEdit(){this.setState({isEditing:!0})}componentDidUpdate(){const{image:e,url:t,__unstableMarkNextChangeAsNotPersistent:n}=this.props;e&&!t&&(n(),this.props.setAttributes({url:e.source_url,alt:e.alt_text}))}deselectOnBlur(){this.props.onDeselect()}onSelectImageFromLibrary(e){const{setAttributes:t,id:n,url:r,alt:o,caption:a,sizeSlug:l}=this.props;if(!e||!e.url)return;let c=wo(e,l);((e,t)=>!e&&Object(Pe.isBlobURL)(t))(n,r)&&o&&(c=Object(Me.omit)(c,["alt"])),a&&!Object(Me.get)(c,["caption"])&&(c=Object(Me.omit)(c,["caption"])),t(c),this.setState({isEditing:!1})}onSelectCustomURL(e){const{setAttributes:t,url:n}=this.props;e!==n&&(t({url:e,id:void 0}),this.setState({isEditing:!1}))}render(){const{url:e,alt:t,id:n,linkTo:r,link:o,isFirstItem:a,isLastItem:l,isSelected:c,caption:i,onRemove:s,onMoveForward:u,onMoveBackward:m,setAttributes:d,"aria-label":b}=this.props,{isEditing:p}=this.state;let g;switch(r){case"file":g=e;break;case"post":g=o}const h=Object(je.createElement)(je.Fragment,null,Object(je.createElement)("img",{src:e,alt:t,"data-id":n,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":b,ref:this.bindContainer}),Object(Pe.isBlobURL)(e)&&Object(je.createElement)(_e.Spinner,null)),v=tt()({"is-selected":c,"is-transient":Object(Pe.isBlobURL)(e)});return Object(je.createElement)("figure",{className:v,onClick:this.onSelectImage,onFocus:this.onSelectImage},!p&&(g?Object(je.createElement)("a",{href:g},h):h),p&&Object(je.createElement)(we.MediaPlaceholder,{labels:{title:Object(ke.__)("Edit gallery image")},icon:Eo,onSelect:this.onSelectImageFromLibrary,onSelectURL:this.onSelectCustomURL,accept:"image/*",allowedTypes:["image"],value:{id:n,src:e}}),Object(je.createElement)(_e.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-left"},Object(je.createElement)(_e.Button,{icon:Co.a,onClick:a?void 0:m,label:Object(ke.__)("Move image backward"),"aria-disabled":a,disabled:!c}),Object(je.createElement)(_e.Button,{icon:xo.a,onClick:l?void 0:u,label:Object(ke.__)("Move image forward"),"aria-disabled":l,disabled:!c})),Object(je.createElement)(_e.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right"},Object(je.createElement)(_e.Button,{icon:tr.a,onClick:this.onEdit,label:Object(ke.__)("Replace image"),disabled:!c}),Object(je.createElement)(_e.Button,{icon:So.a,onClick:s,label:Object(ke.__)("Remove image"),disabled:!c})),!p&&(c||i)&&Object(je.createElement)(we.RichText,{tagName:"figcaption","aria-label":Object(ke.__)("Image caption text"),placeholder:c?Object(ke.__)("Add caption"):null,value:i,onChange:e=>d({caption:e}),inlineToolbar:!0}))}}var To=Object(nt.compose)([Object(ze.withSelect)((e,t)=>{const{getMedia:n}=e(It.store),{id:r}=t;return{image:r?n(parseInt(r,10)):null}}),Object(ze.withDispatch)(e=>{const{__unstableMarkNextChangeAsNotPersistent:t}=e(we.store);return{__unstableMarkNextChangeAsNotPersistent:t}})])(Bo);function No(e){let{isHidden:t,...n}=e;return t?Object(je.createElement)(_e.VisuallyHidden,Object(mt.a)({as:we.RichText},n)):Object(je.createElement)(we.RichText,n)}var Po=e=>{const{attributes:t,isSelected:n,setAttributes:r,selectedImage:o,mediaPlaceholder:a,onMoveBackward:l,onMoveForward:c,onRemoveImage:i,onSelectImage:s,onDeselectImage:u,onSetImageAttributes:m,insertBlocksAfter:d,blockProps:b}=e,{align:p,columns:g=no(t),caption:h,imageCrop:v,images:O}=t;return Object(je.createElement)("figure",Object(mt.a)({},b,{className:tt()(b.className,{["align"+p]:p,["columns-"+g]:g,"is-cropped":v})}),Object(je.createElement)("ul",{className:"blocks-gallery-grid"},O.map((e,r)=>{const a=Object(ke.sprintf)(Object(ke.__)("image %1$d of %2$d in gallery"),r+1,O.length);return Object(je.createElement)("li",{className:"blocks-gallery-item",key:e.id?`${e.id}-${r}`:e.url},Object(je.createElement)(To,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===r,isLastItem:r+1===O.length,isSelected:n&&o===r,onMoveBackward:l(r),onMoveForward:c(r),onRemove:i(r),onSelect:s(r),onDeselect:u(r),setAttributes:e=>m(r,e),caption:e.caption,"aria-label":a,sizeSlug:t.sizeSlug}))})),a,Object(je.createElement)(No,{isHidden:!n&&we.RichText.isEmpty(h),tagName:"figcaption",className:"blocks-gallery-caption","aria-label":Object(ke.__)("Gallery caption text"),placeholder:Object(ke.__)("Write gallery caption…"),value:h,onChange:e=>r({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>d(Object(Oe.createBlock)("core/paragraph"))}))};const zo=[{value:"post",label:Object(ke.__)("Attachment Page")},{value:"file",label:Object(ke.__)("Media File")},{value:"none",label:Object(ke.__)("None")}],Io=["image"],Mo=je.Platform.select({web:Object(ke.__)("Drag images, upload new ones or select files from your library."),native:Object(ke.__)("ADD MEDIA")}),Ro=je.Platform.select({web:{},native:{type:"stepper"}});Object(nt.compose)([_e.withNotices,Object(lo.withViewportMatch)({isNarrow:"< small"})])((function(e){const{attributes:t,clientId:n,isSelected:r,noticeUI:o,noticeOperations:a,onFocus:l}=e,{columns:c=no(t),imageCrop:i,images:s,linkTo:u,sizeSlug:m}=t,[d,b]=Object(je.useState)(),[p,g]=Object(je.useState)(),{__unstableMarkNextChangeAsNotPersistent:h}=Object(ze.useDispatch)(we.store),{imageSizes:v,mediaUpload:O,getMedia:j,wasBlockJustInserted:y}=Object(ze.useSelect)(e=>{const t=e(we.store).getSettings();return{imageSizes:t.imageSizes,mediaUpload:t.mediaUpload,getMedia:e(It.store).getMedia,wasBlockJustInserted:e(we.store).wasBlockJustInserted(n,"inserter_menu")}}),f=Object(je.useMemo)(()=>r?Object(Me.reduce)(t.ids,(e,t)=>{if(!t)return e;const n=j(t),r=Object(Me.reduce)(v,(e,t)=>{const r=Object(Me.get)(n,["sizes",t.slug,"url"]),o=Object(Me.get)(n,["media_details","sizes",t.slug,"source_url"]);return{...e,[t.slug]:r||o}},{});return{...e,[parseInt(t,10)]:r}},{}):{},[r,t.ids,v]);function _(t){if(t.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');t.images&&(t={...t,ids:Object(Me.map)(t.images,e=>{let{id:t}=e;return parseInt(t,10)})}),e.setAttributes(t)}function k(e,t){const n=[...s];n.splice(t,1,s[e]),n.splice(e,1,s[t]),b(t),_({images:n})}function w(e){const t=Object(Me.toString)(e.id),n=Object(Me.find)(s,{id:t}),r=n?n.caption:e.caption;if(!p)return r;const o=Object(Me.find)(p,{id:t});return o&&o.caption!==e.caption?e.caption:r}function E(e){g(e.map(e=>({id:Object(Me.toString)(e.id),caption:e.caption}))),_({images:e.map(e=>({...wo(e,m),caption:w(e),id:Object(Me.toString)(e.id)})),columns:t.columns?Math.min(e.length,t.columns):t.columns})}Object(je.useEffect)(()=>{if("web"===je.Platform.OS&&s&&s.length>0&&Object(Me.every)(s,e=>{let{url:t}=e;return Object(Pe.isBlobURL)(t)})){const e=Object(Me.map)(s,e=>{let{url:t}=e;return Object(Pe.getBlobByURL)(t)});Object(Me.forEach)(s,e=>{let{url:t}=e;return Object(Pe.revokeBlobURL)(t)}),O({filesList:e,onFileChange:E,allowedTypes:["image"]})}},[]),Object(je.useEffect)(()=>{r||b()},[r]),Object(je.useEffect)(()=>{var e,t,n,r,o,a;u||(h(),_({linkTo:(null===(e=window)||void 0===e||null===(t=e.wp)||void 0===t||null===(n=t.media)||void 0===n||null===(r=n.view)||void 0===r||null===(o=r.settings)||void 0===o||null===(a=o.defaultProps)||void 0===a?void 0:a.link)||"none"}))},[u]);const C=!!s.length,x=C&&s.some(e=>!!e.id),S=Object(je.createElement)(we.MediaPlaceholder,{addToGallery:x,isAppender:C,disableMediaButtons:C&&!r,icon:!C&&co,labels:{title:!C&&Object(ke.__)("Gallery"),instructions:!C&&Mo},onSelect:E,accept:"image/*",allowedTypes:Io,multiple:!0,value:x?s:{},onError:function(e){a.removeAllNotices(),a.createErrorNotice(e)},notices:C?void 0:o,onFocus:l,autoOpenMediaUpload:!C&&r&&y}),B=Object(we.useBlockProps)();if(!C)return Object(je.createElement)(ye.View,B,S);const T=Object(Me.map)(Object(Me.filter)(v,e=>{let{slug:t}=e;return Object(Me.some)(f,e=>e[t])}),e=>{let{name:t,slug:n}=e;return{value:n,label:t}}),N=C&&!Object(Me.isEmpty)(T);return Object(je.createElement)(je.Fragment,null,Object(je.createElement)(we.InspectorControls,null,Object(je.createElement)(_e.PanelBody,{title:Object(ke.__)("Gallery settings")},s.length>1&&Object(je.createElement)(_e.RangeControl,Object(mt.a)({label:Object(ke.__)("Columns"),value:c,onChange:function(e){_({columns:e})},min:1,max:Math.min(8,s.length)},Ro,{required:!0})),Object(je.createElement)(_e.ToggleControl,{label:Object(ke.__)("Crop images"),checked:!!i,onChange:function(){_({imageCrop:!i})},help:function(e){return e?Object(ke.__)("Thumbnails are cropped to align."):Object(ke.__)("Thumbnails are not cropped.")}}),Object(je.createElement)(_e.SelectControl,{label:Object(ke.__)("Link to"),value:u,onChange:function(e){_({linkTo:e})},options:zo,hideCancelButton:!0}),N&&Object(je.createElement)(_e.SelectControl,{label:Object(ke.__)("Image size"),value:m,options:T,onChange:function(e){_({images:Object(Me.map)(s,t=>{if(!t.id)return t;const n=Object(Me.get)(f,[parseInt(t.id,10),e]);return{...t,...n&&{url:n}}}),sizeSlug:e})},hideCancelButton:!0}))),o,Object(je.createElement)(Po,Object(mt.a)({},e,{selectedImage:d,mediaPlaceholder:S,onMoveBackward:function(e){return()=>{0!==e&&k(e,e-1)}},onMoveForward:function(e){return()=>{e!==s.length-1&&k(e,e+1)}},onRemoveImage:function(e){return()=>{const n=Object(Me.filter)(s,(t,n)=>e!==n);b(),_({images:n,columns:t.columns?Math.min(n.length,t.columns):t.columns})}},onSelectImage:function(e){return()=>{b(e)}},onDeselectImage:function(){return()=>{b()}},onSetImageAttributes:function(e,t){s[e]&&_({images:[...s.slice(0,e),{...s[e],...t},...s.slice(e+1)]})},blockProps:B,onFocusGalleryCaption:function(){b()}})))}));var Lo=Object(nt.compose)([_e.withNotices])((function(e){return Object(je.createElement)(ko,e)}));var Vo=n("g56x");const Ao=e=>e?e.split(",").map(e=>parseInt(e,10)):[];Object(Vo.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",(function(e){var t;if("core/gallery"===e.name&&(null===(t=e.attributes)||void 0===t?void 0:t.images.length)>0){const t=e.attributes.images.map(t=>{let{url:n,id:r,alt:o}=t;return Object(Oe.createBlock)("core/image",{url:n,id:r?parseInt(r,10):null,alt:o,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination})});delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e})),Object(Vo.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",(function(e,t){const n=(Array.isArray(t)?t:[t]).find(t=>{var n;return"core/gallery"===t.name&&t.innerBlocks.length>0&&!(null!==(n=t.attributes.images)&&void 0!==n&&n.length)>0&&!e.name.includes("core/")});if(n){const e=n.innerBlocks.map(e=>{let{attributes:{url:t,id:n,alt:r}}=e;return{url:t,id:n?parseInt(n,10):null,alt:r}}),t=e.map(e=>{let{id:t}=e;return t});n.attributes.images=e,n.attributes.ids=t}return e}));var Ho={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:n}=e[0];t=Object(Me.every)(e,["align",t])?t:void 0,n=Object(Me.every)(e,["sizeSlug",n])?n:void 0;const r=Object(Me.filter)(e,e=>{let{url:t}=e;return t});{const e=r.map(e=>Object(Oe.createBlock)("core/image",e));return Object(Oe.createBlock)("core/gallery",{align:t,sizeSlug:n},e)}}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:e=>{let{named:{ids:t}}=e}},ids:{type:"array",shortcode:e=>{let{named:{ids:t}}=e}},shortCodeTransforms:{type:"array",shortcode:e=>{let{named:{ids:t}}=e;return Ao(t).map(e=>({id:parseInt(e)}))}},columns:{type:"number",shortcode:e=>{let{named:{columns:t="3"}}=e;return parseInt(t,10)}},linkTo:{type:"string",shortcode:e=>{let{named:{link:t}}=e;switch(t){case"post":return"attachment";case"file":return"media";default:return"none"}}}},isMatch(e){let{named:t}=e;return void 0!==t.ids}},{type:"files",priority:1,isMatch:e=>1!==e.length&&Object(Me.every)(e,e=>0===e.type.indexOf("image/")),transform(e){{const t=e.map(e=>Object(Oe.createBlock)("core/image",{url:Object(Pe.createBlobURL)(e)}));return Object(Oe.createBlock)("core/gallery",{},t)}}}],to:[{type:"block",blocks:["core/image"],transform:(e,t)=>{let{align:n,images:r,ids:o,sizeSlug:a}=e;return t.length>0?t.map(e=>{let{attributes:{id:t,url:r,alt:o,caption:a,imageSizeSlug:l}}=e;return Object(Oe.createBlock)("core/image",{id:t,url:r,alt:o,caption:a,sizeSlug:l,align:n})}):Object(Oe.createBlock)("core/image",{align:n})}}]};const Fo={apiVersion:2,name:"core/gallery",title:"Gallery",category:"media",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:"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}},providesContext:{allowResize:"allowResize",imageCrop:"imageCrop",fixedHeight:"fixedHeight"},supports:{anchor:!0,align:!0},editorStyle:"wp-block-gallery-editor",style:"wp-block-gallery"},{name:Do}=Fo,Go={icon:eo,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:Ho,edit:Lo,save:function(e){let{attributes:t}=e;const{caption:n,columns:r,imageCrop:o}=t,a=tt()("has-nested-images",{["columns-"+r]:void 0!==r,"columns-default":void 0===r,"is-cropped":o}),l=we.useBlockProps.save({className:a}),c=we.useInnerBlocksProps.save(l);return Object(je.createElement)("figure",c,c.children,!we.RichText.isEmpty(n)&&Object(je.createElement)(we.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:n}))},deprecated:ao};var Uo=n("u6za");const qo=e=>{if(e.tagName||(e={...e,tagName:"div"}),!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),{...Object(Me.omit)(e,["customTextColor","customBackgroundColor"]),style:t}};var Wo=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:"string"}},supports:{align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0},spacing:{padding:!0},__experimentalBorder:{radius:!0}},save(e){let{attributes:t}=e;const{tagName:n}=t;return Object(je.createElement)(n,we.useBlockProps.save(),Object(je.createElement)("div",{className:"wp-block-group__inner-container"},Object(je.createElement)(we.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:qo,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:r,textColor:o,customTextColor:a}=t,l=Object(we.getColorClassName)("background-color",n),c=Object(we.getColorClassName)("color",o),i=tt()(l,c,{"has-text-color":o||a,"has-background":n||r}),s={backgroundColor:l?void 0:r,color:c?void 0:a};return Object(je.createElement)("div",{className:i,style:s},Object(je.createElement)("div",{className:"wp-block-group__inner-container"},Object(je.createElement)(we.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:qo,supports:{align:["wide","full"],anchor:!0,html:!1},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:r,textColor:o,customTextColor:a}=t,l=Object(we.getColorClassName)("background-color",n),c=Object(we.getColorClassName)("color",o),i=tt()(l,{"has-text-color":o||a,"has-background":n||r}),s={backgroundColor:l?void 0:r,color:c?void 0:a};return Object(je.createElement)("div",{className:i,style:s},Object(je.createElement)("div",{className:"wp-block-group__inner-container"},Object(je.createElement)(we.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:qo,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:r}=t,o=Object(we.getColorClassName)("background-color",n),a=tt()(o,{"has-background":n||r}),l={backgroundColor:o?void 0:r};return Object(je.createElement)("div",{className:a,style:l},Object(je.createElement)(we.InnerBlocks.Content,null))}}];const $o={header:Object(ke.__)("The
element should represent introductory content, typically a group of introductory or navigational aids."),main:Object(ke.__)("The
element should be used for the primary content of your document only. "),section:Object(ke.__)("The
element should represent a standalone portion of the document that can't be better represented by another element."),article:Object(ke.__)("The
element should represent a self contained, syndicatable portion of the document."),aside:Object(ke.__)("The