Preview: block-library.min.js
Size: 767.30 KB
/home/nshryvcy/himaltourism.com/wp-includes/js/dist/block-library.min.js
/*! This file is auto-generated */
!function(){var e={7078:function(e){e.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}},5619:function(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,a;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,a[r]))return!1;for(r=o;0!=r--;){var l=a[r];if(!e(t[l],n[l]))return!1}return!0}return t!=t&&n!=n}},9756:function(e){e.exports=function(e,t){var n,o,r=0;function a(){var a,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(a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i={args:a,val:e.apply(null,a)},n?(n.prev=i,i.next=n):o=i,r===t.maxSize?(o=o.prev).next=null:r++,n=i,i.val}return t=t||{},a.clear=function(){n=null,o=null,r=0},a}},4793:function(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","ß":"ss","Ţ":"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"),r=new RegExp(n,"");function a(e){return t[e]}var l=function(e){return e.replace(o,a)};e.exports=l,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=l},4526:function(e,t){var n;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var o=function(){function e(){}function t(e,t){for(var n=t.length,o=0;o<n;++o)r(e,t[o])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var o=/\s+/;function r(e,r){if(r){var a=typeof r;"string"===a?function(e,t){for(var n=t.split(o),r=n.length,a=0;a<r;++a)e[n[a]]=!0}(e,r):Array.isArray(r)?t(e,r):"object"===a?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var o in t)n.call(t,o)&&(e[o]=!!t[o]);else e[t.toString()]=!0}(e,r):"number"===a&&function(e,t){e[t]=!0}(e,r)}}return function(){for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];var a=new e;t(a,o);var l=[];for(var i in a)a[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)}()},7153:function(e,t){var n;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=l(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=l(t,n));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{__experimentalGetCoreBlocks:function(){return CE},__experimentalRegisterExperimentalCoreBlocks:function(){return BE},registerCoreBlocks:function(){return SE}});var e={};n.r(e),n.d(e,{init:function(){return tt},metadata:function(){return Je},name:function(){return Xe},settings:function(){return et}});var t={};n.r(t),n.d(t,{init:function(){return yt},metadata:function(){return bt},name:function(){return _t},settings:function(){return ft}});var r={};n.r(r),n.d(r,{init:function(){return Qt},metadata:function(){return jt},name:function(){return Wt},settings:function(){return Zt}});var a={};n.r(a),n.d(a,{init:function(){return _n},metadata:function(){return hn},name:function(){return vn},settings:function(){return bn}});var l={};n.r(l),n.d(l,{init:function(){return Mn},metadata:function(){return Pn},name:function(){return In},settings:function(){return zn}});var i={};n.r(i),n.d(i,{init:function(){return Dn},metadata:function(){return An},name:function(){return Vn},settings:function(){return Fn}});var s={};n.r(s),n.d(s,{init:function(){return Wn},metadata:function(){return Un},name:function(){return qn},settings:function(){return jn}});var c={};n.r(c),n.d(c,{init:function(){return oo},metadata:function(){return eo},name:function(){return to},settings:function(){return no}});var u={};n.r(u),n.d(u,{init:function(){return mo},metadata:function(){return so},name:function(){return co},settings:function(){return uo}});var m={};n.r(m),n.d(m,{init:function(){return yo},metadata:function(){return bo},name:function(){return _o},settings:function(){return fo}});var d={};n.r(d),n.d(d,{init:function(){return Do},metadata:function(){return Ao},name:function(){return Vo},settings:function(){return Fo}});var p={};n.r(p),n.d(p,{init:function(){return Jo},metadata:function(){return Qo},name:function(){return Ko},settings:function(){return Yo}});var g={};n.r(g),n.d(g,{init:function(){return nr},metadata:function(){return Xo},name:function(){return er},settings:function(){return tr}});var h={};n.r(h),n.d(h,{init:function(){return cr},metadata:function(){return lr},name:function(){return ir},settings:function(){return sr}});var v={};n.r(v),n.d(v,{init:function(){return gr},metadata:function(){return mr},name:function(){return dr},settings:function(){return pr}});var b={};n.r(b),n.d(b,{init:function(){return xr},metadata:function(){return fr},name:function(){return yr},settings:function(){return kr}});var _={};n.r(_),n.d(_,{init:function(){return Br},metadata:function(){return Er},name:function(){return Cr},settings:function(){return Sr}});var f={};n.r(f),n.d(f,{init:function(){return Mr},metadata:function(){return Pr},name:function(){return Ir},settings:function(){return zr}});var y={};n.r(y),n.d(y,{init:function(){return qr},metadata:function(){return Gr},name:function(){return Or},settings:function(){return Ur}});var k={};n.r(k),n.d(k,{init:function(){return Yr},metadata:function(){return Zr},name:function(){return Qr},settings:function(){return Kr}});var x={};n.r(x),n.d(x,{init:function(){return aa},metadata:function(){return na},name:function(){return oa},settings:function(){return ra}});var w={};n.r(w),n.d(w,{init:function(){return ma},metadata:function(){return sa},name:function(){return ca},settings:function(){return ua}});var E={};n.r(E),n.d(E,{init:function(){return ba},metadata:function(){return ga},name:function(){return ha},settings:function(){return va}});var C={};n.r(C),n.d(C,{init:function(){return Na},metadata:function(){return Sa},name:function(){return Ba},settings:function(){return Ta}});var S={};n.r(S),n.d(S,{init:function(){return di},metadata:function(){return ci},name:function(){return ui},settings:function(){return mi}});var B={};n.r(B),n.d(B,{init:function(){return ts},metadata:function(){return Ji},name:function(){return Xi},settings:function(){return es}});var T={};n.r(T),n.d(T,{init:function(){return fs},metadata:function(){return vs},name:function(){return bs},settings:function(){return _s}});var N={};n.r(N),n.d(N,{init:function(){return Ic},metadata:function(){return Tc},name:function(){return Nc},settings:function(){return Pc}});var P={};n.r(P),n.d(P,{init:function(){return Zc},metadata:function(){return qc},name:function(){return jc},settings:function(){return Wc}});var I={};n.r(I),n.d(I,{init:function(){return yu},metadata:function(){return bu},name:function(){return _u},settings:function(){return fu}});var z={};n.r(z),n.d(z,{init:function(){return Su},metadata:function(){return wu},name:function(){return Eu},settings:function(){return Cu}});var M={};n.r(M),n.d(M,{init:function(){return Mu},metadata:function(){return Pu},name:function(){return Iu},settings:function(){return zu}});var R={};n.r(R),n.d(R,{init:function(){return Xu},metadata:function(){return Ku},name:function(){return Yu},settings:function(){return Ju}});var L={};n.r(L),n.d(L,{init:function(){return rm},metadata:function(){return tm},name:function(){return nm},settings:function(){return om}});var H={};n.r(H),n.d(H,{init:function(){return hm},metadata:function(){return dm},name:function(){return pm},settings:function(){return gm}});var A={};n.r(A),n.d(A,{init:function(){return Fm},metadata:function(){return Hm},name:function(){return Am},settings:function(){return Vm}});var V={};n.r(V),n.d(V,{init:function(){return ld},metadata:function(){return od},name:function(){return rd},settings:function(){return ad}});var F={};n.r(F),n.d(F,{init:function(){return md},metadata:function(){return sd},name:function(){return cd},settings:function(){return ud}});var D={};n.r(D),n.d(D,{init:function(){return jd},metadata:function(){return Od},name:function(){return Ud},settings:function(){return qd}});var $={};n.r($),n.d($,{init:function(){return Xd},metadata:function(){return Kd},name:function(){return Yd},settings:function(){return Jd}});var G={};n.r(G),n.d(G,{init:function(){return lp},metadata:function(){return op},name:function(){return rp},settings:function(){return ap}});var O={};n.r(O),n.d(O,{init:function(){return kg},metadata:function(){return _g},name:function(){return fg},settings:function(){return yg}});var U={};n.r(U),n.d(U,{init:function(){return $g},metadata:function(){return Vg},name:function(){return Fg},settings:function(){return Dg}});var q={};n.r(q),n.d(q,{init:function(){return Jg},metadata:function(){return Qg},name:function(){return Kg},settings:function(){return Yg}});var j={};n.r(j),n.d(j,{init:function(){return rh},metadata:function(){return th},name:function(){return nh},settings:function(){return oh}});var W={};n.r(W),n.d(W,{init:function(){return ch},metadata:function(){return lh},name:function(){return ih},settings:function(){return sh}});var Z={};n.r(Z),n.d(Z,{init:function(){return fh},metadata:function(){return vh},name:function(){return bh},settings:function(){return _h}});var Q={};n.r(Q),n.d(Q,{init:function(){return Eh},metadata:function(){return kh},name:function(){return xh},settings:function(){return wh}});var K={};n.r(K),n.d(K,{init:function(){return Uh},metadata:function(){return $h},name:function(){return Gh},settings:function(){return Oh}});var Y={};n.r(Y),n.d(Y,{init:function(){return Yh},metadata:function(){return Zh},name:function(){return Qh},settings:function(){return Kh}});var J={};n.r(J),n.d(J,{init:function(){return ov},metadata:function(){return ev},name:function(){return tv},settings:function(){return nv}});var X={};n.r(X),n.d(X,{init:function(){return sv},metadata:function(){return av},name:function(){return lv},settings:function(){return iv}});var ee={};n.r(ee),n.d(ee,{init:function(){return hv},metadata:function(){return dv},name:function(){return pv},settings:function(){return gv}});var te={};n.r(te),n.d(te,{init:function(){return yv},metadata:function(){return bv},name:function(){return _v},settings:function(){return fv}});var ne={};n.r(ne),n.d(ne,{init:function(){return Cv},metadata:function(){return xv},name:function(){return wv},settings:function(){return Ev}});var oe={};n.r(oe),n.d(oe,{init:function(){return Pv},metadata:function(){return Bv},name:function(){return Tv},settings:function(){return Nv}});var re={};n.r(re),n.d(re,{init:function(){return Dv},metadata:function(){return Av},name:function(){return Vv},settings:function(){return Fv}});var ae={};n.r(ae),n.d(ae,{init:function(){return Wv},metadata:function(){return Uv},name:function(){return qv},settings:function(){return jv}});var le={};n.r(le),n.d(le,{init:function(){return Xv},metadata:function(){return Kv},name:function(){return Yv},settings:function(){return Jv}});var ie={};n.r(ie),n.d(ie,{init:function(){return ub},metadata:function(){return ib},name:function(){return sb},settings:function(){return cb}});var se={};n.r(se),n.d(se,{init:function(){return _b},metadata:function(){return hb},name:function(){return vb},settings:function(){return bb}});var ce={};n.r(ce),n.d(ce,{init:function(){return Cb},metadata:function(){return xb},name:function(){return wb},settings:function(){return Eb}});var ue={};n.r(ue),n.d(ue,{init:function(){return Mb},metadata:function(){return Pb},name:function(){return Ib},settings:function(){return zb}});var me={};n.r(me),n.d(me,{init:function(){return Fb},metadata:function(){return Hb},name:function(){return Ab},settings:function(){return Vb}});var de={};n.r(de),n.d(de,{init:function(){return jb},metadata:function(){return Ob},name:function(){return Ub},settings:function(){return qb}});var pe={};n.r(pe),n.d(pe,{init:function(){return d_},metadata:function(){return c_},name:function(){return u_},settings:function(){return m_}});var ge={};n.r(ge),n.d(ge,{init:function(){return pf},metadata:function(){return uf},name:function(){return mf},settings:function(){return df}});var he={};n.r(he),n.d(he,{init:function(){return _f},metadata:function(){return hf},name:function(){return vf},settings:function(){return bf}});var ve={};n.r(ve),n.d(ve,{init:function(){return Sf},metadata:function(){return wf},name:function(){return Ef},settings:function(){return Cf}});var be={};n.r(be),n.d(be,{init:function(){return If},metadata:function(){return Tf},name:function(){return Nf},settings:function(){return Pf}});var _e={};n.r(_e),n.d(_e,{init:function(){return Hf},metadata:function(){return Mf},name:function(){return Rf},settings:function(){return Lf}});var fe={};n.r(fe),n.d(fe,{init:function(){return $f},metadata:function(){return Vf},name:function(){return Ff},settings:function(){return Df}});var ye={};n.r(ye),n.d(ye,{init:function(){return Kf},metadata:function(){return Wf},name:function(){return Zf},settings:function(){return Qf}});var ke={};n.r(ke),n.d(ke,{init:function(){return my},metadata:function(){return sy},name:function(){return cy},settings:function(){return uy}});var xe={};n.r(xe),n.d(xe,{init:function(){return _y},metadata:function(){return hy},name:function(){return vy},settings:function(){return by}});var we={};n.r(we),n.d(we,{init:function(){return xy},metadata:function(){return fy},name:function(){return yy},settings:function(){return ky}});var Ee={};n.r(Ee),n.d(Ee,{init:function(){return By},metadata:function(){return Ey},name:function(){return Cy},settings:function(){return Sy}});var Ce={};n.r(Ce),n.d(Ce,{init:function(){return Fy},metadata:function(){return Hy},name:function(){return Ay},settings:function(){return Vy}});var Se={};n.r(Se),n.d(Se,{init:function(){return Wy},metadata:function(){return Uy},name:function(){return qy},settings:function(){return jy}});var Be={};n.r(Be),n.d(Be,{init:function(){return ek},metadata:function(){return Yy},name:function(){return Jy},settings:function(){return Xy}});var Te={};n.r(Te),n.d(Te,{init:function(){return ck},metadata:function(){return lk},name:function(){return ik},settings:function(){return sk}});var Ne={};n.r(Ne),n.d(Ne,{init:function(){return vk},metadata:function(){return pk},name:function(){return gk},settings:function(){return hk}});var Pe={};n.r(Pe),n.d(Pe,{init:function(){return Sk},metadata:function(){return wk},name:function(){return Ek},settings:function(){return Ck}});var Ie={};n.r(Ie),n.d(Ie,{init:function(){return Ak},metadata:function(){return Rk},name:function(){return Lk},settings:function(){return Hk}});var ze={};n.r(ze),n.d(ze,{init:function(){return Wk},metadata:function(){return Uk},name:function(){return qk},settings:function(){return jk}});var Me={};n.r(Me),n.d(Me,{init:function(){return rx},metadata:function(){return tx},name:function(){return nx},settings:function(){return ox}});var Re={};n.r(Re),n.d(Re,{init:function(){return Dx},metadata:function(){return Ax},name:function(){return Vx},settings:function(){return Fx}});var Le={};n.r(Le),n.d(Le,{init:function(){return Kx},metadata:function(){return Wx},name:function(){return Zx},settings:function(){return Qx}});var He={};n.r(He),n.d(He,{init:function(){return nw},metadata:function(){return Xx},name:function(){return ew},settings:function(){return tw}});var Ae={};n.r(Ae),n.d(Ae,{init:function(){return Iw},metadata:function(){return Tw},name:function(){return Nw},settings:function(){return Pw}});var Ve={};n.r(Ve),n.d(Ve,{init:function(){return Hw},metadata:function(){return Mw},name:function(){return Rw},settings:function(){return Lw}});var Fe={};n.r(Fe),n.d(Fe,{init:function(){return Gw},metadata:function(){return Fw},name:function(){return Dw},settings:function(){return $w}});var De={};n.r(De),n.d(De,{init:function(){return Jw},metadata:function(){return Qw},name:function(){return Kw},settings:function(){return Yw}});var $e={};n.r($e),n.d($e,{init:function(){return xE},metadata:function(){return fE},name:function(){return yE},settings:function(){return kE}});var Ge=window.wp.blocks,Oe=window.wp.element,Ue=window.wp.primitives;var qe=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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 je(e){if(!e)return;const{metadata:t,settings:n,name:o}=e;return(0,Ge.registerBlockType)({name:o,...t},n)}var We=window.wp.components,Ze=window.wp.i18n,Qe=window.wp.blockEditor,Ke=window.wp.serverSideRender,Ye=n.n(Ke);const Je={$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:Xe}=Je,et={icon:qe,example:{},edit:function(e){let{attributes:t,setAttributes:n}=e;const{showLabel:o,showPostCounts:r,displayAsDropdown:a,type:l}=t;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display as dropdown"),checked:a,onChange:()=>n({displayAsDropdown:!a})}),a&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show label"),checked:o,onChange:()=>n({showLabel:!o})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show post counts"),checked:r,onChange:()=>n({showPostCounts:!r})}),(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Group by:"),options:[{label:(0,Ze.__)("Year"),value:"yearly"},{label:(0,Ze.__)("Month"),value:"monthly"},{label:(0,Ze.__)("Week"),value:"weekly"},{label:(0,Ze.__)("Day"),value:"daily"}],value:l,onChange:e=>n({type:e})}))),(0,Oe.createElement)("div",(0,Qe.useBlockProps)(),(0,Oe.createElement)(We.Disabled,null,(0,Oe.createElement)(Ye(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:t}))))}},tt=()=>je({name:Xe,metadata:Je,settings:et});var nt=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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 ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ot.apply(null,arguments)}var rt=n(7153),at=n.n(rt),lt=window.wp.url,it=window.wp.coreData,st=window.wp.data;function ct(e){const t=e?e[0]:24,n=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*n)}}function ut(){const{avatarURL:e}=(0,st.useSelect)((e=>{const{getSettings:t}=e(Qe.store),{__experimentalDiscussionSettings:n}=t();return n}));return e}const mt={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var dt=function(e){let{value:t,onChange:n}=e;const[o,r]=(0,Oe.useState)(),a=(0,st.useSelect)((e=>{const{getUsers:t}=e(it.store);return t(mt)}),[]);if(!a)return null;const l=a.map((e=>({label:e.name,value:e.id})));return(0,Oe.createElement)(We.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("User"),help:(0,Ze.__)("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=>r(l.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})};const pt=e=>{let{setAttributes:t,avatar:n,attributes:o,selectUser:r}=e;return(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("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,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Link to user profile"),onChange:()=>t({isLink:!o.isLink}),checked:o.isLink}),o.isLink&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o.linkTarget}),r&&(0,Oe.createElement)(dt,{value:null==o?void 0:o.userId,onChange:e=>{t({userId:e})}})))},gt=e=>{let{setAttributes:t,attributes:n,avatar:o,blockProps:r,isSelected:a}=e;const l=(0,Qe.__experimentalUseBorderProps)(n),i=(0,lt.addQueryArgs)((0,lt.removeQueryArgs)(null==o?void 0:o.src,["s"]),{s:2*(null==n?void 0:n.size)});return(0,Oe.createElement)("div",r,(0,Oe.createElement)(We.ResizableBox,{size:{width:n.size,height:n.size},showHandle:a,onResizeStop:(e,o,r,a)=>{t({size:parseInt(n.size+(a.height||a.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,Ze.isRTL)(),bottom:!0,left:(0,Ze.isRTL)()},minWidth:o.minSize,maxWidth:o.maxSize},(0,Oe.createElement)("img",ot({src:i,alt:o.alt},l,{className:at()("avatar","avatar-"+n.size,"photo","wp-block-avatar__image",l.className),style:{...l.style}}))))},ht=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{commentId:a}=n,l=(0,Qe.useBlockProps)(),i=function(e){let{commentId:t}=e;const[n]=(0,it.useEntityProp)("root","comment","author_avatar_urls",t),[o]=(0,it.useEntityProp)("root","comment","author_name",t),r=n?Object.values(n):null,a=n?Object.keys(n):null,{minSize:l,maxSize:i}=ct(a),s=ut();return{src:r?r[r.length-1]:s,minSize:l,maxSize:i,alt:o?(0,Ze.sprintf)((0,Ze.__)("%s Avatar"),o):(0,Ze.__)("Default Avatar")}}({commentId:a});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(pt,{avatar:i,setAttributes:o,attributes:t,selectUser:!1}),t.isLink?(0,Oe.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:l,isSelected:r,setAttributes:o})):(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:l,isSelected:r,setAttributes:o}))},vt=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{postId:a,postType:l}=n,i=function(e){let{userId:t,postId:n,postType:o}=e;const{authorDetails:r}=(0,st.useSelect)((e=>{var r;const{getEditedEntityRecord:a,getUser:l}=e(it.store);if(t)return{authorDetails:l(t)};const i=null===(r=a("postType",o,n))||void 0===r?void 0:r.author;return{authorDetails:i?l(i):null}}),[o,n,t]),a=null!=r&&r.avatar_urls?Object.values(r.avatar_urls):null,l=null!=r&&r.avatar_urls?Object.keys(r.avatar_urls):null,{minSize:i,maxSize:s}=ct(l),c=ut();return{src:a?a[a.length-1]:c,minSize:i,maxSize:s,alt:r?(0,Ze.sprintf)((0,Ze.__)("%s Avatar"),null==r?void 0:r.name):(0,Ze.__)("Default Avatar")}}({userId:null==t?void 0:t.userId,postId:a,postType:l}),s=(0,Qe.useBlockProps)();return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(pt,{selectUser:!0,attributes:t,avatar:i,setAttributes:o}),(0,Oe.createElement)("div",null,t.isLink?(0,Oe.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:s,isSelected:r,setAttributes:o})):(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:s,isSelected:r,setAttributes:o})))};const bt={$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:_t}=bt,ft={icon:nt,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,Oe.createElement)(ht,e):(0,Oe.createElement)(vt,e)}},yt=()=>je({name:_t,metadata:bt,settings:ft});var kt=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"})),xt=[{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:r,preload:a,src:l}=t;return(0,Oe.createElement)("figure",null,(0,Oe.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:r,preload:a}),!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:o}))}}],wt=window.wp.blob;var Et=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})),Ct=window.wp.notices,St=window.wp.compose;const Bt=[{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"}],Tt="wp-embed";var Nt=window.lodash,Pt=n(4526),It=n.n(Pt),zt=n(9756),Mt=n.n(zt);const{name:Rt}={$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"},Lt=e=>{var t;return null===(t=(0,Ge.getBlockVariations)(Rt))||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)}))},Ht=e=>e&&e.includes('class="wp-embedded-content"'),At=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{preview:o,attributes:r={}}=e,{url:a,providerNameSlug:l,type:i,...s}=r;if(!a||!(0,Ge.getBlockType)(Rt))return;const c=Lt(a),u="wordpress"===l||i===Tt,m=!u&&c&&(c.attributes.providerNameSlug!==l||!l);if(m)return(0,Ge.createBlock)(Rt,{url:a,...s,...c.attributes});const d=null===(t=(0,Ge.getBlockVariations)(Rt))||void 0===t?void 0:t.find((e=>{let{name:t}=e;return"wordpress"===t}));return d&&o&&Ht(o.html)&&!u?(0,Ge.createBlock)(Rt,{url:a,...d.attributes,...n}):void 0},Vt=e=>{if(!e)return e;const t=Bt.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return It()(e,t)};function Ft(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return Vt(t);const o=document.implementation.createHTMLDocument("");o.body.innerHTML=e;const r=o.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let n=0;n<Bt.length;n++){const o=Bt[n];if(e>=o.ratio){return e-o.ratio>.1?Vt(t):It()(Vt(t),o.className,"wp-has-aspect-ratio")}}}return t}const Dt=Mt()((function(e,t,n,o){let r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};const a={};let{type:l="rich"}=e;const{html:i,provider_name:s}=e,c=(0,Nt.kebabCase)((s||t).toLowerCase());return Ht(i)&&(l=Tt),(i||"photo"===l)&&(a.type=l,a.providerNameSlug=c),a.className=Ft(i,n,o&&r),a})),$t=function(e,t,n,o){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{allowResponsive:a,className:l}=e;return{...e,...Dt(t,n,r?void 0:l,o,a)}},Gt=["audio"];var Ot=function(e){let{attributes:t,className:n,setAttributes:o,onReplace:r,isSelected:a,insertBlocksAfter:l}=e;const{id:i,autoplay:s,caption:c,loop:u,preload:m,src:d}=t,p=(0,St.usePrevious)(c),[g,h]=(0,Oe.useState)(!!c),v=!i&&(0,wt.isBlobURL)(d),b=(0,st.useSelect)((e=>{const{getSettings:t}=e(Qe.store);return t().mediaUpload}),[]);(0,Oe.useEffect)((()=>{if(!i&&(0,wt.isBlobURL)(d)){const e=(0,wt.getBlobByURL)(d);e&&b({filesList:[e],onFileChange:e=>{let[t]=e;return w(t)},onError:e=>x(e),allowedTypes:Gt})}}),[]),(0,Oe.useEffect)((()=>{c&&!p&&h(!0)}),[c,p]);const _=(0,Oe.useCallback)((e=>{e&&!c&&e.focus()}),[c]);function f(e){return t=>{o({[e]:t})}}function y(e){if(e!==d){const t=At({attributes:{url:e}});if(void 0!==t&&r)return void r(t);o({src:e,id:void 0})}}(0,Oe.useEffect)((()=>{a||c||h(!1)}),[a,c]);const{createErrorNotice:k}=(0,st.useDispatch)(Ct.store);function x(e){k(e,{type:"snackbar"})}function w(e){e&&e.url?o({src:e.url,id:e.id,caption:e.caption}):o({src:void 0,id:void 0,caption:void 0})}const E=at()(n,{"is-transient":v}),C=(0,Qe.useBlockProps)({className:E});return d?(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>{h(!g),g&&c&&o({caption:void 0})},icon:Et,isPressed:g,label:g?(0,Ze.__)("Remove caption"):(0,Ze.__)("Add caption")})),(0,Oe.createElement)(Qe.BlockControls,{group:"other"},(0,Oe.createElement)(Qe.MediaReplaceFlow,{mediaId:i,mediaURL:d,allowedTypes:Gt,accept:"audio/*",onSelect:w,onSelectURL:y,onError:x})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Autoplay"),onChange:f("autoplay"),checked:s,help:function(e){return e?(0,Ze.__)("Autoplay may cause usability issues for some users."):null}}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Loop"),onChange:f("loop"),checked:u}),(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze._x)("Preload","noun; Audio block parameter"),value:m||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:(0,Ze.__)("Browser default")},{value:"auto",label:(0,Ze.__)("Auto")},{value:"metadata",label:(0,Ze.__)("Metadata")},{value:"none",label:(0,Ze._x)("None","Preload value")}]}))),(0,Oe.createElement)("figure",C,(0,Oe.createElement)(We.Disabled,{isDisabled:!a},(0,Oe.createElement)("audio",{controls:"controls",src:d})),v&&(0,Oe.createElement)(We.Spinner,null),g&&(!Qe.RichText.isEmpty(c)||a)&&(0,Oe.createElement)(Qe.RichText,{identifier:"caption",tagName:"figcaption",className:(0,Qe.__experimentalGetElementClassName)("caption"),ref:_,"aria-label":(0,Ze.__)("Audio caption text"),placeholder:(0,Ze.__)("Add caption"),value:c,onChange:e=>o({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>l((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))):(0,Oe.createElement)("div",C,(0,Oe.createElement)(Qe.MediaPlaceholder,{icon:(0,Oe.createElement)(Qe.BlockIcon,{icon:kt}),onSelect:w,onSelectURL:y,accept:"audio/*",allowedTypes:Gt,value:t,onError:x}))};const Ut={from:[{type:"files",isMatch(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform(e){const t=e[0];return(0,Ge.createBlock)("core/audio",{src:(0,wt.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:e=>{let{named:{src:t,mp3:n,m4a:o,ogg:r,wav:a,wma:l}}=e;return t||n||o||r||a||l}},loop:{type:"string",shortcode:e=>{let{named:{loop:t}}=e;return t}},autoplay:{type:"string",shortcode:e=>{let{named:{autoplay:t}}=e;return t}},preload:{type:"string",shortcode:e=>{let{named:{preload:t}}=e;return t}}}}]};var qt=Ut;const jt={$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:Wt}=jt,Zt={icon:kt,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:qt,deprecated:xt,edit:Ot,save:function(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:r,preload:a,src:l}=t;return l&&(0,Oe.createElement)("figure",Qe.useBlockProps.save(),(0,Oe.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:r,preload:a}),!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:o,className:(0,Qe.__experimentalGetElementClassName)("caption")}))}},Qt=()=>je({name:Wt,metadata:jt,settings:Zt});var Kt=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const Yt=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries((0,Nt.mapValues)(e,Yt)).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,Nt.isEmpty)(t)?void 0:t};var Jt=Yt;function Xt(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,...r}=e.style.typography;return{...e,style:Jt({...e.style,typography:r}),fontFamily:o.split("|").pop()}}const en=e=>{var t,n,o;const{borderRadius:r,...a}=e,l=[r,null===(t=a.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius].find((e=>"number"==typeof e&&0!==e));return l?{...a,style:{...a.style,border:{...null===(o=a.style)||void 0===o?void 0:o.border,radius:`${l}px`}}}:a};const tn=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:r,...a}=e;return{...a,style:t}},nn=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 tn(o)},on={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"}},rn={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:r}=e;const{fontSize:a,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Qe.__experimentalGetBorderClassesAndStyles)(o),g=(0,Qe.__experimentalGetColorClassesAndStyles)(o),h=(0,Qe.__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()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:_}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))}},an={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:r}=e;const{fontSize:a,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Qe.__experimentalGetBorderClassesAndStyles)(o),g=(0,Qe.__experimentalGetColorClassesAndStyles)(o),h=(0,Qe.__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()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:_}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))},migrate:Xt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},ln=[rn,an,{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:{...on,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:r,className:a}=e;const{fontSize:l,linkTarget:i,rel:s,style:c,text:u,title:m,url:d,width:p}=r;if(!u)return null;const g=null==c||null===(t=c.border)||void 0===t?void 0:t.radius,h=(0,Qe.__experimentalGetColorClassesAndStyles)(r),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()(a,{[`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,Oe.createElement)("div",Qe.useBlockProps.save({className:_}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:v,href:d,title:m,style:b,value:u,target:i,rel:s}))},migrate:(0,St.compose)(Xt,en)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,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:r,rel:a,text:l,title:i,url:s,width:c}=t,u=(0,Qe.__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,Oe.createElement)("div",Qe.useBlockProps.save({className:p}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:r,rel:a}))},migrate:(0,St.compose)(Xt,en)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,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:r,rel:a,text:l,title:i,url:s,width:c}=t,u=(0,Qe.__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,Oe.createElement)("div",Qe.useBlockProps.save({className:p}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:r,rel:a}))},migrate:(0,St.compose)(Xt,en)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...on,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:r,text:a,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,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:s,href:i,title:l,style:c,value:a,target:o,rel:r})},migrate:en},{supports:{align:!0,alignWide:!1},attributes:{...on,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||e.align),migrate:(0,St.compose)(en,tn,(function(e){if(!e.align)return e;const{align:t,...n}=e;return{...n,className:at()(n.className,`align${e.align}`)}})),save(e){let{attributes:t}=e;const{backgroundColor:n,borderRadius:o,customBackgroundColor:r,customTextColor:a,customGradient:l,linkTarget:i,gradient:s,rel:c,text:u,textColor:m,title:d,url:p}=t,g=(0,Qe.getColorClassName)("color",m),h=!l&&(0,Qe.getColorClassName)("background-color",n),v=(0,Qe.__experimentalGetGradientClass)(s),b=at()("wp-block-button__link",{"has-text-color":m||a,[g]:g,"has-background":n||r||l||s,[h]:h,"no-border-radius":0===o,[v]:v}),_={background:l||void 0,backgroundColor:h||l||s?void 0:r,color:g?void 0:a,borderRadius:o?o+"px":void 0};return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:b,href:p,title:d,style:_,value:u,target:i,rel:c}))}},{attributes:{...on,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){return e.className&&e.className.includes("is-style-squared")},migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),en(tn({...e,className:t||void 0,borderRadius:0}))},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,customTextColor:r,linkTarget:a,rel:l,text:i,textColor:s,title:c,url:u}=t,m=(0,Qe.getColorClassName)("color",s),d=(0,Qe.getColorClassName)("background-color",n),p=at()("wp-block-button__link",{"has-text-color":s||r,[m]:m,"has-background":n||o,[d]:d}),g={backgroundColor:d?void 0:o,color:m?void 0:r};return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:p,href:u,title:c,style:g,value:i,target:a,rel:l}))}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:nn,save(e){let{attributes:t}=e;const{url:n,text:o,title:r,backgroundColor:a,textColor:l,customBackgroundColor:i,customTextColor:s}=t,c=(0,Qe.getColorClassName)("color",l),u=(0,Qe.getColorClassName)("background-color",a),m=at()("wp-block-button__link",{"has-text-color":l||s,[c]:c,"has-background":a||i,[u]:u}),d={backgroundColor:u?void 0:i,color:c?void 0:s};return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:m,href:n,title:r,style:d,value:o}))}},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:l,textColor:i}=t,s={backgroundColor:l,color:i};return(0,Oe.createElement)("div",{className:`align${a}`},(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:r,style:s,value:o}))},migrate:nn},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:l,textColor:i}=t;return(0,Oe.createElement)("div",{className:`align${a}`,style:{backgroundColor:l}},(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",href:n,title:r,style:{color:i},value:o}))},migrate:nn}];var sn=ln,cn=window.wp.keycodes;var un=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var mn=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const dn="noreferrer noopener";function pn(e){let{selectedWidth:t,setAttributes:n}=e;return(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Width settings")},(0,Oe.createElement)(We.ButtonGroup,{"aria-label":(0,Ze.__)("Button width")},[25,50,75,100].map((e=>(0,Oe.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,"%")))))}var gn=function(e){var t;const{attributes:n,setAttributes:o,className:r,isSelected:a,onReplace:l,mergeBlocks:i}=e,{textAlign:s,linkTarget:c,placeholder:u,rel:m,style:d,text:p,url:g,width:h}=n,[v,b]=(0,Oe.useState)(null),_=(0,Qe.__experimentalUseBorderProps)(n),f=(0,Qe.__experimentalUseColorProps)(n),y=(0,Qe.__experimentalGetSpacingClassesAndStyles)(n),k=(0,Oe.useRef)(),x=(0,Oe.useRef)(),w=(0,Qe.useBlockProps)({ref:(0,St.useMergeRefs)([b,k]),onKeyDown:function(e){if(cn.isKeyboardEvent.primary(e,"k"))T(e);else if(cn.isKeyboardEvent.primaryShift(e,"k")){var t;N(),null===(t=x.current)||void 0===t||t.focus()}}}),[E,C]=(0,Oe.useState)(!1),S=!!g,B="_blank"===c;function T(e){e.preventDefault(),C(!0)}function N(){o({url:void 0,linkTarget:void 0,rel:void 0}),C(!1)}return(0,Oe.useEffect)((()=>{a||C(!1)}),[a]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("div",ot({},w,{className:at()(w.className,{[`has-custom-width wp-block-button__width-${h}`]:h,"has-custom-font-size":w.style.fontSize})}),(0,Oe.createElement)(Qe.RichText,{ref:x,"aria-label":(0,Ze.__)("Button text"),placeholder:u||(0,Ze.__)("Add text…"),value:p,onChange:e=>{o({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:at()(r,"wp-block-button__link",f.className,_.className,{[`has-text-align-${s}`]:s,"no-border-radius":0===(null==d||null===(t=d.border)||void 0===t?void 0:t.radius)},(0,Qe.__experimentalGetElementClassName)("button")),style:{..._.style,...f.style,...y.style},onSplit:e=>(0,Ge.createBlock)("core/button",{...n,text:e}),onReplace:l,onMerge:i,identifier:"text"})),(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:s,onChange:e=>{o({textAlign:e})}}),!S&&(0,Oe.createElement)(We.ToolbarButton,{name:"link",icon:un,title:(0,Ze.__)("Link"),shortcut:cn.displayShortcut.primary("k"),onClick:T}),S&&(0,Oe.createElement)(We.ToolbarButton,{name:"link",icon:mn,title:(0,Ze.__)("Unlink"),shortcut:cn.displayShortcut.primaryShift("k"),onClick:N,isActive:!0})),a&&(E||S)&&(0,Oe.createElement)(We.Popover,{placement:"bottom",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,Oe.createElement)(Qe.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:g,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=m;t&&!m?n=dn:t||m!==dn||(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,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(pn,{selectedWidth:h,setAttributes:o})),(0,Oe.createElement)(Qe.InspectorControls,{group:"advanced"},(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Link rel"),value:m||"",onChange:e=>o({rel:e})})))};const hn={$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:{textAlign:{type:"string"},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:!1,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,shadow:!0,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:vn}=hn,bn={icon:Kt,example:{attributes:{className:"is-style-fill",text:(0,Ze.__)("Call to Action")}},edit:gn,save:function(e){var t,n;let{attributes:o,className:r}=e;const{textAlign:a,fontSize:l,linkTarget:i,rel:s,style:c,text:u,title:m,url:d,width:p}=o;if(!u)return null;const g=(0,Qe.__experimentalGetBorderClassesAndStyles)(o),h=(0,Qe.__experimentalGetColorClassesAndStyles)(o),v=(0,Qe.__experimentalGetSpacingClassesAndStyles)(o),b=at()("wp-block-button__link",h.className,g.className,{[`has-text-align-${a}`]:a,"no-border-radius":0===(null==c||null===(t=c.border)||void 0===t?void 0:t.radius)},(0,Qe.__experimentalGetElementClassName)("button")),_={...g.style,...h.style,...v.style},f=at()(r,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":l||(null==c||null===(n=c.typography)||void 0===n?void 0:n.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:f}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:b,href:d,title:m,style:_,value:u,target:i,rel:s}))},deprecated:sn,merge:(e,t)=>{let{text:n=""}=t;return{...e,text:(e.text||"")+n}}},_n=()=>je({name:vn,metadata:hn,settings:bn});var fn=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const yn=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},kn=[{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:yn,save(e){let{attributes:{contentJustification:t,orientation:n}}=e;return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:at()({[`is-content-justification-${t}`]:t,"is-vertical":"vertical"===n})}),(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}},{supports:{align:["center","left","right"],anchor:!0},save(){return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.InnerBlocks.Content,null))},isEligible(e){let{align:t}=e;return t&&["center","left","right"].includes(t)},migrate(e){return yn({...e,align:void 0,contentJustification:e.align})}}];var xn=kn,wn=window.wp.richText;const{name:En}={$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"},Cn={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,Ge.createBlock)(En,{},e.map((e=>(0,Ge.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)(En,{},e.map((e=>{const t=(0,wn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelector("a"),r=null==o?void 0:o.getAttribute("href");return(0,Ge.createBlock)("core/button",{text:n,url:r})}))),isMatch:e=>e.every((e=>{const t=(0,wn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelectorAll("a");return n.length<=30&&o.length<=1}))}]};var Sn=Cn;const Bn=[vn],Tn={name:vn,attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};var Nn=function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,style:a}=n,l=(0,Qe.useBlockProps)({className:at()(o,{"has-custom-font-size":r||(null==a||null===(t=a.typography)||void 0===t?void 0:t.fontSize)})}),i=(0,st.useSelect)((e=>{var t;const n=e(Qe.store).getSettings().__experimentalPreferredStyleVariations;return null==n||null===(t=n.value)||void 0===t?void 0:t[vn]}),[]),s=(0,Qe.useInnerBlocksProps)(l,{allowedBlocks:Bn,__experimentalDefaultBlock:Tn,__experimentalDirectInsert:!0,template:[[vn,{className:i&&`is-style-${i}`}]],templateInsertUpdatesSelection:!0});return(0,Oe.createElement)("div",s)};const Pn={$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:In}=Pn,zn={icon:fn,example:{innerBlocks:[{name:"core/button",attributes:{text:(0,Ze.__)("Find out more")}},{name:"core/button",attributes:{text:(0,Ze.__)("Contact us")}}]},deprecated:xn,transforms:Sn,edit:Nn,save:function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,style:a}=n,l=Qe.useBlockProps.save({className:at()(o,{"has-custom-font-size":r||(null==a||null===(t=a.typography)||void 0===t?void 0:t.fontSize)})}),i=Qe.useInnerBlocksProps.save(l);return(0,Oe.createElement)("div",i)}},Mn=()=>je({name:In,metadata:Pn,settings:zn});var Rn=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const Ln=Mt()((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));var Hn={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/archives")}]};const An={$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:Vn}=An,Fn={icon:Rn,example:{},edit:function(e){let{attributes:t}=e;const n=(0,Qe.useBlockProps)(),{date:o,hasPosts:r,hasPostsResolved:a}=(0,st.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(it.store),o={status:"publish",per_page:1},r=t("postType","post",o),a=n("getEntityRecords",["postType","post",o]);let l;const i=e("core/editor");if(i){"post"===i.getEditedPostAttribute("type")&&(l=i.getEditedPostAttribute("date"))}return{date:l,hasPostsResolved:a,hasPosts:a&&1===(null==r?void 0:r.length)}}),[]);return r?(0,Oe.createElement)("div",n,(0,Oe.createElement)(We.Disabled,null,(0,Oe.createElement)(Ye(),{block:"core/calendar",attributes:{...t,...Ln(o)}}))):(0,Oe.createElement)("div",n,(0,Oe.createElement)(We.Placeholder,{icon:Rn,label:(0,Ze.__)("Calendar")},a?(0,Ze.__)("No published posts found."):(0,Oe.createElement)(We.Spinner,null)))},transforms:Hn},Dn=()=>je({name:Vn,metadata:An,settings:Fn});var $n=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"})),Gn=window.wp.htmlEntities;var On=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const Un={$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:qn}=Un,jn={icon:$n,example:{},edit:function e(t){let{attributes:{displayAsDropdown:n,showHierarchy:o,showPostCounts:r,showOnlyTopLevel:a,showEmpty:l},setAttributes:i,className:s}=t;const c=(0,St.useInstanceId)(e,"blocks-category-select"),u={per_page:-1,hide_empty:!l,context:"view"};a&&(u.parent=0);const{records:m,isResolving:d}=(0,it.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,Gn.decodeEntities)(e).trim():(0,Ze.__)("(Untitled)"),v=e=>{const t=p(e.id),{id:n,link:a,count:l,name:i}=e;return(0,Oe.createElement)("li",{key:n,className:`cat-item cat-item-${n}`},(0,Oe.createElement)("a",{href:a,target:"_blank",rel:"noreferrer noopener"},h(i)),r&&` (${l})`,o&&!!t.length&&(0,Oe.createElement)("ul",{className:"children"},t.map((e=>v(e)))))},b=(e,t)=>{const{id:n,count:a,name:l}=e,i=p(n);return[(0,Oe.createElement)("option",{key:n,className:`level-${t}`},Array.from({length:3*t}).map((()=>" ")),h(l),r&&` (${a})`),o&&!!i.length&&i.map((e=>b(e,t+1)))]},_=null==m||!m.length||n||d?"div":"ul",f=at()(s,{"wp-block-categories-list":!(null==m||!m.length||n||d),"wp-block-categories-dropdown":!(null==m||!m.length)&&n&&!d}),y=(0,Qe.useBlockProps)({className:f});return(0,Oe.createElement)(_,y,(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display as dropdown"),checked:n,onChange:g("displayAsDropdown")}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show post counts"),checked:r,onChange:g("showPostCounts")}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show only top level categories"),checked:a,onChange:g("showOnlyTopLevel")}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show empty categories"),checked:l,onChange:g("showEmpty")}),!a&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show hierarchy"),checked:o,onChange:g("showHierarchy")}))),d&&(0,Oe.createElement)(We.Placeholder,{icon:On,label:(0,Ze.__)("Categories")},(0,Oe.createElement)(We.Spinner,null)),!d&&0===(null==m?void 0:m.length)&&(0,Oe.createElement)("p",null,(0,Ze.__)("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,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.VisuallyHidden,{as:"label",htmlFor:c},(0,Ze.__)("Categories")),(0,Oe.createElement)("select",{id:c},(0,Oe.createElement)("option",null,(0,Ze.__)("Select Category")),e.map((e=>b(e,0)))))})():p(o?0:null).map((e=>v(e)))))}},Wn=()=>je({name:qn,metadata:Un,settings:jn});var Zn=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));var Qn=e=>{let{clientId:t}=e;const{replaceBlocks:n}=(0,st.useDispatch)(Qe.store),o=(0,st.useSelect)((e=>e(Qe.store).getBlock(t)),[t]);return(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>n(o.clientId,(0,Ge.rawHandler)({HTML:(0,Ge.serialize)(o)}))},(0,Ze.__)("Convert to blocks"))};function Kn(e){const t=(0,st.useSelect)((e=>e(Qe.store).getSettings().styles));return(0,Oe.useEffect)((()=>{const{baseURL:n,suffix:o,settings:r}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:n,suffix:o}),window.wp.oldEditor.initialize(e.id,{tinymce:{...r,height:500,setup(e){e.on("init",(()=>{const n=e.getDoc();t.forEach((e=>{let{css:t}=e;const o=n.createElement("style");o.innerHTML=t,n.head.appendChild(o)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,Oe.createElement)("textarea",e)}function Yn(e){const{clientId:t,attributes:{content:n},setAttributes:o,onReplace:r}=e,[a,l]=(0,Oe.useState)(!1),i=`editor-${t}`,s=(0,Ze.__)("Classic Edit");return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>l(!0)},s))),n&&(0,Oe.createElement)(Oe.RawHTML,null,n),(a||!n)&&(0,Oe.createElement)(We.Modal,{title:s,__experimentalHideHeader:!0},(0,Oe.createElement)("h2",{style:{display:"flex",justifyContent:"space-between"}},(0,Oe.createElement)("div",null,s),(0,Oe.createElement)("div",null,(0,Oe.createElement)(We.Button,{onClick:()=>n?l(!1):r([])},(0,Ze.__)("Cancel")),(0,Oe.createElement)(We.Button,{isPrimary:!0,onClick:()=>{o({content:window.wp.oldEditor.getContent(i)}),l(!1)}},(0,Ze.__)("Save")))),(0,Oe.createElement)(Kn,{id:i,defaultValue:n})))}const{wp:Jn}=window;function Xn(e){let{clientId:t,attributes:{content:n},setAttributes:o,onReplace:r}=e;const{getMultiSelectedBlockClientIds:a}=(0,st.useSelect)(Qe.store),l=(0,Oe.useRef)(!1);return(0,Oe.useEffect)((()=>{if(!l.current)return;const e=window.tinymce.get(`editor-${t}`);(null==e?void 0:e.getContent())!==n&&e.setContent(n||"")}),[n]),(0,Oe.useEffect)((()=>{const{baseURL:e,suffix:i}=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 r=document.querySelector(".interface-interface-skeleton__content"),l=r.scrollTop;return null!==(n=a())&&void 0!==n&&n.length||o({content:e.getContent()}),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),r.scrollTop!==l&&(r.scrollTop=l))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const l=(0,St.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=>{cn.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==cn.BACKSPACE&&t.keyCode!==cn.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)||(r([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===cn.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;Jn.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 l.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:e,suffix:i}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),Jn.oldEditor.remove(`editor-${t}`)}}),[]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.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,Ze.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,Oe.createElement)("div",{key:"editor",id:`editor-${t}`,className:"wp-block-freeform block-library-rich-text__tinymce"}))}const eo={$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:to}=eo,no={icon:Zn,edit:function(e){const{clientId:t}=e,n=(0,st.useSelect)((e=>e(Qe.store).canRemoveBlock(t)),[t]),[o,r]=(0,Oe.useState)(!1),a=(0,St.useRefEffect)((e=>{r(e.ownerDocument!==document)}),[]);return(0,Oe.createElement)(Oe.Fragment,null,n&&(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,(0,Oe.createElement)(Qn,{clientId:t}))),(0,Oe.createElement)("div",(0,Qe.useBlockProps)({ref:a}),o?(0,Oe.createElement)(Yn,e):(0,Oe.createElement)(Xn,e)))},save:function(e){let{attributes:t}=e;const{content:n}=t;return(0,Oe.createElement)(Oe.RawHTML,null,n)}},oo=()=>je({name:to,metadata:eo,settings:no});var ro=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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 ao(e){return e.replace(/\[/g,"[")}function lo(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}var io={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.replace(/\n/g,"<br>")})}}]};const so={$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:co}=so,uo={icon:ro,example:{attributes:{content:(0,Ze.__)("// 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:io,edit:function(e){let{attributes:t,setAttributes:n,onRemove:o}=e;const r=(0,Qe.useBlockProps)();return(0,Oe.createElement)("pre",r,(0,Oe.createElement)(Qe.RichText,{tagName:"code",value:t.content,onChange:e=>n({content:e}),onRemove:o,placeholder:(0,Ze.__)("Write code…"),"aria-label":(0,Ze.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0}))},save:function(e){let{attributes:t}=e;return(0,Oe.createElement)("pre",Qe.useBlockProps.save(),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"code",value:(n=t.content,(0,St.pipe)(ao,lo)(n||""))}));var n}},mo=()=>je({name:co,metadata:so,settings:uo});var po=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const go=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible(e){let{width:t}=e;return isFinite(t)},migrate(e){return{...e,width:`${e.width}%`}},save(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=at()({[`is-vertically-aligned-${n}`]:n}),a={flexBasis:o+"%"};return(0,Oe.createElement)("div",{className:r,style:a},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];var ho=go;var vo=function(e){let{attributes:{verticalAlignment:t,width:n,templateLock:o,allowedBlocks:r},setAttributes:a,clientId:l}=e;const i=at()("block-core-columns",{[`is-vertically-aligned-${t}`]:t}),s=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Qe.useSetting)("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:c,hasChildBlocks:u,rootClientId:m}=(0,st.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(Qe.store),o=n(l);return{hasChildBlocks:t(l).length>0,rootClientId:o,columnsIds:t(o)}}),[l]),{updateBlockAttributes:d}=(0,st.useDispatch)(Qe.store),p=Number.isFinite(n)?n+"%":n,g=(0,Qe.useBlockProps)({className:i,style:p?{flexBasis:p}:void 0}),h=c.length,v=c.indexOf(l)+1,b=(0,Ze.sprintf)((0,Ze.__)("%1$s (%2$d of %3$d)"),g["aria-label"],v,h),_=(0,Qe.useInnerBlocksProps)({...g,"aria-label":b},{templateLock:o,allowedBlocks:r,renderAppender:u?void 0:Qe.InnerBlocks.ButtonBlockAppender});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(Qe.BlockVerticalAlignmentToolbar,{onChange:e=>{a({verticalAlignment:e}),d(m,{verticalAlignment:null})},value:t})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Column settings")},(0,Oe.createElement)(We.__experimentalUnitControl,{label:(0,Ze.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:n||"",onChange:e=>{e=0>parseFloat(e)?"0":e,a({width:e})},units:s}))),(0,Oe.createElement)("div",_))};const bo={$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:_o}=bo,fo={icon:po,edit:vo,save:function(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=at()({[`is-vertically-aligned-${n}`]:n});let a;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+"%"}a={flexBasis:e}}const l=Qe.useBlockProps.save({className:r,style:a}),i=Qe.useInnerBlocksProps.save(l);return(0,Oe.createElement)("div",i)},deprecated:ho},yo=()=>je({name:_o,metadata:bo,settings:fo});var ko=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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 xo(e){let t,{doc:n}=xo;n||(n=document.implementation.createHTMLDocument(""),xo.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var wo=[{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,...r}=e;return{...r,style:t,isStackedOnMobile:!0}},save(e){let{attributes:t}=e;const{verticalAlignment:n,backgroundColor:o,customBackgroundColor:r,textColor:a,customTextColor:l}=t,i=(0,Qe.getColorClassName)("background-color",o),s=(0,Qe.getColorClassName)("color",a),c=at()({"has-background":o||r,"has-text-color":a||l,[i]:i,[s]:s,[`are-vertically-aligned-${n}`]:n}),u={backgroundColor:i?void 0:r,color:s?void 0:l};return(0,Oe.createElement)("div",{className:c||void 0,style:u},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible(e,t){return!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==xo(e.originalContent)))},migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let o=xo(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,...r}=e;return[{...r,isStackedOnMobile:!0},n]},save(e){let{attributes:t}=e;const{columns:n}=t;return(0,Oe.createElement)("div",{className:`has-${n}-columns`},(0,Oe.createElement)(Qe.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,r=at()(`has-${o}-columns`,{[`are-vertically-aligned-${n}`]:n});return(0,Oe.createElement)("div",{className:r},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];const Eo=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function Co(e,t){const{width:n=100/t}=e.attributes;return Eo(n)}function So(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>e+Co(n,t)),0)}function Bo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>{const o=Co(n,t);return Object.assign(e,{[n.clientId]:o})}),{})}function To(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const o=So(e,n);return(0,Nt.mapValues)(Bo(e,n),(e=>Eo(t*e/o)))}function No(e,t){return e.map((e=>(0,Nt.merge)({},e,{attributes:{width:`${t[e.clientId]}%`}})))}const Po=["core/column"];const Io=(0,st.withDispatch)(((e,t,n)=>({updateAlignment(o){const{clientId:r,setAttributes:a}=t,{updateBlockAttributes:l}=e(Qe.store),{getBlockOrder:i}=n.select(Qe.store);a({verticalAlignment:o});i(r).forEach((e=>{l(e,{verticalAlignment:o})}))},updateColumns(o,r){const{clientId:a}=t,{replaceInnerBlocks:l}=e(Qe.store),{getBlocks:i}=n.select(Qe.store);let s=i(a);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)}));const u=r>o;if(u&&c){const e=Eo(100/r);s=[...No(s,To(s,100-e)),...Array.from({length:r-o}).map((()=>(0,Ge.createBlock)("core/column",{width:`${e}%`})))]}else if(u)s=[...s,...Array.from({length:r-o}).map((()=>(0,Ge.createBlock)("core/column")))];else if(s=s.slice(0,-(o-r)),c){s=No(s,To(s,100))}l(a,s)}})))((function(e){let{attributes:t,setAttributes:n,updateAlignment:o,updateColumns:r,clientId:a}=e;const{isStackedOnMobile:l,verticalAlignment:i}=t,{count:s}=(0,st.useSelect)((e=>({count:e(Qe.store).getBlockCount(a)})),[a]),c=at()({[`are-vertically-aligned-${i}`]:i,"is-not-stacked-on-mobile":!l}),u=(0,Qe.useBlockProps)({className:c}),m=(0,Qe.useInnerBlocksProps)(u,{allowedBlocks:Po,orientation:"horizontal",renderAppender:!1});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(Qe.BlockVerticalAlignmentToolbar,{onChange:o,value:i})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,null,(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Columns"),value:s,onChange:e=>r(s,e),min:1,max:Math.max(6,s)}),s>6&&(0,Oe.createElement)(We.Notice,{status:"warning",isDismissible:!1},(0,Ze.__)("This column count exceeds the recommended amount and may cause visual breakage.")),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Stack on mobile"),checked:l,onChange:()=>n({isStackedOnMobile:!l})}))),(0,Oe.createElement)("div",m))}));function zo(e){let{clientId:t,name:n,setAttributes:o}=e;const{blockType:r,defaultVariation:a,variations:l}=(0,st.useSelect)((e=>{const{getBlockVariations:t,getBlockType:o,getDefaultBlockVariation:r}=e(Ge.store);return{blockType:o(n),defaultVariation:r(n,"block"),variations:t(n,"block")}}),[n]),{replaceInnerBlocks:i}=(0,st.useDispatch)(Qe.store),s=(0,Qe.useBlockProps)();return(0,Oe.createElement)("div",s,(0,Oe.createElement)(Qe.__experimentalBlockVariationPicker,{icon:(0,Nt.get)(r,["icon","src"]),label:(0,Nt.get)(r,["title"]),variations:l,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;e.attributes&&o(e.attributes),e.innerBlocks&&i(t,(0,Ge.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0}))}var Mo=e=>{const{clientId:t}=e,n=(0,st.useSelect)((e=>e(Qe.store).getBlocks(t).length>0),[t])?Io:zo;return(0,Oe.createElement)(n,e)};var Ro=[{name:"one-column-full",title:(0,Ze.__)("100"),description:(0,Ze.__)("One column"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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,Ze.__)("50 / 50"),description:(0,Ze.__)("Two columns; equal split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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,Ze.__)("33 / 66"),description:(0,Ze.__)("Two columns; one-third, two-thirds split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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,Ze.__)("66 / 33"),description:(0,Ze.__)("Two columns; two-thirds, one-third split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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,Ze.__)("33 / 33 / 33"),description:(0,Ze.__)("Three columns; equal split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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,Ze.__)("25 / 50 / 25"),description:(0,Ze.__)("Three columns; wide center column"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"]}];const Lo={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:r}=e;return["core/column",{width:`${t}%`},[[n,{...o},r]]]}));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:r,style:a,mediaAlt:l,mediaId:i,mediaPosition:s,mediaSizeSlug:c,mediaType:u,mediaUrl:m,mediaWidth:d,verticalAlignment:p}=e;let g;if("image"!==u&&u)g=["core/video",{id:i,src:m}];else{g=["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:r,style:a,verticalAlignment:p},(0,Ge.createBlocksFromInnerBlocksTemplate)(h))}}],to:[{type:"block",blocks:["*"],transform:(e,t)=>t.flatMap((e=>e.innerBlocks))}]};var Ho=Lo;const Ao={$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:Vo}=Ao,Fo={icon:ko,variations:Ro,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ze.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,Ze.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ze.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,Ze.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:wo,edit:Mo,save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,verticalAlignment:o}=t,r=at()({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!n}),a=Qe.useBlockProps.save({className:r}),l=Qe.useInnerBlocksProps.save(a);return(0,Oe.createElement)("div",l)},transforms:Ho},Do=()=>je({name:Vo,metadata:Ao,settings:Fo});var $o=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var Go=[{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=Qe.useBlockProps.save(),{className:o}=n,r=(null==o?void 0:o.split(" "))||[],a=null==r?void 0:r.filter((e=>"wp-block-comments"!==e)),l={...n,className:a.join(" ")};return(0,Oe.createElement)(t,l,(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];function Oo(e){let{attributes:{tagName:t},setAttributes:n}=e;const o={section:(0,Ze.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,Ze.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.")};return(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(Qe.InspectorControls,{group:"advanced"},(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("HTML element"),options:[{label:(0,Ze.__)("Default (<div>)"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:t,onChange:e=>n({tagName:e}),help:o[t]})))}const Uo=()=>{const e=(0,St.useInstanceId)(Uo);return(0,Oe.createElement)("div",{className:"comment-respond"},(0,Oe.createElement)("h3",{className:"comment-reply-title"},(0,Ze.__)("Leave a Reply")),(0,Oe.createElement)("form",{noValidate:!0,className:"comment-form",inert:"true"},(0,Oe.createElement)("p",null,(0,Oe.createElement)("label",{htmlFor:`comment-${e}`},(0,Ze.__)("Comment")),(0,Oe.createElement)("textarea",{id:`comment-${e}`,name:"comment",cols:"45",rows:"8"})),(0,Oe.createElement)("p",{className:"form-submit wp-block-button"},(0,Oe.createElement)("input",{name:"submit",type:"submit",className:at()("wp-block-button__link",(0,Qe.__experimentalGetElementClassName)("button")),label:(0,Ze.__)("Post Comment"),value:(0,Ze.__)("Post Comment")}))))};var qo=e=>{let{postId:t,postType:n}=e;const[o,r]=(0,it.useEntityProp)("postType",n,"comment_status",t),a=void 0===n||void 0===t,{defaultCommentStatus:l}=(0,st.useSelect)((e=>e(Qe.store).getSettings().__experimentalDiscussionSettings)),i=(0,st.useSelect)((e=>{var t;return!!n&&!(null===(t=e(it.store).getPostType(n))||void 0===t||!t.supports.comments)}));if(!a&&"open"!==o){if("closed"===o){const e=[(0,Oe.createElement)(We.Button,{key:"enableComments",onClick:()=>r("open"),variant:"primary"},(0,Ze._x)("Enable comments","action that affects the current post"))];return(0,Oe.createElement)(Qe.Warning,{actions:e},(0,Ze.__)("Post Comments Form block: Comments are not enabled for this item."))}if(!i)return(0,Oe.createElement)(Qe.Warning,null,(0,Ze.sprintf)((0,Ze.__)("Post Comments Form block: Comments are not enabled for this post type (%s)."),n));if("open"!==l)return(0,Oe.createElement)(Qe.Warning,null,(0,Ze.__)("Post Comments Form block: Comments are not enabled."))}return(0,Oe.createElement)(Uo,null)};function jo(e){let{postType:t,postId:n}=e,[o]=(0,it.useEntityProp)("postType",t,"title",n);o=o||(0,Ze.__)("Post Title");const{avatarURL:r}=(0,st.useSelect)((e=>e(Qe.store).getSettings().__experimentalDiscussionSettings));return(0,Oe.createElement)("div",{className:"wp-block-comments__legacy-placeholder",inert:"true"},(0,Oe.createElement)("h3",null,(0,Ze.sprintf)((0,Ze.__)("One response to %s"),o)),(0,Oe.createElement)("div",{className:"navigation"},(0,Oe.createElement)("div",{className:"alignleft"},(0,Oe.createElement)("a",{href:"#top"},"« ",(0,Ze.__)("Older Comments"))),(0,Oe.createElement)("div",{className:"alignright"},(0,Oe.createElement)("a",{href:"#top"},(0,Ze.__)("Newer Comments")," »"))),(0,Oe.createElement)("ol",{className:"commentlist"},(0,Oe.createElement)("li",{className:"comment even thread-even depth-1"},(0,Oe.createElement)("article",{className:"comment-body"},(0,Oe.createElement)("footer",{className:"comment-meta"},(0,Oe.createElement)("div",{className:"comment-author vcard"},(0,Oe.createElement)("img",{alt:"Commenter Avatar",src:r,className:"avatar avatar-32 photo",height:"32",width:"32",loading:"lazy"}),(0,Oe.createElement)("b",{className:"fn"},(0,Oe.createElement)("a",{href:"#top",className:"url"},(0,Ze.__)("A WordPress Commenter")))," ",(0,Oe.createElement)("span",{className:"says"},(0,Ze.__)("says"),":")),(0,Oe.createElement)("div",{className:"comment-metadata"},(0,Oe.createElement)("a",{href:"#top"},(0,Oe.createElement)("time",{dateTime:"2000-01-01T00:00:00+00:00"},(0,Ze.__)("January 1, 2000 at 00:00 am")))," ",(0,Oe.createElement)("span",{className:"edit-link"},(0,Oe.createElement)("a",{className:"comment-edit-link",href:"#top"},(0,Ze.__)("Edit"))))),(0,Oe.createElement)("div",{className:"comment-content"},(0,Oe.createElement)("p",null,(0,Ze.__)("Hi, this is a comment."),(0,Oe.createElement)("br",null),(0,Ze.__)("To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."),(0,Oe.createElement)("br",null),(0,Ze.__)("Commenter avatars come from")," ",(0,Oe.createElement)("a",{href:"https://gravatar.com/"},"Gravatar"),".")),(0,Oe.createElement)("div",{className:"reply"},(0,Oe.createElement)("a",{className:"comment-reply-link",href:"#top","aria-label":"Reply to A WordPress Commenter"},(0,Ze.__)("Reply")))))),(0,Oe.createElement)("div",{className:"navigation"},(0,Oe.createElement)("div",{className:"alignleft"},(0,Oe.createElement)("a",{href:"#top"},"« ",(0,Ze.__)("Older Comments"))),(0,Oe.createElement)("div",{className:"alignright"},(0,Oe.createElement)("a",{href:"#top"},(0,Ze.__)("Newer Comments")," »"))),(0,Oe.createElement)(qo,{postId:n,postType:t}))}function Wo(e){let{attributes:t,setAttributes:n,context:{postType:o,postId:r}}=e;const{textAlign:a}=t,l=[(0,Oe.createElement)(We.Button,{key:"convert",onClick:()=>{n({legacy:!1})},variant:"primary"},(0,Ze.__)("Switch to editable mode"))],i=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${a}`]:a})});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:a,onChange:e=>{n({textAlign:e})}})),(0,Oe.createElement)("div",i,(0,Oe.createElement)(Qe.Warning,{actions:l},(0,Ze.__)("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,Oe.createElement)(jo,{postId:r,postType:o})))}var Zo=[["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"]];const Qo={$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"],color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!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-comments-editor",usesContext:["postId","postType"]},{name:Ko}=Qo,Yo={icon:$o,edit:function(e){const{attributes:t,setAttributes:n}=e,{tagName:o,legacy:r}=t,a=(0,Qe.useBlockProps)(),l=(0,Qe.useInnerBlocksProps)(a,{template:Zo});return r?(0,Oe.createElement)(Wo,e):(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Oo,{attributes:t,setAttributes:n}),(0,Oe.createElement)(o,l))},save:function(e){let{attributes:{tagName:t,legacy:n}}=e;const o=Qe.useBlockProps.save(),r=Qe.useInnerBlocksProps.save(o);return n?null:(0,Oe.createElement)(t,r)},deprecated:Go},Jo=()=>je({name:Ko,metadata:Qo,settings:Yo});const Xo={$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:er}=Xo,tr={icon:nt,edit:function(e){let{attributes:t,context:{commentId:n},setAttributes:o,isSelected:r}=e;const{height:a,width:l}=t,[i]=(0,it.useEntityProp)("root","comment","author_avatar_urls",n),[s]=(0,it.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,Qe.useBlockProps)(),g=(0,Qe.__experimentalGetSpacingClassesAndStyles)(t),h=Math.floor(2.5*d),{avatarURL:v}=(0,st.useSelect)((e=>{const{getSettings:t}=e(Qe.store),{__experimentalDiscussionSettings:n}=t();return n})),b=(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Avatar Settings")},(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Image size"),onChange:e=>o({width:e,height:e}),min:m,max:h,initialPosition:l,value:l}))),_=(0,Oe.createElement)(We.ResizableBox,{size:{width:l,height:a},showHandle:r,onResizeStop:(e,t,n,r)=>{o({height:parseInt(a+r.height,10),width:parseInt(l+r.width,10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,Ze.isRTL)(),bottom:!0,left:(0,Ze.isRTL)()},minWidth:m,maxWidth:h},(0,Oe.createElement)("img",ot({src:c?c[c.length-1]:v,alt:`${s} ${(0,Ze.__)("Avatar")}`},p)));return(0,Oe.createElement)(Oe.Fragment,null,b,(0,Oe.createElement)("div",g,_))}},nr=()=>je({name:er,metadata:Xo,settings:tr});var or=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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,Oe.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,Oe.createElement)(Ue.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"}));const rr={attributes:{isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save(){return null},migrate:Xt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}};var ar=[rr];const lr={$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:ir}=lr,sr={icon:or,edit:function(e){let{attributes:{isLink:t,linkTarget:n,textAlign:o},context:{commentId:r},setAttributes:a}=e;const l=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${o}`]:o})});let i=(0,st.useSelect)((e=>{const{getEntityRecord:t}=e(it.store),n=t("root","comment",r),o=null==n?void 0:n.author_name;if(n&&!o){var a;const e=t("root","user",n.author);return null!==(a=null==e?void 0:e.name)&&void 0!==a?a:(0,Ze.__)("Anonymous")}return null!=o?o:""}),[r]);const s=(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:o,onChange:e=>a({textAlign:e})})),c=(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Link settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Link to authors URL"),onChange:()=>a({isLink:!t}),checked:t}),t&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===n})));r&&i||(i=(0,Ze._x)("Comment Author","block title"));const u=t?(0,Oe.createElement)("a",{href:"#comment-author-pseudo-link",onClick:e=>e.preventDefault()},i):i;return(0,Oe.createElement)(Oe.Fragment,null,c,s,(0,Oe.createElement)("div",l,u))},deprecated:ar},cr=()=>je({name:ir,metadata:lr,settings:sr});var ur=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const mr={$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:dr}=mr,pr={icon:ur,edit:function(e){let{setAttributes:t,attributes:{textAlign:n},context:{commentId:o}}=e;const r=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${n}`]:n})}),[a]=(0,it.useEntityProp)("root","comment","content",o),l=(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:n,onChange:e=>t({textAlign:e})}));return o&&a?(0,Oe.createElement)(Oe.Fragment,null,l,(0,Oe.createElement)("div",r,(0,Oe.createElement)(We.Disabled,null,(0,Oe.createElement)(Oe.RawHTML,{key:"html"},a.rendered)))):(0,Oe.createElement)(Oe.Fragment,null,l,(0,Oe.createElement)("div",r,(0,Oe.createElement)("p",null,(0,Ze._x)("Comment Content","block title"))))}},gr=()=>je({name:dr,metadata:mr,settings:pr});var hr=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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,Oe.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"})),vr=window.wp.date;const br={attributes:{format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save(){return null},migrate:Xt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}};var _r=[br];const fr={$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:yr}=fr,kr={icon:hr,edit:function(e){let{attributes:{format:t,isLink:n},context:{commentId:o},setAttributes:r}=e;const a=(0,Qe.useBlockProps)();let[l]=(0,it.useEntityProp)("root","comment","date",o);const[i=(0,vr.getSettings)().formats.date]=(0,it.useEntityProp)("root","site","date_format"),s=(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(Qe.__experimentalDateFormatPicker,{format:t,defaultFormat:i,onChange:e=>r({format:e})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Link to comment"),onChange:()=>r({isLink:!n}),checked:n})));o&&l||(l=(0,Ze._x)("Comment Date","block title"));let c=l instanceof Date?(0,Oe.createElement)("time",{dateTime:(0,vr.dateI18n)("c",l)},(0,vr.dateI18n)(t||i,l)):(0,Oe.createElement)("time",null,l);return n&&(c=(0,Oe.createElement)("a",{href:"#comment-date-pseudo-link",onClick:e=>e.preventDefault()},c)),(0,Oe.createElement)(Oe.Fragment,null,s,(0,Oe.createElement)("div",a,c))},deprecated:_r},xr=()=>je({name:yr,metadata:fr,settings:kr});var wr=(0,Oe.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const Er={$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:Cr}=Er,Sr={icon:wr,edit:function(e){let{attributes:{linkTarget:t,textAlign:n},setAttributes:o}=e;const r=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${n}`]:n})}),a=(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:n,onChange:e=>o({textAlign:e})})),l=(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Link settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})));return(0,Oe.createElement)(Oe.Fragment,null,a,l,(0,Oe.createElement)("div",r,(0,Oe.createElement)("a",{href:"#edit-comment-pseudo-link",onClick:e=>e.preventDefault()},(0,Ze.__)("Edit"))))}},Br=()=>je({name:Cr,metadata:Er,settings:Sr});var Tr=(0,Oe.createElement)(Ue.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));var Nr=function(e){let{setAttributes:t,attributes:{textAlign:n}}=e;const o=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${n}`]:n})}),r=(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:n,onChange:e=>t({textAlign:e})}));return(0,Oe.createElement)(Oe.Fragment,null,r,(0,Oe.createElement)("div",o,(0,Oe.createElement)("a",{href:"#comment-reply-pseudo-link",onClick:e=>e.preventDefault()},(0,Ze.__)("Reply"))))};const Pr={$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:Ir}=Pr,zr={edit:Nr,icon:Tr},Mr=()=>je({name:Ir,metadata:Pr,settings:zr});var Rr=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"})),Lr=window.wp.apiFetch,Hr=n.n(Lr);const Ar=e=>{let{defaultPage:t,postId:n,perPage:o,queryArgs:r}=e;const[a,l]=(0,Oe.useState)({}),i=`${n}_${o}`,s=a[i]||0;return(0,Oe.useEffect)((()=>{s||"newest"!==t||Hr()({path:(0,lt.addQueryArgs)("/wp/v2/comments",{...r,post:n,per_page:o,_fields:"id"}),method:"HEAD",parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"));l({...a,[i]:t<=1?1:t})}))}),[t,n,o,l]),"newest"===t?s:1},Vr=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];function Fr(e){var t;let{comment:n,activeCommentId:o,setActiveCommentId:r,firstCommentId:a,blocks:l}=e;const{children:i,...s}=(0,Qe.useInnerBlocksProps)({},{template:Vr});return(0,Oe.createElement)("li",s,n.commentId===(o||a)?i:null,(0,Oe.createElement)(Dr,{blocks:l,commentId:n.commentId,setActiveCommentId:r,isHidden:n.commentId===(o||a)}),(null==n||null===(t=n.children)||void 0===t?void 0:t.length)>0?(0,Oe.createElement)($r,{comments:n.children,activeCommentId:o,setActiveCommentId:r,blocks:l,firstCommentId:a}):null)}const Dr=(0,Oe.memo)((e=>{let{blocks:t,commentId:n,setActiveCommentId:o,isHidden:r}=e;const a=(0,Qe.__experimentalUseBlockPreview)({blocks:t}),l=()=>{o(n)},i={display:r?"none":void 0};return(0,Oe.createElement)("div",ot({},a,{tabIndex:0,role:"button",style:i,onClick:l,onKeyPress:l}))})),$r=e=>{let{comments:t,blockProps:n,activeCommentId:o,setActiveCommentId:r,blocks:a,firstCommentId:l}=e;return(0,Oe.createElement)("ol",n,t&&t.map(((e,t)=>{let{commentId:n,...i}=e;return(0,Oe.createElement)(Qe.BlockContextProvider,{key:i.commentId||t,value:{commentId:n<0?null:n}},(0,Oe.createElement)(Fr,{comment:{commentId:n,...i},activeCommentId:o,setActiveCommentId:r,blocks:a,firstCommentId:l}))})))};const Gr={$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:{align:!0,html:!1,reusable:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-comment-template"},{name:Or}=Gr,Ur={icon:Rr,edit:function(e){var t;let{clientId:n,context:{postId:o}}=e;const r=(0,Qe.useBlockProps)(),[a,l]=(0,Oe.useState)(),{commentOrder:i,threadCommentsDepth:s,threadComments:c,commentsPerPage:u,pageComments:m}=(0,st.useSelect)((e=>{const{getSettings:t}=e(Qe.store);return t().__experimentalDiscussionSettings})),d=(e=>{let{postId:t}=e;const n={status:"approve",order:"asc",context:"embed",parent:0,_embed:"children"},{pageComments:o,commentsPerPage:r,defaultCommentsPage:a}=(0,st.useSelect)((e=>{const{getSettings:t}=e(Qe.store),{__experimentalDiscussionSettings:n}=t();return n})),l=o?Math.min(r,100):100,i=Ar({defaultPage:a,postId:t,perPage:l,queryArgs:n});return(0,Oe.useMemo)((()=>i?{...n,post:t,per_page:l,page:i}:null),[t,l,i])})({postId:o}),{topLevelComments:p,blocks:g}=(0,st.useSelect)((e=>{const{getEntityRecords:t}=e(it.store),{getBlocks:o}=e(Qe.store);return{topLevelComments:d?t("root","comment",d):null,blocks:o(n)}}),[n,d]);let h=(e=>(0,Oe.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&&p?[...p].reverse():p);return p?(o||(h=(e=>{let{perPage:t,pageComments:n,threadComments:o,threadCommentsDepth:r}=e;const a=o?Math.min(r,3):1,l=e=>e<a?[{commentId:-(e+3),children:l(e+1)}]:[],i=[{commentId:-1,children:l(1)}];return(!n||t>=2)&&a<3&&i.push({commentId:-2,children:[]}),(!n||t>=3)&&a<2&&i.push({commentId:-3,children:[]}),i})({perPage:u,pageComments:m,threadComments:c,threadCommentsDepth:s})),h.length?(0,Oe.createElement)($r,{comments:h,blockProps:r,blocks:g,activeCommentId:a,setActiveCommentId:l,firstCommentId:null===(t=h[0])||void 0===t?void 0:t.commentId}):(0,Oe.createElement)("p",r,(0,Ze.__)("No results found."))):(0,Oe.createElement)("p",r,(0,Oe.createElement)(We.Spinner,null))},save:function(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)}},qr=()=>je({name:Or,metadata:Gr,settings:Ur});var jr=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const Wr={none:"",arrow:"←",chevron:"«"};const Zr={$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:Qr}=Zr,Kr={icon:jr,edit:function(e){let{attributes:{label:t},setAttributes:n,context:{"comments/paginationArrow":o}}=e;const r=Wr[o];return(0,Oe.createElement)("a",ot({href:"#comments-pagination-previous-pseudo-link",onClick:e=>e.preventDefault()},(0,Qe.useBlockProps)()),r&&(0,Oe.createElement)("span",{className:`wp-block-comments-pagination-previous-arrow is-arrow-${o}`},r),(0,Oe.createElement)(Qe.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,Ze.__)("Older comments page link"),placeholder:(0,Ze.__)("Older Comments"),value:t,onChange:e=>n({label:e})}))}},Yr=()=>je({name:Qr,metadata:Zr,settings:Kr});var Jr=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"}));function Xr(e){let{value:t,onChange:n}=e;return(0,Oe.createElement)(We.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Arrow"),value:t,onChange:n,help:(0,Ze.__)("A decorative arrow appended to the next and previous comments link."),isBlock:!0},(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"none",label:(0,Ze._x)("None","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,Ze._x)("Arrow","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,Ze._x)("Chevron","Arrow option for Comments Pagination Next/Previous blocks")}))}const ea=[["core/comments-pagination-previous"],["core/comments-pagination-numbers"],["core/comments-pagination-next"]],ta=["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"];const na={$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:oa}=na,ra={icon:Jr,edit:function(e){let{attributes:{paginationArrow:t},setAttributes:n,clientId:o}=e;const r=(0,st.useSelect)((e=>{const{getBlocks:t}=e(Qe.store),n=t(o);return null==n?void 0:n.find((e=>["core/comments-pagination-previous","core/comments-pagination-next"].includes(e.name)))}),[]),a=(0,Qe.useBlockProps)(),l=(0,Qe.useInnerBlocksProps)(a,{template:ea,allowedBlocks:ta});return(0,st.useSelect)((e=>{const{getSettings:t}=e(Qe.store),{__experimentalDiscussionSettings:n}=t();return null==n?void 0:n.pageComments}),[])?(0,Oe.createElement)(Oe.Fragment,null,r&&(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(Xr,{value:t,onChange:e=>{n({paginationArrow:e})}}))),(0,Oe.createElement)("div",l)):(0,Oe.createElement)(Qe.Warning,null,(0,Ze.__)("Comments Pagination block: paging comments is disabled in the Discussion Settings"))},save:function(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)}},aa=()=>je({name:oa,metadata:na,settings:ra});var la=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"}));const ia={none:"",arrow:"→",chevron:"»"};const sa={$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:ca}=sa,ua={icon:la,edit:function(e){let{attributes:{label:t},setAttributes:n,context:{"comments/paginationArrow":o}}=e;const r=ia[o];return(0,Oe.createElement)("a",ot({href:"#comments-pagination-next-pseudo-link",onClick:e=>e.preventDefault()},(0,Qe.useBlockProps)()),(0,Oe.createElement)(Qe.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,Ze.__)("Newer comments page link"),placeholder:(0,Ze.__)("Newer Comments"),value:t,onChange:e=>n({label:e})}),r&&(0,Oe.createElement)("span",{className:`wp-block-comments-pagination-next-arrow is-arrow-${o}`},r))}},ma=()=>je({name:ca,metadata:sa,settings:ua});var da=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const pa=e=>{let{content:t,tag:n="a",extraClass:o=""}=e;return"a"===n?(0,Oe.createElement)(n,{className:`page-numbers ${o}`,href:"#comments-pagination-numbers-pseudo-link",onClick:e=>e.preventDefault()},t):(0,Oe.createElement)(n,{className:`page-numbers ${o}`},t)};const ga={$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:ha}=ga,va={icon:da,edit:function(){return(0,Oe.createElement)("div",(0,Qe.useBlockProps)(),(0,Oe.createElement)(pa,{content:"1"}),(0,Oe.createElement)(pa,{content:"2"}),(0,Oe.createElement)(pa,{content:"3",tag:"span",extraClass:"current"}),(0,Oe.createElement)(pa,{content:"4"}),(0,Oe.createElement)(pa,{content:"5"}),(0,Oe.createElement)(pa,{content:"...",tag:"span",extraClass:"dots"}),(0,Oe.createElement)(pa,{content:"8"}))}},ba=()=>je({name:ha,metadata:ga,settings:va});var _a=(0,Oe.createElement)(Ue.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M4 5.417h2.267V12h1.466V5.417H10V4H4v1.417ZM20 16H4v-1.5h16V16Zm-7 4H4v-1.5h9V20Z"}));function fa(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,Oe.createElement)(We.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:n},(0,Oe.createElement)(We.Path,{d:o[t]})):null}const ya=[1,2,3,4,5,6],ka={className:"block-library-heading-level-dropdown"};function xa(e){let{selectedLevel:t,onChange:n}=e;return(0,Oe.createElement)(We.ToolbarDropdownMenu,{popoverProps:ka,icon:(0,Oe.createElement)(fa,{level:t}),label:(0,Ze.__)("Change heading level"),controls:ya.map((e=>{{const o=e===t;return{icon:(0,Oe.createElement)(fa,{level:e,isPressed:o}),label:(0,Ze.sprintf)((0,Ze.__)("Heading %d"),e),isActive:o,onClick(){n(e)},role:"menuitemradio"}}}))})}const{attributes:wa,supports:Ea}={$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}}}};var Ca=[{attributes:{...wa,singleCommentLabel:{type:"string"},multipleCommentsLabel:{type:"string"}},supports:Ea,migrate:e=>{const{singleCommentLabel:t,multipleCommentsLabel:n,...o}=e;return o},isEligible:e=>{let{multipleCommentsLabel:t,singleCommentLabel:n}=e;return t||n},save:()=>null}];const Sa={$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:Ba}=Sa,Ta={icon:_a,edit:function(e){let{attributes:{textAlign:t,showPostTitle:n,showCommentsCount:o,level:r},setAttributes:a,context:{postType:l,postId:i}}=e;const s="h"+r,[c,u]=(0,Oe.useState)(),[m]=(0,it.useEntityProp)("postType",l,"title",i),d=void 0===i,p=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${t}`]:t})}),{threadCommentsDepth:g,threadComments:h,commentsPerPage:v,pageComments:b}=(0,st.useSelect)((e=>{const{getSettings:t}=e(Qe.store);return t().__experimentalDiscussionSettings}));(0,Oe.useEffect)((()=>{if(d){const e=h?Math.min(g,3)-1:0,t=b?v:3,n=parseInt(e)+parseInt(t);return void u(Math.min(n,3))}const e=i;Hr()({path:(0,lt.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 _=(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:t,onChange:e=>a({textAlign:e})}),(0,Oe.createElement)(xa,{selectedLevel:r,onChange:e=>a({level:e})})),f=(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show post title"),checked:n,onChange:e=>a({showPostTitle:e})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show comments count"),checked:o,onChange:e=>a({showCommentsCount:e})}))),y=d?(0,Ze.__)("“Post Title”"):`"${m}"`;let k;return k=o&&void 0!==c?n?1===c?(0,Ze.sprintf)((0,Ze.__)("One response to %s"),y):(0,Ze.sprintf)((0,Ze._n)("%1$s response to %2$s","%1$s responses to %2$s",c),c,y):1===c?(0,Ze.__)("One response"):(0,Ze.sprintf)((0,Ze._n)("%s response","%s responses",c),c):n?1===c?(0,Ze.sprintf)((0,Ze.__)("Response to %s"),y):(0,Ze.sprintf)((0,Ze.__)("Responses to %s"),y):1===c?(0,Ze.__)("Response"):(0,Ze.__)("Responses"),(0,Oe.createElement)(Oe.Fragment,null,_,f,(0,Oe.createElement)(s,p,k))},deprecated:Ca},Na=()=>je({name:Ba,metadata:Sa,settings:Ta});var Pa=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const Ia={"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"},za="image",Ma="video",Ra={x:.5,y:.5},La=["image","video"];function Ha(){let{x:e,y:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ra;return`${Math.round(100*e)}% ${Math.round(100*t)}%`}function Aa(e){return 50===e||void 0===!e?null:"has-background-dim-"+10*Math.round(e/10)}function Va(e){return!e||"center center"===e||"center"===e}function Fa(e){return Va(e)?"":Ia[e]}function Da(e){return e?{backgroundImage:`url(${e})`}:{}}function $a(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function Ga(e){return{...e,dimRatio:e.url?e.dimRatio:100}}function Oa(e){return e.tagName||(e={...e,tagName:"div"}),{...e}}const Ua={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"}},qa={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]}},ja={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}},Wa={attributes:qa,supports:ja,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:r,customGradient:a,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,f=(0,Qe.getColorClassName)("background-color",p),y=(0,Qe.__experimentalGetGradientClass)(o),k=za===n,x=Ma===n,w=!(u||d),E={minHeight:(b&&_?`${b}${_}`:b)||void 0},C={backgroundColor:f?void 0:l,background:a||void 0},S=s&&w?Ha(s):void 0,B=g?`url(${g})`:void 0,T=Ha(s),N=at()({"is-light":!m,"has-parallax":u,"is-repeated":d,"has-custom-content-position":!Va(r)},Fa(r)),P=at()("wp-block-cover__image-background",v?`wp-image-${v}`:null,{"has-parallax":u,"is-repeated":d}),I=o||a;return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:N,style:E}),(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__background",f,Aa(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":g&&I&&0!==i,"has-background-gradient":I,[y]:y}),style:C}),!c&&k&&g&&(w?(0,Oe.createElement)("img",{className:P,alt:h,src:g,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,Oe.createElement)("div",{role:"img",className:P,style:{backgroundPosition:T,backgroundImage:B}})),x&&g&&(0,Oe.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,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))}},Za={attributes:qa,supports:ja,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:r,customGradient:a,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,f=(0,Qe.getColorClassName)("background-color",p),y=(0,Qe.__experimentalGetGradientClass)(o),k=b&&_?`${b}${_}`:b,x=za===n,w=Ma===n,E=!(u||d),C={...!x||E||c?{}:Da(g),minHeight:k||void 0},S={backgroundColor:f?void 0:l,background:a||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":!Va(r)},Fa(r)),N=o||a;return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:T,style:C}),(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__background",f,Aa(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":g&&N&&0!==i,"has-background-gradient":N,[y]:y}),style:S}),!c&&x&&E&&g&&(0,Oe.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,Oe.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,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))}},Qa={attributes:qa,supports:ja,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:r,customGradient:a,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,Qe.getColorClassName)("background-color",d),f=(0,Qe.__experimentalGetGradientClass)(o),y=b?`${v}${b}`:v,k=za===n,x=Ma===n,w=!(c||m),E={...k&&!w?Da(p):{},minHeight:y||void 0},C={backgroundColor:_?void 0:l,background:a||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":!Va(r)},Fa(r)),T=o||a;return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:B,style:E}),(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__background",_,Aa(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":p&&T&&0!==i,"has-background-gradient":T,[f]:f}),style:C}),k&&w&&p&&(0,Oe.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,Oe.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,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))},migrate:Oa},Ka={attributes:qa,supports:ja,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:r,customGradient:a,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,Qe.getColorClassName)("background-color",d),f=(0,Qe.__experimentalGetGradientClass)(o),y=b?`${v}${b}`:v,k=za===n,x=Ma===n,w=!(c||m),E={...k&&!w?Da(p):{},minHeight:y||void 0},C={backgroundColor:_?void 0:l,background:a||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":!Va(r)},Fa(r));return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:B,style:E}),(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()(_,Aa(i),"wp-block-cover__gradient-background",f,{"has-background-dim":void 0!==i,"has-background-gradient":o||a,[f]:!p&&f}),style:C}),k&&w&&p&&(0,Oe.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,Oe.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,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))},migrate:Oa},Ya={attributes:{...Ua,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:ja,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:r,customGradient:a,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,Qe.getColorClassName)("background-color",m),_=(0,Qe.__experimentalGetGradientClass)(o),f=v?`${h}${v}`:h,y=za===n,k=Ma===n,x=!(c||u),w={...y&&!x?Da(d):{},backgroundColor:b?void 0:l,background:a&&!d?a:void 0,minHeight:f||void 0},E=s&&x?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,C=at()($a(i),b,{"has-background-dim":0!==i,"has-parallax":c,"is-repeated":u,"has-background-gradient":o||a,[_]:!d&&_,"has-custom-content-position":!Va(r)},Fa(r));return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:C,style:w}),d&&(o||a)&&0!==i&&(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__gradient-background",_),style:a?{background:a}:void 0}),y&&x&&d&&(0,Oe.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,Oe.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,Oe.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Oe.createElement)(Qe.InnerBlocks.Content,null)))},migrate:(0,St.compose)(Ga,Oa)},Ja={attributes:{...Ua,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:r,customGradient:a,customOverlayColor:l,dimRatio:i,focalPoint:s,hasParallax:c,isRepeated:u,overlayColor:m,url:d,minHeight:p,minHeightUnit:g}=t,h=(0,Qe.getColorClassName)("background-color",m),v=(0,Qe.__experimentalGetGradientClass)(o),b=g?`${p}${g}`:p,_=za===n,f=Ma===n,y=_?Da(d):{},k={};let x;h||(y.backgroundColor=l),a&&!d&&(y.background=a),y.minHeight=b||void 0,s&&(x=`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`,_&&!c&&(y.backgroundPosition=x),f&&(k.objectPosition=x));const w=at()($a(i),h,{"has-background-dim":0!==i,"has-parallax":c,"is-repeated":u,"has-background-gradient":o||a,[v]:!d&&v,"has-custom-content-position":!Va(r)},Fa(r));return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:w,style:y}),d&&(o||a)&&0!==i&&(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__gradient-background",v),style:a?{background:a}:void 0}),f&&d&&(0,Oe.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:k}),(0,Oe.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Oe.createElement)(Qe.InnerBlocks.Content,null)))},migrate:(0,St.compose)(Ga,Oa)},Xa={attributes:{...Ua,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,customGradient:r,customOverlayColor:a,dimRatio:l,focalPoint:i,hasParallax:s,overlayColor:c,url:u,minHeight:m}=t,d=(0,Qe.getColorClassName)("background-color",c),p=(0,Qe.__experimentalGetGradientClass)(o),g=n===za?Da(u):{};d||(g.backgroundColor=a),i&&!s&&(g.backgroundPosition=`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`),r&&!u&&(g.background=r),g.minHeight=m||void 0;const h=at()($a(l),d,{"has-background-dim":0!==l,"has-parallax":s,"has-background-gradient":r,[p]:!u&&p});return(0,Oe.createElement)("div",{className:h,style:g},u&&(o||r)&&0!==l&&(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__gradient-background",p),style:r?{background:r}:void 0}),Ma===n&&u&&(0,Oe.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),(0,Oe.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Oe.createElement)(Qe.InnerBlocks.Content,null)))},migrate:(0,St.compose)(Ga,Oa)},el={attributes:{...Ua,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,customGradient:r,customOverlayColor:a,dimRatio:l,focalPoint:i,hasParallax:s,overlayColor:c,url:u,minHeight:m}=t,d=(0,Qe.getColorClassName)("background-color",c),p=(0,Qe.__experimentalGetGradientClass)(o),g=n===za?Da(u):{};d||(g.backgroundColor=a),i&&!s&&(g.backgroundPosition=`${100*i.x}% ${100*i.y}%`),r&&!u&&(g.background=r),g.minHeight=m||void 0;const h=at()($a(l),d,{"has-background-dim":0!==l,"has-parallax":s,"has-background-gradient":r,[p]:!u&&p});return(0,Oe.createElement)("div",{className:h,style:g},u&&(o||r)&&0!==l&&(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__gradient-background",p),style:r?{background:r}:void 0}),Ma===n&&u&&(0,Oe.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),(0,Oe.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Oe.createElement)(Qe.InnerBlocks.Content,null)))},migrate:(0,St.compose)(Ga,Oa)},tl={attributes:{...Ua,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:r,dimRatio:a,focalPoint:l,hasParallax:i,overlayColor:s,title:c,url:u}=t,m=(0,Qe.getColorClassName)("background-color",s),d=n===za?Da(u):{};m||(d.backgroundColor=r),l&&!i&&(d.backgroundPosition=`${100*l.x}% ${100*l.y}%`);const p=at()($a(a),m,{"has-background-dim":0!==a,"has-parallax":i,[`has-${o}-content`]:"center"!==o});return(0,Oe.createElement)("div",{className:p,style:d},Ma===n&&u&&(0,Oe.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!Qe.RichText.isEmpty(c)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:c}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:n,contentAlign:o,...r}=t;return[r,[(0,Ge.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,Ze.__)("Write title…")})]]}},nl={attributes:{...Ua,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:r,dimRatio:a,align:l,contentAlign:i,overlayColor:s,customOverlayColor:c}=t,u=(0,Qe.getColorClassName)("background-color",s),m=Da(n);u||(m.backgroundColor=c);const d=at()("wp-block-cover-image",$a(a),u,{"has-background-dim":0!==a,"has-parallax":r,[`has-${i}-content`]:"center"!==i},l?`align${l}`:null);return(0,Oe.createElement)("div",{className:d,style:m},!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:o}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:n,contentAlign:o,align:r,...a}=t;return[a,[(0,Ge.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,Ze.__)("Write title…")})]]}},ol={attributes:{...Ua,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:r,dimRatio:a,align:l}=t,i=Da(n),s=at()("wp-block-cover-image",$a(a),{"has-background-dim":0!==a,"has-parallax":r},l?`align${l}`:null);return(0,Oe.createElement)("section",{className:s,style:i},(0,Oe.createElement)(Qe.RichText.Content,{tagName:"h2",value:o}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:n,contentAlign:o,align:r,...a}=t;return[a,[(0,Ge.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,Ze.__)("Write title…")})]]}};var rl=[Wa,Za,Qa,Ka,Ya,Ja,Xa,el,tl,nl,ol],al={grad:.9,turn:360,rad:360/(2*Math.PI)},ll=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},il=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},sl=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},cl=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},ul=function(e){return{r:sl(e.r,0,255),g:sl(e.g,0,255),b:sl(e.b,0,255),a:sl(e.a)}},ml=function(e){return{r:il(e.r),g:il(e.g),b:il(e.b),a:il(e.a,3)}},dl=/^#([0-9a-f]{3,8})$/i,pl=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},gl=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,a=Math.max(t,n,o),l=a-Math.min(t,n,o),i=l?a===t?(n-o)/l:a===n?2+(o-t)/l:4+(t-n)/l:0;return{h:60*(i<0?i+6:i),s:a?l/a*100:0,v:a/255*100,a:r}},hl=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var a=Math.floor(t),l=o*(1-n),i=o*(1-(t-a)*n),s=o*(1-(1-t+a)*n),c=a%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:r}},vl=function(e){return{h:cl(e.h),s:sl(e.s,0,100),l:sl(e.l,0,100),a:sl(e.a)}},bl=function(e){return{h:il(e.h),s:il(e.s),l:il(e.l),a:il(e.a,3)}},_l=function(e){return hl((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},fl=function(e){return{h:(t=gl(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},yl=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,kl=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xl=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wl=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,El={string:[[function(e){var t=dl.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?il(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?il(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=xl.exec(e)||wl.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:ul({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=yl.exec(e)||kl.exec(e);if(!t)return null;var n,o,r=vl({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(al[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return _l(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,a=void 0===r?1:r;return ll(t)&&ll(n)&&ll(o)?ul({r:Number(t),g:Number(n),b:Number(o),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,a=void 0===r?1:r;if(!ll(t)||!ll(n)||!ll(o))return null;var l=vl({h:Number(t),s:Number(n),l:Number(o),a:Number(a)});return _l(l)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,a=void 0===r?1:r;if(!ll(t)||!ll(n)||!ll(o))return null;var l=function(e){return{h:cl(e.h),s:sl(e.s,0,100),v:sl(e.v,0,100),a:sl(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(a)});return hl(l)},"hsv"]]},Cl=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]},Sl=function(e){return"string"==typeof e?Cl(e.trim(),El.string):"object"==typeof e&&null!==e?Cl(e,El.object):[null,void 0]},Bl=function(e,t){var n=fl(e);return{h:n.h,s:sl(n.s+100*t,0,100),l:n.l,a:n.a}},Tl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Nl=function(e,t){var n=fl(e);return{h:n.h,s:n.s,l:sl(n.l+100*t,0,100),a:n.a}},Pl=function(){function e(e){this.parsed=Sl(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 il(Tl(this.rgba),2)},e.prototype.isDark=function(){return Tl(this.rgba)<.5},e.prototype.isLight=function(){return Tl(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=ml(this.rgba)).r,n=e.g,o=e.b,a=(r=e.a)<1?pl(il(255*r)):"","#"+pl(t)+pl(n)+pl(o)+a;var e,t,n,o,r,a},e.prototype.toRgb=function(){return ml(this.rgba)},e.prototype.toRgbString=function(){return t=(e=ml(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return bl(fl(this.rgba))},e.prototype.toHslString=function(){return t=(e=bl(fl(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=gl(this.rgba),{h:il(e.h),s:il(e.s),v:il(e.v),a:il(e.a,3)};var e},e.prototype.invert=function(){return Il({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),Il(Bl(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Il(Bl(this.rgba,-e))},e.prototype.grayscale=function(){return Il(Bl(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Il(Nl(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Il(Nl(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?Il({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):il(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=fl(this.rgba);return"number"==typeof e?Il({h:e,s:t.s,l:t.l,a:t.a}):il(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Il(e).toHex()},e}(),Il=function(e){return e instanceof Pl?e:new Pl(e)},zl=[];
/*! Fast Average Color | © 2023 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */
function Ml(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function Rl(e){return"#"+e.map(Ml).join("")}function Ll(e){return e?(t=e,Array.isArray(t[0])?e:[e]):[];var t}function Hl(e,t,n){for(var o=0;o<n.length;o++)if(Al(e,t,n[o]))return!0;return!1}function Al(e,t,n){switch(n.length){case 3:if(function(e,t,n){if(255!==e[t+3])return!0;if(e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2])return!0;return!1}(e,t,n))return!0;break;case 4:if(function(e,t,n){if(e[t+3]&&n[3])return e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2]&&e[t+3]===n[3];return e[t+3]===n[3]}(e,t,n))return!0;break;case 5:if(function(e,t,n){var o=n[0],r=n[1],a=n[2],l=n[3],i=n[4],s=e[t+3],c=Vl(s,l,i);if(!l)return c;if(!s&&c)return!0;if(Vl(e[t],o,i)&&Vl(e[t+1],r,i)&&Vl(e[t+2],a,i)&&c)return!0;return!1}(e,t,n))return!0;break;default:return!1}}function Vl(e,t,n){return e>=t-n&&e<=t+n}function Fl(e,t,n){for(var o={},r=n.dominantDivider||24,a=n.ignoredColor,l=n.step,i=[0,0,0,0,0],s=0;s<t;s+=l){var c=e[s],u=e[s+1],m=e[s+2],d=e[s+3];if(!a||!Hl(e,s,a)){var p=Math.round(c/r)+","+Math.round(u/r)+","+Math.round(m/r);o[p]?o[p]=[o[p][0]+c*d,o[p][1]+u*d,o[p][2]+m*d,o[p][3]+d,o[p][4]+1]:o[p]=[c*d,u*d,m*d,d,1],i[4]<o[p][4]&&(i=o[p])}}var g=i[0],h=i[1],v=i[2],b=i[3],_=i[4];return b?[Math.round(g/b),Math.round(h/b),Math.round(v/b),Math.round(b/_)]:n.defaultColor}function Dl(e,t,n){for(var o=0,r=0,a=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&&Hl(e,u,s)||(o+=d,r+=p,a+=g,l+=m,i++)}return l?[Math.round(o/l),Math.round(r/l),Math.round(a/l),Math.round(l/i)]:n.defaultColor}function $l(e,t,n){for(var o=0,r=0,a=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&&Hl(e,u,s)||(o+=m*m*g,r+=d*d*g,a+=p*p*g,l+=g,i++)}return l?[Math.round(Math.sqrt(o/l)),Math.round(Math.sqrt(r/l)),Math.round(Math.sqrt(a/l)),Math.round(l/i)]:n.defaultColor}function Gl(e){return Ol(e,"defaultColor",[0,0,0,0])}function Ol(e,t,n){return void 0===e[t]?n:e[t]}function Ul(e){if(jl(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}}function ql(e){return function(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement}(e)?"canvas":function(e){return Wl&&e instanceof OffscreenCanvas}(e)?"offscreencanvas":function(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}(e)?"imagebitmap":e.src}function jl(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement}var Wl="undefined"!=typeof OffscreenCanvas;var Zl="undefined"==typeof window;function Ql(e){return Error("FastAverageColor: "+e)}function Kl(e,t){t||console.error(e)}var Yl=function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(e,t){if(!e)return Promise.reject(Ql("call .getColorAsync() without resource"));if("string"==typeof e){if("undefined"==typeof Image)return Promise.reject(Ql("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(jl(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=Gl(t=t||{});if(!e)return Kl(a=Ql("call .getColor() without resource"),t.silent),this.prepareResult(n,a);var o=function(e,t){var n,o=Ol(t,"left",0),r=Ol(t,"top",0),a=Ol(t,"width",e.width),l=Ol(t,"height",e.height),i=a,s=l;return"precision"===t.mode||(a>l?(n=a/l,i=100,s=Math.round(i/n)):(n=l/a,s=100,i=Math.round(s/n)),(i>a||s>l||i<10||s<10)&&(i=a,s=l)),{srcLeft:o,srcTop:r,srcWidth:a,srcHeight:l,destWidth:i,destHeight:s}}(Ul(e),t);if(!(o.srcWidth&&o.srcHeight&&o.destWidth&&o.destHeight))return Kl(a=Ql('incorrect sizes for resource "'.concat(ql(e),'"')),t.silent),this.prepareResult(n,a);if(!this.canvas&&(this.canvas=Zl?Wl?new OffscreenCanvas(1,1):null:document.createElement("canvas"),!this.canvas))return Kl(a=Ql("OffscreenCanvas is not supported in this browser"),t.silent),this.prepareResult(n,a);if(!this.ctx){if(this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}),!this.ctx)return Kl(a=Ql("Canvas Context 2D is not supported in this browser"),t.silent),this.prepareResult(n);this.ctx.imageSmoothingEnabled=!1}this.canvas.width=o.destWidth,this.canvas.height=o.destHeight;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;return this.prepareResult(this.getColorFromArray4(r,t))}catch(o){var a;return Kl(a=Ql("security error (CORS) for resource ".concat(ql(e),".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image")),t.silent),!t.silent&&console.error(o),this.prepareResult(n,a)}},e.prototype.getColorFromArray4=function(e,t){t=t||{};var n=e.length,o=Gl(t);if(n<4)return o;var r,a=n-n%4,l=4*(t.step||1);switch(t.algorithm||"sqrt"){case"simple":r=Dl;break;case"sqrt":r=$l;break;case"dominant":r=Fl;break;default:throw Ql("".concat(t.algorithm," is unknown algorithm"))}return r(e,a,{defaultColor:o,ignoredColor:Ll(t.ignoredColor),step:l,dominantDivider:t.dominantDivider})},e.prototype.prepareResult=function(e,t){var n,o=e.slice(0,3),r=[e[0],e[1],e[2],e[3]/255],a=(299*(n=e)[0]+587*n[1]+114*n[2])/1e3<128;return{value:[e[0],e[1],e[2],e[3]],rgb:"rgb("+o.join(",")+")",rgba:"rgba("+r.join(",")+")",hex:Rl(o),hexa:Rl(e),isDark:a,isLight:!a,error:t}},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,r){var a=function(){s();var a=n.getColor(e,t);a.error?r(a.error):o(a)},l=function(){s(),r(Ql('Error loading image "'.concat(e.src,'"')))},i=function(){s(),r(Ql('Image "'.concat(e.src,'" loading aborted')))},s=function(){e.removeEventListener("load",a),e.removeEventListener("error",l),e.removeEventListener("abort",i)};e.addEventListener("load",a),e.addEventListener("error",l),e.addEventListener("abort",i)}))},e}(),Jl=window.wp.hooks;function Xl(){return Xl.fastAverageColor||(Xl.fastAverageColor=new Yl),Xl.fastAverageColor}function ei(e){let{onChange:t,onUnitChange:n,unit:o="px",value:r=""}=e;const a=`block-cover-height-input-${(0,St.useInstanceId)(We.__experimentalUnitControl)}`,l="px"===o,i=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Qe.useSetting)("spacing.units")||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),s=(0,Oe.useMemo)((()=>{const[e]=(0,We.__experimentalParseQuantityAndUnitFromRawValue)(r);return[e,o].join("")}),[o,r]),c=l?50:0;return(0,Oe.createElement)(We.__experimentalUnitControl,{label:(0,Ze.__)("Minimum height of cover"),id:a,isResetValueOnUnitChange:!0,min:c,onChange:e=>{const n=""!==e?parseFloat(e):void 0;isNaN(n)&&void 0!==n||t(n)},onUnitChange:n,__unstableInputWidth:"80px",units:i,value:s})}function ti(e){let{attributes:t,setAttributes:n,clientId:o,setOverlayColor:r,coverRef:a,currentSettings:l}=e;const{useFeaturedImage:i,dimRatio:s,focalPoint:c,hasParallax:u,isRepeated:m,minHeight:d,minHeightUnit:p,alt:g,tagName:h}=t,{isVideoBackground:v,isImageBackground:b,mediaElement:_,url:f,isImgElement:y,overlayColor:k}=l,{gradientValue:x,setGradient:w}=(0,Qe.__experimentalUseGradient)(),E=v||b&&(!u||m),C=e=>{const[t,n]=_.current?[_.current.style,"objectPosition"]:[a.current.style,"backgroundPosition"];t[n]=Ha(e)},S=(0,Qe.__experimentalUseMultipleOriginColorsAndGradients)(),B={header:(0,Ze.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,Ze.__)("The <main> element should be used for the primary content of your document only. "),section:(0,Ze.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,Ze.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,Ze.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),footer:(0,Ze.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).")};return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,!!f&&(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Media settings")},b&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Fixed background"),checked:u,onChange:()=>{n({hasParallax:!u,...u?{}:{focalPoint:void 0}})}}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Repeated background"),checked:m,onChange:()=>{n({isRepeated:!m})}})),E&&(0,Oe.createElement)(We.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Focal point picker"),url:f,value:c,onDragStart:C,onDrag:C,onChange:e=>n({focalPoint:e})}),!i&&f&&b&&y&&(0,Oe.createElement)(We.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Alt text (alternative text)"),value:g,onChange:e=>n({alt:e}),help:(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,Ze.__)("Describe the purpose of the image")),(0,Ze.__)("Leave empty if the image is purely decorative."))}),(0,Oe.createElement)(We.PanelRow,null,(0,Oe.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,Ze.__)("Clear Media"))))),(0,Oe.createElement)(Qe.InspectorControls,{group:"color"},(0,Oe.createElement)(Qe.__experimentalColorGradientSettingsDropdown,ot({__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:k.color,gradientValue:x,label:(0,Ze.__)("Overlay"),onColorChange:r,onGradientChange:w,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:o},S)),(0,Oe.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>void 0!==s&&s!==(f?50:100),label:(0,Ze.__)("Overlay opacity"),onDeselect:()=>n({dimRatio:f?50:100}),resetAllFilter:()=>({dimRatio:f?50:100}),isShownByDefault:!0,panelId:o},(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Overlay opacity"),value:s,onChange:e=>n({dimRatio:e}),min:0,max:100,step:10,required:!0}))),(0,Oe.createElement)(Qe.InspectorControls,{group:"dimensions"},(0,Oe.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!d,label:(0,Ze.__)("Minimum height"),onDeselect:()=>n({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:o},(0,Oe.createElement)(ei,{value:d,unit:p,onChange:e=>n({minHeight:e}),onUnitChange:e=>n({minHeightUnit:e})}))),(0,Oe.createElement)(Qe.InspectorControls,{group:"advanced"},(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("HTML element"),options:[{label:(0,Ze.__)("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:h,onChange:e=>n({tagName:e}),help:B[h]})))}function ni(e){let{attributes:t,setAttributes:n,onSelectMedia:o,currentSettings:r,toggleUseFeaturedImage:a}=e;const{contentPosition:l,id:i,useFeaturedImage:s,minHeight:c,minHeightUnit:u}=t,{hasInnerBlocks:m,url:d}=r,[p,g]=(0,Oe.useState)(c),[h,v]=(0,Oe.useState)(u),b="vh"===u&&100===c;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.__experimentalBlockAlignmentMatrixControl,{label:(0,Ze.__)("Change content position"),value:l,onChange:e=>n({contentPosition:e}),isDisabled:!m}),(0,Oe.createElement)(Qe.__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,Oe.createElement)(Qe.BlockControls,{group:"other"},(0,Oe.createElement)(Qe.MediaReplaceFlow,{mediaId:i,mediaURL:d,allowedTypes:La,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:a,useFeaturedImage:s,name:d?(0,Ze.__)("Replace"):(0,Ze.__)("Add Media")})))}function oi(e){let{disableMediaButtons:t=!1,children:n,onSelectMedia:o,onError:r,style:a,toggleUseFeaturedImage:l}=e;return(0,Oe.createElement)(Qe.MediaPlaceholder,{icon:(0,Oe.createElement)(Qe.BlockIcon,{icon:Pa}),labels:{title:(0,Ze.__)("Cover"),instructions:(0,Ze.__)("Drag and drop onto this block, upload, or select existing media from your library.")},onSelect:o,accept:"image/*,video/*",allowedTypes:La,disableMediaButtons:t,onToggleFeaturedImage:l,onError:r,style:a},n)}const ri={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};function ai(e){let{className:t,onResizeStart:n,onResize:o,onResizeStop:r,...a}=e;const[l,i]=(0,Oe.useState)(!1);return(0,Oe.createElement)(We.ResizableBox,ot({className:at()(t,{"is-resizing":l}),enable:ri,onResizeStart:(e,t,r)=>{n(r.clientHeight),o(r.clientHeight)},onResize:(e,t,n)=>{o(n.clientHeight),l||i(!0)},onResizeStop:(e,t,n)=>{r(n.clientHeight),i(!1)},__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"y",position:"bottom",isVisible:l}},a))}!function(e){e.forEach((function(e){zl.indexOf(e)<0&&(e(Pl,El),zl.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 r in n)o[n[r]]=r;var a={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,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(!a.length)for(var m in n)a[m]=new e(n[m]).toRgb();for(var d in n){var p=(r=s,l=a[d],Math.pow(r.r-l.r,2)+Math.pow(r.g-l.g,2)+Math.pow(r.b-l.b,2));p<c&&(c=p,u=d)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}]);var li=(0,St.compose)([(0,Qe.withColors)({overlayColor:"background-color"})])((function(e){var t,n;let{attributes:o,clientId:r,isSelected:a,overlayColor:l,setAttributes:i,setOverlayColor:s,toggleSelection:c,context:{postId:u,postType:m}}=e;const{contentPosition:d,id:p,useFeaturedImage:g,dimRatio:h,focalPoint:v,hasParallax:b,isDark:_,isRepeated:f,minHeight:y,minHeightUnit:k,alt:x,allowedBlocks:w,templateLock:E,tagName:C="div"}=o,[S]=(0,it.useEntityProp)("postType",m,"featured_media",u),B=(0,st.useSelect)((e=>S&&e(it.store).getMedia(S,{context:"view"})),[S]),T=null==B?void 0:B.source_url,N=g?T:null===(t=o.url)||void 0===t?void 0:t.replaceAll("&","&"),P=g?za:o.backgroundType,{__unstableMarkNextChangeAsNotPersistent:I}=(0,st.useDispatch)(Qe.store),{createErrorNotice:z}=(0,st.useDispatch)(Ct.store),{gradientClass:M,gradientValue:R}=(0,Qe.__experimentalUseGradient)(),L=function(e,t){return n=>{if(!n||!n.url)return void e({url:void 0,id:void 0});let o;if((0,wt.isBlobURL)(n.url)&&(n.type=(0,wt.getBlobTypeByURL)(n.url)),n.media_type)o=n.media_type===za?za:Ma;else{if(n.type!==za&&n.type!==Ma)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===Ma?{hasParallax:void 0}:{}})}}(i,h),H=((e,t)=>!e&&(0,wt.isBlobURL)(t))(p,N),A=e=>{z(e,{type:"snackbar"})},V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n=arguments.length>2?arguments[2]:void 0;const[o,r]=(0,Oe.useState)(!1);return(0,Oe.useEffect)((()=>{if(e&&t<=50){const t=(0,Jl.applyFilters)("media.crossOrigin",void 0,e);Xl().getColorAsync(e,{defaultColor:[255,255,255,255],silent:!0,crossOrigin:t}).then((e=>r(e.isDark)))}}),[e,e&&t<=50,r]),(0,Oe.useEffect)((()=>{if(t>50||!e){if(!n)return void r(!0);r(Il(n).isDark())}}),[n,t>50||!e,r]),(0,Oe.useEffect)((()=>{e||n||r(!1)}),[!e&&!n,r]),o}(N,h,l.color);(0,Oe.useEffect)((()=>{I(),i({isDark:V})}),[V]);const F=za===P,D=Ma===P,$=y&&k?`${y}${k}`:y,G=!(b||f),O={minHeight:$||void 0},U=N?`url(${N})`:void 0,q=Ha(v),j={backgroundColor:l.color},W={objectPosition:v&&G?Ha(v):void 0},Z=!!(N||l.color||R),Q=(0,st.useSelect)((e=>e(Qe.store).getBlock(r).innerBlocks.length>0),[r]),K=(0,Oe.useRef)(),Y=(0,Qe.useBlockProps)({ref:K}),J=function(e){return[["core/paragraph",{align:"center",placeholder:(0,Ze.__)("Write title…"),...e}]]}({fontSize:!(null===(n=(0,Qe.useSetting)("typography.fontSizes"))||void 0===n||!n.length)?"large":void 0}),X=(0,Qe.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:Q?void 0:J,templateInsertUpdatesSelection:!0,allowedBlocks:w,templateLock:E}),ee=(0,Oe.useRef)(),te={isVideoBackground:D,isImageBackground:F,mediaElement:ee,hasInnerBlocks:Q,url:N,isImgElement:G,overlayColor:l},ne=()=>{i({id:void 0,url:void 0,useFeaturedImage:!g,dimRatio:100===h?50:h,backgroundType:g?za:void 0})},oe=(0,Oe.createElement)(ni,{attributes:o,setAttributes:i,onSelectMedia:L,currentSettings:te,toggleUseFeaturedImage:ne}),re=(0,Oe.createElement)(ti,{attributes:o,setAttributes:i,clientId:r,setOverlayColor:s,coverRef:K,currentSettings:te,toggleUseFeaturedImage:ne});if(!g&&!Q&&!Z)return(0,Oe.createElement)(Oe.Fragment,null,oe,re,(0,Oe.createElement)(C,ot({},Y,{className:at()("is-placeholder",Y.className)}),(0,Oe.createElement)(oi,{onSelectMedia:L,onError:A,style:{minHeight:$||void 0},toggleUseFeaturedImage:ne},(0,Oe.createElement)("div",{className:"wp-block-cover__placeholder-background-options"},(0,Oe.createElement)(Qe.ColorPalette,{disableCustomColors:!0,value:l.color,onChange:s,clearable:!1}))),(0,Oe.createElement)(ai,{className:"block-library-cover__resize-container",onResizeStart:()=>{i({minHeightUnit:"px"}),c(!1)},onResize:e=>{i({minHeight:e})},onResizeStop:e=>{c(!0),i({minHeight:e})},showHandle:a})));const ae=at()({"is-dark-theme":_,"is-light":!_,"is-transient":H,"has-parallax":b,"is-repeated":f,"has-custom-content-position":!Va(d)},Fa(d));return(0,Oe.createElement)(Oe.Fragment,null,oe,re,(0,Oe.createElement)(C,ot({},Y,{className:at()(ae,Y.className),style:{...O,...Y.style},"data-url":N}),(0,Oe.createElement)(ai,{className:"block-library-cover__resize-container",onResizeStart:()=>{i({minHeightUnit:"px"}),c(!1)},onResize:e=>{i({minHeight:e})},onResizeStop:e=>{c(!0),i({minHeight:e})},showHandle:a}),(!g||N)&&(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__background",Aa(h),{[l.class]:l.class,"has-background-dim":void 0!==h,"wp-block-cover__gradient-background":N&&R&&0!==h,"has-background-gradient":R,[M]:M}),style:{backgroundImage:R,...j}}),!N&&g&&(0,Oe.createElement)(We.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),N&&F&&(G?(0,Oe.createElement)("img",{ref:ee,className:"wp-block-cover__image-background",alt:x,src:N,style:W}):(0,Oe.createElement)("div",{ref:ee,role:"img",className:at()(ae,"wp-block-cover__image-background"),style:{backgroundImage:U,backgroundPosition:q}})),N&&D&&(0,Oe.createElement)("video",{ref:ee,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:N,style:W}),H&&(0,Oe.createElement)(We.Spinner,null),(0,Oe.createElement)(oi,{disableMediaButtons:!0,onSelectMedia:L,onError:A,toggleUseFeaturedImage:ne}),(0,Oe.createElement)("div",X)))}));const ii={from:[{type:"block",blocks:["core/image"],transform:e=>{var t;let{caption:n,url:o,alt:r,align:a,id:l,anchor:i,style:s}=e;return(0,Ge.createBlock)("core/cover",{dimRatio:50,url:o,alt:r,align:a,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:r,anchor:a}=e;return(0,Ge.createBlock)("core/cover",{dimRatio:50,url:n,align:o,id:r,backgroundType:Ma,anchor:a},[(0,Ge.createBlock)("core/paragraph",{content:t,fontSize:"large",align:"center"})])}},{type:"block",blocks:["core/group"],transform:(e,t)=>{var n,o,r,a,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!==(r=m.color)&&void 0!==r&&r.gradient?void 0:50,overlayColor:c,customOverlayColor:null==m||null===(a=m.color)||void 0===a?void 0:a.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:Jt({...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:r,gradient:a,customGradient:l}=e;return n?t===za:!(o||r||a||l)},transform:e=>{var t;let{title:n,url:o,alt:r,align:a,id:l,anchor:i,style:s}=e;return(0,Ge.createBlock)("core/image",{caption:n,url:o,alt:r,align:a,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:r,gradient:a,customGradient:l}=e;return n?t===Ma:!(o||r||a||l)},transform:e=>{let{title:t,url:n,align:o,id:r,anchor:a}=e;return(0,Ge.createBlock)("core/video",{caption:t,src:n,id:r,align:o,anchor:a})}},{type:"block",blocks:["core/group"],isMatch:e=>{let{url:t,useFeaturedImage:n}=e;return!t&&!n},transform:(e,t)=>{var n,o,r;const a={backgroundColor:null==e?void 0:e.overlayColor,gradient:null==e?void 0:e.gradient,style:Jt({...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===(r=t[0])||void 0===r?void 0:r.name)){var l,i,s,c,u,m,d,p,g;const e=Jt(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",{...a,...e,style:Jt({...null==e?void 0:e.style,color:null!=a&&null!==(u=a.style)&&void 0!==u&&u.color||null!=e&&null!==(m=e.style)&&void 0!==m&&m.color?{...null==a||null===(d=a.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,...a},t)}}]};var si=ii;const ci={$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]},tagName:{type:"string",default:"div"}},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:ui}=ci,mi={icon:Pa,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ze.__)("<strong>Snow Patrol</strong>"),align:"center",style:{typography:{fontSize:48},color:{text:"white"}}}}]},transforms:si,save:function(e){let{attributes:t}=e;const{backgroundType:n,gradient:o,contentPosition:r,customGradient:a,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:_,tagName:f}=t,y=(0,Qe.getColorClassName)("background-color",p),k=(0,Qe.__experimentalGetGradientClass)(o),x=za===n,w=Ma===n,E=!(u||d),C={minHeight:(b&&_?`${b}${_}`:b)||void 0},S={backgroundColor:y?void 0:l,background:a||void 0},B=s&&E?Ha(s):void 0,T=g?`url(${g})`:void 0,N=Ha(s),P=at()({"is-light":!m,"has-parallax":u,"is-repeated":d,"has-custom-content-position":!Va(r)},Fa(r)),I=at()("wp-block-cover__image-background",v?`wp-image-${v}`:null,{"has-parallax":u,"is-repeated":d}),z=o||a;return(0,Oe.createElement)(f,Qe.useBlockProps.save({className:P,style:C}),(0,Oe.createElement)("span",{"aria-hidden":"true",className:at()("wp-block-cover__background",y,Aa(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":g&&z&&0!==i,"has-background-gradient":z,[k]:k}),style:S}),!c&&x&&g&&(E?(0,Oe.createElement)("img",{className:I,alt:h,src:g,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}):(0,Oe.createElement)("div",{role:"img",className:I,style:{backgroundPosition:N,backgroundImage:T}})),w&&g&&(0,Oe.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,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))},edit:li,deprecated:rl},di=()=>je({name:ui,metadata:ci,settings:mi});var pi=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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 gi(e){return e?(0,Ze.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,Ze.__)("This embed may not preserve its aspect ratio when the browser is resized.")}var hi=e=>{let{blockSupportsResponsive:t,showEditButton:n,themeSupportsResponsive:o,allowResponsive:r,toggleResponsive:a,switchBackToURLInput:l}=e;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,n&&(0,Oe.createElement)(We.ToolbarButton,{className:"components-toolbar__control",label:(0,Ze.__)("Edit URL"),icon:pi,onClick:l}))),o&&t&&(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Media settings"),className:"blocks-responsive"},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Resize for smaller devices"),checked:r,help:gi,onChange:a}))))};const vi=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"})),bi=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"})),_i=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"})),fi=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"})),yi={foreground:"#1da1f2",src:(0,Oe.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(We.G,null,(0,Oe.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"})))},ki={foreground:"#ff0000",src:(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.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"}))},xi={foreground:"#3b5998",src:(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.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"}))},wi=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.createElement)(We.G,null,(0,Oe.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"}))),Ei={foreground:"#0073AA",src:(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.createElement)(We.G,null,(0,Oe.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"})))},Ci={foreground:"#1db954",src:(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.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,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.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"})),Bi={foreground:"#1ab7ea",src:(0,Oe.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(We.G,null,(0,Oe.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"})))},Ti=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.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"})),Ni={foreground:"#35465c",src:(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.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"}))},Pi=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.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,Oe.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,Oe.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"})),Ii=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.createElement)(We.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,Oe.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,Oe.createElement)(We.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,Oe.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,Oe.createElement)(We.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,Oe.createElement)(We.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})),zi=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 24 24"},(0,Oe.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"})),Mi=(0,Oe.createElement)(We.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Oe.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"})),Ri=(0,Oe.createElement)(We.SVG,{viewBox:"0 0 44 44"},(0,Oe.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"})),Li={foreground:"#f43e37",src:(0,Oe.createElement)(We.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,Oe.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"}))};var Hi=()=>(0,Oe.createElement)("div",{className:"wp-block-embed is-loading"},(0,Oe.createElement)(We.Spinner,null));var Ai=e=>{let{icon:t,label:n,value:o,onSubmit:r,onChange:a,cannotEmbed:l,fallback:i,tryAgain:s}=e;return(0,Oe.createElement)(We.Placeholder,{icon:(0,Oe.createElement)(Qe.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-embed",instructions:(0,Ze.__)("Paste a link to the content you want to display on your site.")},(0,Oe.createElement)("form",{onSubmit:r},(0,Oe.createElement)("input",{type:"url",value:o||"",className:"components-placeholder__input","aria-label":n,placeholder:(0,Ze.__)("Enter URL to embed here…"),onChange:a}),(0,Oe.createElement)(We.Button,{variant:"primary",type:"submit"},(0,Ze._x)("Embed","button label"))),(0,Oe.createElement)("div",{className:"components-placeholder__learn-more"},(0,Oe.createElement)(We.ExternalLink,{href:(0,Ze.__)("https://wordpress.org/support/article/embeds/")},(0,Ze.__)("Learn more about embeds"))),l&&(0,Oe.createElement)("div",{className:"components-placeholder__error"},(0,Oe.createElement)("div",{className:"components-placeholder__instructions"},(0,Ze.__)("Sorry, this content could not be embedded.")),(0,Oe.createElement)(We.Button,{variant:"secondary",onClick:s},(0,Ze._x)("Try again","button label"))," ",(0,Oe.createElement)(We.Button,{variant:"secondary",onClick:i},(0,Ze._x)("Convert to link","button label"))))};const Vi={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function Fi(e){let{html:t}=e;const n=(0,Oe.useRef)(),o=(0,Oe.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[Vi[t]||t]=o)})),n):n}),[t]);return(0,Oe.useEffect)((()=>{const{ownerDocument:e}=n.current,{defaultView:t}=e;function r(e){let{data:{secret:t,message:r,value:a}={}}=e;"height"===r&&t===o["data-secret"]&&(n.current.height=a)}return t.addEventListener("message",r),()=>{t.removeEventListener("message",r)}}),[]),(0,Oe.createElement)("div",{className:"wp-block-embed__wrapper"},(0,Oe.createElement)("iframe",ot({ref:(0,St.useMergeRefs)([n,(0,St.useFocusableIframe)()]),title:o.title},o)))}class Di extends Oe.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:r,onCaptionChange:a,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,Oe.createElement)("p",null,(0,Oe.createElement)("img",{src:t,alt:e.title,width:"100%"}));return(0,Oe.renderToString)(n)})(e):e.html,g=new URL(n).host.split("."),h=g.splice(g.length-2,g.length-1).join("."),v=(0,Ze.sprintf)((0,Ze.__)("Embedded content from %s"),h),b=It()(o,i,"wp-block-embed__wrapper"),_="wp-embed"===o?(0,Oe.createElement)(Fi,{html:p}):(0,Oe.createElement)("div",{className:"wp-block-embed__wrapper"},(0,Oe.createElement)(We.SandBox,{html:p,scripts:m,title:v,type:b,onFocus:this.hideOverlay}),!d&&(0,Oe.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}));return(0,Oe.createElement)("figure",{className:It()(i,"wp-block-embed",{"is-type-video":"video"===o})},t?_:(0,Oe.createElement)(We.Placeholder,{icon:(0,Oe.createElement)(Qe.BlockIcon,{icon:s,showColors:!0}),label:c},(0,Oe.createElement)("p",{className:"components-placeholder__error"},(0,Oe.createElement)("a",{href:n},n)),(0,Oe.createElement)("p",{className:"components-placeholder__error"},(0,Ze.sprintf)((0,Ze.__)("Embedded content from %s can't be previewed in the editor."),h))),(!Qe.RichText.isEmpty(r)||l)&&(0,Oe.createElement)(Qe.RichText,{identifier:"caption",tagName:"figcaption",className:(0,Qe.__experimentalGetElementClassName)("caption"),placeholder:(0,Ze.__)("Add caption"),value:r,onChange:a,inlineToolbar:!0,__unstableOnSplitAtEnd:()=>u((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))}}var $i=Di;var Gi=e=>{const{attributes:{providerNameSlug:t,previewable:n,responsive:o,url:r},attributes:a,isSelected:l,onReplace:i,setAttributes:s,insertBlocksAfter:c,onFocus:u}=e,m={title:(0,Ze._x)("Embed","block title"),icon:vi},{icon:d,title:p}=(g=t,(null===(h=(0,Ge.getBlockVariations)(Rt))||void 0===h?void 0:h.find((e=>{let{name:t}=e;return t===g})))||m);var g,h;const[v,b]=(0,Oe.useState)(r),[_,f]=(0,Oe.useState)(!1),{invalidateResolution:y}=(0,st.useDispatch)(it.store),{preview:k,fetching:x,themeSupportsResponsive:w,cannotEmbed:E}=(0,st.useSelect)((e=>{var t;const{getEmbedPreview:n,isPreviewEmbedFallback:o,isRequestingEmbedPreview:a,getThemeSupports:l}=e(it.store);if(!r)return{fetching:!1,cannotEmbed:!1};const i=n(r),s=o(r),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:a(r),themeSupportsResponsive:l()["responsive-embeds"],cannotEmbed:!m||s}}),[r]),C=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return $t(a,k,p,o,e)};(0,Oe.useEffect)((()=>{if(null==k||!k.html||!E||x)return;const e=r.replace(/\/$/,"");b(e),f(!1),s({url:e})}),[null==k?void 0:k.html,r]),(0,Oe.useEffect)((()=>{if(k&&!_&&(s(C(!0)),i)){const t=At(e,C());t&&i(t)}}),[k,_]);const S=(0,Qe.useBlockProps)();if(x)return(0,Oe.createElement)(Ue.View,S,(0,Oe.createElement)(Hi,null));const B=(0,Ze.sprintf)((0,Ze.__)("%s URL"),p);if(!k||E||_)return(0,Oe.createElement)(Ue.View,S,(0,Oe.createElement)(Ai,{icon:d,label:B,onFocus:u,onSubmit:e=>{e&&e.preventDefault(),f(!1),s({url:v})},value:v,cannotEmbed:E,onChange:e=>b(e.target.value),fallback:()=>function(e,t){const n=(0,Oe.createElement)("a",{href:e},e);t((0,Ge.createBlock)("core/paragraph",{content:(0,Oe.renderToString)(n)}))}(v,i),tryAgain:()=>{y("getEmbedPreview",[v])}}));const{caption:T,type:N,allowResponsive:P,className:I}=C(),z=at()(I,e.className);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(hi,{showEditButton:k&&!E,themeSupportsResponsive:w,blockSupportsResponsive:o,allowResponsive:P,toggleResponsive:()=>{const{allowResponsive:e,className:t}=a,{html:n}=k,r=!e;s({allowResponsive:r,className:Ft(n,t,o&&r)})},switchBackToURLInput:()=>f(!0)}),(0,Oe.createElement)(Ue.View,S,(0,Oe.createElement)($i,{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})))};const{name:Oi}={$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"},Ui={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)(Oi,{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})}}]};var qi=Ui;const ji=[{name:"twitter",title:"Twitter",icon:yi,keywords:["tweet",(0,Ze.__)("social")],description:(0,Ze.__)("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:"YouTube",icon:ki,keywords:[(0,Ze.__)("music"),(0,Ze.__)("video")],description:(0,Ze.__)("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:xi,keywords:[(0,Ze.__)("social")],description:(0,Ze.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:"Instagram",icon:wi,keywords:[(0,Ze.__)("image"),(0,Ze.__)("social")],description:(0,Ze.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:"WordPress",icon:Ei,keywords:[(0,Ze.__)("post"),(0,Ze.__)("blog")],description:(0,Ze.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:"SoundCloud",icon:bi,keywords:[(0,Ze.__)("music"),(0,Ze.__)("audio")],description:(0,Ze.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:"Spotify",icon:Ci,keywords:[(0,Ze.__)("music"),(0,Ze.__)("audio")],description:(0,Ze.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:"Flickr",icon:Si,keywords:[(0,Ze.__)("image")],description:(0,Ze.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:"Vimeo",icon:Bi,keywords:[(0,Ze.__)("video")],description:(0,Ze.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:"Animoto",icon:Ii,description:(0,Ze.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:"Cloudup",icon:vi,description:(0,Ze.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:"CollegeHumor",icon:fi,description:(0,Ze.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:"Crowdsignal",icon:vi,keywords:["polldaddy",(0,Ze.__)("survey")],description:(0,Ze.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:"Dailymotion",icon:zi,keywords:[(0,Ze.__)("video")],description:(0,Ze.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:"Imgur",icon:_i,description:(0,Ze.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:"Issuu",icon:vi,description:(0,Ze.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:"Kickstarter",icon:vi,description:(0,Ze.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:"Mixcloud",icon:bi,keywords:[(0,Ze.__)("music"),(0,Ze.__)("audio")],description:(0,Ze.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocketcasts",title:"Pocket Casts",icon:Li,keywords:[(0,Ze.__)("podcast"),(0,Ze.__)("audio")],description:(0,Ze.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocketcasts",responsive:!0}},{name:"reddit",title:"Reddit",icon:Ti,description:(0,Ze.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:"ReverbNation",icon:bi,description:(0,Ze.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"screencast",title:"Screencast",icon:fi,description:(0,Ze.__)("Embed Screencast content."),patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i],attributes:{providerNameSlug:"screencast",responsive:!0}},{name:"scribd",title:"Scribd",icon:vi,description:(0,Ze.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"slideshare",title:"Slideshare",icon:vi,description:(0,Ze.__)("Embed Slideshare content."),patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i],attributes:{providerNameSlug:"slideshare",responsive:!0}},{name:"smugmug",title:"SmugMug",icon:_i,description:(0,Ze.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:"Speaker Deck",icon:vi,description:(0,Ze.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:"TikTok",icon:fi,keywords:[(0,Ze.__)("video")],description:(0,Ze.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:"TED",icon:fi,description:(0,Ze.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:"Tumblr",icon:Ni,keywords:[(0,Ze.__)("social")],description:(0,Ze.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(.+)\.tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:"VideoPress",icon:fi,keywords:[(0,Ze.__)("video")],description:(0,Ze.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:"WordPress.tv",icon:fi,description:(0,Ze.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:"Amazon Kindle",icon:Pi,keywords:[(0,Ze.__)("ebook")],description:(0,Ze.__)("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:Mi,keywords:[(0,Ze.__)("social"),(0,Ze.__)("bookmark")],description:(0,Ze.__)("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:Ri,description:(0,Ze.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}}];ji.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)}));var Wi=ji;const{attributes:Zi}={$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"},Qi={attributes:Zi,save(e){let{attributes:t}=e;const{url:n,caption:o,type:r,providerNameSlug:a}=t;if(!n)return null;const l=at()("wp-block-embed",{[`is-type-${r}`]:r,[`is-provider-${a}`]:a,[`wp-block-embed-${a}`]:a});return(0,Oe.createElement)("figure",Qe.useBlockProps.save({className:l}),(0,Oe.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${n}\n`),!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:o}))}},Ki={attributes:Zi,save(e){let{attributes:{url:t,caption:n,type:o,providerNameSlug:r}}=e;if(!t)return null;const a=at()("wp-block-embed",{[`is-type-${o}`]:o,[`is-provider-${r}`]:r});return(0,Oe.createElement)("figure",{className:a},`\n${t}\n`,!Qe.RichText.isEmpty(n)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:n}))}};var Yi=[Qi,Ki];const Ji={$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:Xi}=Ji,es={icon:vi,edit:Gi,save:function(e){let{attributes:t}=e;const{url:n,caption:o,type:r,providerNameSlug:a}=t;if(!n)return null;const l=It()("wp-block-embed",{[`is-type-${r}`]:r,[`is-provider-${a}`]:a,[`wp-block-embed-${a}`]:a});return(0,Oe.createElement)("figure",Qe.useBlockProps.save({className:l}),(0,Oe.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${n}\n`),!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)(Qe.RichText.Content,{className:(0,Qe.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:o}))},transforms:qi,variations:Wi,deprecated:Yi},ts=()=>je({name:Xi,metadata:Ji,settings:es});var ns=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const os={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:r,textLinkHref:a,textLinkTarget:l,showDownloadButton:i,downloadButtonText:s,displayPreview:c,previewHeight:u}=t,m=Qe.RichText.isEmpty(r)?(0,Ze.__)("PDF embed"):(0,Ze.sprintf)((0,Ze.__)("Embed of %s."),r),d=!Qe.RichText.isEmpty(r),p=d?o:void 0;return n&&(0,Oe.createElement)("div",Qe.useBlockProps.save(),c&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})),d&&(0,Oe.createElement)("a",{id:p,href:a,target:l,rel:l?"noreferrer noopener":void 0},(0,Oe.createElement)(Qe.RichText.Content,{value:r})),i&&(0,Oe.createElement)("a",{href:n,className:at()("wp-block-file__button",(0,Qe.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p},(0,Oe.createElement)(Qe.RichText.Content,{value:s})))}},rs={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:r,textLinkHref:a,textLinkTarget:l,showDownloadButton:i,downloadButtonText:s,displayPreview:c,previewHeight:u}=t,m=Qe.RichText.isEmpty(r)?(0,Ze.__)("PDF embed"):(0,Ze.sprintf)((0,Ze.__)("Embed of %s."),r),d=!Qe.RichText.isEmpty(r),p=d?o:void 0;return n&&(0,Oe.createElement)("div",Qe.useBlockProps.save(),c&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})),d&&(0,Oe.createElement)("a",{id:p,href:a,target:l,rel:l?"noreferrer noopener":void 0},(0,Oe.createElement)(Qe.RichText.Content,{value:r})),i&&(0,Oe.createElement)("a",{href:n,className:"wp-block-file__button",download:!0,"aria-describedby":p},(0,Oe.createElement)(Qe.RichText.Content,{value:s})))}},as={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:r,textLinkTarget:a,showDownloadButton:l,downloadButtonText:i,displayPreview:s,previewHeight:c}=t,u=Qe.RichText.isEmpty(o)?(0,Ze.__)("PDF embed"):(0,Ze.sprintf)((0,Ze.__)("Embed of %s."),o);return n&&(0,Oe.createElement)("div",Qe.useBlockProps.save(),s&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})),!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)("a",{href:r,target:a,rel:a?"noreferrer noopener":void 0},(0,Oe.createElement)(Qe.RichText.Content,{value:o})),l&&(0,Oe.createElement)("a",{href:n,className:"wp-block-file__button",download:!0},(0,Oe.createElement)(Qe.RichText.Content,{value:i})))}};var ls=[os,rs,as];function is(e){let{hrefs:t,openInNewWindow:n,showDownloadButton:o,changeLinkDestinationOption:r,changeOpenInNewWindow:a,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,Ze.__)("URL")}];return p&&(g=[{value:m,label:(0,Ze.__)("Media file")},{value:p,label:(0,Ze.__)("Attachment page")}]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,m.endsWith(".pdf")&&(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("PDF settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show inline embed"),help:i?(0,Ze.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!i,onChange:s}),i&&(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Height in pixels"),min:us,max:Math.max(ms,c),value:c,onChange:u})),(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Link to"),value:d,options:g,onChange:r}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Open in new tab"),checked:n,onChange:a}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show download button"),checked:o,onChange:l}))))}const ss=()=>!(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)&&!cs("AcroPDF.PDF")&&!cs("PDF.PdfCtrl")))),cs=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t},us=200,ms=2e3;function ds(e){let{text:t,disabled:n}=e;const{createNotice:o}=(0,st.useDispatch)(Ct.store),r=(0,St.useCopyToClipboard)(t,(()=>{o("info",(0,Ze.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,Oe.createElement)(We.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:r,disabled:n},(0,Ze.__)("Copy URL"))}var ps=function(e){let{attributes:t,isSelected:n,setAttributes:o,clientId:r}=e;const{id:a,fileId:l,fileName:i,href:s,textLinkHref:c,textLinkTarget:u,showDownloadButton:m,downloadButtonText:d,displayPreview:p,previewHeight:g}=t,{media:h,mediaUpload:v}=(0,st.useSelect)((e=>({media:void 0===a?void 0:e(it.store).getMedia(a),mediaUpload:e(Qe.store).getSettings().mediaUpload})),[a]),{createErrorNotice:b}=(0,st.useDispatch)(Ct.store),{toggleSelection:_,__unstableMarkNextChangeAsNotPersistent:f}=(0,st.useDispatch)(Qe.store);function y(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,Oe.useEffect)((()=>{if((0,wt.isBlobURL)(s)){const e=(0,wt.getBlobByURL)(s);v({filesList:[e],onFileChange:e=>{let[t]=e;return y(t)},onError:k}),(0,wt.revokeBlobURL)(s)}void 0===d&&x((0,Ze._x)("Download","button label"))}),[]),(0,Oe.useEffect)((()=>{!l&&s&&(f(),o({fileId:`wp-block-file--media-${r}`}))}),[s,l,r]);const w=h&&h.link,E=(0,Qe.useBlockProps)({className:at()((0,wt.isBlobURL)(s)&&(0,We.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":(0,wt.isBlobURL)(s)})}),C=ss()&&p;return s?(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(is,{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),us);o({previewHeight:t})}}),(0,Oe.createElement)(Qe.BlockControls,{group:"other"},(0,Oe.createElement)(Qe.MediaReplaceFlow,{mediaId:a,mediaURL:s,accept:"*",onSelect:y,onError:k}),(0,Oe.createElement)(ds,{text:s,disabled:(0,wt.isBlobURL)(s)})),(0,Oe.createElement)("div",E,C&&(0,Oe.createElement)(We.ResizableBox,{size:{height:g},minHeight:us,maxHeight:ms,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,r){_(!0);const a=parseInt(g+r.height,10);o({previewHeight:a})},showHandle:n},(0,Oe.createElement)("object",{className:"wp-block-file__preview",data:s,type:"application/pdf","aria-label":(0,Ze.__)("Embed of the selected PDF file.")}),!n&&(0,Oe.createElement)("div",{className:"wp-block-file__preview-overlay"})),(0,Oe.createElement)("div",{className:"wp-block-file__content-wrapper"},(0,Oe.createElement)(Qe.RichText,{tagName:"a",value:i,placeholder:(0,Ze.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>o({fileName:e}),href:c}),m&&(0,Oe.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},(0,Oe.createElement)(Qe.RichText,{tagName:"div","aria-label":(0,Ze.__)("Download button text"),className:at()("wp-block-file__button",(0,Qe.__experimentalGetElementClassName)("button")),value:d,withoutInteractiveFormatting:!0,placeholder:(0,Ze.__)("Add text…"),onChange:e=>x(e)}))))):(0,Oe.createElement)("div",E,(0,Oe.createElement)(Qe.MediaPlaceholder,{icon:(0,Oe.createElement)(Qe.BlockIcon,{icon:ns}),labels:{title:(0,Ze.__)("File"),instructions:(0,Ze.__)("Upload a file or pick one from your media library.")},onSelect:y,onError:k,accept:"*"}))};const gs={from:[{type:"files",isMatch(e){return e.length>0},priority:15,transform:e=>{const t=[];return e.forEach((e=>{const n=(0,wt.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,lt.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,st.select)(it.store),o=n(t);return!!o&&o.mime_type.includes("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,st.select)(it.store),o=n(t);return!!o&&o.mime_type.includes("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,st.select)(it.store),o=n(t);return!!o&&o.mime_type.includes("image")},transform:e=>(0,Ge.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]};var hs=gs;const vs={$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:bs}=vs,_s={icon:ns,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,Ze._x)("Armstrong_Small_Step","Name of the file")}},transforms:hs,deprecated:ls,edit:ps,save:function(e){let{attributes:t}=e;const{href:n,fileId:o,fileName:r,textLinkHref:a,textLinkTarget:l,showDownloadButton:i,downloadButtonText:s,displayPreview:c,previewHeight:u}=t,m=Qe.RichText.isEmpty(r)?"PDF embed":r,d=!Qe.RichText.isEmpty(r),p=d?o:void 0;return n&&(0,Oe.createElement)("div",Qe.useBlockProps.save(),c&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})),d&&(0,Oe.createElement)("a",{id:p,href:a,target:l,rel:l?"noreferrer noopener":void 0},(0,Oe.createElement)(Qe.RichText.Content,{value:r})),i&&(0,Oe.createElement)("a",{href:n,className:at()("wp-block-file__button",(0,Qe.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p},(0,Oe.createElement)(Qe.RichText.Content,{value:s})))}},fs=()=>je({name:bs,metadata:vs,settings:_s});var ys=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const ks="none",xs="media",ws="attachment";const Es=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large";const n=Object.fromEntries(Object.entries(null!=e?e:{}).filter((e=>{let[t]=e;return["alt","id","link"].includes(t)})));n.url=(0,Nt.get)(e,["sizes",t,"url"])||(0,Nt.get)(e,["media_details","sizes",t,"source_url"])||e.url||e.source_url;const o=(0,Nt.get)(e,["sizes","full","url"])||(0,Nt.get)(e,["media_details","sizes","full","source_url"]);return o&&(n.fullUrl=o),n};function Cs(){return!Oe.Platform.isNative||function(){if(!window.wp||"boolean"!=typeof window.wp.galleryBlockV2Enabled)throw"window.wp.galleryBlockV2Enabled is not defined";return window.wp.galleryBlockV2Enabled}()}const Ss="file",Bs="post";function Ts(e){var t;return Math.min(3,null==e||null===(t=e.images)||void 0===t?void 0:t.length)}function Ns(e,t){switch(t){case Ss:return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:xs};case Bs:return{href:null==e?void 0:e.link,linkDestination:ws};case xs:return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:xs};case ws:return{href:null==e?void 0:e.link,linkDestination:ws};case ks:return{href:void 0,linkDestination:ks}}return{}}function Ps(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,...Ns(e,n)})}(n,e.sizeSlug,t))),{images:o,ids:r,...a}=e;return[{...a,linkTo:t,allowResize:!1},n]}const 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:[]},shortCodeTransforms:{type:"array",default:[],items:{type:"object"}},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},save(e){let{attributes:t}=e;const{caption:n,columns:o,imageCrop:r}=t,a=at()("has-nested-images",{[`columns-${o}`]:void 0!==o,"columns-default":void 0===o,"is-cropped":r}),l=Qe.useBlockProps.save({className:a}),i=Qe.useInnerBlocksProps.save(l);return(0,Oe.createElement)("figure",i,i.children,!Qe.RichText.isEmpty(n)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:n}))}},zs={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=Ts(t),imageCrop:r,caption:a,linkTo:l}=t,i=`columns-${o} ${r?"is-cropped":""}`;return(0,Oe.createElement)("figure",Qe.useBlockProps.save({className:i}),(0,Oe.createElement)("ul",{className:"blocks-gallery-grid"},n.map((e=>{let t;switch(l){case Ss:t=e.fullUrl||e.url;break;case Bs:t=e.link}const n=(0,Oe.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,Oe.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Oe.createElement)("figure",null,t?(0,Oe.createElement)("a",{href:t},n):n,!Qe.RichText.isEmpty(e.caption)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!Qe.RichText.isEmpty(a)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))},migrate(e){return Cs()?Ps(e):e}},Ms={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(Cs())return Ps(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=Ts(t),imageCrop:r,caption:a,linkTo:l}=t;return(0,Oe.createElement)("figure",{className:`columns-${o} ${r?"is-cropped":""}`},(0,Oe.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,Oe.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,Oe.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Oe.createElement)("figure",null,t?(0,Oe.createElement)("a",{href:t},n):n,!Qe.RichText.isEmpty(e.caption)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!Qe.RichText.isEmpty(a)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))}},Rs={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){var t;return Cs()?Ps(e):{...e,ids:(null!==(t=e.ids)&&void 0!==t?t:[]).map((e=>{const t=parseInt(e,10);return Number.isInteger(t)?t:null}))}},save(e){let{attributes:t}=e;const{images:n,columns:o=Ts(t),imageCrop:r,caption:a,linkTo:l}=t;return(0,Oe.createElement)("figure",{className:`columns-${o} ${r?"is-cropped":""}`},(0,Oe.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,Oe.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,Oe.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Oe.createElement)("figure",null,t?(0,Oe.createElement)("a",{href:t},n):n,!Qe.RichText.isEmpty(e.caption)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!Qe.RichText.isEmpty(a)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:a}))}},Ls={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=Ts(t),imageCrop:r,linkTo:a}=t;return(0,Oe.createElement)("ul",{className:`columns-${o} ${r?"is-cropped":""}`},n.map((e=>{let t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,Oe.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,Oe.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Oe.createElement)("figure",null,t?(0,Oe.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:e.caption})))})))},migrate(e){return Cs()?Ps(e):e}},Hs={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||t.some(((e,t)=>!e&&null!==n[t]||parseInt(e,10)!==n[t])))},migrate(e){var t;return Cs()?Ps(e):{...e,ids:(null!==(t=e.images)&&void 0!==t?t:[]).map((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=Ts(t),imageCrop:r,linkTo:a}=t;return(0,Oe.createElement)("ul",{className:`columns-${o} ${r?"is-cropped":""}`},n.map((e=>{let t;switch(a){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,Oe.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,Oe.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Oe.createElement)("figure",null,t?(0,Oe.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},As={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=Ts(t),align:r,imageCrop:a,linkTo:l}=t,i=at()(`columns-${o}`,{alignnone:"none"===r,"is-cropped":a});return(0,Oe.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,Oe.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return(0,Oe.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?(0,Oe.createElement)("a",{href:t},n):n)})))},migrate(e){return Cs()?Ps(e):e}};var Vs=[Is,zs,Ms,Rs,Ls,Hs,As],Fs=window.wp.viewport;const Ds=(0,Oe.createElement)(Qe.BlockIcon,{icon:ys}),$s=20,Gs="none",Os="media",Us="attachment",qs="custom",js=["noreferrer","noopener"],Ws=["image"];function Zs(e,t,n){switch(n||t){case"file":case xs:return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:Os};case"post":case ws:return{href:null==e?void 0:e.link,linkDestination:Us};case ks:return{href:void 0,linkDestination:Gs}}return{}}function Qs(e,t){let{rel:n}=t;const o=e?"_blank":void 0;let r;return r=o||n?function(e){let t=e;return void 0===e||(0,Nt.isEmpty)(t)||(0,Nt.isEmpty)(t)||(js.forEach((e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,Nt.isEmpty)(t)&&(t=void 0)),t}(n):void 0,{linkTarget:o,rel:r}}var Ks=(0,Oe.forwardRef)(((e,t)=>{const{attributes:n,isSelected:o,setAttributes:r,mediaPlaceholder:a,insertBlocksAfter:l,blockProps:i,__unstableLayoutClassNames:s,showCaption:c}=e,{align:u,columns:m,caption:d,imageCrop:p}=n;return(0,Oe.createElement)("figure",ot({},i,{className:at()(i.className,s,"blocks-gallery-grid",{[`align${u}`]:u,[`columns-${m}`]:void 0!==m,"columns-default":void 0===m,"is-cropped":p})}),i.children,o&&!i.children&&(0,Oe.createElement)(Ue.View,{className:"blocks-gallery-media-placeholder-wrapper"},a),c&&(!Qe.RichText.isEmpty(d)||o)&&(0,Oe.createElement)(Qe.RichText,{identifier:"caption","aria-label":(0,Ze.__)("Gallery caption text"),placeholder:(0,Ze.__)("Write gallery caption…"),value:d,className:at()("blocks-gallery-caption",(0,Qe.__experimentalGetElementClassName)("caption")),ref:t,tagName:"figcaption",onChange:e=>r({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>l((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))}));function Ys(e,t,n){return(0,Oe.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:o}=n();let r={};t&&(r=e.reduce(((e,t)=>{if(!t.id)return e;const n=o.reduce(((e,n)=>{const o=(0,Nt.get)(t,["sizes",n.slug,"url"]),r=(0,Nt.get)(t,["media_details","sizes",n.slug,"source_url"]);return{...e,[n.slug]:o||r}}),{});return{...e,[parseInt(t.id,10)]:n}}),{}));const a=Object.values(r);return o.filter((e=>{let{slug:t}=e;return a.some((e=>e[t]))})).map((e=>{let{name:t,slug:n}=e;return{value:n,label:t}}))}()),[e,t])}function Js(e,t){const[n,o]=(0,Oe.useState)([]);return(0,Oe.useMemo)((()=>function(){let r=!1;const a=n.filter((t=>e.find((e=>t.clientId===e.clientId))));a.length<n.length&&(r=!0);e.forEach((e=>{e.fromSavedContent&&!a.find((t=>t.id===e.id))&&(r=!0,a.push(e))}));const l=e.filter((e=>!a.find((t=>e.clientId&&t.clientId===e.clientId))&&(null==t?void 0:t.find((t=>t.id===e.id)))&&!e.fromSavedConent));(r||(null==l?void 0:l.length)>0)&&o([...a,...l]);return l.length>0?l:null}()),[e,t])}const Xs=[];function ec(e){let{blockGap:t,clientId:n}=e;const o=(0,Oe.useContext)(Qe.BlockList.__unstableElementContext),r="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )";let a,l=r,i=r;t&&(a="string"==typeof t?(0,Qe.__experimentalGetGapCSSValue)(t):(0,Qe.__experimentalGetGapCSSValue)(null==t?void 0:t.top)||r,i="string"==typeof t?(0,Qe.__experimentalGetGapCSSValue)(t):(0,Qe.__experimentalGetGapCSSValue)(null==t?void 0:t.left)||r,l=a===i?a:`${a} ${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,Oe.createPortal)((0,Oe.createElement)((()=>(0,Oe.createElement)("style",null,s)),null),o):null}const tc=[{value:ws,label:(0,Ze.__)("Attachment Page")},{value:xs,label:(0,Ze.__)("Media File")},{value:ks,label:(0,Ze._x)("None","Media item link option")}],nc=["image"],oc=["core/image"],rc=Oe.Platform.isNative?(0,Ze.__)("ADD MEDIA"):(0,Ze.__)("Drag images, upload new ones or select files from your library."),ac=Oe.Platform.isNative?{type:"stepper"}:{};var lc=(0,St.compose)([(0,Fs.withViewportMatch)({isNarrow:"< small"})])((function(e){var t,n;const{setAttributes:o,attributes:r,className:a,clientId:l,isSelected:i,insertBlocksAfter:s,isContentLocked:c}=e,{columns:u,imageCrop:m,linkTarget:d,linkTo:p,sizeSlug:g,caption:h}=r,[v,b]=(0,Oe.useState)(!!h),_=(0,St.usePrevious)(h);(0,Oe.useEffect)((()=>{h&&!_&&b(!0)}),[h,_]),(0,Oe.useEffect)((()=>{i||h||b(!1)}),[i,h]);const f=(0,Oe.useCallback)((e=>{e&&!h&&e.focus()}),[h]),{__unstableMarkNextChangeAsNotPersistent:y,replaceInnerBlocks:k,updateBlockAttributes:x,selectBlock:w,clearSelectedBlock:E}=(0,st.useDispatch)(Qe.store),{createSuccessNotice:C,createErrorNotice:S}=(0,st.useDispatch)(Ct.store),{getBlock:B,getSettings:T,preferredStyle:N}=(0,st.useSelect)((e=>{var t;const n=e(Qe.store).getSettings().__experimentalPreferredStyleVariations;return{getBlock:e(Qe.store).getBlock,getSettings:e(Qe.store).getSettings,preferredStyle:null==n||null===(t=n.value)||void 0===t?void 0:t["core/image"]}}),[]),P=(0,st.useSelect)((e=>{var t;return null===(t=e(Qe.store).getBlock(l))||void 0===t?void 0:t.innerBlocks}),[l]),I=(0,st.useSelect)((e=>e(Qe.store).wasBlockJustInserted(l,"inserter_menu")),[l]),z=(0,Oe.useMemo)((()=>null==P?void 0:P.map((e=>({clientId:e.clientId,id:e.attributes.id,url:e.attributes.url,attributes:e.attributes,fromSavedContent:Boolean(e.originalContent)})))),[P]),M=function(e){return(0,st.useSelect)((t=>{var n;const o=e.map((e=>e.attributes.id)).filter((e=>void 0!==e));return 0===o.length?Xs:null!==(n=t(it.store).getMediaItems({include:o.join(","),per_page:-1,orderby:"include"}))&&void 0!==n?n:Xs}),[e])}(P),R=Js(z,M);(0,Oe.useEffect)((()=>{null==R||R.forEach((e=>{y(),x(e.clientId,{...H(e.attributes),id:e.id,align:void 0})})),(null==R?void 0:R.length)>0&&E()}),[R]);const L=Ys(M,i,T);function H(e){var t;const n=e.id?M.find((t=>{let{id:n}=t;return n===e.id})):null;let o,a;return o=e.className&&""!==e.className?e.className:N?`is-style-${N}`:void 0,a=e.linkTarget||e.rel?{linkTarget:e.linkTarget,rel:e.rel}:Qs(d,r),{...Es(n,g),...Zs(n,p,null==e?void 0:e.linkDestination),...a,className:o,sizeSlug:g,caption:e.caption||(null===(t=n.caption)||void 0===t?void 0:t.raw),alt:e.alt||n.alt_text}}function A(e){var t;const n=Oe.Platform.isNative&&e.id?M.find((t=>{let{id:n}=t;return n===e.id})):null,o=n?null==n?void 0:n.media_type:e.type;return nc.some((e=>0===(null==o?void 0:o.indexOf(e))))||0===(null===(t=e.url)||void 0===t?void 0:t.indexOf("blob:"))}function V(e){const t="[object FileList]"===Object.prototype.toString.call(e),n=t?Array.from(e).map((e=>e.url?e:Es({url:(0,wt.createBlobURL)(e)}))):e;n.every(A)||S((0,Ze.__)("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||A(e))).map((e=>e.url?e:Es({url:(0,wt.createBlobURL)(e)}))),r=o.reduce(((e,t,n)=>(e[t.id]=n,e)),{}),a=t?P:P.filter((e=>o.find((t=>t.id===e.attributes.id)))),i=o.filter((e=>!a.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&&w(i[0].clientId),k(l,a.concat(i).sort(((e,t)=>r[e.attributes.id]-r[t.attributes.id])))}(0,Oe.useEffect)((()=>{var e,t,n,r,a,l;p||(y(),o({linkTo:(null===(e=window)||void 0===e||null===(t=e.wp)||void 0===t||null===(n=t.media)||void 0===n||null===(r=n.view)||void 0===r||null===(a=r.settings)||void 0===a||null===(l=a.defaultProps)||void 0===l?void 0:l.link)||ks}))}),[p]);const F=!!z.length,D=F&&z.some((e=>!!e.id)),$=z.some((e=>{var t,n;return Oe.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:"))})),G=Oe.Platform.select({web:{addToGallery:!1,disableMediaButtons:$,value:{}},native:{addToGallery:D,isAppender:F,disableMediaButtons:F&&!i||$,value:D?z:{},autoOpenMediaUpload:!F&&i&&I}}),O=(0,Oe.createElement)(Qe.MediaPlaceholder,ot({handleUpload:!1,icon:Ds,labels:{title:(0,Ze.__)("Gallery"),instructions:rc},onSelect:V,accept:"image/*",allowedTypes:nc,multiple:!0,onError:function(e){S(e,{type:"snackbar"})}},G)),U=(0,Qe.useBlockProps)({className:at()(a,"has-nested-images")}),q=Oe.Platform.isNative&&{marginHorizontal:0,marginVertical:0},j=(0,Qe.useInnerBlocksProps)(U,{allowedBlocks:oc,orientation:"horizontal",renderAppender:!1,...q});if(!F)return(0,Oe.createElement)(Ue.View,j,j.children,O);const W=p&&"none"!==p;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},z.length>1&&(0,Oe.createElement)(We.RangeControl,ot({__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Columns"),value:u||(Z=z.length,Z?Math.min(3,Z):3),onChange:function(e){o({columns:e})},min:1,max:Math.min(8,z.length)},ac,{required:!0})),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Crop images"),checked:!!m,onChange:function(){o({imageCrop:!m})},help:function(e){return e?(0,Ze.__)("Thumbnails are cropped to align."):(0,Ze.__)("Thumbnails are not cropped.")}}),(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Link to"),value:p,onChange:function(e){o({linkTo:e});const t={},n=[];B(l).innerBlocks.forEach((o=>{n.push(o.clientId);const r=o.attributes.id?M.find((e=>{let{id:t}=e;return t===o.attributes.id})):null;t[o.clientId]=Zs(r,e)})),x(n,t,!0);const r=[...tc].find((t=>t.value===e));C((0,Ze.sprintf)((0,Ze.__)("All gallery image links updated to: %s"),r.label),{id:"gallery-attributes-linkTo",type:"snackbar"})},options:tc,hideCancelButton:!0}),W&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Open in new tab"),checked:"_blank"===d,onChange:function(e){const t=e?"_blank":void 0;o({linkTarget:t});const n={},r=[];B(l).innerBlocks.forEach((e=>{r.push(e.clientId),n[e.clientId]=Qs(t,e.attributes)})),x(r,n,!0);const a=e?(0,Ze.__)("All gallery images updated to open in new tab"):(0,Ze.__)("All gallery images updated to not open in new tab");C(a,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}}),(null==L?void 0:L.length)>0&&(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Image size"),value:g,options:L,onChange:function(e){o({sizeSlug:e});const t={},n=[];B(l).innerBlocks.forEach((o=>{n.push(o.clientId);const r=o.attributes.id?M.find((e=>{let{id:t}=e;return t===o.attributes.id})):null;t[o.clientId]=function(e,t){const n=(0,Nt.get)(e,["media_details","sizes",t,"source_url"]);return n?{url:n,width:void 0,height:void 0,sizeSlug:t}:{}}(r,e)})),x(n,t,!0);const r=L.find((t=>t.value===e));C((0,Ze.sprintf)((0,Ze.__)("All gallery image sizes updated to: %s"),r.label),{id:"gallery-attributes-sizeSlug",type:"snackbar"})},hideCancelButton:!0}),Oe.Platform.isWeb&&!L&&D&&(0,Oe.createElement)(We.BaseControl,{className:"gallery-image-sizes"},(0,Oe.createElement)(We.BaseControl.VisualLabel,null,(0,Ze.__)("Image size")),(0,Oe.createElement)(Ue.View,{className:"gallery-image-sizes__loading"},(0,Oe.createElement)(We.Spinner,null),(0,Ze.__)("Loading options…"))))),(0,Oe.createElement)(Qe.BlockControls,{group:"block"},!c&&(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>{b(!v),v&&h&&o({caption:void 0})},icon:Et,isPressed:v,label:v?(0,Ze.__)("Remove caption"):(0,Ze.__)("Add caption")})),(0,Oe.createElement)(Qe.BlockControls,{group:"other"},(0,Oe.createElement)(Qe.MediaReplaceFlow,{allowedTypes:nc,accept:"image/*",handleUpload:!1,onSelect:V,name:(0,Ze.__)("Add"),multiple:!0,mediaIds:z.filter((e=>e.id)).map((e=>e.id)),addToGallery:D})),Oe.Platform.isWeb&&(0,Oe.createElement)(ec,{blockGap:null===(t=r.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap,clientId:l}),(0,Oe.createElement)(Ks,ot({},e,{showCaption:v,ref:Oe.Platform.isWeb?f:void 0,images:z,mediaPlaceholder:!F||Oe.Platform.isNative?O:void 0,blockProps:j,insertBlocksAfter:s})));var Z}));const ic=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large";const n=Object.fromEntries(Object.entries(null!=e?e:{}).filter((e=>{let[t]=e;return["alt","id","link","caption"].includes(t)})));n.url=(0,Nt.get)(e,["sizes",t,"url"])||(0,Nt.get)(e,["media_details","sizes",t,"source_url"])||e.url;const o=(0,Nt.get)(e,["sizes","full","url"])||(0,Nt.get)(e,["media_details","sizes","full","source_url"]);return o&&(n.fullUrl=o),n};var sc=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));var cc=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var uc=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var mc=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const dc="none",pc="file",gc="post";class hc extends Oe.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!==[cn.BACKSPACE,cn.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:r,caption:a,sizeSlug:l}=this.props;if(!e||!e.url)return;let i=ic(e,l);if(((e,t)=>!e&&(0,wt.isBlobURL)(t))(n,o)&&r){const{alt:e,...t}=i;i=t}if(a&&!(0,Nt.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:r,isFirstItem:a,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 pc:h=e;break;case gc:h=r}const v=(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("img",{src:e,alt:t,"data-id":n,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":p,ref:this.bindContainer}),(0,wt.isBlobURL)(e)&&(0,Oe.createElement)(We.Spinner,null)),b=at()({"is-selected":i,"is-transient":(0,wt.isBlobURL)(e)});return(0,Oe.createElement)("figure",{className:b,onClick:this.onSelectImage,onFocus:this.onSelectImage},!g&&(h?(0,Oe.createElement)("a",{href:h},v):v),g&&(0,Oe.createElement)(Qe.MediaPlaceholder,{labels:{title:(0,Ze.__)("Edit gallery image")},icon:sc,onSelect:this.onSelectImageFromLibrary,onSelectURL:this.onSelectCustomURL,accept:"image/*",allowedTypes:["image"],value:{id:n,src:e}}),(0,Oe.createElement)(We.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-left"},(0,Oe.createElement)(We.Button,{icon:cc,onClick:a?void 0:m,label:(0,Ze.__)("Move image backward"),"aria-disabled":a,disabled:!i}),(0,Oe.createElement)(We.Button,{icon:uc,onClick:l?void 0:u,label:(0,Ze.__)("Move image forward"),"aria-disabled":l,disabled:!i})),(0,Oe.createElement)(We.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right"},(0,Oe.createElement)(We.Button,{icon:pi,onClick:this.onEdit,label:(0,Ze.__)("Replace image"),disabled:!i}),(0,Oe.createElement)(We.Button,{icon:mc,onClick:c,label:(0,Ze.__)("Remove image"),disabled:!i})),!g&&(i||s)&&(0,Oe.createElement)(Qe.RichText,{tagName:"figcaption",className:(0,Qe.__experimentalGetElementClassName)("caption"),"aria-label":(0,Ze.__)("Image caption text"),placeholder:i?(0,Ze.__)("Add caption"):null,value:s,onChange:e=>d({caption:e}),inlineToolbar:!0}))}}var vc=(0,St.compose)([(0,st.withSelect)(((e,t)=>{const{getMedia:n}=e(it.store),{id:o}=t;return{image:o?n(parseInt(o,10)):null}})),(0,st.withDispatch)((e=>{const{__unstableMarkNextChangeAsNotPersistent:t}=e(Qe.store);return{__unstableMarkNextChangeAsNotPersistent:t}}))])(hc);function bc(e){let{isHidden:t,...n}=e;return t?(0,Oe.createElement)(We.VisuallyHidden,ot({as:Qe.RichText},n)):(0,Oe.createElement)(Qe.RichText,n)}var _c=e=>{const{attributes:t,isSelected:n,setAttributes:o,selectedImage:r,mediaPlaceholder:a,onMoveBackward:l,onMoveForward:i,onRemoveImage:s,onSelectImage:c,onDeselectImage:u,onSetImageAttributes:m,insertBlocksAfter:d,blockProps:p}=e,{align:g,columns:h=Ts(t),caption:v,imageCrop:b,images:_}=t;return(0,Oe.createElement)("figure",ot({},p,{className:at()(p.className,{[`align${g}`]:g,[`columns-${h}`]:h,"is-cropped":b})}),(0,Oe.createElement)("ul",{className:"blocks-gallery-grid"},_.map(((e,o)=>{const a=(0,Ze.sprintf)((0,Ze.__)("image %1$d of %2$d in gallery"),o+1,_.length);return(0,Oe.createElement)("li",{className:"blocks-gallery-item",key:e.id?`${e.id}-${o}`:e.url},(0,Oe.createElement)(vc,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===o,isLastItem:o+1===_.length,isSelected:n&&r===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":a,sizeSlug:t.sizeSlug}))}))),a,(0,Oe.createElement)(bc,{isHidden:!n&&Qe.RichText.isEmpty(v),tagName:"figcaption",className:at()("blocks-gallery-caption",(0,Qe.__experimentalGetElementClassName)("caption")),"aria-label":(0,Ze.__)("Gallery caption text"),placeholder:(0,Ze.__)("Write gallery caption…"),value:v,onChange:e=>o({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>d((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))};const fc=[{value:gc,label:(0,Ze.__)("Attachment Page")},{value:pc,label:(0,Ze.__)("Media File")},{value:dc,label:(0,Ze.__)("None")}],yc=["image"],kc=Oe.Platform.select({web:(0,Ze.__)("Drag images, upload new ones or select files from your library."),native:(0,Ze.__)("ADD MEDIA")}),xc=Oe.Platform.select({web:{},native:{type:"stepper"}});var wc=(0,St.compose)([We.withNotices,(0,Fs.withViewportMatch)({isNarrow:"< small"})])((function(e){const{attributes:t,clientId:n,isSelected:o,noticeUI:r,noticeOperations:a,onFocus:l}=e,{columns:i=Ts(t),imageCrop:s,images:c,linkTo:u,sizeSlug:m}=t,[d,p]=(0,Oe.useState)(),[g,h]=(0,Oe.useState)(),{__unstableMarkNextChangeAsNotPersistent:v}=(0,st.useDispatch)(Qe.store),{imageSizes:b,mediaUpload:_,getMedia:f,wasBlockJustInserted:y}=(0,st.useSelect)((e=>{const t=e(Qe.store).getSettings();return{imageSizes:t.imageSizes,mediaUpload:t.mediaUpload,getMedia:e(it.store).getMedia,wasBlockJustInserted:e(Qe.store).wasBlockJustInserted(n,"inserter_menu")}})),k=(0,Oe.useMemo)((()=>{var e;return o?(null!==(e=t.ids)&&void 0!==e?e:[]).reduce(((e,t)=>{if(!t)return e;const n=f(t),o=b.reduce(((e,t)=>{const o=(0,Nt.get)(n,["sizes",t.slug,"url"]),r=(0,Nt.get)(n,["media_details","sizes",t.slug,"source_url"]);return{...e,[t.slug]:o||r}}),{});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:t.images.map((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=c.find((e=>{let{id:n}=e;return n===t})),o=n?n.caption:e.caption;if(!g)return o;const r=g.find((e=>{let{id:n}=e;return n===t}));return r&&r.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=>({...ic(e,m),caption:E(e),id:e.id.toString()}))),columns:t.columns?Math.min(e.length,t.columns):t.columns})}(0,Oe.useEffect)((()=>{if("web"===Oe.Platform.OS&&c&&c.length>0&&c.every((e=>{let{url:t}=e;return(0,wt.isBlobURL)(t)}))){const e=c.map((e=>{let{url:t}=e;return(0,wt.getBlobByURL)(t)}));c.forEach((e=>{let{url:t}=e;return(0,wt.revokeBlobURL)(t)})),_({filesList:e,onFileChange:C,allowedTypes:["image"]})}}),[]),(0,Oe.useEffect)((()=>{o||p()}),[o]),(0,Oe.useEffect)((()=>{var e,t,n,o,r,a;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===(r=o.settings)||void 0===r||null===(a=r.defaultProps)||void 0===a?void 0:a.link)||dc}))}),[u]);const S=!!c.length,B=S&&c.some((e=>!!e.id)),T=(0,Oe.createElement)(Qe.MediaPlaceholder,{addToGallery:B,isAppender:S,disableMediaButtons:S&&!o,icon:!S&&Ds,labels:{title:!S&&(0,Ze.__)("Gallery"),instructions:!S&&kc},onSelect:C,accept:"image/*",allowedTypes:yc,multiple:!0,value:B?c:{},onError:function(e){a.removeAllNotices(),a.createErrorNotice(e)},notices:S?void 0:r,onFocus:l,autoOpenMediaUpload:!S&&o&&y}),N=(0,Qe.useBlockProps)();if(!S)return(0,Oe.createElement)(Ue.View,N,T);const P=function(){const e=Object.values(k);return b.filter((t=>{let{slug:n}=t;return e.some((e=>e[n]))})).map((e=>{let{name:t,slug:n}=e;return{value:n,label:t}}))}(),I=S&&!(0,Nt.isEmpty)(P);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},c.length>1&&(0,Oe.createElement)(We.RangeControl,ot({__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Columns"),value:i,onChange:function(e){x({columns:e})},min:1,max:Math.min(8,c.length)},xc,{required:!0})),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Crop images"),checked:!!s,onChange:function(){x({imageCrop:!s})},help:function(e){return e?(0,Ze.__)("Thumbnails are cropped to align."):(0,Ze.__)("Thumbnails are not cropped.")}}),(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Link to"),value:u,onChange:function(e){x({linkTo:e})},options:fc,hideCancelButton:!0}),I&&(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Image size"),value:m,options:P,onChange:function(e){x({images:(null!=c?c:[]).map((t=>{if(!t.id)return t;const n=(0,Nt.get)(k,[parseInt(t.id,10),e]);return{...t,...n&&{url:n}}})),sizeSlug:e})},hideCancelButton:!0}))),r,(0,Oe.createElement)(_c,ot({},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=c.filter(((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()}})))}));var Ec=(0,St.compose)([We.withNotices])((function(e){return Cs()?(0,Oe.createElement)(lc,e):(0,Oe.createElement)(wc,e)}));const Cc=e=>e?e.split(",").map((e=>parseInt(e,10))):[];(0,Jl.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",(function(e){var t;if(Cs()&&"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:r}=t;return(0,Ge.createBlock)("core/image",{url:n,id:o?parseInt(o,10):null,alt:r,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination})}));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e})),(0,Jl.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 Sc={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:n}=e[0];t=e.every((e=>e.align===t))?t:void 0,n=e.every((e=>e.sizeSlug===n))?n:void 0;const o=e.filter((e=>{let{url:t}=e;return t}));if(Cs()){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:r}=e;return{id:t.toString(),url:n,alt:o,caption:r}})),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(!Cs())return Cc(t).map((e=>({id:e.toString()})))}},ids:{type:"array",shortcode:e=>{let{named:{ids:t}}=e;if(!Cs())return Cc(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(!Cs())switch(t){case"post":default:return gc;case"file":return pc}switch(t){case"post":return ws;case"file":return xs;default:return ks}}}},transform(e){let{named:{ids:t,columns:n=3,link:o}}=e;const r=Cc(t).map((e=>parseInt(e,10)));let a=ks;"post"===o?a=ws:"file"===o&&(a=xs);return(0,Ge.createBlock)("core/gallery",{columns:parseInt(n,10),linkTo:a},r.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){return 1!==e.length&&e.every((e=>0===e.type.indexOf("image/")))},transform(e){if(Cs()){const t=e.map((e=>(0,Ge.createBlock)("core/image",{url:(0,wt.createBlobURL)(e)})));return(0,Ge.createBlock)("core/gallery",{},t)}const t=(0,Ge.createBlock)("core/gallery",{images:e.map((e=>Es({url:(0,wt.createBlobURL)(e)})))});return t}}],to:[{type:"block",blocks:["core/image"],transform:(e,t)=>{let{align:n,images:o,ids:r,sizeSlug:a}=e;return Cs()?t.length>0?t.map((e=>{let{attributes:{url:t,alt:o,caption:r,title:a,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:r,title:a,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:r[t],url:o,alt:l,caption:i,align:n,sizeSlug:a})})):(0,Ge.createBlock)("core/image",{align:n})}}]};var Bc=Sc;const Tc={$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:Nc}=Tc,Pc={icon:ys,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:Bc,edit:Ec,save:function(e){let{attributes:t}=e;if(!Cs())return function(e){let{attributes:t}=e;const{images:n,columns:o=Ts(t),imageCrop:r,caption:a,linkTo:l}=t,i=`columns-${o} ${r?"is-cropped":""}`;return(0,Oe.createElement)("figure",Qe.useBlockProps.save({className:i}),(0,Oe.createElement)("ul",{className:"blocks-gallery-grid"},n.map((e=>{let t;switch(l){case pc:t=e.fullUrl||e.url;break;case gc:t=e.link}const n=(0,Oe.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,Oe.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Oe.createElement)("figure",null,t?(0,Oe.createElement)("a",{href:t},n):n,!Qe.RichText.isEmpty(e.caption)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:at()("blocks-gallery-item",(0,Qe.__experimentalGetElementClassName)("caption")),value:e.caption})))}))),!Qe.RichText.isEmpty(a)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:at()("blocks-gallery-caption",(0,Qe.__experimentalGetElementClassName)("caption")),value:a}))}({attributes:t});const{caption:n,columns:o,imageCrop:r}=t,a=at()("has-nested-images",{[`columns-${o}`]:void 0!==o,"columns-default":void 0===o,"is-cropped":r}),l=Qe.useBlockProps.save({className:a}),i=Qe.useInnerBlocksProps.save(l);return(0,Oe.createElement)("figure",i,i.children,!Qe.RichText.isEmpty(n)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",className:at()("blocks-gallery-caption",(0,Qe.__experimentalGetElementClassName)("caption")),value:n}))},deprecated:Vs},Ic=()=>je({name:Nc,metadata:Tc,settings:Pc});var zc=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const Mc=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,...r}=e;return{...r,style:t}},Rc=[{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,Oe.createElement)(t,Qe.useInnerBlocksProps.save(Qe.useBlockProps.save()))},isEligible:e=>{let{layout:t}=e;return!t||t.inherit||t.contentSize&&"constrained"!==t.type},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,Oe.createElement)(n,Qe.useBlockProps.save(),(0,Oe.createElement)("div",{className:"wp-block-group__inner-container"},(0,Oe.createElement)(Qe.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:Mc,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,textColor:r,customTextColor:a}=t,l=(0,Qe.getColorClassName)("background-color",n),i=(0,Qe.getColorClassName)("color",r),s=at()(l,i,{"has-text-color":r||a,"has-background":n||o}),c={backgroundColor:l?void 0:o,color:i?void 0:a};return(0,Oe.createElement)("div",{className:s,style:c},(0,Oe.createElement)("div",{className:"wp-block-group__inner-container"},(0,Oe.createElement)(Qe.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:Mc,supports:{align:["wide","full"],anchor:!0,html:!1},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,textColor:r,customTextColor:a}=t,l=(0,Qe.getColorClassName)("background-color",n),i=(0,Qe.getColorClassName)("color",r),s=at()(l,{"has-text-color":r||a,"has-background":n||o}),c={backgroundColor:l?void 0:o,color:i?void 0:a};return(0,Oe.createElement)("div",{className:s,style:c},(0,Oe.createElement)("div",{className:"wp-block-group__inner-container"},(0,Oe.createElement)(Qe.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:Mc,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o}=t,r=(0,Qe.getColorClassName)("background-color",n),a=at()(r,{"has-background":n||o}),l={backgroundColor:r?void 0:o};return(0,Oe.createElement)("div",{className:a,style:l},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];var Lc=Rc;const Hc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"group";const t={group:(0,Oe.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Oe.createElement)(We.Path,{d:"M42 0H2C.9 0 0 .9 0 2v28c0 1.1.9 2 2 2h40c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2z"})),"group-row":(0,Oe.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Oe.createElement)(We.Path,{d:"M42 0H23.5c-.6 0-1 .4-1 1v30c0 .6.4 1 1 1H42c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zM20.5 0H2C.9 0 0 .9 0 2v28c0 1.1.9 2 2 2h18.5c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1z"})),"group-stack":(0,Oe.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Oe.createElement)(We.Path,{d:"M42 0H2C.9 0 0 .9 0 2v12.5c0 .6.4 1 1 1h42c.6 0 1-.4 1-1V2c0-1.1-.9-2-2-2zm1 16.5H1c-.6 0-1 .4-1 1V30c0 1.1.9 2 2 2h40c1.1 0 2-.9 2-2V17.5c0-.6-.4-1-1-1z"}))};return null==t?void 0:t[e]};var Ac=function(e){let{name:t,onSelect:n}=e;const o=(0,st.useSelect)((e=>e(Ge.store).getBlockVariations(t,"block")),[t]),r=(0,Qe.useBlockProps)({className:"wp-block-group__placeholder"});return(0,Oe.createElement)("div",r,(0,Oe.createElement)(We.Placeholder,{instructions:(0,Ze.__)("Group blocks together. Select a layout:")},(0,Oe.createElement)("ul",{role:"list",className:"wp-block-group-placeholder__variations","aria-label":(0,Ze.__)("Block variations")},o.map((e=>(0,Oe.createElement)("li",{key:e.name},(0,Oe.createElement)(We.Button,{variant:"tertiary",icon:Hc(e.name),iconSize:44,onClick:()=>n(e),className:"wp-block-group-placeholder__variation-button",label:`${e.title}: ${e.description}`})))))))};function Vc(e){let{tagName:t,onSelectTagName:n}=e;const o={header:(0,Ze.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,Ze.__)("The <main> element should be used for the primary content of your document only. "),section:(0,Ze.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,Ze.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,Ze.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),footer:(0,Ze.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).")};return(0,Oe.createElement)(Qe.InspectorControls,{group:"advanced"},(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("HTML element"),options:[{label:(0,Ze.__)("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:t,onChange:n,help:o[t]}))}var Fc=function(e){let{attributes:t,name:n,setAttributes:o,clientId:r,__unstableLayoutClassNames:a}=e;const{hasInnerBlocks:l,themeSupportsLayout:i}=(0,st.useSelect)((e=>{var t;const{getBlock:n,getSettings:o}=e(Qe.store),a=n(r);return{hasInnerBlocks:!(!a||!a.innerBlocks.length),themeSupportsLayout:null===(t=o())||void 0===t?void 0:t.supportsLayout}}),[r]),{tagName:s="div",templateLock:c,layout:u={}}=t,m=(0,Qe.useSetting)("layout")||{},d=null!=u&&u.type?{...m,...u}:{...m,...u,type:"default"},{type:p="default"}=d,g=i||"flex"===p,h=(0,Qe.useBlockProps)({className:g?null:a}),[v,b]=function(e){let{attributes:t={style:void 0,backgroundColor:void 0,textColor:void 0,fontSize:void 0},usedLayoutType:n="",hasInnerBlocks:o=!1}=e;const{style:r,backgroundColor:a,textColor:l,fontSize:i}=t,[s,c]=(0,Oe.useState)(!(o||a||i||l||r||"flex"===n));return(0,Oe.useEffect)((()=>{(o||a||i||l||r||"flex"===n)&&c(!1)}),[a,i,l,r,n,o]),[s,c]}({attributes:t,usedLayoutType:null==d?void 0:d.type,hasInnerBlocks:l}),_=(0,Qe.useInnerBlocksProps)(g?h:{className:"wp-block-group__inner-container"},{templateLock:c,renderAppender:l?void 0:Qe.InnerBlocks.ButtonBlockAppender,__unstableDisableLayoutClassNames:!g}),{selectBlock:f}=(0,st.useDispatch)(Qe.store);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Vc,{tagName:s,onSelectTagName:e=>o({tagName:e})}),v&&(0,Oe.createElement)(Ac,{clientId:r,name:n,onSelect:e=>{o(e.attributes),f(r,-1),b(!1)}}),g&&!v&&(0,Oe.createElement)(s,_),!g&&!v&&(0,Oe.createElement)(s,h,(0,Oe.createElement)("div",_)))};var Dc={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}]};var $c=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var Gc=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const Oc=[{name:"group",title:(0,Ze.__)("Group"),description:(0,Ze.__)("Gather blocks in a container."),attributes:{layout:{type:"constrained"}},isDefault:!0,scope:["block","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:zc},{name:"group-row",title:(0,Ze._x)("Row","single horizontal line"),description:(0,Ze.__)("Arrange blocks horizontally."),attributes:{layout:{type:"flex",flexWrap:"nowrap"}},scope:["block","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:$c},{name:"group-stack",title:(0,Ze.__)("Stack"),description:(0,Ze.__)("Arrange blocks vertically."),attributes:{layout:{type:"flex",orientation:"vertical"}},scope:["block","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:Gc}];var Uc=Oc;const qc={$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}},dimensions:{minHeight:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},position:{sticky:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSizingOnChildren:!0}},editorStyle:"wp-block-group-editor",style:"wp-block-group"},{name:jc}=qc,Wc={icon:zc,example:{attributes:{style:{color:{text:"#000000",background:"#ffffff"}}},innerBlocks:[{name:"core/paragraph",attributes:{customTextColor:"#cf2e2e",fontSize:"large",content:(0,Ze.__)("One.")}},{name:"core/paragraph",attributes:{customTextColor:"#ff6900",fontSize:"large",content:(0,Ze.__)("Two.")}},{name:"core/paragraph",attributes:{customTextColor:"#fcb900",fontSize:"large",content:(0,Ze.__)("Three.")}},{name:"core/paragraph",attributes:{customTextColor:"#00d084",fontSize:"large",content:(0,Ze.__)("Four.")}},{name:"core/paragraph",attributes:{customTextColor:"#0693e3",fontSize:"large",content:(0,Ze.__)("Five.")}},{name:"core/paragraph",attributes:{customTextColor:"#9b51e0",fontSize:"large",content:(0,Ze.__)("Six.")}}]},transforms:Dc,edit:Fc,save:function(e){let{attributes:{tagName:t}}=e;return(0,Oe.createElement)(t,Qe.useInnerBlocksProps.save(Qe.useBlockProps.save()))},deprecated:Lc,variations:Uc},Zc=()=>je({name:jc,metadata:qc,settings:Wc});var Qc=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"}));const Kc={className:!1,anchor:!0},Yc={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},Jc=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}},{customTextColor:n,...o}=e;return{...o,style:t}},Xc=["left","right","center"],eu=e=>{const{align:t,...n}=e;return Xc.includes(t)?{...n,textAlign:t}:e},tu={supports:Kc,attributes:{...Yc,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>Jc(eu(e)),save(e){let{attributes:t}=e;const{align:n,level:o,content:r,textColor:a,customTextColor:l}=t,i="h"+o,s=(0,Qe.getColorClassName)("color",a),c=at()({[s]:s});return(0,Oe.createElement)(Qe.RichText.Content,{className:c||void 0,tagName:i,style:{textAlign:n,color:s?void 0:l},value:r})}},nu={attributes:{...Yc,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>Jc(eu(e)),save(e){let{attributes:t}=e;const{align:n,content:o,customTextColor:r,level:a,textColor:l}=t,i="h"+a,s=(0,Qe.getColorClassName)("color",l),c=at()({[s]:s,[`has-text-align-${n}`]:n});return(0,Oe.createElement)(Qe.RichText.Content,{className:c||void 0,tagName:i,style:{color:s?void 0:r},value:o})},supports:Kc},ou={supports:Kc,attributes:{...Yc,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>Jc(eu(e)),save(e){let{attributes:t}=e;const{align:n,content:o,customTextColor:r,level:a,textColor:l}=t,i="h"+a,s=(0,Qe.getColorClassName)("color",l),c=at()({[s]:s,"has-text-color":l||r,[`has-text-align-${n}`]:n});return(0,Oe.createElement)(Qe.RichText.Content,{className:c||void 0,tagName:i,style:{color:s?void 0:r},value:o})}},ru={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:Yc,isEligible:e=>{let{align:t}=e;return Xc.includes(t)},migrate:eu,save(e){let{attributes:t}=e;const{align:n,content:o,level:r}=t,a="h"+r,l=at()({[`has-text-align-${n}`]:n});return(0,Oe.createElement)(a,Qe.useBlockProps.save({className:l}),(0,Oe.createElement)(Qe.RichText.Content,{value:o}))}},au={supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},save(e){let{attributes:t}=e;const{textAlign:n,content:o,level:r}=t,a="h"+r,l=at()({[`has-text-align-${n}`]:n});return(0,Oe.createElement)(a,Qe.useBlockProps.save({className:l}),(0,Oe.createElement)(Qe.RichText.Content,{value:o}))}};var lu=[au,ru,ou,nu,tu],iu=n(4793),su=n.n(iu);const cu={},uu=e=>su()((e=>{const t=document.createElement("div");return t.innerHTML=e,t.innerText})(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),mu=(e,t)=>{const n=uu(t);if(""===n)return null;delete cu[e];let o=n,r=0;for(;Object.values(cu).includes(o);)r+=1,o=n+"-"+r;return o},du=(e,t)=>{cu[e]=t};var pu=function(e){let{attributes:t,setAttributes:n,mergeBlocks:o,onReplace:r,style:a,clientId:l}=e;const{textAlign:i,content:s,level:c,placeholder:u,anchor:m}=t,d="h"+c,p=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${i}`]:i}),style:a}),{canGenerateAnchors:g}=(0,st.useSelect)((e=>{const{getGlobalBlockCount:t,getSettings:n}=e(Qe.store);return{canGenerateAnchors:!!n().generateAnchors||t("core/table-of-contents")>0}}),[]),{__unstableMarkNextChangeAsNotPersistent:h}=(0,st.useDispatch)(Qe.store);return(0,Oe.useEffect)((()=>{if(g)return!m&&s&&(h(),n({anchor:mu(l,s)})),du(l,m),()=>du(l,null)}),[m,s,l,g]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(xa,{selectedLevel:c,onChange:e=>n({level:e})}),(0,Oe.createElement)(Qe.AlignmentControl,{value:i,onChange:e=>{n({textAlign:e})}})),(0,Oe.createElement)(Qe.RichText,ot({identifier:"content",tagName:d,value:s,onChange:e=>{const t={content:e};!g||m&&e&&mu(l,s)!==m||(t.anchor=mu(l,e)),n(t)},onMerge:o,onSplit:(e,n)=>{let o;var r;n||e?o=(0,Ge.createBlock)("core/heading",{...t,content:e}):o=(0,Ge.createBlock)(null!==(r=(0,Ge.getDefaultBlockName)())&&void 0!==r?r:"core/heading");return n&&(o.clientId=l),o},onReplace:r,onRemove:()=>r([]),"aria-label":(0,Ze.__)("Heading text"),placeholder:u||(0,Ze.__)("Heading"),textAlign:i},Oe.Platform.isNative&&{deleteEnter:!0},p)))};const{name:gu}={$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:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},hu={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)(gu,{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)(gu,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)(gu,t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform(t){return(0,Ge.createBlock)(gu,{level:e,content:t})}}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform(t){return(0,Ge.createBlock)(gu,{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})}))}]};var vu=hu;const bu={$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:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},{name:_u}=bu,fu={icon:Qc,example:{attributes:{content:(0,Ze.__)("Code is Poetry"),level:2}},__experimentalLabel(e,t){let{context:n}=t;const{content:o,level:r}=e;return"list-view"===n&&o?o:"accessibility"===n?o&&0!==o.length?(0,Ze.sprintf)((0,Ze.__)("Level %1$s. %2$s"),r,o):(0,Ze.sprintf)((0,Ze.__)("Level %s. Empty."),r):void 0},transforms:vu,deprecated:lu,merge(e,t){return{content:(e.content||"")+(t.content||"")}},edit:pu,save:function(e){let{attributes:t}=e;const{textAlign:n,content:o,level:r}=t,a="h"+r,l=at()({[`has-text-align-${n}`]:n});return(0,Oe.createElement)(a,Qe.useBlockProps.save({className:l}),(0,Oe.createElement)(Qe.RichText.Content,{value:o}))}},yu=()=>je({name:_u,metadata:bu,settings:fu});var ku=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"}));const xu=e=>e.preventDefault();const wu={$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:Eu}=wu,Cu={icon:ku,edit:function(e){var t,n,o,r;let{attributes:a,setAttributes:l,context:i}=e;const{homeUrl:s}=(0,st.useSelect)((e=>{var t;const{getUnstableBase:n}=e(it.store);return{homeUrl:null===(t=n())||void 0===t?void 0:t.home}}),[]),{__unstableMarkNextChangeAsNotPersistent:c}=(0,st.useDispatch)(Qe.store),{textColor:u,backgroundColor:m,style:d}=i,p=(0,Qe.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===(r=d.color)||void 0===r?void 0:r.background}}),{label:g}=a;return(0,Oe.useEffect)((()=>{void 0===g&&(c(),l({label:(0,Ze.__)("Home")}))}),[g]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("div",p,(0,Oe.createElement)("a",{className:"wp-block-home-link__content wp-block-navigation-item__content",href:s,onClick:xu},(0,Oe.createElement)(Qe.RichText,{identifier:"label",className:"wp-block-home-link__label",value:g,onChange:e=>{l({label:e})},"aria-label":(0,Ze.__)("Home link text"),placeholder:(0,Ze.__)("Add home link"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))))},save:function(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)},example:{attributes:{label:(0,Ze._x)("Home Link","block example")}}},Su=()=>je({name:Eu,metadata:wu,settings:Cu});var Bu=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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 Tu(e){let{content:t,isSelected:n}=e;const o=(0,st.useSelect)((e=>{var t;return null===(t=e(Qe.store).getSettings())||void 0===t?void 0:t.styles}),[]),r=(0,Oe.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,Qe.transformStyles)(o)]),[o]);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.SandBox,{html:t,styles:r}),!n&&(0,Oe.createElement)("div",{className:"block-library-html__preview-overlay"}))}var Nu={from:[{type:"block",blocks:["core/code"],transform:e=>{let{content:t}=e;return(0,Ge.createBlock)("core/html",{content:t})}}]};const Pu={$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:"raw"}},supports:{customClassName:!1,className:!1,html:!1},editorStyle:"wp-block-html-editor"},{name:Iu}=Pu,zu={icon:Bu,example:{attributes:{content:"<marquee>"+(0,Ze.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},edit:function(e){let{attributes:t,setAttributes:n,isSelected:o}=e;const[r,a]=(0,Oe.useState)(),l=(0,Oe.useContext)(We.Disabled.Context);return(0,Oe.createElement)("div",(0,Qe.useBlockProps)({className:"block-library-html__edit"}),(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,(0,Oe.createElement)(We.ToolbarButton,{className:"components-tab-button",isPressed:!r,onClick:function(){a(!1)}},"HTML"),(0,Oe.createElement)(We.ToolbarButton,{className:"components-tab-button",isPressed:r,onClick:function(){a(!0)}},(0,Ze.__)("Preview")))),r||l?(0,Oe.createElement)(Tu,{content:t.content,isSelected:o}):(0,Oe.createElement)(Qe.PlainText,{value:t.content,onChange:e=>n({content:e}),placeholder:(0,Ze.__)("Write HTML…"),"aria-label":(0,Ze.__)("HTML")}))},save:function(e){let{attributes:t}=e;return(0,Oe.createElement)(Oe.RawHTML,null,t.content)},transforms:Nu},Mu=()=>je({name:Iu,metadata:Pu,settings:zu}),Ru={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"}},Lu={anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0,__experimentalDefaultControls:{radius:!0}}},Hu=[{attributes:Ru,supports:Lu,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:r,align:a,href:l,rel:i,linkClass:s,width:c,height:u,id:m,linkTarget:d,sizeSlug:p,title:g}=t,h=(0,Nt.isEmpty)(i)?void 0:i,v=at()({[`align${a}`]:a,[`size-${p}`]:p,"is-resized":c||u}),b=(0,Oe.createElement)("img",{src:n,alt:o,className:m?`wp-image-${m}`:null,width:c,height:u,title:g}),_=(0,Oe.createElement)(Oe.Fragment,null,l?(0,Oe.createElement)("a",{className:s,href:l,target:d,rel:h},b):b,!Qe.RichText.isEmpty(r)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:r}));return(0,Oe.createElement)("figure",Qe.useBlockProps.save({className:v}),_)}},{attributes:{...Ru,title:{type:"string",source:"attribute",selector:"img",attribute:"title"},sizeSlug:{type:"string"}},supports:Lu,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:r,align:a,href:l,rel:i,linkClass:s,width:c,height:u,id:m,linkTarget:d,sizeSlug:p,title:g}=t,h=(0,Nt.isEmpty)(i)?void 0:i,v=at()({[`align${a}`]:a,[`size-${p}`]:p,"is-resized":c||u}),b=(0,Oe.createElement)("img",{src:n,alt:o,className:m?`wp-image-${m}`:null,width:c,height:u,title:g}),_=(0,Oe.createElement)(Oe.Fragment,null,l?(0,Oe.createElement)("a",{className:s,href:l,target:d,rel:h},b):b,!Qe.RichText.isEmpty(r)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:r}));return"left"===a||"right"===a||"center"===a?(0,Oe.createElement)("div",Qe.useBlockProps.save(),(0,Oe.createElement)("figure",{className:v},_)):(0,Oe.createElement)("figure",Qe.useBlockProps.save({className:v}),_)}},{attributes:Ru,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:r,align:a,href:l,width:i,height:s,id:c}=t,u=at()({[`align${a}`]:a,"is-resized":i||s}),m=(0,Oe.createElement)("img",{src:n,alt:o,className:c?`wp-image-${c}`:null,width:i,height:s});return(0,Oe.createElement)("figure",{className:u},l?(0,Oe.createElement)("a",{href:l},m):m,!Qe.RichText.isEmpty(r)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:r}))}},{attributes:Ru,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:r,align:a,href:l,width:i,height:s,id:c}=t,u=(0,Oe.createElement)("img",{src:n,alt:o,className:c?`wp-image-${c}`:null,width:i,height:s});return(0,Oe.createElement)("figure",{className:a?`align${a}`:null},l?(0,Oe.createElement)("a",{href:l},u):u,!Qe.RichText.isEmpty(r)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:r}))}},{attributes:Ru,save(e){let{attributes:t}=e;const{url:n,alt:o,caption:r,align:a,href:l,width:i,height:s}=t,c=i||s?{width:i,height:s}:{},u=(0,Oe.createElement)("img",ot({src:n,alt:o},c));let m={};return i?m={width:i}:"left"!==a&&"right"!==a||(m={maxWidth:"50%"}),(0,Oe.createElement)("figure",{className:a?`align${a}`:null,style:m},l?(0,Oe.createElement)("a",{href:l},u):u,!Qe.RichText.isEmpty(r)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:r}))}}];var Au=Hu;var Vu=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var Fu=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var Du=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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 $u(e,t){const[n,o]=(0,Oe.useState)();function r(){var t;o(null===(t=e.current)||void 0===t?void 0:t.clientWidth)}return(0,Oe.useEffect)(r,t),(0,Oe.useEffect)((()=>{const{defaultView:t}=e.current.ownerDocument;return t.addEventListener("resize",r),()=>{t.removeEventListener("resize",r)}}),[]),n}function Gu(e){var t,n;let{temporaryURL:o,attributes:r,setAttributes:a,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:f,id:y,href:k,rel:x,linkClass:w,linkDestination:E,title:C,width:S,height:B,linkTarget:T,sizeSlug:N}=r,P=(0,Oe.useRef)(),I=(0,St.usePrevious)(_),[z,M]=(0,Oe.useState)(!!_),{allowResize:R=!0}=p,{getBlock:L}=(0,st.useSelect)(Qe.store),{image:H,multiImageSelection:A}=(0,st.useSelect)((e=>{const{getMedia:t}=e(it.store),{getMultiSelectedBlockClientIds:n,getBlockName:o}=e(Qe.store),r=n();return{image:y&&l?t(y,{context:"view"}):null,multiImageSelection:r.length&&r.every((e=>"core/image"===o(e)))}}),[y,l,g]),{canInsertCover:V,imageEditing:F,imageSizes:D,maxWidth:$,mediaUpload:G}=(0,st.useSelect)((e=>{const{getBlockRootClientId:t,getSettings:n,canInsertBlockType:o}=e(Qe.store),r=t(g);return{...Object.fromEntries(Object.entries(n()).filter((e=>{let[t]=e;return["imageEditing","imageSizes","maxWidth","mediaUpload"].includes(t)}))),canInsertCover:o("core/cover",r)}}),[g]),{replaceBlocks:O,toggleSelection:U}=(0,st.useDispatch)(Qe.store),{createErrorNotice:q,createSuccessNotice:j}=(0,st.useDispatch)(Ct.store),W=(0,St.useViewportMatch)("medium"),Z=["wide","full"].includes(f),[{loadedNaturalWidth:Q,loadedNaturalHeight:K},Y]=(0,Oe.useState)({}),[J,X]=(0,Oe.useState)(!1),[ee,te]=(0,Oe.useState)(),ne=$u(d,[f]),oe=R&&!h&&!(Z&&W),re=D.filter((e=>{let{slug:t}=e;return(0,Nt.get)(H,["media_details","sizes",t,"source_url"])})).map((e=>{let{name:t,slug:n}=e;return{value:n,label:t}}));(0,Oe.useEffect)((()=>{Uu(y,v)&&l&&!ee&&window.fetch(v).then((e=>e.blob())).then((e=>te(e))).catch((()=>{}))}),[y,v,l,ee]),(0,Oe.useEffect)((()=>{_&&!I&&M(!0)}),[_,I]);const ae=(0,Oe.useCallback)((e=>{e&&!_&&e.focus()}),[_]),{naturalWidth:le,naturalHeight:ie}=(0,Oe.useMemo)((()=>{var e,t;return{naturalWidth:(null===(e=P.current)||void 0===e?void 0:e.naturalWidth)||Q||void 0,naturalHeight:(null===(t=P.current)||void 0===t?void 0:t.naturalHeight)||K||void 0}}),[Q,K,null===(t=P.current)||void 0===t?void 0:t.complete]);(0,Oe.useEffect)((()=>{l||(X(!1),_||M(!1))}),[l,_]);const se=y&&le&&ie&&F,ce=!A&&se&&!J;const ue=(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},!h&&(0,Oe.createElement)(Qe.BlockAlignmentControl,{value:f,onChange:function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};a({...t,align:e})}}),!h&&(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>{M(!z),z&&_&&a({caption:void 0})},icon:Et,isPressed:z,label:z?(0,Ze.__)("Remove caption"):(0,Ze.__)("Add caption")}),!A&&!J&&(0,Oe.createElement)(Qe.__experimentalImageURLInputUI,{url:k||"",onChangeUrl:function(e){a(e)},linkDestination:E,mediaUrl:H&&H.source_url||v,mediaLink:H&&H.link,linkTarget:T,linkClass:w,rel:x}),ce&&(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>X(!0),icon:Vu,label:(0,Ze.__)("Crop")}),ee&&(0,Oe.createElement)(We.ToolbarButton,{onClick:function(){G({filesList:[ee],onFileChange(e){let[t]=e;c(t),(0,wt.isBlobURL)(t.url)||(te(),j((0,Ze.__)("Image uploaded."),{type:"snackbar"}))},allowedTypes:Ws,onError(e){q(e,{type:"snackbar"})}})},icon:Fu,label:(0,Ze.__)("Upload external image")}),!A&&V&&(0,Oe.createElement)(We.ToolbarButton,{icon:Du,label:(0,Ze.__)("Add text over image"),onClick:function(){O(g,(0,Ge.switchToBlockType)(L(g),"core/cover"))}})),!A&&!J&&(0,Oe.createElement)(Qe.BlockControls,{group:"other"},(0,Oe.createElement)(Qe.MediaReplaceFlow,{mediaId:y,mediaURL:v,allowedTypes:Ws,accept:"image/*",onSelect:c,onSelectURL:u,onError:m})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},!A&&(0,Oe.createElement)(We.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Alt text (alternative text)"),value:b,onChange:function(e){a({alt:e})},help:(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,Ze.__)("Describe the purpose of the image")),(0,Ze.__)("Leave empty if the image is purely decorative."))}),(0,Oe.createElement)(Qe.__experimentalImageSizeControl,{onChangeImage:function(e){const t=(0,Nt.get)(H,["media_details","sizes",e,"source_url"]);if(!t)return null;a({url:t,width:void 0,height:void 0,sizeSlug:e})},onChange:e=>a(e),slug:N,width:S,height:B,imageSizeOptions:re,isResizable:oe,imageWidth:le,imageHeight:ie}))),(0,Oe.createElement)(Qe.InspectorControls,{group:"advanced"},(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Title attribute"),value:C||"",onChange:function(e){a({title:e})},help:(0,Oe.createElement)(Oe.Fragment,null,(0,Ze.__)("Describe the role of this image on the page."),(0,Oe.createElement)(We.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},(0,Ze.__)("(Note: many devices and browsers do not display this text.)")))}))),me=(0,lt.getFilename)(v);let de;de=b||(me?(0,Ze.sprintf)((0,Ze.__)("This image has an empty alt attribute; its file name is %s"),me):(0,Ze.__)("This image has an empty alt attribute"));const pe=(0,Qe.__experimentalUseBorderProps)(r),ge=null===(n=r.className)||void 0===n?void 0:n.includes("is-style-rounded"),he=!!pe.className||!(0,Nt.isEmpty)(pe.style);let ve,be,_e=(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("img",{src:o||v,alt:de,onError:()=>function(){const e=At({attributes:{url:v}});void 0!==e&&s(e)}(),onLoad:e=>{var t,n;Y({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:pe.className,style:pe.style}),o&&(0,Oe.createElement)(We.Spinner,null));if(ne&&le&&ie){const e=le>ne,t=ie/le;ve=e?ne:le,be=e?ne*t:ie}if(se&&J)_e=(0,Oe.createElement)(Qe.__experimentalImageEditor,{id:y,url:v,width:S,height:B,clientWidth:ne,naturalHeight:ie,naturalWidth:le,onSaveImage:e=>a(e),onFinishEditing:()=>{X(!1)},borderProps:ge?void 0:pe});else if(oe&&ve){const e=S||ve,t=B||be,n=le/ie,o=le<ie?$s:$s*n,r=ie<le?$s:$s/n,i=2.5*$;let s=!1,c=!1;"center"===f?(s=!0,c=!0):(0,Ze.isRTL)()?"left"===f?s=!0:c=!0:"right"===f?c=!0:s=!0,_e=(0,Oe.createElement)(We.ResizableBox,{size:{width:null!=S?S:"auto",height:B&&!he?B:"auto"},showHandle:l,minWidth:o,maxWidth:i,minHeight:r,maxHeight:i/n,lockAspectRatio:!0,enable:{top:!1,right:s,bottom:!0,left:c},onResizeStart:function(){U(!1)},onResizeStop:(n,o,r,l)=>{U(!0),a({width:parseInt(e+l.width,10),height:parseInt(t+l.height,10)})},resizeRatio:"center"===f?2:1},_e)}else _e=(0,Oe.createElement)("div",{style:{width:S,height:B}},_e);return(0,Oe.createElement)(Oe.Fragment,null,!o&&ue,_e,z&&(!Qe.RichText.isEmpty(_)||l)&&(0,Oe.createElement)(Qe.RichText,{identifier:"caption",className:(0,Qe.__experimentalGetElementClassName)("caption"),ref:ae,tagName:"figcaption","aria-label":(0,Ze.__)("Image caption text"),placeholder:(0,Ze.__)("Add caption"),value:_,onChange:e=>a({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>i((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))}const Ou=e=>(0,Oe.createElement)(We.Placeholder,{className:"block-editor-media-placeholder",withIllustration:!0,icon:sc,label:(0,Ze.__)("Image"),instructions:(0,Ze.__)("Upload an image file, pick one from your media library, or add one with a URL.")},e),Uu=(e,t)=>t&&!e&&!(0,wt.isBlobURL)(t);var qu=function(e){let{attributes:t,setAttributes:n,isSelected:o,className:r,insertBlocksAfter:a,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,Oe.useState)(),f=(0,Oe.useRef)();(0,Oe.useEffect)((()=>{f.current=u}),[u]);const y=(0,Oe.useRef)();(0,Oe.useEffect)((()=>{y.current=m}),[m]);const k=(0,Oe.useRef)(),{imageDefaultSize:x,mediaUpload:w,isContentLocked:E}=(0,st.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n}=e(Qe.store),o=t();return{imageDefaultSize:o.imageDefaultSize,mediaUpload:o.mediaUpload,isContentLocked:!!n(s)}}),[]),{createErrorNotice:C}=(0,st.useDispatch)(Ct.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,r,a,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,wt.isBlobURL)(e.url))return void _(e.url);_();let u,m=((e,t)=>{const n=Object.fromEntries(Object.entries(null!=e?e:{}).filter((e=>{let[t]=e;return["alt","id","link","caption"].includes(t)})));return n.url=(0,Nt.get)(e,["sizes",t,"url"])||(0,Nt.get)(e,["media_details","sizes",t,"source_url"])||e.url,n})(e,x);if(y.current&&!(0,Nt.get)(m,["caption"])){const{caption:e,...t}=m;m=t}var d,g,h,v,b,f,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===(f=d.media_details)||void 0===f||null===(k=f.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===(r=o.wp)||void 0===r||null===(a=r.media)||void 0===a||null===(l=a.view)||void 0===l||null===(i=l.settings)||void 0===i||null===(s=i.defaultProps)||void 0===s?void 0:s.link)||Gs){case"file":case Os:E=Os;break;case"post":case Us:E=Us;break;case qs:E=qs;break;case Gs:E=Gs}switch(E){case Os:w=e.url;break;case Us: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,wt.isBlobURL)(t))(p,c);(0,Oe.useEffect)((()=>{if(!N)return;const e=(0,wt.getBlobByURL)(c);e&&w({filesList:[e],onFileChange:e=>{let[t]=e;B(t)},allowedTypes:Ws,onError:e=>{N=!1,S(e)}})}),[]),(0,Oe.useEffect)((()=>{N?_(c):(0,wt.revokeBlobURL)(b)}),[N,c]);const P=Uu(p,c)?c:void 0,I=!!c&&(0,Oe.createElement)("img",{alt:(0,Ze.__)("Edit image"),title:(0,Ze.__)("Edit image"),className:"edit-image-preview",src:c}),z=(0,Qe.__experimentalUseBorderProps)(t),M=at()(r,{"is-transient":b,"is-resized":!!g||!!h,[`size-${v}`]:v,"has-custom-border":!!z.className||!(0,Nt.isEmpty)(z.style)}),R=(0,Qe.useBlockProps)({ref:k,className:M});return(0,Oe.createElement)("figure",R,(b||c)&&(0,Oe.createElement)(Gu,{temporaryURL:b,attributes:t,setAttributes:n,isSelected:o,insertBlocksAfter:a,onReplace:l,onSelectImage:B,onSelectURL:T,onUploadError:S,containerRef:k,context:i,clientId:s,isContentLocked:E}),!c&&!E&&(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.BlockAlignmentControl,{value:d,onChange:function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};n({...t,align:e})}})),(0,Oe.createElement)(Qe.MediaPlaceholder,{icon:(0,Oe.createElement)(Qe.BlockIcon,{icon:sc}),onSelect:B,onSelectURL:T,onError:S,placeholder:Ou,accept:"image/*",allowedTypes:Ws,value:{id:p,src:P},mediaPreview:I,disableMediaButtons:b||c}))};function ju(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 Wu={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},Zu={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:e=>{let{phrasingContentSchema:t}=e;return{figure:{require:["img"],children:{...Wu,a:{attributes:["href","rel","target"],children:Wu},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,r=n?n[1]:void 0,a=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),l=a?Number(a[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:r,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,st.dispatch)(Ct.store);e((0,Ze.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-transform-invalid-file",type:"snackbar"})}return e.every((e=>0===e.type.indexOf("image/")))},transform(e){const t=e.map((e=>(0,Ge.createBlock)("core/image",{url:(0,wt.createBlobURL)(e)})));return t}},{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 r=o.querySelector("img");for(;r&&r.parentNode&&r.parentNode!==o;)r=r.parentNode;return r&&r.parentNode.removeChild(r),o.innerHTML.trim()}},href:{shortcode:(e,t)=>{let{shortcode:n}=t;return ju(n.content,"href")}},rel:{shortcode:(e,t)=>{let{shortcode:n}=t;return ju(n.content,"rel")}},linkClass:{shortcode:(e,t)=>{let{shortcode:n}=t;return ju(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","")}}}}]};var Qu=Zu;const Ku={$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:Yu}=Ku,Ju={icon:sc,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:(0,Ze.__)("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,Ze.__)("Empty")}},getEditWrapperProps(e){return{"data-align":e.align}},transforms:Qu,edit:qu,save:function(e){let{attributes:t}=e;const{url:n,alt:o,caption:r,align:a,href:l,rel:i,linkClass:s,width:c,height:u,id:m,linkTarget:d,sizeSlug:p,title:g}=t,h=(0,Nt.isEmpty)(i)?void 0:i,v=(0,Qe.__experimentalGetBorderClassesAndStyles)(t),b=at()({[`align${a}`]:a,[`size-${p}`]:p,"is-resized":c||u,"has-custom-border":!!v.className||!(0,Nt.isEmpty)(v.style)}),_=at()(v.className,{[`wp-image-${m}`]:!!m}),f=(0,Oe.createElement)("img",{src:n,alt:o,className:_||void 0,style:v.style,width:c,height:u,title:g}),y=(0,Oe.createElement)(Oe.Fragment,null,l?(0,Oe.createElement)("a",{className:s,href:l,target:d,rel:h},f):f,!Qe.RichText.isEmpty(r)&&(0,Oe.createElement)(Qe.RichText.Content,{className:(0,Qe.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:r}));return(0,Oe.createElement)("figure",Qe.useBlockProps.save({className:b}),y)},deprecated:Au},Xu=()=>je({name:Yu,metadata:Ku,settings:Ju});var em=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const tm={$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,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-latest-comments-editor",style:"wp-block-latest-comments"},{name:nm}=tm,om={icon:em,example:{},edit:function(e){let{attributes:t,setAttributes:n}=e;const{commentsToShow:o,displayAvatar:r,displayDate:a,displayExcerpt:l}=t;return(0,Oe.createElement)("div",(0,Qe.useBlockProps)(),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display avatar"),checked:r,onChange:()=>n({displayAvatar:!r})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display date"),checked:a,onChange:()=>n({displayDate:!a})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display excerpt"),checked:l,onChange:()=>n({displayExcerpt:!l})}),(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Number of comments"),value:o,onChange:e=>n({commentsToShow:e}),min:1,max:100,required:!0}))),(0,Oe.createElement)(We.Disabled,null,(0,Oe.createElement)(Ye(),{block:"core/latest-comments",attributes:t,skipBlockSupportAttributes:!0,urlQueryArgs:{_locale:"site"}})))}},rm=()=>je({name:nm,metadata:tm,settings:om});var am=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const{attributes:lm}={$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,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-latest-posts-editor",style:"wp-block-latest-posts"};var im=[{attributes:{...lm,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}];var sm=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));var cm=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const um={per_page:-1,context:"view"},mm={per_page:-1,has_published_posts:["post"],context:"view"};const dm={$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,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-latest-posts-editor",style:"wp-block-latest-posts"},{name:pm}=dm,gm={icon:am,example:{},edit:function e(t){var n;let{attributes:o,setAttributes:r}=t;const a=(0,St.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:f,featuredImageSizeSlug:y,featuredImageSizeWidth:k,featuredImageSizeHeight:x,addLinkToFeaturedImage:w}=o,{imageSizes:E,latestPosts:C,defaultImageWidth:S,defaultImageHeight:B,categoriesList:T,authorList:N}=(0,st.useSelect)((e=>{const{getEntityRecords:t,getUsers:n}=e(it.store),o=e(Qe.store).getSettings(),r=c&&c.length>0?c.map((e=>e.id)):[],a=Object.fromEntries(Object.entries({categories:r,author:u,order:i,orderby:s,per_page:l,_embed:"wp:featuredmedia"}).filter((e=>{let[,t]=e;return void 0!==t})));return{defaultImageWidth:(0,Nt.get)(o.imageDimensions,[y,"width"],0),defaultImageHeight:(0,Nt.get)(o.imageDimensions,[y,"height"],0),imageSizes:o.imageSizes,latestPosts:t("postType","post",a),categoriesList:t("taxonomy","category",um),authorList:n(mm)}}),[y,l,i,s,c,u]),{createWarningNotice:P,removeNotice:I}=(0,st.useDispatch)(Ct.store);let z;const M=e=>{e.preventDefault(),I(z),z=`block-library/core/latest-posts/redirection-prevented/${a}`,P((0,Ze.__)("Links are disabled in the editor."),{id:z,type:"snackbar"})},R=E.filter((e=>{let{slug:t}=e;return"full"!==t})).map((e=>{let{name:t,slug:n}=e;return{value:n,label:t}})),L=null!==(n=null==T?void 0:T.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{},H=!(null==C||!C.length),A=(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Post content settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Post content"),checked:p,onChange:e=>r({displayPostContent:e})}),p&&(0,Oe.createElement)(We.RadioControl,{label:(0,Ze.__)("Show:"),selected:d,options:[{label:(0,Ze.__)("Excerpt"),value:"excerpt"},{label:(0,Ze.__)("Full post"),value:"full_post"}],onChange:e=>r({displayPostContentRadio:e})}),p&&"excerpt"===d&&(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Max number of words in excerpt"),value:_,onChange:e=>r({excerptLength:e}),min:10,max:100})),(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Post meta settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display author name"),checked:h,onChange:e=>r({displayAuthor:e})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display post date"),checked:g,onChange:e=>r({displayPostDate:e})})),(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Featured image settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display featured image"),checked:m,onChange:e=>r({displayFeaturedImage:e})}),m&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.__experimentalImageSizeControl,{onChange:e=>{const t={};e.hasOwnProperty("width")&&(t.featuredImageSizeWidth=e.width),e.hasOwnProperty("height")&&(t.featuredImageSizeHeight=e.height),r(t)},slug:y,width:k,height:x,imageWidth:S,imageHeight:B,imageSizeOptions:R,onChangeImage:e=>r({featuredImageSizeSlug:e,featuredImageSizeWidth:void 0,featuredImageSizeHeight:void 0})}),(0,Oe.createElement)(We.BaseControl,{className:"editor-latest-posts-image-alignment-control"},(0,Oe.createElement)(We.BaseControl.VisualLabel,null,(0,Ze.__)("Image alignment")),(0,Oe.createElement)(Qe.BlockAlignmentToolbar,{value:f,onChange:e=>r({featuredImageAlign:e}),controls:["left","center","right"],isCollapsed:!1})),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Add link to featured image"),checked:w,onChange:e=>r({addLinkToFeaturedImage:e})}))),(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Sorting and filtering")},(0,Oe.createElement)(We.QueryControls,{order:i,orderBy:s,numberOfItems:l,onOrderChange:e=>r({order:e}),onOrderByChange:e=>r({orderBy:e}),onNumberOfItemsChange:e=>r({postsToShow:e}),categorySuggestions:L,onCategoryChange:e=>{if(e.some((e=>"string"==typeof e&&!L[e])))return;const t=e.map((e=>"string"==typeof e?L[e]:e));if(t.includes(null))return!1;r({categories:t})},selectedCategories:c,onAuthorChange:e=>r({selectedAuthor:""!==e?Number(e):void 0}),authorList:null!=N?N:[],selectedAuthorId:u}),"grid"===v&&(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Columns"),value:b,onChange:e=>r({columns:e}),min:2,max:H?Math.min(6,C.length):6,required:!0}))),V=(0,Qe.useBlockProps)({className:at()({"wp-block-latest-posts__list":!0,"is-grid":"grid"===v,"has-dates":g,"has-author":h,[`columns-${b}`]:"grid"===v})});if(!H)return(0,Oe.createElement)("div",V,A,(0,Oe.createElement)(We.Placeholder,{icon:On,label:(0,Ze.__)("Latest Posts")},Array.isArray(C)?(0,Ze.__)("No posts found."):(0,Oe.createElement)(We.Spinner,null)));const F=C.length>l?C.slice(0,l):C,D=[{icon:sm,title:(0,Ze.__)("List view"),onClick:()=>r({postLayout:"list"}),isActive:"list"===v},{icon:cm,title:(0,Ze.__)("Grid view"),onClick:()=>r({postLayout:"grid"}),isActive:"grid"===v}],$=(0,vr.getSettings)().formats.date;return(0,Oe.createElement)("div",null,A,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,{controls:D})),(0,Oe.createElement)("ul",V,F.map((e=>{const t=e.title.rendered.trim();let n=e.excerpt.rendered;const o=null==N?void 0:N.find((t=>t.id===e.author)),r=document.createElement("div");r.innerHTML=n,n=r.textContent||r.innerText||"";const{url:a,alt:l}=function(e,t){var n,o,r,a;const l=(0,Nt.get)(e,["_embedded","wp:featuredmedia","0"]);return{url:null!==(n=null==l||null===(o=l.media_details)||void 0===o||null===(r=o.sizes)||void 0===r||null===(a=r[t])||void 0===a?void 0:a.source_url)&&void 0!==n?n:null==l?void 0:l.source_url,alt:null==l?void 0:l.alt_text}}(e,y),i=at()({"wp-block-latest-posts__featured-image":!0,[`align${f}`]:!!f}),s=m&&a,c=s&&(0,Oe.createElement)("img",{src:a,alt:l,style:{maxWidth:k,maxHeight:x}}),u=_<n.trim().split(" ").length&&""===e.excerpt.raw?(0,Oe.createElement)(Oe.Fragment,null,n.trim().split(" ",_).join(" "),(0,Ze.__)(" … "),(0,Oe.createElement)("a",{href:e.link,rel:"noopener noreferrer",onClick:M},(0,Ze.__)("Read more"))):n;return(0,Oe.createElement)("li",{key:e.id},s&&(0,Oe.createElement)("div",{className:i},w?(0,Oe.createElement)("a",{className:"wp-block-latest-posts__post-title",href:e.link,rel:"noreferrer noopener",onClick:M},c):c),(0,Oe.createElement)("a",{href:e.link,rel:"noreferrer noopener",dangerouslySetInnerHTML:t?{__html:t}:void 0,onClick:M},t?null:(0,Ze.__)("(no title)")),h&&o&&(0,Oe.createElement)("div",{className:"wp-block-latest-posts__post-author"},(0,Ze.sprintf)((0,Ze.__)("by %s"),o.name)),g&&e.date_gmt&&(0,Oe.createElement)("time",{dateTime:(0,vr.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date"},(0,vr.dateI18n)($,e.date_gmt)),p&&"excerpt"===d&&(0,Oe.createElement)("div",{className:"wp-block-latest-posts__post-excerpt"},u),p&&"full_post"===d&&(0,Oe.createElement)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}}))}))))},deprecated:im},hm=()=>je({name:pm,metadata:dm,settings:gm});function vm(e){const{values:t,start:n,reversed:o,ordered:r,type:a,...l}=e,i=document.createElement(r?"ol":"ul");i.innerHTML=t,n&&i.setAttribute("start",n),o&&i.setAttribute("reversed",!0),a&&i.setAttribute("type",a);const[s]=(0,Ge.rawHandler)({HTML:i.outerHTML});return[{...l,...s.attributes},s.innerBlocks]}const bm={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:r,reversed:a,start:l}=t,i=n?"ol":"ul";return(0,Oe.createElement)(i,Qe.useBlockProps.save({type:r,reversed:a,start:l}),(0,Oe.createElement)(Qe.RichText.Content,{value:o,multiline:"li"}))},migrate:Xt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},_m={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:r,reversed:a,start:l}=t,i=n?"ol":"ul";return(0,Oe.createElement)(i,Qe.useBlockProps.save({type:r,reversed:a,start:l}),(0,Oe.createElement)(Qe.RichText.Content,{value:o,multiline:"li"}))},migrate:vm};var fm=[_m,bm];var ym=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var km=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var xm=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var wm=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var Em=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var Cm=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"})),Sm=window.wp.deprecated,Bm=n.n(Sm);var Tm=e=>{let{setAttributes:t,reversed:n,start:o}=e;return(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Ordered list settings")},(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("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,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Reverse list numbering"),checked:n||!1,onChange:e=>{t({reversed:e||void 0})}})))};var Nm=(0,Oe.forwardRef)((function(e,t){const{ordered:n,...o}=e,r=n?"ol":"ul";return(0,Oe.createElement)(r,ot({ref:t},o))}));const Pm=[["core/list-item"]];function Im(e){let{clientId:t}=e;const[n,o]=function(e){const{canOutdent:t}=(0,st.useSelect)((t=>{const{getBlockRootClientId:n,getBlock:o}=t(Qe.store),r=n(e);return{canOutdent:!!r&&"core/list-item"===o(r).name}}),[e]),{replaceBlocks:n,selectionChange:o}=(0,st.useDispatch)(Qe.store),{getBlockRootClientId:r,getBlockAttributes:a,getBlock:l}=(0,st.useSelect)(Qe.store);return[t,(0,Oe.useCallback)((()=>{const t=r(e),i=a(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,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.ToolbarButton,{icon:(0,Ze.isRTL)()?ym:km,title:(0,Ze.__)("Outdent"),describedBy:(0,Ze.__)("Outdent list item"),disabled:!n,onClick:o}))}function zm(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 Mm(e){return e.flatMap((e=>{let{name:t,attributes:n,innerBlocks:o=[]}=e;return"core/list-item"===t?[n.content,...Mm(o)]:Mm(o)}))}const Rm={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,wn.create)({html:e[0].content});t=(0,wn.split)(n,"\n").map((e=>(0,Ge.createBlock)("core/list-item",{content:(0,wn.toHTMLString)({value:e})})))}return(0,Ge.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:zm(e).ol,ul:zm(e).ul}),transform:function e(t){var n;const o={ordered:"OL"===t.tagName,anchor:""===t.id?void 0:t.id,start:t.getAttribute("start")?parseInt(t.getAttribute("start"),10):void 0,reversed:!!t.hasAttribute("reversed")||void 0,type:null!==(n=t.getAttribute("type"))&&void 0!==n?n:void 0},r=Array.from(t.children).map((t=>{const n=Array.from(t.childNodes).filter((e=>e.nodeType!==e.TEXT_NODE||0!==e.textContent.trim().length));n.reverse();const[o,...r]=n;if(!("UL"===(null==o?void 0:o.tagName)||"OL"===(null==o?void 0:o.tagName)))return(0,Ge.createBlock)("core/list-item",{content:t.innerHTML});const a=r.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));a.reverse();const l={content:a.join("").trim()},i=[e(o)];return(0,Ge.createBlock)("core/list-item",l,i)}));return(0,Ge.createBlock)("core/list",o,r)}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform(e){return(0,Ge.createBlock)("core/list",{},[(0,Ge.createBlock)("core/list-item",{content:e})])}}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform(e){return(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)=>Mm(n).map((t=>(0,Ge.createBlock)(e,{content:t})))})))]};var Lm=Rm;const 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"},{name:Am}=Hm,Vm={icon:sm,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,Ze.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,Ze.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,Ze.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,Ze.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,Ze.__)("The Queen of Hearts.")}}]},transforms:Lm,edit:function(e){let{attributes:t,setAttributes:n,clientId:o,style:r}=e;const a=(0,Qe.useBlockProps)({...Oe.Platform.isNative&&{style:r}}),l=(0,Qe.useInnerBlocksProps)(a,{allowedBlocks:["core/list-item"],template:Pm,templateLock:!1,templateInsertUpdatesSelection:!0,...Oe.Platform.isNative&&{marginVertical:8,marginHorizontal:8,useCompactList:!0}});!function(e,t){const n=(0,st.useRegistry)(),{updateBlockAttributes:o,replaceInnerBlocks:r}=(0,st.useDispatch)(Qe.store);(0,Oe.useEffect)((()=>{if(!e.values)return;const[a,l]=vm(e);Bm()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),n.batch((()=>{o(t,a),r(t,l)}))}),[e.values])}(t,o);const{ordered:i,type:s,reversed:c,start:u}=t,m=(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(We.ToolbarButton,{icon:(0,Ze.isRTL)()?xm:wm,title:(0,Ze.__)("Unordered"),describedBy:(0,Ze.__)("Convert to unordered list"),isActive:!1===i,onClick:()=>{n({ordered:!1})}}),(0,Oe.createElement)(We.ToolbarButton,{icon:(0,Ze.isRTL)()?Em:Cm,title:(0,Ze.__)("Ordered"),describedBy:(0,Ze.__)("Convert to ordered list"),isActive:!0===i,onClick:()=>{n({ordered:!0})}}),(0,Oe.createElement)(Im,{clientId:o}));return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Nm,ot({ordered:i,reversed:c,start:u,type:s},l)),m,i&&(0,Oe.createElement)(Tm,{setAttributes:n,ordered:i,reversed:c,start:u}))},save:function(e){let{attributes:t}=e;const{ordered:n,type:o,reversed:r,start:a}=t,l=n?"ol":"ul";return(0,Oe.createElement)(l,Qe.useBlockProps.save({type:o,reversed:r,start:a}),(0,Oe.createElement)(Qe.InnerBlocks.Content,null))},deprecated:fm},Fm=()=>je({name:Am,metadata:Hm,settings:Vm});var Dm=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var $m=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var Gm=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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 Om(e){const t=(0,st.useSelect)((t=>t(Qe.store).getBlockIndex(e)>0),[e]),{replaceBlocks:n,selectionChange:o,multiSelect:r}=(0,st.useDispatch)(Qe.store),{getBlock:a,getPreviousBlockClientId:l,getSelectionStart:i,getSelectionEnd:s,hasMultiSelection:c,getMultiSelectedBlockClientIds:u}=(0,st.useSelect)(Qe.store);return[t,(0,Oe.useCallback)((()=>{var t;const m=c(),d=m?u():[e],p=d.map((e=>(0,Ge.cloneBlock)(a(e)))),g=l(e),h=(0,Ge.cloneBlock)(a(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?r(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:Um}={$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",typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}};function qm(e){const t=(0,st.useRegistry)(),{canOutdent:n}=(0,st.useSelect)((t=>{const{getBlockRootClientId:n,getBlockName:o}=t(Qe.store);return{canOutdent:o(n(n(e)))===Um}}),[e]),{moveBlocksToPosition:o,removeBlock:r,insertBlock:a,updateBlockListSettings:l}=(0,st.useDispatch)(Qe.store),{getBlockRootClientId:i,getBlockName:s,getBlockOrder:c,getBlockIndex:u,getSelectedBlockClientIds:m,getBlock:d,getBlockListSettings:p}=(0,st.useSelect)(Qe.store);function g(e){const t=i(e),n=i(t);if(n&&s(n)===Um)return n}return[n,(0,Oe.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m();if(Array.isArray(e)||(e=[e]),!e.length)return;const n=e[0];if(s(n)!==Um)return;const h=g(n);if(!h)return;const v=i(n),b=e[e.length-1],_=c(v),f=_.slice(u(b)+1);t.batch((()=>{if(f.length){let e=c(n)[0];if(!e){const t=(0,Ge.cloneBlock)(d(v),{},[]);e=t.clientId,a(t,0,n,!1),l(e,p(v))}o(f,v,e)}if(o(e,v,i(h),u(h)+1),!c(v).length){r(v,!1)}}))}),[])]}function jm(e){const{getBlockRootClientId:t,getBlockName:n,getBlockAttributes:o}=(0,st.useSelect)(Qe.store);return(0,St.useRefEffect)((r=>{function a(r){if(r.clipboardData.getData("__unstableWrapperBlockName"))return;const a=t(e);r.clipboardData.setData("__unstableWrapperBlockName",n(a)),r.clipboardData.setData("__unstableWrapperBlockAttributes",JSON.stringify(o(a)))}return r.addEventListener("copy",a),r.addEventListener("cut",a),()=>{r.removeEventListener("copy",a),r.removeEventListener("cut",a)}}),[])}const{name:Wm}={$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",typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}};function Zm(e,t){const n=(0,st.useRegistry)(),{getPreviousBlockClientId:o,getNextBlockClientId:r,getBlockOrder:a,getBlockRootClientId:l,getBlockName:i}=(0,st.useSelect)(Qe.store),{mergeBlocks:s,moveBlocksToPosition:c}=(0,st.useDispatch)(Qe.store),[,u]=qm(e);function m(e){const t=a(e);return t.length?m(t[t.length-1]):e}function d(e){const t=l(e),n=l(t);if(n&&i(n)===Wm)return n}function p(e){const t=r(e);if(t)return t;const n=d(e);return n?p(n):void 0}function g(e){const t=a(e);return t.length?a(t[0])[0]:p(e)}return r=>{if(r){const l=g(e);if(!l)return void t(r);d(l)?u(l):n.batch((()=>{c(a(l),l,o(l)),s(e,l)}))}else{const l=o(e);if(d(e))u(e);else if(l){const t=m(l);n.batch((()=>{c(a(e),e,l),s(t,e)}))}else t(r)}}}const{name:Qm}={$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",typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:Km}={$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:Ym}={$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"};function Jm(e){const t=(0,Ge.switchToBlockType)(e,Km);if(t)return t;const n=(0,Ge.switchToBlockType)(e,Ym);return n?(0,Ge.switchToBlockType)(n,Km):null}function Xm(e){const t=[];for(let n of e)if(n.name===Qm)t.push(n);else if(n.name===Km)t.push(...n.innerBlocks);else if(n=Jm(n))for(const{innerBlocks:e}of n)t.push(...e);return t}function ed(e){let{clientId:t}=e;const[n,o]=Om(t),[r,a]=qm(t);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.ToolbarButton,{icon:(0,Ze.isRTL)()?ym:km,title:(0,Ze.__)("Outdent"),describedBy:(0,Ze.__)("Outdent list item"),disabled:!r,onClick:()=>a()}),(0,Oe.createElement)(We.ToolbarButton,{icon:(0,Ze.isRTL)()?$m:Gm,title:(0,Ze.__)("Indent"),describedBy:(0,Ze.__)("Indent list item"),isDisabled:!n,onClick:()=>o()}))}const td={to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)("core/paragraph",e)}]};var nd=td;const od={$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",typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:rd}=od,ad={icon:Dm,edit:function(e){let{attributes:t,setAttributes:n,onReplace:o,clientId:r,mergeBlocks:a}=e;const{placeholder:l,content:i}=t,s=(0,Qe.useBlockProps)({ref:jm(r)}),c=(0,Qe.useInnerBlocksProps)(s,{allowedBlocks:["core/list"],renderAppender:!1,__unstableDisableDropZone:!0}),u=function(e){const{replaceBlocks:t,selectionChange:n}=(0,st.useDispatch)(Qe.store),{getBlock:o,getBlockRootClientId:r,getBlockIndex:a}=(0,st.useSelect)(Qe.store),l=(0,Oe.useRef)(e);l.current=e;const[i,s]=qm(l.current.clientId);return(0,St.useRefEffect)((e=>{function c(e){var c;if(e.defaultPrevented||e.keyCode!==cn.ENTER)return;const{content:u,clientId:m}=l.current;if(u.length)return;if(e.preventDefault(),i)return void s();const d=o(r(m)),p=a(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:i,clientId:r}),m=function(e){const{getSelectionStart:t,getSelectionEnd:n}=(0,st.useSelect)(Qe.store),[o,r]=Om(e);return(0,St.useRefEffect)((e=>{function a(e){const{keyCode:a,shiftKey:l,altKey:i,metaKey:s,ctrlKey:c}=e;if(e.defaultPrevented||!o||a!==cn.SPACE||l||i||s||c)return;const u=t(),m=n();0===u.offset&&0===m.offset&&(e.preventDefault(),r())}return e.addEventListener("keydown",a),()=>{e.removeEventListener("keydown",a)}}),[o,r])}(r),d=function(e){const t=(0,Oe.useRef)(!1),{getBlock:n}=(0,st.useSelect)(Qe.store);return(0,Oe.useCallback)((o=>{const r=n(e);return t.current?(0,Ge.cloneBlock)(r,{content:o}):(t.current=!0,(0,Ge.createBlock)(r.name,{...r.attributes,content:o}))}),[e,n])}(r),p=Zm(r,a);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("li",c,(0,Oe.createElement)(Qe.RichText,{ref:(0,St.useMergeRefs)([u,m]),identifier:"content",tagName:"div",onChange:e=>n({content:e}),value:i,"aria-label":(0,Ze.__)("List text"),placeholder:l||(0,Ze.__)("List"),onSplit:d,onMerge:p,onReplace:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o(Xm(e),...n)}}),c.children),(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(ed,{clientId:r})))},save:function(e){let{attributes:t}=e;return(0,Oe.createElement)("li",Qe.useBlockProps.save(),(0,Oe.createElement)(Qe.RichText.Content,{value:t.content}),(0,Oe.createElement)(Qe.InnerBlocks.Content,null))},merge(e,t){return{...e,content:e.content+t.content}},transforms:nd},ld=()=>je({name:rd,metadata:od,settings:ad});var id=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const sd={$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:cd}=sd,ud={icon:id,edit:function(e){let{attributes:t,setAttributes:n}=e;const{displayLoginAsForm:o,redirectToCurrent:r}=t;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display login as form"),checked:o,onChange:()=>n({displayLoginAsForm:!o})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Redirect to current URL"),checked:r,onChange:()=>n({redirectToCurrent:!r})}))),(0,Oe.createElement)("div",(0,Qe.useBlockProps)({className:"logged-in"}),(0,Oe.createElement)("a",{href:"#login-pseudo-link"},(0,Ze.__)("Log out"))))}},md=()=>je({name:cd,metadata:sd,settings:ud});var dd=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M3 18h8V6H3v12zM14 7.5V9h7V7.5h-7zm0 5.3h7v-1.5h-7v1.5zm0 3.7h7V15h-7v1.5z"}));const pd="full",gd=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},hd=()=>{},vd=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:n,...o}=e;return{...o,style:t}},bd={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}},_d={...bd,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"}},fd={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},yd={attributes:_d,supports:fd,save(e){let{attributes:t}=e;const{isStackedOnMobile:n,mediaAlt:o,mediaPosition:r,mediaType:a,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:d,href:p,linkTarget:g,rel:h}=t,v=t.mediaSizeSlug||pd,b=(0,Nt.isEmpty)(h)?void 0:h,_=at()({[`wp-image-${s}`]:s&&"image"===a,[`size-${v}`]:s&&"image"===a});let f=(0,Oe.createElement)("img",{src:l,alt:o,className:_||null});p&&(f=(0,Oe.createElement)("a",{className:d,href:p,target:g,rel:b},f));const y={image:()=>f,video:()=>(0,Oe.createElement)("video",{controls:!0,src:l})},k=at()({"has-media-on-the-right":"right"===r,"is-stacked-on-mobile":n,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),x=u?gd(l,m):{};let w;50!==i&&(w="right"===r?`auto ${i}%`:`${i}% auto`);const E={gridTemplateColumns:w};return"right"===r?(0,Oe.createElement)("div",Qe.useBlockProps.save({className:k,style:E}),(0,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-media-text__content"})),(0,Oe.createElement)("figure",{className:"wp-block-media-text__media",style:x},(y[a]||hd)())):(0,Oe.createElement)("div",Qe.useBlockProps.save({className:k,style:E}),(0,Oe.createElement)("figure",{className:"wp-block-media-text__media",style:x},(y[a]||hd)()),(0,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-media-text__content"})))}},kd={attributes:_d,supports:fd,save(e){let{attributes:t}=e;const{isStackedOnMobile:n,mediaAlt:o,mediaPosition:r,mediaType:a,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:d,href:p,linkTarget:g,rel:h}=t,v=t.mediaSizeSlug||pd,b=(0,Nt.isEmpty)(h)?void 0:h,_=at()({[`wp-image-${s}`]:s&&"image"===a,[`size-${v}`]:s&&"image"===a});let f=(0,Oe.createElement)("img",{src:l,alt:o,className:_||null});p&&(f=(0,Oe.createElement)("a",{className:d,href:p,target:g,rel:b},f));const y={image:()=>f,video:()=>(0,Oe.createElement)("video",{controls:!0,src:l})},k=at()({"has-media-on-the-right":"right"===r,"is-stacked-on-mobile":n,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),x=u?gd(l,m):{};let w;50!==i&&(w="right"===r?`auto ${i}%`:`${i}% auto`);const E={gridTemplateColumns:w};return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:k,style:E}),(0,Oe.createElement)("figure",{className:"wp-block-media-text__media",style:x},(y[a]||hd)()),(0,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-media-text__content"})))}},xd={attributes:{...bd,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:vd,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,isStackedOnMobile:r,mediaAlt:a,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,Nt.isEmpty)(b)?void 0:b;let f=(0,Oe.createElement)("img",{src:s,alt:a,className:u&&"image"===i?`wp-image-${u}`:null});h&&(f=(0,Oe.createElement)("a",{className:g,href:h,target:v,rel:_},f));const y={image:()=>f,video:()=>(0,Oe.createElement)("video",{controls:!0,src:s})},k=(0,Qe.getColorClassName)("background-color",n),x=at()({"has-media-on-the-right":"right"===l,"has-background":k||o,[k]:k,"is-stacked-on-mobile":r,[`is-vertically-aligned-${m}`]:m,"is-image-fill":d}),w=d?gd(s,p):{};let E;50!==c&&(E="right"===l?`auto ${c}%`:`${c}% auto`);const C={backgroundColor:k?void 0:o,gridTemplateColumns:E};return(0,Oe.createElement)("div",{className:x,style:C},(0,Oe.createElement)("figure",{className:"wp-block-media-text__media",style:w},(y[i]||hd)()),(0,Oe.createElement)("div",{className:"wp-block-media-text__content"},(0,Oe.createElement)(Qe.InnerBlocks.Content,null)))}},wd={attributes:{...bd,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:vd,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,isStackedOnMobile:r,mediaAlt:a,mediaPosition:l,mediaType:i,mediaUrl:s,mediaWidth:c,mediaId:u,verticalAlignment:m,imageFill:d,focalPoint:p}=t,g={image:()=>(0,Oe.createElement)("img",{src:s,alt:a,className:u&&"image"===i?`wp-image-${u}`:null}),video:()=>(0,Oe.createElement)("video",{controls:!0,src:s})},h=(0,Qe.getColorClassName)("background-color",n),v=at()({"has-media-on-the-right":"right"===l,[h]:h,"is-stacked-on-mobile":r,[`is-vertically-aligned-${m}`]:m,"is-image-fill":d}),b=d?gd(s,p):{};let _;50!==c&&(_="right"===l?`auto ${c}%`:`${c}% auto`);const f={backgroundColor:h?void 0:o,gridTemplateColumns:_};return(0,Oe.createElement)("div",{className:v,style:f},(0,Oe.createElement)("figure",{className:"wp-block-media-text__media",style:b},(g[i]||hd)()),(0,Oe.createElement)("div",{className:"wp-block-media-text__content"},(0,Oe.createElement)(Qe.InnerBlocks.Content,null)))}},Ed={attributes:{...bd,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:r,mediaAlt:a,mediaPosition:l,mediaType:i,mediaUrl:s,mediaWidth:c}=t,u={image:()=>(0,Oe.createElement)("img",{src:s,alt:a}),video:()=>(0,Oe.createElement)("video",{controls:!0,src:s})},m=(0,Qe.getColorClassName)("background-color",n),d=at()({"has-media-on-the-right":"right"===l,[m]:m,"is-stacked-on-mobile":r});let p;50!==c&&(p="right"===l?`auto ${c}%`:`${c}% auto`);const g={backgroundColor:m?void 0:o,gridTemplateColumns:p};return(0,Oe.createElement)("div",{className:d,style:g},(0,Oe.createElement)("figure",{className:"wp-block-media-text__media"},(u[i]||hd)()),(0,Oe.createElement)("div",{className:"wp-block-media-text__content"},(0,Oe.createElement)(Qe.InnerBlocks.Content,null)))}};var Cd=[yd,kd,xd,wd,Ed];var Sd=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"}));var Bd=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})),Td=(0,Oe.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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,Oe.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,Oe.createElement)(We.Path,{d:"M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"}));const Nd=["image","video"],Pd=()=>{};function Id(e,t){return e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const zd=(0,Oe.forwardRef)(((e,t)=>{let{isSelected:n,isStackedOnMobile:o,...r}=e;const a=(0,St.useViewportMatch)("small","<");return(0,Oe.createElement)(We.ResizableBox,ot({ref:t,showHandle:n&&(!a||!o)},r))}));function Md(e){let{mediaId:t,mediaUrl:n,onSelectMedia:o}=e;return(0,Oe.createElement)(Qe.BlockControls,{group:"other"},(0,Oe.createElement)(Qe.MediaReplaceFlow,{mediaId:t,mediaURL:n,allowedTypes:Nd,accept:"image/*,video/*",onSelect:o}))}function Rd(e){let{className:t,mediaUrl:n,onSelectMedia:o}=e;const{createErrorNotice:r}=(0,st.useDispatch)(Ct.store);return(0,Oe.createElement)(Qe.MediaPlaceholder,{icon:(0,Oe.createElement)(Qe.BlockIcon,{icon:Td}),labels:{title:(0,Ze.__)("Media area")},className:t,onSelect:o,accept:"image/*,video/*",allowedTypes:Nd,onError:e=>{r(e,{type:"snackbar"})},disableMediaButtons:n})}var Ld=(0,Oe.forwardRef)((function(e,t){const{className:n,commitWidthChange:o,focalPoint:r,imageFill:a,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,wt.isBlobURL)(d),{toggleSelection:_}=(0,st.useDispatch)(Qe.store);if(d){const f=()=>{_(!1)},y=(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&&a?Id(d,r):{},E={image:()=>(0,Oe.createElement)("img",{src:d,alt:s}),video:()=>(0,Oe.createElement)("video",{controls:!0,src:d})};return(0,Oe.createElement)(zd,{as:"figure",className:at()(n,"editor-media-container__resizer",{"is-transient":b}),style:w,size:{width:p+"%"},minWidth:"10%",maxWidth:"100%",enable:x,onResizeStart:f,onResize:y,onResizeStop:k,axis:"x",isSelected:l,isStackedOnMobile:i,ref:t},(0,Oe.createElement)(Md,{onSelectMedia:g,mediaUrl:d,mediaId:c}),(E[m]||Pd)(),b&&(0,Oe.createElement)(We.Spinner,null),(0,Oe.createElement)(Rd,e))}return(0,Oe.createElement)(Rd,e)}));const Hd=[["core/paragraph",{placeholder:(0,Ze._x)("Content…","content placeholder")}]],Ad=e=>Math.max(15,Math.min(e,85));function Vd(e,t){var n,o,r;return null==e||null===(n=e.media_details)||void 0===n||null===(o=n.sizes)||void 0===o||null===(r=o[t])||void 0===r?void 0:r.source_url}var Fd=function(e){let{attributes:t,isSelected:n,setAttributes:o,clientId:r}=e;const{focalPoint:a,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:f}=t,y=t.mediaSizeSlug||pd,{imageSizes:k,image:x,isContentLocked:w}=(0,st.useSelect)((e=>{var t;const{__unstableGetContentLockingParent:o,getSettings:a}=e(Qe.store);return{isContentLocked:!!o(r),image:p&&n?e(it.store).getMedia(p,{context:"view"}):null,imageSizes:null===(t=a())||void 0===t?void 0:t.imageSizes}}),[n,p,r]),E=(0,Oe.useRef)(),C=e=>{const{style:t}=E.current.resizable,{x:n,y:o}=e;t.backgroundPosition=`${100*n}% ${100*o}%`},[S,B]=(0,Oe.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 r,a;var l,i,s,c,u;(0,wt.isBlobURL)(e.url)&&(e.type=(0,wt.getBlobTypeByURL)(e.url)),r=e.media_type?"image"===e.media_type?"image":"video":e.type,"image"===r&&(a=(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:r,mediaUrl:a||e.url,mediaLink:e.link||void 0,href:m,focalPoint:void 0})}}({attributes:t,setAttributes:o}),N=e=>{o({mediaWidth:Ad(e)}),B(null)},P=at()({"has-media-on-the-right":"right"===g,"is-selected":n,"is-stacked-on-mobile":s,[`is-vertically-aligned-${f}`]:f,"is-image-fill":i}),I=`${S||b}%`,z="right"===g?`1fr ${I}`:`${I} 1fr`,M={gridTemplateColumns:z,msGridColumns:z},R=k.filter((e=>{let{slug:t}=e;return Vd(x,t)})).map((e=>{let{name:t,slug:n}=e;return{value:n,label:t}})),L=(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Stack on mobile"),checked:s,onChange:()=>o({isStackedOnMobile:!s})}),"image"===h&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Crop image to fill entire column"),checked:i,onChange:()=>o({imageFill:!i})}),i&&v&&"image"===h&&(0,Oe.createElement)(We.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Focal point picker"),url:v,value:a,onChange:e=>o({focalPoint:e}),onDragStart:C,onDrag:C}),"image"===h&&(0,Oe.createElement)(We.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Alt text (alternative text)"),value:d,onChange:e=>{o({mediaAlt:e})},help:(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,Ze.__)("Describe the purpose of the image")),(0,Ze.__)("Leave empty if the image is purely decorative."))}),"image"===h&&(0,Oe.createElement)(Qe.__experimentalImageSizeControl,{onChangeImage:e=>{const t=Vd(x,e);if(!t)return null;o({mediaUrl:t,mediaSizeSlug:e})},slug:y,imageSizeOptions:R,isResizable:!1,imageSizeHelp:(0,Ze.__)("Select which image size to load.")}),v&&(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Media width"),value:S||b,onChange:N,min:15,max:85})),H=(0,Qe.useBlockProps)({className:P,style:M}),A=(0,Qe.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:Hd});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,L),(0,Oe.createElement)(Qe.BlockControls,{group:"block"},!w&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockVerticalAlignmentControl,{onChange:e=>{o({verticalAlignment:e})},value:f}),(0,Oe.createElement)(We.ToolbarButton,{icon:Sd,title:(0,Ze.__)("Show media on left"),isActive:"left"===g,onClick:()=>o({mediaPosition:"left"})}),(0,Oe.createElement)(We.ToolbarButton,{icon:Bd,title:(0,Ze.__)("Show media on right"),isActive:"right"===g,onClick:()=>o({mediaPosition:"right"})})),"image"===h&&(0,Oe.createElement)(Qe.__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,Oe.createElement)("div",H,"right"===g&&(0,Oe.createElement)("div",A),(0,Oe.createElement)(Ld,{className:"wp-block-media-text__media",onSelectMedia:T,onWidthChange:e=>{B(Ad(e))},commitWidthChange:N,ref:E,focalPoint:a,imageFill:i,isSelected:n,isStackedOnMobile:s,mediaAlt:d,mediaId:p,mediaPosition:g,mediaType:h,mediaUrl:v,mediaWidth:b,isContentLocked:w}),"right"!==g&&(0,Oe.createElement)("div",A)))};const Dd=()=>{};const $d={from:[{type:"block",blocks:["core/image"],transform:e=>{let{alt:t,url:n,id:o,anchor:r}=e;return(0,Ge.createBlock)("core/media-text",{mediaAlt:t,mediaId:o,mediaUrl:n,mediaType:"image",anchor:r})}},{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:r,backgroundType:a,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:r,backgroundColor:u,gradient:s,mediaAlt:o,mediaId:c,mediaType:a,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:r}=e;return(0,Ge.createBlock)("core/image",{alt:t,id:n,url:o,anchor:r})}},{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,r;let{align:a,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:a,alt:u,anchor:l,backgroundType:d,dimRatio:p?50:100,focalPoint:s,gradient:c,id:m,overlayColor:i,url:p,...v},_=null==g||null===(r=g.color)||void 0===r?void 0:r.text;if(!h&&!_)return(0,Ge.createBlock)("core/cover",b,t);const f=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,f)}}]};var Gd=$d;const 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:Ud}=Od,qd={icon:dd,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,Ze.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,Ze.__)("— Kobayashi Issa (一茶)")}}]},transforms:Gd,edit:Fd,save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,mediaAlt:o,mediaPosition:r,mediaType:a,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:d,href:p,linkTarget:g,rel:h}=t,v=t.mediaSizeSlug||pd,b=(0,Nt.isEmpty)(h)?void 0:h,_=at()({[`wp-image-${s}`]:s&&"image"===a,[`size-${v}`]:s&&"image"===a});let f=(0,Oe.createElement)("img",{src:l,alt:o,className:_||null});p&&(f=(0,Oe.createElement)("a",{className:d,href:p,target:g,rel:b},f));const y={image:()=>f,video:()=>(0,Oe.createElement)("video",{controls:!0,src:l})},k=at()({"has-media-on-the-right":"right"===r,"is-stacked-on-mobile":n,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),x=u?Id(l,m):{};let w;50!==i&&(w="right"===r?`auto ${i}%`:`${i}% auto`);const E={gridTemplateColumns:w};return"right"===r?(0,Oe.createElement)("div",Qe.useBlockProps.save({className:k,style:E}),(0,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-media-text__content"})),(0,Oe.createElement)("figure",{className:"wp-block-media-text__media",style:x},(y[a]||Dd)())):(0,Oe.createElement)("div",Qe.useBlockProps.save({className:k,style:E}),(0,Oe.createElement)("figure",{className:"wp-block-media-text__media",style:x},(y[a]||Dd)()),(0,Oe.createElement)("div",Qe.useInnerBlocksProps.save({className:"wp-block-media-text__content"})))},deprecated:Cd},jd=()=>je({name:Ud,metadata:Od,settings:qd});var Wd=window.wp.dom;const Zd=(0,st.withDispatch)(((e,t)=>{let{clientId:n,attributes:o}=t;const{replaceBlock:r}=e(Qe.store);return{convertToHTML(){r(n,(0,Ge.createBlock)("core/html",{content:o.originalUndelimitedContent}))}}}))((function(e){let{attributes:t,convertToHTML:n,clientId:o}=e;const{originalName:r,originalUndelimitedContent:a}=t,l=!!a,i=(0,st.useSelect)((e=>{const{canInsertBlockType:t,getBlockRootClientId:n}=e(Qe.store);return t("core/html",n(o))}),[o]),s=[];let c;return l&&i?(c=(0,Ze.sprintf)((0,Ze.__)('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.'),r),s.push((0,Oe.createElement)(We.Button,{key:"convert",onClick:n,variant:"primary"},(0,Ze.__)("Keep as HTML")))):c=(0,Ze.sprintf)((0,Ze.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'),r),(0,Oe.createElement)("div",(0,Qe.useBlockProps)({className:"has-warning"}),(0,Oe.createElement)(Qe.Warning,{actions:s},c),(0,Oe.createElement)(Oe.RawHTML,null,(0,Wd.safeHTML)(a)))}));var Qd=Zd;const Kd={$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:Yd}=Kd,Jd={name:Yd,__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:Qd,save:function(e){let{attributes:t}=e;return(0,Oe.createElement)(Oe.RawHTML,null,t.originalContent)}},Xd=()=>je({name:Yd,metadata:Kd,settings:Jd});var ep=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"}));const tp=(0,Ze.__)("Read more");var np={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)}}]};const op={$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:rp}=op,ap={icon:ep,example:{},__experimentalLabel(e,t){let{context:n}=t;if("accessibility"===n)return e.customText},transforms:np,edit:function(e){let{attributes:{customText:t,noTeaser:n},insertBlocksAfter:o,setAttributes:r}=e;const a={width:`${(t||tp).length+1.2}em`};return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,null,(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Hide the excerpt on the full content page"),checked:!!n,onChange:()=>r({noTeaser:!n}),help:e=>e?(0,Ze.__)("The excerpt is hidden."):(0,Ze.__)("The excerpt is visible.")}))),(0,Oe.createElement)("div",(0,Qe.useBlockProps)(),(0,Oe.createElement)("input",{"aria-label":(0,Ze.__)("“Read more” link text"),type:"text",value:t,placeholder:tp,onChange:e=>{r({customText:""!==e.target.value?e.target.value:void 0})},onKeyDown:e=>{let{keyCode:t}=e;t===cn.ENTER&&o([(0,Ge.createBlock)((0,Ge.getDefaultBlockName)())])},style:a})))},save:function(e){let{attributes:{customText:t,noTeaser:n}}=e;const o=t?`\x3c!--more ${t}--\x3e`:"\x3c!--more--\x3e",r=n?"\x3c!--noteaser--\x3e":"";return(0,Oe.createElement)(Oe.RawHTML,null,[o,r].filter(Boolean).join("\n"))}},lp=()=>je({name:rp,metadata:op,settings:ap});var ip=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"})),sp=window.wp.a11y;var cp=function(e){let{icon:t,size:n=24,...o}=e;return(0,Oe.cloneElement)(t,{width:n,height:n,...o})};var up=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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 mp(e){const t=(0,it.useResourcePermissions)("navigation",e);return(0,st.useSelect)((n=>{const{canCreate:o,canUpdate:r,canDelete:a,isResolving:l,hasResolved:i}=t,{navigationMenus:s,isResolvingNavigationMenus:c,hasResolvedNavigationMenus:u}=function(e){const{getEntityRecords:t,hasFinishedResolution:n,isResolving:o}=e(it.store),r=["postType","wp_navigation",{per_page:-1,status:["publish","draft"]}];return{navigationMenus:t(...r),isResolvingNavigationMenus:o("getEntityRecords",r),hasResolvedNavigationMenus:n("getEntityRecords",r)}}(n),{navigationMenu:m,isNavigationMenuResolved:d,isNavigationMenuMissing:p}=function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:n,getEditedEntityRecord:o,hasFinishedResolution:r}=e(it.store),a=["postType","wp_navigation",t],l=n(...a),i=o(...a),s=r("getEditedEntityRecord",a),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:r,hasResolvedCanUserUpdateNavigationMenu:e?i:void 0,canUserDeleteNavigationMenu:a,hasResolvedCanUserDeleteNavigationMenu:e?i:void 0}}),[e,t])}function dp(e){const{records:t,isResolving:n,hasResolved:o}=(0,it.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:r,isResolving:a,hasResolved:l}=(0,it.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:i,hasResolved:s}=(0,it.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:r,isResolvingPages:a,hasResolvedPages:l,hasPages:!(!l||null==r||!r.length),menus:t,isResolvingMenus:n,hasResolvedMenus:o,hasMenus:!(!o||null==t||!t.length),menuItems:i,hasResolvedMenuItems:s}}var pp=e=>{let{isVisible:t=!0}=e;return(0,Oe.createElement)("div",{"aria-hidden":!t||void 0,className:"wp-block-navigation-placeholder__preview"},(0,Oe.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,Oe.createElement)(cp,{icon:ip}),(0,Ze.__)("Navigation")))};var gp=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var hp=function(e){let{currentMenuId:t,onSelectNavigationMenu:n,onSelectClassicMenu:o,onCreateNew:r,actionLabel:a,createNavigationMenuIsSuccess:l,createNavigationMenuIsError:i}=e;const s=(0,Ze.__)("Create from '%s'"),[c,u]=(0,Oe.useState)(""),[m,d]=(0,Oe.useState)(!1);a=a||s;const{menus:p}=dp(),{navigationMenus:g,hasResolvedNavigationMenus:h,isNavigationMenuResolved:v,canUserCreateNavigationMenu:b,canSwitchNavigationMenu:_}=mp(),[f]=(0,it.useEntityProp)("postType","wp_navigation","title"),y=(0,Oe.useMemo)((()=>(null==g?void 0:g.map(((e,n)=>{let{id:o,title:r}=e;const l=(0,Gn.decodeEntities)(r.rendered)||(0,Ze.sprintf)((0,Ze.__)("(no title %s)"),n+1);return o!==t||m||u((0,Ze.sprintf)((0,Ze.__)("You are currently editing %s"),l)),{value:o,label:l,ariaLabel:(0,Ze.sprintf)(a,l)}})))||[]),[f,t,g,l,v,h]),k=!(null==g||!g.length),x=!(null==p||!p.length),w=!!_,E=!!b,C=k&&!t,S=!k&&h,B=h&&null===t;(0,Oe.useEffect)((()=>{h?(C||S||B)&&u((0,Ze.__)("Choose a Navigation menu")):u((0,Ze.__)("Loading …")),m&&(l||i)&&d(!1)}),[t,k,h,l,v]);const T=(0,Oe.createElement)(We.DropdownMenu,{label:c,icon:gp,toggleProps:{isSmall:!0}},(e=>{let{onClose:a}=e;return(0,Oe.createElement)(Oe.Fragment,null,w&&k&&(0,Oe.createElement)(We.MenuGroup,{label:(0,Ze.__)("Menus")},(0,Oe.createElement)(We.MenuItemsChoice,{value:t,onSelect:e=>{n(e)},choices:y})),E&&x&&(0,Oe.createElement)(We.MenuGroup,{label:(0,Ze.__)("Import Classic Menus")},null==p?void 0:p.map((e=>{const t=(0,Gn.decodeEntities)(e.name);return(0,Oe.createElement)(We.MenuItem,{onClick:()=>{u((0,Ze.__)("Loading …")),o(e),a()},key:e.id,"aria-label":(0,Ze.sprintf)(s,t)},t)}))),b&&(0,Oe.createElement)(We.MenuGroup,{label:(0,Ze.__)("Tools")},(0,Oe.createElement)(We.MenuItem,{onClick:()=>{a(),r(),d(!0),u((0,Ze.__)("Loading …"))}},(0,Ze.__)("Create new menu"))))}));return T};function vp(e){let{isSelected:t,currentMenuId:n,clientId:o,canUserCreateNavigationMenu:r=!1,isResolvingCanUserCreateNavigationMenu:a,onSelectNavigationMenu:l,onSelectClassicMenu:i,onCreateEmpty:s}=e;const{isResolvingMenus:c,hasResolvedMenus:u}=dp();(0,Oe.useEffect)((()=>{t&&(c&&(0,sp.speak)((0,Ze.__)("Loading Navigation block setup options.")),u&&(0,sp.speak)((0,Ze.__)("Navigation block setup options ready.")))}),[c,t]);const m=c&&a;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.Placeholder,{className:"wp-block-navigation-placeholder"},(0,Oe.createElement)(pp,{isVisible:!t}),(0,Oe.createElement)("div",{"aria-hidden":!t||void 0,className:"wp-block-navigation-placeholder__controls"},(0,Oe.createElement)("div",{className:"wp-block-navigation-placeholder__actions"},(0,Oe.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,Oe.createElement)(cp,{icon:ip})," ",(0,Ze.__)("Navigation")),(0,Oe.createElement)("hr",null),m&&(0,Oe.createElement)(We.Spinner,null),(0,Oe.createElement)(hp,{currentMenuId:n,clientId:o,onSelectNavigationMenu:l,onSelectClassicMenu:i}),(0,Oe.createElement)("hr",null),r&&(0,Oe.createElement)(We.Button,{variant:"tertiary",onClick:s},(0,Ze.__)("Start empty"))))))}var bp=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function _p(e){let{icon:t}=e;return"menu"===t?(0,Oe.createElement)(cp,{icon:bp}):(0,Oe.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,Oe.createElement)(Ue.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,Oe.createElement)(Ue.Rect,{x:"4",y:"15",width:"16",height:"1.5"}))}function fp(e){let{children:t,id:n,isOpen:o,isResponsive:r,onToggle:a,isHiddenByDefault:l,overlayBackgroundColor:i,overlayTextColor:s,hasIcon:c,icon:u}=e;if(!r)return t;const m=at()("wp-block-navigation__responsive-container",{"has-text-color":!!s.color||!(null==s||!s.class),[(0,Qe.getColorClassName)("color",null==s?void 0:s.slug)]:!(null==s||!s.slug),"has-background":!!i.color||(null==i?void 0:i.class),[(0,Qe.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,Ze.__)("Menu")}};return(0,Oe.createElement)(Oe.Fragment,null,!o&&(0,Oe.createElement)(We.Button,{"aria-haspopup":"true","aria-label":c&&(0,Ze.__)("Open menu"),className:p,onClick:()=>a(!0)},c&&(0,Oe.createElement)(_p,{icon:u}),!c&&(0,Ze.__)("Menu")),(0,Oe.createElement)("div",{className:m,style:d,id:g},(0,Oe.createElement)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1"},(0,Oe.createElement)("div",h,(0,Oe.createElement)(We.Button,{className:"wp-block-navigation__responsive-container-close","aria-label":c&&(0,Ze.__)("Close menu"),onClick:()=>a(!1)},c&&(0,Oe.createElement)(cp,{icon:up}),!c&&(0,Ze.__)("Close")),(0,Oe.createElement)("div",{className:"wp-block-navigation__responsive-container-content",id:`${g}-content`},t)))))}const yp=["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"],kp={name:"core/navigation-link"};function xp(e){let{clientId:t,hasCustomPlaceholder:n,orientation:o,templateLock:r}=e;const{isImmediateParentOfSelectedBlock:a,selectedBlockHasChildren:l,isSelected:i}=(0,st.useSelect)((e=>{const{getBlockCount:n,hasSelectedInnerBlock:o,getSelectedBlockClientId:r}=e(Qe.store),a=r();return{isImmediateParentOfSelectedBlock:o(t,!1),selectedBlockHasChildren:!!n(a),isSelected:a===t}}),[t]),[s,c,u]=(0,it.useEntityBlockEditor)("postType","wp_navigation"),m=(0,Oe.useMemo)((()=>s.every((e=>{let{name:t}=e;return"core/navigation-link"===t||"core/navigation-submenu"===t||"core/page-list"===t}))),[s]),d=i||a&&!l,p=(0,Oe.useMemo)((()=>(0,Oe.createElement)(pp,null)),[]),g=!(null==s||!s.length),h=!n&&!g&&!i,v=(0,Qe.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:s,onInput:c,onChange:u,allowedBlocks:yp,__experimentalDefaultBlock:kp,__experimentalDirectInsert:m,orientation:o,templateLock:r,renderAppender:!!(i||a&&!l||d)&&Qe.InnerBlocks.ButtonBlockAppender,placeholder:h?p:void 0});return(0,Oe.createElement)("div",v)}function wp(){const[e,t]=(0,it.useEntityProp)("postType","wp_navigation","title");return(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Menu name"),value:e,onChange:t})}const Ep=(e,t,n)=>{if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const o in e){if(!t.hasOwnProperty(o))return!1;if(n&&n(o,e))return!0;if(!Ep(e[o],t[o],n))return!1}return!0}return!1},Cp={},Sp=["postType","wp_navigation",{status:"draft",per_page:-1}],Bp={name:"core/navigation-link"},Tp=["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 Np(e){let{blocks:t,createNavigationMenu:n,hasSelection:o}=e;const r=(0,Oe.useRef)();(0,Oe.useEffect)((()=>{null!=r&&r.current||(r.current=t)}),[t]);const a=function(e,t){return!Ep(e,t,((e,t)=>{if("core/page-list"===(null==t?void 0:t.name)&&"innerBlocks"===e)return!0}))}(null==r?void 0:r.current,t),l=(0,Oe.useMemo)((()=>t.every((e=>{let{name:t}=e;return"core/navigation-link"===t||"core/navigation-submenu"===t||"core/page-list"===t}))),[t]),i=(0,Oe.useContext)(We.Disabled.Context),s=(0,Qe.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!o&&void 0,allowedBlocks:Tp,__experimentalDefaultBlock:Bp,__experimentalDirectInsert:l}),{isSaving:c,hasResolvedDraftNavigationMenus:u}=(0,st.useSelect)((e=>{if(i)return Cp;const{getEntityRecords:t,hasFinishedResolution:n,isSavingEntityRecord:o}=e(it.store);return{isSaving:o("postType","wp_navigation"),draftNavigationMenus:t(...Sp),hasResolvedDraftNavigationMenus:n("getEntityRecords",Sp)}}),[i]),{hasResolvedNavigationMenus:m}=mp();(0,Oe.useEffect)((()=>{!i&&!c&&u&&m&&o&&a&&n(null,t)}),[i,c,u,m,a,o]);const d=c?We.Disabled:"div";return(0,Oe.createElement)(d,s)}function Pp(e){let{onDelete:t}=e;const[n,o]=(0,Oe.useState)(!1),r=(0,it.useEntityId)("postType","wp_navigation"),[a]=(0,it.useEntityProp)("postType","wp_navigation","title"),{deleteEntityRecord:l}=(0,st.useDispatch)(it.store);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.Button,{className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{o(!0)}},(0,Ze.__)("Delete menu")),n&&(0,Oe.createElement)(We.Modal,{title:(0,Ze.sprintf)((0,Ze.__)("Delete %s"),a),onRequestClose:()=>o(!1)},(0,Oe.createElement)("p",null,(0,Ze.__)("Are you sure you want to delete this navigation menu?")),(0,Oe.createElement)(We.Flex,{justify:"flex-end"},(0,Oe.createElement)(We.FlexItem,null,(0,Oe.createElement)(We.Button,{variant:"secondary",onClick:()=>{o(!1)}},(0,Ze.__)("Cancel"))),(0,Oe.createElement)(We.FlexItem,null,(0,Oe.createElement)(We.Button,{variant:"primary",onClick:()=>{l("postType","wp_navigation",r,{force:!0}),t(a)}},(0,Ze.__)("Confirm"))))))}var Ip=function(){let{name:e,message:t=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,Oe.useRef)(),{createWarningNotice:o,removeNotice:r}=(0,st.useDispatch)(Ct.store),a=r=>{n.current||(n.current=e,o(r||t,{id:n.current,type:"snackbar"}))},l=()=>{n.current&&(r(n.current),n.current=null)};return[a,l]};function zp(e){let{setAttributes:t,hasIcon:n,icon:o}=e;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show icon button"),help:(0,Ze.__)("Configure the visual appearance of the button opening the overlay menu."),onChange:e=>t({hasIcon:e}),checked:n}),(0,Oe.createElement)(We.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Icon"),value:o,onChange:e=>t({icon:e}),isBlock:!0},(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,Ze.__)("handle"),label:(0,Oe.createElement)(_p,{icon:"handle"})}),(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,Ze.__)("menu"),label:(0,Oe.createElement)(_p,{icon:"menu"})})))}function Mp(e,t){return e&&t?e+"//"+t:null}const Rp=["postType","wp_navigation",{status:"draft",per_page:-1}],Lp=["postType","wp_navigation",{per_page:-1,status:"publish"}];function Hp(e){const t=(0,Oe.useContext)(We.Disabled.Context),n=function(e){return(0,st.useSelect)((t=>{if(!e)return;const{getBlock:n,getBlockParentsByBlockName:o}=t(Qe.store),r=o(e,"core/template-part",!0);if(null==r||!r.length)return;const a=t("core/editor").__experimentalGetDefaultTemplatePartAreas(),{getEditedEntityRecord:l}=t(it.store);for(const e of r){const t=n(e),{theme:o,slug:r}=t.attributes,s=l("postType","wp_template_part",Mp(o,r));var i;if(null!=s&&s.area)return null===(i=a.find((e=>"uncategorized"!==e.area&&e.area===s.area)))||void 0===i?void 0:i.label}}),[e])}(t?void 0:e),o=(0,st.useRegistry)();return(0,Oe.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=o.resolveSelect(it.store),[r,a]=await Promise.all([e(...Rp),e(...Lp)]),l=n?(0,Ze.sprintf)((0,Ze.__)("%s navigation"),n):(0,Ze.__)("Navigation"),i=[...r,...a].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 Ap="success",Vp="error",Fp="pending",Dp="idle";function $p(e){const[t,n]=(0,Oe.useState)(Dp),[o,r]=(0,Oe.useState)(null),[a,l]=(0,Oe.useState)(null),{saveEntityRecord:i,editEntityRecord:s}=(0,st.useDispatch)(it.store),c=Hp(e),u=(0,Oe.useCallback)((async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;if(e&&"string"!=typeof e)throw l("Invalid title supplied when creating Navigation Menu."),n(Vp),new Error("Value of supplied title argument was not a string.");n(Fp),r(null),l(null),e||(e=await c().catch((e=>{throw l(null==e?void 0:e.message),n(Vp),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const a={title:e,content:(0,Ge.serialize)(t),status:o};return i("postType","wp_navigation",a).then((e=>(r(e),n(Ap),"publish"!==o&&s("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw l(null==e?void 0:e.message),n(Vp),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[Ge.serialize,i]);return{create:u,status:t,value:o,error:a,isIdle:t===Dp,isPending:t===Fp,isSuccess:t===Ap,isError:t===Vp}}function Gp(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),r=[];for(const a of e)o[a[t]]={...a,children:[]},a[n]?(o[a[n]]=o[a[n]]||{},o[a[n]].children=o[a[n]].children||[],o[a[n]].children.push(o[a[t]])):r.push(o[a[t]]);return r}(e),n=Op(t);return(0,Jl.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",n,e)}function Op(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)),r=o.map((e=>{var o,r;if("block"===e.type){const[t]=(0,Ge.parse)(e.content.raw);return t||(0,Ge.createBlock)("core/freeform",{content:e.content})}const a=null!==(o=e.children)&&void 0!==o&&o.length?"core/navigation-submenu":"core/navigation-link",l=Up(e,a,t),{innerBlocks:i=[],mapping:s={}}=null!==(r=e.children)&&void 0!==r&&r.length?Op(e.children,t+1):{};n={...n,...s};const c=(0,Ge.createBlock)(a,l,i);return n[e.id]=c.clientId,c}));return{innerBlocks:r,mapping:n}}function Up(e,t,n){var o;let{title:r,xfn:a,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==r?void 0:r.rendered)||"",...(null===(o=s)||void 0===o?void 0:o.length)&&{type:s},kind:(null==d?void 0:d.replace("_","-"))||"custom",url:m||"",...(null==a?void 0:a.length)&&a.join(" ").trim()&&{rel:a.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 qp="success",jp="error",Wp="pending";let Zp=null;var Qp=function(e){const{create:t}=$p(e),n=(0,st.useRegistry)(),{editEntityRecord:o}=(0,st.useDispatch)(it.store),[r,a]=(0,Oe.useState)("idle"),[l,i]=(0,Oe.useState)(null),s=(0,Oe.useCallback)((async(e,r,l)=>{if(Zp!==e)return Zp=e,e&&r?(a(Wp),i(null),await async function(e,r){let a,l,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"publish";try{l=await n.resolveSelect(it.store).getMenuItems({menus:e,per_page:-1,context:"view"})}catch(e){throw new Error((0,Ze.sprintf)((0,Ze.__)('Unable to fetch classic menu "%s" from API.'),r),{cause:e})}if(null===l)throw new Error((0,Ze.sprintf)((0,Ze.__)('Unable to fetch classic menu "%s" from API.'),r));const{innerBlocks:s}=Gp(l);try{a=await t(r,s,i),await o("postType","wp_navigation",a.id,{status:i},{throwOnError:!0})}catch(e){throw new Error((0,Ze.sprintf)((0,Ze.__)('Unable to create Navigation Menu "%s".'),r),{cause:e})}return a}(e,r,l).then((e=>(a(qp),Zp=null,e))).catch((e=>{throw i(null==e?void 0:e.message),a(jp),Zp=null,new Error((0,Ze.sprintf)((0,Ze.__)('Unable to create Navigation Menu "%s".'),r),{cause:e})}))):(i("Unable to convert menu. Missing menu details."),void a(jp))}),[]);return{convert:s,status:r,error:l}};const Kp=[];function Yp(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Jp(e,t,n){if(!e)return;t(Yp(e).color);let o=e,r=Yp(o).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&o.parentNode&&o.parentNode.nodeType===o.parentNode.ELEMENT_NODE;)o=o.parentNode,r=Yp(o).backgroundColor;n(r)}function Xp(e,t){var n,o;const{textColor:r,customTextColor:a,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:a?p.customTextColor=a:r?p.textColor=r: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}function eg(e){return{className:at()("wp-block-navigation__submenu-container",{"has-text-color":!(!e.textColor&&!e.customTextColor),[`has-${e.textColor}-color`]:!!e.textColor,"has-background":!(!e.backgroundColor&&!e.customBackgroundColor),[`has-${e.backgroundColor}-background-color`]:!!e.backgroundColor}),style:{color:e.customTextColor,backgroundColor:e.customBackgroundColor}}}var tg=e=>{let{className:t="",disabled:n,isMenuItem:o=!1}=e,r=We.Button;return o&&(r=We.MenuItem),(0,Oe.createElement)(r,{variant:"link",disabled:n,className:t,href:(0,lt.addQueryArgs)("edit.php",{post_type:"wp_navigation"})},(0,Ze.__)("Manage menus"))},ng=window.wp.privateApis;const{lock:og,unlock:rg}=(0,ng.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/block-library");var ag=function(e){let{onCreateNew:t}=e;return(0,Oe.createElement)(Qe.Warning,null,(0,Ze.__)("Navigation menu has been deleted or is unavailable. "),(0,Oe.createElement)(We.Button,{onClick:t,variant:"link"},(0,Ze.__)("Create a new menu?")))};const lg=(0,Ze.__)("Switch to '%s'"),ig=e=>{let{clientId:t,currentMenuId:n,isLoading:o,isNavigationMenuMissing:r,onCreateNew:a}=e;const{OffCanvasEditor:l,LeafMoreMenu:i}=rg(Qe.privateApis),s=(0,st.useSelect)((e=>{const{__unstableGetClientIdsTree:n}=e(Qe.store);return n(t)}),[t]),{navigationMenu:c}=mp(n);if(n&&r)return(0,Oe.createElement)("p",null,(0,Ze.__)("Select or create a menu"));if(n&&r)return(0,Oe.createElement)(ag,{onCreateNew:a});if(o)return(0,Oe.createElement)(We.Spinner,null);const u=c?(0,Ze.sprintf)((0,Ze.__)("Structure for navigation menu: %s"),(null==c?void 0:c.title)||(0,Ze.__)("Untitled menu")):(0,Ze.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,Oe.createElement)(l,{blocks:s,parentClientId:t,isExpanded:!0,LeafMoreMenu:i,description:u})};var sg=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:n,currentMenuId:o=null,onCreateNew:r,onSelectClassicMenu:a,onSelectNavigationMenu:l,isManageMenusButtonDisabled:i}=e;return(0,Oe.createElement)(Qe.InspectorControls,{group:"list"},(0,Oe.createElement)(We.PanelBody,{title:null},(0,Oe.createElement)(We.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header"},(0,Oe.createElement)(We.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2},(0,Ze.__)("Menu")),(0,Oe.createElement)(hp,{currentMenuId:o,onSelectClassicMenu:a,onSelectNavigationMenu:l,onCreateNew:r,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:n,actionLabel:lg,isManageMenusButtonDisabled:i})),(0,Oe.createElement)(ig,e)))};var cg=(0,Qe.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function(e){var t,n;let{attributes:o,setAttributes:r,clientId:a,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:f,overlayMenu:y,showSubmenuIcon:k,templateLock:x,layout:{justifyContent:w,orientation:E="horizontal",flexWrap:C="wrap"}={},hasIcon:S,icon:B="handle"}=o,T=o.ref,N=e=>{r({ref:e})},P=`navigationMenu/${T}`,I=(0,Qe.__experimentalUseHasRecursion)(P),{menus:z}=dp(),[M,R]=Ip({name:"block-library/core/navigation/status"}),[L,H]=Ip({name:"block-library/core/navigation/classic-menu-conversion"}),[A,V]=Ip({name:"block-library/core/navigation/permissions/update"}),{create:F,status:D,error:$,value:G,isPending:O,isSuccess:U,isError:q}=$p(a),j=()=>{F("")};(0,Oe.useEffect)((()=>{R(),O&&(0,sp.speak)((0,Ze.__)("Creating Navigation Menu.")),U&&(Fe(G.id,{focusNavigationBlock:!0}),M((0,Ze.__)("Navigation Menu successfully created."))),q&&M((0,Ze.__)("Failed to create Navigation Menu."))}),[D,$,G]);const{hasUncontrolledInnerBlocks:W,uncontrolledInnerBlocks:Z,isInnerBlockSelected:Q,innerBlocks:K}=function(e){return(0,st.useSelect)((t=>{const{getBlock:n,getBlocks:o,hasSelectedInnerBlock:r}=t(Qe.store),a=n(e).innerBlocks,l=!(null==a||!a.length),i=l?Kp:o(e);return{innerBlocks:l?a:i,hasUncontrolledInnerBlocks:l,uncontrolledInnerBlocks:a,controlledInnerBlocks:i,isInnerBlockSelected:r(e,!0)}}),[e])}(a),Y=!!K.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:J,selectBlock:X,__unstableMarkNextChangeAsNotPersistent:ee}=(0,st.useDispatch)(Qe.store),[te,ne]=(0,Oe.useState)(!1),[oe,re]=(0,Oe.useState)(!1),{hasResolvedNavigationMenus:ae,isNavigationMenuResolved:le,isNavigationMenuMissing:ie,navigationMenus:se,canUserUpdateNavigationMenu:ce,hasResolvedCanUserUpdateNavigationMenu:ue,canUserDeleteNavigationMenu:me,hasResolvedCanUserDeleteNavigationMenu:de,canUserCreateNavigationMenu:pe,isResolvingCanUserCreateNavigationMenu:ge,hasResolvedCanUserCreateNavigationMenu:he}=mp(T),ve=ae&&ie,{convert:be,status:_e,error:fe}=Qp(a),ye=_e===Wp,ke=(0,Oe.useMemo)((()=>{var e;return null==se||null===(e=se.filter((e=>"publish"===e.status)))||void 0===e?void 0:e.sort(((e,t)=>{const n=new Date(e.date),o=new Date(t.date);return n.getTime()<o.getTime()}))}),[se]);(0,Oe.useEffect)((()=>{W||O||T||null==ke||!ke.length||(ee(),N(ke[0].id))}),[T,O,ke,W]),(0,Oe.useEffect)((()=>{if(!ae||ye||(null==ke?void 0:ke.length)>0||null==z||!z.length)return;const e=z.filter((e=>e.locations.includes("primary")||"primary"===e.slug));e.length?be(e[0].id,e[0].name,"publish"):(z.sort(((e,t)=>t.id-e.id)),be(z[0].id,z[0].name,"publish"))}),[ae]);const xe=(0,Oe.useRef)(),we="nav",Ee=!T&&!O&&!ye&&ae&&0===(null==z?void 0:z.length)&&!W;(0,Oe.useEffect)((()=>{Ee&&(ee(),J(a,[(0,Ge.createBlock)("core/page-list")]))}),[a,Ee,T]);const Ce=!ie&&le,Se=!ae||O||ye||!(!T||Ce||ye),Be=null===(t=o.style)||void 0===t||null===(n=t.typography)||void 0===n?void 0:n.textDecoration,Te=(0,Qe.__experimentalUseBlockOverlayActive)(a),Ne=(0,Qe.useBlockProps)({ref:xe,className:at()(i,{"items-justified-right":"right"===w,"items-justified-space-between":"space-between"===w,"items-justified-left":"left"===w,"items-justified-center":"center"===w,"is-vertical":"vertical"===E,"no-wrap":"nowrap"===C,"is-responsive":"never"!==y,"has-text-color":!!u.color||!(null==u||!u.class),[(0,Qe.getColorClassName)("color",null==u?void 0:u.slug)]:!(null==u||!u.slug),"has-background":!!s.color||s.class,[(0,Qe.getColorClassName)("background-color",null==s?void 0:s.slug)]:!(null==s||!s.slug),[`has-text-decoration-${Be}`]:Be,"block-editor-block-content-overlay":Te}),style:{color:!(null!=u&&u.slug)&&(null==u?void 0:u.color),backgroundColor:!(null!=s&&s.slug)&&(null==s?void 0:s.color)}}),Pe="web"===Oe.Platform.OS,[Ie,ze]=(0,Oe.useState)(),[Me,Re]=(0,Oe.useState)(),[Le,He]=(0,Oe.useState)(),[Ae,Ve]=(0,Oe.useState)(),Fe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focusNavigationBlock:!1};const{focusNavigationBlock:n}=t;N(e),n&&X(a)},De=async e=>{const t=await be(e.id,e.name,"draft");t&&Fe(t.id,{focusNavigationBlock:!0})},$e=e=>{Fe(e)};(0,Oe.useEffect)((()=>{H(),_e===Wp&&(0,sp.speak)((0,Ze.__)("Classic menu importing.")),_e===qp&&L((0,Ze.__)("Classic menu imported successfully.")),_e===jp&&L((0,Ze.__)("Classic menu import failed."))}),[_e,fe]),(0,Oe.useEffect)((()=>{E&&(ee(),r({orientation:E}))}),[E]),(0,Oe.useEffect)((()=>{var e;if(!Pe)return;Jp(xe.current,Re,ze);const t=null===(e=xe.current)||void 0===e?void 0:e.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');t&&(g.color||d.color)&&Jp(t,Ve,He)})),(0,Oe.useEffect)((()=>{l||Q||V(),(l||Q)&&(T&&!ve&&ue&&!ce&&A((0,Ze.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),T||!he||pe||A((0,Ze.__)("You do not have permission to create Navigation Menus.")))}),[l,Q,ce,ue,pe,he,T]);const Ue=pe||ce,qe="never"!==y,je=at()("wp-block-navigation__overlay-menu-preview",{open:oe}),Ke=(0,Qe.__experimentalUseMultipleOriginColorsAndGradients)(),Ye=(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,v&&(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Display")},qe&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.Button,{className:je,onClick:()=>{re(!oe)}},S&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(_p,{icon:B}),(0,Oe.createElement)(cp,{icon:up})),!S&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("span",null,(0,Ze.__)("Menu")),(0,Oe.createElement)("span",null,(0,Ze.__)("Close")))),oe&&(0,Oe.createElement)(zp,{setAttributes:r,hasIcon:S,icon:B})),(0,Oe.createElement)("h3",null,(0,Ze.__)("Overlay Menu")),(0,Oe.createElement)(We.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Configure overlay menu"),value:y,help:(0,Ze.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>r({overlayMenu:e}),isBlock:!0,hideLabelFromVision:!0},(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"never",label:(0,Ze.__)("Off")}),(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,Ze.__)("Mobile")}),(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"always",label:(0,Ze.__)("Always")})),Y&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("h3",null,(0,Ze.__)("Submenus")),(0,Oe.createElement)(We.ToggleControl,{checked:f,onChange:e=>{r({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,Ze.__)("Open on click")}),(0,Oe.createElement)(We.ToggleControl,{checked:k,onChange:e=>{r({showSubmenuIcon:e})},disabled:o.openSubmenusOnClick,label:(0,Ze.__)("Show arrow")})))),(0,Oe.createElement)(Qe.InspectorControls,{group:"color"},b&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.__experimentalColorGradientSettingsDropdown,ot({__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:u.color,label:(0,Ze.__)("Text"),onColorChange:m,resetAllFilter:()=>m()},{colorValue:s.color,label:(0,Ze.__)("Background"),onColorChange:c,resetAllFilter:()=>c()},{colorValue:g.color,label:(0,Ze.__)("Submenu & overlay text"),onColorChange:h,resetAllFilter:()=>h()},{colorValue:d.color,label:(0,Ze.__)("Submenu & overlay background"),onColorChange:p,resetAllFilter:()=>p()}],panelId:a},Ke,{gradients:[],disableCustomGradients:!0})),Pe&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.ContrastChecker,{backgroundColor:Ie,textColor:Me}),(0,Oe.createElement)(Qe.ContrastChecker,{backgroundColor:Le,textColor:Ae}))))),Je=!Ue||!ae;if(W&&!Ce&&!O)return(0,Oe.createElement)(we,Ne,(0,Oe.createElement)(sg,{clientId:a,createNavigationMenuIsSuccess:U,createNavigationMenuIsError:q,currentMenuId:T,isNavigationMenuMissing:ie,isManageMenusButtonDisabled:Je,onCreateNew:j,onSelectClassicMenu:De,onSelectNavigationMenu:$e,isLoading:Se}),Ye,(0,Oe.createElement)(fp,{id:a,onToggle:ne,isOpen:te,hasIcon:S,icon:B,isResponsive:"never"!==y,isHiddenByDefault:"always"===y,overlayBackgroundColor:d,overlayTextColor:g},(0,Oe.createElement)(Np,{createNavigationMenu:F,blocks:Z,hasSelection:l||Q})));if(T&&ie)return(0,Oe.createElement)(we,Ne,(0,Oe.createElement)(sg,{clientId:a,createNavigationMenuIsSuccess:U,createNavigationMenuIsError:q,isNavigationMenuMissing:ie,isManageMenusButtonDisabled:Je,onCreateNew:j,onSelectClassicMenu:De,onSelectNavigationMenu:$e,isLoading:Se}),(0,Oe.createElement)(ag,{onCreateNew:j}));if(Ce&&I)return(0,Oe.createElement)("div",Ne,(0,Oe.createElement)(Qe.Warning,null,(0,Ze.__)("Block cannot be rendered inside itself.")));const Xe=_||vp;return Ee&&_?(0,Oe.createElement)(we,Ne,(0,Oe.createElement)(Xe,{isSelected:l,currentMenuId:T,clientId:a,canUserCreateNavigationMenu:pe,isResolvingCanUserCreateNavigationMenu:ge,onSelectNavigationMenu:$e,onSelectClassicMenu:De,onCreateEmpty:j})):(0,Oe.createElement)(it.EntityProvider,{kind:"postType",type:"wp_navigation",id:T},(0,Oe.createElement)(Qe.__experimentalRecursionProvider,{uniqueId:P},(0,Oe.createElement)(sg,{clientId:a,createNavigationMenuIsSuccess:U,createNavigationMenuIsError:q,currentMenuId:T,isNavigationMenuMissing:ie,isManageMenusButtonDisabled:Je,onCreateNew:j,onSelectClassicMenu:De,onSelectNavigationMenu:$e,isLoading:Se}),Ye,Ce&&(0,Oe.createElement)(Qe.InspectorControls,{group:"advanced"},ue&&ce&&(0,Oe.createElement)(wp,null),de&&me&&(0,Oe.createElement)(Pp,{onDelete:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";J(a,[]),M((0,Ze.sprintf)((0,Ze.__)("Navigation menu %s successfully deleted."),e))}}),(0,Oe.createElement)(tg,{disabled:Je,className:"wp-block-navigation-manage-menus-button"})),Se&&(0,Oe.createElement)(we,Ne,(0,Oe.createElement)("div",{className:"wp-block-navigation__loading-indicator-container"},(0,Oe.createElement)(We.Spinner,{className:"wp-block-navigation__loading-indicator"}))),!Se&&(0,Oe.createElement)(we,Ne,(0,Oe.createElement)(fp,{id:a,onToggle:ne,label:(0,Ze.__)("Menu"),hasIcon:S,icon:B,isOpen:te,isResponsive:qe,isHiddenByDefault:"always"===y,overlayBackgroundColor:d,overlayTextColor:g},Ce&&(0,Oe.createElement)(xp,{clientId:a,hasCustomPlaceholder:!!_,templateLock:x,orientation:E})))))}));const ug={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},mg=e=>{let{navigationMenuId:t,...n}=e;return{...n,ref:t}},dg=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},pg={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(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)},isEligible:e=>{let{navigationMenuId:t}=e;return!!t},migrate:mg},gg={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(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)},isEligible:e=>{let{itemsJustification:t,orientation:n}=e;return!!t||!!n},migrate:(0,St.compose)(mg,dg)},hg={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(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)},migrate:(0,St.compose)(mg,dg,Xt),isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},vg=[pg,gg,hg,{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){return e.isResponsive},migrate:(0,St.compose)(mg,dg,Xt,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save(){return(0,Oe.createElement)(Qe.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(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)},isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in ug){const n=e.style.typography[t];if(n&&n.startsWith(ug[t]))return!0}return!1},migrate:(0,St.compose)(mg,dg,Xt,(function(e){return{...e,style:{...e.style,typography:(0,Nt.mapValues)(e.style.typography,((e,t)=>{const n=ug[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){return e.rgbTextColor||e.rgbBackgroundColor},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,St.compose)(mg,(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(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)}}];var bg=vg;const _g={$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},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},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"],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,allowSizingOnChildren:!0,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:fg}=_g,yg={icon:ip,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,Ze.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,Ze.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,Ze.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:cg,save:function(e){let{attributes:t}=e;if(!t.ref)return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)},deprecated:bg},kg=()=>je({name:fg,metadata:_g,settings:yg});var xg=(0,Oe.createElement)(Ue.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var wg=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));function Eg(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 Cg(e){let{clientId:t}=e;const{getBlock:n,blockTransforms:o}=(0,st.useSelect)((e=>{const{getBlock:n,getBlockRootClientId:o,getBlockTransformItems:r}=e(Qe.store);return{getBlock:n,blockTransforms:r(n(t),o(t))}}),[t]),{replaceBlock:r}=(0,st.useDispatch)(Qe.store),a=["core/page-list","core/site-logo","core/social-links","core/search"],l=o.filter((e=>a.includes(e.name)));return null!=l&&l.length&&t?(0,Oe.createElement)("div",{className:"link-control-transform"},(0,Oe.createElement)("h3",{className:"link-control-transform__subheading"},(0,Ze.__)("Transform")),(0,Oe.createElement)("div",{className:"link-control-transform__items"},l.map(((e,o)=>(0,Oe.createElement)(We.Button,{key:`transform-${o}`,onClick:()=>r(t,(0,Ge.switchToBlockType)(n(t),e.name)),className:"link-control-transform__item"},(0,Oe.createElement)(Qe.BlockIcon,{icon:e.icon}),e.title))))):null}function Sg(e){const{saveEntityRecord:t}=(0,st.useDispatch)(it.store);const{label:n,url:o,opensInNewTab:r,type:a,kind:l}=e.link,i={url:o,opensInNewTab:r,title:n&&(0,Wd.__unstableStripHTML)(n)};return(0,Oe.createElement)(We.Popover,{placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0},(0,Oe.createElement)(Qe.__experimentalLinkControl,{hasTextControl:!0,hasRichPreviews:!0,className:e.className,value:i,showInitialSuggestions:!0,withCreateSuggestion:e.hasCreateSuggestion,createSuggestion:async function(n){const o=e.link.type||"page",r=await t("postType",o,{title:n,status:"draft"});return{id:r.id,type:o,title:(0,Gn.decodeEntities)(r.title.rendered),url:r.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;return t="post"===a?(0,Ze.__)("Create draft post: <mark>%s</mark>"):(0,Ze.__)("Create draft page: <mark>%s</mark>"),(0,Oe.createInterpolateElement)((0,Ze.sprintf)(t,e),{mark:(0,Oe.createElement)("mark",null)})},noDirectEntry:!!a,noURLSuggestion:!!a,suggestionsQuery:Eg(a,l),onChange:e.onChange,onRemove:e.onRemove,renderControlBottom:o?null:()=>(0,Oe.createElement)(Cg,{clientId:e.clientId})}))}var Bg=window.wp.escapeHtml;const Tg=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:r="",type:a=""}=n,{title:l="",url:i="",opensInNewTab:s,id:c,kind:u=r,type:m=a}=e,d=l.replace(/http(s?):\/\//gi,""),p=i.replace(/http(s?):\/\//gi,""),g=l&&l!==o&&d!==p,h=g?(0,Bg.escapeHTML)(l):o||(0,Bg.escapeHTML)(p),v="post_tag"===m?"tag":m.replace("-","_"),b=["post","page","tag","category"].indexOf(v)>-1,_=!u&&!b||"custom"===u,f=_?"custom":u;t({url:i?encodeURI((0,lt.safeDecodeURI)(i)):i,...h&&{label:h},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},...f&&{kind:f},...v&&"URL"!==v&&{type:v}})},{name:Ng}={$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"};var Pg=(0,Oe.createElement)(Ue.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M4 20h16v-1.5H4V20zm0-4.8h16v-1.5H4v1.5zm0-6.4v1.5h16V8.8H4zM16 4H4v1.5h12V4z"}));var Ig=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var zg=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var Mg=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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 Rg(e){switch(e){case"post":return Pg;case"page":return Ig;case"tag":return zg;case"category":return $n;default:return Mg}}function Lg(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:Rg(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:n}}return e}const Hg={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")},{type:"block",blocks:["core/page-list"],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"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,Ge.createBlock)("core/page-list")}]};var Ag=Hg;const Vg={$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:Fg}=Vg,Dg={icon:xg,__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:r,mergeBlocks:a,onReplace:l,context:i,clientId:s}=e;const{id:c,label:u,type:m,url:d,description:p,rel:g,title:h,kind:v}=t,[b,_]=((e,t,n)=>{const o="post-type"===e||"post"===t||"page"===t,r=Number.isInteger(n),a=(0,st.useSelect)((e=>{var r;if(!o)return null;const{getEntityRecord:a}=e(it.store);return null===(r=a("postType",t,n))||void 0===r?void 0:r.status}),[o,t,n]);return[o&&r&&a&&"trash"===a,"draft"===a]})(v,m,c),{maxNestingLevel:f}=i,{replaceBlock:y,__unstableMarkNextChangeAsNotPersistent:k}=(0,st.useDispatch)(Qe.store),[x,w]=(0,Oe.useState)(!1),[E,C]=(0,Oe.useState)(null),S=(0,Oe.useRef)(null),B=(e=>{const[t,n]=(0,Oe.useState)(!1);return(0,Oe.useEffect)((()=>{const{ownerDocument:t}=e.current;function o(e){a(e)}function r(){n(!1)}function a(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",o),t.addEventListener("dragend",r),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",o),t.removeEventListener("dragend",r),t.removeEventListener("dragenter",a)}}),[]),t})(S),T=(0,Ze.__)("Add label…"),N=(0,Oe.useRef)(),P=(0,it.useResourcePermissions)("pages"),I=(0,it.useResourcePermissions)("posts"),{innerBlocks:z,isAtMaxNesting:M,isTopLevelLink:R,isParentOfSelectedBlock:L,hasChildren:H}=(0,st.useSelect)((e=>{const{getBlocks:t,getBlockCount:n,getBlockName:o,getBlockRootClientId:r,hasSelectedInnerBlock:a,getBlockParentsByBlockName:l}=e(Qe.store);return{innerBlocks:t(s),isAtMaxNesting:l(s,[Ng,"core/navigation-submenu"]).length>=f,isTopLevelLink:"core/navigation"===o(r(s)),isParentOfSelectedBlock:a(s,!0),hasChildren:!!n(s)}}),[s]);function A(){const e=(0,Ge.createBlock)("core/navigation-submenu",t,z.length>0?z:[(0,Ge.createBlock)("core/navigation-link")]);y(s,e)}(0,Oe.useEffect)((()=>{d||w(!0)}),[d]),(0,Oe.useEffect)((()=>{H&&(k(),A())}),[H]),(0,Oe.useEffect)((()=>{n||w(!1)}),[n]),(0,Oe.useEffect)((()=>{x&&d&&((0,lt.isURL)((0,lt.prependHTTP)(u))&&/^.+\.[a-z]+/.test(u)?function(){N.current.focus();const{ownerDocument:e}=N.current,{defaultView:t}=e,n=t.getSelection(),o=e.createRange();o.selectNodeContents(N.current),n.removeAllRanges(),n.addRange(o)}():(0,Wd.placeCaretAtHorizontalEdge)(N.current,!0))}),[d]);let V=!1;m&&"page"!==m?"post"===m&&(V=I.canCreate):V=P.canCreate;const{textColor:F,customTextColor:D,backgroundColor:$,customBackgroundColor:G}=Xp(i,!R),O=(0,Qe.useBlockProps)({ref:(0,St.useMergeRefs)([C,S]),className:at()("wp-block-navigation-item",{"is-editing":n||L,"is-dragging-within":B,"has-link":!!d,"has-child":H,"has-text-color":!!F||!!D,[(0,Qe.getColorClassName)("color",F)]:!!F,"has-background":!!$||G,[(0,Qe.getColorClassName)("background-color",$)]:!!$}),style:{color:!F&&D,backgroundColor:!$&&G},onKeyDown:function(e){(cn.isKeyboardEvent.primary(e,"k")||!d&&e.keyCode===cn.ENTER)&&w(!0)}}),U=(0,Qe.useInnerBlocksProps)({...O,className:"remove-outline"},{allowedBlocks:["core/navigation-link","core/navigation-submenu","core/page-list"],__experimentalDefaultBlock:{name:"core/navigation-link"},__experimentalDirectInsert:!0,renderAppender:!1});(!d||b||_)&&(O.onClick=()=>w(!0));const q=at()("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!d||b||_}),j=function(e){let t="";switch(e){case"post":t=(0,Ze.__)("Select post");break;case"page":t=(0,Ze.__)("Select page");break;case"category":t=(0,Ze.__)("Select category");break;case"tag":t=(0,Ze.__)("Select tag");break;default:t=(0,Ze.__)("Add link")}return t}(m),W=`(${b?(0,Ze.__)("Invalid"):(0,Ze.__)("Draft")})`,Z=b||_?(0,Ze.__)("This item has been deleted, or is a draft"):(0,Ze.__)("This item is missing a link");return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,(0,Oe.createElement)(We.ToolbarButton,{name:"link",icon:un,title:(0,Ze.__)("Link"),shortcut:cn.displayShortcut.primary("k"),onClick:()=>w(!0)}),!M&&(0,Oe.createElement)(We.ToolbarButton,{name:"submenu",icon:wg,title:(0,Ze.__)("Add submenu"),onClick:A}))),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Link settings")},(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,value:u?(0,Wd.__unstableStripHTML)(u):"",onChange:e=>{o({label:e})},label:(0,Ze.__)("Label"),autoComplete:"off"}),(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,value:d||"",onChange:e=>{Tg({url:e},o,t)},label:(0,Ze.__)("URL"),autoComplete:"off"}),(0,Oe.createElement)(We.TextareaControl,{__nextHasNoMarginBottom:!0,value:p||"",onChange:e=>{o({description:e})},label:(0,Ze.__)("Description"),help:(0,Ze.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,value:h||"",onChange:e=>{o({title:e})},label:(0,Ze.__)("Link title"),autoComplete:"off"}),(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,value:g||"",onChange:e=>{o({rel:e})},label:(0,Ze.__)("Link rel"),autoComplete:"off"}))),(0,Oe.createElement)("div",O,(0,Oe.createElement)("a",{className:q},d?(0,Oe.createElement)(Oe.Fragment,null,!b&&!_&&(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.RichText,{ref:N,identifier:"label",className:"wp-block-navigation-item__label",value:u,onChange:e=>o({label:e}),onMerge:a,onReplace:l,__unstableOnSplitAtEnd:()=>r((0,Ge.createBlock)("core/navigation-link")),"aria-label":(0,Ze.__)("Navigation link text"),placeholder:T,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{d||w(!0)}}),p&&(0,Oe.createElement)("span",{className:"wp-block-navigation-item__description"},p)),(b||_)&&(0,Oe.createElement)("div",{className:"wp-block-navigation-link__placeholder-text wp-block-navigation-link__label"},(0,Oe.createElement)(We.KeyboardShortcuts,{shortcuts:{enter:()=>n&&w(!0)}}),(0,Oe.createElement)(We.Tooltip,{position:"top center",text:Z},(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("span",{"aria-label":(0,Ze.__)("Navigation link text")},`${(0,Gn.decodeEntities)(u)} ${W}`.trim()),(0,Oe.createElement)("span",{className:"wp-block-navigation-link__missing_text-tooltip"},Z))))):(0,Oe.createElement)("div",{className:"wp-block-navigation-link__placeholder-text"},(0,Oe.createElement)(We.Tooltip,{position:"top center",text:Z},(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("span",null,j),(0,Oe.createElement)("span",{className:"wp-block-navigation-link__missing_text-tooltip"},Z)))),x&&(0,Oe.createElement)(Sg,{className:"wp-block-navigation-link__inline-link-input",clientId:s,link:t,onClose:()=>w(!1),anchor:E,hasCreateSuggestion:V,onRemove:function(){o({url:"",label:"",id:"",kind:"",type:""}),w(!1)},onChange:e=>{Tg(e,o,t)}})),(0,Oe.createElement)("div",U)))},save:function(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)},example:{attributes:{label:(0,Ze._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible(e){return 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(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)}}],transforms:Ag},$g=()=>((0,Jl.addFilter)("blocks.registerBlockType","core/navigation-link",Lg),je({name:Fg,metadata:Vg,settings:Dg}));var Gg=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const Og=()=>(0,Oe.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,Oe.createElement)(We.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})),{name:Ug}={$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"},qg=["core/navigation-link","core/navigation-submenu","core/page-list"],jg={name:"core/navigation-link"};const Wg={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")}]};var Zg=Wg;const Qg={$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:Kg}=Qg,Yg={icon:e=>{let{context:t}=e;return"list-view"===t?Ig:wg},__experimentalLabel:e=>{let{label:t}=e;return t},edit:function(e){let{attributes:t,isSelected:n,setAttributes:o,mergeBlocks:r,onReplace:a,context:l,clientId:i}=e;const{label:s,type:c,url:u,description:m,rel:d,title:p}=t,{showSubmenuIcon:g,maxNestingLevel:h,openSubmenusOnClick:v}=l,{__unstableMarkNextChangeAsNotPersistent:b,replaceBlock:_}=(0,st.useDispatch)(Qe.store),[f,y]=(0,Oe.useState)(!1),[k,x]=(0,Oe.useState)(null),w=(0,Oe.useRef)(null),E=(e=>{const[t,n]=(0,Oe.useState)(!1);return(0,Oe.useEffect)((()=>{const{ownerDocument:t}=e.current;function o(e){a(e)}function r(){n(!1)}function a(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",o),t.addEventListener("dragend",r),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",o),t.removeEventListener("dragend",r),t.removeEventListener("dragenter",a)}}),[]),t})(w),C=(0,Ze.__)("Add text…"),S=(0,Oe.useRef)(),B=(0,it.useResourcePermissions)("pages"),T=(0,it.useResourcePermissions)("posts"),{isAtMaxNesting:N,isTopLevelItem:P,isParentOfSelectedBlock:I,isImmediateParentOfSelectedBlock:z,hasChildren:M,selectedBlockHasChildren:R,onlyDescendantIsEmptyLink:L}=(0,st.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:n,getBlockParentsByBlockName:o,getBlock:r,getBlockCount:a,getBlockOrder:l}=e(Qe.store);let s;const c=l(n());if(1===(null==c?void 0:c.length)){var u;const e=r(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,Ug).length>=h,isTopLevelItem:0===o(i,Ug).length,isParentOfSelectedBlock:t(i,!0),isImmediateParentOfSelectedBlock:t(i,!1),hasChildren:!!a(i),selectedBlockHasChildren:!(null==c||!c.length),onlyDescendantIsEmptyLink:s}}),[i]),H=(0,St.usePrevious)(M);(0,Oe.useEffect)((()=>{v||u||y(!0)}),[]),(0,Oe.useEffect)((()=>{n||y(!1)}),[n]),(0,Oe.useEffect)((()=>{f&&u&&((0,lt.isURL)((0,lt.prependHTTP)(s))&&/^.+\.[a-z]+/.test(s)?function(){S.current.focus();const{ownerDocument:e}=S.current,{defaultView:t}=e,n=t.getSelection(),o=e.createRange();o.selectNodeContents(S.current),n.removeAllRanges(),n.addRange(o)}():(0,Wd.placeCaretAtHorizontalEdge)(S.current,!0))}),[u]);let A=!1;c&&"page"!==c?"post"===c&&(A=T.canCreate):A=B.canCreate;const{textColor:V,customTextColor:F,backgroundColor:D,customBackgroundColor:$}=Xp(l,!P),G=(0,Qe.useBlockProps)({ref:(0,St.useMergeRefs)([x,w]),className:at()("wp-block-navigation-item",{"is-editing":n||I,"is-dragging-within":E,"has-link":!!u,"has-child":M,"has-text-color":!!V||!!F,[(0,Qe.getColorClassName)("color",V)]:!!V,"has-background":!!D||$,[(0,Qe.getColorClassName)("background-color",D)]:!!D,"open-on-click":v}),style:{color:!V&&F,backgroundColor:!D&&$},onKeyDown:function(e){cn.isKeyboardEvent.primary(e,"k")&&y(!0)}}),O=Xp(l,!0),U=N?qg.filter((e=>"core/navigation-submenu"!==e)):qg,q=eg(O),j=(0,Qe.useInnerBlocksProps)(q,{allowedBlocks:U,__experimentalDefaultBlock:jg,__experimentalDirectInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(n||z&&!R||M)&&Qe.InnerBlocks.ButtonBlockAppender}),W=v?"button":"a";function Z(){const e=(0,Ge.createBlock)("core/navigation-link",t);_(i,e)}(0,Oe.useEffect)((()=>{!M&&H&&(b(),Z())}),[M,H]);const Q=!R||L;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,!v&&(0,Oe.createElement)(We.ToolbarButton,{name:"link",icon:un,title:(0,Ze.__)("Link"),shortcut:cn.displayShortcut.primary("k"),onClick:()=>y(!0)}),(0,Oe.createElement)(We.ToolbarButton,{name:"revert",icon:Gg,title:(0,Ze.__)("Convert to Link"),onClick:Z,className:"wp-block-navigation__submenu__revert",isDisabled:!Q}))),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Link settings")},(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,value:s||"",onChange:e=>{o({label:e})},label:(0,Ze.__)("Label"),autoComplete:"off"}),(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,value:u||"",onChange:e=>{o({url:e})},label:(0,Ze.__)("URL"),autoComplete:"off"}),(0,Oe.createElement)(We.TextareaControl,{__nextHasNoMarginBottom:!0,value:m||"",onChange:e=>{o({description:e})},label:(0,Ze.__)("Description"),help:(0,Ze.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,value:p||"",onChange:e=>{o({title:e})},label:(0,Ze.__)("Link title"),autoComplete:"off"}),(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,value:d||"",onChange:e=>{o({rel:e})},label:(0,Ze.__)("Link rel"),autoComplete:"off"}))),(0,Oe.createElement)("div",G,(0,Oe.createElement)(W,{className:"wp-block-navigation-item__content"},(0,Oe.createElement)(Qe.RichText,{ref:S,identifier:"label",className:"wp-block-navigation-item__label",value:s,onChange:e=>o({label:e}),onMerge:r,onReplace:a,"aria-label":(0,Ze.__)("Navigation link text"),placeholder:C,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{v||u||y(!0)}}),!v&&f&&(0,Oe.createElement)(Sg,{className:"wp-block-navigation-link__inline-link-input",clientId:i,link:t,onClose:()=>y(!1),anchor:k,hasCreateSuggestion:A,onRemove:()=>{o({url:""}),(0,sp.speak)((0,Ze.__)("Link removed."),"assertive")},onChange:e=>{Tg(e,o,t)}})),(g||v)&&(0,Oe.createElement)("span",{className:"wp-block-navigation__submenu-icon"},(0,Oe.createElement)(Og,null)),(0,Oe.createElement)("div",j)))},save:function(){return(0,Oe.createElement)(Qe.InnerBlocks.Content,null)},transforms:Zg},Jg=()=>je({name:Kg,metadata:Qg,settings:Yg});var Xg=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var eh={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform(){return(0,Ge.createBlock)("core/nextpage",{})}}]};const th={$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:nh}=th,oh={icon:Xg,example:{},transforms:eh,edit:function(){return(0,Oe.createElement)("div",(0,Qe.useBlockProps)(),(0,Oe.createElement)("span",null,(0,Ze.__)("Page break")))},save:function(){return(0,Oe.createElement)(Oe.RawHTML,null,"\x3c!--nextpage--\x3e")}},rh=()=>je({name:nh,metadata:th,settings:oh});var ah=e=>{let{attributes:t,clientId:n}=e;const o=(0,st.useSelect)((e=>e(Qe.store).__experimentalGetParsedPattern(t.slug)),[t.slug]),{replaceBlocks:r,__unstableMarkNextChangeAsNotPersistent:a}=(0,st.useDispatch)(Qe.store);(0,Oe.useEffect)((()=>{null!=o&&o.blocks&&window.queueMicrotask((()=>{a(),r(n,o.blocks)}))}),[n,null==o?void 0:o.blocks]);const l=(0,Qe.useBlockProps)();return(0,Oe.createElement)("div",l)};const lh={$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:ih}=lh,sh={edit:ah},ch=()=>je({name:ih,metadata:lh,settings:sh});var uh=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));function mh(e){let{clientId:t,pages:n}=e;const{replaceBlock:o,selectBlock:r}=(0,st.useDispatch)(Qe.store),{parentNavBlockClientId:a}=(0,st.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(Qe.store);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[t]);return()=>{const e=function(){const e={},t=[];(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((n=>{var o,r;let{id:a,title:l,link:i,type:s,parent:c}=n;const u=null!==(o=null===(r=e[a])||void 0===r?void 0:r.innerBlocks)&&void 0!==o?o:[];e[a]=(0,Ge.createBlock)("core/navigation-link",{id:a,label:l.rendered,url:i,type:s,kind:"post-type"},u),c?(e[c]||(e[c]={innerBlocks:[]}),e[c].innerBlocks.push(e[a])):t.push(e[a])}));const n=e=>{e.forEach(((e,t,o)=>{const{attributes:r,innerBlocks:a}=e;if(0!==a.length){n(a);const e=(0,Ge.createBlock)("core/navigation-submenu",r,a);o[t]=e}}))};return n(t),t}(n);o(t,e),r(a)}}const dh=()=>{},ph=(0,Ze.__)('This menu is automatically kept in sync with pages on your site. You can manage the menu yourself by clicking "Edit" below.');function gh(e){let{blockProps:t,innerBlocksProps:n,hasResolvedPages:o,blockList:r,pages:a,parentPageID:l}=e;if(!o)return(0,Oe.createElement)("div",t,(0,Oe.createElement)("div",{className:"wp-block-page-list__loading-indicator-container"},(0,Oe.createElement)(We.Spinner,{className:"wp-block-page-list__loading-indicator"})));if(null===a)return(0,Oe.createElement)("div",t,(0,Oe.createElement)(We.Notice,{status:"warning",isDismissible:!1},(0,Ze.__)("Page List: Cannot retrieve Pages.")));if(0===a.length)return(0,Oe.createElement)("div",t,(0,Oe.createElement)(We.Notice,{status:"info",isDismissible:!1},(0,Ze.__)("Page List: Cannot retrieve Pages.")));if(0===r.length){var i;const e=a.find((e=>e.id===l));return null!=e&&null!==(i=e.title)&&void 0!==i&&i.rendered?(0,Oe.createElement)("div",t,(0,Oe.createElement)(Qe.Warning,null,(0,Ze.sprintf)((0,Ze.__)('Page List: "%s" page has no children.'),e.title.rendered))):(0,Oe.createElement)("div",t,(0,Oe.createElement)(We.Notice,{status:"warning",isDismissible:!1},(0,Ze.__)("Page List: Cannot retrieve Pages.")))}return a.length>0?(0,Oe.createElement)("ul",n):void 0}function hh(e){let{onClick:t,disabled:n}=e;const[o,r]=(0,Oe.useState)(!1),a=()=>r(!1);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"other"},(0,Oe.createElement)(We.ToolbarButton,{title:(0,Ze.__)("Edit"),onClick:()=>r(!0)},(0,Ze.__)("Edit"))),o&&(0,Oe.createElement)(We.Modal,{onRequestClose:a,title:(0,Ze.__)("Edit this menu"),className:"wp-block-page-list-modal",aria:{describedby:"wp-block-page-list-modal__description"}},(0,Oe.createElement)("p",{id:"wp-block-page-list-modal__description"},ph),(0,Oe.createElement)("div",{className:"wp-block-page-list-modal-buttons"},(0,Oe.createElement)(We.Button,{variant:"tertiary",onClick:a},(0,Ze.__)("Cancel")),(0,Oe.createElement)(We.Button,{variant:"primary",disabled:n,onClick:t},(0,Ze.__)("Edit")))))}const vh={$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:{parentPageID:{type:"integer",default:0},isNested:{type:"boolean",default:!1}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],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-page-list-editor",style:"wp-block-page-list"},{name:bh}=vh,_h={icon:uh,example:{},edit:function(e){var t;let{context:n,clientId:o,attributes:r,setAttributes:a}=e;const{parentPageID:l}=r,{records:i,hasResolved:s}=(0,it.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),c="showSubmenuIcon"in n&&(null==i?void 0:i.length)>0&&(null==i?void 0:i.length)<=100,u=mh({clientId:o,pages:i}),m=(0,Oe.useMemo)((()=>{if(null===i)return new Map;const e=i.sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return e.reduce(((e,t)=>{const{parent:n}=t;return e.has(n)?e.get(n).push(t):e.set(n,[t]),e}),new Map)}),[i]),d=(0,Qe.useBlockProps)({className:at()("wp-block-page-list",{"has-text-color":!!n.textColor,[(0,Qe.getColorClassName)("color",n.textColor)]:!!n.textColor,"has-background":!!n.backgroundColor,[(0,Qe.getColorClassName)("background-color",n.backgroundColor)]:!!n.backgroundColor}),style:{...null===(t=n.style)||void 0===t?void 0:t.color}}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;const t=m.get(e);return null!=t&&t.length?t.reduce(((e,t)=>{var n,o;const r=m.has(t.id),a={id:t.id,label:null===(n=t.title)||void 0===n?void 0:n.rendered,title:null===(o=t.title)||void 0===o?void 0:o.rendered,link:t.url,hasChildren:r};let l=null;const i=p(t.id);return l=(0,Ge.createBlock)("core/page-list-item",a,i),e.push(l),e}),[]):[]},g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=m.get(e);return null!=n&&n.length?n.reduce(((e,n)=>{const o=m.has(n.id),r={value:n.id,label:"— ".repeat(t)+n.title.rendered,rawName:n.title.rendered};return e.push(r),o&&e.push(...g(n.id,t+1)),e}),[]):[]},h=(0,Oe.useMemo)(g,[m]),v=(0,Oe.useMemo)(p,[m,l]),b=(0,Qe.useInnerBlocksProps)(d,{allowedBlocks:["core/page-list-item"],renderAppender:!1,__unstableDisableDropZone:!0,templateLock:"all",onInput:dh,onChange:dh,value:v}),{isNested:_}=(0,st.useSelect)((e=>{const{getBlockParentsByBlockName:t}=e(Qe.store);return{isNested:t(o,"core/navigation-submenu",!0).length>0}}),[o]);return(0,Oe.useEffect)((()=>{a({isNested:_})}),[_]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,h.length>0&&(0,Oe.createElement)(We.PanelBody,null,(0,Oe.createElement)(We.ComboboxControl,{className:"editor-page-attributes__parent",label:(0,Ze.__)("Parent page"),value:l,options:h,onChange:e=>a({parentPageID:null!=e?e:0}),help:(0,Ze.__)("Choose a page to show only its subpages.")})),c&&(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Edit this menu")},(0,Oe.createElement)("p",null,ph),(0,Oe.createElement)(We.Button,{variant:"primary",disabled:!s,onClick:u},(0,Ze.__)("Edit")))),c&&(0,Oe.createElement)(hh,{disabled:!s,onClick:u}),(0,Oe.createElement)(gh,{blockProps:d,innerBlocksProps:b,hasResolvedPages:s,blockList:v,pages:i,parentPageID:l}))}},fh=()=>je({name:bh,metadata:vh,settings:_h}),yh=()=>(0,Oe.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,Oe.createElement)(We.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"}));const kh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/page-list-item",title:"Page List Item",category:"widgets",parent:["core/page-list"],description:"Displays a page inside a list of all pages.",keywords:["page","menu","navigation"],textdomain:"default",attributes:{id:{type:"number"},label:{type:"string"},title:{type:"string"},link:{type:"string"},hasChildren:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,lock:!1,inserter:!1,__experimentalToolbar:!1},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:xh}=kh,wh={__experimentalLabel:e=>{let{label:t}=e;return t},icon:Ig,example:{},edit:function(e){let{context:t,attributes:n}=e;const{id:o,label:r,link:a,hasChildren:l}=n,i="showSubmenuIcon"in t,s=(0,st.useSelect)((e=>{if(!e(it.store).canUser("read","settings"))return;const t=e(it.store).getEntityRecord("root","site");return"page"===(null==t?void 0:t.show_on_front)&&(null==t?void 0:t.page_on_front)}),[]),c=eg(Xp(t,!0)),u=(0,Qe.useBlockProps)(c,{className:"wp-block-pages-list__item"}),m=(0,Qe.useInnerBlocksProps)(u);return(0,Oe.createElement)("li",{key:o,className:at()("wp-block-pages-list__item",{"has-child":l,"wp-block-navigation-item":i,"open-on-click":t.openSubmenusOnClick,"open-on-hover-click":!t.openSubmenusOnClick&&t.showSubmenuIcon,"menu-item-home":o===s})},l&&t.openSubmenusOnClick?(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false"},(0,Gn.decodeEntities)(r)),(0,Oe.createElement)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"},(0,Oe.createElement)(yh,null))):(0,Oe.createElement)("a",{className:at()("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":i}),href:a},(0,Gn.decodeEntities)(r)),l&&(0,Oe.createElement)(Oe.Fragment,null,!t.openSubmenusOnClick&&t.showSubmenuIcon&&(0,Oe.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,Oe.createElement)(yh,null)),(0,Oe.createElement)("ul",m)))}},Eh=()=>je({name:xh,metadata:kh,settings:wh});var Ch=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const Sh={className:!1},Bh={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"}},Th=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:r,...a}=e;return{...a,style:t}},{style:Nh,...Ph}=Bh,Ih=[{supports:Sh,attributes:{...Ph,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},save(e){let{attributes:t}=e;const{align:n,content:o,dropCap:r,direction:a}=t,l=at()({"has-drop-cap":n!==((0,Ze.isRTL)()?"left":"right")&&"center"!==n&&r,[`has-text-align-${n}`]:n});return(0,Oe.createElement)("p",Qe.useBlockProps.save({className:l,dir:a}),(0,Oe.createElement)(Qe.RichText.Content,{value:o}))}},{supports:Sh,attributes:{...Ph,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Th,save(e){let{attributes:t}=e;const{align:n,content:o,dropCap:r,backgroundColor:a,textColor:l,customBackgroundColor:i,customTextColor:s,fontSize:c,customFontSize:u,direction:m}=t,d=(0,Qe.getColorClassName)("color",l),p=(0,Qe.getColorClassName)("background-color",a),g=(0,Qe.getFontSizeClass)(c),h=at()({"has-text-color":l||s,"has-background":a||i,"has-drop-cap":r,[`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,Oe.createElement)(Qe.RichText.Content,{tagName:"p",style:v,className:h||void 0,value:o,dir:m})}},{supports:Sh,attributes:{...Ph,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Th,save(e){let{attributes:t}=e;const{align:n,content:o,dropCap:r,backgroundColor:a,textColor:l,customBackgroundColor:i,customTextColor:s,fontSize:c,customFontSize:u,direction:m}=t,d=(0,Qe.getColorClassName)("color",l),p=(0,Qe.getColorClassName)("background-color",a),g=(0,Qe.getFontSizeClass)(c),h=at()({"has-text-color":l||s,"has-background":a||i,"has-drop-cap":r,[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,Oe.createElement)(Qe.RichText.Content,{tagName:"p",style:v,className:h||void 0,value:o,dir:m})}},{supports:Sh,attributes:{...Ph,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:Th,save(e){let{attributes:t}=e;const{width:n,align:o,content:r,dropCap:a,backgroundColor:l,textColor:i,customBackgroundColor:s,customTextColor:c,fontSize:u,customFontSize:m}=t,d=(0,Qe.getColorClassName)("color",i),p=(0,Qe.getColorClassName)("background-color",l),g=u&&`is-${u}-text`,h=at()({[`align${n}`]:n,"has-background":l||s,"has-drop-cap":a,[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,Oe.createElement)(Qe.RichText.Content,{tagName:"p",style:v,className:h||void 0,value:r})}},{supports:Sh,attributes:{...Ph,fontSize:{type:"number"}},save(e){let{attributes:t}=e;const{width:n,align:o,content:r,dropCap:a,backgroundColor:l,textColor:i,fontSize:s}=t,c=at()({[`align${n}`]:n,"has-background":l,"has-drop-cap":a}),u={backgroundColor:l,color:i,fontSize:s,textAlign:o};return(0,Oe.createElement)("p",{style:u,className:c||void 0},r)},migrate(e){return Th({...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:Sh,attributes:{...Bh,content:{type:"string",source:"html",default:""}},save(e){let{attributes:t}=e;return(0,Oe.createElement)(Oe.RawHTML,null,t.content)},migrate(e){return e}}];var zh=Ih;var Mh=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Oe.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 Rh(e){const{batch:t}=(0,st.useRegistry)(),{moveBlocksToPosition:n,replaceInnerBlocks:o,duplicateBlocks:r,insertBlock:a}=(0,st.useDispatch)(Qe.store),{getBlockRootClientId:l,getBlockIndex:i,getBlockOrder:s,getBlockName:c,getBlock:u,getNextBlockClientId:m}=(0,st.useSelect)(Qe.store),d=(0,Oe.useRef)(e);return d.current=e,(0,St.useRefEffect)((e=>{function p(e){if(e.defaultPrevented)return;if(e.keyCode!==cn.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((()=>{r([h]);const e=i(h);o(h,_.innerBlocks.slice(0,b)),o(m(h),_.innerBlocks.slice(b+1)),a((0,Ge.createBlock)("core/paragraph"),e+1,l(h),!0)}))}return e.addEventListener("keydown",p),()=>{e.removeEventListener("keydown",p)}}),[])}function Lh(e){let{direction:t,setDirection:n}=e;return(0,Ze.isRTL)()&&(0,Oe.createElement)(We.ToolbarButton,{icon:Mh,title:(0,Ze._x)("Left to right","editor button"),isActive:"ltr"===t,onClick:()=>{n("ltr"===t?void 0:"ltr")}})}function Hh(e){return e===((0,Ze.isRTL)()?"left":"right")||"center"===e}var Ah=function(e){let{attributes:t,mergeBlocks:n,onReplace:o,onRemove:r,setAttributes:a,clientId:l}=e;const{align:i,content:s,direction:c,dropCap:u,placeholder:m}=t,d=(0,Qe.useSetting)("typography.dropCap"),p=(0,Qe.useBlockProps)({ref:Rh({clientId:l,content:s}),className:at()({"has-drop-cap":!Hh(i)&&u,[`has-text-align-${i}`]:i}),style:{direction:c}});let g;return g=Hh(i)?(0,Ze.__)("Not available for aligned text."):u?(0,Ze.__)("Showing large initial letter."):(0,Ze.__)("Toggle to show a large initial letter."),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:i,onChange:e=>a({align:e,dropCap:!Hh(e)&&u})}),(0,Oe.createElement)(Lh,{direction:c,setDirection:e=>a({direction:e})})),d&&(0,Oe.createElement)(Qe.InspectorControls,{group:"typography"},(0,Oe.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!u,label:(0,Ze.__)("Drop cap"),onDeselect:()=>a({dropCap:void 0}),resetAllFilter:()=>({dropCap:void 0}),panelId:l},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Drop cap"),checked:!!u,onChange:()=>a({dropCap:!u}),help:g,disabled:!!Hh(i)}))),(0,Oe.createElement)(Qe.RichText,ot({identifier:"content",tagName:"p"},p,{value:s,onChange:e=>a({content:e}),onSplit:(e,n)=>{let o;(n||e)&&(o={...t,content:e});const r=(0,Ge.createBlock)("core/paragraph",o);return n&&(r.clientId=l),r},onMerge:n,onReplace:o,onRemove:r,"aria-label":s?(0,Ze.__)("Paragraph block"):(0,Ze.__)("Empty block; start writing or type forward slash to choose a block"),"data-empty":!s,placeholder:m||(0,Ze.__)("Type / to choose a block"),"data-custom-placeholder":!!m||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})))};const{name:Vh}={$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"},Fh={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)(Vh,e.outerHTML),{textAlign:n}=e.style||{};return"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),(0,Ge.createBlock)(Vh,t)}}]};var Dh=Fh;const $h={$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:Gh}=$h,Oh={icon:Ch,example:{attributes:{content:(0,Ze.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},__experimentalLabel(e,t){let{context:n}=t;if("accessibility"===n){const{content:t}=e;return t&&0!==t.length?t:(0,Ze.__)("Empty")}},transforms:Dh,deprecated:zh,merge(e,t){return{content:(e.content||"")+(t.content||"")}},edit:Ah,save:function(e){let{attributes:t}=e;const{align:n,content:o,dropCap:r,direction:a}=t,l=at()({"has-drop-cap":n!==((0,Ze.isRTL)()?"left":"right")&&"center"!==n&&r,[`has-text-align-${n}`]:n});return(0,Oe.createElement)("p",Qe.useBlockProps.save({className:l,dir:a}),(0,Oe.createElement)(Qe.RichText.Content,{value:o}))}},Uh=()=>je({name:Gh,metadata:$h,settings:Oh});var qh=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.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"}));const jh={who:"authors",per_page:100};var Wh=function(e){let{isSelected:t,context:{postType:n,postId:o,queryId:r},attributes:a,setAttributes:l}=e;const i=Number.isFinite(r),{authorId:s,authorDetails:c,authors:u}=(0,st.useSelect)((e=>{var t;const{getEditedEntityRecord:r,getUser:a,getUsers:l}=e(it.store),i=null===(t=r("postType",n,o))||void 0===t?void 0:t.author;return{authorId:i,authorDetails:i?a(i):null,authors:l(jh)}}),[n,o]),{editEntityRecord:m}=(0,st.useDispatch)(it.store),{textAlign:d,showAvatar:p,showBio:g,byline:h,isLink:v,linkTarget:b}=a,_=[],f=(null==c?void 0:c.name)||(0,Ze.__)("Post Author");null!=c&&c.avatar_urls&&Object.keys(c.avatar_urls).forEach((e=>{_.push({value:e,label:`${e} x ${e}`})}));const y=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${d}`]:d})}),k=null!=u&&u.length?u.map((e=>{let{id:t,name:n}=e;return{value:t,label:n}})):[],x=e=>{m("postType",n,o,{author:e})},w=k.length>=25;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},!!o&&!i&&k.length&&(w&&(0,Oe.createElement)(We.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Author"),options:k,value:s,onChange:x,allowReset:!1})||(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Author"),value:s,options:k,onChange:x})),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show avatar"),checked:p,onChange:()=>l({showAvatar:!p})}),p&&(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Avatar size"),value:a.avatarSize,options:_,onChange:e=>{l({avatarSize:Number(e)})}}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show bio"),checked:g,onChange:()=>l({showBio:!g})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Link author name to author page"),checked:v,onChange:()=>l({isLink:!v})}),v&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Open in new tab"),onChange:e=>l({linkTarget:e?"_blank":"_self"}),checked:"_blank"===b}))),(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:d,onChange:e=>{l({textAlign:e})}})),(0,Oe.createElement)("div",y,p&&(null==c?void 0:c.avatar_urls)&&(0,Oe.createElement)("div",{className:"wp-block-post-author__avatar"},(0,Oe.createElement)("img",{width:a.avatarSize,src:c.avatar_urls[a.avatarSize],alt:c.name})),(0,Oe.createElement)("div",{className:"wp-block-post-author__content"},(!Qe.RichText.isEmpty(h)||t)&&(0,Oe.createElement)(Qe.RichText,{className:"wp-block-post-author__byline",multiline:!1,"aria-label":(0,Ze.__)("Post author byline text"),placeholder:(0,Ze.__)("Write byline…"),value:h,onChange:e=>l({byline:e})}),(0,Oe.createElement)("p",{className:"wp-block-post-author__name"},v?(0,Oe.createElement)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault()},f):f),g&&(0,Oe.createElement)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:null==c?void 0:c.description}}))))};const Zh={$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:Qh}=Zh,Kh={icon:qh,edit:Wh},Yh=()=>je({name:Qh,metadata:Zh,settings:Kh});var Jh=function(e){let{context:{postType:t,postId:n},attributes:{textAlign:o,isLink:r,linkTarget:a},setAttributes:l}=e;const{authorName:i}=(0,st.useSelect)((e=>{var o;const{getEditedEntityRecord:r,getUser:a}=e(it.store),l=null===(o=r("postType",t,n))||void 0===o?void 0:o.author;return{authorName:l?a(l):null}}),[t,n]),s=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${o}`]:o})}),c=(null==i?void 0:i.name)||(0,Ze.__)("Author Name"),u=r?(0,Oe.createElement)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link"},c):c;return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:o,onChange:e=>{l({textAlign:e})}})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Link settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Link to author archive"),onChange:()=>l({isLink:!r}),checked:r}),r&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Open in new tab"),onChange:e=>l({linkTarget:e?"_blank":"_self"}),checked:"_blank"===a}))),(0,Oe.createElement)("div",s," ",u," "))};var Xh={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})}}]};const ev={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,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:tv}=ev,nv={icon:qh,transforms:Xh,edit:Jh},ov=()=>je({name:tv,metadata:ev,settings:nv});var rv=function(e){let{context:{postType:t,postId:n},attributes:{textAlign:o},setAttributes:r}=e;const{authorDetails:a}=(0,st.useSelect)((e=>{var o;const{getEditedEntityRecord:r,getUser:a}=e(it.store),l=null===(o=r("postType",t,n))||void 0===o?void 0:o.author;return{authorDetails:l?a(l):null}}),[t,n]),l=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${o}`]:o})}),i=(null==a?void 0:a.description)||(0,Ze.__)("Author Biography");return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:o,onChange:e=>{r({textAlign:e})}})),(0,Oe.createElement)("div",ot({},l,{dangerouslySetInnerHTML:{__html:i}})))};const av={$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:lv}=av,iv={icon:qh,edit:rv},sv=()=>je({name:lv,metadata:av,settings:iv});var cv=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const uv=["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],mv=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];const dv={$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:pv}=dv,gv={icon:em,edit:function(e){let{attributes:{commentId:t},setAttributes:n}=e;const[o,r]=(0,Oe.useState)(t),a=(0,Qe.useBlockProps)(),l=(0,Qe.useInnerBlocksProps)(a,{template:mv,allowedBlocks:uv});return t?(0,Oe.createElement)("div",l):(0,Oe.createElement)("div",a,(0,Oe.createElement)(We.Placeholder,{icon:cv,label:(0,Ze._x)("Post Comment","block title"),instructions:(0,Ze.__)("To show a comment, input the comment ID.")},(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,value:t,onChange:e=>r(parseInt(e))}),(0,Oe.createElement)(We.Button,{variant:"primary",onClick:()=>{n({commentId:o})}},(0,Ze.__)("Save"))))},save:function(){const e=Qe.useBlockProps.save(),t=Qe.useInnerBlocksProps.save(e);return(0,Oe.createElement)("div",t)}},hv=()=>je({name:pv,metadata:dv,settings:gv});var vv=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const bv={$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}},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:_v}=bv,fv={icon:vv,edit:function(e){var t;let{attributes:n,context:o,setAttributes:r}=e;const{textAlign:a}=n,{postId:l}=o,[i,s]=(0,Oe.useState)(),c=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${a}`]:a})});(0,Oe.useEffect)((()=>{if(!l)return;const e=l;Hr()({path:(0,lt.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,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:a,onChange:e=>{r({textAlign:e})}})),(0,Oe.createElement)("div",ot({},c,{style:m}),u?i:(0,Oe.createElement)(Qe.Warning,null,(0,Ze.__)("Post Comments Count block: post not found."))))}},yv=()=>je({name:_v,metadata:bv,settings:fv});var kv=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const xv={$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}},spacing:{margin:!0,padding:!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:wv}=xv,Ev={icon:kv,edit:function(e){let{attributes:t,context:n,setAttributes:o}=e;const{textAlign:r}=t,{postId:a,postType:l}=n,i=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${r}`]:r})});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:r,onChange:e=>{o({textAlign:e})}})),(0,Oe.createElement)("div",i,(0,Oe.createElement)(qo,{postId:a,postType:l})))}},Cv=()=>je({name:wv,metadata:xv,settings:Ev});var Sv=function(e){let{context:t,attributes:n,setAttributes:o}=e;const{textAlign:r}=n,{postType:a,postId:l}=t,[i,s]=(0,Oe.useState)(),c=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${r}`]:r})});(0,Oe.useEffect)((()=>{if(!l)return;const e=l;Hr()({path:(0,lt.addQueryArgs)("/wp/v2/comments",{post:l}),parse:!1}).then((t=>{e===l&&s(t.headers.get("X-WP-Total"))}))}),[l]);const u=(0,st.useSelect)((e=>e(it.store).getEditedEntityRecord("postType",a,l)),[a,l]);if(!u)return null;const{link:m}=u;let d;if(void 0!==i){const e=parseInt(i);d=0===e?(0,Ze.__)("No comments"):(0,Ze.sprintf)((0,Ze._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:r,onChange:e=>{o({textAlign:e})}})),(0,Oe.createElement)("div",c,m&&void 0!==d?(0,Oe.createElement)("a",{href:m+"#comments",onClick:e=>e.preventDefault()},d):(0,Oe.createElement)(Qe.Warning,null,(0,Ze.__)("Post Comments Link block: post not found."))))};const Bv={$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}},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:Tv}=Bv,Nv={edit:Sv,icon:vv},Pv=()=>je({name:Tv,metadata:Bv,settings:Nv});function Iv(e,t,n){return(0,st.useSelect)((o=>o(it.store).canUserEditEntityRecord(e,t,n)),[e,t,n])}function zv(e){let{userCanEdit:t,postType:n,postId:o}=e;const[,,r]=(0,it.useEntityProp)("postType",n,"content",o),a=(0,Qe.useBlockProps)();return null!=r&&r.protected&&!t?(0,Oe.createElement)("div",a,(0,Oe.createElement)(Qe.Warning,null,(0,Ze.__)("This content is password protected."))):(0,Oe.createElement)("div",ot({},a,{dangerouslySetInnerHTML:{__html:null==r?void 0:r.rendered}}))}function Mv(e){let{context:t={}}=e;const{postType:n,postId:o}=t,[r,a,l]=(0,it.useEntityBlockEditor)("postType",n,{id:o}),i=(0,Qe.useInnerBlocksProps)((0,Qe.useBlockProps)({className:"entry-content"}),{value:r,onInput:a,onChange:l});return(0,Oe.createElement)("div",i)}function Rv(e){const{context:{queryId:t,postType:n,postId:o}={}}=e,r=Number.isFinite(t),a=Iv("postType",n,o);return a&&!r?(0,Oe.createElement)(Mv,e):(0,Oe.createElement)(zv,{userCanEdit:a,postType:n,postId:o})}function Lv(e){let{layoutClassNames:t}=e;const n=(0,Qe.useBlockProps)({className:t});return(0,Oe.createElement)("div",n,(0,Oe.createElement)("p",null,(0,Ze.__)("This is the Post Content block, it will display all the blocks in any single post or page.")),(0,Oe.createElement)("p",null,(0,Ze.__)("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,Oe.createElement)("p",null,(0,Ze.__)("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 Hv(){const e=(0,Qe.useBlockProps)();return(0,Oe.createElement)("div",e,(0,Oe.createElement)(Qe.Warning,null,(0,Ze.__)("Block cannot be rendered inside itself.")))}const Av={$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,dimensions:{minHeight:!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:Vv}=Av,Fv={icon:Pg,edit:function(e){let{context:t,attributes:n,__unstableLayoutClassNames:o}=e;const{postId:r,postType:a}=t,{layout:l={}}=n,i=(0,Qe.__experimentalUseHasRecursion)(r);return r&&a&&i?(0,Oe.createElement)(Hv,null):(0,Oe.createElement)(Qe.__experimentalRecursionProvider,{uniqueId:r},r&&a?(0,Oe.createElement)(Rv,{context:t,layout:l}):(0,Oe.createElement)(Lv,{layoutClassNames:o}))}},Dv=()=>je({name:Vv,metadata:Av,settings:Fv});function $v(e){return/(?:^|[^\\])[aAgh]/.test(e)}const Gv={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(){return null},migrate:Xt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}};var Ov=[Gv];const Uv={$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:qv}=Uv,jv={icon:hr,edit:function(e){let{attributes:{textAlign:t,format:n,isLink:o,displayType:r},context:{postId:a,postType:l,queryId:i},setAttributes:s}=e;const c=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${t}`]:t})}),[u,m]=(0,Oe.useState)(null),d=(0,Oe.useMemo)((()=>({anchor:u})),[u]),p=Number.isFinite(i),g=(0,vr.getSettings)(),[h=g.formats.date]=(0,it.useEntityProp)("root","site","date_format"),[v=g.formats.time]=(0,it.useEntityProp)("root","site","time_format"),[b,_]=(0,it.useEntityProp)("postType",l,r,a),f=(0,st.useSelect)((e=>l?e(it.store).getPostType(l):null),[l]);let y=b?(0,Oe.createElement)("time",{dateTime:(0,vr.dateI18n)("c",b),ref:m},(0,vr.dateI18n)(n||h,b)):(0,Ze.__)("Post Date");return o&&b&&(y=(0,Oe.createElement)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault()},y)),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:t,onChange:e=>{s({textAlign:e})}}),b&&!p&&(0,Oe.createElement)(We.ToolbarGroup,null,(0,Oe.createElement)(We.Dropdown,{popoverProps:d,renderContent:e=>{let{onClose:t}=e;return(0,Oe.createElement)(Qe.__experimentalPublishDateTimePicker,{currentDate:b,onChange:_,is12Hour:$v(v),onClose:t})},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,Oe.createElement)(We.ToolbarButton,{"aria-expanded":t,icon:pi,title:(0,Ze.__)("Change Date"),onClick:n,onKeyDown:e=>{t||e.keyCode!==cn.DOWN||(e.preventDefault(),n())}})}}))),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(Qe.__experimentalDateFormatPicker,{format:n,defaultFormat:h,onChange:e=>s({format:e})}),(0,Oe.createElement)(We.ToggleControl,{label:null!=f&&f.labels.singular_name?(0,Ze.sprintf)((0,Ze.__)("Link to %s"),f.labels.singular_name.toLowerCase()):(0,Ze.__)("Link to post"),onChange:()=>s({isLink:!o}),checked:o}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display last modified date"),onChange:e=>s({displayType:e?"modified":"date"}),checked:"modified"===r}))),(0,Oe.createElement)("div",c,y))},deprecated:Ov},Wv=()=>je({name:qv,metadata:Uv,settings:jv});var Zv=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));var Qv={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")}]};const Kv={$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:Yv}=Kv,Jv={icon:Zv,transforms:Qv,edit:function(e){let{attributes:{textAlign:t,moreText:n,showMoreOnNewLine:o},setAttributes:r,isSelected:a,context:{postId:l,postType:i,queryId:s}}=e;const c=Number.isFinite(s),u=Iv("postType",i,l),m=u&&!c,[d,p,{rendered:g,protected:h}={}]=(0,it.useEntityProp)("postType",i,"excerpt",l),v=(0,Qe.useBlockProps)({className:at()({[`has-text-align-${t}`]:t})}),b=(0,Oe.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,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(Qe.AlignmentToolbar,{value:t,onChange:e=>r({textAlign:e})})),(0,Oe.createElement)("div",v,(0,Oe.createElement)("p",null,(0,Ze.__)("This is the Post Excerpt block, it will display the excerpt from single posts.")),(0,Oe.createElement)("p",null,(0,Ze.__)("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,Oe.createElement)("div",v,(0,Oe.createElement)(Qe.Warning,null,(0,Ze.__)("There is no excerpt because this is a protected post.")));const _=(0,Oe.createElement)(Qe.RichText,{className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,Ze.__)("“Read more” link text"),placeholder:(0,Ze.__)('Add "read more" link text'),value:n,onChange:e=>r({moreText:e}),withoutInteractiveFormatting:!0}),f=at()("wp-block-post-excerpt__excerpt",{"is-inline":!o}),y=m?(0,Oe.createElement)(Qe.RichText,{className:f,"aria-label":(0,Ze.__)("Post excerpt text"),value:d||b||(a?"":(0,Ze.__)("No post excerpt found")),onChange:p,tagName:"p"}):(0,Oe.createElement)("p",{className:f},b||(0,Ze.__)("No post excerpt found"));return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(Qe.AlignmentToolbar,{value:t,onChange:e=>r({textAlign:e})})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show link on new line"),checked:o,onChange:e=>r({showMoreOnNewLine:e})}))),(0,Oe.createElement)("div",v,y,!o&&" ",o?(0,Oe.createElement)("p",{className:"wp-block-post-excerpt__more-text"},_):_))}},Xv=()=>je({name:Yv,metadata:Kv,settings:Jv});var eb=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.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"}));const tb=(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"cover",label:(0,Ze._x)("Cover","Scale option for Image dimension control")}),(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"contain",label:(0,Ze._x)("Contain","Scale option for Image dimension control")}),(0,Oe.createElement)(We.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Ze._x)("Fill","Scale option for Image dimension control")})),nb="cover",ob={cover:(0,Ze.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,Ze.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,Ze.__)("Image will be stretched and distorted to completely fill the space.")};var rb=e=>{let{clientId:t,attributes:{width:n,height:o,scale:r,sizeSlug:a},setAttributes:l,imageSizeOptions:i=[]}=e;const s=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Qe.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,Ze._x)("Scale","Image scaling options");return(0,Oe.createElement)(Qe.InspectorControls,{group:"dimensions"},(0,Oe.createElement)(We.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!o,label:(0,Ze.__)("Height"),onDeselect:()=>l({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:t},(0,Oe.createElement)(We.__experimentalUnitControl,{label:(0,Ze.__)("Height"),labelPosition:"top",value:o||"",min:0,onChange:e=>c("height",e),units:s})),(0,Oe.createElement)(We.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,Ze.__)("Width"),onDeselect:()=>l({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:t},(0,Oe.createElement)(We.__experimentalUnitControl,{label:(0,Ze.__)("Width"),labelPosition:"top",value:n||"",min:0,onChange:e=>c("width",e),units:s})),!!o&&(0,Oe.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!r&&r!==nb,label:u,onDeselect:()=>l({scale:nb}),resetAllFilter:()=>({scale:nb}),isShownByDefault:!0,panelId:t},(0,Oe.createElement)(We.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:u,value:r,help:ob[r],onChange:e=>l({scale:e}),isBlock:!0},tb)),!!i.length&&(0,Oe.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,Ze.__)("Image size"),onDeselect:()=>l({sizeSlug:void 0}),resetAllFilter:()=>({sizeSlug:void 0}),isShownByDefault:!1,panelId:t},(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Image size"),value:a||"full",options:i,onChange:e=>l({sizeSlug:e}),help:(0,Ze.__)("Select the size of the source image.")})))};var ab=(0,St.compose)([(0,Qe.withColors)({overlayColor:"background-color"})])((e=>{let{clientId:t,attributes:n,setAttributes:o,overlayColor:r,setOverlayColor:a}=e;const{dimRatio:l}=n,{gradientClass:i,gradientValue:s,setGradient:c}=(0,Qe.__experimentalUseGradient)(),u=(0,Qe.__experimentalUseMultipleOriginColorsAndGradients)(),m=(0,Qe.__experimentalUseBorderProps)(n),d={backgroundColor:r.color,backgroundImage:s,...m.style};return(0,Oe.createElement)(Oe.Fragment,null,!!l&&(0,Oe.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)),{[r.class]:r.class,"has-background-dim":void 0!==l,"has-background-gradient":s,[i]:i},m.className),style:d}),(0,Oe.createElement)(Qe.InspectorControls,{group:"color"},(0,Oe.createElement)(Qe.__experimentalColorGradientSettingsDropdown,ot({__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:r.color,gradientValue:s,label:(0,Ze.__)("Overlay"),onColorChange:a,onGradientChange:c,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:t},u)),(0,Oe.createElement)(We.__experimentalToolsPanelItem,{hasValue:()=>void 0!==l,label:(0,Ze.__)("Overlay opacity"),onDeselect:()=>o({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:t},(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Overlay opacity"),value:l,onChange:e=>o({dimRatio:e}),min:0,max:100,step:10,required:!0}))));var p}));const lb=["image"];const ib={$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:sb}=ib,cb={icon:eb,edit:function(e){let{clientId:t,attributes:n,setAttributes:o,context:{postId:r,postType:a,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,it.useEntityProp)("postType",a,"featured_media",r),{media:b,postType:_}=(0,st.useSelect)((e=>{const{getMedia:t,getPostType:n}=e(it.store);return{media:h&&t(h,{context:"view"}),postType:a&&n(a)}}),[h,a]),f=function(e,t){var n,o,r;return(null==e||null===(n=e.media_details)||void 0===n||null===(o=n.sizes)||void 0===o||null===(r=o[t])||void 0===r?void 0:r.source_url)||(null==e?void 0:e.source_url)}(b,d),y=(0,st.
Showing 512.00 KB of 767.30 KB. Use Edit/Download for full content.
Directory Contents
Dirs: 2 × Files: 110