diff --git a/assets/ts/init.ts b/assets/ts/init.ts index cd3e41d..728741e 100755 --- a/assets/ts/init.ts +++ b/assets/ts/init.ts @@ -20,20 +20,24 @@ export const init = ( return } - const editorSettings = { ...defaultSettings, ...settings }; - const lang_fr = require("./lang/fr.json"); - defaultI18n.setLocaleData(lang_fr); + const doInit = (): void => { + fetch('/bundles/easy-gutenberg/fetch-blocks', {headers: {accept: 'application/json'}}).then((response: Response) => response.json()).then((data): void => { + for (const [key, options] of Object.entries(data)) { + registerServerBlockType(key, options) + } - fetch('/bundles/easy-gutenberg/fetch-blocks', { - headers: { - 'Accept': 'application/json' - } - }).then((response) => response.json()) - .then((data) => { - for (const [key, options] of Object.entries(data)) { - registerServerBlockType(key, options); + initializeEditor(element, {...defaultSettings, ...settings}) + }); + }; + + fetch('/bundles/easygutenberg/translations/' + document.documentElement.lang + '.json', {redirect: 'manual'}).then((response: Response): void => { + if (response.ok) { + response.json().then(translation => { + defaultI18n.setLocaleData(translation.locale_data.messages) + doInit() + }); + } else { + doInit() } - initializeEditor(element, editorSettings) }) - } diff --git a/src/Resources/public/js/easy-gutenberg.js b/src/Resources/public/js/easy-gutenberg.js index e708c51..63384b4 100644 --- a/src/Resources/public/js/easy-gutenberg.js +++ b/src/Resources/public/js/easy-gutenberg.js @@ -1,10 +1,10 @@ /*! For license information please see easy-gutenberg.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.EasyGutenberg=t(require("React"),require("ReactDOM")):e.EasyGutenberg=t(e.React,e.ReactDOM)}(self,((e,t)=>(()=>{var n={67228:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},23646:(e,t,n)=>{var r=n(67228);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},81506:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},59713:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},67154:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=n(99489);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},95318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},20862:(e,t,n)=>{var r=n(50008).default;function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var s=i?Object.getOwnPropertyDescriptor(e,l):null;s&&(s.get||s.set)?Object.defineProperty(a,l,s):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a},e.exports.__esModule=!0,e.exports.default=e.exports},46860:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},13884:e=>{e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},80521:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},98206:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},6479:(e,t,n)=>{var r=n(37316);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.__esModule=!0,e.exports.default=e.exports},37316:e=>{e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},99489:e=>{function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},63038:(e,t,n)=>{var r=n(22858),o=n(13884),a=n(60379),i=n(80521);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},319:(e,t,n)=>{var r=n(23646),o=n(46860),a=n(60379),i=n(98206);e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},50008:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},60379:(e,t,n)=>{var r=n(67228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},66898:(e,t,n)=>{"use strict";n.d(t,{Z:()=>re});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?u(y,--v):0,g--,10===_&&(g=1,h--),_}function E(){return _=v2||T(_)>3?"":" "}function B(e,t){for(;--t&&E()&&!(_<48||_>102||_>57&&_<65||_>70&&_<97););return S(e,C()+(t<6&&32==x()&&32==E()))}function O(e){for(;E();)switch(_){case e:return v;case 34:case 39:34!==e&&39!==e&&O(_);break;case 40:41===e&&O(e);break;case 92:E()}return v}function D(e,t){for(;E()&&e+_!==57&&(e+_!==84||47!==x()););return"/*"+S(t,v-1)+"*"+a(47===e?e:E())}function I(e){for(;!T(x());)E();return S(e,v)}var P="-ms-",R="-moz-",Z="-webkit-",j="comm",H="rule",W="decl",F="@keyframes";function q(e,t){for(var n="",r=p(e),o=0;o6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return s(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+R+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?V(s(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,m(e)-3-(~c(e,"!important")&&10))){case 107:return s(e,":",":"+Z)+e;case 101:return s(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Z+(45===u(e,14)?"inline-":"")+"box$3$1"+Z+"$2$3$1"+P+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return Z+e+P+s(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Z+e+P+s(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Z+e+P+s(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Z+e+P+e+e}return e}function U(e){return A($("",null,null,null,[""],e=L(e),0,[0],e))}function $(e,t,n,r,o,i,l,u,d){for(var p=0,h=0,g=l,b=0,v=0,_=0,y=1,k=1,M=1,S=0,T="",L=o,A=i,O=r,P=T;k;)switch(_=S,S=E()){case 40:if(108!=_&&58==P.charCodeAt(g-1)){-1!=c(P+=s(N(S),"&","&\f"),"&\f")&&(M=-1);break}case 34:case 39:case 91:P+=N(S);break;case 9:case 10:case 13:case 32:P+=z(_);break;case 92:P+=B(C()-1,7);continue;case 47:switch(x()){case 42:case 47:f(G(D(E(),C()),t,n),d);break;default:P+="/"}break;case 123*y:u[p++]=m(P)*M;case 125*y:case 59:case 0:switch(S){case 0:case 125:k=0;case 59+h:v>0&&m(P)-g&&f(v>32?K(P+";",r,n,g-1):K(s(P," ","")+";",r,n,g-2),d);break;case 59:P+=";";default:if(f(O=X(P,t,n,p,h,o,u,T,L=[],A=[],g),i),123===S)if(0===h)$(P,t,O,O,L,i,g,u,A);else switch(b){case 100:case 109:case 115:$(e,O,O,r&&f(X(e,O,O,0,0,o,u,T,o,L=[],g),A),o,A,g,u,r?L:A);break;default:$(P,O,O,O,[""],A,0,u,A)}}p=h=v=0,y=M=1,T=P="",g=l;break;case 58:g=1+m(P),v=_;default:if(y<1)if(123==S)--y;else if(125==S&&0==y++&&125==w())continue;switch(P+=a(S),S*y){case 38:M=h>0?1:(P+="\f",-1);break;case 44:u[p++]=(m(P)-1)*M,M=1;break;case 64:45===x()&&(P+=N(E())),b=x(),h=g=m(T=P+=I(C())),S++;break;case 45:45===_&&2==m(P)&&(y=0)}}return i}function X(e,t,n,r,a,i,c,u,m,f,h){for(var g=a-1,b=0===a?i:[""],v=p(b),_=0,y=0,M=0;_0?b[w]+" "+E:s(E,/&\f/g,b[w])))&&(m[M++]=x);return k(e,t,n,0===a?H:u,m,f,h)}function G(e,t,n){return k(e,t,n,j,a(_),d(e,2,-2),0)}function K(e,t,n,r){return k(e,t,n,W,d(e,0,r),d(e,r+1,-1),r)}var J=function(e,t,n){for(var r=0,o=0;r=o,o=x(),38===r&&12===o&&(t[n]=1),!T(o);)E();return S(e,v)},Q=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(n))&&!r){Q.set(e,!0);for(var o=[],i=function(e,t){return A(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===x()&&(t[n]=1),e[n]+=J(v-1,t,n);break;case 2:e[n]+=N(r);break;case 4:if(44===r){e[++n]=58===x()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=a(r)}}while(r=E());return e}(L(e),t))}(t,o),l=n.props,s=0,c=0;s-1&&!e.return)switch(e.type){case W:e.return=V(e.value,e.length);break;case F:return q([M(e,{value:s(e.value,"@","@"+Z)})],r);case H:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return q([M(e,{props:[s(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return q([M(e,{props:[s(t,/:(plac\w+)/,":-webkit-input-$1")]}),M(e,{props:[s(t,/:(plac\w+)/,":-moz-$1")]}),M(e,{props:[s(t,/:(plac\w+)/,P+"input-$1")]})],r)}return""}))}}];const re=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,a,i=e.stylisPlugins||ne,l={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},54880:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,T:()=>c,_:()=>l,w:()=>s});var r=n(1024),o=n(66898),a=(n(94199),(0,r.createContext)("undefined"!=typeof HTMLElement?(0,o.Z)({key:"css"}):null)),i=a.Provider,l=function(){return(0,r.useContext)(a)},s=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(a);return e(t,o,n)}))},c=(0,r.createContext)({});r.useInsertionEffect&&r.useInsertionEffect},70917:(e,t,n)=>{"use strict";n.d(t,{F4:()=>i,iv:()=>a});var r=n(1024),o=(n(66898),n(8679),n(94199));function a(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";n.d(t,{O:()=>h});const r=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var a=n(67866),i=/[A-Z]|^ms/g,l=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!=typeof e},u=(0,a.Z)((function(e){return s(e)?e:e.replace(i,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(l,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===o[e]||s(e)||"number"!=typeof t||0===t?t:t+"px"};function m(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)p={name:r.name,styles:r.styles,next:p},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o{"use strict";n.d(t,{Z:()=>v});var r=n(87462),o=n(1024),a=n(67866),i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const l=(0,a.Z)((function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var s=n(54880);function c(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var u=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},d=n(94199),m=l,p=function(e){return"theme"!==e},f=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?m:p},h=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},g=o.useInsertionEffect?o.useInsertionEffect:function(e){e()},b=function(e){var t,n=e.cache,r=e.serialized,o=e.isStringTag;return u(n,r,o),t=function(){return function(e,t,n){u(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(n,r,o)},g(t),null};const v=function e(t,n){var a,i,l=t.__emotion_real===t,u=l&&t.__emotion_base||t;void 0!==n&&(a=n.label,i=n.target);var m=h(t,n,l),p=m||f(u),g=!p("as");return function(){var v=arguments,_=l&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&_.push("label:"+a+";"),null==v[0]||void 0===v[0].raw)_.push.apply(_,v);else{_.push(v[0][0]);for(var y=v.length,k=1;k{"use strict";n.d(t,{useDrag:()=>G,useHover:()=>K});const r={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function o(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function a(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):en?+o(e-n,n-t,r)+n:e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t0,i=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);r.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[l,s]=t._movement,[c,u]=n.threshold,{_step:d,values:m}=t;if(n.hasCustomTransform?(!1===d[0]&&(d[0]=Math.abs(l)>=c&&m[0]),!1===d[1]&&(d[1]=Math.abs(s)>=u&&m[1])):(!1===d[0]&&(d[0]=Math.abs(l)>=c&&Math.sign(l)*c),!1===d[1]&&(d[1]=Math.abs(s)>=u&&Math.sign(s)*u)),t.intentional=!1!==d[0]||!1!==d[1],!t.intentional)return;const p=[0,0];if(n.hasCustomTransform){const[e,t]=m;p[0]=!1!==d[0]?e-d[0]:0,p[1]=!1!==d[1]?t-d[1]:0}else p[0]=!1!==d[0]?l-d[0]:0,p[1]=!1!==d[1]?s-d[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(p);const f=t.offset,h=t._active&&!t._blocked||t.active;h&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=o[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=_(n.bounds,t)),this.setup&&this.setup()),t.movement=p,this.computeOffset()));const[g,b]=t.offset,[[v,y],[k,M]]=t._bounds;t.overflow=[gy?1:0,bM?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const w=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,l],[s,c]]=e;return[a(t,i,l,r),a(n,s,c,o)]}(t._bounds,t.offset,w),t.delta=r.sub(t.offset,f),this.computeMovement(),h&&(!t.last||i>32)){t.delta=r.sub(t.offset,f);const e=t.delta.map(Math.abs);r.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&i>0&&(t.velocity=[e[0]/i,e[1]/i])}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(s(s(s({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}{constructor(...e){super(...e),i(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=r.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=r.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[h(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const E=e=>e,x={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>s(s({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return r.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?r.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||E},threshold:e=>r.toVector(e,0)},C=s(s({},x),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>C.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),S={ArrowRight:(e=1)=>[10*e,0],ArrowLeft:(e=1)=>[-10*e,0],ArrowUp:(e=1)=>[0,-10*e],ArrowDown:(e=1)=>[0,10*e]},T="undefined"!=typeof window&&window.document&&window.document.createElement;function L(){return T&&"ontouchstart"in window||T&&window.navigator.maxTouchPoints>1}const A={isBrowser:T,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:L(),touchscreen:L(),pointer:T&&"onpointerdown"in window,pointerLock:T&&"exitPointerLock"in window.document},N={mouse:0,touch:0,pen:8},z=s(s({},C),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&A.pointerLock,A.touch&&n?"touch":this.pointerLock?"mouse":A.pointer&&!o?"pointer":A.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,A.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1}={}}){return this.pointerButtons=r,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:o=3,axis:a}){const i=r.toVector(e,n?o:a?1:0);return this.filterTaps=n,this.tapsThreshold=o,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(r.toVector(e)),distance:this.transform(r.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?s(s({},N),e):N});s(s({},x),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!A.touch&&A.gesture)return"gesture";if(A.touch&&r)return"touch";if(A.touchscreen){if(A.pointer)return"pointer";if(A.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=M(_(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},a=e=>{const t=M(_(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),a()]:e=>[o(e),a(e)]},threshold(e,t,n){return this.lockDirection="lock"===n.axis,r.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e}),s(s({},C),{},{mouseOnly:(e=!0)=>e});const B=s(s({},C),{},{mouseOnly:(e=!0)=>e}),O=new Map,D=new Map;function I(e){O.set(e.key,e.engine),D.set(e.key,e.resolver)}const P={key:"drag",engine:class extends w{constructor(...e){super(...e),i(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=C.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=b(e),n._pointerActive=!0,this.computeValues(v(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==h(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;if(t.type===e.type&&e.timeStamp===t.timeStamp)return;const o=b(e);if(void 0!==t._pointerId&&o!==t._pointerId)return;const a=v(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=r.sub(a,t._values),this.computeValues(a)),r.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=b(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,a]=t._distance;if(t.tap=o<=n.tapsThreshold&&a<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t.direction,[o,a]=t.velocity,[i,l]=t.movement,[s,c]=n.swipe.velocity,[u,d]=n.swipe.distance,m=n.swipe.duration;t.elapsedTimes&&Math.abs(i)>u&&(t.swipe[0]=e),Math.abs(a)>c&&Math.abs(l)>d&&(t.swipe[1]=r))}this.emit()}pointerClick(e){this.state.tap||(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=S[e.key];if(t){const n=this.state,o=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(o),n._keyboardActive=!0,r.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in S&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this)),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:z},R={key:"hover",engine:class extends w{constructor(...e){super(...e),i(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.start(e),this.computeValues(v(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&"mouse"!==e.pointerType)return;const t=this.state;if(!t._active)return;t._active=!1;const n=v(e);t._movement=t._delta=r.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}},resolver:B};var Z=n(1024),j=n.n(Z);const H={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(A.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},W=["target","eventOptions","window","enabled","transform"];function F(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=F(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class q{constructor(e,t){i(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const a=this._listeners,i=function(e,t=""){const n=c[e];return e+(n&&n[t]||t)}(t,n),l=s(s({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(i,r,l);const u=()=>{e.removeEventListener(i,r,l),a.delete(u)};return a.add(u),u}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class Y{constructor(){i(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class V{constructor(e){var t,n;i(this,"gestures",new Set),i(this,"_targetEventStore",new q(this)),i(this,"gestureEventStores",{}),i(this,"gestureTimeoutStores",{}),i(this,"handlers",{}),i(this,"config",{}),i(this,"pointerIds",new Set),i(this,"touchIds",new Set),i(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),t=this,(n=e).drag&&U(t,"drag"),n.wheel&&U(t,"wheel"),n.scroll&&U(t,"scroll"),n.move&&U(t,"move"),n.pinch&&U(t,"pinch"),n.hover&&U(t,"hover")}setEventIds(e){return f(e)?(this.touchIds=new Set(function(e){return function(e){return Array.from(e.touches).filter((t=>{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t){const n=e,{target:r,eventOptions:o,window:a,enabled:i,transform:l}=n,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,W),u={shared:F({target:r,eventOptions:o,window:a,enabled:i,transform:l},H)};if(t){const e=D.get(t);u[t]=F(s({shared:u.shared},c),e)}else for(const e in c){const t=D.get(e);t&&(u[e]=F(s({shared:u.shared},c[e]),t))}return u}(e,t)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],a=$(n,o.eventOptions,!!r);o.enabled&&new(O.get(t))(this,e,t).bind(a)}const o=$(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](s(s({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=k(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:a}=p(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:a})}}}}function U(e,t){e.gestures.add(t),e.gestureEventStores[t]=new q(e,t),e.gestureTimeoutStores[t]=new Y}const $=(e,t,n)=>(r,o,a,i={},l=!1)=>{var s,m;const p=null!==(s=i.capture)&&void 0!==s?s:t.capture,f=null!==(m=i.passive)&&void 0!==m?m:t.passive;let h=l?r:function(e,t="",n=!1){const r=c[e],o=r&&r[t]||t;return"on"+u(e)+u(o)+(function(e=!1,t){return e&&!d.includes(t)}(n,o)?"Capture":"")}(r,o,p);n&&f&&(h+="Passive"),e[h]=e[h]||[],e[h].push(a)};function X(e,t={},n,r){const o=j().useMemo((()=>new V(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),j().useEffect(o.effect.bind(o)),j().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}function G(e,t){return I(P),X({drag:e},t||{},"drag")}function K(e,t){return I(R),X({hover:e},t||{},"hover")}},36042:(e,t,n)=>{"use strict";n.d(t,{D:()=>l});var r=n(54730);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite";const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}let a="";var i;function l(e,t){!function(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let t=0;t]+>/g," "),a===e&&(e+=" "),a=e,e}(e);const n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),o=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:o&&(o.textContent=e),n&&n.removeAttribute("hidden")}i=function(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=(0,r.__)("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;t&&t.appendChild(e)}(),null===t&&o("assertive"),null===n&&o("polite")},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",i):i())},83130:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(54730);const o=(e,t)=>{let n,r,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),o=r?n+"/"+r:n),delete e.namespace,delete e.endpoint,t({...e,path:o})};var a=n(21643),i=n(73919),l=n(69649);function s(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}const c=(e,t)=>{let{path:n,url:r,...o}=e;return{...o,url:r&&(0,l.f)(r,t),path:n&&(0,l.f)(n,t)}},u=e=>e.json?e.json():Promise.reject(e),d=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t},m=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n})(e))return t(e);const n=await C({...c(e,{per_page:100}),parse:!1}),r=await u(n);if(!Array.isArray(r))return r;let o=d(n);if(!o)return r;let a=[].concat(r);for(;o;){const t=await C({...e,path:void 0,url:o,parse:!1}),n=await u(t);a=a.concat(n),o=d(t)}return a},p=new Set(["PATCH","PUT","DELETE"]),f="GET";var h=n(23945);const g=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},b=e=>{const t={code:"invalid_json",message:(0,r.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((()=>{throw t}))},v=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(g(e,t)).catch((e=>_(e,t)))};function _(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return b(e).then((e=>{const t={code:"unknown_error",message:(0,r.__)("An unknown error occurred.")};throw e||t}))}const y={Accept:"application/json, */*;q=0.1"},k={credentials:"include"},M=[(e,t)=>("string"!=typeof e.url||(0,h.l)(e.url,"_locale")||(e.url=(0,l.f)(e.url,{_locale:"user"})),"string"!=typeof e.path||(0,h.l)(e.path,"_locale")||(e.path=(0,l.f)(e.path,{_locale:"user"})),t(e)),o,(e,t)=>{const{method:n=f}=e;return p.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},m],w=e=>{if(e.status>=200&&e.status<300)return e;throw e};let E=e=>{const{url:t,path:n,data:o,parse:a=!0,...i}=e;let{body:l,headers:s}=e;return s={...y,...s},o&&(l=JSON.stringify(o),s["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...k,...i,body:l,headers:s}).then((e=>Promise.resolve(e).then(w).catch((e=>_(e,a))).then((e=>v(e,a)))),(e=>{if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:(0,r.__)("You are probably offline.")}}))};function x(e){return M.reduceRight(((e,t)=>n=>t(n,e)),E)(e).catch((t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(x.nonceEndpoint).then(w).then((e=>e.text())).then((t=>(x.nonceMiddleware.nonce=t,x(e))))))}x.use=function(e){M.unshift(e)},x.setFetchHandler=function(e){E=e},x.createNonceMiddleware=function(e){const t=(e,n)=>{const{headers:r={}}=e;for(const o in r)if("x-wp-nonce"===o.toLowerCase()&&r[o]===t.nonce)return n(e);return n({...e,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t},x.createPreloadingMiddleware=function(e){const t=Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[(0,a.A)(t),n]})));return(e,n)=>{const{parse:r=!0}=e;let o=e.path;if(!o&&e.url){const{rest_route:t,...n}=(0,i.w)(e.url);"string"==typeof t&&(o=(0,l.f)(t,n))}if("string"!=typeof o)return n(e);const c=e.method||"GET",u=(0,a.A)(o);if("GET"===c&&t[u]){const e=t[u];return delete t[u],s(e,!!r)}if("OPTIONS"===c&&t[c]&&t[c][u]){const e=t[c][u];return delete t[c][u],s(e,!!r)}return n(e)}},x.createRootURLMiddleware=e=>(t,n)=>o(t,(t=>{let r,o=t.url,a=t.path;return"string"==typeof a&&(r=e,-1!==e.indexOf("?")&&(a=a.replace("?","&")),a=a.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(a=a.replace("?","&")),o=r+a),n({...t,url:o})})),x.fetchAllMiddleware=m,x.mediaUploadMiddleware=(e,t)=>{if(!function(e){const t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);let n=0;const o=e=>(n++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((()=>n<5?o(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject()))));return t({...e,parse:!1}).catch((t=>{const n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?o(n).catch((()=>!1!==e.parse?Promise.reject({code:"post_process",message:(0,r.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t))):_(t,e.parse)})).then((t=>v(t,e.parse)))};const C=x},3931:(e,t,n)=>{"use strict";n.r(t),n.d(t,{autop:()=>a,removep:()=>i});const r=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");function o(e,t){const n=function(e){const t=[];let n,o=e;for(;n=o.match(r);){const e=n.index;t.push(o.slice(0,e)),t.push(n[0]),o=o.slice(e+n[0].length)}return o.length&&t.push(o),t}(e);let o=!1;const a=Object.keys(t);for(let e=1;e1&&void 0!==arguments[1])||arguments[1];const n=[];if(""===e.trim())return"";if(-1!==(e+="\n").indexOf(""),r=t.pop();e="";for(let r=0;r";n.push([i,o.substr(a)+""]),e+=o.substr(0,a)+i}e+=r}const r="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=o(e=(e=(e=(e=e.replace(/\s*/g,"\n\n")).replace(new RegExp("(<"+r+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("()","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("\s*/g,"")),-1!==e.indexOf("")&&(e=(e=(e=e.replace(/(]*>)\s*/g,"$1")).replace(/\s*<\/object>/g,"")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("\]]*[>\]])\s*/g,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),-1!==e.indexOf("]*>)/,"$1")).replace(/<\/figcaption>\s*/,""));const a=(e=e.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return e="",a.forEach((t=>{e+="

"+t.replace(/^\n*|\n*$/g,"")+"

\n"})),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/

\s*<\/p>/g,"")).replace(/

([^<]+)<\/(div|address|form)>/g,"

$1

")).replace(new RegExp("

\\s*(]*>)\\s*

","g"),"$1")).replace(/

(/g,"$1")).replace(/

]*)>/gi,"

")).replace(/<\/blockquote><\/p>/g,"

")).replace(new RegExp("

\\s*(]*>)","g"),"$1")).replace(new RegExp("(]*>)\\s*

","g"),"$1"),t&&(e=(e=(e=(e=e.replace(/<(script|style).*?<\/\\1>/g,(e=>e[0].replace(/\n/g,"")))).replace(/
|/g,"
")).replace(/(
)?\s*\n/g,((e,t)=>t?e:"
\n"))).replace(//g,"\n")),e=(e=(e=e.replace(new RegExp("(]*>)\\s*
","g"),"$1")).replace(/
(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"

"),n.forEach((t=>{const[n,r]=t;e=e.replace(n,r)})),-1!==e.indexOf("\x3c!-- wpnl --\x3e")&&(e=e.replace(/\s?\s?/g,"\n")),e}function i(e){const t="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=t+"|div|p",r=t+"|pre",o=[];let a=!1,i=!1;return e?(-1===e.indexOf("]*>[\s\S]*?<\/\1>/g,(e=>(o.push(e),"")))),-1!==e.indexOf("]*>[\s\S]+?<\/pre>/g,(e=>(e=(e=e.replace(/
(\r\n|\n)?/g,"")).replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"")).replace(/\r?\n/g,"")))),-1!==e.indexOf("[caption")&&(i=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,(e=>e.replace(/]*)>/g,"").replace(/[\r\n\t]+/,"")))),-1!==(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("\\s*\\s*","g"),"\n")).replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),"\n<$1>")).replace(/(

]+>[\s\S]*?)<\/p>/g,"$1")).replace(/]*)?>\s*

/gi,"\n\n")).replace(/\s*

/gi,"")).replace(/\s*<\/p>\s*/gi,"\n\n")).replace(/\n[\s\u00a0]+\n/g,"\n\n")).replace(/(\s*)
\s*/gi,((e,t)=>t&&-1!==t.indexOf("\n")?"\n\n":"\n"))).replace(/\s*

\s*/g,"
\n")).replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n")).replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption")).replace(new RegExp("\\s*<((?:"+r+")(?: [^>]*)?)\\s*>","g"),"\n<$1>")).replace(new RegExp("\\s*\\s*","g"),"\n")).replace(/<((li|dt|dd)[^>]*)>/g," \t<$1>")).indexOf("/g,"\n")),-1!==e.indexOf("]*)?>\s*/g,"\n\n\n\n")),-1!==e.indexOf("/g,(e=>e.replace(/[\r\n]+/g,"")))),e=(e=(e=(e=e.replace(/<\/p#>/g,"

\n")).replace(/\s*(

]+>[\s\S]*?<\/p>)/g,"\n$1")).replace(/^\s+/,"")).replace(/[\s\u00a0]+$/,""),a&&(e=e.replace(//g,"\n")),i&&(e=e.replace(/]*)>/g,"")),o.length&&(e=e.replace(//g,(()=>o.shift()))),e):""}},18452:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createBlobURL:()=>i,getBlobByURL:()=>l,getBlobTypeByURL:()=>s,isBlobURL:()=>u,revokeBlobURL:()=>c});const{createObjectURL:r,revokeObjectURL:o}=window.URL,a={};function i(e){const t=r(e);return a[t]=e,t}function l(e){return a[e]}function s(e){var t;return null===(t=l(e))||void 0===t?void 0:t.type.split("/")[0]}function c(e){a[e]&&o(e),delete a[e]}function u(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}},39626:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlignmentControl:()=>l_,AlignmentToolbar:()=>s_,Autocomplete:()=>b_,BlockAlignmentControl:()=>ha,BlockAlignmentToolbar:()=>ga,BlockBreadcrumb:()=>w_,BlockColorsStyleSelector:()=>T_,BlockContextProvider:()=>Xa,BlockControls:()=>mr,BlockEdit:()=>Qa,BlockEditorKeyboardShortcuts:()=>Lw,BlockEditorProvider:()=>$u,BlockFormatControls:()=>dr,BlockIcon:()=>ju,BlockInspector:()=>xw,BlockList:()=>jh,BlockMover:()=>Jp,BlockNavigationDropdown:()=>Q_,BlockPreview:()=>Qd,BlockSelectionClearer:()=>Qu,BlockSettingsMenu:()=>ih,BlockSettingsMenuControls:()=>nh,BlockStyles:()=>ry,BlockTitle:()=>Dp,BlockToolbar:()=>fh,BlockTools:()=>Cw,BlockVerticalAlignmentControl:()=>Bo,BlockVerticalAlignmentToolbar:()=>Oo,ButtonBlockAppender:()=>wp,ButtonBlockerAppender:()=>Mp,ColorPalette:()=>My,ColorPaletteControl:()=>wy,ContrastChecker:()=>Yg,CopyHandler:()=>Rf,DefaultBlockAppender:()=>_p,FontSizePicker:()=>Ob,InnerBlocks:()=>Ih,Inserter:()=>vp,InspectorAdvancedControls:()=>eo,InspectorControls:()=>to,JustifyContentControl:()=>Po,JustifyToolbar:()=>Ro,LineHeightControl:()=>hb,MediaPlaceholder:()=>mM,MediaReplaceFlow:()=>iM,MediaUpload:()=>oM,MediaUploadCheck:()=>aM,MultiSelectScrollIntoView:()=>Aw,NavigableToolbar:()=>Hp,ObserveTyping:()=>Ow,PanelColorSettings:()=>pM,PlainText:()=>HM,RichText:()=>RM,RichTextShortcut:()=>qM,RichTextToolbarButton:()=>YM,SETTINGS_DEFAULTS:()=>C,SkipToSelectedBlock:()=>cw,ToolSelector:()=>$M,Typewriter:()=>Rw,URLInput:()=>Ck,URLInputButton:()=>JM,URLPopover:()=>uM,Warning:()=>ri,WritingFlow:()=>_d,__experimentalBlockAlignmentMatrixControl:()=>k_,__experimentalBlockFullHeightAligmentControl:()=>__,__experimentalBlockPatternSetup:()=>gy,__experimentalBlockPatternsList:()=>Lm,__experimentalBlockVariationPicker:()=>iy,__experimentalBlockVariationTransforms:()=>yy,__experimentalBorderRadiusControl:()=>og,__experimentalColorGradientControl:()=>Zg,__experimentalColorGradientSettingsDropdown:()=>Fg,__experimentalDateFormatPicker:()=>Cy,__experimentalDuotoneControl:()=>Ev,__experimentalElementButtonClassName:()=>Yw,__experimentalFontAppearanceControl:()=>pb,__experimentalFontFamilyControl:()=>xb,__experimentalGetBorderClassesAndStyles:()=>Hv,__experimentalGetColorClassesAndStyles:()=>Fv,__experimentalGetGradientClass:()=>wg,__experimentalGetGradientObjectByGradientValue:()=>xg,__experimentalGetMatchingVariation:()=>Vw,__experimentalGetSpacingClassesAndStyles:()=>Vv,__experimentalImageEditingProvider:()=>ok,__experimentalImageEditor:()=>fk,__experimentalImageSizeControl:()=>gk,__experimentalImageURLInputUI:()=>iw,__experimentalLayoutStyle:()=>oa,__experimentalLetterSpacingControl:()=>nv,__experimentalLibrary:()=>Sw,__experimentalLinkControl:()=>eM,__experimentalLinkControlSearchInput:()=>Vk,__experimentalLinkControlSearchItem:()=>zk,__experimentalLinkControlSearchResults:()=>Rk,__experimentalListView:()=>K_,__experimentalPanelColorGradientSettings:()=>By,__experimentalPreviewOptions:()=>lw,__experimentalPublishDateTimePicker:()=>qw,__experimentalResponsiveBlockControl:()=>FM,__experimentalTextDecorationControl:()=>qb,__experimentalTextTransformControl:()=>Jb,__experimentalUnitControl:()=>XM,__experimentalUseBlockOverlayActive:()=>E_,__experimentalUseBlockPreview:()=>em,__experimentalUseBorderProps:()=>Wv,__experimentalUseColorProps:()=>Yv,__experimentalUseCustomSides:()=>yo,__experimentalUseGradient:()=>Sg,__experimentalUseNoRecursiveRenders:()=>Hw,__experimentalUseResizeCanvas:()=>sw,__unstableBlockNameContext:()=>ph,__unstableBlockSettingsMenuFirstItem:()=>qf,__unstableBlockToolbarLastItem:()=>Tf,__unstableEditorStyles:()=>Xd,__unstableIframe:()=>Md,__unstableInserterMenuExtension:()=>ip,__unstablePresetDuotoneFilter:()=>Ov,__unstableRichTextInputEvent:()=>VM,__unstableUseBlockSelectionClearer:()=>Ju,__unstableUseClipboardHandler:()=>Pf,__unstableUseMouseMoveTypingReset:()=>zw,__unstableUseTypewriter:()=>Pw,__unstableUseTypingObserver:()=>Bw,createCustomColorsHOC:()=>Kv,getColorClassName:()=>sg,getColorObjectByAttributeValues:()=>ig,getColorObjectByColorValue:()=>lg,getFontSize:()=>Ab,getFontSizeClass:()=>zb,getFontSizeObjectByValue:()=>Nb,getGradientSlugByValue:()=>Cg,getGradientValueBySlug:()=>Eg,getPxFromCssUnit:()=>nE,store:()=>tr,storeConfig:()=>er,transformStyles:()=>Vd,useBlockDisplayInformation:()=>Bp,useBlockEditContext:()=>ar,useBlockProps:()=>wu,useCachedTruthy:()=>Uv,useInnerBlocksProps:()=>Dh,useSetting:()=>Zr,withColorContext:()=>ky,withColors:()=>Jv,withFontSizes:()=>e_});var r={};n.r(r),n.d(r,{__experimentalGetActiveBlockIdByBlockNames:()=>Wt,__experimentalGetAllowedBlocks:()=>Mt,__experimentalGetAllowedPatterns:()=>Ct,__experimentalGetBlockListSettingsForBlocks:()=>zt,__experimentalGetDirectInsertBlock:()=>wt,__experimentalGetGlobalBlocksByName:()=>oe,__experimentalGetLastBlockAttributeChanges:()=>Dt,__experimentalGetParsedPattern:()=>Et,__experimentalGetPatternTransformItems:()=>Tt,__experimentalGetPatternsByBlockTypes:()=>St,__experimentalGetReusableBlockTitle:()=>Bt,__unstableGetBlockWithoutInnerBlocks:()=>K,__unstableGetClientIdWithClientIdsTree:()=>Q,__unstableGetClientIdsTree:()=>ee,__unstableGetSelectedBlocksWithPartialSelection:()=>Pe,__unstableGetVisibleBlocks:()=>Yt,__unstableIsFullySelected:()=>Oe,__unstableIsLastBlockChangeIgnored:()=>Ot,__unstableIsSelectionCollapsed:()=>De,__unstableIsSelectionMergeable:()=>Ie,areInnerBlocksControlled:()=>Ht,canEditBlock:()=>mt,canInsertBlockType:()=>it,canInsertBlocks:()=>lt,canLockBlockType:()=>pt,canMoveBlock:()=>ut,canMoveBlocks:()=>dt,canRemoveBlock:()=>st,canRemoveBlocks:()=>ct,didAutomaticChange:()=>Zt,getAdjacentBlockClientId:()=>ye,getBlock:()=>G,getBlockAttributes:()=>X,getBlockCount:()=>ie,getBlockHierarchyRootClientId:()=>ve,getBlockIndex:()=>Ze,getBlockInsertionPoint:()=>Qe,getBlockListSettings:()=>Lt,getBlockMode:()=>Ve,getBlockName:()=>U,getBlockOrder:()=>Re,getBlockParents:()=>ge,getBlockParentsByBlockName:()=>be,getBlockRootClientId:()=>he,getBlockSelectionEnd:()=>ue,getBlockSelectionStart:()=>ce,getBlockTransformItems:()=>yt,getBlocks:()=>J,getBlocksByClientId:()=>ae,getClientIdsOfDescendants:()=>te,getClientIdsWithDescendants:()=>ne,getDraggedBlockClientIds:()=>Xe,getFirstMultiSelectedBlockClientId:()=>Se,getGlobalBlockCount:()=>re,getInserterItems:()=>_t,getLastMultiSelectedBlockClientId:()=>Te,getLowestCommonAncestorWithSelectedBlock:()=>_e,getMultiSelectedBlockClientIds:()=>xe,getMultiSelectedBlocks:()=>Ce,getMultiSelectedBlocksEndClientId:()=>Be,getMultiSelectedBlocksStartClientId:()=>ze,getNextBlockClientId:()=>Me,getPreviousBlockClientId:()=>ke,getSelectedBlock:()=>fe,getSelectedBlockClientId:()=>pe,getSelectedBlockClientIds:()=>Ee,getSelectedBlockCount:()=>de,getSelectedBlocksInitialCaretPosition:()=>we,getSelectionEnd:()=>se,getSelectionStart:()=>le,getSettings:()=>At,getTemplate:()=>nt,getTemplateLock:()=>rt,hasBlockMovingClientId:()=>Rt,hasInserterItems:()=>kt,hasMultiSelection:()=>Fe,hasSelectedBlock:()=>me,hasSelectedInnerBlock:()=>He,isAncestorBeingDragged:()=>Ke,isAncestorMultiSelected:()=>Ne,isBlockBeingDragged:()=>Ge,isBlockHighlighted:()=>jt,isBlockInsertionPointVisible:()=>et,isBlockMultiSelected:()=>Ae,isBlockSelected:()=>je,isBlockValid:()=>$,isBlockVisible:()=>qt,isBlockWithinSelection:()=>We,isCaretWithinFormattedText:()=>Je,isDraggingBlocks:()=>$e,isFirstMultiSelectedBlock:()=>Le,isLastBlockChangePersistent:()=>Nt,isMultiSelecting:()=>qe,isNavigationMode:()=>Pt,isSelectionEnabled:()=>Ye,isTyping:()=>Ue,isValidTemplate:()=>tt,wasBlockJustInserted:()=>Ft});var o={};n.r(o),n.d(o,{__unstableDeleteSelection:()=>Mn,__unstableExpandSelection:()=>En,__unstableMarkAutomaticChange:()=>Fn,__unstableMarkLastChangeAsPersistent:()=>Hn,__unstableMarkNextChangeAsNotPersistent:()=>Wn,__unstableSaveReusableBlock:()=>jn,__unstableSplitSelection:()=>wn,clearSelectedBlock:()=>an,duplicateBlocks:()=>Vn,enterFormattedText:()=>On,exitFormattedText:()=>Dn,flashBlock:()=>Gn,hideInsertionPoint:()=>_n,insertAfterBlock:()=>$n,insertBeforeBlock:()=>Un,insertBlock:()=>gn,insertBlocks:()=>bn,insertDefaultBlock:()=>Pn,mergeBlocks:()=>xn,moveBlockToPosition:()=>hn,moveBlocksDown:()=>mn,moveBlocksToPosition:()=>fn,moveBlocksUp:()=>pn,multiSelect:()=>on,receiveBlocks:()=>Gt,removeBlock:()=>Sn,removeBlocks:()=>Cn,replaceBlock:()=>un,replaceBlocks:()=>cn,replaceInnerBlocks:()=>Tn,resetBlocks:()=>Ut,resetSelection:()=>Xt,selectBlock:()=>Qt,selectNextBlock:()=>tn,selectPreviousBlock:()=>en,selectionChange:()=>In,setBlockMovingClientId:()=>Yn,setBlockVisibility:()=>Jn,setHasControlledInnerBlocks:()=>Kn,setNavigationMode:()=>qn,setTemplateValidity:()=>yn,showInsertionPoint:()=>vn,startDraggingBlocks:()=>zn,startMultiSelect:()=>nn,startTyping:()=>An,stopDraggingBlocks:()=>Bn,stopMultiSelect:()=>rn,stopTyping:()=>Nn,synchronizeTemplate:()=>kn,toggleBlockHighlight:()=>Xn,toggleBlockMode:()=>Ln,toggleSelection:()=>ln,updateBlock:()=>Jt,updateBlockAttributes:()=>Kt,updateBlockListSettings:()=>Rn,updateSettings:()=>Zn,validateBlocksToTemplate:()=>$t});var a=n(82402),i=n(52416);(0,i.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,a.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));var l=n(87462),s=n(1024),c=n.n(s),u=n(94184),d=n.n(u),m=n(96486),p=n(27598),f=n(78674),h=n(61315),g=n(40441),b=n(94878),v=n(1267);const _={default:(0,v.up)("BlockControls"),block:(0,v.up)("BlockControlsBlock"),inline:(0,v.up)("BlockFormatControls"),other:(0,v.up)("BlockControlsOther"),parent:(0,v.up)("BlockControlsParent")};var y=n(56191),k=n(66027),M=n(49884),w=n.n(M),E=n(54730);const x={insertUsage:{}},C={alignWide:!1,supportsLayout:!0,colors:[{name:(0,E.__)("Black"),slug:"black",color:"#000000"},{name:(0,E.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,E.__)("White"),slug:"white",color:"#ffffff"},{name:(0,E.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,E.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,E.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,E.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,E.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,E.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,E.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,E.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,E.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,E._x)("Small","font size name"),size:13,slug:"small"},{name:(0,E._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,E._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,E._x)("Large","font size name"),size:36,slug:"large"},{name:(0,E._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,E.__)("Thumbnail")},{slug:"medium",name:(0,E.__)("Medium")},{slug:"large",name:(0,E.__)("Large")},{slug:"full",name:(0,E.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableGalleryWithImageBlocks:!1,generateAnchors:!1,gradients:[{name:(0,E.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,E.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,E.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,E.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,E.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,E.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,E.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,E.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,E.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,E.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,E.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,E.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function S(e,t,n){return[...e.slice(0,n),...(0,m.castArray)(t),...e.slice(n)]}function T(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),S(o,e.slice(t,t+r),n)}function L(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:r,innerBlocks:o}=e;n[t].push(r),Object.assign(n,L(o,r))})),n}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},A(n.innerBlocks,n.clientId))),{})}function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.identity;const n={},r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n[o.clientId]=t(o)}return n}function z(e){return N(e,(e=>(0,m.omit)(e,"attributes")))}function B(e){return N(e,(e=>e.attributes))}function O(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,m.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,(0,m.isEqual)((0,m.keys)(n),(0,m.keys)(r)));var n,r}function D(e,t){const n={},r=[...t],o=[...t];for(;r.length;){const e=r.shift();r.push(...e.innerBlocks),o.push(...e.innerBlocks)}for(const e of o)n[e.clientId]={};for(const t of o)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function I(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=new Set([]),a=new Set;for(const t of n){let n=r?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){a.add(n);break}o.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of o)t[e]={...t[e]};for(const n of o)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of a)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const P=(0,m.flow)(w(),(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:r}=n;if(e===r)return t;(t={...t}).attributes=(0,m.mapValues)(t.attributes,((n,o)=>{const{name:a}=t.byClientId[o];return"core/block"===a&&n.ref===e?{...n,ref:r}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=e(t,n);if(r===t)return t;switch(r.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=D(r,n.blocks);r.tree=I(r,{...r.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=I(r,{...r.tree,[n.clientId]:{...r.tree[n.clientId],...r.byClientId[n.clientId],attributes:r.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...r.tree[t],attributes:r.attributes[t]},e)),{});r.tree=I(r,{...r.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=D(r,n.blocks);r.tree=I(r,{...(0,m.omit)(r.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const o=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!r.byClientId[t.parents[e]]||o.push(t.parents[e]);r.tree=I(r,r.tree,o,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const o of n.clientIds)void 0===t.parents[o]||""!==t.parents[o]&&!r.byClientId[t.parents[o]]||e.push(t.parents[o]);r.tree=I(r,(0,m.omit)(r.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),n.fromRootClientId&&n.fromRootClientId||e.push(""),r.tree=I(r,r.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=I(r,r.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,m.keys)((0,m.omitBy)(r.attributes,((e,t)=>"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId)));r.tree=I(r,{...r.tree,...e.reduce(((e,t)=>(e[t]={...r.byClientId[t],attributes:r.attributes[t],innerBlocks:r.tree[t].innerBlocks},e)),{})},e,!1)}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const r={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...o}=e.shift();e.push(...n),t.controlledInnerBlocks[o.clientId]&&(r[o.clientId]=!0)}}let o=t;t.order[n.rootClientId]&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));let a=o;return n.blocks.length&&(a=e(a,{...n,type:"INSERT_BLOCKS",index:0}),a.order={...a.order,...(0,m.reduce)(r,((e,n,r)=>(t.order[r]&&(e[r]=t.order[r]),e)),{})}),a}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:z(n.blocks),attributes:B(n.blocks),order:L(n.blocks),parents:A(n.blocks),controlledInnerBlocks:{},visibility:{}},r=D(e,n.blocks);return e.tree={...r,"":{innerBlocks:n.blocks.map((e=>r[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(r,o)=>{let a=e(r,o);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===a&&!i){var l;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(l=null==r?void 0:r.isPersistentChange)||void 0===l||l;return r.isPersistentChange===e?r:{...a,isPersistentChange:e}}return a={...a,isPersistentChange:i?!n:!O(o,t)},t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,a}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,r)=>{const o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(r,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...z(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,m.omit)(t.updates,"attributes");return(0,m.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,m.omit)(e,t.replacedClientIds),...z(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,m.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...B(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,r)=>({...n,[r]:(0,m.reduce)(t.uniqueByBlock?t.attributes[r]:t.attributes,((t,n,o)=>{var a,i;return n!==t[o]&&((t=(a=e[r])===(i=t)?{...a}:i)[o]=n),t}),e[r])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,m.omit)(e,t.replacedClientIds),...B(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,m.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=L(t.blocks);return{...e,...(0,m.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e[n]||[],o=L(t.blocks,n),{index:a=r.length}=t;return{...e,...o,[n]:S(r,o[n],a)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:r="",clientIds:o}=t,{index:a=e[r].length}=t;if(n===r){const t=e[r].indexOf(o[0]);return{...e,[r]:T(e[r],t,a,o.length)}}return{...e,[n]:(0,m.without)(e[n],...o),[r]:S(e[r],o,a)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=(0,m.first)(n),a=e[r];if(!a.length||o===(0,m.first)(a))return e;const i=a.indexOf(o);return{...e,[r]:T(a,i,i-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=(0,m.first)(n),a=(0,m.last)(n),i=e[r];if(!i.length||a===(0,m.last)(i))return e;const l=i.indexOf(o);return{...e,[r]:T(i,l,l+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=L(t.blocks);return(0,m.flow)([e=>(0,m.omit)(e,t.replacedClientIds),e=>({...e,...(0,m.omit)(r,"")}),e=>(0,m.mapValues)(e,(e=>(0,m.reduce)(e,((e,t)=>t===n[0]?[...e,...r[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,m.flow)([e=>(0,m.omit)(e,t.removedClientIds),e=>(0,m.mapValues)(e,(e=>(0,m.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...A(t.blocks)};case"INSERT_BLOCKS":return{...e,...A(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,m.omit)(e,t.replacedClientIds),...A(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,m.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:r}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e},visibility(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}});function R(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const Z=w()({blocks:P,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"SELECTION_CHANGE":return a.clientId?{selectionStart:{clientId:a.clientId,attributeKey:a.attributeKey,offset:a.startOffset},selectionEnd:{clientId:a.clientId,attributeKey:a.attributeKey,offset:a.endOffset}}:{selectionStart:a.start||o.selectionStart,selectionEnd:a.end||o.selectionEnd};case"RESET_SELECTION":const{selectionStart:i,selectionEnd:l}=a;return{selectionStart:i,selectionEnd:l};case"MULTI_SELECT":const{start:s,end:c}=a;return s===(null===(e=o.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=o.selectionEnd)||void 0===t?void 0:t.clientId)?o:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==o||null===(n=o.selectionStart)||void 0===n?void 0:n.clientId,d=null==o||null===(r=o.selectionEnd)||void 0===r?void 0:r.clientId;if(!u&&!d)return o;if(!a.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!a.blocks.some((e=>e.clientId===d)))return{...o,selectionEnd:o.selectionStart}}return{selectionStart:R(o.selectionStart,a),selectionEnd:R(o.selectionEnd,a)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,m.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,m.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,m.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:r}=t;return{rootClientId:e,index:n,__unstableWithInserter:r};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:o}=n,i=(0,y.select)(a.store).getActiveBlockVariation(o,r);let l=null!=i&&i.name?`${o}/${i.name}`:o;const s={name:l};return"core/block"===o&&(s.ref=r.ref,l+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return null},isNavigationMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:r}=t;return r?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":return n.blocks.length?{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source}:t;case"RESET_BLOCKS":return{}}return t}});var j=n(69530),H=n(64776),W=n(20376),F=n(15953),q=n(80369);function Y(e){const{multiline:t,__unstableMultilineWrapperTags:n,__unstablePreserveWhiteSpace:r}=e;return{multilineTag:t,multilineWrapperTags:n,preserveWhiteSpace:r}}const V=[];function U(e,t){const n=e.blocks.byClientId[t],r="core/social-link";if("web"!==H.Z.OS&&(null==n?void 0:n.name)===r){const n=e.blocks.attributes[t],{service:o}=n;return o?`core/social-link-${o}`:r}return n?n.name:null}function $(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function X(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}function G(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const K=(0,j.Z)(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:X(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function J(e,t){var n;const r=t&&Ht(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[r])||void 0===n?void 0:n.innerBlocks)||V}const Q=(0,j.Z)(((e,t)=>({clientId:t,innerBlocks:ee(e,t)})),(e=>[e.blocks.order])),ee=(0,j.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,m.map)(Re(e,t),(t=>Q(e,t)))}),(e=>[e.blocks.order])),te=(0,j.Z)(((e,t)=>{const n=[];for(const r of t)for(const t of Re(e,r))n.push(t,...te(e,[t]));return n}),(e=>[e.blocks.order])),ne=(0,j.Z)((e=>{const t=[];for(const n of Re(e))t.push(n,...te(e,[n]));return t}),(e=>[e.blocks.order])),re=(0,j.Z)(((e,t)=>{const n=ne(e);return t?(0,m.reduce)(n,((n,r)=>e.blocks.byClientId[r].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),oe=(0,j.Z)(((e,t)=>{if(!t)return V;const n=ne(e).filter((n=>e.blocks.byClientId[n].name===t));return n.length>0?n:V}),(e=>[e.blocks.order,e.blocks.byClientId])),ae=(0,j.Z)(((e,t)=>(0,m.map)((0,m.castArray)(t),(t=>G(e,t)))),((e,t)=>(0,m.map)((0,m.castArray)(t),(t=>e.blocks.tree[t]))));function ie(e,t){return Re(e,t).length}function le(e){return e.selection.selectionStart}function se(e){return e.selection.selectionEnd}function ce(e){return e.selection.selectionStart.clientId}function ue(e){return e.selection.selectionEnd.clientId}function de(e){return xe(e).length||(e.selection.selectionStart.clientId?1:0)}function me(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function pe(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function fe(e){const t=pe(e);return t?G(e,t):null}function he(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const ge=(0,j.Z)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=t;for(;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(e=>[e.blocks.parents])),be=(0,j.Z)((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=ge(e,t,r);return(0,m.map)((0,m.filter)((0,m.map)(o,(t=>({id:t,name:U(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function ve(e,t){let n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function _e(e,t){const n=pe(e),r=[...ge(e,t),t],o=[...ge(e,n),n];let a;const i=Math.min(r.length,o.length);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=pe(e)),void 0===t&&(t=n<0?Se(e):Te(e)),!t)return null;const r=he(e,t);if(null===r)return null;const{order:o}=e.blocks,a=o[r],i=a.indexOf(t),l=i+1*n;return l<0||l===a.length?null:a[l]}function ke(e,t){return ye(e,t,-1)}function Me(e,t){return ye(e,t,1)}function we(e){return e.initialPosition}const Ee=(0,j.Z)((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return V;if(t.clientId===n.clientId)return[t.clientId];const r=he(e,t.clientId);if(null===r)return V;const o=Re(e,r),a=o.indexOf(t.clientId),i=o.indexOf(n.clientId);return a>i?o.slice(i,a+1):o.slice(a,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?V:Ee(e)}const Ce=(0,j.Z)((e=>{const t=xe(e);return t.length?t.map((t=>G(e,t))):V}),(e=>[...Ee.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Se(e){return(0,m.first)(xe(e))||null}function Te(e){return(0,m.last)(xe(e))||null}function Le(e,t){return Se(e)===t}function Ae(e,t){return-1!==xe(e).indexOf(t)}const Ne=(0,j.Z)(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=he(e,n),r=Ae(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function ze(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Be(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Oe(e){const t=le(e),n=se(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function De(e){const t=le(e),n=se(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Ie(e,t){const n=le(e),r=se(e);if(n.clientId===r.clientId)return!1;if(!n.attributeKey||!r.attributeKey||void 0===n.offset||void 0===r.offset)return!1;const o=he(e,n.clientId);if(o!==he(e,r.clientId))return!1;const i=Re(e,o);let l,s;i.indexOf(n.clientId)>i.indexOf(r.clientId)?(l=r,s=n):(l=n,s=r);const c=t?s.clientId:l.clientId,u=t?l.clientId:s.clientId,d=G(e,c);if(!(0,a.getBlockType)(d.name).merge)return!1;const m=G(e,u);if(m.name===d.name)return!0;const p=(0,a.switchToBlockType)(m,d.name);return p&&p.length}const Pe=e=>{const t=le(e),n=se(e);if(t.clientId===n.clientId)return V;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return V;const r=he(e,t.clientId);if(r!==he(e,n.clientId))return V;const o=Re(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId),[s,c]=i>l?[n,t]:[t,n],u=G(e,s.clientId),d=(0,a.getBlockType)(u.name),m=G(e,c.clientId),p=(0,a.getBlockType)(m.name),f=u.attributes[s.attributeKey],h=m.attributes[c.attributeKey],g=d.attributes[s.attributeKey],b=p.attributes[c.attributeKey];let v=(0,F.create)({html:f,...Y(g)}),_=(0,F.create)({html:h,...Y(b)});return v=(0,F.remove)(v,0,s.offset),_=(0,F.remove)(_,c.offset,_.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,F.toHTMLString)({value:v,...Y(g)})}},{...m,attributes:{...m.attributes,[c.attributeKey]:(0,F.toHTMLString)({value:_,...Y(b)})}}]};function Re(e,t){return e.blocks.order[t||""]||V}function Ze(e,t){return Re(e,he(e,t)).indexOf(t)}function je(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function He(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,m.some)(Re(e,t),(t=>je(e,t)||Ae(e,t)||n&&He(e,t,n)))}function We(e,t){if(!t)return!1;const n=xe(e),r=n.indexOf(t);return r>-1&&rGe(e,t)))}function Je(){return(0,q.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}function Qe(e){let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:a}=o;return a?(t=he(e,a)||void 0,n=Ze(e,o.clientId)+1):n=Re(e).length,{rootClientId:t,index:n}}function et(e){return null!==e.insertionPoint}function tt(e){return e.template.isValid}function nt(e){return e.settings.template}function rt(e,t){if(!t)return e.settings.templateLock;const n=Lt(e,t);return n?n.templateLock:null}const ot=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,m.isBoolean)(e)?e:(0,m.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},at=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,a.getBlockType)(t),!n)return!1;const{allowedBlockTypes:o}=At(e),l=ot(o,t,!0);if(!l)return!1;const s=!!rt(e,r);if(s)return!1;const c=Lt(e,r);if(r&&void 0===c)return!1;const u=null==c?void 0:c.allowedBlocks,d=ot(u,t),p=n.parent,f=U(e,r),h=ot(p,f);let g=!0;const b=n.ancestor;if(b){const t=[r,...ge(e,r)];g=(0,m.some)(t,(t=>ot(b,U(e,t))))}const v=g&&(null===d&&null===h||!0===d||!0===h);return v?(0,i.applyFilters)("blockEditor.__unstableCanInsertBlockType",v,n,r,{getBlock:G.bind(null,e),getBlockParentsByBlockName:be.bind(null,e)}):v},it=(0,j.Z)(at,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function lt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>it(e,U(e,t),n)))}function st(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return!0;const{lock:o}=r,a=!!rt(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!a:!(null!=o&&o.remove)}function ct(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>st(e,t,n)))}function ut(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return;const{lock:o}=r,a="all"===rt(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!a:!(null!=o&&o.move)}function dt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>ut(e,t,n)))}function mt(e,t){const n=X(e,t);if(null===n)return!0;const{lock:r}=n;return!(null!=r&&r.edit)}function pt(e,t){var n;return!!(0,a.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function ft(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}const ht=(e,t,n)=>!!(0,a.hasBlockSupport)(t,"inserter",!0)&&at(e,t.name,n),gt=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:a=0}=ft(e,r)||{};return{...t,id:r,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:bt(o,a)}},bt=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},vt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let o=!1;(0,a.hasBlockSupport)(t.name,"multiple",!0)||(o=(0,m.some)(ae(e,ne(e)),{name:t.name}));const{time:i,count:l=0}=ft(e,r)||{},s={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:bt(i,l)};if("transform"===n)return s;const c=(0,a.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},_t=(0,j.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=vt(e,{buildScope:"inserter"}),r=/^\s*)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,o=t=>{let n=W.Z;if("web"===H.Z.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,o=(0,a.getBlockType)(t+r);o&&(n=o.icon)}}const o=`core/block/${t.id}`,{time:i,count:l=0}=ft(e,o)||{},s=bt(i,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:s}},i=(0,a.getBlockTypes)().filter((n=>ht(e,n,t))).map(n),l=at(e,"core/block",t)?It(e).map(o):[],s=i.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=gt(e,n);t.push(...r.map(o))}return t}),[]),c=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:u,noncore:d}=s.reduce(c,{core:[],noncore:[]}),m=[...u,...d];return[...m,...l]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,It(e),(0,a.getBlockTypes)()])),yt=(0,j.Z)((function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=(0,m.castArray)(t),[i]=o,l=vt(e,{buildScope:"transform"}),s=(0,a.getBlockTypes)().filter((t=>ht(e,t,r))).map(l),c=(0,m.mapKeys)(s,(e=>{let{name:t}=e;return t}));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,E.__)("Unwrap"),icon:null===(n=c[null==i?void 0:i.name])||void 0===n?void 0:n.icon};const u=(0,a.getPossibleBlockTransformations)(o).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return(0,m.orderBy)(u,(e=>c[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),kt=(0,j.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,m.some)((0,a.getBlockTypes)(),(n=>ht(e,n,t)));if(n)return!0;const r=at(e,"core/block",t)&&It(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,It(e),(0,a.getBlockTypes)()])),Mt=(0,j.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,m.filter)((0,a.getBlockTypes)(),(n=>ht(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),wt=(0,j.Z)((function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!r)return;const o=null===(t=e.blockListSettings[r])||void 0===t?void 0:t.__experimentalDefaultBlock,a=null===(n=e.blockListSettings[r])||void 0===n?void 0:n.__experimentalDirectInsert;return o&&a?"function"==typeof a?a(G(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),Et=(0,j.Z)(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,a.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),xt=(0,j.Z)((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=At(e),r=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return Et(e,n)})),o=r.filter((e=>{let{blocks:t}=e;return((e,t)=>{if((0,m.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!ot(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return o}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Ct=(0,j.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=xt(e),r=(0,m.filter)(n,(n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return it(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),St=(0,j.Z)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;const r=Ct(e,n),o=Array.isArray(t)?t:[t];return r.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>o.includes(e)))}))}),((e,t)=>[...Ct.getDependants(e,t)])),Tt=(0,j.Z)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||Ht(e,n)})))return V;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return St(e,r,n)}),((e,t)=>[...St.getDependants(e,t)]));function Lt(e,t){return e.blockListSettings[t]}function At(e){return e.settings}function Nt(e){return e.blocks.isPersistentChange}const zt=(0,j.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),Bt=(0,j.Z)(((e,t)=>{var n;const r=(0,m.find)(It(e),(e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[It(e)]));function Ot(e){return e.blocks.isIgnoredChange}function Dt(e){return e.lastBlockAttributesChange}function It(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:V}function Pt(e){return e.isNavigationMode}function Rt(e){return e.hasBlockMovingClientId}function Zt(e){return!!e.automaticChangeStatus}function jt(e,t){return e.highlightedBlock===t}function Ht(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Wt=(0,j.Z)(((e,t)=>{if(!t.length)return null;const n=pe(e);if(t.includes(U(e,n)))return n;const r=xe(e),o=be(e,n||r[0],t);return o?(0,m.last)(o):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Ft(e,t,n){const{lastBlockInserted:r}=e;return r.clientId===t&&r.source===n}function qt(e,t){var n,r;return null===(n=null===(r=e.blocks.visibility)||void 0===r?void 0:r[t])||void 0===n||n}const Yt=(0,j.Z)((e=>new Set(Object.keys(e.blocks.visibility).filter((t=>e.blocks.visibility[t])))),(e=>[e.blocks.visibility]));var Vt=n(36042);const Ut=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n($t(e))},$t=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getTemplate(),i=n.getTemplateLock(),l=!o||"all"!==i||(0,a.doBlocksMatchTemplate)(e,o);if(l!==n.isValidTemplate())return r.setTemplateValidity(l),l};function Xt(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Gt(e){return(0,q.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Kt(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,m.castArray)(e),attributes:t,uniqueByBlock:n}}function Jt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const en=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getPreviousBlockClientId(e);o&&r.selectBlock(o,-1)},tn=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function nn(){return{type:"START_MULTI_SELECT"}}function rn(){return{type:"STOP_MULTI_SELECT"}}const on=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r=>{let{select:o,dispatch:a}=r;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;a({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=o.getSelectedBlockCount();(0,Vt.D)((0,E.sprintf)((0,E._n)("%s block selected.","%s blocks selected.",i),i),"assertive")}};function an(){return{type:"CLEAR_SELECTED_BLOCK"}}function ln(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function sn(e,t){var n,r;const o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,a.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;const r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;const{attributes:i={}}=e,l=o[n];return{...e,attributes:{...i,className:`${r||""} is-style-${l}`.trim()}}}))}const cn=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;return a=>{let{select:i,dispatch:l}=a;e=(0,m.castArray)(e),t=sn((0,m.castArray)(t),i.getSettings());const s=i.getBlockRootClientId((0,m.first)(e));for(let e=0;e{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function un(e,t){return cn(e,t)}const dn=e=>(t,n)=>r=>{let{select:o,dispatch:a}=r;o.canMoveBlocks(t,n)&&a({type:e,clientIds:(0,m.castArray)(t),rootClientId:n})},mn=dn("MOVE_BLOCKS_DOWN"),pn=dn("MOVE_BLOCKS_UP"),fn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return o=>{let{select:a,dispatch:i}=o;if(a.canMoveBlocks(e,t)){if(t!==n){if(!a.canRemoveBlocks(e,t))return;if(!a.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function hn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return fn([e],t,n,r)}function gn(e,t,n,r,o){return bn([e],t,n,r,0,o)}const bn=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0;return i=>{let{select:l,dispatch:s}=i;(0,m.isObject)(o)&&(a=o,o=0,(0,q.default)("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=sn((0,m.castArray)(e),l.getSettings());const c=[];for(const t of e)l.canInsertBlockType(t.name,n)&&c.push(t);c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:a})}};function vn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:r}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r}}function _n(){return{type:"HIDE_INSERTION_POINT"}}function yn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const kn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=t.getBlocks(),o=t.getTemplate(),i=(0,a.synchronizeBlocksWithTemplate)(r,o);n.resetBlocks(i)},Mn=e=>t=>{let{registry:n,select:r,dispatch:o}=t;const i=r.getSelectionStart(),l=r.getSelectionEnd();if(i.clientId===l.clientId)return;if(!i.attributeKey||!l.attributeKey||void 0===i.offset||void 0===l.offset)return!1;const s=r.getBlockRootClientId(i.clientId);if(s!==r.getBlockRootClientId(l.clientId))return;const c=r.getBlockOrder(s);let u,d;c.indexOf(i.clientId)>c.indexOf(l.clientId)?(u=l,d=i):(u=i,d=l);const p=e?d:u,f=r.getBlock(p.clientId),h=(0,a.getBlockType)(f.name);if(!h.merge)return;const g=u,b=d,v=r.getBlock(g.clientId),_=(0,a.getBlockType)(v.name),y=r.getBlock(b.clientId),k=(0,a.getBlockType)(y.name),M=v.attributes[g.attributeKey],w=y.attributes[b.attributeKey],E=_.attributes[g.attributeKey],x=k.attributes[b.attributeKey];let C=(0,F.create)({html:M,...Y(E)}),S=(0,F.create)({html:w,...Y(x)});C=(0,F.remove)(C,g.offset,C.text.length),S=(0,F.insert)(S,"†",0,b.offset);const T=(0,a.cloneBlock)(v,{[g.attributeKey]:(0,F.toHTMLString)({value:C,...Y(E)})}),L=(0,a.cloneBlock)(y,{[b.attributeKey]:(0,F.toHTMLString)({value:S,...Y(x)})}),A=e?T:L,N=v.name===y.name?[A]:(0,a.switchToBlockType)(A,h.name);if(!N||!N.length)return;let z;if(e){const e=N.pop();z=h.merge(e.attributes,L.attributes)}else{const e=N.shift();z=h.merge(T.attributes,e.attributes)}const B=(0,m.findKey)(z,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),O=z[B],D=(0,F.create)({html:O,...Y(h.attributes[B])}),I=D.text.indexOf("†"),P=(0,F.remove)(D,I,I+1),R=(0,F.toHTMLString)({value:P,...Y(h.attributes[B])});z[B]=R;const Z=r.getSelectedBlockClientIds(),j=[...e?N:[],{...f,attributes:{...f.attributes,...z}},...e?[]:N];n.batch((()=>{o.selectionChange(f.clientId,B,I,I),o.replaceBlocks(Z,j,0,r.getSelectedBlocksInitialCaretPosition())}))},wn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();if(r.clientId===o.clientId)return;if(!r.attributeKey||!o.attributeKey||void 0===r.offset||void 0===o.offset)return;const i=t.getBlockRootClientId(r.clientId);if(i!==t.getBlockRootClientId(o.clientId))return;const l=t.getBlockOrder(i);let s,c;l.indexOf(r.clientId)>l.indexOf(o.clientId)?(s=o,c=r):(s=r,c=o);const u=s,d=c,m=t.getBlock(u.clientId),p=(0,a.getBlockType)(m.name),f=t.getBlock(d.clientId),h=(0,a.getBlockType)(f.name),g=m.attributes[u.attributeKey],b=f.attributes[d.attributeKey],v=p.attributes[u.attributeKey],_=h.attributes[d.attributeKey];let y=(0,F.create)({html:g,...Y(v)}),k=(0,F.create)({html:b,...Y(_)});y=(0,F.remove)(y,u.offset,y.text.length),k=(0,F.remove)(k,0,d.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...m,attributes:{...m.attributes,[u.attributeKey]:(0,F.toHTMLString)({value:y,...Y(v)})}},(0,a.createBlock)((0,a.getDefaultBlockName)()),{...f,attributes:{...f.attributes,[d.attributeKey]:(0,F.toHTMLString)({value:k,...Y(_)})}}],1,t.getSelectedBlocksInitialCaretPosition())},En=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();n.selectionChange({start:{clientId:r.clientId},end:{clientId:o.clientId}})},xn=(e,t)=>n=>{let{select:r,dispatch:o}=n;const i=[e,t];o({type:"MERGE_BLOCKS",blocks:i});const[l,s]=i,c=r.getBlock(l),u=(0,a.getBlockType)(c.name);if(u&&!u.merge)return void o.selectBlock(c.clientId);const d=r.getBlock(s),p=(0,a.getBlockType)(d.name),{clientId:f,attributeKey:h,offset:g}=r.getSelectionStart(),b=(f===l?u:p).attributes[h],v=(f===l||f===s)&&void 0!==h&&void 0!==g&&!!b;b||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const _=(0,a.cloneBlock)(c),y=(0,a.cloneBlock)(d);if(v){const e=f===l?_:y,t=e.attributes[h],n=(0,F.insert)((0,F.create)({html:t,...Y(b)}),"†",g,g);e.attributes[h]=(0,F.toHTMLString)({value:n,...Y(b)})}const k=c.name===d.name?[y]:(0,a.switchToBlockType)(y,c.name);if(!k||!k.length)return;const M=u.merge(_.attributes,k[0].attributes);if(v){const e=(0,m.findKey)(M,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),t=M[e],n=(0,F.create)({html:t,...Y(u.attributes[e])}),r=n.text.indexOf("†"),a=(0,F.remove)(n,r,r+1),i=(0,F.toHTMLString)({value:a,...Y(u.attributes[e])});M[e]=i,o.selectionChange(c.clientId,e,r,r)}o.replaceBlocks([c.clientId,d.clientId],[{...c,attributes:{...c.attributes,...M}},...k.slice(1)],0)},Cn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;e=(0,m.castArray)(e);const a=r.getBlockRootClientId(e[0]);r.canRemoveBlocks(e,a)&&(t&&o.selectPreviousBlock(e[0]),o({type:"REMOVE_BLOCKS",clientIds:e}),o((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()})))}};function Sn(e,t){return Cn([e],t)}function Tn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function Ln(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function An(){return{type:"START_TYPING"}}function Nn(){return{type:"STOP_TYPING"}}function zn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Bn(){return{type:"STOP_DRAGGING_BLOCKS"}}function On(){return(0,q.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Dn(){return(0,q.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function In(e,t,n,r){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}:{type:"SELECTION_CHANGE",...e}}const Pn=(e,t,n)=>r=>{let{dispatch:o}=r;const i=(0,a.getDefaultBlockName)();if(!i)return;const l=(0,a.createBlock)(i,e);return o.insertBlock(l,n,t)};function Rn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Zn(e){return{type:"UPDATE_SETTINGS",settings:e}}function jn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Hn(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Wn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Fn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},qn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n({type:"SET_NAVIGATION_MODE",isNavigationMode:e}),e?(0,Vt.D)((0,E.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):(0,Vt.D)((0,E.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}},Yn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,Vt.D)((0,E.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},Vn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;const i=r.getBlocksByClientId(e);if((0,m.some)(i,(e=>!e)))return;const l=i.map((e=>e.name));if(l.some((e=>!(0,a.hasBlockSupport)(e,"multiple",!0))))return;const s=r.getBlockRootClientId(e[0]),c=r.getBlockIndex((0,m.last)((0,m.castArray)(e))),u=i.map((e=>(0,a.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(u,c+1,s,t),u.length>1&&t&&o.multiSelect((0,m.first)(u).clientId,(0,m.last)(u).clientId),u.map((e=>e.clientId))}},Un=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const a=n.getBlockIndex(e);return r.insertDefaultBlock({},o,a)},$n=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const a=n.getBlockIndex(e);return r.insertDefaultBlock({},o,a+1)};function Xn(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Gn=e=>async t=>{let{dispatch:n}=t;n(Xn(e,!0)),await new Promise((e=>setTimeout(e,150))),n(Xn(e,!1))};function Kn(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Jn(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}const Qn="core/block-editor",er={reducer:Z,selectors:r,actions:o},tr=(0,k.Z)(Qn,{...er,persist:["preferences"]});(0,y.registerStore)(Qn,{...er,persist:["preferences"]});const nr={name:"",isSelected:!1},rr=(0,s.createContext)(nr),{Provider:or}=rr;function ar(){return(0,s.useContext)(rr)}function ir(){const{isSelected:e,clientId:t,name:n}=ar();return(0,b.Z)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:a,getMultiSelectedBlockClientIds:i}=r(tr);return!!a(t)&&i().every((e=>o(e)===n))}),[t,e,n])}function lr(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:o=!1}=e;const i=function(e,t){const n=ir(),{clientId:r}=ar(),o=(0,b.Z)((e=>{const{getBlockName:n,hasSelectedInnerBlock:o}=e(tr),{hasBlockSupport:i}=e(a.store);return t&&i(n(r),"__experimentalExposeControlsToChildren",!1)&&o(r)}),[t,r]);var i;return n?null===(i=_[e])||void 0===i?void 0:i.Fill:o?_.parent.Fill:null}(t,o);return i?(0,s.createElement)(f.Z,{document},(0,s.createElement)(i,null,(e=>{const o=(0,m.isEmpty)(e)?null:e;return(0,s.createElement)(h.Z.Provider,{value:o},"default"===t&&(0,s.createElement)(g.Z,{controls:n}),r)}))):null}var sr=n(93879);function cr(e){let{group:t="default",...n}=e;const r=(0,s.useContext)(h.Z),o=_[t].Slot,a=(0,sr.Z)(o.__unstableName);return Boolean(a.fills&&a.fills.length)?"default"===t?(0,s.createElement)(o,(0,l.Z)({},n,{bubblesVirtually:!0,fillProps:r})):(0,s.createElement)(g.Z,null,(0,s.createElement)(o,(0,l.Z)({},n,{bubblesVirtually:!0,fillProps:r}))):null}const ur=lr;ur.Slot=cr;const dr=e=>(0,s.createElement)(lr,(0,l.Z)({group:"inline"},e));dr.Slot=e=>(0,s.createElement)(cr,(0,l.Z)({group:"inline"},e));const mr=ur;var pr=n(31206),fr=n(11748),hr=n(68629),gr=n(304),br=n(92900),vr=n(31349),_r=n(18487),yr=n(63708),kr=n(49004),Mr=n(32653),wr=n(80914),Er=n(62248),xr=n(40314);function Cr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}var Sr=n(27381),Tr=n(66794),Lr=n(8896),Ar=n(23120);const Nr=(0,s.createContext)({refs:new Map,callbacks:new Map});function zr(e){let{children:t}=e;const n=(0,s.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(Nr.Provider,{value:n},t)}function Br(e){const{refs:t,callbacks:n}=(0,s.useContext)(Nr),r=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),(0,Ar.Z)((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function Or(e){const{refs:t}=(0,s.useContext)(Nr),n=(0,s.useRef)();return n.current=e,(0,s.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function Dr(e){const{callbacks:t}=(0,s.useContext)(Nr),n=Or(e),[r,o]=(0,s.useState)(null);return(0,s.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}const Ir=["color","border","typography","spacing"],Pr={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},Rr={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function Zr(e){const{name:t,clientId:n}=ar();return(0,b.Z)((r=>{if(Ir.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let o;const i=(e=>Rr[e]||e)(e);[...r(tr).getBlockParents(n),n].forEach((e=>{const n=r(tr).getBlockName(e);if((0,a.hasBlockSupport)(n,"__experimentalSettings",!1)){var l;const n=r(tr).getBlockAttributes(e),a=null!==(l=(0,m.get)(n,`settings.blocks.${t}.${i}`))&&void 0!==l?l:(0,m.get)(n,`settings.${i}`);void 0!==a&&(o=a)}}));const l=r(tr).getSettings();if(void 0===o){var s;const e=`__experimentalFeatures.${i}`,n=`__experimentalFeatures.blocks.${t}.${i}`;o=null!==(s=(0,m.get)(l,n))&&void 0!==s?s:(0,m.get)(l,e)}var c,u;if(void 0!==o)return a.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(c=null!==(u=o.custom)&&void 0!==u?u:o.theme)&&void 0!==c?c:o.default:o;const d=Pr[i]?Pr[i](l):void 0;return void 0!==d?d:"typography.dropCap"===i||void 0}),[t,n,e])}var jr=n(84964),Hr=n(34093);const Wr={default:(0,v.up)("InspectorControls"),advanced:(0,v.up)("InspectorAdvancedControls"),border:(0,v.up)("InspectorControlsBorder"),color:(0,v.up)("InspectorControlsColor"),dimensions:(0,v.up)("InspectorControlsDimensions"),typography:(0,v.up)("InspectorControlsTypography")};function Fr(e){var t;let{__experimentalGroup:n="default",children:r}=e;const o=ir(),a=null===(t=Wr[n])||void 0===t?void 0:t.Fill;return a?o?(0,s.createElement)(f.Z,{document},(0,s.createElement)(a,null,(e=>{const t=(0,m.isEmpty)(e)?null:e;return(0,s.createElement)(Hr.h.Provider,{value:t},r)}))):null:("undefined"!=typeof process&&process.env,null)}var qr=n(90439),Yr=n(41882);const Vr=e=>{if(!(0,m.isObject)(e)||Array.isArray(e))return e;const t=(0,m.pickBy)((0,m.mapValues)(e,Vr),m.identity);return(0,m.isEmpty)(t)?void 0:t};function Ur(e,t,n){return(0,m.setWith)(e?(0,m.clone)(e):{},t,n,m.clone)}function $r(e,t,n,r,o,a){var i;if((0,m.every)(e,(e=>!e)))return n;if(1===a.length&&n.innerBlocks.length===r.length)return n;let l=null===(i=r[0])||void 0===i?void 0:i.attributes;if(a.length>1&&r.length>1){if(!r[o])return n;var s;l=null===(s=r[o])||void 0===s?void 0:s.attributes}let c=n;return(0,m.forEach)(e,((e,n)=>{e&&t[n].forEach((e=>{const t=(0,m.get)(l,e);t&&(c={...c,attributes:Ur(c.attributes,e,t)})}))})),c}function Xr(e,t,n){const r=(0,a.getBlockSupport)(e,t),o=null==r?void 0:r.__experimentalSkipSerialization;return Array.isArray(o)?o.includes(n):o}function Gr(e){let{children:t,group:n,label:r}=e;const{updateBlockAttributes:o}=(0,Yr.Z)(tr),{getBlockAttributes:a,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:l,hasMultiSelection:c}=(0,b.Z)(tr),u=l(),d=(0,s.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=c()?i():[u];n.forEach((n=>{const{style:r}=a(n);let o={style:r};e.forEach((e=>{o={...o,...e(o)}})),o={...o,style:Vr(o.style)},t[n]=o})),o(n,t,!0)}),[Vr,a,i,c,u,o]);return(0,s.createElement)(qr.Z,{className:`${n}-block-support-panel`,label:r,resetAll:d,key:u,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function Kr(e){let{Slot:t,...n}=e;const r=(0,s.useContext)(Hr.h);return(0,s.createElement)(t,(0,l.Z)({},n,{fillProps:r,bubblesVirtually:!0}))}function Jr(e){var t;let{__experimentalGroup:n="default",label:r,...o}=e;const a=null===(t=Wr[n])||void 0===t?void 0:t.Slot,i=(0,sr.Z)(null==a?void 0:a.__unstableName);return a&&i?Boolean(i.fills&&i.fills.length)?r?(0,s.createElement)(Gr,{group:n,label:r},(0,s.createElement)(Kr,(0,l.Z)({},o,{Slot:a}))):(0,s.createElement)(a,(0,l.Z)({},o,{bubblesVirtually:!0})):null:("undefined"!=typeof process&&process.env,null)}const Qr=Fr;Qr.Slot=Jr;const eo=e=>(0,s.createElement)(Fr,(0,l.Z)({},e,{__experimentalGroup:"advanced"}));eo.Slot=e=>(0,s.createElement)(Jr,(0,l.Z)({},e,{__experimentalGroup:"advanced"})),eo.slotName="InspectorAdvancedControls";const to=Qr;var no=n(26015),ro=n(47597);const oo=function(e){return(0,Ar.Z)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:r}=t;e.current.scrollBy(n,r)}const r={passive:!0};return t.addEventListener("wheel",n,r),()=>{t.removeEventListener("wheel",n,r)}}),[e])};function ao(e){let{clientId:t,bottomClientId:n,children:r,__unstableRefreshSize:o,__unstableCoverTarget:a=!1,__unstablePopoverSlot:i,__unstableContentRef:c,...u}=e;const m=Dr(t),p=Dr(null!=n?n:t),f=oo(c),h=(0,s.useMemo)((()=>m&&p===m?{position:"absolute",width:m.offsetWidth,height:m.offsetHeight}:{}),[m,p,o]);if(!m||n&&!p)return null;const g={top:m,bottom:p};return(0,s.createElement)(ro.Z,(0,l.Z)({ref:f,animate:!1,position:"top right left",focusOnMount:!1,anchorRef:g,__unstableSlotName:i||null,__unstableObserveElement:m,__unstableForcePosition:!0,__unstableShift:!0},u,{className:d()("block-editor-block-popover",u.className)}),a&&(0,s.createElement)("div",{style:h},r),!a&&r)}function io(e){const t=(0,a.getBlockSupport)(e,ho);return!!(!0===t||null!=t&&t.margin)}function lo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Zr("spacing.margin"),n=!ko(e,"margin");return!io(e)||t||n}function so(e){var t;const{name:n,attributes:{style:r},setAttributes:o}=e,a=(0,Sr.nj)({availableUnits:Zr("spacing.units")||["%","px","em","rem","vw"]}),i=yo(n,"margin"),l=i&&i.some((e=>bo.includes(e)));return lo(e)?null:H.Z.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Tr.Z,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,margin:e}};o({style:Vr(t)})},label:(0,E.__)("Margin"),sides:i,units:a,allowReset:!1,splitOnAxis:l})),native:null})}function co(e){var t,n;let{clientId:r,attributes:o}=e;const a=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,i=(0,s.useMemo)((()=>{var e,t,n,r;return{borderTopWidth:null!==(e=null==a?void 0:a.top)&&void 0!==e?e:0,borderRightWidth:null!==(t=null==a?void 0:a.right)&&void 0!==t?t:0,borderBottomWidth:null!==(n=null==a?void 0:a.bottom)&&void 0!==n?n:0,borderLeftWidth:null!==(r=null==a?void 0:a.left)&&void 0!==r?r:0,top:null!=a&&a.top?`-${a.top}`:0,right:null!=a&&a.right?`-${a.right}`:0,bottom:null!=a&&a.bottom?`-${a.bottom}`:0,left:null!=a&&a.left?`-${a.left}`:0}}),[a]),[l,c]=(0,s.useState)(!1),u=(0,s.useRef)(a),d=(0,s.useRef)(),m=()=>{d.current&&window.clearTimeout(d.current)};return(0,s.useEffect)((()=>((0,no.ZP)(a,u.current)||(c(!0),u.current=a,m(),d.current=setTimeout((()=>{c(!1)}),400)),()=>m())),[a]),l?(0,s.createElement)(ao,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:a},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:i})):null}function uo(e){const t=(0,a.getBlockSupport)(e,ho);return!!(!0===t||null!=t&&t.padding)}function mo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Zr("spacing.padding"),n=!ko(e,"padding");return!uo(e)||t||n}function po(e){var t;const{name:n,attributes:{style:r},setAttributes:o}=e,a=(0,Sr.nj)({availableUnits:Zr("spacing.units")||["%","px","em","rem","vw"]}),i=yo(n,"padding"),l=i&&i.some((e=>bo.includes(e)));return mo(e)?null:H.Z.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Tr.Z,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,padding:e}};o({style:Vr(t)})},label:(0,E.__)("Padding"),sides:i,units:a,allowReset:!1,splitOnAxis:l})),native:null})}function fo(e){var t,n;let{clientId:r,attributes:o}=e;const a=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,i=(0,s.useMemo)((()=>{var e,t,n,r;return{borderTopWidth:null!==(e=null==a?void 0:a.top)&&void 0!==e?e:0,borderRightWidth:null!==(t=null==a?void 0:a.right)&&void 0!==t?t:0,borderBottomWidth:null!==(n=null==a?void 0:a.bottom)&&void 0!==n?n:0,borderLeftWidth:null!==(r=null==a?void 0:a.left)&&void 0!==r?r:0}}),[a]),[l,c]=(0,s.useState)(!1),u=(0,s.useRef)(a),d=(0,s.useRef)(),m=()=>{d.current&&window.clearTimeout(d.current)};return(0,s.useEffect)((()=>((0,no.ZP)(a,u.current)||(c(!0),u.current=a,m(),d.current=setTimeout((()=>{c(!1)}),400)),()=>m())),[a]),l?(0,s.createElement)(ao,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:a},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:i})):null}const ho="spacing",go=["top","right","bottom","left"],bo=["vertical","horizontal"];function vo(e){const t=Eo(e),n=mo(e),r=lo(e),o=_o(e),i=(l=e.name,"web"===H.Z.OS&&(Mo(l)||uo(l)||io(l)));var l;if(o||!i)return null;const c=(0,a.getBlockSupport)(e.name,[ho,"__experimentalDefaultControls"]),u=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}};return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(to,{__experimentalGroup:"dimensions"},!n&&(0,s.createElement)(jr.Z,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,E.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Vr({...r,spacing:{...null==r?void 0:r.spacing,padding:void 0}})})}(e),resetAllFilter:u("padding"),isShownByDefault:null==c?void 0:c.padding,panelId:e.clientId},(0,s.createElement)(po,e)),!r&&(0,s.createElement)(jr.Z,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,E.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Vr({...r,spacing:{...null==r?void 0:r.spacing,margin:void 0}})})}(e),resetAllFilter:u("margin"),isShownByDefault:null==c?void 0:c.margin,panelId:e.clientId},(0,s.createElement)(so,e)),!t&&(0,s.createElement)(jr.Z,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,E.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,spacing:{...null==r?void 0:r.spacing,blockGap:void 0}}})}(e),resetAllFilter:u("blockGap"),isShownByDefault:null==c?void 0:c.blockGap,panelId:e.clientId},(0,s.createElement)(xo,e))),!n&&(0,s.createElement)(fo,e),!r&&(0,s.createElement)(co,e))}const _o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Eo(e),n=mo(e),r=lo(e);return t&&n&&r};function yo(e,t){var n;const r=(0,a.getBlockSupport)(e,ho);if(r&&"boolean"!=typeof r[t])return Array.isArray(r[t])?r[t]:null!==(n=r[t])&&void 0!==n&&n.sides?r[t].sides:void 0}function ko(e,t){const n=yo(e,t);return!(n&&n.some((e=>go.includes(e)))&&n.some((e=>bo.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}function Mo(e){const t=(0,a.getBlockSupport)(e,ho);return!!(!0===t||null!=t&&t.blockGap)}function wo(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Eo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Zr("spacing.blockGap");return!Mo(e)||t}function xo(e){var t;const{clientId:n,attributes:{style:r},name:o,setAttributes:a}=e,i=(0,Sr.nj)({availableUnits:Zr("spacing.units")||["%","px","em","rem","vw"]}),l=yo(o,"blockGap"),c=Or(n);if(Eo(e))return null;const u=l&&l.some((e=>bo.includes(e))),d=e=>{var t;let n=e;e&&u&&(n={...wo(e)});const o={...r,spacing:{...null==r?void 0:r.spacing,blockGap:n}};a({style:Vr(o)});const i=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var l;c.current&&i&&(null===(l=c.current.parentNode)||void 0===l||l.replaceChild(c.current,c.current))},m=wo(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap),p=u?{...m,right:null==m?void 0:m.left,bottom:null==m?void 0:m.top}:null==m?void 0:m.top;return H.Z.select({web:(0,s.createElement)(s.Fragment,null,u?(0,s.createElement)(Tr.Z,{label:(0,E.__)("Block spacing"),min:0,onChange:d,units:i,sides:l,values:p,allowReset:!1,splitOnAxis:u}):(0,s.createElement)(Lr.ZP,{label:(0,E.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:d,units:i,value:p})),native:null})}var Co=n(59259);const So=(0,s.createElement)(Co.Wj,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Co.y$,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),To=(0,s.createElement)(Co.Wj,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Co.y$,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Lo={top:{icon:(0,s.createElement)(Co.Wj,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Co.y$,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,E._x)("Align top","Block vertical alignment setting")},center:{icon:To,title:(0,E._x)("Align middle","Block vertical alignment setting")},bottom:{icon:So,title:(0,E._x)("Align bottom","Block vertical alignment setting")}},Ao=["top","center","bottom"],No={isAlternate:!0},zo=function(e){let{value:t,onChange:n,controls:r=Ao,isCollapsed:o=!0,isToolbar:a}=e;const i=Lo[t],c=Lo.top,u=a?g.Z:pr.Z,d=a?{isCollapsed:o}:{};return(0,s.createElement)(u,(0,l.Z)({popoverProps:No,icon:i?i.icon:c.icon,label:(0,E._x)("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...Lo[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},d))},Bo=e=>(0,s.createElement)(zo,(0,l.Z)({},e,{isToolbar:!1})),Oo=e=>(0,s.createElement)(zo,(0,l.Z)({},e,{isToolbar:!0})),Do={left:gr.Z,center:br.Z,right:vr.Z,"space-between":_r.Z},Io=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:a,isToolbar:i}=e;const c=e=>{r(e===o?void 0:e)},u=o?Do[o]:Do.left,d=[{name:"left",icon:gr.Z,title:(0,E.__)("Justify items left"),isActive:"left"===o,onClick:()=>c("left")},{name:"center",icon:br.Z,title:(0,E.__)("Justify items center"),isActive:"center"===o,onClick:()=>c("center")},{name:"right",icon:vr.Z,title:(0,E.__)("Justify items right"),isActive:"right"===o,onClick:()=>c("right")},{name:"space-between",icon:_r.Z,title:(0,E.__)("Space between items"),isActive:"space-between"===o,onClick:()=>c("space-between")}],m=i?g.Z:pr.Z,p=i?{isCollapsed:n}:{};return(0,s.createElement)(m,(0,l.Z)({icon:u,popoverProps:a,label:(0,E.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},p))},Po=e=>(0,s.createElement)(Io,(0,l.Z)({},e,{isToolbar:!1})),Ro=e=>(0,s.createElement)(Io,(0,l.Z)({},e,{isToolbar:!0})),Zo={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},jo={left:"flex-start",right:"flex-end",center:"center"},Ho={top:"flex-start",center:"center",bottom:"flex-end"},Wo=["wrap","nowrap"],Fo={name:"flex",label:(0,E.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r={}}=e;const{allowOrientation:o=!0}=r;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Mr.Z,null,(0,s.createElement)(wr.Z,null,(0,s.createElement)(Yo,{layout:t,onChange:n})),(0,s.createElement)(wr.Z,null,o&&(0,s.createElement)(Uo,{layout:t,onChange:n}))),(0,s.createElement)(Vo,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;if(null!=r&&r.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=r;return(0,s.createElement)(mr,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Yo,{layout:t,onChange:n,isToolbar:!0}),o&&"vertical"!==(null==t?void 0:t.orientation)&&(0,s.createElement)(qo,{layout:t,onChange:n,isToolbar:!0}))},save:function(e){var t,n;let{selector:r,layout:o,style:i,blockName:l}=e;const{orientation:c="horizontal"}=o,u=Zr("spacing.blockGap"),d=(0,a.getBlockSupport)(l,["spacing","blockGap","__experimentalDefault"])||"0.5em",m=null!==u,p=null!=i&&null!==(t=i.spacing)&&void 0!==t&&t.blockGap&&!Xr(l,"spacing","blockGap")?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=wo(e);if(!n)return null;const r=(null==n?void 0:n.top)||t,o=(null==n?void 0:n.left)||t;return r===o?r:`${r} ${o}`}(null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap,d):`var( --wp--style--block-gap, ${d} )`,f=Zo[o.justifyContent]||Zo.left,h=Wo.includes(o.flexWrap)?o.flexWrap:"wrap",g=`\n\t\tflex-direction: row;\n\t\talign-items: ${Ho[o.verticalAlignment]||Ho.center};\n\t\tjustify-content: ${f};\n\t\t`,b=`\n\t\tflex-direction: column;\n\t\talign-items: ${jo[o.justifyContent]||jo.left};\n\t\t`;return(0,s.createElement)("style",null,`\n\t\t\t\t${Cr(r)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-wrap: ${h};\n\t\t\t\t\tgap: ${m?p:d};\n\t\t\t\t\t${"horizontal"===c?g:b}\n\t\t\t\t}\n\n\t\t\t\t${Cr(r,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function qo(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{verticalAlignment:o=Ho.center}=t,a=e=>{n({...t,verticalAlignment:e})};if(r)return(0,s.createElement)(Bo,{onChange:a,value:o});const i=[{value:"flex-start",label:(0,E.__)("Align items top")},{value:"center",label:(0,E.__)("Align items center")},{value:"flex-end",label:(0,E.__)("Align items bottom")}];return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,s.createElement)("legend",null,(0,E.__)("Vertical alignment")),(0,s.createElement)("div",null,i.map(((e,t,n)=>(0,s.createElement)(Er.Z,{key:e,label:n,icon:t,isPressed:o===e,onClick:()=>a(e)})))))}function Yo(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:a="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},l=["left","center","right"];if("horizontal"===a&&l.push("space-between"),r)return(0,s.createElement)(Po,{allowedControls:l,value:o,onChange:i,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:gr.Z,label:(0,E.__)("Justify items left")},{value:"center",icon:br.Z,label:(0,E.__)("Justify items center")},{value:"right",icon:vr.Z,label:(0,E.__)("Justify items right")}];return"horizontal"===a&&c.push({value:"space-between",icon:_r.Z,label:(0,E.__)("Space between items")}),(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,s.createElement)("legend",null,(0,E.__)("Justification")),(0,s.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:r}=e;return(0,s.createElement)(Er.Z,{key:t,label:r,icon:n,isPressed:o===t,onClick:()=>i(t)})}))))}function Vo(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,s.createElement)(xr.Z,{label:(0,E.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function Uo(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal"}=t;return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,s.createElement)("legend",null,(0,E.__)("Orientation")),(0,s.createElement)(Er.Z,{label:"horizontal",icon:yr.Z,isPressed:"horizontal"===r,onClick:()=>n({...t,orientation:"horizontal"})}),(0,s.createElement)(Er.Z,{label:"vertical",icon:kr.Z,isPressed:"vertical"===r,onClick:()=>n({...t,orientation:"vertical"})}))}var $o=n(11984),Xo=n(92380),Go=n(75094);const Ko={name:"default",label:(0,E.__)("Flow"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o}=t,a=(0,Sr.nj)({availableUnits:Zr("spacing.units")||["%","px","em","rem","vw"]});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(Lr.ZP,{label:(0,E.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:a}),(0,s.createElement)($o.Z,{icon:Xo.Z})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(Lr.ZP,{label:(0,E.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:a}),(0,s.createElement)($o.Z,{icon:Go.Z}))),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,s.createElement)(Er.Z,{variant:"secondary",isSmall:!0,disabled:!o&&!r,onClick:()=>n({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,E.__)("Reset"))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,E.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function(){return null},save:function(e){var t;let{selector:n,layout:r={},style:o,blockName:a}=e;const{contentSize:i,wideSize:l}=r,c=null!==Zr("spacing.blockGap"),u=wo(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap),d=null!=u&&u.top&&!Xr(a,"spacing","blockGap")?null==u?void 0:u.top:"var( --wp--style--block-gap )";let m=i||l?`\n\t\t\t\t\t${Cr(n,"> :where(:not(.alignleft):not(.alignright))")} {\n\t\t\t\t\t\tmax-width: ${null!=i?i:l};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\t\t\t\t\t${Cr(n,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=l?l:i};\n\t\t\t\t\t}\n\t\t\t\t\t${Cr(n,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return m+=`\n\t\t\t${Cr(n,"> .alignleft")} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-inline-start: 0;\n\t\t\t\tmargin-inline-end: 2em;\n\t\t\t}\n\t\t\t${Cr(n,"> .alignright")} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-inline-start: 2em;\n\t\t\t\tmargin-inline-end: 0;\n\t\t\t}\n\n\t\t\t${Cr(n,"> .aligncenter")} {\n\t\t\t\tmargin-left: auto !important;\n\t\t\t\tmargin-right: auto !important;\n\t\t\t}\n\t\t`,c&&(m+=`\n\t\t\t\t${Cr(n,"> *")} {\n\t\t\t\t\tmargin-block-start: 0;\n\t\t\t\t\tmargin-block-end: 0;\n\t\t\t\t}\n\t\t\t\t${Cr(n,"> * + *")} {\n\t\t\t\t\tmargin-block-start: ${d};\n\t\t\t\t}\n\t\t\t`),(0,s.createElement)("style",null,m)},getOrientation:()=>"vertical",getAlignments(e){const t=function(e){const{contentSize:t,wideSize:n}=e,r={},o=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return o.test(t)&&(r.none=(0,E.sprintf)((0,E.__)("Max %s wide"),t)),o.test(n)&&(r.wide=(0,E.sprintf)((0,E.__)("Max %s wide"),n)),r}(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}},Jo=[Ko,Fo];function Qo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Jo.find((t=>t.name===e))}const ea={type:"default"},ta=(0,s.createContext)(ea),na=ta.Provider;function ra(){return(0,s.useContext)(ta)}function oa(e){let{layout:t={},...n}=e;const r=Qo(t.type);return r?(0,s.createElement)(r.save,(0,l.Z)({layout:t},n)):null}const aa=["none","left","center","right","wide","full"],ia=["wide","full"];function la(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:aa;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,b.Z)((e=>{const{getSettings:t}=e(tr),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),r=ra(),o=Qo(null==r?void 0:r.type),a=o.getAlignments(r);if(n){const t=a.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==o.name)return[];const{alignments:i=aa}=r,l=e.filter((e=>(r.alignments||t||!ia.includes(e))&&i.includes(e))).map((e=>({name:e})));return 1===l.length&&"none"===l[0].name?[]:l}var sa=n(74022),ca=n(34934),ua=n(79700),da=n(81138);const ma={none:{icon:sa.Z,title:(0,E._x)("None","Alignment option")},left:{icon:ca.Z,title:(0,E.__)("Align left")},center:{icon:Xo.Z,title:(0,E.__)("Align center")},right:{icon:ua.Z,title:(0,E.__)("Align right")},wide:{icon:Go.Z,title:(0,E.__)("Wide width")},full:{icon:da.Z,title:(0,E.__)("Full width")}},pa={isAlternate:!0},fa=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:a=!0}=e;const i=la(r);if(!i.length)return null;function c(e){n([t,"none"].includes(e)?void 0:e)}const u=ma[t],m=ma.none,p=o?g.Z:pr.Z,f={popoverProps:pa,icon:u?u.icon:m.icon,label:(0,E.__)("Align"),toggleProps:{describedBy:(0,E.__)("Change alignment")}},h=o?{isCollapsed:a,controls:i.map((e=>{let{name:n}=e;return{...ma[n],isActive:t===n||!t&&"none"===n,role:a?"menuitemradio":void 0,onClick:()=>c(n)}}))}:{children:e=>{let{onClose:n}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(fr.Z,{className:"block-editor-block-alignment-control__menu-group"},i.map((e=>{let{name:r,info:o}=e;const{icon:a,title:i}=ma[r],l=r===t||!t&&"none"===r;return(0,s.createElement)(hr.Z,{key:r,icon:a,iconPosition:"left",className:d()("components-dropdown-menu__menu-item",{"is-active":l}),isSelected:l,onClick:()=>{c(r),n()},role:"menuitemradio",info:o},i)}))))}};return(0,s.createElement)(p,(0,l.Z)({},f,h))},ha=e=>(0,s.createElement)(fa,(0,l.Z)({},e,{isToolbar:!1})),ga=e=>(0,s.createElement)(fa,(0,l.Z)({},e,{isToolbar:!0})),ba=["left","center","right","wide","full"],va=["wide","full"];function _a(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?ba.filter((t=>e.includes(t))):!0===e?[...ba]:[],!r||!0===e&&!n?(0,m.without)(t,...va):t}const ya=(0,p.Z)((e=>t=>{const{name:n}=t,r=la(_a((0,a.getBlockSupport)(n,"align"),(0,a.hasBlockSupport)(n,"alignWide",!0))).map((e=>{let{name:t}=e;return t}));return(0,s.createElement)(s.Fragment,null,!!r.length&&(0,s.createElement)(mr,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(ha,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const o=(0,a.getBlockType)(t.name);(null==o||null===(n=o.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:r})),(0,s.createElement)(e,t))}),"withToolbarControls"),ka=(0,p.Z)((e=>t=>{const{name:n,attributes:r}=t,{align:o}=r,i=la(_a((0,a.getBlockSupport)(n,"align"),(0,a.hasBlockSupport)(n,"alignWide",!0)));if(void 0===o)return(0,s.createElement)(e,t);let c=t.wrapperProps;return i.some((e=>e.name===o))&&(c={...c,"data-align":o}),(0,s.createElement)(e,(0,l.Z)({},t,{wrapperProps:c}))}));(0,i.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,m.has)(e.attributes,["align","type"])||(0,a.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...ba,""]}}),e})),(0,i.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",ka),(0,i.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",ya),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return _a((0,a.getBlockSupport)(t,"align"),(0,a.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=d()(`align${r}`,e.className)),e})),(0,i.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return(0,m.has)(e.attributes,["lock","type"])||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));var Ma=n(9545),wa=n(33936),Ea=n(79508);const xa=/[\s#]/g,Ca={type:"string",source:"attribute",attribute:"id",selector:"*"},Sa=(0,p.Z)((e=>t=>{if((0,a.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===H.Z.OS,r=(0,s.createElement)(Ma.Z,{className:"html-anchor-control",label:(0,E.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,E.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,s.createElement)(wa.Z,{href:(0,E.__)("https://wordpress.org/support/article/page-jumps/")},(0,E.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,E.__)("Add an anchor"),onChange:e=>{e=e.replace(xa,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(to,{__experimentalGroup:"advanced"},r),!n&&"core/heading"===t.name&&(0,s.createElement)(to,null,(0,s.createElement)(Ea.Z,{title:(0,E.__)("Heading settings")},r)))}return(0,s.createElement)(e,t)}),"withInspectorControl");(0,i.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,m.has)(e.attributes,["anchor","type"])||(0,a.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Ca}),e})),(0,i.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Sa),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Ta=(0,p.Z)((e=>t=>(0,a.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),(0,s.createElement)(to,{__experimentalGroup:"advanced"},(0,s.createElement)(Ma.Z,{autoComplete:"off",label:(0,E.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,E.__)("Separate multiple classes with spaces.")}))):(0,s.createElement)(e,t)),"withInspectorControl");(0,i.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,a.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,i.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Ta),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=d()(e.className,n.className)),e})),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){if(!(0,a.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===r.length&&e.innerBlocks.length===t.length)return e;if(1===r.length&&t.length>1||r.length>1&&1===t.length)return e;if(t[n]){var o;const r=null===(o=t[n])||void 0===o?void 0:o.attributes.className;if(r)return{...e,attributes:{...e.attributes,className:r}}}return e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,a.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=(0,m.uniq)([(0,a.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=(0,a.getBlockDefaultClassName)(t.name)),e}));var La=n(30314),Aa=n(24428);const Na="var:";function za(e,t,n,r){const o=(0,m.get)(e,n);return o?[{selector:null==t?void 0:t.selector,key:r,value:Oa(o)}]:[]}function Ba(e,t,n,r){const o=(0,m.get)(e,n);if(!o)return[];const a=[];if("string"==typeof o)a.push({selector:null==t?void 0:t.selector,key:r,value:o});else{const e=["top","right","bottom","left"].reduce(((e,n)=>{const a=(0,m.get)(o,[n]);return a&&e.push({selector:null==t?void 0:t.selector,key:`${r}${(0,m.upperFirst)(n)}`,value:a}),e}),[]);a.push(...e)}return a}function Oa(e){return"string"==typeof e&&e.startsWith(Na)?`var(--wp--${e.slice(Na.length).split("|").join("--")})`:e}const Da=[{name:"text",generate:(e,t)=>za(e,t,["color","text"],"color")},{name:"gradient",generate:(e,t)=>za(e,t,["color","gradient"],"background")},{name:"background",generate:(e,t)=>za(e,t,["color","background"],"backgroundColor")},{name:"margin",generate:(e,t)=>Ba(e,t,["spacing","margin"],"margin")},{name:"padding",generate:(e,t)=>Ba(e,t,["spacing","padding"],"padding")},{name:"fontSize",generate:(e,t)=>za(e,t,["typography","fontSize"],"fontSize")},{name:"fontStyle",generate:(e,t)=>za(e,t,["typography","fontStyle"],"fontStyle")},{name:"fontWeight",generate:(e,t)=>za(e,t,["typography","fontWeight"],"fontWeight")},{name:"letterSpacing",generate:(e,t)=>za(e,t,["typography","letterSpacing"],"letterSpacing")},{name:"letterSpacing",generate:(e,t)=>za(e,t,["typography","lineHeight"],"lineHeight")},{name:"textDecoration",generate:(e,t)=>za(e,t,["typography","textDecoration"],"textDecoration")},{name:"textTransform",generate:(e,t)=>za(e,t,["typography","textTransform"],"textTransform")}];function Ia(e,t){const n=[];return Da.forEach((r=>{"function"==typeof r.generate&&n.push(...r.generate(e,t))})),n}var Pa=n(93361),Ra=n(25222),Za=n(73404),ja=n(78219),Ha=n(61105),Wa=n(23232),Fa=n(99344),qa=n(65365),Ya=n(41627),Va=n(38835),Ua=n(17755);const $a=(0,s.createContext)({});function Xa(e){let{value:t,children:n}=e;const r=(0,s.useContext)($a),o=(0,s.useMemo)((()=>({...r,...t})),[r,t]);return(0,s.createElement)($a.Provider,{value:o,children:n})}const Ga=$a,Ka={},Ja=(0,Ha.Z)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=(0,a.getBlockType)(n),o=(0,s.useContext)(Ga),i=(0,s.useMemo)((()=>r&&r.usesContext?(0,m.pick)(o,r.usesContext):Ka),[r,o]);if(!r)return null;const c=r.edit||r.save;if(r.apiVersion>1)return(0,s.createElement)(c,(0,l.Z)({},e,{context:i}));const u=(0,a.hasBlockSupport)(r,"className",!0)?(0,a.getBlockDefaultClassName)(n):null,p=d()(u,t.className);return(0,s.createElement)(c,(0,l.Z)({},e,{context:i,className:p}))}));function Qa(e){const{name:t,isSelected:n,clientId:r}=e,o={name:t,isSelected:n,clientId:r};return(0,s.createElement)(or,{value:(0,s.useMemo)((()=>o),Object.values(o))},(0,s.createElement)(Ja,e))}var ei=n(55845),ti=n(15582),ni=n(90651);const ri=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,s.createElement)("div",{style:{display:"contents",all:"initial"}},(0,s.createElement)("div",{className:d()(t,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},r),(s.Children.count(n)>0||o)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},s.Children.count(n)>0&&s.Children.map(n,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,s.createElement)(ti.Z,{className:"block-editor-warning__secondary",icon:ni.Z,label:(0,E.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(fr.Z,null,o.map(((e,t)=>(0,s.createElement)(hr.Z,{onClick:e.onClick,key:t},e.title))))))))))};var oi=n(97630);function ai(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:a,className:i}=e;return(0,s.createElement)("div",{className:i},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(ja.Z,null,(0,Ua.Z)(r)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(Er.Z,{variant:"secondary",tabIndex:"0",onClick:o},a)))}const ii=function(e){let{block:t,onKeep:n,onConvert:r,convertor:o,convertButtonText:i}=e;const l=function(e){const t=(0,m.castArray)(e).map((e=>(0,a.getSaveContent)(e.name,e.attributes,e.innerBlocks)));return t.join("")}(o(t)),c=(u=t.originalContent,p=l,(0,oi.Kx)(u,p).map(((e,t)=>{const n=d()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,s.createElement)("span",{key:t,className:n},e.value)})));var u,p;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(ai,{title:(0,E.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,E.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,s.createElement)(ai,{title:(0,E.__)("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:i,rawContent:c,renderedContent:l}))},li=e=>(0,a.rawHandler)({HTML:e.originalContent}),si=(0,qa.Z)([(0,Wa.Z)(((e,t)=>{let{clientId:n}=t;return{block:e(tr).getBlock(n)}})),(0,Fa.Z)(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(tr);return{convertToClassic(){r(n.clientId,(e=>(0,a.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>(0,a.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,li(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return(0,a.createBlock)(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:o,block:i}=e;const l=!!(0,a.getBlockType)("core/html"),[c,u]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>u(!0)),[]),m=(0,s.useCallback)((()=>u(!1)),[]),p=(0,s.useMemo)((()=>[{title:(0,E._x)("Resolve","imperative verb"),onClick:d},l&&{title:(0,E.__)("Convert to HTML"),onClick:t},{title:(0,E.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)),[d,t,r]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ri,{actions:[(0,s.createElement)(Er.Z,{key:"recover",onClick:o,variant:"primary"},(0,E.__)("Attempt Block Recovery"))],secondaryActions:p},(0,E.__)("This block contains unexpected or invalid content.")),c&&(0,s.createElement)(ei.Z,{title:(0,E.__)("Resolve Block"),onRequestClose:m,className:"block-editor-block-compare"},(0,s.createElement)(ii,{block:i,onKeep:t,onConvert:n,convertor:li,convertButtonText:(0,E.__)("Convert to Blocks")})))})),ci=(0,s.createElement)(ri,{className:"block-editor-block-list__block-crash-warning"},(0,E.__)("This block has encountered an error and cannot be previewed.")),ui=()=>ci;class di extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}const mi=di;var pi=n(54042);const fi=function(e){let{clientId:t}=e;const[n,r]=(0,s.useState)(""),o=(0,b.Z)((e=>e(tr).getBlock(t)),[t]),{updateBlock:i}=(0,Yr.Z)(tr);return(0,s.useEffect)((()=>{r((0,a.getBlockContent)(o))}),[o]),(0,s.createElement)(pi.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,a.getBlockType)(o.name);if(!e)return;const l=(0,a.getBlockAttributes)(e,n,o.attributes),s=n||(0,a.getSaveContent)(e,l),[c]=n?(0,a.validateBlock)({...o,attributes:l,originalContent:s}):[!0];i(t,{attributes:l,originalContent:s,isValid:c}),n||r({content:s})},onChange:e=>r(e.target.value)})};var hi=n(26902);let gi=zi();const bi=e=>Ti(e,gi);let vi=zi();bi.write=e=>Ti(e,vi);let _i=zi();bi.onStart=e=>Ti(e,_i);let yi=zi();bi.onFrame=e=>Ti(e,yi);let ki=zi();bi.onFinish=e=>Ti(e,ki);let Mi=[];bi.setTimeout=(e,t)=>{let n=bi.now()+t,r=()=>{let e=Mi.findIndex((e=>e.cancel==r));~e&&Mi.splice(e,1),Ci-=~e?1:0},o={time:n,handler:e,cancel:r};return Mi.splice(wi(n),0,o),Ci+=1,Li(),o};let wi=e=>~(~Mi.findIndex((t=>t.time>e))||~Mi.length);bi.cancel=e=>{_i.delete(e),yi.delete(e),gi.delete(e),vi.delete(e),ki.delete(e)},bi.sync=e=>{Si=!0,bi.batchedUpdates(e),Si=!1},bi.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,bi.onStart(n)}return r.handler=e,r.cancel=()=>{_i.delete(n),t=null},r};let Ei="undefined"!=typeof window?window.requestAnimationFrame:()=>{};bi.use=e=>Ei=e,bi.now="undefined"!=typeof performance?()=>performance.now():Date.now,bi.batchedUpdates=e=>e(),bi.catch=console.error,bi.frameLoop="always",bi.advance=()=>{"demand"!==bi.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ni()};let xi=-1,Ci=0,Si=!1;function Ti(e,t){Si?(t.delete(e),e(0)):(t.add(e),Li())}function Li(){xi<0&&(xi=0,"demand"!==bi.frameLoop&&Ei(Ai))}function Ai(){~xi&&(Ei(Ai),bi.batchedUpdates(Ni))}function Ni(){let e=xi;xi=bi.now();let t=wi(xi);t&&(Bi(Mi.splice(0,t),(e=>e.handler())),Ci-=t),_i.flush(),gi.flush(e?Math.min(64,xi-e):16.667),yi.flush(),vi.flush(),ki.flush(),Ci||(xi=-1)}function zi(){let e=new Set,t=e;return{add(n){Ci+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Ci-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Ci-=t.size,Bi(t,(t=>t(n)&&e.add(t))),Ci+=e.size,t=e)}}}function Bi(e,t){e.forEach((e=>{try{t(e)}catch(e){bi.catch(e)}}))}function Oi(){}const Di={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Ii(e,t){if(Di.arr(e)){if(!Di.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Ri(e,t,n){if(Di.arr(e))for(let r=0;rDi.und(e)?[]:Di.arr(e)?e:[e];function ji(e,t){if(e.size){const n=Array.from(e);e.clear(),Pi(n,t)}}const Hi=(e,...t)=>ji(e,(e=>e(...t))),Wi=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let Fi,qi,Yi=null,Vi=!1,Ui=Oi;var $i=Object.freeze({__proto__:null,get createStringInterpolator(){return Fi},get to(){return qi},get colors(){return Yi},get skipAnimation(){return Vi},get willAdvance(){return Ui},assign:e=>{e.to&&(qi=e.to),e.now&&(bi.now=e.now),void 0!==e.colors&&(Yi=e.colors),null!=e.skipAnimation&&(Vi=e.skipAnimation),e.createStringInterpolator&&(Fi=e.createStringInterpolator),e.requestAnimationFrame&&bi.use(e.requestAnimationFrame),e.batchedUpdates&&(bi.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ui=e.willAdvance),e.frameLoop&&(bi.frameLoop=e.frameLoop)}});const Xi=new Set;let Gi=[],Ki=[],Ji=0;const Qi={get idle(){return!Xi.size&&!Gi.length},start(e){Ji>e.priority?(Xi.add(e),bi.onStart(el)):(tl(e),bi(rl))},advance:rl,sort(e){if(Ji)bi.onFrame((()=>Qi.sort(e)));else{const t=Gi.indexOf(e);~t&&(Gi.splice(t,1),nl(e))}},clear(){Gi=[],Xi.clear()}};function el(){Xi.forEach(tl),Xi.clear(),bi(rl)}function tl(e){Gi.includes(e)||nl(e)}function nl(e){Gi.splice(function(t,n){const r=t.findIndex((t=>t.priority>e.priority));return r<0?t.length:r}(Gi),0,e)}function rl(e){const t=Ki;for(let n=0;n0}const ol="[-+]?\\d*\\.?\\d+",al=ol+"%";function il(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const ll=new RegExp("rgb"+il(ol,ol,ol)),sl=new RegExp("rgba"+il(ol,ol,ol,ol)),cl=new RegExp("hsl"+il(ol,al,al)),ul=new RegExp("hsla"+il(ol,al,al,ol)),dl=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ml=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,pl=/^#([0-9a-fA-F]{6})$/,fl=/^#([0-9a-fA-F]{8})$/;function hl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gl(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,a=hl(o,r,e+1/3),i=hl(o,r,e),l=hl(o,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*i)<<16|Math.round(255*l)<<8}function bl(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function vl(e){return(parseFloat(e)%360+360)%360/360}function _l(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function yl(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function kl(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=pl.exec(e))?parseInt(t[1]+"ff",16)>>>0:Yi&&void 0!==Yi[e]?Yi[e]:(t=ll.exec(e))?(bl(t[1])<<24|bl(t[2])<<16|bl(t[3])<<8|255)>>>0:(t=sl.exec(e))?(bl(t[1])<<24|bl(t[2])<<16|bl(t[3])<<8|_l(t[4]))>>>0:(t=dl.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=fl.exec(e))?parseInt(t[1],16)>>>0:(t=ml.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=cl.exec(e))?(255|gl(vl(t[1]),yl(t[2]),yl(t[3])))>>>0:(t=ul.exec(e))?(gl(vl(t[1]),yl(t[2]),yl(t[3]))|_l(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Ml=(e,t,n)=>{if(Di.fun(e))return e;if(Di.arr(e))return Ml({range:e,output:t,extrapolate:n});if(Di.str(e.output[0]))return Fi(e);const r=e,o=r.output,a=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,a);return function(e,t,n,r,o,a,i,l,s){let c=s?s(e):e;if(cn){if("identity"===l)return c;"clamp"===l&&(c=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=a(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r,c)}(e,a[t],a[t+1],o[t],o[t+1],s,i,l,r.map)}};function wl(){return wl=Object.assign||function(e){for(var t=1;tBoolean(e&&e[El]),Sl=e=>e&&e[El]?e[El]():e,Tl=e=>e[xl]||null;function Ll(e,t){let n=e[xl];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class Al{constructor(e){if(this[El]=void 0,this[xl]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");Nl(this,e)}}const Nl=(e,t)=>Ol(e,El,t);function zl(e,t){if(e[El]){let n=e[xl];n||Ol(e,xl,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Bl(e,t){let n=e[xl];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[xl]=null,e.observerRemoved&&e.observerRemoved(r,t)}}const Ol=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Dl=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Il=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Pl=new RegExp(`(${Dl.source})(%|[a-z]+)`,"i"),Rl=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Zl=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,jl=e=>{const[t,n]=Hl(e);if(!t||Wi())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&Zl.test(n)?jl(n):n||e},Hl=e=>{const t=Zl.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]};let Wl;const Fl=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,ql=e=>{Wl||(Wl=Yi?new RegExp(`(${Object.keys(Yi).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Sl(e).replace(Zl,jl).replace(Il,kl).replace(Wl,kl))),n=t.map((e=>e.match(Dl).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Ml(wl({},e,{output:t}))));return e=>{var n;const o=!Pl.test(t[0])&&(null==(n=t.find((e=>Pl.test(e))))?void 0:n.replace(Dl,""));let a=0;return t[0].replace(Dl,(()=>`${r[a++](e)}${o||""}`)).replace(Rl,Fl)}},Yl="react-spring: ",Vl=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Yl}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Ul=Vl(console.warn),$l=Vl(console.warn);function Xl(e){return Di.str(e)&&("#"==e[0]||/\d/.test(e)||!Wi()&&Zl.test(e)||e in(Yi||{}))}const Gl="undefined"!=typeof window&&window.document&&window.document.createElement?s.useLayoutEffect:s.useEffect;function Kl(){const e=(0,s.useState)()[1],t=(()=>{const e=(0,s.useRef)(!1);return Gl((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}const Jl=e=>(0,s.useEffect)(e,Ql),Ql=[];function es(e){const t=(0,s.useRef)();return(0,s.useEffect)((()=>{t.current=e})),t.current}const ts=Symbol.for("Animated:node"),ns=e=>e&&e[ts],rs=(e,t)=>{return n=e,r=ts,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},os=e=>e&&e[ts]&&e[ts].getPayload();class as{constructor(){this.payload=void 0,rs(this,this)}getPayload(){return this.payload||[]}}class is extends as{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,Di.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new is(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Di.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Di.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class ls extends is{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=Ml({output:[e,e]})}static create(e){return new ls(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Di.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Ml({output:[this.getValue(),e]})),this._value=0,super.reset()}}const ss={dependencies:null};class cs extends as{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ri(this.source,((n,r)=>{var o;(o=n)&&o[ts]===o?t[r]=n.getValue(e):Cl(n)?t[r]=Sl(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Pi(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ri(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){ss.dependencies&&Cl(e)&&ss.dependencies.add(e);const t=os(e);t&&Pi(t,(e=>this.add(e)))}}class us extends cs{constructor(e){super(e)}static create(e){return new us(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ds)),!0)}}function ds(e){return(Xl(e)?ls:is).create(e)}function ms(e){const t=ns(e);return t?t.constructor:Di.arr(e)?us:Xl(e)?ls:is}function ps(){return ps=Object.assign||function(e){for(var t=1;t{const n=!Di.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,s.forwardRef)(((r,o)=>{const a=(0,s.useRef)(null),i=n&&(0,s.useCallback)((e=>{a.current=function(e,t){return e&&(Di.fun(e)?e(t):e.current=t),t}(o,e)}),[o]),[l,c]=function(e,t){const n=new Set;return ss.dependencies=n,e.style&&(e=ps({},e,{style:t.createAnimatedStyle(e.style)})),e=new cs(e),ss.dependencies=null,[e,n]}(r,t),u=Kl(),d=()=>{const e=a.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&u()},m=new hs(d,c),p=(0,s.useRef)();Gl((()=>(p.current=m,Pi(c,(e=>zl(e,m))),()=>{p.current&&(Pi(p.current.deps,(e=>Bl(e,p.current))),bi.cancel(p.current.update))}))),(0,s.useEffect)(d,[]),Jl((()=>()=>{const e=p.current;Pi(e.deps,(t=>Bl(t,e)))}));const f=t.getComponentProps(l.getValue());return s.createElement(e,ps({},f,{ref:i}))}))};class hs{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&bi.write(this.update)}}const gs=Symbol.for("AnimatedComponent"),bs=e=>Di.str(e)?e:e&&Di.str(e.displayName)?e.displayName:Di.fun(e)&&e.name||null;function vs(){return vs=Object.assign||function(e){for(var t=1;t!0===e||!!(t&&e&&(Di.fun(e)?e(t):Zi(e).includes(t))),ks=(e,t)=>Di.obj(e)?t&&e[t]:e,Ms=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,ws=e=>e,Es=(e,t=ws)=>{let n=xs;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);Di.und(n)||(r[o]=n)}return r},xs=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Cs={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Ss(e){const t=function(e){const t={};let n=0;if(Ri(e,((e,r)=>{Cs[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ri(e,((e,r)=>r in t||(n[r]=e))),n}return vs({},e)}function Ts(e){return e=Sl(e),Di.arr(e)?e.map(Ts):Xl(e)?$i.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ls(e){for(const t in e)return!0;return!1}function As(e){return Di.fun(e)||Di.arr(e)&&Di.obj(e[0])}function Ns(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function zs(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}Math.PI,Math.PI;const Bs=vs({},{tension:170,friction:26},{mass:1,damping:1,easing:e=>e,clamp:!1});class Os{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,Bs)}}function Ds(e,t){if(Di.und(t.decay)){const n=!Di.und(t.tension)||!Di.und(t.friction);!n&&Di.und(t.frequency)&&Di.und(t.damping)&&Di.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Is=[];class Ps{constructor(){this.changed=!1,this.values=Is,this.toValues=null,this.fromValues=Is,this.to=void 0,this.from=void 0,this.config=new Os,this.immediate=!1}}function Rs(e,{key:t,props:n,defaultProps:r,state:o,actions:a}){return new Promise(((i,l)=>{var s;let c,u,d=ys(null!=(s=n.cancel)?s:null==r?void 0:r.cancel,t);if(d)f();else{Di.und(n.pause)||(o.paused=ys(n.pause,t));let e=null==r?void 0:r.pause;!0!==e&&(e=o.paused||ys(e,t)),c=_s(n.delay||0,t),e?(o.resumeQueue.add(p),a.pause()):(a.resume(),p())}function m(){o.resumeQueue.add(p),o.timeouts.delete(u),u.cancel(),c=u.time-bi.now()}function p(){c>0&&!$i.skipAnimation?(o.delayed=!0,u=bi.setTimeout(f,c),o.pauseQueue.add(m),o.timeouts.add(u)):f()}function f(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(m),o.timeouts.delete(u),e<=(o.cancelId||0)&&(d=!0);try{a.start(vs({},n,{callId:e,cancel:d}),i)}catch(e){l(e)}}}))}const Zs=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Ws(e.get()):t.every((e=>e.noop))?js(e.get()):Hs(e.get(),t.every((e=>e.finished))),js=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Hs=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ws=e=>({value:e,cancelled:!0,finished:!1});function Fs(e,t,n,r){const{callId:o,parentId:a,onRest:i}=t,{asyncTo:l,promise:s}=n;return a||e!==l||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=Es(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const m=new Promise(((e,t)=>(u=e,d=t))),p=e=>{const t=o<=(n.cancelId||0)&&Ws(r)||o!==n.asyncId&&Hs(r,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const a=new Ys,i=new Vs;return(async()=>{if($i.skipAnimation)throw qs(n),i.result=Hs(r,!1),d(i),i;p(a);const l=Di.obj(e)?vs({},e):vs({},t,{to:e});l.parentId=o,Ri(c,((e,t)=>{Di.und(l[t])&&(l[t]=e)}));const s=await r.start(l);return p(a),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let h;if($i.skipAnimation)return qs(n),Hs(r,!1);try{let t;t=Di.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,r.stop.bind(r))),await Promise.all([t.then(u),m]),h=Hs(r.get(),!0,!1)}catch(e){if(e instanceof Ys)h=e.result;else{if(!(e instanceof Vs))throw e;h=e.result}}finally{o==n.asyncId&&(n.asyncId=a,n.asyncTo=a?l:void 0,n.promise=a?s:void 0)}return Di.fun(i)&&bi.batchedUpdates((()=>{i(h,r,r.item)})),h})():s}function qs(e,t){ji(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Ys extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class Vs extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Us=e=>e instanceof Xs;let $s=1;class Xs extends Al{constructor(...e){super(...e),this.id=$s++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=ns(this);return e&&e.getValue()}to(...e){return $i.to(this,e)}interpolate(...e){return Ul(`${Yl}The "interpolate" function is deprecated in v9 (use "to" instead)`),$i.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ll(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Qi.sort(this),Ll(this,{type:"priority",parent:this,priority:e})}}const Gs=Symbol.for("SpringPhase"),Ks=e=>(1&e[Gs])>0,Js=e=>(2&e[Gs])>0,Qs=e=>(4&e[Gs])>0,ec=(e,t)=>t?e[Gs]|=3:e[Gs]&=-3,tc=(e,t)=>t?e[Gs]|=4:e[Gs]&=-5;class nc extends Xs{constructor(e,t){if(super(),this.key=void 0,this.animation=new Ps,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Di.und(e)||!Di.und(t)){const n=Di.obj(e)?vs({},e):vs({},t,{from:e});Di.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Js(this)||this._state.asyncTo)||Qs(this)}get goal(){return Sl(this.animation.to)}get velocity(){const e=ns(this);return e instanceof is?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Ks(this)}get isAnimating(){return Js(this)}get isPaused(){return Qs(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{config:o,toValues:a}=r;const i=os(r.to);!i&&Cl(r.to)&&(a=Zi(Sl(r.to))),r.values.forEach(((l,s)=>{if(l.done)return;const c=l.constructor==ls?1:i?i[s].lastPosition:a[s];let u=r.immediate,d=c;if(!u){if(d=l.lastPosition,o.tension<=0)return void(l.done=!0);let t=l.elapsedTime+=e;const n=r.fromValues[s],a=null!=l.v0?l.v0:l.v0=Di.arr(o.velocity)?o.velocity[s]:o.velocity;let i;if(Di.und(o.duration))if(o.decay){const e=!0===o.decay?.998:o.decay,r=Math.exp(-(1-e)*t);d=n+a/(1-e)*(1-r),u=Math.abs(l.lastPosition-d)<.1,i=a*r}else{i=null==l.lastVelocity?a:l.lastVelocity;const t=o.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n))),r=o.restVelocity||t/10,s=o.clamp?0:o.bounce,m=!Di.und(s),p=n==c?l.v0>0:nr,f||(u=Math.abs(c-d)<=t,!u));++e)m&&(h=d==c||d>c==p,h&&(i=-i*s,d=c)),i+=(1e-6*-o.tension*(d-c)+.001*-o.friction*i)/o.mass*g,d+=i*g}else{let r=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,l.durationProgress>0&&(l.elapsedTime=o.duration*l.durationProgress,t=l.elapsedTime+=e)),r=(o.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,l.durationProgress=r),d=n+o.easing(r)*(c-n),i=(d-l.lastPosition)/e,u=1==r}l.lastVelocity=i,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[s].done&&(u=!1),u?l.done=!0:t=!1,l.setValue(d,o.round)&&(n=!0)}));const l=ns(this),s=l.getValue();if(t){const e=Sl(r.to);s===e&&!n||o.decay?n&&o.decay&&this._onChange(s):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return bi.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Js(this)){const{to:e,config:t}=this.animation;bi.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Di.und(e)?(n=this.queue||[],this.queue=[]):n=[Di.obj(e)?e:vs({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>Zs(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),qs(this._state,e&&this._lastCallId),bi.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Di.obj(n)?n[t]:n,(null==n||As(n))&&(n=void 0),r=Di.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return Ks(this)||(e.reverse&&([n,r]=[r,n]),r=Sl(r),Di.und(r)?ns(this)||this._set(n):this._set(r)),o}_update(e,t){let n=vs({},e);const{key:r,defaultProps:o}=this;n.default&&Object.assign(o,Es(n,((e,t)=>/^on/.test(t)?ks(e,r):e))),cc(this,n,"onProps"),uc(this,"onProps",n,this);const a=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Rs(++this._lastCallId,{key:r,props:n,defaultProps:o,state:i,actions:{pause:()=>{Qs(this)||(tc(this,!0),Hi(i.pauseQueue),uc(this,"onPause",Hs(this,rc(this,this.animation.to)),this))},resume:()=>{Qs(this)&&(tc(this,!1),Js(this)&&this._resume(),Hi(i.resumeQueue),uc(this,"onResume",Hs(this,rc(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=oc(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ws(this));const r=!Di.und(e.to),o=!Di.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Ws(this));this._lastToId=t.callId}const{key:a,defaultProps:i,animation:l}=this,{to:s,from:c}=l;let{to:u=s,from:d=c}=e;!o||r||t.default&&!Di.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const m=!Ii(d,c);m&&(l.from=d),d=Sl(d);const p=!Ii(u,s);p&&this._focus(u);const f=As(t.to),{config:h}=l,{decay:g,velocity:b}=h;(r||o)&&(h.velocity=0),t.config&&!f&&function(e,t,n){n&&(Ds(n=vs({},n),t),t=vs({},n,t)),Ds(e,t),Object.assign(e,t);for(const t in Bs)null==e[t]&&(e[t]=Bs[t]);let{mass:r,frequency:o,damping:a}=e;Di.und(o)||(o<.01&&(o=.01),a<0&&(a=0),e.tension=Math.pow(2*Math.PI/o,2)*r,e.friction=4*Math.PI*a*r/o)}(h,_s(t.config,a),t.config!==i.config?_s(i.config,a):void 0);let v=ns(this);if(!v||Di.und(u))return n(Hs(this,!0));const _=Di.und(t.reset)?o&&!t.default:!Di.und(d)&&ys(t.reset,a),y=_?d:this.get(),k=Ts(u),M=Di.num(k)||Di.arr(k)||Xl(k),w=!f&&(!M||ys(i.immediate||t.immediate,a));if(p){const e=ms(u);if(e!==v.constructor){if(!w)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(k)}}const E=v.constructor;let x=Cl(u),C=!1;if(!x){const e=_||!Ks(this)&&m;(p||e)&&(C=Ii(Ts(y),k),x=!C),(Ii(l.immediate,w)||w)&&Ii(h.decay,g)&&Ii(h.velocity,b)||(x=!0)}if(C&&Js(this)&&(l.changed&&!_?x=!0:x||this._stop(s)),!f&&((x||Cl(s))&&(l.values=v.getPayload(),l.toValues=Cl(u)?null:E==ls?[1]:Zi(k)),l.immediate!=w&&(l.immediate=w,w||_||this._set(s)),x)){const{onRest:e}=l;Pi(sc,(e=>cc(this,t,e)));const r=Hs(this,rc(this,s));Hi(this._pendingCalls,r),this._pendingCalls.add(n),l.changed&&bi.batchedUpdates((()=>{l.changed=!_,null==e||e(r,this),_?_s(i.onRest,r):null==l.onStart||l.onStart(r,this)}))}_&&this._set(y),f?n(Fs(t.to,t,this._state,this)):x?this._start():Js(this)&&!p?this._pendingCalls.add(n):n(js(y))}_focus(e){const t=this.animation;e!==t.to&&(Tl(this)&&this._detach(),t.to=e,Tl(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Cl(t)&&(zl(t,this),Us(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Cl(e)&&Bl(e,this)}_set(e,t=!0){const n=Sl(e);if(!Di.und(n)){const e=ns(this);if(!e||!Ii(n,e.getValue())){const r=ms(n);e&&e.constructor==r?e.setValue(n):rs(this,r.create(n)),e&&bi.batchedUpdates((()=>{this._onChange(n,t)}))}}return ns(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,uc(this,"onStart",Hs(this,rc(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),_s(this.animation.onChange,e,this)),_s(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ns(this).reset(Sl(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Js(this)||(ec(this,!0),Qs(this)||this._resume())}_resume(){$i.skipAnimation?this.finish():Qi.start(this)}_stop(e,t){if(Js(this)){ec(this,!1);const n=this.animation;Pi(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ll(this,{type:"idle",parent:this});const r=t?Ws(this.get()):Hs(this.get(),rc(this,null!=e?e:n.to));Hi(this._pendingCalls,r),n.changed&&(n.changed=!1,uc(this,"onRest",r,this))}}}function rc(e,t){const n=Ts(t);return Ii(Ts(e.get()),n)}function oc(e,t=e.loop,n=e.to){let r=_s(t);if(r){const o=!0!==r&&Ss(r),a=(o||e).reverse,i=!o||o.reset;return ac(vs({},e,{loop:t,default:!1,pause:void 0,to:!a||As(n)?n:void 0,from:i?e.from:void 0,reset:i},o))}}function ac(e){const{to:t,from:n}=e=Ss(e),r=new Set;return Di.obj(t)&&lc(t,r),Di.obj(n)&&lc(n,r),e.keys=r.size?Array.from(r):null,e}function ic(e){const t=ac(e);return Di.und(t.default)&&(t.default=Es(t)),t}function lc(e,t){Ri(e,((e,n)=>null!=e&&t.add(n)))}const sc=["onStart","onRest","onChange","onPause","onResume"];function cc(e,t,n){e.animation[n]=t[n]!==Ms(t,n)?ks(t[n],e.key):void 0}function uc(e,t,...n){var r,o,a,i;null==(r=(o=e.animation)[t])||r.call(o,...n),null==(a=(i=e.defaultProps)[t])||a.call(i,...n)}const dc=["onStart","onChange","onRest"];let mc=1;class pc{constructor(e,t){this.id=mc++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(vs({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Di.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ac(e)),this}start(e){let{queue:t}=this;return e?t=Zi(e).map(ac):this.queue=[],this._flush?this._flush(this,t):(yc(this,t),fc(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Pi(Zi(t),(t=>n[t].stop(!!e)))}else qs(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Di.und(e))this.start({pause:!0});else{const t=this.springs;Pi(Zi(e),(e=>t[e].pause()))}return this}resume(e){if(Di.und(e))this.start({pause:!1});else{const t=this.springs;Pi(Zi(e),(e=>t[e].resume()))}return this}each(e){Ri(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,ji(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const a=!r&&this._started,i=o||a&&n.size?this.get():null;o&&t.size&&ji(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),a&&(this._started=!1,ji(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}bi.onFrame(this._onFrame)}}function fc(e,t){return Promise.all(t.map((t=>hc(e,t)))).then((t=>Zs(e,t)))}async function hc(e,t,n){const{keys:r,to:o,from:a,loop:i,onRest:l,onResolve:s}=t,c=Di.obj(t.default)&&t.default;i&&(t.loop=!1),!1===o&&(t.to=null),!1===a&&(t.from=null);const u=Di.arr(o)||Di.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Pi(dc,(n=>{const r=t[n];if(Di.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Hi(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const m=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===Ms(t,"cancel");(u||p&&d.asyncId)&&m.push(Rs(++e._lastAsyncId,{props:t,state:d,actions:{pause:Oi,resume:Oi,start(t,n){p?(qs(d,e._lastAsyncId),n(Ws(e))):(t.onRest=l,n(Fs(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=Zs(e,await Promise.all(m));if(i&&f.finished&&(!n||!f.noop)){const n=oc(t,i,o);if(n)return yc(e,[n]),hc(e,n,!0)}return s&&bi.batchedUpdates((()=>s(f,e,e.item))),f}function gc(e,t){const n=vs({},e.springs);return t&&Pi(Zi(t),(e=>{Di.und(e.keys)&&(e=ac(e)),Di.obj(e.to)||(e=vs({},e,{to:void 0})),_c(n,e,(e=>vc(e)))})),bc(e,n),n}function bc(e,t){Ri(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,zl(t,e))}))}function vc(e,t){const n=new nc;return n.key=e,t&&zl(n,t),n}function _c(e,t,n){t.keys&&Pi(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function yc(e,t){Pi(t,(t=>{_c(e.springs,t,(t=>vc(t,e)))}))}const kc=["children"],Mc=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,kc);const r=(0,s.useContext)(wc),o=n.pause||!!r.pause,a=n.immediate||!!r.immediate;n=function(e,t){const[n]=(0,s.useState)((()=>({inputs:t,result:e()}))),r=(0,s.useRef)(),o=r.current;let a=o;return a?Boolean(t&&a.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=a,o==n&&(n.inputs=n.result=void 0)}),[a]),a.result}((()=>({pause:o,immediate:a})),[o,a]);const{Provider:i}=wc;return s.createElement(i,{value:n},t)},wc=(Ec=Mc,xc={},Object.assign(Ec,s.createContext(xc)),Ec.Provider._context=Ec,Ec.Consumer._context=Ec,Ec);var Ec,xc;Mc.Provider=wc.Provider,Mc.Consumer=wc.Consumer;const Cc=()=>{const e=[],t=function(t){$l(`${Yl}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return Pi(e,((e,o)=>{if(Di.und(t))r.push(e.start());else{const a=n(t,e,o);a&&r.push(e.start(a))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Pi(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Pi(e,(e=>e.resume(...arguments))),this},t.set=function(t){Pi(e,(e=>e.set(t)))},t.start=function(t){const n=[];return Pi(e,((e,r)=>{if(Di.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return Pi(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Pi(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Di.fun(e)?e(n,t):e};return t._getProps=n,t};function Sc(e,t,n){const r=Di.fun(t)&&t;r&&!n&&(n=[]);const o=(0,s.useMemo)((()=>r||3==arguments.length?Cc():void 0),[]),a=(0,s.useRef)(0),i=Kl(),l=(0,s.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=gc(e,t);return a.current>0&&!l.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?fc(e,t):new Promise((r=>{bc(e,n),l.queue.push((()=>{r(fc(e,t))})),i()}))}})),[]),c=(0,s.useRef)([...l.ctrls]),u=[],d=es(e)||0;function m(e,n){for(let o=e;o{Pi(c.current.slice(e,d),(e=>{Ns(e,o),e.stop(!0)})),c.current.length=e,m(d,e)}),[e]),(0,s.useMemo)((()=>{m(0,Math.min(d,e))}),n);const p=c.current.map(((e,t)=>gc(e,u[t]))),f=(0,s.useContext)(Mc),h=es(f),g=f!==h&&Ls(f);Gl((()=>{a.current++,l.ctrls=c.current;const{queue:e}=l;e.length&&(l.queue=[],Pi(e,(e=>e()))),Pi(c.current,((e,t)=>{null==o||o.add(e),g&&e.start({default:f});const n=u[t];n&&(zs(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Jl((()=>()=>{Pi(l.ctrls,(e=>e.stop(!0)))}));const b=p.map((e=>vs({},e)));return o?[b,o]:b}let Tc;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(Tc||(Tc={}));class Lc extends Xs{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=Ml(...t);const n=this._get(),r=ms(n);rs(this,r.create(n))}advance(e){const t=this._get();Ii(t,this.get())||(ns(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Nc(this._active)&&zc(this)}_get(){const e=Di.arr(this.source)?this.source.map(Sl):Zi(Sl(this.source));return this.calc(...e)}_start(){this.idle&&!Nc(this._active)&&(this.idle=!1,Pi(os(this),(e=>{e.done=!1})),$i.skipAnimation?(bi.batchedUpdates((()=>this.advance())),zc(this)):Qi.start(this))}_attach(){let e=1;Pi(Zi(this.source),(t=>{Cl(t)&&zl(t,this),Us(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Pi(Zi(this.source),(e=>{Cl(e)&&Bl(e,this)})),this._active.clear(),zc(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Zi(this.source).reduce(((e,t)=>Math.max(e,(Us(t)?t.priority:0)+1)),0))}}function Ac(e){return!1!==e.idle}function Nc(e){return!e.size||Array.from(e).every(Ac)}function zc(e){e.idle||(e.idle=!0,Pi(os(e),(e=>{e.done=!0})),Ll(e,{type:"idle",parent:e}))}function Bc(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}$i.assign({createStringInterpolator:ql,to:(e,t)=>new Lc(e,t)}),Qi.advance;const Oc=["style","children","scrollTop","scrollLeft"],Dc=/^--/;function Ic(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Dc.test(e)||Rc.hasOwnProperty(e)&&Rc[e]?(""+t).trim():t+"px"}const Pc={};let Rc={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const Zc=["Webkit","Ms","Moz","O"];Rc=Object.keys(Rc).reduce(((e,t)=>(Zc.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Rc);const jc=["x","y","z"],Hc=/^(matrix|translate|scale|rotate|skew)/,Wc=/^(translate)/,Fc=/^(rotate|skew)/,qc=(e,t)=>Di.num(e)&&0!==e?e+t:e,Yc=(e,t)=>Di.arr(e)?e.every((e=>Yc(e,t))):Di.num(e)?e===t:parseFloat(e)===t;class Vc extends cs{constructor(e){let{x:t,y:n,z:r}=e,o=Bc(e,jc);const a=[],i=[];(t||n||r)&&(a.push([t||0,n||0,r||0]),i.push((e=>[`translate3d(${e.map((e=>qc(e,"px"))).join(",")})`,Yc(e,0)]))),Ri(o,((e,t)=>{if("transform"===t)a.push([e||""]),i.push((e=>[e,""===e]));else if(Hc.test(t)){if(delete o[t],Di.und(e))return;const n=Wc.test(t)?"px":Fc.test(t)?"deg":"";a.push(Zi(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${qc(o,n)})`,Yc(o,0)]:e=>[`${t}(${e.map((e=>qc(e,n))).join(",")})`,Yc(e,t.startsWith("scale")?1:0)])}})),a.length&&(o.transform=new Uc(a,i)),super(o)}}class Uc extends Al{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Pi(this.inputs,((n,r)=>{const o=Sl(n[0]),[a,i]=this.transforms[r](Di.arr(o)?o:n.map(Sl));e+=" "+a,t=t&&i})),t?"none":e}observerAdded(e){1==e&&Pi(this.inputs,(e=>Pi(e,(e=>Cl(e)&&zl(e,this)))))}observerRemoved(e){0==e&&Pi(this.inputs,(e=>Pi(e,(e=>Cl(e)&&Bl(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ll(this,e)}}const $c=["scrollTop","scrollLeft"];$i.assign({batchedUpdates:La.unstable_batchedUpdates,createStringInterpolator:ql,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});const Xc=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new cs(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{const t=bs(e)||"Anonymous";return(e=Di.str(e)?a[e]||(a[e]=fs(e,o)):e[gs]||(e[gs]=fs(e,o))).displayName=`Animated(${t})`,e};return Ri(e,((t,n)=>{Di.arr(e)&&(n=bs(t)),a[n]=a(t)})),{animated:a}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,r=t,{style:o,children:a,scrollTop:i,scrollLeft:l}=r,s=Bc(r,Oc),c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Pc[t]||(Pc[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==a&&(e.textContent=a);for(let t in o)if(o.hasOwnProperty(t)){const n=Ic(t,o[t]);Dc.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==l&&(e.scrollLeft=l)},createAnimatedStyle:e=>new Vc(e),getComponentProps:e=>Bc(e,$c)}),Gc=Xc.animated;var Kc=n(57586),Jc=n(93622);const Qc=e=>e+1,eu=e=>({top:e.offsetTop,left:e.offsetLeft}),tu=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const a=(0,s.useRef)(),i=(0,Kc.Z)()||!r,[l,c]=(0,s.useReducer)(Qc,0),[u,d]=(0,s.useReducer)(Qc,0),[m,p]=(0,s.useState)({x:0,y:0}),f=(0,s.useMemo)((()=>a.current?eu(a.current):null),[o]),h=(0,s.useMemo)((()=>{if(!n||!a.current)return()=>{};const e=(0,Jc.Z)(a.current);if(!e)return()=>{};const t=a.current.getBoundingClientRect();return()=>{const n=a.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);function g(e){let{value:n}=e,{x:r,y:o}=n;r=Math.round(r),o=Math.round(o),r===g.x&&o===g.y||(function(e){let{x:n,y:r}=e;if(!a.current)return;const o=0===n&&0===r;a.current.style.transformOrigin=o?"":"center",a.current.style.transform=o?"":`translate3d(${n}px,${r}px,0)`,a.current.style.zIndex=!t||o?"":"1",h()}({x:r,y:o}),g.x=r,g.y=o)}return(0,s.useLayoutEffect)((()=>{l&&d()}),[l]),(0,s.useLayoutEffect)((()=>{if(!f)return;if(i)return void h();a.current.style.transform="";const e=eu(a.current);c(),p({x:Math.round(f.left-e.left),y:Math.round(f.top-e.top)})}),[o]),g.x=0,g.y=0,function(e,t){const n=Di.fun(e),[[r],o]=Sc(1,n?e:[e],n?t||[]:t)}({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:l!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:g}),a};var nu=n(26914),ru=n(14925),ou=n(98213),au=n(85998);const iu=".block-editor-block-list__block",lu=".block-list-appender",su=".block-editor-button-block-appender";function cu(e,t){return t.closest([iu,lu,su].join(","))===e}function uu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(iu);return t?t.id.slice("block-".length):void 0}function du(e){const t=(0,s.useRef)(),n=function(e){return(0,b.Z)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isNavigationMode:r,isBlockSelected:o}=t(tr);if(o(e)&&!r())return n()}),[e])}(e),{isBlockSelected:r,isMultiSelecting:o}=(0,b.Z)(tr);return(0,s.useEffect)((()=>{if(!r(e)||o())return;if(null==n)return;if(!t.current)return;const{ownerDocument:a}=t.current;if(t.current.contains(a.activeElement))return;const i=nu.focus.tabbable.find(t.current).filter((e=>(0,ru.Z)(e))),l=-1===n,s=(l?m.last:m.first)(i)||t.current;if(cu(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=nu.focus.tabbable.findNext(t.current);if(e&&cu(t.current,e)&&(0,ou.Z)(e))return void e.focus()}(0,au.Z)(s,l)}else t.current.focus()}),[n,e]),t}function mu(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function pu(){const e=(0,b.Z)((e=>{const{isNavigationMode:t,getSettings:n}=e(tr);return t()||n().outlineMode}),[]);return(0,Ar.Z)((t=>{if(e)return t.addEventListener("mouseout",mu),t.addEventListener("mouseover",mu),()=>{t.removeEventListener("mouseout",mu),t.removeEventListener("mouseover",mu),t.classList.remove("is-hovered")}}),[e])}function fu(e){return(0,b.Z)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:o,isBlockMultiSelected:i,getBlockName:l,getSettings:s,hasSelectedInnerBlock:c,isTyping:u}=t(tr),{outlineMode:m}=s(),p=n(e),f=o(e),h=l(e),g=c(e,!0);return d()({"is-selected":f,"is-highlighted":r(e),"is-multi-selected":i(e),"is-reusable":(0,a.isReusableBlock)((0,a.getBlockType)(h)),"is-dragging":p,"has-child-selected":g,"remove-outline":f&&m&&u()})}),[e])}function hu(e){return(0,b.Z)((t=>{const n=t(tr).getBlockName(e),r=(0,a.getBlockType)(n);if((null==r?void 0:r.apiVersion)>1)return(0,a.getBlockDefaultClassName)(n)}),[e])}function gu(e){return(0,b.Z)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(tr),o=r(e);if(null==o||!o.className)return;const i=(0,a.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?o.className:void 0}),[e])}function bu(e){return(0,b.Z)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:a,isBlockSelected:i}=t(tr);if(!i(e))return;const l=n();return l?d()("is-block-moving-mode",{"can-insert-moving-block":r(o(l),a(e))}):void 0}),[e])}function vu(e){const{isBlockSelected:t}=(0,b.Z)(tr),{selectBlock:n,selectionChange:r}=(0,Yr.Z)(tr);return(0,Ar.Z)((o=>{function a(a){o.parentElement.closest('[contenteditable="true"]')||(t(e)?a.target.isContentEditable||r(e):cu(o,a.target)&&n(e))}return o.addEventListener("focusin",a),()=>{o.removeEventListener("focusin",a)}}),[t,n])}var _u=n(5560);function yu(e){const t=(0,b.Z)((t=>t(tr).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,b.Z)(tr),{insertDefaultBlock:o,removeBlock:a}=(0,Yr.Z)(tr);return(0,Ar.Z)((i=>{if(t)return i.addEventListener("keydown",l),i.addEventListener("dragstart",s),()=>{i.removeEventListener("keydown",l),i.removeEventListener("dragstart",s)};function l(t){const{keyCode:l,target:s}=t;l!==_u.ENTER&&l!==_u.BACKSPACE&&l!==_u.DELETE||s!==i||(0,ru.Z)(s)||(t.preventDefault(),l===_u.ENTER?o({},n(e),r(e)+1):a(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,a])}function ku(e){const{isNavigationMode:t,isBlockSelected:n}=(0,b.Z)(tr),{setNavigationMode:r,selectBlock:o}=(0,Yr.Z)(tr);return(0,Ar.Z)((a=>{function i(a){t()&&!a.defaultPrevented&&(a.preventDefault(),n(e)?r(!1):o(e))}return a.addEventListener("mousedown",i),()=>{a.addEventListener("mousedown",i)}}),[e,t,n,r])}function Mu(){const e=(0,s.useContext)(Rh);return(0,Ar.Z)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function wu(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t,__unstableIsDisabled:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:r,className:o,wrapperProps:i={},isAligned:l}=(0,s.useContext)(Eu),{index:c,mode:u,name:m,blockApiVersion:p,blockTitle:f,isPartOfSelection:h,adjustScrolling:g,enableAnimation:v}=(0,b.Z)((e=>{const{getBlockIndex:t,getBlockMode:n,getBlockName:o,isTyping:i,getGlobalBlockCount:l,isBlockSelected:s,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:d}=e(tr),m=s(r),p=c(r)||u(r),f=o(r),h=(0,a.getBlockType)(f);return{index:t(r),mode:n(r),name:f,blockApiVersion:(null==h?void 0:h.apiVersion)||1,blockTitle:null==h?void 0:h.title,isPartOfSelection:m||p,adjustScrolling:m||d(r),enableAnimation:!i()&&l()<=200}}),[r]),_=(0,E.sprintf)((0,E.__)("Block: %s"),f),y="html"!==u||t?"":"-visual",k=(0,Za.Z)([e.ref,du(r),Br(r),vu(r),yu(r),ku(r),pu(),Mu(),tu({isSelected:h,adjustScrolling:g,enableAnimation:v,triggerAnimationOnChange:c}),(0,hi.Z)({isDisabled:!n})]),M=ar();return p<2&&r===M.clientId&&"undefined"!=typeof process&&process.env,{...i,...e,ref:k,id:`block-${r}${y}`,tabIndex:0,role:"document","aria-label":_,"data-block":r,"data-type":m,"data-title":f,className:d()(d()("block-editor-block-list__block",{"wp-block":!l}),o,e.className,i.className,fu(r),hu(r),gu(r),bu(r)),style:{...i.style,...e.style}}}wu.save=a.__unstableGetBlockProps;const Eu=(0,s.createContext)();function xu(e){let{children:t,isHtml:n,...r}=e;return(0,s.createElement)("div",wu(r,{__unstableIsHtml:n}),t)}const Cu=(0,Wa.Z)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:a,isSelectionEnabled:i,getTemplateLock:l,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(tr),d=s(n),m=o(n),p=l(r),f=c(n,r),h=u(n,r),{name:g,attributes:b,isValid:v}=d||{};return{mode:a(n),isSelectionEnabled:i(),isLocked:!!p,canRemove:f,canMove:h,block:d,name:g,attributes:b,isValid:v,isSelected:m}})),Su=(0,Fa.Z)(((e,t,n)=>{let{select:r}=n;const{updateBlockAttributes:o,insertBlocks:i,mergeBlocks:l,replaceBlocks:s,toggleSelection:c,__unstableMarkLastChangeAsPersistent:u}=e(tr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=r(tr),a=n(),{clientId:i}=t,l=a.length?a:[i];o(l,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;i(e,n,r)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:o}=t,{getBlockIndex:a}=r(tr),l=a(n);i(e,l+1,o)},onMerge(e){const{clientId:n}=t,{getPreviousBlockClientId:o,getNextBlockClientId:a}=r(tr);if(e){const e=a(n);e&&l(n,e)}else{const e=o(n);e&&l(e,n)}},onReplace(e,n,r){e.length&&!(0,a.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),s([t.clientId],e,n,r)},toggleSelection(e){c(e)}}})),Tu=(0,qa.Z)(Ya.Z,Cu,Su,(0,Va.Z)((e=>{let{block:t}=e;return!!t})),(0,Ha.Z)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:r,isLocked:o,canRemove:i,clientId:l,isSelected:c,isSelectionEnabled:u,className:p,name:f,isValid:h,attributes:g,wrapperProps:v,setAttributes:_,onReplace:y,onInsertBlocksAfter:k,onMerge:M,toggleSelection:w}=e;const E=(0,b.Z)((e=>{const{getSettings:t}=e(tr);return t().supportsLayout}),[]),{removeBlock:x}=(0,Yr.Z)(tr),C=(0,s.useCallback)((()=>x(l)),[l]);let S=(0,s.createElement)(Qa,{name:f,isSelected:c,attributes:g,setAttributes:_,insertBlocksAfter:o?void 0:k,onReplace:i?y:void 0,onRemove:i?C:void 0,mergeBlocks:i?M:void 0,clientId:l,isSelectionEnabled:u,toggleSelection:w});const T=(0,a.getBlockType)(f);null!=T&&T.getEditWrapperProps&&(v=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=d()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(v,T.getEditWrapperProps(g)));const L=v&&!!v["data-align"]&&!E;let A;if(L&&(S=(0,s.createElement)("div",{className:"wp-block","data-align":v["data-align"]},S)),h)A="html"===r?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},S),(0,s.createElement)(xu,{isHtml:!0},(0,s.createElement)(fi,{clientId:l}))):(null==T?void 0:T.apiVersion)>1?S:(0,s.createElement)(xu,v,S);else{const e=n?(0,a.serializeRawBlock)(n):(0,a.getSaveContent)(T,g);A=(0,s.createElement)(xu,{className:"has-warning"},(0,s.createElement)(si,{clientId:l}),(0,s.createElement)(ja.Z,null,(0,Ua.Z)(e)))}const N={clientId:l,className:null!==(t=v)&&void 0!==t&&t["data-align"]&&E?d()(p,`align${v["data-align"]}`):p,wrapperProps:(0,m.omit)(v,["data-align"]),isAligned:L},z=(0,s.useMemo)((()=>N),Object.values(N));return(0,s.createElement)(Eu.Provider,{value:z},(0,s.createElement)(mi,{fallback:(0,s.createElement)(xu,{className:"has-warning"},(0,s.createElement)(ui,null))},A))}));var Lu=n(97661),Au=n(20919),Nu=n(95117),zu=n(9317),Bu=n(77396),Ou=n(27038),Du=n(73003);const Iu=[(0,Ou.Z)((0,E.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,Ou.Z)((0,E.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,Ou.Z)((0,E.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,E.__)("Drag files into the editor to automatically insert media blocks."),(0,E.__)("Change a block's type by pressing the block icon on the toolbar.")],Pu=function(){const[e]=(0,s.useState)(Math.floor(Math.random()*Iu.length));return(0,s.createElement)(Du.Z,null,Iu[e])};var Ru=n(29301),Zu=n(23510);const ju=(0,s.memo)((function(e){var t;let{icon:n,showColors:r=!1,className:o}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Zu.Z});const a=(0,s.createElement)(Ru.Z,{icon:n&&n.src?n.src:n}),i=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,s.createElement)("span",{style:i,className:d()("block-editor-block-icon",o,{"has-colors":r})},a)})),Hu=function(e){let{title:t,icon:n,description:r,blockType:o}=e;return o&&((0,q.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o)),(0,s.createElement)("div",{className:"block-editor-block-card"},(0,s.createElement)(ju,{icon:n,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,s.createElement)("span",{className:"block-editor-block-card__description"},r)))};var Wu=n(34035),Fu=n(62413),qu=n(65758);const Yu=(0,p.Z)((e=>(0,Wu.Z)((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,s.createElement)(e,(0,l.Z)({registry:r},o));const[a,i]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=(0,Fu.p)({},r);e.registerStore(Qn,er),i(e)}),[r]),a?(0,s.createElement)(qu.ZP,{value:a},(0,s.createElement)(e,(0,l.Z)({registry:a},o))):null}))),"withRegistryProvider");var Vu=n(57589);function Uu(e){let{clientId:t=null,value:n,selection:r,onChange:o=m.noop,onInput:i=m.noop}=e;const l=(0,Vu.Z)(),{resetBlocks:c,resetSelection:u,replaceInnerBlocks:d,setHasControlledInnerBlocks:p,__unstableMarkNextChangeAsNotPersistent:f}=l.dispatch(tr),{getBlockName:h,getBlocks:g}=l.select(tr),v=(0,b.Z)((e=>!t||e(tr).areInnerBlocksControlled(t)),[t]),_=(0,s.useRef)({incoming:null,outgoing:[]}),y=(0,s.useRef)(!1),k=()=>{n&&(f(),t?l.batch((()=>{p(t,!0);const e=n.map((e=>(0,a.cloneBlock)(e)));y.current&&(_.current.incoming=e),f(),d(t,e)})):(y.current&&(_.current.incoming=n),c(n)))},M=(0,s.useRef)(i),w=(0,s.useRef)(o);(0,s.useEffect)((()=>{M.current=i,w.current=o}),[i,o]),(0,s.useEffect)((()=>{_.current.outgoing.includes(n)?(0,m.last)(_.current.outgoing)===n&&(_.current.outgoing=[]):g(t)!==n&&(_.current.outgoing=[],k(),r&&u(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,s.useEffect)((()=>{v||(_.current.outgoing=[],k())}),[v]),(0,s.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:a,areInnerBlocksControlled:i}=l.select(tr);let s=g(t),c=o(),u=!1;y.current=!0;const d=l.subscribe((()=>{if(null!==t&&null===h(t))return;if(t&&!i(t))return;const l=o(),d=g(t),m=d!==s;if(s=d,m&&(_.current.incoming||a()))return _.current.incoming=null,void(c=l);(m||u&&!m&&l&&!c)&&(c=l,_.current.outgoing.push(s),(c?w.current:M.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})),u=m}));return()=>d()}),[l,t])}const $u=Yu((function(e){const{children:t,settings:n}=e,{updateSettings:r}=(0,Yr.Z)(tr);return(0,s.useEffect)((()=>{r(n)}),[n]),Uu(e),(0,s.createElement)(zr,null,t)}));var Xu=n(33841);function Gu(e){let{onClick:t}=e;return(0,s.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,s.createElement)(Xu.Z,null,(0,s.createElement)(jh,null)))}var Ku=n(38987);function Ju(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,b.Z)(tr),{clearSelectedBlock:n}=(0,Yr.Z)(tr);return(0,Ar.Z)((r=>{function o(o){(e()||t())&&o.target===r&&n()}return r.addEventListener("mousedown",o),()=>{r.removeEventListener("mousedown",o)}}),[e,t,n])}function Qu(e){return(0,s.createElement)("div",(0,l.Z)({ref:Ju()},e))}function ed(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o,getSelectedBlocksInitialCaretPosition:a,__unstableIsFullySelected:i}=e(tr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o(),initialPosition:a(),isFullSelection:i()}}function td(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o,isFullSelection:a}=(0,b.Z)(ed,[]),i=Or(o),l=Or((0,m.first)(n)),s=Or((0,m.last)(n));return(0,Ar.Z)((c=>{const{ownerDocument:u}=c,{defaultView:d}=u;if(null==e)return;if(!r||t){if(!o||t)return;const e=d.getSelection();if(e.rangeCount&&!e.isCollapsed){const t=i.current,{startContainer:n,endContainer:r}=e.getRangeAt(0);!t||t.contains(n)&&t.contains(r)||e.removeAllRanges()}return}const{length:m}=n;if(m<2)return;if(!a)return;if(c.contentEditable=!0,c.focus(),!l.current||!s.current)return;const p=d.getSelection(),f=u.createRange();f.setStartBefore(l.current),f.setEndAfter(s.current),p.removeAllRanges(),p.addRange(f)}),[r,t,n,o,e,a])}var nd=n(14465),rd=n(61747),od=n(63338),ad=n(63140),id=n(26649);function ld(e,t,n,r){let o,a=nu.focus.focusable.find(n);return t&&(a=(0,m.reverse)(a)),a=a.slice(a.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),(0,m.find)(a,(function(e){if(!nu.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}))}function sd(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksEndClientId:t,getPreviousBlockClientId:n,getNextBlockClientId:r,getSettings:o,hasMultiSelection:a}=(0,b.Z)(tr);return(0,Ar.Z)((i=>{let l;function s(){l=null}function c(s){const{keyCode:c,target:u}=s,d=c===_u.UP,m=c===_u.DOWN,p=c===_u.LEFT,f=c===_u.RIGHT,h=d||p,g=p||f,b=d||m,v=g||b,_=s.shiftKey,y=_||s.ctrlKey||s.altKey||s.metaKey,k=b?nd.Z:rd.Z,{ownerDocument:M}=i,{defaultView:w}=M;if(a())return;if(b?l||(l=(0,od.Z)(w)):l=null,s.defaultPrevented)return;if(!v)return;if(!function(e,t,n){if((t===_u.UP||t===_u.DOWN)&&!n)return!0;const{tagName:r}=e;return"INPUT"!==r&&"TEXTAREA"!==r}(u,c,y))return;const E=(0,ad.Z)(u)?!h:h,{keepCaretInsideBlock:x}=o(),C=e();if(_){const e=t(),o=n(e||C),a=r(e||C);(h&&o||!h&&a)&&function(e,t){const n=ld(e,t,i);return!(n&&(r=e,o=n,r.closest(iu)===o.closest(iu)));var r,o}(u,h)&&k(u,h)&&(i.contentEditable=!0,i.focus())}else if(b&&(0,nd.Z)(u,h)&&!x){const e=ld(u,h,i,!0);e&&((0,id.Z)(e,h,l),s.preventDefault())}else if(g&&w.getSelection().isCollapsed&&(0,rd.Z)(u,E)&&!x){const e=ld(u,E,i);(0,au.Z)(e,h),s.preventDefault()}}return i.addEventListener("mousedown",s),i.addEventListener("keydown",c),()=>{i.removeEventListener("mousedown",s),i.removeEventListener("keydown",c)}}),[])}var cd=n(77792),ud=n(8880);function dd(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,b.Z)(tr),{multiSelect:r}=(0,Yr.Z)(tr),o=(0,ud.sx)();return(0,Ar.Z)((a=>{function i(a){if(!o("core/block-editor/select-all",a))return;const i=t();if(i.length<2&&!(0,cd.Z)(a.target))return;const[l]=i,s=n(l);let c=e(s);i.length===c.length&&(c=e(n(s)));const u=(0,m.first)(c),d=(0,m.last)(c);u!==d&&(r(u,d),a.preventDefault())}return a.addEventListener("keydown",i),()=>{a.removeEventListener("keydown",i)}}),[])}function md(e,t){e.contentEditable=t,t&&e.focus()}function pd(){const{startMultiSelect:e,stopMultiSelect:t}=(0,Yr.Z)(tr),{isSelectionEnabled:n,hasMultiSelection:r}=(0,b.Z)(tr);return(0,Ar.Z)((o=>{const{ownerDocument:a}=o,{defaultView:i}=a;let l,s;function c(){t(),i.removeEventListener("mouseup",c),s=i.requestAnimationFrame((()=>{if(r())return;md(o,!1);const e=i.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);l.contains(t)&&l.focus()}}))}function u(t){let{buttons:r,target:s}=t;1===r&&s.getAttribute("contenteditable")&&n()&&(l=a.activeElement,e(),i.addEventListener("mouseup",c),md(o,!0))}return o.addEventListener("mouseout",u),()=>{o.removeEventListener("mouseout",u),i.removeEventListener("mouseup",c),i.cancelAnimationFrame(s)}}),[e,t,n,r])}function fd(e,t){e.contentEditable=t,t&&e.focus()}function hd(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,Yr.Z)(tr),{getBlockParents:r,getBlockSelectionStart:o}=(0,b.Z)(tr);return(0,Ar.Z)((n=>{const{ownerDocument:a}=n,{defaultView:i}=a;function l(a){const l=i.getSelection();if(!l.rangeCount)return void fd(n,!1);const s=a.shiftKey&&"mouseup"===a.type;if(l.isCollapsed&&!s)return void fd(n,!1);let c=uu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE?t:t.childNodes[n]}(l)),u=uu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE?t:t.childNodes[n-1]}(l));if(s){const e=o(),t=uu(a.target),n=t!==u;(c===u&&l.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0!==c||void 0!==u)if(c===u)t(c);else{const t=[...r(c),c],n=[...r(u),u],o=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[o],n[o])}else fd(n,!1)}function s(){a.addEventListener("selectionchange",l),i.addEventListener("mouseup",l)}function c(){a.removeEventListener("selectionchange",l),i.removeEventListener("mouseup",l)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,r])}function gd(){const{selectBlock:e}=(0,Yr.Z)(tr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:r}=(0,b.Z)(tr);return(0,Ar.Z)((o=>{function a(a){if(!t()||0!==a.button)return;const i=n(),l=uu(a.target);a.shiftKey?i!==l&&(o.contentEditable=!0,o.focus()):r()&&e(l)}return o.addEventListener("mousedown",a),()=>{o.removeEventListener("mousedown",a)}}),[e,t,n,r])}function bd(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:r}=(0,b.Z)(tr),{replaceBlocks:o,__unstableSplitSelection:i,removeBlocks:l,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,Yr.Z)(tr);return(0,Ar.Z)((u=>{function d(e){var t;r()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function m(d){d.defaultPrevented||r()&&(d.keyCode===_u.ENTER?(u.contentEditable=!1,d.preventDefault(),e()?o(t(),(0,a.createBlock)((0,a.getDefaultBlockName)())):i()):d.keyCode===_u.BACKSPACE||d.keyCode===_u.DELETE?(u.contentEditable=!1,d.preventDefault(),e()?l(t()):n()?s(d.keyCode===_u.DELETE):c()):1!==d.key.length||d.metaKey||d.ctrlKey||(u.contentEditable=!1,n()?s(d.keyCode===_u.DELETE):(d.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function p(e){r()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",d),u.addEventListener("keydown",m),u.addEventListener("compositionstart",p),()=>{u.removeEventListener("beforeinput",d),u.removeEventListener("keydown",m),u.removeEventListener("compositionstart",p)}}),[])}function vd(){const[e,t,n]=function(){const e=(0,s.useRef)(),t=(0,s.useRef)(),n=(0,s.useRef)(),r=(0,s.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:a,getBlockCount:i}=(0,b.Z)(tr),{setNavigationMode:l}=(0,Yr.Z)(tr),c=(0,b.Z)((e=>e(tr).isNavigationMode()),[])?void 0:"0",u=(0,s.useRef)();function d(t){if(u.current)u.current=null;else if(o())e.current.focus();else if(a())r.current.focus();else{l(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";nu.focus.tabbable[n](t.target).focus()}}const m=(0,s.createElement)("div",{ref:t,tabIndex:c,onFocus:d}),p=(0,s.createElement)("div",{ref:n,tabIndex:c,onFocus:d}),f=(0,Ar.Z)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===_u.ESCAPE&&!o())return e.preventDefault(),void l(!0);if(e.keyCode!==_u.TAB)return;const r=e.shiftKey,i=r?"findPrevious":"findNext";if(!o()&&!a())return void(e.target===s&&l(!0));if(((0,ou.Z)(e.target)||e.target.getAttribute("data-block")===a())&&(0,ou.Z)(nu.focus.tabbable[i](e.target)))return;const c=r?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function d(e){r.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function m(r){var o;if(r.keyCode!==_u.TAB)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const a=r.shiftKey?"findPrevious":"findNext",i=nu.focus.tabbable[a](r.target);i!==t.current&&i!==n.current||(r.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:p}=s,{defaultView:f}=p;return f.addEventListener("keydown",m),s.addEventListener("keydown",c),s.addEventListener("focusout",d),()=>{f.removeEventListener("keydown",m),s.removeEventListener("keydown",c),s.removeEventListener("focusout",d)}}),[]);return[m,(0,Za.Z)([e,f]),p]}(),r=(0,b.Z)((e=>e(tr).hasMultiSelection()),[]);return[e,(0,Za.Z)([t,bd(),pd(),hd(),gd(),td(),dd(),sd(),(0,Ar.Z)((e=>{if(e.tabIndex=-1,e.contentEditable=r,r)return e.setAttribute("aria-label",(0,E.__)("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[r])]),n]}const _d=(0,s.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,a,i]=vd();return(0,s.createElement)(s.Fragment,null,o,(0,s.createElement)("div",(0,l.Z)({},r,{ref:(0,Za.Z)([a,t]),className:d()(r.className,"block-editor-writing-flow")}),n),i)})),yd="editor-styles-wrapper";function kd(e){return(0,s.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}const Md=(0,s.forwardRef)((function(e,t){let{contentRef:n,children:r,head:o,tabIndex:a=0,assets:i,...c}=e;const[,u]=(0,s.useReducer)((()=>({}))),[m,p]=(0,s.useState)(),[h,g]=(0,s.useState)([]),b=kd(null==i?void 0:i.styles),v=kd(null==i?void 0:i.scripts),_=Ju(),[y,k,M]=vd(),w=(0,Ar.Z)((e=>{function t(){const{contentDocument:t,ownerDocument:n}=e,{readyState:r,documentElement:o}=t;return("interactive"===r||"complete"===r)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function r(e){const r=Object.getPrototypeOf(e).constructor.name,o=window[r],a={};for(const t in e)a[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();a.clientX+=e.left,a.clientY+=e.top}const i=new o(e.type,a);!n.dispatchEvent(i)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(t),p(t),_(o),g(Array.from(n.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),t.dir=n.dir,o.removeChild(t.head),o.removeChild(t.body),!0)}return e.addEventListener("load",t),()=>e.removeEventListener("load",t)}),[]),x=(0,Ar.Z)((e=>{v.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:r}=t;return new Promise(((t,o)=>{const a=e.ownerDocument.createElement("script");a.id=n,r?(a.src=r,a.onload=()=>t(),a.onerror=()=>o()):t(),e.appendChild(a)}))}(e,n)))),Promise.resolve()).finally((()=>{u()}))}),[]),C=(0,Za.Z)([n,_,k]),S=(0,Ar.Z)((e=>{Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:r}=t;if(r&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&Array.from(r).find((e=>{let{selectorText:t}=e;return t&&(t.includes(`.${yd}`)||t.includes(".wp-block"))}))&&!e.ownerDocument.getElementById(n.id)){e.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.appendChild(r.cloneNode(!0))}}))}),[]);return o=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",null,"body{margin:0}"),b.map((e=>{let{tagName:t,href:n,id:r,rel:o,media:a,textContent:i}=e;const l=t.toLowerCase();return"style"===l?(0,s.createElement)(l,{id:r,key:r},i):(0,s.createElement)(l,{href:n,id:r,rel:o,media:a,key:r})})),o),(0,s.createElement)(s.Fragment,null,a>=0&&y,(0,s.createElement)("iframe",(0,l.Z)({},c,{ref:(0,Za.Z)([t,w]),tabIndex:a,srcDoc:"",title:(0,E.__)("Editor canvas")}),m&&(0,La.createPortal)((0,s.createElement)(s.Fragment,null,(0,s.createElement)("head",{ref:x},o),(0,s.createElement)("body",{ref:C,className:d()(yd,...h)},(0,s.createElement)("div",{style:{display:"none"},ref:S}),(0,s.createElement)(f.Z,{document:m},r))),m.documentElement)),a>=0&&M)}));var wd=n(16765),Ed=n(83933),xd=n(40241),Cd=n(13692),Sd=n.n(Cd);const Td=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Ld(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function a(){const e={line:n,column:r};return function(t){return t.position=new i(e),p(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;const l=[];function s(o){const a=new Error(t.source+":"+n+":"+r+": "+o);if(a.reason=o,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a;l.push(a)}function c(){return m(/^{\s*/)}function u(){return m(/^}/)}function d(){let t;const n=[];for(p(),f(n);e.length&&"}"!==e.charAt(0)&&(t=E()||x());)!1!==t&&(n.push(t),f(n));return n}function m(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function p(){m(/^\s*/)}function f(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){const t=a();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}function g(){const e=m(/^([^{]+)/);if(e)return Ad(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function b(){const e=a();let t=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Ad(t[0]),!m(/^:\s*/))return s("property missing ':'");const n=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Td,""),value:n?Ad(n[0]).replace(Td,""):""});return m(/^[;\s]*/),r}function v(){const e=[];if(!c())return s("missing '{'");let t;for(f(e);t=b();)!1!==t&&(e.push(t),f(e));return u()?e:s("missing '}'")}function _(){let e;const t=[],n=a();for(;e=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),m(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:v()})}const y=w("import"),k=w("charset"),M=w("namespace");function w(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=a(),r=m(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function E(){if("@"===e[0])return function(){const e=a();let t=m(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=m(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,i=f();for(;o=_();)i.push(o),i=i.concat(f());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:i}):s("@keyframes missing '}'")}()||function(){const e=a(),t=m(/^@media *([^{]+)/);if(!t)return;const n=Ad(t[1]);if(!c())return s("@media missing '{'");const r=f().concat(d());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=a(),t=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Ad(t[1]),media:Ad(t[2])})}()||function(){const e=a(),t=m(/^@supports *([^{]+)/);if(!t)return;const n=Ad(t[1]);if(!c())return s("@supports missing '{'");const r=f().concat(d());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||y()||k()||M()||function(){const e=a(),t=m(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Ad(t[1]),r=Ad(t[2]);if(!c())return s("@document missing '{'");const o=f().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=a();if(!m(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=f();for(;n=b();)r.push(n),r=r.concat(f());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=a();if(!m(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=f().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=a();if(!m(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=f();for(;t=b();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function x(){const e=a(),t=g();return t?(f(),e({type:"rule",selectors:t,declarations:v()})):s("selector missing")}return Nd(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:l}}}())}function Ad(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Nd(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Nd(e,r)})):n&&"object"==typeof n&&Nd(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var zd=n(35717),Bd=n.n(zd);const Od=Dd;function Dd(e){this.options=e||{}}Dd.prototype.emit=function(e){return e},Dd.prototype.visit=function(e){return this[e.type](e)},Dd.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;rt=>{if("declaration"===t.type){const a=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Hd(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+Wd(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=a,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t},qd=/^(body|html|:root).*$/,Yd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(qd)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n},Vd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,m.map)(e,(e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(Yd(t)),r&&o.push(Fd(r)),o.length?jd(n,(0,qa.Z)(o)):n}))},Ud=".editor-styles-wrapper";function $d(e){return(0,s.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(Ud);let a;if(o)a=n.getComputedStyle(o,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),a=n.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const i=(0,wd.Vi)(a);i.luminance()>.5||0===i.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function Xd(e){let{styles:t}=e;const n=(0,s.useMemo)((()=>Vd(t,Ud)),[t]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:$d(t)}),n.map(((e,t)=>(0,s.createElement)("style",{key:t},e))))}let Gd;(0,wd.l7)([Ed.Z,xd.Z]);const Kd=2e3,Jd=function(e){let{viewportWidth:t,__experimentalPadding:n,__experimentalMinHeight:r}=e;const[o,{width:a}]=(0,Ku.Z)(),[i,{height:l}]=(0,Ku.Z)(),{styles:c,assets:u}=(0,b.Z)((e=>{const t=e(tr).getSettings();return{styles:t.styles,assets:t.__unstableResolvedAssets}}),[]),d=(0,s.useMemo)((()=>c?[...c,{css:"body{height:auto;overflow:hidden;}",__unstableType:"presets"}]:c),[c]);Gd=Gd||(0,Ya.Z)(jh);const m=a/t;return(0,s.createElement)("div",{className:"block-editor-block-preview__container"},o,(0,s.createElement)(Xu.Z,{className:"block-editor-block-preview__content",style:{transform:`scale(${m})`,height:l*m,maxHeight:l>Kd?Kd*m:void 0,minHeight:r}},(0,s.createElement)(Md,{head:(0,s.createElement)(Xd,{styles:d}),assets:u,contentRef:(0,Ar.Z)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px",e.style.position="relative"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:l,pointerEvents:"none",maxHeight:Kd,minHeight:m<1&&r?r/m:r}},i,(0,s.createElement)(Gd,{renderAppender:!1}))))},Qd=(0,s.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:r=1200,__experimentalLive:o=!1,__experimentalOnClick:a,__experimentalMinHeight:i}=e;const l=(0,b.Z)((e=>e(tr).getSettings()),[]),c=(0,s.useMemo)((()=>{const e={...l};return e.__experimentalBlockPatterns=[],e}),[l]),u=(0,s.useMemo)((()=>(0,m.castArray)(t)),[t]);return t&&0!==t.length?(0,s.createElement)($u,{value:u,settings:c},o?(0,s.createElement)(Gu,{onClick:a}):(0,s.createElement)(Jd,{viewportWidth:r,__experimentalPadding:n,__experimentalMinHeight:i})):null}));function em(e){let{blocks:t,props:n={},__experimentalLayout:r}=e;const o=(0,b.Z)((e=>e(tr).getSettings()),[]),a=(0,hi.Z)(),i=(0,Za.Z)([n.ref,a]),l=(0,s.useMemo)((()=>({...o,__experimentalBlockPatterns:[]})),[o]),c=(0,s.useMemo)((()=>(0,m.castArray)(t)),[t]),u=(0,s.createElement)($u,{value:c,settings:l},(0,s.createElement)(Wh,{renderAppender:!1,__experimentalLayout:r}));return{...n,ref:i,className:d()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?u:null}}const tm=function(e){var t,n;let{item:r}=e;const{name:o,title:i,icon:l,description:c,initialAttributes:u}=r,d=(0,a.getBlockType)(o),m=(0,a.isReusableBlock)(r);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},m||null!=d&&d.example?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(Qd,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=d.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:d.example?(0,a.getBlockFromExample)(r.name,{attributes:{...d.example.attributes,...u},innerBlocks:d.example.innerBlocks}):(0,a.createBlock)(o,u)})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,E.__)("No Preview Available."))),!m&&(0,s.createElement)(Hu,{title:i,icon:l,description:c}))};var nm=n(81811),rm=n(26899);const om=(0,s.createContext)(),am=(0,s.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...a}=e;const i=(0,s.useContext)(om);return(0,s.createElement)(rm.A,(0,l.Z)({ref:t,state:i,role:"option",focusable:!0},a),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,s.createElement)(r,t,o):"function"==typeof o?o(t):(0,s.createElement)(Er.Z,t,o)}))}));var im=n(39433),lm=n(69540);function sm(e){let{count:t,icon:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,s.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,s.createElement)(Mr.Z,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(wr.Z,null,n?(0,s.createElement)(ju,{icon:n}):(0,E.sprintf)((0,E._n)("%d block","%d blocks",t),t)),(0,s.createElement)(wr.Z,null,(0,s.createElement)(ju,{icon:lm.Z})))))}const cm=e=>{let{isEnabled:t,blocks:n,icon:r,children:o}=e;const a={type:"inserter",blocks:n};return(0,s.createElement)(im.Z,{__experimentalTransferDataType:"wp-blocks",transferData:a,__experimentalDragComponent:(0,s.createElement)(sm,{count:n.length,icon:r})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};function um(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}const dm=(0,s.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:o,onHover:i,isDraggable:c,...u}=e;const m=(0,s.useRef)(!1),p=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},f=(0,s.useMemo)((()=>[(0,a.createBlock)(r.name,r.initialAttributes,(0,a.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]);return(0,s.createElement)(cm,{isEnabled:c&&!r.disabled,blocks:f,icon:r.icon},(e=>{let{draggable:a,onDragStart:c,onDragEnd:f}=e;return(0,s.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:a,onDragStart:e=>{m.current=!0,c&&(i(null),c(e))},onDragEnd:e=>{m.current=!1,f&&f(e)}},(0,s.createElement)(am,(0,l.Z)({isFirst:n,className:d()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),o(r,um()?e.metaKey:e.ctrlKey),i(null)},onKeyDown:e=>{const{keyCode:t}=e;t===_u.ENTER&&(e.preventDefault(),o(r,um()?e.metaKey:e.ctrlKey),i(null))},onFocus:()=>{m.current||i(r)},onMouseEnter:()=>{m.current||i(r)},onMouseLeave:()=>i(null),onBlur:()=>i(null)},u),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:p},(0,s.createElement)(ju,{icon:r.icon,showColors:!0})),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))})),mm=(0,s.forwardRef)((function(e,t){const[n,r]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{n&&(0,Vt.D)((0,E.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,s.createElement)("div",(0,l.Z)({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))}));var pm=n(53808);const fm=(0,s.forwardRef)((function(e,t){const n=(0,s.useContext)(om);return(0,s.createElement)(pm.E,(0,l.Z)({state:n,role:"presentation",ref:t},e))})),hm=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:o,label:i,isDraggable:l=!0}=e;return(0,s.createElement)(mm,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let t=0,r=e.length;t(0,s.createElement)(fm,{key:t},e.map(((e,o)=>(0,s.createElement)(dm,{key:e.id,item:e,className:(0,a.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:r,isDraggable:l,isFirst:0===t&&0===o})))))),o)},gm=function(e){let{title:t,icon:n,children:r}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,s.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,s.createElement)(Ru.Z,{icon:n})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},r))},bm=(e,t)=>{const{categories:n,collections:r,items:o}=(0,b.Z)((t=>{const{getInserterItems:n}=t(tr),{getCategories:r,getCollections:o}=t(a.store);return{categories:r(),collections:o(),items:n(e)}}),[e]);return[o,n,r,(0,s.useCallback)(((e,n)=>{let{name:r,initialAttributes:o,innerBlocks:i}=e;const l=(0,a.createBlock)(r,o,(0,a.createBlocksFromInnerBlocksTemplate)(i));t(l,void 0,n)}),[t])]};var vm=n(70277);const _m=function(e){let{children:t}=e;const n=(0,vm.u)({shift:!0,wrap:"horizontal"});return(0,s.createElement)(om.Provider,{value:n},t)},ym=[],km=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[a,i,l,c]=bm(t,n),u=(0,s.useMemo)((()=>(0,m.orderBy)(a,["frecency"],["desc"]).slice(0,6)),[a]),d=(0,s.useMemo)((()=>a.filter((e=>!e.category))),[a]),p=(0,s.useMemo)((()=>(0,m.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,m.groupBy)(e,"category")))(a)),[a]),f=(0,s.useMemo)((()=>{const e={...l};return Object.keys(l).forEach((t=>{e[t]=a.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[a,l]);(0,s.useEffect)((()=>()=>r(null)),[]);const h=(0,nm.Z)(i),g=i.length===h.length,b=(0,s.useMemo)((()=>Object.entries(l)),[l]),v=(0,nm.Z)(g?b:ym);return(0,s.createElement)(_m,null,(0,s.createElement)("div",null,o&&!!u.length&&(0,s.createElement)(gm,{title:(0,E._x)("Most used","blocks")},(0,s.createElement)(hm,{items:u,onSelect:c,onHover:r,label:(0,E._x)("Most used","blocks")})),(0,m.map)(h,(e=>{const t=p[e.slug];return t&&t.length?(0,s.createElement)(gm,{key:e.slug,title:e.title,icon:e.icon},(0,s.createElement)(hm,{items:t,onSelect:c,onHover:r,label:e.title})):null})),g&&d.length>0&&(0,s.createElement)(gm,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,E.__)("Uncategorized")},(0,s.createElement)(hm,{items:d,onSelect:c,onHover:r,label:(0,E.__)("Uncategorized")})),(0,m.map)(v,(e=>{let[t,n]=e;const o=f[t];return o&&o.length?(0,s.createElement)(gm,{key:t,title:n.title,icon:n.icon},(0,s.createElement)(hm,{items:o,onSelect:c,onHover:r,label:n.title})):null}))))};var Mm=n(87577);const wm=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,openPatternExplorer:o}=e;const a=(0,Ra.Z)("medium","<"),i=d()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,s.createElement)(Mr.Z,{justify:"space-between",align:"start",gap:"4",className:i},(0,s.createElement)(wr.Z,{isBlock:!0},(0,s.createElement)(Mm.Z,{className:"block-editor-inserter__panel-dropdown",label:(0,E.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{r(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!a&&(0,s.createElement)(wr.Z,null,(0,s.createElement)(Er.Z,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,E.__)("Explore all patterns"),onClick:()=>o()},(0,E._x)("Explore","Label for showing all block patterns"))))};var Em=n(19132);const xm=(e,t)=>{const{patternCategories:n,patterns:r}=(0,b.Z)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(tr);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:o}=(0,Yr.Z)(Em.store),i=(0,s.useCallback)(((t,n)=>{e((0,m.map)(n,(e=>(0,a.cloneBlock)(e))),t.name),o((0,E.sprintf)((0,E.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[r,n,i]};var Cm=n(14523);function Sm(e){let{isDraggable:t,pattern:n,onClick:r,composite:o}=e;const{blocks:a,viewportWidth:i}=n,c=`block-editor-block-patterns-list__item-description-${(0,Aa.Z)(Sm)}`;return(0,s.createElement)(cm,{isEnabled:t,blocks:a},(e=>{let{draggable:t,onDragStart:u,onDragEnd:d}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?c:void 0,draggable:t,onDragStart:u,onDragEnd:d},(0,s.createElement)(rm.A,(0,l.Z)({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:()=>r(n,a)}),(0,s.createElement)(Qd,{blocks:a,viewportWidth:i}),(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,s.createElement)(zu.Z,{id:c},n.description)))}))}function Tm(){return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}const Lm=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onClickPattern:o,orientation:a,label:i=(0,E.__)("Block Patterns")}=e;const c=(0,vm.u)({orientation:a});return(0,s.createElement)(Cm.b,(0,l.Z)({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":i}),n.map((e=>r.includes(e)?(0,s.createElement)(Sm,{key:e.name,pattern:e,onClick:o,isDraggable:t,composite:c}):(0,s.createElement)(Tm,{key:e.name}))))};function Am(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,s.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:a}=e;return(0,s.createElement)(Er.Z,{key:n,label:a,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},a)})))}function Nm(e){let{filterValue:t,setFilterValue:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,s.createElement)(Bu.Z,{onChange:n,value:t,label:(0,E.__)("Search for patterns"),placeholder:(0,E.__)("Search")}))}const zm=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:a}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,s.createElement)(Nm,{filterValue:o,setFilterValue:a}),!o&&(0,s.createElement)(Am,{selectedCategory:t,patternCategories:n,onClickCategory:r}))};var Bm=n(79470),Om=n(50111);const Dm=function(){return(0,s.createElement)("div",{className:"block-editor-inserter__no-results"},(0,s.createElement)($o.Z,{className:"block-editor-inserter__no-results-icon",icon:Zu.Z}),(0,s.createElement)("p",null,(0,E.__)("No results found.")))},Im=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:o,onSelect:i,shouldFocusBlock:l=!0}=e;const{getSelectedBlock:c}=(0,b.Z)(tr),{destinationRootClientId:u,destinationIndex:d}=(0,b.Z)((e=>{const{getSelectedBlockClientId:a,getBlockRootClientId:i,getBlockIndex:l,getBlockOrder:s}=e(tr),c=a();let u,d=t;return void 0!==n?u=n:r?u=l(r):!o&&c?(d=i(c),u=l(c)+1):u=s(d).length,{destinationRootClientId:d,destinationIndex:u}}),[t,n,r,o]),{replaceBlocks:p,insertBlocks:f,showInsertionPoint:h,hideInsertionPoint:g}=(0,Yr.Z)(tr),v=(0,s.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=c();!o&&r&&(0,a.isUnmodifiedDefaultBlock)(r)?p(r.clientId,e,null,l||n?0:null,t):f(e,d,u,!0,l||n?0:null,t);const s=(0,E.sprintf)((0,E._n)("%d block added.","%d blocks added.",(0,m.castArray)(e).length),(0,m.castArray)(e).length);(0,Vt.D)(s),i&&i()}),[o,c,p,f,u,d,i,l]),_=(0,s.useCallback)((e=>{e?h(u,d):g()}),[h,g,u,d]);return[u,v,_]},Pm=e=>e.name||"",Rm=e=>e.title,Zm=e=>e.description||"",jm=e=>e.keywords||[],Hm=e=>e.category,Wm=()=>null;function Fm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(0,m.deburr)(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const qm=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,m.words)(Fm(e))},Ym=(e,t)=>(0,m.differenceWith)(e,qm(t),((e,t)=>t.includes(e))),Vm=(e,t,n,r)=>{if(0===qm(r).length)return e;const o={getCategory:e=>{var n;return null===(n=(0,m.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}};return Um(e,r,o)},Um=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=qm(t);if(0===r.length)return e;const o=e.map((e=>[e,$m(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return o.sort(((e,t)=>{let[,n]=e,[,r]=t;return r-n})),o.map((e=>{let[t]=e;return t}))};function $m(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=Pm,getTitle:o=Rm,getDescription:a=Zm,getKeywords:i=jm,getCategory:l=Hm,getCollection:s=Wm}=n,c=r(e),u=o(e),d=a(e),p=i(e),f=l(e),h=s(e),g=Fm(t),b=Fm(u);let v=0;if(g===b)v+=30;else if(b.startsWith(g))v+=20;else{const e=[c,u,d,...p,f,h].join(" "),t=(0,m.words)(g);0===Ym(t,e).length&&(v+=10)}return 0!==v&&c.startsWith("core/")&&(v+=c!==e.id?1:2),v}function Xm(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,s.createElement)(Om.Z,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,E.sprintf)((0,E._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}const Gm=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=(0,Bm.Z)(Vt.D,500),[a,i]=Im({shouldFocusBlock:!0}),[l,,c]=xm(i,a),u=(0,s.useMemo)((()=>r.map((e=>e.name))),[r]),d=(0,s.useMemo)((()=>t?Um(l,t):l.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!u.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,l]);(0,s.useEffect)((()=>{if(!t)return;const e=d.length,n=(0,E.sprintf)((0,E._n)("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const m=(0,nm.Z)(d,{step:2}),p=!(null==d||!d.length);return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},p&&(0,s.createElement)(Xm,{filterValue:t,filteredBlockPatternsLength:d.length}),(0,s.createElement)(_m,null,!p&&(0,s.createElement)(Dm,null),p&&(0,s.createElement)(Lm,{shownPatterns:m,blockPatterns:d,onClickPattern:c,isDraggable:!1})))};function Km(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,s.useState)(""),[a,i]=(0,s.useState)(null==t?void 0:t.name);return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,s.createElement)(zm,{selectedCategory:a,patternCategories:n,onClickCategory:i,filterValue:r,setFilterValue:o}),(0,s.createElement)(Gm,{filterValue:r,selectedCategory:a,patternCategories:n}))}const Jm=function(e){let{onModalClose:t,...n}=e;return(0,s.createElement)(ei.Z,{title:(0,E.__)("Patterns"),closeLabel:(0,E.__)("Close"),onRequestClose:t,isFullScreen:!0},(0,s.createElement)(Km,n))};function Qm(e){let{rootClientId:t,onInsert:n,selectedCategory:r,populatedCategories:o}=e;const[a,,i]=xm(n,t),l=(0,s.useCallback)((e=>{var t;if(null===(t=e.categories)||void 0===t||!t.length)return 1/0;const n=o.reduce(((e,t,n)=>{let{name:r}=t;return e[r]=n,e}),{});return Math.min(...e.categories.map((e=>void 0!==n[e]?n[e]:1/0)))}),[o]),c=(0,s.useMemo)((()=>a.filter((e=>{var t;return"uncategorized"===r.name?l(e)===1/0:null===(t=e.categories)||void 0===t?void 0:t.includes(r.name)}))),[a,r]),u=(0,s.useMemo)((()=>c.sort(((e,t)=>l(e)-l(t)))),[c,l]),d=(0,nm.Z)(u);return c.length?(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,s.createElement)(Lm,{shownPatterns:d,blockPatterns:c,onClickPattern:i,label:r.label,orientation:"vertical",isDraggable:!0})):null}const ep=function(e){let{rootClientId:t,onInsert:n,onClickCategory:r,selectedCategory:o}=e;const[a,i]=(0,s.useState)(!1),[l,c]=xm(),u=(0,s.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>c.some((t=>t.name===e))))),[c]),d=(0,s.useMemo)((()=>{const e=c.filter((e=>l.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:r}=t;return[n,r].includes("featured")?"featured"===n?-1:1:0}));return l.some((e=>!u(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,E._x)("Uncategorized")}),e}),[l,c]),m=o||d[0];return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(wm,{selectedCategory:m,patternCategories:d,onClickCategory:r,openPatternExplorer:()=>i(!0)}),!a&&(0,s.createElement)(Qm,{rootClientId:t,onInsert:n,selectedCategory:m,populatedCategories:d}),a&&(0,s.createElement)(Jm,{initialCategory:m,patternCategories:d,onModalClose:()=>i(!1)}))};var tp=n(69649);function np(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,a]=bm(r,n),i=(0,s.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===i.length?(0,s.createElement)(Dm,null):(0,s.createElement)(gm,{title:(0,E.__)("Reusable blocks")},(0,s.createElement)(hm,{items:i,onSelect:a,onHover:t,label:(0,E.__)("Reusable blocks")}))}const rp=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(np,{onHover:r,onInsert:n,rootClientId:t}),(0,s.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,s.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:(0,tp.f)("edit.php",{post_type:"wp_block"})},(0,E.__)("Manage Reusable blocks"))))},{Fill:op,Slot:ap}=(0,v.up)("__unstableInserterMenuExtension");op.Slot=ap;const ip=op,lp=[],sp=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:a,isAppender:i,__experimentalInsertionIndex:l,maxBlockPatterns:c,maxBlockTypes:u,showBlockDirectory:d=!1,isDraggable:p=!0,shouldFocusBlock:f=!0,prioritizePatterns:h}=e;const g=(0,Bm.Z)(Vt.D,500),[b,v]=Im({onSelect:n,rootClientId:o,clientId:a,isAppender:i,insertionIndex:l,shouldFocusBlock:f}),[_,y,k,M]=bm(b,v),[w,,x]=xm(v,b),C=(0,s.useMemo)((()=>{if(0===c)return[];const e=Um(w,t);return void 0!==c?e.slice(0,c):e}),[t,w,c]);let S=u;h&&C.length>2&&(S=0);const T=(0,s.useMemo)((()=>{if(0===S)return[];const e=Vm((0,m.orderBy)(_,["frecency"],["desc"]),y,k,t);return void 0!==S?e.slice(0,S):e}),[t,_,y,k,u]);(0,s.useEffect)((()=>{if(!t)return;const e=T.length+C.length,n=(0,E.sprintf)((0,E._n)("%d result found.","%d results found.",e),e);g(n)}),[t,g]);const L=(0,nm.Z)(T,{step:9}),A=(0,nm.Z)(L.length===T.length?C:lp),N=!(0,m.isEmpty)(T)||!(0,m.isEmpty)(C),z=!!T.length&&(0,s.createElement)(gm,{title:(0,s.createElement)(zu.Z,null,(0,E.__)("Blocks"))},(0,s.createElement)(hm,{items:L,onSelect:M,onHover:r,label:(0,E.__)("Blocks"),isDraggable:p})),B=!!C.length&&(0,s.createElement)(gm,{title:(0,s.createElement)(zu.Z,null,(0,E.__)("Block Patterns"))},(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,s.createElement)(Lm,{shownPatterns:A,blockPatterns:C,onClickPattern:x,isDraggable:p})));return(0,s.createElement)(_m,null,!d&&!N&&(0,s.createElement)(Dm,null),h?B:z,!!T.length&&!!C.length&&(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?z:B,d&&(0,s.createElement)(ip.Slot,{fillProps:{onSelect:M,onHover:r,filterValue:t,hasItems:N,rootClientId:b}},(e=>e.length?e:N?null:(0,s.createElement)(Dm,null))))};var cp=n(90351);const up={name:"blocks",title:(0,E.__)("Blocks")},dp={name:"patterns",title:(0,E.__)("Patterns")},mp={name:"reusable",title:(0,E.__)("Reusable")},pp=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,onSelect:o}=e;const a=(0,s.useMemo)((()=>{const e=[up];return n&&e.push(dp),r&&e.push(mp),e}),[up,n,dp,r,mp]);return(0,s.createElement)(cp.Z,{className:"block-editor-inserter__tabs",tabs:a,onSelect:o},t)},fp=(0,s.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:a,onSelect:i,showInserterHelpPanel:l,showMostUsedBlocks:c,__experimentalFilterValue:u="",shouldFocusBlock:d=!0}=e;const[m,p]=(0,s.useState)(u),[f,h]=(0,s.useState)(null),[g,v]=(0,s.useState)(null),[_,y,k]=Im({rootClientId:n,clientId:r,isAppender:o,insertionIndex:a,shouldFocusBlock:d}),{showPatterns:M,hasReusableBlocks:w}=(0,b.Z)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(tr);return{showPatterns:!!n(_).length,hasReusableBlocks:!(null===(t=r().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[_]),x=(0,s.useCallback)(((e,t,n)=>{y(e,t,n),i()}),[y,i]),C=(0,s.useCallback)(((e,t)=>{y(e,{patternName:t}),i()}),[y,i]),S=(0,s.useCallback)((e=>{k(!!e),h(e)}),[k,h]),T=(0,s.useCallback)((e=>{v(e)}),[v]),L=(0,s.useMemo)((()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__block-list"},(0,s.createElement)(km,{rootClientId:_,onInsert:x,onHover:S,showMostUsedBlocks:c})),l&&(0,s.createElement)("div",{className:"block-editor-inserter__tips"},(0,s.createElement)(zu.Z,{as:"h2"},(0,E.__)("A tip for using the block editor")),(0,s.createElement)(Pu,null)))),[_,x,S,m,c,l]),A=(0,s.useMemo)((()=>(0,s.createElement)(ep,{rootClientId:_,onInsert:C,onClickCategory:T,selectedCategory:g})),[_,C,T,g]),N=(0,s.useMemo)((()=>(0,s.createElement)(rp,{rootClientId:_,onInsert:x,onHover:S})),[_,x,S]),z=(0,s.useCallback)((e=>"blocks"===e.name?L:"patterns"===e.name?A:N),[L,A,N]),B=(0,s.useRef)();return(0,s.useImperativeHandle)(t,(()=>({focusSearch:()=>{B.current.focus()}}))),(0,s.createElement)("div",{className:"block-editor-inserter__menu"},(0,s.createElement)("div",{className:"block-editor-inserter__main-area"},(0,s.createElement)("div",{className:"block-editor-inserter__content"},(0,s.createElement)(Bu.Z,{className:"block-editor-inserter__search",onChange:e=>{f&&h(null),p(e)},value:m,label:(0,E.__)("Search for blocks and patterns"),placeholder:(0,E.__)("Search"),ref:B}),!!m&&(0,s.createElement)(sp,{filterValue:m,onSelect:i,onHover:S,rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:a,showBlockDirectory:!0,shouldFocusBlock:d}),!m&&(M||w)&&(0,s.createElement)(pp,{showPatterns:M,showReusableBlocks:w},z),!m&&!M&&!w&&L)),l&&f&&(0,s.createElement)(tm,{item:f}))}));function hp(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:a}=e;const[i,l]=(0,s.useState)(""),[c,u]=Im({onSelect:t,rootClientId:n,clientId:r,isAppender:o}),[m]=bm(c,u),[p]=xm(u,c),{setInserterIsOpened:f,insertionIndex:h}=(0,b.Z)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(tr),a=t(),i=n(r),l=o();return{setInserterIsOpened:a.__experimentalSetIsInserterOpened,insertionIndex:-1===i?l:i}}),[r]),g=p.length&&(!!i||a),v=g&&p.length>6||m.length>6;(0,s.useEffect)((()=>{f&&f(!1)}),[f]);let _=0;return g&&(_=a?4:2),(0,s.createElement)("div",{className:d()("block-editor-inserter__quick-inserter",{"has-search":v,"has-expand":f})},v&&(0,s.createElement)(Bu.Z,{className:"block-editor-inserter__search",value:i,onChange:e=>{l(e)},label:(0,E.__)("Search for blocks and patterns"),placeholder:(0,E.__)("Search")}),(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,s.createElement)(sp,{filterValue:i,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:_,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:a})),f&&(0,s.createElement)(Er.Z,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{f({rootClientId:n,insertionIndex:h,filterValue:i})},"aria-label":(0,E.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,E.__)("Browse all")))}const gp=e=>{let t,{onToggle:n,disabled:r,isOpen:o,blockTitle:a,hasSingleBlockType:i,toggleProps:c={},prioritizePatterns:u}=e;t=i?(0,E.sprintf)((0,E._x)("Add %s","directly add the only allowed block"),a):u?(0,E.__)("Add pattern"):(0,E._x)("Add block","Generic label for block inserter button");const{onClick:d,...m}=c;return(0,s.createElement)(Er.Z,(0,l.Z)({icon:Nu.Z,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&o,disabled:r},m))};class bp extends s.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:r,blockTitle:o,hasSingleBlockType:a,directInsertBlock:i,toggleProps:l,hasItems:s,renderToggle:c=gp,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!s,blockTitle:o,hasSingleBlockType:a,directInsertBlock:i,toggleProps:l,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:a,__experimentalIsQuick:i,prioritizePatterns:l}=this.props;return i?(0,s.createElement)(hp,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:l}):(0,s.createElement)(fp,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:a})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:a}=this.props;return t||n?this.renderToggle({onToggle:r}):(0,s.createElement)(Au.Z,{className:"block-editor-inserter",contentClassName:d()("block-editor-inserter__popover",{"is-quick":o}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,E.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:a})}}const vp=(0,qa.Z)([(0,Wa.Z)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{getBlockRootClientId:o,hasInserterItems:i,__experimentalGetAllowedBlocks:l,__experimentalGetDirectInsertBlock:s,getBlockIndex:c,getBlockCount:u,getSettings:d}=e(tr),{getBlockVariations:p}=e(a.store);r=r||o(n)||void 0;const f=l(r),h=s(r),g=c(n),b=u(),v=d(),_=1===(0,m.size)(f)&&0===(0,m.size)(p(f[0].name,"inserter"));let y=!1;return _&&(y=f[0]),{hasItems:i(r),hasSingleBlockType:_,blockTitle:y?y.title:"",allowedBlockType:y,directInsertBlock:h,rootClientId:r,prioritizePatterns:v.__experimentalPreferPatternsOnRoot&&!r&&g>0&&(g{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:o,isAppender:i,hasSingleBlockType:l,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u}=t;if(!l&&!c)return;const{insertBlock:d}=e(tr);let m;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:a}=r(tr);if(!e||!o&&!n)return{};const i={};let l={};if(o){const e=t(o),n=t(a(o));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(l=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(l=t.attributes)}}return e.forEach((e=>{l.hasOwnProperty(e)&&(i[e]=l[e])})),i}(c.attributesToCopy);m=(0,a.createBlock)(c.name,{...c.attributes||{},...e})}else m=(0,a.createBlock)(s.name);d(m,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:a,getBlockRootClientId:l}=r(tr);if(o)return e(o);const s=t();return!i&&s&&l(s)===n?e(s)+1:a(n).length}(),n),u&&u();const p=(0,E.sprintf)((0,E.__)("%s block added"),s.title);(0,Vt.D)(p)}}})),(0,Va.Z)((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(bp),_p=(0,qa.Z)((0,Wa.Z)(((e,t)=>{const{getBlockCount:n,getSettings:r,getTemplateLock:o}=e(tr),a=!n(t.rootClientId),{bodyPlaceholder:i}=r();return{showPrompt:a,isLocked:!!o(t.rootClientId),placeholder:i}})),(0,Fa.Z)(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(tr);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:a}=e;if(t)return null;const i=(0,Lu.S)(o)||(0,E.__)("Type / to choose a block");return(0,s.createElement)("div",{"data-root-client-id":a||"",className:d()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,s.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,E.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{_u.ENTER!==e.keyCode&&_u.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{r&&n()}},r?i:"\ufeff"),(0,s.createElement)(vp,{rootClientId:a,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));var yp=n(96643);function kp(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:a}=e;return(0,s.createElement)(vp,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:i,disabled:l,isOpen:c,blockTitle:u,hasSingleBlockType:m}=e;n=m?(0,E.sprintf)((0,E._x)("Add %s","directly add the only allowed block"),u):(0,E._x)("Add block","Generic label for block inserter button");const p=!m;let f=(0,s.createElement)(Er.Z,{ref:t,onFocus:o,tabIndex:a,className:d()(r,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":p?"true":void 0,"aria-expanded":p?c:void 0,disabled:l,label:n},!m&&(0,s.createElement)(zu.Z,{as:"span"},n),(0,s.createElement)($o.Z,{icon:Nu.Z}));return(p||m)&&(f=(0,s.createElement)(yp.Z,{text:n},f)),f},isAppender:!0})}const Mp=(0,s.forwardRef)(((e,t)=>((0,q.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),kp(e,t)))),wp=(0,s.forwardRef)(kp),Ep=(0,Wa.Z)(((e,t)=>{let{rootClientId:n}=t;const{canInsertBlockType:r,getTemplateLock:o,getSelectedBlockClientId:i}=e(tr);return{isLocked:!!o(n),canInsertDefaultBlock:r((0,a.getDefaultBlockName)(),n),selectedBlockClientId:i()}}))((function(e){let t,{rootClientId:n,canInsertDefaultBlock:r,isLocked:o,renderAppender:a,className:i,selectedBlockClientId:l,tagName:c="div"}=e;if(o||!1===a)return null;if(a)t=(0,s.createElement)(a,null);else{if(l!==n&&(n||l))return null;t=r?(0,s.createElement)(_p,{rootClientId:n}):(0,s.createElement)(wp,{rootClientId:n,className:"block-list-appender__toggle"})}return(0,s.createElement)(c,{tabIndex:-1,className:d()("block-list-appender wp-block",i),contentEditable:!1,"data-block":!0},t)}));var xp=n(72615);(0,s.createContext)();const Cp=function(e){let{previousClientId:t,nextClientId:n,children:r,__unstablePopoverSlot:o,__unstableContentRef:a,...i}=e;const{orientation:c,rootClientId:u,isVisible:m}=(0,b.Z)((e=>{var r;const{getBlockListSettings:o,getBlockRootClientId:a,isBlockVisible:i}=e(tr),l=a(t);return{orientation:(null===(r=o(l))||void 0===r?void 0:r.orientation)||"vertical",rootClientId:l,isVisible:i(t)&&i(n)}}),[t]),p=Dr(t),f=Dr(n),h="vertical"===c,g=(0,s.useMemo)((()=>{if(!p&&!f||!m)return{};const e=p?p.getBoundingClientRect():null,t=f?f.getBoundingClientRect():null;if(h)return{width:p?p.offsetWidth:f.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,E.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:p?p.offsetHeight:f.offsetHeight}}),[p,f,h]),v=(0,s.useCallback)((()=>{if(!p&&!f||!m)return{};const{ownerDocument:e}=p||f,t=p?p.getBoundingClientRect():null,n=f?f.getBoundingClientRect():null;return h?(0,E.isRTL)()?{top:t?t.bottom:n.top,left:t?t.right:n.right,right:t?t.left:n.left,bottom:n?n.top:t.bottom,height:0,width:0,ownerDocument:e}:{top:t?t.bottom:n.top,left:t?t.left:n.left,right:t?t.right:n.right,bottom:n?n.top:t.bottom,height:0,width:0,ownerDocument:e}:(0,E.isRTL)()?{top:t?t.top:n.top,left:t?t.left:n.right,right:n?n.right:t.left,bottom:t?t.bottom:n.bottom,height:0,width:0,ownerDocument:e}:{top:t?t.top:n.top,left:t?t.right:n.left,right:n?n.left:t.right,bottom:t?t.bottom:n.bottom,height:0,width:0,ownerDocument:e}}),[p,f]),_=oo(a);return p&&f&&m?(0,s.createElement)(ro.Z,(0,l.Z)({ref:_,animate:!1,getAnchorRect:v,focusOnMount:!1,__unstableSlotName:o||null,key:n+"--"+u},i,{className:d()("block-editor-block-popover",i.className),__unstableForcePosition:!0}),(0,s.createElement)("div",{style:g},r)):null},Sp=(0,s.createContext)();function Tp(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r,hideInsertionPoint:o}=(0,Yr.Z)(tr),a=(0,s.useContext)(Sp),i=(0,s.useRef)(),{orientation:l,previousClientId:c,nextClientId:u,rootClientId:m,isInserterShown:p}=(0,b.Z)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:a,getPreviousBlockClientId:i,getNextBlockClientId:l}=e(tr),s=o(),c=n(s.rootClientId);if(!c.length)return{};let u=c[s.index-1],d=c[s.index];for(;a(u);)u=i(u);for(;a(d);)d=l(d);return{previousClientId:u,nextClientId:d,orientation:(null===(t=r(s.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:s.rootClientId,isInserterShown:null==s?void 0:s.__unstableWithInserter}}),[]),f="vertical"===l,h=(0,Kc.Z)(),g={start:{...f?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{...f?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:p?.4:0}},hover:{...f?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},v={start:{scale:h?1:0},rest:{scale:1,transition:{delay:.2}}},_=d()("block-editor-block-list__insertion-point","is-"+l);return(0,s.createElement)(Cp,{previousClientId:c,nextClientId:u,__unstablePopoverSlot:t,__unstableContentRef:n},(0,s.createElement)(xp.E.div,{layout:!h,initial:h?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:i,tabIndex:-1,onClick:function(e){e.target===i.current&&u&&r(u,-1)},onFocus:function(e){e.target!==i.current&&(a.current=!0)},className:d()(_,{"is-with-inserter":p}),onHoverEnd:function(e){e.target!==i.current||a.current||o()}},(0,s.createElement)(xp.E.div,{variants:g,className:"block-editor-block-list__insertion-point-indicator"}),p&&(0,s.createElement)(xp.E.div,{variants:v,className:d()("block-editor-block-list__insertion-point-inserter")},(0,s.createElement)(vp,{position:"bottom center",clientId:u,rootClientId:m,__experimentalIsQuick:!0,onToggle:e=>{a.current=e},onSelectOrClose:()=>{a.current=!1}}))))}function Lp(e){let{children:t,...n}=e;const r=(0,b.Z)((e=>e(tr).isBlockInsertionPointVisible()),[]);return(0,s.createElement)(Sp.Provider,{value:(0,s.useRef)(!1)},r&&(0,s.createElement)(Tp,n),t)}function Ap(){const e=(0,s.useContext)(Sp),t=(0,b.Z)((e=>e(tr).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:a,isMultiSelecting:i,getSelectedBlockClientIds:l,getTemplateLock:c}=(0,b.Z)(tr),{showInsertionPoint:u,hideInsertionPoint:d}=(0,Yr.Z)(tr);return(0,Ar.Z)((r=>{if(!t)return r.addEventListener("mousemove",s),()=>{r.removeEventListener("mousemove",s)};function s(t){var r,s;if(e.current)return;if(i())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(a()&&d());let m;if(t.target.classList.contains("is-root-container")||(m=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),c(m))return;const p=(null===(r=n(m))||void 0===r?void 0:r.orientation)||"vertical",f=t.target.getBoundingClientRect(),h=t.clientY-f.top,g=t.clientX-f.left;let b=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===p&&e.offsetTop>h||e.classList.contains("wp-block")&&"horizontal"===p&&e.offsetLeft>g));if(!b)return;if(!b.id&&(b=b.firstElementChild,!b))return;if(null===(s=b.parentElement)||void 0===s?void 0:s.closest(".block-editor-block-content-overlay"))return;const v=b.id.slice("block-".length);if(!v)return;if(l().includes(v))return;const _=b.getBoundingClientRect();if("horizontal"===p&&(t.clientY>_.bottom||t.clientY<_.top)||"vertical"===p&&(t.clientX>_.right||t.clientX<_.left))return void(a()&&d());const y=o(v);0!==y?u(m,y,{__unstableWithInserter:!0}):a()&&d()}}),[e,n,r,o,a,i,u,d,l])}const Np="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,zp="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Bp(e){return(0,b.Z)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(tr),{getBlockType:o,getActiveBlockVariation:i}=t(a.store),l=n(e),s=o(l);if(!s)return null;const c=r(e),u=i(l,c),d={title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description,anchor:null==c?void 0:c.anchor}:d}),[e])}function Op(e,t){const{attributes:n,name:r,reusableBlockTitle:o}=(0,b.Z)((t=>{if(!e)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:o}=t(tr),i=n(e);if(!i)return{};const l=(0,a.isReusableBlock)((0,a.getBlockType)(i));return{attributes:r(e),name:i,reusableBlockTitle:l&&o(r(e).ref)}}),[e]),i=Bp(e);if(!r||!i)return null;const l=(0,a.getBlockType)(r),s=l?(0,a.__experimentalGetBlockLabel)(l,n):null,c=o||s,u=c&&c!==l.title?c:i.title;return t&&t>0?(0,m.truncate)(u,{length:t}):u}function Dp(e){let{clientId:t,maximumLength:n}=e;return Op(t,n)}const Ip=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:o,onDragEnd:i}=e;const{srcRootClientId:l,isDraggable:c,icon:u}=(0,b.Z)((e=>{var t;const{canMoveBlocks:r,getBlockRootClientId:o,getBlockName:i}=e(tr),l=o(n[0]),s=i(n[0]);return{srcRootClientId:l,isDraggable:r(n,l),icon:null===(t=(0,a.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),d=(0,s.useRef)(!1),[m,p,f]=function(){const e=(0,s.useRef)(null),t=(0,s.useRef)(null),n=(0,s.useRef)(null),r=(0,s.useRef)(null);return(0,s.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,s.useCallback)((o=>{e.current=o.clientY,n.current=(0,Jc.Z)(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,s.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,a=e.current-n.current.offsetTop,i=r.clientY-n.current.offsetTop;if(r.clientY>a){const e=Math.max(o-a-50,0),n=Math.max(i-a-50,0)/e;t.current=25*n}else if(r.clientY{e.current=null,n.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:g}=(0,Yr.Z)(tr);if((0,s.useEffect)((()=>()=>{d.current&&g()}),[]),!c)return t({isDraggable:!1});const v={type:"block",srcClientIds:n,srcRootClientId:l};return(0,s.createElement)(im.Z,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:v,onDragStart:e=>{h(n),d.current=!0,m(e),o&&o()},onDragOver:p,onDragEnd:()=>{g(),d.current=!1,f(),i&&i()},__experimentalDragComponent:(0,s.createElement)(sm,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))},Pp=function(e){let{clientId:t,rootClientId:n}=e;const r=Bp(t),o=(0,b.Z)((e=>{var r;const{getBlock:o,getBlockIndex:a,hasBlockMovingClientId:i,getBlockListSettings:l}=e(tr),s=a(t),{name:c,attributes:u}=o(t);return{index:s,name:c,attributes:u,blockMovingMode:i(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),{index:i,name:c,attributes:u,blockMovingMode:m,orientation:p}=o,{setNavigationMode:f,removeBlock:h}=(0,Yr.Z)(tr),g=(0,s.useRef)(),v=(0,a.getBlockType)(c),_=(0,a.__experimentalGetAccessibleBlockLabel)(v,u,i+1,p);(0,s.useEffect)((()=>{g.current.focus(),(0,Vt.D)(_)}),[_]);const y=Dr(t),{hasBlockMovingClientId:k,getBlockIndex:M,getBlockRootClientId:w,getClientIdsOfDescendants:x,getSelectedBlockClientId:C,getMultiSelectedBlocksEndClientId:S,getPreviousBlockClientId:T,getNextBlockClientId:L,isNavigationMode:A}=(0,b.Z)(tr),{selectBlock:N,clearSelectedBlock:z,setBlockMovingClientId:B,moveBlockToPosition:O}=(0,Yr.Z)(tr),D=d()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!m}),I=(0,E.__)("Drag");return(0,s.createElement)("div",{className:D},(0,s.createElement)(Mr.Z,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,s.createElement)(wr.Z,null,(0,s.createElement)(ju,{icon:null==r?void 0:r.icon,showColors:!0})),(0,s.createElement)(wr.Z,null,(0,s.createElement)(Ip,{clientIds:[t]},(e=>(0,s.createElement)(Er.Z,(0,l.Z)({icon:lm.Z,className:"block-selection-button_drag-handle","aria-hidden":"true",label:I,tabIndex:"-1"},e))))),(0,s.createElement)(wr.Z,null,(0,s.createElement)(Er.Z,{ref:g,onClick:()=>f(!1),onKeyDown:function(e){const{keyCode:n}=e,r=n===_u.UP,o=n===_u.DOWN,a=n===_u.LEFT,i=n===_u.RIGHT,l=n===_u.TAB,s=n===_u.ESCAPE,c=n===_u.ENTER,u=n===_u.SPACE,d=e.shiftKey;if(n===_u.BACKSPACE||n===_u.DELETE)return h(t),void e.preventDefault();const m=C(),p=S(),f=T(p||m),g=L(p||m),b=l&&d||r,v=l&&!d||o,_=a,E=i;let D;if(b)D=f;else if(v)D=g;else if(_){var I;D=null!==(I=w(m))&&void 0!==I?I:m}else if(E){var P;D=null!==(P=x([m])[0])&&void 0!==P?P:m}const R=k();if(s&&A()&&(z(),e.preventDefault()),s&&R&&!e.defaultPrevented&&(B(null),e.preventDefault()),(c||u)&&R){const e=w(R),t=w(m),n=M(R);let r=M(m);n{const t=!nu.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||(0,q.default)("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,s.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(i);return function(e,t,n,r,o){const[a]=(0,s.useState)(t),[i]=(0,s.useState)(r),l=(0,s.useCallback)((()=>{!function(e){const[t]=nu.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,ud.bx)("core/block-editor/focus-toolbar",l),(0,s.useEffect)((()=>{a&&l()}),[n,a,l]),(0,s.useEffect)((()=>{let t=0;return i&&!a&&(t=window.requestAnimationFrame((()=>{const t=jp(e.current),n=i||0;var r;t[n]&&(r=e.current).contains(r.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=jp(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[i,a])}(i,n,c,r,o),c?(0,s.createElement)(Rp.Z,(0,l.Z)({label:a["aria-label"],ref:i},a),t):(0,s.createElement)(Zp.Z,(0,l.Z)({orientation:"horizontal",role:"toolbar",ref:i},a),t)};var Wp=n(4969),Fp=n(55024),qp=n(14310),Yp=n(96015),Vp=n(83904);const Up=(e,t)=>"up"===e?"horizontal"===t?(0,E.isRTL)()?Fp.Z:qp.Z:Yp.Z:"down"===e?"horizontal"===t?(0,E.isRTL)()?qp.Z:Fp.Z:Vp.Z:null,$p=(e,t)=>"up"===e?"horizontal"===t?(0,E.isRTL)()?(0,E.__)("Move right"):(0,E.__)("Move left"):(0,E.__)("Move up"):"down"===e?"horizontal"===t?(0,E.isRTL)()?(0,E.__)("Move left"):(0,E.__)("Move right"):(0,E.__)("Move down"):null,Xp=(0,s.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:o,...i}=e;const c=(0,Aa.Z)(Xp),u=(0,m.castArray)(n).length,{blockType:p,isDisabled:f,rootClientId:h,isFirst:g,isLast:v,firstIndex:_,orientation:y="vertical"}=(0,b.Z)((e=>{const{getBlockIndex:t,getBlockRootClientId:i,getBlockOrder:l,getBlock:s,getBlockListSettings:c}=e(tr),u=(0,m.castArray)(n),d=(0,m.first)(u),p=i(d),f=t(d),h=t((0,m.last)(u)),g=l(p),b=s(d),v=0===f,_=h===g.length-1,{orientation:y}=c(p)||{};return{blockType:b?(0,a.getBlockType)(b.name):null,isDisabled:"up"===r?v:_,rootClientId:p,firstIndex:f,isFirst:v,isLast:_,orientation:o||y}}),[n,r]),{moveBlocksDown:k,moveBlocksUp:M}=(0,Yr.Z)(tr),w="up"===r?M:k,x=`block-editor-block-mover-button__description-${c}`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Er.Z,(0,l.Z)({ref:t,className:d()("block-editor-block-mover-button",`is-${r}-button`),icon:Up(r,y),label:$p(r,y),"aria-describedby":x},i,{onClick:f?null:e=>{w(n,h),i.onClick&&i.onClick(e)},disabled:f,__experimentalIsFocusable:!0})),(0,s.createElement)(zu.Z,{id:x},function(e,t,n,r,o,a,i){const l=n+1,s=e=>"up"===e?"horizontal"===i?(0,E.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?(0,E.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,r,o){const a=t+1;return o<0&&n?(0,E.__)("Blocks cannot be moved up as they are already at the top"):o>0&&r?(0,E.__)("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?(0,E.sprintf)((0,E._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,a):o>0&&!r?(0,E.sprintf)((0,E._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,a):void 0}(e,n,r,o,a);if(r&&o)return(0,E.sprintf)((0,E.__)("Block %s is the only block, and cannot be moved"),t);if(a>0&&!o){const e=s("down");if("down"===e)return(0,E.sprintf)((0,E.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===e)return(0,E.sprintf)((0,E.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===e)return(0,E.sprintf)((0,E.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(a>0&&o){const e=s("down");if("down"===e)return(0,E.sprintf)((0,E.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,E.sprintf)((0,E.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,E.sprintf)((0,E.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(a<0&&!r){const e=s("up");if("up"===e)return(0,E.sprintf)((0,E.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===e)return(0,E.sprintf)((0,E.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===e)return(0,E.sprintf)((0,E.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(a<0&&r){const e=s("up");if("up"===e)return(0,E.sprintf)((0,E.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,E.sprintf)((0,E.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,E.sprintf)((0,E.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(u,p&&p.title,_,g,v,"up"===r?-1:1,y)))})),Gp=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(Xp,(0,l.Z)({direction:"up",ref:t},e)))),Kp=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(Xp,(0,l.Z)({direction:"down",ref:t},e)))),Jp=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:r,rootClientId:o,isFirst:a,isLast:i,orientation:c}=(0,b.Z)((e=>{var n;const{getBlockIndex:r,getBlockListSettings:o,canMoveBlocks:a,getBlockOrder:i,getBlockRootClientId:l}=e(tr),s=(0,m.castArray)(t),c=(0,m.first)(s),u=l((0,m.first)(s)),d=r(c),p=r((0,m.last)(s)),f=i(u);return{canMove:a(t,u),rootClientId:u,isFirst:0===d,isLast:p===f.length-1,orientation:null===(n=o(u))||void 0===n?void 0:n.orientation}}),[t]);if(!r||a&&i&&!o)return null;const u=(0,E.__)("Drag");return(0,s.createElement)(g.Z,{className:d()("block-editor-block-mover",{"is-horizontal":"horizontal"===c})},!n&&(0,s.createElement)(Ip,{clientIds:t},(e=>(0,s.createElement)(Er.Z,(0,l.Z)({icon:lm.Z,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:u,tabIndex:"-1"},e)))),(0,s.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,s.createElement)(Wp.Z,null,(e=>(0,s.createElement)(Gp,(0,l.Z)({clientIds:t},e)))),(0,s.createElement)(Wp.Z,null,(e=>(0,s.createElement)(Kp,(0,l.Z)({clientIds:t},e))))))};var Qp=n(10244);const{clearTimeout:ef,setTimeout:tf}=window,nf=200;function rf(e){let{ref:t,isFocused:n,debounceTimeout:r=nf,onChange:o=m.noop}=e;const[a,i]=(0,s.useState)(!1),l=(0,s.useRef)(),c=e=>{null!=t&&t.current&&i(e),o(e)},u=()=>{const e=l.current;e&&ef&&ef(e)};return(0,s.useEffect)((()=>()=>{c(!1),u()}),[]),{showMovers:a,debouncedShowMovers:e=>{e&&e.stopPropagation(),u(),a||c(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),u(),l.current=tf((()=>{(()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e})()&&c(!1)}),r)}}}function of(e){let{ref:t,debounceTimeout:n=nf,onChange:r=m.noop}=e;const[o,a]=(0,s.useState)(!1),{showMovers:i,debouncedShowMovers:l,debouncedHideMovers:c}=rf({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),u=(0,s.useRef)(!1),d=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,s.useEffect)((()=>{const e=t.current,n=()=>{d()&&(a(!0),l())},r=()=>{d()||(a(!1),c())};return e&&!u.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),u.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,u,a,l,c]),{showMovers:i,gestures:{onMouseMove:l,onMouseLeave:c}}}function af(){const{selectBlock:e,toggleBlockHighlight:t}=(0,Yr.Z)(tr),{firstParentClientId:n,shouldHide:r,hasReducedUI:o}=(0,b.Z)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:o}=e(tr),{hasBlockSupport:i}=e(a.store),l=n(r()),s=l[l.length-1],c=t(s),u=(0,a.getBlockType)(c),d=o();return{firstParentClientId:s,shouldHide:!i(u,"__experimentalParentSelector",!0),hasReducedUI:d.hasReducedUI}}),[]),i=Bp(n),c=(0,s.useRef)(),{gestures:u}=of({ref:c,onChange(e){e&&o||t(n,e)}});return r||void 0===n?null:(0,s.createElement)("div",(0,l.Z)({className:"block-editor-block-parent-selector",key:n,ref:c},u),(0,s.createElement)(Qp.Z,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,E.sprintf)((0,E.__)("Select %s"),i.title),showTooltip:!0,icon:(0,s.createElement)(ju,{icon:i.icon})}))}var lf=n(3230);function sf(e){let{blocks:t}=e;return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(ro.Z,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,E.__)("Preview")),(0,s.createElement)(Qd,{viewportWidth:500,blocks:t})))))}const cf=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:o}=e;const[i,l]=(0,s.useState)();return(0,s.createElement)(fr.Z,{label:(0,E.__)("Transform to"),className:t},i&&(0,s.createElement)(sf,{blocks:(0,a.switchToBlockType)(o,i)}),n.map((e=>{const{name:t,icon:n,title:o,isDisabled:i}=e;return(0,s.createElement)(hr.Z,{key:t,className:(0,a.getBlockMenuDefaultClassName)(t),onClick:e=>{e.preventDefault(),r(t)},disabled:i,onMouseLeave:()=>l(null),onMouseEnter:()=>l(t)},(0,s.createElement)(ju,{icon:n,showColors:!0}),o)})))};var uf=n(520),df=n(28184);class mf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.value=e,this._currentValue,this._valueAsArray}entries(){return this._valueAsArray.entries(...arguments)}forEach(){return this._valueAsArray.forEach(...arguments)}keys(){return this._valueAsArray.keys(...arguments)}values(){return this._valueAsArray.values(...arguments)}get value(){return this._currentValue}set value(e){e=String(e),this._valueAsArray=(0,m.uniq)((0,m.compact)(e.split(/\s+/g))),this._currentValue=this._valueAsArray.join(" ")}get length(){return this._valueAsArray.length}toString(){return this.value}*[Symbol.iterator](){return yield*this._valueAsArray}item(e){return this._valueAsArray[e]}contains(e){return-1!==this._valueAsArray.indexOf(e)}add(){for(var e=arguments.length,t=new Array(e),n=0;n{const{getBlock:n}=e(tr),r=n(t);if(!r)return{};const o=(0,a.getBlockType)(r.name),{getBlockStyles:i}=e(a.store);return{block:r,blockType:o,styles:i(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:c}=(0,Yr.Z)(tr),u=function(e){return e&&0!==e.length?ff(e)?e:[{name:"default",label:(0,E._x)("Default","block style"),isDefault:!0},...e]:[]}(r),d=function(e,t){for(const n of new mf(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,m.find)(e,{name:t});if(r)return r}return(0,m.find)(e,"isDefault")}(u,l),p=function(e,t){return(0,s.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?(0,a.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,a.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(o,i);return{onSelect:e=>{const r=pf(l,d,e);c(t,{className:r}),n()},stylesToRender:u,activeStyle:d,genericPreviewBlock:p,className:l}}function gf(e){let{clientId:t,onSwitch:n=m.noop}=e;const{onSelect:r,stylesToRender:o,activeStyle:a}=hf({clientId:t,onSwitch:n});return o&&0!==o.length?(0,s.createElement)(s.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,s.createElement)(hr.Z,{key:e.name,icon:a.name===e.name?df.Z:null,onClick:()=>r(e)},(0,s.createElement)(uf.Z,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function bf(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:r}=t;return(0,s.createElement)(fr.Z,{label:(0,E.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,s.createElement)(gf,{clientId:r,onSwitch:n}))}const vf=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:r,name:o,innerBlocks:a=[]}=e;if(!n.has(r)){if(o===t)return e;for(const e of a){const r=vf(e,t,n);if(r)return r}}},_f=(e,t)=>{const n=((e,t)=>{const n=(0,a.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};function yf(e){let{patterns:t,onSelect:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(ro.Z,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,E.__)("Preview")),(0,s.createElement)(kf,{patterns:t,onSelect:n})))))}function kf(e){let{patterns:t,onSelect:n}=e;const r=(0,vm.u)();return(0,s.createElement)(Cm.b,(0,l.Z)({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,E.__)("Patterns list")}),t.map((e=>(0,s.createElement)(Mf,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function Mf(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",a=(0,Aa.Z)(Mf,`${o}-list__item-description`);return(0,s.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?a:void 0},(0,s.createElement)(rm.A,(0,l.Z)({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,s.createElement)(Qd,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,s.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,s.createElement)(zu.Z,{id:a},t.description))}const wf=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,s.useState)(!1),l=((e,t)=>(0,s.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>(0,a.cloneBlock)(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=vf(o,t.name,r);if(n){e=!0,r.add(n.clientId),_f(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]))(n,t);return l.length?(0,s.createElement)(fr.Z,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,s.createElement)(yf,{patterns:l,onSelect:r}),(0,s.createElement)(hr.Z,{onClick:e=>{e.preventDefault(),i(!o)},icon:Fp.Z},(0,E.__)("Patterns"))):null},Ef=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r}=(0,Yr.Z)(tr),o=Bp(n[0].clientId),{possibleBlockTransformations:i,canRemove:l,hasBlockStyles:c,icon:u,blockTitle:d,patterns:p}=(0,b.Z)((e=>{var r;const{getBlockRootClientId:i,getBlockTransformItems:l,__experimentalGetPatternTransformItems:s}=e(tr),{getBlockStyles:c,getBlockType:u}=e(a.store),{canRemoveBlocks:d}=e(tr),p=i((0,m.castArray)(t)[0]),[{name:f}]=n,h=1===n.length,g=h&&c(f);let b;var v;h?b=null==o?void 0:o.icon:b=1===(0,m.uniq)(n.map((e=>{let{name:t}=e;return t}))).length?null===(v=u(f))||void 0===v?void 0:v.icon:lf.Z;return{possibleBlockTransformations:l(n,p),canRemove:d(t,p),hasBlockStyles:!(null==g||!g.length),icon:b,blockTitle:null===(r=u(f))||void 0===r?void 0:r.title,patterns:s(n,p)}}),[t,n,null==o?void 0:o.icon]),f=1===n.length&&(0,a.isReusableBlock)(n[0]),h=1===n.length&&(0,a.isTemplatePart)(n[0]),v=!!i.length&&l,_=!(null==p||!p.length)&&l;if(!c&&!v)return(0,s.createElement)(g.Z,null,(0,s.createElement)(Qp.Z,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:d,icon:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ju,{icon:u,showColors:!0}),(f||h)&&(0,s.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,s.createElement)(Dp,{clientId:t,maximumLength:35})))}));const y=d,k=1===n.length?(0,E.sprintf)((0,E.__)("%s: Change block type or style"),d):(0,E.sprintf)((0,E._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),M=c||v||_;return(0,s.createElement)(g.Z,null,(0,s.createElement)(Wp.Z,null,(e=>(0,s.createElement)(ti.Z,{className:"block-editor-block-switcher",label:y,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ju,{icon:u,className:"block-editor-block-switcher__toggle",showColors:!0}),(f||h)&&(0,s.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,s.createElement)(Dp,{clientId:t,maximumLength:35}))),toggleProps:{describedBy:k,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:o}=e;return M&&(0,s.createElement)("div",{className:"block-editor-block-switcher__container"},_&&(0,s.createElement)(wf,{blocks:n,patterns:p,onSelect:e=>{(e=>{r(t,e)})(e),o()}}),v&&(0,s.createElement)(cf,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:e=>{(e=>{r(t,(0,a.switchToBlockType)(n,e))})(e),o()}}),c&&(0,s.createElement)(bf,{hoveredBlock:n[0],onSwitch:o}))})))))},xf=e=>{let{clientIds:t}=e;const n=(0,b.Z)((e=>e(tr).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,s.createElement)(Ef,{clientIds:t,blocks:n})},{Fill:Cf,Slot:Sf}=(0,v.up)("__unstableBlockToolbarLastItem");Cf.Slot=Sf;const Tf=Cf;var Lf=n(83279),Af=n(28998),Nf=n(32592),zf=n(79697),Bf=n(18452),Of=n(24395);function Df(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;return 1!==(null===(n=t.match(e))||void 0===n?void 0:n.length)}return!1}function If(){const{getBlockName:e}=(0,b.Z)(tr),{getBlockType:t}=(0,b.Z)(a.store),{createSuccessNotice:n}=(0,Yr.Z)(Em.store);return(0,s.useCallback)(((r,o)=>{let a="";if(1===o.length){var i;const n=o[0],l=null===(i=t(e(n)))||void 0===i?void 0:i.title;a="copy"===r?(0,E.sprintf)((0,E.__)('Copied "%s" to clipboard.'),l):(0,E.sprintf)((0,E.__)('Moved "%s" to clipboard.'),l)}else a="copy"===r?(0,E.sprintf)((0,E._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):(0,E.sprintf)((0,E._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(a,{type:"snackbar"})}),[])}function Pf(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:r,__unstableIsFullySelected:o,__unstableIsSelectionCollapsed:i,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:s}=(0,b.Z)(tr),{flashBlock:c,removeBlocks:u,replaceBlocks:d,__unstableDeleteSelection:m,__unstableExpandSelection:p}=(0,Yr.Z)(tr),f=If();return(0,Ar.Z)((h=>{function g(g){const b=t();if(0===b.length)return;if(!n()){const{target:e}=g,{ownerDocument:t}=e;if("copy"===g.type||"cut"===g.type?(0,Nf.Z)(t):(0,zf.Z)(t))return}if(!h.contains(g.target.ownerDocument.activeElement))return;const v=g.defaultPrevented;g.preventDefault();const _=l(),y=i()||o(),k=!y&&!_;if("copy"===g.type||"cut"===g.type)if(1===b.length&&c(b[0]),k)p();else{let t;if(f(g.type,b),y)t=e(b);else{const[n,r]=s();t=[n,...e(b.slice(1,b.length-1)),r]}const n=(0,a.serialize)(t);g.clipboardData.setData("text/plain",n),g.clipboardData.setData("text/html",n)}if("cut"===g.type)y&&!k?u(b):m();else if("paste"===g.type){if(v)return;const{__experimentalCanUserUseUnfilteredHTML:e}=r(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}const o=(0,Of.f)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return o.length&&!Df(o,r)&&(r=o.map((e=>``)).join(""),n=""),{html:r,plainText:n}}(g),o=(0,a.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});d(b,o,o.length-1,-1)}}return h.ownerDocument.addEventListener("copy",g),h.ownerDocument.addEventListener("cut",g),h.ownerDocument.addEventListener("paste",g),()=>{h.ownerDocument.removeEventListener("copy",g),h.ownerDocument.removeEventListener("cut",g),h.ownerDocument.removeEventListener("paste",g)}}),[])}const Rf=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:Pf()},t)};function Zf(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:o,getBlockRootClientId:i,getBlocksByClientId:l,canMoveBlocks:s,canRemoveBlocks:c}=(0,b.Z)(tr),{getDefaultBlockName:u,getGroupingBlockName:d}=(0,b.Z)(a.store),p=l(t),f=i(t[0]),h=(0,m.every)(p,(e=>!!e&&(0,a.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,f))),g=o(u(),f),v=s(t,f),_=c(t,f),{removeBlocks:y,replaceBlocks:k,duplicateBlocks:M,insertAfterBlock:w,insertBeforeBlock:E,flashBlock:x,setBlockMovingClientId:C,setNavigationMode:S,selectBlock:T}=(0,Yr.Z)(tr),L=If();return n({canDuplicate:h,canInsertDefaultBlock:g,canMove:v,canRemove:_,rootClientId:f,blocks:p,onDuplicate:()=>M(t,r),onRemove:()=>y(t,r),onInsertBefore(){E((0,m.first)((0,m.castArray)(t)))},onInsertAfter(){w((0,m.last)((0,m.castArray)(t)))},onMoveTo(){S(!0),T(t[0]),C(t[0])},onGroup(){if(!p.length)return;const e=d(),n=(0,a.switchToBlockType)(p,e);n&&k(t,n)},onUngroup(){if(!p.length)return;const e=p[0].innerBlocks;e.length&&k(t,e)},onCopy(){const e=p.map((e=>{let{clientId:t}=e;return t}));1===p.length&&x(e[0]),L("copy",e)}})}const jf=(0,qa.Z)([(0,Wa.Z)(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:o,getSettings:i}=e(tr),l=r(n),s=i().codeEditingEnabled;return{mode:o(n),blockType:l?(0,a.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),(0,Fa.Z)(((e,t)=>{let{onToggle:n=m.noop,clientId:r}=t;return{onToggleMode(){e(tr).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:o=!1,isCodeEditingEnabled:i=!0}=e;if(!(0,a.hasBlockSupport)(t,"html",!0)||!i)return null;const l="visual"===n?(0,E.__)("Edit as HTML"):(0,E.__)("Edit visually");return(0,s.createElement)(hr.Z,{onClick:r},!o&&l)})),Hf=(0,qa.Z)((0,Wa.Z)(((e,t)=>{let{clientId:n}=t;const r=e(tr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),(0,Fa.Z)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(tr).replaceBlocks(n.clientId,(0,a.rawHandler)({HTML:(0,a.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=(0,E.__)("Convert to Blocks");return(0,s.createElement)(hr.Z,{onClick:n},!r&&o)})),{Fill:Wf,Slot:Ff}=(0,v.up)("__unstableBlockSettingsMenuFirstItem");Wf.Slot=Ff;const qf=Wf;function Yf(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:o,groupingBlockName:i,onClose:l=(()=>{})}=e;const{replaceBlocks:c}=(0,Yr.Z)(tr);return n||r?(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(hr.Z,{onClick:()=>{(()=>{const e=(0,a.switchToBlockType)(o,i);e&&c(t,e)})(),l()}},(0,E._x)("Group","verb")),r&&(0,s.createElement)(hr.Z,{onClick:()=>{(()=>{const e=o[0].innerBlocks;e.length&&c(t,e)})(),l()}},(0,E._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Vf(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}=(0,b.Z)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:o,getSelectedBlockClientIds:i}=e(tr),{getGroupingBlockName:l}=e(a.store),s=i(),c=l(),u=o(c,null!=s&&s.length?n(s[0]):void 0),d=r(s),m=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&d.length,isUngroupable:m&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}}var Uf=n(99652),$f=n(61);function Xf(e){return(0,b.Z)((t=>{const{canEditBlock:n,canMoveBlock:r,canRemoveBlock:o,canLockBlockType:a,getBlockName:i,getBlockRootClientId:l}=t(tr),s=l(e),c=n(e),u=r(e,s),d=o(e,s);return{canEdit:c,canMove:u,canRemove:d,canLock:a(i(e)),isLocked:!c||!u||!d}}),[e])}var Gf=n(10605);function Kf(e){let{clientId:t,onClose:n}=e;const[r,o]=(0,s.useState)({move:!1,remove:!1}),{canEdit:i,canMove:l,canRemove:c}=Xf(t),{isReusable:u}=(0,b.Z)((e=>{const{getBlockName:n}=e(tr),r=n(t);return{isReusable:(0,a.isReusableBlock)((0,a.getBlockType)(r))}}),[t]),{updateBlockAttributes:d}=(0,Yr.Z)(tr),m=Bp(t),p=(0,Aa.Z)(Kf,"block-editor-block-lock-modal__options-title");(0,s.useEffect)((()=>{o({move:!l,remove:!c,...u?{edit:!i}:{}})}),[i,l,c,u]);const f=Object.values(r).every(Boolean),h=Object.values(r).some(Boolean)&&!f;return(0,s.createElement)(ei.Z,{title:(0,E.sprintf)((0,E.__)("Lock %s"),m.title),overlayClassName:"block-editor-block-lock-modal",closeLabel:(0,E.__)("Close"),onRequestClose:n},(0,s.createElement)("form",{onSubmit:e=>{e.preventDefault(),d([t],{lock:r}),n()}},(0,s.createElement)("p",null,(0,E.__)("Choose specific attributes to restrict or lock all available options.")),(0,s.createElement)("div",{role:"group","aria-labelledby":p,className:"block-editor-block-lock-modal__options"},(0,s.createElement)(Gf.C,{className:"block-editor-block-lock-modal__options-title",label:(0,s.createElement)("span",{id:p},(0,E.__)("Lock all")),checked:f,indeterminate:h,onChange:e=>o({move:e,remove:e,...u?{edit:e}:{}})}),(0,s.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},u&&(0,s.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,s.createElement)(Gf.C,{label:(0,s.createElement)(s.Fragment,null,(0,E.__)("Restrict editing"),(0,s.createElement)(Ru.Z,{icon:r.edit?$f.Z:Uf.Z})),checked:!!r.edit,onChange:e=>o((t=>({...t,edit:e})))})),(0,s.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,s.createElement)(Gf.C,{label:(0,s.createElement)(s.Fragment,null,(0,E.__)("Disable movement"),(0,s.createElement)(Ru.Z,{icon:r.move?$f.Z:Uf.Z})),checked:r.move,onChange:e=>o((t=>({...t,move:e})))})),(0,s.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,s.createElement)(Gf.C,{label:(0,s.createElement)(s.Fragment,null,(0,E.__)("Prevent removal"),(0,s.createElement)(Ru.Z,{icon:r.remove?$f.Z:Uf.Z})),checked:r.remove,onChange:e=>o((t=>({...t,remove:e})))})))),(0,s.createElement)(Mr.Z,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,s.createElement)(wr.Z,null,(0,s.createElement)(Er.Z,{variant:"tertiary",onClick:n},(0,E.__)("Cancel"))),(0,s.createElement)(wr.Z,null,(0,s.createElement)(Er.Z,{variant:"primary",type:"submit"},(0,E.__)("Apply"))))))}function Jf(e){let{clientId:t}=e;const{canLock:n,isLocked:r}=Xf(t),[o,a]=(0,s.useReducer)((e=>!e),!1);if(!n)return null;const i=r?(0,E.__)("Unlock"):(0,E.__)("Lock");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(hr.Z,{icon:r?Uf.Z:$f.Z,onClick:a},i),o&&(0,s.createElement)(Kf,{clientId:t,onClose:a}))}const{Fill:Qf,Slot:eh}=(0,v.up)("BlockSettingsMenuControls");function th(e){let{...t}=e;return(0,s.createElement)(f.Z,{document},(0,s.createElement)(Qf,t))}th.Slot=e=>{let{fillProps:t,clientIds:n=null}=e;const{selectedBlocks:r,selectedClientIds:o,canRemove:a}=(0,b.Z)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:r,canRemoveBlocks:o}=e(tr),a=null!==n?n:r();return{selectedBlocks:(0,m.map)((0,m.compact)(t(a)),(e=>e.name)),selectedClientIds:a,canRemove:o(a)}}),[n]),i=1===o.length,c=Vf(),{isGroupable:u,isUngroupable:d}=c,p=(u||d)&&a;return(0,s.createElement)(eh,{fillProps:{...t,selectedBlocks:r,selectedClientIds:o}},(e=>!(null!=e&&e.length)>0&&!p&&!i?null:(0,s.createElement)(fr.Z,null,i&&(0,s.createElement)(Jf,{clientId:o[0]}),e,p&&(0,s.createElement)(Yf,(0,l.Z)({},c,{onClose:null==t?void 0:t.onClose})))))};const nh=th,rh={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function oh(e){let{blocks:t,onCopy:n}=e;const r=(0,Af.Z)((()=>(0,a.serialize)(t)),n);return(0,s.createElement)(hr.Z,{ref:r},(0,E.__)("Copy"))}const ah=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,...o}=e;const i=(0,m.castArray)(t),c=i.length,u=i[0],{firstParentClientId:d,hasReducedUI:p,onlyBlock:f,parentBlockType:h,previousBlockClientId:g,nextBlockClientId:v,selectedBlockClientIds:_}=(0,b.Z)((e=>{const{getBlockCount:t,getBlockName:n,getBlockParents:r,getPreviousBlockClientId:o,getNextBlockClientId:i,getSelectedBlockClientIds:l,getSettings:s}=e(tr),c=r(u),d=c[c.length-1],m=n(d);return{firstParentClientId:d,hasReducedUI:s().hasReducedUI,onlyBlock:1===t(),parentBlockType:(0,a.getBlockType)(m),previousBlockClientId:o(u),nextBlockClientId:i(u),selectedBlockClientIds:l()}}),[u]),y=(0,b.Z)((e=>{const{getShortcutRepresentation:t}=e(ud.h);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),{selectBlock:k,toggleBlockHighlight:M}=(0,Yr.Z)(tr),w=(0,s.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:m.noop,[n]),x=Op(u,25),C=(0,s.useCallback)(n?()=>{const e=g||v;e&&_.includes(u)&&!_.includes(e)&&n(e)}:m.noop,[n,g,v,_]),S=(0,E.sprintf)((0,E.__)("Remove %s"),x),T=1===c?S:(0,E.__)("Remove blocks"),L=(0,s.useRef)(),{gestures:A}=of({ref:L,onChange(e){e&&p||M(d,e)}});return(0,s.createElement)(Zf,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:a,canMove:i,canRemove:p,onDuplicate:g,onInsertAfter:b,onInsertBefore:v,onRemove:_,onCopy:M,onMoveTo:x,blocks:S}=e;return(0,s.createElement)(ti.Z,(0,l.Z)({icon:Lf.Z,label:(0,E.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:rh,noIcons:!0},o),(e=>{let{onClose:o}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(fr.Z,null,(0,s.createElement)(qf.Slot,{fillProps:{onClose:o}}),void 0!==d&&(0,s.createElement)(hr.Z,(0,l.Z)({},A,{ref:L,icon:(0,s.createElement)(ju,{icon:h.icon}),onClick:()=>k(d)}),(0,E.sprintf)((0,E.__)("Select parent block (%s)"),h.title)),1===c&&(0,s.createElement)(Hf,{clientId:u}),(0,s.createElement)(oh,{blocks:S,onCopy:M}),n&&(0,s.createElement)(hr.Z,{onClick:(0,m.flow)(o,g,w),shortcut:y.duplicate},(0,E.__)("Duplicate")),a&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(hr.Z,{onClick:(0,m.flow)(o,v),shortcut:y.insertBefore},(0,E.__)("Insert before")),(0,s.createElement)(hr.Z,{onClick:(0,m.flow)(o,b),shortcut:y.insertAfter},(0,E.__)("Insert after"))),i&&!f&&(0,s.createElement)(hr.Z,{onClick:(0,m.flow)(o,x)},(0,E.__)("Move to")),1===c&&(0,s.createElement)(jf,{clientId:u,onToggle:o})),(0,s.createElement)(nh.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):s.Children.map((e=>(0,s.cloneElement)(e,{onClose:o}))),p&&(0,s.createElement)(fr.Z,null,(0,s.createElement)(hr.Z,{onClick:(0,m.flow)(o,_,C),shortcut:y.remove},T)))}))}))},ih=function(e){let{clientIds:t,...n}=e;return(0,s.createElement)(g.Z,null,(0,s.createElement)(Wp.Z,null,(e=>(0,s.createElement)(ah,(0,l.Z)({clientIds:t,toggleProps:e},n)))))};function lh(e){let{clientId:t}=e;const n=Bp(t),{canEdit:r,canMove:o,canRemove:a,canLock:i}=Xf(t),[l,c]=(0,s.useReducer)((e=>!e),!1);return i?r&&o&&a?null:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(g.Z,{className:"block-editor-block-lock-toolbar"},(0,s.createElement)(Qp.Z,{icon:$f.Z,label:(0,E.sprintf)((0,E.__)("Unlock %s"),n.title),onClick:c})),l&&(0,s.createElement)(Kf,{clientId:t,onClose:c})):null}var sh=n(2712),ch=n(86601),uh=n(57682);const dh={group:void 0,row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}},mh=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:r}=Vf(),{replaceBlocks:o}=(0,Yr.Z)(tr),{canRemove:i,variations:l}=(0,b.Z)((e=>{const{canRemoveBlocks:r}=e(tr),{getBlockVariations:o}=e(a.store);return{canRemove:r(t),variations:o(n,"transform")}}),[t,n]),c=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"group";const i=(0,a.switchToBlockType)(e,n);i&&i.length>0&&(i[0].attributes.layout=dh[r],o(t,i))};if(!r||!i)return null;const u=!!l.find((e=>{let{name:t}=e;return"group-row"===t})),d=!!l.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,s.createElement)(g.Z,null,(0,s.createElement)(Qp.Z,{icon:sh.Z,label:(0,E._x)("Group","verb"),onClick:c}),u&&(0,s.createElement)(Qp.Z,{icon:ch.Z,label:(0,E._x)("Row","single horizontal line"),onClick:()=>c("row")}),d&&(0,s.createElement)(Qp.Z,{icon:uh.Z,label:(0,E._x)("Stack","verb"),onClick:()=>c("stack")}))},ph=(0,s.createContext)(""),fh=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:o,hasFixedToolbar:i,hasReducedUI:c,isValid:u,isVisual:m}=(0,b.Z)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:o,getBlockRootClientId:i,getSettings:l}=e(tr),s=r(),c=s[0],u=i(c),d=l();return{blockClientIds:s,blockClientId:c,blockType:c&&(0,a.getBlockType)(t(c)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:s.every((e=>o(e))),isVisual:s.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:p}=(0,Yr.Z)(tr),f=(0,s.useRef)(),{showMovers:h,gestures:v}=of({ref:f,onChange(e){e&&c||p(r,e)}}),_=(0,Ra.Z)("medium","<")||i;if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const y=_||h;if(0===n.length)return null;const k=u&&m,M=n.length>1,w=d()("block-editor-block-toolbar",y&&"is-showing-movers");return(0,s.createElement)("div",{className:w},!M&&!_&&(0,s.createElement)(af,{clientIds:n}),(0,s.createElement)("div",(0,l.Z)({ref:f},v),(k||M)&&(0,s.createElement)(g.Z,{className:"block-editor-block-toolbar__block-controls"},(0,s.createElement)(xf,{clientIds:n}),!M&&(0,s.createElement)(lh,{clientId:n[0]}),(0,s.createElement)(Jp,{clientIds:n,hideDragHandle:t||c}))),k&&M&&(0,s.createElement)(mh,null),k&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(mr.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(mr.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(mr.Slot,{className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(mr.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(mr.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(ph.Provider,{value:null==o?void 0:o.name},(0,s.createElement)(Tf.Slot,null))),(0,s.createElement)(ih,{clientIds:n}))},hh=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:o,hasParents:i,showParentSelector:c}=(0,b.Z)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r}=e(tr),{getBlockType:o}=e(a.store),i=r(),l=i[0],s=n(l),c=o(t(s[s.length-1]));return{blockType:l&&o(t(l)),hasParents:s.length,showParentSelector:(0,a.hasBlockSupport)(c,"__experimentalParentSelector",!0)&&i.length<=1}}),[]);if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const u=d()("block-editor-block-contextual-toolbar",{"has-parent":i&&c,"is-fixed":n});return(0,s.createElement)(Hp,(0,l.Z)({focusOnMount:t,className:u,"aria-label":(0,E.__)("Block tools")},r),(0,s.createElement)(fh,{hideDragHandle:n}))};function gh(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,getSettings:a,getLastMultiSelectedBlockClientId:i}=e(tr);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:o(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:r()?i():null}}function bh(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:r,capturingClientId:o,__unstablePopoverSlot:a,__unstableContentRef:i}=e;const{isNavigationMode:l,isMultiSelecting:c,isTyping:u,hasFixedToolbar:m,lastClientId:p}=(0,b.Z)(gh,[]),f=(0,b.Z)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(tr);if(!n())return!1;const a=r();return o(a.rootClientId)[a.index]===t}),[t]),h=(0,Ra.Z)("medium"),g=(0,s.useRef)(!1),{stopTyping:v}=(0,Yr.Z)(tr),_=l,y=!l&&!m&&h&&!c&&!(!u&&!l&&r)&&!u,k=!(l||y||m||r);(0,ud.bx)("core/block-editor/focus-toolbar",(()=>{g.current=!0,v(!0)}),{isDisabled:!k}),(0,s.useEffect)((()=>{g.current=!1}));const M=(0,s.useRef)();return _||y?(0,s.createElement)(ao,{clientId:o||t,bottomClientId:p,className:d()("block-editor-block-list__block-popover",{"is-insertion-point-visible":f}),__unstablePopoverSlot:a,__unstableContentRef:i},y&&(0,s.createElement)(hh,{focusOnMount:g.current,__experimentalInitialIndex:M.current,__experimentalOnIndexChange:e=>{M.current=e},key:t}),_&&(0,s.createElement)(Pp,{clientId:t,rootClientId:n})):null}function vh(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:o,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:l}=e(tr),s=t()||n();if(!s)return;const{name:c,attributes:u={}}=o(s)||{},d=i(s),p=l(d),f=(0,m.find)(d,(e=>{var t;return null===(t=p[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:s,rootClientId:r(s),name:c,isEmptyDefaultBlock:c&&(0,a.isUnmodifiedDefaultBlock)({name:c,attributes:u}),capturingClientId:f}}function _h(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,b.Z)(vh,[]);if(!r)return null;const{clientId:o,rootClientId:a,name:i,isEmptyDefaultBlock:l,capturingClientId:c}=r;return i?(0,s.createElement)(bh,{clientId:o,rootClientId:a,isEmptyDefaultBlock:l,capturingClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function yh(e){let{children:t}=e;const n=(0,s.useContext)(Sp),r=(0,s.useContext)(Xu.Z.Context);return n||r?t:((0,q.default)('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8"}),(0,s.createElement)(Lp,{__unstablePopoverSlot:"block-toolbar"},(0,s.createElement)(_h,{__unstablePopoverSlot:"block-toolbar"}),t))}const kh=(0,p.Z)((e=>t=>{const{clientId:n}=ar();return(0,s.createElement)(e,(0,l.Z)({},t,{clientId:n}))}),"withClientId"),Mh=kh((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:a}=e;return(0,s.createElement)(wp,{className:d()({"block-list-appender__toggle":a}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),wh=(0,qa.Z)([kh,(0,Wa.Z)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(tr),o=r(n);return{lastBlockClientId:(0,m.last)(o)}}))])((e=>{let{clientId:t}=e;return(0,s.createElement)(_p,{rootClientId:t})})),Eh=new WeakMap;var xh=n(72638),Ch=n(11465);function Sh(e,t){const n=(0,b.Z)((e=>e(tr).getSettings().mediaUpload),[]),{canInsertBlockType:r,getBlockIndex:o,getClientIdsOfDescendants:i}=(0,b.Z)(tr),{insertBlocks:l,moveBlocksToPosition:s,updateBlockAttributes:c,clearSelectedBlock:u}=(0,Yr.Z)(tr),d=function(e,t,n,r,o,i,l){return s=>{const{srcRootClientId:c,srcClientIds:u,type:d,blocks:m}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(s);if("inserter"===d){l();const n=m.map((e=>(0,a.cloneBlock)(e)));i(n,t,e,!0,null)}if("block"===d){const a=n(u[0]);if(c===e&&a===t)return;if(u.includes(e)||r(u).some((t=>t===e)))return;const i=c===e,l=u.length;o(u,c,e,i&&a{if(!n)return;const s=(0,a.findTransform)((0,a.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(l)));if(s){const n=s.transform(l,r);i(n,t,e)}}}(e,t,n,c,r,l),p=function(e,t,n){return r=>{const o=(0,a.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}(e,t,l);return e=>{const t=(0,Of.f)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?p(n):t.length?m(t):d(e)}}function Th(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:a}=e,i=r?o:a,l=r?a:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let d;return d=i>=s&&i<=c?i:i2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((o=>{const a=Th(e,t,o);(void 0===n||a{const l=e.getBoundingClientRect(),[s,c]=Lh(t,l,r);(void 0===i||s0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,s.useState)(null),r=(0,b.Z)((t=>{const{getTemplateLock:n}=t(tr);return"all"===n(e)}),[e]),{getBlockListSettings:o}=(0,b.Z)(tr),{showInsertionPoint:a,hideInsertionPoint:i}=(0,Yr.Z)(tr),l=Sh(e,t),c=(0,xh.Z)((0,s.useCallback)(((t,r)=>{var i;const l=Ah(Array.from(r.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(i=o(e))||void 0===i?void 0:i.orientation);n(void 0===l?0:l),null!==l&&a(e,l)}),[]),200);return(0,Ch.Z)({isDisabled:r,onDrop:l,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),i(),n(null)},onDragEnd(){c.cancel(),i(),n(null)}})}function zh(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:o,template:i,templateLock:l,wrapperRef:c,templateInsertUpdatesSelection:u,__experimentalCaptureToolbars:d,__experimentalAppenderTagName:p,renderAppender:f,orientation:h,placeholder:g,__experimentalLayout:v}=e;!function(e,t,n,r,o,a,i,l){const{updateBlockListSettings:c}=(0,Yr.Z)(tr),{blockListSettings:u,parentLock:d}=(0,b.Z)((t=>{const n=t(tr).getBlockRootClientId(e);return{blockListSettings:t(tr).getBlockListSettings(e),parentLock:t(tr).getTemplateLock(n)}}),[e]),m=(0,s.useMemo)((()=>t),t);(0,s.useLayoutEffect)((()=>{const t={allowedBlocks:m,templateLock:void 0===o?d:o};if(void 0!==a&&(t.__experimentalCaptureToolbars=a),void 0!==i)t.orientation=i;else{const e=Qo(null==l?void 0:l.type);t.orientation=e.getOrientation(l)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),(0,no.ZP)(u,t)||c(e,t)}),[e,u,m,n,r,o,d,a,i,c,l])}(t,n,r,o,l,d,h,v),function(e,t,n,r){const{getSelectedBlocksInitialCaretPosition:o}=(0,b.Z)(tr),{replaceInnerBlocks:i}=(0,Yr.Z)(tr),l=(0,b.Z)((t=>t(tr).getBlocks(e)),[e]),c=(0,s.useRef)(null);(0,s.useLayoutEffect)((()=>{if((0===l.length||"all"===n)&&!(0,m.isEqual)(t,c.current)){c.current=t;const n=(0,a.synchronizeBlocksWithTemplate)(l,t);(0,m.isEqual)(n,l)||i(e,n,0===l.length&&r&&0!==n.length,o())}}),[l,t,n,e])}(t,i,l,u);const _=(0,b.Z)((e=>{const n=e(tr).getBlock(t),r=(0,a.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){Eh.has(t)||Eh.set(t,new WeakMap);const n=Eh.get(t);if(!n.has(e)){const r=(0,m.mapValues)(t.providesContext,(t=>e[t]));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return(0,s.createElement)(Xa,{value:_},(0,s.createElement)(Wh,{rootClientId:t,renderAppender:f,__experimentalAppenderTagName:p,__experimentalLayout:v,wrapperRef:c,placeholder:g}))}function Bh(e){return Uu(e),(0,s.createElement)(zh,e)}const Oh=(0,s.forwardRef)(((e,t)=>{const n=Dh({ref:t},e);return(0,s.createElement)("div",{className:"block-editor-inner-blocks"},(0,s.createElement)("div",n))}));function Dh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n}=ar(),r=(0,Ra.Z)("medium","<"),{__experimentalCaptureToolbars:o,hasOverlay:i}=(0,b.Z)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:o,hasSelectedInnerBlock:i,isNavigationMode:l}=e(tr),s=t(n),c=l()||r;return{__experimentalCaptureToolbars:e(a.store).hasBlockSupport(s,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==s&&!o(n)&&!i(n,!0)&&c}}),[n,r]),c=(0,Za.Z)([e.ref,Nh({rootClientId:n})]),u={__experimentalCaptureToolbars:o,...t},m=u.value&&u.onChange?Bh:zh;return{...e,ref:c,className:d()(e.className,"block-editor-block-list__layout",{"has-overlay":i}),children:n?(0,s.createElement)(m,(0,l.Z)({},u,{clientId:n})):(0,s.createElement)(Wh,t)}}Dh.save=a.__unstableGetInnerBlocksProps,Oh.DefaultBlockAppender=wh,Oh.ButtonBlockAppender=Mh,Oh.Content=()=>Dh.save().children;const Ih=Oh,Ph=(0,s.createContext)(),Rh=(0,s.createContext)();function Zh(e){let{className:t,...n}=e;const[r,o]=(0,s.useState)(),a=(0,Ra.Z)("medium"),{isOutlineMode:i,isFocusMode:l,isNavigationMode:c}=(0,b.Z)((e=>{const{getSettings:t,isNavigationMode:n}=e(tr),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,isNavigationMode:n()}}),[]),{setBlockVisibility:u}=(0,Yr.Z)(tr),m=(0,s.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{const t={};for(const n of e)t[n.target.getAttribute("data-block")]=n.isIntersecting;u(t)}))}),[]),p=Dh({ref:(0,Za.Z)([Ju(),Ap(),o]),className:d()("is-root-container",t,{"is-outline-mode":i,"is-focus-mode":l&&a,"is-navigate-mode":c})},n);return(0,s.createElement)(Ph.Provider,{value:r},(0,s.createElement)(Rh.Provider,{value:m},(0,s.createElement)("div",p)))}function jh(e){return function(){const e=(0,b.Z)((e=>e(tr).getSettings().__experimentalBlockPatterns),[]);(0,s.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const r=()=>{n++,n>=e.length||((0,y.select)(tr).__experimentalGetParsedPattern(e[n].name),t=Np(r))};return t=Np(r),()=>zp(t)}),[e])}(),(0,s.createElement)(yh,null,(0,s.createElement)(or,{value:nr},(0,s.createElement)(Zh,e)))}function Hh(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:a=ea}=e;const{order:i,selectedBlocks:l,visibleBlocks:c}=(0,b.Z)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:o}=e(tr);return{order:t(n),selectedBlocks:r(),visibleBlocks:o()}}),[n]);return(0,s.createElement)(na,{value:a},i.map((e=>(0,s.createElement)(Pa.ZP,{key:e,value:!c.has(e)&&!l.includes(e)},(0,s.createElement)(Tu,{rootClientId:n,clientId:e})))),i.length<1&&t,(0,s.createElement)(Ep,{tagName:o,rootClientId:n,renderAppender:r}))}function Wh(e){return(0,s.createElement)(Pa.ZP,{value:!1},(0,s.createElement)(Hh,e))}jh.__unstableElementContext=Ph;var Fh=n(53763),qh=n(96741),Yh=n(86299);function Vh(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Uh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,Sr.YX)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",a=Vh(r),i=0===o||o?`${o}${a}`:void 0;return i}function $h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Uh(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function Xh(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function Gh(e){let{onChange:t,values:n,...r}=e;const o=Uh(n),a=Xh(n)&&$h(n),i=a?(0,E.__)("Mixed"):null;return(0,s.createElement)(Lr.ZP,(0,l.Z)({},r,{"aria-label":(0,E.__)("Border radius"),disableUnits:a,isOnly:!0,value:o,onChange:t,placeholder:i}))}const Kh={topLeft:(0,E.__)("Top left"),topRight:(0,E.__)("Top right"),bottomLeft:(0,E.__)("Bottom left"),bottomRight:(0,E.__)("Bottom right")};function Jh(e){let{onChange:t,values:n,...r}=e;const o="string"!=typeof n?n:{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n};return(0,s.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(Kh).map((e=>{let[n,a]=e;return(0,s.createElement)(yp.Z,{text:a,position:"top",key:n},(0,s.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,s.createElement)(Lr.ZP,(0,l.Z)({},r,{"aria-label":a,value:o[n],onChange:(i=n,e=>{t&&t({...o,[i]:e||void 0})})}))));var i})))}var Qh=n(8406),eg=n(36421);function tg(e){let{isLinked:t,...n}=e;const r=t?(0,E.__)("Unlink Radii"):(0,E.__)("Link Radii");return(0,s.createElement)(yp.Z,{text:r},(0,s.createElement)(Er.Z,(0,l.Z)({},n,{className:"component-border-radius-control__linked-button",isPrimary:t,isSecondary:!t,isSmall:!0,icon:t?Qh.Z:eg.Z,iconSize:16,"aria-label":r})))}const ng={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},rg={px:100,em:20,rem:20};function og(e){let{onChange:t,values:n}=e;const[r,o]=(0,s.useState)(!Xh(n)||!$h(n)),a=(0,Sr.nj)({availableUnits:Zr("spacing.units")||["px","em","rem"]}),i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e){const[,t]=(0,Sr.YX)(e);return t||"px"}const t=Object.values(e).map((e=>{const[,t]=(0,Sr.YX)(e);return t}));return Vh(t)||"px"}(n),l=a&&a.find((e=>e.value===i)),c=(null==l?void 0:l.step)||1,[u]=(0,Sr.YX)(Uh(n));return(0,s.createElement)("fieldset",{className:"components-border-radius-control"},(0,s.createElement)("legend",null,(0,E.__)("Radius")),(0,s.createElement)("div",{className:"components-border-radius-control__wrapper"},r?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Gh,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,units:a}),(0,s.createElement)(Yh.Z,{className:"components-border-radius-control__range-control",value:null!=u?u:"",min:0,max:rg[i],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${i}`:void 0)},step:c})):(0,s.createElement)(Jh,{min:0,onChange:t,values:n||ng,units:a}),(0,s.createElement)(tg,{onClick:()=>o(!r),isLinked:r})))}function ag(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,s.createElement)(og,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0!==e&&""!==e||(t=Vr(t)),r({style:t})}})}(0,wd.l7)([Ed.Z,xd.Z]);const ig=(e,t,n)=>{if(t){const n=(0,m.find)(e,{slug:t});if(n)return n}return{color:n}},lg=(e,t)=>(0,m.find)(e,{color:t});function sg(e,t){if(e&&t)return`has-${(0,m.kebabCase)(t)}-${e}`}function cg(){return{disableCustomColors:!Zr("color.custom"),disableCustomGradients:!Zr("color.customGradient")}}function ug(){const e=cg(),t=Zr("color.palette.custom"),n=Zr("color.palette.theme"),r=Zr("color.palette.default"),o=Zr("color.defaultPalette");e.colors=(0,s.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,E._x)("Theme","Indicates this palette comes from the theme."),colors:n}),o&&r&&r.length&&e.push({name:(0,E._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&e.push({name:(0,E._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[r,n,t]);const a=Zr("color.gradients.custom"),i=Zr("color.gradients.theme"),l=Zr("color.gradients.default"),c=Zr("color.defaultGradients");return e.gradients=(0,s.useMemo)((()=>{const e=[];return i&&i.length&&e.push({name:(0,E._x)("Theme","Indicates this palette comes from the theme."),gradients:i}),c&&l&&l.length&&e.push({name:(0,E._x)("Default","Indicates this palette comes from WordPress."),gradients:l}),a&&a.length&&e.push({name:(0,E._x)("Custom","Indicates this palette is created by the user."),gradients:a}),e}),[a,i,l]),e}const dg="__experimentalBorder",mg=["top","right","bottom","left"],pg=e=>{var t,n;return{...e,borderColor:void 0,style:{...e.style,border:{radius:null===(t=e.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius}}}},fg=(e,t,n)=>{let r;return e.some((e=>e.colors.some((e=>e[t]===n&&(r=e,!0))))),r},hg=e=>{let{colors:t,namedColor:n,customColor:r}=e;if(n){const e=fg(t,"slug",n);if(e)return e}if(!r)return{color:void 0};return fg(t,"color",r)||{color:r}};function gg(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function bg(e){const{attributes:t,clientId:n,setAttributes:r}=e,{style:o}=t,{colors:i}=ug(),l=vg(e.name),c=Zr("border.color")&&vg(e.name,"color"),u=Zr("border.radius")&&vg(e.name,"radius"),d=Zr("border.style")&&vg(e.name,"style"),m=Zr("border.width")&&vg(e.name,"width");if([!c,!u,!d,!m].every(Boolean)||!l)return null;const p=(0,a.getBlockSupport)(e.name,[dg,"__experimentalDefaultControls"]),f=(null==p?void 0:p.color)||(null==p?void 0:p.width),h=((e,t)=>{const{borderColor:n,style:r}=e,{border:o}=r||{};if(n){const{color:e}=hg({colors:t,namedColor:n});return e?{...o,color:e}:o}if(!o)return o;const a={...o};return mg.forEach((e=>{var n;const r=gg(null===(n=a[e])||void 0===n?void 0:n.color);if(r){const{color:n}=hg({colors:t,namedColor:r});a[e]={...a[e],color:n}}})),a})(t,i);return(0,s.createElement)(to,{__experimentalGroup:"border"},(m||c)&&(0,s.createElement)(jr.Z,{hasValue:()=>(e=>{const{borderColor:t,style:n}=e.attributes;return(0,Fh.lX)(null==n?void 0:n.border)||!!t})(e),label:(0,E.__)("Border"),onDeselect:()=>(e=>{var t;let{attributes:n={},setAttributes:r}=e;const{style:o}=n;r({borderColor:void 0,style:{...o,border:Vr({radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius})}})})(e),isShownByDefault:f,resetAllFilter:pg,panelId:n},(0,s.createElement)(qh.Z,{colors:i,enableAlpha:!0,onChange:e=>{var t;let n,a={...e};if((0,Fh.Al)(e))a={top:{...e.top},right:{...e.right},bottom:{...e.bottom},left:{...e.left}},mg.forEach((t=>{var n;if(null!==(n=e[t])&&void 0!==n&&n.color){var r;const n=hg({colors:i,customColor:null===(r=e[t])||void 0===r?void 0:r.color});n.slug&&(a[t].color=`var:preset|color|${n.slug}`)}}));else if(null!=e&&e.color){const t=null==e?void 0:e.color,r=hg({colors:i,customColor:t});r.slug&&(n=r.slug,a.color=void 0)}const l=Vr({...o,border:{radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius,...a}});r({style:l,borderColor:n})},popoverPlacement:"left-start",popoverOffset:40,showStyle:d,value:h,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0})),u&&(0,s.createElement)(jr.Z,{hasValue:()=>function(e){var t,n;const r=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof r?Object.entries(r).some(Boolean):!!r}(e),label:(0,E.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:_g(r,"radius")})}(e),isShownByDefault:null==p?void 0:p.radius,resetAllFilter:e=>{var t;return{...e,style:{...e.style,border:{...null===(t=e.style)||void 0===t?void 0:t.border,radius:void 0}}}},panelId:n},(0,s.createElement)(ag,e)))}function vg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==H.Z.OS)return!1;const n=(0,a.getBlockSupport)(e,dg);return!!(!0===n||("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}function _g(e,t){return Vr({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function yg(e,t,n){if(!vg(t,"color")||Xr(t,dg,"color"))return e;const r=kg(n),o=d()(e.className,r);return e.className=o||void 0,e}function kg(e){var t;const{borderColor:n,style:r}=e,o=sg("border-color",n);return d()({"has-border-color":n||(null==r||null===(t=r.border)||void 0===t?void 0:t.color),[o]:!!o})}const Mg=(0,p.Z)((e=>t=>{var n,r,o,a,i,c,u,d,m;const{name:p,attributes:f}=t,{borderColor:h,style:g}=f,{colors:b}=ug();if(!vg(p,"color")||Xr(p,dg,"color"))return(0,s.createElement)(e,t);const{color:v}=hg({colors:b,namedColor:h}),{color:_}=hg({colors:b,namedColor:gg(null==g||null===(n=g.border)||void 0===n||null===(r=n.top)||void 0===r?void 0:r.color)}),{color:y}=hg({colors:b,namedColor:gg(null==g||null===(o=g.border)||void 0===o||null===(a=o.right)||void 0===a?void 0:a.color)}),{color:k}=hg({colors:b,namedColor:gg(null==g||null===(i=g.border)||void 0===i||null===(c=i.bottom)||void 0===c?void 0:c.color)}),{color:M}=hg({colors:b,namedColor:gg(null==g||null===(u=g.border)||void 0===u||null===(d=u.left)||void 0===d?void 0:d.color)}),w={borderTopColor:_||v,borderRightColor:y||v,borderBottomColor:k||v,borderLeftColor:M||v};let E=t.wrapperProps;return E={...t.wrapperProps,style:{...null===(m=t.wrapperProps)||void 0===m?void 0:m.style,...w}},(0,s.createElement)(e,(0,l.Z)({},t,{wrapperProps:E}))}));function wg(e){if(e)return`has-${e}-gradient-background`}function Eg(e,t){const n=(0,m.find)(e,["slug",t]);return n&&n.gradient}function xg(e,t){return(0,m.find)(e,["gradient",t])}function Cg(e,t){const n=xg(e,t);return n&&n.slug}function Sg(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=ar(),r=Zr("color.gradients.custom"),o=Zr("color.gradients.theme"),a=Zr("color.gradients.default"),i=(0,s.useMemo)((()=>[...r||[],...o||[],...a||[]]),[r,o,a]),{gradient:l,customGradient:c}=(0,b.Z)((r=>{const{getBlockAttributes:o}=r(tr),a=o(n)||{};return{customGradient:a[t],gradient:a[e]}}),[n,e,t]),{updateBlockAttributes:u}=(0,Yr.Z)(tr),d=(0,s.useCallback)((r=>{const o=Cg(i,r);u(n,o?{[e]:o,[t]:void 0}:{[e]:void 0,[t]:r})}),[i,n,u]),m=wg(l);let p;return p=l?Eg(i,l):c,{gradientClass:m,gradientValue:p,setGradient:d}}(0,i.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return vg(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",yg),(0,i.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!vg(e,"color")||Xr(e,dg,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),yg(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Mg);var Tg=n(43638),Lg=n(7953),Ag=n(66819),Ng=n(26882),zg=n(22545),Bg=n(27396),Og=n(86278),Dg=n(21638);const Ig=["colors","disableCustomColors","gradients","disableCustomGradients"];function Pg(e){let{colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,__experimentalHasMultipleOrigins:a,__experimentalIsRenderedInSidebar:i,className:l,label:c,onColorChange:u,onGradientChange:p,colorValue:f,gradientValue:h,clearable:g,showTitle:b=!0,enableAlpha:v}=e;const _=u&&(!(0,m.isEmpty)(t)||!r),y=p&&(!(0,m.isEmpty)(n)||!o),[k,M]=(0,s.useState)(h?"gradient":!!_&&"color");return _||y?(0,s.createElement)(Ag.ZP,{className:d()("block-editor-color-gradient-control",l)},(0,s.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,s.createElement)(Ng.Z,{spacing:1},b&&(0,s.createElement)("legend",null,(0,s.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,s.createElement)(Ag.ZP.VisualLabel,null,c))),_&&y&&(0,s.createElement)(zg.Z,{value:k,onChange:M,label:(0,E.__)("Select color type"),hideLabelFromVision:!0,isBlock:!0},(0,s.createElement)(Bg.Z,{value:"color",label:(0,E.__)("Solid")}),(0,s.createElement)(Bg.Z,{value:"gradient",label:(0,E.__)("Gradient")})),("color"===k||!y)&&(0,s.createElement)(Og.ZP,{value:f,onChange:y?e=>{u(e),p()}:u,colors:t,disableCustomColors:r,__experimentalHasMultipleOrigins:a,__experimentalIsRenderedInSidebar:i,clearable:g,enableAlpha:v}),("gradient"===k||!_)&&(0,s.createElement)(Dg.Z,{value:h,onChange:_?e=>{p(e),u()}:p,gradients:n,disableCustomGradients:o,__experimentalHasMultipleOrigins:a,__experimentalIsRenderedInSidebar:i,clearable:g})))):null}function Rg(e){const t={};return t.colors=Zr("color.palette"),t.gradients=Zr("color.gradients"),t.disableCustomColors=!Zr("color.custom"),t.disableCustomGradients=!Zr("color.customGradient"),(0,s.createElement)(Pg,(0,l.Z)({},t,e))}const Zg=function(e){return(0,m.every)(Ig,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(Pg,e):(0,s.createElement)(Rg,e)},jg=e=>{let{setting:t,children:n,panelId:r,...o}=e;return(0,s.createElement)(jr.Z,(0,l.Z)({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},o,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:r,resetAllFilter:t.resetAllFilter}),n)},Hg=e=>{let{colorValue:t,label:n}=e;return(0,s.createElement)(Tg.Z,{justify:"flex-start"},(0,s.createElement)(Lg.Z,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,s.createElement)(wr.Z,null,n))},Wg=e=>t=>{let{onToggle:n,isOpen:r}=t;const{colorValue:o,label:a}=e,i={onClick:n,className:d()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r};return(0,s.createElement)(Er.Z,i,(0,s.createElement)(Hg,{colorValue:o,label:a}))};function Fg(e){let t,{colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:a,gradients:i,settings:c,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:d,...m}=e;return d&&(t={placement:"left-start",offset:36}),(0,s.createElement)(s.Fragment,null,c.map(((e,c)=>{var p;const f={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:a,gradientValue:e.gradientValue,gradients:i,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:d,...e},h={colorValue:null!==(p=e.gradientValue)&&void 0!==p?p:e.colorValue,label:e.label};return e&&(0,s.createElement)(jg,(0,l.Z)({key:c,setting:e},m),(0,s.createElement)(Au.Z,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",contentClassName:"block-editor-panel-color-gradient-settings__dropdown-content",renderToggle:Wg(h),renderContent:()=>(0,s.createElement)(Zg,f)}))})))}var qg=n(34244);(0,wd.l7)([Ed.Z,xd.Z]);const Yg=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:r,fallbackLinkColor:o,fontSize:a,isLargeText:i,textColor:l,linkColor:c,enableAlphaChecker:u=!1}=e;const d=t||n;if(!d)return null;const m=l||r,p=c||o;if(!m&&!p)return null;const f=[{color:m,description:(0,E.__)("text color")},{color:p,description:(0,E.__)("link color")}],h=(0,wd.Vi)(d),g=h.alpha()<1,b=h.brightness(),v={level:"AA",size:i||!1!==i&&a>=24?"large":"small"};let _="",y="";for(const e of f){if(!e.color)continue;const t=(0,wd.Vi)(e.color),n=t.isReadable(h,v),r=t.alpha()<1;if(!n){if(g||r)continue;_=b{var e;if(!o)return;if(!p.current)return;u(Vg(p.current).color);const t=null===(e=p.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&m(Vg(t).color);let n=p.current,r=Vg(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=Vg(n).backgroundColor;i(r)}));const f=ug();return(0,s.createElement)(to,{__experimentalGroup:"color"},(0,s.createElement)(Fg,(0,l.Z)({enableAlpha:t,panelId:r,settings:n,__experimentalIsItemGroup:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},f)),o&&(0,s.createElement)(Yg,{backgroundColor:a,textColor:c,enableAlphaChecker:t,linkColor:d}))}const $g="color",Xg=e=>{const t=(0,a.getBlockSupport)(e,$g);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Gg=e=>{if("web"!==H.Z.OS)return!1;const t=(0,a.getBlockSupport)(e,$g);return(0,m.isObject)(t)&&!!t.link},Kg=e=>{const t=(0,a.getBlockSupport)(e,$g);return(0,m.isObject)(t)&&!!t.gradients},Jg=e=>{const t=(0,a.getBlockSupport)(e,$g);return t&&!1!==t.background},Qg=e=>{const t=(0,a.getBlockSupport)(e,$g);return t&&!1!==t.text},eb=(e,t)=>Vr(Ur(t,e,void 0)),tb=e=>({textColor:void 0,style:eb(["color","text"],e.style)}),nb=e=>({style:eb(["elements","link","color","text"],e.style)}),rb=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function ob(e,t,n){var r,o,a,i,l,s;if(!Xg(t)||Xr(t,$g))return e;const c=Kg(t),{backgroundColor:u,textColor:m,gradient:p,style:f}=n,h=e=>!Xr(t,$g,e),g=h("text")?sg("color",m):void 0,b=h("gradients")?wg(p):void 0,v=h("background")?sg("background-color",u):void 0,_=h("background")||h("gradients"),y=u||(null==f||null===(r=f.color)||void 0===r?void 0:r.background)||c&&(p||(null==f||null===(o=f.color)||void 0===o?void 0:o.gradient)),k=d()(e.className,g,b,{[v]:!(c&&null!=f&&null!==(a=f.color)&&void 0!==a&&a.gradient||!v),"has-text-color":h("text")&&(m||(null==f||null===(i=f.color)||void 0===i?void 0:i.text)),"has-background":_&&y,"has-link-color":h("link")&&(null==f||null===(l=f.elements)||void 0===l||null===(s=l.link)||void 0===s?void 0:s.color)});return e.className=k||void 0,e}const ab=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?ig(e,n[1]).color:t};function ib(e){var t,n,r,o,i,l,c,u,d;const{name:m,attributes:p}=e,f=Zr("color.palette.custom"),h=Zr("color.palette.theme"),g=Zr("color.palette.default"),b=(0,s.useMemo)((()=>[...f||[],...h||[],...g||[]]),[f,h,g]),v=Zr("color.gradients.custom"),_=Zr("color.gradients.theme"),y=Zr("color.gradients.default"),k=(0,s.useMemo)((()=>[...v||[],..._||[],...y||[]]),[v,_,y]),M=Zr("color.custom"),w=Zr("color.customGradient"),x=Zr("color.background"),C=Zr("color.link"),S=Zr("color.text"),T=M||!h||(null==h?void 0:h.length)>0,L=w||!_||(null==_?void 0:_.length)>0,A=(0,s.useRef)(p);if((0,s.useEffect)((()=>{A.current=p}),[p]),!Xg(m))return null;const N=Gg(m)&&C&&T,z=Qg(m)&&S&&T,B=Jg(m)&&x&&T,O=Kg(m)&&L;if(!(N||z||B||O))return null;const{style:D,textColor:I,backgroundColor:P,gradient:R}=p;let Z;if(O&&R)Z=Eg(k,R);else if(O){var j;Z=null==D||null===(j=D.color)||void 0===j?void 0:j.gradient}const W=t=>n=>{var r,o;const a=lg(b,n),i=t+"Color",l={...A.current.style,color:{...null===(r=A.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,[t]:null!=a&&a.slug?void 0:n}},s=null!=a&&a.slug?a.slug:void 0,c={style:Vr(l),[i]:s};e.setAttributes(c),A.current={...A.current,...c}},F=!("web"!==H.Z.OS||R||null!=D&&null!==(t=D.color)&&void 0!==t&&t.gradient),q=(0,a.getBlockSupport)(e.name,[$g,"__experimentalDefaultControls"]);return(0,s.createElement)(Ug,{enableContrastChecking:F,clientId:e.clientId,enableAlpha:!0,settings:[...z?[{label:(0,E.__)("Text"),onColorChange:W("text"),colorValue:ig(b,I,null==D||null===(n=D.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==q?void 0:q.text,resetAllFilter:tb}]:[],...B||O?[{label:(0,E.__)("Background"),onColorChange:B?W("background"):void 0,colorValue:ig(b,P,null==D||null===(r=D.color)||void 0===r?void 0:r.background).color,gradientValue:Z,onGradientChange:O?t=>{const n=Cg(k,t);let r;if(n){var o,a,i;const e={...null===(o=A.current)||void 0===o?void 0:o.style,color:{...null===(a=A.current)||void 0===a||null===(i=a.style)||void 0===i?void 0:i.color,gradient:void 0}};r={style:Vr(e),gradient:n}}else{var l,s,c;const e={...null===(l=A.current)||void 0===l?void 0:l.style,color:{...null===(s=A.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};r={style:Vr(e),gradient:void 0}}e.setAttributes(r),A.current={...A.current,...r}}:void 0,isShownByDefault:null==q?void 0:q.background,resetAllFilter:rb}]:[],...N?[{label:(0,E.__)("Link"),onColorChange:t=>{var n;const r=lg(b,t),o=null!=r&&r.slug?`var:preset|color|${r.slug}`:t,a=Vr(Ur(null===(n=A.current)||void 0===n?void 0:n.style,["elements","link","color","text"],o));e.setAttributes({style:a}),A.current={...A.current,style:a}},colorValue:ab(b,null==D||null===(o=D.elements)||void 0===o||null===(i=o.link)||void 0===i||null===(l=i.color)||void 0===l?void 0:l.text),clearable:!(null==D||null===(c=D.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(d=u.color)||void 0===d||!d.text),isShownByDefault:null==q?void 0:q.link,resetAllFilter:nb}]:[]]})}const lb=(0,p.Z)((e=>t=>{var n;const{name:r,attributes:o}=t,{backgroundColor:a,textColor:i}=o,c=Zr("color.palette.custom")||[],u=Zr("color.palette.theme")||[],d=Zr("color.palette.default")||[],m=(0,s.useMemo)((()=>[...c||[],...u||[],...d||[]]),[c,u,d]);if(!Xg(r)||Xr(r,$g))return(0,s.createElement)(e,t);const p={};var f,h;i&&!Xr(r,$g,"text")&&(p.color=null===(f=ig(m,i))||void 0===f?void 0:f.color),a&&!Xr(r,$g,"background")&&(p.backgroundColor=null===(h=ig(m,a))||void 0===h?void 0:h.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...p,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,s.createElement)(e,(0,l.Z)({},t,{wrapperProps:g}))})),sb={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,i.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Xg(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Kg(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",ob),(0,i.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Xg(e)||Xr(e,$g))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),ob(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",lb),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){const o=e.name;return $r({linkColor:Gg(o),textColor:Qg(o),backgroundColor:Jg(o),gradient:Kg(o)},sb,e,t,n,r)}));var cb=n(52107);const ub=[{name:(0,E._x)("Regular","font style"),value:"normal"},{name:(0,E._x)("Italic","font style"),value:"italic"}],db=[{name:(0,E._x)("Thin","font weight"),value:"100"},{name:(0,E._x)("Extra Light","font weight"),value:"200"},{name:(0,E._x)("Light","font weight"),value:"300"},{name:(0,E._x)("Regular","font weight"),value:"400"},{name:(0,E._x)("Medium","font weight"),value:"500"},{name:(0,E._x)("Semi Bold","font weight"),value:"600"},{name:(0,E._x)("Bold","font weight"),value:"700"},{name:(0,E._x)("Extra Bold","font weight"),value:"800"},{name:(0,E._x)("Black","font weight"),value:"900"}],mb=(e,t)=>e?t?(0,E.__)("Appearance"):(0,E.__)("Font style"):(0,E.__)("Font weight");function pb(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:a}}=e,i=n||r,l=mb(n,r),c={key:"default",name:(0,E.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},u=(0,s.useMemo)((()=>n&&r?(()=>{const e=[c];return ub.forEach((t=>{let{name:n,value:r}=t;db.forEach((t=>{let{name:o,value:a}=t;const i="normal"===r?o:(0,E.sprintf)((0,E.__)("%1$s %2$s"),o,n);e.push({key:`${r}-${a}`,name:i,style:{fontStyle:r,fontWeight:a}})}))})),e})():n?(()=>{const e=[c];return ub.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e})():(()=>{const e=[c];return db.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e})()),[e.options]),d=u.find((e=>e.style.fontStyle===o&&e.style.fontWeight===a))||u[0];return i&&(0,s.createElement)(cb.Z,{className:"components-font-appearance-control",label:l,describedBy:d?n?r?(0,E.sprintf)((0,E.__)("Currently selected font appearance: %s"),d.name):(0,E.sprintf)((0,E.__)("Currently selected font style: %s"),d.name):(0,E.sprintf)((0,E.__)("Currently selected font weight: %s"),d.name):(0,E.__)("No selected font appearance"),options:u,value:d,onChange:e=>{let{selectedItem:n}=e;return t(n.style)}})}var fb=n(66196);const hb=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:r=!1,__unstableInputWidth:o="60px"}=e;const a=function(e){return void 0!==e&&""!==e}(t),i=a?t:"";r||(0,q.default)("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const l=r?void 0:{marginBottom:24};return(0,s.createElement)("div",{className:"block-editor-line-height-control",style:l},(0,s.createElement)(fb.Z,{__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{var n;const r=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),o=((e,t)=>{if(a)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return 1.5;default:return e}})(e.value,r);return{...e,value:o}},onChange:n,label:(0,E.__)("Line height"),placeholder:1.5,step:.1,value:i,min:0}))},gb="typography.lineHeight";function bb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,s.createElement)(hb,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};r({style:Vr(t)})}})}function vb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Zr("typography.lineHeight");return!(0,a.hasBlockSupport)(e,gb)||t}const _b="typography.__experimentalFontStyle",yb="typography.__experimentalFontWeight";function kb(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,a=!Mb(e),i=!wb(e),l=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,c=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return(0,s.createElement)(pb,{onChange:e=>{o({style:Vr({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:a,hasFontWeights:i,value:{fontStyle:l,fontWeight:c}})}function Mb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,_b),n=Zr("typography.fontStyle");return!t||!n}function wb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,yb),n=Zr("typography.fontWeight");return!t||!n}function Eb(e){const t=Mb(e),n=wb(e);return t&&n}function xb(e){let{value:t="",onChange:n,fontFamilies:r,...o}=e;const a=Zr("typography.fontFamilies");if(r||(r=a),(0,m.isEmpty)(r))return null;const i=[{value:"",label:(0,E.__)("Default")},...r.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,s.createElement)(Mm.Z,(0,l.Z)({label:(0,E.__)("Font family"),options:i,value:t,onChange:n,labelPosition:"top"},o))}const Cb="typography.__experimentalFontFamily";function Sb(e,t,n){if(!(0,a.hasBlockSupport)(t,Cb))return e;if(Xr(t,iv,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const r=new mf(e.className);r.add(`has-${(0,m.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const o=r.value;return e.className=o||void 0,e}function Tb(e){var t;let{setAttributes:n,attributes:{fontFamily:r}}=e;const o=Zr("typography.fontFamilies"),a=null===(t=(0,m.find)(o,(e=>{let{slug:t}=e;return r===t})))||void 0===t?void 0:t.fontFamily;return(0,s.createElement)(xb,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:a,onChange:function(e){const t=(0,m.find)(o,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})}})}function Lb(e){let{name:t}=e;const n=Zr("typography.fontFamilies");return!n||0===n.length||!(0,a.hasBlockSupport)(t,Cb)}(0,i.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,Cb)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Sb),(0,i.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,Cb))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Sb(r,e,n)},e}));const Ab=(e,t,n)=>{if(t){const n=(0,m.find)(e,{slug:t});if(n)return n}return{size:n}};function Nb(e,t){return(0,m.find)(e,{size:t})||{size:t}}function zb(e){if(e)return`has-${(0,m.kebabCase)(e)}-font-size`}var Bb=n(89753);const Ob=function(e){const t=Zr("typography.fontSizes"),n=!Zr("typography.customFontSize");return(0,s.createElement)(Bb.Z,(0,l.Z)({},e,{fontSizes:t,disableCustomFontSizes:n}))},Db="typography.fontSize";function Ib(e,t,n){if(!(0,a.hasBlockSupport)(t,Db))return e;if(Xr(t,iv,"fontSize"))return e;const r=new mf(e.className);r.add(zb(n.fontSize));const o=r.value;return e.className=o||void 0,e}function Pb(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:a}=e,i=Zr("typography.fontSizes"),l=Ab(i,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),c=(null==l?void 0:l.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,s.createElement)(Ob,{onChange:e=>{const t=Nb(i,e).slug;a({style:Vr({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1})}function Rb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Zr("typography.fontSizes"),n=!(null==t||!t.length);return!(0,a.hasBlockSupport)(e,Db)||!n}const Zb=(0,p.Z)((e=>t=>{var n,r;const o=Zr("typography.fontSizes"),{name:i,attributes:{fontSize:l,style:c},wrapperProps:u}=t;if(!(0,a.hasBlockSupport)(i,Db)||Xr(i,iv,"fontSize")||!l||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,s.createElement)(e,t);const d=Ab(o,l,null==c||null===(r=c.typography)||void 0===r?void 0:r.fontSize).size,m={...t,wrapperProps:{...u,style:{fontSize:d,...null==u?void 0:u.style}}};return(0,s.createElement)(e,m)}),"withFontSizeInlineStyles"),jb={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,i.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,Db)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Ib),(0,i.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,Db))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Ib(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Zb),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,r){const o=e.name;return $r({fontSize:(0,a.hasBlockSupport)(o,Db)},jb,e,t,n,r)}));var Hb=n(31049),Wb=n(35478);const Fb=[{name:(0,E.__)("Underline"),value:"underline",icon:Hb.Z},{name:(0,E.__)("Strikethrough"),value:"line-through",icon:Wb.Z}];function qb(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,s.createElement)("legend",null,(0,E.__)("Decoration")),(0,s.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},Fb.map((e=>(0,s.createElement)(Er.Z,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:()=>n(e.value===t?void 0:e.value),"aria-label":e.name})))))}const Yb="typography.__experimentalTextDecoration";function Vb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,s.createElement)(qb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:Vr({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function Ub(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,Yb),n=Zr("typography.textDecoration");return t||!n}var $b=n(87549),Xb=n(22165),Gb=n(82484);const Kb=[{name:(0,E.__)("Uppercase"),value:"uppercase",icon:$b.Z},{name:(0,E.__)("Lowercase"),value:"lowercase",icon:Xb.Z},{name:(0,E.__)("Capitalize"),value:"capitalize",icon:Gb.Z}];function Jb(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,s.createElement)("legend",null,(0,E.__)("Letter case")),(0,s.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Kb.map((e=>(0,s.createElement)(Er.Z,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:()=>n(t===e.value?void 0:e.value)})))))}const Qb="typography.__experimentalTextTransform";function ev(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,s.createElement)(Jb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:Vr({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function tv(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,Qb),n=Zr("typography.textTransform");return t||!n}function nv(e){let{value:t,onChange:n,__unstableInputWidth:r="60px"}=e;const o=(0,Sr.nj)({availableUnits:Zr("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,s.createElement)(Lr.ZP,{label:(0,E.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:o,onChange:n})}const rv="typography.__experimentalLetterSpacing";function ov(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,s.createElement)(nv,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:Vr({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%"})}function av(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,rv),n=Zr("typography.letterSpacing");return t||!n}const iv="typography",lv=[gb,Db,_b,yb,Cb,Yb,Qb,rv];function sv(e){const{clientId:t}=e,n=Lb(e),r=Rb(e),o=Eb(e),i=vb(e),l=Ub(e),c=tv(e),u=av(e),d=!Mb(e),m=!wb(e),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Eb(e),Rb(e),vb(e),Lb(e),Ub(e),tv(e),av(e)];return t.filter(Boolean).length===t.length}(e),f=cv(e.name);if(p||!f)return null;const h=(0,a.getBlockSupport)(e.name,[iv,"__experimentalDefaultControls"]),g=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,s.createElement)(to,{__experimentalGroup:"typography"},!n&&(0,s.createElement)(jr.Z,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,E.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==h?void 0:h.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,s.createElement)(Tb,e)),!r&&(0,s.createElement)(jr.Z,{hasValue:()=>function(e){var t;const{fontSize:n,style:r}=e.attributes;return!!n||!(null==r||null===(t=r.typography)||void 0===t||!t.fontSize)}(e),label:(0,E.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({fontSize:void 0,style:Vr({...r,typography:{...null==r?void 0:r.typography,fontSize:void 0}})})}(e),isShownByDefault:null==h?void 0:h.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,s.createElement)(Pb,e)),!o&&(0,s.createElement)(jr.Z,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:r}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!r}(e),label:mb(d,m),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Vr({...r,typography:{...null==r?void 0:r.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==h?void 0:h.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,s.createElement)(kb,e)),!i&&(0,s.createElement)(jr.Z,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,E.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Vr({...r,typography:{...null==r?void 0:r.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==h?void 0:h.lineHeight,resetAllFilter:g("lineHeight"),panelId:t},(0,s.createElement)(bb,e)),!l&&(0,s.createElement)(jr.Z,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,E.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Vr({...r,typography:{...null==r?void 0:r.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==h?void 0:h.textDecoration,resetAllFilter:g("textDecoration"),panelId:t},(0,s.createElement)(Vb,e)),!c&&(0,s.createElement)(jr.Z,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,E.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Vr({...r,typography:{...null==r?void 0:r.typography,textTransform:void 0}})})}(e),isShownByDefault:null==h?void 0:h.textTransform,resetAllFilter:g("textTransform"),panelId:t},(0,s.createElement)(ev,e)),!u&&(0,s.createElement)(jr.Z,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,E.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Vr({...r,typography:{...null==r?void 0:r.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==h?void 0:h.letterSpacing,resetAllFilter:g("letterSpacing"),panelId:t},(0,s.createElement)(ov,e)))}const cv=e=>lv.some((t=>(0,a.hasBlockSupport)(e,t))),uv=[...lv,dg,$g,ho],dv=e=>uv.some((t=>(0,a.hasBlockSupport)(e,t))),mv="var:";function pv(e){var t;return null!=e&&null!==(t=e.startsWith)&&void 0!==t&&t.call(e,mv)?`var(--wp--${e.slice(mv.length).split("|").join("--")})`:e}function fv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["spacing.blockGap"],n={};Object.keys(a.__EXPERIMENTAL_STYLE_PROPERTY).forEach((r=>{const o=a.__EXPERIMENTAL_STYLE_PROPERTY[r].value,i=a.__EXPERIMENTAL_STYLE_PROPERTY[r].properties;if((0,m.has)(e,o)&&"elements"!==(null==o?void 0:o[0])){const l=(0,m.get)(e,o);a.__EXPERIMENTAL_STYLE_PROPERTY[r].useEngine||(i&&"string"!=typeof l?Object.entries(i).forEach((e=>{const[t,r]=e,o=(0,m.get)(l,[r]);o&&(n[t]=pv(o))})):t.includes(o.join("."))||(n[r]=pv((0,m.get)(e,o))))}}));const r=Ia(e);return r.forEach((e=>{n[e.key]=e.value})),n}const hv={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[$g],[`${iv}.__experimentalSkipSerialization`]:[iv],[`${ho}.__experimentalSkipSerialization`]:["spacing"]},gv={...hv,[`${ho}`]:["spacing.blockGap"]},bv={gradients:"gradient"};function vv(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:gv;if(!dv(t))return e;let{style:o}=n;return Object.entries(r).forEach((e=>{let[n,r]=e;const i=(0,a.getBlockSupport)(t,n);!0===i&&(o=(0,m.omit)(o,r)),Array.isArray(i)&&i.forEach((e=>{const t=bv[e]||e;o=(0,m.omit)(o,[[...r,t]])}))})),e.style={...fv(o),...e.style},e}const _v=(0,p.Z)((e=>t=>{const n=ir();return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ib,t),(0,s.createElement)(sv,t),(0,s.createElement)(bg,t),(0,s.createElement)(vo,t)),(0,s.createElement)(e,t))}),"withToolbarControls"),yv=(0,p.Z)((e=>t=>{var n,r;const o=`wp-elements-${(0,Aa.Z)(e)}`,i=Xr(t.name,$g,"link")?(0,m.omit)(null===(n=t.attributes.style)||void 0===n?void 0:n.elements,["link"]):null===(r=t.attributes.style)||void 0===r?void 0:r.elements,c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.entries(t).map((t=>{let[n,r]=t;const o=fv(r);return(0,m.isEmpty)(o)?"":[`.editor-styles-wrapper .${e} ${a.__EXPERIMENTAL_ELEMENTS[n]}{`,...Object.entries(o).map((e=>{let[t,n]=e;return`\t${(0,m.kebabCase)(t)}: ${n};`})),"}"].join("\n")})).join("\n")}(o,i),u=(0,s.useContext)(jh.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,i&&u&&(0,La.createPortal)((0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:c}}),u),(0,s.createElement)(e,(0,l.Z)({},t,{className:i?d()(t.className,o):t.className})))}));(0,i.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return dv(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",vv),(0,i.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!dv(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),vv(r,e,n,hv)},e})),(0,i.addFilter)("editor.BlockEdit","core/style/with-block-controls",_v),(0,i.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",yv),(0,i.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t,n;return n=e,(0,a.hasBlockSupport)(n,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));var kv=n(44494),Mv=n(62699),wv=n(37267);const Ev=function(e){let{colorPalette:t,duotonePalette:n,disableCustomColors:r,disableCustomDuotone:o,value:a,onChange:i}=e;return(0,s.createElement)(Au.Z,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,E.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(Qp.Z,{showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,onKeyDown:e=>{t||e.keyCode!==_u.DOWN||(e.preventDefault(),n())},label:(0,E.__)("Apply duotone filter"),icon:a?(0,s.createElement)(kv.Z,{values:a}):(0,s.createElement)($o.Z,{icon:wv.Z})})},renderContent:()=>(0,s.createElement)(fr.Z,{label:(0,E.__)("Duotone")},(0,s.createElement)("div",{className:"block-editor-duotone-control__description"},(0,E.__)("Create a two-tone color effect without losing your original image.")),(0,s.createElement)(Mv.Z,{colorPalette:t,duotonePalette:n,disableCustomColors:r,disableCustomDuotone:o,value:a,onChange:i}))})},xv=[];function Cv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=(0,wd.Vi)(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function Sv(e){let{selector:t,id:n}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,s.createElement)("style",null,r)}function Tv(e){let{id:t,values:n}=e;return(0,s.createElement)(Co.Wj,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,s.createElement)("defs",null,(0,s.createElement)("filter",{id:t},(0,s.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,s.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,s.createElement)("feFuncR",{type:"table",tableValues:n.r.join(" ")}),(0,s.createElement)("feFuncG",{type:"table",tableValues:n.g.join(" ")}),(0,s.createElement)("feFuncB",{type:"table",tableValues:n.b.join(" ")}),(0,s.createElement)("feFuncA",{type:"table",tableValues:n.a.join(" ")})),(0,s.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function Lv(e){let{selector:t,id:n,values:r}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Tv,{id:n,values:r}),(0,s.createElement)(Sv,{id:n,selector:t}))}function Av(e){let{presetSetting:t,defaultSetting:n}=e;const r=!Zr(n),o=Zr(`${t}.custom`)||xv,a=Zr(`${t}.theme`)||xv,i=Zr(`${t}.default`)||xv;return(0,s.useMemo)((()=>[...o,...a,...r?xv:i]),[r,o,a,i])}function Nv(e){var t;let{attributes:n,setAttributes:r}=e;const o=null==n?void 0:n.style,a=null==o||null===(t=o.color)||void 0===t?void 0:t.duotone,i=Av({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=Av({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),c=!Zr("color.custom"),u=!Zr("color.customDuotone")||0===(null==l?void 0:l.length)&&c;return 0===(null==i?void 0:i.length)&&u?null:(0,s.createElement)(mr,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Ev,{duotonePalette:i,colorPalette:l,disableCustomDuotone:u,disableCustomColors:c,value:a,onChange:e=>{const t={...o,color:{...null==o?void 0:o.color,duotone:e}};r({style:t})}}))}(0,wd.l7)([Ed.Z]);const zv=(0,p.Z)((e=>t=>{const n=(0,a.hasBlockSupport)(t.name,"color.__experimentalDuotone");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(Nv,t))}),"withDuotoneControls"),Bv=(0,p.Z)((e=>t=>{var n,r,o;const i=(0,a.getBlockSupport)(t.name,"color.__experimentalDuotone"),c=null==t||null===(n=t.attributes)||void 0===n||null===(r=n.style)||void 0===r||null===(o=r.color)||void 0===o?void 0:o.duotone;if(!i||!c)return(0,s.createElement)(e,t);const u=`wp-duotone-${(0,Aa.Z)(e)}`,m=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(`.editor-styles-wrapper .${u}`,i),p=d()(null==t?void 0:t.className,u),f=(0,s.useContext)(jh.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,f&&(0,La.createPortal)((0,s.createElement)(Lv,{selector:m,id:u,values:Cv(c)}),f),(0,s.createElement)(e,(0,l.Z)({},t,{className:p})))}),"withDuotoneStyles");function Ov(e){let{preset:t}=e;return(0,s.createElement)(Tv,{id:`wp-duotone-${t.slug}`,values:Cv(t.colors)})}(0,i.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,a.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,i.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",zv),(0,i.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",Bv);var Dv=n(4906);const Iv="__experimentalLayout";function Pv(e){let{setAttributes:t,attributes:n,name:r}=e;const{layout:o}=n,i=Zr("layout"),l=(0,b.Z)((e=>{const{getSettings:t}=e(tr);return t().supportsLayout}),[]),c=(0,a.getBlockSupport)(r,Iv,{}),{allowSwitching:u,allowEditing:d=!0,allowInheriting:m=!0,default:p}=c;if(!d)return null;const f=!(!m||!i||null!=o&&o.type&&"default"!==(null==o?void 0:o.type)&&(null==o||!o.inherit)),h=o||p||{},{inherit:g=!1,type:v="default"}=h;if("default"===v&&!l)return null;const _=Qo(v),y=e=>t({layout:e});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(to,null,(0,s.createElement)(Ea.Z,{title:(0,E.__)("Layout")},f&&(0,s.createElement)(xr.Z,{label:(0,E.__)("Inherit default layout"),checked:!!g,onChange:()=>t({layout:{inherit:!g}})}),!g&&u&&(0,s.createElement)(Rv,{type:v,onChange:e=>t({layout:{type:e}})}),!g&&_&&(0,s.createElement)(_.inspectorControls,{layout:h,onChange:y,layoutBlockSupport:c}))),!g&&_&&(0,s.createElement)(_.toolBarControls,{layout:h,onChange:y,layoutBlockSupport:c}))}function Rv(e){let{type:t,onChange:n}=e;return(0,s.createElement)(Dv.Z,null,Jo.map((e=>{let{name:r,label:o}=e;return(0,s.createElement)(Er.Z,{key:r,isPressed:t===r,onClick:()=>n(r)},o)})))}const Zv=(0,p.Z)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,Iv)&&(0,s.createElement)(Pv,(0,l.Z)({key:"layout"},t)),(0,s.createElement)(e,(0,l.Z)({key:"edit"},t))]}),"withInspectorControls"),jv=(0,p.Z)((e=>t=>{const{name:n,attributes:r}=t,o=(0,a.hasBlockSupport)(n,Iv),i=(0,Aa.Z)(e),c=Zr("layout")||{},u=(0,s.useContext)(jh.__unstableElementContext),{layout:m}=r,{default:p}=(0,a.getBlockSupport)(n,Iv)||{},f=null!=m&&m.inherit?c:m||p||{},h=d()(null==t?void 0:t.className,{[`wp-container-${i}`]:o});return(0,s.createElement)(s.Fragment,null,o&&u&&(0,La.createPortal)((0,s.createElement)(oa,{blockName:n,selector:`.wp-container-${i}`,layout:f,style:null==r?void 0:r.style}),u),(0,s.createElement)(e,(0,l.Z)({},t,{className:h})))}));function Hv(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:kg(e)||void 0,style:fv({border:n})}}function Wv(e){const{colors:t}=ug(),n=Hv(e),{borderColor:r}=e;if(r){const e=hg({colors:t,namedColor:r});n.style.borderColor=e.color}return n}function Fv(e){var t,n,r,o,a,i;const{backgroundColor:l,textColor:s,gradient:c,style:u}=e,m=sg("background-color",l),p=sg("color",s),f=wg(c),h=f||(null==u||null===(t=u.color)||void 0===t?void 0:t.gradient);return{className:d()(p,f,{[m]:!h&&!!m,"has-text-color":s||(null==u||null===(n=u.color)||void 0===n?void 0:n.text),"has-background":l||(null==u||null===(r=u.color)||void 0===r?void 0:r.background)||c||(null==u||null===(o=u.color)||void 0===o?void 0:o.gradient),"has-link-color":null==u||null===(a=u.elements)||void 0===a||null===(i=a.link)||void 0===i?void 0:i.color})||void 0,style:fv({color:(null==u?void 0:u.color)||{}})}}(0,i.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,m.has)(e.attributes,["layout","type"])||(0,a.hasBlockSupport)(e,Iv)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,i.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",jv),(0,i.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",Zv);const qv={};function Yv(e){const{backgroundColor:t,textColor:n,gradient:r}=e,o=Zr("color.palette.custom")||[],a=Zr("color.palette.theme")||[],i=Zr("color.palette.default")||[],l=Zr("color.gradients")||qv,c=(0,s.useMemo)((()=>[...o||[],...a||[],...i||[]]),[o,a,i]),u=(0,s.useMemo)((()=>[...(null==l?void 0:l.custom)||[],...(null==l?void 0:l.theme)||[],...(null==l?void 0:l.default)||[]]),[l]),d=Fv(e);if(t){const e=ig(c,t);d.style.backgroundColor=e.color}if(r&&(d.style.background=Eg(u,r)),n){const e=ig(c,n);d.style.color=e.color}return d}function Vv(e){const{style:t}=e;return{style:fv({spacing:(null==t?void 0:t.spacing)||{}})}}function Uv(e){const[t,n]=(0,s.useState)(e);return(0,s.useEffect)((()=>{e&&n(e)}),[e]),t}const $v=e=>(0,p.Z)((t=>n=>(0,s.createElement)(t,(0,l.Z)({},n,{colors:e}))),"withCustomColorPalette"),Xv=()=>(0,p.Z)((e=>t=>{const n=Zr("color.palette.custom"),r=Zr("color.palette.theme"),o=Zr("color.palette.default"),a=(0,s.useMemo)((()=>[...n||[],...r||[],...o||[]]),[n,r,o]);return(0,s.createElement)(e,(0,l.Z)({},t,{colors:a}))}),"withEditorColorPalette");function Gv(e,t){const n=(0,m.reduce)(e,((e,t)=>({...e,...(0,m.isString)(t)?{[t]:(0,m.kebabCase)(t)}:t})),{});return(0,qa.Z)([t,e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=(0,wd.Vi)(t);return(0,m.maxBy)(e,(e=>{let{color:t}=e;return n.contrast(t)})).color}(t,e)}createSetters(){return(0,m.reduce)(n,((e,t,n)=>{const r=(0,m.upperFirst)(n),o=`custom${r}`;return e[`set${r}`]=this.createSetColor(n,o),e}),{})}createSetColor(e,t){return n=>{const r=lg(this.props.colors,n);this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:r,colors:o}=e;return(0,m.reduce)(n,((e,n,a)=>{const i=ig(o,r[a],r[`custom${(0,m.upperFirst)(a)}`]),l=t[a];return(null==l?void 0:l.color)===i.color&&l?e[a]=l:e[a]={...i,class:sg(n,i.slug)},e}),{})}render(){return(0,s.createElement)(e,(0,l.Z)({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function Kv(e){return function(){const t=$v(e);for(var n=arguments.length,r=new Array(n),o=0;o(e[t]=`custom${(0,m.upperFirst)(t)}`,e)),{});return(0,p.Z)((0,qa.Z)([(0,p.Z)((e=>t=>{const n=Zr("typography.fontSizes")||Qv;return(0,s.createElement)(e,(0,l.Z)({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,m.reduce)(r,((e,t,n)=>(e[`set${(0,m.upperFirst)(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const r=(0,m.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:o}=e;const a=(e,r)=>!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e]);if(!(0,m.some)(r,a))return null;const i=(0,m.reduce)((0,m.pickBy)(r,a),((e,t,r)=>{const a=n[r],i=Ab(o,a,n[t]);return e[r]={...i,class:zb(a)},e}),{});return{...t,...i}}render(){return(0,s.createElement)(e,(0,l.Z)({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var t_=n(81150),n_=n(88065),r_=n(199);const o_=[{icon:t_.Z,title:(0,E.__)("Align text left"),align:"left"},{icon:n_.Z,title:(0,E.__)("Align text center"),align:"center"},{icon:r_.Z,title:(0,E.__)("Align text right"),align:"right"}],a_={position:"bottom right",isAlternate:!0},i_=function(e){let{value:t,onChange:n,alignmentControls:r=o_,label:o=(0,E.__)("Align"),describedBy:a=(0,E.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:c}=e;function u(e){return()=>n(t===e?void 0:e)}const d=(0,m.find)(r,(e=>e.align===t)),p=c?g.Z:pr.Z,f=c?{isCollapsed:i}:{};return(0,s.createElement)(p,(0,l.Z)({icon:d?d.icon:(0,E.isRTL)()?r_.Z:t_.Z,label:o,toggleProps:{describedBy:a},popoverProps:a_,controls:r.map((e=>{const{align:n}=e,r=t===n;return{...e,isActive:r,role:i?"menuitemradio":void 0,onClick:u(n)}}))},f))},l_=e=>(0,s.createElement)(i_,(0,l.Z)({},e,{isToolbar:!1})),s_=e=>(0,s.createElement)(i_,(0,l.Z)({},e,{isToolbar:!0}));var c_=n(39409);const u_={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,b.Z)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(tr),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,a]=bm(t,m.noop),i=(0,s.useMemo)((()=>(e.trim()?Vm(r,o,a,e):(0,m.orderBy)(r,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,a]),l=(0,s.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ju,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[i]);return[l]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:(0,a.createBlock)(t,n,(0,a.createBlocksFromInnerBlocksTemplate)(r))}}};var d_=n(83130),m_=n(20897),p_=n(73903);const f_={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await(0,d_.Z)({path:(0,tp.f)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords:e=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)($o.Z,{key:"icon",icon:"page"===e.subtype?m_.Z:p_.Z}),e.title),getOptionCompletion:e=>(0,s.createElement)("a",{href:e.url},e.title)},h_=[];function g_(e){let{completers:t=h_}=e;const{name:n}=ar();return(0,s.useMemo)((()=>{let e=t;return(n===(0,a.getDefaultBlockName)()||(0,a.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=e.concat([u_,f_])),(0,i.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(m.clone)),e=(0,i.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}const b_=function(e){return(0,s.createElement)(c_.Z,(0,l.Z)({},e,{completers:g_(e)}))};var v_=n(90075);const __=function(e){let{isActive:t,label:n=(0,E.__)("Toggle full height"),onToggle:r,isDisabled:o}=e;return(0,s.createElement)(Qp.Z,{isActive:t,icon:v_.Z,label:n,onClick:()=>r(!t),disabled:o})};var y_=n(85522);const k_=function(e){const{label:t=(0,E.__)("Change matrix alignment"),onChange:n=m.noop,value:r="center",isDisabled:o}=e,a=(0,s.createElement)(y_.Z.Icon,{value:r});return(0,s.createElement)(Au.Z,{position:"bottom right",popoverProps:{isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:r}=e;return(0,s.createElement)(Qp.Z,{onClick:n,"aria-haspopup":"true","aria-expanded":r,onKeyDown:e=>{r||e.keyCode!==_u.DOWN||(e.preventDefault(),n())},label:t,icon:a,showTooltip:!0,disabled:o})},renderContent:()=>(0,s.createElement)(y_.Z,{hasFocusBorder:!1,onChange:n,value:r})})};var M_=n(62462);const w_=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:r}=(0,Yr.Z)(tr),{clientId:o,parents:a,hasSelection:i}=(0,b.Z)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:r}=e(tr),o=n();return{parents:r(o),clientId:o,hasSelection:!!t().clientId}}),[]),l=t||(0,E.__)("Document");return(0,s.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,E.__)("Block breadcrumb")},(0,s.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,s.createElement)(Er.Z,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:r},l),!i&&l,!!o&&(0,s.createElement)($o.Z,{icon:M_.Z,className:"block-editor-block-breadcrumb__separator"})),a.map((e=>(0,s.createElement)("li",{key:e},(0,s.createElement)(Er.Z,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,s.createElement)(Dp,{clientId:e,maximumLength:35})),(0,s.createElement)($o.Z,{icon:M_.Z,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,s.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,s.createElement)(Dp,{clientId:o,maximumLength:35})))};function E_(e){return(0,b.Z)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:r,canEditBlock:o}=t(tr);return!o(e)||!n(e)&&!r(e,!0)}),[e])}const x_=()=>(0,s.createElement)(Co.Wj,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,s.createElement)(Co.y$,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),C_=e=>{let{style:t,className:n}=e;return(0,s.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,s.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,s.createElement)(x_,null)))},S_=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:r,isOpen:o}=e;return(0,s.createElement)(g.Z,null,(0,s.createElement)(Qp.Z,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,E.__)("Open Colors Selector"),onClick:r,onKeyDown:e=>{o||e.keyCode!==_u.DOWN||(e.preventDefault(),r())},icon:(0,s.createElement)(n,null,(0,s.createElement)(t,null,(0,s.createElement)(C_,null)))}))}},T_=e=>{let{children:t,...n}=e;return(0,q.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,s.createElement)(Au.Z,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:S_(n),renderContent:()=>t})};var L_=n(7742),A_=n(58170),N_=n(52717),z_=n(89529),B_=n(97890);const O_=Gc(n(83631).Z);function D_(e){let{isSelected:t,position:n,level:r,rowCount:o,children:a,className:i,path:c,...u}=e;const m=tu({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:c});return(0,s.createElement)(O_,(0,l.Z)({ref:m,className:d()("block-editor-list-view-leaf",i),level:r,positionInSet:n,setSize:o},u),a)}function I_(e){let{onClick:t}=e;return(0,s.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,s.createElement)($o.Z,{icon:M_.Z}))}const P_=(0,s.forwardRef)((function(e,t){let{className:n,block:{clientId:r},onClick:o,onToggleExpanded:a,tabIndex:i,onFocus:l,onDragStart:c,onDragEnd:u,draggable:m}=e;const p=Bp(r),{isLocked:f}=Xf(r);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Er.Z,{className:d()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==_u.ENTER&&e.keyCode!==_u.SPACE||o(e)},ref:t,tabIndex:i,onFocus:l,onDragStart:e=>{e.dataTransfer.clearData(),null==c||c(e)},onDragEnd:u,draggable:m,href:`#block-${r}`,"aria-hidden":!0},(0,s.createElement)(I_,{onClick:a}),(0,s.createElement)(ju,{icon:null==p?void 0:p.icon,showColors:!0}),(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,s.createElement)(Dp,{clientId:r,maximumLength:35})),(null==p?void 0:p.anchor)&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor"},p.anchor),f&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,s.createElement)($o.Z,{icon:$f.Z}))))})),R_=(0,s.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:a,position:i,siblingBlockCount:c,level:u,isExpanded:m,selectedClientIds:p,...f}=e;const{clientId:h}=o,{blockMovingClientId:g,selectedBlockInBlockEditor:v}=(0,b.Z)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(tr);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[h]),_=g&&v===h,y=d()("block-editor-list-view-block-contents",{"is-dropping-before":_}),k=p.includes(h)?p:[h];return(0,s.createElement)(Ip,{clientIds:k},(e=>{let{draggable:d,onDragStart:p,onDragEnd:h}=e;return(0,s.createElement)(P_,(0,l.Z)({ref:t,className:y,block:o,onClick:n,onToggleExpanded:r,isSelected:a,position:i,siblingBlockCount:c,level:u,draggable:d,onDragStart:p,onDragEnd:h,isExpanded:m},f))}))})),Z_=R_,j_=(0,s.createContext)({}),H_=()=>(0,s.useContext)(j_),W_=(0,s.memo)((function e(t){let{block:n,isDragged:r,isSelected:o,isBranchSelected:i,selectBlock:l,position:c,level:u,rowCount:m,siblingBlockCount:p,showBlockMovers:f,path:h,isExpanded:g,selectedClientIds:v,preventAnnouncement:_}=t;const y=(0,s.useRef)(null),[k,M]=(0,s.useState)(!1),{clientId:w}=n,x=o&&v[0]===w,C=o&&v[v.length-1]===w,{toggleBlockHighlight:S}=(0,Yr.Z)(tr),T=Bp(w),L=(0,b.Z)((e=>e(tr).getBlockName(w)),[w]),A=(0,a.hasBlockSupport)(L,"__experimentalToolbar",!0),{isLocked:N}=Xf(w),z=`list-view-block-select-button__${(0,Aa.Z)(e)}`,B=((e,t,n)=>(0,E.sprintf)((0,E.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(c,p,u);let O=(0,E.__)("Link");T&&(O=N?(0,E.sprintf)((0,E.__)("%s link (locked)"),T.title):(0,E.sprintf)((0,E.__)("%s link"),T.title));const D=T?(0,E.sprintf)((0,E.__)("Options for %s block"),T.title):(0,E.__)("Options"),{isTreeGridMounted:I,expand:P,collapse:R}=H_(),Z=f&&p>0,j=d()("block-editor-list-view-block__mover-cell",{"is-visible":k||o}),H=d()("block-editor-list-view-block__menu-cell",{"is-visible":k||x});(0,s.useEffect)((()=>{!I&&o&&y.current.focus()}),[]);const W=(0,s.useCallback)((()=>{M(!0),S(w,!0)}),[w,M,S]),F=(0,s.useCallback)((()=>{M(!1),S(w,!1)}),[w,M,S]),q=(0,s.useCallback)((e=>{l(e,w),e.preventDefault()}),[w,l]),Y=(0,s.useCallback)((e=>{l(void 0,e)}),[l]),V=(0,s.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===g?R(w):!1===g&&P(w)}),[w,P,R,g]);let U;Z?U=2:A||(U=3);const $=d()({"is-selected":o,"is-first-selected":x,"is-last-selected":C,"is-branch-selected":i,"is-dragging":r,"has-single-cell":!A}),X=v.includes(w)?v:[w];return(0,s.createElement)(D_,{className:$,onMouseEnter:W,onMouseLeave:F,onFocus:W,onBlur:F,level:u,position:c,rowCount:m,path:h,id:`list-view-block-${w}`,"data-block":w,isExpanded:g,"aria-selected":!!o},(0,s.createElement)(z_.Z,{className:"block-editor-list-view-block__contents-cell",colSpan:U,ref:y,"aria-label":O,"aria-selected":!!o,"aria-expanded":g,"aria-describedby":z},(e=>{let{ref:t,tabIndex:r,onFocus:a}=e;return(0,s.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,s.createElement)(Z_,{block:n,onClick:q,onToggleExpanded:V,isSelected:o,position:c,siblingBlockCount:p,level:u,ref:t,tabIndex:r,onFocus:a,isExpanded:g,selectedClientIds:v,preventAnnouncement:_}),(0,s.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:z},B))})),Z&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(z_.Z,{className:j,withoutGridItem:!0},(0,s.createElement)(B_.Z,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,s.createElement)(Gp,{orientation:"vertical",clientIds:[w],ref:t,tabIndex:n,onFocus:r})})),(0,s.createElement)(B_.Z,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,s.createElement)(Kp,{orientation:"vertical",clientIds:[w],ref:t,tabIndex:n,onFocus:r})})))),A&&(0,s.createElement)(z_.Z,{className:H,"aria-selected":!!o},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,s.createElement)(ah,{clientIds:X,icon:Lf.Z,label:D,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:Y})})))}));function F_(e,t,n,r){var o;return(null==n?void 0:n.includes(e.clientId))?0:(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(q_(t,n,r),0):1}const q_=(e,t,n)=>(r,o)=>{var a;return(null==t?void 0:t.includes(o.clientId))?r:(null!==(a=e[o.clientId])&&void 0!==a?a:n)&&o.innerBlocks.length>0?r+F_(o,e,t,n):r+1};function Y_(e){const{blocks:t,selectBlock:n,showBlockMovers:r,selectedClientIds:o,level:a=1,path:i="",isBranchSelected:l=!1,listPosition:c=0,fixedListWindow:u,isExpanded:d}=e,{expandedState:p,draggedClientIds:f}=H_(),h=(0,m.compact)(t),g=h.length;let b=c;return(0,s.createElement)(s.Fragment,null,h.map(((e,t)=>{var c;const{clientId:v,innerBlocks:_}=e;t>0&&(b+=F_(h[t-1],p,f,d));const{itemInView:y}=u,k=y(b),M=t+1,w=i.length>0?`${i}_${M}`:`${M}`,E=!(null==_||!_.length),x=E?null!==(c=p[v])&&void 0!==c?c:d:void 0,C=!(null==f||!f.includes(v)),S=C||k,T=((e,t)=>(0,m.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e)(v,o),L=l||T&&E;return(0,s.createElement)(Pa.ZP,{key:v,value:!T},S&&(0,s.createElement)(W_,{block:e,selectBlock:n,isSelected:T,isBranchSelected:L,isDragged:C,level:a,position:M,rowCount:g,siblingBlockCount:g,showBlockMovers:r,path:w,isExpanded:x,listPosition:b,selectedClientIds:o}),!S&&(0,s.createElement)("tr",null,(0,s.createElement)("td",{className:"block-editor-list-view-placeholder"})),E&&x&&!C&&(0,s.createElement)(Y_,{blocks:_,selectBlock:n,showBlockMovers:r,level:a+1,path:w,listPosition:b+1,fixedListWindow:u,isBranchSelected:L,selectedClientIds:o,isExpanded:d}))})))}Y_.defaultProps={selectBlock:()=>{}};const V_=(0,s.memo)(Y_);function U_(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:a}=n||{},[i,l]=(0,s.useMemo)((()=>t.current?[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]:[]),[r,o]),c=l||i,u=(0,s.useCallback)((()=>{if(!i)return 0;const e=c.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,c]),d=(0,s.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),m=(0,s.useCallback)((()=>{if(!c)return{};const e=c.ownerDocument,t=c.getBoundingClientRect(),n=u(),r={left:t.left+n,right:t.right,width:0,height:t.height,ownerDocument:e};return"top"===a?{...r,top:t.top,bottom:t.top}:"bottom"===a||"inside"===a?{...r,top:t.bottom,bottom:t.bottom}:{}}),[c,a,u]);return c?(0,s.createElement)(ro.Z,{animate:!1,getAnchorRect:m,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,s.createElement)("div",{style:d,className:"block-editor-list-view-drop-indicator__line"})):null}function $_(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const X_=["top","bottom"];const G_=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e,K_=(0,s.forwardRef)((function(e,t){let{id:n,blocks:r,showBlockMovers:o=!1,isExpanded:i=!1}=e;const{clientIdsTree:l,draggedClientIds:c,selectedClientIds:u}=function(e){return(0,b.Z)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(tr);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(r),{visibleBlockCount:d}=(0,b.Z)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(tr),r=(null==c?void 0:c.length)>0?n(c).length+1:0;return{visibleBlockCount:t()-r}}),[c]),{updateBlockSelection:p}=function(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,Yr.Z)(tr),{getBlockName:r,getBlockParents:o,getBlockSelectionStart:i,getBlockSelectionEnd:l,getSelectedBlockClientIds:c,hasMultiSelection:u,hasSelectedBlock:d}=(0,b.Z)(tr),{getBlockType:p}=(0,b.Z)(a.store),f=(0,s.useCallback)((async(a,l,s)=>{if(null==a||!a.shiftKey)return await e(),void n(l);a.preventDefault();const f="keydown"===a.type&&(a.keyCode===_u.UP||a.keyCode===_u.DOWN||a.keyCode===_u.HOME||a.keyCode===_u.END);if(!f&&!d()&&!u())return void n(l,null);const h=c(),g=[...o(l),l];f&&!h.some((e=>g.includes(e)))&&await e();let b=i(),v=l;f&&(d()||u()||(b=l),s&&(v=s));const _=o(b),y=o(v),{start:k,end:M}=function(e,t,n,r){const o=[...n,e],a=[...r,t],i=Math.min(o.length,a.length)-1;return{start:o[i],end:a[i]}}(b,v,_,y);await t(k,M,null);const w=c();if((a.keyCode===_u.HOME||a.keyCode===_u.END)&&w.length>1)return;const x=(0,m.difference)(h,w);let C;if(1===x.length){var S;const e=null===(S=p(r(x[0])))||void 0===S?void 0:S.title;e&&(C=(0,E.sprintf)((0,E.__)("%s deselected."),e))}else x.length>1&&(C=(0,E.sprintf)((0,E.__)("%s blocks deselected."),x.length));C&&(0,Vt.D)(C)}),[e,r,p,o,i,l,c,u,d,t,n]);return{updateBlockSelection:f}}(),[f,h]=(0,s.useReducer)(G_,{}),{ref:g,target:v}=function(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,b.Z)(tr),[a,i]=(0,s.useState)(),{rootClientId:l,blockIndex:c}=a||{},u=Sh(l,c),d=r(),m=(0,xh.Z)((0,s.useCallback)(((r,a)=>{const l={x:r.clientX,y:r.clientY},s=!(null==d||!d.length),c=function(e,t){let n,r,o,a;for(const i of e){if(i.isDraggedBlock)continue;const l=i.element.getBoundingClientRect(),[s,c]=Lh(t,l,X_),u=$_(t,l);if(void 0===o||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,a)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const l=i?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+l,dropPosition:n}}(Array.from(a.querySelectorAll("[data-block]")).map((r=>{const a=r.dataset.block,i=e(a);return{clientId:a,rootClientId:i,blockIndex:t(a),element:r,isDraggedBlock:!!s&&d.includes(a),innerBlockCount:n(a),canInsertDraggedBlocksAsSibling:!s||o(d,i),canInsertDraggedBlocksAsChild:!s||o(d,a)}})),l);c&&i(c)}),[d]),200);return{ref:(0,Ch.Z)({onDrop:u,onDragOver(e){m(e,e.currentTarget)},onDragEnd(){m.cancel(),i(null)}}),target:a}}(),_=(0,s.useRef)(),y=(0,Za.Z)([_,g,t]),k=(0,s.useRef)(!1),{setSelectedTreeId:M}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,s.useState)(null),{selectedBlockParentClientIds:a}=(0,b.Z)((e=>{const{getBlockParents:n}=e(tr);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),i=Array.isArray(a)&&a.length?a:null;return(0,s.useEffect)((()=>{r!==t&&i&&n({type:"expand",clientIds:a})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:u[0],setExpandedState:h}),w=(0,s.useCallback)(((e,t)=>{p(e,t),M(t)}),[M,p]);(0,s.useEffect)((()=>{k.current=!0}),[]);const[x]=(0,A_.Z)(_,36,d,{useWindowing:!0,windowOverscan:40}),C=(0,s.useCallback)((e=>{e&&h({type:"expand",clientIds:[e]})}),[h]),S=(0,s.useCallback)((e=>{e&&h({type:"collapse",clientIds:[e]})}),[h]),T=(0,s.useCallback)((e=>{var t;C(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[C]),L=(0,s.useCallback)((e=>{var t;S(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[S]),A=(0,s.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&p(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[p]),N=(0,s.useMemo)((()=>({isTreeGridMounted:k.current,draggedClientIds:c,expandedState:f,expand:C,collapse:S})),[k.current,c,f,C,S]);return(0,s.createElement)(Pa.ZP,{value:!0},(0,s.createElement)(U_,{listViewRef:_,blockDropTarget:v}),(0,s.createElement)(N_.ZP,{id:n,className:"block-editor-list-view-tree","aria-label":(0,E.__)("Block navigation structure"),ref:y,onCollapseRow:L,onExpandRow:T,onFocusRow:A},(0,s.createElement)(j_.Provider,{value:N},(0,s.createElement)(V_,{blocks:l,selectBlock:w,showBlockMovers:o,fixedListWindow:x,selectedClientIds:u,isExpanded:i}))))}));function J_(e){let{isEnabled:t,onToggle:n,isOpen:r,innerRef:o,...a}=e;return(0,s.createElement)(Er.Z,(0,l.Z)({},a,{ref:o,icon:L_.Z,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,E.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}const Q_=(0,s.forwardRef)((function(e,t){let{isDisabled:n,...r}=e;(0,q.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,b.Z)((e=>!!e(tr).getBlockCount()),[])&&!n;return(0,s.createElement)(Au.Z,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:a}=e;return(0,s.createElement)(J_,(0,l.Z)({},r,{innerRef:t,isOpen:n,onToggle:a,isEnabled:o}))},renderContent:()=>(0,s.createElement)("div",{className:"block-editor-block-navigation__container"},(0,s.createElement)("p",{className:"block-editor-block-navigation__label"},(0,E.__)("List view")),(0,s.createElement)(K_,null))})}));function ey(e){let{genericPreviewBlock:t,style:n,className:r,activeStyle:o}=e;const a=pf(r,o,n),i=(0,s.useMemo)((()=>({...t,title:n.label||n.name,description:n.description,initialAttributes:{...t.attributes,className:a+" block-editor-block-styles__block-preview-container"}})),[t,a]);return(0,s.createElement)(tm,{item:i,isStylePreview:!0})}function ty(e){let{children:t,scope:n,...r}=e;return(0,s.createElement)(v.de,{name:`BlockStylesPreviewPanel/${n}`},(0,s.createElement)("div",r,t))}function ny(e){let{clientId:t,onSwitch:n=m.noop,onHoverClassName:r=m.noop,scope:o}=e;const{onSelect:a,stylesToRender:i,activeStyle:l,genericPreviewBlock:c,className:u}=hf({clientId:t,onSwitch:n}),[p,f]=(0,s.useState)(null),[h,g]=(0,s.useState)(0),b=(0,Ra.Z)("medium","<");if((0,s.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;g(t+16)}),[p]),!i||0===i.length)return null;const v=(0,m.debounce)(f,250),_=e=>{var t;p!==e?(v(e),r(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):v.cancel()};return(0,s.createElement)("div",{className:"block-editor-block-styles"},(0,s.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.label||e.name;return(0,s.createElement)(Er.Z,{className:d()("block-editor-block-styles__item",{"is-active":l.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>_(e),onFocus:()=>_(e),onMouseLeave:()=>_(null),onBlur:()=>_(null),onClick:()=>(e=>{a(e),r(null),f(null),v.cancel()})(e),"aria-current":l.name===e.name},(0,s.createElement)(uf.Z,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},t))}))),p&&!b&&(0,s.createElement)(ty,{scope:o,className:"block-editor-block-styles__preview-panel",style:{top:h},onMouseLeave:()=>_(null)},(0,s.createElement)(ey,{activeStyle:l,className:u,genericPreviewBlock:c,style:p})))}ny.Slot=function(e){let{scope:t}=e;return(0,s.createElement)(v.g7,{name:`BlockStylesPreviewPanel/${t}`})};const ry=ny;var oy=n(93391),ay=n(55332);const iy=function(e){let{icon:t=ay.Z,label:n=(0,E.__)("Choose variation"),instructions:r=(0,E.__)("Select a variation to start with."),variations:o,onSelect:a,allowSkip:i}=e;const l=d()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,s.createElement)(oy.Z,{icon:t,label:n,instructions:r,className:l},(0,s.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,E.__)("Block variations")},o.map((e=>(0,s.createElement)("li",{key:e.name},(0,s.createElement)(Er.Z,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>a(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,s.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),i&&(0,s.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,s.createElement)(Er.Z,{variant:"link",onClick:()=>a()},(0,E.__)("Skip"))))};var ly=n(55186);const sy="carousel",cy="grid",uy=e=>{let{onStartBlank:t,onBlockPatternSelect:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},t&&(0,s.createElement)(Er.Z,{onClick:t},(0,E.__)("Start blank")),(0,s.createElement)(Er.Z,{variant:"primary",onClick:n},(0,E.__)("Choose")))},dy=e=>{let{handlePrevious:t,handleNext:n,activeSlide:r,totalSlides:o}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,s.createElement)(Er.Z,{icon:qp.Z,label:(0,E.__)("Previous pattern"),onClick:t,disabled:0===r}),(0,s.createElement)(Er.Z,{icon:Fp.Z,label:(0,E.__)("Next pattern"),onClick:n,disabled:r===o-1}))},my=e=>{let{viewMode:t,setViewMode:n,handlePrevious:r,handleNext:o,activeSlide:a,totalSlides:i,onBlockPatternSelect:l,onStartBlank:c}=e;const u=t===sy,d=(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,s.createElement)(Er.Z,{icon:da.Z,label:(0,E.__)("Carousel view"),onClick:()=>n(sy),isPressed:u}),(0,s.createElement)(Er.Z,{icon:ly.Z,label:(0,E.__)("Grid view"),onClick:()=>n(cy),isPressed:t===cy}));return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},u&&(0,s.createElement)(dy,{handlePrevious:r,handleNext:o,activeSlide:a,totalSlides:i}),d,u&&(0,s.createElement)(uy,{onBlockPatternSelect:l,onStartBlank:c}))},py=e=>{let{viewMode:t,activeSlide:n,patterns:r,onBlockPatternSelect:o,height:a}=e;const i=(0,vm.u)(),c="block-editor-block-pattern-setup__container";if(t===sy){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__carousel",style:{height:a}},(0,s.createElement)("div",{className:c},(0,s.createElement)("ul",{className:"carousel-container"},r.map(((t,n)=>(0,s.createElement)(hy,{className:e.get(n)||"",key:t.name,pattern:t,minHeight:a}))))))}return(0,s.createElement)("div",{style:{height:a},className:"block-editor-block-pattern-setup__grid"},(0,s.createElement)(Cm.b,(0,l.Z)({},i,{role:"listbox",className:c,"aria-label":(0,E.__)("Patterns list")}),r.map((e=>(0,s.createElement)(fy,{key:e.name,pattern:e,onSelect:o,composite:i})))))};function fy(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-pattern-setup-list",{blocks:a,description:i,viewportWidth:c=700}=t,u=(0,Aa.Z)(fy,`${o}__item-description`);return(0,s.createElement)("div",{className:`${o}__list-item`,"aria-label":t.title,"aria-describedby":t.description?u:void 0},(0,s.createElement)(rm.A,(0,l.Z)({role:"option",as:"div"},r,{className:`${o}__item`,onClick:()=>n(a)}),(0,s.createElement)(Qd,{blocks:a,viewportWidth:c})),!!i&&(0,s.createElement)(zu.Z,{id:u},i))}function hy(e){let{className:t,pattern:n,minHeight:r}=e;const{blocks:o,title:a,description:i}=n,l=(0,Aa.Z)(hy,"block-editor-block-pattern-setup-list__item-description");return(0,s.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":a,"aria-describedby":i?l:void 0},(0,s.createElement)(Qd,{blocks:o,__experimentalMinHeight:r}),!!i&&(0,s.createElement)(zu.Z,{id:l},i))}const gy=e=>{let{clientId:t,blockName:n,filterPatternsFn:r,startBlankComponent:o,onBlockPatternSelect:i}=e;const[l,c]=(0,s.useState)(sy),[u,d]=(0,s.useState)(0),[m,p]=(0,s.useState)(!1),{replaceBlock:f}=(0,Yr.Z)(tr),h=function(e,t,n){return(0,b.Z)((r=>{const{getBlockRootClientId:o,__experimentalGetPatternsByBlockTypes:a,__experimentalGetAllowedPatterns:i}=r(tr),l=o(e);return n?i(l).filter(n):a(t,l)}),[e,t,n])}(t,n,r),[g,{height:v}]=(0,Ku.Z)();if(null==h||!h.length||m)return o;const _=i||(e=>{const n=e.map((e=>(0,a.cloneBlock)(e)));f(t,n)}),y=o?()=>{p(!0)}:void 0;return(0,s.createElement)(s.Fragment,null,g,(0,s.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${l}`},(0,s.createElement)(py,{viewMode:l,activeSlide:u,patterns:h,onBlockPatternSelect:_,height:v-120}),(0,s.createElement)(my,{viewMode:l,setViewMode:c,activeSlide:u,totalSlides:h.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{_(h[u].blocks)},onStartBlank:y})))};var by=n(45085);function vy(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;return(0,s.createElement)("fieldset",{className:t},(0,s.createElement)(zu.Z,{as:"legend"},(0,E.__)("Transform to variation")),o.map((e=>(0,s.createElement)(Er.Z,{key:e.name,icon:(0,s.createElement)(ju,{icon:e.icon,showColors:!0}),isPressed:r===e.name,label:r===e.name?e.title:(0,E.sprintf)((0,E.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function _y(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;const a=o.map((e=>{let{name:t,title:n,description:r}=e;return{value:t,label:n,info:r}}));return(0,s.createElement)(ti.Z,{className:t,label:(0,E.__)("Transform to variation"),text:(0,E.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:Vp.Z,toggleProps:{iconPosition:"right"}},(()=>(0,s.createElement)("div",{className:`${t}__container`},(0,s.createElement)(fr.Z,null,(0,s.createElement)(by.Z,{choices:a,value:r,onSelect:n})))))}const yy=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,Yr.Z)(tr),{activeBlockVariation:r,variations:o}=(0,b.Z)((e=>{const{getActiveBlockVariation:n,getBlockVariations:r}=e(a.store),{getBlockName:o,getBlockAttributes:i}=e(tr),l=t&&o(t);return{activeBlockVariation:n(l,i(t)),variations:l&&r(l,"transform")}}),[t]),i=null==r?void 0:r.name,l=(0,s.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===o.length)}),[o]);if(null==o||!o.length)return null;const c=l?vy:_y;return(0,s.createElement)(c,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...o.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:i,variations:o})},ky=(0,p.Z)((e=>t=>{const n=Zr("color.palette"),r=!Zr("color.custom"),o=void 0===t.colors?n:t.colors,a=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!(0,m.isEmpty)(o)||!a;return(0,s.createElement)(e,(0,l.Z)({},t,{colors:o,disableCustomColors:a,hasColorsToChoose:i}))}),"withColorContext"),My=ky(Og.ZP);function wy(e){let{onChange:t,value:n,...r}=e;return(0,s.createElement)(Zg,(0,l.Z)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Ey=n(65741);const xy=new Date(2022,0,25);function Cy(e){let{format:t,defaultFormat:n,onChange:r}=e;return(0,s.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,s.createElement)(zu.Z,{as:"legend"},(0,E.__)("Date format")),(0,s.createElement)(xr.Z,{label:(0,s.createElement)(s.Fragment,null,(0,E.__)("Default format"),(0,s.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,Ey.K_)(n,xy))),checked:!t,onChange:e=>r(e?null:n)}),t&&(0,s.createElement)(Sy,{format:t,onChange:r}))}function Sy(e){var t;let{format:n,onChange:r}=e;const o=(0,m.uniq)(["Y-m-d",(0,E._x)("n/j/Y","short date format"),(0,E._x)("n/j/Y g:i A","short date format with time"),(0,E._x)("M j, Y","medium date format"),(0,E._x)("M j, Y g:i A","medium date format with time"),(0,E._x)("F j, Y","long date format")]),a=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,Ey.K_)(e,xy),format:e}))),i={key:"custom",name:(0,E.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,E.__)("Enter your own date format")},[l,c]=(0,s.useState)((()=>!!n&&!o.includes(n)));return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ag.ZP,{className:"block-editor-date-format-picker__custom-format-select-control"},(0,s.createElement)(cb.Z,{label:(0,E.__)("Choose a format"),options:[...a,i],value:l?i:null!==(t=a.find((e=>e.format===n)))&&void 0!==t?t:i,onChange:e=>{let{selectedItem:t}=e;t===i?c(!0):(c(!1),r(t.format))}})),l&&(0,s.createElement)(Ma.Z,{label:(0,E.__)("Custom format"),hideLabelFromVision:!0,help:(0,Ou.Z)((0,E.__)("Enter a date or time format string."),{Link:(0,s.createElement)(wa.Z,{href:(0,E.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>r(e)}))}var Ty=n(38322);const Ly=["colors","disableCustomColors","gradients","disableCustomGradients"],Ay=e=>{let{className:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:a,children:i,settings:l,title:c,showTitle:u=!0,__experimentalHasMultipleOrigins:p,__experimentalIsRenderedInSidebar:f,enableAlpha:h}=e;const g=(0,Aa.Z)(Ay),{batch:b}=(0,Vu.Z)();return(0,m.isEmpty)(n)&&(0,m.isEmpty)(r)&&o&&a&&(0,m.every)(l,(e=>(0,m.isEmpty)(e.colors)&&(0,m.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?null:(0,s.createElement)(qr.Z,{className:d()("block-editor-panel-color-gradient-settings",t),label:u?c:void 0,resetAll:()=>{b((()=>{l.forEach((e=>{let{colorValue:t,gradientValue:n,onColorChange:r,onGradientChange:o}=e;t?r():n&&o()}))}))},panelId:g,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,s.createElement)(Fg,{settings:l,panelId:g,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:a,__experimentalHasMultipleOrigins:p,__experimentalIsRenderedInSidebar:f,enableAlpha:h}),!!i&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ty.Z,{marginY:4})," ",i))},Ny=e=>{const t=cg();return t.colors=Zr("color.palette"),t.gradients=Zr("color.gradients"),(0,s.createElement)(Ay,(0,l.Z)({},t,e))},zy=e=>{const t=ug();return(0,s.createElement)(Ay,(0,l.Z)({},t,e))},By=e=>(0,m.every)(Ly,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(Ay,e):e.__experimentalHasMultipleOrigins?(0,s.createElement)(zy,e):(0,s.createElement)(Ny,e);var Oy=function(e,t){return Oy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Oy(e,t)},Dy=function(){return Dy=Object.assign||function(e){for(var t,n=1,r=arguments.length;nu*o?{width:u*o,height:u}:{width:c,height:c/o}}function Zy(e,t,n,r,o){void 0===o&&(o=0);var a=Xy(t.width,t.height,o),i=a.width,l=a.height;return{x:jy(e.x,i,n.width,r),y:jy(e.y,l,n.height,r)}}function jy(e,t,n,r){var o=t*r/2-n/2;return Math.min(o,Math.max(e,-o))}function Hy(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Wy(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function Fy(e,t,n,r,o,a,i){void 0===a&&(a=0),void 0===i&&(i=!0);var l=i&&0===a?qy:Yy,s={x:l(100,((t.width-n.width/o)/2-e.x/o)/t.width*100),y:l(100,((t.height-n.height/o)/2-e.y/o)/t.height*100),width:l(100,n.width/t.width*100/o),height:l(100,n.height/t.height*100/o)},c=Math.round(l(t.naturalWidth,s.width*t.naturalWidth/100)),u=Math.round(l(t.naturalHeight,s.height*t.naturalHeight/100)),d=t.naturalWidth>=t.naturalHeight*r?{width:Math.round(u*r),height:u}:{width:c,height:Math.round(c/r)};return{croppedAreaPercentages:s,croppedAreaPixels:Dy(Dy({},d),{x:Math.round(l(t.naturalWidth-d.width,s.x*t.naturalWidth/100)),y:Math.round(l(t.naturalHeight-d.height,s.y*t.naturalHeight/100))})}}function qy(e,t){return Math.min(e,Math.max(0,t))}function Yy(e,t){return t}function Vy(e,t,n){var r=t.width/t.naturalWidth,o=function(e,t,n){var r=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/r/e.height:n.width/r/e.width;var o=e.width/e.height;return t.naturalWidth>=t.naturalHeight*o?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),a=r*o;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*a,y:((t.naturalHeight-e.height)/2-e.y)*a},zoom:o}}function Uy(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function $y(e,t,n,r,o){var a=Math.cos,i=Math.sin,l=o*Math.PI/180;return[(e-n)*a(l)-(t-r)*i(l)+n,(e-n)*i(l)+(t-r)*a(l)+r]}function Xy(e,t,n){var r=e/2,o=t/2,a=[$y(0,0,r,o,n),$y(e,0,r,o,n),$y(e,t,r,o,n),$y(0,t,r,o,n)],i=Math.min.apply(Math,a.map((function(e){return e[0]}))),l=Math.max.apply(Math,a.map((function(e){return e[0]}))),s=Math.min.apply(Math,a.map((function(e){return e[1]})));return{width:l-i,height:Math.max.apply(Math,a.map((function(e){return e[1]})))-s}}function Gy(){for(var e=[],t=0;t0})).join(" ").trim()}var Ky=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,r=e.cropSize;if(t){var o=Vy(t,n.mediaSize,r),a=o.crop,i=o.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e,t,r,o,a,i,l=n.imageRef||n.videoRef;if(l&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.mediaSize={width:l.offsetWidth,height:l.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(r=n.imageRef)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef)||void 0===o?void 0:o.videoHeight)||0};var s=n.props.cropSize?n.props.cropSize:Ry(l.offsetWidth,l.offsetHeight,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);(null===(a=n.state.cropSize)||void 0===a?void 0:a.height)===s.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===s.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(s),n.setState({cropSize:s},n.recomputeCropPosition)}},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,r,o=e.x,a=e.y;n.dragStartPosition={x:o,y:a},n.dragStartCrop=Dy({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,a={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},i=n.props.restrictPosition?Zy(a,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):a;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var r=t.getMousePoint(e),o=Py()(e).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,r),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=window.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,a=o.crop,i=o.zoom;return{x:(t+a.x)/i,y:(r+a.y)/i}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var r=n.getPointOnContainer(t),o=n.getPointOnMedia(r),a=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),i={x:o.x*a-r.x,y:o.y*a-r.y},l=n.props.restrictPosition?Zy(i,n.mediaSize,n.state.cropSize,a,n.props.rotation):i;n.props.onCropChange(l),n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?Fy(n.props.restrictPosition?Zy(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?Zy(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}Oy(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){var e;window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,r,o,a,i,l,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(a=e.crop)||void 0===a?void 0:a.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(l=e.crop)||void 0===l?void 0:l.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=Hy(n,r),this.lastPinchRotation=Wy(n,r),this.onDragStart(Uy(n,r))},t.prototype.onPinchMove=function(e){var n=this,r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),a=Uy(r,o);this.onDrag(a),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=Hy(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,a),n.lastPinchDistance=e;var i=Wy(r,o),l=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(l),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,r=t.video,o=t.mediaProps,a=t.transform,i=t.crop,l=i.x,s=i.y,u=t.rotation,d=t.zoom,m=t.cropShape,p=t.showGrid,f=t.style,h=f.containerStyle,g=f.cropAreaStyle,b=f.mediaStyle,v=t.classes,_=v.containerClassName,y=v.cropAreaClassName,k=v.mediaClassName,M=t.objectFit;return c().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:h,className:Gy("reactEasyCrop_Container",_)},n?c().createElement("img",Dy({alt:"",className:Gy("reactEasyCrop_Image","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical",k)},o,{src:n,ref:function(t){return e.imageRef=t},style:Dy(Dy({},b),{transform:a||"translate("+l+"px, "+s+"px) rotate("+u+"deg) scale("+d+")"}),onLoad:this.onMediaLoad})):r&&c().createElement("video",Dy({autoPlay:!0,loop:!0,muted:!0,className:Gy("reactEasyCrop_Video","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical",k)},o,{ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:Dy(Dy({},b),{transform:a||"translate("+l+"px, "+s+"px) rotate("+u+"deg) scale("+d+")"}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map((function(e){return c().createElement("source",Dy({key:e.src},e))}))),this.state.cropSize&&c().createElement("div",{style:Dy(Dy({},g),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Gy("reactEasyCrop_CropArea","round"===m&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",y)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(c().Component);const Jy=Ky;var Qy=n(89411);const ek={position:"bottom right",isAlternate:!0};var tk=n(31550);const nk=(0,s.createContext)({}),rk=()=>(0,s.useContext)(nk);function ok(e){let{id:t,url:n,naturalWidth:r,naturalHeight:o,isEditing:a,onFinishEditing:l,onSaveImage:c,children:u}=e;const d=function(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:r}=e;const[o,a]=(0,s.useState)(),[l,c]=(0,s.useState)(),[u,d]=(0,s.useState)({x:0,y:0}),[m,p]=(0,s.useState)(),[f,h]=(0,s.useState)(),[g,b]=(0,s.useState)(),[v,_]=(0,s.useState)(),y=(0,s.useCallback)((()=>{d({x:0,y:0}),p(100),h(0),b(n/r),_(n/r)}),[n,r,d,p,h,b,_]),k=(0,s.useCallback)((()=>{const e=(f+90)%360;let o=n/r;if(f%180==90&&(o=r/n),0===e)return a(),h(e),b(1/g),void d({x:-u.y*o,y:u.x*o});const l=new window.Image;l.src=t,l.onload=function(t){const n=document.createElement("canvas");let r=0,i=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(r=n.width),270!==e&&180!==e||(i=n.height);const l=n.getContext("2d");l.translate(r,i),l.rotate(e*Math.PI/180),l.drawImage(t.target,0,0),n.toBlob((t=>{a(URL.createObjectURL(t)),h(e),b(1/g),d({x:-u.y*o,y:u.x*o})}))};const s=(0,i.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof s&&(l.crossOrigin=s)}),[f,n,r,a,h,b,d]);return(0,s.useMemo)((()=>({editedUrl:o,setEditedUrl:a,crop:l,setCrop:c,position:u,setPosition:d,zoom:m,setZoom:p,rotation:f,setRotation:h,rotateClockwise:k,aspect:g,setAspect:b,defaultAspect:v,initializeTransformValues:y})),[o,a,l,c,u,d,m,p,f,h,k,g,b,v,y])}(e),{initializeTransformValues:r}=n;return(0,s.useEffect)((()=>{t&&r()}),[t,r]),n}({url:n,naturalWidth:r,naturalHeight:o},a),m=function(e){let{crop:t,rotation:n,height:r,width:o,aspect:a,url:i,id:l,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:d}=(0,Yr.Z)(Em.store),[m,p]=(0,s.useState)(!1),f=(0,s.useCallback)((()=>{p(!1),u()}),[p,u]),h=(0,s.useCallback)((()=>{p(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=i,(0,d_.Z)({path:`/wp/v2/media/${l}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:r&&o?o/a:void 0})})).catch((e=>{d((0,E.sprintf)((0,E.__)("Could not edit image. %s"),(0,tk.Z)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{p(!1),u()}))}),[p,t,n,r,o,a,i,c,d,p,u]);return(0,s.useMemo)((()=>({isInProgress:m,apply:h,cancel:f})),[m,h,f])}({id:t,url:n,onSaveImage:c,onFinishEditing:l,...d}),p=(0,s.useMemo)((()=>({...d,...m})),[d,m]);return(0,s.createElement)(nk.Provider,{value:p},u)}function ak(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:a,naturalWidth:i}=e;const{isInProgress:l,editedUrl:c,position:u,zoom:m,aspect:p,setPosition:f,setCrop:h,setZoom:g,rotation:b}=rk();let v=r||o*a/i;return b%180==90&&(v=o*i/a),(0,s.createElement)("div",{className:d()("wp-block-image__crop-area",{"is-applying":l}),style:{width:n||o,height:v}},(0,s.createElement)(Jy,{image:c||t,disabled:l,minZoom:1,maxZoom:3,crop:u,zoom:m/100,aspect:p,onCropChange:f,onCropComplete:e=>{h(e)},onZoomChange:e=>{g(100*e)}}),l&&(0,s.createElement)(Qy.Z,null))}var ik=n(12395);function lk(){const{isInProgress:e,zoom:t,setZoom:n}=rk();return(0,s.createElement)(Au.Z,{contentClassName:"wp-block-image__zoom",popoverProps:ek,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,s.createElement)(Qp.Z,{icon:ik.Z,label:(0,E.__)("Zoom"),onClick:r,"aria-expanded":n,disabled:e})},renderContent:()=>(0,s.createElement)(Yh.Z,{label:(0,E.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var sk=n(48845);function ck(e){let{aspectRatios:t,isDisabled:n,label:r,onClick:o,value:a}=e;return(0,s.createElement)(fr.Z,{label:r},t.map((e=>{let{title:t,aspect:r}=e;return(0,s.createElement)(hr.Z,{key:r,disabled:n,onClick:()=>{o(r)},role:"menuitemradio",isSelected:r===a,icon:r===a?df.Z:void 0},t)})))}function uk(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:r,setAspect:o,defaultAspect:a}=rk();return(0,s.createElement)(ti.Z,{icon:sk.Z,label:(0,E.__)("Aspect Ratio"),popoverProps:ek,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ck,{isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,E.__)("Original"),aspect:a},{title:(0,E.__)("Square"),aspect:1}]}),(0,s.createElement)(ck,{label:(0,E.__)("Landscape"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,E.__)("16:10"),aspect:1.6},{title:(0,E.__)("16:9"),aspect:16/9},{title:(0,E.__)("4:3"),aspect:4/3},{title:(0,E.__)("3:2"),aspect:1.5}]}),(0,s.createElement)(ck,{label:(0,E.__)("Portrait"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,E.__)("10:16"),aspect:.625},{title:(0,E.__)("9:16"),aspect:9/16},{title:(0,E.__)("3:4"),aspect:3/4},{title:(0,E.__)("2:3"),aspect:2/3}]}))}))}var dk=n(50269);function mk(){const{isInProgress:e,rotateClockwise:t}=rk();return(0,s.createElement)(Qp.Z,{icon:dk.Z,label:(0,E.__)("Rotate"),onClick:t,disabled:e})}function pk(){const{isInProgress:e,apply:t,cancel:n}=rk();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Qp.Z,{onClick:t,disabled:e},(0,E.__)("Apply")),(0,s.createElement)(Qp.Z,{onClick:n},(0,E.__)("Cancel")))}function fk(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:a,naturalWidth:i}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ak,{url:t,width:n,height:r,clientWidth:o,naturalHeight:a,naturalWidth:i}),(0,s.createElement)(mr,null,(0,s.createElement)(g.Z,null,(0,s.createElement)(lk,null),(0,s.createElement)(Wp.Z,null,(e=>(0,s.createElement)(uk,{toggleProps:e}))),(0,s.createElement)(mk,null)),(0,s.createElement)(g.Z,null,(0,s.createElement)(pk,null))))}const hk=[25,50,75,100];function gk(e){let{imageWidth:t,imageHeight:n,imageSizeOptions:r=[],isResizable:o=!0,slug:a,width:i,height:l,onChange:c,onChangeImage:u=m.noop}=e;const{currentHeight:d,currentWidth:p,updateDimension:f,updateDimensions:h}=function(e,t,n,r,o){var a,i;const[l,c]=(0,s.useState)(null!==(a=null!=t?t:r)&&void 0!==a?a:""),[u,d]=(0,s.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,s.useEffect)((()=>{void 0===t&&void 0!==r&&c(r),void 0===e&&void 0!==n&&d(n)}),[r,n]),(0,s.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(l)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:l,updateDimension:(e,t)=>{"width"===e?c(t):d(t),o({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),c(null!=t?t:r),o({height:e,width:t})}}}(l,i,n,t,c);return(0,s.createElement)(s.Fragment,null,!(0,m.isEmpty)(r)&&(0,s.createElement)(Mm.Z,{label:(0,E.__)("Image size"),value:a,options:r,onChange:u}),o&&(0,s.createElement)("div",{className:"block-editor-image-size-control"},(0,s.createElement)("p",{className:"block-editor-image-size-control__row"},(0,E.__)("Image dimensions")),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(Ma.Z,{type:"number",className:"block-editor-image-size-control__width",label:(0,E.__)("Width"),value:p,min:1,onChange:e=>f("width",e)}),(0,s.createElement)(Ma.Z,{type:"number",className:"block-editor-image-size-control__height",label:(0,E.__)("Height"),value:d,min:1,onChange:e=>f("height",e)})),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(Dv.Z,{"aria-label":(0,E.__)("Image size presets")},hk.map((e=>{const r=Math.round(t*(e/100)),o=Math.round(n*(e/100)),a=p===r&&d===o;return(0,s.createElement)(Er.Z,{key:e,isSmall:!0,variant:a?"primary":void 0,isPressed:a,onClick:()=>h(o,r)},e,"%")}))),(0,s.createElement)(Er.Z,{isSmall:!0,onClick:()=>h()},(0,E.__)("Reset")))))}var bk=n(74598);const vk=e=>{let{value:t,onChange:n=m.noop,settings:r}=e;if(!r||!r.length)return null;const o=e=>r=>{n({...t,[e.id]:r})},a=r.map((e=>(0,s.createElement)(xr.Z,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:o(e),checked:!!t&&!!t[e.id]})));return(0,s.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,s.createElement)(zu.Z,{as:"legend"},(0,E.__)("Currently selected link settings")),a)};var _k=n(34979),yk=n.n(_k),kk=n(82665),Mk=n(39477),wk=n(96861),Ek=n(54967);class xk extends s.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,s.createRef)(),this.inputRef=(0,s.createRef)(),this.updateSuggestions=(0,m.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:r,__experimentalShowInitialSuggestions:o=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,yk()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===r||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=r&&r.length?this.updateSuggestions(r):o&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:r}=this.props;if(!n)return;const o=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!o&&(t.length<2||!r&&(0,Ek.P)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const a=n(t,{isInitialSuggestions:o});a.then((e=>{this.suggestionsRequest===a&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,E.sprintf)((0,E._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,E.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===a&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=a}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:r,loading:o}=this.state;if(!t||!r.length||o){switch(e.keyCode){case _u.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case _u.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case _u.ENTER:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const a=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case _u.UP:{e.preventDefault();const t=n?n-1:r.length-1;this.setState({selectedSuggestion:t});break}case _u.DOWN:{e.preventDefault();const t=null===n||n===r.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case _u.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(a),this.props.speak((0,E.__)("Link selected.")));break;case _u.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(a),this.props.onSubmit&&this.props.onSubmit(a,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:r,disableSuggestions:o,__experimentalShowInitialSuggestions:a=!1}=e,{showSuggestions:i}=t,l=i;const s=n&&n.length;return a||s||(l=!1),!0===o&&(l=!1),{showSuggestions:l,suggestionsListboxId:`block-editor-url-input-suggestions-${r}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${r}`}}render(){return(0,s.createElement)(s.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:r,placeholder:o=(0,E.__)("Paste URL or type to search"),__experimentalRenderControl:a,value:i=""}=this.props,{loading:l,showSuggestions:c,selectedSuggestion:u,suggestionsListboxId:m,suggestionOptionIdPrefix:p}=this.state,f=`url-input-control-${r}`,h={id:f,label:e,className:d()("block-editor-url-input",t,{"is-full-width":n})},g={id:f,value:i,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:o,onKeyDown:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,E.__)("URL"),"aria-expanded":c,"aria-autocomplete":"list","aria-owns":m,"aria-activedescendant":null!==u?`${p}-${u}`:void 0,ref:this.inputRef};return a?a(h,g,l):(0,s.createElement)(Ag.ZP,h,(0,s.createElement)("input",g),l&&(0,s.createElement)(Qy.Z,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:r=!1}=this.props,{showSuggestions:o,suggestions:a,selectedSuggestion:i,suggestionsListboxId:c,suggestionOptionIdPrefix:u,loading:p}=this.state,f={id:c,ref:this.autocompleteRef,role:"listbox"},h=(e,t)=>({role:"option",tabIndex:"-1",id:`${u}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i});return(0,m.isFunction)(t)&&o&&a.length?t({suggestions:a,selectedSuggestion:i,suggestionsListProps:f,buildSuggestionItemProps:h,isLoading:p,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:r&&!(n&&n.length)}):!(0,m.isFunction)(t)&&o&&a.length?(0,s.createElement)(ro.Z,{position:"bottom",focusOnMount:!1},(0,s.createElement)("div",(0,l.Z)({},f,{className:d()("block-editor-url-input__suggestions",`${e}__suggestions`)}),a.map(((e,t)=>(0,s.createElement)(Er.Z,(0,l.Z)({},h(0,t),{key:e.id,className:d()("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}const Ck=(0,qa.Z)(Mk.Z,kk.Z,wk.Z,(0,Wa.Z)(((e,t)=>{if((0,m.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(tr);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(xk),Sk=e=>{let t,{searchTerm:n,onClick:r,itemProps:o,isSelected:a,buttonText:i}=e;return n?(t=i?(0,m.isFunction)(i)?i(n):i:(0,Ou.Z)((0,E.sprintf)((0,E.__)("Create: %s"),n),{mark:(0,s.createElement)("mark",null)}),(0,s.createElement)(Er.Z,(0,l.Z)({},o,{className:d()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":a}),onClick:r}),(0,s.createElement)($o.Z,{className:"block-editor-link-control__search-item-icon",icon:Nu.Z}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};var Tk=n(42896),Lk=n(78198),Ak=n(96851),Nk=n(28766);const zk=e=>{let{itemProps:t,suggestion:n,isSelected:r=!1,onClick:o,isURL:a=!1,searchTerm:i="",shouldShowType:c=!1}=e;return(0,s.createElement)(Er.Z,(0,l.Z)({},t,{onClick:o,className:d()("block-editor-link-control__search-item",{"is-selected":r,"is-url":a,"is-entity":!a})}),a&&(0,s.createElement)($o.Z,{className:"block-editor-link-control__search-item-icon",icon:Nk.Z}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,s.createElement)(Ak.Z,{text:n.title,highlight:i})),(0,s.createElement)("span",{"aria-hidden":!a,className:"block-editor-link-control__search-item-info"},!a&&((0,Tk.w)((0,Lk.x)(n.url))||""),a&&(0,E.__)("Press ENTER to add this link"))),c&&n.type&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){return e.isFrontPage?"front page":"post_tag"===e.type?"tag":e.type}(n)))},Bk="__CREATE__",Ok="mailto",Dk="internal",Ik=["URL",Ok,"tel",Dk],Pk=[{id:"opensInNewTab",title:(0,E.__)("Open in new tab")}];function Rk(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:r,handleSuggestionClick:o,suggestionsListProps:a,buildSuggestionItemProps:i,suggestions:c,selectedSuggestion:u,isLoading:m,isInitialSuggestions:p,createSuggestionButtonText:f,suggestionsQuery:h}=e;const g=d()("block-editor-link-control__search-results",{"is-loading":m}),b=1===c.length&&Ik.includes(c[0].type),v=n&&!b&&!p,_=!(null!=h&&h.type),y=`block-editor-link-control-search-results-label-${t}`,k=p?(0,E.__)("Recently updated"):(0,E.sprintf)((0,E.__)('Search results for "%s"'),r),M=(0,s.createElement)(p?s.Fragment:zu.Z,{},(0,s.createElement)("span",{className:"block-editor-link-control__search-results-label",id:y},k));return(0,s.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},M,(0,s.createElement)("div",(0,l.Z)({},a,{className:g,"aria-labelledby":y}),c.map(((e,t)=>v&&Bk===e.type?(0,s.createElement)(Sk,{searchTerm:r,buttonText:f,onClick:()=>o(e),key:e.type,itemProps:i(e,t),isSelected:t===u}):Bk===e.type?null:(0,s.createElement)(zk,{key:`${e.id}-${e.type}`,itemProps:i(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===u,isURL:Ik.includes(e.type),searchTerm:r,shouldShowType:_,isFrontPage:null==e?void 0:e.isFrontPage})))))}var Zk=n(89849),jk=n(54852);function Hk(e){const t=(0,m.startsWith)(e,"#");return(0,Ek.P)(e)||e&&e.includes("www.")||t}const Wk=()=>Promise.resolve([]),Fk=e=>{let t="URL";const n=(0,Zk.E)(e)||"";return n.includes("mailto")&&(t=Ok),n.includes("tel")&&(t="tel"),(0,m.startsWith)(e,"#")&&(t=Dk),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,jk.u)(e):e,type:t}])};const qk=()=>Promise.resolve([]),Yk=(0,s.forwardRef)(((e,t)=>{let{value:n,children:r,currentLink:o={},className:a=null,placeholder:i=null,withCreateSuggestion:l=!1,onCreateSuggestion:c=m.noop,onChange:u=m.noop,onSelect:p=m.noop,showSuggestions:f=!0,renderSuggestions:h=(e=>(0,s.createElement)(Rk,e)),fetchSuggestions:g=null,allowDirectEntry:v=!0,showInitialSuggestions:_=!1,suggestionsQuery:y={},withURLSuggestion:k=!0,createSuggestionButtonText:M,useLabel:w=!1}=e;const x=function(e,t,n,r){const{fetchSearchSuggestions:o,pageOnFront:a}=(0,b.Z)((e=>{const{getSettings:t}=e(tr);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?Fk:Wk;return(0,s.useCallback)(((t,l)=>{let{isInitialSuggestions:s}=l;return Hk(t)?i(t,{isInitialSuggestions:s}):(async(e,t,n,r,o,a,i)=>{const{isInitialSuggestions:l}=t;let s=!1,c=await Promise.all([n(e,t),r(e)]);c[0]=c[0].map((e=>Number(e.id)===i?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&a&&!l?c[0].concat(c[1]):c[0],l||Hk(e)||!o?c:c.concat({title:e,url:e,type:Bk})})(t,{...e,isInitialSuggestions:s},o,i,n,r,a)}),[i,o,n])}(y,v,l,k),C=f?g||x:qk,S=(0,Aa.Z)(Yk),[T,L]=(0,s.useState)(),A=async e=>{let t=e;if(Bk!==e.type)(v||t&&Object.keys(t).length>=1)&&p({...(0,m.omit)(o,"id","url"),...t},t);else try{var n;t=await c(e.title),null!==(n=t)&&void 0!==n&&n.url&&p(t)}catch(e){}},N=d()(a,{"has-no-label":!w});return(0,s.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,s.createElement)(Ck,{label:w?"URL":void 0,className:N,value:n,onChange:(e,t)=>{u(e),L(t)},placeholder:null!=i?i:(0,E.__)("Search or type url"),__experimentalRenderSuggestions:f?e=>h({...e,instanceId:S,withCreateSuggestion:l,currentInputValue:n,createSuggestionButtonText:M,suggestionsQuery:y,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),A(t)}}):null,__experimentalFetchLinkSuggestions:C,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:_,onSubmit:(e,t)=>{var r;const o=e||T;o||null!=n&&null!==(r=n.trim())&&void 0!==r&&r.length?A(o||{url:n}):t.preventDefault()},ref:t}),r)})),Vk=Yk;var Uk=n(65430),$k=n(84896);const{Slot:Xk,Fill:Gk}=(0,v.up)("BlockEditorLinkControlViewer");function Kk(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}function Jk(e){var t;let{value:n,onEditClick:r,hasRichPreviews:o=!1,hasUnlinkControl:a=!1,onRemove:i}=e;const l=o?null==n?void 0:n.url:null,{richData:c,isFetching:u}=function(e){const[t,n]=(0,s.useReducer)(Kk,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,b.Z)((e=>{const{getSettings:t}=e(tr);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,s.useEffect)((()=>{if(null!=e&&e.length&&r&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,o=t.signal;return r(e,{signal:o}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{o.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t}(l),m=c&&Object.keys(c).length,p=n&&(0,Tk.w)((0,Lk.x)(n.url),16)||"",f=(null==c?void 0:c.title)||(null==n?void 0:n.title)||p,h=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let g;return g=null!=c&&c.icon?(0,s.createElement)("img",{src:null==c?void 0:c.icon,alt:""}):h?(0,s.createElement)($o.Z,{icon:Uk.Z,size:32}):(0,s.createElement)($o.Z,{icon:Nk.Z}),(0,s.createElement)("div",{"aria-label":(0,E.__)("Currently selected"),"aria-selected":"true",className:d()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":m,"is-fetching":!!u,"is-preview":!0,"is-error":h})},(0,s.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:d()("block-editor-link-control__search-item-icon",{"is-image":null==c?void 0:c.icon})},g),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-details"},h?(0,s.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,E.__)("Link is empty")):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(wa.Z,{className:"block-editor-link-control__search-item-title",href:n.url},(0,tk.Z)(f)),(null==n?void 0:n.url)&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-info"},p)))),(0,s.createElement)(Er.Z,{icon:$k.Z,label:(0,E.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:r,iconSize:24}),a&&(0,s.createElement)(Er.Z,{icon:eg.Z,label:(0,E.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:i,iconSize:24}),(0,s.createElement)(Xk,{fillProps:n})),(m&&((null==c?void 0:c.image)||(null==c?void 0:c.description))||u)&&(0,s.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==c?void 0:c.image)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=c&&c.image),className:d()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=c&&c.image)})},(null==c?void 0:c.image)&&(0,s.createElement)("img",{src:null==c?void 0:c.image,alt:""})),((null==c?void 0:c.description)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=c&&c.description),className:d()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=c&&c.description)})},(null==c?void 0:c.description)&&(0,s.createElement)(uf.Z,{truncate:!0,numberOfLines:"2"},c.description))))}function Qk(e){var t,n,r;let{searchInputPlaceholder:o,value:a,settings:i=Pk,onChange:l=m.noop,onRemove:c,noDirectEntry:u=!1,showSuggestions:p=!0,showInitialSuggestions:f,forceIsEditingLink:h,createSuggestion:g,withCreateSuggestion:b,inputValue:v="",suggestionsQuery:_={},noURLSuggestion:y=!1,createSuggestionButtonText:k,hasRichPreviews:M=!1,hasTextControl:w=!1,renderControlBottom:x=null}=e;void 0===b&&g&&(b=!0);const C=(0,s.useRef)(!0),S=(0,s.useRef)(),T=(0,s.useRef)(),[L,A]=(0,s.useState)((null==a?void 0:a.url)||""),[N,z]=(0,s.useState)((null==a?void 0:a.title)||""),B=v||L,[O,D]=(0,s.useState)(void 0!==h?h:!a||!a.url),I=(0,s.useRef)(!1),P=!(null!=B&&null!==(t=B.trim())&&void 0!==t&&t.length),{createPage:R,isCreatingPage:Z,errorMessage:j}=function(e){const t=(0,s.useRef)(),[n,r]=(0,s.useState)(!1),[o,a]=(0,s.useState)(null);return(0,s.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){r(!0),a(null);try{return t.current=(e=>{let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw a(e.message||(0,E.__)("An unknown error occurred during creation. Please try again.")),e}finally{r(!1)}},isCreatingPage:n,errorMessage:o}}(g);function H(){var e;I.current=!(null===(e=S.current)||void 0===e||!e.contains(S.current.ownerDocument.activeElement)),D(!1)}(0,s.useEffect)((()=>{void 0!==h&&h!==O&&D(h)}),[h]),(0,s.useEffect)((()=>{if(C.current)return void(C.current=!1);const e=null!=T&&T.current?1:0;(nu.focus.focusable.find(S.current)[e]||S.current).focus(),I.current=!1}),[O,Z]),(0,s.useEffect)((()=>{null!=a&&a.title&&a.title!==N&&z(a.title),null!=a&&a.url&&A(a.url)}),[a]);const W=()=>{B===(null==a?void 0:a.url)&&N===(null==a?void 0:a.title)||l({url:B,title:N}),H()},F=c&&a&&!O&&!Z,q=!(null==i||!i.length),Y=(null==a||null===(n=a.url)||void 0===n||null===(r=n.trim())||void 0===r?void 0:r.length)>0&&w;return(0,s.createElement)("div",{tabIndex:-1,ref:S,className:"block-editor-link-control"},Z&&(0,s.createElement)("div",{className:"block-editor-link-control__loading"},(0,s.createElement)(Qy.Z,null)," ",(0,E.__)("Creating"),"…"),(O||!a)&&!Z&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:d()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":Y})},Y&&(0,s.createElement)(Ma.Z,{ref:T,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:N,onChange:z,onKeyDown:e=>{const{keyCode:t}=e;t!==_u.ENTER||P||(e.preventDefault(),W())}}),(0,s.createElement)(Vk,{currentLink:a,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:o,value:B,withCreateSuggestion:b,onCreateSuggestion:R,onChange:A,onSelect:e=>{l({...e,title:N||(null==e?void 0:e.title)}),H()},showInitialSuggestions:f,allowDirectEntry:!u,showSuggestions:p,suggestionsQuery:_,withURLSuggestion:!y,createSuggestionButtonText:k,useLabel:Y},(0,s.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,s.createElement)(Er.Z,{onClick:W,label:(0,E.__)("Submit"),icon:bk.Z,className:"block-editor-link-control__search-submit",disabled:P})))),j&&(0,s.createElement)(qg.Z,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},j)),a&&!O&&!Z&&(0,s.createElement)(Jk,{key:null==a?void 0:a.url,value:a,onEditClick:()=>D(!0),hasRichPreviews:M,hasUnlinkControl:F,onRemove:c}),q&&(0,s.createElement)("div",{className:"block-editor-link-control__tools"},(0,s.createElement)(vk,{value:a,settings:i,onChange:l})),x&&x())}Qk.ViewerFill=Gk;const eM=Qk;var tM=n(85520),nM=n(40838),rM=n(51604);const oM=(0,Ha.Z)("editor.MediaUpload")((()=>null)),aM=function(e){let{fallback:t=null,children:n}=e;const r=(0,b.Z)((e=>{const{getSettings:t}=e(tr);return!!t().mediaUpload}),[]);return r?n:t},iM=(0,qa.Z)([(0,Fa.Z)((e=>{const{createNotice:t,removeNotice:n}=e(Em.store);return{createNotice:t,removeNotice:n}})),(0,Ha.Z)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:r,allowedTypes:o,accept:a,onError:i,onSelect:l,onSelectURL:c,onFilesUpload:u=m.noop,name:d=(0,E.__)("Replace"),createNotice:p,removeNotice:f,children:h,multiple:g=!1,addToGallery:v,handleUpload:_=!0}=e;const[y,k]=(0,s.useState)(t),M=(0,b.Z)((e=>e(tr).getSettings().mediaUpload),[]),w=(0,s.useRef)(),x=(0,m.uniqueId)("block-editor/media-replace-flow/error-notice/"),C=e=>{const t=(0,tk.Z)(e);i?i(t):setTimeout((()=>{p("error",t,{speak:!0,id:x,isDismissible:!0})}),1e3)},S=(e,t)=>{t(),k(null==e?void 0:e.url),l(e),(0,Vt.D)((0,E.__)("The media file has been replaced")),f(x)},T=e=>{e.keyCode===_u.DOWN&&(e.preventDefault(),e.target.click())},L=g&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,s.createElement)(Au.Z,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(Qp.Z,{ref:w,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:T},d)},renderContent:e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Zp.Z,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,s.createElement)(oM,{gallery:L,addToGallery:v,multiple:g,value:g?r:n,onSelect:e=>S(e,t),allowedTypes:o,render:e=>{let{open:t}=e;return(0,s.createElement)(hr.Z,{icon:nM.Z,onClick:t},(0,E.__)("Open Media Library"))}}),(0,s.createElement)(aM,null,(0,s.createElement)(tM.Z,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),l(n);u(n),M({allowedTypes:o,filesList:n,onFileChange:e=>{let[n]=e;S(n,t)},onError:C})})(e,t)},accept:a,multiple:g,render:e=>{let{openFileDialog:t}=e;return(0,s.createElement)(hr.Z,{icon:rM.Z,onClick:()=>{t()}},(0,E.__)("Upload"))}})),h),c&&(0,s.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,s.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,E.__)("Current media URL:")),(0,s.createElement)(eM,{value:{url:y},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;k(t),c(t),w.current.focus()}})))}})}));var lM=n(5891);function sM(e){let{url:t,urlLabel:n,className:r}=e;const o=d()(r,"block-editor-url-popover__link-viewer-url");return t?(0,s.createElement)(wa.Z,{className:o,href:t},n||(0,Tk.w)((0,Lk.x)(t))):(0,s.createElement)("span",{className:o})}function cM(e){let{additionalControls:t,children:n,renderSettings:r,position:o="bottom center",focusOnMount:a="firstElement",...i}=e;const[c,u]=(0,s.useState)(!1),d=!!r&&c;return(0,s.createElement)(ro.Z,(0,l.Z)({className:"block-editor-url-popover",focusOnMount:a,position:o},i),(0,s.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,s.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&(0,s.createElement)(Er.Z,{className:"block-editor-url-popover__settings-toggle",icon:Vp.Z,label:(0,E.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),d&&(0,s.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!d&&(0,s.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}cM.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:r,value:o,...a}=e;return(0,s.createElement)("form",(0,l.Z)({className:d()("block-editor-url-popover__link-editor",n)},a),(0,s.createElement)(Ck,{value:o,onChange:r,autocompleteRef:t}),(0,s.createElement)(Er.Z,{icon:bk.Z,label:(0,E.__)("Apply"),type:"submit"}))},cM.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:r,url:o,urlLabel:a,...i}=e;return(0,s.createElement)("div",(0,l.Z)({className:d()("block-editor-url-popover__link-viewer",t)},i),(0,s.createElement)(sM,{url:o,urlLabel:a,className:n}),r&&(0,s.createElement)(Er.Z,{icon:$k.Z,label:(0,E.__)("Edit"),onClick:r}))};const uM=cM,dM=e=>{let{src:t,onChange:n,onSubmit:r,onClose:o}=e;return(0,s.createElement)(uM,{onClose:o},(0,s.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},(0,s.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,E.__)("URL"),placeholder:(0,E.__)("Paste or type URL"),onChange:n,value:t}),(0,s.createElement)(Er.Z,{className:"block-editor-media-placeholder__url-input-submit-button",icon:bk.Z,label:(0,E.__)("Apply"),type:"submit"})))},mM=(0,Ha.Z)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:r,icon:o,labels:a={},mediaPreview:i,notices:l,isAppender:c,accept:u,addToGallery:p,multiple:f=!1,handleUpload:h=!0,disableDropZone:g,disableMediaButtons:v,onError:_,onSelect:y,onCancel:k,onSelectURL:M,onDoubleClick:w,onFilesPreUpload:x=m.noop,onHTMLDrop:C=m.noop,children:S,mediaLibraryButton:T,placeholder:L,style:A}=e;const N=(0,b.Z)((e=>{const{getSettings:t}=e(tr);return t().mediaUpload}),[]),[z,B]=(0,s.useState)(""),[O,D]=(0,s.useState)(!1);(0,s.useEffect)((()=>{var e;B(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const I=e=>{B(e.target.value)},P=()=>{D(!0)},R=()=>{D(!1)},Z=e=>{e.preventDefault(),z&&M&&(M(z),R())},j=e=>{if(!h)return y(e);let r;if(x(e),f)if(p){let e=[];r=n=>{const r=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));y(r.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else r=y;else r=e=>{let[t]=e;return y(t)};N({allowedTypes:n,filesList:e,onFileChange:r,onError:_})},H=e=>{j(e.target.files)},W=null!=L?L:e=>{let{instructions:t,title:u}=a;if(N||M||(t=(0,E.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===u){const e=null!=n?n:[],[r]=e,o=1===e.length,a=o&&"audio"===r,i=o&&"image"===r,l=o&&"video"===r;void 0===t&&N&&(t=(0,E.__)("Upload a media file or pick one from your media library."),a?t=(0,E.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,E.__)("Upload an image file, pick one from your media library, or add one with a URL."):l&&(t=(0,E.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,E.__)("Media"),a?u=(0,E.__)("Audio"):i?u=(0,E.__)("Image"):l&&(u=(0,E.__)("Video")))}const m=d()("block-editor-media-placeholder",r,{"is-appender":c});return(0,s.createElement)(oy.Z,{icon:o,label:u,instructions:t,className:m,notices:l,onDoubleClick:w,preview:i,style:A},e,S)},F=()=>g?null:(0,s.createElement)(lM.Z,{onFilesDrop:j,onHTMLDrop:C}),q=()=>k&&(0,s.createElement)(Er.Z,{className:"block-editor-media-placeholder__cancel-button",title:(0,E.__)("Cancel"),variant:"link",onClick:k},(0,E.__)("Cancel")),Y=()=>M&&(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,s.createElement)(Er.Z,{className:"block-editor-media-placeholder__button",onClick:P,isPressed:O,variant:"tertiary"},(0,E.__)("Insert from URL")),O&&(0,s.createElement)(dM,{src:z,onChange:I,onSubmit:Z,onClose:R}));return v?(0,s.createElement)(aM,null,F()):(0,s.createElement)(aM,{fallback:W(Y())},(()=>{const e=null!=T?T:e=>{let{open:t}=e;return(0,s.createElement)(Er.Z,{variant:"tertiary",onClick:()=>{t()}},(0,E.__)("Media Library"))},r=(0,s.createElement)(oM,{addToGallery:p,gallery:f&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:f,onSelect:y,allowedTypes:n,value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(N&&c)return(0,s.createElement)(s.Fragment,null,F(),(0,s.createElement)(tM.Z,{onChange:H,accept:u,multiple:f,render:e=>{let{openFileDialog:t}=e;const n=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Er.Z,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,E.__)("Upload")),r,Y(),q());return W(n)}}));if(N){const e=(0,s.createElement)(s.Fragment,null,F(),(0,s.createElement)(tM.Z,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:H,accept:u,multiple:f},(0,E.__)("Upload")),r,Y(),q());return W(e)}return W(r)})())})),pM=e=>{let{colorSettings:t,...n}=e;const r=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...r}=e;return{...r,colorValue:t,onColorChange:n}}));return(0,s.createElement)(By,(0,l.Z)({settings:r,gradients:[],disableCustomGradients:!0},n))},fM={position:"bottom right",isAlternate:!0},hM=()=>(0,s.createElement)(s.Fragment,null,["bold","italic","link"].map((e=>(0,s.createElement)(v.g7,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,s.createElement)(v.g7,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,s.createElement)(Wp.Z,null,(n=>(0,s.createElement)(ti.Z,{icon:Vp.Z,label:(0,E.__)("More"),toggleProps:{...n,className:d()(n.className,{"is-pressed":t}),describedBy:(0,E.__)("Displays more block tools")},controls:(0,m.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:fM})))}))),gM=e=>{let{inline:t,anchorRef:n}=e;return t?(0,s.createElement)(ro.Z,{position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,s.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,s.createElement)(g.Z,null,(0,s.createElement)(hM,null)))):(0,s.createElement)(mr,{group:"inline"},(0,s.createElement)(hM,null))};function bM(){const{didAutomaticChange:e,getSettings:t}=(0,b.Z)(tr);return(0,Ar.Z)((n=>{function r(n){const{keyCode:r}=n;n.defaultPrevented||r!==_u.DELETE&&r!==_u.BACKSPACE&&r!==_u.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}),[])}function vM(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>``)).join("")}var _M=n(69907);function yM(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function kM(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function MM(e){let{allowedFormats:t,formattingControls:n,disableFormats:r}=e;return r?MM.EMPTY_ARRAY:t||n?t||((0,q.default)("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats",version:"6.2"}),n.map((e=>`core/${e}`))):void 0}function wM(e){let{value:t,pastedBlocks:n=[],onReplace:r,onSplit:o,onSplitMiddle:a,multilineTag:i}=e;if(!r||!o)return;const{start:l=0,end:s=0}=t,c={...t,start:l,end:s},u=[],[d,m]=(0,F.split)(c),p=n.length>0;let f=-1;const h=(0,F.isEmpty)(d)&&!(0,F.isEmpty)(m);p&&(0,F.isEmpty)(d)||(u.push(o((0,F.toHTMLString)({value:d,multilineTag:i}),!h)),f+=1),p?(u.push(...n),f+=n.length):a&&u.push(a()),(p||a)&&(0,F.isEmpty)(m)||u.push(o((0,F.toHTMLString)({value:m,multilineTag:i}),h)),r(u,p?f:1,p?-1:0)}function EM(e,t){return t?(0,F.replace)(e,/\n+/g,F.__UNSTABLE_LINE_SEPARATOR):(0,F.replace)(e,new RegExp(F.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function xM(e){const t=(0,s.useRef)(e);return t.current=e,(0,Ar.Z)((e=>{function n(e){const{isSelected:n,disableFormats:r,onChange:o,value:i,formatTypes:l,tagName:s,onReplace:c,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:m,multilineTag:p,preserveWhiteSpace:f,pastePlainText:h}=t.current;if(!n)return;const{clipboardData:g}=e;let b="",v="";try{b=g.getData("text/plain"),v=g.getData("text/html")}catch(e){try{v=g.getData("Text")}catch(e){return}}if(v=function(e){return e.replace(/.*/s,"").replace(/.*/s,"")}(v),v=function(e){const t="";return e.startsWith(t)?e.slice(t.length):e}(v),e.preventDefault(),window.console.log("Received HTML:\n\n",v),window.console.log("Received plain text:\n\n",b),r)return void o((0,F.insert)(i,b));const _=l.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:v,plainText:b})),e}),i);if(_!==i)return void o(_);const y=[...(0,Of.f)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,F.create)({html:v,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:f});return t=EM(t,!!p),yM(t,i.activeFormats),void o((0,F.insert)(i,t))}if(h)return void o((0,F.insert)(i,(0,F.create)({text:b})));if(null!=y&&y.length&&!Df(y,v)){const e=(0,a.pasteHandler)({HTML:vM(y),mode:"BLOCKS",tagName:s,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",y),void(c&&(0,F.isEmpty)(i)?c(e):wM({value:i,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:p}))}let k=c&&u?"AUTO":"INLINE";var M;"AUTO"===k&&(0,F.isEmpty)(i)&&(M=b,(0,_M.kd)(".*").test(M))&&(k="BLOCKS"),m&&(0,F.isEmpty)(i)&&(0,Ek.P)(b.trim())&&(k="BLOCKS");const w=(0,a.pasteHandler)({HTML:v,plainText:b,mode:k,tagName:s,preserveWhiteSpace:f});if("string"==typeof w){let e=(0,F.create)({html:w});e=EM(e,!!p),yM(e,i.activeFormats),o((0,F.insert)(i,e))}else w.length>0&&(c&&(0,F.isEmpty)(i)?c(w,w.length-1,-1):wM({value:i,pastedBlocks:w,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:p}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function CM(e){let t=e.length;for(;t--;){const n=(0,m.findKey)(e[t].attributes,(e=>"string"==typeof e&&-1!==e.indexOf("†")));if(n)return e[t].attributes[n]=e[t].attributes[n].replace("†",""),e[t].clientId;const r=CM(e[t].innerBlocks);if(r)return r}}function SM(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,Yr.Z)(tr),r=(0,s.useRef)(e);return r.current=e,(0,Ar.Z)((e=>{function o(){const{value:e,onReplace:t,selectionChange:o}=r.current;if(!t)return;const{start:i,text:l}=e;if(" "!==l.slice(i-1,i))return;const s=l.slice(0,i).trim(),c=(0,a.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),u=(0,a.findTransform)(c,(e=>{let{prefix:t}=e;return s===t}));if(!u)return;const d=(0,F.toHTMLString)({value:(0,F.insert)(e,"†",0,i)}),m=u.transform(d);o(CM([m])),t([m]),n()}function i(e){const{inputType:a,type:i}=e,{value:l,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=r.current;if("insertText"!==a&&"compositionend"!==i)return;c&&o&&o();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:r}=e;return n{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function TM(e){const{__unstableMarkAutomaticChange:t}=(0,Yr.Z)(tr),n=(0,s.useRef)(e);return n.current=e,(0,Ar.Z)((e=>{function r(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:r,value:o,onReplace:i,onSplit:l,onSplitMiddle:s,multilineTag:c,onChange:u,disableLineBreaks:d,onSplitAtEnd:m}=n.current;if(e.keyCode!==_u.ENTER)return;e.preventDefault();const p={...o};p.formats=r(o);const f=i&&l;if(i){const e=(0,a.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,a.findTransform)(e,(e=>e.regExp.test(p.text)));n&&(i([n.transform({content:p.text})]),t())}if(c)e.shiftKey?d||u((0,F.insert)(p,"\n")):f&&(0,F.__unstableIsEmptyLine)(p)?wM({value:p,onReplace:i,onSplit:l,onSplitMiddle:s,multilineTag:c}):u((0,F.__unstableInsertLineSeparator)(p));else{const{text:t,start:n,end:r}=p,o=m&&n===r&&r===t.length;e.shiftKey||!f&&!o?d||u((0,F.insert)(p,"\n")):!f&&o?m():f&&wM({value:p,onReplace:i,onSplit:l,onSplitMiddle:s,multilineTag:c})}}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function LM(e){return e(F.store).getFormatTypes()}MM.EMPTY_ARRAY=[];const AM=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function NM(e){return(0,Ar.Z)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function zM(e){return(0,Ar.Z)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function BM(){const{isMultiSelecting:e}=(0,b.Z)(tr);return(0,Ar.Z)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function OM(e){let{formatTypes:t,onChange:n,onFocus:r,value:o,forwardedRef:a}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const l=(0,F.getActiveFormat)(o,t);let c=void 0!==l;const u=(0,F.getActiveObject)(o),d=void 0!==u&&u.type===t;if("core/link"===t&&!(0,F.isCollapsed)(o)){const e=o.formats,t=(0,m.find)(e[o.start],{type:"core/link"}),n=(0,m.find)(e[o.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,s.createElement)(i,{key:t,isActive:c,activeAttributes:c&&l.attributes||{},isObjectActive:d,activeObjectAttributes:d&&u.attributes||{},value:o,onChange:n,onFocus:r,contentRef:a})}))}const DM=(0,s.createContext)(),IM=(0,s.createContext)(),PM=(0,s.forwardRef)((function e(t,n){let{children:r,tagName:o="div",value:i="",onChange:c,isSelected:u,multiline:p,inlineToolbar:f,wrapperClassName:h,autocompleters:g,onReplace:v,placeholder:_,allowedFormats:y,formattingControls:k,withoutInteractiveFormatting:M,onRemove:w,onMerge:E,onSplit:x,__unstableOnSplitAtEnd:C,__unstableOnSplitMiddle:S,identifier:T,preserveWhiteSpace:L,__unstablePastePlainText:A,__unstableEmbedURLOnPaste:N,__unstableDisableFormats:z,disableLineBreaks:B,unstableOnFocus:O,__unstableAllowPrefixTransformations:D,...I}=t;const P=(0,Aa.Z)(e);T=T||P,I=function(e){return(0,m.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef","disableSuggestions","disableAutocorrection"])}(I);const R=(0,s.useRef)(),{clientId:Z}=ar(),{selectionStart:j,selectionEnd:H,isSelected:W}=(0,b.Z)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(tr),r=t(),o=n();let a;return void 0===u?a=r.clientId===Z&&o.clientId===Z&&r.attributeKey===T:u&&(a=r.clientId===Z),{selectionStart:a?r.offset:void 0,selectionEnd:a?o.offset:void 0,isSelected:a}})),{selectionChange:Y}=(0,Yr.Z)(tr),V=kM(p),U=MM({allowedFormats:y,formattingControls:k,disableFormats:z}),$=!U||U.length>0;let X=i,G=c;Array.isArray(i)&&(X=a.children.toHTML(i),G=e=>c(a.children.fromDOM((0,F.__unstableCreateElement)(document,e).childNodes)));const K=(0,s.useCallback)(((e,t)=>{const n={},r=void 0===e&&void 0===t;("number"==typeof e||r)&&(n.start={clientId:Z,attributeKey:T,offset:e}),("number"==typeof t||r)&&(n.end={clientId:Z,attributeKey:T,offset:t}),Y(n)}),[Z,T]),{formatTypes:J,prepareHandlers:Q,valueHandlers:ee,changeHandlers:te,dependencies:ne}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:r,allowedFormats:o}=e;const a=(0,b.Z)(LM,[]),i=(0,s.useMemo)((()=>a.filter((e=>{let{name:t,tagName:n}=e;return!(o&&!o.includes(t)||r&&AM.has(n))}))),[a,o,AM]),l=(0,b.Z)((e=>i.reduce(((r,o)=>(o.__experimentalGetPropsForEditableTreePreparation&&(r[o.name]=o.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t})),r)),{})),[i,t,n]),c=(0,Yr.Z)(),u=[],d=[],m=[],p=[];return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const r=l[e.name],o=e.__experimentalCreatePrepareEditableTree(r,{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(o):u.push(o);for(const e in r)p.push(r[e])}if(e.__experimentalCreateOnChangeEditableValue){let r={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(r=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t})),m.push(e.__experimentalCreateOnChangeEditableValue({...l[e.name]||{},...r},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:u,valueHandlers:d,changeHandlers:m,dependencies:p}}({clientId:Z,identifier:T,withoutInteractiveFormatting:M,allowedFormats:U});function re(e){return J.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,F.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:oe,onChange:ae,ref:ie}=(0,F.__unstableUseRichText)({value:X,onChange(e,t){let{__unstableFormats:n,__unstableText:r}=t;G(e),Object.values(te).forEach((e=>{e(n,r)}))},selectionStart:j,selectionEnd:H,onSelectionChange:K,placeholder:_,__unstableIsSelected:W,__unstableMultilineTag:V,__unstableDisableFormats:z,preserveWhiteSpace:L,__unstableDependencies:[...ne,o],__unstableAfterParse:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:re,__unstableAddInvisibleFormats:function(e){return Q.reduce(((t,n)=>n(t,e.text)),e.formats)}}),le=function(e){return(0,c_.R)({...e,completers:g_(e)})}({onReplace:v,completers:g,record:oe,onChange:ae});!function(e){let{html:t,value:n}=e;const r=(0,s.useRef)(),o=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:a}=(0,Yr.Z)(tr);(0,s.useLayoutEffect)((()=>{if(r.current){if(r.current!==n.text){const e=window.setTimeout((()=>{a()}),1e3);return r.current=n.text,()=>{window.clearTimeout(e)}}a()}else r.current=n.text}),[t,o])}({html:X,value:oe});const se=(0,s.useRef)(new Set),ce=(0,s.useRef)(new Set);function ue(){R.current.focus()}const de=o,me=(0,s.createElement)(s.Fragment,null,W&&(0,s.createElement)(DM.Provider,{value:se},(0,s.createElement)(IM.Provider,{value:ce},(0,s.createElement)(ro.Z.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},r&&r({value:oe,onChange:ae,onFocus:ue}),(0,s.createElement)(OM,{value:oe,onChange:ae,onFocus:ue,formatTypes:J,forwardedRef:R})))),W&&$&&(0,s.createElement)(gM,{inline:f,anchorRef:R}),(0,s.createElement)(de,(0,l.Z)({role:"textbox","aria-multiline":!B,"aria-label":_},I,le,{ref:(0,Za.Z)([n,le.ref,I.ref,ie,SM({value:oe,onChange:ae,__unstableAllowPrefixTransformations:D,formatTypes:J,onReplace:v,selectionChange:Y}),(0,Ar.Z)((e=>{function t(e){(_u.isKeyboardEvent.primary(e,"z")||_u.isKeyboardEvent.primary(e,"y")||_u.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),NM(se),zM(ce),bM(),xM({isSelected:W,disableFormats:z,onChange:ae,value:oe,formatTypes:J,tagName:o,onReplace:v,onSplit:x,onSplitMiddle:S,__unstableEmbedURLOnPaste:N,multilineTag:V,preserveWhiteSpace:L,pastePlainText:A}),TM({removeEditorOnlyFormats:re,value:oe,onReplace:v,onSplit:x,onSplitMiddle:S,multilineTag:V,onChange:ae,disableLineBreaks:B,onSplitAtEnd:C}),BM(),R]),contentEditable:!0,suppressContentEditableWarning:!0,className:d()("block-editor-rich-text__editable",I.className,"rich-text"),onFocus:O,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===_u.DELETE||t===_u.BACKSPACE)){const{start:n,end:r,text:o}=oe,a=t===_u.BACKSPACE,i=oe.activeFormats&&!!oe.activeFormats.length;if(!(0,F.isCollapsed)(oe)||i||a&&0!==n||!a&&r!==o.length)return;E&&E(!a),w&&(0,F.isEmpty)(oe)&&a&&w(!a),e.preventDefault()}}})));if(!h)return me;(0,q.default)("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div",version:"6.2"});const pe=d()("block-editor-rich-text",h);return(0,s.createElement)("div",{className:pe},me)}));PM.Content=e=>{let{value:t,tagName:n,multiline:r,...o}=e;Array.isArray(t)&&(t=a.children.toHTML(t));const i=kM(r);!t&&i&&(t=`<${i}>`);const l=(0,s.createElement)(ja.Z,null,t);return n?(0,s.createElement)(n,(0,m.omit)(o,["format"]),l):l},PM.isEmpty=e=>!e||0===e.length;const RM=PM,ZM=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(RM,(0,l.Z)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));ZM.Content=e=>{let{value:t="",tagName:n="div",...r}=e;return(0,s.createElement)(n,r,t)};const jM=ZM,HM=(0,s.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...r}=e;if(2===n)return(0,s.createElement)(jM,(0,l.Z)({ref:t},r));const{className:o,onChange:a,...i}=r;return(0,s.createElement)(pi.Z,(0,l.Z)({ref:t,className:d()("block-editor-plain-text",o),onChange:e=>a(e.target.value)},i))}));function WM(e){let{property:t,viewport:n,desc:r}=e;const o=(0,Aa.Z)(WM),a=r||(0,E.sprintf)((0,E._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},n.label),(0,s.createElement)(zu.Z,{as:"span",id:`rbc-desc-${o}`},a))}const FM=function(e){const{title:t,property:n,toggleLabel:r,onIsResponsiveChange:o,renderDefaultControl:a,renderResponsiveControls:i,isResponsive:l=!1,defaultLabel:c={id:"all",label:(0,E.__)("All")},viewports:u=[{id:"small",label:(0,E.__)("Small screens")},{id:"medium",label:(0,E.__)("Medium screens")},{id:"large",label:(0,E.__)("Large screens")}]}=e;if(!t||!n||!a)return null;const m=r||(0,E.sprintf)((0,E.__)("Use the same %s on all screensizes."),n),p=(0,E.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),f=a((0,s.createElement)(WM,{property:n,viewport:c}),c);return(0,s.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,s.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,s.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,s.createElement)(xr.Z,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!l,onChange:o,help:p}),(0,s.createElement)("div",{className:d()("block-editor-responsive-block-control__group",{"is-responsive":l})},!l&&f,l&&(i?i(u):u.map((e=>(0,s.createElement)(s.Fragment,{key:e.id},a((0,s.createElement)(WM,{property:n,viewport:e}),e))))))))};function qM(e){let{character:t,type:n,onUse:r}=e;const o=(0,s.useContext)(DM),a=(0,s.useRef)();return a.current=r,(0,s.useEffect)((()=>{function e(e){_u.isKeyboardEvent[n](e,t)&&(a.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t,n]),null}function YM(e){let t,{name:n,shortcutType:r,shortcutCharacter:o,...a}=e,i="RichText.ToolbarControls";return n&&(i+=`.${n}`),r&&o&&(t=_u.displayShortcut[r](o)),(0,s.createElement)(v.de,{name:i},(0,s.createElement)(Qp.Z,(0,l.Z)({},a,{shortcut:t})))}function VM(e){let{inputType:t,onInput:n}=e;const r=(0,s.useContext)(IM),o=(0,s.useRef)();return o.current=n,(0,s.useEffect)((()=>{function e(e){e.inputType===t&&(o.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t]),null}const UM=(0,s.createElement)(Co.Wj,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,s.createElement)(Co.y$,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"})),$M=(0,s.forwardRef)((function(e,t){const n=(0,b.Z)((e=>e(tr).isNavigationMode()),[]),{setNavigationMode:r}=(0,Yr.Z)(tr),o=e=>{r("edit"!==e)};return(0,s.createElement)(Au.Z,{renderToggle:r=>{let{isOpen:o,onToggle:a}=r;return(0,s.createElement)(Er.Z,(0,l.Z)({},e,{ref:t,icon:n?UM:$k.Z,"aria-expanded":o,"aria-haspopup":"true",onClick:a,label:(0,E.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Zp.Z,{role:"menu","aria-label":(0,E.__)("Tools")},(0,s.createElement)(by.Z,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)($o.Z,{icon:$k.Z}),(0,E.__)("Edit"))},{value:"select",label:(0,s.createElement)(s.Fragment,null,UM,(0,E.__)("Select"))}]})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,E.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function XM(e){let{units:t,...n}=e;const r=(0,Sr.nj)({availableUnits:Zr("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,s.createElement)(Lr.ZP,(0,l.Z)({units:r},n))}var GM=n(52278);class KM extends s.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,r=e?(0,E.__)("Edit link"):(0,E.__)("Insert link");return(0,s.createElement)("div",{className:"block-editor-url-input__button"},(0,s.createElement)(Er.Z,{icon:Qh.Z,label:r,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,s.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,s.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,s.createElement)(Er.Z,{className:"block-editor-url-input__back",icon:GM.Z,label:(0,E.__)("Close"),onClick:this.toggle}),(0,s.createElement)(Ck,{value:e||"",onChange:t}),(0,s.createElement)(Er.Z,{icon:bk.Z,label:(0,E.__)("Submit"),type:"submit"}))))}}const JM=KM;var QM=n(65202);const ew="none",tw="custom",nw="media",rw="attachment",ow=["noreferrer","noopener"],aw=(0,s.createElement)(Co.Wj,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Co.y$,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,s.createElement)(Co.y$,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,s.createElement)(Co.y$,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),iw=e=>{let{linkDestination:t,onChangeUrl:n,url:r,mediaType:o="image",mediaUrl:a,mediaLink:i,linkTarget:l,linkClass:c,rel:u}=e;const[d,p]=(0,s.useState)(!1),f=(0,s.useCallback)((()=>{p(!0)})),[h,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null),_=(0,s.useRef)(null),y=(0,s.useCallback)((()=>{t!==nw&&t!==rw||v(""),g(!0)})),k=(0,s.useCallback)((()=>{g(!1)})),M=(0,s.useCallback)((()=>{v(null),k(),p(!1)})),w=(0,s.useCallback)((()=>e=>{const t=_.current;t&&t.contains(e.target)||(p(!1),v(null),k())})),x=(0,s.useCallback)((()=>e=>{if(b){var t;const e=(null===(t=S().find((e=>e.url===b)))||void 0===t?void 0:t.linkDestination)||tw;n({href:b,linkDestination:e})}k(),v(null),e.preventDefault()})),C=(0,s.useCallback)((()=>{n({linkDestination:ew,href:""})})),S=()=>{const e=[{linkDestination:nw,title:(0,E.__)("Media File"),url:"image"===o?a:void 0,icon:aw}];return"image"===o&&i&&e.push({linkDestination:rw,title:(0,E.__)("Attachment Page"),url:"image"===o?i:void 0,icon:(0,s.createElement)(Co.Wj,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Co.y$,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,s.createElement)(Co.y$,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},T=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(xr.Z,{label:(0,E.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=u?u:"").split(" ");ow.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=u?u:"").split(" ").filter((e=>!1===ow.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===l}),(0,s.createElement)(Ma.Z,{label:(0,E.__)("Link Rel"),value:null!=u?u:"",onChange:e=>{n({rel:e})}}),(0,s.createElement)(Ma.Z,{label:(0,E.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),L=null!==b?b:r,A=((0,m.find)(S(),["linkDestination",t])||{}).title;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Qp.Z,{icon:Qh.Z,className:"components-toolbar__control",label:r?(0,E.__)("Edit link"):(0,E.__)("Insert link"),"aria-expanded":d,onClick:f}),d&&(0,s.createElement)(uM,{onFocusOutside:w(),onClose:M,renderSettings:()=>T,additionalControls:!L&&(0,s.createElement)(Zp.Z,null,(0,m.map)(S(),(e=>(0,s.createElement)(hr.Z,{key:e.linkDestination,icon:e.icon,onClick:()=>{v(null),(e=>{const t=S();let r;r=e?((0,m.find)(t,(t=>t.url===e))||{linkDestination:tw}).linkDestination:ew,n({linkDestination:r,href:e})})(e.url),k()}},e.title))))},(!r||h)&&(0,s.createElement)(uM.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:L,onChangeInputValue:v,onSubmit:x(),autocompleteRef:_}),r&&!h&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(uM.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:y,urlLabel:A}),(0,s.createElement)(Er.Z,{icon:QM.Z,label:(0,E.__)("Remove link"),onClick:C}))))};function lw(e){let{children:t,className:n,isEnabled:r=!0,deviceType:o,setDeviceType:a}=e;if((0,Ra.Z)("small","<"))return null;const i={className:d()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},l={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!r,children:(0,E.__)("Preview")};return(0,s.createElement)(ti.Z,{className:"block-editor-post-preview__dropdown",popoverProps:i,toggleProps:l,icon:null},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(fr.Z,null,(0,s.createElement)(hr.Z,{className:"block-editor-post-preview__button-resize",onClick:()=>a("Desktop"),icon:"Desktop"===o&&df.Z},(0,E.__)("Desktop")),(0,s.createElement)(hr.Z,{className:"block-editor-post-preview__button-resize",onClick:()=>a("Tablet"),icon:"Tablet"===o&&df.Z},(0,E.__)("Tablet")),(0,s.createElement)(hr.Z,{className:"block-editor-post-preview__button-resize",onClick:()=>a("Mobile"),icon:"Mobile"===o&&df.Z},(0,E.__)("Mobile"))),t)))}function sw(e){const[t,n]=(0,s.useState)(window.innerWidth);(0,s.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const r=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:r(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}const cw=(0,Wa.Z)((e=>({selectedBlockClientId:e(tr).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Or(t);return t?(0,s.createElement)(Er.Z,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,E.__)("Skip to the selected block")):null})),uw={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp://g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","€-¿×÷"," -⯿","⸀-⹿","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function dw(e,t){return t.replace(e.HTMLRegExp,"\n")}function mw(e,t){return t.replace(e.astralRegExp,"a")}function pw(e,t){return t.replace(e.HTMLEntityRegExp,"")}function fw(e,t){return t.replace(e.connectorRegExp," ")}function hw(e,t){return t.replace(e.removeRegExp,"")}function gw(e,t){return t.replace(e.HTMLcommentRegExp,"")}function bw(e,t){return e.shortcodesRegExp?t.replace(e.shortcodesRegExp,"\n"):t}function vw(e,t){return t.replace(e.spaceRegExp," ")}function _w(e,t){return t.replace(e.HTMLEntityRegExp,"a")}function yw(e,t,n){var r,o;return e=(0,m.flow)(dw.bind(null,n),gw.bind(null,n),bw.bind(null,n),mw.bind(null,n),vw.bind(null,n),_w.bind(null,n))(e),null!==(r=null===(o=(e+="\n").match(t))||void 0===o?void 0:o.length)&&void 0!==r?r:0}const kw=(0,Wa.Z)((e=>{const{getMultiSelectedBlocks:t}=e(tr);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=function(e,t,n){const r=function(e,t){var n,r;const o=(0,m.extend)({},uw,t);return o.shortcodes=null!==(n=null===(r=o.l10n)||void 0===r?void 0:r.shortcodes)&&void 0!==n?n:[],o.shortcodes&&o.shortcodes.length&&(o.shortcodesRegExp=new RegExp("\\[\\/?(?:"+o.shortcodes.join("|")+")[^\\]]*?\\]","g")),o.type=e,"characters_excluding_spaces"!==o.type&&"characters_including_spaces"!==o.type&&(o.type="words"),o}(t,n);let o;switch(r.type){case"words":return o=r.wordsRegExp,function(e,t,n){var r,o;return e=(0,m.flow)(dw.bind(null,n),gw.bind(null,n),bw.bind(null,n),vw.bind(null,n),pw.bind(null,n),fw.bind(null,n),hw.bind(null,n))(e),null!==(r=null===(o=(e+="\n").match(t))||void 0===o?void 0:o.length)&&void 0!==r?r:0}(e,o,r);case"characters_including_spaces":return o=r.characters_including_spacesRegExp,yw(e,o,r);case"characters_excluding_spaces":return o=r.characters_excluding_spacesRegExp,yw(e,o,r);default:return 0}}((0,a.serialize)(t),"words");return(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,s.createElement)(ju,{icon:lf.Z,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,E.sprintf)((0,E._n)("%d block","%d blocks",t.length),t.length)),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,E.sprintf)((0,E._n)("%d word","%d words",n),n))))}));function Mw(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:r,styles:o}=(0,b.Z)((e=>{var n,r;const o=e(tr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(a.store).getBlockStyles(t)}}),[t]),i=(0,s.useMemo)((()=>[{label:(0,E.__)("Not set"),value:""},...o.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[o]),l=(0,s.useMemo)((()=>{var e;return null===(e=ff(o))||void 0===e?void 0:e.name}),[o]),c=(0,s.useCallback)((e=>{r(t,e)}),[t,r]);return n&&n!==l?r&&(0,s.createElement)("div",{className:"default-style-picker__default-switcher"},(0,s.createElement)(Mm.Z,{options:i,value:n||"",label:(0,E.__)("Default Style"),onChange:c})):null}const ww=e=>{let{clientId:t,blockName:n,hasBlockStyles:r}=e;const o=Bp(t);return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(Hu,o),(0,s.createElement)(yy,{blockClientId:t}),r&&(0,s.createElement)("div",null,(0,s.createElement)(Ea.Z,{title:(0,E.__)("Styles")},(0,s.createElement)(ry,{scope:"core/block-inspector",clientId:t}),(0,a.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,s.createElement)(Mw,{blockName:n}))),(0,s.createElement)(to.Slot,null),(0,s.createElement)(to.Slot,{__experimentalGroup:"color",label:(0,E.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,s.createElement)(to.Slot,{__experimentalGroup:"typography",label:(0,E.__)("Typography")}),(0,s.createElement)(to.Slot,{__experimentalGroup:"dimensions",label:(0,E.__)("Dimensions")}),(0,s.createElement)(to.Slot,{__experimentalGroup:"border",label:(0,E.__)("Border")}),(0,s.createElement)("div",null,(0,s.createElement)(Ew,null)),(0,s.createElement)(cw,{key:"back"}))},Ew=()=>{const e=(0,sr.Z)(eo.slotName);return Boolean(e.fills&&e.fills.length)?(0,s.createElement)(Ea.Z,{className:"block-editor-block-inspector__advanced",title:(0,E.__)("Advanced"),initialOpen:!1},(0,s.createElement)(to.Slot,{__experimentalGroup:"advanced"})):null},xw=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,hasBlockStyles:r,selectedBlockName:o,selectedBlockClientId:i,blockType:l}=(0,b.Z)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:r}=e(tr),{getBlockStyles:o}=e(a.store),i=t(),l=i&&r(i),s=l&&(0,a.getBlockType)(l),c=l&&o(l);return{count:n(),selectedBlockClientId:i,selectedBlockName:l,blockType:s,hasBlockStyles:c&&c.length>0}}),[]);if(n>1)return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(kw,null),(0,s.createElement)(to.Slot,null),(0,s.createElement)(to.Slot,{__experimentalGroup:"color",label:(0,E.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,s.createElement)(to.Slot,{__experimentalGroup:"typography",label:(0,E.__)("Typography")}),(0,s.createElement)(to.Slot,{__experimentalGroup:"dimensions",label:(0,E.__)("Dimensions")}),(0,s.createElement)(to.Slot,{__experimentalGroup:"border",label:(0,E.__)("Border")}));const c=o===(0,a.getUnregisteredTypeHandlerName)();return l&&i&&!c?(0,s.createElement)(ww,{clientId:i,blockName:l.name,hasBlockStyles:r}):t?(0,s.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,E.__)("No block selected.")):null};function Cw(e){let{children:t,__unstableContentRef:n,...r}=e;const o=(0,Ra.Z)("medium"),a=(0,b.Z)((e=>e(tr).getSettings().hasFixedToolbar),[]),i=(0,ud.sx)(),{getSelectedBlockClientIds:c,getBlockRootClientId:u}=(0,b.Z)(tr),{duplicateBlocks:d,removeBlocks:p,insertAfterBlock:f,insertBeforeBlock:h,clearSelectedBlock:g,moveBlocksUp:v,moveBlocksDown:_}=(0,Yr.Z)(tr);return(0,s.createElement)("div",(0,l.Z)({},r,{onKeyDown:function(e){if(i("core/block-editor/move-up",e)){const t=c();if(t.length){e.preventDefault();const n=u((0,m.first)(t));v(t,n)}}else if(i("core/block-editor/move-down",e)){const t=c();if(t.length){e.preventDefault();const n=u((0,m.first)(t));_(t,n)}}else if(i("core/block-editor/duplicate",e)){const t=c();t.length&&(e.preventDefault(),d(t))}else if(i("core/block-editor/remove",e)){const t=c();t.length&&(e.preventDefault(),p(t))}else if(i("core/block-editor/insert-after",e)){const t=c();t.length&&(e.preventDefault(),f((0,m.last)(t)))}else if(i("core/block-editor/insert-before",e)){const t=c();t.length&&(e.preventDefault(),h((0,m.first)(t)))}else i("core/block-editor/unselect",e)&&c().length>1&&(e.preventDefault(),g(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}),(0,s.createElement)(Lp,{__unstableContentRef:n},(a||!o)&&(0,s.createElement)(hh,{isFixed:!0}),(0,s.createElement)(_h,{__unstableContentRef:n}),(0,s.createElement)(ro.Z.Slot,{name:"block-toolbar",ref:oo(n)}),t,(0,s.createElement)(ro.Z.Slot,{name:"__unstable-block-tools-after",ref:oo(n)})))}const Sw=(0,s.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:a,showMostUsedBlocks:i=!1,__experimentalInsertionIndex:l,__experimentalFilterValue:c,onSelect:u=m.noop,shouldFocusBlock:d=!1}=e;const p=(0,b.Z)((e=>{const{getBlockRootClientId:t}=e(tr);return n||t(r)||void 0}),[r,n]);return(0,s.createElement)(fp,{onSelect:u,rootClientId:p,clientId:r,isAppender:o,showInserterHelpPanel:a,showMostUsedBlocks:i,__experimentalInsertionIndex:l,__experimentalFilterValue:c,shouldFocusBlock:d,ref:t})}));function Tw(){return null}Tw.Register=function(){const{registerShortcut:e}=(0,Yr.Z)(ud.h);return(0,s.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,E.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,E.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,E.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,E.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,E.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,E.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,E.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,E.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,E.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,E.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};const Lw=Tw;function Aw(){return(0,q.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const Nw=new Set([_u.UP,_u.RIGHT,_u.DOWN,_u.LEFT,_u.ENTER,_u.BACKSPACE]);function zw(){const e=(0,b.Z)((e=>e(tr).isTyping()),[]),{stopTyping:t}=(0,Yr.Z)(tr);return(0,Ar.Z)((n=>{if(!e)return;const{ownerDocument:r}=n;let o,a;function i(e){const{clientX:n,clientY:r}=e;o&&a&&(o!==n||a!==r)&&t(),o=n,a=r}return r.addEventListener("mousemove",i),()=>{r.removeEventListener("mousemove",i)}}),[e,t])}function Bw(){const e=(0,b.Z)((e=>e(tr).isTyping())),{startTyping:t,stopTyping:n}=(0,Yr.Z)(tr),r=zw(),o=(0,Ar.Z)((r=>{const{ownerDocument:o}=r,{defaultView:a}=o;if(e){let l;function s(e){const{target:t}=e;l=a.setTimeout((()=>{(0,ru.Z)(t)||n()}))}function c(e){const{keyCode:t}=e;t!==_u.ESCAPE&&t!==_u.TAB||n()}function u(){const e=a.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return r.addEventListener("focus",s),r.addEventListener("keydown",c),o.addEventListener("selectionchange",u),()=>{a.clearTimeout(l),r.removeEventListener("focus",s),r.removeEventListener("keydown",c),o.removeEventListener("selectionchange",u)}}function i(e){const{type:n,target:o}=e;(0,ru.Z)(o)&&r.contains(o)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&Nw.has(t)}(e))&&t()}return r.addEventListener("keypress",i),r.addEventListener("keydown",i),()=>{r.removeEventListener("keypress",i),r.removeEventListener("keydown",i)}}),[e,t,n]);return(0,Za.Z)([r,o])}const Ow=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:Bw()},t)},Dw=-1!==window.navigator.userAgent.indexOf("Trident"),Iw=new Set([_u.UP,_u.DOWN,_u.LEFT,_u.RIGHT]);function Pw(){const e=(0,b.Z)((e=>e(tr).hasSelectedBlock()),[]);return(0,Ar.Z)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:r}=n;let o,a,i;function l(){o||(o=r.requestAnimationFrame((()=>{m(),o=null})))}function s(e){a&&r.cancelAnimationFrame(a),a=r.requestAnimationFrame((()=>{c(e),a=null}))}function c(e){let{keyCode:o}=e;if(!p())return;const a=(0,od.Z)(r);if(!a)return;if(!i)return void(i=a);if(Iw.has(o))return void(i=a);const l=a.top-i.top;if(0===l)return;const s=(0,Jc.Z)(t);if(!s)return;const c=s===n.body,u=c?r.scrollY:s.scrollTop,d=c?0:s.getBoundingClientRect().top,m=c?i.top/r.innerHeight:(i.top-d)/(r.innerHeight-d);if(0===u&&m<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=a);const f=c?r.innerHeight:s.clientHeight;i.top+i.height>d+f||i.top{r.removeEventListener("scroll",l,!0),r.removeEventListener("resize",l,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),r.cancelAnimationFrame(o),r.cancelAnimationFrame(a)}}),[e])}const Rw=Dw?e=>e.children:function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:Pw(),className:"block-editor__typewriter"},t)},Zw=(0,s.createContext)({});function jw(e,t,n){const r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(n),r}function Hw(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=(0,s.useContext)(Zw),{name:o}=ar();n=n||o;const a=Boolean(null===(t=r[n])||void 0===t?void 0:t.has(e)),i=(0,s.useMemo)((()=>jw(r,n,e)),[r,n,e]),l=(0,s.useCallback)((e=>{let{children:t}=e;return(0,s.createElement)(Zw.Provider,{value:i},t)}),[i]);return[a,l]}var Ww=n(70664),Fw=n(27231);const qw=(0,s.forwardRef)((function(e,t){let{onClose:n,onChange:r,...o}=e;return(0,s.createElement)("div",{ref:t,className:"block-editor-publish-date-time-picker"},(0,s.createElement)(Tg.Z,{className:"block-editor-publish-date-time-picker__header"},(0,s.createElement)("h2",{className:"block-editor-publish-date-time-picker__heading"},(0,E.__)("Publish")),(0,s.createElement)(Ty.Z,null),(0,s.createElement)(Er.Z,{className:"block-editor-publish-date-time-picker__reset",variant:"tertiary",onClick:()=>null==r?void 0:r(null)},(0,E.__)("Now")),(0,s.createElement)(Er.Z,{className:"block-editor-publish-date-time-picker__close",icon:Fw.Z,label:(0,E.__)("Close"),onClick:n})),(0,s.createElement)(Ww.ZP,(0,l.Z)({__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:r},o)))})),Yw="wp-element-button",Vw=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&(0,m.isMatch)(e,n)}));return 1===n.length?n[0]:void 0};function Uw(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function $w(e,t){const n=e.split(/[(),]/g).filter(Boolean),r=n.slice(1).map((e=>Uw(Qw(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...r)+"px";case"max":return Math.max(...r)+"px";case"clamp":return 3!==r.length?null:r[1]r[2]?r[2]+"px":r[1]+"px";case"calc":return r[0]+"px"}}function Xw(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=$w(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return Uw(e)}function Gw(e){for(let t=0;tr.height?r.width:r.height)*n,"%":("font"===r.type?r.fontSize:r.width)*n,ch:8,ex:7.15625,lh:r.lineHeight},a={in:96,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return o[e.unit]?(o[e.unit]*e.value).toFixed(0)+"px":a[e.unit]?(a[e.unit]*e.value).toFixed(0)+"px":null}function Qw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=Uw(e);return n.unit||(n=Xw(e)),Gw(e)&&!n.unit?Kw(e):Jw(n,t)}const eE={};function tE(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}const nE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+tE(t);return eE[n]||(eE[n]=Qw(e,t)),eE[n]}},55047:e=>{e.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}},49588:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t,setAttributes:n}=e;const{showPostCounts:r,displayAsDropdown:c,type:u}=t;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(a.PanelBody,{title:(0,i.__)("Settings")},(0,o.createElement)(a.ToggleControl,{label:(0,i.__)("Display as dropdown"),checked:c,onChange:()=>n({displayAsDropdown:!c})}),(0,o.createElement)(a.ToggleControl,{label:(0,i.__)("Show post counts"),checked:r,onChange:()=>n({showPostCounts:!r})}),(0,o.createElement)(a.SelectControl,{label:(0,i.__)("Group by:"),options:[{label:(0,i.__)("Year"),value:"yearly"},{label:(0,i.__)("Month"),value:"monthly"},{label:(0,i.__)("Week"),value:"weekly"},{label:(0,i.__)("Day"),value:"daily"}],value:u,onChange:e=>n({type:e})}))),(0,o.createElement)("div",(0,l.useBlockProps)(),(0,o.createElement)(a.Disabled,null,(0,o.createElement)(s.default,{block:"core/archives",attributes:t}))))};var o=n(40818),a=n(16496),i=n(54730),l=n(39626),s=r(n(83148))},99265:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(12991),a=r(n(49588));const i={$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},showPostCounts:{type:"boolean",default:!1},type:{type:"string",default:"monthly"}},supports:{align:!0,html:!1},editorStyle:"wp-block-archives-editor"};t.metadata=i;const{name:l}=i;t.name=l;const s={icon:o.archive,example:{},edit:a.default};t.settings=s},52755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(40818),o=n(39626),a=[{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:a,loop:i,preload:l,src:s}=t;return(0,r.createElement)("figure",null,(0,r.createElement)("audio",{controls:"controls",src:s,autoPlay:n,loop:i,preload:l}),!o.RichText.isEmpty(a)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:a}))}}];t.default=a},88628:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(94184)),i=n(18452),l=n(16496),s=n(39626),c=n(54730),u=n(56191),d=n(12991),m=n(82402),p=n(48605);const f=["audio"];var h=(0,l.withNotices)((function(e){let{attributes:t,className:n,noticeOperations:r,setAttributes:h,onReplace:g,isSelected:b,noticeUI:v,insertBlocksAfter:_}=e;const{id:y,autoplay:k,caption:M,loop:w,preload:E,src:x}=t,C=!y&&(0,i.isBlobURL)(x),S=(0,u.useSelect)((e=>{const{getSettings:t}=e(s.store);return t().mediaUpload}),[]);function T(e){return t=>{h({[e]:t})}}function L(e){if(e!==x){const t=(0,p.createUpgradedEmbedBlock)({attributes:{url:e}});if(void 0!==t&&g)return void g(t);h({src:e,id:void 0})}}function A(e){r.removeAllNotices(),r.createErrorNotice(e)}function N(e){e&&e.url?h({src:e.url,id:e.id}):h({src:void 0,id:void 0})}(0,o.useEffect)((()=>{if(!y&&(0,i.isBlobURL)(x)){const e=(0,i.getBlobByURL)(x);e&&S({filesList:[e],onFileChange:e=>{let[t]=e;return N(t)},onError:e=>A(e),allowedTypes:f})}}),[]);const z=(0,a.default)(n,{"is-transient":C}),B=(0,s.useBlockProps)({className:z});return x?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.BlockControls,{group:"other"},(0,o.createElement)(s.MediaReplaceFlow,{mediaId:y,mediaURL:x,allowedTypes:f,accept:"audio/*",onSelect:N,onSelectURL:L,onError:A})),(0,o.createElement)(s.InspectorControls,null,(0,o.createElement)(l.PanelBody,{title:(0,c.__)("Settings")},(0,o.createElement)(l.ToggleControl,{label:(0,c.__)("Autoplay"),onChange:T("autoplay"),checked:k,help:function(e){return e?(0,c.__)("Autoplay may cause usability issues for some users."):null}}),(0,o.createElement)(l.ToggleControl,{label:(0,c.__)("Loop"),onChange:T("loop"),checked:w}),(0,o.createElement)(l.SelectControl,{label:(0,c._x)("Preload","noun; Audio block parameter"),value:E||"",onChange:e=>h({preload:e||void 0}),options:[{value:"",label:(0,c.__)("Browser default")},{value:"auto",label:(0,c.__)("Auto")},{value:"metadata",label:(0,c.__)("Metadata")},{value:"none",label:(0,c._x)("None","Preload value")}]}))),(0,o.createElement)("figure",B,(0,o.createElement)(l.Disabled,{isDisabled:!b},(0,o.createElement)("audio",{controls:"controls",src:x})),C&&(0,o.createElement)(l.Spinner,null),(!s.RichText.isEmpty(M)||b)&&(0,o.createElement)(s.RichText,{tagName:"figcaption","aria-label":(0,c.__)("Audio caption text"),placeholder:(0,c.__)("Add caption"),value:M,onChange:e=>h({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>_((0,m.createBlock)((0,m.getDefaultBlockName)()))}))):(0,o.createElement)("div",B,(0,o.createElement)(s.MediaPlaceholder,{icon:(0,o.createElement)(s.BlockIcon,{icon:d.audio}),onSelect:N,onSelectURL:L,accept:"audio/*",allowedTypes:f,value:t,notices:v,onError:A}))}));t.default=h},93131:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(12991),a=r(n(52755)),i=r(n(88628)),l=r(n(26786)),s=r(n(98774));const c={$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"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{anchor:!0,align:!0},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"};t.metadata=c;const{name:u}=c;t.name=u;const d={icon:o.audio,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"}},transforms:s.default,deprecated:a.default,edit:i.default,save:l.default};t.settings=d},26786:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;const{autoplay:n,caption:a,loop:i,preload:l,src:s}=t;return s&&(0,r.createElement)("figure",o.useBlockProps.save(),(0,r.createElement)("audio",{controls:"controls",src:s,autoPlay:n,loop:i,preload:l}),!o.RichText.isEmpty(a)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:a}))};var r=n(40818),o=n(39626)},98774:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(18452),o=n(82402),a={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform(e){const t=e[0];return(0,o.createBlock)("core/audio",{src:(0,r.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:e=>{let{named:{src:t,mp3:n,m4a:r,ogg:o,wav:a,wma:i}}=e;return t||n||r||o||a||i}},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}}}}]};t.default=a},51040:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:{ref:t},clientId:n}=e;const[d,m]=(0,s.__experimentalUseNoRecursiveRenders)(t),{record:p,hasResolved:f}=(0,a.useEntityRecord)("postType","wp_block",t),h=f&&!p,g=(0,o.useSelect)((e=>e(s.store).canRemoveBlock(n)),[n]),{__experimentalConvertBlockToStatic:b}=(0,o.useDispatch)(c.store),[v,_,y]=(0,a.useEntityBlockEditor)("postType","wp_block",{id:t}),[k,M]=(0,a.useEntityProp)("postType","wp_block","title",t),w=(0,s.__experimentalUseBlockOverlayActive)(n),E=(0,s.useBlockProps)({className:w?"block-library-block__reusable-block-container block-editor-block-content-overlay":"block-library-block__reusable-block-container"},{__unstableIsDisabled:w}),x=(0,s.useInnerBlocksProps)(E,{value:v,onInput:_,onChange:y,renderAppender:null!=v&&v.length?void 0:s.InnerBlocks.ButtonBlockAppender});return d?(0,r.createElement)("div",E,(0,r.createElement)(s.Warning,null,(0,l.__)("Block cannot be rendered inside itself."))):h?(0,r.createElement)("div",E,(0,r.createElement)(s.Warning,null,(0,l.__)("Block has been deleted or is unavailable."))):f?(0,r.createElement)(m,null,g&&(0,r.createElement)(s.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarButton,{onClick:()=>b(n),label:(0,l.__)("Convert to regular blocks"),icon:u.ungroup,showTooltip:!0}))),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(i.PanelBody,null,(0,r.createElement)(i.TextControl,{label:(0,l.__)("Name"),value:k,onChange:M}))),(0,r.createElement)("div",x)):(0,r.createElement)("div",E,(0,r.createElement)(i.Placeholder,null,(0,r.createElement)(i.Spinner,null)))};var r=n(40818),o=n(56191),a=n(71539),i=n(16496),l=n(54730),s=n(39626),c=n(77961),u=n(12991)},39248:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(12991),a=r(n(51040));const i={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/block",title:"Reusable block",category:"reusable",description:"Create and save content to reuse across your site. Update the block, and the changes apply everywhere it’s used.",textdomain:"default",attributes:{ref:{type:"number"}},supports:{customClassName:!1,html:!1,inserter:!1},editorStyle:"wp-block-editor"};t.metadata=i;const{name:l}=i;t.name=l;const s={edit:a.default,icon:o.symbol};t.settings=s},5663:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=n(96486),i=r(n(94184)),l=n(39626),s=n(38669),c=r(n(39997));const u=e=>{var t,n,r;const{borderRadius:o,...a}=e,i=[o,null===(t=a.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius].find((e=>"number"==typeof e&&0!==e));return i?{...a,style:{...a.style,border:{...null===(r=a.style)||void 0===r?void 0:r.border,radius:`${i}px`}}}:a},d=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient),{...(0,a.omit)(e,["customTextColor","customBackgroundColor","customGradient"]),style:t}},m=e=>d((0,a.omit)({...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0},["color","textColor"])),p={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}};var f=[{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:r,className:a}=e;const{fontSize:s,linkTarget:c,rel:u,style:d,text:m,title:p,url:f,width:h}=r;if(!m)return null;const g=(0,l.__experimentalGetBorderClassesAndStyles)(r),b=(0,l.__experimentalGetColorClassesAndStyles)(r),v=(0,l.__experimentalGetSpacingClassesAndStyles)(r),_=(0,i.default)("wp-block-button__link",b.className,g.className,{"no-border-radius":0===(null==d||null===(t=d.border)||void 0===t?void 0:t.radius)}),y={...g.style,...b.style,...v.style},k=(0,i.default)(a,{[`has-custom-width wp-block-button__width-${h}`]:h,"has-custom-font-size":s||(null==d||null===(n=d.typography)||void 0===n?void 0:n.fontSize)});return(0,o.createElement)("div",l.useBlockProps.save({className:k}),(0,o.createElement)(l.RichText.Content,{tagName:"a",className:_,href:f,title:p,style:y,value:m,target:c,rel:u}))}},{attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:r,className:a}=e;const{fontSize:s,linkTarget:c,rel:u,style:d,text:m,title:p,url:f,width:h}=r;if(!m)return null;const g=(0,l.__experimentalGetBorderClassesAndStyles)(r),b=(0,l.__experimentalGetColorClassesAndStyles)(r),v=(0,l.__experimentalGetSpacingClassesAndStyles)(r),_=(0,i.default)("wp-block-button__link",b.className,g.className,{"no-border-radius":0===(null==d||null===(t=d.border)||void 0===t?void 0:t.radius)}),y={...g.style,...b.style,...v.style},k=(0,i.default)(a,{[`has-custom-width wp-block-button__width-${h}`]:h,"has-custom-font-size":s||(null==d||null===(n=d.typography)||void 0===n?void 0:n.fontSize)});return(0,o.createElement)("div",l.useBlockProps.save({className:k}),(0,o.createElement)(l.RichText.Content,{tagName:"a",className:_,href:f,title:p,style:y,value:m,target:c,rel:u}))},migrate:c.default,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...p,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible(e){var t;let{style:n}=e;return"number"==typeof(null==n||null===(t=n.border)||void 0===t?void 0:t.radius)},save(e){var t,n,r;let{attributes:a,className:s}=e;const{fontSize:c,linkTarget:u,rel:d,style:m,text:p,title:f,url:h,width:g}=a;if(!p)return null;const b=null==m||null===(t=m.border)||void 0===t?void 0:t.radius,v=(0,l.__experimentalGetColorClassesAndStyles)(a),_=(0,i.default)("wp-block-button__link",v.className,{"no-border-radius":0===(null==m||null===(n=m.border)||void 0===n?void 0:n.radius)}),y={borderRadius:b||void 0,...v.style},k=(0,i.default)(s,{[`has-custom-width wp-block-button__width-${g}`]:g,"has-custom-font-size":c||(null==m||null===(r=m.typography)||void 0===r?void 0:r.fontSize)});return(0,o.createElement)("div",l.useBlockProps.save({className:k}),(0,o.createElement)(l.RichText.Content,{tagName:"a",className:_,href:h,title:f,style:y,value:p,target:u,rel:d}))},migrate:(0,s.compose)(c.default,u)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...p,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:r,linkTarget:a,rel:s,text:c,title:u,url:d,width:m}=t,p=(0,l.__experimentalGetColorClassesAndStyles)(t),f=(0,i.default)("wp-block-button__link",p.className,{"no-border-radius":0===r}),h={borderRadius:r?r+"px":void 0,...p.style},g=(0,i.default)(n,{[`has-custom-width wp-block-button__width-${m}`]:m});return(0,o.createElement)("div",l.useBlockProps.save({className:g}),(0,o.createElement)(l.RichText.Content,{tagName:"a",className:f,href:d,title:u,style:h,value:c,target:a,rel:s}))},migrate:(0,s.compose)(c.default,u)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...p,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:r,linkTarget:a,rel:s,text:c,title:u,url:d,width:m}=t,p=(0,l.__experimentalGetColorClassesAndStyles)(t),f=(0,i.default)("wp-block-button__link",p.className,{"no-border-radius":0===r}),h={borderRadius:r?r+"px":void 0,...p.style},g=(0,i.default)(n,{[`has-custom-width wp-block-button__width-${m}`]:m});return(0,o.createElement)("div",l.useBlockProps.save({className:g}),(0,o.createElement)(l.RichText.Content,{tagName:"a",className:f,href:d,title:u,style:h,value:c,target:a,rel:s}))},migrate:(0,s.compose)(c.default,u)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...p,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save(e){let{attributes:t}=e;const{borderRadius:n,linkTarget:r,rel:a,text:s,title:c,url:u}=t,d=(0,i.default)("wp-block-button__link",{"no-border-radius":0===n}),m={borderRadius:n?n+"px":void 0};return(0,o.createElement)(l.RichText.Content,{tagName:"a",className:d,href:u,title:c,style:m,value:s,target:r,rel:a})},migrate:u},{supports:{align:!0,alignWide:!1},attributes:{...p,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!e.customTextColor||!!e.customBackgroundColor||!!e.customGradient,migrate:(0,s.compose)(u,d),save(e){let{attributes:t}=e;const{backgroundColor:n,borderRadius:r,customBackgroundColor:a,customTextColor:s,customGradient:c,linkTarget:u,gradient:d,rel:m,text:p,textColor:f,title:h,url:g}=t,b=(0,l.getColorClassName)("color",f),v=!c&&(0,l.getColorClassName)("background-color",n),_=(0,l.__experimentalGetGradientClass)(d),y=(0,i.default)("wp-block-button__link",{"has-text-color":f||s,[b]:b,"has-background":n||a||c||d,[v]:v,"no-border-radius":0===r,[_]:_}),k={background:c||void 0,backgroundColor:v||c||d?void 0:a,color:b?void 0:s,borderRadius:r?r+"px":void 0};return(0,o.createElement)("div",null,(0,o.createElement)(l.RichText.Content,{tagName:"a",className:y,href:g,title:h,style:k,value:p,target:u,rel:m}))}},{attributes:{...p,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible:e=>e.className&&e.className.includes("is-style-squared"),migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),u(d({...e,className:t||void 0,borderRadius:0}))},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:r,customTextColor:a,linkTarget:s,rel:c,text:u,textColor:d,title:m,url:p}=t,f=(0,l.getColorClassName)("color",d),h=(0,l.getColorClassName)("background-color",n),g=(0,i.default)("wp-block-button__link",{"has-text-color":d||a,[f]:f,"has-background":n||r,[h]:h}),b={backgroundColor:h?void 0:r,color:f?void 0:a};return(0,o.createElement)("div",null,(0,o.createElement)(l.RichText.Content,{tagName:"a",className:g,href:p,title:m,style:b,value:u,target:s,rel:c}))}},{attributes:{...p,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:m,save(e){let{attributes:t}=e;const{url:n,text:r,title:a,backgroundColor:s,textColor:c,customBackgroundColor:u,customTextColor:d}=t,m=(0,l.getColorClassName)("color",c),p=(0,l.getColorClassName)("background-color",s),f=(0,i.default)("wp-block-button__link",{"has-text-color":c||d,[m]:m,"has-background":s||u,[p]:p}),h={backgroundColor:p?void 0:u,color:m?void 0:d};return(0,o.createElement)("div",null,(0,o.createElement)(l.RichText.Content,{tagName:"a",className:f,href:n,title:a,style:h,value:r}))}},{attributes:{...p,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:r,title:a,align:i,color:s,textColor:c}=t,u={backgroundColor:s,color:c};return(0,o.createElement)("div",{className:`align${i}`},(0,o.createElement)(l.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:a,style:u,value:r}))},migrate:m},{attributes:{...p,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:r,title:a,align:i,color:s,textColor:c}=t;return(0,o.createElement)("div",{className:`align${i}`,style:{backgroundColor:s}},(0,o.createElement)(l.RichText.Content,{tagName:"a",href:n,title:a,style:{color:c},value:r}))},migrate:m}];t.default=f},9707:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(67154)),i=r(n(94184)),l=n(54730),s=n(16496),c=n(39626),u=n(5560),d=n(12991),m=n(82402);const p="noreferrer noopener";function f(e){let{selectedWidth:t,setAttributes:n}=e;return(0,o.createElement)(s.PanelBody,{title:(0,l.__)("Width settings")},(0,o.createElement)(s.ButtonGroup,{"aria-label":(0,l.__)("Button width")},[25,50,75,100].map((e=>(0,o.createElement)(s.Button,{key:e,isSmall:!0,variant:e===t?"primary":void 0,onClick:()=>{var r;n({width:t===(r=e)?void 0:r})}},e,"%")))))}t.default=function(e){var t;const{attributes:n,setAttributes:r,className:h,isSelected:g,onReplace:b,mergeBlocks:v}=e,{linkTarget:_,placeholder:y,rel:k,style:M,text:w,url:E,width:x}=n,C=(0,o.useCallback)((e=>{r({rel:e})}),[r]),S=(0,c.__experimentalUseBorderProps)(n),T=(0,c.__experimentalUseColorProps)(n),L=(0,c.__experimentalGetSpacingClassesAndStyles)(n),A=(0,o.useRef)(),N=(0,o.useRef)(),z=(0,c.useBlockProps)({ref:A,onKeyDown:function(e){if(u.isKeyboardEvent.primary(e,"k"))P(e);else if(u.isKeyboardEvent.primaryShift(e,"k")){var t;R(),null===(t=N.current)||void 0===t||t.focus()}}}),[B,O]=(0,o.useState)(!1),D=!!E,I="_blank"===_;function P(e){e.preventDefault(),O(!0)}function R(){r({url:void 0,linkTarget:void 0,rel:void 0}),O(!1)}return(0,o.useEffect)((()=>{g||O(!1)}),[g]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",(0,a.default)({},z,{className:(0,i.default)(z.className,{[`has-custom-width wp-block-button__width-${x}`]:x,"has-custom-font-size":z.style.fontSize})}),(0,o.createElement)(c.RichText,{ref:N,"aria-label":(0,l.__)("Button text"),placeholder:y||(0,l.__)("Add text…"),value:w,onChange:e=>{r({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:(0,i.default)(h,"wp-block-button__link",T.className,S.className,{"no-border-radius":0===(null==M||null===(t=M.border)||void 0===t?void 0:t.radius)},c.__experimentalElementButtonClassName),style:{...S.style,...T.style,...L.style},onSplit:e=>(0,m.createBlock)("core/button",{...n,text:e}),onReplace:b,onMerge:v,identifier:"text"})),(0,o.createElement)(c.BlockControls,{group:"block"},!D&&(0,o.createElement)(s.ToolbarButton,{name:"link",icon:d.link,title:(0,l.__)("Link"),shortcut:u.displayShortcut.primary("k"),onClick:P}),D&&(0,o.createElement)(s.ToolbarButton,{name:"link",icon:d.linkOff,title:(0,l.__)("Unlink"),shortcut:u.displayShortcut.primaryShift("k"),onClick:R,isActive:!0})),g&&(B||D)&&(0,o.createElement)(s.Popover,{position:"bottom center",onClose:()=>{var e;O(!1),null===(e=N.current)||void 0===e||e.focus()},anchorRef:null==A?void 0:A.current,focusOnMount:!!B&&"firstElement",__unstableSlotName:"__unstable-block-tools-after"},(0,o.createElement)(c.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:E,opensInNewTab:I},onChange:e=>{let{url:t="",opensInNewTab:n}=e;r({url:t}),I!==n&&function(e){const t=e?"_blank":void 0;let n=k;t&&!k?n=p:t||k!==p||(n=void 0),r({linkTarget:t,rel:n})}(n)},onRemove:()=>{var e;R(),null===(e=N.current)||void 0===e||e.focus()},forceIsEditingLink:B})),(0,o.createElement)(c.InspectorControls,null,(0,o.createElement)(f,{selectedWidth:x,setAttributes:r})),(0,o.createElement)(c.InspectorControls,{__experimentalGroup:"advanced"},(0,o.createElement)(s.TextControl,{label:(0,l.__)("Link rel"),value:k||"",onChange:C})))}},10179:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(54730),a=n(12991),i=r(n(5663)),l=r(n(9707)),s=r(n(55602));const c={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!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"},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"};t.metadata=c;const{name:u}=c;t.name=u;const d={icon:a.button,example:{attributes:{className:"is-style-fill",text:(0,o.__)("Call to Action")}},edit:l.default,save:s.default,deprecated:i.default,merge:(e,t)=>{let{text:n=""}=t;return{...e,text:(e.text||"")+n}}};t.settings=d},55602:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n;let{attributes:r,className:l}=e;const{fontSize:s,linkTarget:c,rel:u,style:d,text:m,title:p,url:f,width:h}=r;if(!m)return null;const g=(0,i.__experimentalGetBorderClassesAndStyles)(r),b=(0,i.__experimentalGetColorClassesAndStyles)(r),v=(0,i.__experimentalGetSpacingClassesAndStyles)(r),_=(0,a.default)("wp-block-button__link",b.className,g.className,{"no-border-radius":0===(null==d||null===(t=d.border)||void 0===t?void 0:t.radius)},i.__experimentalElementButtonClassName),y={...g.style,...b.style,...v.style},k=(0,a.default)(l,{[`has-custom-width wp-block-button__width-${h}`]:h,"has-custom-font-size":s||(null==d||null===(n=d.typography)||void 0===n?void 0:n.fontSize)});return(0,o.createElement)("div",i.useBlockProps.save({className:k}),(0,o.createElement)(i.RichText.Content,{tagName:"a",className:_,href:f,title:p,style:y,value:m,target:c,rel:u}))};var o=n(40818),a=r(n(94184)),i=n(39626)},41086:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(94184)),i=n(39626);const l=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...r}=e;return(t||n)&&Object.assign(r,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),r};var s=[{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:l,save(e){let{attributes:{contentJustification:t,orientation:n}}=e;return(0,o.createElement)("div",i.useBlockProps.save({className:(0,a.default)({[`is-content-justification-${t}`]:t,"is-vertical":"vertical"===n})}),(0,o.createElement)(i.InnerBlocks.Content,null))}},{supports:{align:["center","left","right"],anchor:!0},save:()=>(0,o.createElement)("div",null,(0,o.createElement)(i.InnerBlocks.Content,null)),isEligible(e){let{align:t}=e;return t&&["center","left","right"].includes(t)},migrate:e=>l({...e,align:void 0,contentJustification:e.align})}];t.default=s},13535:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(40818),o=n(39626),a=n(56191),i=n(10179);const l=[i.name],s={name:i.name,attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};t.default=function(e){let{attributes:{layout:t={}}}=e;const n=(0,o.useBlockProps)(),c=(0,a.useSelect)((e=>{var t;const n=e(o.store).getSettings().__experimentalPreferredStyleVariations;return null==n||null===(t=n.value)||void 0===t?void 0:t[i.name]}),[]),u=(0,o.useInnerBlocksProps)(n,{allowedBlocks:l,__experimentalDefaultBlock:s,__experimentalDirectInsert:!0,template:[[i.name,{className:c&&`is-style-${c}`}]],__experimentalLayout:t,templateInsertUpdatesSelection:!0});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",u))}},24920:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(54730),a=n(12991),i=r(n(41086)),l=r(n(83353)),s=r(n(13535)),c=r(n(88538));const u={$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}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"};t.metadata=u;const{name:d}=u;t.name=d;const m={icon:a.buttons,example:{innerBlocks:[{name:"core/button",attributes:{text:(0,o.__)("Find out more")}},{name:"core/button",attributes:{text:(0,o.__)("Contact us")}}]},deprecated:i.default,transforms:l.default,edit:s.default,save:c.default};t.settings=m},88538:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=o.useInnerBlocksProps.save(o.useBlockProps.save());return(0,r.createElement)("div",e)};var r=n(40818),o=n(39626)},83353:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(82402),o=n(15953);const{name:a}={$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}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"};var i={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,r.createBlock)(a,{},e.map((e=>(0,r.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,r.createBlock)(a,{},e.map((e=>{const t=(0,o.__unstableCreateElement)(document,e.content),n=t.innerText||"",a=t.querySelector("a"),i=null==a?void 0:a.getAttribute("href");return(0,r.createBlock)("core/button",{text:n,url:i})}))),isMatch:e=>e.every((e=>{const t=(0,o.__unstableCreateElement)(document,e.content),n=t.innerText||"",r=t.querySelectorAll("a");return n.length<=30&&r.length<=1}))}]};t.default=i},62259:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;const n=(0,d.useBlockProps)(),{date:r,hasPosts:a,hasPostsResolved:i}=(0,c.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(m.store),r={status:"publish",per_page:1},o=t("postType","post",r),a=n("getEntityRecords",["postType","post",r]);let i;const l=e("core/editor");return l&&"post"===l.getEditedPostAttribute("type")&&(i=l.getEditedPostAttribute("date")),{date:i,hasPostsResolved:a,hasPosts:a&&1===(null==o?void 0:o.length)}}),[]);return a?(0,o.createElement)("div",n,(0,o.createElement)(s.Disabled,null,(0,o.createElement)(u.default,{block:"core/calendar",attributes:{...t,...f(r)}}))):(0,o.createElement)("div",n,(0,o.createElement)(s.Placeholder,{icon:l.calendar,label:(0,p.__)("Calendar")},i?(0,p.__)("No published posts found."):(0,o.createElement)(s.Spinner,null)))};var o=n(40818),a=r(n(30381)),i=r(n(59588)),l=n(12991),s=n(16496),c=n(56191),u=r(n(83148)),d=n(39626),m=n(71539),p=n(54730);const f=(0,i.default)((e=>{if(!e)return{};const t=(0,a.default)(e);return{year:t.year(),month:t.month()+1}}))},24608:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(12991),a=r(n(62259)),i=r(n(74257));const l={$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},style:"wp-block-calendar"};t.metadata=l;const{name:s}=l;t.name=s;const c={icon:o.calendar,example:{},edit:a.default,transforms:i.default};t.settings=c},74257:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(82402),o={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,r.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,r.createBlock)("core/archives")}]};t.default=o},70726:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){let{attributes:{displayAsDropdown:n,showHierarchy:d,showPostCounts:m,showOnlyTopLevel:p,showEmpty:f},setAttributes:h}=t;const g=(0,i.useInstanceId)(e,"blocks-category-select"),b={per_page:-1,hide_empty:!f,context:"view"};p&&(b.parent=0);const{records:v,isResolving:_}=(0,u.useEntityRecords)("taxonomy","category",b),y=e=>null!=v&&v.length?null===e?v:v.filter((t=>{let{parent:n}=t;return n===e})):[],k=e=>`wp-block-categories__list wp-block-categories__list-level-${e}`,M=e=>t=>h({[e]:t}),w=e=>e?(0,o.unescape)(e).trim():(0,s.__)("(Untitled)"),E=(e,t)=>{const n=y(e.id),{id:o,link:a,count:i,name:l}=e;return(0,r.createElement)("li",{key:o},(0,r.createElement)("a",{href:a,target:"_blank",rel:"noreferrer noopener"},w(l)),m&&(0,r.createElement)("span",{className:"wp-block-categories__post-count"},` (${i})`),d&&!!n.length&&(0,r.createElement)("ul",{className:k(t+1)},n.map((e=>E(e,t+1)))))},x=(e,t)=>{const{id:n,count:a,name:i}=e,l=y(n);return[(0,r.createElement)("option",{key:n},(0,o.times)(3*t,(()=>" ")),w(i),m&&` (${a})`),d&&!!l.length&&l.map((e=>x(e,t+1)))]};return(0,r.createElement)("div",(0,l.useBlockProps)(),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(a.PanelBody,{title:(0,s.__)("Settings")},(0,r.createElement)(a.ToggleControl,{label:(0,s.__)("Display as dropdown"),checked:n,onChange:M("displayAsDropdown")}),(0,r.createElement)(a.ToggleControl,{label:(0,s.__)("Show post counts"),checked:m,onChange:M("showPostCounts")}),(0,r.createElement)(a.ToggleControl,{label:(0,s.__)("Show only top level categories"),checked:p,onChange:M("showOnlyTopLevel")}),(0,r.createElement)(a.ToggleControl,{label:(0,s.__)("Show empty categories"),checked:f,onChange:M("showEmpty")}),!p&&(0,r.createElement)(a.ToggleControl,{label:(0,s.__)("Show hierarchy"),checked:d,onChange:M("showHierarchy")}))),_&&(0,r.createElement)(a.Placeholder,{icon:c.pin,label:(0,s.__)("Categories")},(0,r.createElement)(a.Spinner,null)),!_&&0===(null==v?void 0:v.length)&&(0,r.createElement)("p",null,(0,s.__)("Your site does not have any posts, so there is nothing to display here at the moment.")),!_&&(null==v?void 0:v.length)>0&&(n?(()=>{const e=y(d?0:null);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.VisuallyHidden,{as:"label",htmlFor:g},(0,s.__)("Categories")),(0,r.createElement)("select",{id:g,className:"wp-block-categories__dropdown"},e.map((e=>x(e,0)))))})():(()=>{const e=y(d?0:null);return(0,r.createElement)("ul",{className:k(0)},e.map((e=>E(e,0))))})()))};var r=n(40818),o=n(96486),a=n(16496),i=n(38669),l=n(39626),s=n(54730),c=n(12991),u=n(71539)},26762:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(12991),a=r(n(70726));const i={$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},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"};t.metadata=i;const{name:l}=i;t.name=l;const s={icon:o.category,example:{},edit:a.default};t.settings=s},39557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t,setAttributes:n,onRemove:i}=e;const l=(0,a.useBlockProps)();return(0,r.createElement)("pre",l,(0,r.createElement)(a.RichText,{tagName:"code",value:t.content,onChange:e=>n({content:e}),onRemove:i,placeholder:(0,o.__)("Write code…"),"aria-label":(0,o.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0}))};var r=n(40818),o=n(54730),a=n(39626)},47901:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(54730),a=n(12991),i=r(n(39557)),l=r(n(80549)),s=r(n(57858));const c={$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,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}}},style:"wp-block-code"};t.metadata=c;const{name:u}=c;t.name=u;const d={icon:a.code,example:{attributes:{content:(0,o.__)('// 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:s.default,edit:i.default,save:l.default};t.settings=d},80549:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;return(0,r.createElement)("pre",o.useBlockProps.save(),(0,r.createElement)(o.RichText.Content,{tagName:"code",value:(0,a.escape)(t.content)}))};var r=n(40818),o=n(39626),a=n(64171)},57858:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(82402),o={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,r.createBlock)("core/code")},{type:"block",blocks:["core/html","core/paragraph"],transform:e=>{let{content:t}=e;return(0,r.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":{}}}}}}}]};t.default=o},64171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escape=function(e){return(0,r.flow)(o,a)(e||"")};var r=n(96486);function o(e){return e.replace(/\[/g,"[")}function a(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}},68770:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(94184)),i=n(39626),l=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible(e){let{width:t}=e;return isFinite(t)},migrate:e=>({...e,width:`${e.width}%`}),save(e){let{attributes:t}=e;const{verticalAlignment:n,width:r}=t,l=(0,a.default)({[`is-vertically-aligned-${n}`]:n}),s={flexBasis:r+"%"};return(0,o.createElement)("div",{className:l,style:s},(0,o.createElement)(i.InnerBlocks.Content,null))}}];t.default=l},90768:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(94184)),i=n(39626),l=n(16496),s=n(56191),c=n(54730);t.default=function(e){let{attributes:{verticalAlignment:t,width:n,templateLock:r=!1,allowedBlocks:u},setAttributes:d,clientId:m}=e;const p=(0,a.default)("block-core-columns",{[`is-vertically-aligned-${t}`]:t}),f=(0,l.__experimentalUseCustomUnits)({availableUnits:(0,i.useSetting)("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:h,hasChildBlocks:g,rootClientId:b}=(0,s.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(i.store),r=n(m);return{hasChildBlocks:t(m).length>0,rootClientId:r,columnsIds:t(r)}}),[m]),{updateBlockAttributes:v}=(0,s.useDispatch)(i.store),_=Number.isFinite(n)?n+"%":n,y=(0,i.useBlockProps)({className:p,style:_?{flexBasis:_}:void 0}),k=h.length,M=h.indexOf(m)+1,w=(0,c.sprintf)((0,c.__)("%1$s (%2$d of %3$d)"),y["aria-label"],M,k),E=(0,i.useInnerBlocksProps)({...y,"aria-label":w},{templateLock:r,allowedBlocks:u,renderAppender:g?void 0:i.InnerBlocks.ButtonBlockAppender});return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(i.BlockVerticalAlignmentToolbar,{onChange:e=>{d({verticalAlignment:e}),v(b,{verticalAlignment:null})},value:t})),(0,o.createElement)(i.InspectorControls,null,(0,o.createElement)(l.PanelBody,{title:(0,c.__)("Column settings")},(0,o.createElement)(l.__experimentalUnitControl,{label:(0,c.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:n||"",onChange:e=>{e=0>parseFloat(e)?"0":e,d({width:e})},units:f}))),(0,o.createElement)("div",E))}},68415:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(12991),a=r(n(68770)),i=r(n(90768)),l=r(n(88650));const s={$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",!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}},__experimentalLayout:!0}};t.metadata=s;const{name:c}=s;t.name=c;const u={icon:o.column,edit:i.default,save:l.default,deprecated:a.default};t.settings=u},88650:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;const{verticalAlignment:n,width:r}=t,l=(0,a.default)({[`is-vertically-aligned-${n}`]:n});let s;if(r&&/\d/.test(r)){let e=Number.isFinite(r)?r+"%":r;if(!Number.isFinite(r)&&null!=r&&r.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(r)*t)/t+"%"}s={flexBasis:e}}const c=i.useBlockProps.save({className:l,style:s}),u=i.useInnerBlocksProps.save(c);return(0,o.createElement)("div",u)};var o=n(40818),a=r(n(94184)),i=n(39626)},50418:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=n(96486),i=r(n(94184)),l=n(82402),s=n(39626);function c(e){let t,{doc:n}=c;n||(n=document.implementation.createHTMLDocument(""),c.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 u=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),{...(0,a.omit)(e,["customTextColor","customBackgroundColor"]),style:t,isStackedOnMobile:!0}},save(e){let{attributes:t}=e;const{verticalAlignment:n,backgroundColor:r,customBackgroundColor:a,textColor:l,customTextColor:c}=t,u=(0,s.getColorClassName)("background-color",r),d=(0,s.getColorClassName)("color",l),m=(0,i.default)({"has-background":r||a,"has-text-color":l||c,[u]:u,[d]:d,[`are-vertically-aligned-${n}`]:n}),p={backgroundColor:u?void 0:a,color:d?void 0:c};return(0,o.createElement)("div",{className:m||void 0,style:p},(0,o.createElement)(s.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==c(e.originalContent))),migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let r=c(n);return void 0===r&&(r=0),e[r]||(e[r]=[]),e[r].push(t),e}),[]).map((e=>(0,l.createBlock)("core/column",{},e)));return[{...(0,a.omit)(e,["columns"]),isStackedOnMobile:!0},n]},save(e){let{attributes:t}=e;const{columns:n}=t;return(0,o.createElement)("div",{className:`has-${n}-columns`},(0,o.createElement)(s.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate:(e,t)=>[e={...(0,a.omit)(e,["columns"]),isStackedOnMobile:!0},t],save(e){let{attributes:t}=e;const{verticalAlignment:n,columns:r}=t,a=(0,i.default)(`has-${r}-columns`,{[`are-vertically-aligned-${n}`]:n});return(0,o.createElement)("div",{className:a},(0,o.createElement)(s.InnerBlocks.Content,null))}}];t.default=u},32906:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(94184)),i=n(96486),l=n(54730),s=n(16496),c=n(39626),u=n(56191),d=n(82402),m=n(56648);const p=["core/column"],f=(0,u.withDispatch)(((e,t,n)=>({updateAlignment(r){const{clientId:o,setAttributes:a}=t,{updateBlockAttributes:i}=e(c.store),{getBlockOrder:l}=n.select(c.store);a({verticalAlignment:r}),l(o).forEach((e=>{i(e,{verticalAlignment:r})}))},updateColumns(r,o){const{clientId:a}=t,{replaceInnerBlocks:l}=e(c.store),{getBlocks:s}=n.select(c.store);let u=s(a);const p=(0,m.hasExplicitPercentColumnWidths)(u),f=o>r;if(f&&p){const e=(0,m.toWidthPrecision)(100/o),t=(0,m.getRedistributedColumnWidths)(u,100-e);u=[...(0,m.getMappedColumnWidths)(u,t),...(0,i.times)(o-r,(()=>(0,d.createBlock)("core/column",{width:`${e}%`})))]}else if(f)u=[...u,...(0,i.times)(o-r,(()=>(0,d.createBlock)("core/column")))];else if(u=(0,i.dropRight)(u,r-o),p){const e=(0,m.getRedistributedColumnWidths)(u,100);u=(0,m.getMappedColumnWidths)(u,e)}l(a,u)}})))((function(e){let{attributes:t,setAttributes:n,updateAlignment:r,updateColumns:i,clientId:d}=e;const{isStackedOnMobile:m,verticalAlignment:f}=t,{count:h}=(0,u.useSelect)((e=>({count:e(c.store).getBlockCount(d)})),[d]),g=(0,a.default)({[`are-vertically-aligned-${f}`]:f,"is-not-stacked-on-mobile":!m}),b=(0,c.useBlockProps)({className:g}),v=(0,c.useInnerBlocksProps)(b,{allowedBlocks:p,orientation:"horizontal",renderAppender:!1});return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.BlockControls,null,(0,o.createElement)(c.BlockVerticalAlignmentToolbar,{onChange:r,value:f})),(0,o.createElement)(c.InspectorControls,null,(0,o.createElement)(s.PanelBody,null,(0,o.createElement)(s.RangeControl,{label:(0,l.__)("Columns"),value:h,onChange:e=>i(h,e),min:1,max:Math.max(6,h)}),h>6&&(0,o.createElement)(s.Notice,{status:"warning",isDismissible:!1},(0,l.__)("This column count exceeds the recommended amount and may cause visual breakage.")),(0,o.createElement)(s.ToggleControl,{label:(0,l.__)("Stack on mobile"),checked:m,onChange:()=>n({isStackedOnMobile:!m})}))),(0,o.createElement)("div",v))}));function h(e){let{clientId:t,name:n,setAttributes:r}=e;const{blockType:a,defaultVariation:l,variations:s}=(0,u.useSelect)((e=>{const{getBlockVariations:t,getBlockType:r,getDefaultBlockVariation:o}=e(d.store);return{blockType:r(n),defaultVariation:o(n,"block"),variations:t(n,"block")}}),[n]),{replaceInnerBlocks:m}=(0,u.useDispatch)(c.store),p=(0,c.useBlockProps)();return(0,o.createElement)("div",p,(0,o.createElement)(c.__experimentalBlockVariationPicker,{icon:(0,i.get)(a,["icon","src"]),label:(0,i.get)(a,["title"]),variations:s,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;e.attributes&&r(e.attributes),e.innerBlocks&&m(t,(0,d.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0}))}t.default=e=>{const{clientId:t}=e,n=(0,u.useSelect)((e=>e(c.store).getBlocks(t).length>0),[t])?f:h;return(0,o.createElement)(n,e)}},43640:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(54730),a=n(12991),i=r(n(50418)),l=r(n(32906)),s=r(n(1628)),c=r(n(19127)),u=r(n(98811));const d={$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"},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}}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"};t.metadata=d;const{name:m}=d;t.name=m;const p={icon:a.columns,variations:c.default,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,o.__)("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,o.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,o.__)("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,o.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:i.default,edit:l.default,save:s.default,transforms:u.default};t.settings=p},1628:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;const{isStackedOnMobile:n,verticalAlignment:r}=t,l=(0,a.default)({[`are-vertically-aligned-${r}`]:r,"is-not-stacked-on-mobile":!n}),s=i.useBlockProps.save({className:l}),c=i.useInnerBlocksProps.save(s);return(0,o.createElement)("div",c)};var o=n(40818),a=r(n(94184)),i=n(39626)},98811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(82402),o={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map((e=>{let{name:n,attributes:r,innerBlocks:o}=e;return["core/column",{width:`${t}%`},[[n,{...r},o]]]}));return(0,r.createBlock)("core/columns",{},(0,r.createBlocksFromInnerBlocksTemplate)(n))},isMatch:e=>{let{length:t}=e;return t&&t<=6}},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:o,textColor:a,style:i,mediaAlt:l,mediaId:s,mediaPosition:c,mediaSizeSlug:u,mediaType:d,mediaUrl:m,mediaWidth:p,verticalAlignment:f}=e;let h;h="image"!==d&&d?["core/video",{id:s,src:m}]:["core/image",{id:s,alt:l,url:m,sizeSlug:u,href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}];const g=[["core/column",{width:`${p}%`},[h]],["core/column",{width:100-p+"%"},t]];return"right"===c&&g.reverse(),(0,r.createBlock)("core/columns",{align:n,backgroundColor:o,textColor:a,style:i,verticalAlignment:f},(0,r.createBlocksFromInnerBlocksTemplate)(g))}}]};t.default=o},56648:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getColumnWidths=l,t.getEffectiveColumnWidth=a,t.getMappedColumnWidths=function(e,t){return e.map((e=>(0,r.merge)({},e,{attributes:{width:`${t[e.clientId]}%`}})))},t.getRedistributedColumnWidths=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const a=i(e,n);return(0,r.mapValues)(l(e,n),(e=>o(t*e/a)))},t.getTotalColumnsWidth=i,t.getWidthWithUnit=function(e,t){return e=0>parseFloat(e)?"0":e,s(t)&&(e=Math.min(e,100)),`${e}${t}`},t.getWidths=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.map((n=>{const r=n.attributes.width||100/e.length;return t?parseFloat(r):r}))},t.hasExplicitPercentColumnWidths=function(e){return e.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)}))},t.isPercentageUnit=s,t.toWidthPrecision=void 0;var r=n(96486);const o=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function a(e,t){const{width:n=100/t}=e.attributes;return o(n)}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return(0,r.sumBy)(e,(e=>a(e,t)))}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>{const r=a(n,t);return Object.assign(e,{[n.clientId]:r})}),{})}function s(e){return"%"===e}t.toWidthPrecision=o},19127:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(40818),o=n(16496),a=n(54730),i=[{name:"one-column-full",title:(0,a.__)("100"),description:(0,a.__)("One column"),icon:(0,r.createElement)(o.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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,a.__)("50 / 50"),description:(0,a.__)("Two columns; equal split"),icon:(0,r.createElement)(o.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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,a.__)("30 / 70"),description:(0,a.__)("Two columns; one-third, two-thirds split"),icon:(0,r.createElement)(o.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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,a.__)("70 / 30"),description:(0,a.__)("Two columns; two-thirds, one-third split"),icon:(0,r.createElement)(o.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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,a.__)("33 / 33 / 33"),description:(0,a.__)("Three columns; equal split"),icon:(0,r.createElement)(o.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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,a.__)("25 / 50 / 25"),description:(0,a.__)("Three columns; wide center column"),icon:(0,r.createElement)(o.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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"]}];t.default=i},91365:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=n(96486),i=r(n(94184)),l=n(82402),s=n(39626),c=n(54730),u=n(23858);function d(e){return e?{backgroundImage:`url(${e})`}:{}}function m(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function p(e){return{...e,dimRatio:e.url?e.dimRatio:100}}const f={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"}},h={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]}},g={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}};var b=[{attributes:h,supports:g,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,contentPosition:a,customGradient:l,customOverlayColor:c,dimRatio:m,focalPoint:p,useFeaturedImage:f,hasParallax:h,isDark:g,isRepeated:b,overlayColor:v,url:_,alt:y,id:k,minHeight:M,minHeightUnit:w}=t,E=(0,s.getColorClassName)("background-color",v),x=(0,s.__experimentalGetGradientClass)(r),C=M&&w?`${M}${w}`:M,S=u.IMAGE_BACKGROUND_TYPE===n,T=u.VIDEO_BACKGROUND_TYPE===n,L=!(h||b),A={...!S||L||f?{}:d(_),minHeight:C||void 0},N={backgroundColor:E?void 0:c,background:l||void 0},z=p&&L?`${Math.round(100*p.x)}% ${Math.round(100*p.y)}%`:void 0,B=(0,i.default)({"is-light":!g,"has-parallax":h,"is-repeated":b,"has-custom-content-position":!(0,u.isContentPositionCenter)(a)},(0,u.getPositionClassName)(a)),O=r||l;return(0,o.createElement)("div",s.useBlockProps.save({className:B,style:A}),(0,o.createElement)("span",{"aria-hidden":"true",className:(0,i.default)("wp-block-cover__background",E,(0,u.dimRatioToClass)(m),{"has-background-dim":void 0!==m,"wp-block-cover__gradient-background":_&&O&&0!==m,"has-background-gradient":O,[x]:x}),style:N}),!f&&S&&L&&_&&(0,o.createElement)("img",{className:(0,i.default)("wp-block-cover__image-background",k?`wp-image-${k}`:null),alt:y,src:_,style:{objectPosition:z},"data-object-fit":"cover","data-object-position":z}),T&&_&&(0,o.createElement)("video",{className:(0,i.default)("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:_,style:{objectPosition:z},"data-object-fit":"cover","data-object-position":z}),(0,o.createElement)("div",s.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))}},{attributes:h,supports:g,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,contentPosition:a,customGradient:l,customOverlayColor:c,dimRatio:m,focalPoint:p,hasParallax:f,isDark:h,isRepeated:g,overlayColor:b,url:v,alt:_,id:y,minHeight:k,minHeightUnit:M}=t,w=(0,s.getColorClassName)("background-color",b),E=(0,s.__experimentalGetGradientClass)(r),x=M?`${k}${M}`:k,C=u.IMAGE_BACKGROUND_TYPE===n,S=u.VIDEO_BACKGROUND_TYPE===n,T=!(f||g),L={...C&&!T?d(v):{},minHeight:x||void 0},A={backgroundColor:w?void 0:c,background:l||void 0},N=p&&T?`${Math.round(100*p.x)}% ${Math.round(100*p.y)}%`:void 0,z=(0,i.default)({"is-light":!h,"has-parallax":f,"is-repeated":g,"has-custom-content-position":!(0,u.isContentPositionCenter)(a)},(0,u.getPositionClassName)(a)),B=r||l;return(0,o.createElement)("div",s.useBlockProps.save({className:z,style:L}),(0,o.createElement)("span",{"aria-hidden":"true",className:(0,i.default)("wp-block-cover__background",w,(0,u.dimRatioToClass)(m),{"has-background-dim":void 0!==m,"wp-block-cover__gradient-background":v&&B&&0!==m,"has-background-gradient":B,[E]:E}),style:A}),C&&T&&v&&(0,o.createElement)("img",{className:(0,i.default)("wp-block-cover__image-background",y?`wp-image-${y}`:null),alt:_,src:v,style:{objectPosition:N},"data-object-fit":"cover","data-object-position":N}),S&&v&&(0,o.createElement)("video",{className:(0,i.default)("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:v,style:{objectPosition:N},"data-object-fit":"cover","data-object-position":N}),(0,o.createElement)("div",s.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))}},{attributes:h,supports:g,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,contentPosition:a,customGradient:l,customOverlayColor:c,dimRatio:m,focalPoint:p,hasParallax:f,isDark:h,isRepeated:g,overlayColor:b,url:v,alt:_,id:y,minHeight:k,minHeightUnit:M}=t,w=(0,s.getColorClassName)("background-color",b),E=(0,s.__experimentalGetGradientClass)(r),x=M?`${k}${M}`:k,C=u.IMAGE_BACKGROUND_TYPE===n,S=u.VIDEO_BACKGROUND_TYPE===n,T=!(f||g),L={...C&&!T?d(v):{},minHeight:x||void 0},A={backgroundColor:w?void 0:c,background:l||void 0},N=p&&T?`${Math.round(100*p.x)}% ${Math.round(100*p.y)}%`:void 0,z=(0,i.default)({"is-light":!h,"has-parallax":f,"is-repeated":g,"has-custom-content-position":!(0,u.isContentPositionCenter)(a)},(0,u.getPositionClassName)(a));return(0,o.createElement)("div",s.useBlockProps.save({className:z,style:L}),(0,o.createElement)("span",{"aria-hidden":"true",className:(0,i.default)(w,(0,u.dimRatioToClass)(m),"wp-block-cover__gradient-background",E,{"has-background-dim":void 0!==m,"has-background-gradient":r||l,[E]:!v&&E}),style:A}),C&&T&&v&&(0,o.createElement)("img",{className:(0,i.default)("wp-block-cover__image-background",y?`wp-image-${y}`:null),alt:_,src:v,style:{objectPosition:N},"data-object-fit":"cover","data-object-position":N}),S&&v&&(0,o.createElement)("video",{className:(0,i.default)("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:v,style:{objectPosition:N},"data-object-fit":"cover","data-object-position":N}),(0,o.createElement)("div",s.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))}},{attributes:{...f,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:g,save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,contentPosition:a,customGradient:l,customOverlayColor:c,dimRatio:p,focalPoint:f,hasParallax:h,isRepeated:g,overlayColor:b,url:v,alt:_,id:y,minHeight:k,minHeightUnit:M}=t,w=(0,s.getColorClassName)("background-color",b),E=(0,s.__experimentalGetGradientClass)(r),x=M?`${k}${M}`:k,C=u.IMAGE_BACKGROUND_TYPE===n,S=u.VIDEO_BACKGROUND_TYPE===n,T=!(h||g),L={...C&&!T?d(v):{},backgroundColor:w?void 0:c,background:l&&!v?l:void 0,minHeight:x||void 0},A=f&&T?`${Math.round(100*f.x)}% ${Math.round(100*f.y)}%`:void 0,N=(0,i.default)(m(p),w,{"has-background-dim":0!==p,"has-parallax":h,"is-repeated":g,"has-background-gradient":r||l,[E]:!v&&E,"has-custom-content-position":!(0,u.isContentPositionCenter)(a)},(0,u.getPositionClassName)(a));return(0,o.createElement)("div",s.useBlockProps.save({className:N,style:L}),v&&(r||l)&&0!==p&&(0,o.createElement)("span",{"aria-hidden":"true",className:(0,i.default)("wp-block-cover__gradient-background",E),style:l?{background:l}:void 0}),C&&T&&v&&(0,o.createElement)("img",{className:(0,i.default)("wp-block-cover__image-background",y?`wp-image-${y}`:null),alt:_,src:v,style:{objectPosition:A},"data-object-fit":"cover","data-object-position":A}),S&&v&&(0,o.createElement)("video",{className:(0,i.default)("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:v,style:{objectPosition:A},"data-object-fit":"cover","data-object-position":A}),(0,o.createElement)("div",{className:"wp-block-cover__inner-container"},(0,o.createElement)(s.InnerBlocks.Content,null)))},migrate:p},{attributes:{...f,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,contentPosition:a,customGradient:l,customOverlayColor:c,dimRatio:p,focalPoint:f,hasParallax:h,isRepeated:g,overlayColor:b,url:v,minHeight:_,minHeightUnit:y}=t,k=(0,s.getColorClassName)("background-color",b),M=(0,s.__experimentalGetGradientClass)(r),w=y?`${_}${y}`:_,E=u.IMAGE_BACKGROUND_TYPE===n,x=u.VIDEO_BACKGROUND_TYPE===n,C=E?d(v):{},S={};let T;k||(C.backgroundColor=c),l&&!v&&(C.background=l),C.minHeight=w||void 0,f&&(T=`${Math.round(100*f.x)}% ${Math.round(100*f.y)}%`,E&&!h&&(C.backgroundPosition=T),x&&(S.objectPosition=T));const L=(0,i.default)(m(p),k,{"has-background-dim":0!==p,"has-parallax":h,"is-repeated":g,"has-background-gradient":r||l,[M]:!v&&M,"has-custom-content-position":!(0,u.isContentPositionCenter)(a)},(0,u.getPositionClassName)(a));return(0,o.createElement)("div",s.useBlockProps.save({className:L,style:C}),v&&(r||l)&&0!==p&&(0,o.createElement)("span",{"aria-hidden":"true",className:(0,i.default)("wp-block-cover__gradient-background",M),style:l?{background:l}:void 0}),x&&v&&(0,o.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:v,style:S}),(0,o.createElement)("div",{className:"wp-block-cover__inner-container"},(0,o.createElement)(s.InnerBlocks.Content,null)))},migrate:p},{attributes:{...f,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,customGradient:a,customOverlayColor:l,dimRatio:c,focalPoint:p,hasParallax:f,overlayColor:h,url:g,minHeight:b}=t,v=(0,s.getColorClassName)("background-color",h),_=(0,s.__experimentalGetGradientClass)(r),y=n===u.IMAGE_BACKGROUND_TYPE?d(g):{};v||(y.backgroundColor=l),p&&!f&&(y.backgroundPosition=`${Math.round(100*p.x)}% ${Math.round(100*p.y)}%`),a&&!g&&(y.background=a),y.minHeight=b||void 0;const k=(0,i.default)(m(c),v,{"has-background-dim":0!==c,"has-parallax":f,"has-background-gradient":a,[_]:!g&&_});return(0,o.createElement)("div",{className:k,style:y},g&&(r||a)&&0!==c&&(0,o.createElement)("span",{"aria-hidden":"true",className:(0,i.default)("wp-block-cover__gradient-background",_),style:a?{background:a}:void 0}),u.VIDEO_BACKGROUND_TYPE===n&&g&&(0,o.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:g}),(0,o.createElement)("div",{className:"wp-block-cover__inner-container"},(0,o.createElement)(s.InnerBlocks.Content,null)))},migrate:p},{attributes:{...f,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,customGradient:a,customOverlayColor:l,dimRatio:c,focalPoint:p,hasParallax:f,overlayColor:h,url:g,minHeight:b}=t,v=(0,s.getColorClassName)("background-color",h),_=(0,s.__experimentalGetGradientClass)(r),y=n===u.IMAGE_BACKGROUND_TYPE?d(g):{};v||(y.backgroundColor=l),p&&!f&&(y.backgroundPosition=`${100*p.x}% ${100*p.y}%`),a&&!g&&(y.background=a),y.minHeight=b||void 0;const k=(0,i.default)(m(c),v,{"has-background-dim":0!==c,"has-parallax":f,"has-background-gradient":a,[_]:!g&&_});return(0,o.createElement)("div",{className:k,style:y},g&&(r||a)&&0!==c&&(0,o.createElement)("span",{"aria-hidden":"true",className:(0,i.default)("wp-block-cover__gradient-background",_),style:a?{background:a}:void 0}),u.VIDEO_BACKGROUND_TYPE===n&&g&&(0,o.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:g}),(0,o.createElement)("div",{className:"wp-block-cover__inner-container"},(0,o.createElement)(s.InnerBlocks.Content,null)))},migrate:p},{attributes:{...f,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save(e){let{attributes:t}=e;const{backgroundType:n,contentAlign:r,customOverlayColor:a,dimRatio:l,focalPoint:c,hasParallax:p,overlayColor:f,title:h,url:g}=t,b=(0,s.getColorClassName)("background-color",f),v=n===u.IMAGE_BACKGROUND_TYPE?d(g):{};b||(v.backgroundColor=a),c&&!p&&(v.backgroundPosition=`${100*c.x}% ${100*c.y}%`);const _=(0,i.default)(m(l),b,{"has-background-dim":0!==l,"has-parallax":p,[`has-${r}-content`]:"center"!==r});return(0,o.createElement)("div",{className:_,style:v},u.VIDEO_BACKGROUND_TYPE===n&&g&&(0,o.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:g}),!s.RichText.isEmpty(h)&&(0,o.createElement)(s.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:h}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100};return[(0,a.omit)(t,["title","contentAlign"]),[(0,l.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,c.__)("Write title…")})]]}},{attributes:{...f,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save(e){let{attributes:t}=e;const{url:n,title:r,hasParallax:a,dimRatio:l,align:c,contentAlign:u,overlayColor:p,customOverlayColor:f}=t,h=(0,s.getColorClassName)("background-color",p),g=d(n);h||(g.backgroundColor=f);const b=(0,i.default)("wp-block-cover-image",m(l),h,{"has-background-dim":0!==l,"has-parallax":a,[`has-${u}-content`]:"center"!==u},c?`align${c}`:null);return(0,o.createElement)("div",{className:b,style:g},!s.RichText.isEmpty(r)&&(0,o.createElement)(s.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100};return[(0,a.omit)(t,["title","contentAlign","align"]),[(0,l.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,c.__)("Write title…")})]]}},{attributes:{...f,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save(e){let{attributes:t}=e;const{url:n,title:r,hasParallax:a,dimRatio:l,align:c}=t,u=d(n),p=(0,i.default)("wp-block-cover-image",m(l),{"has-background-dim":0!==l,"has-parallax":a},c?`align${c}`:null);return(0,o.createElement)("section",{className:p,style:u},(0,o.createElement)(s.RichText.Content,{tagName:"h2",value:r}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100};return[(0,a.omit)(t,["title","contentAlign","align"]),[(0,l.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,c.__)("Write title…")})]]}}];t.default=b},28278:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t,setAttributes:n,onSelectMedia:c,currentSettings:u}=e;const{contentPosition:d,id:m,useFeaturedImage:p,dimRatio:f,minHeight:h,minHeightUnit:g}=t,{hasInnerBlocks:b,url:v}=u,[_,y]=(0,r.useState)(h),[k,M]=(0,r.useState)(g),w="vh"===g&&100===h;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(a.__experimentalBlockAlignmentMatrixControl,{label:(0,i.__)("Change content position"),value:d,onChange:e=>n({contentPosition:e}),isDisabled:!b}),(0,r.createElement)(a.__experimentalBlockFullHeightAligmentControl,{isActive:w,onToggle:()=>w?n("vh"===k&&100===_?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:_,minHeightUnit:k}):(y(h),M(g),n({minHeight:100,minHeightUnit:"vh"})),isDisabled:!b})),(0,r.createElement)(a.BlockControls,{group:"other"},(0,r.createElement)(o.ToolbarButton,{icon:l.postFeaturedImage,label:(0,i.__)("Use featured image"),isPressed:p,onClick:()=>{n({id:void 0,url:void 0,useFeaturedImage:!p,dimRatio:100===f?50:f,backgroundType:p?s.IMAGE_BACKGROUND_TYPE:void 0})}}),!p&&(0,r.createElement)(a.MediaReplaceFlow,{mediaId:m,mediaURL:v,allowedTypes:s.ALLOWED_MEDIA_TYPES,accept:"image/*,video/*",onSelect:c,name:v?(0,i.__)("Replace"):(0,i.__)("Add Media")})))};var r=n(40818),o=n(16496),a=n(39626),i=n(54730),l=n(12991),s=n(23858)},3148:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{disableMediaButtons:t=!1,children:n,onSelectMedia:s,onError:c,style:u}=e;return(0,r.createElement)(o.MediaPlaceholder,{icon:(0,r.createElement)(o.BlockIcon,{icon:i.cover}),labels:{title:(0,a.__)("Cover"),instructions:(0,a.__)("Drag and drop onto this block, upload, or select existing media from your library.")},onSelect:s,accept:"image/*,video/*",allowedTypes:l.ALLOWED_MEDIA_TYPES,disableMediaButtons:t,onError:c,style:u},n)};var r=n(40818),o=n(39626),a=n(54730),i=n(12991),l=n(23858)},16466:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(67154)),i=r(n(94184)),l=n(96872),s=r(n(12121)),c=n(71539),u=n(16496),d=n(38669),m=n(39626),p=n(54730),f=n(56191),h=n(18452),g=n(19132),b=n(23858),v=r(n(33287)),_=r(n(48377)),y=r(n(28278)),k=r(n(3148)),M=r(n(78709));(0,l.extend)([s.default]);var w=(0,d.compose)([(0,m.withColors)({overlayColor:"background-color"})])((function(e){var t;let{attributes:n,clientId:r,isSelected:l,overlayColor:s,setAttributes:d,setOverlayColor:w,toggleSelection:E,context:{postId:x,postType:C}}=e;const{contentPosition:S,id:T,useFeaturedImage:L,dimRatio:A,focalPoint:N,hasParallax:z,isDark:B,isRepeated:O,minHeight:D,minHeightUnit:I,alt:P,allowedBlocks:R,templateLock:Z}=n,[j]=(0,c.useEntityProp)("postType",C,"featured_media",x),H=(0,f.useSelect)((e=>j&&e(c.store).getMedia(j,{context:"view"})),[j]),W=null==H?void 0:H.source_url,F=L?W:n.url,q=L?b.IMAGE_BACKGROUND_TYPE:n.backgroundType,{__unstableMarkNextChangeAsNotPersistent:Y}=(0,f.useDispatch)(m.store),{createErrorNotice:V}=(0,f.useDispatch)(g.store),{gradientClass:U,gradientValue:$}=(0,m.__experimentalUseGradient)(),X=(0,b.attributesFromMedia)(d,A),G=((e,t)=>!e&&(0,h.isBlobURL)(t))(T,F),K=e=>{V(e,{type:"snackbar"})},J=(0,o.useRef)(),Q=(0,v.default)(F,A,s.color,J);(0,o.useEffect)((()=>{Y(),d({isDark:Q})}),[Q]);const ee=b.IMAGE_BACKGROUND_TYPE===q,te=b.VIDEO_BACKGROUND_TYPE===q,ne=D&&I?`${D}${I}`:D,re=!(z||O),oe={minHeight:ne||void 0},ae=F?`url(${F})`:void 0,ie=(0,b.mediaPosition)(N),le={backgroundColor:s.color},se={objectPosition:N&&re?(0,b.mediaPosition)(N):void 0},ce=!!(F||s.color||$),ue=(0,f.useSelect)((e=>e(m.store).getBlock(r).innerBlocks.length>0),[r]),de=(0,o.useRef)(),me=(0,m.useBlockProps)({ref:de}),pe=function(e){return[["core/paragraph",{align:"center",placeholder:(0,p.__)("Write title…"),...e}]]}({fontSize:null!==(t=(0,m.useSetting)("typography.fontSizes"))&&void 0!==t&&t.length?"large":void 0}),fe=(0,m.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:pe,templateInsertUpdatesSelection:!0,allowedBlocks:R,templateLock:Z}),he={isVideoBackground:te,isImageBackground:ee,mediaElement:J,hasInnerBlocks:ue,url:F,isImgElement:re,overlayColor:s};if(!ue&&!ce)return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(y.default,{attributes:n,setAttributes:d,onSelectMedia:X,currentSettings:he}),(0,o.createElement)(_.default,{attributes:n,setAttributes:d,clientId:r,setOverlayColor:w,coverRef:de,currentSettings:he}),(0,o.createElement)("div",(0,a.default)({},me,{className:(0,i.default)("is-placeholder",me.className)}),(0,o.createElement)(k.default,{onSelectMedia:X,onError:K,style:{minHeight:ne||void 0}},(0,o.createElement)("div",{className:"wp-block-cover__placeholder-background-options"},(0,o.createElement)(m.ColorPalette,{disableCustomColors:!0,value:s.color,onChange:w,clearable:!1}))),(0,o.createElement)(M.default,{className:"block-library-cover__resize-container",onResizeStart:()=>{d({minHeightUnit:"px"}),E(!1)},onResize:e=>{d({minHeight:e})},onResizeStop:e=>{E(!0),d({minHeight:e})},showHandle:l})));const ge=(0,i.default)({"is-dark-theme":B,"is-light":!B,"is-transient":G,"has-parallax":z,"is-repeated":O,"has-custom-content-position":!(0,b.isContentPositionCenter)(S)},(0,b.getPositionClassName)(S));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(y.default,{attributes:n,setAttributes:d,onSelectMedia:X,currentSettings:he}),(0,o.createElement)(_.default,{attributes:n,setAttributes:d,clientId:r,setOverlayColor:w,coverRef:de,currentSettings:he}),(0,o.createElement)("div",(0,a.default)({},me,{className:(0,i.default)(ge,me.className),style:{...oe,...me.style},"data-url":F}),(0,o.createElement)(M.default,{className:"block-library-cover__resize-container",onResizeStart:()=>{d({minHeightUnit:"px"}),E(!1)},onResize:e=>{d({minHeight:e})},onResizeStop:e=>{E(!0),d({minHeight:e})},showHandle:l}),(0,o.createElement)("span",{"aria-hidden":"true",className:(0,i.default)("wp-block-cover__background",(0,b.dimRatioToClass)(A),{[s.class]:s.class,"has-background-dim":void 0!==A,"wp-block-cover__gradient-background":F&&$&&0!==A,"has-background-gradient":$,[U]:U}),style:{backgroundImage:$,...le}}),F&&ee&&(re?(0,o.createElement)("img",{ref:J,className:"wp-block-cover__image-background",alt:P,src:F,style:se}):(0,o.createElement)("div",{ref:J,role:"img",className:(0,i.default)(ge,"wp-block-cover__image-background"),style:{backgroundImage:ae,backgroundPosition:ie}})),F&&te&&(0,o.createElement)("video",{ref:J,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:F,style:se}),G&&(0,o.createElement)(u.Spinner,null),(0,o.createElement)(k.default,{disableMediaButtons:!0,onSelectMedia:X,onError:K}),(0,o.createElement)("div",fe)))}));t.default=w},48377:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t,setAttributes:n,clientId:a,setOverlayColor:u,coverRef:d,currentSettings:m}=e;const{useFeaturedImage:p,dimRatio:f,focalPoint:h,hasParallax:g,isRepeated:b,minHeight:v,minHeightUnit:_,alt:y}=t,{isVideoBackground:k,isImageBackground:M,mediaElement:w,url:E,isImgElement:x,overlayColor:C}=m,{gradientValue:S,setGradient:T}=(0,i.__experimentalUseGradient)(),L=k||M&&(!g||b),A=e=>{const[t,n]=w.current?[w.current.style,"objectPosition"]:[d.current.style,"backgroundPosition"];t[n]=(0,s.mediaPosition)(e)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,!!E&&(0,r.createElement)(o.PanelBody,{title:(0,l.__)("Media settings")},M&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.ToggleControl,{label:(0,l.__)("Fixed background"),checked:g,onChange:()=>{n({hasParallax:!g,...g?{}:{focalPoint:void 0}})}}),(0,r.createElement)(o.ToggleControl,{label:(0,l.__)("Repeated background"),checked:b,onChange:()=>{n({isRepeated:!b})}})),L&&(0,r.createElement)(o.FocalPointPicker,{label:(0,l.__)("Focal point picker"),url:E,value:h,onDragStart:A,onDrag:A,onChange:e=>n({focalPoint:e})}),!p&&E&&M&&x&&(0,r.createElement)(o.TextareaControl,{label:(0,l.__)("Alt text (alternative text)"),value:y,onChange:e=>n({alt:e}),help:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,l.__)("Describe the purpose of the image")),(0,l.__)("Leave empty if the image is purely decorative."))}),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.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,l.__)("Clear Media")))),(0,r.createElement)(i.__experimentalPanelColorGradientSettings,{__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,title:(0,l.__)("Overlay"),initialOpen:!0,settings:[{colorValue:C.color,gradientValue:S,onColorChange:u,onGradientChange:T,label:(0,l.__)("Color")}]},(0,r.createElement)(o.RangeControl,{label:(0,l.__)("Opacity"),value:f,onChange:e=>n({dimRatio:e}),min:0,max:100,step:10,required:!0}))),(0,r.createElement)(i.InspectorControls,{__experimentalGroup:"dimensions"},(0,r.createElement)(o.__experimentalToolsPanelItem,{hasValue:()=>!!v,label:(0,l.__)("Minimum height"),onDeselect:()=>n({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:a},(0,r.createElement)(c,{value:v,unit:_,onChange:e=>n({minHeight:e}),onUnitChange:e=>n({minHeightUnit:e})}))))};var r=n(40818),o=n(16496),a=n(38669),i=n(39626),l=n(54730),s=n(23858);function c(e){let{onChange:t,onUnitChange:n,unit:c="px",value:u=""}=e;const d=`block-cover-height-input-${(0,a.useInstanceId)(o.__experimentalUnitControl)}`,m="px"===c,p=(0,o.__experimentalUseCustomUnits)({availableUnits:(0,i.useSetting)("spacing.units")||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),f=(0,r.useMemo)((()=>{const[e]=(0,o.__experimentalParseQuantityAndUnitFromRawValue)(u);return[e,c].join("")}),[c,u]),h=m?s.COVER_MIN_HEIGHT:0;return(0,r.createElement)(o.BaseControl,{label:(0,l.__)("Minimum height of cover"),id:d},(0,r.createElement)(o.__experimentalUnitControl,{id:d,isResetValueOnUnitChange:!0,min:h,onChange:e=>{const n=""!==e?parseFloat(e):void 0;isNaN(n)&&void 0!==n||t(n)},onUnitChange:n,style:{maxWidth:80},units:p,value:f}))}},78709:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{className:t,onResizeStart:n,onResize:r,onResizeStop:c,...u}=e;const[d,m]=(0,o.useState)(!1);return(0,o.createElement)(l.ResizableBox,(0,a.default)({className:(0,i.default)(t,{"is-resizing":d}),enable:s,onResizeStart:(e,t,o)=>{n(o.clientHeight),r(o.clientHeight)},onResize:(e,t,n)=>{r(n.clientHeight),d||m(!0)},onResizeStop:(e,t,n)=>{c(n.clientHeight),m(!1)}},u))};var o=n(40818),a=r(n(67154)),i=r(n(94184)),l=n(16496);const s={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1}},33287:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const[o,s]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{e&&t<=50&&r.current&&l().getColorAsync(r.current,(e=>{s(e.isDark)}))}),[e,e&&t<=50&&r.current,s]),(0,i.useEffect)((()=>{if(t>50||!e){if(!n)return void s(!0);s((0,a.colord)(n).isDark())}}),[n,t>50||!e,s]),(0,i.useEffect)((()=>{e||n||s(!1)}),[!e&&!n,s]),o};var o=r(n(67667)),a=n(96872),i=n(40818);function l(){return l.fastAverageColor||(l.fastAverageColor=new o.default),l.fastAverageColor}},28988:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(54730),a=n(12991),i=r(n(91365)),l=r(n(16466)),s=r(n(40122)),c=r(n(33032));const u={$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",!1]}},usesContext:["postId","postType"],supports:{anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},editorStyle:"wp-block-cover-editor",style:"wp-block-cover"};t.metadata=u;const{name:d}=u;t.name=d;const m={icon:a.cover,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{customFontSize:48,content:(0,o.__)("Snow Patrol"),align:"center"}}]},transforms:c.default,save:s.default,edit:l.default,deprecated:i.default};t.settings=m},40122:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;const{backgroundType:n,gradient:r,contentPosition:s,customGradient:c,customOverlayColor:u,dimRatio:d,focalPoint:m,useFeaturedImage:p,hasParallax:f,isDark:h,isRepeated:g,overlayColor:b,url:v,alt:_,id:y,minHeight:k,minHeightUnit:M}=t,w=(0,i.getColorClassName)("background-color",b),E=(0,i.__experimentalGetGradientClass)(r),x=k&&M?`${k}${M}`:k,C=l.IMAGE_BACKGROUND_TYPE===n,S=l.VIDEO_BACKGROUND_TYPE===n,T=!(f||g),L={minHeight:x||void 0},A={backgroundColor:w?void 0:u,background:c||void 0},N=m&&T?(0,l.mediaPosition)(m):void 0,z=v?`url(${v})`:void 0,B=(0,l.mediaPosition)(m),O=(0,a.default)({"is-light":!h,"has-parallax":f,"is-repeated":g,"has-custom-content-position":!(0,l.isContentPositionCenter)(s)},(0,l.getPositionClassName)(s)),D=(0,a.default)("wp-block-cover__image-background",y?`wp-image-${y}`:null,{"has-parallax":f,"is-repeated":g}),I=r||c;return(0,o.createElement)("div",i.useBlockProps.save({className:O,style:L}),(0,o.createElement)("span",{"aria-hidden":"true",className:(0,a.default)("wp-block-cover__background",w,(0,l.dimRatioToClass)(d),{"has-background-dim":void 0!==d,"wp-block-cover__gradient-background":v&&I&&0!==d,"has-background-gradient":I,[E]:E}),style:A}),!p&&C&&v&&(T?(0,o.createElement)("img",{className:D,alt:_,src:v,style:{objectPosition:N},"data-object-fit":"cover","data-object-position":N}):(0,o.createElement)("div",{role:"img",className:D,style:{backgroundPosition:B,backgroundImage:z}})),S&&v&&(0,o.createElement)("video",{className:(0,a.default)("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:v,style:{objectPosition:N},"data-object-fit":"cover","data-object-position":N}),(0,o.createElement)("div",i.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})))};var o=n(40818),a=r(n(94184)),i=n(39626),l=n(23858)},23858:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIDEO_BACKGROUND_TYPE=t.IMAGE_BACKGROUND_TYPE=t.DEFAULT_FOCAL_POINT=t.COVER_MIN_HEIGHT=t.COVER_MAX_HEIGHT=t.COVER_DEFAULT_HEIGHT=t.ALLOWED_MEDIA_TYPES=void 0,t.attributesFromMedia=function(e,t){return n=>{if(!n||!n.url)return void e({url:void 0,id:void 0});let o;if((0,r.isBlobURL)(n.url)&&(n.type=(0,r.getBlobTypeByURL)(n.url)),n.media_type)o=n.media_type===a?a:i;else{if(n.type!==a&&n.type!==i)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,...o===i?{focalPoint:void 0,hasParallax:void 0}:{}})}},t.dimRatioToClass=function(e){return 50===e||void 0===!e?null:"has-background-dim-"+10*Math.round(e/10)},t.getPositionClassName=function(e){return s(e)?"":o[e]},t.isContentPositionCenter=s,t.mediaPosition=function(){let{x:e,y:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;return`${Math.round(100*e)}% ${Math.round(100*t)}%`};var r=n(18452);const o={"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"},a="image";t.IMAGE_BACKGROUND_TYPE=a;const i="video";t.VIDEO_BACKGROUND_TYPE=i,t.COVER_MIN_HEIGHT=50,t.COVER_MAX_HEIGHT=1e3,t.COVER_DEFAULT_HEIGHT=300;const l={x:.5,y:.5};function s(e){return!e||"center center"===e||"center"===e}t.DEFAULT_FOCAL_POINT=l,t.ALLOWED_MEDIA_TYPES=["image","video"]},33032:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(82402),a=n(23858),i=r(n(8184)),l={from:[{type:"block",blocks:["core/image"],transform:e=>{var t;let{caption:n,url:r,alt:a,align:i,id:l,anchor:s,style:c}=e;return(0,o.createBlock)("core/cover",{dimRatio:50,url:r,alt:a,align:i,id:l,anchor:s,style:{color:{duotone:null==c||null===(t=c.color)||void 0===t?void 0:t.duotone}}},[(0,o.createBlock)("core/paragraph",{content:n,fontSize:"large",align:"center"})])}},{type:"block",blocks:["core/video"],transform:e=>{let{caption:t,src:n,align:r,id:i,anchor:l}=e;return(0,o.createBlock)("core/cover",{dimRatio:50,url:n,align:r,id:i,backgroundType:a.VIDEO_BACKGROUND_TYPE,anchor:l},[(0,o.createBlock)("core/paragraph",{content:t,fontSize:"large",align:"center"})])}},{type:"block",blocks:["core/group"],transform:(e,t)=>{var n,r,a,l,s;const{align:c,anchor:u,backgroundColor:d,gradient:m,style:p}=e;if(1===(null==t?void 0:t.length)&&"core/cover"===(null===(n=t[0])||void 0===n?void 0:n.name))return(0,o.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);const f={align:c,anchor:u,dimRatio:d||m||null!=p&&null!==(r=p.color)&&void 0!==r&&r.background||null!=p&&null!==(a=p.color)&&void 0!==a&&a.gradient?void 0:50,overlayColor:d,customOverlayColor:null==p||null===(l=p.color)||void 0===l?void 0:l.background,gradient:m,customGradient:null==p||null===(s=p.color)||void 0===s?void 0:s.gradient},h={...e,backgroundColor:void 0,gradient:void 0,style:(0,i.default)({...null==e?void 0:e.style,color:null!=p&&p.color?{...null==p?void 0:p.color,background:void 0,gradient:void 0}:void 0})};return(0,o.createBlock)("core/cover",f,[(0,o.createBlock)("core/group",h,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:e=>{let{backgroundType:t,url:n,overlayColor:r,customOverlayColor:o,gradient:i,customGradient:l}=e;return n?t===a.IMAGE_BACKGROUND_TYPE:!(r||o||i||l)},transform:e=>{var t;let{title:n,url:r,alt:a,align:i,id:l,anchor:s,style:c}=e;return(0,o.createBlock)("core/image",{caption:n,url:r,alt:a,align:i,id:l,anchor:s,style:{color:{duotone:null==c||null===(t=c.color)||void 0===t?void 0:t.duotone}}})}},{type:"block",blocks:["core/video"],isMatch:e=>{let{backgroundType:t,url:n,overlayColor:r,customOverlayColor:o,gradient:i,customGradient:l}=e;return n?t===a.VIDEO_BACKGROUND_TYPE:!(r||o||i||l)},transform:e=>{let{title:t,url:n,align:r,id:a,anchor:i}=e;return(0,o.createBlock)("core/video",{caption:t,src:n,id:a,align:r,anchor:i})}},{type:"block",blocks:["core/group"],isMatch:e=>{let{url:t}=e;return!t},transform:(e,t)=>{var n,r,a;const l={backgroundColor:null==e?void 0:e.overlayColor,gradient:null==e?void 0:e.gradient,style:(0,i.default)({...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===(r=e.style)||void 0===r?void 0:r.color}:void 0})};if(1===(null==t?void 0:t.length)&&"core/group"===(null===(a=t[0])||void 0===a?void 0:a.name)){var s,c,u,d,m,p,f,h,g;const e=(0,i.default)(t[0].attributes||{});var b;return null!=e&&e.backgroundColor||null!=e&&e.gradient||null!=e&&null!==(s=e.style)&&void 0!==s&&null!==(c=s.color)&&void 0!==c&&c.background||null!=e&&null!==(u=e.style)&&void 0!==u&&null!==(d=u.color)&&void 0!==d&&d.gradient?(0,o.createBlock)("core/group",e,null===(b=t[0])||void 0===b?void 0:b.innerBlocks):(0,o.createBlock)("core/group",{...l,...e,style:(0,i.default)({...null==e?void 0:e.style,color:null!=l&&null!==(m=l.style)&&void 0!==m&&m.color||null!=e&&null!==(p=e.style)&&void 0!==p&&p.color?{...null==l||null===(f=l.style)||void 0===f?void 0:f.color,...null==e||null===(h=e.style)||void 0===h?void 0:h.color}:void 0})},null===(g=t[0])||void 0===g?void 0:g.innerBlocks)}return(0,o.createBlock)("core/group",{...e,...l},t)}}]};t.default=l},81366:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WP_EMBED_TYPE=t.ASPECT_RATIOS=void 0,t.ASPECT_RATIOS=[{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"}],t.WP_EMBED_TYPE="wp-embed"},6865:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(94184)),i=n(39626);const{attributes:l}={$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"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"};var s=[{attributes:l,save(e){let{attributes:{url:t,caption:n,type:r,providerNameSlug:l}}=e;if(!t)return null;const s=(0,a.default)("wp-block-embed",{[`is-type-${r}`]:r,[`is-provider-${l}`]:l});return(0,o.createElement)("figure",{className:s},`\n${t}\n`,!i.RichText.isEmpty(n)&&(0,o.createElement)(i.RichText.Content,{tagName:"figcaption",value:n}))}}];t.default=s},53497:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=n(48605),i=r(n(56889)),l=n(72631),s=r(n(32531)),c=r(n(88321)),u=r(n(59517)),d=r(n(94184)),m=n(54730),p=n(56191),f=n(39626),h=n(71539),g=n(67431);t.default=e=>{const{attributes:{providerNameSlug:t,previewable:n,responsive:r,url:b},attributes:v,isSelected:_,onReplace:y,setAttributes:k,insertBlocksAfter:M,onFocus:w}=e,E={title:(0,m._x)("Embed","block title"),icon:l.embedContentIcon},{icon:x,title:C}=(0,a.getEmbedInfoByProvider)(t)||E,[S,T]=(0,o.useState)(b),[L,A]=(0,o.useState)(!1),{invalidateResolution:N}=(0,p.useDispatch)(h.store),{preview:z,fetching:B,themeSupportsResponsive:O,cannotEmbed:D}=(0,p.useSelect)((e=>{var t;const{getEmbedPreview:n,isPreviewEmbedFallback:r,isRequestingEmbedPreview:o,getThemeSupports:a}=e(h.store);if(!b)return{fetching:!1,cannotEmbed:!1};const i=n(b),l=r(b),s=!1===(null==i?void 0:i.html)&&void 0===(null==i?void 0:i.type),c=404===(null==i||null===(t=i.data)||void 0===t?void 0:t.status),u=!!i&&!s&&!c;return{preview:u?i:void 0,fetching:o(b),themeSupportsResponsive:a()["responsive-embeds"],cannotEmbed:!u||l}}),[b]),I=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,a.getMergedAttributesWithPreview)(v,z,C,r,e)};(0,o.useEffect)((()=>{if(null==z||!z.html||!D||B)return;const e=b.replace(/\/$/,"");T(e),A(!1),k({url:e})}),[null==z?void 0:z.html,b]),(0,o.useEffect)((()=>{if(z&&!L&&(k(I(!0)),y)){const t=(0,a.createUpgradedEmbedBlock)(e,I());t&&y(t)}}),[z,L]);const P=(0,f.useBlockProps)();if(B)return(0,o.createElement)(g.View,P,(0,o.createElement)(s.default,null));const R=(0,m.sprintf)((0,m.__)("%s URL"),C);if(!z||D||L)return(0,o.createElement)(g.View,P,(0,o.createElement)(c.default,{icon:x,label:R,onFocus:w,onSubmit:e=>{e&&e.preventDefault(),A(!1),k({url:S})},value:S,cannotEmbed:D,onChange:e=>T(e.target.value),fallback:()=>(0,a.fallback)(S,y),tryAgain:()=>{N("getEmbedPreview",[S])}}));const{caption:Z,type:j,allowResponsive:H,className:W}=I(),F=(0,d.default)(W,e.className);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(i.default,{showEditButton:z&&!D,themeSupportsResponsive:O,blockSupportsResponsive:r,allowResponsive:H,toggleResponsive:()=>{const{allowResponsive:e,className:t}=v,{html:n}=z,o=!e;k({allowResponsive:o,className:(0,a.getClassNames)(n,t,r&&o)})},switchBackToURLInput:()=>A(!0)}),(0,o.createElement)(g.View,P,(0,o.createElement)(u.default,{preview:z,previewable:n,className:F,url:S,type:j,caption:Z,onCaptionChange:e=>k({caption:e}),isSelected:_,icon:x,label:R,insertBlocksAfter:M})))}},56889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(40818),o=n(54730),a=n(16496),i=n(39626),l=n(12991);function s(e){return e?(0,o.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,o.__)("This embed may not preserve its aspect ratio when the browser is resized.")}t.default=e=>{let{blockSupportsResponsive:t,showEditButton:n,themeSupportsResponsive:c,allowResponsive:u,toggleResponsive:d,switchBackToURLInput:m}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(a.ToolbarGroup,null,n&&(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:(0,o.__)("Edit URL"),icon:l.edit,onClick:m}))),c&&t&&(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(a.PanelBody,{title:(0,o.__)("Media settings"),className:"blocks-responsive"},(0,r.createElement)(a.ToggleControl,{label:(0,o.__)("Resize for smaller devices"),checked:u,help:s,onChange:d}))))}},32531:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(40818),o=n(16496);t.default=()=>(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null))},88321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(40818),o=n(54730),a=n(16496),i=n(39626);t.default=e=>{let{icon:t,label:n,value:l,onSubmit:s,onChange:c,cannotEmbed:u,fallback:d,tryAgain:m}=e;return(0,r.createElement)(a.Placeholder,{icon:(0,r.createElement)(i.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-embed",instructions:(0,o.__)("Paste a link to the content you want to display on your site.")},(0,r.createElement)("form",{onSubmit:s},(0,r.createElement)("input",{type:"url",value:l||"",className:"components-placeholder__input","aria-label":n,placeholder:(0,o.__)("Enter URL to embed here…"),onChange:c}),(0,r.createElement)(a.Button,{variant:"primary",type:"submit"},(0,o._x)("Embed","button label"))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(a.ExternalLink,{href:(0,o.__)("https://wordpress.org/support/article/embeds/")},(0,o.__)("Learn more about embeds"))),u&&(0,r.createElement)("div",{className:"components-placeholder__error"},(0,r.createElement)("div",{className:"components-placeholder__instructions"},(0,o.__)("Sorry, this content could not be embedded.")),(0,r.createElement)(a.Button,{variant:"secondary",onClick:m},(0,o._x)("Try again","button label"))," ",(0,r.createElement)(a.Button,{variant:"secondary",onClick:d},(0,o._x)("Convert to link","button label"))))}},59517:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=n(48605),i=r(n(51991)),l=n(54730),s=n(16496),c=n(39626),u=n(82402),d=r(n(54002));class m extends o.Component{constructor(){super(...arguments),this.hideOverlay=this.hideOverlay.bind(this),this.state={interactive:!1}}static getDerivedStateFromProps(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}hideOverlay(){this.setState({interactive:!0})}render(){const{preview:e,previewable:t,url:n,type:r,caption:m,onCaptionChange:p,isSelected:f,className:h,icon:g,label:b,insertBlocksAfter:v}=this.props,{scripts:_}=e,{interactive:y}=this.state,k="photo"===r?(0,a.getPhotoHtml)(e):e.html,M=new URL(n).host.split("."),w=M.splice(M.length-2,M.length-1).join("."),E=(0,l.sprintf)((0,l.__)("Embedded content from %s"),w),x=(0,i.default)(r,h,"wp-block-embed__wrapper"),C="wp-embed"===r?(0,o.createElement)(d.default,{html:k}):(0,o.createElement)("div",{className:"wp-block-embed__wrapper"},(0,o.createElement)(s.SandBox,{html:k,scripts:_,title:E,type:x,onFocus:this.hideOverlay}),!y&&(0,o.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}));return(0,o.createElement)("figure",{className:(0,i.default)(h,"wp-block-embed",{"is-type-video":"video"===r})},t?C:(0,o.createElement)(s.Placeholder,{icon:(0,o.createElement)(c.BlockIcon,{icon:g,showColors:!0}),label:b},(0,o.createElement)("p",{className:"components-placeholder__error"},(0,o.createElement)("a",{href:n},n)),(0,o.createElement)("p",{className:"components-placeholder__error"},(0,l.sprintf)((0,l.__)("Embedded content from %s can't be previewed in the editor."),w))),(!c.RichText.isEmpty(m)||f)&&(0,o.createElement)(c.RichText,{tagName:"figcaption",placeholder:(0,l.__)("Add caption"),value:m,onChange:p,inlineToolbar:!0,__unstableOnSplitAtEnd:()=>v((0,u.createBlock)((0,u.getDefaultBlockName)()))}))}}var p=m;t.default=p},72631:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.embedYouTubeIcon=t.embedWordPressIcon=t.embedWolframIcon=t.embedVimeoIcon=t.embedVideoIcon=t.embedTwitterIcon=t.embedTumblrIcon=t.embedSpotifyIcon=t.embedRedditIcon=t.embedPinterestIcon=t.embedPhotoIcon=t.embedInstagramIcon=t.embedFlickrIcon=t.embedFacebookIcon=t.embedDailymotionIcon=t.embedContentIcon=t.embedAudioIcon=t.embedAnimotoIcon=t.embedAmazonIcon=void 0;var r=n(40818),o=n(16496);const a=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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"}));t.embedContentIcon=a;const i=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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"}));t.embedAudioIcon=i;const l=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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"}));t.embedPhotoIcon=l;const s=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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"}));t.embedVideoIcon=s;const c={foreground:"#1da1f2",src:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.G,null,(0,r.createElement)(o.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"})))};t.embedTwitterIcon=c;const u={foreground:"#ff0000",src:(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}))};t.embedYouTubeIcon=u;const d={foreground:"#3b5998",src:(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}))};t.embedFacebookIcon=d;const m=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.G,null,(0,r.createElement)(o.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"})));t.embedInstagramIcon=m;const p={foreground:"#0073AA",src:(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.G,null,(0,r.createElement)(o.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"})))};t.embedWordPressIcon=p;const f={foreground:"#1db954",src:(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}))};t.embedSpotifyIcon=f;const h=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}));t.embedFlickrIcon=h;const g={foreground:"#1ab7ea",src:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.G,null,(0,r.createElement)(o.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"})))};t.embedVimeoIcon=g;const b=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M22 11.816c0-1.256-1.02-2.277-2.277-2.277-.593 0-1.122.24-1.526.613-1.48-.965-3.455-1.594-5.647-1.69l1.17-3.702 3.18.75c.01 1.027.847 1.86 1.877 1.86 1.035 0 1.877-.84 1.877-1.877 0-1.035-.842-1.877-1.877-1.877-.77 0-1.43.466-1.72 1.13L13.55 3.92c-.204-.047-.4.067-.46.26l-1.35 4.27c-2.317.037-4.412.67-5.97 1.67-.402-.355-.917-.58-1.493-.58C3.02 9.54 2 10.56 2 11.815c0 .814.433 1.523 1.078 1.925-.037.222-.06.445-.06.673 0 3.292 4.01 5.97 8.94 5.97s8.94-2.678 8.94-5.97c0-.214-.02-.424-.052-.632.687-.39 1.154-1.12 1.154-1.964zm-3.224-7.422c.606 0 1.1.493 1.1 1.1s-.493 1.1-1.1 1.1-1.1-.494-1.1-1.1.493-1.1 1.1-1.1zm-16 7.422c0-.827.673-1.5 1.5-1.5.313 0 .598.103.838.27-.85.675-1.477 1.478-1.812 2.36-.32-.274-.525-.676-.525-1.13zm9.183 7.79c-4.502 0-8.165-2.33-8.165-5.193S7.457 9.22 11.96 9.22s8.163 2.33 8.163 5.193-3.663 5.193-8.164 5.193zM20.635 13c-.326-.89-.948-1.7-1.797-2.383.247-.186.55-.3.882-.3.827 0 1.5.672 1.5 1.5 0 .482-.23.91-.586 1.184zm-11.64 1.704c-.76 0-1.397-.616-1.397-1.376 0-.76.636-1.397 1.396-1.397.76 0 1.376.638 1.376 1.398 0 .76-.616 1.376-1.376 1.376zm7.405-1.376c0 .76-.615 1.376-1.375 1.376s-1.4-.616-1.4-1.376c0-.76.64-1.397 1.4-1.397.76 0 1.376.638 1.376 1.398zm-1.17 3.38c.15.152.15.398 0 .55-.675.674-1.728 1.002-3.22 1.002l-.01-.002-.012.002c-1.492 0-2.544-.328-3.218-1.002-.152-.152-.152-.398 0-.55.152-.152.4-.15.55 0 .52.52 1.394.775 2.67.775l.01.002.01-.002c1.276 0 2.15-.253 2.67-.775.15-.152.398-.152.55 0z"}));t.embedRedditIcon=b;const v={foreground:"#35465c",src:(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}))};t.embedTumblrIcon=v;const _=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.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,r.createElement)(o.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,r.createElement)(o.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"}));t.embedAmazonIcon=_;const y=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,r.createElement)(o.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,r.createElement)(o.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,r.createElement)(o.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,r.createElement)(o.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,r.createElement)(o.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"}));t.embedAnimotoIcon=y;const k=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}));t.embedDailymotionIcon=k;const M=(0,r.createElement)(o.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,r.createElement)(o.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"}));t.embedPinterestIcon=M;const w=(0,r.createElement)(o.SVG,{viewBox:"0 0 44 44"},(0,r.createElement)(o.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"}));t.embedWolframIcon=w},6169:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=r(n(53497)),a=r(n(23708)),i=r(n(78472)),l=r(n(3986)),s=r(n(6865)),c=n(72631);const u={$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"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"};t.metadata=u;const{name:d}=u;t.name=d;const m={icon:c.embedContentIcon,edit:o.default,save:a.default,transforms:i.default,variations:l.default,deprecated:s.default};t.settings=m},23708:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;const{url:n,caption:r,type:l,providerNameSlug:s}=t;if(!n)return null;const c=(0,a.default)("wp-block-embed",{[`is-type-${l}`]:l,[`is-provider-${s}`]:s,[`wp-block-embed-${s}`]:s});return(0,o.createElement)("figure",i.useBlockProps.save({className:c}),(0,o.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${n}\n`),!i.RichText.isEmpty(r)&&(0,o.createElement)(i.RichText.Content,{tagName:"figcaption",value:r}))};var o=n(40818),a=r(n(51991)),i=n(39626)},78472:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(82402);const{name:o}={$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"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"};var a={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,r.createBlock)(o,{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=`${t}`;return null!=n&&n.trim()&&(o+=`
${n}`),(0,r.createBlock)("core/paragraph",{content:o})}}]};t.default=a},48605:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.createUpgradedEmbedBlock=void 0,t.fallback=function(e,t){const n=(0,o.createElement)("a",{href:e},e);t((0,c.createBlock)("core/paragraph",{content:(0,o.renderToString)(n)}))},t.getAttributesFromPreview=t.findMoreSuitableBlock=void 0,t.getClassNames=h,t.removeAspectRatioClasses=t.matchesPatterns=t.isFromWordPress=t.getPhotoHtml=t.getMergedAttributesWithPreview=t.getEmbedInfoByProvider=void 0;var o=n(40818),a=n(81366),i=n(96486),l=r(n(51991)),s=r(n(59588)),c=n(82402);const{name:u}={$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"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"};t.getEmbedInfoByProvider=e=>{var t;return null===(t=(0,c.getBlockVariations)(u))||void 0===t?void 0:t.find((t=>{let{name:n}=t;return n===e}))};const d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some((t=>e.match(t)))};t.matchesPatterns=d;const m=e=>{var t;return null===(t=(0,c.getBlockVariations)(u))||void 0===t?void 0:t.find((t=>{let{patterns:n}=t;return d(e,n)}))};t.findMoreSuitableBlock=m;const p=e=>e&&e.includes('class="wp-embedded-content"');t.isFromWordPress=p,t.getPhotoHtml=e=>{const t=e.url||e.thumbnail_url,n=(0,o.createElement)("p",null,(0,o.createElement)("img",{src:t,alt:e.title,width:"100%"}));return(0,o.renderToString)(n)},t.createUpgradedEmbedBlock=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{preview:r,attributes:o={}}=e,{url:i,providerNameSlug:l,type:s,...d}=o;if(!i||!(0,c.getBlockType)(u))return;const f=m(i),h="wordpress"===l||s===a.WP_EMBED_TYPE,g=!h&&f&&(f.attributes.providerNameSlug!==l||!l);if(g)return(0,c.createBlock)(u,{url:i,...d,...f.attributes});const b=null===(t=(0,c.getBlockVariations)(u))||void 0===t?void 0:t.find((e=>{let{name:t}=e;return"wordpress"===t}));return b&&r&&p(r.html)&&!h?(0,c.createBlock)(u,{url:i,...b.attributes,...n}):void 0};const f=e=>{if(!e)return e;const t=a.ASPECT_RATIOS.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return(0,l.default)(e,t)};function h(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return f(t);const r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;const o=r.body.querySelector("iframe");if(o&&o.height&&o.width){const e=(o.width/o.height).toFixed(2);for(let n=0;n=r.ratio)return e-r.ratio>.1?f(t):(0,l.default)(f(t),r.className,"wp-has-aspect-ratio")}}return t}t.removeAspectRatioClasses=f;const g=(0,s.default)((function(e,t,n,r){let o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};const l={};let{type:s="rich"}=e;const{html:c,provider_name:u}=e,d=(0,i.kebabCase)((u||t).toLowerCase());return p(c)&&(s=a.WP_EMBED_TYPE),(c||"photo"===s)&&(l.type=s,l.providerNameSlug=d),l.className=h(c,n,r&&o),l}));t.getAttributesFromPreview=g,t.getMergedAttributesWithPreview=function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{allowResponsive:a,className:i}=e;return{...e,...g(t,n,o?void 0:i,r,a)}}},3986:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(54730),o=n(72631);const a=[{name:"twitter",title:"Twitter",icon:o.embedTwitterIcon,keywords:["tweet",(0,r.__)("social")],description:(0,r.__)("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:"YouTube",icon:o.embedYouTubeIcon,keywords:[(0,r.__)("music"),(0,r.__)("video")],description:(0,r.__)("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:o.embedFacebookIcon,keywords:[(0,r.__)("social")],description:(0,r.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:"Instagram",icon:o.embedInstagramIcon,keywords:[(0,r.__)("image"),(0,r.__)("social")],description:(0,r.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:"WordPress",icon:o.embedWordPressIcon,keywords:[(0,r.__)("post"),(0,r.__)("blog")],description:(0,r.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:"SoundCloud",icon:o.embedAudioIcon,keywords:[(0,r.__)("music"),(0,r.__)("audio")],description:(0,r.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:"Spotify",icon:o.embedSpotifyIcon,keywords:[(0,r.__)("music"),(0,r.__)("audio")],description:(0,r.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:"Flickr",icon:o.embedFlickrIcon,keywords:[(0,r.__)("image")],description:(0,r.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:"Vimeo",icon:o.embedVimeoIcon,keywords:[(0,r.__)("video")],description:(0,r.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:"Animoto",icon:o.embedAnimotoIcon,description:(0,r.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:"Cloudup",icon:o.embedContentIcon,description:(0,r.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:"CollegeHumor",icon:o.embedVideoIcon,description:(0,r.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:"Crowdsignal",icon:o.embedContentIcon,keywords:["polldaddy",(0,r.__)("survey")],description:(0,r.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:"Dailymotion",icon:o.embedDailymotionIcon,keywords:[(0,r.__)("video")],description:(0,r.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:"Imgur",icon:o.embedPhotoIcon,description:(0,r.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:"Issuu",icon:o.embedContentIcon,description:(0,r.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:"Kickstarter",icon:o.embedContentIcon,description:(0,r.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:"Mixcloud",icon:o.embedAudioIcon,keywords:[(0,r.__)("music"),(0,r.__)("audio")],description:(0,r.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"reddit",title:"Reddit",icon:o.embedRedditIcon,description:(0,r.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:"ReverbNation",icon:o.embedAudioIcon,description:(0,r.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"screencast",title:"Screencast",icon:o.embedVideoIcon,description:(0,r.__)("Embed Screencast content."),patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i],attributes:{providerNameSlug:"screencast",responsive:!0}},{name:"scribd",title:"Scribd",icon:o.embedContentIcon,description:(0,r.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"slideshare",title:"Slideshare",icon:o.embedContentIcon,description:(0,r.__)("Embed Slideshare content."),patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i],attributes:{providerNameSlug:"slideshare",responsive:!0}},{name:"smugmug",title:"SmugMug",icon:o.embedPhotoIcon,description:(0,r.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:"Speaker Deck",icon:o.embedContentIcon,description:(0,r.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:"TikTok",icon:o.embedVideoIcon,keywords:[(0,r.__)("video")],description:(0,r.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:"TED",icon:o.embedVideoIcon,description:(0,r.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:"Tumblr",icon:o.embedTumblrIcon,keywords:[(0,r.__)("social")],description:(0,r.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(www\.)?tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:"VideoPress",icon:o.embedVideoIcon,keywords:[(0,r.__)("video")],description:(0,r.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:"WordPress.tv",icon:o.embedVideoIcon,description:(0,r.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:"Amazon Kindle",icon:o.embedAmazonIcon,keywords:[(0,r.__)("ebook")],description:(0,r.__)("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:o.embedPinterestIcon,keywords:[(0,r.__)("social"),(0,r.__)("bookmark")],description:(0,r.__)("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:o.embedWolframIcon,description:(0,r.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}}];a.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)}));var i=a;t.default=i},54002:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{html:t}=e;const n=(0,o.useRef)(),r=(0,o.useMemo)((()=>{const e=(new window.DOMParser).parseFromString(t,"text/html").querySelector("iframe"),n={};return e?(Array.from(e.attributes).forEach((e=>{let{name:t,value:r}=e;"style"!==t&&(n[l[t]||t]=r)})),n):n}),[t]);return(0,o.useEffect)((()=>{const{ownerDocument:e}=n.current,{defaultView:t}=e;function o(e){let{data:{secret:t,message:o,value:a}={}}=e;"height"===o&&t===r["data-secret"]&&(n.current.height=a)}return t.addEventListener("message",o),()=>{t.removeEventListener("message",o)}}),[]),(0,o.createElement)("div",{className:"wp-block-embed__wrapper"},(0,o.createElement)("iframe",(0,a.default)({ref:(0,i.useMergeRefs)([n,(0,i.useFocusableIframe)()]),title:r.title},r)))};var o=n(40818),a=r(n(67154)),i=n(38669);const l={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"}},10448:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(40818),o=n(39626),a=n(54730),i=[{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:i,textLinkHref:l,textLinkTarget:s,showDownloadButton:c,downloadButtonText:u,displayPreview:d,previewHeight:m}=t,p=o.RichText.isEmpty(i)?(0,a.__)("PDF embed"):(0,a.sprintf)((0,a.__)("Embed of %s."),i);return n&&(0,r.createElement)("div",o.useBlockProps.save(),d&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:`${m}px`},"aria-label":p})),!o.RichText.isEmpty(i)&&(0,r.createElement)("a",{href:l,target:s,rel:s?"noreferrer noopener":void 0},(0,r.createElement)(o.RichText.Content,{value:i})),c&&(0,r.createElement)("a",{href:n,className:"wp-block-file__button",download:!0},(0,r.createElement)(o.RichText.Content,{value:u})))}}];t.default=i},23502:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MIN_PREVIEW_HEIGHT=t.MAX_PREVIEW_HEIGHT=void 0;var o=n(40818),a=r(n(94184)),i=n(18452),l=n(16496),s=n(56191),c=n(39626),u=n(38669),d=n(54730),m=n(12991),p=n(71539),f=n(19132),h=r(n(76923)),g=n(83795);function b(e){let{text:t,disabled:n}=e;const{createNotice:r}=(0,s.useDispatch)(f.store),a=(0,u.useCopyToClipboard)(t,(()=>{r("info",(0,d.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,o.createElement)(l.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:a,disabled:n},(0,d.__)("Copy URL"))}t.MIN_PREVIEW_HEIGHT=200,t.MAX_PREVIEW_HEIGHT=2e3;var v=(0,l.withNotices)((function(e){let{attributes:t,isSelected:n,setAttributes:r,noticeUI:u,noticeOperations:f,clientId:v}=e;const{id:_,fileId:y,fileName:k,href:M,textLinkHref:w,textLinkTarget:E,showDownloadButton:x,downloadButtonText:C,displayPreview:S,previewHeight:T}=t,{media:L,mediaUpload:A}=(0,s.useSelect)((e=>({media:void 0===_?void 0:e(p.store).getMedia(_),mediaUpload:e(c.store).getSettings().mediaUpload})),[_]),{toggleSelection:N,__unstableMarkNextChangeAsNotPersistent:z}=(0,s.useDispatch)(c.store);function B(e){if(e&&e.url){const t=e.url.endsWith(".pdf");r({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id,displayPreview:!!t||void 0,previewHeight:t?600:void 0})}}function O(e){r({href:void 0}),f.removeAllNotices(),f.createErrorNotice(e)}function D(e){r({downloadButtonText:e.replace(/<\/?a[^>]*>/g,"")})}(0,o.useEffect)((()=>{if((0,i.isBlobURL)(M)){const e=(0,i.getBlobByURL)(M);A({filesList:[e],onFileChange:e=>{let[t]=e;return B(t)},onError:O}),(0,i.revokeBlobURL)(M)}void 0===C&&D((0,d._x)("Download","button label"))}),[]),(0,o.useEffect)((()=>{!y&&M&&(z(),r({fileId:`wp-block-file--media-${v}`}))}),[M,y,v]);const I=L&&L.link,P=(0,c.useBlockProps)({className:(0,a.default)((0,i.isBlobURL)(M)&&(0,l.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":(0,i.isBlobURL)(M)})}),R=(0,g.browserSupportsPdfs)()&&S;return M?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(h.default,{hrefs:{href:M,textLinkHref:w,attachmentPage:I},openInNewWindow:!!E,showDownloadButton:x,changeLinkDestinationOption:function(e){r({textLinkHref:e})},changeOpenInNewWindow:function(e){r({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){r({showDownloadButton:e})},displayPreview:S,changeDisplayPreview:function(e){r({displayPreview:e})},previewHeight:T,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),200);r({previewHeight:t})}}),(0,o.createElement)(c.BlockControls,{group:"other"},(0,o.createElement)(c.MediaReplaceFlow,{mediaId:_,mediaURL:M,accept:"*",onSelect:B,onError:O}),(0,o.createElement)(b,{text:M,disabled:(0,i.isBlobURL)(M)})),(0,o.createElement)("div",P,R&&(0,o.createElement)(l.ResizableBox,{size:{height:T},minHeight:200,maxHeight:2e3,minWidth:"100%",grid:[10,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>N(!1),onResizeStop:function(e,t,n,o){N(!0);const a=parseInt(T+o.height,10);r({previewHeight:a})},showHandle:n},(0,o.createElement)("object",{className:"wp-block-file__preview",data:M,type:"application/pdf","aria-label":(0,d.__)("Embed of the selected PDF file.")}),!n&&(0,o.createElement)("div",{className:"wp-block-file__preview-overlay"})),(0,o.createElement)("div",{className:"wp-block-file__content-wrapper"},(0,o.createElement)(c.RichText,{tagName:"a",value:k,placeholder:(0,d.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>r({fileName:e}),href:w}),x&&(0,o.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},(0,o.createElement)(c.RichText,{tagName:"div","aria-label":(0,d.__)("Download button text"),className:(0,a.default)("wp-block-file__button",c.__experimentalElementButtonClassName),value:C,withoutInteractiveFormatting:!0,placeholder:(0,d.__)("Add text…"),onChange:e=>D(e)}))))):(0,o.createElement)("div",P,(0,o.createElement)(c.MediaPlaceholder,{icon:(0,o.createElement)(c.BlockIcon,{icon:m.file}),labels:{title:(0,d.__)("File"),instructions:(0,d.__)("Upload a file or pick one from your media library.")},onSelect:B,notices:u,onError:O,accept:"*"}))}));t.default=v},98230:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(54730),a=n(12991),i=r(n(10448)),l=r(n(23502)),s=r(n(3293)),c=r(n(6459));const u={$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"};t.metadata=u;const{name:d}=u;t.name=d;const m={icon:a.file,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,o._x)("Armstrong_Small_Step","Name of the file")}},transforms:c.default,deprecated:i.default,edit:l.default,save:s.default};t.settings=m},76923:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{hrefs:t,openInNewWindow:n,showDownloadButton:s,changeLinkDestinationOption:c,changeOpenInNewWindow:u,changeShowDownloadButton:d,displayPreview:m,changeDisplayPreview:p,previewHeight:f,changePreviewHeight:h}=e;const{href:g,textLinkHref:b,attachmentPage:v}=t;let _=[{value:g,label:(0,o.__)("URL")}];return v&&(_=[{value:g,label:(0,o.__)("Media file")},{value:v,label:(0,o.__)("Attachment page")}]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,g.endsWith(".pdf")&&(0,r.createElement)(a.PanelBody,{title:(0,o.__)("PDF settings")},(0,r.createElement)(a.ToggleControl,{label:(0,o.__)("Show inline embed"),help:m?(0,o.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!m,onChange:p}),m&&(0,r.createElement)(a.RangeControl,{label:(0,o.__)("Height in pixels"),min:l.MIN_PREVIEW_HEIGHT,max:Math.max(l.MAX_PREVIEW_HEIGHT,f),value:f,onChange:h})),(0,r.createElement)(a.PanelBody,{title:(0,o.__)("Settings")},(0,r.createElement)(a.SelectControl,{label:(0,o.__)("Link to"),value:b,options:_,onChange:c}),(0,r.createElement)(a.ToggleControl,{label:(0,o.__)("Open in new tab"),checked:n,onChange:u}),(0,r.createElement)(a.ToggleControl,{label:(0,o.__)("Show download button"),checked:s,onChange:d}))))};var r=n(40818),o=n(54730),a=n(16496),i=n(39626),l=n(23502)},3293:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;const{href:n,fileId:r,fileName:s,textLinkHref:c,textLinkTarget:u,showDownloadButton:d,downloadButtonText:m,displayPreview:p,previewHeight:f}=t,h=i.RichText.isEmpty(s)?(0,l.__)("PDF embed"):(0,l.sprintf)((0,l.__)("Embed of %s."),s),g=!i.RichText.isEmpty(s),b=g?r:void 0;return n&&(0,o.createElement)("div",i.useBlockProps.save(),p&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("object",{className:"wp-block-file__embed",data:n,type:"application/pdf",style:{width:"100%",height:`${f}px`},"aria-label":h})),g&&(0,o.createElement)("a",{id:b,href:c,target:u,rel:u?"noreferrer noopener":void 0},(0,o.createElement)(i.RichText.Content,{value:s})),d&&(0,o.createElement)("a",{href:n,className:(0,a.default)("wp-block-file__button",i.__experimentalElementButtonClassName),download:!0,"aria-describedby":b},(0,o.createElement)(i.RichText.Content,{value:m})))};var o=n(40818),a=r(n(94184)),i=n(39626),l=n(54730)},6459:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),o=n(18452),a=n(82402),i=n(56191),l=n(71539),s=n(30949),c={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach((e=>{const n=(0,o.createBlobURL)(e);t.push((0,a.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))})),t}},{type:"block",blocks:["core/audio"],transform:e=>(0,a.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,a.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,a.createBlock)("core/file",{href:e.url,fileName:e.caption||(0,s.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,i.select)(l.store),o=n(t);return!!o&&(0,r.includes)(o.mime_type,"audio")},transform:e=>(0,a.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,i.select)(l.store),o=n(t);return!!o&&(0,r.includes)(o.mime_type,"video")},transform:e=>(0,a.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,i.select)(l.store),o=n(t);return!!o&&(0,r.includes)(o.mime_type,"image")},transform:e=>(0,a.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]};t.default=c},83795:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hidePdfEmbedsOnUnsupportedBrowsers=t.browserSupportsPdfs=void 0;const n=()=>!(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)&&!r("AcroPDF.PDF")&&!r("PDF.PdfCtrl"));t.browserSupportsPdfs=n;const r=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t};t.hidePdfEmbedsOnUnsupportedBrowsers=()=>{if(!n()){const e=document.getElementsByClassName("wp-block-file__embed");Array.from(e).forEach((e=>{e.style.display="none"}))}}},95020:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(40818),o=n(54730),a=n(16496),i=n(56191),l=n(82402),s=n(39626);t.default=e=>{let{clientId:t}=e;const{replaceBlocks:n}=(0,i.useDispatch)(s.store),c=(0,i.useSelect)((e=>e(s.store).getBlock(t)),[t]);return(0,r.createElement)(a.ToolbarButton,{onClick:()=>n(c.clientId,(0,l.rawHandler)({HTML:(0,l.serialize)(c)}))},(0,o.__)("Convert to blocks"))}},2168:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{clientId:t,attributes:{content:n},setAttributes:r,onReplace:p}=e;const{getMultiSelectedBlockClientIds:f}=(0,l.useSelect)(i.store),h=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{if(!h.current)return;const e=window.tinymce.get(`editor-${t}`);(null==e?void 0:e.getContent())!==n&&e.setContent(n||"")}),[n]),(0,o.useEffect)((()=>{const{baseURL:e,suffix:o}=window.wpEditorL10n.tinymce;function i(e){let t;n&&e.on("loadContent",(()=>e.setContent(n))),e.on("blur",(()=>{var n;t=e.selection.getBookmark(2,!0);const o=document.querySelector(".interface-interface-skeleton__content"),a=o.scrollTop;return null!==(n=f())&&void 0!==n&&n.length||r({content:e.getContent()}),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),o.scrollTop!==a&&(o.scrollTop=a))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const o=(0,a.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,r({content:t}))}),250);e.on("Paste Change input Undo Redo",o),e.on("remove",o.cancel),e.on("keydown",(t=>{u.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==u.BACKSPACE&&t.keyCode!==u.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)||(p([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===u.F10&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function l(){const{settings:e}=window.wpEditorL10n.tinymce;m.oldEditor.initialize(`editor-${t}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${t}`,setup:i}})}function s(){"complete"===document.readyState&&l()}return h.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:e,suffix:o}),"complete"===document.readyState?l():document.addEventListener("readystatechange",s),()=>{document.removeEventListener("readystatechange",s),m.oldEditor.remove(`editor-${t}`)}}),[]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(s.ToolbarGroup,null,(0,o.createElement)(d.default,{clientId:t}))),(0,o.createElement)("div",(0,i.useBlockProps)(),(0,o.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,c.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,o.createElement)("div",{key:"editor",id:`editor-${t}`,className:"wp-block-freeform block-library-rich-text__tinymce"})))};var o=n(40818),a=n(96486),i=n(39626),l=n(56191),s=n(16496),c=n(54730),u=n(5560),d=r(n(95020));const{wp:m}=window},51044:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(12991),a=r(n(2168)),i=r(n(482));const l={$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"};t.metadata=l;const{name:s}=l;t.name=s;const c={icon:o.classic,edit:a.default,save:i.default};t.settings=c},482:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;const{content:n}=t;return(0,r.createElement)(r.RawHTML,null,n)};var r=n(40818)},59949:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LINK_DESTINATION_NONE=t.LINK_DESTINATION_MEDIA_WP_CORE=t.LINK_DESTINATION_MEDIA=t.LINK_DESTINATION_ATTACHMENT_WP_CORE=t.LINK_DESTINATION_ATTACHMENT=void 0,t.LINK_DESTINATION_NONE="none",t.LINK_DESTINATION_MEDIA="media",t.LINK_DESTINATION_ATTACHMENT="attachment",t.LINK_DESTINATION_MEDIA_WP_CORE="file",t.LINK_DESTINATION_ATTACHMENT_WP_CORE="post"},65403:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.defaultColumnsNumberV1=p,t.getHrefAndDestination=f,t.getImageBlock=g;var o=n(40818),a=r(n(94184)),i=n(96486),l=n(39626),s=n(82402),c=n(59949),u=n(63249);const d="file",m="post";function p(e){var t;return Math.min(3,null==e||null===(t=e.images)||void 0===t?void 0:t.length)}function f(e,t){switch(t){case d:return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:c.LINK_DESTINATION_MEDIA};case m:return{href:null==e?void 0:e.link,linkDestination:c.LINK_DESTINATION_ATTACHMENT};case c.LINK_DESTINATION_MEDIA:return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:c.LINK_DESTINATION_MEDIA};case c.LINK_DESTINATION_ATTACHMENT:return{href:null==e?void 0:e.link,linkDestination:c.LINK_DESTINATION_ATTACHMENT};case c.LINK_DESTINATION_NONE:return{href:void 0,linkDestination:c.LINK_DESTINATION_NONE}}return{}}function h(e){let t=e.linkTo?e.linkTo:"none";"post"===t?t="attachment":"file"===t&&(t="media");const n=e.images.map((n=>g(n,e.sizeSlug,t)));return[{...(0,i.omit)(e,["images","ids"]),linkTo:t,allowResize:!1},n]}function g(e,t,n){return(0,s.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...f(e,n)})}var b=[{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:r=p(t),imageCrop:a,caption:i,linkTo:s}=t,c=`columns-${r} ${a?"is-cropped":""}`;return(0,o.createElement)("figure",l.useBlockProps.save({className:c}),(0,o.createElement)("ul",{className:"blocks-gallery-grid"},n.map((e=>{let t;switch(s){case d:t=e.fullUrl||e.url;break;case m:t=e.link}const n=(0,o.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,o.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,o.createElement)("figure",null,t?(0,o.createElement)("a",{href:t},n):n,!l.RichText.isEmpty(e.caption)&&(0,o.createElement)(l.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!l.RichText.isEmpty(i)&&(0,o.createElement)(l.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:i}))},migrate:e=>(0,u.isGalleryV2Enabled)()?h(e):e},{attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible(e){let{linkTo:t}=e;return!t||"attachment"===t||"media"===t},migrate(e){if((0,u.isGalleryV2Enabled)())return h(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:r=p(t),imageCrop:a,caption:i,linkTo:s}=t;return(0,o.createElement)("figure",{className:`columns-${r} ${a?"is-cropped":""}`},(0,o.createElement)("ul",{className:"blocks-gallery-grid"},n.map((e=>{let t;switch(s){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,o.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,o.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,o.createElement)("figure",null,t?(0,o.createElement)("a",{href:t},n):n,!l.RichText.isEmpty(e.caption)&&(0,o.createElement)(l.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!l.RichText.isEmpty(i)&&(0,o.createElement)(l.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:i}))}},{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=>(0,u.isGalleryV2Enabled)()?h(e):{...e,ids:(0,i.map)(e.ids,(e=>{const t=parseInt(e,10);return Number.isInteger(t)?t:null}))},save(e){let{attributes:t}=e;const{images:n,columns:r=p(t),imageCrop:a,caption:i,linkTo:s}=t;return(0,o.createElement)("figure",{className:`columns-${r} ${a?"is-cropped":""}`},(0,o.createElement)("ul",{className:"blocks-gallery-grid"},n.map((e=>{let t;switch(s){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,o.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,o.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,o.createElement)("figure",null,t?(0,o.createElement)("a",{href:t},n):n,!l.RichText.isEmpty(e.caption)&&(0,o.createElement)(l.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!l.RichText.isEmpty(i)&&(0,o.createElement)(l.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:i}))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save(e){let{attributes:t}=e;const{images:n,columns:r=p(t),imageCrop:a,linkTo:i}=t;return(0,o.createElement)("ul",{className:`columns-${r} ${a?"is-cropped":""}`},n.map((e=>{let t;switch(i){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,o.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,o.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,o.createElement)("figure",null,t?(0,o.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,o.createElement)(l.RichText.Content,{tagName:"figcaption",value:e.caption})))})))},migrate:e=>(0,u.isGalleryV2Enabled)()?h(e):e},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible(e){let{images:t,ids:n}=e;return t&&t.length>0&&(!n&&t||n&&t&&n.length!==t.length||(0,i.some)(t,((e,t)=>!e&&null!==n[t]||parseInt(e,10)!==n[t])))},migrate:e=>(0,u.isGalleryV2Enabled)()?h(e):{...e,ids:(0,i.map)(e.images,(e=>{let{id:t}=e;return t?parseInt(t,10):null}))},supports:{align:!0},save(e){let{attributes:t}=e;const{images:n,columns:r=p(t),imageCrop:a,linkTo:i}=t;return(0,o.createElement)("ul",{className:`columns-${r} ${a?"is-cropped":""}`},n.map((e=>{let t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,o.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,o.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,o.createElement)("figure",null,t?(0,o.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,o.createElement)(l.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save(e){let{attributes:t}=e;const{images:n,columns:r=p(t),align:i,imageCrop:l,linkTo:s}=t,c=(0,a.default)(`columns-${r}`,{alignnone:"none"===i,"is-cropped":l});return(0,o.createElement)("div",{className:c},n.map((e=>{let t;switch(s){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,o.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return(0,o.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?(0,o.createElement)("a",{href:t},n):n)})))},migrate:e=>(0,u.isGalleryV2Enabled)()?h(e):e}];t.default=b},20385:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=n(38669),i=n(16496),l=r(n(22837)),s=r(n(91397)),c=n(63249),u=(0,a.compose)([i.withNotices])((function(e){return(0,c.isGalleryV2Enabled)()?(0,o.createElement)(l.default,e):(0,o.createElement)(s.default,e)}));t.default=u},22837:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(67154)),i=r(n(94184)),l=n(96486),s=n(38669),c=n(16496),u=n(39626),d=n(54730),m=n(56191),p=n(59054),f=n(67431),h=n(82402),g=n(18452),b=n(19132),v=n(22322),_=n(63249),y=n(78514),k=n(42514),M=r(n(58975)),w=n(59949),E=r(n(9147)),x=r(n(34271)),C=r(n(62552)),S=r(n(6850)),T=r(n(24322));const L=[{value:w.LINK_DESTINATION_ATTACHMENT,label:(0,d.__)("Attachment Page")},{value:w.LINK_DESTINATION_MEDIA,label:(0,d.__)("Media File")},{value:w.LINK_DESTINATION_NONE,label:(0,d._x)("None","Media item link option")}],A=["image"],N=o.Platform.isNative?(0,d.__)("ADD MEDIA"):(0,d.__)("Drag images, upload new ones or select files from your library."),z=o.Platform.isNative?{type:"stepper"}:{};var B=(0,s.compose)([c.withNotices,(0,p.withViewportMatch)({isNarrow:"< small"})])((function(e){var t,n;const{setAttributes:r,attributes:s,className:p,clientId:B,noticeOperations:O,isSelected:D,noticeUI:I,insertBlocksAfter:P}=e,{columns:R,imageCrop:Z,linkTarget:j,linkTo:H,shortCodeTransforms:W,sizeSlug:F}=s,{__unstableMarkNextChangeAsNotPersistent:q,replaceInnerBlocks:Y,updateBlockAttributes:V,selectBlock:U,clearSelectedBlock:$}=(0,m.useDispatch)(u.store),{createSuccessNotice:X}=(0,m.useDispatch)(b.store),{getBlock:G,getSettings:K,preferredStyle:J}=(0,m.useSelect)((e=>{var t;const n=e(u.store).getSettings().__experimentalPreferredStyleVariations;return{getBlock:e(u.store).getBlock,getSettings:e(u.store).getSettings,preferredStyle:null==n||null===(t=n.value)||void 0===t?void 0:t["core/image"]}}),[]),Q=(0,m.useSelect)((e=>{var t;return null===(t=e(u.store).getBlock(B))||void 0===t?void 0:t.innerBlocks}),[B]),ee=(0,m.useSelect)((e=>e(u.store).wasBlockJustInserted(B,"inserter_menu")),[B]),te=(0,o.useMemo)((()=>null==Q?void 0:Q.map((e=>({clientId:e.clientId,id:e.attributes.id,url:e.attributes.url,attributes:e.attributes,fromSavedContent:Boolean(e.originalContent)})))),[Q]),ne=(0,S.default)(Q),re=(0,C.default)(te,ne);(0,o.useEffect)((()=>{null==re||re.forEach((e=>{V(e.clientId,{...ie(e.attributes),id:e.id,align:void 0})})),(null==re?void 0:re.length)>0&&$()}),[re]);const oe=(0,x.default)(W);(0,o.useEffect)((()=>{W&&oe&&(se(oe),r({shortCodeTransforms:void 0}))}),[W,oe]);const ae=(0,E.default)(ne,D,K);function ie(e){const t=e.id?(0,l.find)(ne,{id:e.id}):null;let n;return n=e.className&&""!==e.className?e.className:J?`is-style-${J}`:void 0,{...(0,_.pickRelevantMediaFiles)(t,F),...(0,y.getHrefAndDestination)(t,H),...(0,k.getUpdatedLinkTargetSettings)(j,s),className:n,caption:e.caption,sizeSlug:F}}function le(e){var t;return A.some((t=>{var n;return 0===(null===(n=e.type)||void 0===n?void 0:n.indexOf(t))}))||0===(null===(t=e.url)||void 0===t?void 0:t.indexOf("blob:"))}function se(e){const t="[object FileList]"===Object.prototype.toString.call(e),n=t?Array.from(e).map((e=>e.url?e:(0,_.pickRelevantMediaFiles)({url:(0,g.createBlobURL)(e)}))):e;n.every(le)||(O.removeAllNotices(),O.createErrorNotice((0,d.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file"}));const r=n.filter((e=>e.url||le(e))).map((e=>e.url?e:(0,_.pickRelevantMediaFiles)({url:(0,g.createBlobURL)(e)}))),o=r.reduce(((e,t,n)=>(e[t.id]=n,e)),{}),a=t?Q:Q.filter((e=>r.find((t=>t.id===e.attributes.id)))),i=r.filter((e=>!a.find((t=>e.id===t.attributes.id)))).map((e=>(0,h.createBlock)("core/image",{id:e.id,url:e.url,caption:e.caption,alt:e.alt})));(null==i?void 0:i.length)>0&&U(i[0].clientId),Y(B,(0,l.concat)(a,i).sort(((e,t)=>o[e.attributes.id]-o[t.attributes.id])))}(0,o.useEffect)((()=>{var e,t,n,o,a,i;H||(q(),r({linkTo:(null===(e=window)||void 0===e||null===(t=e.wp)||void 0===t||null===(n=t.media)||void 0===n||null===(o=n.view)||void 0===o||null===(a=o.settings)||void 0===a||null===(i=a.defaultProps)||void 0===i?void 0:i.link)||w.LINK_DESTINATION_NONE}))}),[H]);const ce=!!te.length,ue=ce&&te.some((e=>!!e.id)),de=te.some((e=>{var t;return!e.id&&0===(null===(t=e.url)||void 0===t?void 0:t.indexOf("blob:"))})),me=o.Platform.select({web:{addToGallery:!1,disableMediaButtons:de,value:{}},native:{addToGallery:ue,isAppender:ce,disableMediaButtons:ce&&!D||de,value:ue?te:{},autoOpenMediaUpload:!ce&&D&&ee}}),pe=(0,o.createElement)(u.MediaPlaceholder,(0,a.default)({handleUpload:!1,icon:v.sharedIcon,labels:{title:(0,d.__)("Gallery"),instructions:N},onSelect:se,accept:"image/*",allowedTypes:A,multiple:!0,onError:function(e){O.removeAllNotices(),O.createErrorNotice(e)},notices:I},me)),fe=(0,u.useBlockProps)({className:(0,i.default)(p,"has-nested-images")});if(!ce)return(0,o.createElement)(f.View,fe,pe);const he=H&&"none"!==H;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(u.InspectorControls,null,(0,o.createElement)(c.PanelBody,{title:(0,d.__)("Settings")},te.length>1&&(0,o.createElement)(c.RangeControl,(0,a.default)({label:(0,d.__)("Columns"),value:R||(0,_.defaultColumnsNumber)(te.length),onChange:function(e){r({columns:e})},min:1,max:Math.min(8,te.length)},z,{required:!0})),(0,o.createElement)(c.ToggleControl,{label:(0,d.__)("Crop images"),checked:!!Z,onChange:function(){r({imageCrop:!Z})},help:function(e){return e?(0,d.__)("Thumbnails are cropped to align."):(0,d.__)("Thumbnails are not cropped.")}}),(0,o.createElement)(c.SelectControl,{label:(0,d.__)("Link to"),value:H,onChange:function(e){r({linkTo:e});const t={},n=[];G(B).innerBlocks.forEach((r=>{n.push(r.clientId);const o=r.attributes.id?(0,l.find)(ne,{id:r.attributes.id}):null;t[r.clientId]=(0,y.getHrefAndDestination)(o,e)})),V(n,t,!0);const o=[...L].find((t=>t.value===e));X((0,d.sprintf)((0,d.__)("All gallery image links updated to: %s"),o.label),{id:"gallery-attributes-linkTo",type:"snackbar"})},options:L,hideCancelButton:!0}),he&&(0,o.createElement)(c.ToggleControl,{label:(0,d.__)("Open in new tab"),checked:"_blank"===j,onChange:function(e){const t=e?"_blank":void 0;r({linkTarget:t});const n={},o=[];G(B).innerBlocks.forEach((e=>{o.push(e.clientId),n[e.clientId]=(0,k.getUpdatedLinkTargetSettings)(t,e.attributes)})),V(o,n,!0);const a=e?(0,d.__)("All gallery images updated to open in new tab"):(0,d.__)("All gallery images updated to not open in new tab");X(a,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}}),(null==ae?void 0:ae.length)>0&&(0,o.createElement)(c.SelectControl,{label:(0,d.__)("Image size"),value:F,options:ae,onChange:function(e){r({sizeSlug:e});const t={},n=[];G(B).innerBlocks.forEach((r=>{n.push(r.clientId);const o=r.attributes.id?(0,l.find)(ne,{id:r.attributes.id}):null;t[r.clientId]=(0,k.getImageSizeAttributes)(o,e)})),V(n,t,!0);const o=ae.find((t=>t.value===e));X((0,d.sprintf)((0,d.__)("All gallery image sizes updated to: %s"),o.label),{id:"gallery-attributes-sizeSlug",type:"snackbar"})},hideCancelButton:!0}),o.Platform.isWeb&&!ae&&ue&&(0,o.createElement)(c.BaseControl,{className:"gallery-image-sizes"},(0,o.createElement)(c.BaseControl.VisualLabel,null,(0,d.__)("Image size")),(0,o.createElement)(f.View,{className:"gallery-image-sizes__loading"},(0,o.createElement)(c.Spinner,null),(0,d.__)("Loading options…"))))),(0,o.createElement)(u.BlockControls,{group:"other"},(0,o.createElement)(u.MediaReplaceFlow,{allowedTypes:A,accept:"image/*",handleUpload:!1,onSelect:se,name:(0,d.__)("Add"),multiple:!0,mediaIds:te.map((e=>e.id)),addToGallery:ue})),I,o.Platform.isWeb&&(0,o.createElement)(T.default,{blockGap:null===(t=s.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap,clientId:B}),(0,o.createElement)(M.default,(0,a.default)({},e,{images:te,mediaPlaceholder:!ce||o.Platform.isNative?pe:void 0,blockProps:fe,insertBlocksAfter:P})))}));t.default=B},58975:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Gallery=void 0;var o=n(40818),a=r(n(67154)),i=r(n(94184)),l=n(39626),s=n(16496),c=n(54730),u=n(82402),d=n(67431);const m=["core/image"],p=e=>{const{attributes:t,isSelected:n,setAttributes:r,mediaPlaceholder:s,insertBlocksAfter:p,blockProps:h}=e,{align:g,columns:b,caption:v,imageCrop:_}=t,{children:y,...k}=(0,l.useInnerBlocksProps)(h,{allowedBlocks:m,orientation:"horizontal",renderAppender:!1,__experimentalLayout:{type:"default",alignments:[]}}),[M,w]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{n||w(!1)}),[n]),(0,o.createElement)("figure",(0,a.default)({},k,{className:(0,i.default)(h.className,"blocks-gallery-grid",{[`align${g}`]:g,[`columns-${b}`]:void 0!==b,"columns-default":void 0===b,"is-cropped":_})}),y,n&&!y&&(0,o.createElement)(d.View,{className:"blocks-gallery-media-placeholder-wrapper",onClick:function(){M&&w(!1)}},s),(0,o.createElement)(f,{isHidden:!n&&l.RichText.isEmpty(v),captionFocused:M,onFocusCaption:function(){M||w(!0)},tagName:"figcaption",className:"blocks-gallery-caption","aria-label":(0,c.__)("Gallery caption text"),placeholder:(0,c.__)("Write gallery caption…"),value:v,onChange:e=>r({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>p((0,u.createBlock)((0,u.getDefaultBlockName)()))}))};function f(e){let{isHidden:t,captionFocused:n,onFocusCaption:r,className:i,value:c,placeholder:u,tagName:d,captionRef:m,...p}=e;return t?(0,o.createElement)(s.VisuallyHidden,(0,a.default)({as:l.RichText},p)):(0,o.createElement)(l.RichText,(0,a.default)({ref:m,value:c,placeholder:u,className:i,tagName:d,isSelected:n,onClick:r},p))}t.Gallery=p;var h=p;t.default=h},24322:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{blockGap:t,clientId:n}=e;const a=(0,r.useContext)(o.BlockList.__unstableElementContext),i="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )";let l,s=i,c=i;t&&(l="string"==typeof t?t:(null==t?void 0:t.top)||i,c="string"==typeof t?t:(null==t?void 0:t.left)||i,s=l===c?l:`${l} ${c}`);const u=`#block-${n} {\n\t\t--wp--style--unstable-gallery-gap: ${c};\n\t\tgap: ${s}\n\t}`;return u&&a?(0,r.createPortal)((0,r.createElement)((()=>(0,r.createElement)("style",null,u)),null),a):null};var r=n(40818),o=n(39626)},95810:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.settings=t.name=t.metadata=void 0;var o=n(12991),a=r(n(65403)),i=r(n(20385)),l=r(n(14562)),s=r(n(45508));const c={$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:{blockGap:["horizontal","vertical"],__experimentalSkipSerialization:["blockGap"],__experimentalDefaultControls:{blockGap:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex"}}},editorStyle:"wp-block-gallery-editor",style:"wp-block-gallery"};t.metadata=c;const{name:u}=c;t.name=u;const d={icon:o.gallery,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:s.default,edit:i.default,save:l.default,deprecated:a.default};t.settings=d},14562:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;if(!(0,s.isGalleryV2Enabled)())return(0,l.default)({attributes:t});const{caption:n,columns:r,imageCrop:c}=t,u=(0,a.default)("has-nested-images",{[`columns-${r}`]:void 0!==r,"columns-default":void 0===r,"is-cropped":c}),d=i.useBlockProps.save({className:u}),m=i.useInnerBlocksProps.save(d);return(0,o.createElement)("figure",m,m.children,!i.RichText.isEmpty(n)&&(0,o.createElement)(i.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:n}))};var o=n(40818),a=r(n(94184)),i=n(39626),l=r(n(66306)),s=n(63249)},22322:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sharedIcon=void 0;var r=n(40818),o=n(39626),a=n(12991);const i=(0,r.createElement)(o.BlockIcon,{icon:a.gallery});t.sharedIcon=i},63249:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultColumnsNumber=function(e){return e?Math.min(3,e):3},t.isGalleryV2Enabled=function(){if(process.env.IS_GUTENBERG_PLUGIN){if(!window.wp||"boolean"!=typeof window.wp.galleryBlockV2Enabled)throw"window.wp.galleryBlockV2Enabled is not defined";return window.wp.galleryBlockV2Enabled}return!0},t.pickRelevantMediaFiles=void 0;var r=n(96486);t.pickRelevantMediaFiles=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large";const n=(0,r.pick)(e,["alt","id","link"]);n.url=(0,r.get)(e,["sizes",t,"url"])||(0,r.get)(e,["media_details","sizes",t,"source_url"])||e.url||e.source_url;const o=(0,r.get)(e,["sizes","full","url"])||(0,r.get)(e,["media_details","sizes","full","source_url"]);return o&&(n.fullUrl=o),n}},45508:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),o=n(82402),a=n(18452),i=n(52416),l=n(59949),s=n(65940),c=n(63249);const u=e=>e?e.split(",").map((e=>parseInt(e,10))):[];(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",(function(e){var t;if((0,c.isGalleryV2Enabled)()&&"core/gallery"===e.name&&(null===(t=e.attributes)||void 0===t?void 0:t.images.length)>0){const t=e.attributes.images.map((t=>{let{url:n,id:r,alt:a}=t;return(0,o.createBlock)("core/image",{url:n,id:r?parseInt(r,10):null,alt:a,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination})}));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e})),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",(function(e,t){const n=(Array.isArray(t)?t:[t]).find((t=>{var n;return"core/gallery"===t.name&&t.innerBlocks.length>0&&!(null!==(n=t.attributes.images)&&void 0!==n&&n.length)>0&&!e.name.includes("core/")}));if(n){const e=n.innerBlocks.map((e=>{let{attributes:{url:t,id:n,alt:r}}=e;return{url:t,id:n?parseInt(n,10):null,alt:r}})),t=e.map((e=>{let{id:t}=e;return t}));n.attributes.images=e,n.attributes.ids=t}return e}));var d={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:n}=e[0];t=(0,r.every)(e,["align",t])?t:void 0,n=(0,r.every)(e,["sizeSlug",n])?n:void 0;const a=(0,r.filter)(e,(e=>{let{url:t}=e;return t}));if((0,c.isGalleryV2Enabled)()){const e=a.map((e=>(0,o.createBlock)("core/image",e)));return(0,o.createBlock)("core/gallery",{align:t,sizeSlug:n},e)}return(0,o.createBlock)("core/gallery",{images:a.map((e=>{let{id:t,url:n,alt:o,caption:a}=e;return{id:(0,r.toString)(t),url:n,alt:o,caption:a}})),ids:a.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(!(0,c.isGalleryV2Enabled)())return u(t).map((e=>({id:(0,r.toString)(e)})))}},ids:{type:"array",shortcode:e=>{let{named:{ids:t}}=e;if(!(0,c.isGalleryV2Enabled)())return u(t)}},shortCodeTransforms:{type:"array",shortcode:e=>{let{named:{ids:t}}=e;if((0,c.isGalleryV2Enabled)())return u(t).map((e=>({id:parseInt(e)})))}},columns:{type:"number",shortcode:e=>{let{named:{columns:t="3"}}=e;return parseInt(t,10)}},linkTo:{type:"string",shortcode:e=>{let{named:{link:t}}=e;if(!(0,c.isGalleryV2Enabled)())switch(t){case"post":default:return s.LINK_DESTINATION_ATTACHMENT;case"file":return s.LINK_DESTINATION_MEDIA}switch(t){case"post":return l.LINK_DESTINATION_ATTACHMENT;case"file":return l.LINK_DESTINATION_MEDIA;default:return l.LINK_DESTINATION_NONE}}}},isMatch(e){let{named:t}=e;return void 0!==t.ids}},{type:"files",priority:1,isMatch:e=>1!==e.length&&(0,r.every)(e,(e=>0===e.type.indexOf("image/"))),transform(e){if((0,c.isGalleryV2Enabled)()){const t=e.map((e=>(0,o.createBlock)("core/image",{url:(0,a.createBlobURL)(e)})));return(0,o.createBlock)("core/gallery",{},t)}return(0,o.createBlock)("core/gallery",{images:e.map((e=>(0,c.pickRelevantMediaFiles)({url:(0,a.createBlobURL)(e)})))})}}],to:[{type:"block",blocks:["core/image"],transform:(e,t)=>{let{align:n,images:r,ids:a,sizeSlug:i}=e;return(0,c.isGalleryV2Enabled)()?t.length>0?t.map((e=>{let{attributes:{id:t,url:r,alt:a,caption:i,sizeSlug:l,linkDestination:s,href:c,linkTarget:u}}=e;return(0,o.createBlock)("core/image",{id:t,url:r,alt:a,caption:i,sizeSlug:l,align:n,linkDestination:s,href:c,linkTarget:u})})):(0,o.createBlock)("core/image",{align:n}):r.length>0?r.map(((e,t)=>{let{url:r,alt:l,caption:s}=e;return(0,o.createBlock)("core/image",{id:a[t],url:r,alt:l,caption:s,align:n,sizeSlug:i})})):(0,o.createBlock)("core/image",{align:n})}}]};t.default=d},6850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const[t,n]=(0,r.useState)([]),i=(0,o.useSelect)((n=>{if(null==e||!e.length)return t;const r=e.map((e=>e.attributes.id)).filter((e=>void 0!==e));return 0===r.length?t:n(a.store).getMediaItems({include:r.join(","),per_page:r.length,orderby:"include"})}),[e]);return(null==i?void 0:i.length)!==(null==t?void 0:t.length)||null!=i&&i.some((e=>!t.find((t=>t.id===e.id))))?(n(i),i):t};var r=n(40818),o=n(56191),a=n(71539)},62552:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const[n,o]=(0,r.useState)([]);return(0,r.useMemo)((()=>function(){let r=!1;const a=n.filter((t=>e.find((e=>t.clientId===e.clientId))));a.length{e.fromSavedContent&&!a.find((t=>t.id===e.id))&&(r=!0,a.push(e))}));const i=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));return(r||(null==i?void 0:i.length)>0)&&o([...a,...i]),i.length>0?i:null}()),[e,t])};var r=n(40818)},9147:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return(0,o.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:o}=n();let a={};return t&&(a=e.reduce(((e,t)=>{if(!t.id)return e;const n=o.reduce(((e,n)=>{const o=(0,r.get)(t,["sizes",n.slug,"url"]),a=(0,r.get)(t,["media_details","sizes",n.slug,"source_url"]);return{...e,[n.slug]:o||a}}),{});return{...e,[parseInt(t.id,10)]:n}}),{})),o.filter((e=>{let{slug:t}=e;return(0,r.some)(a,(e=>e[t]))})).map((e=>{let{name:t,slug:n}=e;return{value:n,label:t}}))}()),[e,t])};var r=n(96486),o=n(40818)},34271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,o.useSelect)((t=>{if(!e||0===e.length)return;const n=e.map((e=>e.id));return t(a.store).getMediaItems({include:n.join(","),per_page:n.length,orderby:"include"})}),[e]);if(t)return(0,r.every)(t,(e=>e&&e.source_url))?t.map((e=>{var t;return{id:e.id,type:"image",url:e.source_url,mime:e.mime_type,alt:e.alt_text,link:e.link,caption:null==e||null===(t=e.caption)||void 0===t?void 0:t.raw}})):void 0};var r=n(96486),o=n(56191),a=n(71539)},78514:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHrefAndDestination=function(e,t){switch(t){case r.LINK_DESTINATION_MEDIA_WP_CORE:case r.LINK_DESTINATION_MEDIA:return{href:(null==e?void 0:e.source_url)||(null==e?void 0:e.url),linkDestination:o.LINK_DESTINATION_MEDIA};case r.LINK_DESTINATION_ATTACHMENT_WP_CORE:case r.LINK_DESTINATION_ATTACHMENT:return{href:null==e?void 0:e.link,linkDestination:o.LINK_DESTINATION_ATTACHMENT};case r.LINK_DESTINATION_NONE:return{href:void 0,linkDestination:o.LINK_DESTINATION_NONE}}return{}};var r=n(59949),o=n(15169)},65940:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LINK_DESTINATION_NONE=t.LINK_DESTINATION_MEDIA=t.LINK_DESTINATION_ATTACHMENT=void 0,t.LINK_DESTINATION_NONE="none",t.LINK_DESTINATION_MEDIA="file",t.LINK_DESTINATION_ATTACHMENT="post"},91397:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(67154)),i=n(96486),l=n(38669),s=n(16496),c=n(39626),u=n(54730),d=n(18452),m=n(56191),p=n(59054),f=n(67431),h=n(71539),g=n(22322),b=n(51355),v=n(65403),_=r(n(74766)),y=n(65940);const k=[{value:y.LINK_DESTINATION_ATTACHMENT,label:(0,u.__)("Attachment Page")},{value:y.LINK_DESTINATION_MEDIA,label:(0,u.__)("Media File")},{value:y.LINK_DESTINATION_NONE,label:(0,u.__)("None")}],M=["image"],w=o.Platform.select({web:(0,u.__)("Drag images, upload new ones or select files from your library."),native:(0,u.__)("ADD MEDIA")}),E=o.Platform.select({web:{},native:{type:"stepper"}});var x=(0,l.compose)([s.withNotices,(0,p.withViewportMatch)({isNarrow:"< small"})])((function(e){const{attributes:t,clientId:n,isSelected:r,noticeUI:l,noticeOperations:p,onFocus:x}=e,{columns:C=(0,v.defaultColumnsNumberV1)(t),imageCrop:S,images:T,linkTo:L,sizeSlug:A}=t,[N,z]=(0,o.useState)(),[B,O]=(0,o.useState)(),{__unstableMarkNextChangeAsNotPersistent:D}=(0,m.useDispatch)(c.store),{imageSizes:I,mediaUpload:P,getMedia:R,wasBlockJustInserted:Z}=(0,m.useSelect)((e=>{const t=e(c.store).getSettings();return{imageSizes:t.imageSizes,mediaUpload:t.mediaUpload,getMedia:e(h.store).getMedia,wasBlockJustInserted:e(c.store).wasBlockJustInserted(n,"inserter_menu")}})),j=(0,o.useMemo)((()=>r?(0,i.reduce)(t.ids,((e,t)=>{if(!t)return e;const n=R(t),r=(0,i.reduce)(I,((e,t)=>{const r=(0,i.get)(n,["sizes",t.slug,"url"]),o=(0,i.get)(n,["media_details","sizes",t.slug,"source_url"]);return{...e,[t.slug]:r||o}}),{});return{...e,[parseInt(t,10)]:r}}),{}):{}),[r,t.ids,I]);function H(t){if(t.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');t.images&&(t={...t,ids:(0,i.map)(t.images,(e=>{let{id:t}=e;return parseInt(t,10)}))}),e.setAttributes(t)}function W(e,t){const n=[...T];n.splice(t,1,T[e]),n.splice(e,1,T[t]),z(t),H({images:n})}function F(e){const t=(0,i.toString)(e.id),n=(0,i.find)(T,{id:t}),r=n?n.caption:e.caption;if(!B)return r;const o=(0,i.find)(B,{id:t});return o&&o.caption!==e.caption?e.caption:r}function q(e){O(e.map((e=>({id:(0,i.toString)(e.id),caption:e.caption})))),H({images:e.map((e=>({...(0,b.pickRelevantMediaFiles)(e,A),caption:F(e),id:(0,i.toString)(e.id)}))),columns:t.columns?Math.min(e.length,t.columns):t.columns})}(0,o.useEffect)((()=>{if("web"===o.Platform.OS&&T&&T.length>0&&(0,i.every)(T,(e=>{let{url:t}=e;return(0,d.isBlobURL)(t)}))){const e=(0,i.map)(T,(e=>{let{url:t}=e;return(0,d.getBlobByURL)(t)}));(0,i.forEach)(T,(e=>{let{url:t}=e;return(0,d.revokeBlobURL)(t)})),P({filesList:e,onFileChange:q,allowedTypes:["image"]})}}),[]),(0,o.useEffect)((()=>{r||z()}),[r]),(0,o.useEffect)((()=>{var e,t,n,r,o,a;L||(D(),H({linkTo:(null===(e=window)||void 0===e||null===(t=e.wp)||void 0===t||null===(n=t.media)||void 0===n||null===(r=n.view)||void 0===r||null===(o=r.settings)||void 0===o||null===(a=o.defaultProps)||void 0===a?void 0:a.link)||y.LINK_DESTINATION_NONE}))}),[L]);const Y=!!T.length,V=Y&&T.some((e=>!!e.id)),U=(0,o.createElement)(c.MediaPlaceholder,{addToGallery:V,isAppender:Y,disableMediaButtons:Y&&!r,icon:!Y&&g.sharedIcon,labels:{title:!Y&&(0,u.__)("Gallery"),instructions:!Y&&w},onSelect:q,accept:"image/*",allowedTypes:M,multiple:!0,value:V?T:{},onError:function(e){p.removeAllNotices(),p.createErrorNotice(e)},notices:Y?void 0:l,onFocus:x,autoOpenMediaUpload:!Y&&r&&Z}),$=(0,c.useBlockProps)();if(!Y)return(0,o.createElement)(f.View,$,U);const X=(0,i.map)((0,i.filter)(I,(e=>{let{slug:t}=e;return(0,i.some)(j,(e=>e[t]))})),(e=>{let{name:t,slug:n}=e;return{value:n,label:t}})),G=Y&&!(0,i.isEmpty)(X);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.InspectorControls,null,(0,o.createElement)(s.PanelBody,{title:(0,u.__)("Settings")},T.length>1&&(0,o.createElement)(s.RangeControl,(0,a.default)({label:(0,u.__)("Columns"),value:C,onChange:function(e){H({columns:e})},min:1,max:Math.min(8,T.length)},E,{required:!0})),(0,o.createElement)(s.ToggleControl,{label:(0,u.__)("Crop images"),checked:!!S,onChange:function(){H({imageCrop:!S})},help:function(e){return e?(0,u.__)("Thumbnails are cropped to align."):(0,u.__)("Thumbnails are not cropped.")}}),(0,o.createElement)(s.SelectControl,{label:(0,u.__)("Link to"),value:L,onChange:function(e){H({linkTo:e})},options:k,hideCancelButton:!0}),G&&(0,o.createElement)(s.SelectControl,{label:(0,u.__)("Image size"),value:A,options:X,onChange:function(e){H({images:(0,i.map)(T,(t=>{if(!t.id)return t;const n=(0,i.get)(j,[parseInt(t.id,10),e]);return{...t,...n&&{url:n}}})),sizeSlug:e})},hideCancelButton:!0}))),l,(0,o.createElement)(_.default,(0,a.default)({},e,{selectedImage:N,mediaPlaceholder:U,onMoveBackward:function(e){return()=>{0!==e&&W(e,e-1)}},onMoveForward:function(e){return()=>{e!==T.length-1&&W(e,e+1)}},onRemoveImage:function(e){return()=>{const n=(0,i.filter)(T,((t,n)=>e!==n));z(),H({images:n,columns:t.columns?Math.min(n.length,t.columns):t.columns})}},onSelectImage:function(e){return()=>{z(e)}},onDeselectImage:function(){return()=>{z()}},onSetImageAttributes:function(e,t){T[e]&&H({images:[...T.slice(0,e),{...T[e],...t},...T.slice(e+1)]})},blockProps:$,onFocusGalleryCaption:function(){z()}})))}));t.default=x},80871:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(94184)),i=n(96486),l=n(16496),s=n(54730),c=n(5560),u=n(56191),d=n(39626),m=n(18452),p=n(38669),f=n(12991),h=n(71539),g=n(51355),b=n(65940);class v extends o.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!==[c.BACKSPACE,c.DELETE].indexOf(e.keyCode)&&(e.preventDefault(),this.props.onRemove())}onEdit(){this.setState({isEditing:!0})}componentDidUpdate(){const{image:e,url:t,__unstableMarkNextChangeAsNotPersistent:n}=this.props;e&&!t&&(n(),this.props.setAttributes({url:e.source_url,alt:e.alt_text}))}deselectOnBlur(){this.props.onDeselect()}onSelectImageFromLibrary(e){const{setAttributes:t,id:n,url:r,alt:o,caption:a,sizeSlug:l}=this.props;if(!e||!e.url)return;let s=(0,g.pickRelevantMediaFiles)(e,l);((e,t)=>!e&&(0,m.isBlobURL)(t))(n,r)&&o&&(s=(0,i.omit)(s,["alt"])),a&&!(0,i.get)(s,["caption"])&&(s=(0,i.omit)(s,["caption"])),t(s),this.setState({isEditing:!1})}onSelectCustomURL(e){const{setAttributes:t,url:n}=this.props;e!==n&&(t({url:e,id:void 0}),this.setState({isEditing:!1}))}render(){const{url:e,alt:t,id:n,linkTo:r,link:i,isFirstItem:c,isLastItem:u,isSelected:p,caption:h,onRemove:g,onMoveForward:v,onMoveBackward:_,setAttributes:y,"aria-label":k}=this.props,{isEditing:M}=this.state;let w;switch(r){case b.LINK_DESTINATION_MEDIA:w=e;break;case b.LINK_DESTINATION_ATTACHMENT:w=i}const E=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("img",{src:e,alt:t,"data-id":n,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":k,ref:this.bindContainer}),(0,m.isBlobURL)(e)&&(0,o.createElement)(l.Spinner,null)),x=(0,a.default)({"is-selected":p,"is-transient":(0,m.isBlobURL)(e)});return(0,o.createElement)("figure",{className:x,onClick:this.onSelectImage,onFocus:this.onSelectImage},!M&&(w?(0,o.createElement)("a",{href:w},E):E),M&&(0,o.createElement)(d.MediaPlaceholder,{labels:{title:(0,s.__)("Edit gallery image")},icon:f.image,onSelect:this.onSelectImageFromLibrary,onSelectURL:this.onSelectCustomURL,accept:"image/*",allowedTypes:["image"],value:{id:n,src:e}}),(0,o.createElement)(l.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-left"},(0,o.createElement)(l.Button,{icon:f.chevronLeft,onClick:c?void 0:_,label:(0,s.__)("Move image backward"),"aria-disabled":c,disabled:!p}),(0,o.createElement)(l.Button,{icon:f.chevronRight,onClick:u?void 0:v,label:(0,s.__)("Move image forward"),"aria-disabled":u,disabled:!p})),(0,o.createElement)(l.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right"},(0,o.createElement)(l.Button,{icon:f.edit,onClick:this.onEdit,label:(0,s.__)("Replace image"),disabled:!p}),(0,o.createElement)(l.Button,{icon:f.closeSmall,onClick:g,label:(0,s.__)("Remove image"),disabled:!p})),!M&&(p||h)&&(0,o.createElement)(d.RichText,{tagName:"figcaption","aria-label":(0,s.__)("Image caption text"),placeholder:p?(0,s.__)("Add caption"):null,value:h,onChange:e=>y({caption:e}),inlineToolbar:!0}))}}var _=(0,p.compose)([(0,u.withSelect)(((e,t)=>{const{getMedia:n}=e(h.store),{id:r}=t;return{image:r?n(parseInt(r,10)):null}})),(0,u.withDispatch)((e=>{const{__unstableMarkNextChangeAsNotPersistent:t}=e(d.store);return{__unstableMarkNextChangeAsNotPersistent:t}}))])(v);t.default=_},74766:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Gallery=void 0;var o=n(40818),a=r(n(67154)),i=r(n(94184)),l=n(39626),s=n(16496),c=n(54730),u=n(82402),d=r(n(80871)),m=n(65403);const p=e=>{const{attributes:t,isSelected:n,setAttributes:r,selectedImage:s,mediaPlaceholder:p,onMoveBackward:h,onMoveForward:g,onRemoveImage:b,onSelectImage:v,onDeselectImage:_,onSetImageAttributes:y,insertBlocksAfter:k,blockProps:M}=e,{align:w,columns:E=(0,m.defaultColumnsNumberV1)(t),caption:x,imageCrop:C,images:S}=t;return(0,o.createElement)("figure",(0,a.default)({},M,{className:(0,i.default)(M.className,{[`align${w}`]:w,[`columns-${E}`]:E,"is-cropped":C})}),(0,o.createElement)("ul",{className:"blocks-gallery-grid"},S.map(((e,r)=>{const a=(0,c.sprintf)((0,c.__)("image %1$d of %2$d in gallery"),r+1,S.length);return(0,o.createElement)("li",{className:"blocks-gallery-item",key:e.id?`${e.id}-${r}`:e.url},(0,o.createElement)(d.default,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===r,isLastItem:r+1===S.length,isSelected:n&&s===r,onMoveBackward:h(r),onMoveForward:g(r),onRemove:b(r),onSelect:v(r),onDeselect:_(r),setAttributes:e=>y(r,e),caption:e.caption,"aria-label":a,sizeSlug:t.sizeSlug}))}))),p,(0,o.createElement)(f,{isHidden:!n&&l.RichText.isEmpty(x),tagName:"figcaption",className:"blocks-gallery-caption","aria-label":(0,c.__)("Gallery caption text"),placeholder:(0,c.__)("Write gallery caption…"),value:x,onChange:e=>r({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>k((0,u.createBlock)((0,u.getDefaultBlockName)()))}))};function f(e){let{isHidden:t,...n}=e;return t?(0,o.createElement)(s.VisuallyHidden,(0,a.default)({as:l.RichText},n)):(0,o.createElement)(l.RichText,n)}t.Gallery=p;var h=p;t.default=h},66306:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{attributes:t}=e;const{images:n,columns:l=(0,a.defaultColumnsNumberV1)(t),imageCrop:s,caption:c,linkTo:u}=t,d=`columns-${l} ${s?"is-cropped":""}`;return(0,r.createElement)("figure",o.useBlockProps.save({className:d}),(0,r.createElement)("ul",{className:"blocks-gallery-grid"},n.map((e=>{let t;switch(u){case i.LINK_DESTINATION_MEDIA:t=e.fullUrl||e.url;break;case i.LINK_DESTINATION_ATTACHMENT:t=e.link}const n=(0,r.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,r.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,r.createElement)("figure",null,t?(0,r.createElement)("a",{href:t},n):n,!o.RichText.isEmpty(e.caption)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!o.RichText.isEmpty(c)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:c}))};var r=n(40818),o=n(39626),a=n(65403),i=n(65940)},51355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pickRelevantMediaFiles=void 0;var r=n(96486);t.pickRelevantMediaFiles=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large";const n=(0,r.pick)(e,["alt","id","link","caption"]);n.url=(0,r.get)(e,["sizes",t,"url"])||(0,r.get)(e,["media_details","sizes",t,"source_url"])||e.url;const o=(0,r.get)(e,["sizes","full","url"])||(0,r.get)(e,["media_details","sizes","full","source_url"]);return o&&(n.fullUrl=o),n}},52243:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40818),a=r(n(94184)),i=n(96486),l=n(39626);const s=e=>{if(e.tagName||(e={...e,tagName:"div"}),!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),{...(0,i.omit)(e,["customTextColor","customBackgroundColor"]),style:t}};var c=[{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,o.createElement)(n,l.useBlockProps.save(),(0,o.createElement)("div",{className:"wp-block-group__inner-container"},(0,o.createElement)(l.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:s,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:r,textColor:i,customTextColor:s}=t,c=(0,l.getColorClassName)("background-color",n),u=(0,l.getColorClassName)("color",i),d=(0,a.default)(c,u,{"has-text-color":i||s,"has-background":n||r}),m={backgroundColor:c?void 0:r,color:u?void 0:s};return(0,o.createElement)("div",{className:d,style:m},(0,o.createElement)("div",{className:"wp-block-group__inner-container"},(0,o.createElement)(l.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:s,supports:{align:["wide","full"],anchor:!0,html:!1},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:r,textColor:i,customTextColor:s}=t,c=(0,l.getColorClassName)("background-color",n),u=(0,l.getColorClassName)("color",i),d=(0,a.default)(c,{"has-text-color":i||s,"has-background":n||r}),m={backgroundColor:c?void 0:r,color:u?void 0:s};return(0,o.createElement)("div",{className:d,style:m},(0,o.createElement)("div",{className:"wp-block-group__inner-container"},(0,o.createElement)(l.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:s,save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:r}=t,i=(0,l.getColorClassName)("background-color",n),s=(0,a.default)(i,{"has-background":n||r}),c={backgroundColor:i?void 0:r};return(0,o.createElement)("div",{className:s,style:c},(0,o.createElement)(l.InnerBlocks.Content,null))}}];t.default=c},70507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(40818),o=n(56191),a=n(39626),i=n(16496),l=n(54730);const s={header:(0,l.__)("The

element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,l.__)("The
element should be used for the primary content of your document only. "),section:(0,l.__)("The
element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,l.__)("The
element should represent a self contained, syndicatable portion of the document."),aside:(0,l.__)("The