| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 "use strict";var wp;(wp||={}).blockEditor=(()=>{var hde=Object.create;var hS=Object.defineProperty;var gde=Object.getOwnPropertyDescriptor;var bde=Object.getOwnPropertyNames;var kde=Object.getPrototypeOf,vde=Object.prototype.hasOwnProperty;var te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ns=(e,t)=>{for(var o in t)hS(e,o,{get:t[o],enumerable:!0})},R4=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of bde(t))!vde.call(e,n)&&n!==o&&hS(e,n,{get:()=>t[n],enumerable:!(r=gde(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?hde(kde(e)):{},R4(t||!e||!e.__esModule?hS(o,"default",{value:e,enumerable:!0}):o,e)),yde=e=>R4(hS({},"__esModule",{value:!0}),e);var $=te((_Oe,A4)=>{A4.exports=window.wp.blocks});var I=te((SOe,L4)=>{L4.exports=window.wp.element});var D=te((xOe,M4)=>{M4.exports=window.wp.data});var Y=te((wOe,N4)=>{N4.exports=window.wp.compose});var nt=te((COe,D4)=>{D4.exports=window.wp.hooks});var O=te((POe,q4)=>{q4.exports=window.wp.components});var _S=te((OOe,Y4)=>{Y4.exports=window.wp.privateApis});var Oe=te((VOe,ez)=>{ez.exports=window.wp.deprecated});var x=te((zOe,oz)=>{oz.exports=window.ReactJSXRuntime});var Zr=te((UOe,nz)=>{nz.exports=window.wp.url});var M=te((JOe,dz)=>{dz.exports=window.wp.i18n});var Kd=te((eRe,fz)=>{"use strict";fz.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],o.get(n[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(t[n]!==o[n])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var q=te((uRe,vz)=>{vz.exports=window.wp.primitives});var Vo=te((CNe,yz)=>{yz.exports=window.wp.richText});var Sz=te((BNe,_z)=>{_z.exports=window.wp.blockSerializationDefaultParser});var Fo=te((JNe,o6)=>{o6.exports=window.wp.a11y});var ii=te((eDe,l6)=>{l6.exports=window.wp.notices});var Tp=te((tDe,c6)=>{c6.exports=window.wp.preferences});var $6=te((e5e,Yx)=>{var H6={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},G6=Object.keys(H6).join("|"),gge=new RegExp(G6,"g"),bge=new RegExp(G6,"");function kge(e){return H6[e]}var W6=function(e){return e.replace(gge,kge)},vge=function(e){return!!e.match(bge)};Yx.exports=W6;Yx.exports.has=vge;Yx.exports.remove=W6});var nj=te((S5e,rj)=>{rj.exports=window.wp.apiFetch});var oM=te((x5e,ij)=>{ij.exports=window.wp.htmlEntities});var av=te((Y5e,Cj)=>{Cj.exports=window.wp.styleEngine});var st=te((qVe,qj)=>{qj.exports=window.wp.keycodes});var ze=te((m3e,lU)=>{lU.exports=window.wp.dom});var uU=te(gM=>{"use strict";Object.defineProperty(gM,"__esModule",{value:!0});gM.default=cU;function cU(){}cU.prototype={diff:function(t,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.callback;typeof r=="function"&&(n=r,r={}),this.options=r;var i=this;function s(g){return n?(setTimeout(function(){n(void 0,g)},0),!0):g}t=this.castInput(t),o=this.castInput(o),t=this.removeEmpty(this.tokenize(t)),o=this.removeEmpty(this.tokenize(o));var a=o.length,c=t.length,u=1,d=a+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],o,t,0);if(f[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(o),count:o.length}]);function p(){for(var g=-1*u;g<=u;g+=2){var b=void 0,k=f[g-1],y=f[g+1],v=(y?y.newPos:0)-g;k&&(f[g-1]=void 0);var S=k&&k.newPos+1<a,w=y&&0<=v&&v<c;if(!S&&!w){f[g]=void 0;continue}if(!S||w&&k.newPos<y.newPos?(b=fbe(y),i.pushComponent(b.components,void 0,!0)):(b=k,b.newPos++,i.pushComponent(b.components,!0,void 0)),v=i.extractCommon(b,o,t,g),b.newPos+1>=a&&v+1>=c)return s(dbe(i,b.components,o,t,i.useLongestToken));f[g]=b}u++}if(n)(function g(){setTimeout(function(){if(u>d)return n();p()||g()},0)})();else for(;u<=d;){var h=p();if(h)return h}},pushComponent:function(t,o,r){var n=t[t.length-1];n&&n.added===o&&n.removed===r?t[t.length-1]={count:n.count+1,added:o,removed:r}:t.push({count:1,added:o,removed:r})},extractCommon:function(t,o,r,n){for(var i=o.length,s=r.length,a=t.newPos,c=a-n,u=0;a+1<i&&c+1<s&&this.equals(o[a+1],r[c+1]);)a++,c++,u++;return u&&t.components.push({count:u}),t.newPos=a,c},equals:function(t,o){return this.options.comparator?this.options.comparator(t,o):t===o||this.options.ignoreCase&&t.toLowerCase()===o.toLowerCase()},removeEmpty:function(t){for(var o=[],r=0;r<t.length;r++)t[r]&&o.push(t[r]);return o},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function dbe(e,t,o,r,n){for(var i=0,s=t.length,a=0,c=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=o.slice(a,a+u.count);d=d.map(function(p,h){var g=r[c+h];return g.length>p.length?g:p}),u.value=e.join(d)}else u.value=e.join(o.slice(a,a+u.count));a+=u.count,u.added||(c+=u.count)}}var m=t[s-1];return s>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[s-2].value+=m.value,t.pop()),t}function fbe(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var fU=te(hv=>{"use strict";Object.defineProperty(hv,"__esModule",{value:!0});hv.diffChars=hbe;hv.characterDiff=void 0;var mbe=pbe(uU());function pbe(e){return e&&e.__esModule?e:{default:e}}var dU=new mbe.default;hv.characterDiff=dU;function hbe(e,t,o){return dU.diff(e,t,o)}});var Gs=te((T3e,BU)=>{BU.exports=window.React});var TU=te((I3e,EU)=>{"use strict";var vbe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";EU.exports=vbe});var RU=te((P3e,OU)=>{"use strict";var ybe=TU();function IU(){}function PU(){}PU.resetWarningCache=IU;OU.exports=function(){function e(r,n,i,s,a,c){if(c!==ybe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:PU,resetWarningCache:IU};return o.PropTypes=o,o}});var LU=te((A3e,AU)=>{AU.exports=RU()();var O3e,R3e});var NU=te((ww,MU)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof ww<"u")t(MU,ww);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(ww,function(e,t){"use strict";var o=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),r=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{r=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||o.has(c))return;var u=null,d=null,f=null;function m(){var v=window.getComputedStyle(c,null);v.resize==="vertical"?c.style.resize="none":v.resize==="both"&&(c.style.resize="horizontal"),v.boxSizing==="content-box"?u=-(parseFloat(v.paddingTop)+parseFloat(v.paddingBottom)):u=parseFloat(v.borderTopWidth)+parseFloat(v.borderBottomWidth),isNaN(u)&&(u=0),b()}function p(v){{var S=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=S}c.style.overflowY=v}function h(v){for(var S=[];v&&v.parentNode&&v.parentNode instanceof Element;)v.parentNode.scrollTop&&S.push({node:v.parentNode,scrollTop:v.parentNode.scrollTop}),v=v.parentNode;return S}function g(){if(c.scrollHeight!==0){var v=h(c),S=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,v.forEach(function(w){w.node.scrollTop=w.scrollTop}),S&&(document.documentElement.scrollTop=S)}}function b(){g();var v=Math.round(parseFloat(c.style.height)),S=window.getComputedStyle(c,null),w=S.boxSizing==="content-box"?Math.round(parseFloat(S.height)):c.offsetHeight;if(w<v?S.overflowY==="hidden"&&(p("scroll"),g(),w=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):S.overflowY!=="hidden"&&(p("hidden"),g(),w=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==w){f=w;var C=r("autosize:resized");try{c.dispatchEvent(C)}catch{}}}var k=function(){c.clientWidth!==d&&b()},y=function(v){window.removeEventListener("resize",k,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",y,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(v).forEach(function(S){c.style[S]=v[S]}),o.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",y,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",k,!1),c.addEventListener("input",b,!1),c.addEventListener("autosize:update",b,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",o.set(c,{destroy:y,update:b}),m()}function i(c){var u=o.get(c);u&&u.destroy()}function s(c){var u=o.get(c);u&&u.update()}var a=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(a=function(u){return u},a.destroy=function(c){return c},a.update=function(c){return c}):(a=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},a.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},a.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],s),c}),t.default=a,e.exports=t.default})});var VU=te((L3e,DU)=>{var _be=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};DU.exports=_be});var zU=te((M3e,FU)=>{var kM=VU();function Sbe(e){var t=kM(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=kM(e,"line-height"),o=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(o*=4,o/=3):t.indexOf("mm")!==-1?(o*=96,o/=25.4):t.indexOf("cm")!==-1?(o*=96,o/=2.54):t.indexOf("in")!==-1?o*=96:t.indexOf("pc")!==-1&&(o*=16),o=Math.round(o),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML=" ",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=kM(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i);var c=i.offsetHeight;o=c,a.removeChild(i)}return o}FU.exports=Sbe});var UU=te(gl=>{"use strict";var xbe=gl&&gl.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])};return function(t,o){e(t,o);function r(){this.constructor=t}t.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}})(),vM=gl&&gl.__assign||Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},wbe=gl&&gl.__rest||function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(o[r[n]]=e[r[n]]);return o};gl.__esModule=!0;var Bw=Gs(),gv=LU(),Cw=NU(),Cbe=zU(),Bbe=Cbe,jU="autosize:resized",Ebe=(function(e){xbe(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.state={lineHeight:null},o.textarea=null,o.onResize=function(r){o.props.onResize&&o.props.onResize(r)},o.updateLineHeight=function(){o.textarea&&o.setState({lineHeight:Bbe(o.textarea)})},o.onChange=function(r){var n=o.props.onChange;o.currentValue=r.currentTarget.value,n&&n(r)},o}return t.prototype.componentDidMount=function(){var o=this,r=this.props,n=r.maxRows,i=r.async;typeof n=="number"&&this.updateLineHeight(),typeof n=="number"||i?setTimeout(function(){return o.textarea&&Cw(o.textarea)}):this.textarea&&Cw(this.textarea),this.textarea&&this.textarea.addEventListener(jU,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(jU,this.onResize),Cw.destroy(this.textarea))},t.prototype.render=function(){var o=this,r=this,n=r.props,i=n.onResize,s=n.maxRows,a=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=wbe(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,p=s&&m?m*s:null;return Bw.createElement("textarea",vM({},f,{onChange:this.onChange,style:p?vM({},c,{maxHeight:p}):c,ref:function(h){o.textarea=h,typeof o.props.innerRef=="function"?o.props.innerRef(h):o.props.innerRef&&(o.props.innerRef.current=h)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&Cw.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:gv.number,maxRows:gv.number,onResize:gv.func,innerRef:gv.any,async:gv.bool},t})(Bw.Component);gl.TextareaAutosize=Bw.forwardRef(function(e,t){return Bw.createElement(Ebe,vM({},e,{innerRef:t}))})});var _M=te(yM=>{"use strict";yM.__esModule=!0;var Tbe=UU();yM.default=Tbe.TextareaAutosize});var bv=te((z3e,$U)=>{$U.exports=window.wp.warning});var HH=te((nFe,UH)=>{UH.exports=window.ReactDOM});var bC=te((F4e,A8)=>{A8.exports=window.wp.blob});var vl=te((hze,Y8)=>{Y8.exports=window.wp.keyboardShortcuts});var jC=te(()=>{});var UC=te(()=>{});var _N=te(()=>{});var W7=te((O6e,G7)=>{var cye="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",uye=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},dye=(e=21)=>{let t="",o=e|0;for(;o--;)t+=cye[Math.random()*64|0];return t};G7.exports={nanoid:dye,customAlphabet:uye}});var SN=te(()=>{});var K7=te((L6e,xN)=>{var we=String,$7=function(){return{isColorSupported:!1,reset:we,bold:we,dim:we,italic:we,underline:we,inverse:we,hidden:we,strikethrough:we,black:we,red:we,green:we,yellow:we,blue:we,magenta:we,cyan:we,white:we,gray:we,bgBlack:we,bgRed:we,bgGreen:we,bgYellow:we,bgBlue:we,bgMagenta:we,bgCyan:we,bgWhite:we,blackBright:we,redBright:we,greenBright:we,yellowBright:we,blueBright:we,magentaBright:we,cyanBright:we,whiteBright:we,bgBlackBright:we,bgRedBright:we,bgGreenBright:we,bgYellowBright:we,bgBlueBright:we,bgMagentaBright:we,bgCyanBright:we,bgWhiteBright:we}};xN.exports=$7();xN.exports.createColors=$7});var HC=te((M6e,Z7)=>{"use strict";var q7=K7(),Y7=SN(),$v=class e extends Error{constructor(t,o,r,n,i,s){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),s&&(this.plugin=s),typeof o<"u"&&typeof r<"u"&&(typeof o=="number"?(this.line=o,this.column=r):(this.line=o.line,this.column=o.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let o=this.source;t==null&&(t=q7.isColorSupported),Y7&&t&&(o=Y7(o));let r=o.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),s=String(i).length,a,c;if(t){let{bold:u,gray:d,red:f}=q7.createColors(!0);a=m=>u(f(m)),c=m=>d(m)}else a=c=u=>u;return r.slice(n,i).map((u,d)=>{let f=n+1+d,m=" "+(" "+f).slice(-s)+" | ";if(f===this.line){let p=c(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+c(m)+u+` 2 `+p+a("^")}return" "+c(m)+u}).join(` 3 `)}toString(){let t=this.showSourceCode();return t&&(t=` 4 5 `+t+` 6 `),this.name+": "+this.message+t}};Z7.exports=$v;$v.default=$v});var X7=te(()=>{});var t9=te((V6e,e9)=>{"use strict";var{SourceMapConsumer:Q7,SourceMapGenerator:J7}=jC(),{existsSync:fye,readFileSync:mye}=X7(),{dirname:wN,join:pye}=UC();function hye(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Kv=class{constructor(t,o){if(o.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=o.map?o.map.prev:void 0,n=this.loadMap(o.from,r);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=wN(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new Q7(this.text)),this.consumerCache}decodeInline(t){let o=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(n.test(t)||i.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(o.test(t)||r.test(t))return hye(t.substr(RegExp.lastMatch.length));let s=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let o=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let r=t.lastIndexOf(o.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}loadFile(t){if(this.root=wN(t),fye(t))return this.mapFile=t,mye(t,"utf-8").toString().trim()}loadMap(t,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let r=o(t);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(o instanceof Q7)return J7.fromSourceMap(o).toString();if(o instanceof J7)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=pye(wN(t),r)),this.loadFile(r)}}}startWith(t,o){return t?t.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};e9.exports=Kv;Kv.default=Kv});var IN=te((F6e,i9)=>{"use strict";var{SourceMapConsumer:gye,SourceMapGenerator:bye}=jC(),{fileURLToPath:o9,pathToFileURL:GC}=_N(),{isAbsolute:EN,resolve:TN}=UC(),{nanoid:kye}=W7(),CN=SN(),r9=HC(),vye=t9(),BN=Symbol("fromOffsetCache"),yye=!!(gye&&bye),n9=!!(TN&&EN),mh=class{constructor(t,o={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received $t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,o.from&&(!n9||/^\w+:\/\//.test(o.from)||EN(o.from)?this.file=o.from:this.file=TN(o.from)),n9&&yye){let r=new vye(this.css,o);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+kye(6)+">"),this.map&&(this.map.file=this.from)}error(t,o,r,n={}){let i,s,a;if(o&&typeof o=="object"){let u=o,d=r;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,r=f.col}else o=u.line,r=u.column;if(typeof d.offset=="number"){let f=this.fromOffset(d.offset);s=f.line,a=f.col}else s=d.line,a=d.column}else if(!r){let u=this.fromOffset(o);o=u.line,r=u.col}let c=this.origin(o,r,s,a);return c?i=new r9(t,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):i=new r9(t,s===void 0?o:{column:r,line:o},s===void 0?r:{column:a,line:s},this.css,this.file,n.plugin),i.input={column:r,endColumn:a,endLine:s,line:o,source:this.css},this.file&&(GC&&(i.input.url=GC(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[BN])r=this[BN];else{let i=this.css.split(` 7 `);r=new Array(i.length);let s=0;for(let a=0,c=i.length;a<c;a++)r[a]=s,s+=i[a].length+1;this[BN]=r}o=r[r.length-1];let n=0;if(t>=o)n=r.length-1;else{let i=r.length-2,s;for(;n<i;)if(s=n+(i-n>>1),t<r[s])i=s-1;else if(t>=r[s+1])n=s+1;else{n=s;break}}return{col:t-r[n]+1,line:n+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:TN(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,o,r,n){if(!this.map)return!1;let i=this.map.consumer(),s=i.originalPositionFor({column:o,line:t});if(!s.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:n,line:r}));let c;EN(s.source)?c=GC(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||GC(this.map.mapFile));let u={column:s.column,endColumn:a&&a.column,endLine:a&&a.line,line:s.line,url:c.toString()};if(c.protocol==="file:")if(o9)u.file=o9(c);else throw new Error("file: protocol is not available in this PostCSS build");let d=i.sourceContentFor(s.source);return d&&(u.source=d),u}toJSON(){let t={};for(let o of["hasBOM","css","file","id"])this[o]!=null&&(t[o]=this[o]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};i9.exports=mh;mh.default=mh;CN&&CN.registerInput&&CN.registerInput(mh)});var ON=te((z6e,d9)=>{"use strict";var{SourceMapConsumer:a9,SourceMapGenerator:WC}=jC(),{dirname:$C,relative:l9,resolve:c9,sep:u9}=UC(),{pathToFileURL:s9}=_N(),_ye=IN(),Sye=!!(a9&&WC),xye=!!($C&&c9&&l9&&u9),PN=class{constructor(t,o,r,n){this.stringify=t,this.mapOpts=r.map||{},this.root=o,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let o=` 8 `;this.css.includes(`\r 9 `)&&(o=`\r 10 `),this.css+=o+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let o=this.toUrl(this.path(t.file)),r=t.root||$C(t.file),n;this.mapOpts.sourcesContent===!1?(n=new a9(t.text),n.sourcesContent&&(n.sourcesContent=null)):n=t.consumer(),this.map.applySourceMap(n,o,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let o=this.root.nodes.length-1;o>=0;o--)t=this.root.nodes[o],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(o)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),xye&&Sye&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,o=>{t+=o}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=WC.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new WC({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new WC({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,o=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,s;this.stringify(this.root,(a,c,u)=>{if(this.css+=a,c&&u!=="end"&&(n.generated.line=t,n.generated.column=o-1,c.source&&c.source.start?(n.source=this.sourcePath(c),n.original.line=c.source.start.line,n.original.column=c.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=a.match(/\n/g),i?(t+=i.length,s=a.lastIndexOf(` 11 `),o=a.length-s):o+=a.length,c&&u!=="start"){let d=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==d.last||d.raws.semicolon)&&(c.source&&c.source.end?(n.source=this.sourcePath(c),n.original.line=c.source.end.line,n.original.column=c.source.end.column-1,n.generated.line=t,n.generated.column=o-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=t,n.generated.column=o-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(o=>o.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let o=this.memoizedPaths.get(t);if(o)return o;let r=this.opts.to?$C(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=$C(c9(r,this.mapOpts.annotation)));let n=l9(r,t);return this.memoizedPaths.set(t,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let o=t.source.input.map;this.previousMaps.includes(o)||this.previousMaps.push(o)}});else{let t=new _ye(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(o=>{if(o.source){let r=o.source.input.from;if(r&&!t[r]){t[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,o.source.input.css)}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let o=this.memoizedFileURLs.get(t);if(o)return o;if(s9){let r=s9(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let o=this.memoizedURLs.get(t);if(o)return o;u9==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};d9.exports=PN});var RN=te((j6e,m9)=>{"use strict";var f9={after:` 12 `,beforeClose:` 13 `,beforeComment:` 14 `,beforeDecl:` 15 `,beforeOpen:" ",beforeRule:` 16 `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function wye(e){return e[0].toUpperCase()+e.slice(1)}var qv=class{constructor(t){this.builder=t}atrule(t,o){let r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{let i=(t.raws.between||"")+(o?";":"");this.builder(r+n+i,t)}}beforeAfter(t,o){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):o==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let n=t.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(` 17 `)){let s=this.raw(t,null,"indent");if(s.length)for(let a=0;a<i;a++)r+=s}return r}block(t,o){let r=this.raw(t,"between","beforeOpen");this.builder(o+r+"{",t,"start");let n;t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let o=t.nodes.length-1;for(;o>0&&t.nodes[o].type==="comment";)o-=1;let r=this.raw(t,"semicolon");for(let n=0;n<t.nodes.length;n++){let i=t.nodes[n],s=this.raw(i,"before");s&&this.builder(s),this.stringify(i,o!==n||r)}}comment(t){let o=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+o+t.text+r+"*/",t)}decl(t,o){let r=this.raw(t,"between","colon"),n=t.prop+r+this.rawValue(t,"value");t.important&&(n+=t.raws.important||" !important"),o&&(n+=";"),this.builder(n,t)}document(t){this.body(t)}raw(t,o,r){let n;if(r||(r=o),o&&(n=t.raws[o],typeof n<"u"))return n;let i=t.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return f9[r];let s=t.root();if(s.rawCache||(s.rawCache={}),typeof s.rawCache[r]<"u")return s.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let a="raw"+wye(r);this[a]?n=this[a](s,t):s.walk(c=>{if(n=c.raws[o],typeof n<"u")return!1})}return typeof n>"u"&&(n=f9[r]),s.rawCache[r]=n,n}rawBeforeClose(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return o=r.raws.after,o.includes(` 18 `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(t,o){let r;return t.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` 19 `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,o){let r;return t.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` 20 `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let o;return t.walk(r=>{if(r.type!=="decl"&&(o=r.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(t){let o;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return o=r.raws.before,o.includes(` 21 `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(t){let o;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return o=r.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(o=r.raws.after,typeof o<"u"))return!1}),o}rawIndent(t){if(t.raws.indent)return t.raws.indent;let o;return t.walk(r=>{let n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&typeof r.raws.before<"u"){let i=r.raws.before.split(` 22 `);return o=i[i.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(o=r.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(t,o){let r=t[o],n=t.raws[o];return n&&n.value===r?n.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,o){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,o)}};m9.exports=qv;qv.default=qv});var KC=te((U6e,p9)=>{"use strict";var Cye=RN();function AN(e,t){new Cye(t).stringify(e)}p9.exports=AN;AN.default=AN});var LN=te((H6e,g9)=>{"use strict";var h9={};g9.exports=function(t){h9[t]||(h9[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var qC=te((G6e,MN)=>{"use strict";MN.exports.isClean=Symbol("isClean");MN.exports.my=Symbol("my")});var ZC=te((W6e,b9)=>{"use strict";var{isClean:YC,my:Bye}=qC(),Eye=HC(),Tye=RN(),Iye=KC();function NN(e,t){let o=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let n=e[r],i=typeof n;r==="parent"&&i==="object"?t&&(o[r]=t):r==="source"?o[r]=n:Array.isArray(n)?o[r]=n.map(s=>NN(s,o)):(i==="object"&&n!==null&&(n=NN(n)),o[r]=n)}return o}var Yv=class{constructor(t={}){this.raws={},this[YC]=!1,this[Bye]=!0;for(let o in t)if(o==="nodes"){this.nodes=[];for(let r of t[o])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[o]=t[o]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let o=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&$o.input.from}:$o.start.line}:$o.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let o in t)this[o]=t[o];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let o=NN(this);for(let r in t)o[r]=t[r];return o}cloneAfter(t={}){let o=this.clone(t);return this.parent.insertAfter(this,o),o}cloneBefore(t={}){let o=this.clone(t);return this.parent.insertBefore(this,o),o}error(t,o={}){if(this.source){let{end:r,start:n}=this.rangeBy(o);return this.source.input.error(t,{column:n.column,line:n.line},{column:r.column,line:r.line},o)}return new Eye(t)}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:o==="root"?()=>t.root().toProxy():t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&t.markDirty()),!0}}}markDirty(){if(this[YC]){this[YC]=!1;let t=this;for(;t=t.parent;)t[YC]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,o){let r=this.source.start;if(t.index)r=this.positionInside(t.index,o);else if(t.word){o=this.toString();let n=o.indexOf(t.word);n!==-1&&(r=this.positionInside(n,o))}return r}positionInside(t,o){let r=o||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let s=0;s<t;s++)r[s]===` 23 `?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let o={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:o.column+1,line:o.line};if(t.word){let n=this.toString(),i=n.indexOf(t.word);i!==-1&&(o=this.positionInside(i,n),r=this.positionInside(i+t.word.length,n))}else t.start?o={column:t.start.column,line:t.start.line}:t.index&&(o=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<o.line||r.line===o.line&&r.column<=o.column)&&(r={column:o.column+1,line:o.line}),{end:r,start:o}}raw(t,o){return new Tye().raw(this,t,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let o=this,r=!1;for(let n of t)n===this?r=!0:r?(this.parent.insertAfter(o,n),o=n):this.parent.insertBefore(o,n);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,o){let r={},n=o==null;o=o||new Map;let i=0;for(let s in this){if(!Object.prototype.hasOwnProperty.call(this,s)||s==="parent"||s==="proxyCache")continue;let a=this[s];if(Array.isArray(a))r[s]=a.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,o):c);else if(typeof a=="object"&&a.toJSON)r[s]=a.toJSON(null,o);else if(s==="source"){let c=o.get(a.input);c==null&&(c=i,o.set(a.input,i),i++),r[s]={end:a.end,inputId:c,start:a.start}}else r[s]=a}return n&&(r.inputs=[...o.keys()].map(s=>s.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Iye){t.stringify&&(t=t.stringify);let o="";return t(this,r=>{o+=r}),o}warn(t,o,r){let n={node:this};for(let i in r)n[i]=r[i];return t.warn(o,n)}get proxyOf(){return this}};b9.exports=Yv;Yv.default=Yv});var DN=te(($6e,k9)=>{"use strict";var Pye=ZC(),Zv=class extends Pye{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};k9.exports=Zv;Zv.default=Zv});var VN=te((K6e,v9)=>{"use strict";var Oye=ZC(),Xv=class extends Oye{constructor(t){super(t),this.type="comment"}};v9.exports=Xv;Xv.default=Xv});var Pf=te((q6e,T9)=>{"use strict";var{isClean:y9,my:_9}=qC(),S9=DN(),x9=VN(),Rye=ZC(),w9,FN,zN,C9;function B9(e){return e.map(t=>(t.nodes&&(t.nodes=B9(t.nodes)),delete t.source,t))}function E9(e){if(e[y9]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)E9(t)}var ss=class e extends Rye{append(...t){for(let o of t){let r=this.normalize(o,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let o of this.nodes)o.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let o=this.getIterator(),r,n;for(;this.indexes[o]<this.proxyOf.nodes.length&&(r=this.indexes[o],n=t(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[o]+=1;return delete this.indexes[o],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:t[o]?o==="each"||typeof o=="string"&&o.startsWith("walk")?(...r)=>t[o](...r.map(n=>typeof n=="function"?(i,s)=>n(i.toProxy(),s):n)):o==="every"||o==="some"?r=>t[o]((n,...i)=>r(n.toProxy(),...i)):o==="root"?()=>t.root().toProxy():o==="nodes"?t.nodes.map(r=>r.toProxy()):o==="first"||o==="last"?t[o].toProxy():t[o]:t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="name"||o==="params"||o==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,o){let r=this.index(t),n=this.normalize(o,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let s of n)this.proxyOf.nodes.splice(r+1,0,s);let i;for(let s in this.indexes)i=this.indexes[s],r<i&&(this.indexes[s]=i+n.length);return this.markDirty(),this}insertBefore(t,o){let r=this.index(t),n=r===0?"prepend":!1,i=this.normalize(o,this.proxyOf.nodes[r],n).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}normalize(t,o){if(typeof t=="string")t=B9(w9(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let n of t)n.parent&&n.parent.removeChild(n,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let n of t)n.parent&&n.parent.removeChild(n,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new S9(t)]}else if(t.selector)t=[new FN(t)];else if(t.name)t=[new zN(t)];else if(t.text)t=[new x9(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[_9]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[y9]&&E9(n),typeof n.raws.before>"u"&&o&&typeof o.raws.before<"u"&&(n.raws.before=o.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...t){t=t.reverse();for(let o of t){let r=this.normalize(o,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let o;for(let r in this.indexes)o=this.indexes[r],o>=t&&(this.indexes[r]=o-1);return this.markDirty(),this}replaceValues(t,o,r){return r||(r=o,o={}),this.walkDecls(n=>{o.props&&!o.props.includes(n.prop)||o.fast&&!n.value.includes(o.fast)||(n.value=n.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((o,r)=>{let n;try{n=t(o,r)}catch(i){throw o.addToError(i)}return n!==!1&&o.walk&&(n=o.walk(t)),n})}walkAtRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&t.test(r.name))return o(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="atrule")return o(r,n)}))}walkComments(t){return this.walk((o,r)=>{if(o.type==="comment")return t(o,r)})}walkDecls(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&t.test(r.prop))return o(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="decl")return o(r,n)}))}walkRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&t.test(r.selector))return o(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="rule")return o(r,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ss.registerParse=e=>{w9=e};ss.registerRule=e=>{FN=e};ss.registerAtRule=e=>{zN=e};ss.registerRoot=e=>{C9=e};T9.exports=ss;ss.default=ss;ss.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,zN.prototype):e.type==="rule"?Object.setPrototypeOf(e,FN.prototype):e.type==="decl"?Object.setPrototypeOf(e,S9.prototype):e.type==="comment"?Object.setPrototypeOf(e,x9.prototype):e.type==="root"&&Object.setPrototypeOf(e,C9.prototype),e[_9]=!0,e.nodes&&e.nodes.forEach(t=>{ss.rebuild(t)})}});var O9=te((Y6e,P9)=>{"use strict";var XC=/[\t\n\f\r "#'()/;[\\\]{}]/g,QC=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Aye=/.[\r\n"'(/\\]/,I9=/[\da-f]/i;P9.exports=function(t,o={}){let r=t.css.valueOf(),n=o.ignoreErrors,i,s,a,c,u,d,f,m,p,h,g=r.length,b=0,k=[],y=[];function v(){return b}function S(P){throw t.error("Unclosed "+P,b)}function w(){return y.length===0&&b>=g}function C(P){if(y.length)return y.pop();if(b>=g)return;let R=P?P.ignoreUnclosed:!1;switch(i=r.charCodeAt(b),i){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,i=r.charCodeAt(s);while(i===32||i===10||i===9||i===13||i===12);h=["space",r.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let B=String.fromCharCode(i);h=[B,B,b];break}case 40:{if(m=k.length?k.pop()[1]:"",p=r.charCodeAt(b+1),m==="url"&&p!==39&&p!==34&&p!==32&&p!==10&&p!==9&&p!==12&&p!==13){s=b;do{if(d=!1,s=r.indexOf(")",s+1),s===-1)if(n||R){s=b;break}else S("bracket");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);h=["brackets",r.slice(b,s+1),b,s],b=s}else s=r.indexOf(")",b+1),c=r.slice(b,s+1),s===-1||Aye.test(c)?h=["(","(",b]:(h=["brackets",c,b,s],b=s);break}case 39:case 34:{a=i===39?"'":'"',s=b;do{if(d=!1,s=r.indexOf(a,s+1),s===-1)if(n||R){s=b+1;break}else S("string");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);h=["string",r.slice(b,s+1),b,s],b=s;break}case 64:{XC.lastIndex=b+1,XC.test(r),XC.lastIndex===0?s=r.length-1:s=XC.lastIndex-2,h=["at-word",r.slice(b,s+1),b,s],b=s;break}case 92:{for(s=b,u=!0;r.charCodeAt(s+1)===92;)s+=1,u=!u;if(i=r.charCodeAt(s+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(s+=1,I9.test(r.charAt(s)))){for(;I9.test(r.charAt(s+1));)s+=1;r.charCodeAt(s+1)===32&&(s+=1)}h=["word",r.slice(b,s+1),b,s],b=s;break}default:{i===47&&r.charCodeAt(b+1)===42?(s=r.indexOf("*/",b+2)+1,s===0&&(n||R?s=r.length:S("comment")),h=["comment",r.slice(b,s+1),b,s],b=s):(QC.lastIndex=b+1,QC.test(r),QC.lastIndex===0?s=r.length-1:s=QC.lastIndex-2,h=["word",r.slice(b,s+1),b,s],k.push(h),b=s);break}}return b++,h}function E(P){y.push(P)}return{back:E,endOfFile:w,nextToken:C,position:v}}});var L9=te((Z6e,A9)=>{"use strict";var R9=Pf(),ph=class extends R9{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};A9.exports=ph;ph.default=ph;R9.registerAtRule(ph)});var JC=te((X6e,V9)=>{"use strict";var M9=Pf(),N9,D9,fu=class extends M9{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,o,r){let n=super.normalize(t);if(o){if(r==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let i of n)i.raws.before=o.raws.before}return n}removeChild(t,o){let r=this.index(t);return!o&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new N9(new D9,this,t).stringify()}};fu.registerLazyResult=e=>{N9=e};fu.registerProcessor=e=>{D9=e};V9.exports=fu;fu.default=fu;M9.registerRoot(fu)});var z9=te((Q6e,F9)=>{"use strict";var Qv={comma(e){return Qv.split(e,[","],!0)},space(e){let t=[" ",` 24 `," "];return Qv.split(e,t)},split(e,t,o){let r=[],n="",i=!1,s=0,a=!1,c="",u=!1;for(let d of e)u?u=!1:d==="\\"?u=!0:a?d===c&&(a=!1):d==='"'||d==="'"?(a=!0,c=d):d==="("?s+=1:d===")"?s>0&&(s-=1):s===0&&t.includes(d)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=d;return(o||n!=="")&&r.push(n.trim()),r}};F9.exports=Qv;Qv.default=Qv});var H9=te((J6e,U9)=>{"use strict";var j9=Pf(),Lye=z9(),hh=class extends j9{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Lye.comma(this.selector)}set selectors(t){let o=this.selector?this.selector.match(/,\s*/):null,r=o?o[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};U9.exports=hh;hh.default=hh;j9.registerRule(hh)});var K9=te((eje,$9)=>{"use strict";var Mye=DN(),Nye=O9(),Dye=VN(),Vye=L9(),Fye=JC(),G9=H9(),W9={empty:!0,space:!0};function zye(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var jN=class{constructor(t){this.input=t,this.root=new Fye,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let o=new Vye;o.name=t[1].slice(1),o.name===""&&this.unnamedAtrule(o,t),this.init(o,t[2]);let r,n,i,s=!1,a=!1,c=[],u=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(c.length>0){for(i=c.length-1,n=c[i];n&&n[0]==="space";)n=c[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(o.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(o,"params",c),s&&(t=c[c.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(t){let o=this.colon(t);if(o===!1)return;let r=0,n;for(let i=o-1;i>=0&&(n=t[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(t){let o=0,r,n,i;for(let[s,a]of t.entries()){if(r=a,n=r[0],n==="("&&(o+=1),n===")"&&(o-=1),o===0&&n===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return s}i=r}return!1}comment(t){let o=new Dye;this.init(o,t[2]),o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))o.text="",o.raws.left=r,o.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);o.text=n[2],o.raws.left=n[1],o.raws.right=n[3]}}createTokenizer(){this.tokenizer=Nye(this.input)}decl(t,o){let r=new Mye;this.init(r,t[0][2]);let n=t[t.length-1];for(n[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(n[3]||n[2]||zye(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let u=t[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let s=[],a;for(;t.length&&(a=t[0][0],!(a!=="space"&&a!=="comment"));)s.push(t.shift());this.precheckMissedSemicolon(t);for(let u=t.length-1;u>=0;u--){if(i=t[u],i[1].toLowerCase()==="!important"){r.important=!0;let d=this.stringFrom(t,u);d=this.spacesFromEnd(t)+d,d!==" !important"&&(r.raws.important=d);break}else if(i[1].toLowerCase()==="important"){let d=t.slice(0),f="";for(let m=u;m>0;m--){let p=d[m][0];if(f.trim().indexOf("!")===0&&p!=="space")break;f=d.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,t=d)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=s.map(u=>u[1]).join(""),s=[]),this.raw(r,"value",s.concat(t),o),r.value.includes(":")&&!o&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let o=new G9;this.init(o,t[2]),o.selector="",o.raws.between="",this.current=o}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let o=this.current.nodes[this.current.nodes.length-1];o&&o.type==="rule"&&!o.raws.ownSemicolon&&(o.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let o=this.input.fromOffset(t);return{column:o.col,line:o.line,offset:t}}init(t,o){this.current.push(t),t.source={input:this.input,start:this.getPosition(o)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let o=!1,r=null,n=!1,i=null,s=[],a=t[1].startsWith("--"),c=[],u=t;for(;u;){if(r=u[0],c.push(u),r==="("||r==="[")i||(i=u),s.push(r==="("?")":"]");else if(a&&n&&r==="{")i||(i=u),s.push("}");else if(s.length===0)if(r===";")if(n){this.decl(c,a);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),o=!0;break}else r===":"&&(n=!0);else r===s[s.length-1]&&(s.pop(),s.length===0&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(o=!0),s.length>0&&this.unclosedBracket(i),o&&n){if(!a)for(;c.length&&(u=c[c.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,a)}else this.unknownWord(c)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,o,r,n){let i,s,a=r.length,c="",u=!0,d,f;for(let m=0;m<a;m+=1)i=r[m],s=i[0],s==="space"&&m===a-1&&!n?u=!1:s==="comment"?(f=r[m-1]?r[m-1][0]:"empty",d=r[m+1]?r[m+1][0]:"empty",!W9[f]&&!W9[d]?c.slice(-1)===","?u=!1:c+=i[1]:u=!1):c+=i[1];if(!u){let m=r.reduce((p,h)=>p+h[1],"");t.raws[o]={raw:m,value:c}}t[o]=c}rule(t){t.pop();let o=new G9;this.init(o,t[0][2]),o.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(o,"selector",t),this.current=o}spacesAndCommentsFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],!(o!=="space"&&o!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let o,r="";for(;t.length&&(o=t[0][0],!(o!=="space"&&o!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],o==="space");)r=t.pop()[1]+r;return r}stringFrom(t,o){let r="";for(let n=o;n<t.length;n++)r+=t[n][1];return t.splice(o,t.length-o),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,o){throw this.input.error("At-rule without name",{offset:o[2]},{offset:o[2]+o[1].length})}};$9.exports=jN});var UN=te((tje,q9)=>{"use strict";var jye=Pf(),Uye=K9(),Hye=IN();function e1(e,t){let o=new Hye(e,t),r=new Uye(o);try{r.parse()}catch(n){throw n}return r.root}q9.exports=e1;e1.default=e1;jye.registerParse(e1)});var Z9=te((oje,Y9)=>{"use strict";var Jv=class{constructor(t,o={}){if(this.type="warning",this.text=t,o.node&&o.node.source){let r=o.node.rangeBy(o);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in o)this[r]=o[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Y9.exports=Jv;Jv.default=Jv});var HN=te((rje,X9)=>{"use strict";var Gye=Z9(),ey=class{constructor(t,o,r){this.processor=t,this.messages=[],this.root=o,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,o={}){o.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(o.plugin=this.lastPlugin.postcssPlugin);let r=new Gye(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};X9.exports=ey;ey.default=ey});var J9=te((ije,Q9)=>{"use strict";var Wye=ON(),$ye=KC(),nje=LN(),Kye=UN(),qye=HN(),ty=class{constructor(t,o,r){o=o.toString(),this.stringified=!1,this._processor=t,this._css=o,this._opts=r,this._map=void 0;let n,i=$ye;this.result=new qye(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new Wye(i,n,this._opts,o);if(a.isMap()){let[c,u]=a.generate();c&&(this.result.css=c),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,o){return this.async().then(t,o)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,o=Kye;try{t=o(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};Q9.exports=ty;ty.default=ty});var GN=te((sje,oG)=>{"use strict";var Yye=Pf(),eG,tG,Of=class extends Yye{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new eG(new tG,this,t).stringify()}};Of.registerLazyResult=e=>{eG=e};Of.registerProcessor=e=>{tG=e};oG.exports=Of;Of.default=Of});var aG=te((lje,sG)=>{"use strict";var{isClean:Zs,my:Zye}=qC(),Xye=ON(),Qye=KC(),Jye=Pf(),e_e=GN(),aje=LN(),rG=HN(),t_e=UN(),o_e=JC(),r_e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},n_e={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},i_e={Once:!0,postcssPlugin:!0,prepare:!0},gh=0;function oy(e){return typeof e=="object"&&typeof e.then=="function"}function iG(e){let t=!1,o=r_e[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,gh,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,gh,o+"Exit"]:[o,o+"Exit"]}function nG(e){let t;return e.type==="document"?t=["Document",gh,"DocumentExit"]:e.type==="root"?t=["Root",gh,"RootExit"]:t=iG(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function WN(e){return e[Zs]=!1,e.nodes&&e.nodes.forEach(t=>WN(t)),e}var $N={},mu=class e{constructor(t,o,r){this.stringified=!1,this.processed=!1;let n;if(typeof o=="object"&&o!==null&&(o.type==="root"||o.type==="document"))n=WN(o);else if(o instanceof e||o instanceof rG)n=WN(o.root),o.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=o.map);else{let i=t_e;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(o,r)}catch(s){this.processed=!0,this.error=s}n&&!n[Zye]&&Jye.rebuild(n)}this.result=new rG(t,n,r),this.helpers={...$N,postcss:$N,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,o){let r=this.result.lastPlugin;try{o&&o.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(n){console&&console.error&&console.error(n)}return t}prepareVisitors(){this.listeners={};let t=(o,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([o,n])};for(let o of this.plugins)if(typeof o=="object")for(let r in o){if(!n_e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event $r} in $o.postcssPlugin}. Try to update PostCSS ($this.processor.version} now).`);if(!i_e[r])if(typeof o[r]=="object")for(let n in o[r])n==="*"?t(o,r,o[r][n]):t(o,r+"-"+n.toLowerCase(),o[r][n]);else typeof o[r]=="function"&&t(o,r,o[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let o=this.plugins[t],r=this.runOnRoot(o);if(oy(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Zs];){t[Zs]=!0;let o=[nG(t)];for(;o.length>0;){let r=this.visitTick(o);if(oy(r))try{await r}catch(n){let i=o[o.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[o,r]of this.listeners.OnceExit){this.result.lastPlugin=o;try{if(t.type==="document"){let n=t.nodes.map(i=>r(i,this.helpers));await Promise.all(n)}else await r(t,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let o=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return oy(o[0])?Promise.all(o):o}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(o){throw this.handleError(o)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,o=Qye;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new Xye(o,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let o=this.runOnRoot(t);if(oy(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Zs];)t[Zs]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let o of t.nodes)this.visitSync(this.listeners.OnceExit,o);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,o){return this.async().then(t,o)}toString(){return this.css}visitSync(t,o){for(let[r,n]of t){this.result.lastPlugin=r;let i;try{i=n(o,this.helpers)}catch(s){throw this.handleError(s,o.proxyOf)}if(o.type!=="root"&&o.type!=="document"&&!o.parent)return!0;if(oy(i))throw this.getAsyncError()}}visitTick(t){let o=t[t.length-1],{node:r,visitors:n}=o;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(n.length>0&&o.visitorIndex<n.length){let[s,a]=n[o.visitorIndex];o.visitorIndex+=1,o.visitorIndex===n.length&&(o.visitors=[],o.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(o.iterator!==0){let s=o.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Zs]){a[Zs]=!0,t.push(nG(a));return}o.iterator=0,delete r.indexes[s]}let i=o.events;for(;o.eventIndex<i.length;){let s=i[o.eventIndex];if(o.eventIndex+=1,s===gh){r.nodes&&r.nodes.length&&(r[Zs]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[Zs]=!0;let o=iG(t);for(let r of o)if(r===gh)t.nodes&&t.each(n=>{n[Zs]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};mu.registerPostcss=e=>{$N=e};sG.exports=mu;mu.default=mu;o_e.registerLazyResult(mu);e_e.registerLazyResult(mu)});var cG=te((cje,lG)=>{"use strict";var s_e=J9(),a_e=aG(),l_e=GN(),c_e=JC(),Rf=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let o=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))o=o.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)o.push(r);else if(typeof r=="function")o.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return o}process(t,o={}){return!this.plugins.length&&!o.parser&&!o.stringifier&&!o.syntax?new s_e(this,t,o):new a_e(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};lG.exports=Rf;Rf.default=Rf;c_e.registerProcessor(Rf);l_e.registerProcessor(Rf)});var fG=te((uje,dG)=>{dG.exports=function(t){let o=t.prefix,r=/\s+$/.test(o)?o:`$o} `,n=t.ignoreFiles?[].concat(t.ignoreFiles):[],i=t.includeFiles?[].concat(t.includeFiles):[];return function(s){n.length&&s.source.input.file&&uG(s.source.input.file,n)||i.length&&s.source.input.file&&!uG(s.source.input.file,i)||s.walkRules(a=>{let c=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];a.parent&&c.includes(a.parent.name)||(a.selectors=a.selectors.map(u=>t.exclude&&u_e(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function uG(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function u_e(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var pG=te((dje,mG)=>{var KN=40,qN=41,t1=39,YN=34,ZN=92,bh=47,XN=44,QN=58,o1=42,d_e=117,f_e=85,m_e=43,p_e=/^[a-f0-9?-]+$/i;mG.exports=function(e){for(var t=[],o=e,r,n,i,s,a,c,u,d,f=0,m=o.charCodeAt(f),p=o.length,h=[{nodes:t}],g=0,b,k="",y="",v="";f<p;)if(m<=32){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);s=o.slice(f,r),i=t[t.length-1],m===qN&&g?v=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===XN||m===QN||m===bh&&o.charCodeAt(r+1)!==o1&&(!b||b&&b.type==="function"&&b.value!=="calc")?y=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(m===t1||m===YN){r=f,n=m===t1?"'":'"',s={type:"string",sourceIndex:f,quote:n};do if(a=!1,r=o.indexOf(n,r+1),~r)for(c=r;o.charCodeAt(c-1)===ZN;)c-=1,a=!a;else o+=n,r=o.length-1,s.unclosed=!0;while(a);s.value=o.slice(f+1,r),s.sourceEndIndex=s.unclosed?r:r+1,t.push(s),f=r+1,m=o.charCodeAt(f)}else if(m===bh&&o.charCodeAt(f+1)===o1)r=o.indexOf("*/",f),s={type:"comment",sourceIndex:f,sourceEndIndex:r+2},r===-1&&(s.unclosed=!0,r=o.length,s.sourceEndIndex=r),s.value=o.slice(f+2,r),t.push(s),f=r+2,m=o.charCodeAt(f);else if((m===bh||m===o1)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-y.length,sourceEndIndex:f+s.length,value:s}),f+=1,m=o.charCodeAt(f);else if(m===bh||m===XN||m===QN)s=o[f],t.push({type:"div",sourceIndex:f-y.length,sourceEndIndex:f+s.length,value:s,before:y,after:""}),y="",f+=1,m=o.charCodeAt(f);else if(KN===m){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);if(d=f,s={type:"function",sourceIndex:f-k.length,value:k,before:o.slice(d+1,r)},f=r,k==="url"&&m!==t1&&m!==YN){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===ZN;)c-=1,a=!a;else o+=")",r=o.length-1,s.unclosed=!0;while(a);u=r;do u-=1,m=o.charCodeAt(u);while(m<=32);d<u?(f!==u+1?s.nodes=[{type:"word",sourceIndex:f,sourceEndIndex:u+1,value:o.slice(f,u+1)}]:s.nodes=[],s.unclosed&&u+1!==r?(s.after="",s.nodes.push({type:"space",sourceIndex:u+1,sourceEndIndex:r,value:o.slice(u+1,r)})):(s.after=o.slice(u+1,r),s.sourceEndIndex=r)):(s.after="",s.nodes=[]),f=r+1,s.sourceEndIndex=s.unclosed?r:f,m=o.charCodeAt(f),t.push(s)}else g+=1,s.after="",s.sourceEndIndex=f+1,t.push(s),h.push(s),t=s.nodes=[],b=s;k=""}else if(qN===m&&g)f+=1,m=o.charCodeAt(f),b.after=v,b.sourceEndIndex+=v.length,v="",g-=1,h[h.length-1].sourceEndIndex=f,h.pop(),b=h[g],t=b.nodes;else{r=f;do m===ZN&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<p&&!(m<=32||m===t1||m===YN||m===XN||m===QN||m===bh||m===KN||m===o1&&b&&b.type==="function"&&b.value==="calc"||m===bh&&b.type==="function"&&b.value==="calc"||m===qN&&g));s=o.slice(f,r),KN===m?k=s:(d_e===s.charCodeAt(0)||f_e===s.charCodeAt(0))&&m_e===s.charCodeAt(1)&&p_e.test(s.slice(2))?t.push({type:"unicode-range",sourceIndex:f,sourceEndIndex:r,value:s}):t.push({type:"word",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}for(f=h.length-1;f;f-=1)h[f].unclosed=!0,h[f].sourceEndIndex=o.length;return h[0].nodes}});var gG=te((fje,hG)=>{hG.exports=function e(t,o,r){var n,i,s,a;for(n=0,i=t.length;n<i;n+=1)s=t[n],r||(a=o(s,n,t)),a!==!1&&s.type==="function"&&Array.isArray(s.nodes)&&e(s.nodes,o,r),r&&o(s,n,t)}});var yG=te((mje,vG)=>{function bG(e,t){var o=e.type,r=e.value,n,i;return t&&(i=t(e))!==void 0?i:o==="word"||o==="space"?r:o==="string"?(n=e.quote||"",n+r+(e.unclosed?"":n)):o==="comment"?"/*"+r+(e.unclosed?"":"*/"):o==="div"?(e.before||"")+r+(e.after||""):Array.isArray(e.nodes)?(n=kG(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function kG(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=bG(e[r],t)+o;return o}return bG(e,t)}vG.exports=kG});var SG=te((pje,_G)=>{var r1=45,n1=43,JN=46,h_e=101,g_e=69;function b_e(e){var t=e.charCodeAt(0),o;if(t===n1||t===r1){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===JN&&r>=48&&r<=57}return t===JN?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}_G.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!b_e(e))return!1;for(r=e.charCodeAt(t),(r===n1||r===r1)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===JN&&n>=48&&n<=57)for(t+=2;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),i=e.charCodeAt(t+2),(r===h_e||r===g_e)&&(n>=48&&n<=57||(n===n1||n===r1)&&i>=48&&i<=57))for(t+=n===n1||n===r1?3:2;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;return{number:e.slice(0,t),unit:e.slice(t)}}});var BG=te((hje,CG)=>{var k_e=pG(),xG=gG(),wG=yG();function pu(e){return this instanceof pu?(this.nodes=k_e(e),this):new pu(e)}pu.prototype.toString=function(){return Array.isArray(this.nodes)?wG(this.nodes):""};pu.prototype.walk=function(e,t){return xG(this.nodes,e,t),this};pu.unit=SG();pu.walk=xG;pu.stringify=wG;CG.exports=pu});var TG=te((gje,eD)=>{var EG=BG();eD.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=EG(r.value),i=!1;n.walk(s=>{if(s.type!=="function"||s.value!=="url")return;let a=s.nodes[0].value,c=new URL(a,e.rootUrl);return c.pathname===a&&o.skipHostRelativeUrls||(s.nodes[0].value=c.toString(),i=!0),!1}),i&&(r.value=EG.stringify(n))}}};eD.exports.postcss=!0});var jG=te((Pje,zG)=>{zG.exports=window.wp.priorityQueue});var yy=te((H7e,$$)=>{$$.exports=window.wp.isShallowEqual});var fE=te((bKe,WY)=>{WY.exports=window.wp.tokenList});var y5=te((IKe,sZ)=>{"use strict";var qxe=function(t){return Yxe(t)&&!Zxe(t)};function Yxe(e){return!!e&&typeof e=="object"}function Zxe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Jxe(e)}var Xxe=typeof Symbol=="function"&&Symbol.for,Qxe=Xxe?Symbol.for("react.element"):60103;function Jxe(e){return e.$$typeof===Qxe}function ewe(e){return Array.isArray(e)?[]:{}}function Hy(e,t){return t.clone!==!1&&t.isMergeableObject(e)?sg(ewe(e),e,t):e}function twe(e,t,o){return e.concat(t).map(function(r){return Hy(r,o)})}function owe(e,t){if(!t.customMerge)return sg;var o=t.customMerge(e);return typeof o=="function"?o:sg}function rwe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function nZ(e){return Object.keys(e).concat(rwe(e))}function iZ(e,t){try{return t in e}catch{return!1}}function nwe(e,t){return iZ(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function iwe(e,t,o){var r={};return o.isMergeableObject(e)&&nZ(e).forEach(function(n){r[n]=Hy(e[n],o)}),nZ(t).forEach(function(n){nwe(e,n)||(iZ(e,n)&&o.isMergeableObject(t[n])?r[n]=owe(n,o)(e[n],t[n],o):r[n]=Hy(t[n],o))}),r}function sg(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||twe,o.isMergeableObject=o.isMergeableObject||qxe,o.cloneUnlessOtherwiseSpecified=Hy;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):iwe(e,t,o):Hy(t,o)}sg.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return sg(r,n,o)},{})};var swe=sg;sZ.exports=swe});var mX=te((KYe,fX)=>{fX.exports=window.wp.commands});var Qu=te((vJe,IJ)=>{IJ.exports=window.wp.date});var lee=te((set,aee)=>{var oee=!1,hm,pV,hV,wT,CT,ree,BT,gV,bV,kV,nee,vV,yV,iee,see;function mn(){if(!oee){oee=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(vV=/\b(iPhone|iP[ao]d)/.exec(e),yV=/\b(iP[ao]d)/.exec(e),kV=/Android/i.exec(e),iee=/FBAN\/\w+;/i.exec(e),see=/Mobile/i.exec(e),nee=!!/Win64/.exec(e),t){hm=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,hm&&document&&document.documentMode&&(hm=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);ree=r?parseFloat(r[1])+4:hm,pV=t[2]?parseFloat(t[2]):NaN,hV=t[3]?parseFloat(t[3]):NaN,wT=t[4]?parseFloat(t[4]):NaN,wT?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),CT=t&&t[1]?parseFloat(t[1]):NaN):CT=NaN}else hm=pV=hV=CT=wT=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);BT=n?parseFloat(n[1].replace("_",".")):!0}else BT=!1;gV=!!o[2],bV=!!o[3]}else BT=gV=bV=!1}}var _V={ie:function(){return mn()||hm},ieCompatibilityMode:function(){return mn()||ree>hm},ie64:function(){return _V.ie()&&nee},firefox:function(){return mn()||pV},opera:function(){return mn()||hV},webkit:function(){return mn()||wT},safari:function(){return _V.webkit()},chrome:function(){return mn()||CT},windows:function(){return mn()||gV},osx:function(){return mn()||BT},linux:function(){return mn()||bV},iphone:function(){return mn()||vV},mobile:function(){return mn()||vV||yV||kV||see},nativeApp:function(){return mn()||iee},android:function(){return mn()||kV},ipad:function(){return mn()||yV}};aee.exports=_V});var uee=te((aet,cee)=>{"use strict";var ET=!!(typeof window<"u"&&window.document&&window.document.createElement),XCe={canUseDOM:ET,canUseWorkers:typeof Worker<"u",canUseEventListeners:ET&&!!(window.addEventListener||window.attachEvent),canUseViewport:ET&&!!window.screen,isInWorker:!ET};cee.exports=XCe});var pee=te((cet,mee)=>{"use strict";var dee=uee(),fee;dee.canUseDOM&&(fee=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function QCe(e,t){if(!dee.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,r=o in document;if(!r){var n=document.createElement("div");n.setAttribute(o,"return;"),r=typeof n[o]=="function"}return!r&&fee&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}mee.exports=QCe});var yee=te((uet,vee)=>{"use strict";var JCe=lee(),e1e=pee(),hee=10,gee=40,bee=800;function kee(e){var t=0,o=0,r=0,n=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),r=t*hee,n=o*hee,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=gee,n*=gee):(r*=bee,n*=bee)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}kee.getEventType=function(){return JCe.firefox()?"DOMMouseScroll":e1e("wheel")?"wheel":"mousewheel"};vee.exports=kee});var See=te((det,_ee)=>{_ee.exports=yee()});var Xte=te((Jtt,Zte)=>{"use strict";Zte.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var vOe={};Ns(vOe,{AlignmentControl:()=>qx,AlignmentToolbar:()=>U6,Autocomplete:()=>pj,BlockAlignmentControl:()=>dw,BlockAlignmentToolbar:()=>Nj,BlockBindingsAttributeControl:()=>dv,BlockBindingsSourceFieldsList:()=>uv,BlockBreadcrumb:()=>iU,BlockCanvas:()=>bX,BlockColorsStyleSelector:()=>_X,BlockContextProvider:()=>wS,BlockControls:()=>mt,BlockEdit:()=>jx,BlockEditorKeyboardShortcuts:()=>CC,BlockEditorProvider:()=>n7,BlockFormatControls:()=>ZD,BlockIcon:()=>Pe,BlockInspector:()=>Dle,BlockList:()=>vh,BlockMover:()=>BB,BlockNavigationDropdown:()=>OQ,BlockPopover:()=>T$,BlockPreview:()=>nn,BlockSelectionClearer:()=>j$,BlockSettingsMenu:()=>iE,BlockSettingsMenuControls:()=>eE,BlockStyles:()=>Bg,BlockTitle:()=>mv,BlockToolbar:()=>QZ,BlockTools:()=>Xy,BlockVerticalAlignmentControl:()=>aw,BlockVerticalAlignmentToolbar:()=>tJ,ButtonBlockAppender:()=>Cu,ButtonBlockerAppender:()=>k$,ColorPalette:()=>xJ,ColorPaletteControl:()=>BJ,ContrastChecker:()=>sT,CopyHandler:()=>zle,DefaultBlockAppender:()=>Nh,DimensionControl:()=>Ng,FontSizePicker:()=>KL,HeadingLevelDropdown:()=>UQ,HeightControl:()=>tee,InnerBlocks:()=>Sy,Inserter:()=>bi,InspectorAdvancedControls:()=>Pu,InspectorControls:()=>he,JustifyContentControl:()=>Fp,JustifyToolbar:()=>dte,LineHeightControl:()=>YT,LinkControl:()=>sd,MediaPlaceholder:()=>Roe,MediaReplaceFlow:()=>Yg,MediaUpload:()=>Su,MediaUploadCheck:()=>ds,MultiSelectScrollIntoView:()=>Gle,NavigableToolbar:()=>tg,ObserveTyping:()=>fK,PanelColorSettings:()=>Loe,PlainText:()=>Lre,RecursionProvider:()=>vF,RichText:()=>Jg,RichTextShortcut:()=>i3,RichTextToolbarButton:()=>a3,SETTINGS_DEFAULTS:()=>pk,SkipToSelectedBlock:()=>EI,ToolSelector:()=>rce,Typewriter:()=>qle,URLInput:()=>nd,URLInputButton:()=>Hre,URLPopover:()=>cd,Warning:()=>jc,WritingFlow:()=>DC,__experimentalBlockAlignmentMatrixControl:()=>Xj,__experimentalBlockFullHeightAligmentControl:()=>Kj,__experimentalBlockPatternSetup:()=>QQ,__experimentalBlockPatternsList:()=>Qs,__experimentalBlockVariationPicker:()=>HQ,__experimentalBlockVariationTransforms:()=>JE,__experimentalBorderRadiusControl:()=>nT,__experimentalColorGradientControl:()=>Xu,__experimentalColorGradientSettingsDropdown:()=>yT,__experimentalDateFormatPicker:()=>PJ,__experimentalDuotoneControl:()=>lT,__experimentalFontAppearanceControl:()=>uT,__experimentalFontFamilyControl:()=>dT,__experimentalGetBorderClassesAndStyles:()=>K2,__experimentalGetColorClassesAndStyles:()=>q2,__experimentalGetElementClassName:()=>gOe,__experimentalGetGapCSSValue:()=>Tr,__experimentalGetGradientClass:()=>Ap,__experimentalGetGradientObjectByGradientValue:()=>R6,__experimentalGetShadowClassesAndStyles:()=>k4,__experimentalGetSpacingClassesAndStyles:()=>_4,__experimentalImageEditor:()=>nte,__experimentalImageSizeControl:()=>lte,__experimentalImageURLInputUI:()=>Zre,__experimentalInspectorPopoverHeader:()=>h2,__experimentalLetterSpacingControl:()=>mT,__experimentalLibrary:()=>Ule,__experimentalLinkControl:()=>qT,__experimentalLinkControlSearchInput:()=>Nte,__experimentalLinkControlSearchItem:()=>xte,__experimentalLinkControlSearchResults:()=>Ite,__experimentalListView:()=>qE,__experimentalPanelColorGradientSettings:()=>ST,__experimentalPreviewOptions:()=>fne,__experimentalPublishDateTimePicker:()=>Jle,__experimentalRecursionProvider:()=>Yle,__experimentalResponsiveBlockControl:()=>Fre,__experimentalSpacingSizesControl:()=>cb,__experimentalTextDecorationControl:()=>hT,__experimentalTextTransformControl:()=>bT,__experimentalUnitControl:()=>jre,__experimentalUseBlockOverlayActive:()=>aU,__experimentalUseBlockPreview:()=>$G,__experimentalUseBorderProps:()=>b4,__experimentalUseColorProps:()=>y4,__experimentalUseCustomSides:()=>KF,__experimentalUseGradient:()=>rge,__experimentalUseHasRecursion:()=>Zle,__experimentalUseMultipleOriginColorsAndGradients:()=>ed,__experimentalUseResizeCanvas:()=>mne,__experimentalWritingModeControl:()=>vT,__unstableBlockSettingsMenuFirstItem:()=>NB,__unstableBlockToolbarLastItem:()=>OB,__unstableEditorStyles:()=>_l,__unstableIframe:()=>fh,__unstableInserterMenuExtension:()=>P1,__unstableRichTextInputEvent:()=>l3,__unstableUseBlockSelectionClearer:()=>Hf,__unstableUseClipboardHandler:()=>Fle,__unstableUseMouseMoveTypingReset:()=>wy,__unstableUseTypewriter:()=>gF,__unstableUseTypingObserver:()=>Cy,createCustomColorsHOC:()=>P6,getColorClassName:()=>Qn,getColorObjectByAttributeValues:()=>Ds,getColorObjectByColorValue:()=>SS,getComputedFluidTypographyValue:()=>M6,getCustomValueFromPreset:()=>bj,getFontSize:()=>Lp,getFontSizeClass:()=>Uc,getFontSizeObjectByValue:()=>$L,getGradientSlugByValue:()=>A6,getGradientValueBySlug:()=>$x,getPxFromCssUnit:()=>Yue,getSpacingPresetCssVar:()=>sv,getTypographyClassesAndStyles:()=>S4,isValueSpacingPreset:()=>sw,privateApis:()=>O4,store:()=>_,storeConfig:()=>Pp,transformStyles:()=>Af,useBlockBindingsUtils:()=>ml,useBlockCommands:()=>PE,useBlockDisplayInformation:()=>gt,useBlockEditContext:()=>Ae,useBlockEditingMode:()=>Zo,useBlockProps:()=>Mv,useCachedTruthy:()=>x4,useHasRecursion:()=>yF,useInnerBlocksProps:()=>qf,useSetting:()=>B6,useSettings:()=>fe,useStyleOverride:()=>fs,withColorContext:()=>iT,withColors:()=>O6,withFontSizes:()=>z6});var nce=l($()),Fi=l(I()),k2=l(D()),wF=l(Y()),X_=l(nt());var gS=l(I()),xc=Symbol("mayDisplayControls"),ip=Symbol("mayDisplayParentControls"),bS=Symbol("blockEditingMode"),sp=Symbol("blockBindings"),kS=Symbol("isPreviewMode"),tO={name:"",isSelected:!1},oO=(0,gS.createContext)(tO);oO.displayName="BlockEditContext";var{Provider:vS}=oO;function Ae(){return(0,gS.useContext)(oO)}var _de={grad:.9,turn:360,rad:360/(2*Math.PI)},Za=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Do=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},Xn=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},W4=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},V4=function(e){return{r:Xn(e.r,0,255),g:Xn(e.g,0,255),b:Xn(e.b,0,255),a:Xn(e.a)}},rO=function(e){return{r:Do(e.r),g:Do(e.g),b:Do(e.b),a:Do(e.a,3)}},Sde=/^#([0-9a-f]{3,8})$/i,yS=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},$4=function(e){var t=e.r,o=e.g,r=e.b,n=e.a,i=Math.max(t,o,r),s=i-Math.min(t,o,r),a=s?i===t?(o-r)/s:i===o?2+(r-t)/s:4+(t-o)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:n}},K4=function(e){var t=e.h,o=e.s,r=e.v,n=e.a;t=t/360*6,o/=100,r/=100;var i=Math.floor(t),s=r*(1-o),a=r*(1-(t-i)*o),c=r*(1-(1-t+i)*o),u=i%6;return{r:255*[r,a,s,s,c,r][u],g:255*[c,r,r,a,s,s][u],b:255*[s,s,c,r,r,a][u],a:n}},F4=function(e){return{h:W4(e.h),s:Xn(e.s,0,100),l:Xn(e.l,0,100),a:Xn(e.a)}},z4=function(e){return{h:Do(e.h),s:Do(e.s),l:Do(e.l),a:Do(e.a,3)}},j4=function(e){return K4((o=(t=e).s,{h:t.h,s:(o*=((r=t.l)<50?r:100-r)/100)>0?2*o/(r+o)*100:0,v:r+o,a:t.a}));var t,o,r},uk=function(e){return{h:(t=$4(e)).h,s:(n=(200-(o=t.s))*(r=t.v)/100)>0&&n<200?o*r/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,o,r,n},xde=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wde=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Cde=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bde=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sO={string:[[function(e){var t=Sde.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Do(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Do(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Cde.exec(e)||Bde.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:V4({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=xde.exec(e)||wde.exec(e);if(!t)return null;var o,r,n=F4({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(_de[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return j4(n)},"hsl"]],object:[[function(e){var t=e.r,o=e.g,r=e.b,n=e.a,i=n===void 0?1:n;return Za(t)&&Za(o)&&Za(r)?V4({r:Number(t),g:Number(o),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,o=e.s,r=e.l,n=e.a,i=n===void 0?1:n;if(!Za(t)||!Za(o)||!Za(r))return null;var s=F4({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return j4(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!Za(t)||!Za(o)||!Za(r))return null;var s=(function(a){return{h:W4(a.h),s:Xn(a.s,0,100),v:Xn(a.v,0,100),a:Xn(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return K4(s)},"hsv"]]},U4=function(e,t){for(var o=0;o<t.length;o++){var r=t[o][0](e);if(r)return[r,t[o][1]]}return[null,void 0]},Ede=function(e){return typeof e=="string"?U4(e.trim(),sO.string):typeof e=="object"&&e!==null?U4(e,sO.object):[null,void 0]};var nO=function(e,t){var o=uk(e);return{h:o.h,s:Xn(o.s+100*t,0,100),l:o.l,a:o.a}},iO=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},H4=function(e,t){var o=uk(e);return{h:o.h,s:o.s,l:Xn(o.l+100*t,0,100),a:o.a}},aO=(function(){function e(t){this.parsed=Ede(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Do(iO(this.rgba),2)},e.prototype.isDark=function(){return iO(this.rgba)<.5},e.prototype.isLight=function(){return iO(this.rgba)>=.5},e.prototype.toHex=function(){return t=rO(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?yS(Do(255*i)):"","#"+yS(o)+yS(r)+yS(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return rO(this.rgba)},e.prototype.toRgbString=function(){return t=rO(this.rgba),o=t.r,r=t.g,n=t.b,(i=t.a)<1?"rgba("+o+", "+r+", "+n+", "+i+")":"rgb("+o+", "+r+", "+n+")";var t,o,r,n,i},e.prototype.toHsl=function(){return z4(uk(this.rgba))},e.prototype.toHslString=function(){return t=z4(uk(this.rgba)),o=t.h,r=t.s,n=t.l,(i=t.a)<1?"hsla("+o+", "+r+"%, "+n+"%, "+i+")":"hsl("+o+", "+r+"%, "+n+"%)";var t,o,r,n,i},e.prototype.toHsv=function(){return t=$4(this.rgba),{h:Do(t.h),s:Do(t.s),v:Do(t.v),a:Do(t.a,3)};var t},e.prototype.invert=function(){return ft({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),ft(nO(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),ft(nO(this.rgba,-t))},e.prototype.grayscale=function(){return ft(nO(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),ft(H4(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),ft(H4(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?ft({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):Do(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=uk(this.rgba);return typeof t=="number"?ft({h:t,s:o.s,l:o.l,a:o.a}):Do(o.h)},e.prototype.isEqual=function(t){return this.toHex()===ft(t).toHex()},e})(),ft=function(e){return e instanceof aO?e:new aO(e)},G4=[],wc=function(e){e.forEach(function(t){G4.indexOf(t)<0&&(t(aO,sO),G4.push(t))})};function Cc(e,t){var o={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var n in o)r[o[n]]=n;var i={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,u=r[this.toHex()];if(u)return u;if(s?.closest){var d=this.toRgb(),f=1/0,m="black";if(!i.length)for(var p in o)i[p]=new e(o[p]).toRgb();for(var h in o){var g=(a=d,c=i[h],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));g<f&&(f=g,m=h)}return m}},t.string.push([function(s){var a=s.toLowerCase(),c=a==="transparent"?"#0000":o[a];return c?new e(c).toRgb():null},"name"])}var lO=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},cO=function(e){return .2126*lO(e.r)+.7152*lO(e.g)+.0722*lO(e.b)};function ap(e){e.prototype.luminance=function(){return t=cO(this.rgba),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.round(r*t)/r+0;var t,o,r},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var o,r,n,i,s,a,c,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),a=cO(i),c=cO(s),o=a>c?(a+.05)/(c+.05):(c+.05)/(a+.05),(r=2)===void 0&&(r=0),n===void 0&&(n=Math.pow(10,r)),Math.floor(n*o)/n+0},e.prototype.isReadable=function(t,o){return t===void 0&&(t="#FFF"),o===void 0&&(o={}),this.contrast(t)>=(a=(s=(r=o).size)===void 0?"normal":s,(i=(n=r.level)===void 0?"AA":n)==="AAA"&&a==="normal"?7:i==="AA"&&a==="large"?3:4.5);var r,n,i,s,a}}var Q4=l(O());var Z4=l(_S()),{lock:X4,unlock:z}=(0,Z4.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-editor");wc([Cc,ap]);var{kebabCase:Tde}=z(Q4.privateApis),Ds=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},SS=(e,t)=>e?.find(o=>o.color===t);function Qn(e,t){if(!(!e||!t))return`has-$Tde(t)}-$e}`}function J4(e,t){let o=ft(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var Ux=l(I()),mf=l(Y()),T6=l(O());var w6=l(D()),C6=l(Oe());var zx=l(I()),WL=l($());function tz(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=tz(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Ide(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=tz(e))&&(r&&(r+=" "),r+=t);return r}var V=Ide;var Xa=l($()),cz=l(O()),mk=l(D()),$d=l(I());var lp=l(I()),rz=l(x()),xS=(0,lp.createContext)({});xS.displayName="BlockContext";function wS({value:e,children:t}){let o=(0,lp.useContext)(xS),r=(0,lp.useMemo)(()=>({...o,...e}),[o,e]);return(0,rz.jsx)(xS.Provider,{value:r,children:t})}var Jn=xS;var cp=l(Zr());function dk(e){if(e.includes(" "))return!1;let o=(0,cp.getProtocol)(e),r=(0,cp.isValidProtocol)(o),n=Pde(e),i=e?.startsWith("www."),s=e?.startsWith("#")&&(0,cp.isValidFragment)(e);return r||i||s||n}function Pde(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,$t}})(?:\\/|$)`).test(o)}var Ode="__default",iz="core/pattern-overrides";function fk(e){return e?.[Ode]?.source===iz}function sz(e,t){if(fk(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:iz};o[r]=n}return o}return e}var az=l(I()),$i=(0,az.createContext)({});$i.displayName="PrivateBlockContext";var CS=l(x()),Rde={},Ade=e=>{let{name:t}=e,o=(0,Xa.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,CS.jsx)(r,{...e})},lz=(0,cz.withFilters)("editor.BlockEdit")(Ade),Lde=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,mk.useRegistry)(),s=(0,Xa.getBlockType)(t),a=(0,$d.useContext)(Jn),c=(0,mk.useSelect)(k=>z(k(Xa.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,$d.useContext)($i),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,$d.useMemo)(()=>{let k=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([y])=>s.usesContext.includes(y))):Rde;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(y=>{c[y?.source]?.usesContext?.forEach(v=>{k[v]=a[v]})}),{blockBindings:sz(r?.metadata?.bindings,u),context:k,hasPatternOverrides:fk(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),p=(0,mk.useSelect)(k=>{if(!d)return r;let y={},v=new Map;for(let[S,w]of Object.entries(d)){let{source:C,args:E}=w,P=c[C];!P||!u?.includes(S)||v.set(P,{...v.get(P),[S]:{args:E}})}if(v.size)for(let[S,w]of v){let C={};S.getValues?C=S.getValues({select:k,context:f,clientId:o,bindings:w}):Object.keys(w).forEach(E=>{C[E]=S.label});for(let[E,P]of Object.entries(C))E==="url"&&(!P||!dk(P))?y[E]=null:y[E]=P}return{...r,...y}},[r,u,d,o,f,c]),h=(0,$d.useCallback)(k=>{if(!d){n(k);return}i.batch(()=>{let y={...k},v=new Map;for(let[w,C]of Object.entries(y)){if(!d[w]||!u?.includes(w))continue;let E=d[w],P=c[E?.source];P?.setValues&&(v.set(P,{...v.get(P),[w]:{args:E.args,newValue:C}}),delete y[w])}if(v.size)for(let[w,C]of v)w.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:C});let S=!!f["pattern/overrides"];!(m&&S)&&Object.keys(y).length&&(m&&delete y.href,n(y))})},[u,d,o,f,m,n,c,i]);if(!s)return null;if(s.apiVersion>1)return(0,CS.jsx)(lz,{...e,attributes:p,context:f,setAttributes:h});let g=(0,Xa.hasBlockSupport)(s,"className",!0)?(0,Xa.getBlockDefaultClassName)(t):null,b=V(g,r?.className,e.className);return(0,CS.jsx)(lz,{...e,attributes:p,className:b,context:f,setAttributes:h})},uz=Lde;var _6=l($()),GL=l(O()),S6=l(D()),Fx=l(M());var Vx=l(D());var bk=l(Kd()),pO=l(Y()),kk=l(D()),hz=l(Oe()),LS=l($());var Le=l(M()),mz={insertUsage:{}},pk={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Le.__)("Black"),slug:"black",color:"#000000"},{name:(0,Le.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Le.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Le.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Le.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Le.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Le.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Le.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Le.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Le.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Le.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Le.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Le._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Le._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Le._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Le._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Le._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Le.__)("Thumbnail")},{slug:"medium",name:(0,Le.__)("Medium")},{slug:"large",name:(0,Le.__)("Large")},{slug:"full",name:(0,Le.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],isPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Le.__)("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,Le.__)("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,Le.__)("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,Le.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Le.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function BS(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function ES(e,t,o,r=1){let n=[...e];return n.splice(t,r),BS(n,e.slice(t,t+r),o)}var Vs=Symbol("globalStylesDataKey"),TS=Symbol("globalStylesLinks"),Bc=Symbol("selectBlockPatternsKey"),IS=Symbol("reusableBlocksSelect"),Ec=Symbol("sectionRootClientIdKey"),PS=Symbol("mediaEditKey"),OS=Symbol("getMediaSelect"),RS=Symbol("essentialFormat"),up=Symbol("isIsolatedEditor");var{isContentBlock:Mde}=z(LS.privateApis),Nde=e=>e;function gk(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),gk(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function AS(e,t=""){let o=[],r=[[t,e]];for(;r.length;){let[n,i]=r.shift();i.forEach(({innerBlocks:s,...a})=>{o.push([a.clientId,n]),s?.length&&r.push([a.clientId,s])})}return o}function gz(e,t=Nde){let o=[],r=[...e];for(;r.length;){let{innerBlocks:n,...i}=r.shift();r.push(...n),o.push([i.clientId,t(i)])}return o}function Dde(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function uO(e){return gz(e,t=>{let{attributes:o,...r}=t;return r})}function dO(e){return gz(e,t=>t.attributes)}function Vde(e,t){return(0,bk.default)(Object.keys(e),Object.keys(t))}function Fde(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,bk.default)(e.clientIds,t.clientIds)&&Vde(e.attributes,t.attributes)}function fO(e,t){let o=e.tree,r=[...t],n=[...t];for(;r.length;){let i=r.shift();r.push(...i.innerBlocks),n.push(...i.innerBlocks)}for(let i of n)o.set(i.clientId,{});for(let i of n)o.set(i.clientId,Object.assign(o.get(i.clientId),{...e.byClientId.get(i.clientId),attributes:e.attributes.get(i.clientId),innerBlocks:i.innerBlocks.map(s=>o.get(s.clientId))}))}function Qa(e,t,o=!1){let r=e.tree,n=new Set([]),i=new Set;for(let s of t){let a=o?s:e.parents.get(s);do if(e.controlledInnerBlocks[a]){i.add(a);break}else n.add(a),a=e.parents.get(a);while(a!==void 0)}for(let s of n)r.set(s,{...r.get(s)});for(let s of n)r.get(s).innerBlocks=(e.order.get(s)||[]).map(a=>r.get(a));for(let s of i)r.set("controlled||"+s,{innerBlocks:(e.order.get(s)||[]).map(a=>r.get(a))})}var zde=e=>(t={},o)=>{let r=e(t,o);if(r===t)return t;switch(r.tree=t.tree?t.tree:new Map,o.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{r.tree=new Map(r.tree),fO(r,o.blocks),Qa(r,o.rootClientId?[o.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(o.clientId,{...r.tree.get(o.clientId),...r.byClientId.get(o.clientId),attributes:r.attributes.get(o.clientId)}),Qa(r,[o.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{r.tree=new Map(r.tree),o.clientIds.forEach(i=>{r.tree.set(i,{...r.tree.get(i),attributes:r.attributes.get(i)})}),Qa(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=Dde(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),fO(r,o.blocks),Qa(r,o.blocks.map(a=>a.clientId),!1);let s=[];for(let a of o.clientIds){let c=t.parents.get(a);c!==void 0&&(c===""||r.byClientId.get(c))&&s.push(c)}Qa(r,s,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":let n=[];for(let i of o.clientIds){let s=t.parents.get(i);s!==void 0&&(s===""||r.byClientId.get(s))&&n.push(s)}r.tree=new Map(r.tree),o.removedClientIds.forEach(i=>{r.tree.delete(i),r.tree.delete("controlled||"+i)}),Qa(r,n,!0);break;case"MOVE_BLOCKS_TO_POSITION":{let i=[];o.fromRootClientId?i.push(o.fromRootClientId):i.push(""),o.toRootClientId&&i.push(o.toRootClientId),r.tree=new Map(r.tree),Qa(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),Qa(r,i,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{let i=[];r.attributes.forEach((s,a)=>{r.byClientId.get(a).name==="core/block"&&s.ref===o.updatedId&&i.push(a)}),r.tree=new Map(r.tree),i.forEach(s=>{r.tree.set(s,{...r.byClientId.get(s),attributes:r.attributes.get(s),innerBlocks:r.tree.get(s).innerBlocks})}),Qa(r,i,!1)}}return r};function jde(e){let t,o=!1,r;return(n,i)=>{let s=e(n,i),a;if(i.type==="SET_EXPLICIT_PERSISTENT"&&(r=i.isPersistentChange,a=n.isPersistentChange??!0),r!==void 0)return a=r,a===s.isPersistentChange?s:{...s,isPersistentChange:a};let c=i.type==="MARK_LAST_CHANGE_AS_PERSISTENT"||o;return n===s&&!c?(o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",a=n?.isPersistentChange??!0,n.isPersistentChange===a?n:{...s,isPersistentChange:a}):(s={...s,isPersistentChange:c?!o:!Fde(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function Ude(e){let t=new Set(["RECEIVE_BLOCKS"]);return(o,r)=>{let n=e(o,r);return n!==o&&(n.isIgnoredChange=t.has(r.type)),n}}var Hde=e=>(t,o)=>{let r=n=>{let i=n;for(let s=0;s<i.length;s++)!t.order.get(i[s])||o.keepControlledInnerBlocks&&o.keepControlledInnerBlocks[i[s]]||(i===n&&(i=[...i]),i.push(...t.order.get(i[s])));return i};if(t)switch(o.type){case"REMOVE_BLOCKS":o={...o,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(o.clientIds)};break;case"REPLACE_BLOCKS":o={...o,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(o.clientIds)};break}return e(t,o)},Gde=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r={...t,byClientId:new Map(uO(o.blocks)),attributes:new Map(dO(o.blocks)),order:gk(o.blocks),parents:new Map(AS(o.blocks)),controlledInnerBlocks:{}};return r.tree=new Map(t?.tree),fO(r,o.blocks),r.tree.set("",{innerBlocks:o.blocks.map(n=>r.tree.get(n.clientId))}),r}return e(t,o)},Wde=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(Object.keys(t.controlledInnerBlocks).length){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks[c.clientId]&&(r[c.clientId]=!0)}}let n=t;t.order.get(o.rootClientId)&&(n=e(n,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(o.rootClientId)}));let i=n;if(o.blocks.length){i=e(i,{...o,type:"INSERT_BLOCKS",index:0});let s=new Map(i.order);Object.keys(r).forEach(a=>{t.order.get(a)&&s.set(a,t.order.get(a))}),i.order=s,i.tree=new Map(i.tree),Object.keys(r).forEach(a=>{let c=`controlled||$a}`;t.tree.has(c)&&i.tree.set(c,t.tree.get(c))})}return i},$de=e=>(t,o)=>{if(t&&o.type==="SAVE_REUSABLE_BLOCK_SUCCESS"){let{id:r,updatedId:n}=o;if(r===n)return t;t={...t},t.attributes=new Map(t.attributes),t.attributes.forEach((i,s)=>{let{name:a}=t.byClientId.get(s);a==="core/block"&&i.ref===r&&t.attributes.set(s,{...i,ref:n})})}return e(t,o)},Kde=e=>(t,o)=>{if(o.type==="SET_HAS_CONTROLLED_INNER_BLOCKS"){let r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:o.clientId,blocks:[]});return e(r,o)}return e(t,o)},qde=(0,pO.pipe)(kk.combineReducers,$de,zde,Hde,Wde,Gde,jde,Ude,Kde)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return uO(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;let{attributes:o,...r}=t.updates;if(Object.values(r).length===0)return e;let n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...r}),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),uO(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return dO(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;let o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),o}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every(n=>!e.get(n)))return e;let o=!1,r=new Map(e);for(let n of t.clientIds){let i=Object.entries(t.options?.uniqueByBlock?t.attributes[n]:t.attributes??{});if(i.length===0)continue;let s=!1,a=e.get(n),c={};i.forEach(([u,d])=>{a[u]!==d&&(s=!0,c[u]=d)}),o=o||s,s&&r.set(n,{...a,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),dO(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=gk(t.blocks),r=new Map(e);return o.forEach((n,i)=>{i!==""&&r.set(i,n)}),r.set("",(e.get("")??[]).concat(o[""])),r}case"INSERT_BLOCKS":{let{rootClientId:o=""}=t,r=e.get(o)||[],n=gk(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,BS(r,n.get(o),i)),s}case"MOVE_BLOCKS_TO_POSITION":{let{fromRootClientId:o="",toRootClientId:r="",clientIds:n}=t,{index:i=e.get(r).length}=t;if(o===r){let c=e.get(r).indexOf(n[0]),u=new Map(e);return u.set(r,ES(e.get(r),c,i,n.length)),u}let s=new Map(e);return s.set(o,e.get(o)?.filter(a=>!n.includes(a))??[]),s.set(r,BS(e.get(r),n,i)),s}case"MOVE_BLOCKS_UP":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=e.get(r);if(!i.length||n===i[0])return e;let s=i.indexOf(n),a=new Map(e);return a.set(r,ES(i,s,s-1,o.length)),a}case"MOVE_BLOCKS_DOWN":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=o[o.length-1],s=e.get(r);if(!s.length||i===s[s.length-1])return e;let a=s.indexOf(n),c=new Map(e);return c.set(r,ES(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=gk(t.blocks),n=new Map(e);return t.replacedClientIds.forEach(i=>{n.delete(i)}),r.forEach((i,s)=>{s!==""&&n.set(s,i)}),n.forEach((i,s)=>{let a=Object.values(i).reduce((c,u)=>u===o[0]?[...c,...r.get("")]:(o.indexOf(u)===-1&&c.push(u),c),[]);n.set(s,a)}),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o.forEach((r,n)=>{let i=r?.filter(s=>!t.removedClientIds.includes(s))??[];i.length!==r.length&&o.set(n,i)}),o}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=new Map(e);return AS(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return AS(t.blocks,t.rootClientId||"").forEach(([r,n])=>{o.set(r,n)}),o}case"MOVE_BLOCKS_TO_POSITION":{let o=new Map(e);return t.clientIds.forEach(r=>{o.set(r,t.toRootClientId||"")}),o}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),AS(t.blocks,e.get(t.clientIds[0])).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},controlledInnerBlocks(e={},{type:t,clientId:o,hasControlledInnerBlocks:r}){return t==="SET_HAS_CONTROLLED_INNER_BLOCKS"?{...e,[o]:r}:e}});function Yde(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function Zde(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function Xde(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function Qde(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function Jde(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function pz(e={},t){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?e:{clientId:t.blocks[0].clientId};case"REMOVE_BLOCKS":return!t.clientIds||!t.clientIds.length||t.clientIds.indexOf(e.clientId)===-1?e:{};case"REPLACE_BLOCKS":{if(t.clientIds.indexOf(e.clientId)===-1)return e;let o=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return o?o.clientId===e.clientId?e:{clientId:o.clientId}:{}}}return e}function efe(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":let{selectionStart:n,selectionEnd:i}=t;return{selectionStart:n,selectionEnd:i};case"MULTI_SELECT":let{start:s,end:a}=t;return s===e.selectionStart?.clientId&&a===e.selectionEnd?.clientId?e:{selectionStart:{clientId:s},selectionEnd:{clientId:a}};case"RESET_BLOCKS":let c=e?.selectionStart?.clientId,u=e?.selectionEnd?.clientId;if(!c&&!u)return e;if(!t.blocks.some(d=>d.clientId===c))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(d=>d.clientId===u))return{...e,selectionEnd:e.selectionStart}}let o=pz(e.selectionStart,t),r=pz(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function tfe(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function ofe(e=!0,t){switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e}function rfe(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":let{clientIds:o,selectPrevious:r,message:n}=t;return{clientIds:o,selectPrevious:r,message:n};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e}function nfe(e=!1,t){switch(t.type){case"SET_BLOCK_REMOVAL_RULES":return t.rules}return e}function ife(e=null,t){return t.type==="REPLACE_BLOCKS"&&t.initialPosition!==void 0||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e}function sfe(e={},t){if(t.type==="TOGGLE_BLOCK_MODE"){let{clientId:o}=t;return{...e,[o]:e[o]&&e[o]==="html"?"visual":"html"}}return e}function afe(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{let{rootClientId:o,index:r,__unstableWithInserter:n,operation:i,nearestSide:s}=t,a={rootClientId:o,index:r,__unstableWithInserter:n,operation:i,nearestSide:s};return(0,bk.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function lfe(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e}function cfe(e=pk,t){switch(t.type){case"UPDATE_SETTINGS":{let o=t.reset?{...pk,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,hz.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}}return e}function ufe(e=mz,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{let o=t.blocks.reduce((r,n)=>{let{attributes:i,name:s}=n,a=s,c=(0,kk.select)(LS.store).getActiveBlockVariation(s,i);return c?.name&&(a+="/"+c.name),s==="core/block"&&(a+="/"+i.ref),{...r,[a]:{time:t.time,count:r[a]?r[a].count+1:1}}},e.insertUsage);return{...e,insertUsage:o}}}return e}var dfe=(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter(([o])=>!t.clientIds.includes(o)));case"UPDATE_BLOCK_LIST_SETTINGS":{let o=typeof t.clientId=="string"?{[t.clientId]:t.settings}:t.clientId;for(let n in o)o[n]?(0,bk.default)(e[n],o[n])&&delete o[n]:e[n]||delete o[n];if(Object.keys(o).length===0)return e;let r={...e,...o};for(let n in o)o[n]||delete r[n];return r}}return e};function ffe(e=null,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((o,r)=>({...o,[r]:t.options?.uniqueByBlock?t.attributes[r]:t.attributes}),{})}return e}function mfe(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":let{clientId:o,isHighlighted:r}=t;return r?o:e===o?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}function pfe(e,t){switch(t.type){case"TOGGLE_BLOCK_SPOTLIGHT":let{clientId:o,hasBlockSpotlight:r}=t;return r?o:e===o?null:e;case"SELECT_BLOCK":return t.clientId!==e?null:e;case"SELECTION_CHANGE":return t.start?.clientId!==e||t.end?.clientId!==e?null:e;case"CLEAR_SELECTED_BLOCK":return null}return e}function hfe(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}function gfe(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;let o=t.blocks.map(n=>n.clientId),r=t.meta?.source;return{clientIds:o,source:r};case"RESET_BLOCKS":return{}}return e}function bfe(e,t){return t.type==="EDIT_CONTENT_ONLY_SECTION"?t.clientId:e}function kfe(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;let o=new Map(e);return o.delete(t.clientId),o}case"RESET_BLOCKS":return e.has("")?new Map().set("",e.get("")):e}return e}function vfe(e=null,t){return t.type==="SET_OPENED_BLOCK_SETTINGS_MENU"?t?.clientId??null:e}function yfe(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{let o=new Map(e);return o.delete(t.id),o}}return e}function _fe(e=[],t){switch(t.type){case"REGISTER_INSERTER_MEDIA_CATEGORY":return[...e,t.category]}return e}function Sfe(e=!1,t){switch(t.type){case"LAST_FOCUS":return t.lastFocus}return e}function xfe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function wfe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}var Cfe=(0,kk.combineReducers)({blocks:qde,isDragging:Xde,isTyping:Zde,isBlockInterfaceHidden:Yde,draggedBlocks:Qde,selection:efe,isMultiSelecting:tfe,isSelectionEnabled:ofe,initialPosition:ife,blocksMode:sfe,blockListSettings:dfe,insertionPoint:wfe,insertionCue:afe,template:lfe,settings:cfe,preferences:ufe,lastBlockAttributesChange:ffe,lastFocus:Sfe,expandedBlock:hfe,highlightedBlock:mfe,lastBlockInserted:gfe,editedContentOnlySection:bfe,blockVisibility:Jde,blockEditingModes:kfe,styleOverrides:yfe,removalPromptData:rfe,blockRemovalRules:nfe,openedBlockSettingsMenu:vfe,registeredInserterMediaCategories:_fe,zoomLevel:xfe,hasBlockSpotlight:pfe});function bz(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);let o=e.blocks.tree.get(`controlled||$t}`);return{...e.blocks.tree.get(t),innerBlocks:o?.innerBlocks}}function hO(e,t,o){let r=bz(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)hO(e,n.clientId,o)}function hk(e,t,o){if(!o.length)return;let r=e.blocks.parents.get(t);for(;r!==void 0;){if(o.includes(r))return r;r=e.blocks.parents.get(r)}}function Bfe(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function mO(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[Ec],i=e.blocks.order.get(n),s=Array.from(e.blockEditingModes).some(([,p])=>p==="disabled"),a=[],c=[];Object.keys(e.blocks.controlledInnerBlocks).forEach(p=>{let h=e.blocks.byClientId?.get(p);h?.name==="core/template-part"&&a.push(p),h?.name==="core/block"&&c.push(p)});let u=Object.keys(e.blockListSettings).filter(p=>e.blockListSettings[p]?.templateLock==="contentOnly"),d=e.settings?.[up],f=window?.__experimentalContentOnlyPatternInsertion&&!d?Array.from(e.blocks.attributes.keys()).filter(p=>e.blocks.attributes.get(p)?.metadata?.patternName):[],m=[...u,...f,...window?.__experimentalContentOnlyPatternInsertion&&!d?a:[]];return hO(e,t,p=>{let{clientId:h,name:g}=p;if(e.editedContentOnlySection){if(e.editedContentOnlySection===h){r.set(h,"default");return}if(hk(e,h,[e.editedContentOnlySection])){r.set(h,"default");return}if(window?.__experimentalContentOnlyPatternInsertion){r.set(h,"disabled");return}}if(!e.blockEditingModes.has(h)){if(s){let b,k=e.blocks.parents.get(h);for(;k!==void 0&&(e.blockEditingModes.has(k)&&(b=e.blockEditingModes.get(k)),!b);)k=e.blocks.parents.get(k);if(b==="disabled"){r.set(h,"disabled");return}}if(o){if(h===n){r.set(h,"contentOnly");return}if(!i?.length){r.set(h,"disabled");return}if(i.includes(h)){r.set(h,"contentOnly");return}r.set(h,"disabled");return}if(c.length){if(c.includes(h)){if(hk(e,h,c)){r.set(h,"disabled");return}return}let b=hk(e,h,c);if(b){if(hk(e,b,c)){r.set(h,"disabled");return}if(Bfe(p)){r.set(h,"contentOnly");return}r.set(h,"disabled")}}m.length&&hk(e,h,m)&&(Mde(g)?r.set(h,"contentOnly"):r.set(h,"disabled"))}}),r}function Tc({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{hO(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=mO(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function Efe(e){return(t,o)=>{let r=e(t,o);if(o.type!=="SET_EDITOR_MODE"&&r===t)return t;switch(o.type){case"REMOVE_BLOCKS":{let n=Tc({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=Tc({prevState:t,nextState:r,addedBlocks:o.blocks});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{let n=[],i=[];for(let a of o?.clientIds){let c=o.options?.uniqueByBlock?o.attributes[a]:o.attributes;if(!c)break;c.metadata?.patternName&&!t.blocks.attributes.get(a)?.metadata?.patternName?n.push(r.blocks.tree.get(a)):c.metadata&&!c.metadata?.patternName&&t.blocks.attributes.get(a)?.metadata?.patternName&&i.push(a)}if(!n?.length&&!i?.length)break;let s=Tc({prevState:t,nextState:r,addedBlocks:n,removedClientIds:i});if(s)return{...r,derivedBlockEditingModes:s??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_LIST_SETTINGS":{let n=[],i=[],s=typeof o.clientId=="string"?{[o.clientId]:o.settings}:o.clientId;for(let c in s){let u=t.blockListSettings[c]?.templateLock!=="contentOnly"&&r.blockListSettings[c]?.templateLock==="contentOnly",d=t.blockListSettings[c]?.templateLock==="contentOnly"&&r.blockListSettings[c]?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=Tc({prevState:t,nextState:r,addedBlocks:n,removedClientIds:i});if(a)return{...r,derivedBlockEditingModes:a??t.derivedBlockEditingModes};break}case"SET_BLOCK_EDITING_MODE":case"UNSET_BLOCK_EDITING_MODE":case"SET_HAS_CONTROLLED_INNER_BLOCKS":{let n=bz(r,o.clientId);if(!n)break;let i=Tc({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=Tc({prevState:t,nextState:r,addedBlocks:o.blocks,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"REPLACE_INNER_BLOCKS":{let n=t.blocks.order.get(o.rootClientId),i=Tc({prevState:t,nextState:r,addedBlocks:o.blocks,removedClientIds:n});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"MOVE_BLOCKS_TO_POSITION":{let n=o.clientIds.map(s=>r.blocks.byClientId.get(s)),i=Tc({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[Ec]!==r?.settings?.[Ec])return{...r,derivedBlockEditingModes:mO(r)};break}case"RESET_BLOCKS":case"EDIT_CONTENT_ONLY_SECTION":case"SET_EDITOR_MODE":case"RESET_ZOOM_LEVEL":case"SET_ZOOM_LEVEL":return{...r,derivedBlockEditingModes:mO(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function Tfe(e){return(t,o)=>{let r=e(t,o);return t?(r.automaticChangeStatus=t.automaticChangeStatus,o.type==="MARK_AUTOMATIC_CHANGE"?{...r,automaticChangeStatus:"pending"}:o.type==="MARK_AUTOMATIC_CHANGE_FINAL"&&t.automaticChangeStatus==="pending"?{...r,automaticChangeStatus:"final"}:r.blocks===t.blocks&&r.selection===t.selection||r.automaticChangeStatus!=="final"&&r.selection!==t.selection?r:{...r,automaticChangeStatus:void 0}):r}}var kz=(0,pO.pipe)(Efe,Tfe)(Cfe);var DL={};Ns(DL,{__experimentalGetActiveBlockIdByBlockNames:()=>Spe,__experimentalGetAllowedBlocks:()=>spe,__experimentalGetAllowedPatterns:()=>upe,__experimentalGetBlockListSettingsForBlocks:()=>hpe,__experimentalGetDirectInsertBlock:()=>ape,__experimentalGetGlobalBlocksByName:()=>bme,__experimentalGetLastBlockAttributeChanges:()=>kpe,__experimentalGetParsedPattern:()=>lpe,__experimentalGetPatternTransformItems:()=>mpe,__experimentalGetPatternsByBlockTypes:()=>fpe,__experimentalGetReusableBlockTitle:()=>gpe,__unstableGetBlockWithoutInnerBlocks:()=>pme,__unstableGetClientIdWithClientIdsTree:()=>Fz,__unstableGetClientIdsTree:()=>zz,__unstableGetContentLockingParent:()=>Ppe,__unstableGetSelectedBlocksWithPartialSelection:()=>Fme,__unstableGetTemporarilyEditingAsBlocks:()=>Ope,__unstableGetVisibleBlocks:()=>Bpe,__unstableHasActiveBlockOverlayActive:()=>t6,__unstableIsFullySelected:()=>Mme,__unstableIsLastBlockChangeIgnored:()=>bpe,__unstableIsSelectionCollapsed:()=>Nme,__unstableIsSelectionMergeable:()=>Vme,__unstableIsWithinBlockOverlay:()=>Epe,__unstableSelectionHasUnmergeableBlock:()=>Dme,areInnerBlocksControlled:()=>Mx,canEditBlock:()=>Qz,canInsertBlockType:()=>uf,canInsertBlocks:()=>Jme,canLockBlockType:()=>tpe,canMoveBlock:()=>Xz,canMoveBlocks:()=>epe,canRemoveBlock:()=>RL,canRemoveBlocks:()=>Zz,didAutomaticChange:()=>ype,getAdjacentBlockClientId:()=>TL,getAllowedBlocks:()=>CL,getBlock:()=>cl,getBlockAttributes:()=>ri,getBlockCount:()=>vme,getBlockEditingMode:()=>ni,getBlockHierarchyRootClientId:()=>Cme,getBlockIndex:()=>Wz,getBlockInsertionPoint:()=>Yme,getBlockListSettings:()=>NL,getBlockMode:()=>Gme,getBlockName:()=>lo,getBlockNamesByClientId:()=>kme,getBlockOrder:()=>Qr,getBlockParents:()=>sl,getBlockParentsByBlockName:()=>EL,getBlockRootClientId:()=>ko,getBlockSelectionEnd:()=>_me,getBlockSelectionStart:()=>yme,getBlockTransformItems:()=>npe,getBlocks:()=>hme,getBlocksByClientId:()=>Lx,getBlocksByName:()=>Uz,getClientIdsOfDescendants:()=>jz,getClientIdsWithDescendants:()=>wp,getDirectInsertBlock:()=>e6,getDraggedBlockClientIds:()=>$me,getFirstMultiSelectedBlockClientId:()=>IL,getGlobalBlockCount:()=>gme,getHoveredBlockClientId:()=>Cpe,getInserterItems:()=>rpe,getLastMultiSelectedBlockClientId:()=>Hz,getLowestCommonAncestorWithSelectedBlock:()=>Bme,getMultiSelectedBlockClientIds:()=>Vc,getMultiSelectedBlocks:()=>Pme,getMultiSelectedBlocksEndClientId:()=>Lme,getMultiSelectedBlocksStartClientId:()=>Ame,getNextBlockClientId:()=>Tme,getPatternsByBlockTypes:()=>dpe,getPreviousBlockClientId:()=>Eme,getSelectedBlock:()=>wme,getSelectedBlockClientId:()=>Bp,getSelectedBlockClientIds:()=>Ep,getSelectedBlockCount:()=>Sme,getSelectedBlocksInitialCaretPosition:()=>Ime,getSelectionEnd:()=>Xk,getSelectionStart:()=>Zk,getSettings:()=>Mc,getTemplate:()=>Qme,getTemplateLock:()=>Fs,hasBlockMovingClientId:()=>vpe,hasDraggedInnerBlock:()=>qz,hasInserterItems:()=>ipe,hasMultiSelection:()=>jme,hasSelectedBlock:()=>xme,hasSelectedInnerBlock:()=>Kz,isAncestorBeingDragged:()=>Kme,isAncestorMultiSelected:()=>Rme,isBlockBeingDragged:()=>PL,isBlockHighlighted:()=>_pe,isBlockInsertionPointVisible:()=>Zme,isBlockMultiSelected:()=>Gz,isBlockSelected:()=>$z,isBlockValid:()=>mme,isBlockVisible:()=>wpe,isBlockWithinSelection:()=>zme,isCaretWithinFormattedText:()=>qme,isDraggingBlocks:()=>Yz,isFirstMultiSelectedBlock:()=>Ome,isGroupable:()=>Ipe,isLastBlockChangePersistent:()=>ppe,isMultiSelecting:()=>Ume,isSelectionEnabled:()=>Hme,isTyping:()=>Wme,isUngroupable:()=>Tpe,isValidTemplate:()=>Xme,wasBlockJustInserted:()=>xpe});var De=l($()),Nz=l(I()),Dz=l(nt());var MS=l(I()),Te=(0,MS.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,MS.cloneElement)(e,{width:t,height:t,...o,ref:r}));var NS=l(q()),gO=l(x()),qd=(0,gO.jsx)(NS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gO.jsx)(NS.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var DS=l(q()),bO=l(x()),kO=(0,bO.jsx)(DS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bO.jsx)(DS.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var VS=l(q()),vO=l(x()),Ic=(0,vO.jsx)(VS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vO.jsx)(VS.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var FS=l(q()),yO=l(x()),Yd=(0,yO.jsx)(FS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yO.jsx)(FS.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var zS=l(q()),_O=l(x()),Pc=(0,_O.jsx)(zS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_O.jsx)(zS.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var jS=l(q()),SO=l(x()),xO=(0,SO.jsx)(jS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SO.jsx)(jS.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});var US=l(q()),wO=l(x()),Zd=(0,wO.jsx)(US.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wO.jsx)(US.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var HS=l(q()),CO=l(x()),Xd=(0,CO.jsx)(HS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CO.jsx)(HS.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});var GS=l(q()),BO=l(x()),EO=(0,BO.jsx)(GS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BO.jsx)(GS.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"})});var WS=l(q()),TO=l(x()),IO=(0,TO.jsx)(WS.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,TO.jsx)(WS.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})});var $S=l(q()),PO=l(x()),OO=(0,PO.jsx)($S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PO.jsx)($S.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var KS=l(q()),RO=l(x()),AO=(0,RO.jsx)(KS.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,RO.jsx)(KS.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})});var qS=l(q()),LO=l(x()),Ja=(0,LO.jsx)(qS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LO.jsx)(qS.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var YS=l(q()),MO=l(x()),_n=(0,MO.jsx)(YS.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,MO.jsx)(YS.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var ZS=l(q()),NO=l(x()),vk=(0,NO.jsx)(ZS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NO.jsx)(ZS.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var XS=l(q()),DO=l(x()),Cr=(0,DO.jsx)(XS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DO.jsx)(XS.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var QS=l(q()),VO=l(x()),Oc=(0,VO.jsx)(QS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VO.jsx)(QS.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var JS=l(q()),FO=l(x()),Qo=(0,FO.jsx)(JS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FO.jsx)(JS.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var e0=l(q()),zO=l(x()),Qd=(0,zO.jsx)(e0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,zO.jsx)(e0.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var t0=l(q()),jO=l(x()),Jd=(0,jO.jsx)(t0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jO.jsx)(t0.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})});var o0=l(q()),UO=l(x()),HO=(0,UO.jsx)(o0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UO.jsx)(o0.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})});var r0=l(q()),GO=l(x()),WO=(0,GO.jsx)(r0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GO.jsx)(r0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});var n0=l(q()),$O=l(x()),ef=(0,$O.jsx)(n0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$O.jsx)(n0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});var i0=l(q()),KO=l(x()),qO=(0,KO.jsx)(i0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KO.jsx)(i0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Zm-12.5 9v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})});var tf=l(q()),dp=l(x()),YO=(0,dp.jsxs)(tf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,dp.jsx)(tf.G,{opacity:".25",children:(0,dp.jsx)(tf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,dp.jsx)(tf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 15v3c0 .138.112.25.25.25h3v1.5H6A1.75 1.75 0 0 1 4.25 18v-3h1.5Z"})]});var of=l(q()),fp=l(x()),ZO=(0,fp.jsxs)(of.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,fp.jsx)(of.G,{opacity:".25",children:(0,fp.jsx)(of.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,fp.jsx)(of.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 18.25h3a.25.25 0 0 0 .25-.25v-3h1.5v3A1.75 1.75 0 0 1 18 19.75h-3v-1.5Z"})]});var rf=l(q()),mp=l(x()),XO=(0,mp.jsxs)(rf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,mp.jsx)(rf.G,{opacity:".25",children:(0,mp.jsx)(rf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,mp.jsx)(rf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z"})]});var nf=l(q()),pp=l(x()),QO=(0,pp.jsxs)(nf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,pp.jsx)(nf.G,{opacity:".25",children:(0,pp.jsx)(nf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,pp.jsx)(nf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Z"})]});var s0=l(q()),JO=l(x()),yk=(0,JO.jsx)(s0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JO.jsx)(s0.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var a0=l(q()),eR=l(x()),tR=(0,eR.jsx)(a0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eR.jsx)(a0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})});var l0=l(q()),oR=l(x()),hp=(0,oR.jsx)(l0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oR.jsx)(l0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var c0=l(q()),rR=l(x()),nR=(0,rR.jsx)(c0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rR.jsx)(c0.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});var u0=l(q()),iR=l(x()),sR=(0,iR.jsx)(u0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,iR.jsx)(u0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});var d0=l(q()),aR=l(x()),lR=(0,aR.jsx)(d0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aR.jsx)(d0.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var f0=l(q()),cR=l(x()),uR=(0,cR.jsx)(f0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cR.jsx)(f0.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})});var m0=l(q()),dR=l(x()),fR=(0,dR.jsx)(m0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dR.jsx)(m0.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})});var p0=l(q()),mR=l(x()),pR=(0,mR.jsx)(p0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mR.jsx)(p0.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})});var h0=l(q()),hR=l(x()),gR=(0,hR.jsx)(h0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hR.jsx)(h0.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})});var g0=l(q()),bR=l(x()),kR=(0,bR.jsx)(g0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bR.jsx)(g0.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})});var b0=l(q()),vR=l(x()),gp=(0,vR.jsx)(b0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vR.jsx)(b0.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})});var k0=l(q()),yR=l(x()),_k=(0,yR.jsx)(k0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yR.jsx)(k0.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})});var v0=l(q()),_R=l(x()),Sk=(0,_R.jsx)(v0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_R.jsx)(v0.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})});var y0=l(q()),SR=l(x()),xk=(0,SR.jsx)(y0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,SR.jsx)(y0.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})});var _0=l(q()),xR=l(x()),wR=(0,xR.jsx)(_0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xR.jsx)(_0.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var S0=l(q()),CR=l(x()),BR=(0,CR.jsx)(S0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CR.jsx)(S0.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})});var x0=l(q()),ER=l(x()),TR=(0,ER.jsx)(x0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ER.jsx)(x0.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})});var w0=l(q()),IR=l(x()),PR=(0,IR.jsx)(w0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IR.jsx)(w0.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var C0=l(q()),OR=l(x()),RR=(0,OR.jsx)(C0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OR.jsx)(C0.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})});var B0=l(q()),AR=l(x()),LR=(0,AR.jsx)(B0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AR.jsx)(B0.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var E0=l(q()),MR=l(x()),NR=(0,MR.jsx)(E0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MR.jsx)(E0.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var T0=l(q()),DR=l(x()),wk=(0,DR.jsx)(T0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,DR.jsx)(T0.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});var I0=l(q()),VR=l(x()),FR=(0,VR.jsx)(I0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,VR.jsx)(I0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var P0=l(q()),zR=l(x()),jR=(0,zR.jsx)(P0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zR.jsx)(P0.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var O0=l(q()),UR=l(x()),HR=(0,UR.jsx)(O0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UR.jsx)(O0.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var R0=l(q()),GR=l(x()),Rc=(0,GR.jsx)(R0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GR.jsx)(R0.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var A0=l(q()),WR=l(x()),Ac=(0,WR.jsx)(A0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WR.jsx)(A0.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var L0=l(q()),$R=l(x()),Lc=(0,$R.jsx)(L0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$R.jsx)(L0.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var M0=l(q()),KR=l(x()),qR=(0,KR.jsx)(M0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KR.jsx)(M0.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var N0=l(q()),YR=l(x()),bp=(0,YR.jsx)(N0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YR.jsx)(N0.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var D0=l(q()),ZR=l(x()),XR=(0,ZR.jsx)(D0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZR.jsx)(D0.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var V0=l(q()),QR=l(x()),kp=(0,QR.jsx)(V0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QR.jsx)(V0.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var F0=l(q()),JR=l(x()),eA=(0,JR.jsx)(F0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JR.jsx)(F0.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var z0=l(q()),tA=l(x()),el=(0,tA.jsx)(z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tA.jsx)(z0.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})});var j0=l(q()),oA=l(x()),rA=(0,oA.jsx)(j0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oA.jsx)(j0.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var U0=l(q()),nA=l(x()),ei=(0,nA.jsx)(U0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nA.jsx)(U0.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});var H0=l(q()),iA=l(x()),Xr=(0,iA.jsx)(H0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iA.jsx)(H0.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var G0=l(q()),sA=l(x()),Ck=(0,sA.jsx)(G0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,sA.jsx)(G0.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var W0=l(q()),aA=l(x()),lA=(0,aA.jsx)(W0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,aA.jsx)(W0.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"})});var $0=l(q()),cA=l(x()),uA=(0,cA.jsx)($0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,cA.jsx)($0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});var K0=l(q()),dA=l(x()),sf=(0,dA.jsx)(K0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,dA.jsx)(K0.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})});var Bk=l(q()),Ek=l(x()),vp=(0,Ek.jsxs)(Bk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ek.jsx)(Bk.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Ek.jsx)(Bk.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]});var q0=l(q()),fA=l(x()),mA=(0,fA.jsx)(q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fA.jsx)(q0.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var Y0=l(q()),pA=l(x()),Ki=(0,pA.jsx)(Y0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pA.jsx)(Y0.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Tk=l(q()),Ik=l(x()),tl=(0,Ik.jsxs)(Tk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ik.jsx)(Tk.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Ik.jsx)(Tk.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]});var Z0=l(q()),hA=l(x()),gA=(0,hA.jsx)(Z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hA.jsx)(Z0.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})});var X0=l(q()),bA=l(x()),Pk=(0,bA.jsx)(X0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bA.jsx)(X0.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var Q0=l(q()),kA=l(x()),vA=(0,kA.jsx)(Q0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,kA.jsx)(Q0.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})});var J0=l(q()),yA=l(x()),ti=(0,yA.jsx)(J0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yA.jsx)(J0.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var ex=l(q()),_A=l(x()),SA=(0,_A.jsx)(ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_A.jsx)(ex.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var tx=l(q()),xA=l(x()),wA=(0,xA.jsx)(tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xA.jsx)(tx.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var ox=l(q()),CA=l(x()),BA=(0,CA.jsx)(ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CA.jsx)(ox.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var rx=l(q()),EA=l(x()),TA=(0,EA.jsx)(rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EA.jsx)(rx.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})});var nx=l(q()),IA=l(x()),PA=(0,IA.jsx)(nx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,IA.jsx)(nx.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})});var ix=l(q()),OA=l(x()),RA=(0,OA.jsx)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OA.jsx)(ix.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var sx=l(q()),AA=l(x()),Br=(0,AA.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(sx.Path,{d:"M7 11.5h10V13H7z"})});var ax=l(q()),LA=l(x()),MA=(0,LA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(ax.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})});var lx=l(q()),NA=l(x()),DA=(0,NA.jsx)(lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NA.jsx)(lx.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})});var cx=l(q()),VA=l(x()),FA=(0,VA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VA.jsx)(cx.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})});var ux=l(q()),zA=l(x()),ol=(0,zA.jsx)(ux.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,zA.jsx)(ux.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})});var Ok=l(q()),Rk=l(x()),jA=(0,Rk.jsxs)(Ok.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Rk.jsx)(Ok.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,Rk.jsx)(Ok.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});var dx=l(q()),UA=l(x()),HA=(0,UA.jsx)(dx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,UA.jsx)(dx.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})});var fx=l(q()),GA=l(x()),mx=(0,GA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(fx.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var Ak=l(q()),Lk=l(x()),WA=(0,Lk.jsxs)(Ak.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Lk.jsx)(Ak.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Lk.jsx)(Ak.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var yp=l(q()),_p=l(x()),$A=(0,_p.jsxs)(yp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,_p.jsx)(yp.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,_p.jsx)(yp.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,_p.jsx)(yp.Path,{d:"m18 7.5v9h1.5v-9z"})]});var Mk=l(q()),Nk=l(x()),KA=(0,Nk.jsxs)(Mk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Nk.jsx)(Mk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Nk.jsx)(Mk.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var Dk=l(q()),Vk=l(x()),qA=(0,Vk.jsxs)(Dk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Vk.jsx)(Dk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Vk.jsx)(Dk.Path,{d:"m18 16.5v-9h1.5v9z"})]});var Fk=l(q()),zk=l(x()),YA=(0,zk.jsxs)(Fk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,zk.jsx)(Fk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,zk.jsx)(Fk.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var Sp=l(q()),xp=l(x()),ZA=(0,xp.jsxs)(Sp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,xp.jsx)(Sp.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,xp.jsx)(Sp.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,xp.jsx)(Sp.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var px=l(q()),XA=l(x()),QA=(0,XA.jsx)(px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(px.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})});var hx=l(q()),JA=l(x()),jk=(0,JA.jsx)(hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JA.jsx)(hx.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var gx=l(q()),eL=l(x()),af=(0,eL.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eL.jsx)(gx.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var bx=l(q()),tL=l(x()),oL=(0,tL.jsx)(bx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,tL.jsx)(bx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var kx=l(q()),rL=l(x()),oi=(0,rL.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(kx.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});var vx=l(q()),nL=l(x()),iL=(0,nL.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nL.jsx)(vx.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})});var yx=l(q()),sL=l(x()),aL=(0,sL.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sL.jsx)(yx.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})});var _x=l(q()),lL=l(x()),cL=(0,lL.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lL.jsx)(_x.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})});var Sx=l(q()),uL=l(x()),dL=(0,uL.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uL.jsx)(Sx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});var xx=l(q()),fL=l(x()),mL=(0,fL.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fL.jsx)(xx.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})});var wx=l(q()),pL=l(x()),rl=(0,pL.jsx)(wx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,pL.jsx)(wx.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"})});var Cx=l(q()),hL=l(x()),qi=(0,hL.jsx)(Cx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,hL.jsx)(Cx.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});var Bx=l(q()),gL=l(x()),bL=(0,gL.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Bx.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})});var Ex=l(q()),kL=l(x()),vL=(0,kL.jsx)(Ex.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,kL.jsx)(Ex.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})});var Tx=l(q()),yL=l(x()),_L=(0,yL.jsx)(Tx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,yL.jsx)(Tx.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})});var ll=l(Vo()),Sn=l(Oe()),Ie=l(D());var Az=l($()),Lz=l(Sz());var Xt="core/block-editor";var Ox={};Ns(Ox,{getAllPatterns:()=>Kfe,getBlockRemovalRules:()=>zfe,getBlockSettings:()=>wz,getBlockStyles:()=>eme,getBlockWithoutAttributes:()=>Mfe,getClosestAllowedInsertionPoint:()=>Ez,getClosestAllowedInsertionPointForPattern:()=>ome,getContentLockingParent:()=>SL,getEditedContentOnlySection:()=>xL,getEnabledBlockParents:()=>Vfe,getEnabledClientIdsTree:()=>Dfe,getExpandedBlock:()=>Qfe,getInserterMediaCategories:()=>Gfe,getInsertionPoint:()=>rme,getLastFocus:()=>Zfe,getLastInsertedBlocksClientIds:()=>Lfe,getOpenedBlockSettingsMenu:()=>jfe,getParentSectionBlock:()=>Hk,getPatternBySlug:()=>$fe,getRegisteredInserterMediaCategories:()=>Hfe,getRemovalPromptData:()=>Ffe,getReusableBlocks:()=>Yfe,getSectionRootClientId:()=>cf,getStyleOverrides:()=>Ufe,getZoomLevel:()=>tme,hasAllowedPatterns:()=>Wfe,hasBlockSpotlight:()=>ime,isBlockHidden:()=>nme,isBlockInterfaceHidden:()=>Afe,isBlockSubtreeDisabled:()=>Nfe,isContainerInsertableToInContentOnlyMode:()=>Uk,isDragging:()=>Xfe,isEditLockedBlock:()=>Tz,isLockedBlock:()=>sme,isMoveLockedBlock:()=>Iz,isRemoveLockedBlock:()=>Pz,isSectionBlock:()=>il,isWithinEditedContentOnlySection:()=>Jfe,isZoomOut:()=>wL});var Er=l(D()),Px=l($());var Ix=l($()),xz=l(nt());function pe(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var nl=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var Ife=["color","border","dimensions","typography","spacing"],Pfe={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>e.disableCustomColors===void 0?void 0:!e.disableCustomColors,"color.customGradient":e=>e.disableCustomGradients===void 0?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>e.disableCustomFontSizes===void 0?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(e.enableCustomUnits!==void 0)return e.enableCustomUnits===!0?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},Ofe={"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"},Rfe=e=>Ofe[e]||e;function wz(e,t,...o){let r=lo(e,t),n=[];if(t){let i=t;do{let s=lo(e,i);(0,Ix.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(Ife.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,xz.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=Rfe(i);for(let d of n){let f=ri(e,d);if(s=nl(f.settings?.blocks?.[r],a)??nl(f.settings,a),s!==void 0)break}let c=Mc(e);if(s===void 0&&r&&(s=nl(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=nl(c.__experimentalFeatures,a)),s!==void 0)return Ix.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=Pfe[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:Cz}=z(Px.privateApis);function Afe(e){return e.isBlockInterfaceHidden}function Lfe(e){return e?.lastBlockInserted?.clientIds}function Mfe(e,t){return e.blocks.byClientId.get(t)}var Nfe=(e,t)=>{let o=r=>ni(e,r)==="disabled"&&Qr(e,r).every(o);return Qr(e,t).every(o)};function Uk(e,t,o){let r=Cz(t),n=lo(e,o),i=Cz(n);return cf(e)===o||i&&r}function Bz(e,t){let o=Qr(e,t),r=[];for(let n of o){let i=Bz(e,n);ni(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var Dfe=(0,Er.createRegistrySelector)(()=>(0,Er.createSelector)(Bz,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blockEditingModes])),Vfe=(0,Er.createSelector)((e,t,o=!1)=>sl(e,t,o).filter(r=>ni(e,r)!=="disabled"),e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function Ffe(e){return e.removalPromptData}function zfe(e){return e.blockRemovalRules}function jfe(e){return e.openedBlockSettingsMenu}var Ufe=(0,Er.createSelector)(e=>{let o=wp(e).reduce((r,n,i)=>(r[n]=i,r),{});return[...e.styleOverrides].sort((r,n)=>{let[,{clientId:i}]=r,[,{clientId:s}]=n,a=o[i]??-1,c=o[s]??-1;return a-c})},e=>[e.blocks.order,e.styleOverrides]);function Hfe(e){return e.registeredInserterMediaCategories}var Gfe=(0,Er.createSelector)(e=>{let{settings:{inserterMediaCategories:t,allowedMimeTypes:o,enableOpenverseMediaCategory:r},registeredInserterMediaCategories:n}=e;if(!t&&!n.length||!o)return;let i=t?.map(({name:a})=>a)||[];return[...t||[],...(n||[]).filter(({name:a})=>!i.includes(a))].filter(a=>!r&&a.name==="openverse"?!1:Object.values(o).some(c=>c.startsWith(`$a.mediaType}/`)))},e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories]),Wfe=(0,Er.createRegistrySelector)(e=>(0,Er.createSelector)((t,o=null)=>{let{getAllPatterns:r}=z(e(Xt)),n=r(),{allowedBlockTypes:i}=Mc(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=lf(s);return Wk(c,i)&&c.every(({name:u})=>uf(t,u,o))})},(t,o)=>[...$k(e)(t),...Nc(e)(t,o)])),$fe=(0,Er.createRegistrySelector)(e=>(0,Er.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=z(e(Xt)).getReusableBlocks().find(({id:i})=>i===r);return n?Gk(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[Bc]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[z(e(Xt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[Bc]?.(e)])),Kfe=(0,Er.createRegistrySelector)(e=>(0,Er.createSelector)(t=>[...z(e(Xt)).getReusableBlocks().map(o=>Gk(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[Bc]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),$k(e))),qfe=[],Yfe=(0,Er.createRegistrySelector)(e=>t=>{let o=t.settings[IS];return(o?o(e):t.settings.__experimentalReusableBlocks)??qfe});function Zfe(e){return e.lastFocus}function Xfe(e){return e.isDragging}function Qfe(e){return e.expandedBlock}var SL=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)Fs(e,o)==="contentOnly"&&(r=o);return r},Hk=(e,t)=>{let o=t,r;for(;o=e.blocks.parents.get(o);)il(e,o)&&(r=o);return r};function il(e,t){if(t===e.editedContentOnlySection)return!1;let o=lo(e,t);if(o==="core/block")return!0;let r=ri(e,t),n=o==="core/template-part",i=e.settings?.[up];if((r?.metadata?.patternName||n)&&window?.__experimentalContentOnlyPatternInsertion&&!i)return!0;let s=Fs(e,t)==="contentOnly",a=ko(e,t),c=Fs(e,a)==="contentOnly";return!!(s&&!c)}function xL(e){return e.editedContentOnlySection}function Jfe(e,t){if(!e.editedContentOnlySection)return!1;if(e.editedContentOnlySection===t)return!0;let o=t;for(;o=e.blocks.parents.get(o);)if(e.editedContentOnlySection===o)return!0;return!1}var eme=(0,Er.createSelector)((e,t)=>t.reduce((o,r)=>(o[r]=e.blocks.attributes.get(r)?.style,o),{}),(e,t)=>[...t.map(o=>e.blocks.attributes.get(o)?.style)]);function cf(e){return e.settings?.[Ec]}function wL(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function tme(e){return e.zoomLevel}function Ez(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>uf(e,a,s));if(!o){if(n(o))return o;let s=cf(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=ko(e,i);return i}function ome(e,t,o){let{allowedBlockTypes:r}=Mc(e);if(!Wk(lf(t),r))return null;let i=lf(t).map(({blockName:s})=>s);return Ez(e,i,o)}function rme(e){return e.insertionPoint}var nme=(e,t)=>{let o=lo(e,t);return(0,Px.hasBlockSupport)(e,o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1};function ime(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function Tz(e,t){return!!ri(e,t)?.lock?.edit}function Iz(e,t){let o=ri(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=ko(e,t);return Fs(e,r)==="all"}function Pz(e,t){let o=ri(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=ko(e,t),n=Fs(e,r);return n==="all"||n==="insert"}function sme(e,t){return Tz(e,t)||Iz(e,t)||Pz(e,t)}var qk=l(M()),Et={user:"user",theme:"theme",directory:"directory"},Kk={full:"fully",unsynced:"unsynced"},df={name:"allPatterns",label:(0,qk._x)("All","patterns")},al={name:"myPatterns",label:(0,qk.__)("My patterns")},Cp={name:"core/starter-content",label:(0,qk.__)("Starter content")};function Rx(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Et.theme&&(r||n)||t===Et.directory&&(r||!n)||t===Et.user&&e.type!==Et.user||o===Kk.full&&e.syncStatus!==""||o===Kk.unsynced&&e.syncStatus!=="unsynced"&&r)}var Dc=Symbol("isFiltered"),Oz=new WeakMap,Rz=new WeakMap;function Gk(e,t=[]){return{name:`core/block/$e.id}`,id:e.id,type:Et.user,title:e.title?.raw,categories:e.wp_pattern_category?.map(o=>{let r=t.find(({id:n})=>n===o);return r?r.slug:o}),content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}}function ame(e){let t=(0,Az.parse)(e.content,{__unstableSkipMigrationLogs:!0});return t.length===1&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}function Ax(e){let t=Oz.get(e);return t||(t=ame(e),Oz.set(e,t)),t}function lf(e){let t=Rz.get(e);return t||(t=(0,Lz.parse)(e.content),t=t.filter(o=>o.blockName!==null),Rz.set(e,t)),t}var ff=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,Wk=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!ff(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},$k=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[Bc]?.(e),t.blockPatterns,z(e(Xt)).getReusableBlocks()],Nc=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,ni(e,t),cf(e),il(e,t)];var lme=(e,t,o)=>(r,n)=>{let i,s;if(typeof e=="function"?(i=e(r),s=e(n)):(i=r[e],s=n[e]),i>s)return o==="asc"?1:-1;if(s>i)return o==="asc"?-1:1;let a=t.findIndex(u=>u===r),c=t.findIndex(u=>u===n);return a>c?1:c>a?-1:0};function zs(e,t,o="asc"){return e.concat().sort(lme(t,e,o))}var{isContentBlock:BL}=z(De.privateApis),cme=3600*1e3,ume=24*3600*1e3,dme=168*3600*1e3,Jo=[],fme=new Set,Vz={[Dc]:!0};function lo(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(Nz.Platform.OS!=="web"&&o?.name===r){let n=e.blocks.attributes.get(t),{service:i}=n??{};return i?`$r}-$i}`:r}return o?o.name:null}function mme(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function ri(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function cl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var pme=(0,Ie.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:ri(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function hme(e,t){let o=!t||!Mx(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||Jo}var Fz=(0,Ie.createSelector)((e,t)=>((0,Sn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:zz(e,t)}),e=>[e.blocks.order]),zz=(0,Ie.createSelector)((e,t="")=>((0,Sn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),Qr(e,t).map(o=>Fz(e,o))),e=>[e.blocks.order]),jz=(0,Ie.createSelector)((e,t)=>{t=Array.isArray(t)?[...t]:[t];let o=[];for(let n of t){let i=e.blocks.order.get(n);i&&o.push(...i)}let r=0;for(;r<o.length;){let n=o[r],i=e.blocks.order.get(n);i&&o.splice(r+1,0,...i),r++}return o},e=>[e.blocks.order]),wp=e=>jz(e,""),gme=(0,Ie.createSelector)((e,t)=>{let o=wp(e);if(!t)return o.length;let r=0;for(let n of o)e.blocks.byClientId.get(n).name===t&&r++;return r},e=>[e.blocks.order,e.blocks.byClientId]),Uz=(0,Ie.createSelector)((e,t)=>{if(!t)return Jo;let o=Array.isArray(t)?t:[t],n=wp(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:Jo},e=>[e.blocks.order,e.blocks.byClientId]);function bme(e,t){return(0,Sn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),Uz(e,t)}var Lx=(0,Ie.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>cl(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),kme=(0,Ie.createSelector)((e,t)=>Lx(e,t).filter(Boolean).map(o=>o.name),(e,t)=>Lx(e,t));function vme(e,t){return Qr(e,t).length}function Zk(e){return e.selection.selectionStart}function Xk(e){return e.selection.selectionEnd}function yme(e){return e.selection.selectionStart.clientId}function _me(e){return e.selection.selectionEnd.clientId}function Sme(e){let t=Vc(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function xme(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function Bp(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function wme(e){let t=Bp(e);return t?cl(e,t):null}function ko(e,t){return e.blocks.parents.get(t)??null}var sl=(0,Ie.createSelector)((e,t,o=!1)=>{let r=[],n=t;for(;n=e.blocks.parents.get(n);)r.push(n);return r.length?o?r:r.reverse():Jo},e=>[e.blocks.parents]),EL=(0,Ie.createSelector)((e,t,o,r=!1)=>{let n=sl(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(lo(e,s)))},e=>[e.blocks.parents]);function Cme(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function Bme(e,t){let o=Bp(e),r=[...sl(e,t),t],n=[...sl(e,o),o],i,s=Math.min(r.length,n.length);for(let a=0;a<s&&r[a]===n[a];a++)i=r[a];return i}function TL(e,t,o=1){if(t===void 0&&(t=Bp(e)),t===void 0&&(o<0?t=IL(e):t=Hz(e)),!t)return null;let r=ko(e,t);if(r===null)return null;let{order:n}=e.blocks,i=n.get(r),a=i.indexOf(t)+1*o;return a<0||a===i.length?null:i[a]}function Eme(e,t){return TL(e,t,-1)}function Tme(e,t){return TL(e,t,1)}function Ime(e){return e.initialPosition}var Ep=(0,Ie.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return Jo;if(t.clientId===o.clientId)return[t.clientId];let r=ko(e,t.clientId);if(r===null)return Jo;let n=Qr(e,r),i=n.indexOf(t.clientId),s=n.indexOf(o.clientId);return i>s?n.slice(s,i+1):n.slice(i,s+1)},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function Vc(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?Jo:Ep(e)}var Pme=(0,Ie.createSelector)(e=>{let t=Vc(e);return t.length?t.map(o=>cl(e,o)):Jo},e=>[...Ep.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function IL(e){return Vc(e)[0]||null}function Hz(e){let t=Vc(e);return t[t.length-1]||null}function Ome(e,t){return IL(e)===t}function Gz(e,t){return Vc(e).indexOf(t)!==-1}var Rme=(0,Ie.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=ko(e,o),r=Gz(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function Ame(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function Lme(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function Mme(e){let t=Zk(e),o=Xk(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function Nme(e){let t=Zk(e),o=Xk(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function Dme(e){return Ep(e).some(t=>{let o=lo(e,t);return!(0,De.getBlockType)(o).merge})}function Vme(e,t){let o=Zk(e),r=Xk(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=ko(e,o.clientId),i=ko(e,r.clientId);if(n!==i)return!1;let s=Qr(e,n),a=s.indexOf(o.clientId),c=s.indexOf(r.clientId),u,d;a>c?(u=r,d=o):(u=o,d=r);let f=t?d.clientId:u.clientId,m=t?u.clientId:d.clientId,p=lo(e,f);if(!(0,De.getBlockType)(p).merge)return!1;let g=cl(e,m);if(g.name===p)return!0;let b=(0,De.switchToBlockType)(g,p);return b&&b.length}var Fme=e=>{let t=Zk(e),o=Xk(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return Jo;let r=ko(e,t.clientId),n=ko(e,o.clientId);if(r!==n)return Jo;let i=Qr(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=cl(e,c.clientId),f=cl(e,u.clientId),m=d.attributes[c.attributeKey],p=f.attributes[u.attributeKey],h=(0,ll.create)({html:m}),g=(0,ll.create)({html:p});return h=(0,ll.remove)(h,0,c.offset),g=(0,ll.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,ll.toHTMLString)({value:h})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,ll.toHTMLString)({value:g})}}]};function Qr(e,t){return e.blocks.order.get(t||"")||Jo}function Wz(e,t){let o=ko(e,t);return Qr(e,o).indexOf(t)}function $z(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function Kz(e,t,o=!1){let r=Ep(e);return r.length?o?r.some(n=>sl(e,n,!0).includes(t)):r.some(n=>ko(e,n)===t):!1}function qz(e,t,o=!1){return Qr(e,t).some(r=>PL(e,r)||o&&qz(e,r,o))}function zme(e,t){if(!t)return!1;let o=Vc(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function jme(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function Ume(e){return e.isMultiSelecting}function Hme(e){return e.isSelectionEnabled}function Gme(e,t){return e.blocksMode[t]||"visual"}function Wme(e){return e.isTyping}function Yz(e){return!!e.draggedBlocks.length}function $me(e){return e.draggedBlocks}function PL(e,t){return e.draggedBlocks.includes(t)}function Kme(e,t){return Yz(e)?sl(e,t).some(r=>PL(e,r)):!1}function qme(){return(0,Sn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var Yme=(0,Ie.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=ko(e,i)||void 0,o=Wz(e,n.clientId)+1):o=Qr(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Zme(e){return e.insertionCue!==null}function Xme(e){return e.template.isValid}function Qme(e){return e.settings.template}function Fs(e,t){if(!t)return e.settings.templateLock??!1;let o=NL(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var OL=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,De.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=Mc(e);if(!ff(i,n,!0))return!1;let a=(Array.isArray(r.parent)?r.parent:[]).concat(Array.isArray(r.ancestor)?r.ancestor:[]);if(a.length>0){if(a.includes("core/post-content"))return!0;let c=o,u=!1;do{if(a.includes(lo(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},Qk=(e,t,o=null)=>{if(!OL(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,De.getBlockType)(t);let n=Fs(e,o);if(n&&n!=="contentOnly")return!1;let i=ni(e,o??"");if(i==="disabled")return!1;let s=NL(e,o);if(o&&s===void 0)return!1;let a=BL(t),c=!!il(e,o),u=!!Hk(e,o);if((c||u)&&!a||(c||i==="contentOnly")&&!Uk(e,t,o))return!1;let d=lo(e,o),m=(0,De.getBlockType)(d)?.allowedBlocks,p=ff(m,t);if(p!==!1){let v=s?.allowedBlocks,S=ff(v,t);S!==null&&(p=S)}let h=r.parent,g=ff(h,d),b=!0,k=r.ancestor;k&&(b=[o,...sl(e,o)].some(S=>ff(k,lo(e,S))));let y=b&&(p===null&&g===null||p===!0||g===!0);return y&&(0,Dz.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:cl.bind(null,e),getBlockParentsByBlockName:EL.bind(null,e)})},uf=(0,Ie.createRegistrySelector)(e=>(0,Ie.createSelector)(Qk,(t,o,r)=>Nc(e)(t,r)));function Jme(e,t,o=null){return t.every(r=>uf(e,lo(e,r),o))}function RL(e,t){let o=ri(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=ko(e,t),n=Fs(e,r);if(n&&n!=="contentOnly")return!1;let i=!!Hk(e,t),s=BL(lo(e,t));if(i&&!s)return!1;let a=!!il(e,r),c=ni(e,r);return(a||c==="contentOnly")&&!Uk(e,lo(e,t),r)?!1:c!=="disabled"}function Zz(e,t){return t.every(o=>RL(e,o))}function Xz(e,t){let o=ri(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=ko(e,t);if(Fs(e,r)==="all")return!1;let i=!!Hk(e,t),s=BL(lo(e,t));if(i&&!s)return!1;let a=!!il(e,r),c=ni(e,r);return(a||c==="contentOnly")&&!Uk(e,lo(e,t),r)?!1:ni(e,r)!=="disabled"}function epe(e,t){return t.every(o=>Xz(e,o))}function Qz(e,t){let o=ri(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function tpe(e,t){return(0,De.hasBlockSupport)(t,"lock",!0)?!!e.settings?.canLockBlocks:!1}function AL(e,t){return e.preferences.insertUsage?.[t]??null}var Yk=(e,t,o)=>(0,De.hasBlockSupport)(t,"inserter",!0)?Qk(e,t.name,o):!1,ope=(e,t)=>o=>{let r=`$t.id}/$o.name}`,{time:n,count:i=0}=AL(e,r)||{};return{...t,id:r,icon:o.icon||t.icon,title:o.title||t.title,description:o.description||t.description,category:o.category||t.category,example:o.hasOwnProperty("example")?o.example:t.example,initialAttributes:{...t.initialAttributes,...o.attributes},innerBlocks:o.innerBlocks,keywords:o.keywords||t.keywords,frecency:LL(n,i),isSearchOnly:o.isSearchOnly}},LL=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<cme:return t*4;case o<ume:return t*2;case o<dme:return t/2;default:return t/4}},Jz=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,De.hasBlockSupport)(o.name,"multiple",!0)||(n=Lx(e,wp(e)).some(({name:m})=>m===o.name));let{time:i,count:s=0}=AL(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:LL(i,s)};if(t==="transform")return a;let c=(0,De.getBlockVariations)(o.name,"inserter"),u=(0,De.getBlockVariations)(o.name,"block"),d=new Set(c.map(m=>m.name)),f=[...c,...u.filter(m=>!d.has(m.name)).map(m=>({...m,isSearchOnly:!0,isDefault:!1}))];return{...a,initialAttributes:{},description:o.description,category:o.category,keywords:o.keywords,parent:o.parent,ancestor:o.ancestor,variations:f,example:o.example,utility:1}},rpe=(0,Ie.createRegistrySelector)(e=>(0,Ie.createSelector)((t,o=null,r=Vz)=>{let n=p=>{let h=p.wp_pattern_sync_status?oi:{src:oi,foreground:"var(--wp-block-synced-color)"},g=Gk(p),{time:b,count:k=0}=AL(t,g.name)||{},y=LL(b,k);return{id:g.name,name:"core/block",initialAttributes:{ref:p.id},title:g.title,icon:h,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:y,content:g.content,get blocks(){return Ax(g).blocks},syncStatus:g.syncStatus}},i=Qk(t,"core/block",o)?z(e(Xt)).getReusableBlocks().map(n):[],s=Jz(t,{buildScope:"inserter"}),a=(0,De.getBlockTypes)().filter(p=>(0,De.hasBlockSupport)(p,"inserter",!0)).map(s);r[Dc]!==!1?a=a.filter(p=>Yk(t,p,o)):a=a.filter(p=>OL(t,p,o)).map(p=>({...p,isAllowedInCurrentRoot:Yk(t,p,o)}));let c=a.reduce((p,h)=>{let{variations:g=[]}=h;if(g.some(({isDefault:b})=>b)||p.push(h),g.length){let b=ope(t,h);p.push(...g.map(b))}return p},[]),u=(p,h)=>{let{core:g,noncore:b}=p;return(h.name.startsWith("core/")?g:b).push(h),p},{core:d,noncore:f}=c.reduce(u,{core:[],noncore:[]});return[...[...d,...f],...i]},(t,o)=>[(0,De.getBlockTypes)(),z(e(Xt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...Nc(e)(t,o)])),npe=(0,Ie.createRegistrySelector)(e=>(0,Ie.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=Jz(t,{buildScope:"transform"}),s=(0,De.getBlockTypes)().filter(u=>Yk(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,De.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return zs(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,De.getBlockTypes)(),t.preferences.insertUsage,...Nc(e)(t,r)])),ipe=(e,t=null)=>(0,De.getBlockTypes)().some(n=>Yk(e,n,t))?!0:Qk(e,"core/block",t),CL=(0,Ie.createRegistrySelector)(e=>(0,Ie.createSelector)((t,o=null)=>{if(!o)return;let r=(0,De.getBlockTypes)().filter(i=>Yk(t,i,o));return Qk(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,De.getBlockTypes)(),...Nc(e)(t,o)])),spe=(0,Ie.createSelector)((e,t=null)=>((0,Sn.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),CL(e,t)),(e,t)=>CL.getDependants(e,t));function e6(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings[t]??{};if(!(!o||!r))return o}function ape(e,t=null){return(0,Sn.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),e6(e,t)}var lpe=(0,Ie.createRegistrySelector)(e=>(t,o)=>{let r=z(e(Xt)).getPatternBySlug(o);return r?Ax(r):null}),ML=e=>(t,o)=>[...$k(e)(t),...Nc(e)(t,o)],Mz=new WeakMap;function cpe(e){let t=Mz.get(e);return t||(t={...e,get blocks(){return Ax(e).blocks}},Mz.set(e,t)),t}var upe=(0,Ie.createRegistrySelector)(e=>(0,Ie.createSelector)((t,o=null,r=Vz)=>{let{getAllPatterns:n}=z(e(Xt)),i=n(),{allowedBlockTypes:s}=Mc(t);return i.filter(({inserter:d=!0})=>!!d).map(cpe).filter(d=>Wk(lf(d),s)).filter(d=>lf(d).every(({blockName:f})=>r[Dc]!==!1?uf(t,f,o):OL(t,f,o)))},ML(e))),dpe=(0,Ie.createRegistrySelector)(e=>(0,Ie.createSelector)((t,o,r=null)=>{if(!o)return Jo;let n=e(Xt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?Jo:s},(t,o,r)=>ML(e)(t,r))),fpe=(0,Ie.createRegistrySelector)(e=>((0,Sn.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Xt).getPatternsByBlockTypes)),mpe=(0,Ie.createRegistrySelector)(e=>(0,Ie.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||Mx(t,i)))return Jo;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Xt).getPatternsByBlockTypes(n,r)},(t,o,r)=>ML(e)(t,r)));function NL(e,t){return e.blockListSettings[t]}function Mc(e){return e.settings}function ppe(e){return e.blocks.isPersistentChange}var hpe=(0,Ie.createSelector)((e,t=[])=>t.reduce((o,r)=>e.blockListSettings[r]?{...o,[r]:e.blockListSettings[r]}:o,{}),e=>[e.blockListSettings]),gpe=(0,Ie.createRegistrySelector)(e=>(0,Ie.createSelector)((t,o)=>{(0,Sn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=z(e(Xt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[z(e(Xt)).getReusableBlocks()]));function bpe(e){return e.blocks.isIgnoredChange}function kpe(e){return e.lastBlockAttributesChange}function vpe(){return(0,Sn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function ype(e){return!!e.automaticChangeStatus}function _pe(e,t){return e.highlightedBlock===t}function Mx(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Spe=(0,Ie.createSelector)((e,t)=>{if(!t.length)return null;let o=Bp(e);if(t.includes(lo(e,o)))return o;let r=Vc(e),n=EL(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function xpe(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function wpe(e,t){return e.blockVisibility?.[t]??!0}function Cpe(){(0,Sn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var Bpe=(0,Ie.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?fme:t},e=>[e.blockVisibility]);function t6(e,t){if(ni(e,t)!=="default")return!1;if(!Qz(e,t))return!0;if(wL(e)){let n=cf(e);if(n){if(Qr(e,n)?.includes(t))return!0}else if(t&&!ko(e,t))return!0}return((0,De.hasBlockSupport)(lo(e,t),"__experimentalDisableBlockOverlay",!1)?!1:Mx(e,t))&&!$z(e,t)&&!Kz(e,t,!0)}function Epe(e,t){let o=e.blocks.parents.get(t);for(;o;){if(t6(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function ni(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blockEditingModes.has(t)?e.blockEditingModes.get(t):"default"}var Tpe=(0,Ie.createRegistrySelector)(e=>(t,o="")=>{let r=o||Bp(t);if(!r||il(t,r))return!1;let{getGroupingBlockName:n}=e(De.store),i=cl(t,r),s=n();return i&&(i.name===s||(0,De.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&RL(t,r)}),Ipe=(0,Ie.createRegistrySelector)(e=>(t,o=Jo)=>{let{getGroupingBlockName:r}=e(De.store),n=r(),i=o?.length?o:Ep(t),s=i?.length?ko(t,i[0]):void 0;return uf(t,n,s)&&i.length&&Zz(t,i)}),Ppe=(e,t)=>((0,Sn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),SL(e,t));function Ope(e){return(0,Sn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),xL(e)}var Nx={};Ns(Nx,{__experimentalUpdateSettings:()=>VL,clearBlockRemovalPrompt:()=>Dpe,deleteStyleOverride:()=>jpe,editContentOnlySection:()=>zL,ensureDefaultBlock:()=>a6,expandBlock:()=>Wpe,hideBlockInterface:()=>Lpe,privateRemoveBlocks:()=>FL,resetZoomLevel:()=>Ype,setBlockRemovalRules:()=>Vpe,setInsertionPoint:()=>$pe,setLastFocus:()=>Upe,setOpenedBlockSettingsMenu:()=>Fpe,setStyleOverride:()=>zpe,setZoomLevel:()=>qpe,showBlockInterface:()=>Mpe,startDragging:()=>Hpe,stopDragging:()=>Gpe,stopEditingContentOnlySection:()=>Kpe,toggleBlockSpotlight:()=>Zpe});var r6=l(I()),n6=l(Oe()),i6=l(Fo()),s6=l(M()),Rpe=e=>Array.isArray(e)?e:[e],Ape=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function VL(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,n6.default)("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",{since:"6.8",alternative:"isPreviewMode"}),r={...r},r.isPreviewMode=r.__unstableIsPreviewMode,delete r.__unstableIsPreviewMode);let n=r;if(t&&r6.Platform.OS==="web"){n={};for(let i in r)Ape.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function Lpe(){return{type:"HIDE_BLOCK_INTERFACE"}}function Mpe(){return{type:"SHOW_BLOCK_INTERFACE"}}var FL=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=Rpe(e),!r.canRemoveBlocks(e)))return;let a=!o&&r.getBlockRemovalRules();if(a){let u=function(p){let h=[],g=[...p];for(;g.length;){let{innerBlocks:b,...k}=g.shift();g.push(...b),h.push(k)}return h};var c=u;let d=e.map(r.getBlock),f=u(d),m;for(let p of a)if(m=p.callback(f),m){n(Npe(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(a6())})},a6=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function Npe(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function Dpe(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Vpe(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Fpe(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function zpe(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function jpe(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function Upe(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function Hpe(){return{type:"START_DRAGGING"}}function Gpe(){return{type:"STOP_DRAGGING"}}function Wpe(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function $pe(e){return{type:"SET_INSERTION_POINT",value:e}}function zL(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function Kpe(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var qpe=(e=100)=>({select:t,dispatch:o})=>{if(e!==100){let r=t.getBlockSelectionStart(),n=t.getSectionRootClientId();if(r){let i;if(n){let s=t.getBlockOrder(n);s?.includes(r)?i=r:i=t.getBlockParents(r).find(a=>s.includes(a))}else i=t.getBlockHierarchyRootClientId(r);i?o.selectBlock(i):o.clearSelectedBlock(),(0,i6.speak)((0,s6.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function Ype(){return{type:"RESET_ZOOM_LEVEL"}}function Zpe(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}var HL={};Ns(HL,{__unstableDeleteSelection:()=>yhe,__unstableExpandSelection:()=>She,__unstableMarkAutomaticChange:()=>zhe,__unstableMarkLastChangeAsPersistent:()=>Vhe,__unstableMarkNextChangeAsNotPersistent:()=>Fhe,__unstableSaveReusableBlock:()=>Dhe,__unstableSetEditorMode:()=>jhe,__unstableSetTemporarilyEditingAsBlocks:()=>Yhe,__unstableSplitSelection:()=>_he,clearSelectedBlock:()=>che,duplicateBlocks:()=>Hhe,enterFormattedText:()=>Ohe,exitFormattedText:()=>Rhe,flashBlock:()=>$he,hideInsertionPoint:()=>bhe,hoverBlock:()=>rhe,insertAfterBlock:()=>Whe,insertBeforeBlock:()=>Ghe,insertBlock:()=>hhe,insertBlocks:()=>b6,insertDefaultBlock:()=>Lhe,mergeBlocks:()=>xhe,moveBlockToPosition:()=>phe,moveBlocksDown:()=>fhe,moveBlocksToPosition:()=>g6,moveBlocksUp:()=>mhe,multiSelect:()=>lhe,receiveBlocks:()=>Jpe,registerInserterMediaCategory:()=>Zhe,removeBlock:()=>whe,removeBlocks:()=>k6,replaceBlock:()=>dhe,replaceBlocks:()=>p6,replaceInnerBlocks:()=>Che,resetBlocks:()=>Xpe,resetSelection:()=>Qpe,selectBlock:()=>ohe,selectNextBlock:()=>ihe,selectPreviousBlock:()=>nhe,selectionChange:()=>Ahe,setBlockEditingMode:()=>Xhe,setBlockMovingClientId:()=>Uhe,setBlockVisibility:()=>qhe,setHasControlledInnerBlocks:()=>Khe,setTemplateValidity:()=>khe,showInsertionPoint:()=>ghe,startDraggingBlocks:()=>Ihe,startMultiSelect:()=>she,startTyping:()=>Ehe,stopDraggingBlocks:()=>Phe,stopMultiSelect:()=>ahe,stopTyping:()=>The,synchronizeTemplate:()=>vhe,toggleBlockHighlight:()=>UL,toggleBlockMode:()=>Bhe,toggleSelection:()=>uhe,unsetBlockEditingMode:()=>Qhe,updateBlock:()=>the,updateBlockAttributes:()=>ehe,updateBlockListSettings:()=>Mhe,updateSettings:()=>Nhe,validateBlocksToTemplate:()=>m6});var ge=l($()),Dx=l(Fo()),Fc=l(M()),d6=l(ii()),it=l(Vo()),zc=l(Oe()),f6=l(Tp());var u6=l(Vo()),ul="\x86";function Jk(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof u6.RichTextData)&&o.toString().indexOf(ul)!==-1})}function jL(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var Ip=e=>Array.isArray(e)?e:[e],Xpe=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(m6(e))},m6=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,ge.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function Qpe(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function Jpe(e){return(0,zc.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function ehe(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Ip(e),attributes:t,options:o}}function the(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function ohe(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function rhe(){return(0,zc.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var nhe=(e,t=!1)=>({select:o,dispatch:r})=>{let n=o.getPreviousBlockClientId(e);if(n)r.selectBlock(n,-1);else if(t){let i=o.getBlockRootClientId(e);i&&r.selectBlock(i,-1)}},ihe=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function she(){return{type:"START_MULTI_SELECT"}}function ahe(){return{type:"STOP_MULTI_SELECT"}}var lhe=(e,t,o=0)=>({select:r,dispatch:n})=>{let i=r.getBlockRootClientId(e),s=r.getBlockRootClientId(t);if(i!==s)return;n({type:"MULTI_SELECT",start:e,end:t,initialPosition:o});let a=r.getSelectedBlockCount();(0,Dx.speak)((0,Fc.sprintf)((0,Fc._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function che(){return{type:"CLEAR_SELECTED_BLOCK"}}function uhe(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var p6=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=Ip(e),t=Ip(t);let c=i.getBlockRootClientId(e[0]);for(let u=0;u<t.length;u++){let d=t[u];if(!i.canInsertBlockType(d.name,c))return}a.batch(()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:o,initialPosition:r,meta:n}),s.ensureDefaultBlock()})};function dhe(e,t){return p6(e,t)}var h6=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:Ip(t),rootClientId:o})},fhe=h6("MOVE_BLOCKS_DOWN"),mhe=h6("MOVE_BLOCKS_UP"),g6=(e,t="",o="",r)=>({select:n,dispatch:i})=>{n.canMoveBlocks(e)&&(t!==o&&(!n.canRemoveBlocks(e)||!n.canInsertBlocks(e,o))||i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:o,clientIds:e,index:r}))};function phe(e,t="",o="",r){return g6([e],t,o,r)}function hhe(e,t,o,r,n){return b6([e],t,o,r,0,n)}var b6=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,zc.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=Ip(e);let c=[];for(let u of e)s.canInsertBlockType(u.name,o)&&c.push(u);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:o,time:Date.now(),updateSelection:r,initialPosition:r?n:null,meta:i})};function ghe(e,t,o={}){let{__unstableWithInserter:r,operation:n,nearestSide:i}=o;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r,operation:n,nearestSide:i}}var bhe=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function khe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var vhe=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,ge.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},yhe=e=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd();if(n.clientId===i.clientId)return;if(!n.attributeKey||!i.attributeKey||typeof n.offset>"u"||typeof i.offset>"u")return!1;let s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let p=e?m:f,h=o.getBlock(p.clientId),g=(0,ge.getBlockType)(h.name);if(!g.merge)return;let b=f,k=m,y=o.getBlock(b.clientId),v=o.getBlock(k.clientId),S=y.attributes[b.attributeKey],w=v.attributes[k.attributeKey],C=(0,it.create)({html:S}),E=(0,it.create)({html:w});C=(0,it.remove)(C,b.offset,C.text.length),E=(0,it.insert)(E,ul,0,k.offset);let P=(0,ge.cloneBlock)(y,{[b.attributeKey]:(0,it.toHTMLString)({value:C})}),R=(0,ge.cloneBlock)(v,{[k.attributeKey]:(0,it.toHTMLString)({value:E})}),B=e?P:R,T=y.name===v.name?[B]:(0,ge.switchToBlockType)(B,g.name);if(!T||!T.length)return;let A;if(e){let Q=T.pop();A=g.merge(Q.attributes,R.attributes)}else{let Q=T.shift();A=g.merge(P.attributes,Q.attributes)}let L=Jk(A),U=A[L],G=(0,it.create)({html:U}),j=G.text.indexOf(ul),N=(0,it.remove)(G,j,j+1),F=(0,it.toHTMLString)({value:N});A[L]=F;let K=o.getSelectedBlockClientIds(),Z=[...e?T:[],{...h,attributes:{...h.attributes,...A}},...e?[]:T];t.batch(()=>{r.selectionChange(h.clientId,L,j,j),r.replaceBlocks(K,Z,0,o.getSelectedBlocksInitialCaretPosition())})},_he=(e=[])=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd(),s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let p=f,h=m,g=o.getBlock(p.clientId),b=o.getBlock(h.clientId),k=(0,ge.getBlockType)(g.name),y=(0,ge.getBlockType)(b.name),v=typeof p.attributeKey=="string"?p.attributeKey:jL(k),S=typeof h.attributeKey=="string"?h.attributeKey:jL(y),w=o.getBlockAttributes(p.clientId);if(w?.metadata?.bindings?.[v]){if(e.length){let{createWarningNotice:ee}=t.dispatch(d6.store);ee((0,Fc.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(p.clientId);return}if(!v||!S||typeof n.offset>"u"||typeof i.offset>"u")return;if(p.clientId===h.clientId&&v===S&&p.offset===h.offset){if(e.length){if((0,ge.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([p.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(p.clientId).length){let ee=function(){let de=(0,ge.getDefaultBlockName)();return o.canInsertBlockType(de,s)?(0,ge.createBlock)(de):(0,ge.createBlock)(o.getBlockName(p.clientId))};var E=ee;let ie=w[v].length;if(p.offset===0&&ie){r.insertBlocks([ee()],o.getBlockIndex(p.clientId),s,!1);return}if(p.offset===ie){r.insertBlocks([ee()],o.getBlockIndex(p.clientId)+1,s);return}}}let P=g.attributes[v],R=b.attributes[S],B=(0,it.create)({html:P}),T=(0,it.create)({html:R});B=(0,it.remove)(B,p.offset,B.text.length),T=(0,it.remove)(T,0,h.offset);let A={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[v]:(0,it.toHTMLString)({value:B})}},L={...b,clientId:g.clientId===b.clientId?(0,ge.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[S]:(0,it.toHTMLString)({value:T})}},U=(0,ge.getDefaultBlockName)();if(g.clientId===b.clientId&&U&&L.name!==U&&o.canInsertBlockType(U,s)){let ee=(0,ge.switchToBlockType)(L,U);ee?.length===1&&(L=ee[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[A,L]);return}let G,j=[],N=[...e],F=N.shift(),K=(0,ge.getBlockType)(A.name),Z=K.merge&&F.name===K.name?[F]:(0,ge.switchToBlockType)(F,K.name);if(Z?.length){let ee=Z.shift();A={...A,attributes:{...A.attributes,...K.merge(A.attributes,ee.attributes)}},j.push(A),G={clientId:A.clientId,attributeKey:v,offset:(0,it.create)({html:A.attributes[v]}).text.length},N.unshift(...Z)}else(0,ge.isUnmodifiedBlock)(A)||j.push(A),j.push(F);let Q=N.pop(),J=(0,ge.getBlockType)(L.name);if(N.length&&j.push(...N),Q){let ee=J.merge&&J.name===Q.name?[Q]:(0,ge.switchToBlockType)(Q,J.name);if(ee?.length){let ie=ee.pop();j.push({...L,attributes:{...L.attributes,...J.merge(ie.attributes,L.attributes)}}),j.push(...ee),G={clientId:L.clientId,attributeKey:S,offset:(0,it.create)({html:ie.attributes[S]}).text.length}}else j.push(Q),(0,ge.isUnmodifiedBlock)(L)||j.push(L)}else(0,ge.isUnmodifiedBlock)(L)||j.push(L);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),j,j.length-1,0),G&&r.selectionChange(G.clientId,G.attributeKey,G.offset,G.offset)})},She=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},xhe=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,ge.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,ge.getBlockSupport)(a.name,"__experimentalOnMerge")){let w=(0,ge.switchToBlockType)(u,c.name);if(w?.length!==1){n.selectBlock(a.clientId);return}let[C]=w;if(C.innerBlocks.length<1){n.selectBlock(a.clientId);return}o.batch(()=>{n.insertBlocks(C.innerBlocks,void 0,i),n.removeBlock(s),n.selectBlock(C.innerBlocks[0].clientId);let E=r.getNextBlockClientId(i);if(E&&r.getBlockName(i)===r.getBlockName(E)){let P=r.getBlockAttributes(i),R=r.getBlockAttributes(E);Object.keys(P).every(B=>P[B]===R[B])&&(n.moveBlocksToPosition(r.getBlockOrder(E),E,i),n.removeBlock(E,!1))}});return}if((0,ge.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,ge.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,ge.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,ge.getBlockType)(u.name),{clientId:f,attributeKey:m,offset:p}=r.getSelectionStart(),g=(f===i?c:d).attributes[m],b=(f===i||f===s)&&m!==void 0&&p!==void 0&&!!g;g||(typeof m=="number"?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 m}`):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));let k=(0,ge.cloneBlock)(a),y=(0,ge.cloneBlock)(u);if(b){let w=f===i?k:y,C=w.attributes[m],E=(0,it.insert)((0,it.create)({html:C}),ul,p,p);w.attributes[m]=(0,it.toHTMLString)({value:E})}let v=a.name===u.name?[y]:(0,ge.switchToBlockType)(y,a.name);if(!v||!v.length)return;let S=c.merge(k.attributes,v[0].attributes);if(b){let w=Jk(S),C=S[w],E=(0,it.create)({html:C}),P=E.text.indexOf(ul),R=(0,it.remove)(E,P,P+1),B=(0,it.toHTMLString)({value:R});S[w]=B,n.selectionChange(a.clientId,w,P,P)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,...S}},...v.slice(1)],0)},k6=(e,t=!0)=>FL(e,t);function whe(e,t){return k6([e],t)}function Che(e,t,o=!1,r=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:o,initialPosition:o?r:null,time:Date.now()}}function Bhe(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Ehe(){return{type:"START_TYPING"}}function The(){return{type:"STOP_TYPING"}}function Ihe(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Phe(){return{type:"STOP_DRAGGING_BLOCKS"}}function Ohe(){return(0,zc.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Rhe(){return(0,zc.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Ahe(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var Lhe=(e,t,o)=>({dispatch:r})=>{let n=(0,ge.getDefaultBlockName)();if(!n)return;let i=(0,ge.createBlock)(n,e);return r.insertBlock(i,o,t)};function Mhe(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Nhe(e){return VL(e,{stripExperimentalSettings:!0})}function Dhe(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Vhe(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Fhe(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var zhe=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},jhe=e=>({registry:t})=>{t.dispatch(f6.store).set("core","editorTool",e),e==="navigation"?(0,Dx.speak)((0,Fc.__)("You are currently in Write mode.")):e==="edit"&&(0,Dx.speak)((0,Fc.__)("You are currently in Design mode."))};function Uhe(){return(0,zc.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var Hhe=(e,t=!0)=>({select:o,dispatch:r})=>{if(!e||!e.length)return;let n=o.getBlocksByClientId(e);if(n.some(d=>!d)||n.map(d=>d.name).some(d=>!(0,ge.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=Ip(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,ge.__experimentalCloneSanitizedBlock)(d));return r.insertBlocks(u,c+1,s,t),u.length>1&&t&&r.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map(d=>d.clientId)},Ghe=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,ge.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i,r)},Whe=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i+1);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,ge.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i+1,r)};function UL(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var $he=(e,t=150)=>async({dispatch:o})=>{o(UL(e,!0)),await new Promise(r=>setTimeout(r,t)),o(UL(e,!1))};function Khe(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function qhe(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Yhe(e){return(0,zc.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),zL(e)}var Zhe=e=>({select:t,dispatch:o})=>{if(!e||typeof e!="object"){console.error("Category should be an `InserterMediaCategory` object.");return}if(!e.name){console.error("Category should have a `name` that should be unique among all media categories.");return}if(!e.labels?.name){console.error("Category should have a `labels.name`.");return}if(!["image","audio","video"].includes(e.mediaType)){console.error("Category should have `mediaType` property that is one of `image|audio|video`.");return}if(!e.fetch||typeof e.fetch!="function"){console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");return}let r=t.getRegisteredInserterMediaCategories();if(r.some(({name:n})=>n===e.name)){console.error(`A category is already registered with the same name: "$e.name}".`);return}if(r.some(({labels:{name:n}={}})=>n===e.labels?.name)){console.error(`A category is already registered with the same labels.name: "$e.labels.name}".`);return}o({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function Xhe(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Qhe(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}var Pp={reducer:kz,selectors:DL,actions:HL},_=(0,Vx.createReduxStore)(Xt,{...Pp,persist:["preferences"]}),v6=(0,Vx.registerStore)(Xt,{...Pp,persist:["preferences"]});z(v6).registerPrivateActions(Nx);z(v6).registerPrivateSelectors(Ox);z(_).registerPrivateActions(Nx);z(_).registerPrivateSelectors(Ox);var Op=l(O()),y6=l(M());var Yi=l(x());function Jhe({className:e,actions:t,children:o,secondaryActions:r}){return(0,Yi.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Yi.jsx)("div",{className:V(e,"block-editor-warning"),children:(0,Yi.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Yi.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Yi.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Yi.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Yi.jsx)(Op.DropdownMenu,{className:"block-editor-warning__secondary",icon:Ki,label:(0,y6.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Yi.jsx)(Op.MenuGroup,{children:r.map((n,i)=>(0,Yi.jsx)(Op.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var jc=Jhe;var Rp=l(x());function x6({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,S6.useDispatch)(_),n=(0,_6.getBlockType)(t);return(0,Rp.jsxs)(jc,{actions:[(0,Rp.jsx)(GL.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,Fx.__)("Find original")},"find-original"),(0,Rp.jsx)(GL.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,Fx.__)("Remove")},"remove")],children:[(0,Rp.jsxs)("strong",{children:[n?.title,": "]}),(0,Fx.__)("This block can only be used once.")]})}var ev=l(x());function jx({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:o,isPreviewMode:r,...n}){let{name:i,isSelected:s,clientId:a,attributes:c={},__unstableLayoutClassNames:u}=n,{layout:d=null,metadata:f={}}=c,{bindings:m}=f,p=(0,WL.hasBlockSupport)(i,"layout",!1)||(0,WL.hasBlockSupport)(i,"__experimentalLayout",!1),{originalBlockClientId:h}=(0,zx.useContext)($i);return(0,ev.jsxs)(vS,{value:(0,zx.useMemo)(()=>({name:i,isSelected:s,clientId:a,layout:p?d:null,__unstableLayoutClassNames:u,[xc]:e,[ip]:t,[bS]:o,[sp]:m,[kS]:r}),[i,s,a,p,d,u,e,t,o,m,r]),children:[(0,ev.jsx)(uz,{...n}),h&&(0,ev.jsx)(x6,{originalBlockClientId:h,name:i,onReplace:n.onReplace})]})}function fe(...e){let{clientId:t=null}=Ae();return(0,w6.useSelect)(o=>z(o(_)).getBlockSettings(t,...e),[t,...e])}function B6(e){(0,C6.default)("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});let[t]=fe(e);return t}var Hx=l(x()),{kebabCase:ege}=z(T6.privateApis),E6=([e,...t])=>e.toUpperCase()+t.join(""),tge=e=>(0,mf.createHigherOrderComponent)(t=>o=>(0,Hx.jsx)(t,{...o,colors:e}),"withCustomColorPalette"),oge=()=>(0,mf.createHigherOrderComponent)(e=>t=>{let[o,r,n]=fe("color.palette.custom","color.palette.theme","color.palette.default"),i=(0,Ux.useMemo)(()=>[...o||[],...r||[],...n||[]],[o,r,n]);return(0,Hx.jsx)(e,{...t,colors:i})},"withEditorColorPalette");function I6(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:ege(n)}:n}),{});return(0,mf.compose)([t,r=>class extends Ux.Component{constructor(n){super(n),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(n){let{colors:i}=this.props;return J4(i,n)}createSetters(){return Object.keys(o).reduce((n,i)=>{let s=E6(i),a=`custom$s}`;return n[`set$s}`]=this.createSetColor(i,a),n},{})}createSetColor(n,i){return s=>{let a=SS(this.props.colors,s);this.props.setAttributes({[n]:a&&a.slug?a.slug:void 0,[i]:a&&a.slug?void 0:s})}}static getDerivedStateFromProps({attributes:n,colors:i},s){return Object.entries(o).reduce((a,[c,u])=>{let d=Ds(i,n[c],n[`custom$E6(c)}`]),f=s[c];return f?.color===d.color&&f?a[c]=f:a[c]={...d,class:Qn(u,d.slug)},a},{})}render(){return(0,Hx.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function P6(e){return(...t)=>{let o=tge(e);return(0,mf.createHigherOrderComponent)(I6(t,o),"withCustomColors")}}function O6(...e){let t=oge();return(0,mf.createHigherOrderComponent)(I6(e,t),"withColors")}var Gx=l(I()),Wx=l(D());function Ap(e){if(e)return`has-$e}-gradient-background`}function $x(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function R6(e,t){return e?.find(r=>r.gradient===t)}function A6(e,t){let o=R6(e,t);return o&&o.slug}function rge({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Ae(),[r,n,i]=fe("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,Gx.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,Wx.useSelect)(p=>{let{getBlockAttributes:h}=p(_),g=h(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,Wx.useDispatch)(_),d=(0,Gx.useCallback)(p=>{let h=A6(s,p);if(h){u(o,{[e]:h,[t]:void 0});return}u(o,{[e]:void 0,[t]:p})},[s,o,u]),f=Ap(a),m;return a?m=$x(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var L6=l(O());var{kebabCase:nge}=z(L6.privateApis),Lp=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function $L(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function Uc(e){if(e)return`has-$nge(e)}-font-size`}var ige="1600px",sge="320px",age=1,lge=.25,cge=.75,uge="14px";function M6({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=sge,maximumViewportWidth:n=ige,scaleFactor:i=age,minimumFontSizeLimit:s}){if(s=Hc(s)?s:uge,o){let v=Hc(o);if(!v?.unit)return null;let S=Hc(s,{coerceTo:v.unit});if(S?.value&&!e&&!t&&v?.value<=S?.value)return null;if(t||(t=`$v.value}$v.unit}`),!e){let w=v.unit==="px"?v.value:v.value*16,C=Math.min(Math.max(1-.075*Math.log2(w),lge),cge),E=tv(v.value*C,3);S?.value&&E<S?.value?e=`$S.value}$S.unit}`:e=`$E}$v.unit}`}}let a=Hc(e),c=a?.unit||"rem",u=Hc(t,{coerceTo:c});if(!a||!u)return null;let d=Hc(e,{coerceTo:"rem"}),f=Hc(n,{coerceTo:c}),m=Hc(r,{coerceTo:c});if(!f||!m||!d)return null;let p=f.value-m.value;if(!p)return null;let h=tv(m.value/100,3),g=tv(h,3)+c,b=100*((u.value-a.value)/p),k=tv((b||1)*i,3),y=`$d.value}$d.unit} + ((1vw - $g}) * $k})`;return`clamp($e}, $y}, $t})`}function Hc(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`$e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)($i}){1,1}$`),a=e.match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),{value:tv(d,3),unit:u}}function tv(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var N6=l(O());var D6=l(x());function dge(e){let[t,o]=fe("typography.fontSizes","typography.customFontSize");return(0,D6.jsx)(N6.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o})}var KL=dge;var ov=l(Y()),F6=l(I());var qL=l(x()),fge=[],V6=([e,...t])=>e.toUpperCase()+t.join(""),z6=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom$V6(r)}`,o),{});return(0,ov.createHigherOrderComponent)((0,ov.compose)([(0,ov.createHigherOrderComponent)(o=>r=>{let[n]=fe("typography.fontSizes");return(0,qL.jsx)(o,{...r,fontSizes:n||fge})},"withFontSizes"),o=>class extends F6.Component{constructor(r){super(r),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((r,[n,i])=>{let s=V6(n);return r[`set$s}`]=this.createSetFontSize(n,i),r},{})}createSetFontSize(r,n){return i=>{let s=this.props.fontSizes?.find(({size:a})=>a===Number(i));this.props.setAttributes({[r]:s&&s.slug?s.slug:void 0,[n]:s&&s.slug?void 0:i})}}static getDerivedStateFromProps({attributes:r,fontSizes:n},i){let s=(c,u)=>i[u]?r[u]?r[u]!==i[u].slug:i[u].size!==r[c]:!0;if(!Object.values(t).some(s))return null;let a=Object.entries(t).filter(([c,u])=>s(u,c)).reduce((c,[u,d])=>{let f=r[u],m=Lp(n,f,r[d]);return c[u]={...m,class:Uc(f)},c},{});return{...i,...a}}render(){return(0,qL.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var Gc=l(M()),Kx=l(O());var j6=l(x()),mge=[{icon:Ic,title:(0,Gc.__)("Align text left"),align:"left"},{icon:qd,title:(0,Gc.__)("Align text center"),align:"center"},{icon:Pc,title:(0,Gc.__)("Align text right"),align:"right"}],pge={placement:"bottom-start"};function hge({value:e,onChange:t,alignmentControls:o=mge,label:r=(0,Gc.__)("Align text"),description:n=(0,Gc.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function a(m){return()=>t(e===m?void 0:m)}let c=o.find(m=>m.align===e);function u(){return c?c.icon:(0,Gc.isRTL)()?Pc:Ic}let d=s?Kx.ToolbarGroup:Kx.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:pge};return(0,j6.jsx)(d,{icon:u(),label:r,controls:o.map(m=>{let{align:p}=m;return{...m,isActive:e===p,role:i?"menuitemradio":void 0,onClick:a(p)}}),...f})}var YL=hge;var ZL=l(x()),qx=e=>(0,ZL.jsx)(YL,{...e,isToolbar:!1}),U6=e=>(0,ZL.jsx)(YL,{...e,isToolbar:!0});var tw=l(nt()),ow=l(O()),uj=l(I()),rw=l($());var tj=l(D()),$c=l($()),tM=l(I());var X6=l($6());var XL=function(e,t){return XL=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(o[n]=r[n])},XL(e,t)};function K6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");XL(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Bo=function(){return Bo=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},Bo.apply(this,arguments)};function q6(e){return e.toLowerCase()}var yge=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],_ge=/[^A-Z0-9]+/gi;function Z6(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?yge:o,n=t.stripRegexp,i=n===void 0?_ge:n,s=t.transform,a=s===void 0?q6:s,c=t.delimiter,u=c===void 0?" ":c,d=Y6(Y6(e,r,"$1\0$2"),i,"\0"),f=0,m=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(m-1)==="\0";)m--;return d.slice(f,m).split("\0").map(a).join(u)}function Y6(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var Sge=e=>e.name||"",xge=e=>e.title,wge=e=>e.description||"",Cge=e=>e.keywords||[],Bge=e=>e.category,Ege=()=>null,Tge=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],Ige=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),QL=new Map,JL=new Map;function Zx(e=""){if(QL.has(e))return QL.get(e);let t=Z6(e,{splitRegexp:Tge,stripRegexp:Ige}).split(" ").filter(Boolean);return QL.set(e,t),t}function rv(e=""){if(JL.has(e))return JL.get(e);let t=(0,X6.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),JL.set(e,t),t}var nv=(e="")=>Zx(rv(e)),Pge=(e,t)=>e.filter(o=>!nv(t).some(r=>r.includes(o))),Xx=(e,t,o,r)=>nv(r).length===0?e:iv(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),iv=(e=[],t="",o={})=>{if(nv(t).length===0)return e;let n=e.map(i=>[i,Oge(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function Oge(e,t,o={}){let{getName:r=Sge,getTitle:n=xge,getDescription:i=wge,getKeywords:s=Cge,getCategory:a=Bge,getCollection:c=Ege}=o,u=r(e),d=n(e),f=i(e),m=s(e),p=a(e),h=c(e),g=rv(t),b=rv(d),k=0;if(g===b)k+=30;else if(b.startsWith(g))k+=20;else{let y=[u,d,f,...m,p,h].join(" "),v=Zx(g);Pge(v,y).length===0&&(k+=10)}if(k!==0&&u.startsWith("core/")){let y=u!==e.id;k+=y?1:2}return k}var js=l($()),Mp=l(D()),Qx=l(I()),Q6=l(ii()),Jx=l(M());var Rge=(e,t,o)=>{let r=(0,Qx.useMemo)(()=>({[Dc]:!!o}),[o]),[n]=(0,Mp.useSelect)(d=>[d(_).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=z((0,Mp.useSelect)(_)),{createErrorNotice:s}=(0,Mp.useDispatch)(Q6.store),[a,c]=(0,Mp.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(js.store);return[f(),m()]},[]),u=(0,Qx.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:p,content:h},g)=>{let b=i(d,e);if(b===null){let y=(0,js.getBlockType)(d)?.title??d;s((0,Jx.sprintf)((0,Jx.__)(`Block "%s" can't be inserted.`),y),{type:"snackbar",id:"inserter-notice"});return}let k=p==="unsynced"?(0,js.parse)(h,{__unstableSkipMigrationLogs:!0}):(0,js.createBlock)(d,f,(0,js.createBlocksFromInnerBlocksTemplate)(m));t(k,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},Wc=Rge;var J6=l(O());var ej=l(I()),eM=l(x());function Age({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:OO});let n=(0,eM.jsx)(J6.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,eM.jsx)("span",{style:i,className:V("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Pe=(0,ej.memo)(Age);var ew=(e,t)=>(t&&e.sort(({id:o},{id:r})=>{let n=t.indexOf(o),i=t.indexOf(r);return n<0&&(n=t.length),i<0&&(i=t.length),n-i}),e);var Np=l(x()),Lge=()=>{},Mge=9;function Nge(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,tj.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:p}=u(_),{getActiveBlockVariation:h}=u($c.store),g=d(),{name:b,attributes:k}=f(g),y=h(b,k),v=p(g);return{selectedBlockId:y?`$b}/$y.name}`:b,rootClientId:v,prioritizedBlocks:m(v)?.prioritizedInserterBlocks}},[]),[n,i,s]=Wc(t,Lge,!0),a=(0,tM.useMemo)(()=>(e.trim()?Xx(n,i,s,e):ew(zs(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,Mge),[e,o,n,i,s,r]);return[(0,tM.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-$u.id}`,value:u,label:(0,Np.jsxs)(Np.Fragment,{children:[(0,Np.jsx)(Pe,{icon:f,showColors:!0},"icon"),d]}),isDisabled:m}}),[a])]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){let{name:t,initialAttributes:o,innerBlocks:r,syncStatus:n,blocks:i}=e;return{action:"replace",value:n==="unsynced"?(i??[]).map(s=>(0,$c.cloneBlock)(s)):(0,$c.createBlock)(t,o,(0,$c.createBlocksFromInnerBlocksTemplate)(r))}}}}var oj=Nge();var sj=l(nj()),aj=l(Zr());var lj=l(oM()),pf=l(x()),Dge=10;function Vge(){return{name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await(0,sj.default)({path:(0,aj.addQueryArgs)("/wp/v2/search",{per_page:Dge,search:e,type:"post",order_by:"menu_order"})});return t=t.filter(o=>o.title!==""),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,pf.jsxs)(pf.Fragment,{children:[(0,pf.jsx)(Te,{icon:e.subtype==="page"?tl:RA},"icon"),(0,lj.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,pf.jsx)("a",{href:e.url,children:e.title})}}}var cj=Vge();var dj=l(x()),Fge=[];function fj({completers:e=Fge}){let{name:t}=Ae();return(0,uj.useMemo)(()=>{let o=[...e,cj];return(t===(0,rw.getDefaultBlockName)()||(0,rw.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,oj]),(0,tw.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,tw.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function mj(e){return(0,ow.__unstableUseAutocompleteProps)({...e,completers:fj(e)})}function zge(e){return(0,dj.jsx)(ow.Autocomplete,{...e,completers:fj(e)})}var pj=zge;var aM=l(M()),Zc=l(O());var Lj=l(D());var cw=l(I());var si=l(M());var Jr=l(O());var Dp=l(M());var xn={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function wn(e,t=""){return e.split(",").map(o=>`$o}$t?` $t}`:""}`).join(",")}function Kc(e,t=xn,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`$wn(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`$s}: $a||r}`).join("; "),n+="; }"}),n}function nw(e){let{contentSize:t,wideSize:o,type:r="default"}=e,n={},i=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return i.test(t)&&r==="constrained"&&(n.none=(0,Dp.sprintf)((0,Dp.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,Dp.sprintf)((0,Dp.__)("Max %s wide"),o)),n}var Zi=l(M());var hj=8,qc=["top","right","bottom","left"],gj={top:void 0,right:void 0,bottom:void 0,left:void 0},iw={custom:mx,axial:mx,horizontal:$A,vertical:ZA,top:YA,right:qA,bottom:WA,left:KA},Us={default:(0,Zi.__)("Spacing control"),top:(0,Zi.__)("Top"),bottom:(0,Zi.__)("Bottom"),left:(0,Zi.__)("Left"),right:(0,Zi.__)("Right"),mixed:(0,Zi.__)("Mixed"),vertical:(0,Zi.__)("Vertical"),horizontal:(0,Zi.__)("Horizontal"),axial:(0,Zi.__)("Horizontal & vertical"),custom:(0,Zi.__)("Custom")},dl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function sw(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function bj(e,t){if(!sw(e))return e;let o=jge(e);return t.find(n=>String(n.slug)===o)?.size}function Vp(e,t){if(!e||sw(e)||e==="0")return e;let o=t.find(r=>String(r.size)===String(e));return o?.slug?`var:preset|spacing|$o.slug}`:e}function sv(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--$t[1]})`:e}function jge(e){if(!e)return;if(e==="0"||e==="default")return e;let t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function rM(e,t){if(!e||!e.length)return!1;let o=e.includes("horizontal")||e.includes("left")&&e.includes("right"),r=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return t==="horizontal"?o:t==="vertical"?r:o||r}function Uge(e=[]){let t={top:0,right:0,bottom:0,left:0};return e.forEach(o=>t[o]+=1),(t.top+t.bottom)%2===0&&(t.left+t.right)%2===0}function kj(e={},t){let{top:o,right:r,bottom:n,left:i}=e,s=[o,r,n,i].filter(Boolean),a=o===n&&i===r&&(!!o||!!i),c=!s.length&&Uge(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(rM(t)&&(a||c))return dl.axial;if(u&&s.length===1){let d;return Object.entries(e).some(([f,m])=>(d=f,m!==void 0)),d}return t?.length===1&&!s.length?t[0]:dl.custom}function Hge(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function Tr(e,t="0"){let o=Hge(e);if(!o)return null;let r=sv(o?.top)||t,n=sv(o?.left)||t;return r===n?r:`$r} $n}`}var Qt=l(x()),Gge={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},vj={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Wge={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},yj={horizontal:"center",vertical:"top"},$ge=["wrap","nowrap"],Sj={name:"flex",label:(0,si.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0}=r;return(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsxs)(Jr.Flex,{children:[i&&(0,Qt.jsx)(Jr.FlexItem,{children:(0,Qt.jsx)(_j,{layout:t,onChange:o})}),n&&(0,Qt.jsx)(Jr.FlexItem,{children:(0,Qt.jsx)(Zge,{layout:t,onChange:o})})]}),(0,Qt.jsx)(Yge,{layout:t,onChange:o})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowVerticalAlignment:n=!0,allowJustification:i=!0}=r;return!i&&!n?null:(0,Qt.jsxs)(mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,Qt.jsx)(_j,{layout:t,onChange:o,isToolbar:!0}),n&&(0,Qt.jsx)(Kge,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=xn}){let{orientation:a="horizontal"}=o,c=r?.spacing?.blockGap&&!qe(n,"spacing","blockGap")?Tr(r?.spacing?.blockGap,"0.5em"):void 0,u=Gge[o.justifyContent],d=$ge.includes(o.flexWrap)?o.flexWrap:"wrap",f=Wge[o.verticalAlignment],m=vj[o.justifyContent]||vj.left,p="",h=[];return d&&d!=="wrap"&&h.push(`flex-wrap: $d}`),a==="horizontal"?(f&&h.push(`align-items: $f}`),u&&h.push(`justify-content: $u}`)):(f&&h.push(`justify-content: $f}`),h.push("flex-direction: column"),h.push(`align-items: $m}`)),h.length&&(p=`$wn(t)} { 25 $h.join("; ")}; 26 }`),i&&c&&(p+=Kc(t,s,"flex",c)),p},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function Kge({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?yj.horizontal:yj.vertical,{verticalAlignment:n=r}=e;return(0,Qt.jsx)(aw,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var qge={placement:"bottom-start"};function _j({layout:e,onChange:t,isToolbar:o=!1}){let{justifyContent:r="left",orientation:n="horizontal"}=e,i=c=>{t({...e,justifyContent:c})},s=["left","center","right"];if(n==="horizontal"?s.push("space-between"):s.push("stretch"),o)return(0,Qt.jsx)(Fp,{allowedControls:s,value:r,onChange:i,popoverProps:qge});let a=[{value:"left",icon:Ac,label:(0,si.__)("Justify items left")},{value:"center",icon:Rc,label:(0,si.__)("Justify items center")},{value:"right",icon:Lc,label:(0,si.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:bp,label:(0,si.__)("Space between items")}):a.push({value:"stretch",icon:kp,label:(0,si.__)("Stretch items")}),(0,Qt.jsx)(Jr.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,si.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,Qt.jsx)(Jr.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function Yge({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,Qt.jsx)(Jr.ToggleControl,{label:(0,si.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function Zge({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,Qt.jsxs)(Jr.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,si.__)("Orientation"),value:o,onChange:i=>{let s=r,a=n;return i==="horizontal"?(r==="space-between"&&(s="center"),n==="stretch"&&(a="left")):(r==="stretch"&&(s="top"),n==="space-between"&&(a="left")),t({...e,orientation:i,verticalAlignment:s,justifyContent:a})},children:[(0,Qt.jsx)(Jr.__experimentalToggleGroupControlOptionIcon,{icon:Xd,value:"horizontal",label:(0,si.__)("Horizontal")}),(0,Qt.jsx)(Jr.__experimentalToggleGroupControlOptionIcon,{icon:xO,value:"vertical",label:(0,si.__)("Vertical")})]})}var xj=l(M());var wj={name:"default",label:(0,xj.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=xn}){let s=Tr(o?.spacing?.blockGap),a="";qe(r,"spacing","blockGap")||(s?.top?a=Tr(s?.top):typeof s=="string"&&(a=Tr(s)));let c="";return n&&a&&(c+=Kc(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=nw(e);if(e.alignments!==void 0)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map(n=>({name:n,info:o[n]}));let r=[{name:"left"},{name:"center"},{name:"right"}];if(!t){let{contentSize:n,wideSize:i}=e;n&&r.unshift({name:"full"}),i&&r.unshift({name:"wide",info:o.wide})}return r.unshift({name:"none",info:o.none}),r}};var en=l(O()),fl=l(M());var Bj=l(av());var zo=l(x()),Ej={name:"constrained",label:(0,fl.__)("Constrained"),inspectorControls:function({layout:t,onChange:o,layoutBlockSupport:r={}}){let{wideSize:n,contentSize:i,justifyContent:s="center"}=t,{allowJustification:a=!0,allowCustomContentAndWideSize:c=!0}=r,u=p=>{o({...t,justifyContent:p})},d=[{value:"left",icon:Ac,label:(0,fl.__)("Justify items left")},{value:"center",icon:Rc,label:(0,fl.__)("Justify items center")},{value:"right",icon:Lc,label:(0,fl.__)("Justify items right")}],[f]=fe("spacing.units"),m=(0,en.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,zo.jsxs)(en.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,zo.jsxs)(zo.Fragment,{children:[(0,zo.jsx)(en.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,fl.__)("Content width"),labelPosition:"top",value:i||n||"",onChange:p=>{p=0>parseFloat(p)?"0":p,o({...t,contentSize:p!==""?p:void 0})},units:m,prefix:(0,zo.jsx)(en.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,zo.jsx)(Te,{icon:Yd})})}),(0,zo.jsx)(en.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,fl.__)("Wide width"),labelPosition:"top",value:n||i||"",onChange:p=>{p=0>parseFloat(p)?"0":p,o({...t,wideSize:p!==""?p:void 0})},units:m,prefix:(0,zo.jsx)(en.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,zo.jsx)(Te,{icon:af})})}),(0,zo.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,fl.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,zo.jsx)(en.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,fl.__)("Justification"),value:s,onChange:u,children:d.map(({value:p,icon:h,label:g})=>(0,zo.jsx)(en.__experimentalToggleGroupControlOptionIcon,{value:p,icon:h,label:g},p))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,zo.jsx)(mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,zo.jsx)(Qge,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=xn}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=Tr(r?.spacing?.blockGap),f="";qe(n,"spacing","blockGap")||(d?.top?f=Tr(d?.top):typeof d=="string"&&(f=Tr(d)));let m=u==="left"?"0 !important":"auto !important",p=u==="right"?"0 !important":"auto !important",h=a||c?` 27 $wn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} { 28 max-width: $a??c}; 29 margin-left: $m}; 30 margin-right: $p}; 31 } 32 $wn(t,"> .alignwide")} { 33 max-width: $c??a}; 34 } 35 $wn(t,"> .alignfull")} { 36 max-width: none; 37 } 38 `:"";return u==="left"?h+=`$wn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} 39 { margin-left: $m}; }`:u==="right"&&(h+=`$wn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} 40 { margin-right: $p}; }`),r?.spacing?.padding&&(0,Bj.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let k=b.value==="0"?"0px":b.value;h+=` 41 $wn(t,"> .alignfull")} { 42 margin-right: calc($k} * -1); 43 } 44 `}else if(b.key==="paddingLeft"){let k=b.value==="0"?"0px":b.value;h+=` 45 $wn(t,"> .alignfull")} { 46 margin-left: calc($k} * -1); 47 } 48 `}}),i&&f&&(h+=Kc(t,s,"constrained",f)),h},getOrientation(){return"vertical"},getAlignments(e){let t=nw(e);if(e.alignments!==void 0)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map(i=>({name:i,info:t[i]}));let{contentSize:o,wideSize:r}=e,n=[{name:"left"},{name:"center"},{name:"right"}];return o&&n.unshift({name:"full"}),r&&n.unshift({name:"wide",info:t.wide}),n.unshift({name:"none",info:t.none}),n}},Xge={placement:"bottom-start"};function Qge({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,zo.jsx)(Fp,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:Xge})}var Ir=l(M()),Xe=l(O()),lw=l(I());var $e=l(x()),Jge={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},ebe=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],Tj={name:"grid",label:(0,Ir.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,$e.jsxs)($e.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,$e.jsx)(rbe,{layout:t,onChange:o}),(0,$e.jsxs)(Xe.__experimentalVStack,{spacing:4,children:[i&&(0,$e.jsx)(obe,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,$e.jsx)(tbe,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=xn}){let{minimumColumnWidth:a=null,columnCount:c=null,rowCount:u=null}=o,d=r?.spacing?.blockGap&&!qe(n,"spacing","blockGap")?Tr(r?.spacing?.blockGap,"0.5em"):void 0,f="",m=[];if(a&&c>0){let p=`max($a}, ( 100% - ($d||"1.2rem"}*$c-1}) ) / $c})`;m.push(`grid-template-columns: repeat(auto-fill, minmax($p}, 1fr))`,"container-type: inline-size"),u&&m.push(`grid-template-rows: repeat($u}, minmax(1rem, auto))`)}else c?(m.push(`grid-template-columns: repeat($c}, minmax(0, 1fr))`),u&&m.push(`grid-template-rows: repeat($u}, minmax(1rem, auto))`)):m.push(`grid-template-columns: repeat(auto-fill, minmax(min($a||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return m.length&&(f=`$wn(t)} { $m.join("; ")}; }`),i&&d&&(f+=Kc(t,s,"grid",d)),f},getOrientation(){return"horizontal"},getAlignments(){return[]}};function tbe({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,Xe.__experimentalParseQuantityAndUnitFromRawValue)(s),u=f=>{t({...e,minimumColumnWidth:[f,c].join("")})},d=f=>{let m;["em","rem"].includes(f)&&c==="px"?m=(a/16).toFixed(2)+f:["em","rem"].includes(c)&&f==="px"&&(m=Math.round(a*16)+f),t({...e,minimumColumnWidth:m})};return(0,$e.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,$e.jsx)(Xe.BaseControl.VisualLabel,{as:"legend",children:(0,Ir.__)("Min. column width")}),(0,$e.jsxs)(Xe.Flex,{gap:4,children:[(0,$e.jsx)(Xe.FlexItem,{isBlock:!0,children:(0,$e.jsx)(Xe.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:ebe,min:0,label:(0,Ir.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,$e.jsx)(Xe.FlexItem,{isBlock:!0,children:(0,$e.jsx)(Xe.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:Jge[c]||600,withInputField:!1,label:(0,Ir.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,$e.jsx)("p",{className:"components-base-control__help",children:(0,Ir.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function obe({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,$e.jsx)($e.Fragment,{children:(0,$e.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,$e.jsx)(Xe.BaseControl.VisualLabel,{as:"legend",children:(0,Ir.__)("Max. columns")}),(0,$e.jsxs)(Xe.Flex,{gap:4,children:[(0,$e.jsx)(Xe.FlexItem,{isBlock:!0,children:(0,$e.jsx)(Xe.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let u=a===""||a==="0"?s?1:void 0:parseInt(a,10);t({...e,columnCount:u})},value:n,min:1,label:(0,Ir.__)("Columns"),hideLabelFromVision:!s})}),(0,$e.jsx)(Xe.FlexItem,{isBlock:!0,children:o&&s?(0,$e.jsx)(Xe.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let c=a===""||a==="0"?1:parseInt(a,10);t({...e,rowCount:c})},value:i,min:1,label:(0,Ir.__)("Rows")}):(0,$e.jsx)(Xe.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Ir.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function rbe({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,lw.useState)(o||3),[c,u]=(0,lw.useState)(r),[d,f]=(0,lw.useState)(n||"12rem"),m=i?"manual":"auto",p=g=>{g==="manual"?f(n||"12rem"):(a(o||3),u(r)),t({...e,columnCount:s,rowCount:g==="manual"?c:void 0,isManualPlacement:g==="manual"?!0:void 0,minimumColumnWidth:g==="auto"?d:null})},h=m==="manual"?(0,Ir.__)("Grid items can be manually placed in any position on the grid."):(0,Ir.__)("Grid items are placed automatically depending on their order.");return(0,$e.jsxs)(Xe.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Ir.__)("Grid item position"),value:m,onChange:p,isBlock:!0,help:h,children:[(0,$e.jsx)(Xe.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Ir.__)("Auto")},"auto"),(0,$e.jsx)(Xe.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Ir.__)("Manual")},"manual")]})}var Ij=[wj,Sj,Ej,Tj];function Xi(e="default"){return Ij.find(t=>t.name===e)}function Pj(){return Ij}var nM=l(x()),iM={type:"default"},sM=(0,cw.createContext)(iM);sM.displayName="BlockLayoutContext";var Oj=sM.Provider;function hf(){return(0,cw.useContext)(sM)}function Rj({layout:e={},css:t,...o}){let r=Xi(e.type),[n]=fe("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,nM.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,nM.jsx)("style",{children:s})}return null}var uw=[],Aj=["none","left","center","right","wide","full"],nbe=["wide","full"];function lv(e=Aj){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,Lj.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(_).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=hf();if(t)return uw;let s=Xi(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?uw:u}if(s.name!=="default"&&s.name!=="constrained")return uw;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&nbe.includes(c)?!1:Aj.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?uw:a}var Yc=l(M());var cv={none:{icon:Yd,title:(0,Yc._x)("None","Alignment option")},left:{icon:wA,title:(0,Yc.__)("Align left")},center:{icon:SA,title:(0,Yc.__)("Align center")},right:{icon:BA,title:(0,Yc.__)("Align right")},wide:{icon:af,title:(0,Yc.__)("Wide width")},full:{icon:jk,title:(0,Yc.__)("Full width")}},Mj="none";var gf=l(x());function ibe({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=lv(o);if(!!!i.length)return null;function a(p){t([e,"none"].includes(p)?void 0:p)}let c=cv[e],u=cv[Mj],d=r?Zc.ToolbarGroup:Zc.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,aM.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:p})=>({...cv[p],isActive:e===p||!e&&p==="none",role:n?"menuitemradio":void 0,onClick:()=>a(p)}))}:{toggleProps:{description:(0,aM.__)("Change alignment")},children:({onClose:p})=>(0,gf.jsx)(gf.Fragment,{children:(0,gf.jsx)(Zc.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:h,info:g})=>{let{icon:b,title:k}=cv[h],y=h===e||!e&&h==="none";return(0,gf.jsx)(Zc.MenuItem,{icon:b,iconPosition:"left",className:V("components-dropdown-menu__menu-item",{"is-active":y}),isSelected:y,onClick:()=>{a(h),p()},role:"menuitemradio",info:g,children:k},h)})})})};return(0,gf.jsx)(d,{...f,...m})}var lM=ibe;var cM=l(x()),dw=e=>(0,cM.jsx)(lM,{...e,isToolbar:!1}),Nj=e=>(0,cM.jsx)(lM,{...e,isToolbar:!0});var jj=l(Kd()),hw=l(M()),gw=l($()),Ji=l(O()),fM=l(D()),Uj=l(I()),Hj=l(Y());var dM=l(Kd()),Dj=l($()),Vj=l(O()),Fj=l(D()),mw=l(I()),zj=l(Y());var fw=l(D());function uM(e){return!e||Object.keys(e).length===0}function ml(e){let{clientId:t}=Ae(),o=e||t,{updateBlockAttributes:r}=(0,fw.useDispatch)(_),{getBlockAttributes:n}=(0,fw.useRegistry)().select(_);return{updateBlockBindings:a=>{let{metadata:{bindings:c,...u}={}}=n(o),d={...c};Object.entries(a).forEach(([m,p])=>{if(!p&&d[m]){delete d[m];return}d[m]=p});let f={...u,bindings:d};uM(f.bindings)&&delete f.bindings,r(o,{metadata:uM(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:uM(c)?void 0:c})}}}var Qi=l(x()),{Menu:Xc}=z(Vj.privateApis);function sbe({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,mw.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,mw.useContext)(Jn),a=(0,Fj.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=ml();return(0,Qi.jsxs)(Xc.CheckboxItem,{onChange:()=>{let u=(0,dM.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,dM.default)(e,o.args)??o.key===e?.key,children:[(0,Qi.jsx)(Xc.ItemLabel,{children:o.label}),(0,Qi.jsx)(Xc.ItemHelpText,{children:a[t]})]})}function uv({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,zj.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,Dj.getBlockBindingsSource)(o);return(0,Qi.jsxs)(Xc,{placement:n?"bottom-start":"left-start",children:[(0,Qi.jsx)(Xc.SubmenuTriggerItem,{children:(0,Qi.jsx)(Xc.ItemLabel,{children:i.label})}),(0,Qi.jsx)(Xc.Popover,{gutter:8,children:(0,Qi.jsx)(Xc.Group,{children:r.map(s=>(0,Qi.jsx)(sbe,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var ai=l(x()),{Menu:pw}=z(Ji.privateApis);function dv({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=ml(),n=(0,Hj.useViewportMatch)("medium","<"),i=(0,Uj.useContext)(Jn),s=(0,fM.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:k,getBlockType:y}=z(g(gw.store)),v=y(o).attributes?.[e]?.type,S=v==="rich-text"?"string":v,w={};return Object.entries(b()).forEach(([C,E])=>{let P=k(E,i);if(!P?.length)return;let R=P.filter(B=>B.type===S);R.length&&(w[C]=R)}),w},[e,o,i]),{canUpdateBlockBindings:a}=(0,fM.useSelect)(g=>({canUpdateBlockBindings:g(_).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,gw.getBlockBindingsSource)(d),p,h=!0;return t===void 0?(c?p=(0,hw.__)("Not connected"):p=(0,hw.__)("No sources available"),h=!0):m?p=s?.[d]?.find(g=>(0,jj.default)(g.args,f))?.label||m?.label||d:(h=!1,p=(0,hw.__)("Source not registered")),(0,ai.jsx)(Ji.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,ai.jsxs)(pw,{placement:n?"bottom-start":"left-start",children:[(0,ai.jsx)(pw.TriggerButton,{render:(0,ai.jsx)(Ji.__experimentalItem,{}),disabled:!c,children:(0,ai.jsxs)(Ji.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,ai.jsx)(Ji.__experimentalText,{truncate:!0,children:e}),(0,ai.jsx)(Ji.__experimentalText,{truncate:!0,variant:h?"muted":void 0,isDestructive:!h,children:p})]})}),!u&&(0,ai.jsx)(pw.Popover,{gutter:n?8:36,children:(0,ai.jsx)(pw,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,ai.jsx)(uv,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var Gj=l(M()),Wj=l(O());var $j=l(x());function abe({isActive:e,label:t=(0,Gj.__)("Full height"),onToggle:o,isDisabled:r}){return(0,$j.jsx)(Wj.ToolbarButton,{isActive:e,icon:gp,label:t,onClick:()=>o(!e),disabled:r})}var Kj=abe;var Yj=l(M()),Zj=l(st()),bf=l(O()),fv=l(x()),lbe=()=>{};function cbe(e){let{label:t=(0,Yj.__)("Change matrix alignment"),onChange:o=lbe,value:r="center",isDisabled:n}=e,i=(0,fv.jsx)(bf.AlignmentMatrixControl.Icon,{value:r});return(0,fv.jsx)(bf.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,fv.jsx)(bf.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===Zj.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,fv.jsx)(bf.AlignmentMatrixControl,{onChange:o,value:r})})}var Xj=cbe;var hM=l(O()),vw=l(D()),yw=l(M());var nU=l(I());var Qj=l(D()),bw=l($());function jo({clientId:e,maximumLength:t,context:o}){let r=(0,Qj.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(_),{getBlockType:a,getActiveBlockVariation:c}=n(bw.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,bw.__experimentalGetBlockLabel)(d,f,o);return m!==d.title?m:c(u,f)?.title||d.title},[e,o]);return r?t&&t>0&&r.length>t?r.slice(0,t-3)+"...":r:null}function mv({clientId:e,maximumLength:t,context:o}){return jo({clientId:e,maximumLength:t,context:o})}var kf=l(I()),tU=l(Y());var kw=l(I()),mM=l(Y()),Jj=l(x()),pv=(0,kw.createContext)({refsMap:(0,mM.observableMap)()});pv.displayName="BlockRefsContext";function eU({children:e}){let t=(0,kw.useMemo)(()=>({refsMap:(0,mM.observableMap)()}),[]);return(0,Jj.jsx)(pv.Provider,{value:t,children:e})}function oU(e){let{refsMap:t}=(0,kf.useContext)(pv);return(0,tU.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function pM(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function vf(e,t){let{refsMap:o}=(0,kf.useContext)(pv);(0,kf.useLayoutEffect)(()=>{pM(t,o.get(e));let r=o.subscribe(e,()=>pM(t,o.get(e)));return()=>{r(),pM(t,null)}},[o,e,t])}function pt(e){let[t,o]=(0,kf.useState)(null);return vf(e,o),t}function rU(e){if(!e)return null;let t=Array.from(document.querySelectorAll('iframe[name="editor-canvas"]').values()).find(o=>(o.contentDocument||o.contentWindow.document)===e.ownerDocument)??e;return t?.closest('[role="region"]')??t}var Cn=l(x());function ube({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,vw.useDispatch)(_),{clientId:r,parents:n,hasSelection:i}=(0,vw.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=z(c(_)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,yw._x)("Document","noun, breadcrumb"),a=(0,nU.useRef)();return vf(r,a),(0,Cn.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,yw.__)("Block breadcrumb"),children:[(0,Cn.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,Cn.jsx)(hM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),rU(c)?.focus()},children:s}),!i&&(0,Cn.jsx)("span",{children:s}),!!r&&(0,Cn.jsx)(Te,{icon:Oc,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,Cn.jsxs)("li",{children:[(0,Cn.jsx)(hM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,Cn.jsx)(mv,{clientId:c,maximumLength:35})}),(0,Cn.jsx)(Te,{icon:Oc,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,Cn.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,Cn.jsx)(mv,{clientId:r,maximumLength:35})})]})}var iU=ube;var sU=l(D());function aU(e){return(0,sU.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(_);return o(e)},[e])}var OE=l(Y()),hX=l(I()),gX=l(D());var vi=l(D()),lB=l(Y()),Tu=l(I()),bK=l($());var lu=l(I()),je=l($()),y8=l(O()),uC=l(D()),_8=l(Y()),S8=l(ze());var pl=l(M()),Sw=l(O()),yf=l(I()),jp=l($()),xw=l(D());var gU=l(fU()),_w=l(M()),bU=l($());var mU=l(O()),pU=l(I()),hU=l(ze()),Hs=l(x());function bM({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,Hs.jsxs)("div",{className:i,children:[(0,Hs.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,Hs.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,Hs.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,Hs.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,Hs.jsx)(pU.RawHTML,{children:(0,hU.safeHTML)(o)})})]}),(0,Hs.jsx)("div",{className:"block-editor-block-compare__action",children:(0,Hs.jsx)(mU.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var zp=l(x());function gbe({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,gU.diffChars)(u,d).map((m,p)=>{let h=V({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,zp.jsx)("span",{className:h,children:m.value},p)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,bU.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,zp.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,zp.jsx)(bM,{title:(0,_w.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,_w.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,zp.jsx)(bM,{title:(0,_w.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var kU=gbe;var hl=l(x()),vU=e=>(0,jp.rawHandler)({HTML:e.originalContent});function yU({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,xw.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:p}=d(_),h=p(e);return{block:m(e),canInsertHTMLBlock:f("core/html",h),canInsertClassicBlock:f("core/freeform",h)}},[e]),{replaceBlock:n}=(0,xw.useDispatch)(_),[i,s]=(0,yf.useState)(!1),a=(0,yf.useCallback)(()=>s(!1),[]),c=(0,yf.useMemo)(()=>({toClassic(){let d=(0,jp.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,jp.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=vU(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,jp.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,yf.useMemo)(()=>[{title:(0,pl._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,pl.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,pl.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,hl.jsxs)(hl.Fragment,{children:[(0,hl.jsx)(jc,{actions:[(0,hl.jsx)(Sw.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,pl.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,pl.__)("Block contains unexpected or invalid content.")}),i&&(0,hl.jsx)(Sw.Modal,{title:(0,pl.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,hl.jsx)(kU,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:vU,convertButtonText:(0,pl.__)("Convert to Blocks")})})]})}var _U=l(M());var SU=l(x()),bbe=(0,SU.jsx)(jc,{className:"block-editor-block-list__block-crash-warning",children:(0,_U.__)("This block has encountered an error and cannot be previewed.")}),xU=()=>bbe;var wU=l(I()),kbe=class extends wU.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},CU=kbe;var HU=l(_M()),Ew=l(I()),Tw=l(D()),Ws=l($());var GU=l(x());function Ibe({clientId:e}){let[t,o]=(0,Ew.useState)(""),r=(0,Tw.useSelect)(s=>s(_).getBlock(e),[e]),{updateBlock:n}=(0,Tw.useDispatch)(_),i=()=>{let s=(0,Ws.getBlockType)(r.name);if(!s)return;let a=(0,Ws.getBlockAttributes)(s,t,r.attributes),c=t||(0,Ws.getSaveContent)(s,a),[u]=t?(0,Ws.validateBlock)({...r,attributes:a,originalContent:c}):[!0];n(e,{attributes:a,originalContent:c,isValid:u}),t||o(c)};return(0,Ew.useEffect)(()=>{o((0,Ws.getBlockContent)(r))},[r]),(0,GU.jsx)(HU.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:i,onChange:s=>o(s.target.value)})}var WU=Ibe;var b8=l(I()),aC=l(M()),k8=l($()),lC=l(Y()),v8=l(bv());var xM=vv(),ke=e=>kv(e,xM),wM=vv();ke.write=e=>kv(e,wM);var Iw=vv();ke.onStart=e=>kv(e,Iw);var CM=vv();ke.onFrame=e=>kv(e,CM);var BM=vv();ke.onFinish=e=>kv(e,BM);var Up=[];ke.setTimeout=(e,t)=>{let o=ke.now()+t,r=()=>{let i=Up.findIndex(s=>s.cancel==r);~i&&Up.splice(i,1),Jc-=~i?1:0},n={time:o,handler:e,cancel:r};return Up.splice(KU(o),0,n),Jc+=1,qU(),n};var KU=e=>~(~Up.findIndex(t=>t.time>e)||~Up.length);ke.cancel=e=>{Iw.delete(e),CM.delete(e),BM.delete(e),xM.delete(e),wM.delete(e)};ke.sync=e=>{SM=!0,ke.batchedUpdates(e),SM=!1};ke.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,ke.onStart(o)}return r.handler=e,r.cancel=()=>{Iw.delete(o),t=null},r};var EM=typeof window<"u"?window.requestAnimationFrame:()=>{};ke.use=e=>EM=e;ke.now=typeof performance<"u"?()=>performance.now():Date.now;ke.batchedUpdates=e=>e();ke.catch=console.error;ke.frameLoop="always";ke.advance=()=>{ke.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):ZU()};var Qc=-1,Jc=0,SM=!1;function kv(e,t){SM?(t.delete(e),e(0)):(t.add(e),qU())}function qU(){Qc<0&&(Qc=0,ke.frameLoop!=="demand"&&EM(YU))}function Pbe(){Qc=-1}function YU(){~Qc&&(EM(YU),ke.batchedUpdates(ZU))}function ZU(){let e=Qc;Qc=ke.now();let t=KU(Qc);if(t&&(XU(Up.splice(0,t),o=>o.handler()),Jc-=t),!Jc){Pbe();return}Iw.flush(),xM.flush(e?Math.min(64,Qc-e):16.667),CM.flush(),wM.flush(),BM.flush()}function vv(){let e=new Set,t=e;return{add(o){Jc+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return Jc-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,Jc-=t.size,XU(t,r=>r(o)&&e.add(r)),Jc+=e.size,t=e)}}}function XU(e,t){e.forEach(o=>{try{t(o)}catch(r){ke.catch(r)}})}var ci=l(Gs());function Lw(){}var rH=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),ne={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function $s(e,t){if(ne.arr(e)){if(!ne.arr(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}return e===t}var ht=(e,t)=>e.forEach(t);function ui(e,t,o){if(ne.arr(e)){for(let r=0;r<e.length;r++)t.call(o,e[r],`$r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(o,e[r],r)}var tn=e=>ne.und(e)?[]:ne.arr(e)?e:[e];function $p(e,t){if(e.size){let o=Array.from(e);e.clear(),ht(o,t)}}var Kp=(e,...t)=>$p(e,o=>o(...t)),AM=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),LM,nH,eu=null,iH=!1,MM=Lw,Obe=e=>{e.to&&(nH=e.to),e.now&&(ke.now=e.now),e.colors!==void 0&&(eu=e.colors),e.skipAnimation!=null&&(iH=e.skipAnimation),e.createStringInterpolator&&(LM=e.createStringInterpolator),e.requestAnimationFrame&&ke.use(e.requestAnimationFrame),e.batchedUpdates&&(ke.batchedUpdates=e.batchedUpdates),e.willAdvance&&(MM=e.willAdvance),e.frameLoop&&(ke.frameLoop=e.frameLoop)},Bn=Object.freeze({__proto__:null,get createStringInterpolator(){return LM},get to(){return nH},get colors(){return eu},get skipAnimation(){return iH},get willAdvance(){return MM},assign:Obe}),yv=new Set,li=[],TM=[],Rw=0,qp={get idle(){return!yv.size&&!li.length},start(e){Rw>e.priority?(yv.add(e),ke.onStart(Rbe)):(sH(e),ke(OM))},advance:OM,sort(e){if(Rw)ke.onFrame(()=>qp.sort(e));else{let t=li.indexOf(e);~t&&(li.splice(t,1),aH(e))}},clear(){li=[],yv.clear()}};function Rbe(){yv.forEach(sH),yv.clear(),ke(OM)}function sH(e){li.includes(e)||aH(e)}function aH(e){li.splice(Abe(li,t=>t.priority>e.priority),0,e)}function OM(e){let t=TM;for(let o=0;o<li.length;o++){let r=li[o];Rw=r.priority,r.idle||(MM(r),r.advance(e),r.idle||t.push(r))}return Rw=0,TM=li,TM.length=0,li=t,li.length>0}function Abe(e,t){let o=e.findIndex(t);return o<0?e.length:o}var lH={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},es="[-+]?\\d*\\.?\\d+",Aw=es+"%";function Mw(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Lbe=new RegExp("rgb"+Mw(es,es,es)),Mbe=new RegExp("rgba"+Mw(es,es,es,es)),Nbe=new RegExp("hsl"+Mw(es,Aw,Aw)),Dbe=new RegExp("hsla"+Mw(es,Aw,Aw,es)),Vbe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Fbe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,zbe=/^#([0-9a-fA-F]{6})$/,jbe=/^#([0-9a-fA-F]{8})$/;function Ube(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=zbe.exec(e))?parseInt(t[1]+"ff",16)>>>0:eu&&eu[e]!==void 0?eu[e]:(t=Lbe.exec(e))?(Hp(t[1])<<24|Hp(t[2])<<16|Hp(t[3])<<8|255)>>>0:(t=Mbe.exec(e))?(Hp(t[1])<<24|Hp(t[2])<<16|Hp(t[3])<<8|eH(t[4]))>>>0:(t=Vbe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=jbe.exec(e))?parseInt(t[1],16)>>>0:(t=Fbe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Nbe.exec(e))?(QU(JU(t[1]),Pw(t[2]),Pw(t[3]))|255)>>>0:(t=Dbe.exec(e))?(QU(JU(t[1]),Pw(t[2]),Pw(t[3]))|eH(t[4]))>>>0:null}function IM(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*6*o:o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function QU(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=IM(n,r,e+1/3),s=IM(n,r,e),a=IM(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Hp(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function JU(e){return(parseFloat(e)%360+360)%360/360}function eH(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Pw(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function tH(e){let t=Ube(e);if(t===null)return e;t=t||0;let o=(t&4278190080)>>>24,r=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba($o}, $r}, $n}, $i})`}var tu=(e,t,o)=>{if(ne.fun(e))return e;if(ne.arr(e))return tu({range:e,output:t,extrapolate:o});if(ne.str(e.output[0]))return LM(e);let r=e,n=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{let d=Gbe(u,i);return Hbe(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function Hbe(e,t,o,r,n,i,s,a,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>o){if(a==="identity")return u;a==="clamp"&&(u=o)}return r===n?r:t===o?e<=t?r:n:(t===-1/0?u=-u:o===1/0?u=u-t:u=(u-t)/(o-t),u=i(u),r===-1/0?u=-u:n===1/0?u=u+r:u=u*(n-r)+r,u)}function Gbe(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function RM(){return RM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},RM.apply(this,arguments)}var Gp=Symbol.for("FluidValue.get"),_f=Symbol.for("FluidValue.observers"),Pr=e=>!!(e&&e[Gp]),er=e=>e&&e[Gp]?e[Gp]():e,NM=e=>e[_f]||null;function Wbe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Sf(e,t){let o=e[_f];o&&o.forEach(r=>{Wbe(r,t)})}var Wp=class{constructor(t){if(this[Gp]=void 0,this[_f]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");$be(this,t)}},$be=(e,t)=>cH(e,Gp,t);function ou(e,t){if(e[Gp]){let o=e[_f];o||cH(e,_f,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function ru(e,t){let o=e[_f];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[_f]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var cH=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),Ow=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Kbe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,oH=new RegExp(`($Ow.source})(%|[a-z]+)`,"i"),qbe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Nw=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,uH=e=>{let[t,o]=Ybe(e);if(!t||AM())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(o&&o.startsWith("--")){let n=window.getComputedStyle(document.documentElement).getPropertyValue(o);return n||e}else{if(o&&Nw.test(o))return uH(o);if(o)return o}return e},Ybe=e=>{let t=Nw.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},PM,Zbe=(e,t,o,r,n)=>`rgba($Math.round(t)}, $Math.round(o)}, $Math.round(r)}, $n})`,Dw=e=>{PM||(PM=eu?new RegExp(`($Object.keys(eu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>er(i).replace(Nw,uH).replace(Kbe,tH).replace(PM,tH)),o=t.map(i=>i.match(Ow).map(Number)),n=o[0].map((i,s)=>o.map(a=>{if(!(s in a))throw Error('The arity of each "output" value must be equal');return a[s]})).map(i=>tu(RM({},e,{output:i})));return i=>{var s;let a=!oH.test(t[0])&&((s=t.find(u=>oH.test(u)))==null?void 0:s.replace(Ow,"")),c=0;return t[0].replace(Ow,()=>`$n[c++](i)}$a||""}`).replace(qbe,Zbe)}},dH="react-spring: ",fH=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`$dH}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},Xbe=fH(console.warn);function mH(){Xbe(`$dH}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var H3e=fH(console.warn);function Yp(e){return ne.str(e)&&(e[0]=="#"||/\d/.test(e)||!AM()&&Nw.test(e)||e in(eu||{}))}var _v=AM()?ci.useEffect:ci.useLayoutEffect,Qbe=()=>{let e=(0,ci.useRef)(!1);return _v(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function DM(){let e=(0,ci.useState)()[1],t=Qbe();return()=>{t.current&&e(Math.random())}}function pH(e,t){let[o]=(0,ci.useState)(()=>({inputs:t,result:e()})),r=(0,ci.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&Jbe(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,ci.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function Jbe(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}var VM=e=>(0,ci.useEffect)(e,eke),eke=[];var Ov=l(Gs()),Rv=l(Gs());var kH=l(Gs()),bl=l(Gs()),Sv=Symbol.for("Animated:node"),tke=e=>!!e&&e[Sv]===e,ts=e=>e&&e[Sv],jw=(e,t)=>rH(e,Sv,t),xv=e=>e&&e[Sv]&&e[Sv].getPayload(),Vw=class{constructor(){this.payload=void 0,jw(this,this)}getPayload(){return this.payload||[]}},xf=class e extends Vw{constructor(t){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=t,ne.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,o){return ne.num(t)&&(this.lastPosition=t,o&&(t=Math.round(t/o)*o,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,ne.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},wf=class e extends xf{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=tu({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(ne.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=tu({output:[this.getValue(),t]})),this._value=0,super.reset()}},Fw={dependencies:null},Cf=class extends Vw{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return ui(this.source,(r,n)=>{tke(r)?o[n]=r.getValue(t):Pr(r)?o[n]=er(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&ht(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return ui(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){Fw.dependencies&&Pr(t)&&Fw.dependencies.add(t);let o=xv(t);o&&ht(o,r=>this.add(r))}},FM=class e extends Cf{constructor(t){super(t)}static create(t){return new e(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let o=this.getPayload();return t.length==o.length?o.map((r,n)=>r.setValue(t[n])).some(Boolean):(super.setValue(t.map(oke)),!0)}};function oke(e){return(Yp(e)?wf:xf).create(e)}function Uw(e){let t=ts(e);return t?t.constructor:ne.arr(e)?FM:Yp(e)?wf:xf}function zw(){return zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},zw.apply(this,arguments)}var hH=(e,t)=>{let o=!ne.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,bl.forwardRef)((r,n)=>{let i=(0,bl.useRef)(null),s=o&&(0,bl.useCallback)(h=>{i.current=nke(n,h)},[n]),[a,c]=rke(r,t),u=DM(),d=()=>{let h=i.current;if(o&&!h)return;(h?t.applyAnimatedValues(h,a.getValue(!0)):!1)===!1&&u()},f=new zM(d,c),m=(0,bl.useRef)();_v(()=>(m.current=f,ht(c,h=>ou(h,f)),()=>{m.current&&(ht(m.current.deps,h=>ru(h,m.current)),ke.cancel(m.current.update))})),(0,bl.useEffect)(d,[]),VM(()=>()=>{let h=m.current;ht(h.deps,g=>ru(g,h))});let p=t.getComponentProps(a.getValue());return kH.createElement(e,zw({},p,{ref:s}))})},zM=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&ke.write(this.update)}};function rke(e,t){let o=new Set;return Fw.dependencies=o,e.style&&(e=zw({},e,{style:t.createAnimatedStyle(e.style)})),e=new Cf(e),Fw.dependencies=null,[e,o]}function nke(e,t){return e&&(ne.fun(e)?e(t):e.current=t),t}var gH=Symbol.for("AnimatedComponent"),vH=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new Cf(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=bH(s)||"Anonymous";return ne.str(s)?s=i[s]||(i[s]=hH(s,n)):s=s[gH]||(s[gH]=hH(s,n)),s.displayName=`Animated($a})`,s};return ui(e,(s,a)=>{ne.arr(e)&&(a=bH(s)),i[a]=i(s)}),{animated:i}},bH=e=>ne.str(e)?e:e&&ne.str(e.displayName)?e.displayName:ne.fun(e)&&e.name||null;function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Or.apply(this,arguments)}function Bf(e,...t){return ne.fun(e)?e(...t):e}var Ev=(e,t)=>e===!0||!!(t&&e&&(ne.fun(e)?e(t):tn(e).includes(t))),OH=(e,t)=>ne.obj(e)?t&&e[t]:e,RH=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,ike=e=>e,AH=(e,t=ike)=>{let o=ske;e.default&&e.default!==!0&&(e=e.default,o=Object.keys(e));let r={};for(let n of o){let i=t(e[n],n);ne.und(i)||(r[n]=i)}return r},ske=["config","onProps","onStart","onChange","onPause","onResume","onRest"],ake={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 lke(e){let t={},o=0;if(ui(e,(r,n)=>{ake[n]||(t[n]=r,o++)}),o)return t}function LH(e){let t=lke(e);if(t){let o={to:t};return ui(e,(r,n)=>n in t||(o[n]=r)),o}return Or({},e)}function Tv(e){return e=er(e),ne.arr(e)?e.map(Tv):Yp(e)?Bn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function HM(e){return ne.fun(e)||ne.arr(e)&&ne.obj(e[0])}var cke={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Ww=1.70158,Hw=Ww*1.525,yH=Ww+1,_H=2*Math.PI/3,SH=2*Math.PI/4.5,Gw=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,uke={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>yH*e*e*e-Ww*e*e,easeOutBack:e=>1+yH*Math.pow(e-1,3)+Ww*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Hw+1)*2*e-Hw)/2:(Math.pow(2*e-2,2)*((Hw+1)*(e*2-2)+Hw)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*_H),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*_H)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*SH))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*SH)/2+1,easeInBounce:e=>1-Gw(1-e),easeOutBounce:Gw,easeInOutBounce:e=>e<.5?(1-Gw(1-2*e))/2:(1+Gw(2*e-1))/2},GM=Or({},cke.default,{mass:1,damping:1,easing:uke.linear,clamp:!1}),WM=class{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,GM)}};function dke(e,t,o){o&&(o=Or({},o),xH(o,t),t=Or({},o,t)),xH(e,t),Object.assign(e,t);for(let s in GM)e[s]==null&&(e[s]=GM[s]);let{mass:r,frequency:n,damping:i}=e;return ne.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*r,e.friction=4*Math.PI*i*r/n),e}function xH(e,t){if(!ne.und(t.decay))e.duration=void 0;else{let o=!ne.und(t.tension)||!ne.und(t.friction);(o||!ne.und(t.frequency)||!ne.und(t.damping)||!ne.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var wH=[],$M=class{constructor(){this.changed=!1,this.values=wH,this.toValues=null,this.fromValues=wH,this.to=void 0,this.from=void 0,this.config=new WM,this.immediate=!1}};function MH(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=Ev((c=o.cancel)!=null?c:r?.cancel,t);if(f)h();else{ne.und(o.pause)||(n.paused=Ev(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||Ev(g,t)),u=Bf(o.delay||0,t),g?(n.resumeQueue.add(p),i.pause()):(i.resume(),p())}function m(){n.resumeQueue.add(p),n.timeouts.delete(d),d.cancel(),u=d.time-ke.now()}function p(){u>0&&!Bn.skipAnimation?(n.delayed=!0,d=ke.setTimeout(h,u),n.pauseQueue.add(m),n.timeouts.add(d)):h()}function h(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(Or({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var JM=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?Zp(e.get()):t.every(o=>o.noop)?NH(e.get()):os(e.get(),t.every(o=>o.finished)),NH=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),os=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),Zp=e=>({value:e,cancelled:!0,finished:!1});function DH(e,t,o,r){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:a,promise:c}=o;return!i&&e===a&&!t.reset?c:o.promise=(async()=>{o.asyncId=n,o.asyncTo=e;let u=AH(t,(b,k)=>k==="onRest"?void 0:b),d,f,m=new Promise((b,k)=>(d=b,f=k)),p=b=>{let k=n<=(o.cancelId||0)&&Zp(r)||n!==o.asyncId&&os(r,!1);if(k)throw b.result=k,f(b),b},h=(b,k)=>{let y=new $w,v=new Kw;return(async()=>{if(Bn.skipAnimation)throw Iv(o),v.result=os(r,!1),f(v),v;p(y);let S=ne.obj(b)?Or({},b):Or({},k,{to:b});S.parentId=n,ui(u,(C,E)=>{ne.und(S[E])&&(S[E]=C)});let w=await r.start(S);return p(y),o.paused&&await new Promise(C=>{o.resumeQueue.add(C)}),w})()},g;if(Bn.skipAnimation)return Iv(o),os(r,!1);try{let b;ne.arr(e)?b=(async k=>{for(let y of k)await h(y)})(e):b=Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([b.then(d),m]),g=os(r.get(),!0,!1)}catch(b){if(b instanceof $w)g=b.result;else if(b instanceof Kw)g=b.result;else throw b}finally{n==o.asyncId&&(o.asyncId=i,o.asyncTo=i?a:void 0,o.promise=i?c:void 0)}return ne.fun(s)&&ke.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function Iv(e,t){$p(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var $w=class 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}},Kw=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},KM=e=>e instanceof Pv,fke=1,Pv=class extends Wp{constructor(...t){super(...t),this.id=fke++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=ts(this);return t&&t.getValue()}to(...t){return Bn.to(this,t)}interpolate(...t){return mH(),Bn.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,o=!1){Sf(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||qp.sort(this),Sf(this,{type:"priority",parent:this,priority:t})}},Ef=Symbol.for("SpringPhase"),VH=1,qM=2,YM=4,jM=e=>(e[Ef]&VH)>0,nu=e=>(e[Ef]&qM)>0,wv=e=>(e[Ef]&YM)>0,CH=(e,t)=>t?e[Ef]|=qM|VH:e[Ef]&=~qM,BH=(e,t)=>t?e[Ef]|=YM:e[Ef]&=~YM,ZM=class extends Pv{constructor(t,o){if(super(),this.key=void 0,this.animation=new $M,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,!ne.und(t)||!ne.und(o)){let r=ne.obj(t)?Or({},t):Or({},o,{from:t});ne.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(nu(this)||this._state.asyncTo)||wv(this)}get goal(){return er(this.animation.to)}get velocity(){let t=ts(this);return t instanceof xf?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return jM(this)}get isAnimating(){return nu(this)}get isPaused(){return wv(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=xv(n.to);!a&&Pr(n.to)&&(s=tn(er(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==wf?1:a?a[f].lastPosition:s[f],p=n.immediate,h=m;if(!p){if(h=d.lastPosition,i.tension<=0){d.done=!0;return}let g=d.elapsedTime+=t,b=n.fromValues[f],k=d.v0!=null?d.v0:d.v0=ne.arr(i.velocity)?i.velocity[f]:i.velocity,y,v=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(ne.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,w=Math.exp(-(1-S)*g);h=b+k/(1-S)*(1-w),p=Math.abs(d.lastPosition-h)<=v,y=k*w}else{y=d.lastVelocity==null?k:d.lastVelocity;let S=i.restVelocity||v/10,w=i.clamp?0:i.bounce,C=!ne.und(w),E=b==m?d.v0>0:b<m,P,R=!1,B=1,T=Math.ceil(t/B);for(let A=0;A<T&&(P=Math.abs(y)>S,!(!P&&(p=Math.abs(m-h)<=v,p)));++A){C&&(R=h==m||h>m==E,R&&(y=-y*w,h=m));let L=-i.tension*1e-6*(h-m),U=-i.friction*.001*y,G=(L+U)/i.mass;y=y+G*B,h=h+y*B}}else{let S=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,g=d.elapsedTime+=t)),S=(i.progress||0)+g/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),h=b+i.easing(S)*(m-b),y=(h-d.lastPosition)/t,p=S==1}d.lastVelocity=y,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),p=!0)}a&&!a[f].done&&(p=!1),p?d.done=!0:o=!1,d.setValue(h,i.round)&&(r=!0)});let c=ts(this),u=c.getValue();if(o){let d=er(n.to);(u!==d||r)&&!i.decay?(c.setValue(d),this._onChange(d)):r&&i.decay&&this._onChange(u),this._stop()}else r&&this._onChange(u)}set(t){return ke.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(nu(this)){let{to:t,config:o}=this.animation;ke.batchedUpdates(()=>{this._onStart(),o.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,o){let r;return ne.und(t)?(r=this.queue||[],this.queue=[]):r=[ne.obj(t)?t:Or({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>JM(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),Iv(this._state,t&&this._lastCallId),ke.batchedUpdates(()=>this._stop(o,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){let o=this.key||"",{to:r,from:n}=t;r=ne.obj(r)?r[o]:r,(r==null||HM(r))&&(r=void 0),n=ne.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return jM(this)||(t.reverse&&([r,n]=[n,r]),n=er(n),ne.und(n)?ts(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Or({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,AH(r,(c,u)=>/^on/.test(u)?OH(c,n):c)),TH(this,r,"onProps"),Bv(this,"onProps",r,this);let s=this._prepareNode(r);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?");let a=this._state;return MH(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{wv(this)||(BH(this,!0),Kp(a.pauseQueue),Bv(this,"onPause",os(this,Cv(this,this.animation.to)),this))},resume:()=>{wv(this)&&(BH(this,!1),nu(this)&&this._resume(),Kp(a.resumeQueue),Bv(this,"onResume",os(this,Cv(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=FH(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(Zp(this));let n=!ne.und(t.to),i=!ne.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(Zp(this));let{key:s,defaultProps:a,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!o.default||ne.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let p=!$s(m,d);p&&(c.from=m),m=er(m);let h=!$s(f,u);h&&this._focus(f);let g=HM(o.to),{config:b}=c,{decay:k,velocity:y}=b;(n||i)&&(b.velocity=0),o.config&&!g&&dke(b,Bf(o.config,s),o.config!==a.config?Bf(a.config,s):void 0);let v=ts(this);if(!v||ne.und(f))return r(os(this,!0));let S=ne.und(o.reset)?i&&!o.default:!ne.und(m)&&Ev(o.reset,s),w=S?m:this.get(),C=Tv(f),E=ne.num(C)||ne.arr(C)||Yp(C),P=!g&&(!E||Ev(a.immediate||o.immediate,s));if(h){let A=Uw(f);if(A!==v.constructor)if(P)v=this._set(C);else throw Error(`Cannot animate between $v.constructor.name} and $A.name}, as the "to" prop suggests`)}let R=v.constructor,B=Pr(f),T=!1;if(!B){let A=S||!jM(this)&&p;(h||A)&&(T=$s(Tv(w),C),B=!T),(!$s(c.immediate,P)&&!P||!$s(b.decay,k)||!$s(b.velocity,y))&&(B=!0)}if(T&&nu(this)&&(c.changed&&!S?B=!0:B||this._stop(u)),!g&&((B||Pr(u))&&(c.values=v.getPayload(),c.toValues=Pr(f)?null:R==wf?[1]:tn(C)),c.immediate!=P&&(c.immediate=P,!P&&!S&&this._set(u)),B)){let{onRest:A}=c;ht(mke,U=>TH(this,o,U));let L=os(this,Cv(this,u));Kp(this._pendingCalls,L),this._pendingCalls.add(r),c.changed&&ke.batchedUpdates(()=>{c.changed=!S,A?.(L,this),S?Bf(a.onRest,L):c.onStart==null||c.onStart(L,this)})}S&&this._set(w),g?r(DH(o.to,o,this._state,this)):B?this._start():nu(this)&&!h?this._pendingCalls.add(r):r(NH(w))}_focus(t){let o=this.animation;t!==o.to&&(NM(this)&&this._detach(),o.to=t,NM(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;Pr(o)&&(ou(o,this),KM(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Pr(t)&&ru(t,this)}_set(t,o=!0){let r=er(t);if(!ne.und(r)){let n=ts(this);if(!n||!$s(r,n.getValue())){let i=Uw(r);!n||n.constructor!=i?jw(this,i.create(r)):n.setValue(r),n&&ke.batchedUpdates(()=>{this._onChange(r,o)})}}return ts(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,Bv(this,"onStart",os(this,Cv(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),Bf(this.animation.onChange,t,this)),Bf(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;ts(this).reset(er(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),nu(this)||(CH(this,!0),wv(this)||this._resume())}_resume(){Bn.skipAnimation?this.finish():qp.start(this)}_stop(t,o){if(nu(this)){CH(this,!1);let r=this.animation;ht(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Sf(this,{type:"idle",parent:this});let n=o?Zp(this.get()):os(this.get(),Cv(this,t??r.to));Kp(this._pendingCalls,n),r.changed&&(r.changed=!1,Bv(this,"onRest",n,this))}}};function Cv(e,t){let o=Tv(t),r=Tv(e.get());return $s(r,o)}function FH(e,t=e.loop,o=e.to){let r=Bf(t);if(r){let n=r!==!0&&LH(r),i=(n||e).reverse,s=!n||n.reset;return XM(Or({},e,{loop:t,default:!1,pause:void 0,to:!i||HM(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function XM(e){let{to:t,from:o}=e=LH(e),r=new Set;return ne.obj(t)&&EH(t,r),ne.obj(o)&&EH(o,r),e.keys=r.size?Array.from(r):null,e}function EH(e,t){ui(e,(o,r)=>o!=null&&t.add(r))}var mke=["onStart","onRest","onChange","onPause","onResume"];function TH(e,t,o){e.animation[o]=t[o]!==RH(t,o)?OH(t[o],e.key):void 0}function Bv(e,t,...o){var r,n,i,s;(r=(n=e.animation)[t])==null||r.call(n,...o),(i=(s=e.defaultProps)[t])==null||i.call(s,...o)}var pke=["onStart","onChange","onRest"],hke=1,qw=class{constructor(t,o){this.id=hke++,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),o&&(this._flush=o),t&&this.start(Or({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){let t={};return this.each((o,r)=>t[r]=o.get()),t}set(t){for(let o in t){let r=t[o];ne.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(XM(t)),this}start(t){let{queue:o}=this;return t?o=tn(t).map(XM):this.queue=[],this._flush?this._flush(this,o):(jH(this,o),gke(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;ht(tn(o),n=>r[n].stop(!!t))}else Iv(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ne.und(t))this.start({pause:!0});else{let o=this.springs;ht(tn(t),r=>o[r].pause())}return this}resume(t){if(ne.und(t))this.start({pause:!1});else{let o=this.springs;ht(tn(t),r=>o[r].resume())}return this}each(t){ui(this.springs,t)}_onFrame(){let{onStart:t,onChange:o,onRest:r}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,$p(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let s=!n&&this._started,a=i||s&&r.size?this.get():null;i&&o.size&&$p(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,$p(r,([c,u])=>{u.value=a,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;ke.onFrame(this._onFrame)}};function gke(e,t){return Promise.all(t.map(o=>zH(e,o))).then(o=>JM(e,o))}async function zH(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=ne.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ne.arr(n)||ne.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):ht(pke,g=>{let b=t[g];if(ne.fun(b)){let k=e._events[g];t[g]=({finished:y,cancelled:v})=>{let S=k.get(b);S?(y||(S.finished=!1),v&&(S.cancelled=!0)):k.set(b,{value:null,finished:y||!1,cancelled:v||!1})},u&&(u[g]=t[g])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,Kp(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),p=t.cancel===!0||RH(t,"cancel")===!0;(d||p&&f.asyncId)&&m.push(MH(++e._lastAsyncId,{props:t,state:f,actions:{pause:Lw,resume:Lw,start(g,b){p?(Iv(f,e._lastAsyncId),b(Zp(e))):(g.onRest=a,b(DH(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let h=JM(e,await Promise.all(m));if(s&&h.finished&&!(o&&h.noop)){let g=FH(t,s,n);if(g)return jH(e,[g]),zH(e,g,!0)}return c&&ke.batchedUpdates(()=>c(h,e,e.item)),h}function bke(e,t){let o=new ZM;return o.key=e,t&&ou(o,t),o}function kke(e,t,o){t.keys&&ht(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function jH(e,t){ht(t,o=>{kke(e.springs,o,r=>bke(r,e))})}function vke(e,t){if(e==null)return{};var o={},r=Object.keys(e),n,i;for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var yke=["children"],eN=e=>{let{children:t}=e,o=vke(e,yke),r=(0,Rv.useContext)(Yw),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=pH(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=Yw;return Ov.createElement(s,{value:o},t)},Yw=_ke(eN,{});eN.Provider=Yw.Provider;eN.Consumer=Yw.Consumer;function _ke(e,t){return Object.assign(e,Ov.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var IH;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(IH||(IH={}));var QM=class extends Pv{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=tu(...o);let r=this._get(),n=Uw(r);jw(this,n.create(r))}advance(t){let o=this._get(),r=this.get();$s(o,r)||(ts(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&PH(this._active)&&UM(this)}_get(){let t=ne.arr(this.source)?this.source.map(er):tn(er(this.source));return this.calc(...t)}_start(){this.idle&&!PH(this._active)&&(this.idle=!1,ht(xv(this),t=>{t.done=!1}),Bn.skipAnimation?(ke.batchedUpdates(()=>this.advance()),UM(this)):qp.start(this))}_attach(){let t=1;ht(tn(this.source),o=>{Pr(o)&&ou(o,this),KM(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){ht(tn(this.source),t=>{Pr(t)&&ru(t,this)}),this._active.clear(),UM(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=tn(this.source).reduce((o,r)=>Math.max(o,(KM(r)?r.priority:0)+1),0))}};function Ske(e){return e.idle!==!1}function PH(e){return!e.size||Array.from(e).every(Ske)}function UM(e){e.idle||(e.idle=!0,ht(xv(e),t=>{t.done=!0}),Sf(e,{type:"idle",parent:e}))}Bn.assign({createStringInterpolator:Dw,to:(e,t)=>new QM(e,t)});var J3e=qp.advance;var WH=l(HH());function nN(e,t){if(e==null)return{};var o={},r=Object.keys(e),n,i;for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var xke=["style","children","scrollTop","scrollLeft"],$H=/^--/;function wke(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!$H.test(e)&&!(Av.hasOwnProperty(e)&&Av[e])?t+"px":(""+t).trim()}var GH={};function Cke(e,t){if(!e.nodeType||!e.setAttribute)return!1;let o=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",r=t,{style:n,children:i,scrollTop:s,scrollLeft:a}=r,c=nN(r,xke),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:GH[f]||(GH[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));i!==void 0&&(e.textContent=i);for(let f in n)if(n.hasOwnProperty(f)){let m=wke(f,n[f]);$H.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),s!==void 0&&(e.scrollTop=s),a!==void 0&&(e.scrollLeft=a)}var Av={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},Bke=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Eke=["Webkit","Ms","Moz","O"];Av=Object.keys(Av).reduce((e,t)=>(Eke.forEach(o=>e[Bke(o,t)]=e[t]),e),Av);var Tke=["x","y","z"],Ike=/^(matrix|translate|scale|rotate|skew)/,Pke=/^(translate)/,Oke=/^(rotate|skew)/,tN=(e,t)=>ne.num(e)&&e!==0?e+t:e,Zw=(e,t)=>ne.arr(e)?e.every(o=>Zw(o,t)):ne.num(e)?e===t:parseFloat(e)===t,oN=class extends Cf{constructor(t){let{x:o,y:r,z:n}=t,i=nN(t,Tke),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d($c.map(u=>tN(u,"px")).join(",")})`,Zw(c,0)])),ui(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(Ike.test(u)){if(delete i[u],ne.und(c))return;let d=Pke.test(u)?"px":Oke.test(u)?"deg":"";s.push(tn(c)),a.push(u==="rotate3d"?([f,m,p,h])=>[`rotate3d($f},$m},$p},$tN(h,d)})`,Zw(h,0)]:f=>[`$u}($f.map(m=>tN(m,d)).join(",")})`,Zw(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new rN(s,a)),super(i)}},rN=class extends Wp{constructor(t,o){super(),this._value=null,this.inputs=t,this.transforms=o}get(){return this._value||(this._value=this._get())}_get(){let t="",o=!0;return ht(this.inputs,(r,n)=>{let i=er(r[0]),[s,a]=this.transforms[n](ne.arr(i)?i:r.map(er));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&ht(this.inputs,o=>ht(o,r=>Pr(r)&&ou(r,this)))}observerRemoved(t){t==0&&ht(this.inputs,o=>ht(o,r=>Pr(r)&&ru(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Sf(this,t)}},Rke=["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"],Ake=["scrollTop","scrollLeft"];Bn.assign({batchedUpdates:WH.unstable_batchedUpdates,createStringInterpolator:Dw,colors:lH});var Lke=vH(Rke,{applyAnimatedValues:Cke,createAnimatedStyle:e=>new oN(e),getComponentProps:e=>nN(e,Ake)}),KH=Lke.animated;var Xp=l(I()),YH=l(ze()),ZH=l(D());var Mke=200;function qH(e){return{top:e.offsetTop,left:e.offsetLeft}}function Nke({triggerAnimationOnChange:e,clientId:t}){let o=(0,Xp.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,ZH.useSelect)(_),{previous:d,prevRect:f}=(0,Xp.useMemo)(()=>({previous:o.current&&qH(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,Xp.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,YH.getScrollContainer)(o.current),p=i(t),h=p||s(t),g=u();function b(){if(!g&&h&&f){let R=o.current.getBoundingClientRect().top-f.top;R&&(m.scrollTop+=R)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>Mke){b();return}let y=p||a(t)||c(t);if(y&&g)return;let v=y?"1":"",S=new qw({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:P}){if(!o.current)return;let{x:R,y:B}=P;R=Math.round(R),B=Math.round(B);let T=R===0&&B===0;o.current.style.transformOrigin="center center",o.current.style.transform=T?null:`translate3d($R}px,$B}px,0)`,o.current.style.zIndex=v,b()}});o.current.style.transform=void 0;let w=qH(o.current),C=Math.round(d.left-w.left),E=Math.round(d.top-w.top);return S.start({x:0,y:0,from:{x:C,y:E}}),()=>{S.stop(),S.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,c,u]),o}var Xw=Nke;var eC=l(I()),kl=l(ze()),XH=l(D());var Qw=".block-editor-block-list__block",Dke=".block-list-appender",Vke=".block-editor-button-block-appender";function Jw(e,t){return e.closest(Qw)===t.closest(Qw)}function iu(e,t){return t.closest([Qw,Dke,Vke].join(","))===e}function su(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(Qw);if(o)return o.id.slice(6)}function iN(e,t){let o=Math.min(e.left,t.left),r=Math.max(e.right,t.right),n=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(o,i,r-o,n-i)}function Fke(e){let t=e.ownerDocument.defaultView;if(!t||e.classList.contains("components-visually-hidden"))return!1;let o=e.getBoundingClientRect();if(o.width===0||o.height===0)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});let r=t.getComputedStyle(e);return!(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")}function zke(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var jke=["core/navigation"];function Qp(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&jke.includes(r)){let s=[e],a;for(;a=s.pop();)if(!zke(a)){for(let c of a.children)if(Fke(c)){let u=c.getBoundingClientRect();o=iN(o,u),s.push(c)}}}let n=Math.max(o.left,0),i=Math.min(o.right,t.innerWidth);return o=new window.DOMRectReadOnly(n,o.top,i-n,o.height),o}function QH({clientId:e,initialPosition:t}){let o=(0,eC.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=z((0,XH.useSelect)(_));return(0,eC.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(iu(o.current,s.activeElement))return;let a=kl.focus.tabbable.find(o.current).filter(d=>(0,kl.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!iu(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=kl.focus.tabbable.findNext(o.current);if(d&&iu(o.current,d)&&(0,kl.isFormElement)(d)){d.focus();return}}(0,kl.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var JH=l(Y());function tC(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function e8({isEnabled:e=!0}={}){return(0,JH.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",tC),t.addEventListener("mouseover",tC),()=>{t.removeEventListener("mouseout",tC),t.removeEventListener("mouseover",tC),t.classList.remove("is-hovered")}},[e])}var oC=l(D()),t8=l(Y());function o8(e){let{isBlockSelected:t}=(0,oC.useSelect)(_),{selectBlock:o,selectionChange:r}=(0,oC.useDispatch)(_);return(0,t8.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}iu(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var n8=l(ze()),au=l(st()),rC=l(D()),i8=l(Y());function r8(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function s8({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s}=z((0,rC.useSelect)(_)),{insertAfterBlock:a,removeBlock:c,resetZoomLevel:u,startDraggingBlocks:d,stopDraggingBlocks:f,editContentOnlySection:m}=z((0,rC.useDispatch)(_));return(0,i8.useRefEffect)(p=>{if(!t)return;function h(k){let{keyCode:y,target:v}=k;y!==au.ENTER&&y!==au.BACKSPACE&&y!==au.DELETE||v!==p||(0,n8.isTextField)(v)||(k.preventDefault(),y===au.ENTER&&r()?u():y===au.ENTER?a(e):c(e))}function g(k){if(p!==k.target||p.isContentEditable||p.ownerDocument.activeElement!==p||n()){k.preventDefault();return}let y=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});k.dataTransfer.effectAllowed="move",k.dataTransfer.clearData(),k.dataTransfer.setData("wp-blocks",y);let{ownerDocument:v}=p,{defaultView:S}=v;S.getSelection().removeAllRanges();let C=v.createElement("div");C.style.width="1px",C.style.height="1px",C.style.position="fixed",C.style.visibility="hidden",v.body.appendChild(C),k.dataTransfer.setDragImage(C,0,0);let E=p.getBoundingClientRect(),P=p.cloneNode(!0);P.style.visibility="hidden",P.style.display="none";let R=p.id;p.id=null;let B=1;{let ee=p;for(;ee=ee.parentElement;){let{scale:ie}=S.getComputedStyle(ee);if(ie&&ie!=="none"){B=parseFloat(ie);break}}}let T=1/B;p.after(P);let A={};for(let ee of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])A[ee]=p.style[ee];let L=S.scrollY,U=S.scrollX,G=k.clientX,j=k.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let N=k.clientX-E.left,F=k.clientY-E.top,K=E.height>200?200/E.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`$N*T}px $F*T}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale($K})`,p.style.opacity="0.9",r8(S.getComputedStyle(p).backgroundColor)){let ee="transparent",ie=p;for(;ie=ie.parentElement;){let{backgroundColor:de}=S.getComputedStyle(ie);if(!r8(de)){ee=de;break}}p.style.backgroundColor=ee}let Z=!1;function Q(ee){Z||(Z=!0,p.style.pointerEvents="none");let ie=S.scrollY,de=S.scrollX;p.style.top=`${(ee.clientY-j+ie-L)*T}px`,p.style.left=`${(ee.clientX-G+de-U)*T}px`}function J(){v.removeEventListener("dragover",Q),v.removeEventListener("dragend",J),v.removeEventListener("drop",J),v.removeEventListener("scroll",Q);for(let[ee,ie]of Object.entries(A))p.style[ee]=ie;P.remove(),p.id=R,C.remove(),f(),document.body.classList.remove("is-dragging-components-draggable"),v.documentElement.classList.remove("is-dragging")}v.addEventListener("dragover",Q),v.addEventListener("dragend",J),v.addEventListener("drop",J),v.addEventListener("scroll",Q),d([e]),document.body.classList.add("is-dragging-components-draggable"),v.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",h),p.addEventListener("dragstart",g);function b(k){i(e)&&!(s===e)&&(k.preventDefault(),m(e))}return window?.__experimentalContentOnlyPatternInsertion&&p.addEventListener("dblclick",b),()=>{p.removeEventListener("keydown",h),p.removeEventListener("dragstart",g),window?.__experimentalContentOnlyPatternInsertion&&p.removeEventListener("dblclick",b)}},[e,t,o,a,c,r,u,n,d,f,i,s,m])}var a8=l(Y()),l8=l(I());function c8(){let e=(0,l8.useContext)(nC);return(0,a8.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var iC=l(Y());function u8({isSelected:e}){let t=(0,iC.useReducedMotion)();return(0,iC.useRefEffect)(o=>{if(e){let{ownerDocument:r}=o,{defaultView:n}=r;if(!n.IntersectionObserver)return;let i=new n.IntersectionObserver(s=>{s[0].isIntersecting||o.scrollIntoView({behavior:t?"instant":"smooth"}),i.disconnect()});return i.observe(o),()=>{i.disconnect()}}},[e])}var d8=l(Y()),f8=l(D());function sC({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=z((0,f8.useSelect)(_));return(0,d8.useRefEffect)(r=>{if(!t)return;let n=()=>{o(e).forEach(({clientId:s})=>{let a=r.querySelector(`[data-block="$s}"]`);a&&(a.classList.remove("has-editable-outline"),a.offsetWidth,a.classList.add("has-editable-outline"))})},i=s=>{(s.target===r||s.target.classList.contains("is-root-container"))&&(s.defaultPrevented||(s.preventDefault(),n()))};return r.addEventListener("click",i),()=>r.removeEventListener("click",i)},[t])}var m8=l(Y()),Lv=new Map;function Uke(e,t){let o=Lv.get(e);o||(o=new Set,Lv.set(e,o),e.addEventListener("pointerdown",h8)),o.add(t)}function Hke(e,t){let o=Lv.get(e);o&&(o.delete(t),p8(t),o.size===0&&(Lv.delete(e),e.removeEventListener("pointerdown",h8)))}function p8(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function h8(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=Lv.get(o);if(r||i)for(let a of s)a.getAttribute("draggable")==="true"&&a.contains(t)&&(a.removeAttribute("draggable"),a.setAttribute("data-draggable","true"));else for(let a of s)p8(a)}function g8(){return(0,m8.useRefEffect)(e=>(Uke(e.ownerDocument,e),()=>{Hke(e.ownerDocument,e)}),[])}function Mv(e={},{__unstableIsHtml:t}={}){let{clientId:o,className:r,wrapperProps:n={},isAligned:i,index:s,mode:a,name:c,blockApiVersion:u,blockTitle:d,isSelected:f,isSubtreeDisabled:m,hasOverlay:p,initialPosition:h,blockEditingMode:g,isHighlighted:b,isMultiSelected:k,isPartiallySelected:y,isReusable:v,isDragging:S,hasChildSelected:w,isEditingDisabled:C,hasEditableOutline:E,isEditingContentOnlySection:P,defaultClassName:R,isSectionBlock:B,isWithinSectionBlock:T,canMove:A,isBlockHidden:L}=(0,b8.useContext)($i),U=(0,aC.sprintf)((0,aC.__)("Block: %s"),d),G=a==="html"&&!t?"-visual":"",j=g8(),N=!T,F=(0,lC.useMergeRefs)([e.ref,QH({clientId:o,initialPosition:h}),oU(o),o8(o),s8({clientId:o,isSelected:f}),e8({isEnabled:N}),c8(),Xw({triggerAnimationOnChange:s,clientId:o}),(0,lC.useDisabled)({isDisabled:!p}),sC({clientId:o,isEnabled:B}),u8({isSelected:f}),A?j:void 0]),K=Ae(),Q=!!K[sp]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};u<2&&o===K.clientId&&(0,v8.default)(`Block type "$c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let J=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(J=!0),{tabIndex:g==="disabled"?-1:0,draggable:A&&!w?!0:void 0,...n,...e,ref:F,id:`block-$o}$G}`,role:"document","aria-label":U,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:V("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":p,"is-selected":f,"is-highlighted":b,"is-multi-selected":k,"is-partially-selected":y,"is-reusable":v,"is-dragging":S,"has-child-selected":w,"is-editing-disabled":C,"has-editable-outline":E,"has-negative-margin":J,"is-editing-content-only-section":P,"is-block-hidden":L},r,e.className,n.className,R),style:{...n.style,...e.style,...Q}}}Mv.save=k8.__unstableGetBlockProps;var co=l(x());function Gke(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=V(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function cC({children:e,isHtml:t,...o}){return(0,co.jsx)("div",{...Mv(o,{__unstableIsHtml:t}),children:e})}function sN({block:{__unstableBlockSource:e},mode:t,isLocked:o,canRemove:r,clientId:n,isSelected:i,isSelectionEnabled:s,className:a,__unstableLayoutClassNames:c,name:u,isValid:d,attributes:f,wrapperProps:m,setAttributes:p,onReplace:h,onRemove:g,onInsertBlocksAfter:b,onMerge:k,toggleSelection:y}){let{mayDisplayControls:v,mayDisplayParentControls:S,themeSupportsLayout:w,...C}=(0,lu.useContext)($i),E=hf()||{},P=(0,co.jsx)(jx,{name:u,isSelected:i,attributes:f,setAttributes:p,insertBlocksAfter:o?void 0:b,onReplace:r?h:void 0,onRemove:r?g:void 0,mergeBlocks:r?k:void 0,clientId:n,isSelectionEnabled:s,toggleSelection:y,__unstableLayoutClassNames:c,__unstableParentLayout:Object.keys(E).length?E:void 0,mayDisplayControls:v,mayDisplayParentControls:S,blockEditingMode:C.blockEditingMode,isPreviewMode:C.isPreviewMode}),R=(0,je.getBlockType)(u);R?.getEditWrapperProps&&(m=Gke(m,R.getEditWrapperProps(f)));let B=m&&!!m["data-align"]&&!w,T=a?.includes("is-position-sticky");B&&(P=(0,co.jsx)("div",{className:V("wp-block",T&&a),"data-align":m["data-align"],children:P}));let A;if(d)t==="html"?A=(0,co.jsxs)(co.Fragment,{children:[(0,co.jsx)("div",{style:{display:"none"},children:P}),(0,co.jsx)(cC,{isHtml:!0,children:(0,co.jsx)(WU,{clientId:n})})]}):R?.apiVersion>1?A=P:A=(0,co.jsx)(cC,{children:P});else{let j=e?(0,je.serializeRawBlock)(e):(0,je.getSaveContent)(R,f);A=(0,co.jsxs)(cC,{className:"has-warning",children:[(0,co.jsx)(yU,{clientId:n}),(0,co.jsx)(lu.RawHTML,{children:(0,S8.safeHTML)(j)})]})}let{"data-align":L,...U}=m??{},G={...U,className:V(U.className,L&&w&&`align$L}`,!(L&&T)&&a)};return(0,co.jsx)($i.Provider,{value:{wrapperProps:G,isAligned:B,...C},children:(0,co.jsx)(CU,{fallback:(0,co.jsx)(cC,{className:"has-warning",children:(0,co.jsx)(xU,{})}),children:A})})}var Wke=(0,uC.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(_);return{setAttributes(m){let{getMultiSelectedBlockClientIds:p}=o.select(_),h=p(),{clientId:g,attributes:b}=t,k=h.length?h:[g],y=typeof m=="function"?m(b):m;r(k,y)},onInsertBlocks(m,p){let{rootClientId:h}=t;n(m,p,h)},onInsertBlocksAfter(m){let{clientId:p,rootClientId:h}=t,{getBlockIndex:g}=o.select(_),b=g(p);n(m,b+1,h)},onMerge(m){let{clientId:p,rootClientId:h}=t,{getPreviousBlockClientId:g,getNextBlockClientId:b,getBlock:k,getBlockAttributes:y,getBlockName:v,getBlockOrder:S,getBlockIndex:w,getBlockRootClientId:C,canInsertBlockType:E}=o.select(_);function P(){let B=k(p),T=(0,je.getDefaultBlockName)(),A=(0,je.getBlockType)(T);if(v(p)!==T){let L=(0,je.switchToBlockType)(B,T);L&&L.length&&s(p,L)}else if((0,je.isUnmodifiedDefaultBlock)(B)){let L=b(p);L&&o.batch(()=>{d(p),f(L)})}else if(A.merge){let L=A.merge({},B.attributes);s([p],[(0,je.createBlock)(T,L)])}}function R(B,T=!0){let A=v(B),U=(0,je.getBlockType)(A).category==="text",G=C(B),j=S(B),[N]=j;j.length===1&&(0,je.isUnmodifiedBlock)(k(N))?d(B):U?o.batch(()=>{if(E(v(N),G))u([N],B,G,w(B));else{let F=(0,je.switchToBlockType)(k(N),(0,je.getDefaultBlockName)());F&&F.length&&F.every(K=>E(K.name,G))?(n(F,w(B),G,T),d(N,!1)):P()}!S(B).length&&(0,je.isUnmodifiedBlock)(k(B))&&d(B,!1)}):P()}if(m){if(h){let T=b(h);if(T)if(v(h)===v(T)){let A=y(h),L=y(T);if(Object.keys(A).every(U=>A[U]===L[U])){o.batch(()=>{u(S(T),T,h),d(T,!1)});return}}else{i(h,T);return}}let B=b(p);if(!B)return;S(B).length?R(B,!1):i(p,B)}else{let B=g(p);if(B)i(B,p);else if(h){let T=g(h);if(T&&v(h)===v(T)){let A=y(h),L=y(T);if(Object.keys(A).every(U=>A[U]===L[U])){o.batch(()=>{u(S(h),h,T),d(h,!1)});return}}R(h)}else P()}},onReplace(m,p,h){m.length&&!(0,je.isUnmodifiedDefaultBlock)(m[m.length-1])&&c();let g=m?.length===1&&Array.isArray(m[0])?m[0]:m;s([t.clientId],g,p,h)},onRemove(){d(t.clientId)},toggleSelection(m){a(m)}}});sN=(0,_8.compose)(Wke,(0,y8.withFilters)("editor.BlockListBlock"))(sN);function $ke(e){let{clientId:t,rootClientId:o}=e,r=(0,uC.useSelect)(re=>{let{isBlockSelected:W,getBlockMode:H,isSelectionEnabled:oe,getTemplateLock:ce,isSectionBlock:le,getParentSectionBlock:ye,getBlockWithoutAttributes:_e,getBlockAttributes:Ve,canRemoveBlock:go,canMoveBlock:ot,getSettings:Yt,getEditedContentOnlySection:Ct,getBlockEditingMode:rt,getBlockName:Vt,isFirstMultiSelectedBlock:Ft,getMultiSelectedBlockClientIds:We,hasSelectedInnerBlock:so,getBlocksByName:dt,getBlockIndex:ao,isBlockMultiSelected:qn,isBlockSubtreeDisabled:Kr,isBlockHighlighted:Fe,__unstableIsFullySelected:bo,__unstableSelectionHasUnmergeableBlock:Zt,isBlockBeingDragged:me,isDragging:wo,__unstableHasActiveBlockOverlayActive:Co,getSelectedBlocksInitialCaretPosition:Yn}=z(re(_)),Zn=_e(t);if(!Zn)return;let{hasBlockSupport:dr,getActiveBlockVariation:$a}=re(je.store),Re=Ve(t),{name:Se,isValid:Bt}=Zn,ae=(0,je.getBlockType)(Se),{supportsLayout:Me,isPreviewMode:qr,__experimentalBlockBindingsSupportedAttributes:Yr}=Yt(),ak=Yr?.[Se],Hd=ae?.apiVersion>1,Gd={isPreviewMode:qr,blockWithoutAttributes:Zn,name:Se,attributes:Re,isValid:Bt,themeSupportsLayout:Me,index:ao(t),isReusable:(0,je.isReusableBlock)(ae),className:Hd?Re.className:void 0,defaultClassName:Hd?(0,je.getBlockDefaultClassName)(Se):void 0,blockTitle:ae?.title,isBlockHidden:Re?.metadata?.blockVisibility===!1,bindableAttributes:ak};if(qr)return Gd;let{isBlockHidden:np}=z(re(_)),Ka=W(t),lk=go(t),Wd=ot(t),ck=$a(Se,Re),ue=qn(t),xe=so(t,!0),Ze=rt(t),fr=(0,je.hasBlockSupport)(Se,"multiple",!0)?[]:dt(Se),qa=fr.length&&fr[0]!==t;return{...Gd,mode:H(t),isSelectionEnabled:oe(),isLocked:!!ce(o),isSectionBlock:le(t),isWithinSectionBlock:le(t)||!!ye(t),canRemove:lk,canMove:Wd,isSelected:Ka,isEditingContentOnlySection:Ct()===t,blockEditingMode:Ze,mayDisplayControls:Ka||Ft(t)&&We().every(Ya=>Vt(Ya)===Se),mayDisplayParentControls:dr(Vt(t),"__experimentalExposeControlsToChildren",!1)&&so(t),blockApiVersion:ae?.apiVersion||1,blockTitle:ck?.title||ae?.title,isSubtreeDisabled:Ze==="disabled"&&Kr(t),hasOverlay:Co(t)&&!wo(),initialPosition:Ka?Yn():void 0,isHighlighted:Fe(t),isMultiSelected:ue,isPartiallySelected:ue&&!bo()&&!Zt(),isDragging:me(t),hasChildSelected:xe,isEditingDisabled:Ze==="disabled",hasEditableOutline:Ze!=="disabled"&&rt(o)==="disabled",originalBlockClientId:qa?fr[0]:!1,isBlockHidden:np(t)}},[t,o]),{isPreviewMode:n,mode:i="visual",isSelectionEnabled:s=!1,isLocked:a=!1,canRemove:c=!1,canMove:u=!1,blockWithoutAttributes:d,name:f,attributes:m,isValid:p,isSelected:h=!1,themeSupportsLayout:g,isEditingContentOnlySection:b,blockEditingMode:k,mayDisplayControls:y,mayDisplayParentControls:v,index:S,blockApiVersion:w,blockTitle:C,isSubtreeDisabled:E,hasOverlay:P,initialPosition:R,isHighlighted:B,isMultiSelected:T,isPartiallySelected:A,isReusable:L,isDragging:U,hasChildSelected:G,isSectionBlock:j,isWithinSectionBlock:N,isEditingDisabled:F,hasEditableOutline:K,className:Z,defaultClassName:Q,originalBlockClientId:J,isBlockHidden:ee,bindableAttributes:ie}=r,de=(0,lu.useMemo)(()=>({...d,attributes:m}),[d,m]);if(!r)return null;let X={isPreviewMode:n,clientId:t,className:Z,index:S,mode:i,name:f,blockApiVersion:w,blockTitle:C,isSelected:h,isSubtreeDisabled:E,hasOverlay:P,initialPosition:R,blockEditingMode:k,isHighlighted:B,isMultiSelected:T,isPartiallySelected:A,isReusable:L,isDragging:U,hasChildSelected:G,isSectionBlock:j,isWithinSectionBlock:N,isEditingDisabled:F,hasEditableOutline:K,isEditingContentOnlySection:b,defaultClassName:Q,mayDisplayControls:y,mayDisplayParentControls:v,originalBlockClientId:J,themeSupportsLayout:g,canMove:u,isBlockHidden:ee,bindableAttributes:ie};return ee&&!h&&!T&&!G?null:(0,co.jsx)($i.Provider,{value:X,children:(0,co.jsx)(sN,{...e,mode:i,isSelectionEnabled:s,isLocked:a,canRemove:c,canMove:u,block:de,name:f,attributes:m,isValid:p,isSelected:h})})}var x8=(0,lu.memo)($ke);var BD=l(D()),v$=l($());var wD=l(M()),p$=l(oM()),G1=l(D()),W1=l(st());var f$=l(Fo()),Pl=l(M()),j1=l(O()),m$=l(I()),U1=l(D()),H1=l(Y()),hy=l($());var Pt=l(I()),Mh=l(O()),wu=l(M()),D1=l(Y()),c$=l(D());var Jp=l(M()),eh=l(I()),C8=l(O()),Nv=l(x()),w8=[(0,eh.createInterpolateElement)((0,Jp.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,Nv.jsx)("kbd",{})}),(0,eh.createInterpolateElement)((0,Jp.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,Nv.jsx)("kbd",{})}),(0,eh.createInterpolateElement)((0,Jp.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,Nv.jsx)("kbd",{})}),(0,Jp.__)("Drag files into the editor to automatically insert media blocks."),(0,Jp.__)("Change a block's type by pressing the block icon on the toolbar.")];function Kke(){let[e]=(0,eh.useState)(Math.floor(Math.random()*w8.length));return(0,Nv.jsx)(C8.Tip,{children:w8[e]})}var B8=Kke;var _h=l($()),KG=l(I()),qG=l(M());var rs=l(O()),dC=l(D()),E8=l(Oe()),th=l(M());var on=l(x()),{Badge:qke}=z(rs.privateApis);function Yke({children:e,onClick:t}){return t?(0,on.jsx)(rs.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function Zke({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,E8.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:o}=r);let f=(0,dC.useSelect)(h=>{if(a||c||!s)return;let{getBlockParentsByBlockName:g}=h(_);return g(d,"core/navigation",!0)[0]},[d,s,c,a]),{selectBlock:m}=(0,dC.useDispatch)(_),p=a?"div":"h2";return(0,on.jsxs)("div",{className:V("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:[f&&(0,on.jsx)(rs.Button,{onClick:()=>m(f),label:f?(0,th.__)("Go to parent Navigation block"):(0,th.__)("Go to parent section"),style:{minWidth:24,padding:0},icon:(0,th.isRTL)()?Qo:Cr,size:"small"}),c&&(0,on.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,on.jsx)(rs.Icon,{icon:(0,th.isRTL)()?Zd:Xd})}),(0,on.jsxs)(Yke,{onClick:a?()=>{m(a)}:void 0,children:[(0,on.jsx)(Pe,{icon:t,showColors:!0}),(0,on.jsxs)(rs.__experimentalVStack,{spacing:1,children:[(0,on.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,on.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,on.jsx)(qke,{children:e})]}),!a&&!c&&o&&(0,on.jsx)(rs.__experimentalText,{className:"block-editor-block-card__description",children:o}),u]})]})]})}var Dv=Zke;var s1=l(Y()),rD=l(D()),Lf=l(I()),oD=l(Oe());var o7=l(D()),BC=l(I()),r7=l(O());var vC=l(D());var at=(e=>(e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateSettings="UPDATE_SETTINGS",e))(at||{}),Vv=(e=>(e.Processing="PROCESSING",e.Paused="PAUSED",e))(Vv||{}),cu=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e))(cu||{});var Xke=()=>{},Qke={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:Xke}};function Jke(e=Qke,t={type:at.Unknown}){switch(t.type){case at.PauseQueue:return{...e,queueStatus:"paused"};case at.ResumeQueue:return{...e,queueStatus:"active"};case at.Add:return{...e,queue:[...e.queue,t.item]};case at.Cancel:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,error:t.error}:o)};case at.Remove:return{...e,queue:e.queue.filter(o=>o.id!==t.id)};case at.OperationStart:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,currentOperation:t.operation}:o)};case at.AddOperations:return{...e,queue:e.queue.map(o=>o.id!==t.id?o:{...o,operations:[...o.operations||[],...t.operations]})};case at.OperationFinish:return{...e,queue:e.queue.map(o=>{if(o.id!==t.id)return o;let r=o.operations?o.operations.slice(1):[],n=o.attachment||t.item.attachment?{...o.attachment,...t.item.attachment}:void 0;return{...o,currentOperation:void 0,operations:r,...t.item,attachment:n,additionalData:{...o.additionalData,...t.item.additionalData}}})};case at.CacheBlobUrl:{let o=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...o,t.blobUrl]}}}case at.RevokeBlobUrls:{let o={...e.blobUrls};return delete o[t.id],{...e,blobUrls:o}}case at.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e}var aN=Jke;var fC={};Ns(fC,{getItems:()=>eve,getSettings:()=>nve,isUploading:()=>tve,isUploadingById:()=>rve,isUploadingByUrl:()=>ove});function eve(e){return e.queue}function tve(e){return e.queue.length>=1}function ove(e,t){return e.queue.some(o=>o.attachment?.url===t||o.sourceUrl===t)}function rve(e,t){return e.queue.some(o=>o.attachment?.id===t||o.sourceAttachmentId===t)}function nve(e){return e.settings}var lN={};Ns(lN,{getAllItems:()=>ive,getBlobUrls:()=>dve,getItem:()=>sve,getPausedUploadForPost:()=>cve,isBatchUploaded:()=>ave,isPaused:()=>uve,isUploadingToPost:()=>lve});function ive(e){return e.queue}function sve(e,t){return e.queue.find(o=>o.id===t)}function ave(e,t){return e.queue.filter(r=>t===r.batchId).length===0}function lve(e,t){return e.queue.some(o=>o.currentOperation===cu.Upload&&o.additionalData.post===t)}function cve(e,t){return e.queue.find(o=>o.status===Vv.Paused&&o.additionalData.post===t)}function uve(e){return e.queueStatus==="paused"}function dve(e,t){return e.blobUrls[t]||[]}var gC={};Ns(gC,{addItems:()=>hve,cancelItem:()=>gve});var mC,fve=new Uint8Array(16);function cN(){if(!mC&&(mC=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!mC))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mC(fve)}var tr=[];for(let e=0;e<256;++e)tr.push((e+256).toString(16).slice(1));function T8(e,t=0){return tr[e[t+0]]+tr[e[t+1]]+tr[e[t+2]]+tr[e[t+3]]+"-"+tr[e[t+4]]+tr[e[t+5]]+"-"+tr[e[t+6]]+tr[e[t+7]]+"-"+tr[e[t+8]]+tr[e[t+9]]+"-"+tr[e[t+10]]+tr[e[t+11]]+tr[e[t+12]]+tr[e[t+13]]+tr[e[t+14]]+tr[e[t+15]]}var mve=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),uN={randomUUID:mve};function pve(e,t,o){if(uN.randomUUID&&!t&&!e)return uN.randomUUID();e=e||{};let r=e.random||(e.rng||cN)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){o=o||0;for(let n=0;n<16;++n)t[o+n]=r[n];return t}return T8(r)}var Fv=pve;var pC=l(M());var Tf=class extends Error{code;file;constructor({code:e,message:t,file:o,cause:r}){super(t,{cause:r}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=o}};function I8(e,t){if(!t)return;let o=t.some(r=>r.includes("/")?r===e.type:e.type.startsWith(`$r}/`));if(e.type&&!o)throw new Tf({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,pC.sprintf)((0,pC.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}var hC=l(M());function P8(e){return e?Object.entries(e).flatMap(([t,o])=>{let[r]=o.split("/"),n=t.split("|");return[o,...n.map(i=>`$r}/$i}`)]}):null}function O8(e,t){let o=P8(t);if(!o)return;let r=o.includes(e.type);if(e.type&&!r)throw new Tf({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,hC.sprintf)((0,hC.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}var oh=l(M());function R8(e,t){if(e.size<=0)throw new Tf({code:"EMPTY_FILE",message:(0,oh.sprintf)((0,oh.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new Tf({code:"SIZE_ABOVE_LIMIT",message:(0,oh.sprintf)((0,oh.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function hve({files:e,onChange:t,onSuccess:o,onError:r,onBatchSuccess:n,additionalData:i,allowedTypes:s}){return async({select:a,dispatch:c})=>{let u=Fv();for(let d of e){try{I8(d,s),O8(d,a.getSettings().allowedMimeTypes)}catch(f){r?.(f);continue}try{R8(d,a.getSettings().maxUploadFileSize)}catch(f){r?.(f);continue}c.addItem({file:d,batchId:u,onChange:t,onSuccess:o,onBatchSuccess:n,onError:r,additionalData:i})}}}function gve(e,t,o=!1){return async({select:r,dispatch:n})=>{let i=r.getItem(e);if(i){if(i.abortController?.abort(),!o){let{onError:s}=i;s?.(t??new Error("Upload cancelled")),!s&&t&&console.error("Upload cancelled",t)}n({type:at.Cancel,id:e,error:t}),n.removeItem(e),n.revokeBlobUrls(e),i.batchId&&r.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}var dN={};Ns(dN,{addItem:()=>yve,finishOperation:()=>Cve,pauseQueue:()=>Sve,prepareItem:()=>Bve,processItem:()=>_ve,removeItem:()=>wve,resumeQueue:()=>xve,revokeBlobUrls:()=>Tve,updateSettings:()=>Ive,uploadItem:()=>Eve});var rh=l(bC());var bve=l(Zr()),kve=l(M());function L8(e){if(e instanceof File)return e;let t=e.type.split("/")[1],o=e.type==="application/pdf"?"document":e.type.split("/")[0];return new File([e],`$o}.$t}`,{type:e.type})}function vve(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}function M8(e){return vve(e,e.name)}var N8=class extends File{constructor(e="stub-file"){super([],e)}};function yve({file:e,batchId:t,onChange:o,onSuccess:r,onBatchSuccess:n,onError:i,additionalData:s={},sourceUrl:a,sourceAttachmentId:c,abortController:u,operations:d}){return async({dispatch:f})=>{let m=Fv(),p=L8(e),h;p instanceof N8||(h=(0,rh.createBlobURL)(p),f({type:at.CacheBlobUrl,id:m,blobUrl:h})),f({type:at.Add,item:{id:m,batchId:t,status:Vv.Processing,sourceFile:M8(p),file:p,attachment:{url:h},additionalData:{convert_format:!1,...s},onChange:o,onSuccess:r,onBatchSuccess:n,onError:i,sourceUrl:a,sourceAttachmentId:c,abortController:u||new AbortController,operations:Array.isArray(d)?d:[cu.Prepare]}}),f.processItem(m)}}function _ve(e){return async({select:t,dispatch:o})=>{if(t.isPaused())return;let r=t.getItem(e),{attachment:n,onChange:i,onSuccess:s,onBatchSuccess:a,batchId:c}=r,u=Array.isArray(r.operations?.[0])?r.operations[0][0]:r.operations?.[0];if(n&&i?.([n]),!u){n&&s?.([n]),o.revokeBlobUrls(e),c&&t.isBatchUploaded(c)&&a?.();return}if(u)switch(o({type:at.OperationStart,id:e,operation:u}),u){case cu.Prepare:o.prepareItem(r.id);break;case cu.Upload:o.uploadItem(e);break}}}function Sve(){return{type:at.PauseQueue}}function xve(){return async({select:e,dispatch:t})=>{t({type:at.ResumeQueue});for(let o of e.getAllItems())t.processItem(o.id)}}function wve(e){return async({select:t,dispatch:o})=>{t.getItem(e)&&o({type:at.Remove,id:e})}}function Cve(e,t){return async({dispatch:o})=>{o({type:at.OperationFinish,id:e,item:t}),o.processItem(e)}}function Bve(e){return async({dispatch:t})=>{let o=[cu.Upload];t({type:at.AddOperations,id:e,operations:o}),t.finishOperation(e,{})}}function Eve(e){return async({select:t,dispatch:o})=>{let r=t.getItem(e);t.getSettings().mediaUpload({filesList:[r.file],additionalData:r.additionalData,signal:r.abortController?.signal,onFileChange:([n])=>{(0,rh.isBlobURL)(n.url)||o.finishOperation(e,{attachment:n})},onSuccess:([n])=>{o.finishOperation(e,{attachment:n})},onError:n=>{o.cancelItem(e,n)}})}}function Tve(e){return async({select:t,dispatch:o})=>{let r=t.getBlobUrls(e);for(let n of r)(0,rh.revokeBlobURL)(n);o({type:at.RevokeBlobUrls,id:e})}}function Ive(e){return{type:at.UpdateSettings,settings:e}}var D8=l(_S()),{lock:K4e,unlock:zv}=(0,D8.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/upload-media");var kC="core/upload-media";var V8={reducer:aN,selectors:fC,actions:gC},uu=(0,vC.createReduxStore)(kC,{reducer:aN,selectors:fC,actions:gC});(0,vC.register)(uu);zv(uu).registerPrivateActions(dN);zv(uu).registerPrivateSelectors(lN);var U8=l(I()),H8=l(D());var F8=l(I()),nh=l(D()),z8=l(Y());var yC=l(x());function Pve(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,nh.createRegistry)({},t),r.registerStore(kC,V8),e.set(t,r)),r}var Ove=(0,z8.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...o})=>{let r=(0,nh.useRegistry)(),[n]=(0,F8.useState)(()=>new WeakMap),i=Pve(n,r,t);return i===r?(0,yC.jsx)(e,{registry:r,...o}):(0,yC.jsx)(nh.RegistryProvider,{value:i,children:(0,yC.jsx)(e,{registry:i,...o})})},"withRegistryProvider"),j8=Ove;var _C=l(x()),Rve=j8(e=>{let{children:t,settings:o}=e,{updateSettings:r}=zv((0,H8.useDispatch)(uu));return(0,U8.useEffect)(()=>{r(o)},[o,r]),(0,_C.jsx)(_C.Fragment,{children:t})}),fN=Rve;var G8=l(I()),ih=l(D()),W8=l(Y());var SC=l(x());function Ave(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,ih.createRegistry)({},t),r.registerStore(Xt,Pp),e.set(t,r)),r}var Lve=(0,W8.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...o})=>{let r=(0,ih.useRegistry)(),[n]=(0,G8.useState)(()=>new WeakMap),i=Ave(n,r,t);return i===r?(0,SC.jsx)(e,{registry:r,...o}):(0,SC.jsx)(ih.RegistryProvider,{value:i,children:(0,SC.jsx)(e,{registry:i,...o})})},"withRegistryProvider"),$8=Lve;var di=l(I()),xC=l(D()),q8=l($());var K8=()=>{};function wC({clientId:e=null,value:t,selection:o,onChange:r=K8,onInput:n=K8}){let i=(0,xC.useRegistry)(),{resetBlocks:s,resetSelection:a,replaceInnerBlocks:c,setHasControlledInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=i.dispatch(_),{getBlockName:f,getBlocks:m,getSelectionStart:p,getSelectionEnd:h}=i.select(_),g=(0,xC.useSelect)(E=>!e||E(_).areInnerBlocksControlled(e),[e]),b=(0,di.useRef)({incoming:null,outgoing:[]}),k=(0,di.useRef)(!1),y=()=>{t&&(d(),e?i.batch(()=>{u(e,!0);let E=t.map(P=>(0,q8.cloneBlock)(P));k.current&&(b.current.incoming=E),d(),c(e,E)}):(k.current&&(b.current.incoming=t),s(t)))},v=()=>{d(),e?(u(e,!1),d(),c(e,[])):s([])},S=(0,di.useRef)(n),w=(0,di.useRef)(r);(0,di.useEffect)(()=>{S.current=n,w.current=r},[n,r]),(0,di.useEffect)(()=>{b.current.outgoing.includes(t)?b.current.outgoing[b.current.outgoing.length-1]===t&&(b.current.outgoing=[]):m(e)!==t&&(b.current.outgoing=[],y(),o&&a(o.selectionStart,o.selectionEnd,o.initialPosition))},[t,e]);let C=(0,di.useRef)(!1);(0,di.useEffect)(()=>{if(!C.current){C.current=!0;return}g||(b.current.outgoing=[],y())},[g]),(0,di.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:P,__unstableIsLastBlockChangeIgnored:R,areInnerBlocksControlled:B}=i.select(_),T=m(e),A=P(),L=!1;k.current=!0;let U=i.subscribe(()=>{if(e!==null&&f(e)===null||!(!e||B(e)))return;let j=P(),N=m(e),F=N!==T;if(T=N,F&&(b.current.incoming||R())){b.current.incoming=null,A=j;return}(F||L&&!F&&j&&!A)&&(A=j,b.current.outgoing.push(T),(A?w.current:S.current)(T,{selection:{selectionStart:p(),selectionEnd:h(),initialPosition:E()}})),L=F},_);return()=>{k.current=!1,U()}},[i,e]),(0,di.useEffect)(()=>()=>{v()},[])}var Z8=l(I()),X8=l(D()),Q8=l(vl()),vo=l(M());function J8(){return null}function Mve(){let{registerShortcut:e}=(0,X8.useDispatch)(Q8.store);return(0,Z8.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,vo.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,vo.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,vo.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,vo.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,vo.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,vo.__)("Paste the copied style to the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"v"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,vo.__)("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,vo.__)("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,vo.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,vo.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,vo.__)("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,vo.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,vo.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,vo.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,vo.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,vo.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,vo.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,vo.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}}),e({name:"core/block-editor/toggle-block-visibility",category:"block",description:(0,vo.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}})},[e]),null}J8.Register=Mve;var CC=J8;var e7=l(I());function Nve(e={}){return(0,e7.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes}),[e])}var t7=Nve;var If=l(x()),Dve=()=>{};function Vve(e,{allowedTypes:t,additionalData:o={},filesList:r,onError:n=Dve,onFileChange:i,onSuccess:s,onBatchSuccess:a}){e.dispatch(uu).addItems({files:r,onChange:i,onSuccess:s,onBatchSuccess:a,onError:({message:c})=>n(c),additionalData:o,allowedTypes:t})}var sh=$8(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=t7(t),i=t;window.__experimentalMediaProcessing&&t.mediaUpload&&(i=(0,BC.useMemo)(()=>({...t,mediaUpload:Vve.bind(null,o)}),[t,o]));let{__experimentalUpdateSettings:s}=z((0,o7.useDispatch)(_));(0,BC.useEffect)(()=>{s({...i,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[i,r,s]),wC(e);let a=(0,If.jsxs)(r7.SlotFillProvider,{passthrough:!0,children:[!i?.isPreviewMode&&(0,If.jsx)(CC.Register,{}),(0,If.jsx)(eU,{children:e.children})]});return window.__experimentalMediaProcessing?(0,If.jsx)(fN,{settings:n,useSubRegistry:!1,children:a}):a}),Fve=e=>(0,If.jsx)(sh,{...e,stripExperimentalSettings:!0,children:e.children}),n7=Fve;var ry=l(Y()),DG=l(D()),i1=l(I()),VG=l(O());var is=l(I()),z7=l(M()),du=l(Y()),j7=l(O()),vN=l(D());var L7=l(D()),M7=l(M()),Gv=l(Y()),N7=l(I());var i7=l(Y()),s7=l(D());function zve(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(_);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function a7(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,s7.useSelect)(zve,[]);return(0,i7.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;if(e==null||!r||t)return;let{length:u}=o;u<2||i&&(s.contentEditable=!0,s.focus(),c.getSelection().removeAllRanges())},[r,t,o,n,e,i])}var ah=l(ze()),mN=l(st()),EC=l(D()),TC=l(Y()),jv=l(I());var pN=l(x());function l7(){let e=(0,jv.useRef)(),t=(0,jv.useRef)(),o=(0,jv.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=z((0,EC.useSelect)(_)),{setLastFocus:d}=z((0,EC.useDispatch)(_)),f=(0,jv.useRef)();function m(k){let y=e.current.ownerDocument===k.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(f.current)f.current=null;else if(r())e.current.focus();else if(n())a()?.current?a().current.focus():e.current.querySelector(`[data-block="$n()}"]`).focus();else if(u()){let v=c(),S=s(v);S.length?e.current.querySelector(`[data-block="$S[0]}"]`).focus():v?e.current.querySelector(`[data-block="$v}"]`).focus():y.focus()}else{let v=k.target.compareDocumentPosition(y)&k.target.DOCUMENT_POSITION_FOLLOWING,S=ah.focus.tabbable.find(e.current);S.length&&(v?S[0]:S[S.length-1]).focus()}}let p=(0,pN.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),h=(0,pN.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,TC.useRefEffect)(k=>{function y(E){if(E.defaultPrevented||E.keyCode!==mN.TAB||!o.current||!t.current)return;let{target:P,shiftKey:R}=E,B=R?"findPrevious":"findNext",T=ah.focus.tabbable[B](P),A=P.closest("[data-block]"),L=A&&T&&(Jw(A,T)||iu(A,T));if((0,ah.isFormElement)(T)&&L)return;let U=R?t:o;f.current=!0,U.current.focus({preventScroll:!0})}function v(E){d({...a(),current:E.target});let{ownerDocument:P}=k;!E.relatedTarget&&E.target.hasAttribute("data-block")&&P.activeElement===P.body&&i()===0&&k.focus()}function S(E){if(E.keyCode!==mN.TAB||E.target?.getAttribute("role")==="region"||e.current===E.target)return;let R=E.shiftKey?"findPrevious":"findNext",B=ah.focus.tabbable[R](E.target);(B===t.current||B===o.current)&&(E.preventDefault(),B.focus({preventScroll:!0}))}let{ownerDocument:w}=k,{defaultView:C}=w;return C.addEventListener("keydown",S),k.addEventListener("keydown",y),k.addEventListener("focusout",v),()=>{C.removeEventListener("keydown",S),k.removeEventListener("keydown",y),k.removeEventListener("focusout",v)}},[]),b=(0,TC.useMergeRefs)([e,g]);return[p,b,h]}var Uo=l(ze()),Ks=l(st()),IC=l(D()),c7=l(Y());function jve(e,t,o){let r=t===Ks.UP||t===Ks.DOWN,{tagName:n}=e,i=e.getAttribute("type");return r&&!o?n==="INPUT"?!["date","datetime-local","month","number","range","time","week"].includes(i):!0:n==="INPUT"?["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i):n!=="TEXTAREA"}function hN(e,t,o,r){let n=Uo.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(!a.closest("[inert]")&&!(a.children.length===1&&Jw(a,a.firstElementChild)&&a.firstElementChild.getAttribute("contenteditable")==="true")){if(!Uo.focus.tabbable.isTabbableIndex(a)||a.isContentEditable&&a.contentEditable!=="true")return!1;if(r){let c=a.getBoundingClientRect();if(c.left>=i.right||c.right<=i.left)return!1}return!0}}return n.find(s)}function u7(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,IC.useSelect)(_),{selectBlock:i}=(0,IC.useDispatch)(_);return(0,c7.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let p=hN(f,m,s);return p&&su(p)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:p,shiftKey:h,ctrlKey:g,altKey:b,metaKey:k}=f,y=m===Ks.UP,v=m===Ks.DOWN,S=m===Ks.LEFT,w=m===Ks.RIGHT,C=y||S,E=S||w,P=y||v,R=E||P,B=h||g||b||k,T=P?Uo.isVerticalEdge:Uo.isHorizontalEdge,{ownerDocument:A}=s,{defaultView:L}=A;if(!R)return;if(r()){if(h||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!jve(p,m,B))return;P?a||(a=(0,Uo.computeCaretRect)(L)):a=null;let U=(0,Uo.isRTL)(p)?!C:C,{keepCaretInsideBlock:G}=o();if(h)u(p,C)&&T(p,C)&&(s.contentEditable=!0,s.focus());else if(P&&(0,Uo.isVerticalEdge)(p,C)&&(!b||(0,Uo.isHorizontalEdge)(p,U))&&!G){let j=hN(p,C,s,!0);j&&((0,Uo.placeCaretAtVerticalEdge)(j,b?!C:C,b?void 0:a),f.preventDefault())}else if(E&&L.getSelection().isCollapsed&&(0,Uo.isHorizontalEdge)(p,U)&&!G){let j=hN(p,U,s);(0,Uo.placeCaretAtHorizontalEdge)(j,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var d7=l(ze()),PC=l(D()),f7=l(vl()),m7=l(Y());function p7(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,PC.useSelect)(_),{multiSelect:r,selectBlock:n}=(0,PC.useDispatch)(_),i=(0,f7.__unstableUseShortcutEventMatch)();return(0,m7.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,d7.isEntirelySelected)(c.target))return;c.preventDefault();let[d]=u,f=o(d),m=e(f);if(u.length===m.length){f&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),n(f));return}r(m[0],m[m.length-1])}return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}},[])}var OC=l(D()),g7=l(Y());function h7(e,t){e.contentEditable=t,t&&e.focus()}function b7(){let{startMultiSelect:e,stopMultiSelect:t}=(0,OC.useDispatch)(_),{isSelectionEnabled:o,hasSelectedBlock:r,isDraggingBlocks:n,isMultiSelecting:i}=(0,OC.useSelect)(_);return(0,g7.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a,u,d;function f(){t(),c.removeEventListener("mouseup",f),d=c.requestAnimationFrame(()=>{if(!r())return;h7(s,!1);let g=c.getSelection();if(g.rangeCount){let b=g.getRangeAt(0),{commonAncestorContainer:k}=b,y=b.cloneRange();u.contains(k)&&(u.focus(),g.removeAllRanges(),g.addRange(y))}})}let m;function p({target:g}){m=g}function h({buttons:g,target:b,relatedTarget:k}){b.contains(m)&&(b.contains(k)||n()||g===1&&(i()||s!==b&&b.getAttribute("contenteditable")==="true"&&o()&&(u=b,e(),c.addEventListener("mouseup",f),h7(s,!0))))}return s.addEventListener("mouseout",h),s.addEventListener("mousedown",p),()=>{s.removeEventListener("mouseout",h),c.removeEventListener("mouseup",f),c.cancelAnimationFrame(d)}},[e,t,o,r])}var RC=l(D()),y7=l(Y()),gN=l(Vo()),_7=l(ze());function Uve(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function Hve(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,_7.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function Gve(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function k7(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function v7(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function S7(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,RC.useDispatch)(_),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,RC.useSelect)(_);return(0,y7.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=Uve(f),p=Hve(f);if(!s.contains(m)||!s.contains(p))return;let h=d.shiftKey&&d.type==="mouseup";if(f.isCollapsed&&!h){if(s.contentEditable==="true"&&!i()){k7(s,!1);let y=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;y=y?.closest("[contenteditable]"),y?.focus()}return}let g=su(m),b=su(p);if(h){let y=n(),v=su(d.target),S=v!==b;(g===b&&f.isCollapsed||!b||S)&&(b=v),g!==y&&(g=y)}if(g===void 0&&b===void 0){k7(s,!1);return}if(g===b)i()?e(g,g):t(g);else{let y=[...r(g),g],v=[...r(b),b],S=Gve(y,v);if(y[S]!==g||v[S]!==b){e(y[S],v[S]);return}let w=v7(m),C=v7(p);if(w&&C){let E=f.getRangeAt(0),P=(0,gN.create)({element:w,range:E,__unstableIsEditableTree:!0}),R=(0,gN.create)({element:C,range:E,__unstableIsEditableTree:!0}),B=P.start??P.end,T=R.start??R.end;o({start:{clientId:g,attributeKey:w.dataset.wpBlockAttributeKey,offset:B},end:{clientId:b,attributeKey:C.dataset.wpBlockAttributeKey,offset:T}})}else e(g,b)}}return a.addEventListener("selectionchange",u),c.addEventListener("mouseup",u),()=>{a.removeEventListener("selectionchange",u),c.removeEventListener("mouseup",u)}},[e,t,o,r])}var AC=l(D()),x7=l(Y());function w7(){let{selectBlock:e}=(0,AC.useDispatch)(_),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,AC.useSelect)(_);return(0,x7.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=su(s.target);s.shiftKey?a&&a!==c&&(n.contentEditable=!0,n.focus()):r()&&e(c)}return n.addEventListener("mousedown",i),()=>{n.removeEventListener("mousedown",i)}},[e,t,o,r])}var LC=l(D()),C7=l(Y()),yl=l(st()),qs=l($());function B7(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,LC.useSelect)(_),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:p,__unstableDeleteSelection:h,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,LC.useDispatch)(_);return(0,C7.useRefEffect)(k=>{function y(w){k.contentEditable==="true"&&w.preventDefault()}function v(w){if(!w.defaultPrevented){if(!n()){if(w.keyCode===yl.ENTER){if(w.shiftKey||e())return;let C=o(),E=i(C),P=c(),R=u();if(P.attributeKey===R.attributeKey){let B=d(C)[P.attributeKey],T=(0,qs.getBlockTransforms)("from").filter(({type:L})=>L==="enter"),A=(0,qs.findTransform)(T,L=>L.regExp.test(B));if(A){f(C,A.transform({content:B})),b();return}}if(!(0,qs.hasBlockSupport)(E,"splitting",!1)&&!w.__deprecatedOnSplit)return;s(E,a(C))&&(m(),w.preventDefault())}return}w.keyCode===yl.ENTER?(k.contentEditable=!1,w.preventDefault(),e()?f(t(),(0,qs.createBlock)((0,qs.getDefaultBlockName)())):m()):w.keyCode===yl.BACKSPACE||w.keyCode===yl.DELETE?(k.contentEditable=!1,w.preventDefault(),e()?p(t()):r()?h(w.keyCode===yl.DELETE):g()):w.key.length===1&&!(w.metaKey||w.ctrlKey)&&(k.contentEditable=!1,r()?h(w.keyCode===yl.DELETE):(w.preventDefault(),k.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function S(w){n()&&(k.contentEditable=!1,r()?h():(w.preventDefault(),k.ownerDocument.defaultView.getSelection().removeAllRanges()))}return k.addEventListener("beforeinput",y),k.addEventListener("keydown",v),k.addEventListener("compositionstart",S),()=>{k.removeEventListener("beforeinput",y),k.removeEventListener("keydown",v),k.removeEventListener("compositionstart",S)}},[])}var Ys=l($()),NC=l(ze()),uh=l(D()),A7=l(Y());var E7=l(I()),T7=l($()),Uv=l(D()),fi=l(M()),I7=l(ii());function lh(){let{getBlockName:e}=(0,Uv.useSelect)(_),{getBlockType:t}=(0,Uv.useSelect)(T7.store),{createSuccessNotice:o}=(0,Uv.useDispatch)(I7.store);return(0,E7.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,fi.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,fi.sprintf)((0,fi.__)('Copied "%s" to clipboard.'),a):i=(0,fi.sprintf)((0,fi.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,fi.sprintf)((0,fi._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,fi.sprintf)((0,fi._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var O7=l(ze()),mi=l($());var P7=l(ze());function Wve(e){let t="<!--StartFragment-->",o=e.indexOf(t);if(o>-1)e=e.substring(o+t.length);else return e;let n=e.indexOf("<!--EndFragment-->");return n>-1&&(e=e.substring(0,n)),e}function $ve(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function ch({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=Wve(o),o=$ve(o);let r=(0,P7.getFilesFromDataTransfer)(e);return r.length&&!Kve(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function Kve(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){let o=/<\s*img\b/gi;if(t.match(o)?.length!==1)return!0;let r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}var bN=Symbol("requiresWrapperOnCopy");function MC(e,t,o){let r=t,[n]=t;if(n&&o.select(mi.store).getBlockType(n.name)[bN]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(_),d=a(n.clientId),f=c(d);f&&(r=(0,mi.createBlock)(f,u(d),r))}let i=(0,mi.serialize)(r);e.clipboardData.setData("text/plain",qve(i)),e.clipboardData.setData("text/html",i)}function R7(e,t){let{plainText:o,html:r,files:n}=ch(e),i=[];if(n.length){let s=(0,mi.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,mi.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,mi.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function qve(e){return e=e.replace(/<br>/g,` 49 `),(0,O7.__unstableStripHTML)(e).trim().replace(/\n\n+/g,` 50 51 `)}function Hv(){let e=(0,uh.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,uh.useSelect)(_),{flashBlock:m,removeBlocks:p,replaceBlocks:h,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:k}=(0,uh.useDispatch)(_),y=lh();return(0,A7.useRefEffect)(v=>{function S(w){if(w.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:T}=w,{ownerDocument:A}=T;if(w.type==="copy"||w.type==="cut"?(0,NC.documentHasUncollapsedSelection)(A):(0,NC.documentHasSelection)(A)&&!A.activeElement.isContentEditable)return}let{activeElement:E}=w.target.ownerDocument;if(!v.contains(E))return;let P=c(),R=a()||s(),B=!R&&!P;if(w.type==="copy"||w.type==="cut")if(w.preventDefault(),C.length===1&&m(C[0]),B)b();else{y(w.type,C);let T;if(R)T=t(C);else{let[A,L]=u(),U=t(C.slice(1,C.length-1));T=[A,...U,L]}MC(w,T,e)}if(w.type==="cut")R&&!B?p(C):(w.target.ownerDocument.activeElement.contentEditable=!1,g());else if(w.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:T,mediaUpload:A}=n();if(w.clipboardData.getData("rich-text")==="true")return;let{plainText:U,html:G,files:j}=ch(w),N=s(),F=[];if(j.length){if(!A){w.preventDefault();return}let J=(0,Ys.getBlockTransforms)("from");F=j.reduce((ee,ie)=>{let de=(0,Ys.findTransform)(J,X=>X.type==="files"&&X.isMatch([ie]));return de&&ee.push(de.transform([ie])),ee},[]).flat()}else F=(0,Ys.pasteHandler)({HTML:G,plainText:U,mode:N?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:T});if(typeof F=="string")return;if(N){h(C,F,F.length-1,-1),w.preventDefault();return}if(!r()&&!(0,Ys.hasBlockSupport)(i(C[0]),"splitting",!1)&&!w.__deprecatedOnSplit)return;let[K]=C,Z=f(K),Q=[];for(let J of F)if(d(J.name,Z))Q.push(J);else{let ee=i(Z),ie=J.name!==ee?(0,Ys.switchToBlockType)(J,ee):[J];if(!ie)return;for(let de of ie)for(let X of de.innerBlocks)Q.push(X)}k(Q),w.preventDefault()}}return v.ownerDocument.addEventListener("copy",S),v.ownerDocument.addEventListener("cut",S),v.ownerDocument.addEventListener("paste",S),()=>{v.ownerDocument.removeEventListener("copy",S),v.ownerDocument.removeEventListener("cut",S),v.ownerDocument.removeEventListener("paste",S)}},[])}var dh=l(x());function kN(){let[e,t,o]=l7(),r=(0,L7.useSelect)(n=>n(_).hasMultiSelection(),[]);return[e,(0,Gv.useMergeRefs)([t,Hv(),B7(),b7(),S7(),w7(),a7(),p7(),u7(),(0,Gv.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,M7.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function Yve({children:e,...t},o){let[r,n,i]=kN();return(0,dh.jsxs)(dh.Fragment,{children:[r,(0,dh.jsx)("div",{...t,ref:(0,Gv.useMergeRefs)([n,o]),className:V(t.className,"block-editor-writing-flow"),children:e}),i]})}var DC=(0,N7.forwardRef)(Yve);var VC=null;function D7(){return VC||(VC=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}let{ownerNode:o,cssRules:r}=t;if(o===null||!r||o.id.startsWith("wp-")||!o.id)return e;function n(i){return Array.from(i).find(({selectorText:s,conditionText:a,cssRules:c})=>a?n(c):s&&(s.includes(".editor-styles-wrapper")||s.includes(".wp-block")))}if(n(r)){let i=o.tagName==="STYLE";if(i){let s=o.id.replace("-inline-css","-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}if(e.push(o.cloneNode(!0)),!i){let s=o.id.replace("-css","-inline-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}}return e},[]),VC)}var rn=l(I()),Wv=l(Y());function V7({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function Zve(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function Xve(e,t){let{containerHeight:o,frameSize:r,scaleValue:n,scrollTop:i}=e,{containerHeight:s,frameSize:a,scaleValue:c,scrollHeight:u}=t,d=i;d=(d+o/2-r)/n-o/2,d=(d+s/2)*c+a-s/2,d=i<=r?0:d;let f=u-s;return Math.round(Math.min(Math.max(0,d),Math.max(0,f)))}function Qve(e,t){let{scaleValue:o,frameSize:r,scrollTop:n}=e,{scaleValue:i,frameSize:s,scrollTop:a}=t;return[{translate:"0 0",scale:o,paddingTop:`$r/o}px`,paddingBottom:`$r/o}px`},{translate:`0 $n-a}px`,scale:i,paddingTop:`$s/i}px`,paddingBottom:`$s/i}px`}]}function F7({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,Wv.useResizeObserver)(),[s,{width:a,height:c}]=(0,Wv.useResizeObserver)(),u=(0,rn.useRef)(0),d=r!==1,f=(0,Wv.useReducedMotion)(),m=r==="auto-scaled",p=(0,rn.useRef)(!1),h=(0,rn.useRef)(null);(0,rn.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?V7({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,k=(0,rn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,rn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),v=(0,rn.useCallback)(()=>{let{scrollTop:C}=k.current,{scrollTop:E}=y.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`$C}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`$E}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",k.current.scrollHeight===k.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(Qve(k.current,y.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),S=(0,rn.useCallback)(()=>{p.current=!1,h.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",y.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`$y.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=y.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),k.current=y.current},[t]),w=(0,rn.useRef)(!1);return(0,rn.useEffect)(()=>{let C=t&&w.current!==d;if(w.current=d,!!C&&(p.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),(0,rn.useEffect)(()=>{if(t&&(m&&k.current.scaleValue!==1&&(k.current.scaleValue=V7({frameSize:k.current.frameSize,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:a})),b<1&&(p.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",b),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`$e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`$i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`$c}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`$a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`$g}px`)),p.current))if(p.current=!1,h.current){h.current.reverse();let C=k.current,E=y.current;k.current=E,y.current=C}else k.current.scrollTop=t.documentElement.scrollTop,k.current.scrollHeight=t.documentElement.scrollHeight,k.current.containerHeight=c,y.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},y.current.scrollHeight=Zve(k.current,y.current),y.current.scrollTop=Xve(k.current,y.current),h.current=v(),f?S():h.current.onfinish=S},[v,S,f,m,b,e,t,i,a,c,o,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:n,containerResizeListener:s}}var ns=l(x());function U7(e,t,o){let r={};for(let s in e)r[s]=e[s];if(e instanceof o.contentDocument.defaultView.MouseEvent){let s=o.getBoundingClientRect();r.clientX+=s.left,r.clientY+=s.top}let n=new t(e.type,r);r.defaultPrevented&&n.preventDefault(),!o.dispatchEvent(n)&&e.preventDefault()}function Jve(e){return(0,du.useRefEffect)(()=>{let{defaultView:t}=e;if(!t)return;let{frameElement:o}=t,r=e.documentElement,n=["dragover","mousemove"],i={};for(let s of n)i[s]=a=>{let u=Object.getPrototypeOf(a).constructor.name,d=window[u];U7(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}function eye({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,z7.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,vN.useSelect)(j=>{let{getSettings:N}=j(_),F=N();return{resolvedAssets:F.__unstableResolvedAssets,isPreviewMode:F.isPreviewMode}},[]),{styles:f="",scripts:m=""}=u,[p,h]=(0,is.useState)(),[g,b]=(0,is.useState)([]),[k,y,v]=kN(),S=(0,du.useRefEffect)(j=>{j._load=()=>{h(j.contentDocument)};let N;function F(J){J.preventDefault()}function K(J){J.target.tagName==="A"&&J.target.getAttribute("href")?.startsWith("#")&&(J.preventDefault(),N.defaultView.location.hash=J.target.getAttribute("href").slice(1))}let{ownerDocument:Z}=j;b(Array.from(Z.body.classList).filter(J=>J.startsWith("admin-color-")||J.startsWith("post-type-")||J==="wp-embed-responsive"));function Q(){let{contentDocument:J}=j,{documentElement:ee}=J;N=J,ee.classList.add("block-editor-iframe__html"),J.dir=Z.dir;for(let ie of D7())J.getElementById(ie.id)||(J.head.appendChild(ie.cloneNode(!0)),d||console.warn(`$ie.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,ie));N.addEventListener("dragover",F,!1),N.addEventListener("drop",F,!1),N.addEventListener("click",K)}return j.addEventListener("load",Q),()=>{delete j._load,j.removeEventListener("load",Q),N?.removeEventListener("dragover",F),N?.removeEventListener("drop",F),N?.removeEventListener("click",K)}},[]),{contentResizeListener:w,containerResizeListener:C,isZoomedOut:E,scaleContainerWidth:P}=F7({scale:r,frameSize:parseInt(n),iframeDocument:p}),R=(0,du.useDisabled)({isDisabled:!i}),B=(0,du.useMergeRefs)([Jve(p),e,y,R]),T=`<!doctype html> 52 <html> 53 <head> 54 <meta charset="utf-8"> 55 <base href="$window.location.origin}"> 56 <script>window.frameElement._load()<\/script> 57 <style> 58 html{ 59 height: auto !important; 60 min-height: 100%; 61 } 62 /* Lowest specificity to not override global styles */ 63 :where(body) { 64 margin: 0; 65 /* Default background color in case zoom out mode background 66 colors the html element */ 67 background-color: white; 68 } 69 </style> 70 $f} 71 $m} 72 </head> 73 <body> 74 <script>document.currentScript.parentElement.remove()<\/script> 75 </body> 76 </html>`,[A,L]=(0,is.useMemo)(()=>{let j=URL.createObjectURL(new window.Blob([T],{type:"text/html"}));return[j,()=>URL.revokeObjectURL(j)]},[T]);(0,is.useEffect)(()=>L,[L]);let U=o>=0&&!d,G=(0,ns.jsxs)(ns.Fragment,{children:[U&&k,(0,ns.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,du.useMergeRefs)([s,S]),tabIndex:o,src:A,title:a,onKeyDown:j=>{if(c.onKeyDown&&c.onKeyDown(j),j.currentTarget.ownerDocument!==j.target.ownerDocument){let{stopPropagation:N}=j.nativeEvent;j.nativeEvent.stopPropagation=()=>{},j.stopPropagation(),j.nativeEvent.stopPropagation=N,U7(j,window.KeyboardEvent,j.currentTarget)}},children:p&&(0,is.createPortal)((0,ns.jsxs)("body",{ref:B,className:V("block-editor-iframe__body","editor-styles-wrapper",...g),children:[w,(0,ns.jsx)(j7.__experimentalStyleProvider,{document:p,children:t})]}),p.documentElement)}),U&&v]});return(0,ns.jsxs)("div",{className:"block-editor-iframe__container",children:[C,(0,ns.jsx)("div",{className:V("block-editor-iframe__scale-container",E&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":E&&`$P}px`},children:G})]})}function tye(e,t){return(0,vN.useSelect)(r=>r(_).getSettings().__internalIsInitialized,[])?(0,ns.jsx)(eye,{...e,forwardedRef:t}):null}var fh=(0,is.forwardRef)(tye);var MG=l(O()),kh=l(I()),NG=l(D());var zC={attribute:/\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,id:/#(?<name>[-\w\P{ASCII}]+)/gu,class:/\.(?<name>[-\w\P{ASCII}]+)/gu,comma:/\s*,\s*/g,combinator:/\s*[\s>+~]\s*/g,"pseudo-element":/::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,"pseudo-class":/:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,universal:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,type:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu},oye=new Set(["combinator","comma"]);var rye=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(zC[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return zC[e]}};function nye(e,t){let o=0,r="";for(;t<e.length;t++){let n=e[t];switch(n){case"(":++o;break;case")":--o;break}if(r+=n,o===0)return r}return r}function iye(e,t=zC){if(!e)return[];let o=[e];for(let[n,i]of Object.entries(t))for(let s=0;s<o.length;s++){let a=o[s];if(typeof a!="string")continue;i.lastIndex=0;let c=i.exec(a);if(!c)continue;let u=c.index-1,d=[],f=c[0],m=a.slice(0,u+1);m&&d.push(m),d.push({...c.groups,type:n,content:f});let p=a.slice(u+f.length+1);p&&d.push(p),o.splice(s,1,...d)}let r=0;for(let n of o)switch(typeof n){case"string":throw new Error(`Unexpected sequence $n} found at index $r}`);case"object":r+=n.content.length,n.pos=[r-n.content.length,r],oye.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var sye=/(['"])([^\\\n]+?)\1/g,aye=/\\./g;function yN(e,t=zC){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(aye,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(sye,(i,s,a,c)=>(o.push({value:i,offset:c}),`$s}${"\uE001".repeat(a.length)}$s}`));{let i=0,s;for(;(s=e.indexOf("(",i))>-1;){let a=nye(e,s);o.push({value:a,offset:s}),e=`$e.substring(0,s)}(${"\xB6".repeat(a.length-2)})$e.substring(s+a.length)}`,i=s+a.length}}let r=iye(e,t),n=new Set;for(let i of o.reverse())for(let s of r){let{offset:a,value:c}=i;if(!(s.pos[0]<=a&&a+c.length<=s.pos[1]))continue;let{content:u}=s,d=a-s.pos[0];s.content=u.slice(0,d)+c+u.slice(d+c.length),s.content!==u&&n.add(s)}for(let i of n){let s=rye(i.type);if(!s)throw new Error(`Unknown token type: $i.type}`);s.lastIndex=0;let a=s.exec(i.content);if(!a)throw new Error(`Unable to parse content for $i.type}: $i.content}`);Object.assign(i,a.groups)}return r}function*FC(e,t){switch(e.type){case"list":for(let o of e.list)yield*FC(o,e);break;case"complex":yield*FC(e.left,e),yield*FC(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function H7(e){let t;return Array.isArray(e)?t=e:t=[...FC(e)].map(([o])=>o),t.map(o=>o.content).join("")}var PG=l(cG()),OG=l(HC()),RG=l(fG()),AG=l(TG()),IG=new Map,LG=[{type:"type",content:"body"},{type:"type",content:"html"},{type:"pseudo-class",content:":root"},{type:"pseudo-class",content:":where(body)"},{type:"pseudo-class",content:":where(:root)"},{type:"pseudo-class",content:":where(html)"}];function v_e(e,t){let o=yN(t),r=o.findLastIndex(({content:s,type:a})=>LG.some(c=>s===c.content&&a===c.type)),n=-1;for(let s=r+1;s<o.length;s++)if(o[s].type==="combinator"){n=s;break}let i=yN(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),H7(o)}function y_e({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new PG.default([r&&(0,RG.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:LG.some(d=>a.startsWith(d.content))?v_e(s,a):c}}),o&&(0,AG.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof OG.default?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i.message+` 77 `+i.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i),null}}var __e=(e,t="",o)=>{let r=IG.get(t);return r||(r=new WeakMap,IG.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=y_e(n,t,o),r.set(n,i)),i})},Af=__e;var hu=l(x());wc([Cc,ap]);function S_e(e,t){return(0,kh.useCallback)(o=>{if(!o)return;let{ownerDocument:r}=o,{defaultView:n,body:i}=r,s=t?r.querySelector(t):i,a;if(s)a=n?.getComputedStyle(s,null).getPropertyValue("background-color");else{let u=r.createElement("div");u.classList.add("editor-styles-wrapper"),i.appendChild(u),a=n?.getComputedStyle(u,null).getPropertyValue("background-color"),i.removeChild(u)}let c=ft(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function x_e({styles:e,scope:t,transformOptions:o}){let r=(0,NG.useSelect)(s=>z(s(_)).getStyleOverrides(),[]),[n,i]=(0,kh.useMemo)(()=>{let s=Object.values(e??[]);for(let[a,c]of r){let u=s.findIndex(({id:f})=>a===f),d={...c,id:a};u===-1?s.push(d):s[u]=d}return[Af(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,hu.jsxs)(hu.Fragment,{children:[(0,hu.jsx)("style",{ref:S_e(n,t)}),n.map((s,a)=>(0,hu.jsx)("style",{children:s},a)),(0,hu.jsx)(MG.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})]})}var _l=(0,kh.memo)(x_e);var pi=l(x()),w_e=(0,i1.memo)(vh),tD=2e3,C_e=[];function B_e({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=C_e}){e||(e=t);let[n,{height:i}]=(0,ry.useResizeObserver)(),{styles:s}=(0,DG.useSelect)(d=>({styles:d(_).getSettings().styles}),[]),a=(0,i1.useMemo)(()=>s&&[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...r],[s,r]),c=t/e,u=i?t/(i*c):0;return(0,pi.jsx)(VG.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale($c})`,aspectRatio:u,maxHeight:i>tD?tD*c:void 0,minHeight:o},children:(0,pi.jsxs)(fh,{contentRef:(0,ry.useRefEffect)(d=>{let{ownerDocument:{documentElement:f}}=d;f.classList.add("block-editor-block-preview__content-iframe"),f.style.position="absolute",f.style.width="100%",d.style.boxSizing="border-box",d.style.position="absolute",d.style.width="100%"},[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:i,pointerEvents:"none",maxHeight:tD,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,pi.jsx)(_l,{styles:a}),n,(0,pi.jsx)(w_e,{renderAppender:!1})]})})}function FG(e){let[t,{width:o}]=(0,ry.useResizeObserver)();return(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,pi.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,pi.jsx)(B_e,{...e,containerWidth:o})})]})}var yh=l(I()),HG=l(jG()),UG=(0,HG.createQueue)();function GG({children:e,placeholder:t}){let[o,r]=(0,yh.useState)(!1);return(0,yh.useEffect)(()=>{let n={};return UG.add(n,()=>{(0,yh.flushSync)(()=>{r(!0)})}),()=>{UG.cancel(n)}},[]),o?e:t}var Mf=l(x()),E_e=[];function T_e({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=E_e,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,oD.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: $i}px; }`}],(0,oD.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,rD.useSelect)(u=>u(_).getSettings(),[]),a=(0,Lf.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Lf.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,Mf.jsx)(sh,{value:c,settings:a,children:(0,Mf.jsx)(FG,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var WG=(0,Lf.memo)(T_e);WG.Async=GG;var nn=WG;function $G({blocks:e,props:t={},layout:o}){let r=(0,rD.useSelect)(u=>u(_).getSettings(),[]),n=(0,Lf.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,s1.useDisabled)(),s=(0,s1.useMergeRefs)([t.ref,i]),a=(0,Lf.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,Mf.jsxs)(sh,{value:a,settings:n,children:[(0,Mf.jsx)(_l,{}),(0,Mf.jsx)(ny,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:V(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var gu=l(x());function I_e({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,_h.isReusableBlock)(e),c=(0,KG.useMemo)(()=>s?(0,_h.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,_h.createBlock)(t,i),[t,s,i]),u=144,d=280,f=s?.viewportWidth??500,m=d/f,p=m!==0&&m<1&&u?u/m:u;return(0,gu.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,gu.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,gu.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,gu.jsx)(nn,{blocks:c,viewportWidth:f,minHeight:u,additionalStyles:[{css:` 78 body { 79 padding: 24px; 80 min-height:$Math.round(p)}px; 81 display:flex; 82 align-items:center; 83 } 84 .is-root-container { width: 100%; } 85 `}]})}):(0,gu.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,qG.__)("No preview available.")})}),!a&&(0,gu.jsx)(Dv,{title:o,icon:r,description:n})]})}var a1=I_e;var Th=l(M()),wl=l(I()),uD=l(Y());var lW=l($()),cW=l(Y());var Eh=l(I()),bu=l($()),sW=l(O()),iy=l(st());var oW=l(O()),rW=l(I());var Sh=l(I()),YG=l(M()),ZG=l(Fo()),XG=l(x());function P_e(e,t){let[o,r]=(0,Sh.useState)(!1);return(0,Sh.useEffect)(()=>{o&&(0,ZG.speak)((0,YG.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,XG.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var nD=(0,Sh.forwardRef)(P_e);var QG=l(I()),JG=l(O()),eW=l(x());function O_e(e,t){return(0,eW.jsx)(JG.Composite.Group,{role:"presentation",ref:t,...e})}var iD=(0,QG.forwardRef)(O_e);var c1=l(O()),tW=l(I()),l1=l(x());function R_e({isFirst:e,as:t,children:o,...r},n){return(0,l1.jsx)(c1.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,l1.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,l1.jsx)(c1.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var sD=(0,tW.forwardRef)(R_e);var aD=l(x());function A_e({key:e,children:t}){return(0,aD.jsx)(rW.Fragment,{children:t},e)}function L_e({children:e}){return(0,aD.jsx)(oW.Composite,{focusShift:!0,focusWrap:"horizontal",render:A_e,children:e})}var xh=L_e;var nW=l(O()),d1=l($()),f1=l(D()),iW=l(I());var Ch=l(M()),wh=l(O());var as=l(x());function u1({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,Ch.__)("Pattern");return(0,as.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,as.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,as.jsxs)(wh.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,as.jsx)(wh.FlexItem,{children:t?(0,as.jsx)(Pe,{icon:t}):n||(0,Ch.sprintf)((0,Ch._n)("%d block","%d blocks",e),e)}),(0,as.jsx)(wh.FlexItem,{children:(0,as.jsx)(Pe,{icon:yk})}),r&&(0,as.jsx)(wh.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,as.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var lD=l(x()),M_e=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,f1.useSelect)(f=>i&&f(d1.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=z((0,f1.useDispatch)(_)),u=(0,iW.useMemo)(()=>n?.type===Et.user&&n?.syncStatus!=="unsynced"?[(0,d1.createBlock)("core/block",{ref:n.id})]:void 0,[n?.type,n?.syncStatus,n?.id]);if(!e)return r({draggable:!1,onDragStart:void 0,onDragEnd:void 0});let d=u??t;return(0,lD.jsx)(nW.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:d},onDragStart:f=>{a();let m=new Set;for(let p of d){let h=`wp-block:$p.name}`;m.has(h)||(f.dataTransfer.items.add("",h),m.add(h))}},onDragEnd:()=>{c()},__experimentalDragComponent:(0,lD.jsx)(u1,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},Bh=M_e;var Sl=l(x());function N_e({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,Eh.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,Eh.useMemo)(()=>[(0,bu.createBlock)(o.name,o.initialAttributes,(0,bu.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,bu.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,bu.isTemplatePart)(o);return(0,Sl.jsx)(Bh,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:p})=>(0,Sl.jsx)("div",{className:V("block-editor-block-types-list__list-item",{"is-synced":d}),draggable:f,onDragStart:h=>{a.current=!0,m&&(n(null),m(h))},onDragEnd:h=>{a.current=!1,p&&p(h)},children:(0,Sl.jsxs)(sD,{isFirst:t,className:V("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:h=>{h.preventDefault(),r(o,(0,iy.isAppleOS)()?h.metaKey:h.ctrlKey),n(null)},onKeyDown:h=>{let{keyCode:g}=h;g===iy.ENTER&&(h.preventDefault(),r(o,(0,iy.isAppleOS)()?h.metaKey:h.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,Sl.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,Sl.jsx)(Pe,{icon:o.icon,showColors:!0})}),(0,Sl.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,Sl.jsx)(sW.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var aW=(0,Eh.memo)(N_e);var sy=l(x());function D_e(e,t){let o=[];for(let r=0,n=e.length;r<n;r+=t)o.push(e.slice(r,r+t));return o}function uW({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,cW.useInstanceId)(uW,s);return(0,sy.jsxs)(nD,{className:s,"aria-label":n,children:[D_e(e,3).map((c,u)=>(0,sy.jsx)(iD,{children:c.map((d,f)=>(0,sy.jsx)(aW,{item:d,className:(0,lW.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`$a}-$u}`},d.id))},u)),r]})}var Nf=uW;var dW=l(O()),xl=l(x());function V_e({title:e,icon:t,children:o}){return(0,xl.jsxs)(xl.Fragment,{children:[(0,xl.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,xl.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,xl.jsx)(dW.Icon,{icon:t})]}),(0,xl.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var ku=V_e;var fW=l(M()),cD=l(x());function F_e(){return(0,cD.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,cD.jsx)("p",{children:(0,fW.__)("No results found.")})})}var ls=F_e;var Eo=l(x()),z_e=e=>e.name.split("/")[0],j_e=6,U_e=[];function mW({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,wl.useMemo)(()=>zs(e,"frecency","desc").slice(0,j_e),[e]),c=(0,wl.useMemo)(()=>e.filter(h=>!h.category),[e]),u=(0,wl.useMemo)(()=>{let h={...t};return Object.keys(t).forEach(g=>{h[g]=e.filter(b=>z_e(b)===g),h[g].length===0&&delete h[g]}),h},[e,t]);(0,wl.useEffect)(()=>()=>n(null),[]);let d=(0,uD.useAsyncList)(o),f=o.length===d.length,m=(0,wl.useMemo)(()=>Object.entries(t),[t]),p=(0,uD.useAsyncList)(f?m:U_e);return(0,Eo.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,Eo.jsx)(ku,{title:(0,Th._x)("Most used","blocks"),children:(0,Eo.jsx)(Nf,{items:a,onSelect:r,onHover:n,label:(0,Th._x)("Most used","blocks")})}),d.map(h=>{let g=e.filter(b=>b.category===h.slug);return!g||!g.length?null:(0,Eo.jsx)(ku,{title:h.title,icon:h.icon,children:(0,Eo.jsx)(Nf,{items:g,onSelect:r,onHover:n,label:h.title})},h.slug)}),f&&c.length>0&&(0,Eo.jsx)(ku,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Th.__)("Uncategorized"),children:(0,Eo.jsx)(Nf,{items:c,onSelect:r,onHover:n,label:(0,Th.__)("Uncategorized")})}),p.map(([h,g])=>{let b=u[h];return!b||!b.length?null:(0,Eo.jsx)(ku,{title:g.title,icon:g.icon,children:(0,Eo.jsx)(Nf,{items:b,onSelect:r,onHover:n,label:g.title})},h)})]})}function H_e({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=Wc(e,t);if(!i.length)return(0,Eo.jsx)(ls,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,Eo.jsx)(xh,{children:(0,Eo.jsxs)("div",{ref:n,children:[!!u.length&&(0,Eo.jsx)(Eo.Fragment,{children:(0,Eo.jsx)(mW,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,Eo.jsx)(mW,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var pW=(0,wl.forwardRef)(H_e);var MW=l(I()),NW=l(Y()),DW=l(O()),VW=l(M());var IW=l(O()),gD=l(I()),PW=l(M());var m1=l(O()),dD=l(M()),Cl=l(x());function G_e({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,Cl.jsx)("div",{className:`$r}__categories-list`,children:t.map(({name:n,label:i})=>(0,Cl.jsx)(m1.Button,{__next40pxDefaultSize:!0,label:i,className:`$r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function W_e({searchValue:e,setSearchValue:t}){return(0,Cl.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,Cl.jsx)(m1.SearchControl,{onChange:t,value:e,label:(0,dD.__)("Search"),placeholder:(0,dD.__)("Search")})})}function $_e({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,Cl.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,Cl.jsx)(W_e,{searchValue:r,setSearchValue:n}),!r&&(0,Cl.jsx)(G_e,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var hW=$_e;var El=l(I()),Ph=l(M()),wW=l(Y()),CW=l(O()),BW=l(Fo());var gW=l($()),Xs=l(I()),Bl=l(O()),bW=l(Y()),kW=l(M());var sn=l(O()),hi=l(M()),mr=l(x());function p1({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,mr.jsxs)(sn.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,mr.jsx)(sn.__experimentalText,{variant:"muted",children:(0,hi.sprintf)((0,hi._n)("%s item","%s items",r),r)}),t>1&&(0,mr.jsxs)(sn.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,mr.jsxs)(sn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,mr.jsx)(sn.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,hi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,mr.jsx)("span",{children:"\xAB"})}),(0,mr.jsx)(sn.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,hi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,mr.jsx)("span",{children:"\u2039"})})]}),(0,mr.jsx)(sn.__experimentalText,{variant:"muted",children:(0,hi.sprintf)((0,hi._x)("%1$s of %2$s","paging"),e,t)}),(0,mr.jsxs)(sn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,mr.jsx)(sn.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,hi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,mr.jsx)("span",{children:"\u203A"})}),(0,mr.jsx)(sn.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,hi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,mr.jsx)("span",{children:"\xBB"})})]})]})]})}var zt=l(x()),K_e=({showTooltip:e,title:t,children:o})=>e?(0,zt.jsx)(Bl.Tooltip,{text:t,children:o}):(0,zt.jsx)(zt.Fragment,{children:o});function vW({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,Xs.useState)(!1),{blocks:d,viewportWidth:f}=o,p=`block-editor-block-patterns-list__item-description-${(0,bW.useInstanceId)(vW)}`,h=o.type===Et.user,g=(0,Xs.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let k=(0,gW.cloneBlock)(b);return k.attributes.metadata?.categories?.includes(s)&&(k.attributes.metadata.categories=[s]),k}),[d,t,s]);return(0,zt.jsx)(Bh,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:k,onDragEnd:y})=>(0,zt.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:v=>{u(!0),k&&(n?.(null),k(v))},onDragEnd:v=>{u(!1),y&&y(v)},children:(0,zt.jsx)(K_e,{showTooltip:i&&!h,title:o.title,children:(0,zt.jsxs)(Bl.Composite.Item,{render:(0,zt.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?p:void 0,className:V("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===Et.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,zt.jsx)(nn.Async,{placeholder:(0,zt.jsx)(q_e,{}),children:(0,zt.jsx)(nn,{blocks:d,viewportWidth:f})}),(!i||h)&&(0,zt.jsxs)(Bl.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[h&&!o.syncStatus&&(0,zt.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,zt.jsx)(Te,{className:"block-editor-patterns__pattern-icon",icon:oi})}),(0,zt.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,zt.jsx)(Bl.VisuallyHidden,{id:p,children:o.description})]})})})})}function q_e(){return(0,zt.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function Y_e({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,kW.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,Xs.useState)(void 0),[m,p]=(0,Xs.useState)(null);(0,Xs.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let h=(g,b)=>{p(g.name),r(g,b)};return(0,zt.jsxs)(Bl.Composite,{orientation:n,activeId:d,setActiveId:f,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:u,children:[t.map(g=>(0,zt.jsx)(vW,{id:g.name,pattern:g,onClick:h,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,zt.jsx)(p1,{...c})]})}var Qs=(0,Xs.forwardRef)(Y_e);var Df=l(D()),_W=l($()),h1=l(M()),SW=l(Fo()),fD=l(I());function yW({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(_).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(_).getBlockIndex(n[i+1])+1:r.select(_).getBlockOrder(o).length}function Z_e({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,Df.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=z((0,Df.useSelect)(_)),{destinationRootClientId:f,destinationIndex:m}=(0,Df.useSelect)(S=>{let{getSelectedBlockClientId:w,getBlockRootClientId:C,getBlockIndex:E,getBlockOrder:P,getInsertionPoint:R}=z(S(_)),B=w(),T=e,A,L=R();return t!==void 0?A=t:L&&L.hasOwnProperty("index")?(T=L?.rootClientId?L.rootClientId:e,A=L.index):o?A=E(o):!r&&B?(T=C(B),A=E(B)+1):A=P(T).length,{destinationRootClientId:T,destinationIndex:A}},[e,t,o,r]),{replaceBlocks:p,insertBlocks:h,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:k}=z((0,Df.useDispatch)(_)),y=(0,fD.useCallback)((S,w,C=!1,E)=>{(C||i||s)&&k(null);let P=c();!r&&P&&(0,_W.isUnmodifiedDefaultBlock)(P,"content")?p(P.clientId,S,null,i||C?0:null,w):h(S,r||E===void 0?m:yW({destinationRootClientId:f,destinationIndex:m,rootClientId:E,registry:a}),r||E===void 0?f:E,s,i||C?0:null,w);let R=Array.isArray(S)?S.length:1,B=(0,h1.sprintf)((0,h1._n)("%d block added.","%d blocks added.",R),R);(0,SW.speak)(B),n&&n(S)},[r,c,p,h,f,m,n,i,s,k,a]),v=(0,fD.useCallback)(S=>{if(S&&!d()){let w=u(S.name,f);w!==null&&g(w,yW({destinationRootClientId:f,destinationIndex:m,rootClientId:w,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,y,v]}var vu=Z_e;var ay=l(I()),g1=l($()),ly=l(D()),b1=l(M()),xW=l(ii());var X_e=(e,t,o,r)=>{let n=(0,ay.useMemo)(()=>({[Dc]:!!r}),[r]),{patternCategories:i,patterns:s,userPatternCategories:a}=(0,ly.useSelect)(m=>{let{getSettings:p,__experimentalGetAllowedPatterns:h}=z(m(_)),{__experimentalUserPatternCategories:g,__experimentalBlockPatternCategories:b}=p();return{patterns:h(t,n),userPatternCategories:g,patternCategories:b}},[t,n]),{getClosestAllowedInsertionPointForPattern:c}=z((0,ly.useSelect)(_)),u=(0,ay.useMemo)(()=>{let m=[...i];return a?.forEach(p=>{m.find(h=>h.name===p.name)||m.push(p)}),m},[i,a]),{createSuccessNotice:d}=(0,ly.useDispatch)(xW.store),f=(0,ay.useCallback)((m,p)=>{let h=r?t:c(m,t);if(h===null)return;let g=m.type===Et.user&&m.syncStatus!=="unsynced"?[(0,g1.createBlock)("core/block",{ref:m.id})]:p;e((g??[]).map(b=>{let k=(0,g1.cloneBlock)(b);return k.attributes.metadata?.categories?.includes(o)&&(k.attributes.metadata.categories=[o]),k}),m.name,!1,h),d((0,b1.sprintf)((0,b1.__)('Block pattern "%s" inserted.'),m.title),{type:"snackbar",id:"inserter-notice"})},[d,e,o,t,c,r]);return[s,u,f]},yu=X_e;var Ih=l(I()),mD=l(Y()),pD=l(ze()),k1=20;function v1(e,t,o,r=""){let[n,i]=(0,Ih.useState)(1),s=(0,mD.usePrevious)(t),a=(0,mD.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,Ih.useMemo)(()=>e.slice(u*k1,u*k1+k1),[u,e]),f=Math.ceil(e.length/k1),m=p=>{(0,pD.getScrollContainer)(o?.current)?.scrollTo(0,0),i(p)};return(0,Ih.useEffect)(function(){(0,pD.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var cs=l(x());function Q_e({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,cs.jsx)(CW.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,Ph.sprintf)((0,Ph._n)("%d pattern found","%d patterns found",t),t)}):null}function J_e({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,El.useRef)(),s=(0,wW.useDebounce)(BW.speak,500),[a,c]=vu({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=yu(c,a,t),f=(0,El.useMemo)(()=>o.map(k=>k.name),[o]),m=(0,El.useMemo)(()=>{let k=u.filter(y=>{if(t===df.name||t===al.name&&y.type===Et.user||t===Cp.name&&y.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let v=y.categories?.some(S=>f.includes(S))??!1;return!y.categories?.length||!v}return y.categories?.includes(t)});return e?iv(k,e):k},[e,u,t,f]);(0,El.useEffect)(()=>{if(!e)return;let k=m.length,y=(0,Ph.sprintf)((0,Ph._n)("%d result found.","%d results found.",k),k);s(y)},[e,s,m.length]);let p=v1(m,t,i),[h,g]=(0,El.useState)(e);e!==h&&(g(e),p.changePage(1));let b=!!m?.length;return(0,cs.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,cs.jsx)(Q_e,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,cs.jsx)(xh,{children:b&&(0,cs.jsxs)(cs.Fragment,{children:[(0,cs.jsx)(Qs,{blockPatterns:p.categoryPatterns,onClickPattern:(k,y)=>{d(k,y),n()},isDraggable:!1}),(0,cs.jsx)(p1,{...p})]})})]})}var EW=J_e;var hD=l(I()),Oh=l(M()),TW=l(Fo());function eSe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function Rh(e,t="all"){let[o,r]=yu(void 0,e),n=(0,hD.useMemo)(()=>t==="all"?o:o.filter(s=>!Rx(s,t)),[t,o]);return(0,hD.useMemo)(()=>{let s=r.filter(a=>n.some(c=>c.categories?.includes(a.name))).sort((a,c)=>a.label.localeCompare(c.label));return n.some(a=>!eSe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,Oh._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(Cp),n.some(a=>a.type===Et.user)&&s.unshift(al),n.length>0&&s.unshift({name:df.name,label:df.label}),(0,TW.speak)((0,Oh.sprintf)((0,Oh._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var Vf=l(x());function tSe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,gD.useState)(""),[i,s]=(0,gD.useState)(e?.name),a=Rh(t);return(0,Vf.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,Vf.jsx)(hW,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,Vf.jsx)(EW,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function oSe({onModalClose:e,...t}){return(0,Vf.jsx)(IW.Modal,{title:(0,PW.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,Vf.jsx)(tSe,{onModalClose:e,...t})})}var OW=oSe;var Ah=l(M()),Tt=l(O());var Ho=l(x());function rSe({title:e}){return(0,Ho.jsx)(Tt.__experimentalVStack,{spacing:0,children:(0,Ho.jsx)(Tt.__experimentalView,{children:(0,Ho.jsx)(Tt.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Ho.jsxs)(Tt.__experimentalHStack,{spacing:2,children:[(0,Ho.jsx)(Tt.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,Ah.isRTL)()?Qo:Cr,size:"small",label:(0,Ah.__)("Back")}),(0,Ho.jsx)(Tt.__experimentalSpacer,{children:(0,Ho.jsx)(Tt.__experimentalHeading,{level:5,children:e})})]})})})})}function y1({categories:e,children:t}){return(0,Ho.jsxs)(Tt.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,Ho.jsx)(Tt.Navigator.Screen,{path:"/",children:(0,Ho.jsx)(Tt.__experimentalItemGroup,{children:e.map(o=>(0,Ho.jsx)(Tt.Navigator.Button,{path:`/category/$o.name}`,as:Tt.__experimentalItem,isAction:!0,children:(0,Ho.jsxs)(Tt.__experimentalHStack,{children:[(0,Ho.jsx)(Tt.FlexBlock,{children:o.label}),(0,Ho.jsx)(Te,{icon:(0,Ah.isRTL)()?Cr:Qo})]})},o.name))})}),e.map(o=>(0,Ho.jsxs)(Tt.Navigator.Screen,{path:`/category/$o.name}`,children:[(0,Ho.jsx)(rSe,{title:(0,Ah.__)("Back")}),t(o)]},o.name))]})}var gi=l(I()),bD=l(M()),us=l(O());var ln=l(O()),an=l(M());var _1=l(I());var or=l(x()),RW=e=>e!=="all"&&e!=="user",nSe=e=>e.name===al.name,iSe=[{value:"all",label:(0,an._x)("All","patterns")},{value:Et.directory,label:(0,an.__)("Pattern Directory")},{value:Et.theme,label:(0,an.__)("Theme & Plugins")},{value:Et.user,label:(0,an.__)("User")}];function AW({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===al.name?Et.user:r,a=RW(s),c=nSe(i),u=(0,_1.useMemo)(()=>[{value:"all",label:(0,an._x)("All","patterns")},{value:Kk.full,label:(0,an._x)("Synced","patterns"),disabled:a},{value:Kk.unsynced,label:(0,an._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),RW(f)&&e("all")}return(0,or.jsx)(or.Fragment,{children:(0,or.jsx)(ln.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,an.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,or.jsx)(Te,{icon:(0,or.jsx)(ln.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,or.jsx)(ln.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,or.jsxs)(or.Fragment,{children:[!c&&(0,or.jsx)(ln.MenuGroup,{label:(0,an.__)("Source"),children:(0,or.jsx)(ln.MenuItemsChoice,{choices:iSe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,or.jsx)(ln.MenuGroup,{label:(0,an.__)("Type"),children:(0,or.jsx)(ln.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,or.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,_1.createInterpolateElement)((0,an.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,or.jsx)(ln.ExternalLink,{href:(0,an.__)("https://wordpress.org/patterns/")})})})]})})})}var Rr=l(x()),sSe=()=>{};function S1({rootClientId:e,onInsert:t,onHover:o=sSe,category:r,showTitlesAsTooltip:n}){let[i,,s]=yu(t,e,r?.name),[a,c]=(0,gi.useState)("all"),[u,d]=(0,gi.useState)("all"),f=Rh(e,u),m=(0,gi.useRef)(),p=(0,gi.useMemo)(()=>i.filter(y=>Rx(y,u,a)?!1:r.name===df.name||r.name===al.name&&y.type===Et.user||r.name===Cp.name&&y.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?y.categories?!y.categories.some(v=>f.some(S=>S.name===v)):!0:y.categories?.includes(r.name)),[i,f,r.name,u,a]),h=v1(p,r,m),{changePage:g}=h;(0,gi.useEffect)(()=>()=>o(null),[]);let b=(0,gi.useCallback)(y=>{c(y),g(1)},[c,g]),k=(0,gi.useCallback)(y=>{d(y),g(1)},[d,g]);return(0,Rr.jsxs)(Rr.Fragment,{children:[(0,Rr.jsxs)(us.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,Rr.jsxs)(us.__experimentalHStack,{children:[(0,Rr.jsx)(us.FlexBlock,{children:(0,Rr.jsx)(us.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,Rr.jsx)(AW,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:k,scrollContainerRef:m,category:r})]}),!p.length&&(0,Rr.jsx)(us.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,bD.__)("No results found")})]}),p.length>0&&(0,Rr.jsxs)(Rr.Fragment,{children:[(0,Rr.jsx)(us.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,bD.__)("Drag and drop patterns into the canvas.")}),(0,Rr.jsx)(Qs,{ref:m,blockPatterns:h.categoryPatterns,onClickPattern:s,onHover:o,label:r.label,orientation:"vertical",category:r.name,isDraggable:!0,showTitlesAsTooltip:n,patternFilter:u,pagingProps:h})]})]})}var w1=l(Y()),C1=l(O()),LW=l(I());var Ff=l(x()),{Tabs:x1}=z(C1.privateApis);function aSe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,w1.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,w1.usePrevious)(t),c=t?t.name:null,[u,d]=(0,LW.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,Ff.jsxs)(x1,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(p=>p.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,Ff.jsx)(x1.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,Ff.jsx)(x1.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,Ff.jsx)(x1.TabPanel,{tabId:m.name,focusable:!1,children:(0,Ff.jsx)(C1.__unstableMotion.div,{className:"block-editor-inserter__category-panel",initial:a?"open":"closed",animate:"open",variants:{open:{transform:"translateX( 0 )",transitionEnd:{zIndex:"1"}},closed:{transform:"translateX( -100% )",zIndex:"-1"}},transition:s,children:r})},m.name))]})}var B1=aSe;var En=l(x());function lSe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,MW.useState)(!1),a=Rh(r),c=(0,NW.useViewportMatch)("medium","<");return a.length?(0,En.jsxs)(En.Fragment,{children:[!c&&(0,En.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,En.jsx)(B1,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,En.jsx)(DW.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,VW.__)("Explore all patterns")})]}),c&&(0,En.jsx)(y1,{categories:a,children:u=>(0,En.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,En.jsx)(S1,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,En.jsx)(OW,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,En.jsx)(ls,{})}var FW=lSe;var t$=l(M()),o$=l(Y()),r$=l(O()),I1=l(I());var T1=l(O()),XW=l(M()),QW=l(Y());var $W=l(O()),KW=l(M());var It=l(O()),Tn=l(M()),Js=l(I()),kD=l($());var cy=l(D()),UW=l(ii()),HW=l(bC()),GW=l(Zr());var zW=l($()),jW=l(x()),cSe={image:"img",video:"video",audio:"audio"};function E1(e,t){let o={id:e.id||void 0,caption:e.caption||void 0},r=e.url,n=e.alt||void 0;t==="image"?(o.url=r,o.alt=n):["video","audio"].includes(t)&&(o.src=r);let i=cSe[t],s=(0,jW.jsx)(i,{src:e.previewUrl||r,alt:n,controls:t==="audio"?!0:void 0,inert:"true",onError:({currentTarget:a})=>{a.src===e.previewUrl&&(a.src=r)}});return[(0,zW.createBlock)(`core/$t}`,o),s]}var Qe=l(x()),uSe=["image"],dSe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function fSe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,Qe.jsx)(It.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,Tn.__)("Options"),popoverProps:dSe,icon:Ki,children:()=>(0,Qe.jsx)(It.MenuGroup,{children:(0,Qe.jsx)(It.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:nR,children:(0,Tn.sprintf)((0,Tn.__)("Report %s"),e.mediaType)})})})}function mSe({onClose:e,onSubmit:t}){return(0,Qe.jsxs)(It.Modal,{title:(0,Tn.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,Qe.jsxs)(It.__experimentalVStack,{spacing:3,children:[(0,Qe.jsx)("p",{children:(0,Tn.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,Qe.jsx)("p",{children:(0,Tn.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,Qe.jsxs)(It.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Qe.jsx)(It.FlexItem,{children:(0,Qe.jsx)(It.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,Tn.__)("Cancel")})}),(0,Qe.jsx)(It.FlexItem,{children:(0,Qe.jsx)(It.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,Tn.__)("Insert")})})]})]})}function WW({media:e,onClick:t,category:o}){let[r,n]=(0,Js.useState)(!1),[i,s]=(0,Js.useState)(!1),[a,c]=(0,Js.useState)(!1),[u,d]=(0,Js.useMemo)(()=>E1(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,cy.useDispatch)(UW.store),{getSettings:p,getBlock:h}=(0,cy.useSelect)(_),{updateBlockAttributes:g}=(0,cy.useDispatch)(_),b=(0,Js.useCallback)(S=>{if(a)return;let w=p(),C=(0,kD.cloneBlock)(S),{id:E,url:P,caption:R}=C.attributes;if(!E&&!w.mediaUpload){n(!0);return}if(E){t(C);return}c(!0),window.fetch(P).then(B=>B.blob()).then(B=>{let T=(0,GW.getFilename)(P)||"image.jpg",A=new File([B],T,{type:B.type});w.mediaUpload({filesList:[A],additionalData:{caption:R},onFileChange([L]){(0,HW.isBlobURL)(L.url)||(h(C.clientId)?g(C.clientId,{...C.attributes,id:L.id,url:L.url}):(t({...C,attributes:{...C.attributes,id:L.id,url:L.url}}),m((0,Tn.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:uSe,onError(L){f(L,{type:"snackbar",id:"inserter-notice"}),c(!1)}})}).catch(()=>{n(!0),c(!1)})},[a,p,t,m,g,f,h]),k=typeof e.title=="string"?e.title:e.title?.rendered||(0,Tn.__)("no title"),y=(0,Js.useCallback)(()=>s(!0),[]),v=(0,Js.useCallback)(()=>s(!1),[]);return(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Bh,{isEnabled:!0,blocks:[u],children:({draggable:S,onDragStart:w,onDragEnd:C})=>(0,Qe.jsx)("div",{className:V("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:S,onDragStart:w,onDragEnd:C,children:(0,Qe.jsxs)("div",{onMouseEnter:y,onMouseLeave:v,children:[(0,Qe.jsx)(It.Tooltip,{text:k,children:(0,Qe.jsx)(It.Composite.Item,{render:(0,Qe.jsx)("div",{"aria-label":k,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,Qe.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,Qe.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,Qe.jsx)(It.Spinner,{})})]})})}),!a&&(0,Qe.jsx)(fSe,{category:o,media:e})]})})}),r&&(0,Qe.jsx)(mSe,{onClose:()=>n(!1),onSubmit:()=>{t((0,kD.cloneBlock)(u)),m((0,Tn.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var vD=l(x());function pSe({mediaList:e,category:t,onClick:o,label:r=(0,KW.__)("Media List")}){return(0,vD.jsx)($W.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,vD.jsx)(WW,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var qW=pSe;var Tl=l(I()),yD=l(D());function YW(e,t={}){let[o,r]=(0,Tl.useState)(),[n,i]=(0,Tl.useState)(!1),s=(0,Tl.useRef)();return(0,Tl.useEffect)(()=>{(async()=>{let a=JSON.stringify({category:e.name,...t});s.current=a,i(!0),r([]);let c=await e.fetch?.(t);a===s.current&&(r(c),i(!1))})()},[e.name,...Object.values(t)]),{mediaList:o,isLoading:n}}function ZW(e){let[t,o]=(0,Tl.useState)([]),r=(0,yD.useSelect)(a=>z(a(_)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,yD.useSelect)(a=>{let{canInsertBlockType:c}=a(_);return{canInsertImage:c("core/image",e),canInsertVideo:c("core/video",e),canInsertAudio:c("core/audio",e)}},[e]);return(0,Tl.useEffect)(()=>{(async()=>{let a=[];if(!r)return;let c=new Map(await Promise.all(r.map(async d=>{if(d.isExternalResource)return[d.name,!0];let f=[];try{f=await d.fetch({per_page:1})}catch{}return[d.name,!!f.length]}))),u={image:n,video:i,audio:s};r.forEach(d=>{u[d.mediaType]&&c.get(d.name)&&a.push(d)}),a.length&&o(a)})()},[n,i,s,r]),t}var _u=l(x()),hSe=10;function uy({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,QW.useDebouncedInput)(),{mediaList:s,isLoading:a}=YW(o,{per_page:i?20:hSe,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,XW.__)("Search");return(0,_u.jsxs)("div",{className:c,children:[(0,_u.jsx)(T1.SearchControl,{className:`$c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,_u.jsx)("div",{className:`$c}-spinner`,children:(0,_u.jsx)(T1.Spinner,{})}),!a&&!s?.length&&(0,_u.jsx)(ls,{}),!a&&!!s?.length&&(0,_u.jsx)(qW,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var JW=l(D());function gSe({fallback:e=null,children:t}){return(0,JW.useSelect)(r=>{let{getSettings:n}=r(_);return!!n().mediaUpload},[])?t:e}var ds=gSe;var e$=l(O()),bSe=()=>null,Su=(0,e$.withFilters)("editor.MediaUpload")(bSe);var In=l(x()),kSe=["image","video","audio"];function vSe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=ZW(e),s=(0,o$.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,I1.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=E1(d,f);r(m)},[r]),u=(0,I1.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,In.jsxs)(In.Fragment,{children:[!s&&(0,In.jsxs)("div",{className:`$a}-container`,children:[(0,In.jsx)(B1,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,In.jsx)(ds,{children:(0,In.jsx)(Su,{multiple:!1,onSelect:c,allowedTypes:kSe,render:({open:d})=>(0,In.jsx)(r$.Button,{__next40pxDefaultSize:!0,onClick:f=>{f.target.focus(),d()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal",children:(0,t$.__)("Open Media Library")})})})]}),s&&(0,In.jsx)(y1,{categories:u,children:d=>(0,In.jsx)(uy,{onInsert:r,rootClientId:e,category:d})})]}):(0,In.jsx)(ls,{})}var _D=vSe;var dy=l(I()),xu=l(M()),SD=l(O()),O1=l(Y()),s$=l(Fo()),a$=l(D());var n$=l(O()),{Fill:i$,Slot:ySe}=(0,n$.createSlotFill)("__unstableInserterMenuExtension");i$.Slot=ySe;var P1=i$;var cn=l(x()),_Se=9,SSe=[];function xSe({filterValue:e,onSelect:t,onHover:o,onHoverPattern:r,rootClientId:n,clientId:i,isAppender:s,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:u,showBlockDirectory:d=!1,isDraggable:f=!0,shouldFocusBlock:m=!0,prioritizePatterns:p,selectBlockOnInsert:h,isQuick:g}){let b=(0,O1.useDebounce)(s$.speak,500),{prioritizedBlocks:k}=(0,a$.useSelect)(N=>({prioritizedBlocks:N(_).getBlockListSettings(n)?.prioritizedInserterBlocks||SSe}),[n]),[y,v]=vu({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:h}),[S,w,C,E]=Wc(y,v,g),[P,,R]=yu(v,y,void 0,g),B=(0,dy.useMemo)(()=>{if(c===0)return[];let N=iv(P,e);return c!==void 0?N.slice(0,c):N},[e,P,c]),T=u;p&&B.length>2&&(T=0);let A=(0,dy.useMemo)(()=>{if(T===0)return[];let N=S.filter(Z=>Z.name!=="core/block"),F=zs(N,"frecency","desc");!e&&k.length&&(F=ew(F,k));let K=Xx(F,w,C,e);return T!==void 0?K.slice(0,T):K},[e,S,w,C,T,k]);(0,dy.useEffect)(()=>{if(!e)return;let N=A.length+B.length,F=(0,xu.sprintf)((0,xu._n)("%d result found.","%d results found.",N),N);b(F)},[e,b,A,B]);let L=(0,O1.useAsyncList)(A,{step:_Se}),U=A.length>0||B.length>0,G=!!A.length&&(0,cn.jsx)(ku,{title:(0,cn.jsx)(SD.VisuallyHidden,{children:(0,xu.__)("Blocks")}),children:(0,cn.jsx)(Nf,{items:L,onSelect:E,onHover:o,label:(0,xu.__)("Blocks"),isDraggable:f})}),j=!!B.length&&(0,cn.jsx)(ku,{title:(0,cn.jsx)(SD.VisuallyHidden,{children:(0,xu.__)("Block patterns")}),children:(0,cn.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,cn.jsx)(Qs,{blockPatterns:B,onClickPattern:R,onHover:r,isDraggable:f})})});return(0,cn.jsxs)(xh,{children:[!d&&!U&&(0,cn.jsx)(ls,{}),p?j:G,!!A.length&&!!B.length&&(0,cn.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),p?G:j,d&&(0,cn.jsx)(P1.Slot,{fillProps:{onSelect:E,onHover:o,filterValue:e,hasItems:U,rootClientId:y},children:N=>N.length?N:U?null:(0,cn.jsx)(ls,{})})]})}var R1=xSe;var L1=l(O()),l$=l(I());var Il=l(x()),{Tabs:A1}=z(L1.privateApis);function wSe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,Il.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,Il.jsxs)(A1,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,Il.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,Il.jsx)(L1.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:Jd,label:i,onClick:()=>t(),size:"compact"}),(0,Il.jsx)(A1.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,Il.jsx)(A1.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,Il.jsx)(A1.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var M1=(0,l$.forwardRef)(wSe);var N1=l(D()),Lh=l(I());function fy(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=z((0,N1.useDispatch)(_)),{isZoomedOut:r,isZoomOut:n}=(0,N1.useSelect)(a=>{let{isZoomOut:c}=z(a(_));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,Lh.useRef)(!1),s=(0,Lh.useRef)(e);(0,Lh.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,Lh.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Ke=l(x()),CSe=()=>{};function BSe({rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,onSelect:n,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:a="",shouldFocusBlock:c=!0,onPatternCategorySelection:u,onClose:d,__experimentalInitialTab:f,__experimentalInitialCategory:m},p){let{isZoomOutMode:h,hasSectionRootClientId:g}=(0,c$.useSelect)(le=>{let{isZoomOut:ye,getSectionRootClientId:_e}=z(le(_));return{isZoomOutMode:ye(),hasSectionRootClientId:!!_e()}},[]),[b,k,y]=(0,D1.useDebouncedInput)(a),[v,S]=(0,Pt.useState)(null),[w,C]=(0,Pt.useState)(m),[E,P]=(0,Pt.useState)("all"),[R,B]=(0,Pt.useState)(null),T=(0,D1.useViewportMatch)("large");function A(){return f||(h?"patterns":"blocks")}let[L,U]=(0,Pt.useState)(A());fy(g&&(L==="patterns"||L==="media")&&T);let[j,N,F]=vu({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),K=(0,Pt.useRef)(),Z=(0,Pt.useCallback)((le,ye,_e,Ve)=>{N(le,ye,_e,Ve),n(le),window.requestAnimationFrame(()=>{!c&&!K.current?.contains(p.current.ownerDocument.activeElement)&&K.current?.querySelector("button").focus()})},[N,n,c]),Q=(0,Pt.useCallback)((le,ye,..._e)=>{F(!1),N(le,{patternName:ye},..._e),n()},[N,n]),J=(0,Pt.useCallback)(le=>{F(le),S(le)},[F,S]),ee=(0,Pt.useCallback)((le,ye)=>{C(le),P(ye),u?.()},[C,u]),ie=L==="patterns"&&!y&&!!w,de=L==="media"&&!!R,X=(0,Pt.useMemo)(()=>L==="media"?null:(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)(Mh.SearchControl,{className:"block-editor-inserter__search",onChange:le=>{v&&S(null),k(le)},value:b,label:(0,wu.__)("Search"),placeholder:(0,wu.__)("Search")}),!!y&&(0,Ke.jsx)(R1,{filterValue:y,onSelect:n,onHover:J,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:L==="patterns"})]}),[L,v,S,k,b,y,n,J,c,t,e,r,o]),re=(0,Pt.useMemo)(()=>(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Ke.jsx)(pW,{ref:K,rootClientId:j,onInsert:Z,onHover:J,showMostUsedBlocks:s})}),i&&(0,Ke.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Ke.jsx)(Mh.VisuallyHidden,{as:"h2",children:(0,wu.__)("A tip for using the block editor")}),(0,Ke.jsx)(B8,{})]})]}),[j,Z,J,s,i]),W=(0,Pt.useMemo)(()=>(0,Ke.jsx)(FW,{rootClientId:j,onInsert:Q,onSelectCategory:ee,selectedCategory:w,children:ie&&(0,Ke.jsx)(S1,{rootClientId:j,onInsert:Q,category:w,patternFilter:E,showTitlesAsTooltip:!0})}),[j,Q,ee,E,w,ie]),H=(0,Pt.useMemo)(()=>(0,Ke.jsx)(_D,{rootClientId:j,selectedCategory:R,onSelectCategory:B,onInsert:Z,children:de&&(0,Ke.jsx)(uy,{rootClientId:j,onInsert:Z,category:R})}),[j,Z,R,B,de]),oe=le=>{le!=="patterns"&&C(null),U(le)},ce=(0,Pt.useRef)();return(0,Pt.useLayoutEffect)(()=>{ce.current&&window.requestAnimationFrame(()=>{ce.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Ke.jsxs)("div",{className:V("block-editor-inserter__menu",{"show-panel":ie||de,"is-zoom-out":h}),ref:p,children:[(0,Ke.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Ke.jsx)(M1,{ref:ce,onSelect:oe,onClose:d,selectedTab:L,closeButtonLabel:(0,wu.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,wu.__)("Blocks"),panel:(0,Ke.jsxs)(Ke.Fragment,{children:[X,L==="blocks"&&!y&&re]})},{name:"patterns",title:(0,wu.__)("Patterns"),panel:(0,Ke.jsxs)(Ke.Fragment,{children:[X,L==="patterns"&&!y&&W]})},{name:"media",title:(0,wu.__)("Media"),panel:(0,Ke.jsxs)(Ke.Fragment,{children:[X,H]})}]})}),i&&v&&(0,Ke.jsx)(Mh.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Ke.jsx)(a1,{item:v})})]})}var xD=(0,Pt.forwardRef)(BSe);function ESe(e,t){return(0,Ke.jsx)(xD,{...e,onPatternCategorySelection:CSe,ref:t})}var u$=(0,Pt.forwardRef)(ESe);var V1=l(I()),my=l(M()),F1=l(O()),d$=l(D());var zf=l(x()),TSe=6,ISe=6,PSe=2;function z1({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,V1.useState)(""),[c,u]=vu({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=Wc(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,d$.useSelect)(g=>{let{getSettings:b,getBlockIndex:k,getBlockCount:y}=g(_),v=b(),S=k(o),w=y();return{setInserterIsOpened:v.__experimentalSetIsInserterOpened,insertionIndex:S===-1?w:S}},[o]),p=i&&d.length>TSe;(0,V1.useEffect)(()=>{f&&f(!1)},[f]);let h=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,zf.jsxs)("div",{className:V("block-editor-inserter__quick-inserter",{"has-search":p,"has-expand":f}),children:[p&&(0,zf.jsx)(F1.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,my.__)("Search"),placeholder:(0,my.__)("Search")}),(0,zf.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,zf.jsx)(R1,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?PSe:0,maxBlockTypes:ISe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,zf.jsx)(F1.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:h,"aria-label":(0,my.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,my.__)("Browse all")})]})}var py=l(x()),OSe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,toggleProps:i={}})=>{let{as:s=j1.Button,label:a,onClick:c,...u}=i,d=a;!d&&n?d=(0,Pl.sprintf)((0,Pl._x)("Add %s","directly add the only allowed block"),r):d||(d=(0,Pl._x)("Add block","Generic label for block inserter button"));function f(m){e&&e(m),c&&c(m)}return(0,py.jsx)(s,{__next40pxDefaultSize:i.as?void 0:!0,icon:ti,label:d,tooltipPosition:"bottom",onClick:f,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...u})},RSe=class extends m$.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){let{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){let{disabled:o,blockTitle:r,hasSingleBlockType:n,directInsertBlock:i,toggleProps:s,hasItems:a,renderToggle:c=OSe}=this.props;return c({onToggle:e,isOpen:t,disabled:o||!a,blockTitle:r,hasSingleBlockType:n,directInsertBlock:i,toggleProps:s})}renderContent({onClose:e}){let{rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n,__experimentalIsQuick:i,onSelectOrClose:s,selectBlockOnInsert:a}=this.props;return i?(0,py.jsx)(z1,{onSelect:c=>{let u=Array.isArray(c)&&c?.length?c[0]:c;s&&typeof s=="function"&&s(u),e()},rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:a}):(0,py.jsx)(u$,{onSelect:()=>{e()},rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n})}render(){let{position:e,hasSingleBlockType:t,directInsertBlock:o,insertOnlyAllowedBlock:r,__experimentalIsQuick:n,onSelectOrClose:i}=this.props;return t||o?this.renderToggle({onToggle:r}):(0,py.jsx)(j1.Dropdown,{className:"block-editor-inserter",contentClassName:V("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,Pl.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},bi=(0,H1.compose)([(0,U1.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(_),{getBlockVariations:c}=e(hy.store);o=o||n(t)||void 0;let u=s(o),d=r&&a(o),f=u?.length===1&&c(u[0].name,"inserter")?.length===0,m=!1;return f&&(m=u[0]),{hasItems:i(o),hasSingleBlockType:f,blockTitle:m?m.title:"",allowedBlockType:m,directInsertBlock:d,rootClientId:o}}),(0,U1.withDispatch)((e,t,{select:o})=>({insertOnlyAllowedBlock(){let{rootClientId:r,clientId:n,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!s&&!c)return;function f(b){let{getBlock:k,getPreviousBlockClientId:y}=o(_);if(!b||!n&&!r)return{};let v={},S={};if(n){let w=k(n),C=k(y(n));w?.name===C?.name&&(S=C?.attributes||{})}else{let w=k(r);if(w?.innerBlocks?.length){let C=w.innerBlocks[w.innerBlocks.length-1];c&&c?.name===C.name&&(S=C.attributes)}}return b.forEach(w=>{S.hasOwnProperty(w)&&(v[w]=S[w])}),v}function m(){let{getBlockIndex:b,getBlockSelectionEnd:k,getBlockOrder:y,getBlockRootClientId:v}=o(_);if(n)return b(n);let S=k();return!i&&S&&v(S)===r?b(S)+1:y(r).length}let{insertBlock:p}=e(_),h;if(c){let b=f(c.attributesToCopy);h=(0,hy.createBlock)(c.name,{...c.attributes||{},...b})}else h=(0,hy.createBlock)(a.name);p(h,m(),r,d),u&&u(h);let g=(0,Pl.sprintf)((0,Pl.__)("%s block added"),a.title);(0,f$.speak)(g)}})),(0,H1.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(RSe);var gy=l(x()),ASe="\uFEFF";function Nh({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,G1.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:p}=u(_),h=!d(e),{bodyPlaceholder:g}=f();return{showPrompt:h,isLocked:!!m(e),placeholder:g,isManualGrid:p(e)?.layout?.isManualPlacement}},[e]),{insertDefaultBlock:i,startTyping:s}=(0,G1.useDispatch)(_);if(o||n)return null;let a=(0,p$.decodeEntities)(r)||(0,wD.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,gy.jsxs)("div",{"data-root-client-id":e||"",className:V("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,gy.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,wD.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(W1.ENTER===u.keyCode||W1.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:ASe}),(0,gy.jsx)(bi,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var h$=l(O()),CD=l(I()),by=l(M());var g$=l(Oe());var $1=l(x());function b$({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,$1.jsx)(bi,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...s)=>{n&&typeof n=="function"&&n(...s)},renderToggle:({onToggle:s,disabled:a,isOpen:c,blockTitle:u,hasSingleBlockType:d})=>{let f=!d,m=d?(0,by.sprintf)((0,by._x)("Add %s","directly add the only allowed block"),u):(0,by._x)("Add block","Generic label for block inserter button");return(0,$1.jsx)(h$.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:V(t,"block-editor-button-block-appender"),onClick:s,"aria-haspopup":f?"true":void 0,"aria-expanded":f?c:void 0,disabled:a,label:m,showTooltip:!0,children:(0,$1.jsx)(Te,{icon:ti})})},isAppender:!0})}var k$=(0,CD.forwardRef)((e,t)=>((0,g$.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),b$(e,t))),Cu=(0,CD.forwardRef)(b$);var Dh=l(x());function LSe({rootClientId:e}){return(0,BD.useSelect)(o=>o(_).canInsertBlockType((0,v$.getDefaultBlockName)(),e))?(0,Dh.jsx)(Nh,{rootClientId:e}):(0,Dh.jsx)(Cu,{rootClientId:e,className:"block-list-appender__toggle"})}function y$({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,BD.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(_),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,Dh.jsx)(r,{tabIndex:-1,className:V("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,Dh.jsx)(t,{}):(0,Dh.jsx)(LSe,{rootClientId:e})})}var M$=l(Y()),vy=l(D()),N$=l(I()),D$=l(M());var Vh=l(D()),Eu=l(I()),Y1=l(O()),A$=l(Y());var x$=l(D()),Bu=l(I()),w$=l(O()),C$=l(M());var S$=l(Y()),ED=l(ze()),_$=new WeakMap;function MSe(e){let t=(0,S$.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=_$.get(u);d||(d=(0,ED.getScrollContainer)(u),_$.set(u,d));let f=(0,ED.getScrollContainer)(c);o.contains(f)||d.scrollBy(s,a)}let n={passive:!0};return o.addEventListener("wheel",r,n),()=>{o.removeEventListener("wheel",r,n)}},[e]);return e?t:null}var jf=MSe;var TD=l(x()),NSe=Number.MAX_SAFE_INTEGER;function DSe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,Bu.useReducer)(y=>(y+1)%NSe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,x$.useSelect)(y=>{let{getBlockListSettings:v,getBlockRootClientId:S,isBlockVisible:w}=y(_),C=S(e??t);return{orientation:v(C)?.orientation||"vertical",rootClientId:C,isVisible:w(e)&&w(t)}},[e,t]),p=pt(e),h=pt(t),g=d==="vertical",b=(0,Bu.useMemo)(()=>c<0||!p&&!h||!m?void 0:{contextElement:i==="group"?h||p:p||h,getBoundingClientRect(){let v=p?p.getBoundingClientRect():null,S=h?h.getBoundingClientRect():null,w=0,C=0,E=0,P=0;if(i==="group"){let R=S||v;C=R.top,E=0,P=R.bottom-R.top,w=s==="left"?R.left-2:R.right-2}else g?(C=v?v.bottom:S.top,E=v?v.width:S.width,P=S&&v?S.top-v.bottom:0,w=v?v.left:S.left):(C=v?v.top:S.top,P=v?v.height:S.height,(0,C$.isRTL)()?(w=S?S.right:v.left,E=v&&S?v.left-S.right:0):(w=v?v.right:S.left,E=v&&S?S.left-v.right:0),E=Math.max(E,0));return new window.DOMRect(w,C,E,P)}},[p,h,c,g,m,i,s]),k=jf(n);return(0,Bu.useLayoutEffect)(()=>{if(!p)return;let y=new window.MutationObserver(u);return y.observe(p,{attributes:!0}),()=>{y.disconnect()}},[p]),(0,Bu.useLayoutEffect)(()=>{if(!h)return;let y=new window.MutationObserver(u);return y.observe(h,{attributes:!0}),()=>{y.disconnect()}},[h]),(0,Bu.useLayoutEffect)(()=>{if(p)return p.ownerDocument.defaultView.addEventListener("resize",u),()=>{p.ownerDocument.defaultView?.removeEventListener("resize",u)}},[p]),!p&&!h||!m?null:(0,TD.jsx)(w$.Popover,{ref:k,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:V("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,TD.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var K1=DSe;var I$=l(D()),P$=l(Y()),O$=l(O());var Rl=l(I());var B$=l(Y()),E$=l(O()),Ol=l(I());var ID=l(x()),VSe=Number.MAX_SAFE_INTEGER;function FSe({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=pt(e),u=pt(t??e),d=(0,B$.useMergeRefs)([a,jf(n)]),[f,m]=(0,Ol.useReducer)(h=>(h+1)%VSe,0);(0,Ol.useLayoutEffect)(()=>{if(!c)return;let h=new window.MutationObserver(m);return h.observe(c,{attributes:!0}),()=>{h.disconnect()}},[c]);let p=(0,Ol.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?iN(Qp(c),Qp(u)):Qp(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,ID.jsx)(E$.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:p,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:V("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var Uf=(0,Ol.forwardRef)(FSe),zSe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,ID.jsx)(Uf,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),T$=(0,Ol.forwardRef)(zSe);var q1=l(x());function jSe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=pt(e);return(0,q1.jsx)(Uf,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,q1.jsx)(USe,{selectedElement:a,additionalStyles:n,children:o}):o})}function USe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,Rl.useState)(e.offsetWidth),[i,s]=(0,Rl.useState)(e.offsetHeight);(0,Rl.useEffect)(()=>{let c=new window.ResizeObserver(()=>{n(e.offsetWidth),s(e.offsetHeight)});return c.observe(e,{box:"border-box"}),()=>c.disconnect()},[e]);let a=(0,Rl.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,q1.jsx)("div",{style:a,children:o})}var ki=(0,Rl.forwardRef)(jSe);var PD=l(x()),ky={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function HSe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,I$.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(_),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,P$.useReducedMotion)();return(0,PD.jsx)(ki,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,PD.jsx)(O$.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?ky.show:ky.hide,animate:ky.show,exit:r?ky.show:ky.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var R$=HSe;var Al=l(x()),Fh=(0,Eu.createContext)();Fh.displayName="InsertionPointOpenRefContext";function GSe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,Vh.useDispatch)(_),s=(0,Eu.useContext)(Fh),a=(0,Eu.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:p,isZoomOutMode:h}=(0,Vh.useSelect)(R=>{let{getBlockOrder:B,getBlockListSettings:T,getBlockInsertionPoint:A,isBlockBeingDragged:L,getPreviousBlockClientId:U,getNextBlockClientId:G,getSettings:j,isZoomOut:N}=z(R(_)),F=A(),K=B(F.rootClientId);if(!K.length)return{};let Z=K[F.index-1],Q=K[F.index];for(;L(Z);)Z=U(Z);for(;L(Q);)Q=G(Q);let J=j();return{previousClientId:Z,nextClientId:Q,orientation:T(F.rootClientId)?.orientation||"vertical",rootClientId:F.rootClientId,isDistractionFree:J.isDistractionFree,isInserterShown:F?.__unstableWithInserter,isZoomOutMode:N()}},[]),{getBlockEditingMode:g}=(0,Vh.useSelect)(_),b=(0,A$.useReducedMotion)();function k(R){R.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function y(R){R.target===a.current&&!s.current&&i()}function v(R){R.target!==a.current&&(s.current=!0)}let S=(0,Eu.useCallback)(R=>{!R&&s.current&&(s.current=!1)},[s]),w={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},C={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(p||h&&o!=="insert")return null;let P=V("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,Al.jsx)(K1,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,Al.jsxs)(Y1.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:k,onFocus:v,className:V(P,{"is-with-inserter":m}),onHoverEnd:y,children:[(0,Al.jsx)(Y1.__unstableMotion.div,{variants:w,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,Al.jsx)(Y1.__unstableMotion.div,{variants:C,className:V("block-editor-block-list__insertion-point-inserter"),children:(0,Al.jsx)(bi,{ref:S,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:R=>{s.current=R},onSelectOrClose:()=>{s.current=!1}})})]})})}function L$(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,Vh.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(_),c=i();return{insertionPoint:c,isVisible:s(),isBlockListEmpty:a(c?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,Al.jsx)(R$,{...e},`$t.rootClientId}-$t.index}`):(0,Al.jsx)(GSe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function V$(){let e=(0,N$.useContext)(Fh),t=(0,vy.useSelect)(g=>g(_).getSettings().isDistractionFree||z(g(_)).isZoomOut(),[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:c,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:m}=z((0,vy.useSelect)(_)),{showInsertionPoint:p,hideInsertionPoint:h}=(0,vy.useDispatch)(_);return(0,M$.useRefEffect)(g=>{if(t)return;function b(k){if(e===void 0||e.current||k.target.nodeType===k.target.TEXT_NODE||n())return;if(!k.target.classList.contains("block-editor-block-list__layout")){h();return}let y;if(k.target.classList.contains("is-root-container")||(y=(k.target.getAttribute("data-block")?k.target:k.target.closest("[data-block]")).getAttribute("data-block")),a(y)||u(y)==="disabled"||d(y)==="core/block"||y&&f(y).layout?.isManualPlacement)return;let v=o(y),S=v?.orientation||"vertical",w=!!v?.__experimentalCaptureToolbars,C=k.clientY,E=k.clientX,R=Array.from(k.target.children).find(L=>{let U=L.getBoundingClientRect();return L.classList.contains("wp-block")&&S==="vertical"&&U.top>C||L.classList.contains("wp-block")&&S==="horizontal"&&((0,D$.isRTL)()?U.right<E:U.left>E)});if(!R){h();return}if(!R.id&&(R=R.firstElementChild,!R)){h();return}let B=R.id.slice(6);if(!B||c(B)||m(B)||i().includes(B)&&S==="vertical"&&!w&&!s().hasFixedToolbar)return;let T=R.getBoundingClientRect();if(S==="horizontal"&&(k.clientY>T.bottom||k.clientY<T.top)||S==="vertical"&&(k.clientX>T.right||k.clientX<T.left)){h();return}let A=r(B);if(A===0){h();return}p(y,A,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,p,h,i,t])}var Z1=l(D()),F$=l(Y());var z$=l(x());function Hf(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,Z1.useSelect)(_),{clearSelectedBlock:r}=(0,Z1.useDispatch)(_),{clearBlockSelection:n}=e();return(0,F$.useRefEffect)(i=>{if(!n)return;function s(a){!t()&&!o()||a.target===i&&r()}return i.addEventListener("mousedown",s),()=>{i.removeEventListener("mousedown",s)}},[t,o,r,n])}function j$(e){return(0,z$.jsx)("div",{ref:Hf(),...e})}var lK=l(Y()),jh=l(I()),cK=l(D()),Kf=l($());var U$=l(x());function H$({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Ae();return(0,U$.jsx)(Cu,{className:V({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var G$=l(x());function W$(){let{clientId:e}=Ae();return(0,G$.jsx)(Nh,{rootClientId:e})}var Q1=l(I()),q$=l(D()),X1=l(Oe()),Y$=l(yy());var _y=new WeakMap;function WSe(){let e;return t=>((e===void 0||!(0,Y$.default)(e,t))&&(e=t),e)}function K$(e){let[t]=(0,Q1.useState)(WSe);return t(e)}function Z$(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,q$.useRegistry)(),p=K$(o),h=K$(r),g=c===void 0||t==="contentOnly"?t:c;(0,Q1.useLayoutEffect)(()=>{let b={allowedBlocks:p,prioritizedInserterBlocks:h,templateLock:g};if(u!==void 0&&(b.__experimentalCaptureToolbars=u),d!==void 0)b.orientation=d;else{let k=Xi(f?.type);b.orientation=k.getOrientation(f)}s!==void 0&&((0,X1.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,X1.default)("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),b.directInsert=a),i!==void 0&&(b.directInsert=i),b.directInsert!==void 0&&typeof b.directInsert!="boolean"&&(0,X1.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),_y.get(m)||_y.set(m,{}),_y.get(m)[e]=b,window.queueMicrotask(()=>{let k=_y.get(m);if(Object.keys(k).length){let{updateBlockListSettings:y}=m.dispatch(_);y(k),_y.set(m,{})}})},[e,p,h,g,n,i,s,a,u,d,f,m])}var OD=l(Kd()),J1=l(I()),X$=l(D()),Q$=l($());function J$(e,t,o,r){let n=(0,X$.useRegistry)(),i=(0,J1.useRef)(null);(0,J1.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:c,isBlockSelected:u}=n.select(_),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(_);return window.queueMicrotask(()=>{if(s)return;let m=a(e),p=m.length===0||o==="all"||o==="contentOnly",h=!(0,OD.default)(t,i.current);if(!p||!h)return;i.current=t;let g=(0,Q$.synchronizeBlocksWithTemplate)(m,t);(0,OD.default)(g,m)||(f(),d(e,g,m.length===0&&r&&g.length!==0&&u(e),c()))}),()=>{s=!0}},[t,o,e,n,r])}var eK=l($()),tK=l(D());function oK(e){return(0,tK.useSelect)(t=>{let o=t(_).getBlock(e);if(!o)return;let r=t(eK.store).getBlockType(o.name);if(r&&Object.keys(r.providesContext).length!==0)return Object.fromEntries(Object.entries(r.providesContext).map(([n,i])=>[n,o.attributes[i]]))},[e])}var $f=l(D()),oB=l(I()),rB=l(Y()),sK=l(M()),zh=l($());var RD=l(I()),Pn=l($()),Gf=l(D()),rK=l(ze());function AD(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{return t}return t}function $Se(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:p}=AD(u);if(m==="inserter"){s();let h=p.map(g=>(0,Pn.cloneBlock)(g));i(h,!0,null)}if(m==="block"){let h=o(f[0]);if(d===e&&h===t||f.includes(e)||r(f).some(y=>y===e))return;if(a==="group"){let y=f.map(v=>c(v));i(y,!0,null,f);return}let g=d===e,b=f.length,k=g&&h<t?t-b:t;n(f,d,k)}}}function KSe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,Pn.findTransform)((0,Pn.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function qSe(e){return t=>{let o=(0,Pn.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function eB(e,t,o={}){let{operation:r="insert",nearestSide:n="right"}=o,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:a,getBlockOrder:c,getBlocksByClientId:u,getSettings:d,getBlock:f}=(0,Gf.useSelect)(_),{getGroupingBlockName:m}=(0,Gf.useSelect)(Pn.store),{insertBlocks:p,moveBlocksToPosition:h,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:k,removeBlocks:y}=(0,Gf.useDispatch)(_),v=(0,Gf.useRegistry)(),S=(0,RD.useCallback)((R,B=!0,T=0,A=[])=>{Array.isArray(R)||(R=[R]);let U=c(e)[t];if(r==="replace")k(U,R,void 0,T);else if(r==="group"){let G=f(U);n==="left"?R.push(G):R.unshift(G);let j=R.map(Z=>(0,Pn.createBlock)(Z.name,Z.attributes,Z.innerBlocks)),N=R.every(Z=>Z.name==="core/image"),F=i("core/gallery",e),K=(0,Pn.createBlock)(N&&F?"core/gallery":m(),{layout:{type:"flex",flexWrap:N&&F?null:"nowrap"}},j);k([U,...A],K,void 0,T)}else p(R,t,e,B,T)},[c,e,t,r,k,f,n,i,m,p]),w=(0,RD.useCallback)((R,B,T)=>{if(r==="replace"){let A=u(R),U=c(e)[t];v.batch(()=>{y(R,!1),k(U,A,void 0,0)})}else h(R,B,e,T)},[r,c,u,h,v,y,k,t,e]),C=$Se(e,t,s,a,w,S,b,r,f),E=KSe(e,d,g,i,S),P=qSe(S);return R=>{let B=(0,rK.getFilesFromDataTransfer)(R.dataTransfer),T=R.dataTransfer.getData("text/html");T?P(T):B.length?E(B):C(R)}}function YSe(e,t,o){let r=o==="top"||o==="bottom",{x:n,y:i}=e,s=r?n:i,a=r?i:n,c=r?t.left:t.top,u=r?t.right:t.bottom,d=t[o],f;return s>=c&&s<=u?f=s:s<u?f=c:f=u,Math.sqrt((s-f)**2+(a-d)**2)}function Wf(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=YSe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function tB(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function nK(e,t){return t.top<=e.y&&t.bottom>=e.y}var LD=30,ZSe=120,XSe=120;function QSe(e,t,o="vertical",r={}){let n=o==="horizontal"?["left","right"]:["top","bottom"],i=0,s="before",a=1/0,c=null,u="right",{dropZoneElement:d,parentBlockOrientation:f,rootBlockIndex:m=0}=r;if(d&&f!=="horizontal"){let k=d.getBoundingClientRect(),[y,v]=Wf(t,k,["top","bottom"]);if(k.height>ZSe&&y<LD){if(v==="top")return[m,"before"];if(v==="bottom")return[m+1,"after"]}}let p=(0,sK.isRTL)();if(d&&f==="horizontal"){let k=d.getBoundingClientRect(),[y,v]=Wf(t,k,["left","right"]);if(k.width>XSe&&y<LD){if(p&&v==="right"||!p&&v==="left")return[m,"before"];if(p&&v==="left"||!p&&v==="right")return[m+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:k,getBoundingClientRect:y,blockIndex:v,blockOrientation:S})=>{let w=y();if(!w)return;let[C,E]=Wf(t,w,n),[P,R]=Wf(t,w,["left","right"]),B=tB(t,w);k&&B?C=0:o==="vertical"&&S!=="horizontal"&&(B&&P<LD||!B&&nK(t,w))&&(c=v,u=R),C<a&&(s=E==="bottom"||!p&&E==="right"||p&&E==="left"?"after":"before",a=C,i=v)});let h=i+(s==="after"?1:-1),g=!!e[i]?.isUnmodifiedDefaultBlock,b=!!e[h]?.isUnmodifiedDefaultBlock;return c!==null?[c,"group",u]:!g&&!b?[s==="after"?i+1:i,"insert"]:[g?i:h,"replace"]}function nB(e,t,o,r){let n=!0;if(t){let a=t?.map(({name:c})=>c);n=o.every(c=>a?.includes(c))}let s=o.map(a=>e(a)).every(a=>{let[c]=a?.parent||[];return c?c===r:!0});return n&&s}function iK(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function aK({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,$f.useRegistry)(),[i,s]=(0,oB.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,$f.useSelect)(zh.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:p,getDraggedBlockClientIds:h,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:k,isGroupable:y,isZoomOut:v,getSectionRootClientId:S,getBlockParents:w}=z((0,$f.useSelect)(_)),{showInsertionPoint:C,hideInsertionPoint:E,startDragging:P,stopDragging:R}=z((0,$f.useDispatch)(_)),B=eB(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),T=(0,rB.useThrottle)((0,oB.useCallback)((A,L)=>{k()||P();let U=h(),G=[t,...w(t,!0)];if(U.some(H=>G.includes(H)))return;let N=b(t),F=g([t])[0],K=g(U);if(!nB(a,N,K,F))return;let Q=S();if(v()&&Q!==t)return;let J=m(t).filter(H=>!((0,zh.hasBlockSupport)(H.name,"visibility",!0)&&H.attributes?.metadata?.blockVisibility===!1));if(J.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let ee=J.map(H=>{let oe=H.clientId;return{isUnmodifiedDefaultBlock:(0,zh.isUnmodifiedDefaultBlock)(H),getBoundingClientRect:()=>{let ce=L.getElementById(`block-$oe}`);return ce?ce.getBoundingClientRect():null},blockIndex:p(oe),blockOrientation:f(oe)?.orientation}}),ie=QSe(ee,{x:A.clientX,y:A.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:p(t)}),[de,X,re]=ie,W=ee[de]?.isUnmodifiedDefaultBlock;if(!(v()&&!W&&X!=="insert")){if(X==="group"){let H=J[de],oe=[H.name,...K].every(Ve=>Ve==="core/image"),ce=d("core/gallery",t),le=y([H.clientId,h()]),ye=c(u(),"block"),_e=ye&&ye.find(({name:Ve})=>Ve==="group-row");if(oe&&!ce&&(!le||!_e)||!oe&&(!le||!_e))return}n.batch(()=>{s({index:de,operation:X,nearestSide:re});let H=["before","after"].includes(X)?o:t;C(H,de,{operation:X,nearestSide:re})})}},[k,b,t,g,h,a,S,v,m,f,e,o,p,n,P,C,d,y,c,u]),200);return(0,rB.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:B,onDragOver(A){T(A,A.currentTarget.ownerDocument)},onDragLeave(A){let{ownerDocument:L}=A.currentTarget;iK(A.relatedTarget,L)||iK(A.target,L)||(T.cancel(),E())},onDragEnd(){T.cancel(),R(),E()}})}var Ll=l(x()),JSe={};function e0e({children:e,clientId:t}){let o=oK(t);return(0,Ll.jsx)(wS,{value:o,children:e})}var t0e=(0,jh.memo)(ny);function uK(e){let{clientId:t,allowedBlocks:o,prioritizedInserterBlocks:r,defaultBlock:n,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:a,template:c,templateLock:u,wrapperRef:d,templateInsertUpdatesSelection:f,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:p,renderAppender:h,orientation:g,placeholder:b,layout:k,name:y,blockType:v,parentLock:S,defaultLayout:w}=e;Z$(t,S,o,r,n,i,s,a,u,m,g,k),J$(t,c,u,f);let C=(0,Kf.getBlockSupport)(y,"layout")||(0,Kf.getBlockSupport)(y,"__experimentalLayout")||JSe,{allowSizingOnChildren:E=!1}=C,P=k||C,R=(0,jh.useMemo)(()=>({...w,...P,...E&&{allowSizingOnChildren:!0}}),[w,P,E]),B=(0,Ll.jsx)(t0e,{rootClientId:t,renderAppender:h,__experimentalAppenderTagName:p,layout:R,wrapperRef:d,placeholder:b});return!v?.providesContext||Object.keys(v.providesContext).length===0?B:(0,Ll.jsx)(e0e,{clientId:t,children:B})}function o0e(e){return wC(e),(0,Ll.jsx)(uK,{...e})}var iB=(0,jh.forwardRef)((e,t)=>{let o=qf({ref:t},e);return(0,Ll.jsx)("div",{className:"block-editor-inner-blocks",children:(0,Ll.jsx)("div",{...o})})});function qf(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Ae(),c=(0,cK.useSelect)(S=>{let{getBlockName:w,isZoomOut:C,getTemplateLock:E,getBlockRootClientId:P,getBlockEditingMode:R,getBlockSettings:B,getSectionRootClientId:T}=z(S(_));if(!i){let K=T();return{isDropZoneDisabled:C()&&K!==""}}let{hasBlockSupport:A,getBlockType:L}=S(Kf.store),U=w(i),G=R(i),j=P(i),[N]=B(i,"layout"),F=G==="disabled";if(C()){let K=T();F=i!==K}return{__experimentalCaptureToolbars:A(U,"__experimentalExposeControlsToChildren",!1),name:U,blockType:L(U),parentLock:E(j),parentClientId:j,isDropZoneDisabled:F,defaultLayout:N}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:p,isDropZoneDisabled:h,defaultLayout:g}=c,b=aK({dropZoneElement:n,rootClientId:i,parentClientId:p}),k=(0,lK.useMergeRefs)([e.ref,r||h||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),y={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:m,defaultLayout:g,...t},v=y.value&&y.onChange?o0e:uK;return{...e,ref:k,className:V(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,Ll.jsx)(v,{...y,clientId:i}):(0,Ll.jsx)(ny,{...t})}}qf.save=Kf.__unstableGetInnerBlocksProps;iB.DefaultBlockAppender=W$;iB.ButtonBlockAppender=H$;iB.Content=()=>qf.save().children;var Sy=iB;var xy=l(Y()),Uh=l(D()),MD=l(ze()),pr=l(st());var dK=l(x()),r0e=new Set([pr.UP,pr.RIGHT,pr.DOWN,pr.LEFT,pr.ENTER,pr.BACKSPACE]);function n0e(e){let{keyCode:t,shiftKey:o}=e;return!o&&r0e.has(t)}function wy(){let e=(0,Uh.useSelect)(o=>o(_).isTyping(),[]),{stopTyping:t}=(0,Uh.useDispatch)(_);return(0,xy.useRefEffect)(o=>{if(!e)return;let{ownerDocument:r}=o,n,i;function s(a){let{clientX:c,clientY:u}=a;n&&i&&(n!==c||i!==u)&&t(),n=c,i=u}return r.addEventListener("mousemove",s),()=>{r.removeEventListener("mousemove",s)}},[e,t])}function Cy(){let{isTyping:e}=(0,Uh.useSelect)(i=>{let{isTyping:s}=i(_);return{isTyping:s()}},[]),{startTyping:t,stopTyping:o}=(0,Uh.useDispatch)(_),r=wy(),n=(0,xy.useRefEffect)(i=>{let{ownerDocument:s}=i,{defaultView:a}=s,c=a.getSelection();if(e){let p=function(k){let{target:y}=k;b=a.setTimeout(()=>{(0,MD.isTextField)(y)||o()})},h=function(k){let{keyCode:y}=k;(y===pr.ESCAPE||y===pr.TAB)&&o()},g=function(){c.isCollapsed||o()};var u=p,d=h,f=g;let b;return i.addEventListener("focus",p),i.addEventListener("keydown",h),s.addEventListener("selectionchange",g),()=>{a.clearTimeout(b),i.removeEventListener("focus",p),i.removeEventListener("keydown",h),s.removeEventListener("selectionchange",g)}}function m(p){let{type:h,target:g}=p;!(0,MD.isTextField)(g)||!i.contains(g)||h==="keydown"&&!n0e(p)||t()}return i.addEventListener("keypress",m),i.addEventListener("keydown",m),()=>{i.removeEventListener("keypress",m),i.removeEventListener("keydown",m)}},[e,t,o]);return(0,xy.useMergeRefs)([r,n])}function i0e({children:e}){return(0,dK.jsx)("div",{ref:Cy(),children:e})}var fK=i0e;var By=l(O()),mK=l(Y()),pK=l(D()),hK=l(I()),gK=l(M());var sB=l(x());function ND({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,hK.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,pK.useSelect)(w=>{let{getInsertionPoint:C,getBlockOrder:E,getSectionRootClientId:P,isBlockInsertionPointVisible:R,getBlockInsertionPoint:B,getDraggedBlockClientIds:T}=z(w(_)),A=P(),L=E(A);return{sectionRootClientId:A,sectionClientIds:L,insertionPoint:C(),blockInsertionPoint:B(),blockInsertionPointVisible:R(),blocksBeingDragged:T()}},[]),f=(0,mK.useReducedMotion)();if(!e)return;let m=!1;if(!(t===i&&s&&s.includes(e)))return null;let h=a?.index===0&&e===s[a.index],g=a&&a.hasOwnProperty("index")&&e===s[a.index-1];o==="top"&&(m=h||c&&u.index===0&&e===s[u.index]),o==="bottom"&&(m=g||c&&e===s[u.index-1]);let b=d[0],k=d.includes(e),y=s.indexOf(b),S=(y>0?s[y-1]:null)===e;return(k||S)&&(m=!1),(0,sB.jsx)(By.__unstableAnimatePresence,{children:m&&(0,sB.jsx)(By.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:f?0:.2,ease:[.6,0,.4,1]},className:V("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,sB.jsx)(By.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,gK.__)("Drop pattern.")})})})}var Ar=l(x()),nC=(0,Tu.createContext)();nC.displayName="IntersectionObserverContext";var aB=new WeakMap,s0e={trailing:!0};function a0e({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,editedContentOnlySection:n}=(0,vi.useSelect)(d=>{let{getSettings:f,isTyping:m,hasBlockSpotlight:p,getEditedContentOnlySection:h}=z(d(_)),{outlineMode:g,focusMode:b}=f();return{isOutlineMode:g&&!m(),isFocusMode:b||p(),editedContentOnlySection:h()}},[]),i=(0,vi.useRegistry)(),{setBlockVisibility:s}=(0,vi.useDispatch)(_),a=(0,lB.useDebounce)((0,Tu.useCallback)(()=>{let d={};aB.get(i).forEach(([f,m])=>{d[f]=m}),s(d)},[i]),300,s0e),c=(0,Tu.useMemo)(()=>{let{IntersectionObserver:d}=window;if(d)return new d(f=>{aB.get(i)||aB.set(i,[]);for(let m of f){let p=m.target.getAttribute("data-block");aB.get(i).push([p,m.isIntersecting])}a()})},[]),u=qf({ref:(0,lB.useMergeRefs)([Hf(),V$(),Cy()]),className:V("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r})},t);return(0,Ar.jsxs)(nC.Provider,{value:c,children:[(0,Ar.jsx)("div",{...u}),!!n&&(0,Ar.jsx)(l0e,{clientId:n})]})}function l0e({clientId:e}){let{stopEditingContentOnlySection:t}=z((0,vi.useDispatch)(_)),o=(0,vi.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(_);return!s()||n(e)||i(e,!0)},[e]);return(0,Tu.useEffect)(()=>{o||t()},[o,t]),null}function vh(e){return(0,Ar.jsx)(vS,{value:tO,children:(0,Ar.jsx)(a0e,{...e})})}var c0e=[],u0e=new Set;function d0e({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=iM}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,vi.useSelect)(m=>{let{getSettings:p,getBlockOrder:h,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:k,getBlockEditingMode:y,isSectionBlock:v,isContainerInsertableToInContentOnlyMode:S,getBlockName:w,isZoomOut:C,canInsertBlockType:E}=z(m(_)),P=h(t);if(p().isPreviewMode)return{order:P,selectedBlocks:c0e,visibleBlocks:u0e};let R=g(),B=R[0],T=!t&&!B&&(!P.length||!E((0,bK.getDefaultBlockName)(),t)),A=!!(t&&B&&t===B),L=k(t);return{order:P,selectedBlocks:R,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!v(t)||S(w(B),t))&&y(t)!=="disabled"&&(!L||L==="contentOnly")&&i&&!C()&&(s||A||T)}},[t,i,s]);return(0,Ar.jsxs)(Oj,{value:n,children:[a.map(m=>(0,Ar.jsxs)(vi.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,Ar.jsx)(ND,{clientId:m,rootClientId:t,position:"top"}),(0,Ar.jsx)(x8,{rootClientId:t,clientId:m}),c&&(0,Ar.jsx)(ND,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,Ar.jsx)(y$,{tagName:r,rootClientId:t,CustomAppender:o})]})}function ny(e){return(0,Ar.jsx)(vi.AsyncModeProvider,{value:!1,children:(0,Ar.jsx)(d0e,{...e})})}var pg=l(D()),A5=l(ze()),L5=l(O()),uX=l(vl()),dX=l(I()),hg=l($()),M5=l(Fo()),gg=l(M());var jK=l(Y()),UK=l(D()),HK=l(ze()),ea=l(I());var On=l(M()),Yf=l($()),pB=l(O()),MK=l(Y()),NK=l(D()),hB=l(I());var cB=l(O()),vK=l(bv()),yK=l(Oe()),uB=l(I());var Lr=l(O()),kK=(0,Lr.createSlotFill)("InspectorControls"),f0e=(0,Lr.createSlotFill)("InspectorAdvancedControls"),m0e=(0,Lr.createSlotFill)("InspectorControlsBindings"),p0e=(0,Lr.createSlotFill)("InspectorControlsBackground"),h0e=(0,Lr.createSlotFill)("InspectorControlsBorder"),g0e=(0,Lr.createSlotFill)("InspectorControlsColor"),b0e=(0,Lr.createSlotFill)("InspectorControlsFilter"),k0e=(0,Lr.createSlotFill)("InspectorControlsDimensions"),v0e=(0,Lr.createSlotFill)("InspectorControlsPosition"),y0e=(0,Lr.createSlotFill)("InspectorControlsTypography"),_0e=(0,Lr.createSlotFill)("InspectorControlsListView"),S0e=(0,Lr.createSlotFill)("InspectorControlsStyles"),x0e=(0,Lr.createSlotFill)("InspectorControlsEffects"),w0e={default:kK,advanced:f0e,background:p0e,bindings:m0e,border:h0e,color:g0e,dimensions:k0e,effects:x0e,filter:b0e,list:_0e,position:v0e,settings:kK,styles:S0e,typography:y0e},Iu=w0e,Ey=(0,Lr.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var Hh=l(x());function DD({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,yK.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Ae(),i=Iu[t]?.Fill;return i?n[xc]?(0,Hh.jsx)(cB.__experimentalStyleProvider,{document,children:(0,Hh.jsx)(i,{children:s=>(0,Hh.jsx)(B0e,{fillProps:s,children:e,resetAllFilter:r})})}):null:((0,vK.default)(`Unknown InspectorControls group "$t}" provided.`),null)}function C0e({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,uB.useContext)(cB.__experimentalToolsPanelContext);return(0,uB.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function B0e({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,Hh.jsx)(C0e,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,Hh.jsx)(s,{...a,children:i}),n)}var TK=l(O()),IK=l(bv()),PK=l(Oe());var SK=l(O()),dB=l(D()),xK=l(I());var _K=l(Y());function Go(){return(0,_K.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function Gh(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`$i.trim()} $s.trim()}`)})}),n.join(", ")}var wK=l(x());function CK({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,dB.useDispatch)(_),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,dB.useSelect)(_),c=Go(),u=s(),d=(0,xK.useCallback)((f=[])=>{let m={},p=a()?i():[u];p.forEach(h=>{let{style:g}=n(h),b={style:g};f.forEach(k=>{b={...b,...k(b)}}),b={...b,style:Ce(b.style)},m[h]=b}),r(p,m,!0)},[n,i,a,u,r]);return(0,wK.jsx)(SK.__experimentalToolsPanel,{className:`$t}-block-support-panel`,label:o,resetAll:d,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:c,children:e},u)}var VD=l(O()),fB=l(I()),BK=l(x());function EK({Slot:e,fillProps:t,...o}){let r=(0,fB.useContext)(VD.__experimentalToolsPanelContext),n=(0,fB.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[VD.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,BK.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var mB=l(x());function FD({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n}){e&&((0,PK.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let i=Iu[t],s=(0,TK.__experimentalUseSlotFills)(i?.name);if(!i)return(0,IK.default)(`Unknown InspectorControls group "$t}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i;return o?(0,mB.jsx)(CK,{group:t,label:o,children:(0,mB.jsx)(EK,{...n,fillProps:r,Slot:a})}):(0,mB.jsx)(a,{...n,fillProps:r,bubblesVirtually:!0})}var zD=l(x()),OK=DD;OK.Slot=FD;var Pu=e=>(0,zD.jsx)(DD,{...e,group:"advanced"});Pu.Slot=e=>(0,zD.jsx)(FD,{...e,group:"advanced"});Pu.slotName="InspectorAdvancedControls";var he=OK;var AK=l(D()),Ou=l($()),Ty=l(M());function RK(e){let t=e?.style?.position?.type;return t==="sticky"?(0,Ty.__)("Sticky"):t==="fixed"?(0,Ty.__)("Fixed"):null}function gt(e){return(0,AK.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(_),{getBlockType:i,getActiveBlockVariation:s}=t(Ou.store),a=o(e),c=i(a);if(!c)return null;let u=r(e),d=u?.metadata?.patternName;if(d&&window?.__experimentalContentOnlyPatternInsertion){let k=n(d),y=RK(u);return{isSynced:!1,title:(0,Ty.__)("Pattern"),icon:oi,description:k?.description||(0,Ty.__)("A block pattern."),anchor:u?.anchor,positionLabel:y,positionType:u?.style?.position?.type,name:k?.title||u?.metadata?.name}}let f=s(a,u),m=(0,Ou.isReusableBlock)(c)||(0,Ou.isTemplatePart)(c),h=(m?(0,Ou.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=RK(u),b={isSynced:m,title:h,icon:c.icon,description:c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name};return f?{isSynced:m,title:f.title||c.title,icon:f.icon||c.icon,description:f.description||c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name}:b},[e])}var Iy=l(x()),Py="position",jD={key:"default",value:"",name:(0,On.__)("Default")},UD={key:"sticky",value:"sticky",name:(0,On._x)("Sticky","Name for the value of the CSS position property"),hint:(0,On.__)("The block will stick to the top of the window instead of scrolling.")},LK={key:"fixed",value:"fixed",name:(0,On._x)("Fixed","Name for the value of the CSS position property"),hint:(0,On.__)("The block will not move when the page is scrolled.")},E0e=["top","right","bottom","left"],T0e=["sticky","fixed"];function I0e({selector:e,style:t}){let o="",{type:r}=t?.position||{};return T0e.includes(r)&&(o+=`$e} {`,o+=`position: $r};`,E0e.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`$n}: $t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function P0e(e){let t=(0,Yf.getBlockSupport)(e,Py);return!!(t===!0||t?.sticky)}function O0e(e){let t=(0,Yf.getBlockSupport)(e,Py);return!!(t===!0||t?.fixed)}function R0e(e){return!!(0,Yf.getBlockSupport)(e,Py)}function DK(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function VK({name:e}={}){let[t,o]=fe("position.fixed","position.sticky"),r=!t&&!o;return!R0e(e)||r}function A0e({style:e={},clientId:t,name:o,setAttributes:r}){let n=O0e(o),i=P0e(o),s=e?.position?.type,{firstParentClientId:a}=(0,NK.useSelect)(p=>{let{getBlockParents:h}=p(_),g=h(t);return{firstParentClientId:g[g.length-1]}},[t]),c=gt(a),u=i&&s===UD.value&&c?(0,On.sprintf)((0,On.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,hB.useMemo)(()=>{let p=[jD];return(i||s===UD.value)&&p.push(UD),(n||s===LK.value)&&p.push(LK),p},[n,i,s]),f=p=>{let g={...e,position:{...e?.position,type:p,top:p==="sticky"||p==="fixed"?"0px":void 0}};r({style:Ce(g)})},m=s&&d.find(p=>p.value===s)||jD;return hB.Platform.select({web:d.length>1?(0,Iy.jsx)(he,{group:"position",children:(0,Iy.jsx)(pB.BaseControl,{help:u,children:(0,Iy.jsx)(pB.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,On.__)("Position"),hideLabelFromVision:!0,describedBy:(0,On.sprintf)((0,On.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:p})=>{f(p.value)},size:"__unstable-large"})})}):null,native:null})}var HD={edit:function(t){return VK(t)?null:(0,Iy.jsx)(A0e,{...t})},useBlockProps:M0e,attributeKeys:["style"],hasSupport(e){return(0,Yf.hasBlockSupport)(e,Py)}},L0e={};function M0e({name:e,style:t}){let o=(0,Yf.hasBlockSupport)(e,Py),r=VK({name:e}),n=o&&!r,i=(0,MK.useInstanceId)(L0e),s=`.wp-container-$i}.wp-container-$i}`,a;n&&(a=I0e({selector:s,style:t})||"");let c=V({[`wp-container-$i}`]:n&&!!a,[`is-position-$t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return fs({css:a}),{className:c}}var GK={placement:"top-start"},FK={...GK,flip:!1,shift:!0},N0e={...GK,flip:!0,shift:!1};function zK(e,t,o,r,n){if(!e||!t)return FK;let i=o?.scrollTop||0,s=Qp(t),a=e.getBoundingClientRect(),c=i+a.top,u=e.ownerDocument.documentElement.clientHeight,d=c+r,f=s.top>d,m=s.height>u-r;return!n&&(f||m)?FK:N0e}function gB({contentElement:e,clientId:t}){let o=pt(t),[r,n]=(0,ea.useState)(0),{blockIndex:i,isSticky:s}=(0,UK.useSelect)(m=>{let{getBlockIndex:p,getBlockAttributes:h}=m(_);return{blockIndex:p(t),isSticky:DK(h(t))}},[t]),a=(0,ea.useMemo)(()=>{if(e)return(0,HK.getScrollContainer)(e)},[e]),[c,u]=(0,ea.useState)(()=>zK(e,o,a,r,s)),d=(0,jK.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,ea.useCallback)(()=>u(zK(e,o,a,r,s)),[e,o,a,r]);return(0,ea.useLayoutEffect)(f,[i,f]),(0,ea.useLayoutEffect)(()=>{if(!e||!o)return;let m=e?.ownerDocument?.defaultView;m?.addEventHandler?.("resize",f);let p,h=o?.ownerDocument?.defaultView;return h.ResizeObserver&&(p=new h.ResizeObserver(f),p.observe(o)),()=>{m?.removeEventHandler?.("resize",f),p&&p.disconnect()}},[f,e,o]),{...c,ref:d}}var WK=l(D());function bB(e){return(0,WK.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:c,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(_),f=n(e),m=i(f),p=f.find(g=>m[g]?.__experimentalCaptureToolbars),h=!1;if(s()){let g=a();h=c(g.rootClientId)[g.index]===e}return{capturingClientId:p,isInsertionPointVisible:h,lastClientId:u()?d():null,rootClientId:r(e)}},[e])}var kB=l(x());function $K({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=bB(e),s=gB({contentElement:t?.current,clientId:e});return(0,kB.jsx)(ki,{clientId:o||e,bottomClientId:n,className:V("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,kB.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,kB.jsx)(bi,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var JZ=l(D()),mg=l(I()),eX=l(vl());var qZ=l(M()),YZ=l(D()),I5=l(I()),ZZ=l(Y()),Hl=l($()),XZ=l(O());var Zf=l(O()),rq=l(D()),nq=l(M());var XK=l($()),QK=l(O()),Oy=l(D()),Ry=l(I()),JK=l(Y());var qK=l(ze()),ta=l(I()),vB=50,YK=25,D0e=1e3,KK=D0e*(YK/1e3);function ZK(){let e=(0,ta.useRef)(null),t=(0,ta.useRef)(null),o=(0,ta.useRef)(null),r=(0,ta.useRef)(null);(0,ta.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,ta.useCallback)(a=>{e.current=a.clientY,o.current=(0,qK.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},YK)},[]),i=(0,ta.useCallback)(a=>{if(!o.current)return;let c=o.current.offsetHeight,u=e.current-o.current.offsetTop,d=a.clientY-o.current.offsetTop;if(a.clientY>u){let f=Math.max(c-u-vB,0),m=Math.max(d-u-vB,0),p=f===0||m===0?0:m/f;t.current=KK*p}else if(a.clientY<u){let f=Math.max(u-vB,0),m=Math.max(u-d-vB,0),p=f===0||m===0?0:m/f;t.current=-KK*p}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var GD=l(x()),V0e=({appendToOwnerDocument:e,children:t,clientIds:o,cloneClassname:r,elementId:n,onDragStart:i,onDragEnd:s,fadeWhenDisabled:a=!1,dragComponent:c})=>{let{srcRootClientId:u,isDraggable:d,icon:f,visibleInserter:m,getBlockType:p}=(0,Oy.useSelect)(B=>{let{canMoveBlocks:T,getBlockRootClientId:A,getBlockName:L,getBlockAttributes:U,isBlockInsertionPointVisible:G}=B(_),{getBlockType:j,getActiveBlockVariation:N}=B(XK.store),F=A(o[0]),K=L(o[0]),Z=N(K,U(o[0]));return{srcRootClientId:F,isDraggable:T(o),icon:Z?.icon||j(K)?.icon,visibleInserter:G(),getBlockType:j}},[o]),h=(0,Ry.useRef)(!1),[g,b,k]=ZK(),{getAllowedBlocks:y,getBlockNamesByClientId:v,getBlockRootClientId:S}=(0,Oy.useSelect)(_),{startDraggingBlocks:w,stopDraggingBlocks:C}=(0,Oy.useDispatch)(_);(0,Ry.useEffect)(()=>()=>{h.current&&C()},[]);let P=pt(o[0])?.closest("body");return(0,Ry.useEffect)(()=>{if(!P||!a)return;let T=(0,JK.throttle)(A=>{if(!A.target.closest("[data-block]"))return;let L=v(o),U=A.target.closest("[data-block]").getAttribute("data-block"),G=y(U),j=v([U])[0],N;if(G?.length===0){let F=S(U),K=v([F])[0],Z=y(F);N=nB(p,Z,L,K)}else N=nB(p,G,L,j);!N&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return P.addEventListener("dragover",T),()=>{P.removeEventListener("dragover",T)}},[o,P,a,y,v,S,p,m]),d?(0,GD.jsx)(QK.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:B=>{window.requestAnimationFrame(()=>{w(o),h.current=!0,g(B),i&&i()})},onDragOver:b,onDragEnd:()=>{C(),h.current=!1,k(),s&&s()},__experimentalDragComponent:c!==void 0?c:(0,GD.jsx)(u1,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:B,onDraggableEnd:T})=>t({draggable:!0,onDragStart:B,onDragEnd:T})}):t({draggable:!1})},yB=V0e;var tq=l($()),_B=l(O()),oq=l(Y()),SB=l(D()),xB=l(I()),yi=l(M());var be=l(M()),Ru=(e,t)=>e==="up"?t==="horizontal"?(0,be.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,be.isRTL)()?"left":"right":"down":null;function eq(e,t,o,r,n,i,s){let a=o+1;if(e>1)return F0e(e,o,r,n,i,s);if(r&&n)return(0,be.sprintf)((0,be.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=Ru("down",s);if(c==="down")return(0,be.sprintf)((0,be.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,be.sprintf)((0,be.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,be.sprintf)((0,be.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=Ru("down",s);if(c==="down")return(0,be.sprintf)((0,be.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,be.sprintf)((0,be.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,be.sprintf)((0,be.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=Ru("up",s);if(c==="up")return(0,be.sprintf)((0,be.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,be.sprintf)((0,be.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,be.sprintf)((0,be.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=Ru("up",s);if(c==="up")return(0,be.sprintf)((0,be.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,be.sprintf)((0,be.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,be.sprintf)((0,be.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function F0e(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,be.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=Ru("down",i);if(a==="down")return(0,be.sprintf)((0,be.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,be.sprintf)((0,be.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,be.sprintf)((0,be.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=Ru("down",i);if(a==="down")return(0,be.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,be.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,be.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=Ru("up",i);if(a==="up")return(0,be.sprintf)((0,be.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,be.sprintf)((0,be.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,be.sprintf)((0,be.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=Ru("up",i);if(a==="up")return(0,be.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,be.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,be.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var Ml=l(x()),z0e=(e,t)=>e==="up"?t==="horizontal"?(0,yi.isRTL)()?Qo:Cr:Qd:e==="down"?t==="horizontal"?(0,yi.isRTL)()?Cr:Qo:_n:null,j0e=(e,t)=>e==="up"?t==="horizontal"?(0,yi.isRTL)()?(0,yi.__)("Move right"):(0,yi.__)("Move left"):(0,yi.__)("Move up"):e==="down"?t==="horizontal"?(0,yi.isRTL)()?(0,yi.__)("Move left"):(0,yi.__)("Move right"):(0,yi.__)("Move down"):null,WD=(0,xB.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,oq.useInstanceId)(WD),s=Array.isArray(e)?e:[e],a=s.length,{disabled:c}=r,{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:p,firstIndex:h,orientation:g="vertical"}=(0,SB.useSelect)(w=>{let{getBlockIndex:C,getBlockRootClientId:E,getBlockOrder:P,getBlock:R,getBlockListSettings:B}=w(_),T=s[0],A=E(T),L=C(T),U=C(s[s.length-1]),G=P(A),j=R(T),N=L===0,F=U===G.length-1,{orientation:K}=B(A)||{};return{blockType:j?(0,tq.getBlockType)(j.name):null,isDisabled:c||(t==="up"?N:F),rootClientId:A,firstIndex:L,isFirst:N,isLast:F,orientation:o||K}},[e,t]),{moveBlocksDown:b,moveBlocksUp:k}=(0,SB.useDispatch)(_),y=t==="up"?k:b,v=w=>{y(e,f),r.onClick&&r.onClick(w)},S=`block-editor-block-mover-button__description-$i}`;return(0,Ml.jsxs)(Ml.Fragment,{children:[(0,Ml.jsx)(_B.Button,{__next40pxDefaultSize:!0,ref:n,className:V("block-editor-block-mover-button",`is-$t}-button`),icon:z0e(t,g),label:j0e(t,g),"aria-describedby":S,...r,onClick:d?null:v,disabled:d,accessibleWhenDisabled:!0}),(0,Ml.jsx)(_B.VisuallyHidden,{id:S,children:eq(a,u&&u.title,h,m,p,t==="up"?-1:1,g)})]})}),wB=(0,xB.forwardRef)((e,t)=>(0,Ml.jsx)(WD,{direction:"up",ref:t,...e})),CB=(0,xB.forwardRef)((e,t)=>(0,Ml.jsx)(WD,{direction:"down",ref:t,...e}));var oa=l(x());function U0e({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:o,isBlockMoverDownButtonDisabled:r}){let{canMove:n,rootClientId:i,isFirst:s,isLast:a,orientation:c,isManualGrid:u}=(0,rq.useSelect)(d=>{let{getBlockIndex:f,getBlockListSettings:m,canMoveBlocks:p,getBlockOrder:h,getBlockRootClientId:g,getBlockAttributes:b}=d(_),k=Array.isArray(e)?e:[e],y=k[0],v=g(y),S=f(y),w=f(k[k.length-1]),C=h(v),{layout:E={}}=b(v)??{};return{canMove:p(e),rootClientId:v,isFirst:S===0,isLast:w===C.length-1,orientation:m(v)?.orientation,isManualGrid:E.type==="grid"&&E.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!n||s&&a&&!i||t&&u?null:(0,oa.jsxs)(Zf.ToolbarGroup,{className:V("block-editor-block-mover",{"is-horizontal":c==="horizontal"}),children:[!t&&(0,oa.jsx)(yB,{clientIds:e,fadeWhenDisabled:!0,children:d=>(0,oa.jsx)(Zf.Button,{__next40pxDefaultSize:!0,icon:yk,className:"block-editor-block-mover__drag-handle",label:(0,nq.__)("Drag"),tabIndex:"-1",...d})}),!u&&(0,oa.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,oa.jsx)(Zf.ToolbarItem,{children:d=>(0,oa.jsx)(wB,{disabled:o,clientIds:e,...d})}),(0,oa.jsx)(Zf.ToolbarItem,{children:d=>(0,oa.jsx)(CB,{disabled:r,clientIds:e,...d})})]})]})}var BB=U0e;var aq=l(O()),TB=l(D()),IB=l(M()),lq=l(I());var Ay=l(D()),Au=l(I());var{clearTimeout:iq,setTimeout:H0e}=window,sq=200;function G0e({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=sq}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,Ay.useSelect)(_),{toggleBlockHighlight:s}=(0,Ay.useDispatch)(_),a=(0,Au.useRef)(),c=(0,Ay.useSelect)(g=>g(_).getSettings().isDistractionFree,[]),u=g=>{if(g&&c)return;let b=n(),k=o?i(b):b;s(k,g)},d=()=>e?.current&&e.current.matches(":hover"),f=()=>{let g=d();return!t&&!g},m=()=>{let g=a.current;g&&iq&&iq(g)},p=g=>{g&&g.stopPropagation(),m(),u(!0)},h=g=>{g&&g.stopPropagation(),m(),a.current=H0e(()=>{f()&&u(!1)},r)};return(0,Au.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:p,debouncedHideGestures:h}}function Wh({ref:e,highlightParent:t=!1,debounceTimeout:o=sq}){let[r,n]=(0,Au.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=G0e({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,Au.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,Au.useEffect)(()=>{let u=e.current,d=()=>{c()&&(n(!0),i())},f=()=>{c()||(n(!1),s())};return u&&!a.current&&(u.addEventListener("focus",d,!0),u.addEventListener("blur",f,!0),a.current=!0),()=>{u&&(u.removeEventListener("focus",d),u.removeEventListener("blur",f))}},[e,a,n,i,s]),{onMouseMove:i,onMouseLeave:s}}var EB=l(x());function cq(){let{selectBlock:e}=(0,TB.useDispatch)(_),{parentClientId:t}=(0,TB.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=z(i(_)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=gt(t),r=(0,lq.useRef)(),n=Wh({ref:r,highlightParent:!0});return(0,EB.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,EB.jsx)(aq.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,IB.sprintf)((0,IB.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,EB.jsx)(Pe,{icon:o?.icon})})},t)}var PB=l(O());var $h=l(O()),W0e=(0,$h.createSlotFill)("BlockControls"),$0e=(0,$h.createSlotFill)("BlockControlsBlock"),K0e=(0,$h.createSlotFill)("BlockFormatControls"),q0e=(0,$h.createSlotFill)("BlockControlsOther"),Y0e=(0,$h.createSlotFill)("BlockControlsParent"),Z0e={default:W0e,block:$0e,inline:K0e,other:q0e,parent:Y0e},Ly=Z0e;function uq(e,t){let o=Ae();return o[xc]?Ly[e]?.Fill:o[ip]&&t?Ly.parent.Fill:null}var Nl=l(x());function $D({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=uq(e,r);if(!n)return null;let i=(0,Nl.jsxs)(Nl.Fragment,{children:[e==="default"&&(0,Nl.jsx)(PB.ToolbarGroup,{controls:t}),o]});return(0,Nl.jsx)(PB.__experimentalStyleProvider,{document,children:(0,Nl.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,Nl.jsx)(u,{...d,children:c}),i)}})})}var My=l(I()),Dl=l(O()),fq=l(bv());var KD=l(x()),{ComponentsContext:dq}=z(Dl.privateApis);function qD({group:e="default",...t}){let o=(0,My.useContext)(Dl.__experimentalToolbarContext),r=(0,My.useContext)(dq),n=(0,My.useMemo)(()=>({forwardedContext:[[Dl.__experimentalToolbarContext.Provider,{value:o}],[dq.Provider,{value:r}]]}),[o,r]),i=Ly[e],s=(0,Dl.__experimentalUseSlotFills)(i.name);if(!i)return(0,fq.default)(`Unknown BlockControls group "$e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,KD.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,KD.jsx)(Dl.ToolbarGroup,{children:c})}var YD=l(x()),mq=$D;mq.Slot=qD;var ZD=e=>(0,YD.jsx)($D,{group:"inline",...e});ZD.Slot=e=>(0,YD.jsx)(qD,{group:"inline",...e});var mt=mq;var pq=l(O()),{Fill:hq,Slot:X0e}=(0,pq.createSlotFill)("__unstableBlockToolbarLastItem");hq.Slot=X0e;var OB=hq;var nE=l(O());var Jh=l($()),Mn=l(O()),Du=l(D());var oE=l(I()),ra=l(M()),IY=l(vl()),om=l(Y());var qh=l(D()),Lu=l($());var Rq=l(I()),Dy=l($()),Ny=l(D()),Aq=l(ii()),Vl=l(M());var Rn=l($()),gq=l(I()),Q0e="align";var bq="__experimentalBorder",RB="color",J0e="customClassName",kq="typography.__experimentalFontFamily",vq="typography.fontSize",exe="typography.lineHeight",txe="typography.__experimentalFontStyle",oxe="typography.__experimentalFontWeight",yq="typography.textAlign",rxe="typography.textColumns",nxe="typography.__experimentalTextDecoration",ixe="typography.__experimentalWritingMode",sxe="typography.__experimentalTextTransform",axe="typography.__experimentalLetterSpacing",lxe="layout",cxe=[exe,vq,txe,oxe,kq,yq,rxe,nxe,sxe,ixe,axe],uxe=["shadow"],dxe="spacing",fxe=[...uxe,...cxe,bq,RB,dxe],_q=e=>(0,Rn.hasBlockSupport)(e,Q0e);function Sq(e,t="any"){if(gq.Platform.OS!=="web")return!1;let o=(0,Rn.getBlockSupport)(e,bq);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var xq=e=>{let t=(0,Rn.getBlockSupport)(e,RB);return t!==null&&typeof t=="object"&&!!t.gradients},wq=e=>{let t=(0,Rn.getBlockSupport)(e,RB);return t&&t.background!==!1},Cq=e=>(0,Rn.hasBlockSupport)(e,yq);var Bq=e=>{let t=(0,Rn.getBlockSupport)(e,RB);return t&&t.text!==!1};var Eq=e=>(0,Rn.hasBlockSupport)(e,J0e,!0);var Tq=e=>(0,Rn.hasBlockSupport)(e,kq);var Iq=e=>(0,Rn.hasBlockSupport)(e,vq);var Pq=e=>(0,Rn.hasBlockSupport)(e,lxe);var Oq=e=>fxe.some(t=>(0,Rn.hasBlockSupport)(e,t));function mxe(e){try{let t=(0,Dy.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var pxe={align:_q,borderColor:e=>Sq(e,"color"),backgroundColor:wq,textAlign:Cq,textColor:Bq,gradient:xq,className:Eq,fontFamily:Tq,fontSize:Iq,layout:Pq,style:Oq};function hxe(e,t){return Object.entries(pxe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function XD(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,hxe(t[r],e[r])),XD(e[r].innerBlocks,t[r].innerBlocks,o)}function Kh(){let e=(0,Ny.useRegistry)(),{updateBlockAttributes:t}=(0,Ny.useDispatch)(_),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,Ny.useDispatch)(Aq.store);return(0,Rq.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,Vl.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});return}s=await window.navigator.clipboard.readText()}catch{n((0,Vl.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!mxe(s)){r((0,Vl.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,Dy.parse)(s);if(a.length===1?e.batch(()=>{XD(i,i.map(()=>a[0]),t)}):e.batch(()=>{XD(i,a,t)}),i.length===1){let c=(0,Dy.getBlockType)(i[0].name)?.title;o((0,Vl.sprintf)((0,Vl.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,Vl.sprintf)((0,Vl.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function Lq({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,qh.useSelect)(Lu.store),i=(0,qh.useSelect)(v=>{let{canInsertBlockType:S,getBlockRootClientId:w,getBlocksByClientId:C,getDirectInsertBlock:E,canRemoveBlocks:P}=v(_),R=C(e),B=w(e[0]),T=S(r(),B),A=B?E(B):null;return{canRemove:P(e),canInsertBlock:R.every(L=>(T||!!A)&&S(L.name,B)),canCopyStyles:R.every(L=>!!L&&((0,Lu.hasBlockSupport)(L.name,"color")||(0,Lu.hasBlockSupport)(L.name,"typography"))),canDuplicate:R.every(L=>!!L&&(0,Lu.hasBlockSupport)(L.name,"multiple",!0)&&S(L.name,B))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,qh.useSelect)(_),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:p,duplicateBlocks:h,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:k}=(0,qh.useDispatch)(_),y=Kh();return t({canCopyStyles:d,canDuplicate:f,canInsertBlock:u,canRemove:c,onDuplicate(){return h(e,o)},onRemove(){return m(e,o)},onInsertBefore(){b(e[0])},onInsertAfter(){g(e[e.length-1])},onGroup(){if(!e.length)return;let v=n(),S=(0,Lu.switchToBlockType)(s(e),v);S&&p(e,S)},onUngroup(){if(!e.length)return;let v=a(e[0]);v.length&&p(e,v)},onCopy(){e.length===1&&k(e[0])},async onPasteStyles(){await y(s(e))}})}var Mq=l(O()),gxe=(0,Mq.createSlotFill)(Symbol("CommentIconSlotFill")),AB=gxe;var Nq=l(M()),Dq=l(O()),LB=l($()),MB=l(D());var Vq=l(x());function bxe({clientId:e}){let t=(0,MB.useSelect)(r=>r(_).getBlock(e),[e]),{replaceBlocks:o}=(0,MB.useDispatch)(_);return!t||t.name!=="core/html"?null:(0,Vq.jsx)(Dq.MenuItem,{onClick:()=>o(e,(0,LB.rawHandler)({HTML:(0,LB.getBlockContent)(t)})),children:(0,Nq.__)("Convert to Blocks")})}var Fq=bxe;var zq=l(O()),{Fill:jq,Slot:kxe}=(0,zq.createSlotFill)("__unstableBlockSettingsMenuFirstItem");jq.Slot=kxe;var NB=jq;var Qh=l(O()),_Y=l($()),SY=l(D());var JD=l(O()),e5=l(M()),Gq=l($()),FB=l(D()),Wq=l(st());var Uq=l($()),Hq=l(D());function Vy(e){return(0,Hq.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(_),{getGroupingBlockName:s,getBlockType:a}=t(Uq.store),c=e?.length?e:r(),u=o(c),[d]=u,f=c.length===1&&n(c[0]);return{clientIds:c,isGroupable:i(c),isUngroupable:f,blocksSelection:u,groupingBlockName:s(),onUngroup:f&&a(d.name)?.transforms?.ungroup}},[e])}var DB=l(D()),VB=l($()),Xf=l(O());var Fy=l(M());var Qf=l(x()),vxe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function yxe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=Vy(),{replaceBlocks:n}=(0,DB.useDispatch)(_),{canRemove:i,variations:s}=(0,DB.useSelect)(h=>{let{canRemoveBlocks:g}=h(_),{getBlockVariations:b}=h(VB.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=h=>{let g=(0,VB.switchToBlockType)(e,o);typeof h!="string"&&(h="group"),g&&g.length>0&&(g[0].attributes.layout=vxe[h],n(t,g))},c=()=>a("row"),u=()=>a("stack"),d=()=>a("grid");if(!r||!i)return null;let f=!!s.find(({name:h})=>h==="group-row"),m=!!s.find(({name:h})=>h==="group-stack"),p=!!s.find(({name:h})=>h==="group-grid");return(0,Qf.jsxs)(Xf.ToolbarGroup,{children:[(0,Qf.jsx)(Xf.ToolbarButton,{icon:xk,label:(0,Fy._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,Qf.jsx)(Xf.ToolbarButton,{icon:DA,label:(0,Fy._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,Qf.jsx)(Xf.ToolbarButton,{icon:QA,label:(0,Fy._x)("Stack","action: convert blocks to stack"),onClick:u}),p&&(0,Qf.jsx)(Xf.ToolbarButton,{icon:Sk,label:(0,Fy._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var QD=yxe;var Jf=l(x());function $q({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,FB.useSelect)(_),{replaceBlocks:c}=(0,FB.useDispatch)(_),u=()=>{let m=(0,Gq.switchToBlockType)(n,i);m&&c(e,m)},d=()=>{let m=n[0].innerBlocks;m.length&&(r&&(m=r(n[0].attributes,n[0].innerBlocks)),c(e,m))};if(!t&&!o)return null;let f=a();return(0,Jf.jsxs)(Jf.Fragment,{children:[t&&(0,Jf.jsx)(JD.MenuItem,{shortcut:f.length>1?Wq.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,e5._x)("Group","verb")}),o&&(0,Jf.jsx)(JD.MenuItem,{onClick:()=>{d(),s()},children:(0,e5._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var t5=l(M()),Yq=l(I()),Zq=l(O());var Kq=l(D());function An(e){return(0,Kq.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=z(t(_));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var _i=l(M()),zy=l(I()),uo=l(O());var zB=l(D()),qq=l($());var _t=l(x()),_xe=["core/navigation"];function Sxe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function jB({clientId:e,onClose:t}){let[o,r]=(0,zy.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=An(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,zB.useSelect)(b=>{let{getBlockName:k,getBlockAttributes:y}=b(_),v=k(e),S=(0,qq.getBlockType)(v);return{allowsEditLocking:_xe.includes(v),templateLock:y(e)?.templateLock,hasTemplateLock:!!S?.attributes?.templateLock}},[e]),[d,f]=(0,zy.useState)(!!c),{updateBlockAttributes:m}=(0,zB.useDispatch)(_),p=gt(e);(0,zy.useEffect)(()=>{r({move:i,remove:s,...a?{edit:n}:{}})},[n,i,s,a]);let h=Object.values(o).every(Boolean),g=Object.values(o).some(Boolean)&&!h;return(0,_t.jsx)(uo.Modal,{title:(0,_i.sprintf)((0,_i.__)("Lock %s"),p.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,_t.jsxs)("form",{onSubmit:b=>{b.preventDefault(),m([e],{lock:o,templateLock:d?Sxe(o):void 0}),t()},children:[(0,_t.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,_t.jsx)("legend",{children:(0,_i.__)("Select the features you want to lock")}),(0,_t.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,_t.jsxs)("li",{children:[(0,_t.jsx)(uo.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,_i.__)("Lock all"),checked:h,indeterminate:g,onChange:b=>r({move:b,remove:b,...a?{edit:b}:{}})}),(0,_t.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,_t.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,_t.jsx)(uo.CheckboxControl,{label:(0,_i.__)("Lock editing"),checked:!!o.edit,onChange:b=>r(k=>({...k,edit:b}))}),(0,_t.jsx)(uo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?sf:rl})]}),(0,_t.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,_t.jsx)(uo.CheckboxControl,{label:(0,_i.__)("Lock movement"),checked:o.move,onChange:b=>r(k=>({...k,move:b}))}),(0,_t.jsx)(uo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?sf:rl})]}),(0,_t.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,_t.jsx)(uo.CheckboxControl,{label:(0,_i.__)("Lock removal"),checked:o.remove,onChange:b=>r(k=>({...k,remove:b}))}),(0,_t.jsx)(uo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?sf:rl})]})]})]})}),u&&(0,_t.jsx)(uo.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,_i.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,_t.jsxs)(uo.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,_t.jsx)(uo.FlexItem,{children:(0,_t.jsx)(uo.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,_i.__)("Cancel")})}),(0,_t.jsx)(uo.FlexItem,{children:(0,_t.jsx)(uo.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,_i.__)("Apply")})})]})]})})}var em=l(x());function o5({clientId:e}){let{canLock:t,isLocked:o}=An(e),[r,n]=(0,Yq.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,t5.__)("Unlock"):(0,t5.__)("Lock");return(0,em.jsxs)(em.Fragment,{children:[(0,em.jsx)(Zq.MenuItem,{icon:o?rl:lA,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,em.jsx)(jB,{clientId:e,onClose:n})]})}var UB=l(M()),HB=l(O()),Yh=l(I());var Mu=l(x());function r5({clientId:e}){let{canLock:t,isLocked:o}=An(e),[r,n]=(0,Yh.useReducer)(a=>!a,!1),i=(0,Yh.useRef)(!1);if((0,Yh.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,UB.__)("Unlock"):(0,UB.__)("Lock");return!t&&o&&(s=(0,UB.__)("Locked")),(0,Mu.jsxs)(Mu.Fragment,{children:[(0,Mu.jsx)(HB.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,Mu.jsx)(HB.ToolbarButton,{disabled:!t,icon:o?sf:rl,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,Mu.jsx)(jB,{clientId:e,onClose:n})]})}var n5=l(M()),Xq=l(O()),GB=l($()),WB=l(D());var Qq=l(x()),xxe=()=>{};function Jq({clientId:e,onToggle:t=xxe}){let{blockType:o,mode:r,enabled:n}=(0,WB.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(_),f=c(e);return{mode:u(e),blockType:f?(0,GB.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,WB.useDispatch)(_);if(!o||!(0,GB.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,n5.__)("Edit as HTML"):(0,n5.__)("Edit visually");return(0,Qq.jsx)(Xq.MenuItem,{onClick:()=>{i(e),t()},children:s})}var eY=l(O()),$B=l(D()),tY=l(M());var oY=l(x());function i5({clientId:e,onClose:t}){let{templateLock:o,isLockedByParent:r,isEditingContentOnlySection:n}=(0,$B.useSelect)(u=>{let{getContentLockingParent:d,getTemplateLock:f,getEditedContentOnlySection:m}=z(u(_));return{templateLock:f(e),isLockedByParent:!!d(e),isEditingContentOnlySection:m()===e}},[e]),i=(0,$B.useDispatch)(_),s=!r&&o==="contentOnly";if(window?.__experimentalContentOnlyPatternInsertion||!s&&!n)return null;let{editContentOnlySection:a}=z(i);return!n&&s&&(0,oY.jsx)(eY.MenuItem,{onClick:()=>{a(e),t()},children:(0,tY._x)("Modify","Unlock content locked blocks")})}var aY=l(O()),lY=l(M()),cY=l(I());var ps=l(O()),ms=l(M()),nY=l(I()),iY=l(Fo()),KB=l(D());function rY(e){return e?.trim()?.length===0}var Fl=l(x());function sY({clientId:e,onClose:t}){let[o,r]=(0,nY.useState)(),n=gt(e),{metadata:i}=(0,KB.useSelect)(b=>{let{getBlockAttributes:k}=b(_);return{metadata:k(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,KB.useDispatch)(_),a=i?.name||"",c=n?.title,u=!!a&&!!i?.bindings&&Object.values(i.bindings).some(b=>b.source==="core/pattern-overrides"),d=o!==void 0&&o!==a,f=o===c,m=rY(o),p=d||f,h=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,k=f||m?(0,ms.sprintf)((0,ms.__)('Block name reset to: "%s".'),o):(0,ms.sprintf)((0,ms.__)('Block name changed to: "%s".'),o);(0,iY.speak)(k,"assertive"),s([e],{metadata:Ce({...i,name:b})}),t()};return(0,Fl.jsx)(ps.Modal,{title:(0,ms.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,Fl.jsx)("form",{onSubmit:b=>{b.preventDefault(),p&&g()},children:(0,Fl.jsxs)(ps.__experimentalVStack,{spacing:"3",children:[(0,Fl.jsx)(ps.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,ms.__)("Name"),help:u?(0,ms.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:c,onChange:r,onFocus:h}),(0,Fl.jsxs)(ps.__experimentalHStack,{justify:"right",children:[(0,Fl.jsx)(ps.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,ms.__)("Cancel")}),(0,Fl.jsx)(ps.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!p,variant:"primary",type:"submit",children:(0,ms.__)("Save")})]})]})})})}var tm=l(x());function s5({clientId:e}){let[t,o]=(0,cY.useState)(!1);return(0,tm.jsxs)(tm.Fragment,{children:[(0,tm.jsx)(aY.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",children:(0,lY.__)("Rename")}),t&&(0,tm.jsx)(sY,{clientId:e,onClose:()=>o(!1)})]})}var uY=l($());function a5(e){return{canRename:(0,uY.getBlockSupport)(e,"renaming",!0)}}var Nu=l(M()),dY=l(O());var Zh=l(D()),fY=l(ii()),mY=l(vl());var pY=l(x());function l5({clientIds:e}){let{updateBlockAttributes:t}=(0,Zh.useDispatch)(_),{createSuccessNotice:o}=(0,Zh.useDispatch)(fY.store),r=(0,Zh.useSelect)(a=>a(_).getBlocksByClientId(e),[e]),n=(0,Zh.useSelect)(a=>a(mY.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),i=r.some(a=>a.attributes.metadata?.blockVisibility===!1);return(0,pY.jsx)(dY.MenuItem,{icon:i?ol:qi,onClick:()=>{let a=!i,c=Object.fromEntries(r?.map(({clientId:u,attributes:d})=>[u,{metadata:Ce({...d?.metadata,blockVisibility:a?!1:void 0})}]));t(e,c,{uniqueByBlock:!0}),a&&(r.length>1?o((0,Nu.sprintf)((0,Nu.__)("Blocks hidden. You can access them via the List View (%s)."),n),{id:"block-visibility-hidden",type:"snackbar"}):o((0,Nu.sprintf)((0,Nu.__)("Block hidden. You can access it via the List View (%s)."),n),{id:"block-visibility-hidden",type:"snackbar"}))},children:i?(0,Nu.__)("Show"):(0,Nu.__)("Hide")})}var c5=l(M()),qB=l(O()),YB=l(I());var ZB=l(D()),hY=l($());var Xh=l(x());function u5({clientIds:e}){let{blocks:t,canToggleBlockVisibility:o}=(0,ZB.useSelect)(a=>{let{getBlockName:c,getBlocksByClientId:u}=a(_),d=u(e);return{blocks:d,canToggleBlockVisibility:d.every(({clientId:f})=>(0,hY.hasBlockSupport)(c(f),"visibility",!0))}},[e]),r=t.some(a=>a.attributes.metadata?.blockVisibility===!1),n=(0,YB.useRef)(!1),{updateBlockAttributes:i}=(0,ZB.useDispatch)(_);if((0,YB.useEffect)(()=>{r&&(n.current=!0)},[r]),!r&&!n.current)return null;let s=()=>{let a=Object.fromEntries(t?.map(({clientId:c,attributes:u})=>[c,{metadata:Ce({...u?.metadata,blockVisibility:r?void 0:!1})}]));i(e,a,{uniqueByBlock:!0})};return(0,Xh.jsx)(Xh.Fragment,{children:(0,Xh.jsx)(qB.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,Xh.jsx)(qB.ToolbarButton,{disabled:!o,icon:r?qi:ol,label:r?(0,c5.__)("Hidden"):(0,c5.__)("Visible"),onClick:s})})})}var gY=l(O()),bY=l(M()),kY=l(D()),JB=l($());var XB=l(D());function QB(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,XB.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:p}=z(u(_)),h=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:p(e),isEditingContentOnlySection:h===e,editedContentOnlySection:h}},[e]),s=(0,XB.useDispatch)(_),{editContentOnlySection:a,stopEditingContentOnlySection:c}=z(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var vY=l(x());function yY({clientId:e,onClose:t}){let{isSectionBlock:o,isEditingContentOnlySection:r,editContentOnlySection:n}=QB(e),{block:i,onNavigateToEntityRecord:s}=(0,kY.useSelect)(m=>{let{getBlock:p,getSettings:h}=m(_);return{block:p(e),onNavigateToEntityRecord:h().onNavigateToEntityRecord}},[e]);if(!window?.__experimentalContentOnlyPatternInsertion||!o||r)return null;let a=i?.attributes||{},c=(0,JB.isReusableBlock)(i),u=(0,JB.isTemplatePart)(i),d=(c||u)&&s;return(0,vY.jsx)(gY.MenuItem,{onClick:()=>{if(d){if(c)s({postId:a.ref,postType:"wp_block"});else if(u){let{theme:m,slug:p}=a,h=m&&p?`$m}//${p}`:null;h&&s({postId:h,postType:"wp_template_part"})}}else n(e);t()},children:(0,bY._x)("Edit section","Editing a section in the Editor")})}var Ln=l(x()),{Fill:wxe,Slot:Cxe}=(0,Qh.createSlotFill)("BlockSettingsMenuControls"),Bxe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i}=(0,SY.useSelect)(g=>{let{getBlocksByClientId:b,getBlockNamesByClientId:k,getSelectedBlockClientIds:y,getBlockEditingMode:v}=g(_),S=t!==null?t:y();return{selectedBlocks:k(S),selectedClientIds:S,isContentOnly:v(S[0])==="contentOnly",canToggleSelectedBlocksVisibility:b(S).every(w=>(0,_Y.hasBlockSupport)(w.name,"visibility",!0))}},[t]),{canLock:s}=An(r[0]),{canRename:a}=a5(o[0]),c=r.length===1&&s&&!n,u=r.length===1&&a&&!n,d=i&&!n,f=Vy(r),{isGroupable:m,isUngroupable:p}=f,h=(m||p)&&!n;return(0,Ln.jsx)(Cxe,{fillProps:{...e,selectedBlocks:o,selectedClientIds:r},children:g=>!g?.length>0&&!h&&!c?null:(0,Ln.jsxs)(Qh.MenuGroup,{children:[h&&(0,Ln.jsx)($q,{...f,onClose:e?.onClose}),r.length===1&&(0,Ln.jsx)(yY,{clientId:r[0],onClose:e?.onClose}),c&&(0,Ln.jsx)(o5,{clientId:r[0]}),u&&(0,Ln.jsx)(s5,{clientId:r[0]}),d&&(0,Ln.jsx)(l5,{clientIds:r}),g,r.length===1&&(0,Ln.jsx)(i5,{clientId:r[0],onClose:e?.onClose}),e?.count===1&&!n&&(0,Ln.jsx)(Jq,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function xY({...e}){return(0,Ln.jsx)(Qh.__experimentalStyleProvider,{document,children:(0,Ln.jsx)(wxe,{...e})})}xY.Slot=Bxe;var eE=xY;var wY=l(I()),CY=l(O()),BY=l(Y()),EY=l(D()),tE=l(M());var d5=l(x());function TY({parentClientId:e,parentBlockType:t}){let o=(0,BY.useViewportMatch)("medium","<"),{selectBlock:r}=(0,EY.useDispatch)(_),n=(0,wY.useRef)(),i=Wh({ref:n,highlightParent:!0});return o?(0,d5.jsx)(CY.MenuItem,{...i,ref:n,icon:(0,d5.jsx)(Pe,{icon:t.icon}),onClick:()=>r(e),children:(0,tE.sprintf)((0,tE.__)("Select parent block (%s)"),t.title)}):null}var bt=l(x()),Exe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function f5({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,Du.useSelect)(_),{removeBlocks:a}=(0,Du.useDispatch)(_),c=lh(),u=(0,om.useCopyToClipboard)(()=>(0,Jh.serialize)(s(e)),()=>{switch(n){case"copy":case"copyStyles":t(),c(n,e);break;case"cut":c(n,e),a(e,i);break;default:break}}),d=o||(0,ra.__)("Copy");return(0,bt.jsx)(Mn.MenuItem,{ref:u,shortcut:r,children:d})}function m5({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,...n}){let i=e?.clientId,s=t.length,a=t[0],{firstParentClientId:c,parentBlockType:u,previousBlockClientId:d,selectedBlockClientIds:f,openedBlockSettingsMenu:m,isContentOnly:p,isZoomOut:h}=(0,Du.useSelect)(B=>{let{getBlockName:T,getBlockRootClientId:A,getPreviousBlockClientId:L,getSelectedBlockClientIds:U,getBlockAttributes:G,getOpenedBlockSettingsMenu:j,getBlockEditingMode:N,isZoomOut:F}=z(B(_)),{getActiveBlockVariation:K}=B(Jh.store),Z=A(a),Q=Z&&T(Z);return{firstParentClientId:Z,parentBlockType:Z&&(K(Q,G(Z))||(0,Jh.getBlockType)(Q)),previousBlockClientId:L(a),selectedBlockClientIds:U(),openedBlockSettingsMenu:j(),isContentOnly:N(a)==="contentOnly",isZoomOut:F()}},[a]),{getBlockOrder:g,getSelectedBlockClientIds:b}=(0,Du.useSelect)(_),{setOpenedBlockSettingsMenu:k}=z((0,Du.useDispatch)(_)),y=(0,Du.useSelect)(B=>{let{getShortcutRepresentation:T}=B(IY.store);return{copy:T("core/block-editor/copy"),cut:T("core/block-editor/cut"),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")}},[]),v=f.length>0;async function S(B){if(!r)return;let T=await B;T&&T[0]&&r(T[0],!1)}function w(){if(!r)return;let B=d||c;B||(B=g()[0]);let T=v&&b().length===0;r(B,T)}let C=f?.includes(c),E=i?m===i||!1:void 0;function P(B){B&&m!==i?k(i):!B&&m&&m===i&&k(void 0)}let R=!C&&!!c;return(0,bt.jsx)(Lq,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:B,canDuplicate:T,canInsertBlock:A,canRemove:L,onDuplicate:U,onInsertAfter:G,onInsertBefore:j,onRemove:N,onCopy:F,onPasteStyles:K})=>!L&&!T&&!A&&p?null:(0,bt.jsx)(Mn.DropdownMenu,{icon:Ki,label:(0,ra.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Exe,open:E,onToggle:P,noIcons:!0,...n,children:({onClose:Q})=>(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsxs)(Mn.MenuGroup,{children:[(0,bt.jsx)(NB.Slot,{fillProps:{onClose:Q}}),R&&(0,bt.jsx)(TY,{parentClientId:c,parentBlockType:u}),s===1&&(0,bt.jsx)(Fq,{clientId:a}),!p&&(0,bt.jsx)(f5,{clientIds:t,onCopy:F,shortcut:y.copy}),!p&&(0,bt.jsx)(f5,{clientIds:t,label:(0,ra.__)("Cut"),eventType:"cut",shortcut:y.cut,__experimentalUpdateSelection:!r}),T&&(0,bt.jsx)(Mn.MenuItem,{onClick:(0,om.pipe)(Q,U,S),shortcut:y.duplicate,children:(0,ra.__)("Duplicate")}),A&&!h&&(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsx)(Mn.MenuItem,{onClick:(0,om.pipe)(Q,j),shortcut:y.insertBefore,children:(0,ra.__)("Add before")}),(0,bt.jsx)(Mn.MenuItem,{onClick:(0,om.pipe)(Q,G),shortcut:y.insertAfter,children:(0,ra.__)("Add after")})]}),s===1&&(0,bt.jsx)(AB.Slot,{fillProps:{clientId:a,onClose:Q}})]}),B&&!p&&(0,bt.jsxs)(Mn.MenuGroup,{children:[(0,bt.jsx)(f5,{clientIds:t,onCopy:F,label:(0,ra.__)("Copy styles"),eventType:"copyStyles"}),(0,bt.jsx)(Mn.MenuItem,{onClick:K,children:(0,ra.__)("Paste styles")})]}),!p&&(0,bt.jsx)(eE.Slot,{fillProps:{onClose:Q,count:s,firstBlockClientId:a},clientIds:t}),typeof o=="function"?o({onClose:Q}):oE.Children.map(J=>(0,oE.cloneElement)(J,{onClose:Q})),L&&(0,bt.jsx)(Mn.MenuGroup,{children:(0,bt.jsx)(Mn.MenuItem,{onClick:(0,om.pipe)(Q,N,w),shortcut:y.remove,children:(0,ra.__)("Delete")})})]})})})}var PY=m5;var OY=l(O()),Txe=(0,OY.createSlotFill)(Symbol("CommentIconToolbarSlotFill")),rE=Txe;var eg=l(x());function Ixe({clientIds:e,...t}){return(0,eg.jsxs)(nE.ToolbarGroup,{children:[(0,eg.jsx)(rE.Slot,{}),(0,eg.jsx)(nE.ToolbarItem,{children:o=>(0,eg.jsx)(PY,{clientIds:e,toggleProps:o,...t})})]})}var iE=Ixe;var sE=l(O()),RY=l(M()),aE=l(D());var p5=l(x());function AY({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,aE.useSelect)(n=>!!t&&n(_).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,aE.useDispatch)(_);return o?(0,p5.jsx)(sE.ToolbarGroup,{children:(0,p5.jsx)(sE.ToolbarButton,{onClick:()=>{r(t)},children:(0,RY.__)("Edit visually")})}):null}var lE=l(O()),Mr=l(I()),NY=l(D()),DY=l(Oe()),g5=l(ze()),VY=l(vl()),FY=l(st());var h5=l(x());function Pxe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function LY(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function MY(e){return e.contains(e.ownerDocument.activeElement)}function Oxe(e){let[t]=g5.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function Rxe(e){let[o,r]=(0,Mr.useState)(!0),n=(0,Mr.useCallback)(()=>{let i=g5.focus.tabbable.find(e.current),s=Pxe(i);s||(0,DY.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"}),r(s)},[e]);return(0,Mr.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function Axe({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,Mr.useState)(t),[c]=(0,Mr.useState)(r),u=(0,Mr.useCallback)(()=>{Oxe(e.current)},[e]);(0,VY.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,Mr.useEffect)(()=>{a&&u()},[o,a,u]),(0,Mr.useEffect)(()=>{let m=e.current,p=0;return!a&&!MY(m)&&(p=window.requestAnimationFrame(()=>{let h=LY(m),g=c||0;h[g]&&MY(m)&&h[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(p),!n||!m)return;let g=LY(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=z((0,NY.useSelect)(_));(0,Mr.useEffect)(()=>{let m=e.current;if(s){let p=h=>{let g=f();h.keyCode===FY.ESCAPE&&g?.current&&(h.preventDefault(),g.current.focus())};return m.addEventListener("keydown",p),()=>{m.removeEventListener("keydown",p)}}},[s,f,e])}function tg({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,Mr.useRef)(),u=Rxe(c);return Axe({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,h5.jsx)(lE.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,h5.jsx)(lE.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var zY=l(D()),cE=l($());function uE(){return(0,zY.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(_),i=n(),s=i&&(0,cE.getBlockType)(r(i));return s&&(0,cE.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var Vu=l(O()),jY=l(M()),UY=l($()),HY=l(I()),dE=l(D());var og=l(x()),b5=[],Lxe=6,Mxe={placement:"bottom-start"};function GY({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,dE.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(_),f=c(e),m=f?.metadata?.categories||b5,p=u(e),h=m.length>0?d(p):b5;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:h}},[e]),{replaceBlocks:n}=(0,dE.useDispatch)(_),i=(0,HY.useMemo)(()=>t.length===0||!r||r.length===0?b5:r.filter(a=>{let c=a.source==="core"||a.source?.startsWith("pattern-directory")&&a.source!=="pattern-directory/theme";return a.blocks.length===1&&!c&&o!==a.name&&a.categories?.some(u=>t.includes(u))&&(a.syncStatus==="unsynced"||!a.id)}).slice(0,Lxe),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,UY.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,og.jsx)(Vu.Dropdown,{popoverProps:Mxe,renderToggle:({onToggle:a,isOpen:c})=>(0,og.jsx)(Vu.ToolbarGroup,{children:(0,og.jsx)(Vu.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,jY.__)("Change design")})}),renderContent:()=>(0,og.jsx)(Vu.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,og.jsx)(Qs,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var gs=l(O()),gZ=l(M()),vE=l(D());var mE=l(D()),Fu=l($()),ZY=l(I());var k5=l(fE()),$Y=l(M());function KY(e,t){for(let o of new k5.default(t).values()){if(o.indexOf("is-style-")===-1)continue;let r=o.substring(9),n=e?.find(({name:i})=>i===r);if(n)return n}return YY(e)}function rg(e,t,o){let r=new k5.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function qY(e){return!e||e.length===0?[]:YY(e)?e:[{name:"default",label:(0,$Y._x)("Default","block style"),isDefault:!0},...e]}function YY(e){return e?.find(t=>t.isDefault)}function Nxe(e,t){return(0,ZY.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,Fu.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,Fu.cloneBlock)(e)},[e,t?.example,t?.name])}function ng({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:p}=m(_),h=p(e);if(!h)return{};let g=(0,Fu.getBlockType)(h.name),{getBlockStyles:b}=m(Fu.store);return{block:g?.example?null:h,blockType:g,styles:b(h.name),className:h.attributes.className||""}},{styles:r,block:n,blockType:i,className:s}=(0,mE.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,mE.useDispatch)(_),c=qY(r),u=KY(c,s),d=Nxe(n,i);return{onSelect:m=>{let p=rg(s,u,m);a(e,{className:p}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var cg=l($()),Wy=l(D()),kE=l(I());function XY(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var yo=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var JY=l(av());var Dxe="1600px",Vxe="320px",Fxe=1,zxe=.25,jxe=.75,Uxe="14px";function QY({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=Vxe,maximumViewportWidth:n=Dxe,scaleFactor:i=Fxe,minimumFontSizeLimit:s}){if(s=na(s)?s:Uxe,o){let v=na(o);if(!v?.unit||!v?.value)return null;let S=na(s,{coerceTo:v.unit});if(S?.value&&!e&&!t&&v?.value<=S?.value)return null;if(t||(t=`${v.value}${v.unit}`),!e){let w=v.unit==="px"?v.value:v.value*16,C=Math.min(Math.max(1-.075*Math.log2(w),zxe),jxe),E=jy(v.value*C,3);S?.value&&E<S?.value?e=`${S.value}${S.unit}`:e=`${E}${v.unit}`}}let a=na(e),c=a?.unit||"rem",u=na(t,{coerceTo:c});if(!a||!u)return null;let d=na(e,{coerceTo:"rem"}),f=na(n,{coerceTo:c}),m=na(r,{coerceTo:c});if(!f||!m||!d)return null;let p=f.value-m.value;if(!p)return null;let h=jy(m.value/100,3),g=jy(h,3)+c,b=100*((u.value-a.value)/p),k=jy((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${y}, ${t})`}function na(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.toString().match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),u?{value:jy(d,3),unit:u}:null}function jy(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function v5(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function Hxe(e){let t=e?.typography??{},o=e?.layout,r=na(o?.wideSize)?o?.wideSize:null;return v5(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function zl(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!v5(t?.typography)&&!v5(e))return o;let r=Hxe(t)?.fluid??{},n=QY({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:o,minimumFontSizeLimit:typeof r=="object"?r?.minFontSize:void 0,maximumViewportWidth:typeof r=="object"?r?.maxViewportWidth:void 0,minimumViewportWidth:typeof r=="object"?r?.minViewportWidth:void 0});return n||o}var ia="body",Uy=":root",pE=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>zl(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function hs(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function eZ(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=hs(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=hs(e,s)}))}),o}function tZ(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function oZ(e,t){let o=`.is-style-${e}`;if(!t)return o;let r=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,a,c)=>a+c+o;return t.split(",").map(s=>s.replace(r,n)).join(",")}function Gxe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,JY.getCSSValueFromRawStyle)(yo(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function Wxe(e,t){if(!e||!t||!Array.isArray(t))return e;let o=t.find(r=>r?.name===e);return o?.href?o?.href:e}function ig(e,t){if(!e||!t)return e;let o=Gxe(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=Wxe(o.url,t?._links?.["wp:theme-file"])),o}function rZ(e,t,o=[],r="slug",n){let i=[t?yo(e,["blocks",t,...o]):void 0,yo(e,o)].filter(Boolean);for(let s of i)if(s){let a=["custom","theme","default"];for(let c of a){let u=s[c];if(u){let d=u.find(f=>f[r]===n);if(d)return r==="slug"||rZ(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function $xe(e,t,o,[r,n]=[]){let i=pE.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=rZ(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return un(e,t,c)}return o}function Kxe(e,t,o,r=[]){let n=(t?yo(e?.settings??{},["blocks",t,"custom",...r]):void 0)??yo(e?.settings??{},["custom",...r]);return n?un(e,t,n):o}function un(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=yo(e,o.ref);if(!u||typeof u=="object"&&"ref"in u)return u;o=u}else return o;let r="var:",n="var(--wp--",i=")",s;if(o.startsWith(r))s=o.slice(r.length).split("|");else if(o.startsWith(n)&&o.endsWith(i))s=o.slice(n.length,-i.length).split("--");else return o;let[a,...c]=s;return a==="preset"?$xe(e,t,o,c):a==="custom"?Kxe(e,t,o,c):o}var Nr=l($()),Gy=l(av()),fZ=l(D());function sa(e,t="root",o={}){if(!t)return null;let{fallback:r=!1}=o,{name:n,selectors:i,supports:s}=e,a=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(a&&i.root?u=i?.root:s?.__experimentalSelector?u=s.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=r?u:null;if(a)return yo(i,`${c}.root`,null)||yo(i,c,null)||m;let p=s?yo(s,`${c}.__experimentalSelector`,null):void 0;return p?hs(u,p):m}let f;return a&&(f=yo(i,c,null)),f||(r?sa(e,d[0],o):null)}function ag(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function _5(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function awe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function S5(e,t="0"){let o=awe(e);if(!o)return null;let r=_5(o?.top)||t,n=_5(o?.left)||t;return r===n?r:`${r} ${n}`}var aZ={backgroundSize:"cover",backgroundPosition:"50% 50%"};function lZ(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:aZ.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:aZ.backgroundPosition}),t}var cZ={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var lwe={button:"wp-element-button",caption:"wp-element-caption"},cwe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function uwe(e="*",t={}){return pE.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=yo(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${ag(c)}-${u}`,m=e.split(",").map(h=>`${h}${f}`).join(","),p=`var(--wp--preset--${n}--${ag(c)})`;o+=`${m}{${d}: ${p} !important;}`})})}),o},"")}function dwe(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var uZ=(e,t)=>{let o={};return Object.entries(e).forEach(([r,n])=>{if(r==="root"||!t?.[r])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([s,a])=>{if(s==="root"||!t?.[r][s])return;let c={[r]:{[s]:t[r][s]}},u=lg(c);o[a]=[...o[a]||[],...u],delete t[r][s]}),i||typeof n=="object"&&n!==null&&"root"in n){let s=i?n:n.root,a={[r]:t[r]},c=lg(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function lg(e={},t="",o,r={},n=!1){let i=ia===t,s=Object.entries(Nr.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:p}])=>{if(p&&!i)return c;let h=d;if(h[0]==="elements"||m)return c;let g=yo(e,h);if(u==="--wp--style--root--padding"&&(typeof g=="string"||!o))return c;if(f&&typeof g!="string")Object.entries(f).forEach(b=>{let[k,y]=b;if(!yo(g,[y],!1))return;let v=k.startsWith("--")?k:ag(k);c.push(`${v}: ${(0,Gy.getCSSValueFromRawStyle)(yo(g,[y]))}`)});else if(yo(e,h,!1)){let b=u.startsWith("--")?u:ag(u);c.push(`${b}: ${(0,Gy.getCSSValueFromRawStyle)(yo(e,h))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=ig(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...lZ(e.background)}})),(0,Gy.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:ag(c.key),d=ig(c.value,r);u==="font-size"&&(d=zl({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function mZ({layoutDefinitions:e=cZ,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?S5(t?.spacing?.blockGap):"";if(n&&(o===ia?a=a||"0.5em":!r&&i&&(a=i)),a&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!r&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([p,h])=>{m.push(`${p}: ${h||a}`)}),m.length){let p="";r?p=o===ia?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:p=o===ia?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${p} { ${m.join("; ")}; }`}})}),o===ia&&r&&(s+=`${Uy} { --wp--style--block-gap: ${a}; }`)),o===ia&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(s+=`${o} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let p=[];if(m.rules&&Object.entries(m.rules).forEach(([h,g])=>{p.push(`${h}: ${g}`)}),p.length){let h=`.${u}${m?.selector||""}`;s+=`${h} { ${p.join("; ")}; }`}})})}return s}var fwe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function hE(e){if(!e)return{};let r=Object.entries(e).filter(([n])=>fwe.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(r)}var mwe=(e,t)=>{let o=[];if(!e?.styles)return o;let r=hE(e.styles);return r&&o.push({styles:r,selector:ia,skipSelectorWrapper:!0}),Object.entries(Nr.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!lwe[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=hE(i),a=i;if(a?.variations){let c={};Object.entries(a.variations).forEach(([u,d])=>{let f=d;c[u]=hE(f),f?.css&&(c[u].css=f.css);let m=typeof t!="string"?t[n]?.styleVariationSelectors?.[u]:void 0;Object.entries(f?.elements??{}).forEach(([p,h])=>{h&&Nr.__EXPERIMENTAL_ELEMENTS[p]&&o.push({styles:h,selector:hs(m,Nr.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(f?.blocks??{}).forEach(([p,h])=>{let g=typeof t!="string"?hs(m,t[p]?.selector):void 0,b=typeof t!="string"?hs(m,t[p]?.duotoneSelector):void 0,k=typeof t!="string"?eZ(m,t[p]?.featureSelectors??{}):void 0,y=hE(h);h?.css&&(y.css=h.css),!(!g||typeof t=="string")&&(o.push({selector:g,duotoneSelector:b,featureSelectors:k,fallbackGapValue:t[p]?.fallbackGapValue,hasLayoutSupport:t[p]?.hasLayoutSupport,styles:y}),Object.entries(h.elements??{}).forEach(([v,S])=>{S&&Nr.__EXPERIMENTAL_ELEMENTS[v]&&o.push({styles:S,selector:hs(g,Nr.__EXPERIMENTAL_ELEMENTS[v])})}))})}),s.variations=c}typeof t!="string"&&t?.[n]?.selector&&o.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:s,featureSelectors:t[n].featureSelectors,styleVariationSelectors:t[n].styleVariationSelectors}),Object.entries(a?.elements??{}).forEach(([c,u])=>{typeof t!="string"&&u&&t?.[n]&&Nr.__EXPERIMENTAL_ELEMENTS[c]&&o.push({styles:u,selector:t[n]?.selector.split(",").map(d=>Nr.__EXPERIMENTAL_ELEMENTS[c].split(",").map(m=>d+" "+m)).join(",")})})}),o},pwe=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return pE.forEach(({path:c})=>{let u=yo(s,c,!1);u!==!1&&(a=XY(a,c,u))}),a},n=r(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&o.push({presets:n,custom:i,selector:Uy}),Object.entries(e.settings?.blocks??{}).forEach(([s,a])=>{let c=a.custom;if(typeof t=="string"||!t[s])return;let u=r(a);(Object.keys(u).length>0||c)&&o.push({presets:u,custom:c,selector:t[s]?.selector})}),o};var gE=(e,t,o,r,n=!1,i=!1,s={})=>{let a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},c=mwe(e,t),u=pwe(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},p=a.marginReset||a.rootPadding||a.layoutStyles,h="";if(a.presets&&(f||m)&&(h+=`${Uy} {`,h=f?h+` --wp--style--global--content-size: ${f};`:h,h=m?h+` --wp--style--global--wide-size: ${m};`:h,h+="}"),p&&(h+=":where(body) {margin: 0;",a.rootPadding&&d&&(h+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) } 86 .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } 87 .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); } 88 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; } 89 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0; 90 `),h+="}"),a.blockStyles&&c.forEach(({selector:g,duotoneSelector:b,styles:k,fallbackGapValue:y,hasLayoutSupport:v,featureSelectors:S,styleVariationSelectors:w,skipSelectorWrapper:C})=>{if(S){let R=uZ(S,k);Object.entries(R).forEach(([B,T])=>{if(T.length){let A=T.join(";");h+=`:root :where($B}){$A};}`}})}if(b){let R={};k?.filter&&(R.filter=k.filter,delete k.filter);let B=lg(R);B.length&&(h+=`$b}{$B.join(";")};}`)}!n&&(ia===g||v)&&(h+=mZ({style:k,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:y}));let E=lg(k,g,d,e,i);if(E?.length){let R=C?g:`:root :where($g})`;h+=`$R}{$E.join(";")};}`}k?.css&&(h+=dZ(k.css,`:root :where($g})`)),a.variationStyles&&w&&Object.entries(w).forEach(([R,B])=>{let T=k?.variations?.[R];if(T){if(S){let L=uZ(S,T);Object.entries(L).forEach(([U,G])=>{if(G.length){let j=dwe(U,B),N=G.join(";");h+=`:root :where($j}){$N};}`}})}let A=lg(T,B,d,e);A.length&&(h+=`:root :where($B}){$A.join(";")};}`),T?.css&&(h+=dZ(T.css,`:root :where($B})`))}});let P=Object.entries(k).filter(([R])=>R.startsWith(":"));P?.length&&P.forEach(([R,B])=>{let T=lg(B);if(!T?.length)return;let L=`:root :where($g.split(",").map(U=>U+R).join(",")}){$T.join(";")};}`;h+=L})}),a.layoutStyles&&(h=h+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",h=h+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",h=h+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let g=S5(e?.styles?.spacing?.blockGap)||"0.5em";h=h+`:root :where(.wp-site-blocks) > * { margin-block-start: $g}; margin-block-end: 0; }`,h=h+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",h=h+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&u.forEach(({selector:g,presets:b})=>{(ia===g||Uy===g)&&(g="");let k=uwe(g,b);k.length>0&&(h+=k)}),h};var hwe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(cwe).forEach(([r,n])=>{let i=sa(e,r);i&&(o[n]=i)}),o},bE=(e,t)=>{let{getBlockStyles:o}=(0,fZ.select)(Nr.store),r={};return e.forEach(n=>{let i=n.name,s=sa(n);if(!s)return;let a=sa(n,"filter.duotone");if(!a){let p=sa(n),h=(0,Nr.getBlockSupport)(n,"color.__experimentalDuotone",!1);a=h&&p&&hs(p,h)}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=o(i),f={};d?.forEach(p=>{let h=t?`-$t}`:"",g=`$p.name}$h}`,b=oZ(g,s);f[g]=b});let m=hwe(n,s);r[i]={duotoneSelector:a??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),r};function dZ(e,t){let o="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))o+=`:root :where($t}){$n.trim()}}`;else{let s=n.replace("}","").split("{");if(s.length!==2)return;let[a,c]=s,u=a.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?a.replace(d,"").trim():a.trim(),m;f===""?m=t:m=a.startsWith(" ")?hs(t,f):tZ(t,f),o+=`:root :where($m})$d}{$c.trim()}}`}}),o}var $y=l(x()),x5="is-style-";function pZ(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(x5)){let r=o.slice(x5.length);r!=="default"&&t.push(r)}return t},[]):[]}function gwe(e,t=[]){let o=pZ(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function bwe({override:e}){rm(e)}function w5({config:e}){let{getBlockStyles:t,overrides:o}=(0,Wy.useSelect)(i=>({getBlockStyles:i(cg.store).getBlockStyles,overrides:z(i(_)).getStyleOverrides()}),[]),{getBlockName:r}=(0,Wy.useSelect)(_),n=(0,kE.useMemo)(()=>{if(!o?.length)return;let i=[],s=[];for(let[,a]of o)if(a?.variation&&a?.clientId&&!s.includes(a.clientId)){let c=r(a.clientId),u=e?.styles?.blocks?.[c]?.variations?.[a.variation];if(u){let d={settings:e?.settings,styles:{blocks:{[c]:{variations:{[`$a.variation}-$a.clientId}`]:u}}}}},f=bE((0,cg.getBlockTypes)(),a.clientId),b=gE(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});i.push({id:`$a.variation}-$a.clientId}`,css:b,__unstableType:"variation",variation:a.variation,clientId:a.clientId}),s.push(a.clientId)}}return i},[e,o,t,r]);if(!(!n||!n.length))return(0,$y.jsx)($y.Fragment,{children:n.map(i=>(0,$y.jsx)(bwe,{override:i},i.id))})}function C5(e,t,o){if(!e?.styles?.blocks?.[t]?.variations?.[o])return;let r=i=>{Object.keys(i).forEach(s=>{let a=i[s];if(typeof a=="object"&&a!==null)if(a.ref!==void 0)if(typeof a.ref!="string"||a.ref.trim()==="")delete i[s];else{let c=nl(e,a.ref);c?i[s]=c:delete i[s]}else r(a),Object.keys(a).length===0&&delete i[s]})},n=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[o]));return r(n),n}function kwe(e,t,o){let{globalSettings:r,globalStyles:n}=(0,Wy.useSelect)(i=>{let s=i(_).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[Vs]}},[]);return(0,kE.useMemo)(()=>{let i=C5({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`$t}-$o}`]:i}}}}}},[r,n,t,o,e])}function vwe({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,Wy.useSelect)(cg.store),n=r(e),i=gwe(t,n),s=`$x5}$i}-$o}`,{settings:a,styles:c}=kwe(e,i,o),u=(0,kE.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=bE((0,cg.getBlockTypes)(),o);return gE(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})},[i,a,c,o]);return rm({id:`variation-$o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var hZ={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>pZ(e).length>0,useBlockProps:vwe};var zu=l(x()),ywe=(0,zu.jsxs)(gs.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,zu.jsx)(gs.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"}),(0,zu.jsx)(gs.Path,{stroke:"currentColor",strokeWidth:"1.5",d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"})]});function _we({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=ng({clientId:e}),{updateBlockAttributes:n}=(0,vE.useDispatch)(_),{globalSettings:i,globalStyles:s,blockName:a}=(0,vE.useSelect)(d=>{let f=d(_).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[Vs],blockName:d(_).getBlockName(e)}},[e]),c=o?.name?C5({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,zu.jsx)(gs.ToolbarGroup,{children:(0,zu.jsx)(gs.ToolbarButton,{onClick:()=>{let f=(t.findIndex(h=>h.name===o.name)+1)%t.length,m=t[f],p=rg(r,o,m);n(e,{className:p})},label:(0,gZ.__)("Shuffle styles"),children:(0,zu.jsx)(gs.Icon,{icon:ywe,style:{fill:c||"transparent"}})})})}var bZ=_we;var HZ=l(O()),GZ=l(M()),WZ=l(D());var Zy=l($()),$Z=l(Tp());var aa=l(M()),la=l(O()),ju=l($()),BE=l(D());var CZ=l(M()),Ky=l(O()),SE=l($()),xE=l(I());var kZ=l(M()),vZ=l(O()),yZ=l(Y());var nm=l(x());function yE({blocks:e}){return(0,yZ.useViewportMatch)("medium","<")?null:(0,nm.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,nm.jsx)(vZ.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,nm.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,nm.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,kZ.__)("Preview")}),(0,nm.jsx)(nn,{viewportWidth:601,blocks:e})]})})})}var _Z=l(O()),ug=l($()),SZ=l(D()),_E=l(I());var jl=l(x()),Swe={};function xZ({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,SZ.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(_),{getActiveBlockVariation:c,getBlockVariations:u}=i(ug.store),d=a(e);if(t.length!==1||!d)return Swe;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,_E.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var xwe=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,_E.useState)();return(0,jl.jsxs)(jl.Fragment,{children:[r&&(0,jl.jsx)(yE,{blocks:(0,ug.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,jl.jsx)(wwe,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function wwe({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,jl.jsxs)(_Z.MenuItem,{className:(0,ug.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,jl.jsx)(Pe,{icon:n,showColors:!0}),i]})}var wZ=xwe;var dn=l(x());function Cwe(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,xE.useMemo)(()=>{let r=Object.keys(t),n=e.reduce((i,s)=>{let{name:a}=s;return r.includes(a)?i.priorityTextTransformations.push(s):i.restTransformations.push(s),i},{priorityTextTransformations:[],restTransformations:[]});if(n.priorityTextTransformations.length===1&&n.priorityTextTransformations[0].name==="core/quote"){let i=n.priorityTextTransformations.pop();n.restTransformations.push(i)}return n},[e]);return o.priorityTextTransformations.sort(({name:r},{name:n})=>t[r]<t[n]?-1:1),o}var Bwe=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,xE.useState)(),{priorityTextTransformations:c,restTransformations:u}=Cwe(t),d=c.length&&u.length,f=!!u.length&&(0,dn.jsx)(Ewe,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,dn.jsxs)(dn.Fragment,{children:[(0,dn.jsxs)(Ky.MenuGroup,{label:(0,CZ.__)("Transform to"),className:e,children:[s&&(0,dn.jsx)(yE,{blocks:(0,SE.switchToBlockType)(i,s)}),!!o?.length&&(0,dn.jsx)(wZ,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,dn.jsx)(BZ,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,dn.jsx)(Ky.MenuGroup,{className:e,children:f})]})};function Ewe({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,dn.jsx)(BZ,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function BZ({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,dn.jsxs)(Ky.MenuItem,{className:(0,SE.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,dn.jsx)(Pe,{icon:n,showColors:!0}),i]})}var EZ=Bwe;var IZ=l(M()),PZ=l(O());var wE=l(O());var dg=l(x()),Twe=()=>{};function TZ({clientId:e,onSwitch:t=Twe}){let{onSelect:o,stylesToRender:r,activeStyle:n}=ng({clientId:e,onSwitch:t});return!r||r.length===0?null:(0,dg.jsx)(dg.Fragment,{children:r.map(i=>{let s=i.label||i.name;return(0,dg.jsx)(wE.MenuItem,{icon:n.name===i.name?Ja:null,onClick:()=>o(i),children:(0,dg.jsx)(wE.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:s})},i.name)})})}var B5=l(x());function OZ({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e;return(0,B5.jsx)(PZ.MenuGroup,{label:(0,IZ.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,B5.jsx)(TZ,{clientId:o,onSwitch:t})})}var T5=l(M()),DZ=l(I()),CE=l(Y());var bs=l(O());var LZ=l(I()),MZ=l($());var RZ=l($()),E5=(e,t,o=new Set)=>{let{clientId:r,name:n,innerBlocks:i=[]}=e;if(!o.has(r)){if(n===t)return e;for(let s of i){let a=E5(s,t,o);if(a)return a}}},AZ=(e,t)=>{let o=(0,RZ.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var Iwe=(e,t)=>{let o=AZ(t.name,t.attributes);e.attributes={...e.attributes,...o}},Pwe=(e,t)=>{let o=t.map(n=>(0,MZ.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=E5(s,n.name,r);if(a){i=!0,r.add(a.clientId),Iwe(a,n);break}}if(!i)return}return o},Owe=(e,t)=>(0,LZ.useMemo)(()=>e.reduce((o,r)=>{let n=Pwe(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),NZ=Owe;var rr=l(x());function Rwe({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,DZ.useState)(!1),i=NZ(t,e);return i.length?(0,rr.jsxs)(bs.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,rr.jsx)(Awe,{patterns:i,onSelect:o}),(0,rr.jsx)(bs.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Qo,children:(0,T5.__)("Patterns")})]}):null}function Awe({patterns:e,onSelect:t}){let o=(0,CE.useViewportMatch)("medium","<");return(0,rr.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,rr.jsx)(bs.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,rr.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,rr.jsx)(Lwe,{patterns:e,onSelect:t})})})})}function Lwe({patterns:e,onSelect:t}){return(0,rr.jsx)(bs.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,T5.__)("Patterns list"),children:e.map(o=>(0,rr.jsx)(VZ,{pattern:o,onSelect:t},o.name))})}function VZ({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,CE.useInstanceId)(VZ,`$o}-list__item-description`);return(0,rr.jsxs)("div",{className:`$o}-list__list-item`,children:[(0,rr.jsxs)(bs.Composite.Item,{render:(0,rr.jsx)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?r:void 0,className:`$o}-list__item`}),onClick:()=>t(e.transformedBlocks),children:[(0,rr.jsx)(nn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,rr.jsx)("div",{className:`$o}-list__item-title`,children:e.title})]}),!!e.description&&(0,rr.jsx)(bs.VisuallyHidden,{id:r,children:e.description})]})}var FZ=Rwe;var Nn=l(x());function Mwe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,BE.useDispatch)(_),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,BE.useSelect)(P=>{let{getBlockAttributes:R,getBlocksByClientId:B,getBlockRootClientId:T,getBlockTransformItems:A,__experimentalGetPatternTransformItems:L,canRemoveBlocks:U,getBlockName:G}=P(_),{getBlockStyles:j}=P(ju.store),N=T(t[0]),F=B(t),K=t.length===1,Z=K&&G(t[0]),Q=K&&!!j(Z)?.length;return{blocks:F,possibleBlockTransformations:A(F,N),patterns:L(F,N),isUsingBindings:t.every(J=>!!R(J)?.metadata?.bindings),canRemove:U(t),hasBlockStyles:Q}},[t]),f=xZ({clientIds:t,blocks:a});function m(P){P.length>1&&r(P[0].clientId,P[P.length-1].clientId)}function p(P){let R=(0,ju.switchToBlockType)(a,P);o(t,R),m(R)}function h(P){n(a[0].clientId,{...f.find(({name:R})=>R===P).attributes})}function g(P){o(t,P),m(P)}let b=a.length===1,k=b&&((0,ju.isTemplatePart)(a[0])||(0,ju.isReusableBlock)(a[0])),y=!!i?.length&&u&&!k,v=!!f?.length,S=!!s?.length&&u,w=y||v;if(!(d||w||S))return(0,Nn.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,aa.__)("No transforms.")});let E=b?(0,aa._x)("This block is connected.","block toolbar button label and description"):(0,aa._x)("These blocks are connected.","block toolbar button label and description");return(0,Nn.jsxs)("div",{className:"block-editor-block-switcher__container",children:[S&&(0,Nn.jsx)(FZ,{blocks:a,patterns:s,onSelect:P=>{g(P),e()}}),w&&(0,Nn.jsx)(EZ,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:P=>{p(P),e()},onSelectVariation:P=>{h(P),e()}}),d&&(0,Nn.jsx)(OZ,{hoveredBlock:a[0],onSwitch:e}),c&&(0,Nn.jsx)(la.MenuGroup,{children:(0,Nn.jsx)(la.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:E})})]})}var Nwe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,aa.__)("Change block type or style"):(0,aa.sprintf)((0,aa._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,Nn.jsx)(la.ToolbarGroup,{children:(0,Nn.jsx)(la.ToolbarItem,{children:s=>(0,Nn.jsx)(la.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:e,text:r,toggleProps:{description:i,...s},menuProps:{orientation:"both"},children:({onClose:a})=>(0,Nn.jsx)(Mwe,{onClose:a,clientIds:t})})})})},zZ=Nwe;var fg=l(O()),qy=l(M()),EE=l(I()),jZ=l(D());var Ul=l(x());function Dwe({clientIds:e,blockTitle:t}){let o=(0,jZ.useSelect)(i=>{let{getBlockAttributes:s}=i(_);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,qy.sprintf)((0,qy.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,qy.__)("These blocks are editable using overrides."),(0,Ul.jsx)(fg.__experimentalText,{children:n})}function UZ({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,EE.useState)(!1),s=(0,EE.useRef)();return(0,Ul.jsxs)(Ul.Fragment,{children:[(0,Ul.jsx)(fg.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,Ul.jsx)(fg.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,Ul.jsx)(Dwe,{clientIds:t,blockTitle:o})})]})}var Yy=l(x());function Vwe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a}=z(e(_)),{getBlockStyles:c}=e(Zy.store),u=t.some(w=>s(w)==="contentOnly"),d=t.length===1,f=d&&o(t[0]),m=d&&!!c(f)?.length,p=t.some(w=>!!r(w)?.metadata?.patternName),h=t.every(w=>fk(r(w)?.metadata?.bindings)),g=t.every(w=>n(w,"core/block",!0).length>0),b=i(t),k=a(t[0])==="default",v=!(window?.__experimentalContentOnlyPatternInsertion&&p)&&k&&(m||b)&&!u,S=h&&g;return v?"switcher":S?"pattern-overrides":"default"}function Fwe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=z(e(_)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName&&window?.__experimentalContentOnlyPatternInsertion)return oi;let a=o(i),c=(0,Zy.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(Zy.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:ef}function KZ({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,WZ.useSelect)(f=>({icon:Fwe({select:f,clientIds:e}),showIconLabels:f($Z.store).get("core","showIconLabels"),variant:Vwe({select:f,clientIds:e})}),[e]),i=jo({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,GZ.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,Yy.jsx)(Pe,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,Yy.jsx)(zZ,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,Yy.jsx)(UZ,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,Yy.jsx)(HZ.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var Je=l(x());function P5({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,variant:n="unstyled"}){let{blockClientId:i,blockClientIds:s,isDefaultEditingMode:a,blockType:c,toolbarKey:u,shouldShowVisualToolbar:d,showParentSelector:f,isUsingBindings:m,isSectionContainer:p,hasContentOnlyLocking:h,showShuffleButton:g,showSlots:b,showGroupButtons:k,showLockButtons:y,showBlockVisibilityButton:v,showSwitchSectionStyleButton:S}=(0,YZ.useSelect)(U=>{let{getBlockName:G,getBlockMode:j,getBlockParents:N,getSelectedBlockClientIds:F,isBlockValid:K,getBlockEditingMode:Z,getBlockAttributes:Q,getTemplateLock:J,getParentSectionBlock:ee,isZoomOut:ie,isSectionBlock:de}=z(U(_)),X=F(),re=X[0],W=N(re),oe=ee(re)??W[W.length-1],ce=G(oe),le=(0,Hl.getBlockType)(ce),ye=Z(re),_e=ye==="default",Ve=G(re),go=X.every(We=>K(We)),ot=X.every(We=>j(We)==="visual"),Yt=X.every(We=>!!Q(We)?.metadata?.bindings),Ct=X.some(We=>J(We)==="contentOnly"),rt=ie(),Vt=de(re),Ft=window?.__experimentalContentOnlyPatternInsertion&&(rt||Vt);return{blockClientId:re,blockClientIds:X,isDefaultEditingMode:_e,blockType:re&&(0,Hl.getBlockType)(Ve),shouldShowVisualToolbar:go&&ot,toolbarKey:`$re}$oe}`,showParentSelector:!rt&&le&&ye!=="contentOnly"&&Z(oe)!=="disabled"&&(0,Hl.hasBlockSupport)(le,"__experimentalParentSelector",!0)&&X.length===1,isUsingBindings:Yt,isSectionContainer:Vt,hasContentOnlyLocking:Ct,showShuffleButton:rt,showSlots:!rt,showGroupButtons:!rt,showLockButtons:!rt,showBlockVisibilityButton:!rt,showSwitchSectionStyleButton:Ft}},[]),w=(0,I5.useRef)(null),C=(0,I5.useRef)(),E=Wh({ref:C}),P=!(0,ZZ.useViewportMatch)("medium","<");if(!uE())return null;let B=s.length>1,T=(0,Hl.isReusableBlock)(c)||(0,Hl.isTemplatePart)(c),A=V("block-editor-block-contextual-toolbar",{"has-parent":f}),L=V("block-editor-block-toolbar",{"is-synced":T,"is-connected":m});return(0,Je.jsx)(tg,{focusEditorOnEscape:!0,className:A,"aria-label":(0,qZ.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,Je.jsxs)("div",{ref:w,className:L,children:[f&&!B&&P&&(0,Je.jsx)(cq,{}),(d||B)&&(0,Je.jsx)("div",{ref:C,...E,children:(0,Je.jsxs)(XZ.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,Je.jsx)(KZ,{clientIds:s,isSynced:T}),a&&v&&(0,Je.jsx)(u5,{clientIds:s}),!B&&a&&y&&(0,Je.jsx)(r5,{clientId:i}),(0,Je.jsx)(BB,{clientIds:s,hideDragHandle:e})]})}),!h&&d&&B&&k&&(0,Je.jsx)(QD,{}),g&&(0,Je.jsx)(GY,{clientId:s[0]}),S&&(0,Je.jsx)(bZ,{clientId:s[0]}),d&&b&&(0,Je.jsxs)(Je.Fragment,{children:[!p&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(mt.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,Je.jsx)(mt.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,Je.jsx)(mt.Slot,{className:"block-editor-block-toolbar__slot"}),(0,Je.jsx)(mt.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,Je.jsx)(mt.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,Je.jsx)(OB.Slot,{})]}),(0,Je.jsx)(AY,{clientIds:s}),(0,Je.jsx)(iE,{clientIds:s})]})},u)}function QZ({hideDragHandle:e,variant:t}){return(0,Je.jsx)(P5,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var O5=l(x());function tX({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=bB(e),s=(0,mg.useRef)();(0,mg.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,JZ.useDispatch)(_),c=(0,mg.useRef)(!1);(0,eX.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,mg.useEffect)(()=>{c.current=!1});let u=r||e,d=gB({contentElement:o?.current,clientId:u});return!t&&(0,O5.jsx)(Uf,{clientId:u,bottomClientId:i,className:V("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,O5.jsx)(P5,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var TE=l(D()),IE=l(I());var oX=l(O());var rX=l(M()),nX=l(x());function zwe({onClick:e}){return(0,nX.jsx)(oX.Button,{variant:"primary",icon:ti,size:"compact",className:V("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,rX._x)("Add pattern","Generic label for pattern inserter button")})}var iX=zwe;var R5=l(x());function jwe(){let[e,t]=(0,IE.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,TE.useSelect)(h=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:k,getSelectedBlockClientId:y,getSectionRootClientId:v,getBlockInsertionPoint:S,isBlockInsertionPointVisible:w}=z(h(_)),C=v();return{hasSelection:!!k().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:y(),blockInsertionPoint:S(),insertionPointVisible:w()}},[]),{showInsertionPoint:u}=z((0,TE.useDispatch)(_));if((0,IE.useEffect)(()=>{let h=setTimeout(()=>{t(!0)},500);return()=>{clearTimeout(h)}},[]),!e||!o)return null;let d=s,m=r.findIndex(h=>s===h)+1,p=r[m];return c&&a?.index===m?null:(0,R5.jsx)(K1,{previousClientId:d,nextClientId:p,children:(0,R5.jsx)(iX,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var sX=jwe;var aX=l(D()),lX=l($());function cX(){return(0,aX.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=z(e(_)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,lX.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,p=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:p}},[])}var ca=l(x());function Uwe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s}=z(e(_));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i()}}function Xy({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a}=(0,pg.useSelect)(Uwe,[]),c=(0,uX.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:u,getSelectedBlockClientIds:d,getBlockRootClientId:f,isGroupable:m,getBlockName:p,getEditedContentOnlySection:h}=z((0,pg.useSelect)(_)),{getGroupingBlockName:g}=(0,pg.useSelect)(hg.store),{showEmptyBlockSideInserter:b,showBlockToolbarPopover:k}=cX(),y=Kh(),{duplicateBlocks:v,removeBlocks:S,replaceBlocks:w,insertAfterBlock:C,insertBeforeBlock:E,selectBlock:P,moveBlocksUp:R,moveBlocksDown:B,expandBlock:T,updateBlockAttributes:A,stopEditingContentOnlySection:L}=z((0,pg.useDispatch)(_));function U(N){if(!N.defaultPrevented){if(c("core/block-editor/move-up",N)||c("core/block-editor/move-down",N)){let F=d();if(F.length){N.preventDefault();let K=f(F[0]);(c("core/block-editor/move-up",N)?"up":"down")==="up"?R(F,K):B(F,K);let Q=Array.isArray(F)?F.length:1,J=(0,gg.sprintf)((0,gg._n)("%d block moved.","%d blocks moved.",F.length),Q);(0,M5.speak)(J)}}else if(c("core/block-editor/duplicate",N)){let F=d();F.length&&(N.preventDefault(),v(F))}else if(c("core/block-editor/remove",N)){let F=d();F.length&&(N.preventDefault(),S(F))}else if(c("core/block-editor/paste-styles",N)){let F=d();if(F.length){N.preventDefault();let K=u(F);y(K)}}else if(c("core/block-editor/insert-after",N)){let F=d();F.length&&(N.preventDefault(),C(F[F.length-1]))}else if(c("core/block-editor/insert-before",N)){let F=d();F.length&&(N.preventDefault(),E(F[0]))}else if(c("core/block-editor/unselect",N)){if(N.target.closest("[role=toolbar]"))return;let F=d();F.length>1&&(N.preventDefault(),P(F[0]))}else if(c("core/block-editor/collapse-list-view",N)){if((0,A5.isTextField)(N.target)||(0,A5.isTextField)(N.target?.contentWindow?.document?.activeElement))return;N.preventDefault(),T(r)}else if(c("core/block-editor/group",N)){let F=d();if(F.length>1&&m(F)){N.preventDefault();let K=u(F),Z=g(),Q=(0,hg.switchToBlockType)(K,Z);w(F,Q),(0,M5.speak)((0,gg.__)("Selected blocks are grouped."))}}else if(c("core/block-editor/toggle-block-visibility",N)){let F=d();if(F.length){N.preventDefault();let K=u(F);if(!K.every(ee=>(0,hg.hasBlockSupport)(p(ee.clientId),"visibility",!0)))return;let Q=K.some(ee=>ee.attributes.metadata?.blockVisibility===!1),J=Object.fromEntries(K.map(({clientId:ee,attributes:ie})=>[ee,{metadata:Ce({...ie?.metadata,blockVisibility:Q?void 0:!1})}]));A(F,J,{uniqueByBlock:!0})}}c("core/block-editor/stop-editing-as-blocks",N)&&h()&&L()}}let G=jf(t),j=jf(t);return(0,ca.jsx)("div",{...o,onKeyDown:U,className:V(o.className,{"block-editor-block-tools--is-dragging":a}),children:(0,ca.jsxs)(Fh.Provider,{value:(0,dX.useRef)(!1),children:[!i&&!s&&(0,ca.jsx)(L$,{__unstableContentRef:t}),b&&(0,ca.jsx)($K,{__unstableContentRef:t,clientId:r}),k&&(0,ca.jsx)(tX,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,ca.jsx)(L5.Popover.Slot,{name:"block-toolbar",ref:G}),e,(0,ca.jsx)(L5.Popover.Slot,{name:"__unstable-block-tools-after",ref:j}),s&&!a&&(0,ca.jsx)(sX,{__unstableContentRef:t})]})})}var Si=l(M()),ua=l($()),Uu=l(D()),N5=l(mX());var pX=l(x()),Hwe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,Uu.useDispatch)(_),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,Uu.useSelect)(p=>{let{getBlockRootClientId:h,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:k,canRemoveBlocks:y}=p(_),v=b(),S=k(v);if(S.filter(C=>!C).length>0)return{invalidSelection:!0};let w=h(v[0]);return{blocks:S,clientIds:v,possibleBlockTransformations:g(S,w),canRemove:y(v),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let c=r.length===1&&(0,ua.isTemplatePart)(r[0]);function u(p){p.length>1&&o(p[0].clientId,p[p.length-1].clientId)}function d(p){let h=(0,ua.switchToBlockType)(r,p);t(n,h),u(h)}let f=!!s.length&&i&&!c;return!n||n.length<1||!f?{isLoading:!1,commands:[]}:{isLoading:!1,commands:s.map(p=>{let{name:h,title:g,icon:b}=p;return{name:"core/block-editor/transform-to-"+h.replace("/","-"),label:(0,Si.sprintf)((0,Si.__)("Transform to %s"),g),icon:(0,pX.jsx)(Pe,{icon:b}),callback:({close:k})=>{d(h),k()}}})}},Gwe=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,Uu.useSelect)(B=>{let{getSelectedBlockClientIds:T,isUngroupable:A,isGroupable:L}=B(_);return{clientIds:T(),isUngroupable:A(),isGroupable:L()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,getBlockName:c}=(0,Uu.useSelect)(_),{getDefaultBlockName:u,getGroupingBlockName:d}=(0,Uu.useSelect)(ua.store),f=s(t),{removeBlocks:m,replaceBlocks:p,duplicateBlocks:h,insertAfterBlock:g,insertBeforeBlock:b,updateBlockAttributes:k}=(0,Uu.useDispatch)(_),y=()=>{if(!f.length)return;let B=d(),T=(0,ua.switchToBlockType)(f,B);T&&p(t,T)},v=()=>{if(!f.length)return;let B=f[0].innerBlocks;B.length&&p(t,B)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let S=i(t[0]),w=n(u(),S),C=f.every(B=>!!B&&(0,ua.hasBlockSupport)(B.name,"multiple",!0)&&n(B.name,S)),E=a(t),P=f.every(({clientId:B})=>(0,ua.hasBlockSupport)(c(B),"visibility",!0)),R=[];if(C&&R.push({name:"duplicate",label:(0,Si.__)("Duplicate"),callback:()=>h(t,!0),icon:ef}),w&&R.push({name:"add-before",label:(0,Si.__)("Add before"),callback:()=>{let B=Array.isArray(t)?t[0]:B;b(B)},icon:ti},{name:"add-after",label:(0,Si.__)("Add after"),callback:()=>{let B=Array.isArray(t)?t[t.length-1]:B;g(B)},icon:ti}),r&&R.push({name:"Group",label:(0,Si.__)("Group"),callback:y,icon:xk}),o&&R.push({name:"ungroup",label:(0,Si.__)("Ungroup"),callback:v,icon:mL}),E&&R.push({name:"remove",label:(0,Si.__)("Delete"),callback:()=>m(t,!0),icon:dL}),P){let B=f.some(T=>T.attributes.metadata?.blockVisibility===!1);R.push({name:"core/toggle-block-visibility",label:B?(0,Si.__)("Show"):(0,Si.__)("Hide"),callback:()=>{let T=Object.fromEntries(f?.map(({clientId:A,attributes:L})=>[A,{metadata:Ce({...L?.metadata,blockVisibility:B?void 0:!1})}]));k(t,T,{uniqueByBlock:!0})},icon:B?ol:qi})}return{isLoading:!1,commands:R.map(B=>({...B,name:"core/block-editor/action-"+B.name,callback:({close:T})=>{B.callback(),T()}}))}},PE=()=>{(0,N5.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:Hwe()}),(0,N5.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:Gwe(),context:"block-selection-edit"})};var da=l(x()),Wwe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function D5({shouldIframe:e=!0,height:t="300px",children:o=(0,da.jsx)(vh,{}),styles:r,contentRef:n,iframeProps:i}){PE();let s=(0,OE.useViewportMatch)("medium","<"),a=wy(),c=Hf(),u=(0,hX.useRef)(),d=(0,OE.useMergeRefs)([n,c,u]),f=(0,gX.useSelect)(p=>z(p(_)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,da.jsx)(Xy,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,da.jsxs)(fh,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,da.jsx)(_l,{styles:r}),o]})}):(0,da.jsxs)(Xy,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,da.jsx)(_l,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:Wwe}),(0,da.jsx)(DC,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%"},children:o})]})}function $we({children:e,height:t,styles:o}){return(0,da.jsx)(D5,{height:t,styles:o,children:e})}var bX=$we;var fa=l(O()),kX=l(M()),vX=l(st()),yX=l(Oe()),xi=l(x()),Kwe=()=>(0,xi.jsx)(fa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,xi.jsx)(fa.Path,{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"})}),qwe=({style:e,className:t})=>(0,xi.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,xi.jsx)("div",{className:`$t} block-library-colors-selector__state-selection`,style:e,children:(0,xi.jsx)(Kwe,{})})}),Ywe=({TextColor:e,BackgroundColor:t})=>({onToggle:o,isOpen:r})=>{let n=i=>{!r&&i.keyCode===vX.DOWN&&(i.preventDefault(),o())};return(0,xi.jsx)(fa.ToolbarGroup,{children:(0,xi.jsx)(fa.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,kX.__)("Open Colors Selector"),onClick:o,onKeyDown:n,icon:(0,xi.jsx)(t,{children:(0,xi.jsx)(e,{children:(0,xi.jsx)(qwe,{})})})})})},Zwe=({children:e,...t})=>((0,yX.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,xi.jsx)(fa.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Ywe(t),renderContent:()=>e})),_X=Zwe;var TQ=l(Oe()),YE=l(O()),H5=l(M()),IQ=l(D()),PQ=l(I());var wg=l(Y()),KE=l(O()),e_=l(D()),BQ=l(Oe()),Jt=l(I()),j5=l(M());var UE=l(O()),HE=l(I()),GE=l(D());var xX=l(Y()),wX=l(Fo()),CX=l(D()),NE=l(I()),bg=l(M());var RE=l(I()),AE=(0,RE.createContext)({});AE.displayName="ListViewContext";var Hu=()=>(0,RE.useContext)(AE);var LE=l(I()),SX=l(x());function ME({children:e,...t}){let o=(0,LE.useRef)();return(0,LE.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,SX.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var Qy=l(x()),V5=(0,NE.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=Hu(),a=(0,xX.useInstanceId)(V5),{directInsert:c,hideInserter:u}=(0,CX.useSelect)(h=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:k}=z(h(_)),v=g(o)?.directInsert||!1,S=!!b(o)||k();return{directInsert:v,hideInserter:S}},[o]),d=jo({clientId:o,context:"list-view"}),f=jo({clientId:i?.clientId,context:"list-view"});if((0,NE.useEffect)(()=>{f?.length&&(0,wX.speak)((0,bg.sprintf)((0,bg.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__$a}`,p=(0,bg.sprintf)((0,bg.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,Qy.jsxs)("div",{className:"list-view-appender",children:[(0,Qy.jsx)(bi,{ref:n,rootClientId:o,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:c,__experimentalIsQuick:!0,...r,toggleProps:{"aria-describedby":m},onSelectOrClose:h=>{h?.clientId&&s(h)}}),(0,Qy.jsx)(ME,{id:m,children:p})]})});var Wu=l($()),sm=l(O()),zE=l(Y());var _o=l(I()),yg=l(D()),FE=l(M()),jE=l(st()),XX=l(yy()),QX=l(vl()),JX=l(Fo());var BX=l(O()),EX=l(Y()),TX=l(I());var IX=l(x()),Xwe=KH(BX.__experimentalTreeGridRow),Qwe=(0,TX.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=Xw({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,EX.useMergeRefs)([u,d]);return(0,IX.jsx)(Xwe,{ref:f,className:V("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),PX=Qwe;var OX=l(ze()),RX=l(I());function AX({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,RX.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,OX.getScrollContainer)(o.current),{ownerDocument:i}=o.current;if(n===i.body||n===i.documentElement||!n)return;let a=o.current.getBoundingClientRect(),c=n.getBoundingClientRect();(a.top<c.top||a.bottom>c.bottom)&&o.current.scrollIntoView()},[e,r,o])}var HX=l(I());var kg=l(O()),FX=l(I());var VE=l(st()),zX=l(D()),jX=l($());var LX=l(M()),F5=l(x());function DE({onClick:e}){return(0,F5.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,F5.jsx)(Te,{icon:(0,LX.isRTL)()?vk:Oc})})}var MX=l(I()),NX=l(D());var Jwe=3,DX={"core/image":({clientId:e,attributes:t})=>{if(t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/cover":({clientId:e,attributes:t})=>{if(t.backgroundType==="image"&&t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/media-text":({clientId:e,attributes:t})=>{if(t.mediaType==="image"&&t.mediaUrl)return{url:t.mediaUrl,alt:t.mediaAlt||"",clientId:e}},"core/gallery":({innerBlocks:e})=>{let t=[],o=e?.length?DX[e[0].name]:void 0;if(!o)return t;for(let r of e){let n=o(r);if(n&&t.push(n),t.length>=Jwe)return t}return t}};function eCe(e,t){let o=DX[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function VX({clientId:e,isExpanded:t}){let{block:o}=(0,NX.useSelect)(n=>({block:n(_).getBlock(e)}),[e]);return(0,MX.useMemo)(()=>eCe(o,t),[o,t])}var Wo=l(x()),{Badge:tCe}=z(kg.privateApis);function oCe({className:e,block:{clientId:t},onClick:o,onContextMenu:r,onMouseDown:n,onToggleExpanded:i,tabIndex:s,onFocus:a,onDragStart:c,onDragEnd:u,draggable:d,isExpanded:f,ariaDescribedBy:m},p){let h=gt(t),g=jo({clientId:t,context:"list-view"}),{isLocked:b}=An(t),{canToggleBlockVisibility:k,isBlockHidden:y,hasPatternName:v}=(0,zX.useSelect)(B=>{let{getBlockName:T,getBlockAttributes:A}=B(_),{isBlockHidden:L}=z(B(_)),U=A(t);return{canToggleBlockVisibility:(0,jX.hasBlockSupport)(T(t),"visibility",!0),isBlockHidden:L(t),hasPatternName:!!U?.metadata?.patternName}},[t]),S=b,w=k&&y,C=h?.positionType==="sticky",E=VX({clientId:t,isExpanded:f}),P=B=>{B.dataTransfer.clearData(),c?.(B)};function R(B){(B.keyCode===VE.ENTER||B.keyCode===VE.SPACE)&&o(B)}return(0,Wo.jsxs)("a",{className:V("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:R,onMouseDown:n,ref:p,tabIndex:s,onFocus:a,onDragStart:P,onDragEnd:u,draggable:d,href:`#block-$t}`,"aria-describedby":m,"aria-expanded":f,children:[(0,Wo.jsx)(DE,{onClick:i}),(0,Wo.jsx)(Pe,{icon:v?oi:h?.icon,showColors:!0,context:"list-view"}),(0,Wo.jsxs)(kg.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Wo.jsx)(kg.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),h?.anchor&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,Wo.jsx)(tCe,{className:"block-editor-list-view-block-select-button__anchor",children:h.anchor})}),C&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,Wo.jsx)(Te,{icon:vA})}),E.length?(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:E.map((B,T)=>(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url($B.url})`,zIndex:E.length-T}},B.clientId))}):null,w&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility",children:(0,Wo.jsx)(Te,{icon:qi})}),S&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,Wo.jsx)(Te,{icon:uA})})]})]})}var UX=(0,FX.forwardRef)(oCe);var Gu=l(x()),rCe=(0,HX.forwardRef)(({onClick:e,onToggleExpanded:t,block:o,isSelected:r,position:n,siblingBlockCount:i,level:s,isExpanded:a,selectedClientIds:c,...u},d)=>{let{clientId:f}=o,{AdditionalBlockContent:m,insertedBlock:p,setInsertedBlock:h}=Hu(),g=c.includes(f)?c:[f];return(0,Gu.jsxs)(Gu.Fragment,{children:[m&&(0,Gu.jsx)(m,{block:o,insertedBlock:p,setInsertedBlock:h}),(0,Gu.jsx)(yB,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:k,onDragEnd:y})=>(0,Gu.jsx)(UX,{ref:d,className:"block-editor-list-view-block-contents",block:o,onClick:e,onToggleExpanded:t,isSelected:r,position:n,siblingBlockCount:i,level:s,draggable:b,onDragStart:k,onDragEnd:y,isExpanded:a,...u})})]})}),GX=rCe;var im=l(M()),WX=l(ze()),$X=(e,t,o)=>(0,im.sprintf)((0,im.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),KX=(e,t)=>[e?.positionLabel?`${(0,im.sprintf)((0,im.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,im.__)("This block is locked."):void 0].filter(Boolean).join(" "),qX=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function YX(e,t,o,r){let n=[...o,e],i=[...r,t],s=Math.min(n.length,i.length)-1,a=n[s],c=i[s];return{start:a,end:c}}function vg(e,t){let o=()=>{let n=t?.querySelector(`[role=row][data-block="$e}"]`);return n?WX.focus.focusable.find(n)[0]:null},r=o();r?r.focus():window.requestAnimationFrame(()=>{r=o(),r&&r.focus()})}function ZX({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:o,clientId:r,firstDraggedBlockIndex:n,isDragged:i}){let s,a,c;if(!i){a=!1;let u=e[r];c=u>n,t!=null&&n!==void 0?u!==void 0&&(u>=n&&u<t?s="up":u<n&&u>=t?s="down":s="normal",a=typeof t=="number"&&t-1===u&&o==="inside"):t===null&&n!==void 0?u!==void 0&&u>=n?s="up":s="normal":t!=null&&n===void 0?u!==void 0&&(u<t?s="normal":s="down"):t===null&&(s="normal")}return{displacement:s,isNesting:a,isAfterDraggedBlocks:c}}var nr=l(x());function eQ({block:{clientId:e},displacement:t,isAfterDraggedBlocks:o,isDragged:r,isNesting:n,isSelected:i,isBranchSelected:s,selectBlock:a,position:c,level:u,rowCount:d,siblingBlockCount:f,showBlockMovers:m,path:p,isExpanded:h,selectedClientIds:g,isSyncedBranch:b}){let k=(0,_o.useRef)(null),y=(0,_o.useRef)(null),v=(0,_o.useRef)(null),[S,w]=(0,_o.useState)(!1),[C,E]=(0,_o.useState)(),{isLocked:P}=An(e),R=i&&g[0]===e,B=i&&g[g.length-1]===e,{toggleBlockHighlight:T,duplicateBlocks:A,multiSelect:L,replaceBlocks:U,removeBlocks:G,insertAfterBlock:j,insertBeforeBlock:N,setOpenedBlockSettingsMenu:F,updateBlockAttributes:K}=z((0,yg.useDispatch)(_)),Z=(0,zE.useDebounce)(T,50),{canInsertBlockType:Q,getSelectedBlockClientIds:J,getPreviousBlockClientId:ee,getBlockRootClientId:ie,getBlockOrder:de,getBlockParents:X,getBlocksByClientId:re,canEditBlock:W,canMoveBlock:H,canRemoveBlocks:oe,isGroupable:ce}=(0,yg.useSelect)(_),{getGroupingBlockName:le}=(0,yg.useSelect)(Wu.store),ye=gt(e),_e=Kh(),{block:Ve,blockName:go,allowRightClickOverrides:ot,isBlockHidden:Yt}=(0,yg.useSelect)(ue=>{let{getBlock:Xo,getBlockName:xe,getSettings:Ze}=ue(_),{isBlockHidden:wr}=z(ue(_));return{block:Xo(e),blockName:xe(e),allowRightClickOverrides:Ze().allowRightClickOverrides,isBlockHidden:wr(e)}},[e]),Ct=(0,Wu.hasBlockSupport)(go,"__experimentalToolbar",!0),Vt=`list-view-block-select-button__description-${(0,zE.useInstanceId)(eQ)}`,{expand:Ft,collapse:We,collapseAll:so,BlockSettingsMenu:dt,listViewInstanceId:ao,expandedState:qn,setInsertedBlock:Kr,treeGridElementRef:Fe,rootClientId:bo}=Hu(),Zt=(0,QX.__unstableUseShortcutEventMatch)();function me(){let ue=J(),Xo=ue.includes(e),xe=Xo?ue[0]:e,Ze=ie(xe);return{blocksToUpdate:Xo?ue:[e],firstBlockClientId:xe,firstBlockRootClientId:Ze,selectedBlockClientIds:ue}}async function wo(ue){if(ue.defaultPrevented||ue.target.closest("[role=dialog]"))return;let Xo=[jE.BACKSPACE,jE.DELETE].includes(ue.keyCode);if(Zt("core/block-editor/unselect",ue)&&g.length>0)ue.stopPropagation(),ue.preventDefault(),a(ue,void 0);else if(Xo||Zt("core/block-editor/remove",ue)){let{blocksToUpdate:xe,firstBlockClientId:Ze,firstBlockRootClientId:wr,selectedBlockClientIds:fr}=me();if(!oe(xe))return;let qa=ee(Ze)??wr;G(xe,!1);let Ya=fr.length>0&&J().length===0;qa||(qa=de()[0]),dr(qa,Ya)}else if(Zt("core/block-editor/paste-styles",ue)){ue.preventDefault();let{blocksToUpdate:xe}=me(),Ze=re(xe);_e(Ze)}else if(Zt("core/block-editor/duplicate",ue)){ue.preventDefault();let{blocksToUpdate:xe,firstBlockRootClientId:Ze}=me();if(re(xe).every(fr=>!!fr&&(0,Wu.hasBlockSupport)(fr.name,"multiple",!0)&&Q(fr.name,Ze))){let fr=await A(xe,!1);fr?.length&&dr(fr[0],!1)}}else if(Zt("core/block-editor/insert-before",ue)){ue.preventDefault();let{blocksToUpdate:xe}=me();await N(xe[0]);let Ze=J();F(void 0),dr(Ze[0],!1)}else if(Zt("core/block-editor/insert-after",ue)){ue.preventDefault();let{blocksToUpdate:xe}=me();await j(xe.at(-1));let Ze=J();F(void 0),dr(Ze[0],!1)}else if(Zt("core/block-editor/select-all",ue)){ue.preventDefault();let{firstBlockRootClientId:xe,selectedBlockClientIds:Ze}=me(),wr=de(xe);if(!wr.length)return;if((0,XX.default)(Ze,wr)&&xe&&xe!==bo){dr(xe,!0);return}L(wr[0],wr[wr.length-1],null)}else if(Zt("core/block-editor/collapse-list-view",ue)){ue.preventDefault();let{firstBlockClientId:xe}=me(),Ze=X(xe,!1);so(),Ft(Ze)}else if(Zt("core/block-editor/group",ue)){let{blocksToUpdate:xe}=me();if(xe.length>1&&ce(xe)){ue.preventDefault();let Ze=re(xe),wr=le(),fr=(0,Wu.switchToBlockType)(Ze,wr);U(xe,fr),(0,JX.speak)((0,FE.__)("Selected blocks are grouped."));let qa=J();F(void 0),dr(qa[0],!1)}}else if(Zt("core/block-editor/toggle-block-visibility",ue)){ue.preventDefault();let{blocksToUpdate:xe}=me(),Ze=re(xe);if(!Ze.every(Ya=>(0,Wu.hasBlockSupport)(Ya.name,"visibility",!0)))return;let fr=Ze.some(Ya=>Ya.attributes.metadata?.blockVisibility===!1),qa=Object.fromEntries(Ze.map(({clientId:Ya,attributes:pde})=>[Ya,{metadata:Ce({...pde?.metadata,blockVisibility:fr?void 0:!1})}]));K(xe,qa,{uniqueByBlock:!0})}}let Co=(0,_o.useCallback)(()=>{w(!0),Z(e,!0)},[e,w,Z]),Yn=(0,_o.useCallback)(()=>{w(!1),Z(e,!1)},[e,w,Z]),Zn=(0,_o.useCallback)(ue=>{a(ue,e),ue.preventDefault()},[e,a]),dr=(0,_o.useCallback)((ue,Xo)=>{Xo&&a(void 0,ue,null,null),vg(ue,Fe?.current)},[a,Fe]),$a=(0,_o.useCallback)(ue=>{ue.preventDefault(),ue.stopPropagation(),h===!0?We(e):h===!1&&Ft(e)},[e,Ft,We,h]),Re=(0,_o.useCallback)(ue=>{Ct&&ot&&(v.current?.click(),E(new window.DOMRect(ue.clientX,ue.clientY,0,0)),ue.preventDefault())},[ot,v,Ct]),Se=(0,_o.useCallback)(ue=>{ot&&ue.button===2&&ue.preventDefault()},[ot]),Bt=(0,_o.useMemo)(()=>{let{ownerDocument:ue}=y?.current||{};if(!(!C||!ue))return{ownerDocument:ue,getBoundingClientRect(){return C}}},[C]),ae=(0,_o.useCallback)(()=>{E(void 0)},[E]);if(AX({isSelected:i,rowItemRef:y,selectedClientIds:g}),!Ve)return null;let Me=$X(c,f,u),qr=KX(ye,P),Yr=Yt?(0,FE.__)("Block is hidden."):null,ak=f>0,Hd=m&&ak,Gd=V("block-editor-list-view-block__mover-cell",{"is-visible":S||i}),np=V("block-editor-list-view-block__menu-cell",{"is-visible":S||R}),Ka;Hd?Ka=2:Ct||(Ka=3);let lk=V({"is-selected":i,"is-first-selected":R,"is-last-selected":B,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!Ct,"is-synced":ye?.isSynced,"is-draggable":H,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),Wd=g.includes(e)?g:[e],ck=i&&g.length===1;return(0,nr.jsxs)(PX,{className:lk,isDragged:r,onKeyDown:wo,onMouseEnter:Co,onMouseLeave:Yn,onFocus:Co,onBlur:Yn,level:u,position:c,rowCount:d,path:p,id:`list-view-$ao}-block-$e}`,"data-block":e,"data-expanded":W?h:void 0,ref:y,children:[(0,nr.jsx)(sm.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Ka,ref:k,"aria-selected":!!i,children:({ref:ue,tabIndex:Xo,onFocus:xe})=>(0,nr.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,nr.jsx)(GX,{block:Ve,onClick:Zn,onContextMenu:Re,onMouseDown:Se,onToggleExpanded:$a,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ue,tabIndex:ck?0:Xo,onFocus:xe,isExpanded:W?h:void 0,selectedClientIds:g,ariaDescribedBy:Vt}),(0,nr.jsx)(ME,{id:Vt,children:[Me,qr,Yr].filter(Boolean).join(" ")})]})}),Hd&&(0,nr.jsx)(nr.Fragment,{children:(0,nr.jsxs)(sm.__experimentalTreeGridCell,{className:Gd,withoutGridItem:!0,children:[(0,nr.jsx)(sm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:Xo,onFocus:xe})=>(0,nr.jsx)(wB,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:Xo,onFocus:xe})}),(0,nr.jsx)(sm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:Xo,onFocus:xe})=>(0,nr.jsx)(CB,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:Xo,onFocus:xe})})]})}),Ct&&dt&&(0,nr.jsx)(sm.__experimentalTreeGridCell,{className:np,"aria-selected":!!i,ref:v,children:({ref:ue,tabIndex:Xo,onFocus:xe})=>(0,nr.jsx)(dt,{clientIds:Wd,block:Ve,icon:Ki,label:(0,FE.__)("Options"),popoverProps:{anchor:Bt},toggleProps:{ref:ue,className:"block-editor-list-view-block__menu",tabIndex:Xo,onClick:ae,onFocus:xe,size:"small"},disableOpenOnArrowDown:!0,expand:Ft,expandedState:qn,setInsertedBlock:Kr,__experimentalSelectBlock:dr})})]})}var tQ=(0,_o.memo)(eQ);var Dn=l(x());function oQ(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(nCe(t,o,r),0):1}var nCe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+oQ(n,e,t,o):r+1,iCe=()=>{};function rQ(e){let{blocks:t,selectBlock:o=iCe,showBlockMovers:r,selectedClientIds:n,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:c=0,fixedListWindow:u,isExpanded:d,parentId:f,shouldShowInnerBlocks:m=!0,isSyncedBranch:p=!1,showAppender:h=!0}=e,g=gt(f),b=p||!!g?.isSynced,k=(0,GE.useSelect)(L=>f?L(_).canEditBlock(f):!0,[f]),{blockDropPosition:y,blockDropTargetIndex:v,firstDraggedBlockIndex:S,blockIndexes:w,expandedState:C,draggedClientIds:E}=Hu(),P=(0,HE.useRef)();if(!k)return null;let R=h&&i===1,B=t.filter(Boolean),T=B.length,A=R?T+1:T;return P.current=c,(0,Dn.jsxs)(Dn.Fragment,{children:[B.map((L,U)=>{let{clientId:G,innerBlocks:j}=L;U>0&&(P.current+=oQ(B[U-1],C,E,d));let N=!!E?.includes(G),{displacement:F,isAfterDraggedBlocks:K,isNesting:Z}=ZX({blockIndexes:w,blockDropTargetIndex:v,blockDropPosition:y,clientId:G,firstDraggedBlockIndex:S,isDragged:N}),{itemInView:Q}=u,J=Q(P.current),ee=U+1,ie=s.length>0?`$s}_$ee}`:`$ee}`,de=!!j?.length,X=de&&m?C[G]??d:void 0,re=qX(G,n),W=a||re&&de,H=N||J||re&&G===n[0]||U===0||U===T-1;return(0,Dn.jsxs)(GE.AsyncModeProvider,{value:!re,children:[H&&(0,Dn.jsx)(tQ,{block:L,selectBlock:o,isSelected:re,isBranchSelected:W,isDragged:N,level:i,position:ee,rowCount:A,siblingBlockCount:T,showBlockMovers:r,path:ie,isExpanded:N?!1:X,listPosition:P.current,selectedClientIds:n,isSyncedBranch:b,displacement:F,isAfterDraggedBlocks:K,isNesting:Z}),!H&&(0,Dn.jsx)("tr",{children:(0,Dn.jsx)("td",{className:"block-editor-list-view-placeholder"})}),de&&X&&!N&&(0,Dn.jsx)(rQ,{parentId:G,blocks:j,selectBlock:o,showBlockMovers:r,level:i+1,path:ie,listPosition:P.current+1,fixedListWindow:u,isBranchSelected:W,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},G)}),R&&(0,Dn.jsx)(UE.__experimentalTreeGridRow,{level:i,setSize:A,positionInSet:A,isExpanded:!0,children:(0,Dn.jsx)(UE.__experimentalTreeGridCell,{children:L=>(0,Dn.jsx)(V5,{clientId:f,nestingLevel:i,blockCount:T,...L})})})]})}var nQ=(0,HE.memo)(rQ);var _g=l(O()),WE=l(ze()),Gl=l(I()),z5=l(M());var wi=l(x());function iQ({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=gt(e),n=jo({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,Gl.useMemo)(()=>{if(!t.current)return[];let y=i?t.current.querySelector(`[data-block="$i}"]`):void 0,v=s?t.current.querySelector(`[data-block="$s}"]`):void 0;return[y,v]},[t,i,s]),d=u||c,f=(0,z5.isRTL)(),m=(0,Gl.useCallback)((y,v)=>{if(!d)return 0;let S=d.offsetWidth,w=(0,WE.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,E=w===C.body||w===C.documentElement;if(w&&!E){let P=w.getBoundingClientRect(),R=(0,z5.isRTL)()?P.right-y.right:y.left-P.left,B=w.clientWidth;if(B<S+R&&(S=B-R),!f&&y.left+v<P.left)return S-=P.left-y.left,S;if(f&&y.right-v>P.right)return S-=y.right-P.right,S}return S-v},[f,d]),p=(0,Gl.useMemo)(()=>{if(!d)return{};let y=d.getBoundingClientRect();return{width:m(y,0)}},[m,d]),h=(0,Gl.useMemo)(()=>{if(!d)return{};let y=(0,WE.getScrollContainer)(d),v=d.ownerDocument,S=y===v.body||y===v.documentElement;if(y&&!S){let w=y.getBoundingClientRect(),C=d.getBoundingClientRect(),E=f?w.right-C.right:C.left-w.left;if(!f&&w.left>C.left)return{transform:`translateX( $E}px )`};if(f&&w.right<C.right)return{transform:`translateX( $E*-1}px )`}}return{}},[f,d]),g=(0,Gl.useMemo)(()=>{if(!c)return 1;let y=parseInt(c.getAttribute("aria-level"),10);return y?y+1:1},[c]),b=(0,Gl.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),k=(0,Gl.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let v=d.getBoundingClientRect(),S=v.left,w=0,C=(0,WE.getScrollContainer)(d,"horizontal"),E=d.ownerDocument,P=C===E.body||C===E.documentElement;if(C&&!P){let T=C.getBoundingClientRect(),A=f?C.offsetWidth-C.clientWidth:0;S<T.left+A&&(S=T.left+A)}a==="top"?w=v.top-v.height*2:w=v.top;let R=m(v,0),B=v.height;return new window.DOMRect(S,w,R,B)}}},[d,a,m,f]);return d?(0,wi.jsx)(_g.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,wi.jsx)("div",{style:p,className:V("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,wi.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,wi.jsxs)("div",{className:V("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:h,children:[(0,wi.jsx)(DE,{onClick:()=>{}}),(0,wi.jsx)(Pe,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,wi.jsx)(_g.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,wi.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,wi.jsx)(_g.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,wi.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var sQ=l(Fo()),Sg=l(M()),Jy=l(D()),aQ=l(I()),Vn=l(st()),lQ=l($());function cQ(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,Jy.useDispatch)(_),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,Jy.useSelect)(_),{getBlockType:u}=(0,Jy.useSelect)(lQ.store);return{updateBlockSelection:(0,aQ.useCallback)(async(f,m,p,h)=>{if(!f?.shiftKey&&f?.keyCode!==Vn.ESCAPE){o(m,h);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===Vn.ESCAPE,b=f.type==="keydown"&&(f.keyCode===Vn.UP||f.keyCode===Vn.DOWN||f.keyCode===Vn.HOME||f.keyCode===Vn.END);if(!b&&!c()&&!a()){o(m,null);return}let k=s(),y=[...n(m),m];if((g||b&&!k.some(C=>y.includes(C)))&&await e(),!g){let C=i(),E=m;b&&(!c()&&!a()&&(C=m),p&&(E=p));let P=n(C),R=n(E),{start:B,end:T}=YX(C,E,P,R);await t(B,T,null)}let v=s();if((f.keyCode===Vn.HOME||f.keyCode===Vn.END)&&v.length>1)return;let S=k.filter(C=>!v.includes(C)),w;if(S.length===1){let C=u(r(S[0]))?.title;C&&(w=(0,Sg.sprintf)((0,Sg.__)("%s deselected."),C))}else S.length>1&&(w=(0,Sg.sprintf)((0,Sg.__)("%s blocks deselected."),S.length));w&&(0,sQ.speak)(w,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var uQ=l(I());function dQ(e){return(0,uQ.useMemo)(()=>{let o={},r=0,n=i=>{i.forEach(s=>{o[s.clientId]=r,r++,s.innerBlocks.length>0&&n(s.innerBlocks)})};return n(e),o},[e])}var fQ=l(D());function mQ({blocks:e,rootClientId:t}){return(0,fQ.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=z(o(_));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var pQ=l(I()),hQ=l(D());function gQ({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,hQ.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=z(n(_));return{expandedBlock:s(),getBlockParents:i}},[]);(0,pQ.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var bQ=l(D()),am=l(I()),lm=l(Y()),kQ=l(M());var Wl=24;function sCe(e,t,o=1,r=!1){let n=r?t.right-o*Wl:t.left+o*Wl;return r?e.x>n:e.x<n}function aCe(e,t,o=1,r=!1){let n=r?t.right-o*Wl:t.left+o*Wl,i=r?n-e.x:e.x-n,s=Math.round(i/Wl);return Math.abs(s)}function lCe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function vQ(e,t){let o=e[t+1];return o&&o.isDraggedBlock?vQ(e,t+1):o}function cCe(e,t,o=1,r=!1){let n=r?t.right-o*Wl:t.left+o*Wl;return(r?e.x<n-Wl:e.x>n+Wl)&&e.y<t.bottom}var uCe=["top","bottom"];function dCe(e,t,o=!1){let r,n,i,s,a;for(let f=0;f<e.length;f++){let m=e[f];if(m.isDraggedBlock)continue;let p=m.element.getBoundingClientRect(),[h,g]=Wf(t,p,uCe),b=tB(t,p);if(i===void 0||h<i||b){i=h;let k=e.indexOf(m),y=e[k-1];if(g==="top"&&y&&y.rootClientId===m.rootClientId&&!y.isDraggedBlock?(n=y,r="bottom",s=y.element.getBoundingClientRect(),a=k-1):(n=m,r=g,s=p,a=k),b)break}}if(!n)return;let c=lCe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||cCe(t,s,c.length,o))){let f=n.isExpanded?0:n.innerBlockCount||0;return{rootClientId:n.clientId,clientId:n.clientId,blockIndex:f,dropPosition:"inside"}}if(u&&n.rootClientId&&sCe(t,s,c.length,o)){let f=vQ(e,a),m=n.nestingLevel,p=f?f.nestingLevel:1;if(m&&p){let h=aCe(t,s,c.length,o),g=Math.max(Math.min(h,m-p),0);if(c[g]){let b=n.blockIndex;if(c[g].nestingLevel===f?.nestingLevel)b=f?.blockIndex;else for(let k=a;k>=0;k--){let y=e[k];if(y.rootClientId===c[g].rootClientId){b=y.blockIndex+1;break}}return{rootClientId:c[g].rootClientId,clientId:n.clientId,blockIndex:b,dropPosition:r}}}}if(!n.canInsertDraggedBlocksAsSibling)return;let d=u?1:0;return{rootClientId:n.rootClientId,clientId:n.clientId,blockIndex:n.blockIndex+d,dropPosition:r}}var fCe={leading:!1,trailing:!0};function yQ({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,bQ.useSelect)(_),[c,u]=(0,am.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=eB(d,f),p=(0,kQ.isRTL)(),h=(0,lm.usePrevious)(d),g=(0,am.useCallback)((S,w)=>{let{rootClientId:C}=w||{};C&&w?.dropPosition==="inside"&&!S[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,lm.useThrottle)(g,500,fCe);(0,am.useEffect)(()=>{if(c?.dropPosition!=="inside"||h!==c?.rootClientId){b.cancel();return}b(t,c)},[t,h,c,b]);let k=s(),y=(0,lm.useThrottle)((0,am.useCallback)((S,w)=>{let C={x:S.clientX,y:S.clientY},E=!!k?.length,R=Array.from(w.querySelectorAll("[data-block]")).map(T=>{let A=T.dataset.block,L=T.dataset.expanded==="true",U=T.classList.contains("is-dragging"),G=parseInt(T.getAttribute("aria-level"),10),j=r(A);return{clientId:A,isExpanded:L,rootClientId:j,blockIndex:n(A),element:T,nestingLevel:G||void 0,isDraggedBlock:E?U:!1,innerBlockCount:i(A),canInsertDraggedBlocksAsSibling:E?a(k,j):!0,canInsertDraggedBlocksAsChild:E?a(k,A):!0}}),B=dCe(R,C,p);B&&u(B)},[a,k,i,n,r,p]),50);return{ref:(0,lm.__experimentalUseDropZone)({dropZoneElement:e,onDrop(S){y.cancel(),c&&m(S),u(void 0)},onDragLeave(){y.cancel(),u(null)},onDragOver(S){y(S,S.currentTarget)},onDragEnd(){y.cancel(),u(void 0)}}),target:c}}var $E=l(I()),_Q=l(D());function SQ({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,$E.useState)(null),{selectedBlockParentClientIds:n}=(0,_Q.useSelect)(i=>{let{getBlockParents:s}=i(_);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,$E.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var xg=l(D()),xQ=l(Y());function wQ({selectBlock:e}){let t=(0,xg.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,xg.useSelect)(_),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:p}=(0,xg.useDispatch)(_),h=lh();return(0,xQ.useRefEffect)(g=>{function b(v,S){S&&e(void 0,v,null,null),vg(v,g)}function k(v){let S=s(),w=S.includes(v),C=w?S[0]:v,E=r(C);return{blocksToUpdate:w?S:[v],firstBlockClientId:C,firstBlockRootClientId:E,originallySelectedBlockClientIds:S}}function y(v){if(v.defaultPrevented||!g.contains(v.target.ownerDocument.activeElement))return;let w=v.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!w)return;let{blocksToUpdate:C,firstBlockClientId:E,firstBlockRootClientId:P,originallySelectedBlockClientIds:R}=k(w);if(C.length!==0){if(v.preventDefault(),v.type==="copy"||v.type==="cut"){C.length===1&&d(C[0]),h(v.type,C);let B=n(C);MC(v,B,t)}if(v.type==="cut"){if(!u(C))return;let B=i(E)??P;f(C,!1);let T=R.length>0&&s().length===0;B||(B=o()[0]),b(B,T)}else if(v.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:B}=a(),T=R7(v,B);if(C.length===1){let[A]=C;if(T.every(L=>c(L.name,A))){p(T,void 0,A),b(T[0]?.clientId,!1);return}}m(C,T,T.length-1,-1),b(T[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",y),g.ownerDocument.addEventListener("cut",y),g.ownerDocument.addEventListener("paste",y),()=>{g.ownerDocument.removeEventListener("copy",y),g.ownerDocument.removeEventListener("cut",y),g.ownerDocument.removeEventListener("paste",y)}},[])}var $l=l(x()),mCe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,CQ=32;function EQ({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=m5,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,BQ.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,wg.useInstanceId)(EQ),{clientIdsTree:p,draggedClientIds:h,selectedClientIds:g}=mQ({blocks:t,rootClientId:a}),b=dQ(p),{getBlock:k}=(0,e_.useSelect)(_),{visibleBlockCount:y}=(0,e_.useSelect)(W=>{let{getGlobalBlockCount:H,getClientIdsOfDescendants:oe}=W(_),ce=h?.length>0?oe(h).length+1:0;return{visibleBlockCount:H()-ce}},[h]),{updateBlockSelection:v}=cQ(),[S,w]=(0,Jt.useReducer)(mCe,{}),[C,E]=(0,Jt.useState)(null),{setSelectedTreeId:P}=SQ({firstSelectedBlockClientId:g[0],setExpandedState:w}),R=(0,Jt.useCallback)((W,H,oe)=>{v(W,H,null,oe),P(H),u&&u(k(H))},[P,v,u,k]),{ref:B,target:T}=yQ({dropZoneElement:o,expandedState:S,setExpandedState:w}),A=(0,Jt.useRef)(),L=wQ({selectBlock:R}),U=(0,wg.useMergeRefs)([L,A,B,f]);(0,Jt.useEffect)(()=>{g?.length&&vg(g[0],A?.current)},[]);let G=(0,Jt.useCallback)(W=>{if(!W)return;let H=Array.isArray(W)?W:[W];w({type:"expand",clientIds:H})},[w]),j=(0,Jt.useCallback)(W=>{W&&w({type:"collapse",clientIds:[W]})},[w]),N=(0,Jt.useCallback)(()=>{w({type:"clear"})},[w]),F=(0,Jt.useCallback)(W=>{G(W?.dataset?.block)},[G]),K=(0,Jt.useCallback)(W=>{j(W?.dataset?.block)},[j]),Z=(0,Jt.useCallback)((W,H,oe)=>{W.shiftKey&&v(W,H?.dataset?.block,oe?.dataset?.block)},[v]);gQ({collapseAll:N,expand:G});let Q=h?.[0],{blockDropTargetIndex:J,blockDropPosition:ee,firstDraggedBlockIndex:ie}=(0,Jt.useMemo)(()=>{let W,H;if(T?.clientId){let oe=b[T.clientId];W=oe===void 0||T?.dropPosition==="top"?oe:oe+1}else T===null&&(W=null);if(Q){let oe=b[Q];H=oe===void 0||T?.dropPosition==="top"?oe:oe+1}return{blockDropTargetIndex:W,blockDropPosition:T?.dropPosition,firstDraggedBlockIndex:H}},[T,b,Q]),de=(0,Jt.useMemo)(()=>({blockDropPosition:ee,blockDropTargetIndex:J,blockIndexes:b,draggedClientIds:h,expandedState:S,expand:G,firstDraggedBlockIndex:ie,collapse:j,collapseAll:N,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:C,setInsertedBlock:E,treeGridElementRef:A,rootClientId:a}),[ee,J,b,h,S,G,ie,j,N,s,m,d,C,E,a]),[X]=(0,wg.__experimentalUseFixedWindowList)(A,CQ,y,{expandedState:S,useWindowing:!0,windowOverscan:40});if(!p.length&&!i)return null;let re=c&&`block-editor-list-view-description-$m}`;return(0,$l.jsxs)(e_.AsyncModeProvider,{value:!0,children:[(0,$l.jsx)(iQ,{draggedBlockClientId:Q,listViewRef:A,blockDropTarget:T}),c&&(0,$l.jsx)(KE.VisuallyHidden,{id:re,children:c}),(0,$l.jsx)(KE.__experimentalTreeGrid,{id:e,className:V("block-editor-list-view-tree",{"is-dragging":h?.length>0&&J!==void 0}),"aria-label":(0,j5.__)("Block navigation structure"),ref:U,onCollapseRow:K,onExpandRow:F,onFocusRow:Z,applicationAriaLabel:(0,j5.__)("Block navigation structure"),"aria-describedby":re,style:{"--wp-admin--list-view-dragged-items-height":h?.length?`$CQ*(h.length-1)}px`:null},children:(0,$l.jsx)(AE.Provider,{value:de,children:(0,$l.jsx)(nQ,{blocks:p,parentId:a,selectBlock:R,showBlockMovers:r,fixedListWindow:X,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var U5=(0,Jt.forwardRef)(EQ),qE=(0,Jt.forwardRef)((e,t)=>(0,$l.jsx)(U5,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var $u=l(x());function pCe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,$u.jsx)(YE.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:Ck,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,H5.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function hCe({isDisabled:e,...t},o){(0,TQ.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,IQ.useSelect)(i=>!!i(_).getBlockCount(),[])&&!e;return(0,$u.jsx)(YE.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,$u.jsx)(pCe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,$u.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,$u.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,H5.__)("List view")}),(0,$u.jsx)(qE,{})]})})}var OQ=(0,PQ.forwardRef)(hCe);var NQ=l(I()),ZE=l(Y()),Cg=l(O());var RQ=l(I());var AQ=l(x());function LQ({genericPreviewBlock:e,style:t,className:o,activeStyle:r}){let n=rg(o,r,t),i=(0,RQ.useMemo)(()=>({name:e.name,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:n+" block-editor-block-styles__block-preview-container"},example:e}),[e,t,n]);return(0,AQ.jsx)(a1,{item:i})}var Kl=l(x()),MQ=()=>{};function gCe({clientId:e,onSwitch:t=MQ,onHoverClassName:o=MQ}){let{onSelect:r,stylesToRender:n,activeStyle:i,genericPreviewBlock:s,className:a}=ng({clientId:e,onSwitch:t}),[c,u]=(0,NQ.useState)(null),d=(0,ZE.useViewportMatch)("medium","<");if(!n||n.length===0)return null;let f=(0,ZE.debounce)(u,250),m=h=>{r(h),o(null),u(null),f.cancel()},p=h=>{if(c===h){f.cancel();return}f(h),o(h?.name??null)};return(0,Kl.jsxs)("div",{className:"block-editor-block-styles",children:[(0,Kl.jsx)("div",{className:"block-editor-block-styles__variants",children:n.map(h=>{let g=h.label||h.name;return(0,Kl.jsx)(Cg.Button,{__next40pxDefaultSize:!0,className:V("block-editor-block-styles__item",{"is-active":i.name===h.name}),variant:"secondary",label:g,onMouseEnter:()=>p(h),onFocus:()=>p(h),onMouseLeave:()=>p(null),onBlur:()=>p(null),onClick:()=>m(h),"aria-current":i.name===h.name,children:(0,Kl.jsx)(Cg.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:g})},h.name)})}),c&&!d&&(0,Kl.jsx)(Cg.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,Kl.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>p(null),children:(0,Kl.jsx)(LQ,{activeStyle:i,className:a,genericPreviewBlock:s,style:c})})})]})}var Bg=gCe;var jQ=l(O()),Eg=l(M());var VQ=l(O()),FQ=l(x()),DQ={0:gA,1:wR,2:BR,3:TR,4:PR,5:RR,6:LR};function G5({level:e}){return DQ[e]?(0,FQ.jsx)(VQ.Icon,{icon:DQ[e]}):null}var XE=l(x()),zQ=[1,2,3,4,5,6],bCe={className:"block-library-heading-level-dropdown"};function UQ({options:e=zQ,value:t,onChange:o}){let r=e.filter(n=>n===0||zQ.includes(n)).sort((n,i)=>n-i);return(0,XE.jsx)(jQ.ToolbarDropdownMenu,{popoverProps:bCe,icon:(0,XE.jsx)(G5,{level:t}),label:(0,Eg.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,XE.jsx)(G5,{level:n}),title:n===0?(0,Eg.__)("Paragraph"):(0,Eg.sprintf)((0,Eg.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var t_=l(M()),o_=l(O());var ql=l(x());function kCe({icon:e=rA,label:t=(0,t_.__)("Choose variation"),instructions:o=(0,t_.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=V("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,ql.jsxs)(o_.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,ql.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,t_.__)("Block variations"),children:r.map(a=>(0,ql.jsxs)("li",{children:[(0,ql.jsx)(o_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:a.icon&&a.icon.src?a.icon.src:a.icon,iconSize:48,onClick:()=>n(a),className:"block-editor-block-variation-picker__variation",label:a.description||a.title}),(0,ql.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,ql.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,ql.jsx)(o_.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,t_.__)("Skip")})})]})}var HQ=kCe;var KQ=l(D()),qQ=l($()),Ig=l(O()),W5=l(I()),$5=l(Y()),YQ=l(M());var Yl=l(M()),Tg=l(O());var Ku={carousel:"carousel",grid:"grid"};var Fn=l(x()),vCe=({onBlockPatternSelect:e})=>(0,Fn.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,Fn.jsx)(Tg.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,Yl.__)("Choose")})}),yCe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,Fn.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,Fn.jsx)(Tg.Button,{size:"compact",icon:(0,Yl.isRTL)()?Qo:Cr,label:(0,Yl.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,Fn.jsx)(Tg.Button,{size:"compact",icon:(0,Yl.isRTL)()?Cr:Qo,label:(0,Yl.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),_Ce=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===Ku.carousel,c=(0,Fn.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,Fn.jsx)(Tg.Button,{size:"compact",icon:jk,label:(0,Yl.__)("Carousel view"),onClick:()=>t(Ku.carousel),isPressed:a}),(0,Fn.jsx)(Tg.Button,{size:"compact",icon:Sk,label:(0,Yl.__)("Grid view"),onClick:()=>t(Ku.grid),isPressed:e===Ku.grid})]});return(0,Fn.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,Fn.jsx)(yCe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,Fn.jsx)(vCe,{onBlockPatternSelect:s})]})},GQ=_Ce;var WQ=l(D());function SCe(e,t,o){return(0,WQ.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(_),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var $Q=SCe;var Ot=l(x()),xCe=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===Ku.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,Ot.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,Ot.jsx)("div",{className:i,children:(0,Ot.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,Ot.jsx)(XQ,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,Ot.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,Ot.jsx)(Ig.Composite,{role:"listbox",className:i,"aria-label":(0,YQ.__)("Patterns list"),children:o.map(s=>(0,Ot.jsx)(ZQ,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function ZQ({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,$5.useInstanceId)(ZQ,`$r}__item-description`);return(0,Ot.jsx)("div",{className:`$r}__list-item`,children:(0,Ot.jsxs)(Ig.Composite.Item,{render:(0,Ot.jsx)("div",{"aria-describedby":i?a:void 0,"aria-label":e.title,className:`$r}__item`}),id:`$r}__pattern__$e.name}`,role:"option",onClick:()=>t(n),children:[(0,Ot.jsx)(nn,{blocks:n,viewportWidth:s}),o&&(0,Ot.jsx)("div",{className:`$r}__item-title`,children:e.title}),!!i&&(0,Ot.jsx)(Ig.VisuallyHidden,{id:a,children:i})]})})}function XQ({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,$5.useInstanceId)(XQ,"block-editor-block-pattern-setup-list__item-description");return(0,Ot.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide $t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,Ot.jsx)(nn,{blocks:n,minHeight:r}),!!s&&(0,Ot.jsx)(Ig.VisuallyHidden,{id:a,children:s})]})}var wCe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=Ku.carousel,showTitles:i=!1})=>{let[s,a]=(0,W5.useState)(n),[c,u]=(0,W5.useState)(0),{replaceBlock:d}=(0,KQ.useDispatch)(_),f=$Q(e,t,o);if(!f?.length)return null;let p=r||(h=>{let g=h.map(b=>(0,qQ.cloneBlock)(b));d(e,g)});return(0,Ot.jsx)(Ot.Fragment,{children:(0,Ot.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-$s}`,children:[(0,Ot.jsx)(xCe,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:p,showTitles:i}),(0,Ot.jsx)(GQ,{viewMode:s,setViewMode:a,activeSlide:c,totalSlides:f.length,handleNext:()=>{u(h=>Math.min(h+1,f.length-1))},handlePrevious:()=>{u(h=>Math.max(h-1,0))},onBlockPatternSelect:()=>{p(f[c].blocks)}})]})})},QQ=wCe;var K5=l($()),Zl=l(M()),ks=l(O()),QE=l(D()),JQ=l(I());var So=l(x()),{Menu:cm}=z(ks.privateApis);function CCe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,So.jsxs)("fieldset",{className:e,children:[(0,So.jsx)(ks.VisuallyHidden,{as:"legend",children:(0,Zl.__)("Transform to variation")}),r.map(n=>(0,So.jsx)(ks.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,So.jsx)(Pe,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,Zl.sprintf)((0,Zl.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function BCe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,So.jsx)("div",{className:e,children:(0,So.jsxs)(cm,{children:[(0,So.jsx)(cm.TriggerButton,{render:(0,So.jsx)(ks.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,Zl.__)("Transform to variation")})}),(0,So.jsx)(cm.Popover,{position:"bottom",children:(0,So.jsx)(cm.Group,{children:r.map(n=>(0,So.jsxs)(cm.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,So.jsx)(cm.ItemLabel,{children:n.title}),n.description&&(0,So.jsx)(cm.ItemHelpText,{children:n.description})]},n.name))})})]})})}function ECe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,So.jsx)("div",{className:e,children:(0,So.jsx)(ks.__experimentalToggleGroupControl,{label:(0,Zl.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,So.jsx)(ks.__experimentalToggleGroupControlOptionIcon,{icon:(0,So.jsx)(Pe,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,Zl.sprintf)((0,Zl.__)("Transform to %s"),n.title)},n.name))})})}function TCe({blockClientId:e}){let{updateBlockAttributes:t}=(0,QE.useDispatch)(_),{activeBlockVariation:o,variations:r,isContentOnly:n,isSection:i}=(0,QE.useSelect)(h=>{let{getActiveBlockVariation:g,getBlockVariations:b}=h(K5.store),{getBlockName:k,getBlockAttributes:y,getBlockEditingMode:v,isSectionBlock:S}=z(h(_)),w=e&&k(e),{hasContentRoleAttribute:C}=z(h(K5.store)),E=C(w);return{activeBlockVariation:g(w,y(e),"transform"),variations:w&&b(w,"transform"),isContentOnly:v(e)==="contentOnly"&&!E,isSection:S(e)}},[e]),s=o?.name,a=(0,JQ.useMemo)(()=>{let h=new Set;return r?(r.forEach(g=>{g.icon&&h.add(g.icon?.src||g.icon)}),h.size===r.length):!1},[r]),c=h=>{t(e,{...r.find(({name:g})=>g===h).attributes})},u=window?.__experimentalContentOnlyPatternInsertion&&i;if(!r?.length||n||u)return null;let d="block-editor-block-variation-transforms",m=r.length>5?CCe:ECe;return(0,So.jsx)(a?m:BCe,{className:d,onSelectVariation:c,selectedValue:s,variations:r})}var JE=TCe;var um=l(M()),eT=l(O());var eJ=l(x()),q5={top:{icon:eA,title:(0,um._x)("Align top","Block vertical alignment setting")},center:{icon:HR,title:(0,um._x)("Align middle","Block vertical alignment setting")},bottom:{icon:jR,title:(0,um._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:XR,title:(0,um._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:qR,title:(0,um._x)("Space between","Block vertical alignment setting")}},ICe=["top","center","bottom"],PCe="top";function OCe({value:e,onChange:t,controls:o=ICe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=q5[e],a=q5[PCe],c=n?eT.ToolbarGroup:eT.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,eJ.jsx)(c,{icon:s?s.icon:a.icon,label:(0,um._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...q5[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var Y5=OCe;var Z5=l(x()),aw=e=>(0,Z5.jsx)(Y5,{...e,isToolbar:!1}),tJ=e=>(0,Z5.jsx)(Y5,{...e,isToolbar:!0});var fn=l(O()),r_=l(I()),rT=l(M());var oJ=l(O());var X5=l(M()),rJ=l(x());function nJ({isLinked:e,...t}){let o=e?(0,X5.__)("Unlink radii"):(0,X5.__)("Link radii");return(0,rJ.jsx)(oJ.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?Xr:ei,iconSize:24,label:o})}var iJ=l(O());function RCe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function sJ(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,iJ.__experimentalParseQuantityAndUnitFromRawValue)(a);return typeof a=="string"&&c[0]===void 0?[a,""]:c}),o=t.map(a=>a[0]??""),r=t.map(a=>a[1]),n=o.every(a=>a===o[0])?o[0]:"",i=RCe(r);return n===0||n?`$n}$i||""}`:void 0}function aJ(e={}){if(typeof e=="string"||!e||typeof e!="object")return!1;let t=Object.values(e);if(t.length===0)return!1;let o=t[0];return!t.every(n=>n===o)}function lJ(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var Ci=l(O()),pJ=l(Y()),Yu=l(M());var dm=l(I());var Q5=24,cJ=8,tT={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rem:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};var qu=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|$t}|`):!1;function uJ(e,t){if(!e)return;if(e==="0"||e==="default")return e;let o=e.match(new RegExp(`var:preset\\|$t}\\|(.+)`));return o?o[1]:void 0}function dJ(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":uJ(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function J5(e,t,o){if(!qu(e,o))return e;let r=parseFloat(e,10)===0?"0":uJ(e,o);return t.find(i=>String(i.slug)===r)?.size}function fJ(e,t,o){if(!e||qu(e,o)||e==="0")return e;let r=t.find(n=>String(n.size)===String(e));return r?.slug?`var:preset|$o}|$r.slug}`:e}var Pg=l(O()),Xl=l(x());function mJ({allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:o,minValue:r,parsedQuantity:n,computedUnit:i,units:s,isMixed:a,step:c,max:u,showTooltip:d,value:f,minimumCustomValue:m,onCustomValueChange:p,onCustomValueSliderChange:h,onUnitChange:g,onMouseOut:b,onMouseOver:k,setMinValue:y}){let v=(0,Xl.jsx)(Pg.__experimentalUnitControl,{className:"preset-input-control__unit-control",disableUnits:a,hideLabelFromVision:!0,label:t,min:r,onChange:p,onUnitChange:g,onBlur:b,onFocus:k,onMouseOut:b,onMouseOver:k,size:"__unstable-large",units:s,value:[n,i].join(""),placeholder:o,onDragStart:()=>{e&&f?.charAt(0)==="-"&&y(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&y(0)},onDragEnd:()=>{e&&y(m)}});return(0,Xl.jsxs)(Xl.Fragment,{children:[d?(0,Xl.jsx)(Pg.Tooltip,{text:t,placement:"top",children:(0,Xl.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:v})}):v,(0,Xl.jsx)(Pg.RangeControl,{className:"preset-input-control__custom-value-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:u,min:0,onBlur:b,onChange:h,onFocus:k,onMouseOut:b,onMouseOver:k,step:c,value:n,withInputField:!1,__next40pxDefaultSize:!0})]})}var Zu=l(x());function fm({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=tT,disableCustomValues:n,icon:i,isMixed:s,value:a,minimumCustomValue:c,onChange:u,onMouseOut:d,onMouseOver:f,onUnitChange:m,presets:p=[],presetType:h,selectedUnit:g,showTooltip:b,units:k}){let y=(0,dm.useMemo)(()=>fJ(a,p,h),[a,p,h]),v=o??"preset-input-control",S=p.slice(1,p.length-1).map((W,H)=>({value:H+1,label:void 0})),w=S.length>0,C=p.length<=cJ,E=s?(0,Yu.__)("Mixed"):null,[P,R]=(0,dm.useState)(c),[B,T]=(0,dm.useState)(!n&&y!==void 0&&!qu(y,h)),A=null,L=(0,pJ.usePrevious)(y);(0,dm.useEffect)(()=>{y&&L!==y&&!qu(y,h)&&B!==!0&&T(!0)},[y,L,h,B]);let U=!C&&!B&&y!==void 0&&(!qu(y,h)||qu(y,h)&&s),G=p;U?(G=[...p,{name:s?(0,Yu.__)("Mixed"):(0,Yu.sprintf)((0,Yu.__)("Custom (%s)"),y),slug:"custom",size:y}],A=G.length-1):s||(A=B?J5(y,p,h):dJ(y,p,h));let j=G.map((W,H)=>({key:H,name:W.name})),N=qu(y,h)?J5(y,p,h):y,[F,K]=(0,Ci.__experimentalParseQuantityAndUnitFromRawValue)(N),Z=K||g||"px",Q=k?.find(W=>W.value===Z),J=Q?.step??r[Z]?.steps??.1,ee=Q?.max??r[Z]?.max??10,ie=W=>{let oe=!isNaN(parseFloat(W))?W:void 0;oe!==void 0&&u(oe)},de=W=>{u([W,Z].join(""))},X=W=>y===void 0?void 0:p[W]?.name,re=(W,H)=>{let oe=parseInt(W,10);if(H==="selectList"){if(oe===0&&p[0]?.slug==="0")return"0";if(oe===0)return}else if(oe===0)return"0";return`var:preset|$h}|$p[W]?.slug}`};return(0,Zu.jsxs)(Ci.__experimentalHStack,{className:`preset-input-control__wrapper $v}__wrapper`,children:[i&&(0,Zu.jsx)(Ci.Icon,{className:"preset-input-control__icon",icon:i,size:Q5}),(!w||B)&&(0,Zu.jsx)(mJ,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:E,minValue:P,parsedQuantity:F,computedUnit:Z,units:k,isMixed:s,step:J,max:ee,showTooltip:b,value:y,minimumCustomValue:c,onCustomValueChange:ie,onCustomValueSliderChange:de,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:R}),w&&C&&!B&&(0,Zu.jsx)(Ci.RangeControl,{"aria-valuenow":A,"aria-valuetext":p[A]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:p.length-1,marks:S,min:0,onBlur:d,onChange:W=>u(re(W)),onFocus:f,onMouseDown:W=>{W?.nativeEvent?.offsetX<35&&y===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:X,step:1,value:A,withInputField:!1,__next40pxDefaultSize:!0}),w&&!C&&!B&&(0,Zu.jsx)(Ci.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:W=>{U&&W.selectedItem.key===j.length-1?T(!0):u(re(W.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:j,size:"__unstable-large",value:j.find(W=>W.key===A)||""}),w&&!n&&(0,Zu.jsx)(Ci.Button,{className:"preset-input-control__custom-toggle",icon:jA,iconSize:Q5,isPressed:B,label:B?(0,Yu.__)("Use preset"):(0,Yu.__)("Set custom value"),onClick:()=>{T(!B)},size:"small"})]})}var Og=l(M());var hJ=8,oT=[],eV={all:(0,Og.__)("Border radius"),topLeft:(0,Og.__)("Top left"),topRight:(0,Og.__)("Top right"),bottomLeft:(0,Og.__)("Bottom left"),bottomRight:(0,Og.__)("Bottom right")},tV={all:qO,topLeft:XO,topRight:QO,bottomLeft:YO,bottomRight:ZO},oV=0;var Ql=l(x());function ACe(e){let t=e?.default??oT,o=e?.custom??oT,r=e?.theme??oT;return(0,r_.useMemo)(()=>{let n=[{name:(0,rT.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>hJ?[{name:(0,rT.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function gJ(e,t){return t==="all"?sJ(e):typeof e=="string"?e:e?.[t]}function bJ(e,t){return t==="all"?e.flat:e[t]}function kJ(e,t,o){return r=>{o(e==="all"?{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r}:{...typeof t!="string"?t||{}:{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t},[e]:r})}}function vJ(e,t,o){return r=>{let n={...t};e==="all"?(n.flat=r,n.topLeft=r,n.topRight=r,n.bottomLeft=r,n.bottomRight=r):n[e]=r,o(n)}}function nT({onChange:e,values:t,presets:o}){let[r,n]=(0,r_.useState)(!lJ(t)||!aJ(t)),i=ACe(o),[s,a]=(0,r_.useState)({flat:typeof t=="string"?(0,fn.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,fn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,fn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,fn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,fn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=fe("spacing.units"),u=(0,fn.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,Ql.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,Ql.jsxs)(fn.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,Ql.jsx)(fn.BaseControl.VisualLabel,{as:"legend",children:(0,rT.__)("Radius")}),(0,Ql.jsx)(nJ,{onClick:d,isLinked:r})]}),r?(0,Ql.jsx)(fm,{ariaLabel:eV.all,className:"components-border-radius-control",icon:tV.all,minimumCustomValue:oV,onChange:kJ("all",t,e),onUnitChange:vJ("all",s,a),presets:i,presetType:"border-radius",selectedUnit:bJ(s,"all"),showTooltip:!0,units:u,value:gJ(t,"all")}):(0,Ql.jsx)(fn.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,Ql.jsx)(fm,{ariaLabel:eV[f],className:"components-border-radius-control",icon:tV[f],minimumCustomValue:oV,onChange:kJ(f,t,e),onUnitChange:vJ(f,s,a),presets:i,presetType:"border-radius",selectedUnit:bJ(s,f),showTooltip:!0,units:u,value:gJ(t,f)},f))})]})}var SJ=l(O());var yJ=l(Y());var _J=l(x()),iT=(0,yJ.createHigherOrderComponent)(e=>t=>{let[o,r,n,i,s]=fe("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),a=s?[...r||[],...o||[],...n||[]]:[...r||[],...n||[]],{colors:c=a,disableCustomColors:u=!i}=t,d=c&&c.length>0||!u;return(0,_J.jsx)(e,{...t,colors:c,disableCustomColors:u,hasColorsToChoose:d})},"withColorContext");var xJ=iT(SJ.ColorPalette);var rV=l(M()),vs=l(O());var fo=l(x()),{Tabs:Rg}=z(vs.privateApis),LCe=["colors","disableCustomColors","gradients","disableCustomGradients"],ma={color:"color",gradient:"gradient"};function wJ({colors:e,gradients:t,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,className:i,label:s,onColorChange:a,onGradientChange:c,colorValue:u,gradientValue:d,clearable:f,showTitle:m=!0,enableAlpha:p,headingLevel:h}){let g=a&&(e&&e.length>0||!o),b=c&&(t&&t.length>0||!r);if(!g&&!b)return null;let k={[ma.color]:(0,fo.jsx)(vs.ColorPalette,{value:u,onChange:b?v=>{a(v),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:p,headingLevel:h}),[ma.gradient]:(0,fo.jsx)(vs.GradientPicker,{value:d,onChange:g?v=>{c(v),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:h})},y=v=>(0,fo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:k[v]});return(0,fo.jsx)(vs.BaseControl,{className:V("block-editor-color-gradient-control",i),children:(0,fo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,fo.jsxs)(vs.__experimentalVStack,{spacing:1,children:[m&&(0,fo.jsx)("legend",{children:(0,fo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,fo.jsx)(vs.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,fo.jsx)("div",{children:(0,fo.jsxs)(Rg,{defaultTabId:d?ma.gradient:!!g&&ma.color,children:[(0,fo.jsxs)(Rg.TabList,{children:[(0,fo.jsx)(Rg.Tab,{tabId:ma.color,children:(0,rV.__)("Color")}),(0,fo.jsx)(Rg.Tab,{tabId:ma.gradient,children:(0,rV.__)("Gradient")})]}),(0,fo.jsx)(Rg.TabPanel,{tabId:ma.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.color}),(0,fo.jsx)(Rg.TabPanel,{tabId:ma.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.gradient})]})}),!b&&y(ma.color),!g&&y(ma.gradient)]})})})}function MCe(e){let[t,o,r,n]=fe("color.palette","color.gradients","color.custom","color.customGradient");return(0,fo.jsx)(wJ,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function NCe(e){return LCe.every(t=>e.hasOwnProperty(t))?(0,fo.jsx)(wJ,{...e}):(0,fo.jsx)(MCe,{...e})}var Xu=NCe;var CJ=l(x());function BJ({onChange:e,value:t,...o}){return(0,CJ.jsx)(Xu,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var ys=l(M()),EJ=l(O()),TJ=l(Fo()),nV=l(x());wc([Cc,ap]);function DCe({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:o,fallbackLinkColor:r,fontSize:n,isLargeText:i,textColor:s,linkColor:a,enableAlphaChecker:c=!1}){let u=e||t;if(!u)return null;let d=s||o,f=a||r;if(!d&&!f)return null;let m=[{color:d,description:(0,ys.__)("text color")},{color:f,description:(0,ys.__)("link color")}],p=ft(u),h=p.alpha()<1,g=p.brightness(),b={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},k="",y="";for(let v of m){if(!v.color)continue;let S=ft(v.color),w=S.isReadable(p,b),C=S.alpha()<1;if(!w){if(h||C)continue;k=g<S.brightness()?(0,ys.sprintf)((0,ys.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),v.description):(0,ys.sprintf)((0,ys.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),v.description),y=(0,ys.__)("This color combination may be hard for people to read.");break}C&&c&&(k=(0,ys.__)("Transparent text may be hard for people to read."),y=(0,ys.__)("Transparent text may be hard for people to read."))}return k?((0,TJ.speak)(y),(0,nV.jsx)("div",{className:"block-editor-contrast-checker",children:(0,nV.jsx)(EJ.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:k})})):null}var sT=DCe;var ir=l(M()),n_=l(Qu()),aT=l(I()),zn=l(O()),pa=l(x()),Ju=new Date;Ju.setDate(20);Ju.setMonth(Ju.getMonth()-3);Ju.getMonth()===4&&Ju.setMonth(3);function PJ({format:e,defaultFormat:t,onChange:o}){return(0,pa.jsxs)(zn.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,pa.jsx)(zn.VisuallyHidden,{as:"legend",children:(0,ir.__)("Date format")}),(0,pa.jsx)(zn.ToggleControl,{label:(0,ir.__)("Default format"),help:`${(0,ir.__)("Example:")} ${(0,n_.dateI18n)(t,Ju)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,pa.jsx)(VCe,{format:e,onChange:o})]})}function VCe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,ir._x)("n/j/Y","short date format"),(0,ir._x)("n/j/Y g:i A","short date format with time"),(0,ir._x)("M j, Y","medium date format"),(0,ir._x)("M j, Y g:i A","medium date format with time"),(0,ir._x)("F j, Y","long date format"),(0,ir._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-$c}`,name:(0,n_.dateI18n)(a,Ju),format:a})),{key:"human-diff",name:(0,n_.humanTimeDiff)(Ju),format:"human-diff"}],n={key:"custom",name:(0,ir.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,ir.__)("Enter your own date format")},[i,s]=(0,aT.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,pa.jsxs)(zn.__experimentalVStack,{children:[(0,pa.jsx)(zn.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,ir.__)("Choose a format"),options:[...r,n],value:i?n:r.find(a=>a.format===e)??n,onChange:({selectedItem:a})=>{a===n?s(!0):(s(!1),t(a.format))}}),i&&(0,pa.jsx)(zn.TextControl,{__next40pxDefaultSize:!0,label:(0,ir.__)("Custom format"),hideLabelFromVision:!0,help:(0,aT.createInterpolateElement)((0,ir.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,pa.jsx)(zn.ExternalLink,{href:(0,ir.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var Bi=l(O()),i_=l(M()),OJ=l(st());var RJ=l(Y()),ha=l(x());function AJ({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,ha.jsx)(Bi.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,ha.jsx)(Bi.DuotoneSwatch,{values:i}):a=(0,ha.jsx)(Te,{icon:lR});let c=(0,i_.__)("Apply duotone filter"),d=`${(0,RJ.useInstanceId)(AJ,"duotone-control",e)}__description`;return(0,ha.jsx)(Bi.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,i_.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,ha.jsx)(Bi.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:h=>{!f&&h.keyCode===OJ.DOWN&&(h.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,ha.jsxs)(Bi.MenuGroup,{label:(0,i_.__)("Duotone"),children:[(0,ha.jsx)("p",{children:(0,i_.__)("Create a two-tone color effect without losing your original image.")}),(0,ha.jsx)(Bi.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var lT=AJ;var DJ=l(O()),VJ=l(Oe()),FJ=l(I()),jn=l(M());var $o=l(M());var cT=l(M());function LJ(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,cT._x)("Regular","font style");break;case"italic":t=(0,cT._x)("Italic","font style");break;case"oblique":t=(0,cT._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var _s=l(M());function iV(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,_s._x)("Regular","font weight");break;case"bold":case"700":t=(0,_s._x)("Bold","font weight");break;case"100":t=(0,_s._x)("Thin","font weight");break;case"200":t=(0,_s._x)("Extra Light","font weight");break;case"300":t=(0,_s._x)("Light","font weight");break;case"500":t=(0,_s._x)("Medium","font weight");break;case"600":t=(0,_s._x)("Semi Bold","font weight");break;case"800":t=(0,_s._x)("Extra Bold","font weight");break;case"900":t=(0,_s._x)("Black","font weight");break;case"1000":t=(0,_s._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var MJ=[{name:(0,$o._x)("Regular","font style"),value:"normal"},{name:(0,$o._x)("Italic","font style"),value:"italic"}],NJ=[{name:(0,$o._x)("Thin","font weight"),value:"100"},{name:(0,$o._x)("Extra Light","font weight"),value:"200"},{name:(0,$o._x)("Light","font weight"),value:"300"},{name:(0,$o._x)("Regular","font weight"),value:"400"},{name:(0,$o._x)("Medium","font weight"),value:"500"},{name:(0,$o._x)("Semi Bold","font weight"),value:"600"},{name:(0,$o._x)("Bold","font weight"),value:"700"},{name:(0,$o._x)("Extra Bold","font weight"),value:"800"},{name:(0,$o._x)("Black","font weight"),value:"900"},{name:(0,$o._x)("Extra Black","font weight"),value:"1000"}];function Ag(e){let t=[],o=[],r=[],n=!e||e?.length===0,i=!1;return e?.forEach(s=>{if(typeof s.fontWeight=="string"&&/\s/.test(s.fontWeight.trim())){i=!0;let[u,d]=s.fontWeight.split(" ");u=parseInt(u.slice(0,1)),d==="1000"?d=10:d=parseInt(d.slice(0,1));for(let f=u;f<=d;f++){let m=`$f.toString()}00`;o.some(p=>p.value===m)||o.push(iV(m))}}let a=iV(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=LJ(s.fontStyle);c&&Object.keys(c).length&&(t.some(u=>u.value===c.value)||t.push(c)),a&&Object.keys(a).length&&(o.some(u=>u.value===a.value)||i||o.push(a))}),o.some(s=>s.value>="600")||o.push({name:(0,$o._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,$o._x)("Italic","font style"),value:"italic"}),n&&(t=MJ,o=NJ),t=t.length===0?MJ:t,o=o.length===0?NJ:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,$o.sprintf)((0,$o._x)("%1$s %2$s","font"),c,s);r.push({key:`$a}-$u}`,name:d,style:{fontStyle:a,fontWeight:u}})})}),{fontStyles:t,fontWeights:o,combinedStyleAndWeightOptions:r,isSystemFont:n,isVariableFont:i}}var zJ=l(x()),FCe=(e,t)=>e?t?(0,jn.__)("Appearance"):(0,jn.__)("Font style"):(0,jn.__)("Font weight");function uT(e){let{__next40pxDefaultSize:t=!1,onChange:o,hasFontStyles:r=!0,hasFontWeights:n=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:a},...c}=e,u=r||n,d=FCe(r,n),f={key:"default",name:(0,jn.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:p,combinedStyleAndWeightOptions:h}=Ag(i),g=()=>{let w=[f];return h&&w.push(...h),w},b=()=>{let w=[f];return m.forEach(({name:C,value:E})=>{w.push({key:E,name:C,style:{fontStyle:E,fontWeight:void 0}})}),w},k=()=>{let w=[f];return p.forEach(({name:C,value:E})=>{w.push({key:E,name:C,style:{fontStyle:void 0,fontWeight:E}})}),w},y=(0,FJ.useMemo)(()=>r&&n?g():r?b():k(),[e.options,m,p,h]),v=y.find(w=>w.style.fontStyle===s&&w.style.fontWeight===a)||y[0],S=()=>v?r?n?(0,jn.sprintf)((0,jn.__)("Currently selected font appearance: %s"),v.name):(0,jn.sprintf)((0,jn.__)("Currently selected font style: %s"),v.name):(0,jn.sprintf)((0,jn.__)("Currently selected font weight: %s"),v.name):(0,jn.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,VJ.default)("36px default size for wp.blockEditor.__experimentalFontAppearanceControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),u&&(0,zJ.jsx)(DJ.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:S(),options:y,value:v,onChange:({selectedItem:w})=>o(w.style)})}var jJ=l(O()),UJ=l(Oe()),sV=l(M());var HJ=l(x());function dT({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=fe("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,sV.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,UJ.default)("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});let c=a.find(u=>u.key===t)??"";return(0,HJ.jsx)(jJ.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,sV.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:V("block-editor-font-family-control",n),...i})}var fT=l(O()),GJ=l(Oe()),WJ=l(M());var $J=l(x());function mT({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=fe("spacing.units"),s=(0,fT.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,GJ.default)("36px default size for wp.blockEditor.__experimentalLetterSpacingControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,$J.jsx)(fT.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,WJ.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var s_=l(M()),pT=l(O()),aV=l(x()),zCe=[{label:(0,s_.__)("None"),value:"none",icon:Br},{label:(0,s_.__)("Underline"),value:"underline",icon:gR},{label:(0,s_.__)("Strikethrough"),value:"line-through",icon:pR}];function hT({value:e,onChange:t,className:o}){return(0,aV.jsx)(pT.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,s_.__)("Decoration"),className:V("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:zCe.map(r=>(0,aV.jsx)(pT.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Lg=l(M());var gT=l(O()),lV=l(x()),jCe=[{label:(0,Lg.__)("None"),value:"none",icon:Br},{label:(0,Lg.__)("Uppercase"),value:"uppercase",icon:kR},{label:(0,Lg.__)("Lowercase"),value:"lowercase",icon:fR},{label:(0,Lg.__)("Capitalize"),value:"capitalize",icon:uR}];function bT({className:e,value:t,onChange:o}){return(0,lV.jsx)(gT.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Lg.__)("Letter case"),className:V("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:jCe.map(r=>(0,lV.jsx)(gT.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Mg=l(M());var kT=l(O()),cV=l(x()),UCe=[{label:(0,Mg.__)("Horizontal"),value:"horizontal-tb",icon:aL},{label:(0,Mg.__)("Vertical"),value:(0,Mg.isRTL)()?"vertical-lr":"vertical-rl",icon:cL}];function vT({className:e,value:t,onChange:o}){return(0,cV.jsx)(kT.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Mg.__)("Orientation"),className:V("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:UCe.map(r=>(0,cV.jsx)(kT.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Dr=l(O()),KJ=l(I()),qJ=l(M());var To=l(x()),HCe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,To.jsx)(Dr.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:n,isShownByDefault:e.isShownByDefault!==void 0?e.isShownByDefault:!0,...r,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:o,resetAllFilter:e.resetAllFilter,children:t})},GCe=({colorValue:e,label:t})=>(0,To.jsxs)(Dr.__experimentalHStack,{justify:"flex-start",children:[(0,To.jsx)(Dr.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,To.jsx)(Dr.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),WCe=e=>({onToggle:t,isOpen:o})=>{let{clearable:r,colorValue:n,gradientValue:i,onColorChange:s,onGradientChange:a,label:c}=e,u=(0,KJ.useRef)(void 0),d={onClick:t,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":o}),"aria-expanded":o,ref:u},f=()=>{n?s():i&&a()},m=n??i;return(0,To.jsxs)(To.Fragment,{children:[(0,To.jsx)(Dr.Button,{__next40pxDefaultSize:!0,...d,children:(0,To.jsx)(GCe,{colorValue:m,label:c})}),r&&m&&(0,To.jsx)(Dr.Button,{__next40pxDefaultSize:!0,label:(0,qJ.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Br,onClick:()=>{f(),o&&t(),u.current?.focus()}})]})};function yT({colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradients:n,settings:i,__experimentalIsRenderedInSidebar:s,...a}){let c;return s&&(c={placement:"left-start",offset:36,shift:!0}),(0,To.jsx)(To.Fragment,{children:i.map((u,d)=>{let f={clearable:!1,colorValue:u.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradientValue:u.gradientValue,gradients:n,label:u.label,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...u},m={clearable:u.clearable,label:u.label,colorValue:u.colorValue,gradientValue:u.gradientValue,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange};return u&&(0,To.jsx)(HCe,{setting:u,...a,children:(0,To.jsx)(Dr.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:WCe(m),renderContent:()=>(0,To.jsx)(Dr.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,To.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,To.jsx)(Xu,{...f})})})})},d)})})}var _T=l(O()),YJ=l(D()),ZJ=l(Y());var uV=l(I()),mm=l(M());function ed(){let[e,t,o,r,n,i,s,a,c,u]=fe("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!i};return d.colors=(0,uV.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,mm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,mm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,mm._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,uV.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,mm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,mm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,mm._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),f},[s,a,c,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}var Ss=l(x()),$Ce=["colors","disableCustomColors","gradients","disableCustomGradients"],dV=({className:e,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,children:i,settings:s,title:a,showTitle:c=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:d})=>{let f=(0,ZJ.useInstanceId)(dV),{batch:m}=(0,YJ.useRegistry)();return(!t||t.length===0)&&(!o||o.length===0)&&r&&n&&s?.every(p=>(!p.colors||p.colors.length===0)&&(!p.gradients||p.gradients.length===0)&&(p.disableCustomColors===void 0||p.disableCustomColors)&&(p.disableCustomGradients===void 0||p.disableCustomGradients))?null:(0,Ss.jsxs)(_T.__experimentalToolsPanel,{className:V("block-editor-panel-color-gradient-settings",e),label:c?a:void 0,resetAll:()=>{m(()=>{s.forEach(({colorValue:p,gradientValue:h,onColorChange:g,onGradientChange:b})=>{p?g():h&&b()})})},panelId:f,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,Ss.jsx)(yT,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,Ss.jsxs)(Ss.Fragment,{children:[(0,Ss.jsx)(_T.__experimentalSpacer,{marginY:4})," ",i]})]})},KCe=e=>{let t=ed();return(0,Ss.jsx)(dV,{...t,...e})},qCe=e=>$Ce.every(t=>e.hasOwnProperty(t))?(0,Ss.jsx)(dV,{...e}):(0,Ss.jsx)(KCe,{...e}),ST=qCe;var xT=l(I()),pm=l(O()),mV=l(M());var a_=l(x()),fV=[],YCe={...tT,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function ZCe(e){let t=e?.default??fV,o=e?.custom??fV,r=e?.theme??fV;return(0,xT.useMemo)(()=>[{name:(0,mV.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function Ng({label:e=(0,mV.__)("Dimension"),onChange:t,value:o}){let[r,n]=fe("dimensions.dimensionSizes","spacing.units"),i=(0,pm.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=ZCe(r),[a,c]=(0,xT.useState)(()=>{let[,d]=(0,pm.__experimentalParseQuantityAndUnitFromRawValue)(o);return d||i[0]?.value||"px"}),u=d=>{let[f,m]=(0,pm.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(d)&&m==="px"?t((f/16).toFixed(2)+d):["em","rem"].includes(m)&&d==="px"?t(Math.round(f*16)+d):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(d)&&f>100&&t(100+d),c(d)};return(0,a_.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,a_.jsx)(pm.BaseControl.VisualLabel,{as:"legend",children:e}),(0,a_.jsx)(fm,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:YCe,minimumCustomValue:0,onChange:t,onUnitChange:u,presets:s,presetType:"dimension",selectedUnit:a,showTooltip:!0,units:i,value:o})]})}var QJ=l(I()),Ko=l(O()),JJ=l(M()),eee=l(Oe());var ga=l(x()),XJ={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function tee({label:e=(0,JJ.__)("Height"),onChange:t,value:o}){(0,eee.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=fe("spacing.units"),i=(0,Ko.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,QJ.useMemo)(()=>(0,Ko.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,Ko.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(u)&&f==="px"?t((d/16).toFixed(2)+u):["em","rem"].includes(f)&&u==="px"?t(Math.round(d*16)+u):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(u)&&d>100&&t(100+u)};return(0,ga.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,ga.jsx)(Ko.BaseControl.VisualLabel,{as:"legend",children:e}),(0,ga.jsxs)(Ko.Flex,{children:[(0,ga.jsx)(Ko.FlexItem,{isBlock:!0,children:(0,ga.jsx)(Ko.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,ga.jsx)(Ko.FlexItem,{isBlock:!0,children:(0,ga.jsx)(Ko.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ga.jsx)(Ko.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:XJ[s]?.max??100,step:XJ[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var d_=l(O());var Ei=l(Gs()),Eee=l(See());function t1e(e,t,o,r,n,i){i===void 0&&(i=0);var s=Dg(e,t,i),a=s.width,c=s.height,u=Math.min(a,o),d=Math.min(c,r);return u>d*n?{width:d*n,height:d}:{width:u,height:u/n}}function o1e(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function l_(e,t,o,r,n){n===void 0&&(n=0);var i=Dg(t.width,t.height,n),s=i.width,a=i.height;return{x:xee(e.x,s,o.width,r),y:xee(e.y,a,o.height,r)}}function xee(e,t,o,r){var n=t*r/2-o/2;return IT(e,-n,n)}function wee(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Cee(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function r1e(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?n1e:i1e,c=Dg(t.width,t.height,i),u=Dg(t.naturalWidth,t.naturalHeight,i),d={x:a(100,((c.width-o.width/n)/2-e.x/n)/c.width*100),y:a(100,((c.height-o.height/n)/2-e.y/n)/c.height*100),width:a(100,o.width/c.width*100/n),height:a(100,o.height/c.height*100/n)},f=Math.round(a(u.width,d.width*u.width/100)),m=Math.round(a(u.height,d.height*u.height/100)),p=u.width>=u.height*r,h=p?{width:Math.round(m*r),height:m}:{width:f,height:Math.round(f/r)},g=Bo(Bo({},h),{x:Math.round(a(u.width-h.width,d.x*u.width/100)),y:Math.round(a(u.height-h.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function n1e(e,t){return Math.min(e,Math.max(0,t))}function i1e(e,t){return t}function s1e(e,t,o,r,n,i){var s=Dg(t.width,t.height,o),a=IT(r.width/s.width*(100/e.width),n,i),c={x:a*s.width/2-r.width/2-s.width*a*(e.x/100),y:a*s.height/2-r.height/2-s.height*a*(e.y/100)};return{crop:c,zoom:a}}function a1e(e,t,o){var r=o1e(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function l1e(e,t,o,r,n,i){o===void 0&&(o=0);var s=Dg(t.naturalWidth,t.naturalHeight,o),a=IT(a1e(e,t,r),n,i),c=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((s.width-e.width)/2-e.x)*c,y:((s.height-e.height)/2-e.y)*c};return{crop:u,zoom:a}}function Bee(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function c1e(e){return e*Math.PI/180}function Dg(e,t,o){var r=c1e(o);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function IT(e,t,o){return Math.min(Math.max(e,t),o)}function TT(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(o){return typeof o=="string"&&o.length>0}).join(" ").trim()}var u1e=`.reactEasyCrop_Container { 91 position: absolute; 92 top: 0; 93 left: 0; 94 right: 0; 95 bottom: 0; 96 overflow: hidden; 97 user-select: none; 98 touch-action: none; 99 cursor: move; 100 display: flex; 101 justify-content: center; 102 align-items: center; 103 } 104 105 .reactEasyCrop_Image, 106 .reactEasyCrop_Video { 107 will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ 108 } 109 110 .reactEasyCrop_Contain { 111 max-width: 100%; 112 max-height: 100%; 113 margin: auto; 114 position: absolute; 115 top: 0; 116 bottom: 0; 117 left: 0; 118 right: 0; 119 } 120 .reactEasyCrop_Cover_Horizontal { 121 width: 100%; 122 height: auto; 123 } 124 .reactEasyCrop_Cover_Vertical { 125 width: auto; 126 height: 100%; 127 } 128 129 .reactEasyCrop_CropArea { 130 position: absolute; 131 left: 50%; 132 top: 50%; 133 transform: translate(-50%, -50%); 134 border: 1px solid rgba(255, 255, 255, 0.5); 135 box-sizing: border-box; 136 box-shadow: 0 0 0 9999em; 137 color: rgba(0, 0, 0, 0.5); 138 overflow: hidden; 139 } 140 141 .reactEasyCrop_CropAreaRound { 142 border-radius: 50%; 143 } 144 145 .reactEasyCrop_CropAreaGrid::before { 146 content: ' '; 147 box-sizing: border-box; 148 position: absolute; 149 border: 1px solid rgba(255, 255, 255, 0.5); 150 top: 0; 151 bottom: 0; 152 left: 33.33%; 153 right: 33.33%; 154 border-top: 0; 155 border-bottom: 0; 156 } 157 158 .reactEasyCrop_CropAreaGrid::after { 159 content: ' '; 160 box-sizing: border-box; 161 position: absolute; 162 border: 1px solid rgba(255, 255, 255, 0.5); 163 top: 33.33%; 164 bottom: 33.33%; 165 left: 0; 166 right: 0; 167 border-left: 0; 168 border-right: 0; 169 } 170 `,d1e=1,f1e=3,m1e=1,Tee=(function(e){K6(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=Ei.createRef(),o.imageRef=Ei.createRef(),o.videoRef=Ei.createRef(),o.containerPosition={x:0,y:0},o.containerRef=null,o.styleRef=null,o.containerRect=null,o.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},o.dragStartPosition={x:0,y:0},o.dragStartCrop={x:0,y:0},o.gestureZoomStart=0,o.gestureRotationStart=0,o.isTouching=!1,o.lastPinchDistance=0,o.lastPinchRotation=0,o.rafDragTimeout=null,o.rafPinchTimeout=null,o.wheelTimer=null,o.currentDoc=typeof document<"u"?document:null,o.currentWindow=typeof window<"u"?window:null,o.resizeObserver=null,o.previousCropSize=null,o.isInitialized=!1,o.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},o.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!o.containerRef)){var r=!0;o.resizeObserver=new window.ResizeObserver(function(n){if(r){r=!1;return}o.computeSizes()}),o.resizeObserver.observe(o.containerRef)}},o.preventZoomSafari=function(r){return r.preventDefault()},o.cleanEvents=function(){o.currentDoc&&(o.currentDoc.removeEventListener("mousemove",o.onMouseMove),o.currentDoc.removeEventListener("mouseup",o.onDragStopped),o.currentDoc.removeEventListener("touchmove",o.onTouchMove),o.currentDoc.removeEventListener("touchend",o.onDragStopped),o.currentDoc.removeEventListener("gesturechange",o.onGestureChange),o.currentDoc.removeEventListener("gestureend",o.onGestureEnd),o.currentDoc.removeEventListener("scroll",o.onScroll))},o.clearScrollEvent=function(){o.containerRef&&o.containerRef.removeEventListener("wheel",o.onWheel),o.wheelTimer&&clearTimeout(o.wheelTimer)},o.onMediaLoad=function(){var r=o.computeSizes();r&&(o.previousCropSize=r,o.emitCropData(),o.setInitialCrop(r),o.isInitialized=!0),o.props.onMediaLoaded&&o.props.onMediaLoaded(o.mediaSize)},o.setInitialCrop=function(r){if(o.props.initialCroppedAreaPercentages){var n=s1e(o.props.initialCroppedAreaPercentages,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=n.crop,s=n.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}else if(o.props.initialCroppedAreaPixels){var a=l1e(o.props.initialCroppedAreaPixels,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=a.crop,s=a.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}},o.computeSizes=function(){var r,n,i,s,a,c,u=o.imageRef.current||o.videoRef.current;if(u&&o.containerRef){o.containerRect=o.containerRef.getBoundingClientRect(),o.saveContainerPosition();var d=o.containerRect.width/o.containerRect.height,f=((r=o.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((n=o.videoRef.current)===null||n===void 0?void 0:n.videoWidth)||0,m=((i=o.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((s=o.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,p=u.offsetWidth<f||u.offsetHeight<m,h=f/m,g=void 0;if(p)switch(o.state.mediaObjectFit){default:case"contain":g=d>h?{width:o.containerRect.height*h,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/h};break;case"horizontal-cover":g={width:o.containerRect.width,height:o.containerRect.width/h};break;case"vertical-cover":g={width:o.containerRect.height*h,height:o.containerRect.height};break}else g={width:u.offsetWidth,height:u.offsetHeight};o.mediaSize=Bo(Bo({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:t1e(o.mediaSize.width,o.mediaSize.height,o.containerRect.width,o.containerRect.height,o.props.aspect,o.props.rotation);return(((a=o.state.cropSize)===null||a===void 0?void 0:a.height)!==b.height||((c=o.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&o.props.onCropSizeChange&&o.props.onCropSizeChange(b),o.setState({cropSize:b},o.recomputeCropPosition),o.props.setCropSize&&o.props.setCropSize(b),b}},o.saveContainerPosition=function(){if(o.containerRef){var r=o.containerRef.getBoundingClientRect();o.containerPosition={x:r.left,y:r.top}}},o.onMouseDown=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("mousemove",o.onMouseMove),o.currentDoc.addEventListener("mouseup",o.onDragStopped),o.saveContainerPosition(),o.onDragStart(t.getMousePoint(r)))},o.onMouseMove=function(r){return o.onDrag(t.getMousePoint(r))},o.onScroll=function(r){o.currentDoc&&(r.preventDefault(),o.saveContainerPosition())},o.onTouchStart=function(r){o.currentDoc&&(o.isTouching=!0,!(o.props.onTouchRequest&&!o.props.onTouchRequest(r))&&(o.currentDoc.addEventListener("touchmove",o.onTouchMove,{passive:!1}),o.currentDoc.addEventListener("touchend",o.onDragStopped),o.saveContainerPosition(),r.touches.length===2?o.onPinchStart(r):r.touches.length===1&&o.onDragStart(t.getTouchPoint(r.touches[0]))))},o.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?o.onPinchMove(r):r.touches.length===1&&o.onDrag(t.getTouchPoint(r.touches[0]))},o.onGestureStart=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("gesturechange",o.onGestureChange),o.currentDoc.addEventListener("gestureend",o.onGestureEnd),o.gestureZoomStart=o.props.zoom,o.gestureRotationStart=o.props.rotation)},o.onGestureChange=function(r){if(r.preventDefault(),!o.isTouching){var n=t.getMousePoint(r),i=o.gestureZoomStart-1+r.scale;if(o.setNewZoom(i,n,{shouldUpdatePosition:!0}),o.props.onRotationChange){var s=o.gestureRotationStart+r.rotation;o.props.onRotationChange(s)}}},o.onGestureEnd=function(r){o.cleanEvents()},o.onDragStart=function(r){var n,i,s=r.x,a=r.y;o.dragStartPosition={x:s,y:a},o.dragStartCrop=Bo({},o.props.crop),(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n)},o.onDrag=function(r){var n=r.x,i=r.y;o.currentWindow&&(o.rafDragTimeout&&o.currentWindow.cancelAnimationFrame(o.rafDragTimeout),o.rafDragTimeout=o.currentWindow.requestAnimationFrame(function(){if(o.state.cropSize&&!(n===void 0||i===void 0)){var s=n-o.dragStartPosition.x,a=i-o.dragStartPosition.y,c={x:o.dragStartCrop.x+s,y:o.dragStartCrop.y+a},u=o.props.restrictPosition?l_(c,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):c;o.props.onCropChange(u)}}))},o.onDragStopped=function(){var r,n;o.isTouching=!1,o.cleanEvents(),o.emitCropData(),(n=(r=o.props).onInteractionEnd)===null||n===void 0||n.call(r)},o.onWheel=function(r){if(o.currentWindow&&!(o.props.onWheelRequest&&!o.props.onWheelRequest(r))){r.preventDefault();var n=t.getMousePoint(r),i=(0,Eee.default)(r).pixelY,s=o.props.zoom-i*o.props.zoomSpeed/200;o.setNewZoom(s,n,{shouldUpdatePosition:!0}),o.state.hasWheelJustStarted||o.setState({hasWheelJustStarted:!0},function(){var a,c;return(c=(a=o.props).onInteractionStart)===null||c===void 0?void 0:c.call(a)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var a,c;return(c=(a=o.props).onInteractionEnd)===null||c===void 0?void 0:c.call(a)})},250)}},o.getPointOnContainer=function(r,n){var i=r.x,s=r.y;if(!o.containerRect)throw new Error("The Cropper is not mounted");return{x:o.containerRect.width/2-(i-n.x),y:o.containerRect.height/2-(s-n.y)}},o.getPointOnMedia=function(r){var n=r.x,i=r.y,s=o.props,a=s.crop,c=s.zoom;return{x:(n+a.x)/c,y:(i+a.y)/c}},o.setNewZoom=function(r,n,i){var s=i===void 0?{}:i,a=s.shouldUpdatePosition,c=a===void 0?!0:a;if(!(!o.state.cropSize||!o.props.onZoomChange)){var u=IT(r,o.props.minZoom,o.props.maxZoom);if(c){var d=o.getPointOnContainer(n,o.containerPosition),f=o.getPointOnMedia(d),m={x:f.x*u-d.x,y:f.y*u-d.y},p=o.props.restrictPosition?l_(m,o.mediaSize,o.state.cropSize,u,o.props.rotation):m;o.props.onCropChange(p)}o.props.onZoomChange(u)}},o.getCropData=function(){if(!o.state.cropSize)return null;var r=o.props.restrictPosition?l_(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return r1e(r,o.mediaSize,o.state.cropSize,o.getAspect(),o.props.zoom,o.props.rotation,o.props.restrictPosition)},o.emitCropData=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropComplete&&o.props.onCropComplete(n,i),o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.emitCropAreaChange=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.recomputeCropPosition=function(){if(o.state.cropSize){var r=o.props.crop;if(o.isInitialized&&o.previousCropSize){var n=Math.abs(o.previousCropSize.width-o.state.cropSize.width)>1e-6||Math.abs(o.previousCropSize.height-o.state.cropSize.height)>1e-6;if(n){var i=o.state.cropSize.width/o.previousCropSize.width,s=o.state.cropSize.height/o.previousCropSize.height;r={x:o.props.crop.x*i,y:o.props.crop.y*s}}}var a=o.props.restrictPosition?l_(r,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):r;o.previousCropSize=o.state.cropSize,o.props.onCropChange(a),o.emitCropData()}},o.onKeyDown=function(r){var n,i,s=o.props,a=s.crop,c=s.onCropChange,u=s.keyboardStep,d=s.zoom,f=s.rotation,m=u;if(o.state.cropSize){r.shiftKey&&(m*=.2);var p=Bo({},a);switch(r.key){case"ArrowUp":p.y-=m,r.preventDefault();break;case"ArrowDown":p.y+=m,r.preventDefault();break;case"ArrowLeft":p.x-=m,r.preventDefault();break;case"ArrowRight":p.x+=m,r.preventDefault();break;default:return}o.props.restrictPosition&&(p=l_(p,o.mediaSize,o.state.cropSize,d,f)),r.repeat||(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n),c(p)}},o.onKeyUp=function(r){var n,i;switch(r.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":r.preventDefault();break;default:return}o.emitCropData(),(i=(n=o.props).onInteractionEnd)===null||i===void 0||i.call(n)},o}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=u1e,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var o,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(o=this.resizeObserver)===null||o===void 0||o.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(o){var r,n,i,s,a,c,u,d,f;o.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):o.aspect!==this.props.aspect?this.computeSizes():o.objectFit!==this.props.objectFit?this.computeSizes():o.zoom!==this.props.zoom?this.recomputeCropPosition():((r=o.cropSize)===null||r===void 0?void 0:r.height)!==((n=this.props.cropSize)===null||n===void 0?void 0:n.height)||((i=o.cropSize)===null||i===void 0?void 0:i.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=o.crop)===null||a===void 0?void 0:a.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=o.crop)===null||u===void 0?void 0:u.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),o.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),o.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var m=this.getObjectFit();m!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:m},this.computeSizes)},t.prototype.getAspect=function(){var o=this.props,r=o.cropSize,n=o.aspect;return r?r.width/r.height:n},t.prototype.getObjectFit=function(){var o,r,n,i;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,c=((o=this.imageRef.current)===null||o===void 0?void 0:o.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalHeight)||((i=this.videoRef.current)===null||i===void 0?void 0:i.videoHeight)||0,d=c/u;return d<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(o){var r=t.getTouchPoint(o.touches[0]),n=t.getTouchPoint(o.touches[1]);this.lastPinchDistance=wee(r,n),this.lastPinchRotation=Cee(r,n),this.onDragStart(Bee(r,n))},t.prototype.onPinchMove=function(o){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var n=t.getTouchPoint(o.touches[0]),i=t.getTouchPoint(o.touches[1]),s=Bee(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=wee(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=Cee(n,i),d=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=u})}},t.prototype.render=function(){var o=this,r,n=this.props,i=n.image,s=n.video,a=n.mediaProps,c=n.cropperProps,u=n.transform,d=n.crop,f=d.x,m=d.y,p=n.rotation,h=n.zoom,g=n.cropShape,b=n.showGrid,k=n.roundCropAreaPixels,y=n.style,v=y.containerStyle,S=y.cropAreaStyle,w=y.mediaStyle,C=n.classes,E=C.containerClassName,P=C.cropAreaClassName,R=C.mediaClassName,B=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return Ei.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(A){return o.containerRef=A},"data-testid":"container",style:v,className:TT("reactEasyCrop_Container",E)},i?Ei.createElement("img",Bo({alt:"",className:TT("reactEasyCrop_Image",B==="contain"&&"reactEasyCrop_Contain",B==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",B==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",R)},a,{src:i,ref:this.imageRef,style:Bo(Bo({},w),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(p,"deg) scale(").concat(h,")")}),onLoad:this.onMediaLoad})):s&&Ei.createElement("video",Bo({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:TT("reactEasyCrop_Video",B==="contain"&&"reactEasyCrop_Contain",B==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",B==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",R)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Bo(Bo({},w),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(p,"deg) scale(").concat(h,")")}),controls:!1}),(Array.isArray(s)?s:[{src:s}]).map(function(T){return Ei.createElement("source",Bo({key:T.src},T))})),this.state.cropSize&&Ei.createElement("div",Bo({ref:this.cropperRef,style:Bo(Bo({},S),{width:k?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:k?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:TT("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",P)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:f1e,minZoom:d1e,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:m1e},t.getMousePoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t.getTouchPoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t})(Ei.Component);var Dee=l(I());var Fg=l(I());var Iee=Object.prototype.hasOwnProperty;function Pee(e,t,o){for(o of e.keys())if(gm(o,t))return o}function gm(e,t){var o,r,n;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((r=e.length)===t.length)for(;r--&&gm(e[r],t[r]););return r===-1}if(o===Set){if(e.size!==t.size)return!1;for(r of e)if(n=r,n&&typeof n=="object"&&(n=Pee(t,n),!n)||!t.has(n))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(r of e)if(n=r[0],n&&typeof n=="object"&&(n=Pee(t,n),!n)||!gm(r[1],t.get(n)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!o||typeof e=="object"){r=0;for(o in e)if(Iee.call(e,o)&&++r&&!Iee.call(t,o)||!(o in t)||!gm(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var xs=l(I());var Vg=1,Oee=5;var PT=e=>e>=0?e%360:(360+e%360)%360,p1e=e=>new Promise((t,o)=>{let r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",n=>o(n)),r.setAttribute("crossOrigin","anonymous"),r.src=e});function Ree(e){return e*Math.PI/180}function h1e(e,t,o){let r=Ree(o);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}async function Aee(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await p1e(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=Ree(o),{width:c,height:u}=h1e(n.width,n.height,o);i.width=c,i.height=u,s.translate(c/2,u/2),s.rotate(a),s.scale(r.horizontal?-1:1,r.vertical?-1:1),s.translate(-n.width/2,-n.height/2),s.drawImage(n,0,0);let d=document.createElement("canvas"),f=d.getContext("2d");return f?(d.width=t.width,d.height=t.height,f.drawImage(i,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise(m=>{d.toBlob(p=>{p&&m(URL.createObjectURL(p))},"image/jpeg")})):null}catch{return null}}var bm={crop:{x:0,y:0,width:100,height:100},zoom:Vg,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},g1e={x:0,y:0},SV={crop:g1e,croppedArea:bm.crop,croppedAreaPixels:null,zoom:bm.zoom,rotation:bm.rotation,flip:bm.flip,aspectRatio:bm.aspectRatio,mediaSize:null};function Lee(){let[e,t]=(0,xs.useState)(SV),[o,r]=(0,xs.useState)(null),n=(0,xs.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=PT(m.rotation)),{...d,...m}})},[]),i=(0,xs.useCallback)((u=null)=>{if(!u){r(null),n(SV);return}if(typeof u=="object"){let d={...bm,...u};r(d),n(d)}},[n,r]),s=(0,xs.useCallback)(()=>{if(o){let u={crop:{x:0,y:0},croppedAreaPixels:null};o.crop&&(u.croppedArea=o.crop),o.zoom!==void 0&&(u.zoom=o.zoom),o.rotation!==void 0&&(u.rotation=o.rotation),o.aspectRatio!==void 0&&(u.aspectRatio=o.aspectRatio),o.flip!==void 0&&(u.flip=o.flip),n(u)}else n({...SV})},[o,n]),a=(0,xs.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:PT(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return gm(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:PT(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return gm(u,bm)===!1},[e,o]),c=(0,xs.useCallback)(async u=>e.croppedAreaPixels?Aee(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,xs.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var Mee=l(x()),Nee=(0,Fg.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:Vg,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function xV({children:e}){let t=Lee(),o=(0,Fg.useMemo)(()=>({...t}),[t]);return(0,Mee.jsx)(Nee.Provider,{value:o,children:e})}var c_=()=>{let e=(0,Fg.useContext)(Nee);if(!e)throw new Error("Missing ImageCropperContext");return e};var Vee=l(x());function wV({src:e,onLoad:t,minZoom:o=Vg,maxZoom:r=Oee,...n}){let{cropperState:i,setCropperState:s}=c_(),{crop:a,zoom:c,rotation:u,aspectRatio:d,flip:f}=i,m=k=>s({crop:k}),p=k=>s({zoom:k}),h=k=>s({rotation:k}),g=k=>s({mediaSize:k}),b=(0,Dee.useCallback)((k,y)=>{s({croppedArea:k,croppedAreaPixels:y})},[s]);return(0,Vee.jsx)(Tee,{classes:{containerClassName:"image-cropper__container",cropAreaClassName:"image-cropper__crop-area",mediaClassName:"image-cropper__image"},minZoom:o,maxZoom:r,rotation:u,image:e,setMediaSize:g,crop:a,zoom:c,aspect:d,onCropChange:m,onZoomChange:p,onCropComplete:b,onMediaLoaded:k=>{t?.(k)},onRotationChange:h,transform:[`translate($a.x}px, $a.y}px)`,`rotateZ($u}deg)`,`rotateY($f.horizontal?180:0}deg)`,`rotateX($f.vertical?180:0}deg)`,`scale($c})`].join(" "),...n})}var Ug=l(O()),jg=l(M());var Fee=100,zee=300,OT={placement:"bottom-start"};var zg=l(I());var RT=l(D()),km=l(I()),Jl=l(M()),jee=l(ii()),Uee=l(ze());var b1e={crop:(0,Jl.__)("Image cropped."),rotate:(0,Jl.__)("Image rotated."),cropAndRotate:(0,Jl.__)("Image cropped and rotated.")};function Hee({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,RT.useDispatch)(jee.store),[c,u]=(0,km.useState)(!1),{editMediaEntity:d}=(0,RT.useSelect)(p=>({editMediaEntity:p(_).getSettings()?.[PS]}),[]),f=(0,km.useCallback)(()=>{u(!1),i()},[i]),m=(0,km.useCallback)(async()=>{if(!d){i(),s((0,Jl.__)("Sorry, you are not allowed to edit images on this site."),{id:"image-editing-error",type:"snackbar"});return}u(!0);let p=[];if(t>0&&p.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&p.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),p.length===0){u(!1),i();return}let h=p.length===1?p[0].type:"cropAndRotate";try{let g=await d(r,{src:o,modifiers:p},{throwOnError:!0});g&&(n({id:g.id,url:g.source_url}),a(b1e[h],{type:"snackbar",actions:[{label:(0,Jl.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,Jl.sprintf)((0,Jl.__)("Could not edit image. %s"),(0,Uee.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,km.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var ws=l(I()),Gee=l(nt());function Wee({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,ws.useState)(),{cropperState:i,setCropperState:s}=c_(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,ws.useCallback)(y=>{s({zoom:y})},[s]),m=(0,ws.useCallback)(y=>{s({aspectRatio:y})},[s]),p=t/o,h=o/t;(0,ws.useEffect)(()=>{m(p)},[]);let[g,b]=(0,ws.useState)(0),k=(0,ws.useCallback)(()=>{let y=(g+90)%360,v=p,w=a!==1||!(p===c||h===c);if(g%180===90&&(v=1/p),y===0){n(),b(y),s({aspectRatio:w?c:p,crop:{x:-(u.y*v),y:u.x*v}});return}function C(R){let B=document.createElement("canvas"),T=0,A=0;y%180?(B.width=R.target.height,B.height=R.target.width):(B.width=R.target.width,B.height=R.target.height),(y===90||y===180)&&(T=B.width),(y===270||y===180)&&(A=B.height);let L=B.getContext("2d");L.translate(T,A),L.rotate(y*Math.PI/180),L.drawImage(R.target,0,0),B.toBlob(U=>{n(URL.createObjectURL(U)),b(y);let G=w?c:B.width/B.height;s({aspectRatio:G,crop:{x:-(u.y*v),y:u.x*v}})})}let E=new window.Image;E.src=e,E.onload=C;let P=(0,Gee.applyFilters)("media.crossOrigin",void 0,e);typeof P=="string"&&(E.crossOrigin=P)},[g,p,e,s,u,a,c,h,b]);return(0,ws.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:g,rotateClockwise:k,aspect:c,setAspect:m,defaultAspect:p}),[r,d,a,f,g,k,c,m,p])}var $ee=l(x()),CV=(0,zg.createContext)({});CV.displayName="ImageEditingContext";var ba=()=>(0,zg.useContext)(CV);function Kee({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=Wee({url:t,naturalWidth:o,naturalHeight:r}),c=Hee({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,zg.useMemo)(()=>({...a,...c}),[a,c]);return(0,$ee.jsx)(CV.Provider,{value:u,children:s})}var Ti=l(x());function AT({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,Ti.jsx)(Ug.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,Ti.jsx)(Ug.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?Ja:void 0,children:i},s))})}function k1e(e){let[t,o,...r]=e.split("/").map(Number);return t<=0||o<=0||Number.isNaN(t)||Number.isNaN(o)||r.length?NaN:o?t/o:t}function BV({ratio:e,...t}){return{ratio:k1e(e),...t}}function qee({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=ba(),[i,s,a]=fe("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,Ti.jsx)(Ug.DropdownMenu,{icon:EO,label:(0,jg.__)("Aspect Ratio"),popoverProps:OT,toggleProps:e,children:({onClose:c})=>(0,Ti.jsxs)(Ti.Fragment,{children:[(0,Ti.jsx)(AT,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,jg.__)("Original"),ratio:n},...a?i.map(BV).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,Ti.jsx)(AT,{label:(0,jg.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,Ti.jsx)(AT,{label:(0,jg.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(BV).filter(({ratio:u})=>u>1)}),a&&(0,Ti.jsx)(AT,{label:(0,jg.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(BV).filter(({ratio:u})=>u<1)})]})})}var Yee=l(O()),Zee=l(Y());var td=l(x());function Xee({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=ba(),[u,{width:d}]=(0,Zee.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,td.jsxs)("div",{className:V("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,td.jsx)(wV,{src:a||e}),s&&(0,td.jsx)(Yee.Spinner,{})]});return(0,td.jsxs)(td.Fragment,{children:[u,m]})}var od=l(O()),EV=l(M());var u_=l(x());function Qee(){let{isInProgress:e,zoom:t,setZoom:o}=ba();return(0,u_.jsx)(od.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:OT,renderToggle:({isOpen:r,onToggle:n})=>(0,u_.jsx)(od.ToolbarButton,{icon:FA,label:(0,EV.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,u_.jsx)(od.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,u_.jsx)(od.RangeControl,{__next40pxDefaultSize:!0,label:(0,EV.__)("Zoom"),min:Fee,max:zee,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var Jee=l(O()),ete=l(M());var tte=l(x());function ote(){let{isInProgress:e,rotateClockwise:t}=ba();return(0,tte.jsx)(Jee.ToolbarButton,{icon:MA,label:(0,ete.__)("Rotate"),onClick:t,disabled:e})}var TV=l(O()),IV=l(M());var vm=l(x());function rte(){let{isInProgress:e,apply:t,cancel:o}=ba();return(0,vm.jsxs)(vm.Fragment,{children:[(0,vm.jsx)(TV.ToolbarButton,{onClick:t,disabled:e,children:(0,IV.__)("Apply")}),(0,vm.jsx)(TV.ToolbarButton,{onClick:o,children:(0,IV.__)("Cancel")})]})}var Un=l(x());function nte({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,Un.jsx)(xV,{children:(0,Un.jsxs)(Kee,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,Un.jsx)(Xee,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,Un.jsxs)(mt,{children:[(0,Un.jsxs)(d_.ToolbarGroup,{children:[(0,Un.jsx)(Qee,{}),(0,Un.jsx)(d_.ToolbarItem,{children:u=>(0,Un.jsx)(qee,{toggleProps:u})}),(0,Un.jsx)(ote,{})]}),(0,Un.jsx)(d_.ToolbarGroup,{children:(0,Un.jsx)(rte,{})})]})]})})}var Hn=l(O()),rd=l(M());var Hg=l(I());function ite(e,t,o,r,n){let[i,s]=(0,Hg.useState)(t??r??""),[a,c]=(0,Hg.useState)(e??o??"");return(0,Hg.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,Hg.useEffect)(()=>{t!==void 0&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),e!==void 0&&Number.parseInt(e)!==Number.parseInt(a)&&c(e)},[t,e]),{currentHeight:a,currentWidth:i,updateDimension:(f,m)=>{let p=m===""?void 0:parseInt(m,10);f==="width"?s(p):c(p),n({[f]:p})},updateDimensions:(f,m)=>{c(f??o),s(m??r),n({height:f,width:m})}}}var Ii=l(x()),ste=[25,50,75,100],v1e=()=>{};function ate(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function lte({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=v1e}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:p}=ite(a,s,o,t,c),h=b=>{if(b===void 0){p();return}let{scaledWidth:k,scaledHeight:y}=ate(b,t,o);p(y,k)},g=ste.find(b=>{let{scaledWidth:k,scaledHeight:y}=ate(b,t,o);return f===k&&d===y});return(0,Ii.jsxs)(Hn.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,Ii.jsx)(Hn.SelectControl,{label:(0,rd.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,Ii.jsxs)(Ii.Fragment,{children:[(0,Ii.jsxs)(Hn.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,Ii.jsx)(Hn.__experimentalNumberControl,{label:(0,rd.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,Ii.jsx)(Hn.__experimentalNumberControl,{label:(0,rd.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,Ii.jsx)(Hn.__experimentalToggleGroupControl,{label:(0,rd.__)("Image size presets"),hideLabelFromVision:!0,onChange:h,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:ste.map(b=>(0,Ii.jsx)(Hn.__experimentalToggleGroupControlOption,{value:b,label:(0,rd.sprintf)((0,rd.__)("%d%%"),b)},b))})]})]})}var LT=l(O());var ym=l(M()),ute=l(x()),cte={left:Ac,center:Rc,right:Lc,"space-between":bp,stretch:kp};function y1e({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:o,value:r,popoverProps:n,isToolbar:i}){let s=f=>{o(f===r?void 0:f)},a=r?cte[r]:cte.left,c=[{name:"left",icon:Ac,title:(0,ym.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:Rc,title:(0,ym.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:Lc,title:(0,ym.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:bp,title:(0,ym.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:kp,title:(0,ym.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?LT.ToolbarGroup:LT.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,ute.jsx)(u,{icon:a,popoverProps:n,label:(0,ym.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var PV=y1e;var OV=l(x()),Fp=e=>(0,OV.jsx)(PV,{...e,isToolbar:!1}),dte=e=>(0,OV.jsx)(PV,{...e,isToolbar:!0});var Fr=l(O()),ka=l(M()),sr=l(I()),ooe=l(Y()),roe=l(ze()),noe=l(st()),ioe=l(yy()),KT=l(D()),UV=l(Tp());var soe=l(Oe());var Gg=l(O());var MT=l(Y()),NT=l(M()),fte=l(I()),ec=l(x());function mte({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,MT.useReducedMotion)(),n=r?fte.Fragment:Gg.__unstableAnimatePresence,i=r?"div":Gg.__unstableMotion.div,a=`link-control-settings-drawer-${(0,MT.useInstanceId)(mte)}`;return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(Gg.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,NT.isRTL)()?vk:Oc,"aria-controls":a,children:(0,NT._x)("Advanced","Additional link settings")}),(0,ec.jsx)(n,{children:t&&(0,ec.jsx)(i,{className:"block-editor-link-control__drawer",hidden:!t,id:a,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,ec.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var pte=mte;var jT=l(I()),zV=l(M()),Ate=l(Oe());var f_=l(M()),Cte=l(O());var DT=l(M()),hte=l(O()),gte=l(I());var RV=l(x()),_1e=({searchTerm:e,onClick:t,itemProps:o,buttonText:r})=>{if(!e)return null;let n;return r?n=typeof r=="function"?r(e):r:n=(0,gte.createInterpolateElement)((0,DT.sprintf)((0,DT.__)("Create: <mark>%s</mark>"),e),{mark:(0,RV.jsx)("mark",{})}),(0,RV.jsx)(hte.MenuItem,{...o,iconPosition:"left",icon:ti,className:"block-editor-link-control__search-item",onClick:t,children:n})},bte=_1e;var tc=l(M()),FT=l(O());var kte=l(ze()),$g=l(Zr()),vte=l(Y()),yte=l(Oe()),Wg=l(x()),VT={post:{icon:PA,label:(0,tc.__)("Post")},page:{icon:tl,label:(0,tc.__)("Page")},post_tag:{icon:iL,label:(0,tc.__)("Tag")},category:{icon:AO,label:(0,tc.__)("Category")},attachment:{icon:sR,label:(0,tc.__)("Attachment")}};function S1e({isURL:e,suggestion:t}){let o=null;return e?o=_k:t.type in VT&&(o=VT[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=NR),t.isBlogHome&&(o=vL))),o?(0,Wg.jsx)(Te,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function x1e(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function w1e(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var C1e=(e,...t)=>(...o)=>e(...o,...t),B1e=e=>t=>t==null||t!==t?e:t;function E1e(e){return e&&(0,vte.pipe)($g.safeDecodeURI,$g.getPath,B1e(""),C1e($g.filterURLForDisplay,24),w1e,x1e)(e)}var _te=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,tc.__)("Press ENTER to add this link"):E1e(t.url);return(0,Wg.jsx)(FT.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,Wg.jsx)(S1e,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&T1e(t),className:"block-editor-link-control__search-item",children:(0,Wg.jsx)(FT.TextHighlight,{text:(0,kte.__unstableStripHTML)(t.title),highlight:o})})};function T1e(e){return e.isFrontPage?(0,tc.__)("Front page"):e.isBlogHome?(0,tc.__)("Blog home"):e.type in VT?VT[e.type].label:e.type}var Ste=_te,xte=e=>((0,yte.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,Wg.jsx)(_te,{...e}));var wte=l(M()),_m="__CREATE__",AV="tel",LV="link",MV="mailto",NV="internal",DV=[LV,MV,AV,NV],VV=[{id:"opensInNewTab",title:(0,wte.__)("Open in new tab")}];var Bte=l(Oe()),Sm=l(x());function Ete({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=V("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&DV.includes(i[0].type),p=e&&!m&&!c,h=!d?.type,g=c?(0,f_.__)("Suggestions"):(0,f_.sprintf)((0,f_.__)('Search results for "%s"'),t);return(0,Sm.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,Sm.jsx)("div",{...r,className:f,"aria-label":g,children:(0,Sm.jsx)(Cte.MenuGroup,{children:i.map((b,k)=>p&&_m===b.type?(0,Sm.jsx)(bte,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,k),isSelected:k===s},b.type):_m===b.type?null:(0,Sm.jsx)(Ste,{itemProps:n(b,k),suggestion:b,index:k,onClick:()=>{o(b)},isSelected:k===s,isURL:DV.includes(b.type),searchTerm:t,shouldShowType:h,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`$b.id}-$b.type}`))})})})}var Tte=Ete,Ite=e=>((0,Bte.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,Sm.jsx)(Ete,{...e}));var zT=l(Zr()),Pte=l(I()),Ote=l(D());var I1e=()=>Promise.resolve([]),P1e=e=>{let t=LV,o=(0,zT.getProtocol)(e)||"";return o.includes("mailto")&&(t=MV),o.includes("tel")&&(t=AV),e?.startsWith("#")&&(t=NV),Promise.resolve([{id:e,title:e,url:t==="URL"?(0,zT.prependHTTP)(e):e,type:t}])},O1e=async(e,t,o,r,n,i)=>{let{isInitialSuggestions:s}=t,a=await o(e,t);return a.map(c=>Number(c.id)===n?(c.isFrontPage=!0,c):(Number(c.id)===i&&(c.isBlogHome=!0),c)),s||dk(e)||!r?a:a.concat({title:e,url:e,type:_m})};function Rte(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,Ote.useSelect)(a=>{let{getSettings:c}=a(_);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?P1e:I1e;return(0,Pte.useCallback)((a,{isInitialSuggestions:c})=>dk(a)?s(a,{isInitialSuggestions:c}):O1e(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var Kg=l(x()),R1e=()=>Promise.resolve([]),FV=()=>{},Lte=(0,jT.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=FV,onChange:a=FV,onSelect:c=FV,showSuggestions:u=!0,renderSuggestions:d=w=>(0,Kg.jsx)(Tte,{...w}),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:p=!1,suggestionsQuery:h={},withURLSuggestion:g=!0,createSuggestionButtonText:b,hideLabelFromVision:k=!1,suffix:y,isEntity:v=!1},S)=>{let w=Rte(h,m,i,g),C=u?f||w:R1e,[E,P]=(0,jT.useState)(),R=(U,G)=>{a(U),P(G)},B=U=>d({...U,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:h,handleSuggestionClick:G=>{U.handleSuggestionClick&&U.handleSuggestionClick(G),T(G)}}),T=async U=>{let G=U;if(_m===U.type){try{G=await s(U.title),G?.url&&c(G)}catch{}return}if(m||G&&Object.keys(G).length>=1){let{id:j,url:N,kind:F,type:K,...Z}=o??{};c({...Z,...G},G)}},A=n??(0,zV.__)("Search or type URL"),L=k&&n!==""?A:(0,zV.__)("Link");return(0,Kg.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,Kg.jsx)(nd,{disableSuggestions:o?.url===e,label:L,hideLabelFromVision:k,className:r,value:e,onChange:R,placeholder:A,__experimentalRenderSuggestions:u?B:null,__experimentalFetchLinkSuggestions:C,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:p,onSubmit:(U,G)=>{let j=U||E;!j&&!e?.trim()?.length?G.preventDefault():T(j||{url:e})},inputRef:S,suffix:y,disabled:v}),t]})}),Mte=Lte,Nte=e=>((0,Ate.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,Kg.jsx)(Lte,{...e}));var id=l(M()),Vr=l(O()),jte=l(Y()),GT=l(Zr());var Ute=l(ze()),WT=l(D()),Hte=l(ii()),Gte=l(Tp());var Dte=l(O()),{Slot:Vte,Fill:Fte}=(0,Dte.createSlotFill)("BlockEditorLinkControlViewer");var zte=l(D()),UT=l(I());function A1e(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 L1e(e){let[t,o]=(0,UT.useReducer)(A1e,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,zte.useSelect)(n=>{let{getSettings:i}=n(_);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,UT.useEffect)(()=>{if(e?.length&&r&&typeof AbortController<"u"){o({type:"LOADING"});let n=new window.AbortController,i=n.signal;return r(e,{signal:i}).then(s=>{o({type:"RESOLVED",richData:s})}).catch(()=>{i.aborted||o({type:"ERROR"})}),()=>{n.abort()}}},[e]),t}var HT=L1e;var eo=l(x());function M1e(e){return e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")}function Wte({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,WT.useSelect)(k=>k(Gte.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=HT(s),u=a&&Object.keys(a).length,d=e&&(0,GT.filterURLForDisplay)((0,GT.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,Ute.__unstableStripHTML)(a?.title||e?.title||d),p=!e?.url||M1e(m)===d,h;a?.icon?h=(0,eo.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,eo.jsx)(Te,{icon:FR,size:32}):h=(0,eo.jsx)(Te,{icon:_k});let{createNotice:g}=(0,WT.useDispatch)(Hte.store),b=(0,jte.useCopyToClipboard)(e.url,()=>{g("info",(0,id.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,eo.jsx)(Vr.Flex,{role:"group","aria-label":(0,id.__)("Manage link"),className:V("block-editor-link-control__preview",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":f,"is-url-title":m===d}),children:(0,eo.jsxs)(Vr.Flex,{gap:0,children:[(0,eo.jsxs)(Vr.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,id.__)("Link information"),justify:"start",children:[(0,eo.jsx)(Vr.Flex,{className:V("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,eo.jsx)(Vr.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:1,children:f?(0,eo.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,id.__)("Link is empty")}):(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsx)(Vr.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,eo.jsx)(Vr.__experimentalTruncate,{numberOfLines:1,children:m})}),!p&&(0,eo.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,eo.jsx)(Vr.__experimentalTruncate,{numberOfLines:1,children:d})})]})})]}),(0,eo.jsx)(Vr.Button,{icon:Pk,label:(0,id.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,eo.jsx)(Vr.Button,{icon:ei,label:(0,id.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,eo.jsx)(Vr.Button,{icon:WO,label:(0,id.__)("Copy link"),ref:b,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,eo.jsx)(Vte,{fillProps:e})]})})}var $te=l(M()),$T=l(O()),qg=l(x()),N1e=()=>{},D1e=({value:e,onChange:t=N1e,settings:o})=>{if(!o||!o.length)return null;let r=i=>s=>{t({...e,[i.id]:s})},n=o.map(i=>{if("render"in i){if(typeof i.render=="function"){let s=i.render(i,e,t);return(0,qg.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,qg.jsx)($T.CheckboxControl,{className:"block-editor-link-control__setting",label:i.title,onChange:r(i),checked:e?!!e[i.id]:!1,help:i?.help},i.id)}).filter(Boolean);return(0,qg.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,qg.jsx)($T.VisuallyHidden,{as:"legend",children:(0,$te.__)("Currently selected link settings")}),n]})},Kte=D1e;var qte=l(M()),xm=l(I());function Yte(e){let t=(0,xm.useRef)(),[o,r]=(0,xm.useState)(!1),[n,i]=(0,xm.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=V1e(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,qte.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,xm.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var V1e=e=>{let t=!1;return{promise:new Promise((r,n)=>{e.then(i=>t?n({isCanceled:!0}):r(i),i=>n(t?{isCanceled:!0}:i))}),cancel(){t=!0}}};var jV=l(I()),Qte=l(Xte());function Jte(e){let[t,o]=(0,jV.useState)(e||{}),[r,n]=(0,jV.useState)(e);return(0,Qte.default)(e,r)||(n(e),o(e)),[t,o,c=>{o({...t,url:c})},c=>{o({...t,title:c})},c=>u=>{let d=Object.keys(u).reduce((f,m)=>(c.includes(m)&&(f[m]=u[m]),f),{});o({...t,...d})}]}var St=l(x()),HV=()=>{},eoe="core/block-editor",toe="linkControlSettingsDrawer";function wm({searchInputPlaceholder:e,value:t,settings:o=VV,onChange:r=HV,onRemove:n,onCancel:i,noDirectEntry:s=!1,showSuggestions:a=!0,showInitialSuggestions:c,forceIsEditingLink:u,createSuggestion:d,withCreateSuggestion:f,inputValue:m="",suggestionsQuery:p={},noURLSuggestion:h=!1,createSuggestionButtonText:g,hasRichPreviews:b=!1,hasTextControl:k=!1,renderControlBottom:y=null,handleEntities:v=!1}){f===void 0&&d&&(f=!0);let[S,w]=(0,sr.useState)(!1),{advancedSettingsPreference:C}=(0,KT.useSelect)(Fe=>({advancedSettingsPreference:Fe(UV.store).get(eoe,toe)??!1}),[]),{set:E}=(0,KT.useDispatch)(UV.store),P=Fe=>{E&&E(eoe,toe,Fe),w(Fe)},R=C||S,B=(0,sr.useRef)(!0),T=(0,sr.useRef)(),A=(0,sr.useRef)(),L=(0,sr.useRef)(),U=(0,sr.useRef)(),G=o.map(({id:Fe})=>Fe),[j,N,F,K,Z]=Jte(t),Q=v&&!!j?.id,J=(0,ooe.useInstanceId)(wm,"link-control"),ee=Q?`$J}__help`:null,ie=t&&!(0,ioe.isShallowEqualObjects)(j,t),[de,X]=(0,sr.useState)(u!==void 0?u:!t||!t.url),{createPage:re,isCreatingPage:W,errorMessage:H}=Yte(d);(0,sr.useEffect)(()=>{u!==void 0&&X(u)},[u]),(0,sr.useEffect)(()=>{if(B.current)return;(roe.focus.focusable.find(T.current)[0]||T.current).focus()},[de,W]),(0,sr.useEffect)(()=>(B.current=!1,()=>{B.current=!0}),[]);let oe=t?.url?.trim()?.length>0,ce=()=>{X(!1)},le=Fe=>{Fe?.kind==="taxonomy"&&Fe?.url&&(U.current=Fe.url);let bo=Object.keys(Fe).reduce((Zt,me)=>(G.includes(me)||(Zt[me]=Fe[me]),Zt),{});r({...j,...bo,title:j?.title||Fe?.title}),ce()},ye=()=>{ie&&r({...t,...j,url:rt}),ce()},_e=Fe=>{let{keyCode:bo}=Fe;bo===noe.ENTER&&!Vt&&(Fe.preventDefault(),ye())},Ve=()=>{N(t)},go=Fe=>{Fe.preventDefault(),Fe.stopPropagation(),Ve(),oe?ce():n?.(),i?.()},[ot,Yt]=(0,sr.useState)(!1),Ct=()=>{let{id:Fe,kind:bo,type:Zt,...me}=j;N({...me,id:void 0,kind:void 0,type:void 0,url:void 0}),Yt(!0)};(0,sr.useEffect)(()=>{ot&&(L.current?.focus(),Yt(!1))},[ot]);let rt=m||j?.url||"",Vt=!rt?.trim()?.length,Ft=n&&t&&!de&&!W,We=de&&oe,so=oe&&k,dt=(de||!t)&&!W,ao=!ie||Vt,qn=!!o?.length&&de&&oe,Kr=(0,sr.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&U.current?{...t,url:U.current}:t,[t]);return(0,St.jsxs)("div",{tabIndex:-1,ref:T,className:"block-editor-link-control",children:[W&&(0,St.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,St.jsx)(Fr.Spinner,{})," ",(0,ka.__)("Creating"),"\u2026"]}),dt&&(0,St.jsxs)(St.Fragment,{children:[(0,St.jsxs)("div",{className:V({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":so,"has-actions":We}),children:[so&&(0,St.jsx)(Fr.TextControl,{ref:A,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,ka.__)("Text"),value:j?.title,onChange:K,onKeyDown:_e,__next40pxDefaultSize:!0}),(0,St.jsx)(Mte,{ref:L,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:rt,withCreateSuggestion:f,onCreateSuggestion:re,onChange:F,onSelect:le,showInitialSuggestions:c,allowDirectEntry:!s,showSuggestions:a,suggestionsQuery:p,withURLSuggestion:!h,createSuggestionButtonText:g,hideLabelFromVision:!so,isEntity:Q,suffix:(0,St.jsx)(F1e,{isEntity:Q,showActions:We,isDisabled:ao,onUnlink:Ct,onSubmit:ye,helpTextId:ee})}),Q&&ee&&(0,St.jsx)("p",{id:ee,className:"block-editor-link-control__help",children:(0,ka.sprintf)((0,ka.__)("Synced with the selected %s."),j?.type||"item")})]}),H&&(0,St.jsx)(Fr.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:H})]}),t&&!de&&!W&&(0,St.jsx)(Wte,{value:Kr,onEditClick:()=>X(!0),hasRichPreviews:b,hasUnlinkControl:Ft,onRemove:()=>{n(),X(!0)}},Kr?.url),qn&&(0,St.jsx)("div",{className:"block-editor-link-control__tools",children:!Vt&&(0,St.jsx)(pte,{settingsOpen:R,setSettingsOpen:P,children:(0,St.jsx)(Kte,{value:j,settings:o,onChange:Z(G)})})}),We&&(0,St.jsxs)(Fr.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,St.jsx)(Fr.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:go,children:(0,ka.__)("Cancel")}),(0,St.jsx)(Fr.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:ao?HV:ye,className:"block-editor-link-control__search-submit","aria-disabled":ao,children:(0,ka.__)("Apply")})]}),!W&&y&&y()]})}function F1e({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,St.jsx)(Fr.Button,{icon:ei,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,ka.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,St.jsx)(Fr.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,St.jsx)(Fr.Button,{onClick:o?HV:n,label:(0,ka.__)("Submit"),icon:el,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}wm.ViewerFill=Fte;wm.DEFAULT_LINK_SETTINGS=VV;var qT=e=>((0,soe.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,St.jsx)(wm,{...e}));qT.ViewerFill=wm.ViewerFill;qT.DEFAULT_LINK_SETTINGS=wm.DEFAULT_LINK_SETTINGS;var sd=wm;var loe=l(M()),coe=l(O()),uoe=l(Oe());var m_=1.5,GV=.01,WV=10,$V="";function aoe(e){return e!==void 0&&e!==$V}var KV=l(x()),z1e=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=aoe(t),s=(d,f)=>{if(i)return d;let m=GV*WV;switch(`$d}`){case`$m}`:return m_+m;case"0":return f?d:m_-m;case"":return m_;default:return d}},a=(d,f)=>{let m=["insertText","insertFromPaste"].includes(f.payload.event.nativeEvent?.inputType),p=s(d.value,m);return{...d,value:p}},c=i?t:$V,u=(d,{event:f})=>{if(d===""){o();return}if(f.type==="click"){o(s(`$d}`,!1));return}o(`$d}`)};return!e&&(n.size===void 0||n.size==="default")&&(0,uoe.default)("36px default size for wp.blockEditor.LineHeightControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,KV.jsx)("div",{className:"block-editor-line-height-control",children:(0,KV.jsx)(coe.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,loe.__)("Line height"),placeholder:m_,step:GV,spinFactor:WV,value:c,min:0,spinControls:"custom"})})},YT=z1e;var va=l(M()),doe=l(Fo()),zr=l(O()),XT=l(D()),foe=l(st());var moe=l(Y()),poe=l(ze()),hoe=l(ii()),goe=l(I());function ZT(e,t,o){if(o)return o;if(!t||typeof t!="object"||Object.keys(t).length===0)return e&&e.length>0?e.map(n=>`$n}/*`).join(","):void 0;if(!e||e.length===0)return;let r=[];for(let[,n]of Object.entries(t))e.some(s=>s.includes("/")?n===s:n.startsWith(`$s}/`))&&r.push(n);return r.length>0?r.join(","):e.map(n=>`$n}/*`).join(",")}var qo=l(x()),j1e=()=>{},U1e=0,H1e=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=j1e,name:m=(0,va.__)("Replace"),createNotice:p,removeNotice:h,children:g,multiple:b=!1,addToGallery:k,handleUpload:y=!0,popoverProps:v,renderToggle:S,className:w})=>{let{mediaUpload:C,allowedMimeTypes:E}=(0,XT.useSelect)(j=>{let{getSettings:N}=j(_),F=N();return{mediaUpload:F.mediaUpload,allowedMimeTypes:F.allowedMimeTypes}},[]),P=`block-editor/media-replace-flow/error-notice/${++U1e}`,R=(0,goe.useMemo)(()=>ZT(r,E,n),[r,E,n]),B=j=>{let N=(0,poe.__unstableStripHTML)(j);if(i){i(N);return}setTimeout(()=>{p("error",N,{speak:!0,id:P,isDismissible:!0})},1e3)},T=(j,N)=>{d&&u&&u(),N(),s(j),(0,doe.speak)((0,va.__)("The media file has been replaced")),h(P)},A=(j,N)=>{let F=j.target.files;if(!y)return N(),s(F);f(F),C({allowedTypes:r,filesList:F,onFileChange:([K])=>{T(K,N)},onError:B})},L=j=>{j.keyCode===foe.DOWN&&(j.preventDefault(),j.target.click())},G=b&&(!r||r.length===0?!1:r.every(j=>j==="image"||j.startsWith("image/")));return(0,qo.jsx)(zr.Dropdown,{popoverProps:v,className:w,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:j,onToggle:N})=>S?S({"aria-expanded":j,"aria-haspopup":"true",onClick:N,onKeyDown:L,children:m}):(0,qo.jsx)(zr.ToolbarButton,{"aria-expanded":j,"aria-haspopup":"true",onClick:N,onKeyDown:L,children:m}),renderContent:({onClose:j})=>(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsxs)(zr.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,qo.jsxs)(ds,{children:[(0,qo.jsx)(Su,{gallery:G,addToGallery:k,multiple:b,value:b?o:t,onSelect:N=>T(N,j),allowedTypes:r,render:({open:N})=>(0,qo.jsx)(zr.MenuItem,{icon:vp,onClick:N,children:(0,va.__)("Open Media Library")})}),(0,qo.jsx)(zr.FormFileUpload,{onChange:N=>{A(N,j)},accept:R,multiple:!!b,render:({openFileDialog:N})=>(0,qo.jsx)(zr.MenuItem,{icon:bL,onClick:()=>{N()},children:(0,va._x)("Upload","verb")})})]}),u&&(0,qo.jsx)(zr.MenuItem,{icon:TA,onClick:u,isPressed:d,children:(0,va.__)("Use featured image")}),e&&c&&(0,qo.jsx)(zr.MenuItem,{onClick:()=>{c(),j()},children:(0,va.__)("Reset")}),typeof g=="function"?g({onClose:j}):g]}),a&&(0,qo.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,qo.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,va.__)("Current media URL:")}),(0,qo.jsx)(sd,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:N})=>{a(N)},searchInputPlaceholder:(0,va.__)("Paste or type URL")})]})]})})},Yg=(0,moe.compose)([(0,XT.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(hoe.store);return{createNotice:t,removeNotice:o}}),(0,zr.withFilters)("editor.MediaReplaceFlow")])(H1e);var po=l(O()),mo=l(M()),ud=l(I()),Poe=l(D());var Ooe=l(Oe());var YV=l(M()),JT=l(I()),Zg=l(O());var Ioe=l(Oe());var voe=l(M()),yoe=l(O());var boe=l(O()),QT=l(Zr()),qV=l(x());function koe({url:e,urlLabel:t,className:o}){let r=V(o,"block-editor-url-popover__link-viewer-url");return e?(0,qV.jsx)(boe.ExternalLink,{className:r,href:e,children:t||(0,QT.filterURLForDisplay)((0,QT.safeDecodeURI)(e))}):(0,qV.jsx)("span",{className:r})}var p_=l(x());function _oe({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,p_.jsxs)("div",{className:V("block-editor-url-popover__link-viewer",e),...i,children:[(0,p_.jsx)(koe,{url:r,urlLabel:n,className:t}),o&&(0,p_.jsx)(yoe.Button,{icon:Pk,label:(0,voe.__)("Edit"),onClick:o,size:"compact"})]})}var Boe=l(M()),Eoe=l(O());var oc=l(M()),h_=l(I()),Cs=l(st()),Pi=l(O()),ad=l(Y()),Soe=l(D()),xoe=l(Zr());var ya=l(x()),woe=l(Gs());function Coe(e){return typeof e=="function"}var G1e=class extends h_.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,h_.createRef)(),this.inputRef=e.inputRef||(0,h_.createRef)(),this.updateSuggestions=(0,ad.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){let{showSuggestions:t,selectedSuggestion:o}=this.state,{value:r,__experimentalShowInitialSuggestions:n=!1}=this.props;t&&o!==null&&this.suggestionNodes[o]&&this.suggestionNodes[o].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value!==r&&!this.props.disableSuggestions&&(r?.length?this.updateSuggestions(r):n&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){let{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){let{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:o}=this.props;if(!t)return;let r=!e?.length;if(e=e.trim(),!r&&(e.length<2||!o&&(0,xoe.isURL)(e))){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});return}this.setState({selectedSuggestion:null,loading:!0});let n=t(e,{isInitialSuggestions:r});n.then(i=>{this.suggestionsRequest===n&&(this.setState({suggestions:i,suggestionsValue:e,loading:!1,showSuggestions:!!i.length}),i.length?this.props.debouncedSpeak((0,oc.sprintf)((0,oc._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",i.length),i.length),"assertive"):this.props.debouncedSpeak((0,oc.__)("No results."),"assertive"))}).catch(()=>{this.suggestionsRequest===n&&this.setState({loading:!1})}).finally(()=>{this.suggestionsRequest===n&&(this.suggestionsRequest=null)}),this.suggestionsRequest=n}onChange(e){this.props.onChange(e)}onFocus(){let{suggestions:e}=this.state,{disableSuggestions:t,value:o}=this.props;o&&!t&&!(e&&e.length)&&this.suggestionsRequest===null&&this.updateSuggestions(o)}onKeyDown(e){this.props.onKeyDown?.(e);let{showSuggestions:t,selectedSuggestion:o,suggestions:r,loading:n}=this.state;if(!t||!r.length||n){switch(e.keyCode){case Cs.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case Cs.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case Cs.ENTER:{this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e));break}}return}let i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Cs.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case Cs.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case Cs.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,oc.__)("Link selected.")));break}case Cs.ENTER:{e.preventDefault(),this.state.selectedSuggestion!==null?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e);break}}}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({value:e,instanceId:t,disableSuggestions:o,__experimentalShowInitialSuggestions:r=!1},{showSuggestions:n}){let i=n,s=e&&e.length;return!r&&!s&&(i=!1),o===!0&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,ya.jsxs)(ya.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,oc.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:a=!1,help:c=null,disabled:u=!1}=this.props,{loading:d,showSuggestions:f,selectedSuggestion:m,suggestionsListboxId:p,suggestionOptionIdPrefix:h}=this.state,g=`url-input-control-${r}`,b={id:g,label:e,className:V("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},k={id:g,value:s,required:!0,type:"text",onChange:u?()=>{}:this.onChange,onFocus:u?()=>{}:this.onFocus,placeholder:n,onKeyDown:u?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,oc.__)("URL"),"aria-expanded":f,"aria-autocomplete":"list","aria-owns":p,"aria-activedescendant":m!==null?`${h}-${m}`:void 0,ref:this.inputRef,disabled:u,suffix:this.props.suffix,help:c};return i?i(b,k,d):(0,ya.jsxs)(Pi.BaseControl,{...b,children:[(0,ya.jsx)(Pi.__experimentalInputControl,{...k,__next40pxDefaultSize:!0}),d&&(0,ya.jsx)(Pi.Spinner,{})]})}renderSuggestions(){let{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:o,suggestions:r,suggestionsValue:n,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:a,loading:c}=this.state;if(!o||r.length===0)return null;let u={id:s,ref:this.autocompleteRef,role:"listbox"},d=(f,m)=>({role:"option",tabIndex:"-1",id:`${a}-${m}`,ref:this.bindSuggestionNode(m),"aria-selected":m===i?!0:void 0});return Coe(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,ya.jsx)(Pi.Popover,{placement:"bottom",focusOnMount:!1,children:(0,ya.jsx)("div",{...u,className:V("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,woe.createElement)(Pi.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:V("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},nd=(0,ad.compose)(ad.withSafeTimeout,Pi.withSpokenMessages,ad.withInstanceId,(0,Soe.withSelect)((e,t)=>{if(Coe(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(_);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(G1e);var g_=l(x());function Toe({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,g_.jsxs)("form",{className:V("block-editor-url-popover__link-editor",t),...n,children:[(0,g_.jsx)(nd,{value:r,onChange:o,autocompleteRef:e}),(0,g_.jsx)(Eoe.Button,{icon:el,label:(0,Boe.__)("Apply"),type:"submit",size:"compact"})]})}var ld=l(x()),{__experimentalPopoverLegacyPositionToPlacement:W1e}=z(Zg.privateApis),$1e="bottom",ZV=(0,JT.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,Ioe.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=W1e(i)),c=c||$1e;let[u,d]=(0,JT.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,ld.jsxs)(Zg.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,YV.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,ld.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,ld.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,ld.jsx)(Zg.Button,{className:"block-editor-url-popover__settings-toggle",icon:_n,label:(0,YV.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,ld.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,ld.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});ZV.LinkEditor=Toe;ZV.LinkViewer=_oe;var cd=ZV;var Ue=l(x()),K1e=()=>{},q1e=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,Ue.jsx)(cd,{anchor:n,onClose:r,children:(0,Ue.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,Ue.jsx)(po.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,mo.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,mo.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,Ue.jsx)(po.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ue.jsx)(po.Button,{size:"small",icon:el,label:(0,mo.__)("Apply"),type:"submit"})})})})}),Y1e=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,ud.useState)(null),[i,s]=(0,ud.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,Ue.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,Ue.jsx)(po.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,mo.__)("Insert from URL")}),i&&(0,Ue.jsx)(q1e,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function Z1e({value:e={},allowedTypes:t,className:o,icon:r,labels:n={},mediaPreview:i,notices:s,isAppender:a,accept:c,addToGallery:u,multiple:d=!1,handleUpload:f=!0,disableDropZone:m,disableMediaButtons:p,onError:h,onSelect:g,onCancel:b,onSelectURL:k,onToggleFeaturedImage:y,onDoubleClick:v,onFilesPreUpload:S=K1e,onHTMLDrop:w,children:C,mediaLibraryButton:E,placeholder:P,style:R}){w&&(0,Ooe.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:B,allowedMimeTypes:T}=(0,Poe.useSelect)(X=>{let{getSettings:re}=X(_),W=re();return{mediaUpload:W.mediaUpload,allowedMimeTypes:W.allowedMimeTypes}},[]),[A,L]=(0,ud.useState)("");(0,ud.useEffect)(()=>{L(e?.src??"")},[e?.src]);let U=(0,ud.useMemo)(()=>ZT(t,T,c),[t,T,c]),G=()=>!t||t.length===0?!1:t.every(X=>X==="image"||X.startsWith("image/")),j=X=>{if(!f||typeof f=="function"&&!f(X))return g(X);S(X);let re;if(d)if(u){let W=[];re=H=>{let oe=(e??[]).filter(ce=>ce.id?!W.some(({id:le})=>Number(le)===Number(ce.id)):!W.some(({urlSlug:le})=>ce.url.includes(le)));g(oe.concat(H)),W=H.map(ce=>{let le=ce.url.lastIndexOf("."),ye=ce.url.slice(0,le);return{id:ce.id,urlSlug:ye}})}}else re=g;else re=([W])=>g(W);B({allowedTypes:t,filesList:X,onFileChange:re,onError:h,multiple:d})};async function N(X){let{blocks:re}=AD(X);if(!re?.length)return;let W=await Promise.all(re.map(H=>{let oe=H.name.split("/")[1];return H.attributes.id?(H.attributes.type=oe,H.attributes):new Promise((ce,le)=>{window.fetch(H.attributes.url).then(ye=>ye.blob()).then(ye=>B({filesList:[ye],additionalData:{title:H.attributes.title,alt_text:H.attributes.alt,caption:H.attributes.caption,type:oe},onFileChange:([_e])=>{_e.id&&ce(_e)},allowedTypes:t,onError:le})).catch(()=>ce(H.attributes.url))})})).catch(H=>h(H));W?.length&&g(d?W:W[0])}let F=X=>{j(X.target.files)},Z=P??(X=>{let{instructions:re,title:W}=n;if(!B&&!k&&(re=(0,mo.__)("To edit this block, you need permission to upload media.")),re===void 0||W===void 0){let oe=t??[],[ce]=oe,le=oe.length===1,ye=le&&ce==="audio",_e=le&&ce==="image",Ve=le&&ce==="video";re===void 0&&B&&(re=(0,mo.__)("Drag and drop an image or video, upload, or choose from your library."),ye?re=(0,mo.__)("Drag and drop an audio file, upload, or choose from your library."):_e?re=(0,mo.__)("Drag and drop an image, upload, or choose from your library."):Ve&&(re=(0,mo.__)("Drag and drop a video, upload, or choose from your library."))),W===void 0&&(W=(0,mo.__)("Media"),ye?W=(0,mo.__)("Audio"):_e?W=(0,mo.__)("Image"):Ve&&(W=(0,mo.__)("Video")))}let H=V("block-editor-media-placeholder",o,{"is-appender":a});return(0,Ue.jsxs)(po.Placeholder,{icon:r,label:W,instructions:re,className:H,notices:s,onDoubleClick:v,preview:i,style:R,children:[X,C]})}),Q=()=>m?null:(0,Ue.jsx)(po.DropZone,{onFilesDrop:j,onDrop:N,isEligible:X=>{let re="wp-block:core/",W=[];for(let H of X.types)H.startsWith(re)&&W.push(H.slice(re.length));return W.every(H=>t.includes(H))&&(d?!0:W.length===1)}}),J=()=>b&&(0,Ue.jsx)(po.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,mo.__)("Cancel"),variant:"link",onClick:b,children:(0,mo.__)("Cancel")}),ee=()=>k&&(0,Ue.jsx)(Y1e,{src:A,onChangeSrc:L,onSelectURL:k}),ie=()=>y&&(0,Ue.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,Ue.jsx)(po.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:y,variant:"secondary",children:(0,mo.__)("Use featured image")})}),de=()=>{let re=E??(({open:H})=>(0,Ue.jsx)(po.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{H()},children:(0,mo.__)("Media Library")})),W=(0,Ue.jsx)(Su,{addToGallery:u,gallery:d&&G(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:H})=>H):e.id,render:re});if(B&&a)return(0,Ue.jsxs)(Ue.Fragment,{children:[Q(),(0,Ue.jsx)(po.FormFileUpload,{onChange:F,accept:U,multiple:!!d,render:({openFileDialog:H})=>{let oe=(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)(po.Button,{__next40pxDefaultSize:!0,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:H,children:(0,mo._x)("Upload","verb")}),W,ee(),ie(),J()]});return Z(oe)}})]});if(B){let H=(0,Ue.jsxs)(Ue.Fragment,{children:[Q(),(0,Ue.jsx)(po.FormFileUpload,{render:({openFileDialog:oe})=>(0,Ue.jsx)(po.Button,{__next40pxDefaultSize:!0,onClick:oe,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,mo._x)("Upload","verb")}),onChange:F,accept:U,multiple:!!d}),W,ee(),ie(),J()]});return Z(H)}return Z(W)};return p?(0,Ue.jsx)(ds,{children:Q()}):(0,Ue.jsx)(ds,{fallback:Z(ee()),children:de()})}var Roe=(0,po.withFilters)("editor.MediaPlaceholder")(Z1e);var Aoe=l(x()),X1e=({colorSettings:e,...t})=>{let o=e.map(r=>{if(!r)return r;let{value:n,onChange:i,...s}=r;return{...s,colorValue:n,onColorChange:i}});return(0,Aoe.jsx)(ST,{settings:o,gradients:[],disableCustomGradients:!0,...t})},Loe=X1e;var Rre=l(_M());var Are=l(I());var Ire=l(I());var wre=l(Kd()),hr=l(I()),fd=l(D()),gI=l(Y()),bI=l(Vo()),Cre=l(O()),Bre=l($()),Ere=l(Oe()),ib=l(M());var Moe=l(M()),eI=l(O());var XV=l(M()),Cm=l(O());var rc=l(x()),Q1e={placement:"bottom-start"},J1e=()=>(0,rc.jsxs)(rc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,rc.jsx)(Cm.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,rc.jsx)(Cm.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,rc.jsx)(Cm.ToolbarItem,{children:r=>(0,rc.jsx)(Cm.DropdownMenu,{icon:_n,label:(0,XV.__)("More"),toggleProps:{...r,className:V(r.className,{"is-pressed":o}),description:(0,XV.__)("Displays more block tools")},controls:zs(e.map(([{props:n}])=>n),"title"),popoverProps:Q1e})})}})]}),QV=J1e;var dd=l(x());function eBe({popoverAnchor:e}){return(0,dd.jsx)(eI.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,dd.jsx)(tg,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,Moe.__)("Format tools"),children:(0,dd.jsx)(eI.ToolbarGroup,{children:(0,dd.jsx)(QV,{})})})})}var tBe=({inline:e,editableContentElement:t})=>e?(0,dd.jsx)(eBe,{popoverAnchor:t}):(0,dd.jsx)(mt,{group:"inline",children:(0,dd.jsx)(QV,{})}),Noe=tBe;var tI=l(I()),Doe=l(D());function Voe({html:e,value:t}){let o=(0,tI.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,Doe.useDispatch)(_);(0,tI.useLayoutEffect)(()=>{if(!o.current){o.current=t.text;return}if(o.current!==t.text){let i=window.setTimeout(()=>{n()},1e3);return o.current=t.text,()=>{window.clearTimeout(i)}}n()},[e,r])}var zoe=l(I()),b_=l(D()),joe=l(Vo());function oBe(e){return e(joe.store).getFormatTypes()}var rBe=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function nBe(e,t){return typeof e!="object"?{[t]:e}:Object.fromEntries(Object.entries(e).map(([o,r])=>[`${t}.${o}`,r]))}function Foe(e,t){return e[t]?e[t]:Object.keys(e).filter(o=>o.startsWith(t+".")).reduce((o,r)=>(o[r.slice(t.length+1)]=e[r],o),{})}function oI({clientId:e,identifier:t,allowedFormats:o,withoutInteractiveFormatting:r,disableNoneEssentialFormatting:n=!1}){let i=(0,b_.useSelect)(oBe,[]),s=(0,zoe.useMemo)(()=>i.filter(({name:p,interactive:h,tagName:g,[RS]:b})=>!(o&&!o.includes(p)||n&&!b||r&&(h||rBe.has(g)))),[i,o,n,r]),a=(0,b_.useSelect)(p=>s.reduce((h,g)=>g.__experimentalGetPropsForEditableTreePreparation?{...h,...nBe(g.__experimentalGetPropsForEditableTreePreparation(p,{richTextIdentifier:t,blockClientId:e}),g.name)}:h,{}),[s,e,t]),c=(0,b_.useDispatch)(),u=[],d=[],f=[],m=[];for(let p in a)m.push(a[p]);return s.forEach(p=>{if(p.__experimentalCreatePrepareEditableTree){let h=p.__experimentalCreatePrepareEditableTree(Foe(a,p.name),{richTextIdentifier:t,blockClientId:e});p.__experimentalCreateOnChangeEditableValue?d.push(h):u.push(h)}if(p.__experimentalCreateOnChangeEditableValue){let h={};p.__experimentalGetPropsForEditableTreeChangeHandler&&(h=p.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:t,blockClientId:e}));let g=Foe(a,p.name);f.push(p.__experimentalCreateOnChangeEditableValue({...typeof g=="object"?g:{},...h},{richTextIdentifier:t,blockClientId:e}))}}),{formatTypes:s,prepareHandlers:u,valueHandlers:d,changeHandlers:f,dependencies:m}}var Qg=l(I()),sre=l(Y());var k_=l(Vo()),Uoe=l(nt());var iBe=["`",'"',"'","\u201C\u201D","\u2018\u2019"],Hoe=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,k_.isCollapsed)(s))return;let u=(0,Uoe.applyFilters)("blockEditor.wrapSelectionSettings",iBe).find(([w,C])=>w===i||C===i);if(!u)return;let[d,f=d]=u,m=s.start,p=s.end+d.length,h=(0,k_.insert)(s,d,m,m);h=(0,k_.insert)(h,f,p,p);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=c.dispatch(_);g(),a(h),b();let k={};for(let w in r)k[w]=r[w];k.data=f;let{ownerDocument:y}=t,{defaultView:v}=y,S=new v.InputEvent("input",k);window.queueMicrotask(()=>{r.target.dispatchEvent(S)}),r.preventDefault()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var rI=l(Vo()),nI=l($());var Goe=l(Vo());function Woe(e){let t="tales of gutenberg",o=" \u{1F421}\u{1F422}\u{1F980}\u{1F424}\u{1F98B}\u{1F418}\u{1F427}\u{1F439}\u{1F981}\u{1F984}\u{1F98D}\u{1F43C}\u{1F43F}\u{1F383}\u{1F434}\u{1F41D}\u{1F406}\u{1F995}\u{1F994}\u{1F331}\u{1F347}\u03C0\u{1F34C}\u{1F409}\u{1F4A7}\u{1F968}\u{1F30C}\u{1F342}\u{1F360}\u{1F966}\u{1F95A}\u{1F95D}\u{1F39F}\u{1F965}\u{1F952}\u{1F6F5}\u{1F956}\u{1F352}\u{1F36F}\u{1F3BE}\u{1F3B2}\u{1F43A}\u{1F41A}\u{1F42E}\u231B\uFE0F",{start:r,text:n}=e;return r<t.length||n.slice(r-t.length,r).toLowerCase()!==t?e:(0,Goe.insert)(e,o)}function $oe(e){let t=e.length;for(;t--;){let o=Jk(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(ul,""),[e[t].clientId,o,0,0];let r=$oe(e[t].innerBlocks);if(r)return r}return[]}var Koe=e=>t=>{function o(){let{getValue:n,onReplace:i,selectionChange:s,registry:a}=e.current;if(!i)return;let c=n(),{start:u,text:d}=c;if(d.slice(u-1,u)!==" ")return;let m=d.slice(0,u).trim(),p=(0,nI.getBlockTransforms)("from").filter(({type:k})=>k==="prefix"),h=(0,nI.findTransform)(p,({prefix:k})=>m===k);if(!h)return;let g=(0,rI.toHTMLString)({value:(0,rI.insert)(c,ul,0,u)}),b=h.transform(g);return s(...$oe([b])),i([b]),a.dispatch(_).__unstableMarkAutomaticChange(),!0}function r(n){let{inputType:i,type:s}=n,{getValue:a,onChange:c,__unstableAllowPrefixTransformations:u,formatTypes:d,registry:f}=e.current;if(i!=="insertText"&&s!=="compositionend"||u&&o())return;let m=a(),p=d.reduce((b,{__unstableInputRule:k})=>(k&&(b=k(b)),b),Woe(m)),{__unstableMarkLastChangeAsPersistent:h,__unstableMarkAutomaticChange:g}=f.dispatch(_);p!==m&&(h(),c({...p,activeFormats:m.activeFormats}),g())}return t.addEventListener("input",r),t.addEventListener("compositionend",r),()=>{t.removeEventListener("input",r),t.removeEventListener("compositionend",r)}};var qoe=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(_).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var iI=l(st()),Yoe=()=>e=>{function t(o){(iI.isKeyboardEvent.primary(o,"z")||iI.isKeyboardEvent.primary(o,"y")||iI.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var Zoe=e=>t=>{let{keyboardShortcuts:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r)}};var Xoe=e=>t=>{let{inputEvents:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("input",r),()=>{t.removeEventListener("input",r)}};var sI=l(st());var Qoe=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==sI.BACKSPACE&&n!==sI.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(_),{__experimentalUndo:c}=a();c&&s()&&(r.preventDefault(),c())}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var ere=l($()),_a=l(Vo()),tre=l(Zr());var sBe=l(I()),aBe=l($()),lBe=l(x());function Joe(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function aI(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Xg({allowedFormats:e,disableFormats:t}){return t?Xg.EMPTY_ARRAY:e}Xg.EMPTY_ARRAY=[];var ore=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:c,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:p}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:h,html:g}=ch(n);if(n.preventDefault(),window.console.log(`Received HTML: 171 172 `,g),window.console.log(`Received plain text: 173 174 `,h),i){s((0,_a.insert)(a,h));return}let b=n.clipboardData.getData("rich-text")==="true";function k(w){let C=c.reduce((E,{__unstablePasteRule:P})=>(P&&E===a&&(E=P(a,{html:g,plainText:h})),E),a);if(C!==a)s(C);else{let E=(0,_a.create)({html:w});Joe(E,a.activeFormats),s((0,_a.insert)(a,E))}}if(b){k(g);return}if(p){s((0,_a.insert)(a,(0,_a.create)({text:h})));return}let y="INLINE",v=h.trim();f&&(0,_a.isEmpty)(a)&&(0,tre.isURL)(v)&&/^https?:/.test(v)&&(y="BLOCKS");let S=(0,ere.pasteHandler)({HTML:g,plainText:h,mode:y,tagName:u,preserveWhiteSpace:m});typeof S=="string"?k(S):S.length>0&&d&&(0,_a.isEmpty)(a)&&d(S,S.length-1,-1)}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var v_=l(st()),lI=l(Vo()),rre=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===v_.DELETE||n===v_.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===v_.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,lI.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,lI.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var JV=l(st()),y_=l(Vo()),nre=e=>t=>{function o(i){if(i.keyCode!==JV.ENTER)return;let{onReplace:s,onSplit:a}=e.current;s&&a&&(i.__deprecatedOnSplit=!0)}function r(i){if(i.defaultPrevented||i.target!==t||i.keyCode!==JV.ENTER)return;let{value:s,onChange:a,disableLineBreaks:c,onSplitAtEnd:u,onSplitAtDoubleLineEnd:d,registry:f}=e.current;i.preventDefault();let{text:m,start:p,end:h}=s;i.shiftKey?c||a((0,y_.insert)(s,` 175 `)):u&&p===h&&h===m.length?u():d&&p===h&&h===m.length&&m.slice(-2)===` 176 177 `?f.batch(()=>{let g={...s};g.start=g.end-2,a((0,y_.remove)(g)),d()}):c||a((0,y_.insert)(s,` 178 `))}let{defaultView:n}=t.ownerDocument;return n.addEventListener("keydown",r),t.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",r),t.removeEventListener("keydown",o)}};var ire=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(_).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var cBe=[Hoe,Koe,qoe,Yoe,Zoe,Xoe,Qoe,ore,rre,nre,ire];function cI(e){let t=(0,Qg.useRef)(e);(0,Qg.useInsertionEffect)(()=>{t.current=e});let o=(0,Qg.useMemo)(()=>cBe.map(r=>r(t)),[t]);return(0,sre.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var uI=l(Vo()),dI=l(I());var are=l(x()),lre=l(Gs()),uBe={},e3=Symbol("usesContext");function dBe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[e3]:c}=n,u=(0,dI.useContext)(Jn),d=(0,dI.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):uBe,[c,u]);if(!a)return null;let f=(0,uI.getActiveFormat)(o,s),m=f!==void 0,p=(0,uI.getActiveObject)(o),h=p!==void 0&&p.type===s;return(0,are.jsx)(a,{isActive:m,isVisible:i,activeAttributes:m?f.attributes||{}:{},isObjectActive:h,activeObjectAttributes:h?p.attributes||{}:{},value:o,onChange:e,onFocus:t,contentRef:r,context:d},s)}function fI({formatTypes:e,...t}){return e.map(o=>(0,lre.createElement)(dBe,{settings:o,...t,key:o.name}))}var cre=l(I()),ure=l($()),dre=l(Oe());var t3=l(x());function o3(e,t){if(Jg.isEmpty(e)){let o=aI(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,dre.default)("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),ure.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function __({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,t3.jsx)(cre.RawHTML,{children:o3(e,o)}),t?(0,t3.jsx)(t,{...n,children:e}):e}var gre=l(I()),n3=l($()),bre=l(Vo()),kre=l(Oe());var fre=l(I()),mre=l(Oe()),mI=l(D()),pre=l(st()),eb=l(Vo());var r3=l(x());function fBe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,mre.default)("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});let{clientId:c}=Ae(),{getSelectionStart:u,getSelectionEnd:d}=(0,mI.useSelect)(_),{selectionChange:f}=(0,mI.useDispatch)(_),m=aI(i);r=r||`<${m}></${m}>`;let h=`</${m}>${r}<${m}>`.split(`</${m}><${m}>`);h.shift(),h.pop();function g(b){n(`<${m}>${b.join(`</${m}><${m}>`)}</${m}>`)}return(0,r3.jsx)(o,{ref:a,children:h.map((b,k)=>(0,r3.jsx)(pI,{identifier:`${t}-${k}`,tagName:m,value:b,onChange:y=>{let v=h.slice();v[k]=y,g(v)},isSelected:void 0,onKeyDown:y=>{if(y.keyCode!==pre.ENTER)return;y.preventDefault();let{offset:v}=u(),{offset:S}=d();if(typeof v!="number"||typeof S!="number")return;let w=(0,eb.create)({html:b});w.start=v,w.end=S;let C=(0,eb.split)(w).map(P=>(0,eb.toHTMLString)({value:P})),E=h.slice();E.splice(k,1,...C),g(E),f(c,`${t}-${k+1}`,0,0)},onMerge:y=>{let v=h.slice(),S=0;if(y){if(!v[k+1])return;v.splice(k,2,v[k]+v[k+1]),S=v[k].length-1}else{if(!v[k-1])return;v.splice(k-1,2,v[k-1]+v[k]),S=v[k-1].length-1}g(v),f(c,`${t}-${k-(y?0:1)}`,S,S)},...s},k))})}var hre=(0,fre.forwardRef)(fBe);var vre=l(x());function yre(e){return(0,gre.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,kre.default)("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),r=n3.children.toHTML(t.value),n=s=>t.onChange(n3.children.fromDOM((0,bre.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?hre:e;return(0,vre.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var _re=l(st()),tb=l(I());function i3({character:e,type:t,onUse:o}){let r=(0,tb.useContext)(ob),n=(0,tb.useRef)();return n.current=o,(0,tb.useEffect)(()=>{function i(s){_re.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var hI=l(O()),Sre=l(st()),s3=l(x());function a3({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=Sre.displayShortcut[t](o)),(0,s3.jsx)(hI.Fill,{name:i,children:(0,s3.jsx)(hI.ToolbarButton,{...r,shortcut:n})})}var rb=l(I());function l3({inputType:e,onInput:t}){let o=(0,rb.useContext)(nb),r=(0,rb.useRef)();return r.current=t,(0,rb.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var Gn=l(x()),ob=(0,hr.createContext)();ob.displayName="keyboardShortcutContext";var nb=(0,hr.createContext)();nb.displayName="inputEventContext";var xre=Symbol("instanceId");function Tre(e){let{__unstableMobileNoFocusOnMount:t,deleteEnter:o,placeholderTextColor:r,textAlign:n,selectionColor:i,tagsToEliminate:s,disableEditingMenu:a,fontSize:c,fontFamily:u,fontWeight:d,fontStyle:f,minWidth:m,maxWidth:p,disableSuggestions:h,disableAutocorrection:g,...b}=e;return b}function pI({children:e,tagName:t="div",value:o="",onChange:r,isSelected:n,multiline:i,inlineToolbar:s,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:f,withoutInteractiveFormatting:m,onRemove:p,onMerge:h,onSplit:g,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:k,identifier:y,preserveWhiteSpace:v,__unstablePastePlainText:S,__unstableEmbedURLOnPaste:w,__unstableDisableFormats:C,disableLineBreaks:E,__unstableAllowPrefixTransformations:P,readOnly:R,...B},T){B=Tre(B),g&&(0,Ere.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let A=(0,gI.useInstanceId)(pI),L=(0,hr.useRef)(),[U,G]=(0,hr.useState)(null),j=Ae(),{clientId:N,isSelected:F,name:K}=j,Z=j[sp],Q=(0,hr.useContext)(Jn),J=(0,fd.useRegistry)(),ee=Re=>{if(!F)return{isSelected:!1};let{getSelectionStart:Se,getSelectionEnd:Bt,getBlockEditingMode:ae}=Re(_),Me=Se(),qr=Bt(),Yr;return n===void 0?Yr=Me.clientId===N&&qr.clientId===N&&(y?Me.attributeKey===y:Me[xre]===A):n&&(Yr=Me.clientId===N),{selectionStart:Yr?Me.offset:void 0,selectionEnd:Yr?qr.offset:void 0,isSelected:Yr,isContentOnly:ae(N)==="contentOnly"}},{selectionStart:ie,selectionEnd:de,isSelected:X,isContentOnly:re}=(0,fd.useSelect)(ee,[N,y,A,n,F]),{disableBoundBlock:W,bindingsPlaceholder:H,bindingsLabel:oe}=(0,fd.useSelect)(Re=>{if(!Z?.[y])return{};let{__experimentalBlockBindingsSupportedAttributes:Se}=Re(_).getSettings();if(!Se?.[K])return{};let ae=Z[y],Me=(0,Bre.getBlockBindingsSource)(ae.source),qr={};if(Me?.usesContext?.length)for(let Wd of Me.usesContext)qr[Wd]=Q[Wd];let Yr=!Me?.canUserEditValue?.({select:Re,context:qr,args:ae.args});if(o.length>0)return{disableBoundBlock:Yr,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:ak}=Re(_),Hd=ak(N),Gd=null;Me?.getFieldsList&&(Gd=Me.getFieldsList({select:Re,context:qr})?.find(ck=>(0,wre.default)(ck.args,ae?.args))?.label);let np=Gd??Me?.label,Ka=Yr?np:(0,ib.sprintf)((0,ib.__)("Add %s"),np),lk=Yr?ae?.args?.key||Me?.label:(0,ib.sprintf)((0,ib.__)("Empty %s; start writing to edit its value"),ae?.args?.key||Me?.label);return{disableBoundBlock:Yr,bindingsPlaceholder:Hd?.placeholder||Ka,bindingsLabel:lk}},[Z,y,K,o,N,Q]),ce=!!Q?.["pattern/overrides"],le=Z?.__default?.source==="core/pattern-overrides",_e=R||W||ce&&!le,{getSelectionStart:Ve,getSelectionEnd:go,getBlockRootClientId:ot}=(0,fd.useSelect)(_),{selectionChange:Yt}=(0,fd.useDispatch)(_),Ct=Xg({allowedFormats:f,disableFormats:C}),rt=!Ct||Ct.length>0,Vt=(0,hr.useCallback)((Re,Se)=>{let Bt={},ae=Re===void 0&&Se===void 0,Me={clientId:N,[y?"attributeKey":xre]:y||A};if(typeof Re=="number"||ae){if(Se===void 0&&ot(N)!==ot(go().clientId))return;Bt.start={...Me,offset:Re}}if(typeof Se=="number"||ae){if(Re===void 0&&ot(N)!==ot(Ve().clientId))return;Bt.end={...Me,offset:Se}}Yt(Bt)},[N,ot,go,Ve,y,A,Yt]),{formatTypes:Ft,prepareHandlers:We,valueHandlers:so,changeHandlers:dt,dependencies:ao}=oI({clientId:N,identifier:y,allowedFormats:Ct,withoutInteractiveFormatting:m,disableNoneEssentialFormatting:re});function qn(Re){return so.reduce((Se,Bt)=>Bt(Se,Re.text),Re.formats)}function Kr(Re){return Ft.forEach(Se=>{Se.__experimentalCreatePrepareEditableTree&&(Re=(0,bI.removeFormat)(Re,Se.name,0,Re.text.length))}),Re.formats}function Fe(Re){return We.reduce((Se,Bt)=>Bt(Se,Re.text),Re.formats)}let{value:bo,getValue:Zt,onChange:me,ref:wo}=(0,bI.__unstableUseRichText)({value:o,onChange(Re,{__unstableFormats:Se,__unstableText:Bt}){r(Re),Object.values(dt).forEach(ae=>{ae(Se,Bt)})},selectionStart:ie,selectionEnd:de,onSelectionChange:Vt,placeholder:H||d,__unstableIsSelected:X,__unstableDisableFormats:C,preserveWhiteSpace:v,__unstableDependencies:[...ao,t],__unstableAfterParse:qn,__unstableBeforeSerialize:Kr,__unstableAddInvisibleFormats:Fe}),Co=mj({onReplace:u,completers:c,record:bo,onChange:me});Voe({html:o,value:bo});let Yn=(0,hr.useRef)(new Set),Zn=(0,hr.useRef)(new Set);function dr(){L.current?.focus()}let $a=t;return(0,Gn.jsxs)(Gn.Fragment,{children:[X&&(0,Gn.jsx)(ob.Provider,{value:Yn,children:(0,Gn.jsx)(nb.Provider,{value:Zn,children:(0,Gn.jsxs)(Cre.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:bo,onChange:me,onFocus:dr}),(0,Gn.jsx)(fI,{value:bo,onChange:me,onFocus:dr,formatTypes:Ft,forwardedRef:L})]})})}),X&&rt&&(0,Gn.jsx)(Noe,{inline:s,editableContentElement:U}),(0,Gn.jsx)($a,{role:"textbox","aria-multiline":!E,"aria-readonly":_e,...B,draggable:void 0,"aria-label":oe||B["aria-label"]||d,...Co,ref:(0,gI.useMergeRefs)([wo,T,Co.ref,B.ref,cI({registry:J,getValue:Zt,onChange:me,__unstableAllowPrefixTransformations:P,formatTypes:Ft,onReplace:u,selectionChange:Yt,isSelected:X,disableFormats:C,value:bo,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:w,pastePlainText:S,onMerge:h,onRemove:p,removeEditorOnlyFormats:Kr,disableLineBreaks:E,onSplitAtEnd:b,onSplitAtDoubleLineEnd:k,keyboardShortcuts:Yn,inputEvents:Zn}),L,G]),contentEditable:!_e,suppressContentEditableWarning:!0,className:V("block-editor-rich-text__editable",B.className,"rich-text"),tabIndex:B.tabIndex===0&&!_e?null:B.tabIndex,"data-wp-block-attribute-key":y})]})}var S_=yre((0,hr.forwardRef)(pI));S_.Content=__;S_.isEmpty=e=>!e||e.length===0;var c3=(0,hr.forwardRef)((e,t)=>{if(Ae()[kS]){let{children:n,tagName:i="div",value:s,onChange:a,isSelected:c,multiline:u,inlineToolbar:d,wrapperClassName:f,autocompleters:m,onReplace:p,placeholder:h,allowedFormats:g,withoutInteractiveFormatting:b,onRemove:k,onMerge:y,onSplit:v,__unstableOnSplitAtEnd:S,__unstableOnSplitAtDoubleLineEnd:w,identifier:C,preserveWhiteSpace:E,__unstablePastePlainText:P,__unstableEmbedURLOnPaste:R,__unstableDisableFormats:B,disableLineBreaks:T,__unstableAllowPrefixTransformations:A,readOnly:L,...U}=Tre(e);return(0,Gn.jsx)(i,{ref:t,...U,dangerouslySetInnerHTML:{__html:o3(s,u)}})}return(0,Gn.jsx)(S_,{ref:t,...e,readOnly:!1})});c3.Content=__;c3.isEmpty=e=>!e||e.length===0;var Jg=c3;var u3=l(x()),Pre=(0,Ire.forwardRef)((e,t)=>(0,u3.jsx)(Jg,{ref:t,...e,__unstableDisableFormats:!0}));Pre.Content=({value:e="",tagName:t="div",...o})=>(0,u3.jsx)(t,{...o,children:e});var Ore=Pre;var d3=l(x()),mBe=(0,Are.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,d3.jsx)(Ore,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,d3.jsx)(Rre.default,{ref:o,className:V("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),Lre=mBe;var Sa=l(M()),Dre=l(I()),Vre=l(O());var Mre=l(Y()),Nre=l(O()),kI=l(M()),Bm=l(x());function vI({property:e,viewport:t,desc:o}){let r=(0,Mre.useInstanceId)(vI),n=o||(0,kI.sprintf)((0,kI._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."),e,t.label);return(0,Bm.jsxs)(Bm.Fragment,{children:[(0,Bm.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,Bm.jsx)(Nre.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`,children:n})]})}var xa=l(x());function pBe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,Sa._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,Sa.__)("Small screens")},{id:"medium",label:(0,Sa.__)("Medium screens")},{id:"large",label:(0,Sa.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,Sa.sprintf)((0,Sa.__)("Use the same %s on all screen sizes."),o),f=(0,Sa.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,xa.jsx)(vI,{property:o,viewport:c}),c),p=()=>u.map(h=>(0,xa.jsx)(Dre.Fragment,{children:i((0,xa.jsx)(vI,{property:o,viewport:h}),h)},h.id));return(0,xa.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,xa.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,xa.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,xa.jsx)(Vre.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,xa.jsxs)("div",{className:V("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):p())]})]})]})}var Fre=pBe;var yI=l(O());var zre=l(x());function jre({units:e,...t}){let[o]=fe("spacing.units"),r=(0,yI.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,zre.jsx)(yI.__experimentalUnitControl,{units:r,...t})}var x_=l(M()),Ure=l(I()),sb=l(O());var wa=l(x());function hBe({url:e,onChange:t}){let[o,r]=(0,Ure.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,wa.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,wa.jsx)(sb.Button,{size:"compact",icon:Xr,label:e?(0,x_.__)("Edit link"):(0,x_.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,wa.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,wa.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,wa.jsx)(sb.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:Zd,label:(0,x_.__)("Close"),onClick:r}),(0,wa.jsx)(nd,{value:e||"",onChange:t,suffix:(0,wa.jsx)(sb.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,wa.jsx)(sb.Button,{size:"small",icon:el,label:(0,x_.__)("Submit"),type:"submit"})})})]})})]})}var Hre=hBe;var pn=l(M()),Oi=l(I()),qre=l(ze()),Io=l(O());var Yre=l(Zr());var kt=l(x()),f3="none",Gre="custom",Wre="media",$re="attachment",Kre=["noreferrer","noopener"],Zre=({linkDestination:e,onChangeUrl:t,url:o,mediaType:r="image",mediaUrl:n,mediaLink:i,linkTarget:s,linkClass:a,rel:c,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:f,resetLightbox:m})=>{let[p,h]=(0,Oi.useState)(!1),[g,b]=(0,Oi.useState)(null),k=()=>{h(!0)},[y,v]=(0,Oi.useState)(!1),[S,w]=(0,Oi.useState)(null),C=(0,Oi.useRef)(null),E=(0,Oi.useRef)();(0,Oi.useEffect)(()=>{if(!E.current)return;(qre.focus.focusable.find(E.current)[0]||E.current).focus()},[y,o,d]);let P=()=>{(e===Wre||e===$re)&&w(""),v(!0)},R=()=>{v(!1)},B=()=>{w(null),R(),h(!1)},T=X=>{let re=X?"_blank":void 0,W;if(re){let H=(c??"").split(" ");Kre.forEach(oe=>{H.includes(oe)||H.push(oe)}),W=H.join(" ")}else{let H=(c??"").split(" ").filter(oe=>Kre.includes(oe)===!1);W=H.length?H.join(" "):void 0}return{linkTarget:re,rel:W}},A=()=>X=>{let re=C.current;re&&re.contains(X.target)||(h(!1),w(null),R())},L=()=>X=>{if(S){let re=G().find(W=>W.url===S)?.linkDestination||Gre;t({href:(0,Yre.prependHTTP)(S),linkDestination:re,lightbox:{enabled:!1}})}R(),w(null),X.preventDefault()},U=()=>{t({linkDestination:f3,href:""})},G=()=>{let X=[{linkDestination:Wre,title:(0,pn.__)("Link to image file"),url:r==="image"?n:void 0,icon:wk}];return r==="image"&&i&&X.push({linkDestination:$re,title:(0,pn.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:tl}),X},j=X=>{let re=G(),W;X?W=(re.find(H=>H.url===X)||{linkDestination:Gre}).linkDestination:W=f3,t({linkDestination:W,href:X})},N=X=>{let re=T(X);t(re)},F=X=>{t({rel:X})},K=X=>{t({linkClass:X})},Z=(0,kt.jsxs)(Io.__experimentalVStack,{spacing:"3",children:[(0,kt.jsx)(Io.ToggleControl,{label:(0,pn.__)("Open in new tab"),onChange:N,checked:s==="_blank"}),(0,kt.jsx)(Io.TextControl,{__next40pxDefaultSize:!0,label:(0,pn.__)("Link relation"),value:c??"",onChange:F,help:(0,Oi.createInterpolateElement)((0,pn.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,kt.jsx)(Io.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,kt.jsx)(Io.TextControl,{__next40pxDefaultSize:!0,label:(0,pn.__)("Link CSS class"),value:a||"",onChange:K})]}),Q=S!==null?S:o,J=!d||d&&!u,ee=!Q&&J,ie=(G().find(X=>X.linkDestination===e)||{}).title,de=()=>{if(d&&u&&!o&&!y)return(0,kt.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,kt.jsx)(Te,{icon:gp}),(0,kt.jsxs)("div",{className:"text",children:[(0,kt.jsx)("p",{children:(0,pn.__)("Enlarge on click")}),(0,kt.jsx)("p",{className:"description",children:(0,pn.__)("Scales the image with a lightbox effect")})]}),(0,kt.jsx)(Io.Button,{icon:ei,label:(0,pn.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||y)return(0,kt.jsx)(cd.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:Q,onChangeInputValue:w,onSubmit:L(),autocompleteRef:C});if(o&&!y)return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(cd.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:P,urlLabel:ie}),(0,kt.jsx)(Io.Button,{icon:ei,label:(0,pn.__)("Remove link"),onClick:()=>{U(),m?.()},size:"compact"})]})};return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(Io.ToolbarButton,{icon:Xr,className:"components-toolbar__control",label:(0,pn.__)("Link"),"aria-expanded":p,onClick:k,ref:b,isActive:!!o||d&&u}),p&&(0,kt.jsx)(cd,{ref:E,anchor:g,onFocusOutside:A(),onClose:B,renderSettings:J?()=>Z:null,additionalControls:ee&&(0,kt.jsxs)(Io.NavigableMenu,{children:[G().map(X=>(0,kt.jsx)(Io.MenuItem,{icon:X.icon,iconPosition:"left",onClick:()=>{w(null),j(X.url),R()},children:X.title},X.linkDestination)),u&&(0,kt.jsx)(Io.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:gp,info:(0,pn.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{w(null),t({linkDestination:f3,href:""}),f?.(!0),R()},children:(0,pn.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:de()})]})};var lb=l(O()),une=l(I()),xI=l(M());var Xre=l(I()),p3=l(M());var m3=[],gBe=new Intl.Collator("und",{numeric:!0}).compare;function _I(){let[e,t,o,r]=fe("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??m3,i=t??m3,s=o&&r!==!1?o:m3;return(0,Xre.useMemo)(()=>{let a=[{name:(0,p3.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>gBe(c.slug,u.slug)),a.length>hj?[{name:(0,p3.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var Qre=l(I()),Jre=l(D()),SI=l(M()),ene=l(O());var tne=l(x()),bBe={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function ab({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:c,type:u,value:d,...f}){let m=(0,Jre.useSelect)(S=>S(_).getSettings()?.disableCustomSpacingSizes),[p]=fe("spacing.units"),h=(0,ene.__experimentalUseCustomUnits)({availableUnits:p||["px","em","rem"]}),g=(0,Qre.useMemo)(()=>c?.map(S=>({name:S.name,slug:S.slug,size:S.size}))||[],[c]),b=(qc.includes(a)||["vertical","horizontal"].includes(a))&&s?Us[a]:"",k=s?u?.toLowerCase():u,y=(0,SI.sprintf)((0,SI._x)("%1$s %2$s","spacing"),b,k).trim(),v=h[0]?.value||"px";return(0,tne.jsx)(fm,{allowNegativeOnDrag:o<0,ariaLabel:y,className:"spacing-sizes-control",customValueSettings:bBe,disableCustomValues:m,icon:e,isMixed:t,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,presets:g,presetType:"spacing",selectedUnit:v,units:h,value:d,...f})}var w_=l(x()),one=["vertical","horizontal"];function rne({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=d=>f=>{if(!t)return;let m={...Object.keys(a).reduce((p,h)=>(p[h]=Vp(a[h],i),p),{})};d==="vertical"&&(m.top=f,m.bottom=f),d==="horizontal"&&(m.left=f,m.right=f),t(m)},u=n?.length?one.filter(d=>rM(n,d)):one;return(0,w_.jsx)(w_.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,w_.jsx)(ab,{icon:iw[d],label:Us[d],minimumCustomValue:e,onChange:c(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:f,withInputField:!1},`spacing-sizes-control-${d}`)})})}var C_=l(x());function nne({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?qc.filter(d=>n.includes(d)):qc,u=d=>f=>{let m={...Object.keys(a).reduce((p,h)=>(p[h]=Vp(a[h],i),p),{})};m[d]=f,t(m)};return(0,C_.jsx)(C_.Fragment,{children:c.map(d=>(0,C_.jsx)(ab,{icon:iw[d],label:Us[d],minimumCustomValue:e,onChange:u(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:a[d],withInputField:!1},`spacing-sizes-control-${d}`))})}var ine=l(x());function sne({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,values:c}){let u=d=>f=>{let m={...Object.keys(c).reduce((p,h)=>(p[h]=Vp(c[h],s),p),{})};m[d]=f,t(m)};return(0,ine.jsx)(ab,{label:Us[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var ane=l(O());var h3=l(M()),lne=l(x());function cne({isLinked:e,...t}){let o=e?(0,h3.__)("Unlink sides"):(0,h3.__)("Link sides");return(0,lne.jsx)(ane.Button,{...t,size:"small",icon:e?Xr:ei,iconSize:24,label:o})}var Ca=l(x());function cb({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=qc,useSelect:c,values:u}){let d=_I(),f=u||gj,m=a?.length===1,p=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[h,g]=(0,une.useState)(kj(f,a)),b=()=>{g(h===dl.axial?dl.custom:dl.axial)},y={...e,minimumCustomValue:o,onChange:C=>{let E={...u,...C};r(E)},onMouseOut:n,onMouseOver:i,sides:a,spacingSizes:d,type:t,useSelect:c,values:f},v=()=>h===dl.axial?(0,Ca.jsx)(rne,{...y}):h===dl.custom?(0,Ca.jsx)(nne,{...y}):(0,Ca.jsx)(sne,{side:h,...y,showSideInLabel:s}),S=qc.includes(h)&&s?Us[h]:"",w=(0,xI.sprintf)((0,xI._x)("%1$s %2$s","spacing"),t,S).trim();return(0,Ca.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,Ca.jsxs)(lb.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,Ca.jsx)(lb.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:w}),!m&&!p&&(0,Ca.jsx)(cne,{label:t,onClick:b,isLinked:h===dl.axial})]}),(0,Ca.jsx)(lb.__experimentalVStack,{spacing:.5,children:v()})]})}var dne=l(Oe());function fne(){return(0,dne.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var wI=l(I());function mne(e){let[t,o]=(0,wI.useState)(window.innerWidth);(0,wI.useEffect)(()=>{if(e==="Desktop")return;let i=()=>o(window.innerWidth);return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[e]);let r=i=>{let s;switch(i){case"Tablet":s=780;break;case"Mobile":s=360;break;default:return null}return s<t?s:t};return(i=>{let s=i==="Mobile"?"768px":"1024px",a="40px",c="auto";switch(i){case"Tablet":case"Mobile":return{width:r(i),marginTop:a,marginBottom:a,marginLeft:c,marginRight:c,height:s,overflowY:"auto"};default:return{marginLeft:c,marginRight:c}}})(e)}var qm=l(M()),jb=l($()),m2=l(O()),dF=l(D());var ub=l(O()),CI=l(M()),pne=l(D()),BI=l($());var Em=l(x());function kBe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,Em.jsx)(ub.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Em.jsx)(ub.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{if(o)t({postId:n.ref,postType:"wp_block"});else if(r){let{theme:s,slug:a}=n,c=s&&a?`${s}//${a}`:null;c&&t({postId:c,postType:"wp_template_part"})}},children:(0,CI.__)("Edit section")})})}function vBe({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,Em.jsx)(ub.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Em.jsx)(ub.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,CI.__)("Exit section"):(0,CI.__)("Edit section")})})}function hne({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=QB(e),{block:s,onNavigateToEntityRecord:a}=(0,pne.useSelect)(f=>{let{getBlock:m,getSettings:p}=f(_);return{block:m(e),onNavigateToEntityRecord:p().onNavigateToEntityRecord}},[e]);if(!t&&!o)return null;let c=(0,BI.isReusableBlock)(s),u=(0,BI.isTemplatePart)(s);return(c||u)&&a?(0,Em.jsx)(kBe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:c,isTemplatePartBlock:u}):(0,Em.jsx)(vBe,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var gne=l(D()),bne=l(M()),kne=l(O()),vne=l(I());var yne=l(x());function EI(){let e=(0,gne.useSelect)(r=>r(_).getBlockSelectionStart(),[]),t=(0,vne.useRef)();return vf(e,t),e?(0,yne.jsx)(kne.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,bne.__)("Skip to the selected block")}):null}var TI=l(M()),_ne=l(D());var Sne=l(O());var B_=l(x());function g3(){let e=(0,_ne.useSelect)(t=>t(_).getSelectedBlockCount(),[]);return(0,B_.jsxs)(Sne.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,B_.jsx)(Pe,{icon:ef,showColors:!0}),(0,B_.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,TI.sprintf)((0,TI._n)("%d Block","%d Blocks",e),e)})]})}var zb=l(O()),f2=l(I()),Ple=l(Tp()),Ole=l(D());var E_=l(M()),II={name:"settings",title:(0,E_.__)("Settings"),value:"settings",icon:HO},PI={name:"styles",title:(0,E_.__)("Styles"),value:"styles",icon:oL},OI={name:"content",title:(0,E_.__)("Content"),value:"content",icon:tl},T_={name:"list",title:(0,E_.__)("List View"),value:"list-view",icon:Ck};var I_=l(O()),xne=l(M());var P_=l(x()),yBe=()=>{let e=(0,I_.__experimentalUseSlotFills)(Pu.slotName),t=(0,I_.__experimentalUseSlotFills)(Ey.name),o=!!(e&&e.length),r=!!(t&&t.length);return!o&&!r?null:(0,P_.jsxs)(I_.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,xne.__)("Advanced"),initialOpen:!1,children:[(0,P_.jsx)(he.Slot,{group:"advanced"}),(0,P_.jsx)(Ey.Slot,{})]})},O_=yBe;var db=l(O()),RI=l(D()),b3=l(M());var R_=l(x()),_Be=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,RI.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:c}=s(_),u=c(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,RI.useDispatch)(_),n=Go();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:Ce({...c?.style,position:{...c?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}]));r(e,s,!0)}return(0,R_.jsx)(db.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,b3.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,R_.jsx)(db.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,b3.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,R_.jsx)(he.Slot,{group:"position"})})})},SBe=()=>{let e=(0,db.__experimentalUseSlotFills)(Iu.position.name);return!(e&&e.length)?null:(0,R_.jsx)(_Be,{})},AI=SBe;var Ba=l(x()),xBe=({showAdvancedControls:e=!1})=>(0,Ba.jsxs)(Ba.Fragment,{children:[(0,Ba.jsx)(he.Slot,{}),(0,Ba.jsx)(AI,{}),(0,Ba.jsx)(he.Slot,{group:"bindings"}),e&&(0,Ba.jsx)("div",{children:(0,Ba.jsx)(O_,{})})]}),wne=xBe;var Gie=l(O()),Nm=l(M()),kP=l(D());var z_=l($()),T3=l(O()),Sb=l(I()),Eie=l(nt()),Tie=l(D());var E3={};Ns(E3,{AdvancedPanel:()=>vie,BackgroundPanel:()=>sP,BorderPanel:()=>qI,ColorPanel:()=>QI,DimensionsPanel:()=>GI,FiltersPanel:()=>eP,ImageSettingsPanel:()=>bie,TypographyPanel:()=>FI,useHasBackgroundPanel:()=>F_,useHasBorderPanel:()=>KI,useHasBorderPanelControls:()=>L_,useHasColorPanel:()=>XI,useHasDimensionsPanel:()=>HI,useHasFiltersPanel:()=>pie,useHasImageSettingsPanel:()=>gie,useHasTypographyPanel:()=>VI,useSettingsForBlockElement:()=>MI});var LI=l(I()),Cne=l(D()),k3=l($()),Tm=l(M());function MI(e,t,o){let{supportedStyles:r,supports:n}=(0,Cne.useSelect)(i=>({supportedStyles:z(i(k3.store)).getSupportedStyles(t,o),supports:i(k3.store).getBlockType(t)?.supports}),[t,o]);return(0,LI.useMemo)(()=>{let i={...e};return r.includes("fontSize")||(i.typography={...i.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),r.includes("fontFamily")||(i.typography={...i.typography,fontFamilies:{}}),i.color={...i.color,text:i.color?.text&&r.includes("color"),background:i.color?.background&&(r.includes("background")||r.includes("backgroundColor")),button:i.color?.button&&r.includes("buttonColor"),heading:i.color?.heading&&r.includes("headingColor"),link:i.color?.link&&r.includes("linkColor"),caption:i.color?.caption&&r.includes("captionColor")},r.includes("background")||(i.color.gradients=[],i.color.customGradient=!1),r.includes("filter")||(i.color.defaultDuotone=!1,i.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","writingMode"].forEach(s=>{r.includes(s)||(i.typography={...i.typography,[s]:!1})}),r.includes("columnCount")||(i.typography={...i.typography,textColumns:!1}),["contentSize","wideSize"].forEach(s=>{r.includes(s)||(i.layout={...i.layout,[s]:!1})}),["padding","margin","blockGap"].forEach(s=>{r.includes(s)||(i.spacing={...i.spacing,[s]:!1});let a=Array.isArray(n?.spacing?.[s])?n?.spacing?.[s]:n?.spacing?.[s]?.sides;a?.length&&i.spacing?.[s]&&(i.spacing={...i.spacing,[s]:{...i.spacing?.[s],sides:a}})}),["aspectRatio","height","minHeight","width"].forEach(s=>{r.includes(s)||(i.dimensions={...i.dimensions,[s]:!1})}),["radius","color","style","width"].forEach(s=>{r.includes("border"+s.charAt(0).toUpperCase()+s.slice(1))||(i.border={...i.border,[s]:!1})}),["backgroundImage","backgroundSize"].forEach(s=>{r.includes(s)||(i.background={...i.background,[s]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function Ea(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,LI.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Tm._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,Tm._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,Tm._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function A_(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,LI.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Tm._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,Tm._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,Tm._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var Po=l(O()),gr=l(M()),mb=l(I());var fb=l(M());var Bne=l(I()),NI=l(O()),v3=l(x()),wBe=[{label:(0,fb.__)("Align text left"),value:"left",icon:Ic},{label:(0,fb.__)("Align text center"),value:"center",icon:qd},{label:(0,fb.__)("Align text right"),value:"right",icon:Pc},{label:(0,fb.__)("Justify text"),value:"justify",icon:kO}],CBe=["left","center","right"];function DI({className:e,value:t,onChange:o,options:r=CBe}){let n=(0,Bne.useMemo)(()=>wBe.filter(i=>r.includes(i.value)),[r]);return n.length?(0,v3.jsx)(NI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,fb.__)("Text alignment"),className:V("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,v3.jsx)(NI.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}function Tne(e,t){let o=e?.typography?.fontFamilies,r=["default","theme","custom"].flatMap(i=>o?.[i]??[]),n=r.find(i=>i.fontFamily===t)?.fontFace??[];return{fontFamilies:r,fontFamilyFaces:n}}function Ene(e,t){return t=typeof t=="number"?t.toString():t,!t||typeof t!="string"?"":!e||e.length===0?t:e?.reduce((r,{value:n})=>{let i=Math.abs(parseInt(n)-parseInt(t)),s=Math.abs(parseInt(r)-parseInt(t));return i<s?n:r},e[0]?.value)}function BBe(e,t){return typeof t!="string"||!t||!["normal","italic","oblique"].includes(t)?"":!e||e.length===0||e.find(r=>r.value===t)?t:t==="oblique"&&!e.find(r=>r.value==="oblique")?"italic":""}function Ine(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=Ag(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?BBe(i,t):a?.find(d=>d.style.fontWeight===Ene(s,o))?.style?.fontStyle),u||(n=o?Ene(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var vt=l(x()),EBe=1,TBe=6;function VI(e){let t=One(e),o=Rne(e),r=Ane(e),n=Lne(e),i=Nne(e),s=Mne(e),a=Dne(e),c=Vne(e),u=Fne(e),d=Pne(e);return t||o||r||n||i||s||d||a||c||u}function Pne(e){return e?.typography?.defaultFontSizes!==!1&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function One(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function Rne(e){return e?.typography?.lineHeight}function Ane(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function IBe(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,gr.__)("Appearance"):(0,gr.__)("Font style"):(0,gr.__)("Font weight")}function Lne(e){return e?.typography?.letterSpacing}function Mne(e){return e?.typography?.textTransform}function Nne(e){return e?.typography?.textAlign}function Dne(e){return e?.typography?.textDecoration}function Vne(e){return e?.typography?.writingMode}function Fne(e){return e?.typography?.textColumns}function PBe(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function OBe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Go(),s=()=>{let a=e(o);t(a)};return(0,vt.jsx)(Po.__experimentalToolsPanel,{label:(0,gr.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var RBe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function FI({as:e=OBe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=RBe}){let a=me=>un({settings:n},"",me),c=One(n),u=a(r?.typography?.fontFamily),{fontFamilies:d,fontFamilyFaces:f}=(0,mb.useMemo)(()=>Tne(n,u),[n,u]),m=me=>{let wo=d?.find(({fontFamily:Se})=>Se===me)?.slug,Co=pe(t,["typography","fontFamily"],wo?`var:preset|font-family|${wo}`:me||void 0),Yn=d?.find(({fontFamily:Se})=>Se===me)?.fontFace??[],{fontStyles:Zn,fontWeights:dr}=Ag(Yn),$a=Zn?.some(({value:Se})=>Se===T),Re=dr?.some(({value:Se})=>Se?.toString()===A?.toString());if(!$a||!Re){let{nearestFontStyle:Se,nearestFontWeight:Bt}=Ine(Yn,T,A);Se||Bt?Co={...Co,typography:{...Co?.typography,fontStyle:Se||void 0,fontWeight:Bt||void 0}}:(T||A)&&(Co={...Co,typography:{...Co?.typography,fontStyle:void 0,fontWeight:void 0}})}o(Co)},p=()=>!!t?.typography?.fontFamily,h=()=>m(void 0),g=Pne(n),b=!n?.typography?.customFontSize,k=PBe(n),y=a(r?.typography?.fontSize),v=(()=>{let me=r?.typography?.fontSize;if(!me||typeof me!="string")return;if(me.startsWith("var:preset|font-size|"))return me.replace("var:preset|font-size|","");let wo=me.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(wo)return wo[1]})(),S=(me,wo)=>{let Co=wo?.slug?`var:preset|font-size|${wo?.slug}`:me;o(pe(t,["typography","fontSize"],Co||void 0))},w=()=>!!t?.typography?.fontSize,C=()=>S(void 0),E=Ane(n),P=IBe(n),R=n?.typography?.fontStyle,B=n?.typography?.fontWeight,T=a(r?.typography?.fontStyle),A=a(r?.typography?.fontWeight),L=(0,mb.useCallback)(({fontStyle:me,fontWeight:wo})=>{(me!==T||wo!==A)&&o({...t,typography:{...t?.typography,fontStyle:me||void 0,fontWeight:wo||void 0}})},[T,A,o,t]),U=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,G=(0,mb.useCallback)(()=>{L({})},[L]),j=Rne(n),N=a(r?.typography?.lineHeight),F=me=>{o(pe(t,["typography","lineHeight"],me||void 0))},K=()=>t?.typography?.lineHeight!==void 0,Z=()=>F(void 0),Q=Lne(n),J=a(r?.typography?.letterSpacing),ee=me=>{o(pe(t,["typography","letterSpacing"],me||void 0))},ie=()=>!!t?.typography?.letterSpacing,de=()=>ee(void 0),X=Fne(n),re=a(r?.typography?.textColumns),W=me=>{o(pe(t,["typography","textColumns"],me||void 0))},H=()=>!!t?.typography?.textColumns,oe=()=>W(void 0),ce=Mne(n),le=a(r?.typography?.textTransform),ye=me=>{o(pe(t,["typography","textTransform"],me||void 0))},_e=()=>!!t?.typography?.textTransform,Ve=()=>ye(void 0),go=Dne(n),ot=a(r?.typography?.textDecoration),Yt=me=>{o(pe(t,["typography","textDecoration"],me||void 0))},Ct=()=>!!t?.typography?.textDecoration,rt=()=>Yt(void 0),Vt=Vne(n),Ft=a(r?.typography?.writingMode),We=me=>{o(pe(t,["typography","writingMode"],me||void 0))},so=()=>!!t?.typography?.writingMode,dt=()=>We(void 0),ao=Nne(n),qn=a(r?.typography?.textAlign),Kr=me=>{o(pe(t,["typography","textAlign"],me||void 0))},Fe=()=>!!t?.typography?.textAlign,bo=()=>Kr(void 0),Zt=(0,mb.useCallback)(me=>({...me,typography:{}}),[]);return(0,vt.jsxs)(e,{resetAllFilter:Zt,value:t,onChange:o,panelId:i,children:[c&&(0,vt.jsx)(Po.__experimentalToolsPanelItem,{label:(0,gr.__)("Font"),hasValue:p,onDeselect:h,isShownByDefault:s.fontFamily,panelId:i,children:(0,vt.jsx)(dT,{fontFamilies:d,value:u,onChange:m,size:"__unstable-large"})}),g&&(0,vt.jsx)(Po.__experimentalToolsPanelItem,{label:(0,gr.__)("Size"),hasValue:w,onDeselect:C,isShownByDefault:s.fontSize,panelId:i,children:(0,vt.jsx)(Po.FontSizePicker,{value:v||y,valueMode:v?"slug":"literal",onChange:S,fontSizes:k,disableCustomFontSizes:b,withReset:!1,withSlider:!0,size:"__unstable-large"})}),E&&(0,vt.jsx)(Po.__experimentalToolsPanelItem,{className:"single-column",label:P,hasValue:U,onDeselect:G,isShownByDefault:s.fontAppearance,panelId:i,children:(0,vt.jsx)(uT,{value:{fontStyle:T,fontWeight:A},onChange:L,hasFontStyles:R,hasFontWeights:B,fontFamilyFaces:f,size:"__unstable-large"})}),j&&(0,vt.jsx)(Po.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Line height"),hasValue:K,onDeselect:Z,isShownByDefault:s.lineHeight,panelId:i,children:(0,vt.jsx)(YT,{__unstableInputWidth:"auto",value:N,onChange:F,size:"__unstable-large"})}),Q&&(0,vt.jsx)(Po.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Letter spacing"),hasValue:ie,onDeselect:de,isShownByDefault:s.letterSpacing,panelId:i,children:(0,vt.jsx)(mT,{value:J,onChange:ee,size:"__unstable-large",__unstableInputWidth:"auto"})}),X&&(0,vt.jsx)(Po.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Columns"),hasValue:H,onDeselect:oe,isShownByDefault:s.textColumns,panelId:i,children:(0,vt.jsx)(Po.__experimentalNumberControl,{label:(0,gr.__)("Columns"),max:TBe,min:EBe,onChange:W,size:"__unstable-large",spinControls:"custom",value:re,initialPosition:1})}),go&&(0,vt.jsx)(Po.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Decoration"),hasValue:Ct,onDeselect:rt,isShownByDefault:s.textDecoration,panelId:i,children:(0,vt.jsx)(hT,{value:ot,onChange:Yt,size:"__unstable-large",__unstableInputWidth:"auto"})}),Vt&&(0,vt.jsx)(Po.__experimentalToolsPanelItem,{className:"single-column",label:(0,gr.__)("Orientation"),hasValue:so,onDeselect:dt,isShownByDefault:s.writingMode,panelId:i,children:(0,vt.jsx)(vT,{value:Ft,onChange:We,size:"__unstable-large"})}),ce&&(0,vt.jsx)(Po.__experimentalToolsPanelItem,{label:(0,gr.__)("Letter case"),hasValue:_e,onDeselect:Ve,isShownByDefault:s.textTransform,panelId:i,children:(0,vt.jsx)(bT,{value:le,onChange:ye,showNone:!0,isBlock:!0,size:"__unstable-large"})}),ao&&(0,vt.jsxs)(Po.__experimentalToolsPanelItem,{label:(0,gr.__)("Text alignment"),hasValue:Fe,onDeselect:bo,isShownByDefault:s.textAlign,panelId:i,children:[(0,vt.jsx)(DI,{value:qn,onChange:Kr,options:["left","center","right","justify"],size:"__unstable-large"}),qn==="justify"&&(0,vt.jsx)("div",{children:(0,vt.jsx)(Po.Notice,{status:"warning",isDismissible:!1,children:(0,gr.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var Ut=l(M()),Rt=l(O());var hb=l(I());var Ye=l(O()),Oo=l(M()),jne=l(I()),zI=l(D());var zne=l(D());function Im(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,zne.useSelect)(_);return(i,s)=>{let a=(s-1)*t+i-1,c=0;for(let u of o(e)){let{columnStart:d,rowStart:f}=r(u).style?.layout??{};(f-1)*t+d-1<a&&c++}return c}}var jt=l(x());function ABe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,Oo.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,Oo.__)("Specify a fixed width."):e==="fixed"?(0,Oo.__)("Specify a fixed height."):(0,Oo.__)("Fit contents.")}function Une({value:e={},onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{type:i,default:{type:s="default"}={}}=o??{},a=i||s;return a==="flex"?(0,jt.jsx)(LBe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,jt.jsx)(NBe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function LBe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{selfStretch:i,flexSize:s}=e,{orientation:a="horizontal"}=o??{},c=()=>!!i,u=a==="horizontal"?(0,Oo.__)("Width"):(0,Oo.__)("Height"),[d]=fe("spacing.units"),f=(0,Ye.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,jne.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,jt.jsxs)(Ye.__experimentalVStack,{as:Ye.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,jt.jsxs)(Ye.__experimentalToggleGroupControl,{size:"__unstable-large",label:MBe(o),value:i||"fit",help:ABe(i,o),onChange:p=>{t({selfStretch:p,flexSize:p!=="fixed"?null:s})},isBlock:!0,children:[(0,jt.jsx)(Ye.__experimentalToggleGroupControlOption,{value:"fit",label:(0,Oo._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,jt.jsx)(Ye.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Oo._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,jt.jsx)(Ye.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,Oo._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,jt.jsx)(Ye.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:p=>{t({selfStretch:i,flexSize:p})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function MBe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,Oo.__)("Width"):(0,Oo.__)("Height")}function NBe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=e,{columnCount:u,rowCount:d}=o??{},f=(0,zI.useSelect)(w=>w(_).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:p}=(0,zI.useDispatch)(_),h=Im(f,u||3),g=()=>!!i||!!s,b=()=>!!a||!!c,k=()=>{t({columnStart:void 0,rowStart:void 0})},y=()=>{t({columnSpan:void 0,rowSpan:void 0})},v=u?u-(i??1)+1:void 0,S=window.__experimentalEnableGridInteractivity&&d?d-(s??1)+1:void 0;return(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsxs)(Ye.Flex,{as:Ye.__experimentalToolsPanelItem,hasValue:b,label:(0,Oo.__)("Grid span"),onDeselect:y,isShownByDefault:r,panelId:n,children:[(0,jt.jsx)(Ye.FlexItem,{style:{width:"50%"},children:(0,jt.jsx)(Ye.__experimentalInputControl,{size:"__unstable-large",label:(0,Oo.__)("Column span"),type:"number",onChange:w=>{let C=w===""?1:parseInt(w,10),E=v?Math.min(C,v):C;t({columnStart:i,rowStart:s,rowSpan:c,columnSpan:E})},value:a??1,min:1,max:v})}),(0,jt.jsx)(Ye.FlexItem,{style:{width:"50%"},children:(0,jt.jsx)(Ye.__experimentalInputControl,{size:"__unstable-large",label:(0,Oo.__)("Row span"),type:"number",onChange:w=>{let C=w===""?1:parseInt(w,10),E=S?Math.min(C,S):C;t({columnStart:i,rowStart:s,columnSpan:a,rowSpan:E})},value:c??1,min:1,max:S})})]}),window.__experimentalEnableGridInteractivity&&(0,jt.jsxs)(Ye.Flex,{as:Ye.__experimentalToolsPanelItem,hasValue:g,label:(0,Oo.__)("Grid placement"),onDeselect:k,isShownByDefault:!1,panelId:n,children:[(0,jt.jsx)(Ye.FlexItem,{style:{width:"50%"},children:(0,jt.jsx)(Ye.__experimentalInputControl,{size:"__unstable-large",label:(0,Oo.__)("Column"),type:"number",onChange:w=>{let C=w===""?1:parseInt(w,10);t({columnStart:C,rowStart:s,columnSpan:a,rowSpan:c}),p(),m([n],f,f,h(C,s))},value:i??1,min:1,max:u?u-(a??1)+1:void 0})}),(0,jt.jsx)(Ye.FlexItem,{style:{width:"50%"},children:(0,jt.jsx)(Ye.__experimentalInputControl,{size:"__unstable-large",label:(0,Oo.__)("Row"),type:"number",onChange:w=>{let C=w===""?1:parseInt(w,10);t({columnStart:i,rowStart:C,columnSpan:a,rowSpan:c}),p(),m([n],f,f,h(i,C))},value:s??1,min:1,max:d?d-(c??1)+1:void 0})})]})]})}var jI=l(O()),pb=l(M());var y3=l(x());function UI({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=fe("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.map(({name:h,ratio:g})=>({label:h,value:g})),m=c?.map(({name:h,ratio:g})=>({label:h,value:g})),p=[{label:(0,pb._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,pb._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,y3.jsx)(jI.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,pb.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,y3.jsx)(jI.SelectControl,{label:(0,pb.__)("Aspect ratio"),value:a,options:r??p,onChange:o,size:"__unstable-large"})})}var He=l(x()),_3=["horizontal","vertical"];function HI(e){let t=Wne(e),o=$ne(e),r=Kne(e),n=qne(e),i=Yne(e),s=Zne(e),a=Xne(e),c=Qne(e),u=Jne(e),d=eie(e);return hb.Platform.OS==="web"&&(t||o||r||n||i||s||a||c||u||d)}function Wne(e){return e?.layout?.contentSize}function $ne(e){return e?.layout?.wideSize}function Kne(e){return e?.spacing?.padding}function qne(e){return e?.spacing?.margin}function Yne(e){return e?.spacing?.blockGap}function Zne(e){return e?.dimensions?.height}function Xne(e){return e?.dimensions?.minHeight}function Qne(e){return e?.dimensions?.width}function Jne(e){return e?.dimensions?.aspectRatio}function eie(e){let{type:t="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=e?.parentLayout??{},n=(o==="flex"||t==="flex"||o==="grid"||t==="grid")&&r;return!!e?.layout&&n}function DBe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function Hne(e,t){if(!t||!e)return e;let o={};return t.forEach(r=>{r==="vertical"&&(o.top=e.top,o.bottom=e.bottom),r==="horizontal"&&(o.left=e.left,o.right=e.right),o[r]=e?.[r]}),o}function Gne(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function VBe(e,t){return e&&(typeof e=="string"?t?{top:e,right:e,bottom:e,left:e}:{top:e}:{...e,right:e?.left,bottom:e?.top})}function FBe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Go(),s=()=>{let a=e(o);t(a)};return(0,He.jsx)(Rt.__experimentalToolsPanel,{label:(0,Ut.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var Bs={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,aspectRatio:!0,childLayout:!0};function GI({as:e=FBe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=Bs,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=ae=>ae&&typeof ae=="object"?Object.keys(ae).reduce((Me,qr)=>(Me[qr]=un({settings:{dimensions:u,spacing:d}},"",ae[qr]),Me),{}):un({settings:{dimensions:u,spacing:d}},"",ae),m=DBe(n),p=(0,Rt.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),h=-1/0,[g,b]=(0,hb.useState)(h),k=Wne(n)&&c,y=f(r?.layout?.contentSize),v=ae=>{o(pe(t,["layout","contentSize"],ae||void 0))},S=()=>!!t?.layout?.contentSize,w=()=>v(void 0),C=$ne(n)&&c,E=f(r?.layout?.wideSize),P=ae=>{o(pe(t,["layout","wideSize"],ae||void 0))},R=()=>!!t?.layout?.wideSize,B=()=>P(void 0),T=Kne(n),A=f(r?.spacing?.padding),L=Gne(A),U=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,G=U&&U.some(ae=>_3.includes(ae)),j=ae=>{let Me=Hne(ae,U);o(pe(t,["spacing","padding"],Me))},N=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,F=()=>j(void 0),K=()=>a("padding"),Z=qne(n),Q=f(r?.spacing?.margin),J=Gne(Q),ee=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,ie=ee&&ee.some(ae=>_3.includes(ae)),de=ae=>{let Me=Hne(ae,ee);o(pe(t,["spacing","margin"],Me))},X=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,re=()=>de(void 0),W=()=>a("margin"),H=Yne(n),oe=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,ce=oe&&oe.some(ae=>_3.includes(ae)),le=f(r?.spacing?.blockGap),ye=VBe(le,ce),_e=ae=>{o(pe(t,["spacing","blockGap"],ae))},Ve=ae=>{ae||_e(null),!ce&&ae?.hasOwnProperty("top")?_e(ae.top):_e({top:ae?.top,left:ae?.left})},go=()=>_e(void 0),ot=()=>!!t?.spacing?.blockGap,Yt=Xne(n),Ct=f(r?.dimensions?.minHeight),rt=ae=>{let Me=pe(t,["dimensions","minHeight"],ae);o(pe(Me,["dimensions","aspectRatio"],void 0))},Vt=()=>{rt(void 0)},Ft=()=>!!t?.dimensions?.minHeight,We=Zne(n),so=f(r?.dimensions?.height),dt=ae=>{let Me=pe(t,["dimensions","height"],ae);o(pe(Me,["dimensions","aspectRatio"],void 0))},ao=()=>{dt(void 0)},qn=()=>!!t?.dimensions?.height,Kr=Qne(n),Fe=f(r?.dimensions?.width),bo=ae=>{o(pe(t,["dimensions","width"],ae))},Zt=()=>{bo(void 0)},me=()=>!!t?.dimensions?.width,wo=Jne(n),Co=f(r?.dimensions?.aspectRatio),Yn=ae=>{let Me=pe(t,["dimensions","aspectRatio"],ae);o(pe(Me,["dimensions","minHeight"],void 0))},Zn=()=>!!t?.dimensions?.aspectRatio,dr=eie(n),$a=r?.layout,Re=ae=>{o({...t,layout:{...ae}})},Se=(0,hb.useCallback)(ae=>({...ae,layout:Ce({...ae?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...ae?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...ae?.dimensions,height:void 0,minHeight:void 0,aspectRatio:void 0,width:void 0}}),[]),Bt=()=>a(!1);return(0,He.jsxs)(e,{resetAllFilter:Se,value:t,onChange:o,panelId:i,children:[(k||C)&&(0,He.jsx)("span",{className:"span-columns",children:(0,Ut.__)("Set the width of the main content area.")}),k&&(0,He.jsx)(Rt.__experimentalToolsPanelItem,{label:(0,Ut.__)("Content width"),hasValue:S,onDeselect:w,isShownByDefault:s.contentSize??Bs.contentSize,panelId:i,children:(0,He.jsx)(Rt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Ut.__)("Content width"),labelPosition:"top",value:y||"",onChange:ae=>{v(ae)},units:p,prefix:(0,He.jsx)(Rt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,He.jsx)(Te,{icon:Yd})})})}),C&&(0,He.jsx)(Rt.__experimentalToolsPanelItem,{label:(0,Ut.__)("Wide width"),hasValue:R,onDeselect:B,isShownByDefault:s.wideSize??Bs.wideSize,panelId:i,children:(0,He.jsx)(Rt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Ut.__)("Wide width"),labelPosition:"top",value:E||"",onChange:ae=>{P(ae)},units:p,prefix:(0,He.jsx)(Rt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,He.jsx)(Te,{icon:af})})})}),T&&(0,He.jsxs)(Rt.__experimentalToolsPanelItem,{hasValue:N,label:(0,Ut.__)("Padding"),onDeselect:F,isShownByDefault:s.padding??Bs.padding,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,He.jsx)(Rt.BoxControl,{__next40pxDefaultSize:!0,values:L,onChange:j,label:(0,Ut.__)("Padding"),sides:U,units:p,allowReset:!1,splitOnAxis:G,inputProps:{onMouseOver:K,onMouseOut:Bt}}),m&&(0,He.jsx)(cb,{values:L,onChange:j,label:(0,Ut.__)("Padding"),sides:U,units:p,allowReset:!1,onMouseOver:K,onMouseOut:Bt})]}),Z&&(0,He.jsxs)(Rt.__experimentalToolsPanelItem,{hasValue:X,label:(0,Ut.__)("Margin"),onDeselect:re,isShownByDefault:s.margin??Bs.margin,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,He.jsx)(Rt.BoxControl,{__next40pxDefaultSize:!0,values:J,onChange:de,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(h)},onMouseOver:W,onMouseOut:Bt},label:(0,Ut.__)("Margin"),sides:ee,units:p,allowReset:!1,splitOnAxis:ie}),m&&(0,He.jsx)(cb,{values:J,onChange:de,minimumCustomValue:-1/0,label:(0,Ut.__)("Margin"),sides:ee,units:p,allowReset:!1,onMouseOver:W,onMouseOut:Bt})]}),H&&(0,He.jsxs)(Rt.__experimentalToolsPanelItem,{hasValue:ot,label:(0,Ut.__)("Block spacing"),onDeselect:go,isShownByDefault:s.blockGap??Bs.blockGap,className:V({"tools-panel-item-spacing":m,"single-column":!m&&!ce}),panelId:i,children:[!m&&(ce?(0,He.jsx)(Rt.BoxControl,{__next40pxDefaultSize:!0,label:(0,Ut.__)("Block spacing"),min:0,onChange:Ve,units:p,sides:oe,values:ye,allowReset:!1,splitOnAxis:ce}):(0,He.jsx)(Rt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Ut.__)("Block spacing"),min:0,onChange:_e,units:p,value:le})),m&&(0,He.jsx)(cb,{label:(0,Ut.__)("Block spacing"),min:0,onChange:Ve,showSideInLabel:!1,sides:ce?oe:["top"],values:ye,allowReset:!1})]}),dr&&(0,He.jsx)(Une,{value:$a,onChange:Re,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??Bs.childLayout}),Yt&&(0,He.jsx)(Rt.__experimentalToolsPanelItem,{hasValue:Ft,label:(0,Ut.__)("Minimum height"),onDeselect:Vt,isShownByDefault:s.minHeight??Bs.minHeight,panelId:i,children:(0,He.jsx)(Ng,{label:(0,Ut.__)("Minimum height"),value:Ct,onChange:rt})}),We&&(0,He.jsx)(Rt.__experimentalToolsPanelItem,{hasValue:qn,label:(0,Ut.__)("Height"),onDeselect:ao,isShownByDefault:s.height??Bs.height,panelId:i,children:(0,He.jsx)(Ng,{label:(0,Ut.__)("Height"),value:so,onChange:dt})}),Kr&&(0,He.jsx)(Rt.__experimentalToolsPanelItem,{hasValue:me,label:(0,Ut.__)("Width"),onDeselect:Zt,isShownByDefault:s.width??Bs.width,panelId:i,children:(0,He.jsx)(Ng,{label:(0,Ut.__)("Width"),value:Fe,onChange:bo})}),wo&&(0,He.jsx)(UI,{hasValue:Zn,value:Co,onChange:Yn,panelId:i,isShownByDefault:s.aspectRatio??Bs.aspectRatio})]})}var jr=l(O()),bb=l(I()),gb=l(M());var Pm=l(M()),ho=l(O()),$I=l(I());var xt=l(x()),WI=[];function zBe({shadow:e,onShadowChange:t,settings:o}){let r=S3(o);return(0,xt.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,xt.jsxs)(ho.__experimentalVStack,{spacing:4,children:[(0,xt.jsx)(ho.__experimentalHeading,{level:5,children:(0,Pm.__)("Drop shadow")}),(0,xt.jsx)(jBe,{presets:r,activeShadow:e,onSelect:t}),(0,xt.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,xt.jsx)(ho.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,Pm.__)("Clear")})})]})})}function jBe({presets:e,activeShadow:t,onSelect:o}){return e?(0,xt.jsx)(ho.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,Pm.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,xt.jsx)(UBe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function UBe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,xt.jsx)(ho.Tooltip,{text:t,children:(0,xt.jsx)(ho.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:V("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,xt.jsx)("button",{className:V("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,xt.jsx)(Te,{icon:Ja})})})})}function tie({shadow:e,onShadowChange:t,settings:o}){return(0,xt.jsx)(ho.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:HBe(e,t),renderContent:()=>(0,xt.jsx)(ho.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,xt.jsx)(zBe,{shadow:e,onShadowChange:t,settings:o})})})}function HBe(e,t){return({onToggle:o,isOpen:r})=>{let n=(0,$I.useRef)(void 0),i={onClick:o,className:V("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":r}),"aria-expanded":r,ref:n},s={onClick:()=>{r&&o(),t(void 0),n.current?.focus()},className:V("block-editor-global-styles__shadow-editor__remove-button",{"is-open":r}),label:(0,Pm.__)("Remove")};return(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(ho.Button,{__next40pxDefaultSize:!0,...i,children:(0,xt.jsxs)(ho.__experimentalHStack,{justify:"flex-start",children:[(0,xt.jsx)(Te,{className:"block-editor-global-styles__toggle-icon",icon:HA,size:24}),(0,xt.jsx)(ho.FlexItem,{children:(0,Pm.__)("Drop shadow")})]})}),!!e&&(0,xt.jsx)(ho.Button,{__next40pxDefaultSize:!0,size:"small",icon:Br,...s})]})}}function S3(e){return(0,$I.useMemo)(()=>{if(!e?.shadow)return WI;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,Pm.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||WI,...r||WI,...n||WI];return s.length&&s.unshift(i),s},[e])}var Es=l(x());function KI(e){return Object.values(L_(e)).some(Boolean)}function L_(e){return{hasBorderColor:oie(e),hasBorderRadius:rie(e),hasBorderStyle:nie(e),hasBorderWidth:iie(e),hasShadow:sie(e)}}function oie(e){return e?.border?.color}function rie(e){return e?.border?.radius}function nie(e){return e?.border?.style}function iie(e){return e?.border?.width}function sie(e){let t=S3(e);return!!e?.shadow&&t.length>0}function GBe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Go();return(0,Es.jsx)(jr.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var WBe={radius:!0,color:!0,width:!0,shadow:!0};function qI({as:e=GBe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=WBe}){let c=Ea(n),u=(0,bb.useCallback)(N=>un({settings:n},"",N),[n]),d=N=>{let K=c.flatMap(({colors:Z})=>Z).find(({color:Z})=>Z===N);return K?"var:preset|color|"+K.slug:N},f=(0,bb.useMemo)(()=>{if((0,jr.__experimentalHasSplitBorders)(r?.border)){let N={...r?.border};return["top","right","bottom","left"].forEach(F=>{N[F]={...N[F],color:u(N[F]?.color)}}),N}return{...r?.border,color:r?.border?.color?u(r?.border?.color):void 0}},[r?.border,u]),m=N=>o({...t,border:N}),p=oie(n),h=nie(n),g=iie(n),b=rie(n),k=(0,bb.useMemo)(()=>typeof r?.border?.radius!="object"?u(r?.border?.radius):{topLeft:u(r?.border?.radius?.topLeft),topRight:u(r?.border?.radius?.topRight),bottomLeft:u(r?.border?.radius?.bottomLeft),bottomRight:u(r?.border?.radius?.bottomRight)},[r?.border?.radius,u]),y=N=>m({...f,radius:N}),v=()=>{let N=t?.border?.radius;return typeof N=="object"?Object.entries(N).some(Boolean):!!N},S=sie(n),w=u(r?.shadow),C=n?.shadow?.presets??{},E=C.custom??C.theme??C.default??[],P=N=>{let F=E?.find(({shadow:K})=>K===N)?.slug;o(pe(t,["shadow"],F?`var:preset|shadow|${F}`:N||void 0))},R=()=>!!t?.shadow,B=()=>P(void 0),T=()=>{if(v())return m({radius:t?.border?.radius});m(void 0)},A=N=>{let F={...N};(0,jr.__experimentalHasSplitBorders)(F)?["top","right","bottom","left"].forEach(K=>{F[K]&&(F[K]={...F[K],color:d(F[K]?.color)})}):F&&(F.color=d(F.color)),m({radius:f?.radius,...F})},L=(0,bb.useCallback)(N=>({...N,border:void 0,shadow:void 0}),[]),U=a?.color||a?.width,G=p||h||g||b,j=kb({blockName:s,hasShadowControl:S,hasBorderControl:G});return(0,Es.jsxs)(e,{resetAllFilter:L,value:t,onChange:o,panelId:i,label:j,children:[(g||p)&&(0,Es.jsx)(jr.__experimentalToolsPanelItem,{hasValue:()=>(0,jr.__experimentalIsDefinedBorder)(t?.border),label:(0,gb.__)("Border"),onDeselect:()=>T(),isShownByDefault:U,panelId:i,children:(0,Es.jsx)(jr.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:h,onChange:A,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!S,label:(0,gb.__)("Border")})}),b&&(0,Es.jsx)(jr.__experimentalToolsPanelItem,{hasValue:v,label:(0,gb.__)("Radius"),onDeselect:()=>y(void 0),isShownByDefault:a.radius,panelId:i,children:(0,Es.jsx)(nT,{presets:n?.border?.radiusSizes,values:k,onChange:N=>{y(N||void 0)}})}),S&&(0,Es.jsxs)(jr.__experimentalToolsPanelItem,{label:(0,gb.__)("Shadow"),hasValue:R,onDeselect:B,isShownByDefault:a.shadow,panelId:i,children:[G?(0,Es.jsx)(jr.BaseControl.VisualLabel,{as:"legend",children:(0,gb.__)("Shadow")}):null,(0,Es.jsx)(tie,{shadow:w,onShadowChange:P,settings:n})]})]})}var Gt=l(O()),ZI=l(I()),Ht=l(M());var et=l(x());function XI(e){let t=lie(e),o=fie(e),r=cie(e),n=md(e),i=die(e),s=uie(e);return t||o||r||n||i||s}function lie(e){let t=Ea(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function cie(e){let t=Ea(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function uie(e){let t=Ea(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function md(e){let t=Ea(e),o=A_(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function die(e){let t=Ea(e),o=A_(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function fie(e){let t=Ea(e),o=A_(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function x3({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Go(),a=()=>{let c=e(o);t(c)};return(0,et.jsx)(Gt.__experimentalToolsPanel,{label:i||(0,Ht.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,et.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var $Be={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},KBe={placement:"left-start",offset:36,shift:!0},{Tabs:YI}=z(Gt.privateApis),qBe=({indicators:e,label:t})=>(0,et.jsxs)(Gt.__experimentalHStack,{justify:"flex-start",children:[(0,et.jsx)(Gt.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,et.jsx)(Gt.Flex,{expanded:!1,children:(0,et.jsx)(Gt.ColorIndicator,{colorValue:o})},r))}),(0,et.jsx)(Gt.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function aie({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,et.jsx)(Xu,{...n,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:r,onGradientChange:e?r:void 0,clearable:t===o,headingLevel:3})}function YBe({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a}){let c=i.find(m=>m.userValue!==void 0),{key:u,...d}=i[0]??{},f=(0,ZI.useRef)(void 0);return(0,et.jsx)(Gt.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,et.jsx)(Gt.Dropdown,{popoverProps:KBe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:m,isOpen:p})=>{let h={onClick:m,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":p}),"aria-expanded":p,ref:f};return(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(Gt.Button,{...h,__next40pxDefaultSize:!0,children:(0,et.jsx)(qBe,{indicators:n,label:e})}),t()&&(0,et.jsx)(Gt.Button,{__next40pxDefaultSize:!0,label:(0,Ht.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Br,onClick:()=>{o(),p&&m(),f.current?.focus()}})]})},renderContent:()=>(0,et.jsx)(Gt.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,et.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,et.jsx)(aie,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,et.jsxs)(YI,{defaultTabId:c?.key,children:[(0,et.jsx)(YI.TabList,{children:i.map(m=>(0,et.jsx)(YI.Tab,{tabId:m.key,children:m.label},m.key))}),i.map(m=>{let{key:p,...h}=m;return(0,et.jsx)(YI.TabPanel,{tabId:p,focusable:!1,children:(0,et.jsx)(aie,{...h,colorGradientControlSettings:s},p)},p)})]})]})})})})}function QI({as:e=x3,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=$Be,label:a,children:c}){let u=Ea(n),d=A_(n),f=n?.color?.custom,m=n?.color?.customGradient,p=u.length>0||f,h=d.length>0||m,g=H=>un({settings:n},"",H),b=H=>{let ce=u.flatMap(({colors:le})=>le).find(({color:le})=>le===H);return ce?"var:preset|color|"+ce.slug:H},k=H=>{let ce=d.flatMap(({gradients:le})=>le).find(({gradient:le})=>le===H);return ce?"var:preset|gradient|"+ce.slug:H},y=fie(n),v=g(r?.color?.background),S=g(t?.color?.background),w=g(r?.color?.gradient),C=g(t?.color?.gradient),E=()=>!!S||!!C,P=H=>{let oe=pe(t,["color","background"],b(H));oe.color.gradient=void 0,o(oe)},R=H=>{let oe=pe(t,["color","gradient"],k(H));oe.color.background=void 0,o(oe)},B=()=>{let H=pe(t,["color","background"],void 0);H.color.gradient=void 0,o(H)},T=cie(n),A=g(r?.elements?.link?.color?.text),L=g(t?.elements?.link?.color?.text),U=H=>{o(pe(t,["elements","link","color","text"],b(H)))},G=g(r?.elements?.link?.[":hover"]?.color?.text),j=g(t?.elements?.link?.[":hover"]?.color?.text),N=H=>{o(pe(t,["elements","link",":hover","color","text"],b(H)))},F=()=>!!L||!!j,K=()=>{let H=pe(t,["elements","link",":hover","color","text"],void 0);H=pe(H,["elements","link","color","text"],void 0),o(H)},Z=lie(n),Q=g(r?.color?.text),J=g(t?.color?.text),ee=()=>!!J,ie=H=>{let oe=pe(t,["color","text"],b(H));Q===A&&(oe=pe(oe,["elements","link","color","text"],b(H))),o(oe)},de=()=>ie(void 0),X=[{name:"caption",label:(0,Ht.__)("Captions"),showPanel:uie(n)},{name:"button",label:(0,Ht.__)("Button"),showPanel:die(n)},{name:"heading",label:(0,Ht.__)("Heading"),showPanel:md(n)},{name:"h1",label:(0,Ht.__)("H1"),showPanel:md(n)},{name:"h2",label:(0,Ht.__)("H2"),showPanel:md(n)},{name:"h3",label:(0,Ht.__)("H3"),showPanel:md(n)},{name:"h4",label:(0,Ht.__)("H4"),showPanel:md(n)},{name:"h5",label:(0,Ht.__)("H5"),showPanel:md(n)},{name:"h6",label:(0,Ht.__)("H6"),showPanel:md(n)}],re=(0,ZI.useCallback)(H=>({...H,color:void 0,elements:{...H?.elements,link:{...H?.elements?.link,color:void 0,":hover":{color:void 0}},...X.reduce((oe,ce)=>({...oe,[ce.name]:{...H?.elements?.[ce.name],color:void 0}}),{})}}),[X]),W=[Z&&{key:"text",label:(0,Ht.__)("Text"),hasValue:ee,resetValue:de,isShownByDefault:s.text,indicators:[Q],tabs:[{key:"text",label:(0,Ht.__)("Text"),inheritedValue:Q,setValue:ie,userValue:J}]},y&&{key:"background",label:(0,Ht.__)("Background"),hasValue:E,resetValue:B,isShownByDefault:s.background,indicators:[w??v],tabs:[p&&{key:"background",label:(0,Ht.__)("Color"),inheritedValue:v,setValue:P,userValue:S},h&&{key:"gradient",label:(0,Ht.__)("Gradient"),inheritedValue:w,setValue:R,userValue:C,isGradient:!0}].filter(Boolean)},T&&{key:"link",label:(0,Ht.__)("Link"),hasValue:F,resetValue:K,isShownByDefault:s.link,indicators:[A,G],tabs:[{key:"link",label:(0,Ht.__)("Default"),inheritedValue:A,setValue:U,userValue:L},{key:"hover",label:(0,Ht.__)("Hover"),inheritedValue:G,setValue:N,userValue:j}]}].filter(Boolean);return X.forEach(({name:H,label:oe,showPanel:ce})=>{if(!ce)return;let le=g(r?.elements?.[H]?.color?.background),ye=g(r?.elements?.[H]?.color?.gradient),_e=g(r?.elements?.[H]?.color?.text),Ve=g(t?.elements?.[H]?.color?.background),go=g(t?.elements?.[H]?.color?.gradient),ot=g(t?.elements?.[H]?.color?.text),Yt=()=>!!(ot||Ve||go),Ct=()=>{let dt=pe(t,["elements",H,"color","background"],void 0);dt.elements[H].color.gradient=void 0,dt.elements[H].color.text=void 0,o(dt)},rt=dt=>{o(pe(t,["elements",H,"color","text"],b(dt)))},Vt=dt=>{let ao=pe(t,["elements",H,"color","background"],b(dt));ao.elements[H].color.gradient=void 0,o(ao)},Ft=dt=>{let ao=pe(t,["elements",H,"color","gradient"],k(dt));ao.elements[H].color.background=void 0,o(ao)},We=!0,so=H!=="caption";W.push({key:H,label:oe,hasValue:Yt,resetValue:Ct,isShownByDefault:s[H],indicators:We&&so?[_e,ye??le]:[We?_e:ye??le],tabs:[p&&We&&{key:"text",label:(0,Ht.__)("Text"),inheritedValue:_e,setValue:rt,userValue:ot},p&&so&&{key:"background",label:(0,Ht.__)("Background"),inheritedValue:le,setValue:Vt,userValue:Ve},h&&so&&{key:"gradient",label:(0,Ht.__)("Gradient"),inheritedValue:ye,setValue:Ft,userValue:go,isGradient:!0}].filter(Boolean)})}),(0,et.jsxs)(e,{resetAllFilter:re,value:t,onChange:o,panelId:i,label:a,children:[W.map(H=>{let{key:oe,...ce}=H;return(0,et.jsx)(YBe,{...ce,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},oe)}),c]})}var lt=l(O()),nc=l(M()),vb=l(I());var to=l(x()),JI=[];function mie(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||JI,i=e?.color?.[t]?.theme||JI,s=e?.color?.[t]?.default||JI;return(0,vb.useMemo)(()=>[...n,...i,...r?JI:s],[r,n,i,s])}function pie(e){return hie(e)}function hie(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function ZBe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Go(),s=()=>{let a=e(o);t(a)};return(0,to.jsx)(lt.__experimentalToolsPanel,{label:(0,nc._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var XBe={duotone:!0},QBe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,nc.__)("Duotone")},JBe=({indicator:e,label:t})=>(0,to.jsxs)(lt.__experimentalHStack,{justify:"flex-start",children:[(0,to.jsx)(lt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,to.jsx)(lt.Flex,{expanded:!1,children:e==="unset"||!e?(0,to.jsx)(lt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,to.jsx)(lt.DuotoneSwatch,{values:e})})}),(0,to.jsx)(lt.FlexItem,{title:t,children:t})]}),eEe=(e,t)=>({onToggle:o,isOpen:r})=>{let n=(0,vb.useRef)(void 0),i={onClick:o,className:V("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":r}),"aria-expanded":r,ref:n},s={onClick:()=>{r&&o(),t(),n.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,nc.__)("Reset")};return(0,to.jsxs)(to.Fragment,{children:[(0,to.jsx)(lt.Button,{__next40pxDefaultSize:!0,...i,children:(0,to.jsx)(JBe,{indicator:e,label:(0,nc.__)("Duotone")})}),e&&(0,to.jsx)(lt.Button,{size:"small",icon:Br,...s})]})};function eP({as:e=ZBe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=XBe}){let a=b=>un({settings:n},"",b),c=hie(n),u=mie(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=mie(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),m=b=>{let k=u.find(({colors:v})=>v===b),y=k?`var:preset|duotone|${k.slug}`:b;o(pe(t,["filter","duotone"],y))},p=()=>!!t?.filter?.duotone,h=()=>m(void 0),g=(0,vb.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,to.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,to.jsx)(lt.__experimentalToolsPanelItem,{label:(0,nc.__)("Duotone"),hasValue:p,onDeselect:h,isShownByDefault:s.duotone,panelId:i,children:(0,to.jsx)(lt.Dropdown,{popoverProps:QBe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:eEe(f,h),renderContent:()=>(0,to.jsx)(lt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,to.jsxs)(lt.MenuGroup,{label:(0,nc.__)("Duotone"),children:[(0,to.jsx)("p",{children:(0,nc.__)("Create a two-tone color effect without losing your original image.")}),(0,to.jsx)(lt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var yb=l(O()),M_=l(M());var Om=l(x());function gie(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function bie({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=Go(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,Om.jsx)(Om.Fragment,{children:(0,Om.jsx)(yb.__experimentalToolsPanel,{label:(0,M_._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,Om.jsx)(yb.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,M_.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,Om.jsx)(yb.ToggleControl,{label:(0,M_.__)("Enlarge on click"),checked:a,onChange:s})})})})}var _b=l(O()),kie=l(I()),w3=l(M());var N_=l(x());function vie({value:e,onChange:t,inheritedValue:o=e}){let[r,n]=(0,kie.useState)(null),i=o?.css;function s(c){if(t({...e,css:c}),r){let[u]=Af([{css:c}],".for-validation-only");u&&n(null)}}function a(c){if(!c?.target?.value){n(null);return}let[u]=Af([{css:c.target.value}],".for-validation-only");n(u===null?(0,w3.__)("There is an error with your CSS structure."):null)}return(0,N_.jsxs)(_b.__experimentalVStack,{spacing:3,children:[r&&(0,N_.jsx)(_b.Notice,{status:"error",onRemove:()=>n(null),children:r}),(0,N_.jsx)(_b.TextareaControl,{label:(0,w3.__)("Additional CSS"),value:i,onChange:c=>s(c),onBlur:a,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1})]})}var nP=l(O()),iP=l(I());var Ee=l(O());var wt=l(M()),_ie=l(ii()),C3=l(Zr()),ic=l(I()),D_=l(D()),Sie=l(ze()),xie=l(bC());var Be=l(x()),tP="image",tEe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},rP=()=>{},oP=e=>{window.requestAnimationFrame(()=>{let[t]=Sie.focus.tabbable.find(e?.current);t&&t.focus()})};function oEe(e){return e==="cover"||e===void 0?(0,wt.__)("Image covers the space evenly."):e==="contain"?(0,wt.__)("Image is contained without distortion."):(0,wt.__)("Image has a fixed width.")}var rEe=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;let t=isNaN(e.x)?.5:e.x,o=isNaN(e.y)?.5:e.y;return`${t*100}% ${o*100}%`},nEe=e=>{if(!e)return{x:void 0,y:void 0};let[t,o]=e.split(" ").map(r=>parseFloat(r)/100);return t=isNaN(t)?void 0:t,o=isNaN(o)?t:o,{x:t,y:o}};function wie({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=rP}){let{isOpen:s,...a}=o;(0,ic.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Be.jsxs)(Ee.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,Be.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,Be.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,Be.jsxs)(Ee.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,Be.jsx)(Ee.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Be.jsx)(Ee.VisuallyHidden,{as:"span",children:t?(0,wt.sprintf)((0,wt.__)("Background image: %s"),r||n):(0,wt.__)("No background image selected")})]})]});return e==="button"?(0,Be.jsx)(Ee.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function iEe({label:e,filename:t,url:o,children:r,onToggle:n=rP,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,C3.getFilename)(o)||(0,wt.__)("Add background image");return(0,Be.jsx)(Ee.Dropdown,{popoverProps:tEe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,wt.__)("Background size, position and repeat options."),isOpen:d};return(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(wie,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Be.jsx)(Ee.Button,{__next40pxDefaultSize:!0,label:(0,wt.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Br,onClick:()=>{s(),d&&u(),oP(a)}})]})},renderContent:()=>(0,Be.jsx)(Ee.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function sEe(){return(0,Be.jsx)(Ee.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Be.jsx)(Ee.Spinner,{})})}function yie({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=rP,onResetImage:n=rP,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,ic.useState)(!1),{getSettings:d}=(0,D_.useSelect)(_),{id:f,title:m,url:p}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:h}=(0,D_.useDispatch)(_ie.store),g=E=>{h(E,{type:"snackbar"}),u(!1)},b=()=>e(pe(t,["background","backgroundImage"],void 0)),k=E=>{if(!E||!E.url){b(),u(!1);return}if((0,xie.isBlobURL)(E.url)){u(!0);return}if(E.media_type&&E.media_type!==tP||!E.media_type&&E.type&&E.type!==tP){g((0,wt.__)("Only images can be used as a background image."));return}let P=t?.background?.backgroundSize||s?.backgroundSize,R=t?.background?.backgroundPosition;e(pe(t,["background"],{...t?.background,backgroundImage:{url:E.url,id:E.id,source:"file",title:E.title||void 0},backgroundPosition:!R&&(P==="auto"||!P)?"50% 0":R,backgroundSize:P})),u(!1),oP(a)},y=E=>{d().mediaUpload({allowedTypes:[tP],filesList:E,onFileChange([P]){k(P)},onError:g,multiple:!1})},v=Rm(t),S=()=>e(pe(t,["background"],{backgroundImage:"none"})),w=!v&&Rm(o),C=m||(0,C3.getFilename)(p)||(0,wt.__)("Add background image");return(0,Be.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Be.jsx)(sEe,{}),(0,Be.jsx)(Yg,{mediaId:f,mediaURL:p,allowedTypes:[tP],accept:"image/*",onSelect:k,popoverProps:{className:V({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Be.jsx)(wie,{imgUrl:p,filename:m,label:C}),renderToggle:E=>(0,Be.jsx)(Ee.Button,{...E,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{oP(a),n()},children:w&&(0,Be.jsx)(Ee.MenuItem,{onClick:()=>{oP(a),S(),r()},children:(0,wt.__)("Remove")})}),(0,Be.jsx)(Ee.DropZone,{onFilesDrop:y,label:(0,wt.__)("Drop to upload")})]})}function aEe({onChange:e,style:t,inheritedValue:o,defaultValues:r}){let n=t?.background?.backgroundSize||o?.background?.backgroundSize,i=t?.background?.backgroundRepeat||o?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||o?.background?.backgroundImage?.url,a=t?.background?.backgroundImage?.id,c=t?.background?.backgroundPosition||o?.background?.backgroundPosition,u=t?.background?.backgroundAttachment||o?.background?.backgroundAttachment,d=!n&&a?r?.backgroundSize:n||"auto";d=["cover","contain","auto"].includes(d)?d:"auto";let f=!(i==="no-repeat"||d==="cover"&&i===void 0),m=k=>{let y=i,v=c;k==="contain"&&(y="no-repeat",v=void 0),k==="cover"&&(y=void 0,v=void 0),(d==="cover"||d==="contain")&&k==="auto"&&(y=void 0,t?.background?.backgroundImage?.id&&(v="50% 0")),!k&&d==="auto"&&(k="auto"),e(pe(t,["background"],{...t?.background,backgroundPosition:v,backgroundRepeat:y,backgroundSize:k}))},p=k=>{e(pe(t,["background","backgroundPosition"],rEe(k)))},h=()=>e(pe(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(pe(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,Be.jsxs)(Ee.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Be.jsx)(Ee.FocalPointPicker,{label:(0,wt.__)("Focal point"),url:s,value:nEe(b),onChange:p}),(0,Be.jsx)(Ee.ToggleControl,{label:(0,wt.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Be.jsxs)(Ee.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,wt.__)("Size"),value:d,onChange:m,isBlock:!0,help:oEe(n||r?.backgroundSize),children:[(0,Be.jsx)(Ee.__experimentalToggleGroupControlOption,{value:"cover",label:(0,wt._x)("Cover","Size option for background image control")},"cover"),(0,Be.jsx)(Ee.__experimentalToggleGroupControlOption,{value:"contain",label:(0,wt._x)("Contain","Size option for background image control")},"contain"),(0,Be.jsx)(Ee.__experimentalToggleGroupControlOption,{value:"auto",label:(0,wt._x)("Tile","Size option for background image control")},"tile")]}),(0,Be.jsxs)(Ee.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Be.jsx)(Ee.__experimentalUnitControl,{"aria-label":(0,wt.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,wt.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Be.jsx)(Ee.ToggleControl,{label:(0,wt.__)("Repeat"),checked:f,onChange:h,disabled:d==="cover"})]})]})}function Cie({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,D_.useSelect)(k=>{let{getSettings:y}=k(_),v=y();return{globalStyles:v[Vs],_links:v[TS]}},[]),a=(0,ic.useMemo)(()=>{let k={background:{}};return o?.background?(Object.entries(o?.background).forEach(([y,v])=>{k.background[y]=ig(v,{styles:i,_links:s})}),k):o},[i,s,o]),c=()=>t(pe(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=Rm(e)||Rm(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,p=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[h,g]=(0,ic.useState)(!1),b=(0,ic.useRef)();return(0,Be.jsx)("div",{ref:b,className:V("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":h}),children:p?(0,Be.jsx)(iEe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Be.jsxs)(Ee.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Be.jsx)(yie,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Be.jsx)(aEe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Be.jsx)(yie,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var B3=l(M()),V_=l(x()),lEe={backgroundImage:!0};function F_(e){return iP.Platform.OS==="web"&&e?.background?.backgroundImage}function Rm(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function cEe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=Go();return(0,V_.jsx)(nP.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}function sP({as:e=cEe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=lEe,defaultValues:a={},headerLabel:c=(0,B3.__)("Background image")}){let u=F_(n),d=()=>o(pe(t,["background"],{})),f=(0,iP.useCallback)(m=>({...m,background:{}}),[]);return(0,V_.jsx)(e,{resetAllFilter:f,value:t,onChange:o,panelId:i,headerLabel:c,children:u&&(0,V_.jsx)(nP.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,B3.__)("Image"),onDeselect:d,isShownByDefault:s.backgroundImage,panelId:i,children:(0,V_.jsx)(Cie,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})})})}var lP=l(M()),I3=l(x()),Lm="__experimentalBorder",j_="shadow",Bie=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},Am=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=Bie(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=Bie(e,"color",o);return r||{color:o}};function aP(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Iie(e){if((0,T3.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};let t=e?.border?.color,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r={...e};return r.border={...r.border,color:o?void 0:t},{style:Ce(r),borderColor:o}}function Pie(e){return(0,T3.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function uEe({label:e,children:t,resetAllFilter:o}){let r=(0,Sb.useCallback)(n=>{let i=Pie(n),s=o(i);return{...n,...Iie(s)}},[o]);return(0,I3.jsx)(he,{group:"border",resetAllFilter:r,label:e,children:t})}function Oie({clientId:e,name:t,setAttributes:o,settings:r}){let n=KI(r),{style:i,borderColor:s}=(0,Tie.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(_).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,Sb.useMemo)(()=>Pie({style:i,borderColor:s}),[i,s]),c=d=>{o(Iie(d))};if(!n)return null;let u={...(0,z_.getBlockSupport)(t,[Lm,"__experimentalDefaultControls"]),...(0,z_.getBlockSupport)(t,[j_,"__experimentalDefaultControls"])};return(0,I3.jsx)(qI,{as:uEe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function cP(e,t="any"){if(Sb.Platform.OS!=="web")return!1;let o=(0,z_.getBlockSupport)(e,Lm);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function kb({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=Ri(e),n=L_(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,lP.__)("Border & Shadow"):o?(0,lP.__)("Shadow"):(0,lP.__)("Border")}function dEe(e){return!cP(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function Rie(e,t,o){if(!cP(t,"color")||qe(t,Lm,"color"))return e;let r=P3(o),n=V(e.className,r);return e.className=n||void 0,e}function P3(e){let{borderColor:t,style:o}=e,r=Qn("border-color",t);return V({"has-border-color":t||o?.border?.color,[r]:!!r})}function fEe({name:e,borderColor:t,style:o}){let{colors:r}=ed();if(!cP(e,"color")||qe(e,Lm,"color"))return{};let{color:n}=Am({colors:r,namedColor:t}),{color:i}=Am({colors:r,namedColor:aP(o?.border?.top?.color)}),{color:s}=Am({colors:r,namedColor:aP(o?.border?.right?.color)}),{color:a}=Am({colors:r,namedColor:aP(o?.border?.bottom?.color)}),{color:c}=Am({colors:r,namedColor:aP(o?.border?.left?.color)});return Rie({style:Ce({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var O3={useBlockProps:fEe,addSaveProps:Rie,attributeKeys:["borderColor","style"],hasSupport(e){return cP(e,"color")}};(0,Eie.addFilter)("blocks.registerBlockType","core/border/addAttributes",dEe);var M3=l(nt()),sc=l($()),pd=l(I()),zie=l(D());var A3=l($()),Aie=l(D()),Lie=l(I());var L3=l(x()),Mm="background",R3={backgroundSize:"cover",backgroundPosition:"50% 50%"};function uP(e,t="any"){let o=(0,A3.getBlockSupport)(e,Mm);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat:!!o?.[t]}function dP(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:R3.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:R3.backgroundPosition}),t}function mEe({name:e,style:t}){if(!uP(e)||!t?.background?.backgroundImage)return;let o=dP(t?.background);if(o)return{style:{...o}}}function Mie(e){return Rm(e)?"has-background":""}function pEe({children:e}){let t=(0,Lie.useCallback)(o=>({...o,style:{...o.style,background:void 0}}),[]);return(0,L3.jsx)(he,{group:"background",resetAllFilter:t,children:e})}function Nie({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,inheritedValue:i}=(0,Aie.useSelect)(u=>{let{getBlockAttributes:d,getSettings:f}=u(_),m=f();return{style:d(e)?.style,inheritedValue:m[Vs]?.blocks?.[t]}},[e,t]);if(!F_(r)||!uP(t,"backgroundImage"))return null;let s=u=>{o({style:Ce(u)})},a={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&uP(t,"backgroundSize")}},c=(0,A3.getBlockSupport)(t,[Mm,"defaultControls"]);return(0,L3.jsx)(sP,{inheritedValue:i,as:pEe,panelId:e,defaultValues:R3,settings:a,onChange:s,defaultControls:c,value:n})}var Die={useBlockProps:mEe,attributeKeys:["style"],hasSupport:uP};var mP=l(I());var Vie=l(x());function fP(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function hEe(e){if(!e)return{};let t=e.querySelector("a"),o=t?.innerText?fP(t,"color"):void 0,r=fP(e,"color"),n=e,i=fP(n,"background-color");for(;i==="rgba(0, 0, 0, 0)"&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,i=fP(n,"background-color");return{textColor:r,backgroundColor:i,linkColor:o}}function gEe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function Fie({clientId:e}){let t=pt(e),[o,r]=(0,mP.useReducer)(gEe,{});return(0,mP.useLayoutEffect)(()=>{if(!t)return;function n(){r(hEe(t))}window.requestAnimationFrame(()=>window.requestAnimationFrame(n))}),(0,Vie.jsx)(sT,{backgroundColor:o.backgroundColor,textColor:o.textColor,linkColor:o.linkColor,enableAlphaChecker:!0})}var pP=l(x()),Yo="color",hP=e=>{let t=(0,sc.getBlockSupport)(e,Yo);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},bEe=e=>{if(pd.Platform.OS!=="web")return!1;let t=(0,sc.getBlockSupport)(e,Yo);return t!==null&&typeof t=="object"&&!!t.link},N3=e=>{let t=(0,sc.getBlockSupport)(e,Yo);return t!==null&&typeof t=="object"&&!!t.gradients},kEe=e=>{let t=(0,sc.getBlockSupport)(e,Yo);return t&&t.background!==!1},vEe=e=>{let t=(0,sc.getBlockSupport)(e,Yo);return t&&t.text!==!1};function yEe(e){return hP(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),N3(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function jie(e,t,o){if(!hP(t)||qe(t,Yo))return e;let r=N3(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!qe(t,Yo,g),u=c("text")?Qn("color",i):void 0,d=c("gradients")?Ap(s):void 0,f=c("background")?Qn("background-color",n):void 0,m=c("background")||c("gradients"),p=n||a?.color?.background||r&&(s||a?.color?.gradient),h=V(e.className,u,d,{[f]:(!r||!a?.color?.gradient)&&!!f,"has-text-color":c("text")&&(i||a?.color?.text),"has-background":m&&p,"has-link-color":c("link")&&a?.elements?.link?.color});return e.className=h||void 0,e}function Uie(e){let t=e?.color?.text,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r=e?.color?.background,n=r?.startsWith("var:preset|color|")?r.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,a={...e};return a.color={...a.color,text:o?void 0:t,background:n?void 0:r,gradient:s?void 0:i},{style:Ce(a),textColor:o,backgroundColor:n,gradient:s}}function Hie(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function _Ee({children:e,resetAllFilter:t}){let o=(0,pd.useCallback)(r=>{let n=Hie(r),i=t(n);return{...r,...Uie(i)}},[t]);return(0,pP.jsx)(he,{group:"color",resetAllFilter:o,children:e})}function gP({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=XI(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,zie.useSelect)(b=>{if(!a)return{};let{style:k,textColor:y,backgroundColor:v,gradient:S}=b(_).getBlockAttributes(e)||{};return{style:k,textColor:y,backgroundColor:v,gradient:S}},[e,a]),m=(0,pd.useMemo)(()=>Hie({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),p=b=>{o(Uie(b))};if(!a)return null;s=s||(0,sc.getBlockSupport)(t,[Yo,"__experimentalDefaultControls"]);let h=pd.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,sc.getBlockSupport)(t,[Yo,"enableContrastChecker"])!==!1;return(0,pP.jsx)(QI,{as:n||_Ee,panelId:e,settings:r,value:m,onChange:p,defaultControls:s,label:i,enableContrastChecker:(0,sc.getBlockSupport)(t,[Yo,"enableContrastChecker"])!==!1,children:h&&(0,pP.jsx)(Fie,{clientId:e})})}function SEe({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=fe("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,pd.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!hP(e)||qe(e,Yo))return{};let u={};o&&!qe(e,Yo,"text")&&(u.color=Ds(c,o)?.color),t&&!qe(e,Yo,"background")&&(u.backgroundColor=Ds(c,t)?.color);let d=jie({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:V(d.className,!f&&Mie(n))}}var D3={useBlockProps:SEe,addSaveProps:jie,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:hP},xEe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function wEe(e,t,o,r){let n=e.name,i={linkColor:bEe(n),textColor:vEe(n),backgroundColor:kEe(n),gradient:N3(n)};return bP(i,xEe,e,t,o,r)}(0,M3.addFilter)("blocks.registerBlockType","core/color/addAttribute",yEe);(0,M3.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",wEe);var Ro=l(x());function CEe({blockName:e,clientId:t,contentClientIds:o}){let r=Ri(e),{updateBlockAttributes:n}=(0,kP.useDispatch)(_),{hasButton:i,hasHeading:s}=(0,kP.useSelect)(c=>{let u=c(_).getBlockNamesByClientId(o);return{hasButton:u.includes("core/button"),hasHeading:u.includes("core/heading")}},[o]);return(0,Ro.jsx)(gP,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:x3,label:(0,Nm.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var BEe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=kb({blockName:e});return(0,Ro.jsxs)(Ro.Fragment,{children:[o&&(0,Ro.jsx)("div",{children:(0,Ro.jsx)(Gie.PanelBody,{title:(0,Nm.__)("Styles"),children:(0,Ro.jsx)(Bg,{clientId:t})})}),r&&window?.__experimentalContentOnlyPatternInsertion&&(0,Ro.jsx)(CEe,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(he.Slot,{group:"color",label:(0,Nm.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Ro.jsx)(he.Slot,{group:"background",label:(0,Nm.__)("Background image")}),(0,Ro.jsx)(he.Slot,{group:"filter"}),(0,Ro.jsx)(he.Slot,{group:"typography",label:(0,Nm.__)("Typography")}),(0,Ro.jsx)(he.Slot,{group:"dimensions",label:(0,Nm.__)("Dimensions")}),(0,Ro.jsx)(he.Slot,{group:"border",label:i}),(0,Ro.jsx)(he.Slot,{group:"styles"})]})]})},Wie=BEe;var Tle=l(O()),Ile=l(M());var vP=l(D()),Ai=l(O());var Ta=l(x());function yP({clientIds:e,onSelect:t}){return e.length?(0,Ta.jsx)(Ai.__experimentalVStack,{spacing:1,children:e.map(o=>(0,Ta.jsx)(EEe,{onSelect:t,clientId:o},o))}):null}function EEe({clientId:e,onSelect:t}){let o=gt(e),r=jo({clientId:e,context:"list-view"}),{isSelected:n}=(0,vP.useSelect)(s=>{let{isBlockSelected:a,hasSelectedInnerBlock:c}=s(_);return{isSelected:a(e)||c(e,!0)}},[e]),{selectBlock:i}=(0,vP.useDispatch)(_);return(0,Ta.jsx)(Ai.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:n,onClick:async()=>{await i(e),t&&t(e)},children:(0,Ta.jsxs)(Ai.Flex,{children:[(0,Ta.jsx)(Ai.FlexItem,{children:(0,Ta.jsx)(Pe,{icon:o?.icon})}),(0,Ta.jsx)(Ai.FlexBlock,{style:{textAlign:"left"},children:(0,Ta.jsx)(Ai.__experimentalTruncate,{children:r})})]})})}var Y_=l($()),$r=l(O()),Fb=l(D()),Cle=l(M());var V3=l(M());var At="isAny",Lt="isNone",br="isAll",kr="isNotAll",Ur="between",Hr="inThePast",hn="over",Wt="is",$t="isNot",hd="lessThan",gd="greaterThan",bd="lessThanOrEqual",kd="greaterThanOrEqual",vd="before",yd="after",_d="beforeInc",Sd="afterInc",Ia="contains",Pa="notContains",Oa="startsWith",xd="on",wd="notOn";var mlt={asc:(0,V3.__)("Sort ascending"),desc:(0,V3.__)("Sort descending")};var $ie=l(_S()),{lock:hlt,unlock:Mt}=(0,$ie.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews");var U_=l(I()),TEe=[];function Ra({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:TEe,[r,n]=(0,U_.useState)(o),[i,s]=(0,U_.useState)(!1);return(0,U_.useEffect)(()=>{if(!t){n(o);return}let a=!1;return s(!0),t().then(c=>{if(!a){let u=Array.isArray(c)&&c.length>0?c:o;n(u)}}).catch(()=>{a||n(o)}).finally(()=>{a||s(!1)}),()=>{a=!0}},[t,o]),{elements:r,isLoading:i}}var se=l(M()),Kt=l(I());var F3=l(x()),oo={Name:(0,F3.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,F3.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})},IEe=[{name:At,label:(0,se.__)("Includes"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),oo),selection:"multi"},{name:Lt,label:(0,se.__)("Is none of"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),oo),selection:"multi"},{name:br,label:(0,se.__)("Includes all"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),oo),selection:"multi"},{name:kr,label:(0,se.__)("Is none of"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),oo),selection:"multi"},{name:Ur,label:(0,se.__)("Between (inc)"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),oo),selection:"custom"},{name:Hr,label:(0,se.__)("In the past"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),oo),selection:"custom"},{name:hn,label:(0,se.__)("Over"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),oo),selection:"custom"},{name:Wt,label:(0,se.__)("Is"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:$t,label:(0,se.__)("Is not"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:hd,label:(0,se.__)("Less than"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:gd,label:(0,se.__)("Greater than"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:bd,label:(0,se.__)("Less than or equal"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:kd,label:(0,se.__)("Greater than or equal"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:vd,label:(0,se.__)("Before"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:yd,label:(0,se.__)("After"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:_d,label:(0,se.__)("Before (inc)"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Sd,label:(0,se.__)("After (inc)"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Ia,label:(0,se.__)("Contains"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Pa,label:(0,se.__)("Doesn't contain"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:Oa,label:(0,se.__)("Starts with"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:xd,label:(0,se.__)("On"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"},{name:wd,label:(0,se.__)("Not on"),filterText:(e,t)=>(0,Kt.createInterpolateElement)((0,se.sprintf)((0,se.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),oo),selection:"single"}];var Kie=()=>IEe.map(e=>e.name);var qie=l(O()),Yie=l(I());function Nt(e,t){let o;return e?.required&&t?.required?o=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?o=t.pattern:e?.min&&t?.min?o=t.min:e?.max&&t?.max?o=t.max:e?.minLength&&t?.minLength?o=t.minLength:e?.maxLength&&t?.maxLength?o=t.maxLength:e?.elements&&t?.elements?o=t.elements:t?.custom&&(o=t.custom),o}var Zie=l(x()),{ValidatedCheckboxControl:PEe}=Mt(qie.privateApis);function Xie({field:e,onChange:t,data:o,hideLabelFromVision:r,validity:n}){let{getValue:i,setValue:s,label:a,description:c,isValid:u}=e,d=(0,Yie.useCallback)(()=>{t(s({item:o,value:!i({item:o})}))},[o,i,t,s]);return(0,Zie.jsx)(PEe,{required:!!e.isValid?.required,customValidity:Nt(u,n),hidden:r,label:a,help:c,checked:i({item:o}),onChange:d})}var OEe=Math.pow(10,8)*24*60*60*1e3,wlt=-OEe,_P=6048e5,Qie=864e5;var REe=3600;var Jie=REe*24,Clt=Jie*7,AEe=Jie*365.2425,LEe=AEe/12,Blt=LEe*3,z3=Symbol.for("constructDateFrom");function Ao(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&z3 in e?e[z3](t):e instanceof Date?new e.constructor(t):new Date(t)}function tt(e,t){return Ao(t||e,e)}function ese(e,t,o){let r=tt(e,o?.in);return isNaN(t)?Ao(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function SP(e,t,o){let r=tt(e,o?.in);if(isNaN(t))return Ao(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=Ao(o?.in||e,r.getTime());i.setMonth(r.getMonth()+t+1,0);let s=i.getDate();return n>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),n),r)}var MEe={};function Cd(){return MEe}function ac(e,t){let o=Cd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=tt(e,t?.in),i=n.getDay(),s=(i<r?7:0)+i-r;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function Dm(e,t){return ac(e,{...t,weekStartsOn:1})}function xP(e,t){let o=tt(e,t?.in),r=o.getFullYear(),n=Ao(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Dm(n),s=Ao(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=Dm(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function j3(e){let t=tt(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function tse(e,...t){let o=Ao.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function U3(e,t){let o=tt(e,t?.in);return o.setHours(0,0,0,0),o}function ose(e,t,o){let[r,n]=tse(o?.in,e,t),i=U3(r),s=U3(n),a=+i-j3(i),c=+s-j3(s);return Math.round((a-c)/Qie)}function rse(e,t){let o=xP(e,t),r=Ao(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Dm(r)}function nse(e,t,o){return SP(e,t*12,o)}function ise(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xb(e){return!(!ise(e)&&typeof e!="number"||isNaN(+tt(e)))}function sse(e,t){let o=tt(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function wP(e,t){let o=tt(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var NEe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ase=(e,t,o)=>{let r,n=NEe[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function CP(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var DEe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VEe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},FEe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lse={date:CP({formats:DEe,defaultWidth:"full"}),time:CP({formats:VEe,defaultWidth:"full"}),dateTime:CP({formats:FEe,defaultWidth:"full"})};var zEe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cse=(e,t,o,r)=>zEe[e];function wb(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",n;if(r==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,a=o?.width?String(o.width):s;n=e.formattingValues[a]||e.formattingValues[s]}else{let s=e.defaultWidth,a=o?.width?String(o.width):e.defaultWidth;n=e.values[a]||e.values[s]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var jEe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},UEe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},HEe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},GEe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},WEe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$Ee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},KEe=(e,t)=>{let o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},use={ordinalNumber:KEe,era:wb({values:jEe,defaultWidth:"wide"}),quarter:wb({values:UEe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:wb({values:HEe,defaultWidth:"wide"}),day:wb({values:GEe,defaultWidth:"wide"}),dayPeriod:wb({values:WEe,defaultWidth:"wide",formattingValues:$Ee,defaultFormattingWidth:"wide"})};function Cb(e){return(t,o={})=>{let r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?YEe(a,f=>f.test(s)):qEe(a,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(c):c,u=o.valueCallback?o.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function qEe(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function YEe(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function dse(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let n=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=o.valueCallback?o.valueCallback(s):s;let a=t.slice(n.length);return{value:s,rest:a}}}var ZEe=/^(\d+)(th|st|nd|rd)?/i,XEe=/\d+/i,QEe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},JEe={any:[/^b/i,/^(a|c)/i]},eTe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tTe={any:[/1/i,/2/i,/3/i,/4/i]},oTe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rTe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nTe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},iTe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},sTe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},aTe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fse={ordinalNumber:dse({matchPattern:ZEe,parsePattern:XEe,valueCallback:e=>parseInt(e,10)}),era:Cb({matchPatterns:QEe,defaultMatchWidth:"wide",parsePatterns:JEe,defaultParseWidth:"any"}),quarter:Cb({matchPatterns:eTe,defaultMatchWidth:"wide",parsePatterns:tTe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cb({matchPatterns:oTe,defaultMatchWidth:"wide",parsePatterns:rTe,defaultParseWidth:"any"}),day:Cb({matchPatterns:nTe,defaultMatchWidth:"wide",parsePatterns:iTe,defaultParseWidth:"any"}),dayPeriod:Cb({matchPatterns:sTe,defaultMatchWidth:"any",parsePatterns:aTe,defaultParseWidth:"any"})};var H3={code:"en-US",formatDistance:ase,formatLong:lse,formatRelative:cse,localize:use,match:fse,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mse(e,t){let o=tt(e,t?.in);return ose(o,wP(o))+1}function pse(e,t){let o=tt(e,t?.in),r=+Dm(o)-+rse(o);return Math.round(r/_P)+1}function BP(e,t){let o=tt(e,t?.in),r=o.getFullYear(),n=Cd(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Ao(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=ac(s,t),c=Ao(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=ac(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function hse(e,t){let o=Cd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=BP(e,t),i=Ao(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),ac(i,t)}function gse(e,t){let o=tt(e,t?.in),r=+ac(o,t)-+hse(o,t);return Math.round(r/_P)+1}function Ge(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var lc={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return Ge(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):Ge(o+1,2)},d(e,t){return Ge(e.getDate(),t.length)},a(e,t){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(e,t){return Ge(e.getHours()%12||12,t.length)},H(e,t){return Ge(e.getHours(),t.length)},m(e,t){return Ge(e.getMinutes(),t.length)},s(e,t){return Ge(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return Ge(n,t.length)}};var Bb={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},G3={G:function(e,t,o){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"});case"GGGGG":return o.era(r,{width:"narrow"});case"GGGG":default:return o.era(r,{width:"wide"})}},y:function(e,t,o){if(t==="yo"){let r=e.getFullYear(),n=r>0?r:1-r;return o.ordinalNumber(n,{unit:"year"})}return lc.y(e,t)},Y:function(e,t,o,r){let n=BP(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return Ge(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):Ge(i,t.length)},R:function(e,t){let o=xP(e);return Ge(o,t.length)},u:function(e,t){let o=e.getFullYear();return Ge(o,t.length)},Q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ge(r,2);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ge(r,2);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,o){let r=e.getMonth();switch(t){case"M":case"MM":return lc.M(e,t);case"Mo":return o.ordinalNumber(r+1,{unit:"month"});case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,o){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ge(r+1,2);case"Lo":return o.ordinalNumber(r+1,{unit:"month"});case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let n=gse(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):Ge(n,t.length)},I:function(e,t,o){let r=pse(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):Ge(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):lc.d(e,t)},D:function(e,t,o){let r=mse(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):Ge(r,t.length)},E:function(e,t,o){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"});case"EEEE":default:return o.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,o,r){let n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ge(i,2);case"eo":return o.ordinalNumber(i,{unit:"day"});case"eee":return o.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ge(i,t.length);case"co":return o.ordinalNumber(i,{unit:"day"});case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return Ge(n,t.length);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});case"iiii":default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),n;switch(r===12?n=Bb.noon:r===0?n=Bb.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),n;switch(r>=17?n=Bb.evening:r>=12?n=Bb.afternoon:r>=4?n=Bb.morning:n=Bb.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return lc.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):lc.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):lc.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):lc.s(e,t)},S:function(e,t){return lc.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return kse(r);case"XXXX":case"XX":return Vm(r);case"XXXXX":case"XXX":default:return Vm(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return kse(r);case"xxxx":case"xx":return Vm(r);case"xxxxx":case"xxx":default:return Vm(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bse(r,":");case"OOOO":default:return"GMT"+Vm(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bse(r,":");case"zzzz":default:return"GMT"+Vm(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return Ge(r,t.length)},T:function(e,t,o){return Ge(+e,t.length)}};function bse(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),i=r%60;return i===0?o+String(n):o+String(n)+t+Ge(i,2)}function kse(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):Vm(e,t)}function Vm(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Ge(Math.trunc(r/60),2),i=Ge(r%60,2);return o+n+t+i}var vse=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},yse=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},lTe=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return vse(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",vse(r,t)).replace("{{time}}",yse(n,t))},_se={p:yse,P:lTe};var cTe=/^D+$/,uTe=/^Y+$/,dTe=["D","DD","YY","YYYY"];function Sse(e){return cTe.test(e)}function xse(e){return uTe.test(e)}function wse(e,t,o){let r=fTe(e,t,o);if(console.warn(r),dTe.includes(e))throw new RangeError(r)}function fTe(e,t,o){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var mTe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pTe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hTe=/^'([^]*?)'?$/,gTe=/''/g,bTe=/[a-zA-Z]/;function H_(e,t,o){let r=Cd(),n=o?.locale??r.locale??H3,i=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=tt(e,o?.in);if(!xb(a))throw new RangeError("Invalid time value");let c=t.match(pTe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=_se[f];return m(d,n.formatLong)}return d}).join("").match(mTe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:kTe(d)};if(G3[f])return{isToken:!0,value:d};if(f.match(bTe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(a,c));let u={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!o?.useAdditionalWeekYearTokens&&xse(f)||!o?.useAdditionalDayOfYearTokens&&Sse(f))&&wse(f,t,String(e));let m=G3[f[0]];return m(a,f,n.localize,u)}).join("")}function kTe(e){let t=e.match(hTe);return t?t[1].replace(gTe,"'"):e}function G_(e,t,o){return ese(e,-t,o)}function Cse(e,t,o){return SP(e,-t,o)}function Bse(e,t,o){return nse(e,-t,o)}var Ib=l(O()),Li=l(I()),$3=l(M()),K3=l(Qu());var Bd=l(O()),W3=l(I()),Aa=l(M());var Eb=l(x()),vTe={[Hr]:[{value:"days",label:(0,Aa.__)("Days")},{value:"weeks",label:(0,Aa.__)("Weeks")},{value:"months",label:(0,Aa.__)("Months")},{value:"years",label:(0,Aa.__)("Years")}],[hn]:[{value:"days",label:(0,Aa.__)("Days ago")},{value:"weeks",label:(0,Aa.__)("Weeks ago")},{value:"months",label:(0,Aa.__)("Months ago")},{value:"years",label:(0,Aa.__)("Years ago")}]};function EP({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=vTe[i===Hr?"inThePast":"over"],{id:a,label:c,getValue:u,setValue:d}=o,f=u({item:t}),{value:m="",unit:p=s[0].value}=f&&typeof f=="object"?f:{},h=(0,W3.useCallback)(b=>r(d({item:t,value:{value:Number(b),unit:p}})),[r,d,t,p]),g=(0,W3.useCallback)(b=>r(d({item:t,value:{value:m,unit:b}})),[r,d,t,m]);return(0,Eb.jsx)(Bd.BaseControl,{id:a,className:V(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,Eb.jsxs)(Bd.__experimentalHStack,{spacing:2.5,children:[(0,Eb.jsx)(Bd.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:h}),(0,Eb.jsx)(Bd.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,Aa.__)("Unit"),value:p,options:s,onChange:g,hideLabelFromVision:!0})]})})}var Ese=l(Qu());function Tb(e){if(!e)return null;let t=(0,Ese.getDate)(e);return t&&xb(t)?t:null}var Ed=l(x()),{DateCalendar:yTe,ValidatedInputControl:_Te}=Mt(Ib.privateApis),STe=e=>e?typeof e=="string"?e:H_(e,"yyyy-MM-dd'T'HH:mm"):"";function xTe({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{id:i,label:s,description:a,setValue:c,getValue:u,isValid:d}=t,f=u({item:e}),m=typeof f=="string"?f:void 0,[p,h]=(0,Li.useState)(()=>Tb(m)||new Date),g=(0,Li.useRef)(null),b=(0,Li.useRef)(),k=(0,Li.useRef)(null),y=(0,Li.useCallback)(R=>o(c({item:e,value:R})),[e,o,c]);(0,Li.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let v=(0,Li.useCallback)(R=>{let B;if(R){let T=R;if(m){let A=Tb(m);A&&(T=new Date(R),T.setHours(A.getHours()),T.setMinutes(A.getMinutes()))}B=T.toISOString(),y(B),b.current&&clearTimeout(b.current)}else y(void 0);k.current=g.current&&g.current.ownerDocument.activeElement,b.current=setTimeout(()=>{g.current&&(g.current.focus(),g.current.blur(),y(B),k.current&&k.current instanceof HTMLElement&&k.current.focus())},0)},[y,m]),S=(0,Li.useCallback)(R=>{if(R){let B=new Date(R);y(B.toISOString());let T=Tb(B.toISOString());T&&h(T)}else y(void 0)},[y]),{format:w}=t,C=w.weekStartsOn??(0,K3.getSettings)().l10n.startOfWeek,{timezone:{string:E}}=(0,K3.getSettings)(),P=d?.required&&!r?`${s} (${(0,$3.__)("Required")})`:s;return(0,Ed.jsx)(Ib.BaseControl,{id:i,label:P,help:a,hideLabelFromVision:r,children:(0,Ed.jsxs)(Ib.__experimentalVStack,{spacing:4,children:[(0,Ed.jsx)(yTe,{style:{width:"100%"},selected:m&&Tb(m)||void 0,onSelect:v,month:p,onMonthChange:h,timeZone:E||void 0,weekStartsOn:C}),(0,Ed.jsx)(_Te,{ref:g,__next40pxDefaultSize:!0,required:!!d?.required,customValidity:Nt(d,n),type:"datetime-local",label:(0,$3.__)("Date time"),hideLabelFromVision:!0,value:m?STe(Tb(m)||void 0):"",onChange:S})]})})}function Tse({data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n,validity:i}){return n===Hr||n===hn?(0,Ed.jsx)(EP,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n}):(0,Ed.jsx)(xTe,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i})}var qt=l(O()),ut=l(I()),ar=l(M()),vr=l(Qu());var ct=l(x()),{DateCalendar:wTe,DateRangeCalendar:CTe}=Mt(qt.privateApis),BTe=[{id:"today",label:(0,ar.__)("Today"),getValue:()=>(0,vr.getDate)(null)},{id:"yesterday",label:(0,ar.__)("Yesterday"),getValue:()=>{let e=(0,vr.getDate)(null);return G_(e,1)}},{id:"past-week",label:(0,ar.__)("Past week"),getValue:()=>{let e=(0,vr.getDate)(null);return G_(e,7)}},{id:"past-month",label:(0,ar.__)("Past month"),getValue:()=>{let e=(0,vr.getDate)(null);return Cse(e,1)}}],ETe=[{id:"last-7-days",label:(0,ar.__)("Last 7 days"),getValue:()=>{let e=(0,vr.getDate)(null);return[G_(e,7),e]}},{id:"last-30-days",label:(0,ar.__)("Last 30 days"),getValue:()=>{let e=(0,vr.getDate)(null);return[G_(e,30),e]}},{id:"month-to-date",label:(0,ar.__)("Month to date"),getValue:()=>{let e=(0,vr.getDate)(null);return[sse(e),e]}},{id:"last-year",label:(0,ar.__)("Last year"),getValue:()=>{let e=(0,vr.getDate)(null);return[Bse(e,1),e]}},{id:"year-to-date",label:(0,ar.__)("Year to date"),getValue:()=>{let e=(0,vr.getDate)(null);return[wP(e),e]}}],Pb=e=>{if(!e)return null;let t=(0,vr.getDate)(e);return t&&xb(t)?t:null},q3=e=>e?typeof e=="string"?e:H_(e,"yyyy-MM-dd"):"";function Ise({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,ut.useState)(void 0),u=(0,ut.useCallback)(()=>{let f=Array.isArray(o)?o:[o];for(let m of f){let p=m.current;if(p&&!p.validity.valid){c({type:"invalid",message:p.validationMessage});return}}c(void 0)},[o]);return(0,ut.useEffect)(()=>{if(r){let f=setTimeout(()=>{t?c(Nt(s,t)):u()},0);return()=>clearTimeout(f)}},[r,s,t,u]),(0,ct.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,ct.jsx)("div",{"aria-live":"polite",children:a&&(0,ct.jsxs)("p",{className:V("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0,a.type==="valid"?"is-valid":void 0),children:[(0,ct.jsx)(qt.Icon,{className:"components-validated-control__indicator-icon",icon:hp,size:16,fill:"currentColor"}),a.message]})})]})}function TTe({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{id:i,label:s,setValue:a,getValue:c,isValid:u,format:d}=t,[f,m]=(0,ut.useState)(null),p=d.weekStartsOn??(0,vr.getSettings)().l10n.startOfWeek,h=c({item:e}),g=typeof h=="string"?h:void 0,[b,k]=(0,ut.useState)(()=>Pb(g)||new Date),[y,v]=(0,ut.useState)(!1),S=(0,ut.useRef)(null),w=(0,ut.useCallback)(T=>o(a({item:e,value:T})),[e,o,a]),C=(0,ut.useCallback)(T=>{let A=T?H_(T,"yyyy-MM-dd"):void 0;w(A),m(null),v(!0)},[w]),E=(0,ut.useCallback)(T=>{let A=T.getValue(),L=q3(A);k(A),w(L),m(T.id),v(!0)},[w]),P=(0,ut.useCallback)(T=>{if(w(T),T){let A=Pb(T);A&&k(A)}m(null),v(!0)},[w]),{timezone:{string:R}}=(0,vr.getSettings)(),B=u?.required?`${s} (${(0,ar.__)("Required")})`:s;return(0,ct.jsx)(Ise,{field:t,validity:n,inputRefs:S,isTouched:y,setIsTouched:v,children:(0,ct.jsx)(qt.BaseControl,{id:i,className:"dataviews-controls__date",label:B,hideLabelFromVision:r,children:(0,ct.jsxs)(qt.__experimentalVStack,{spacing:4,children:[(0,ct.jsxs)(qt.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[BTe.map(T=>{let A=f===T.id;return(0,ct.jsx)(qt.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:A,size:"small",onClick:()=>E(T),children:T.label},T.id)}),(0,ct.jsx)(qt.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!f,size:"small",disabled:!!f,accessibleWhenDisabled:!1,children:(0,ar.__)("Custom")})]}),(0,ct.jsx)(qt.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:S,type:"date",label:(0,ar.__)("Date"),hideLabelFromVision:!0,value:g,onChange:P,required:!!t.isValid?.required}),(0,ct.jsx)(wTe,{style:{width:"100%"},selected:g&&Pb(g)||void 0,onSelect:C,month:b,onMonthChange:k,timeZone:R||void 0,weekStartsOn:p})]})})})}function ITe({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{id:i,label:s,getValue:a,setValue:c,format:u}=t,d,f=a({item:e});Array.isArray(f)&&f.length===2&&f.every(L=>typeof L=="string")&&(d=f);let m=u.weekStartsOn??(0,vr.getSettings)().l10n.startOfWeek,p=(0,ut.useCallback)(L=>{o(c({item:e,value:L}))},[e,o,c]),[h,g]=(0,ut.useState)(null),b=(0,ut.useMemo)(()=>{if(!d)return{from:void 0,to:void 0};let[L,U]=d;return{from:Pb(L)||void 0,to:Pb(U)||void 0}},[d]),[k,y]=(0,ut.useState)(()=>b.from||new Date),[v,S]=(0,ut.useState)(!1),w=(0,ut.useRef)(null),C=(0,ut.useRef)(null),E=(0,ut.useCallback)((L,U)=>{L&&U?p([q3(L),q3(U)]):!L&&!U&&p(void 0)},[p]),P=(0,ut.useCallback)(L=>{E(L?.from,L?.to),g(null),S(!0)},[E]),R=(0,ut.useCallback)(L=>{let[U,G]=L.getValue();y(U),E(U,G),g(L.id),S(!0)},[E]),B=(0,ut.useCallback)((L,U)=>{let[G,j]=d||[void 0,void 0];if(E(L==="from"?U:G,L==="to"?U:j),U){let K=Pb(U);K&&y(K)}g(null),S(!0)},[d,E]),{timezone:T}=(0,vr.getSettings)(),A=t.isValid?.required?`${s} (${(0,ar.__)("Required")})`:s;return(0,ct.jsx)(Ise,{field:t,validity:n,inputRefs:[w,C],isTouched:v,setIsTouched:S,children:(0,ct.jsx)(qt.BaseControl,{id:i,className:"dataviews-controls__date",label:A,hideLabelFromVision:r,children:(0,ct.jsxs)(qt.__experimentalVStack,{spacing:4,children:[(0,ct.jsxs)(qt.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[ETe.map(L=>{let U=h===L.id;return(0,ct.jsx)(qt.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:U,size:"small",onClick:()=>R(L),children:L.label},L.id)}),(0,ct.jsx)(qt.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!h,size:"small",accessibleWhenDisabled:!1,disabled:!!h,children:(0,ar.__)("Custom")})]}),(0,ct.jsxs)(qt.__experimentalHStack,{spacing:2,children:[(0,ct.jsx)(qt.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:w,type:"date",label:(0,ar.__)("From"),hideLabelFromVision:!0,value:d?.[0],onChange:L=>B("from",L),required:!!t.isValid?.required}),(0,ct.jsx)(qt.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:C,type:"date",label:(0,ar.__)("To"),hideLabelFromVision:!0,value:d?.[1],onChange:L=>B("to",L),required:!!t.isValid?.required})]}),(0,ct.jsx)(CTe,{style:{width:"100%"},selected:b,onSelect:P,month:k,onMonthChange:y,timeZone:T.string||void 0,weekStartsOn:m})]})})})}function Pse({data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n,validity:i}){return n===Hr||n===hn?(0,ct.jsx)(EP,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n}):n===Ur?(0,ct.jsx)(ITe,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i}):(0,ct.jsx)(TTe,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i})}var IP=l(O());var Ose=l(O()),Rse=l(I());var Ase=l(x()),{ValidatedInputControl:PTe}=Mt(Ose.privateApis);function La({data:e,field:t,onChange:o,hideLabelFromVision:r,type:n,prefix:i,suffix:s,validity:a}){let{label:c,placeholder:u,description:d,getValue:f,setValue:m,isValid:p}=t,h=f({item:e}),g=(0,Rse.useCallback)(b=>o(m({item:e,value:b})),[e,m,o]);return(0,Ase.jsx)(PTe,{required:!!p.required,customValidity:Nt(p,a),label:c,placeholder:u,value:h??"",help:d,onChange:g,hideLabelFromVision:r,type:n,prefix:i,suffix:s,pattern:p.pattern?p.pattern.constraint:void 0,minLength:p.minLength?p.minLength.constraint:void 0,maxLength:p.maxLength?p.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var TP=l(x());function Lse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){return(0,TP.jsx)(La,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:"email",prefix:(0,TP.jsx)(IP.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,TP.jsx)(IP.Icon,{icon:tR})})})}var OP=l(O());var PP=l(x());function Mse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){return(0,PP.jsx)(La,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:"tel",prefix:(0,PP.jsx)(OP.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,PP.jsx)(OP.Icon,{icon:mA})})})}var AP=l(O());var RP=l(x());function Nse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){return(0,RP.jsx)(La,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:"url",prefix:(0,RP.jsx)(AP.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,RP.jsx)(AP.Icon,{icon:Xr})})})}var cc=l(O()),W_=l(I()),LP=l(M());var Td=l(x()),{ValidatedNumberControl:OTe}=Mt(cc.privateApis);function Dse(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function RTe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,W_.useCallback)(c=>t([Dse(c),i]),[t,i]),a=(0,W_.useCallback)(c=>t([n,Dse(c)]),[t,n]);return(0,Td.jsx)(cc.BaseControl,{help:(0,LP.__)("The max. value must be greater than the min. value."),children:(0,Td.jsxs)(cc.Flex,{direction:"row",gap:4,children:[(0,Td.jsx)(cc.__experimentalNumberControl,{label:(0,LP.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,Td.jsx)(cc.__experimentalNumberControl,{label:(0,LP.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function MP({data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n,validity:i}){let s=t.format?.decimals??0,a=Math.pow(10,Math.abs(s)*-1),{label:c,description:u,getValue:d,setValue:f,isValid:m}=t,p=d({item:e})??"",h=(0,W_.useCallback)(b=>{o(f({item:e,value:["",void 0].includes(b)?void 0:Number(b)}))},[e,o,f]),g=(0,W_.useCallback)(b=>{o(f({item:e,value:b}))},[e,o,f]);if(n===Ur){let b=["",""];return Array.isArray(p)&&p.length===2&&p.every(k=>typeof k=="number"||k==="")&&(b=p),(0,Td.jsx)(RTe,{value:b,onChange:g,hideLabelFromVision:r,step:a})}return(0,Td.jsx)(OTe,{required:!!m.required,customValidity:Nt(m,i),label:c,help:u,value:p,onChange:h,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:a,min:m.min?m.min.constraint:void 0,max:m.max?m.max.constraint:void 0})}var Vse=l(x());function Fse(e){return(0,Vse.jsx)(MP,{...e})}var zse=l(x());function jse(e){return(0,zse.jsx)(MP,{...e})}var NP=l(O()),Use=l(I());var Y3=l(x()),{ValidatedRadioControl:ATe}=Mt(NP.privateApis);function Hse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,getValue:a,setValue:c,isValid:u}=t,{elements:d,isLoading:f}=Ra({elements:t.elements,getElements:t.getElements}),m=a({item:e}),p=(0,Use.useCallback)(h=>o(c({item:e,value:h})),[e,o,c]);return f?(0,Y3.jsx)(NP.Spinner,{}):(0,Y3.jsx)(ATe,{required:!!t.isValid?.required,customValidity:Nt(u,n),label:i,help:s,onChange:p,options:d,selected:m,hideLabelFromVision:r})}var DP=l(O()),Gse=l(I());var Z3=l(x()),{ValidatedSelectControl:LTe}=Mt(DP.privateApis);function Wse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{type:i,label:s,description:a,getValue:c,setValue:u,isValid:d}=t,f=i==="array",m=c({item:e})??(f?[]:""),p=(0,Gse.useCallback)(b=>o(u({item:e,value:b})),[e,o,u]),{elements:h,isLoading:g}=Ra({elements:t.elements,getElements:t.getElements});return g?(0,Z3.jsx)(DP.Spinner,{}):(0,Z3.jsx)(LTe,{required:!!t.isValid?.required,customValidity:Nt(d,n),label:s,value:m,help:a,options:h,onChange:p,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:f})}var X3=l(I());var $se=l(x());function Kse({data:e,field:t,onChange:o,hideLabelFromVision:r,config:n,validity:i}){let{prefix:s,suffix:a}=n||{};return(0,$se.jsx)(La,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i,prefix:s?(0,X3.createElement)(s):void 0,suffix:a?(0,X3.createElement)(a):void 0})}var qse=l(O()),Yse=l(I());var Zse=l(x()),{ValidatedToggleControl:MTe}=Mt(qse.privateApis);function Xse({field:e,onChange:t,data:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,getValue:a,setValue:c,isValid:u}=e,d=(0,Yse.useCallback)(()=>{t(c({item:o,value:!a({item:o})}))},[t,c,o,a]);return(0,Zse.jsx)(MTe,{required:!!u.required,customValidity:Nt(u,n),hidden:r,label:i,help:s,checked:a({item:o}),onChange:d})}var Qse=l(O()),Jse=l(I());var eae=l(x()),{ValidatedTextareaControl:NTe}=Mt(Qse.privateApis);function tae({data:e,field:t,onChange:o,hideLabelFromVision:r,config:n,validity:i}){let{rows:s=4}=n||{},{label:a,placeholder:c,description:u,setValue:d,isValid:f}=t,m=t.getValue({item:e}),p=(0,Jse.useCallback)(h=>o(d({item:e,value:h})),[e,o,d]);return(0,eae.jsx)(NTe,{required:!!f.required,customValidity:Nt(f,i),label:a,placeholder:c,value:m??"",help:u,onChange:p,rows:s,minLength:f.minLength?f.minLength.constraint:void 0,maxLength:f.maxLength?f.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var Ob=l(O()),oae=l(I());var VP=l(x()),{ValidatedToggleGroupControl:DTe}=Mt(Ob.privateApis);function rae({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{getValue:i,setValue:s,isValid:a}=t,c=i({item:e}),u=(0,oae.useCallback)(p=>o(s({item:e,value:p})),[e,o,s]),{elements:d,isLoading:f}=Ra({elements:t.elements,getElements:t.getElements});if(f)return(0,VP.jsx)(Ob.Spinner,{});if(d.length===0)return null;let m=d.find(p=>p.value===c);return(0,VP.jsx)(DTe,{required:!!t.isValid?.required,customValidity:Nt(a,n),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:m?.description||t.description,onChange:u,value:c,hideLabelFromVision:r,children:d.map(p=>(0,VP.jsx)(Ob.__experimentalToggleGroupControlOption,{label:p.label,value:p.value},p.value))})}var FP=l(O()),zP=l(I());var $_=l(x()),{ValidatedFormTokenField:VTe}=Mt(FP.privateApis);function nae({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,placeholder:s,getValue:a,setValue:c,isValid:u}=t,d=a({item:e}),{elements:f,isLoading:m}=Ra({elements:t.elements,getElements:t.getElements}),p=(0,zP.useMemo)(()=>Array.isArray(d)?d.map(g=>f?.find(k=>k.value===g)||{value:g,label:g}):[],[d,f]),h=(0,zP.useCallback)(g=>{let b=g.map(k=>typeof k=="object"&&"value"in k?k.value:k);o(c({item:e,value:b}))},[o,c,e]);return m?(0,$_.jsx)(FP.Spinner,{}):(0,$_.jsx)(VTe,{required:!!u?.required,customValidity:Nt(u,n),label:r?void 0:i,value:p,onChange:h,placeholder:s,suggestions:f?.map(g=>g.value),__experimentalValidateInput:g=>t.isValid?.elements&&f?f.some(b=>b.value===g||b.label===g):!0,__experimentalExpandOnFocus:f&&f.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:g=>typeof g=="object"&&"label"in g?g.label:typeof g=="string"&&f&&f.find(k=>k.value===g)?.label||g,__experimentalRenderItem:({item:g})=>{if(typeof g=="string"&&f){let b=f.find(k=>k.value===g);return(0,$_.jsx)("span",{children:b?.label||g})}return(0,$_.jsx)("span",{children:g})}})}var Rb=l(O()),Q3=l(I());var Id=l(x()),{ValidatedInputControl:FTe,Picker:zTe}=Mt(Rb.privateApis),jTe=({color:e,onColorChange:t})=>{let o=e&&ft(e).isValid()?e:"#ffffff";return(0,Id.jsx)(Rb.Dropdown,{renderToggle:({onToggle:r,isOpen:n})=>(0,Id.jsx)(Rb.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Id.jsx)("button",{type:"button",onClick:r,style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",cursor:"pointer",outline:n?"2px solid #007cba":"none",outlineOffset:"2px",display:"flex",alignItems:"center",justifyContent:"center",padding:0,margin:0},"aria-label":"Open color picker"})}),renderContent:()=>(0,Id.jsx)("div",{style:{padding:"16px"},children:(0,Id.jsx)(zTe,{color:ft(o),onChange:t,enableAlpha:!0})})})};function iae({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,placeholder:s,description:a,setValue:c,isValid:u}=t,d=t.getValue({item:e})||"",f=(0,Q3.useCallback)(p=>{o(c({item:e,value:p.toHex()}))},[e,o,c]),m=(0,Q3.useCallback)(p=>{o(c({item:e,value:p||""}))},[e,o,c]);return(0,Id.jsx)(FTe,{required:!!t.isValid?.required,customValidity:Nt(u,n),label:i,placeholder:s,value:d,help:a,onChange:m,hideLabelFromVision:r,type:"text",prefix:(0,Id.jsx)(jTe,{color:d,onColorChange:f})})}var UP=l(O()),HP=l(I()),J3=l(M());var jP=l(x());function sae({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let[i,s]=(0,HP.useState)(!1),a=(0,HP.useCallback)(()=>{s(c=>!c)},[]);return(0,jP.jsx)(La,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:i?"text":"password",suffix:(0,jP.jsx)(UP.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,jP.jsx)(UP.Button,{icon:i?qi:ol,onClick:a,size:"small",label:i?(0,J3.__)("Hide password"):(0,J3.__)("Show password")})})})}function GP(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var lae=l(x()),aae={array:nae,checkbox:Xie,color:iae,datetime:Tse,date:Pse,email:Lse,telephone:Mse,url:Nse,integer:Fse,number:jse,password:sae,radio:Hse,select:Wse,text:Kse,toggle:Xse,textarea:tae,toggleGroup:rae};function UTe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function HTe(e){let{control:t,...o}=e,r=WP(t);return r===null?null:function(i){return(0,lae.jsx)(r,{...i,config:o})}}function cae(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?WP(e.Edit):UTe(e.Edit)?HTe(e.Edit):GP(e)&&e.type!=="array"?WP("select"):t===null?null:WP(t)}function WP(e){return Object.keys(aae).includes(e)?aae[e]:null}function GTe(e,t,o){if(e.filterBy===!1)return!1;let r=e.filterBy?.operators?.filter(n=>o.includes(n))??t;return r.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:r}}var uae=GTe;var WTe=e=>({item:t})=>{let o=e.split("."),r=t;for(let n of o)r.hasOwnProperty(n)?r=r[n]:r=void 0;return r},dae=WTe;var $Te=e=>({value:t})=>{let o=e.split("."),r={},n=r;for(let i of o.slice(0,-1))n[i]={},n=n[i];return n[o.at(-1)]=t,r},fae=$Te;var pae=l(M());function $P({item:e,field:t}){let{elements:o,isLoading:r}=Ra({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return r||o.length===0?n:o?.find(i=>i.value===n)?.label||t.getValue({item:e})}var mae=l(x());function ro({item:e,field:t}){return t.hasElements?(0,mae.jsx)($P,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var Ma=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function no(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function Na(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length>=t.isValid.minLength.constraint}function Da(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length<=t.isValid.maxLength.constraint}function Va(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let o=new RegExp(t.isValid.pattern.constraint),r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:o.test(String(r))}catch{return!1}}function yt(e,t){let r=(t.elements??[]).map(i=>i.value);if(r.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>r.includes(i))}function KTe({item:e,field:t}){return t.getValue({item:e})}var Gr=KTe;var qTe=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function YTe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!qTe.test(o)?(0,pae.__)("Value must be a valid email address."):null}var hae={type:"email",render:ro,Edit:"email",sort:Ma,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[At,Lt],validOperators:[Wt,$t,Ia,Pa,Oa,At,Lt,br,kr],format:{},getValueFormatted:Gr,validate:{required:no,pattern:Va,minLength:Na,maxLength:Da,elements:yt,custom:YTe}};var gae=l(M());var Ab=(e,t,o)=>o==="asc"?e-t:t-e;function KP(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:Number(o)>=t.isValid.min.constraint}function qP(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:Number(o)<=t.isValid.max.constraint}var bae={separatorThousand:","};function ZTe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="integer"?r=bae:r=t.format;let{separatorThousand:n}=r,i=Math.trunc(o);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function XTe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,gae.__)("Value must be an integer."):null}var kae={type:"integer",render:ro,Edit:"integer",sort:Ab,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Wt,$t,hd,gd,bd,kd,Ur],validOperators:[Wt,$t,hd,gd,bd,kd,Ur,At,Lt,br,kr],format:bae,getValueFormatted:ZTe,validate:{required:no,min:KP,max:qP,elements:yt,custom:XTe}};var vae=l(M());var yae={separatorThousand:",",separatorDecimal:".",decimals:2};function QTe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="number"?r=yae:r=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=r,a=o.toFixed(s),[c,u]=a.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return s===0?d:d+i+u}function JTe(e){return e===""||e===void 0||e===null}function eIe(e,t){let o=t.getValue({item:e});return!JTe(o)&&!Number.isFinite(o)?(0,vae.__)("Value must be a number."):null}var _ae={type:"number",render:ro,Edit:"number",sort:Ab,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Wt,$t,hd,gd,bd,kd,Ur],validOperators:[Wt,$t,hd,gd,bd,kd,Ur,At,Lt,br,kr],format:yae,getValueFormatted:QTe,validate:{required:no,min:KP,max:qP,elements:yt,custom:eIe}};var Sae={type:"text",render:ro,Edit:"text",sort:Ma,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[At,Lt],validOperators:[Wt,$t,Ia,Pa,Oa,At,Lt,br,kr],format:{},getValueFormatted:Gr,validate:{required:no,pattern:Va,minLength:Na,maxLength:Da,elements:yt}};var Fm=l(Qu());var xae={datetime:(0,Fm.getSettings)().formats.datetime,weekStartsOn:(0,Fm.getSettings)().l10n.startOfWeek};function tIe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=xae:r=t.format,(0,Fm.dateI18n)(r.datetime,(0,Fm.getDate)(o))}var oIe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},wae={type:"datetime",render:ro,Edit:"datetime",sort:oIe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xd,wd,vd,yd,_d,Sd,Hr,hn],validOperators:[xd,wd,vd,yd,_d,Sd,Hr,hn],format:xae,getValueFormatted:tIe,validate:{required:no,elements:yt}};var zm=l(Qu());var Cae={date:(0,zm.getSettings)().formats.date,weekStartsOn:(0,zm.getSettings)().l10n.startOfWeek};function rIe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=Cae:r=t.format,(0,zm.dateI18n)(r.date,(0,zm.getDate)(o))}var nIe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Bae={type:"date",render:ro,Edit:"date",sort:nIe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xd,wd,vd,yd,_d,Sd,Hr,hn,Ur],validOperators:[xd,wd,vd,yd,_d,Sd,Hr,hn,Ur],format:Cae,getValueFormatted:rIe,validate:{required:no,elements:yt}};var YP=l(M());function Eae(e,t){return t.getValue({item:e})===!0}function iIe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,YP.__)("True"):o===!1?(0,YP.__)("False"):""}function sIe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,YP.__)("Value must be true, false, or undefined"):null}var aIe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},Tae={type:"boolean",render:ro,Edit:"checkbox",sort:aIe,validate:{required:Eae,elements:yt,custom:sIe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Wt,$t],validOperators:[Wt,$t],format:{},getValueFormatted:iIe};var Iae={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:Gr,validate:{}};var eF=l(M());function Pae(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function Oae({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function lIe({item:e,field:t}){return Oae({item:e,field:t})}function cIe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,eF.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,eF.__)("Every value must be a string.")}var uIe=(e,t,o)=>{let r=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(r.length!==n.length)return o==="asc"?r.length-n.length:n.length-r.length;let i=r.join(","),s=n.join(",");return o==="asc"?i.localeCompare(s):s.localeCompare(i)},Rae={type:"array",render:lIe,Edit:"array",sort:uIe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[At,Lt],validOperators:[At,Lt,br,kr],format:{},getValueFormatted:Oae,validate:{required:Pae,elements:yt,custom:cIe}};function dIe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Aae={type:"password",render:ro,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:dIe,validate:{required:no,pattern:Va,minLength:Na,maxLength:Da,elements:yt}};var Lae={type:"telephone",render:ro,Edit:"telephone",sort:Ma,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[At,Lt],validOperators:[Wt,$t,Ia,Pa,Oa,At,Lt,br,kr],format:{},getValueFormatted:Gr,validate:{required:no,pattern:Va,minLength:Na,maxLength:Da,elements:yt}};var Mae=l(M());var Lb=l(x());function fIe({item:e,field:t}){if(t.hasElements)return(0,Lb.jsx)($P,{item:e,field:t});let o=Gr({item:e,field:t});return!o||!ft(o).isValid()?o:(0,Lb.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Lb.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,Lb.jsx)("span",{children:o})]})}function mIe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!ft(o).isValid()?(0,Mae.__)("Value must be a valid color."):null}var pIe=(e,t,o)=>{let r=ft(e),n=ft(t);if(!r.isValid()&&!n.isValid())return 0;if(!r.isValid())return o==="asc"?1:-1;if(!n.isValid())return o==="asc"?-1:1;let i=r.toHsl(),s=n.toHsl();return i.h!==s.h?o==="asc"?i.h-s.h:s.h-i.h:i.s!==s.s?o==="asc"?i.s-s.s:s.s-i.s:o==="asc"?i.l-s.l:s.l-i.l},Nae={type:"color",render:fIe,Edit:"color",sort:pIe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[At,Lt],validOperators:[Wt,$t,At,Lt],format:{},getValueFormatted:Gr,validate:{required:no,elements:yt,custom:mIe}};var Dae={type:"url",render:ro,Edit:"url",sort:Ma,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[At,Lt],validOperators:[Wt,$t,Ia,Pa,Oa,At,Lt,br,kr],format:{},getValueFormatted:Gr,validate:{required:no,pattern:Va,minLength:Na,maxLength:Da,elements:yt}};var hIe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?Ab(e,t,o):Ma(e,t,o),Vae={render:ro,Edit:null,sort:hIe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Wt,$t],validOperators:Kie(),format:{},getValueFormatted:Gr,validate:{required:no,elements:yt}};function Fae(e,t){let o;e.isValid?.required===!0&&t.validate.required!==void 0&&(o={constraint:!0,validate:t.validate.required});let r;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(r={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let s;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(s={constraint:e.isValid.minLength,validate:t.validate.minLength});let a;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(a={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:o,elements:r,min:n,max:i,minLength:s,maxLength:a,pattern:c,custom:u}}function gIe(e,t){return{...t.format,...e.format}}var zae=gIe;function bIe(e){let t=[hae,kae,_ae,Sae,wae,Bae,Tae,Iae,Rae,Aae,Lae,Nae,Dae].find(o=>o?.type===e);return t||Vae}function K_(e){return e.map(t=>{let o=bIe(t.type),r=t.getValue||dae(t.id),n=function(i,s,a){let c=r({item:i}),u=r({item:s});return t.sort?t.sort(c,u,a):o.sort(c,u,a)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:r,setValue:t.setValue||fae(t.id),elements:t.elements,getElements:t.getElements,hasElements:GP(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:cae(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:Fae(t,o),filterBy:uae(t,o.defaultOperators,o.validOperators),format:zae(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var iF=l(I());var jae=l(I()),Uae=l(x()),tF=(0,jae.createContext)({fields:[]});tF.displayName="DataFormContext";function Hae({fields:e,children:t}){return(0,Uae.jsx)(tF.Provider,{value:{fields:e},children:t})}var Mi=tF;var ule=l(O()),dle=l(I());var Wm=l(O());var XP=l(I()),Ts=l(O());var yr={type:"regular",labelPosition:"top"},kIe=e=>typeof e=="string"?[{id:e,visibility:"when-collapsed"}]:e.map(t=>typeof t=="string"?{id:t,visibility:"when-collapsed"}:{id:t.id,visibility:t.visibility});function Gae(e){let t=yr;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let o=e.summary??[],r=Array.isArray(o)?o:[o];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:r}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let o=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:kIe(o),isCollapsible:e.isCollapsible===void 0?!0:e.isCollapsible}}else e?.type==="row"?t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}}:e?.type==="details"&&(t={type:"details",summary:e?.summary??""});return t}function Wae(e){let t=Gae(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?Gae(r.layout):t;return{id:r.id,layout:n,...!!r.label&&{label:r.label},...!!r.description&&{description:r.description},..."children"in r&&Array.isArray(r.children)&&{children:Wae({fields:r.children,layout:yr}).fields}}});return{layout:t,fields:o}}var ZP=Wae;var Dt=l(x());function vIe({title:e}){return(0,Dt.jsx)(Ts.__experimentalVStack,{className:"dataforms-layouts-regular__header",spacing:4,children:(0,Dt.jsxs)(Ts.__experimentalHStack,{alignment:"center",children:[(0,Dt.jsx)(Ts.__experimentalHeading,{level:2,size:13,children:e}),(0,Dt.jsx)(Ts.__experimentalSpacer,{})]})})}function $ae({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{fields:i}=(0,XP.useContext)(Mi),s=t.layout,a=(0,XP.useMemo)(()=>({layout:yr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Dt.jsxs)(Dt.Fragment,{children:[!r&&t.label&&(0,Dt.jsx)(vIe,{title:t.label}),(0,Dt.jsx)(gn,{data:e,form:a,onChange:o,validity:n?.children})]});let c=s.labelPosition,u=i.find(d=>d.id===t.id);return!u||!u.Edit?null:c==="side"?(0,Dt.jsxs)(Ts.__experimentalHStack,{className:"dataforms-layouts-regular__field",children:[(0,Dt.jsx)("div",{className:V("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${c}`),children:u.label}),(0,Dt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:u.readOnly===!0?(0,Dt.jsx)(u.render,{item:e,field:u}):(0,Dt.jsx)(u.Edit,{data:e,field:u,onChange:o,hideLabelFromVision:!0,validity:n},u.id)})]}):(0,Dt.jsx)("div",{className:"dataforms-layouts-regular__field",children:u.readOnly===!0?(0,Dt.jsx)(Dt.Fragment,{children:(0,Dt.jsxs)(Dt.Fragment,{children:[!r&&c!=="none"&&(0,Dt.jsx)(Ts.BaseControl.VisualLabel,{children:u.label}),(0,Dt.jsx)(u.render,{item:e,field:u})]})}):(0,Dt.jsx)(u.Edit,{data:e,field:u,onChange:o,hideLabelFromVision:c==="none"?!0:r,validity:n})})}var Di=l(O()),q_=l(I());var Ni=l(O()),qae=l(M()),e2=l(I());var Yae=l(Y());var Kae=l(O()),QP=l(M()),Mb=l(x());function yIe({summaryFields:e,data:t,labelPosition:o,fieldLabel:r,disabled:n,onClick:i,"aria-expanded":s}){return(0,Mb.jsx)(Kae.Button,{className:"dataforms-layouts-panel__summary-button",size:"compact",variant:["none","top"].includes(o)?"link":"tertiary","aria-expanded":s,"aria-label":(0,QP.sprintf)((0,QP._x)("Edit %s","field"),r||""),onClick:i,disabled:n,accessibleWhenDisabled:!0,style:e.length>1?{minHeight:"auto",height:"auto",alignItems:"flex-start"}:void 0,children:e.length>1?(0,Mb.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:e.map(a=>(0,Mb.jsx)("div",{style:{width:"100%"},children:(0,Mb.jsx)(a.render,{item:t,field:a})},a.id))}):e.map(a=>(0,Mb.jsx)(a.render,{item:t,field:a},a.id))})}var JP=yIe;var _r=l(x());function _Ie({title:e,onClose:t}){return(0,_r.jsx)(Ni.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,_r.jsxs)(Ni.__experimentalHStack,{alignment:"center",children:[e&&(0,_r.jsx)(Ni.__experimentalHeading,{level:2,size:13,children:e}),(0,_r.jsx)(Ni.__experimentalSpacer,{}),t&&(0,_r.jsx)(Ni.Button,{label:(0,qae.__)("Close"),icon:Jd,onClick:t,size:"small"})]})})}function SIe({data:e,field:t,onChange:o,validity:r,labelPosition:n="side",summaryFields:i,fieldDefinition:s,popoverAnchor:a,onOpen:c}){let u=t.children?t.label:s?.label,d=(0,e2.useMemo)(()=>({layout:yr,fields:t.children?t.children:[{id:t.id,layout:yr}]}),[t]),f=(0,e2.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),m=(0,e2.useMemo)(()=>({anchor:a,placement:"left-start",offset:36,shift:!0}),[a]),p=(0,Yae.useFocusOnMount)("firstInputElement");return(0,_r.jsx)(Ni.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:m,focusOnMount:!1,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:h,onToggle:g})=>(0,_r.jsx)(JP,{summaryFields:i,data:e,labelPosition:n,fieldLabel:u,disabled:s.readOnly===!0,onClick:()=>{!h&&c&&c(),g()},"aria-expanded":h}),renderContent:({onClose:h})=>(0,_r.jsxs)(_r.Fragment,{children:[(0,_r.jsx)(_Ie,{title:u,onClose:h}),(0,_r.jsx)("div",{ref:p,children:(0,_r.jsx)(gn,{data:e,form:d,onChange:o,validity:f,children:(g,b,k)=>(0,_r.jsx)(g,{data:e,field:b,onChange:o,hideLabelFromVision:(d?.fields??[]).length<2,validity:k},b.id)})})]})})}var Zae=SIe;var rF=l(y5()),uc=l(O()),nF=l(M()),Pd=l(I()),ole=l(Y());var Xae=l(y5()),oF=l(Kd()),Fa=l(I()),Sr=l(M());function Qae(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?Qae(r):r.type==="valid")):!0}function xIe(e,t){let o=ZP(e);if(o.fields.length===0)return[];let r=new Map;t.forEach(s=>{r.set(s.id,s)});function n(s){if("children"in s&&Array.isArray(s.children)){let u=s.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=r.get(s.id);if(d){let[f]=K_([d]);return{id:s.id,children:u,field:f}}return{id:s.id,children:u}}let a=r.get(s.id);if(!a)return null;let[c]=K_([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function jm(e,t,o){if(e||(e={}),o.length===0)return e;let r={...e},n=r;for(let s=0;s<o.length-1;s++){let a=o[s];n[a]||(n[a]={}),n=n[a]}let i=o[o.length-1];return n[i]={...n[i]||{},...t},r}function wIe(e,t,o){let{elementsCounterRef:r,setFormValidity:n,path:i,item:s}=o,a=(r.current[t.id]||0)+1;r.current[t.id]=a,e.then(c=>{if(a===r.current[t.id]){if(!Array.isArray(c)){n(u=>jm(u,{elements:{type:"invalid",message:(0,Sr.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})&&n(u=>jm(u,{elements:{type:"invalid",message:(0,Sr.__)("Value must be one of the elements.")}},[...i,t.id]))}}).catch(c=>{if(a!==r.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,Sr.__)("Unknown error when running elements validation asynchronously."),n(d=>jm(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function CIe(e,t,o){let{customCounterRef:r,setFormValidity:n,path:i}=o,s=(r.current[t.id]||0)+1;r.current[t.id]=s,e.then(a=>{if(s===r.current[t.id]){if(a===null){n(c=>jm(c,{custom:{type:"valid",message:(0,Sr.__)("Valid")}},[...i,t.id]));return}if(typeof a=="string"){n(c=>jm(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>jm(c,{custom:{type:"invalid",message:(0,Sr.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(a=>{if(s!==r.current[t.id])return;let c;a instanceof Error?c=a.message:c=String(a)||(0,Sr.__)("Unknown error when running custom validation asynchronously."),n(u=>jm(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function Jae(e,t,o){if(t.field?.isValid.required&&!t.field.isValid.required.validate(e,t.field))return{required:{type:"invalid"}};if(t.field?.isValid.pattern&&!t.field.isValid.pattern.validate(e,t.field))return{pattern:{type:"invalid",message:(0,Sr.__)("Value does not match the required pattern.")}};if(t.field?.isValid.min&&!t.field.isValid.min.validate(e,t.field))return{min:{type:"invalid",message:(0,Sr.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Sr.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Sr.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Sr.__)("Value is too long.")}};if(t.field?.isValid.elements&&t.field.hasElements&&!t.field.getElements&&Array.isArray(t.field.elements)&&!t.field.isValid.elements.validate(e,t.field))return{elements:{type:"invalid",message:(0,Sr.__)("Value must be one of the elements.")}};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function")return wIe(t.field.getElements(),t,o),{elements:{type:"validating",message:(0,Sr.__)("Validating\u2026")}};let r;if(t.field&&t.field.isValid.custom)try{let n=t.field.getValue({item:e});r=t.field.isValid.custom((0,Xae.default)(e,t.field.setValue({item:e,value:n})),t.field)}catch(n){let i;return n instanceof Error?i=n.message:i=String(n)||(0,Sr.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:i}}}if(typeof r=="string")return{custom:{type:"invalid",message:r}};if(r instanceof Promise)return CIe(r,t,o),{custom:{type:"validating",message:(0,Sr.__)("Validating\u2026")}};if(t.children.length>0){let n={};t.children.forEach(s=>{n[s.id]=Jae(e,s,{...o,path:[...o.path,t.id,"children"]})});let i={};return Object.entries(n).forEach(([s,a])=>{a!==void 0&&(i[s]=a)}),Object.keys(i).length===0?void 0:{children:i}}}function ele(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>ele(n,t));return r?{value:o,children:r}:o}function BIe(e,t,o){let[r,n]=(0,Fa.useState)(),i=(0,Fa.useRef)({}),s=(0,Fa.useRef)({}),a=(0,Fa.useRef)({}),c=(0,Fa.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=xIe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(p=>{let h=ele(p,e);if(a.current.hasOwnProperty(p.id)&&(0,oF.default)(a.current[p.id],h)){m.push(p.id);return}a.current[p.id]=h;let g=Jae(e,p,u);g!==void 0&&(f[p.id]=g)}),n(p=>{let h={...p,...f},g=[...m,...Object.keys(f)];return Object.keys(h).forEach(k=>{h&&!g.includes(k)&&delete h[k]}),Object.keys(h).length===0&&(h=void 0),(0,oF.default)(p,h)?p:h})},[e,t,o]);return(0,Fa.useEffect)(()=>{c()},[c]),{validity:r,isValid:Qae(r)}}var tle=BIe;var Wr=l(x());function EIe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n}){let{fields:i}=(0,Pd.useContext)(Mi),[s,a]=(0,Pd.useState)({}),c=(0,Pd.useMemo)(()=>(0,rF.default)(e,s,{arrayMerge:(g,b)=>b}),[e,s]),u=(0,Pd.useMemo)(()=>({layout:yr,fields:t.children?t.children:[{id:t.id,layout:yr}]}),[t]),d=i.map(g=>({...g,Edit:g.Edit===null?void 0:g.Edit,isValid:{required:g.isValid.required?.constraint,elements:g.isValid.elements?.constraint,min:g.isValid.min?.constraint,max:g.isValid.max?.constraint,pattern:g.isValid.pattern?.constraint,minLength:g.isValid.minLength?.constraint,maxLength:g.isValid.maxLength?.constraint}})),{validity:f}=tle(c,d,u),m=()=>{o(s),n()},p=g=>{a(b=>(0,rF.default)(b,g,{arrayMerge:(k,y)=>y}))},h=(0,ole.useFocusOnMount)("firstInputElement");return(0,Wr.jsxs)(uc.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,Wr.jsx)("div",{ref:h,children:(0,Wr.jsx)(gn,{data:c,form:u,onChange:p,validity:f,children:(g,b,k)=>(0,Wr.jsx)(g,{data:c,field:b,onChange:p,hideLabelFromVision:u.fields.length<2,validity:k},b.id)})}),(0,Wr.jsxs)(uc.__experimentalHStack,{className:"dataforms-layouts-panel__modal-footer",spacing:3,children:[(0,Wr.jsx)(uc.__experimentalSpacer,{}),(0,Wr.jsx)(uc.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,nF.__)("Cancel")}),(0,Wr.jsx)(uc.Button,{variant:"primary",onClick:m,__next40pxDefaultSize:!0,children:(0,nF.__)("Apply")})]})]})}function TIe({data:e,field:t,onChange:o,labelPosition:r,summaryFields:n,fieldDefinition:i,onOpen:s}){let[a,c]=(0,Pd.useState)(!1),u=t.children?t.label:i?.label;return(0,Wr.jsxs)(Wr.Fragment,{children:[(0,Wr.jsx)(JP,{summaryFields:n,data:e,labelPosition:r,fieldLabel:u,disabled:i.readOnly===!0,onClick:()=>{s&&s(),c(!0)},"aria-expanded":a}),a&&(0,Wr.jsx)(EIe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:()=>c(!1)})]})}var rle=TIe;function IIe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var t2=(e,t)=>Array.isArray(e)&&e.length>0?IIe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var xo=l(x());function nle(e){if(!e)return;let t=Object.keys(e).filter(o=>o!=="children");for(let o of t){let r=e[o];if(r!==void 0&&r.type==="invalid")return r.message?r.message:o==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let o of Object.values(e.children)){let r=nle(o);if(r)return r}}var PIe=(e,t)=>{let o=t.find(r=>r.id===e.id);return o||t.find(r=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:r.id===n[0].id}return r.id===e.id})},OIe=(e,t,o)=>{let r=t2(e.summary,o),n=PIe(t,o);return r.length===0?{summaryFields:n?[n]:[],fieldDefinition:n}:{summaryFields:r,fieldDefinition:n}};function ile({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,q_.useContext)(Mi),i=t.layout,[s,a]=(0,q_.useState)(null),[c,u]=(0,q_.useState)(!1),d=()=>u(!0),{fieldDefinition:f,summaryFields:m}=OIe(i,t,n);if(!f)return null;let p=i.labelPosition,h=nle(r),g=c&&!!h,b=V("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${p}`,{"has-error":g}),k=t.children?t.label:f?.label,y=g?(0,xo.jsx)(Di.Tooltip,{text:h,placement:"top",children:(0,xo.jsxs)(Di.__experimentalHStack,{className:"dataforms-layouts-panel__field-label-error-content",justify:"flex-start",children:[(0,xo.jsx)(Di.Icon,{icon:hp,size:16}),(0,xo.jsx)(xo.Fragment,{children:k})]})}):k,v=i.openAs==="modal"?(0,xo.jsx)(rle,{data:e,field:t,onChange:o,labelPosition:p,summaryFields:m,fieldDefinition:f,onOpen:d}):(0,xo.jsx)(Zae,{data:e,field:t,onChange:o,validity:r,labelPosition:p,summaryFields:m,fieldDefinition:f,popoverAnchor:s,onOpen:d});return p==="top"?(0,xo.jsxs)(Di.__experimentalVStack,{className:"dataforms-layouts-panel__field",spacing:0,children:[(0,xo.jsx)("div",{className:b,style:{paddingBottom:0},children:y}),(0,xo.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:v})]}):p==="none"?(0,xo.jsxs)(Di.__experimentalHStack,{className:"dataforms-layouts-panel__field dataforms-layouts-panel__field--label-position-none",children:[g&&(0,xo.jsx)(Di.Tooltip,{text:h,placement:"top",children:(0,xo.jsx)(Di.Icon,{className:"dataforms-layouts-panel__field-label-error-content",icon:hp,size:16})}),(0,xo.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:v})]}):(0,xo.jsxs)(Di.__experimentalHStack,{ref:a,className:"dataforms-layouts-panel__field",children:[(0,xo.jsx)("div",{className:b,children:y}),(0,xo.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:v})]})}var Is=l(O()),dc=l(I());var io=l(x()),RIe=({children:e,...t})=>(0,io.jsx)(Is.CardHeader,{isBorderless:!0,...t,children:(0,io.jsx)("div",{style:{height:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:e})});function AIe(e){let{isOpened:t,isCollapsible:o}=e,[r,n]=(0,dc.useState)(t),i=(0,dc.useCallback)(()=>{n(u=>!u)},[]),s=(0,dc.useCallback)(({children:u,...d})=>(0,io.jsxs)(Is.CardHeader,{...d,onClick:i,style:{cursor:"pointer",...d.style},isBorderless:!0,children:[(0,io.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:u}),(0,io.jsx)(Is.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:r?Qd:_n,"aria-expanded":r,"aria-label":r?"Collapse":"Expand"})]}),[i,r]);return{isOpen:o?r:!0,CardHeader:o?s:RIe}}function LIe(e,t,o){if(!t||Array.isArray(t)&&t.length===0)return!1;let n=(Array.isArray(t)?t:[t]).find(i=>typeof i=="string"?i===e.id:typeof i=="object"&&"id"in i?i.id===e.id:!1);return n?typeof n=="string"?!0:typeof n=="object"&&"visibility"in n?n.visibility==="always"||n.visibility==="when-collapsed"&&!o:!0:!1}function sle({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{fields:i}=(0,dc.useContext)(Mi),s=t.layout,a=(0,dc.useMemo)(()=>({layout:yr,fields:t.children??[]}),[t]),{isOpen:c,CardHeader:u}=AIe(s),f=t2(s.summary,i).filter(k=>LIe(k,s.summary,c)),m={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};if(t.children){let k=!!t.label&&s.withHeader,y={blockStart:k?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,io.jsxs)(Is.Card,{className:"dataforms-layouts-card__field",size:m,children:[k&&(0,io.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,io.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:t.label}),f.length>0&&s.withHeader&&(0,io.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:f.map(v=>(0,io.jsx)(v.render,{item:e,field:v},v.id))})]}),(c||!k)&&(0,io.jsxs)(Is.CardBody,{size:y,className:"dataforms-layouts-card__field-control",children:[t.description&&(0,io.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,io.jsx)(gn,{data:e,form:a,onChange:o,validity:n?.children})]})]})}let p=i.find(k=>k.id===t.id);if(!p||!p.Edit)return null;let h=Um("regular")?.component;if(!h)return null;let g=!!p.label&&s.withHeader,b={blockStart:g?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,io.jsxs)(Is.Card,{className:"dataforms-layouts-card__field",size:m,children:[g&&(0,io.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,io.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:p.label}),f.length>0&&s.withHeader&&(0,io.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:f.map(k=>(0,io.jsx)(k.render,{item:e,field:k},k.id))})]}),(c||!g)&&(0,io.jsx)(Is.CardBody,{size:b,className:"dataforms-layouts-card__field-control",children:(0,io.jsx)(h,{data:e,field:t,onChange:o,hideLabelFromVision:r||g,validity:n})})]})}var fc=l(O());var Lo=l(x());function MIe({title:e}){return(0,Lo.jsx)(fc.__experimentalVStack,{className:"dataforms-layouts-row__header",spacing:4,children:(0,Lo.jsxs)(fc.__experimentalHStack,{alignment:"center",children:[(0,Lo.jsx)(fc.__experimentalHeading,{level:2,size:13,children:e}),(0,Lo.jsx)(fc.__experimentalSpacer,{})]})})}var NIe=({children:e})=>(0,Lo.jsx)(Lo.Fragment,{children:e});function ale({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let i=t.layout;if(t.children){let a={layout:yr,fields:t.children};return(0,Lo.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,Lo.jsx)(MIe,{title:t.label}),(0,Lo.jsx)(fc.__experimentalHStack,{alignment:i.alignment,spacing:4,children:(0,Lo.jsx)(gn,{data:e,form:a,onChange:o,validity:n?.children,as:NIe,children:(c,u,d)=>(0,Lo.jsx)("div",{className:"dataforms-layouts-row__field-control",style:i.styles[u.id],children:(0,Lo.jsx)(c,{data:e,field:u,onChange:o,hideLabelFromVision:r,validity:d})},u.id)})})]})}let s=Um("regular")?.component;return s?(0,Lo.jsx)(Lo.Fragment,{children:(0,Lo.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Lo.jsx)(s,{data:e,field:t,onChange:o,validity:n})})}):null}var o2=l(I()),lle=l(M());var Hm=l(x());function cle({data:e,field:t,onChange:o}){let{fields:r}=(0,o2.useContext)(Mi),n=(0,o2.useMemo)(()=>({layout:yr,fields:t.children??[]}),[t]);if(!t.children)return null;let i=t.layout.summary??"",s=i?r.find(c=>c.id===i):void 0,a;return s&&s.render?a=(0,Hm.jsx)(s.render,{item:e,field:s}):a=t.label||(0,lle.__)("More details"),(0,Hm.jsxs)("details",{className:"dataforms-layouts-details__details",children:[(0,Hm.jsx)("summary",{className:"dataforms-layouts-details__summary",children:a}),(0,Hm.jsx)("div",{className:"dataforms-layouts-details__content",children:(0,Hm.jsx)(gn,{data:e,form:n,onChange:o})})]})}var Gm=l(x()),DIe=[{type:"regular",component:$ae,wrapper:({children:e})=>(0,Gm.jsx)(Wm.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e})},{type:"panel",component:ile,wrapper:({children:e})=>(0,Gm.jsx)(Wm.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:2,children:e})},{type:"card",component:sle,wrapper:({children:e})=>(0,Gm.jsx)(Wm.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:6,children:e})},{type:"row",component:ale,wrapper:({children:e,layout:t})=>(0,Gm.jsx)(Wm.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:(0,Gm.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Gm.jsx)(Wm.__experimentalHStack,{spacing:4,alignment:t.alignment,children:e})})})},{type:"details",component:cle}];function Um(e){return DIe.find(t=>t.type===e)}var r2=l(x()),VIe=({children:e})=>(0,r2.jsx)(ule.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e});function gn({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,dle.useContext)(Mi);function a(u){return s.find(d=>d.id===u.id)}let c=i??Um(t.layout.type)?.wrapper??VIe;return(0,r2.jsx)(c,{layout:t.layout,children:t.fields.map(u=>{let d=Um(u.layout.type)?.component;if(!d)return null;let f=u.children?void 0:a(u);return f&&f.isVisible&&!f.isVisible(e)?null:n?n(d,u,r?.[u.id]):(0,r2.jsx)(d,{data:e,field:u,onChange:o,validity:r?.[u.id]},u.id)})})}var sF=l(x());function aF({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,iF.useMemo)(()=>ZP(t),[t]),s=(0,iF.useMemo)(()=>K_(o),[o]);return t.fields?(0,sF.jsx)(Hae,{fields:s,children:(0,sF.jsx)(gn,{data:e,form:i,onChange:r,validity:n})}):null}var c2=l(I());var Db=l(O());var lF=l(M());var fle=l(Y());function Nb({isControl:e}={isControl:!1}){return(0,fle.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var n2=l(x());function mle({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=Nb();return!e||e.length===0?null:(0,n2.jsx)(Db.DropdownMenu,{icon:Ki,label:(0,lF.__)("Options"),popoverProps:r,children:({onClose:n})=>(0,n2.jsx)(Db.MenuGroup,{label:(0,lF.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,n2.jsx)(Db.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?Ja:null,children:i.label},i.id)})})})}var i2=l(O()),ple=l(Y()),hle=l(D()),$m=l(I()),s2=l(Vo());var Ps=l(x());function gle({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,hle.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,u=N=>{let F=t.setValue({item:e,value:N});r(F)},[d,f]=(0,$m.useState)({start:void 0,end:void 0}),[m,p]=(0,$m.useState)(!1),h=(0,$m.useRef)(),g=(0,$m.useRef)(new Set),b=(0,$m.useRef)(new Set),k=Xg({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats}),{formatTypes:y,prepareHandlers:v,valueHandlers:S,changeHandlers:w,dependencies:C}=oI({clientId:c,identifier:t.id,allowedFormats:k,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,disableNoneEssentialFormatting:!0});function E(N){return S.reduce((F,K)=>K(F,N.text),N.formats)}function P(N){return y.forEach(F=>{F.__experimentalCreatePrepareEditableTree&&(N=(0,s2.removeFormat)(N,F.name,0,N.text.length))}),N.formats}function R(N){return v.reduce((F,K)=>K(F,N.text),N.formats)}function B(){h.current?.focus()}let{value:T,getValue:A,onChange:L,ref:U}=(0,s2.__unstableUseRichText)({value:s,onChange(N,{__unstableFormats:F,__unstableText:K}){u(N),Object.values(w).forEach(Z=>{Z(F,K)})},selectionStart:d.start,selectionEnd:d.end,onSelectionChange:(N,F)=>f({start:N,end:F}),__unstableIsSelected:m,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,__unstableDependencies:C,__unstableAfterParse:E,__unstableBeforeSerialize:P,__unstableAddInvisibleFormats:R}),{baseControlProps:G,controlProps:j}=(0,i2.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,Ps.jsxs)(Ps.Fragment,{children:[m&&(0,Ps.jsx)(ob.Provider,{value:b,children:(0,Ps.jsx)(nb.Provider,{value:g,children:(0,Ps.jsx)("div",{children:(0,Ps.jsx)(fI,{value:T,onChange:L,onFocus:B,formatTypes:y,forwardedRef:h,isVisible:!1})})})}),(0,Ps.jsx)(i2.BaseControl,{...G,children:(0,Ps.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,ple.useMergeRefs)([U,cI({registry:i,getValue:A,onChange:L,formatTypes:y,selectionChange:f,isSelected:m,disableFormats:a?.disableFormats,value:T,tagName:"div",removeEditorOnlyFormats:P,disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:b,inputEvents:g}),h]),onFocus:()=>p(!0),onBlur:()=>p(!1),contentEditable:!0,...j})})]})}var Km=l(O()),ble=l(D()),Vb=l(M());var Mo=l(x());function FIe({data:e,field:t,attachment:o}){let r=t.config||{},{allowedTypes:n=[],multiple:i=!1}=r;if(i)return"todo multiple";if(o?.media_type==="image"||o?.poster)return(0,Mo.jsx)("img",{className:"block-editor-content-only-controls__media-thumbnail",alt:"",width:24,height:24,src:o.media_type==="image"?o.source_url:o.poster});if(n.length===1){let a=t.getValue({item:e})?.url;if(a)return(0,Mo.jsx)("img",{className:"block-editor-content-only-controls__media-thumbnail",alt:"",width:24,height:24,src:a});let c;if(n[0]==="image"?c=wk:n[0]==="video"?c=_L:n[0]==="audio"?c=IO:c=vp,c)return(0,Mo.jsx)(Km.Icon,{icon:c,size:24})}return(0,Mo.jsx)(Km.Icon,{icon:vp,size:24})}function kle({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=Nb({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1}=t.config||{},{fieldDef:c}=r,u=g=>{let b=t.setValue({item:e,value:g});o(b)},d=c?.mapping&&"featuredImage"in c.mapping,f=i?.id,m=i?.url,p=(0,ble.useSelect)(g=>{if(!f)return;let k=g(_).getSettings()[OS];if(k)return k(g,f)},[f]),h;if(s.length===1){let g=s[0];g==="image"?h=(0,Vb.__)("Choose an image\u2026"):g==="video"?h=(0,Vb.__)("Choose a video\u2026"):g==="application"?h=(0,Vb.__)("Choose a file\u2026"):h=(0,Vb.__)("Choose a media item\u2026")}else h=(0,Vb.__)("Choose a media item\u2026");return(0,Mo.jsx)(ds,{children:(0,Mo.jsx)(Yg,{className:"block-editor-content-only-controls__media-replace-flow",allowedTypes:s,mediaId:f,mediaURL:m,multiple:a,popoverProps:n,onReset:()=>{let g={};c?.mapping&&Object.keys(c.mapping).forEach(b=>{b==="id"||b==="src"||b==="url"?g[b]=void 0:(b==="caption"||b==="alt")&&(g[b]="")}),d&&(g.featuredImage=!1),u({...i,...g})},...d&&{useFeaturedImage:!!i?.featuredImage,onToggleFeaturedImage:()=>{u({...i,featuredImage:!i?.featuredImage})}},onSelect:g=>{if(g.id&&g.url){let b="image";g.mime_type&&(g.mime_type.startsWith("video/")?b="video":g.mime_type.startsWith("audio/")&&(b="audio"));let k={};c?.mapping&&Object.keys(c.mapping).forEach(v=>{v==="id"?k[v]=g.id:v==="src"||v==="url"?k[v]=g.url:v==="type"?k[v]=b:v==="link"&&g.link?k[v]=g.link:v==="caption"&&!i?.caption&&g.caption?k[v]=g.caption:v==="alt"&&!i?.alt&&g.alt?k[v]=g.alt:v==="poster"&&g.poster&&(k[v]=g.poster)}),d&&(k.featuredImage=!1);let y={...i,...k};u(y)}},renderToggle:g=>(0,Mo.jsx)(Km.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...g,children:(0,Mo.jsxs)(Km.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__media-row",children:[m&&(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(FIe,{attachment:p,field:t,data:e}),(0,Mo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:p?.title?.raw&&p?.title?.raw!==""?p?.title?.raw:m})]}),!m&&(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"24px",height:"24px"}}),(0,Mo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:h})]})]})})})})}var mc=l(O()),l2=l(I()),vle=l(M());var yle=l(Zr());var lr=l(x()),cF="noreferrer noopener",_le="_blank",a2="nofollow";function zIe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=_le,i=i?.includes(cF)?i:i+` ${cF}`;else{let s=new RegExp(`\\b${cF}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(a2)?i:(i+` ${a2}`).trim();else{let s=new RegExp(`\\b${a2}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,yle.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function Sle({data:e,field:t,onChange:o,config:r={}}){let[n,i]=(0,l2.useState)(!1),{popoverProps:s}=Nb({isControl:!0}),{fieldDef:a}=r,c=b=>{let k=t.setValue({item:e,value:b});o(k)},u=t.getValue({item:e}),d=u?.url,f=u?.rel||"",p=u?.linkTarget===_le,h=f===a2,g=(0,l2.useMemo)(()=>({url:d,opensInNewTab:p,nofollow:h}),[d,p,h]);return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(mc.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{i(!0)},children:(0,lr.jsxs)(mc.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[d&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(mc.Icon,{icon:Xr,size:24}),(0,lr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:d})]}),!d&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(mc.Icon,{icon:Xr,size:24,style:{opacity:.3}}),(0,lr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,vle.__)("Link")})]})]})}),n&&(0,lr.jsx)(mc.Popover,{onClose:()=>{i(!1)},...s??{},children:(0,lr.jsx)(sd,{value:g,onChange:b=>{let k=zIe({rel:f,...b}),y={...u};a?.mapping&&Object.keys(a.mapping).forEach(v=>{v==="href"||v==="url"?y[v]=k.url:v==="rel"?y[v]=k.rel:(v==="target"||v==="linkTarget")&&(y[v]=k.linkTarget)}),c(y)},onRemove:()=>{let b={};a?.mapping&&Object.keys(a.mapping).forEach(k=>{(k==="href"||k==="url"||k==="rel"||k==="target"||k==="linkTarget")&&(b[k]=void 0)}),c(b)}})})]})}var Ne=l(x()),{fieldsKey:jIe,formKey:UIe}=z(Y_.privateApis),Ble={richtext:gle,media:kle,link:Sle};function HIe(e){let{control:t,...o}=e,r=Ble[t];if(!r)throw new Error(`Control type "${t}" not found`);return function(i){return(0,Ne.jsx)(r,{...i,config:o})}}function GIe(e,t){let o={id:null,url:"",caption:"",alt:"",type:"image",poster:"",featuredImage:!1,link:""},r={};return t?.mapping?(Object.keys(t.mapping).forEach(n=>{r[n]=e?.[n]??o[n]??""}),r):(Object.keys(o).forEach(n=>{r[n]=e?.[n]??o[n]}),r)}function WIe(e,t){if(!t.mapping)return e;let o={};return Object.entries(t.mapping).forEach(([r])=>{r in e&&(o[r]=e[r])}),o}function $Ie(e,t){let o={url:"",rel:"",linkTarget:"",destination:""},r={};return t?.mapping?(Object.keys(t.mapping).forEach(n=>{r[n]=e?.[n]??o[n]??""}),r):(Object.keys(o).forEach(n=>{r[n]=e?.[n]??o[n]}),r)}function KIe(e,t){if(!t.mapping)return e;let o={};return Object.entries(t.mapping).forEach(([r])=>{r in e&&(o[r]=e[r])}),o}function xle({clientId:e}){let{attributes:t,blockType:o}=(0,Fb.useSelect)(f=>{let{getBlockAttributes:m,getBlockName:p}=f(_),{getBlockType:h}=f(Y_.store),g=p(e);return{attributes:m(e),blockType:h(g)}},[e]),{updateBlockAttributes:r}=(0,Fb.useDispatch)(_),n=jo({clientId:e,context:"list-view"}),i=gt(e),s=o?.[jIe],[a,c]=(0,c2.useState)(()=>o?.[UIe]),u=(0,c2.useMemo)(()=>s?.length?s.map(f=>{let m=Ble[f.type],p={};f.mapping&&o?.attributes&&Object.entries(f.mapping).forEach(([g,b])=>{p[g]=o.attributes[b]?.defaultValue??void 0});let h={id:f.id,label:f.label,type:f.type,config:{...f.args,defaultValues:p},hideLabelFromVision:f.id==="content",getValue:({item:g})=>{if(f.mapping){let b={};return Object.entries(f.mapping).forEach(([k,y])=>{b[k]=g[y]}),f.type==="media"?GIe(b,f):f.type==="link"?$Ie(b,f):b}return g[f.id]},setValue:({item:g,value:b})=>{if(f.mapping){let k=b;f.type==="media"?k=WIe(b,f):f.type==="link"&&(k=KIe(b,f));let y={};return Object.entries(f.mapping).forEach(([v,S])=>{v in k?y[S]=k[v]:y[S]=g[S]}),y}return{[f.id]:b}}};return m&&(h.Edit=HIe({control:f.type,clientId:e,fieldDef:f})),h}):[],[s,o?.attributes,e]),d=f=>{c(m=>m.fields?.includes(f)?{...m,fields:m.fields.filter(p=>p!==f)}:{...m,fields:[...m.fields||[],f]})};return s?.length?(0,Ne.jsxs)("div",{className:"block-editor-content-only-controls__fields-container",children:[(0,Ne.jsx)("div",{className:"block-editor-content-only-controls__fields-header",children:(0,Ne.jsxs)($r.__experimentalHStack,{spacing:1,justify:"space-between",expanded:!0,children:[(0,Ne.jsxs)($r.__experimentalHStack,{spacing:1,justify:"flex-start",children:[(0,Ne.jsx)(Pe,{icon:i?.icon}),(0,Ne.jsx)("div",{children:n})]}),(0,Ne.jsx)(mle,{fields:u,visibleFields:a.fields,onToggleField:d})]})}),(0,Ne.jsx)(aF,{data:t,fields:u,form:a,onChange:f=>{r(e,f)}})]}):null}function qIe({clientId:e}){let t=jo({clientId:e,context:"list-view"}),o=gt(e);return(0,Ne.jsx)("div",{className:"block-editor-content-only-controls__button-panel",children:(0,Ne.jsx)($r.Navigator.Button,{path:`/${e}`,className:"block-editor-content-only-controls__drill-down-button",children:(0,Ne.jsxs)($r.__experimentalHStack,{expanded:!0,justify:"space-between",children:[(0,Ne.jsxs)($r.__experimentalHStack,{justify:"flex-start",spacing:1,children:[(0,Ne.jsx)(Pe,{icon:o?.icon}),(0,Ne.jsx)("div",{children:t})]}),(0,Ne.jsx)($r.Icon,{icon:Xd})]})})})}function wle({rootClientId:e,contentClientIds:t,parentClientIds:o,isNested:r}){let n=(0,Fb.useSelect)(i=>{let{getBlockName:s}=i(_),a=s(e),{hasContentRoleAttribute:c}=z(i(Y_.store));return c(a)},[e]);return!n&&!t.length?null:(0,Ne.jsxs)(Ne.Fragment,{children:[r&&(0,Ne.jsx)("div",{className:"block-editor-content-only-controls__button-panel",children:(0,Ne.jsx)($r.Navigator.BackButton,{className:"block-editor-content-only-controls__back-button",children:(0,Ne.jsxs)($r.__experimentalHStack,{expanded:!0,spacing:1,justify:"flex-start",children:[(0,Ne.jsx)($r.Icon,{icon:Zd}),(0,Ne.jsx)("div",{children:(0,Cle.__)("Back")})]})})}),n&&(0,Ne.jsx)(xle,{clientId:e}),t.map(i=>o?.[i]?(0,Ne.jsx)(qIe,{clientId:i},i):(0,Ne.jsx)(xle,{clientId:i},i))]})}function Ele({rootClientId:e}){let{updatedRootClientId:t,nestedContentClientIds:o,contentClientIds:r}=(0,Fb.useSelect)(n=>{let{getClientIdsOfDescendants:i,getBlockEditingMode:s}=n(_),a={},c=[],u=[],d=i(e).filter(f=>s(f)==="contentOnly");for(let f of d){let m=i(f).filter(p=>s(p)==="contentOnly");m.length>1&&!u.includes(f)&&(a[f]=m,u=[u,...m]),u.includes(f)||c.push(f)}if(c.length===1&&Object.keys(a).length===1){let f=Object.keys(a)[0];return{updatedRootClientId:f,contentClientIds:a[f],nestedContentClientIds:{}}}return{nestedContentClientIds:a,contentClientIds:c}},[e]);return(0,Ne.jsxs)($r.Navigator,{initialPath:"/",children:[(0,Ne.jsx)($r.Navigator.Screen,{path:"/",className:"block-editor-content-only-controls__screen",children:(0,Ne.jsx)(wle,{rootClientId:t??e,contentClientIds:r,parentClientIds:o})}),Object.keys(o).map(n=>(0,Ne.jsx)($r.Navigator.Screen,{path:`/${n}`,className:"block-editor-content-only-controls__screen",children:(0,Ne.jsx)(wle,{isNested:!0,rootClientId:n,contentClientIds:o[n]})},n))]})}var Od=l(x()),YIe=({rootClientId:e,contentClientIds:t})=>{if(!t||t.length===0)return null;let o=window?.__experimentalContentOnlyPatternInsertion&&window?.__experimentalContentOnlyInspectorFields;return(0,Od.jsxs)(Od.Fragment,{children:[!o&&(0,Od.jsx)(Tle.PanelBody,{title:(0,Ile.__)("Content"),children:(0,Od.jsx)(yP,{clientIds:t})}),o&&(0,Od.jsx)(Ele,{rootClientId:e})]})},u2=YIe;var ZIe=["core/navigation"],XIe=e=>!ZIe.includes(e),d2=XIe;var cr=l(x()),{Tabs:Rd}=z(zb.privateApis);function uF({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,Ole.useSelect)(d=>d(Ple.store).get("core","showIconLabels"),[]),a=d2(e)?void 0:T_.name,[c,u]=(0,f2.useState)(a??r[0]?.name);return(0,f2.useEffect)(()=>{a||r?.length&&c&&(r.find(f=>f.name===c)||u(r[0].name))},[r,c,a]),(0,cr.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,cr.jsxs)(Rd,{defaultTabId:a,selectedTabId:c,onSelect:u,children:[(0,cr.jsx)(Rd.TabList,{children:r.map(d=>s?(0,cr.jsx)(Rd.Tab,{tabId:d.name,children:d.title},d.name):(0,cr.jsx)(zb.Tooltip,{text:d.title,children:(0,cr.jsx)(Rd.Tab,{tabId:d.name,"aria-label":d.title,children:(0,cr.jsx)(zb.Icon,{icon:d.icon})})},d.name))}),(0,cr.jsx)(Rd.TabPanel,{tabId:II.name,focusable:!1,children:(0,cr.jsx)(wne,{showAdvancedControls:!!e})}),(0,cr.jsx)(Rd.TabPanel,{tabId:PI.name,focusable:!1,children:(0,cr.jsx)(Wie,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})}),(0,cr.jsx)(Rd.TabPanel,{tabId:OI.name,focusable:!1,children:(0,cr.jsx)(u2,{rootClientId:t,contentClientIds:i})}),(0,cr.jsx)(Rd.TabPanel,{tabId:T_.name,focusable:!1,children:(0,cr.jsx)(he.Slot,{group:"list"})})]},t)})}var Vi=l(O()),Rle=l(D());var QIe=[];function JIe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function Ale(e,t,o,r){let n=[],{bindings:i,border:s,color:a,default:c,dimensions:u,list:d,position:f,styles:m,typography:p,effects:h}=Iu,g=d2(e),b=(0,Vi.__experimentalUseSlotFills)(d.name),k=!g&&!!b&&b.length,v=[...(0,Vi.__experimentalUseSlotFills)(s.name)||[],...(0,Vi.__experimentalUseSlotFills)(a.name)||[],...(0,Vi.__experimentalUseSlotFills)(u.name)||[],...(0,Vi.__experimentalUseSlotFills)(m.name)||[],...(0,Vi.__experimentalUseSlotFills)(p.name)||[],...(0,Vi.__experimentalUseSlotFills)(h.name)||[]].length,S=[...(0,Vi.__experimentalUseSlotFills)(Pu.slotName)||[],...(0,Vi.__experimentalUseSlotFills)(i.name)||[]],w=[...(0,Vi.__experimentalUseSlotFills)(c.name)||[],...(0,Vi.__experimentalUseSlotFills)(f.name)||[],...k&&v>1?S:[]],C=!!(t&&t.length>0);k&&!o&&n.push(T_),C&&n.push(OI),w.length&&!o&&n.push(II),(r||v)&&n.push(PI);let E=(0,Rle.useSelect)(R=>R(_).getSettings().blockInspectorTabs,[]);return JIe(e,E)?n:QIe}var Lle=l(D());function Mle(e){return(0,Lle.useSelect)(t=>{if(e){let o=t(_).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(_),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var ve=l(x());function ePe({clientId:e}){return(0,ve.jsx)(m2.PanelBody,{title:(0,qm.__)("Styles"),children:(0,ve.jsx)(Bg,{clientId:e})})}function Nle({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showListControls:r=!1,showBindingsControls:n=!0}){let i=kb({blockName:e});return(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)(he.Slot,{}),r&&(0,ve.jsx)(he.Slot,{group:"list"}),(0,ve.jsx)(he.Slot,{group:"color",label:(0,qm.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,ve.jsx)(he.Slot,{group:"background",label:(0,qm.__)("Background image")}),(0,ve.jsx)(he.Slot,{group:"typography",label:(0,qm.__)("Typography")}),(0,ve.jsx)(he.Slot,{group:"dimensions",label:(0,qm.__)("Dimensions")}),(0,ve.jsx)(he.Slot,{group:"border",label:i}),(0,ve.jsx)(he.Slot,{group:"styles"}),o&&(0,ve.jsx)(AI,{}),n&&(0,ve.jsx)(he.Slot,{group:"bindings"}),t&&(0,ve.jsx)("div",{children:(0,ve.jsx)(O_,{})})]})}function tPe(){let{selectedBlockCount:e,selectedBlockClientId:t,renderedBlockName:o,renderedBlockClientId:r,blockType:n,isSectionBlock:i,isSectionBlockInSelection:s,hasBlockStyles:a,editedContentOnlySection:c}=(0,dF.useSelect)(b=>{let{getSelectedBlockClientId:k,getSelectedBlockClientIds:y,getSelectedBlockCount:v,getBlockName:S,getParentSectionBlock:w,isSectionBlock:C,getEditedContentOnlySection:E,isWithinEditedContentOnlySection:P}=z(b(_)),{getBlockStyles:R}=b(jb.store),B=k(),A=P(B)?B:w(B)||B,L=A&&S(A),U=L&&(0,jb.getBlockType)(L),j=y().some(K=>C(K)),N=L&&R(L),F=N&&N.length>0;return{selectedBlockCount:v(),selectedBlockClientId:B,renderedBlockClientId:A,renderedBlockName:L,blockType:U,isSectionBlockInSelection:j,isSectionBlock:C(A),hasBlockStyles:F,editedContentOnlySection:E()}},[]),u=(0,dF.useSelect)(b=>{if(!i||!r)return[];let{getClientIdsOfDescendants:k,getBlockName:y,getBlockEditingMode:v}=z(b(_)),S=k(r),w=new Set;return S.forEach(C=>{y(C)==="core/navigation"&&k(C).forEach(P=>w.add(P))}),S.filter(C=>w.has(C)?!1:y(C)!=="core/list-item"&&v(C)==="contentOnly")},[i,r]),d=Ale(n?.name,u,i,a),f=d?.length>1,m=Mle(n),p=e>1;if(p&&!s)return(0,ve.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,ve.jsx)(g3,{}),f?(0,ve.jsx)(uF,{tabs:d}):(0,ve.jsx)(Nle,{blockName:o,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(p&&s)return(0,ve.jsx)("div",{className:"block-editor-block-inspector",children:(0,ve.jsx)(g3,{})});let h=o===(0,jb.getUnregisteredTypeHandlerName)();return!n||!r||h?(0,ve.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,qm.__)("No block selected.")}):(0,ve.jsx)(oPe,{animate:m,wrapper:b=>(0,ve.jsx)(rPe,{blockInspectorAnimationSettings:m,renderedBlockClientId:r,children:b}),children:(0,ve.jsx)(nPe,{renderedBlockClientId:r,selectedBlockClientId:t,blockName:n.name,isSectionBlock:i,availableTabs:d,contentClientIds:u,hasBlockStyles:a,editedContentOnlySection:c})})}var oPe=({animate:e,wrapper:t,children:o})=>e?t(o):o,rPe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,ve.jsx)(m2.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},nPe=({renderedBlockClientId:e,selectedBlockClientId:t,blockName:o,isSectionBlock:r,availableTabs:n,contentClientIds:i,hasBlockStyles:s,editedContentOnlySection:a})=>{let c=n?.length>1,u=window?.__experimentalContentOnlyPatternInsertion&&a&&a!==e,d=gt(a),f=gt(e),m=f.isSynced,p=!m&&c,h=window?.__experimentalContentOnlyPatternInsertion&&t===e;return(0,ve.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,ve.jsx)(Dv,{...d,className:d.isSynced&&"is-synced",parentClientId:a}),(0,ve.jsx)(Dv,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),window?.__experimentalContentOnlyPatternInsertion&&(0,ve.jsx)(hne,{clientId:e}),(0,ve.jsx)(JE,{blockClientId:e}),p&&(0,ve.jsx)(uF,{hasBlockStyles:s,clientId:e,blockName:o,tabs:n,isSectionBlock:r,contentClientIds:i}),!p&&(0,ve.jsxs)(ve.Fragment,{children:[s&&(0,ve.jsx)(ePe,{clientId:e}),(0,ve.jsx)(u2,{rootClientId:e,contentClientIds:i}),!r&&(0,ve.jsx)(Nle,{blockName:o,showListControls:!0}),r&&m&&h&&(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)(he.Slot,{}),(0,ve.jsx)(O_,{})]})]}),(0,ve.jsx)(EI,{},"back")]})},Dle=tPe;var fF=l(Oe());var Vle=l(x()),Fle=()=>((0,fF.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),Hv());function zle(e){return(0,fF.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,Vle.jsx)("div",{...e,ref:Hv()})}var jle=l(D()),mF=l(I());var pF=l(x()),iPe=()=>{};function sPe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=iPe,shouldFocusBlock:f=!1,onClose:m},p){let{destinationRootClientId:h}=(0,jle.useSelect)(g=>{let{getBlockRootClientId:b}=g(_);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,pF.jsx)(xD,{onSelect:d,rootClientId:h,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n,__experimentalInsertionIndex:i,__experimentalFilterValue:c,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:a,shouldFocusBlock:f,ref:p,onClose:m})}var hF=(0,mF.forwardRef)(sPe);function aPe(e,t){return(0,pF.jsx)(hF,{...e,onPatternCategorySelection:void 0,ref:t})}var Ule=(0,mF.forwardRef)(aPe);var Hle=l(Oe());function Gle(){return(0,Hle.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var Wle=l(Y()),Z_=l(ze()),$le=l(D()),Ad=l(st());var Kle=l(x()),lPe=window.navigator.userAgent.indexOf("Trident")!==-1,cPe=new Set([Ad.UP,Ad.DOWN,Ad.LEFT,Ad.RIGHT]),uPe=.75;function gF(){let e=(0,$le.useSelect)(t=>t(_).hasSelectedBlock(),[]);return(0,Wle.useRefEffect)(t=>{if(!e)return;let{ownerDocument:o}=t,{defaultView:r}=o,n,i,s;function a(){n||(n=r.requestAnimationFrame(()=>{m(),n=null}))}function c(g){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame(()=>{u(g),i=null})}function u({keyCode:g}){if(!p())return;let b=(0,Z_.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(cPe.has(g)){s=b;return}let k=b.top-s.top;if(k===0)return;let y=(0,Z_.getScrollContainer)(t);if(!y)return;let v=y===o.body||y===o.documentElement,S=v?r.scrollY:y.scrollTop,w=v?0:y.getBoundingClientRect().top,C=v?s.top/r.innerHeight:(s.top-w)/(r.innerHeight-w);if(S===0&&C<uPe&&h()){s=b;return}let E=v?r.innerHeight:y.clientHeight;if(s.top+s.height>w+E||s.top<w){s=b;return}v?r.scrollBy(0,k):y.scrollTop+=k}function d(){o.addEventListener("selectionchange",f)}function f(){o.removeEventListener("selectionchange",f),m()}function m(){p()&&(s=(0,Z_.computeCaretRect)(r))}function p(){return t.contains(o.activeElement)&&o.activeElement.isContentEditable}function h(){let g=t.querySelectorAll('[contenteditable="true"]');return g[g.length-1]===o.activeElement}return r.addEventListener("scroll",a,!0),r.addEventListener("resize",a,!0),t.addEventListener("keydown",c),t.addEventListener("keyup",u),t.addEventListener("mousedown",d),t.addEventListener("touchstart",d),()=>{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",c),t.removeEventListener("keyup",u),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",d),o.removeEventListener("selectionchange",f),r.cancelAnimationFrame(n),r.cancelAnimationFrame(i)}},[e])}function dPe({children:e}){return(0,Kle.jsx)("div",{ref:gF(),className:"block-editor__typewriter",children:e})}var fPe=lPe?e=>e.children:dPe,qle=fPe;var Ym=l(I()),bF=l(Oe());var kF=l(x()),p2=(0,Ym.createContext)({});p2.displayName="RenderedRefsContext";function mPe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function vF({children:e,uniqueId:t,blockName:o=""}){let r=(0,Ym.useContext)(p2),{name:n}=Ae();o=o||n;let i=(0,Ym.useMemo)(()=>mPe(r,o,t),[r,o,t]);return(0,kF.jsx)(p2.Provider,{value:i,children:e})}function yF(e,t=""){let o=(0,Ym.useContext)(p2),{name:r}=Ae();return t=t||r,!!o[t]?.has(e)}var Yle=e=>((0,bF.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,kF.jsx)(vF,{...e})),Zle=(...e)=>((0,bF.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),yF(...e));var g2=l(O()),_F=l(M()),SF=l(I()),Qle=l(Qu());var Wn=l(O());var Xle=l(M()),pc=l(x());function h2({title:e,help:t,actions:o=[],onClose:r}){return(0,pc.jsxs)(Wn.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,pc.jsxs)(Wn.__experimentalHStack,{alignment:"center",children:[(0,pc.jsx)(Wn.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,pc.jsx)(Wn.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,pc.jsx)(Wn.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:n,icon:i,variant:!i&&"tertiary",onClick:s,children:!i&&n},n)),r&&(0,pc.jsx)(Wn.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,Xle.__)("Close"),icon:Jd,onClick:r})]}),t&&(0,pc.jsx)(Wn.__experimentalText,{children:t})]})}var Ub=l(x());function pPe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,Qle.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?g2.TimePicker:g2.DateTimePicker;return(0,Ub.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,Ub.jsx)(h2,{title:i||(0,_F.__)("Publish"),actions:o?[{label:(0,_F.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,Ub.jsx)(u,{...c})]})}var xF=(0,SF.forwardRef)(pPe);function hPe(e,t){return(0,Ub.jsx)(xF,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var Jle=(0,SF.forwardRef)(hPe);var b2=l(D()),ece=l(I());function Zo(e){let t=Ae(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,b2.useDispatch)(_),i=(0,b2.useSelect)(s=>o?null:s(_).getBlockEditingMode(),[o]);return(0,ece.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[bS]:i}var tce=l(Oe()),oce=l(I());function gPe(){return(0,tce.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var rce=(0,oce.forwardRef)(gPe);var Q_=l(x()),Ce=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Ce(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function bP(e,t,o,r,n,i){if(Object.values(e??{}).every(c=>!c)||i.length===1&&o.innerBlocks.length===r.length)return o;let s=r[0]?.attributes;if(i.length>1&&r.length>1)if(r[n])s=r[n]?.attributes;else return o;let a=o;return Object.entries(e).forEach(([c,u])=>{u&&t[c].forEach(d=>{let f=nl(s,d);f&&(a={...a,attributes:pe(a.attributes,d,f)})})}),a}function qe(e,t,o){let n=(0,nce.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var hc=new WeakMap;function fs({id:e,css:t}){return rm({id:e,css:t})}function rm({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=z((0,k2.useDispatch)(_)),c=(0,k2.useRegistry)(),u=(0,Fi.useId)();(0,Fi.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return hc.get(c)||hc.set(c,[]),hc.get(c).push([d,f]),window.queueMicrotask(()=>{hc.get(c)?.length&&c.batch(()=>{hc.get(c).forEach(m=>{s(...m)}),hc.set(c,[])})}),()=>{hc.get(c)?.find(([p])=>p===d)?hc.set(c,hc.get(c).filter(([p])=>p!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function Ri(e,t){let[o,r,n,i,s,a,c,u,d,f,m,p,h,g,b,k,y,v,S,w,C,E,P,R,B,T,A,L,U,G,j,N,F,K,Z,Q,J,ee,ie,de,X,re,W,H,oe,ce,le,ye,_e,Ve,go,ot,Yt,Ct,rt,Vt,Ft,We,so,dt]=fe("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow"),ao=(0,Fi.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r},color:{palette:{custom:X,theme:W,default:H},gradients:{custom:Ve,theme:go,default:ot},duotone:{custom:le,theme:ye,default:_e},defaultGradients:Yt,defaultPalette:oe,defaultDuotone:ce,custom:de,customGradient:Ct,customDuotone:re,background:rt,link:Vt,heading:We,button:so,text:Ft},typography:{fontFamilies:{custom:n,default:i,theme:s},fontSizes:{custom:c,default:u,theme:d},customFontSize:f,defaultFontSizes:a,fontStyle:m,fontWeight:p,lineHeight:h,textAlign:g,textColumns:b,textDecoration:k,textTransform:v,letterSpacing:S,writingMode:y},spacing:{spacingSizes:{custom:B,default:T,theme:A},customSpacingSize:R,defaultSpacingSizes:P,padding:w,margin:C,blockGap:E,units:L},border:{color:Z,radius:Q,style:J,width:ee,radiusSizes:ie},dimensions:{aspectRatio:U,height:G,minHeight:j,width:N,dimensionSizes:F},layout:K,parentLayout:t,shadow:dt}),[o,r,n,i,s,a,c,u,d,f,m,p,h,g,b,k,v,S,y,w,C,E,P,R,B,T,A,L,U,G,j,N,F,K,t,Z,Q,J,ee,ie,de,X,re,W,H,oe,ce,le,ye,_e,Ve,go,ot,Yt,Ct,rt,Vt,Ft,We,so,dt]);return MI(ao,e)}function ice(e){e=e.map(o=>({...o,Edit:(0,Fi.memo)(o.edit)}));let t=(0,wF.createHigherOrderComponent)(o=>r=>{let n=Ae();return[...e.map((i,s)=>{let{Edit:a,hasSupport:c,attributeKeys:u=[],shareWithChildBlocks:d}=i;if(!(n[xc]||n[ip]&&d)||!c(r.name))return null;let m={};for(let p of u)r.attributes[p]&&(m[p]=r.attributes[p]);return(0,Q_.jsx)(a,{name:r.name,isSelected:r.isSelected,clientId:r.clientId,setAttributes:r.setAttributes,__unstableParentLayout:r.__unstableParentLayout,...m},s)}),(0,Q_.jsx)(o,{...r},"edit")]},"withBlockEditHooks");(0,X_.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function bPe({index:e,useBlockProps:t,setAllWrapperProps:o,...r}){let n=t(r),i=s=>o(a=>{let c=[...a];return c[e]=s,c});return(0,Fi.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var kPe=(0,Fi.memo)(bPe);function sce(e){let t=(0,wF.createHigherOrderComponent)(o=>r=>{let[n,i]=(0,Fi.useState)(Array(e.length).fill(void 0));return[...e.map((s,a)=>{let{hasSupport:c,attributeKeys:u=[],useBlockProps:d,isMatch:f}=s,m={};for(let p of u)r.attributes[p]&&(m[p]=r.attributes[p]);return!Object.keys(m).length||!c(r.name)||f&&!f(m)?null:(0,Q_.jsx)(kPe,{index:a,useBlockProps:d,setAllWrapperProps:i,name:r.name,clientId:r.clientId,...m},a)}),(0,Q_.jsx)(o,{...r,wrapperProps:n.filter(Boolean).reduce((s,a)=>({...s,...a,className:V(s.className,a.className),style:{...s.style,...a.style}}),r.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,X_.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function ace(e){function t(o,r,n){return e.reduce((i,s)=>{let{hasSupport:a,attributeKeys:c=[],addSaveProps:u}=s,d={};for(let f of c)n[f]&&(d[f]=n[f]);return!Object.keys(d).length||!a(r)?i:u(i,r,d)},o)}(0,X_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,X_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var lce=l($()),cce=l(nt());function vPe(e){let{apiVersion:t=1}=e;return t<2&&(0,lce.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,cce.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",vPe);var uce=l(nt()),zi=l($());var CF=l(x()),BF=["left","center","right","wide","full"],yPe=["wide","full"];function EF(e,t=!0,o=!0){let r;return Array.isArray(e)?r=BF.filter(n=>e.includes(n)):e===!0?r=[...BF]:r=[],!o||e===!0&&!t?r.filter(n=>!yPe.includes(n)):r}function _Pe(e){return"type"in(e.attributes?.align??{})||(0,zi.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...BF,""]}}),e}function SPe({name:e,align:t,setAttributes:o}){let r=EF((0,zi.getBlockSupport)(e,"align"),(0,zi.hasBlockSupport)(e,"alignWide",!0)),n=lv(r).map(({name:a})=>a),i=Zo();return!n.length||i!=="default"?null:(0,CF.jsx)(mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,CF.jsx)(dw,{value:t,onChange:a=>{a||(0,zi.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var v2={shareWithChildBlocks:!0,edit:SPe,useBlockProps:xPe,addSaveProps:wPe,attributeKeys:["align"],hasSupport(e){return(0,zi.hasBlockSupport)(e,"align",!1)}};function xPe({name:e,align:t}){let o=EF((0,zi.getBlockSupport)(e,"align"),(0,zi.hasBlockSupport)(e,"alignWide",!0));return lv(o).some(n=>n.name===t)?{"data-align":t}:{}}function wPe(e,t,o){let{align:r}=o,n=(0,zi.getBlockSupport)(t,"align"),i=(0,zi.hasBlockSupport)(t,"alignWide",!0);return EF(n,i).includes(r)&&(e.className=V(`align${r}`,e.className)),e}(0,uce.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",_Pe);var dce=l(nt());function CPe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,dce.addFilter)("blocks.registerBlockType","core/lock/addAttribute",CPe);var RF=l(nt()),$b=l($());var eS=l(O()),S2=l(M()),xce=l(I()),wce=l(D()),x2=l($());var bn=l(O()),yce=l(I()),J_=l(M()),_ce=l(D());var PF=l($()),bce=l(D()),Wb=l(O()),Os=l(M()),y2=l(I()),kce=l(Y()),vce=l(Fo());var TF=l(I()),pce=l(Y()),hce=l(O());var fce=l(O());var Hb=l(x());function BPe({blockTypes:e,value:t,onItemChange:o}){return(0,Hb.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,Hb.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,Hb.jsx)(fce.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,Hb.jsx)(Pe,{icon:r.icon})]},r.name))})}var mce=BPe;var Gb=l(x());function gce({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,pce.useInstanceId)(gce),i=(0,TF.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:p})=>p!==f.name))},[o,r]),s=(0,TF.useCallback)(f=>{r(f?[...o,...t.filter(m=>!o.find(({name:p})=>p===m.name))]:o.filter(m=>!t.find(({name:p})=>p===m.name)))},[t,o,r]);if(!t.length)return null;let a=t.map(({name:f})=>f).filter(f=>(o??[]).some(m=>m.name===f)),c="block-editor-block-manager__category-title-"+n,u=a.length===t.length,d=!u&&a.length>0;return(0,Gb.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,Gb.jsx)(hce.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,Gb.jsx)("span",{id:c,children:e})}),(0,Gb.jsx)(mce,{blockTypes:t,value:a,onItemChange:i})]})}var IF=gce;var gc=l(x());function _2({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,kce.useDebounce)(vce.speak,500),[i,s]=(0,y2.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,bce.useSelect)(m=>({categories:m(PF.store).getCategories(),isMatchingSearchTerm:m(PF.store).isMatchingSearchTerm}),[]),u=e.filter(m=>!i||c(m,i)),d=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,y2.useEffect)(()=>{if(!i)return;let m=u.length,p=(0,Os.sprintf)((0,Os._n)("%d result found.","%d results found.",m),m);n(p)},[u?.length,i,n]),(0,gc.jsxs)(Wb.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,gc.jsx)(Wb.SearchControl,{label:(0,Os.__)("Search for a block"),placeholder:(0,Os.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,gc.jsx)(Wb.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,Os.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,gc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,Os.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,gc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,Os.__)("No blocks found.")}),a.map(m=>(0,gc.jsx)(IF,{title:m.title,blockTypes:u.filter(p=>p.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,gc.jsx)(IF,{title:(0,Os.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var Rs=l(x());function Sce({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,yce.useState)(o),{updateBlockAttributes:s}=(0,_ce.useDispatch)(_),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,Rs.jsx)(bn.Modal,{title:(0,J_.__)("Manage allowed blocks"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,Rs.jsxs)(bn.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,Rs.jsx)(bn.__experimentalText,{children:(0,J_.__)("Select which blocks can be added inside this container.")}),(0,Rs.jsx)(_2,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,Rs.jsxs)(bn.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Rs.jsx)(bn.FlexItem,{children:(0,Rs.jsx)(bn.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,J_.__)("Cancel")})}),(0,Rs.jsx)(bn.FlexItem,{children:(0,Rs.jsx)(bn.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,J_.__)("Apply")})})]})]})})}var Zm=l(x());function Cce({clientId:e}){let[t,o]=(0,xce.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,wce.useSelect)(a=>{let{getBlockAttributes:c}=a(_);return{blockTypes:a(x2.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,x2.hasBlockSupport)(a,"inserter",!0)&&(!a.parent||a.parent.includes("core/post-content")));if(!i)return null;let s=n===void 0?i:i.filter(a=>n.includes(a.name));return(0,Zm.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,Zm.jsxs)(eS.BaseControl,{help:(0,S2.__)("Specify which blocks are allowed inside this container."),children:[(0,Zm.jsx)(eS.BaseControl.VisualLabel,{children:(0,S2.__)("Allowed Blocks")}),(0,Zm.jsx)(eS.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,S2.__)("Manage allowed blocks")})]}),t&&(0,Zm.jsx)(Sce,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var OF=l(x());function EPe({clientId:e}){return Zo()==="contentOnly"?null:(0,OF.jsx)(Ey.Fill,{children:(0,OF.jsx)(Cce,{clientId:e})})}var Bce={edit:EPe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,$b.hasBlockSupport)(e,"allowedBlocks")}};function TPe(e){return e?.attributes?.allowedBlocks?.type||(0,$b.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,RF.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",TPe);function IPe(e,t,o,r){if(!(0,$b.hasBlockSupport)(e.name,"allowedBlocks")||t.length!==1&&r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1||r.length>1&&t.length>1&&r.length!==t.length||e.attributes.allowedBlocks)return e;let n=t[o]?.attributes?.allowedBlocks;if(!n)return e;let s=(0,$b.getBlockType)(e.name)?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:n}};let a=n.filter(c=>s.includes(c));return{...e,attributes:{...e.attributes,allowedBlocks:a}}}(0,RF.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",IPe);var Ece=l(nt()),w2=l(O()),Kb=l(M()),C2=l($()),Tce=l(I());var za=l(x()),PPe=/[\s#]/g;function OPe(e){return"type"in(e.attributes?.anchor??{})||(0,C2.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function RPe({anchor:e,setAttributes:t}){if(Zo()!=="default")return null;let r=Tce.Platform.OS==="web";return(0,za.jsx)(he,{group:"advanced",children:(0,za.jsx)(w2.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,Kb.__)("HTML anchor"),help:(0,za.jsxs)(za.Fragment,{children:[(0,Kb.__)("Enter a word or two \u2014 without spaces \u2014 to make a unique web address just for this block, called an \u201Canchor\u201D. Then, you\u2019ll be able to link directly to this section of your page."),r&&(0,za.jsxs)(za.Fragment,{children:[" ",(0,za.jsx)(w2.ExternalLink,{href:(0,Kb.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,Kb.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,Kb.__)("Add an anchor"),onChange:n=>{n=n.replace(PPe,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var AF={addSaveProps:APe,edit:RPe,attributeKeys:["anchor"],hasSupport(e){return(0,C2.hasBlockSupport)(e,"anchor")}};function APe(e,t,o){return(0,C2.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Ece.addFilter)("blocks.registerBlockType","core/anchor/attribute",OPe);var Ice=l(nt()),B2=l($());function LPe(e){return e?.attributes?.ariaLabel?.type||(0,B2.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function MPe(e,t,o){return(0,B2.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var Pce={addSaveProps:MPe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,B2.hasBlockSupport)(e,"ariaLabel")}};(0,Ice.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",LPe);var NF=l(nt()),Oce=l(O()),LF=l(M()),tS=l($());var MF=l(x());function NPe(e){return(0,tS.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function DPe({className:e,setAttributes:t}){return Zo()!=="default"?null:(0,MF.jsx)(he,{group:"advanced",children:(0,MF.jsx)(Oce.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,LF.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,LF.__)("Separate multiple classes with spaces.")})})}var DF={edit:DPe,addSaveProps:VPe,attributeKeys:["className"],hasSupport(e){return(0,tS.hasBlockSupport)(e,"customClassName",!0)}};function VPe(e,t,o){return(0,tS.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=V(e.className,o.className)),e}function FPe(e,t,o,r){if(!(0,tS.hasBlockSupport)(e.name,"customClassName",!0)||r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1)return e;if(t[o]){let n=t[o]?.attributes.className;if(n&&e.attributes.className===void 0)return{...e,attributes:{...e.attributes,className:n}}}return e}(0,NF.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",NPe);(0,NF.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",FPe);var Rce=l(nt()),oS=l($());function zPe(e,t){return(0,oS.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,oS.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,oS.getBlockDefaultClassName)(t.name)),e}(0,Rce.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",zPe);var uue=l(I()),due=l(nt()),Dd=l($()),fue=l(Y()),Xb=l(av());var WF=l($()),R2=l(I()),Xce=l(D());var jPe=l($());var UPe=l(x()),Ace="typography.lineHeight";var Lce=l(nt()),E2=l($()),Mce=l(fE()),Nce=l(O());var rS="typography.__experimentalFontFamily",{kebabCase:HPe}=z(Nce.privateApis);function GPe(e){return(0,E2.hasBlockSupport)(e,rS)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function Dce(e,t,o){if(!(0,E2.hasBlockSupport)(t,rS)||qe(t,ji,"fontFamily")||!o?.fontFamily)return e;let r=new Mce.default(e.className);r.add(`has-${HPe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function WPe({name:e,fontFamily:t}){return Dce({},e,{fontFamily:t})}var VF={useBlockProps:WPe,addSaveProps:Dce,attributeKeys:["fontFamily"],hasSupport(e){return(0,E2.hasBlockSupport)(e,rS)}};(0,Lce.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",GPe);var FF=l(nt()),qb=l($()),Vce=l(fE());var $Pe=l(x()),Xm="typography.fontSize";function KPe(e){return(0,qb.hasBlockSupport)(e,Xm)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function Fce(e,t,o){if(!(0,qb.hasBlockSupport)(t,Xm)||qe(t,ji,"fontSize"))return e;let r=new Vce.default(e.className);r.add(Uc(o.fontSize));let n=r.value;return e.className=n||void 0,e}function qPe({name:e,fontSize:t,style:o}){let[r,n,i]=fe("typography.fontSizes","typography.fluid","layout");if(!(0,qb.hasBlockSupport)(e,Xm)||qe(e,ji,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:zl({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:Lp(r,t,o?.typography?.fontSize).size}}),!!s)return Fce(s,e,{fontSize:t})}var zF={useBlockProps:qPe,addSaveProps:Fce,attributeKeys:["fontSize","style"],hasSupport(e){return(0,qb.hasBlockSupport)(e,Xm)}},YPe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function ZPe(e,t,o,r){let n=e.name,i={fontSize:(0,qb.hasBlockSupport)(n,Xm)};return bP(i,YPe,e,t,o,r)}(0,FF.addFilter)("blocks.registerBlockType","core/font/addAttribute",KPe);(0,FF.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",ZPe);var T2=l(M()),Yb=l($());var jF=l(x()),Zb="typography.textAlign",XPe=[{icon:Ic,title:(0,T2.__)("Align text left"),align:"left"},{icon:qd,title:(0,T2.__)("Align text center"),align:"center"},{icon:Pc,title:(0,T2.__)("Align text right"),align:"right"}],zce=["left","center","right"],QPe=[];function UF(e){return Array.isArray(e)?zce.filter(t=>e.includes(t)):e===!0?zce:QPe}function JPe({style:e,name:t,setAttributes:o}){let n=Ri(t)?.typography?.textAlign,i=Zo();if(!n||i!=="default")return null;let s=UF((0,Yb.getBlockSupport)(t,Zb));if(!s.length)return null;let a=XPe.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:Ce(d)})};return(0,jF.jsx)(mt,{group:"block",children:(0,jF.jsx)(qx,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var I2={edit:JPe,useBlockProps:e2e,addSaveProps:t2e,attributeKeys:["style"],hasSupport(e){return(0,Yb.hasBlockSupport)(e,Zb,!1)}};function e2e({name:e,style:t}){if(!t?.typography?.textAlign||!UF((0,Yb.getBlockSupport)(e,Zb)).length||qe(e,ji,"textAlign"))return null;let r=t.typography.textAlign;return{className:V({[`has-text-align-${r}`]:r})}}function t2e(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Yb.getBlockSupport)(t,Zb);return UF(n).includes(r)&&!qe(t,ji,"textAlign")&&(e.className=V(`has-text-align-${r}`,e.className)),e}var GF=l(nt()),Ld=l($()),Qm=l(I()),Kce=l(D()),nS=l(M()),P2=l(O()),qce=l(Y());function o2e(e,t){let o=e.scrollHeight>e.clientHeight,r=0,n=2400,i=r,s=window.getComputedStyle(e),a=parseFloat(s.paddingLeft)||0,c=parseFloat(s.paddingRight)||0,u=document.createRange();for(u.selectNodeContents(e);r<=n;){let d=Math.floor((r+n)/2);t(d);let m=u.getBoundingClientRect().width,p=e.scrollWidth<=e.clientWidth&&m<=e.clientWidth-a-c,h=o||e.scrollHeight<=e.clientHeight;p&&h?(i=d,r=d+1):n=d-1}return u.detach(),i}function jce(e,t){if(!e)return;t(0);let o=o2e(e,t);return t(o),o}var Uce=l(I()),Hce=l(M()),Gce=l(O()),Wce=l(Fo()),HF=l(x());function $ce(){let e=(0,Hce.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,Uce.useEffect)(()=>{(0,Wce.speak)(e)},[e]),(0,HF.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,HF.jsx)(Gce.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var kn=l(x()),r2e={},n2e=6,bc="typography.fitText";function i2e(e){return!(0,Ld.hasBlockSupport)(e,bc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function s2e({fitText:e,name:t,clientId:o}){let[r,n]=(0,Qm.useState)(null),i=(0,Ld.hasBlockSupport)(t,bc),s=pt(o),{blockAttributes:a,parentId:c}=(0,Kce.useSelect)(d=>!o||!i||!e?r2e:{blockAttributes:d(_).getBlockAttributes(o),parentId:d(_).getBlockRootClientId(o)},[o,i,e]),u=(0,Qm.useCallback)(()=>{if(!s||!i||!e)return;let d=`fit-text-${o}`,f=s.ownerDocument.getElementById(d);f||(f=s.ownerDocument.createElement("style"),f.id=d,s.ownerDocument.head.appendChild(f));let m=`#block-${o}`,h=jce(s,g=>{g===0?f.textContent="":f.textContent=`${m} { font-size: ${g}px !important; }`});n(h)},[s,o,i,e]);return(0,Qm.useEffect)(()=>{if(!e||!s||!o||!i)return;let d=s,f=d.style.visibility,m=null,p=null,h=null;m=window.requestAnimationFrame(()=>{d.style.visibility="hidden",p=window.requestAnimationFrame(()=>{u(),h=setTimeout(()=>{d.style.visibility=f},10)})});let g;return window.ResizeObserver&&d.parentElement&&(g=new window.ResizeObserver(u),g.observe(d.parentElement),g.observe(d)),()=>{m!==null&&window.cancelAnimationFrame(m),p!==null&&window.cancelAnimationFrame(p),h!==null&&clearTimeout(h),g&&g.disconnect();let b=`fit-text-${o}`,k=d.ownerDocument.getElementById(b);k&&k.remove()}},[e,o,c,u,s,i]),(0,Qm.useEffect)(()=>{if(e&&s&&i){let d=window.requestAnimationFrame(()=>{s&&u()});return()=>window.cancelAnimationFrame(d)}},[a,e,u,s,i]),{fontSize:r}}function Yce({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i,warning:s}){return(0,Ld.hasBlockSupport)(r,bc)?(0,kn.jsx)(he,{group:"typography",children:(0,kn.jsxs)(P2.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,nS.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:[(0,kn.jsx)(P2.ToggleControl,{label:(0,nS.__)("Fit text"),checked:t,onChange:()=>{let a=!t||void 0,c={fitText:a};a&&(n&&(c.fontSize=void 0),i?.typography?.fontSize&&(c.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(c)},help:t?(0,nS.__)("Text will resize to fit its container."):(0,nS.__)("The text will resize to fit its container, resetting other font size settings.")}),s]})}):null}function a2e(e,t,o){if(!(0,Ld.hasBlockSupport)(t,bc))return e;let{fitText:r}=o;if(!r)return e;let n=e.className?`${e.className} has-fit-text`:"has-fit-text";return{...e,className:n}}function l2e({name:e,fitText:t}){return t&&(0,Ld.hasBlockSupport)(e,bc)?{className:"has-fit-text"}:{}}(0,GF.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",i2e);var c2e=e=>(0,Ld.hasBlockSupport)(e,bc);function u2e(e){let{name:t,attributes:o,clientId:r,isSelected:n,setAttributes:i}=e,{fitText:s}=o,{fontSize:a}=s2e({fitText:s,name:t,clientId:r});return n&&(0,kn.jsx)(Yce,{clientId:r,fitText:s,setAttributes:i,name:t,fontSize:o.fontSize,style:o.style,warning:a<n2e&&(0,kn.jsx)($ce,{})})}var d2e=(0,qce.createHigherOrderComponent)(e=>t=>{let{name:o,attributes:r,clientId:n,isSelected:i,setAttributes:s}=t,{fitText:a}=r;return(0,Ld.hasBlockSupport)(o,bc)?(0,kn.jsxs)(kn.Fragment,{children:[(0,kn.jsx)(e,{...t}),a&&(0,kn.jsx)(u2e,{clientId:n,fitText:a,setAttributes:t.setAttributes,name:o,attributes:r,isSelected:i}),!a&&i&&(0,kn.jsx)(Yce,{clientId:n,fitText:a,setAttributes:s,name:o,fontSize:r.fontSize,style:r.style})]}):(0,kn.jsx)(e,{...t})},"withFitTextEdit");(0,GF.addFilter)("editor.BlockEdit","core/fit-text/with-fit-text-edit",d2e);var O2={useBlockProps:l2e,addSaveProps:a2e,attributeKeys:["fitText","fontSize","style"],hasSupport:c2e,edit:()=>null};var $F=l(x());function Zce(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var f2e="typography.__experimentalLetterSpacing",m2e="typography.__experimentalTextTransform",p2e="typography.__experimentalTextDecoration",h2e="typography.textColumns",g2e="typography.__experimentalFontStyle",b2e="typography.__experimentalFontWeight",k2e="typography.__experimentalWritingMode",ji="typography",Qce=[Ace,Xm,g2e,b2e,rS,Zb,h2e,p2e,k2e,m2e,f2e,bc];function Jce(e){let t={...Zce(e,["fontFamily"])},o=e?.typography?.fontSize,r=e?.typography?.fontFamily,n=typeof o=="string"&&o?.startsWith("var:preset|font-size|")?o.substring(21):void 0,i=r?.startsWith("var:preset|font-family|")?r.substring(23):void 0;return t.typography={...Zce(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:Ce(t),fontFamily:i,fontSize:n}}function eue(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function v2e({children:e,resetAllFilter:t}){let o=(0,R2.useCallback)(r=>{let n=eue(r),i=t(n);return{...r,...Jce(i)}},[t]);return(0,$F.jsx)(he,{group:"typography",resetAllFilter:o,children:e})}function tue({clientId:e,name:t,setAttributes:o,settings:r}){let n=VI(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,Xce.useSelect)(m=>{if(!n)return{};let{style:p,fontFamily:h,fontSize:g,fitText:b}=m(_).getBlockAttributes(e)||{};return{style:p,fontFamily:h,fontSize:g,fitText:b}},[e,n]),u=(0,R2.useMemo)(()=>eue({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let p=Jce(m);(p.fontSize||p.style?.typography?.fontSize)&&c&&(p.fitText=void 0),o(p)};if(!n)return null;let f=(0,WF.getBlockSupport)(t,[ji,"__experimentalDefaultControls"]);return(0,$F.jsx)(FI,{as:v2e,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var Nd=l(I()),L2=l(D()),A2=l($()),sue=l(Oe());var ja=l(I()),oue=l(yy());var iS=l(x());function rue({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=pt(e),[i,s]=(0,ja.useReducer)(()=>o(n));(0,ja.useEffect)(()=>{n&&r&&s()},[n,r]),(0,ja.useEffect)(()=>{if(!n)return;let d=new window.MutationObserver(s);return d.observe(n,{attributes:!0,attributeFilter:["style","class"]}),()=>{d.disconnect()}},[n]);let a=(0,ja.useRef)(t),[c,u]=(0,ja.useState)(!1);return(0,ja.useEffect)(()=>{if((0,oue.default)(t,a.current)||r)return;u(!0),a.current=t;let d=setTimeout(()=>{u(!1)},400);return()=>{u(!1),clearTimeout(d)}},[t,r]),!c&&!r?null:(0,iS.jsx)(ki,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,iS.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function Md(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function nue({clientId:e,value:t,forceShow:o}){return(0,iS.jsx)(rue,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=Md(r,"margin-top"),i=Md(r,"margin-right"),s=Md(r,"margin-bottom"),a=Md(r,"margin-left");return{borderTopWidth:n,borderRightWidth:i,borderBottomWidth:s,borderLeftWidth:a,top:n?`-${n}`:0,right:i?`-${i}`:0,bottom:s?`-${s}`:0,left:a?`-${a}`:0}},forceShow:o})}function iue({clientId:e,value:t,forceShow:o}){return(0,iS.jsx)(rue,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:Md(r,"padding-top"),borderRightWidth:Md(r,"padding-right"),borderBottomWidth:Md(r,"padding-bottom"),borderLeftWidth:Md(r,"padding-left")}),forceShow:o})}var kc=l(x()),Ua="dimensions",sS="spacing";function y2e(){let[e,t]=(0,Nd.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=z((0,L2.useDispatch)(_));return(0,Nd.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function _2e({children:e,resetAllFilter:t}){let o=(0,Nd.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,kc.jsx)(he,{group:"dimensions",resetAllFilter:o,children:e})}function aue({clientId:e,name:t,setAttributes:o,settings:r}){let n=HI(r),i=(0,L2.useSelect)(m=>{if(n)return m(_).getBlockAttributes(e)?.style},[e,n]),[s,a]=y2e(),c=m=>{o({style:Ce(m)})};if(!n)return null;let u=(0,A2.getBlockSupport)(t,[Ua,"__experimentalDefaultControls"]),d=(0,A2.getBlockSupport)(t,[sS,"__experimentalDefaultControls"]),f={...u,...d};return(0,kc.jsxs)(kc.Fragment,{children:[(0,kc.jsx)(GI,{as:_2e,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,kc.jsx)(iue,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,kc.jsx)(nue,{forceShow:s==="margin",clientId:e,value:i})]})}function lue(e,t="any"){if(Nd.Platform.OS!=="web")return!1;let o=(0,A2.getBlockSupport)(e,Ua);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width):!!o?.[t]}var cue={useBlockProps:S2e,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return lue(e)}};function S2e({name:e,height:t,minHeight:o,style:r}){if(!lue(e,"aspectRatio")||qe(e,Ua,"aspectRatio"))return{};let n=V({"has-aspect-ratio":!!r?.dimensions?.aspectRatio}),i={};return r?.dimensions?.aspectRatio?(i.minHeight="unset",i.height="unset"):(o||r?.dimensions?.minHeight||t||r?.dimensions?.height)&&(i.aspectRatio="unset"),{className:n,style:i}}function KF(){(0,sue.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var Ha=l(x()),x2e=[...Qce,Lm,Yo,Ua,Mm,sS,j_],YF=e=>x2e.some(t=>(0,Dd.hasBlockSupport)(e,t));function As(e={}){let t={};return(0,Xb.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function w2e(e){return YF(e)&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}var mue={[`${Lm}.__experimentalSkipSerialization`]:["border"],[`${Yo}.__experimentalSkipSerialization`]:[Yo],[`${ji}.__experimentalSkipSerialization`]:[ji],[`${Ua}.__experimentalSkipSerialization`]:[Ua],[`${sS}.__experimentalSkipSerialization`]:[sS],[`${j_}.__experimentalSkipSerialization`]:[j_]},C2e={...mue,[`${Ua}.aspectRatio`]:[`${Ua}.aspectRatio`],[`${Mm}`]:[Mm]},B2e={[`${Ua}.aspectRatio`]:!0,[`${Mm}`]:!0},E2e={gradients:"gradient"};function qF(e,t,o=!1){if(!e)return e;let r=e;return o||(r=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach(n=>{if(Array.isArray(n)||(n=n.split(".")),n.length>1){let[i,...s]=n;qF(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function pue(e,t,o,r=C2e){if(!YF(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=B2e[i]||(0,Dd.getBlockSupport)(t,i);a===!0&&(n=qF(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=E2e[c]||c;n=qF(n,[[...s,u]])})}),e.style={...As(n),...e.style},e}function T2e({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=Ri(t,r),i=Zo(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,Ha.jsxs)(Ha.Fragment,{children:[(0,Ha.jsx)(gP,{...s}),(0,Ha.jsx)(Nie,{...s}),(0,Ha.jsx)(tue,{...s}),(0,Ha.jsx)(Oie,{...s}),(0,Ha.jsx)(aue,{...s})]})}var M2={edit:T2e,hasSupport:YF,addSaveProps:pue,attributeKeys:["style"],useBlockProps:O2e},I2e=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],P2e={};function O2e({name:e,style:t}){let o=(0,fue.useInstanceId)(P2e,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,uue.useMemo)(()=>{if(!n)return;let s=[];return I2e.forEach(({elementType:a,pseudo:c,elements:u})=>{if(qe(e,Yo,a))return;let f=n?.[a];if(f){let m=Gh(r,Dd.__EXPERIMENTAL_ELEMENTS[a]);s.push((0,Xb.compileCSS)(f,{selector:m})),c&&c.forEach(p=>{f[p]&&s.push((0,Xb.compileCSS)(f[p],{selector:Gh(r,`${Dd.__EXPERIMENTAL_ELEMENTS[a]}${p}`)}))})}u&&u.forEach(m=>{n[m]&&s.push((0,Xb.compileCSS)(n[m],{selector:Gh(r,Dd.__EXPERIMENTAL_ELEMENTS[m])}))})}),s.length>0?s.join(""):void 0},[r,n,e]);return fs({css:i}),pue({className:o},e,{style:t},mue)}(0,due.addFilter)("blocks.registerBlockType","core/style/addAttribute",w2e);var hue=l(nt()),gue=l($()),R2e=e=>(0,gue.hasBlockSupport)(e,"__experimentalSettings",!1);function A2e(e){return R2e(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,hue.addFilter)("blocks.registerBlockType","core/settings/addAttribute",A2e);var Vd=l($()),vue=l(Y()),yue=l(nt()),aS=l(I());function L2e(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=ft(o).toRgb();t.r.push(r.r/255),t.g.push(r.g/255),t.b.push(r.b/255),t.a.push(r.a)}),t}function bue(e){return`${e}{filter:none}`}function kue(e,t){return`${e}{filter:url(#${t})}`}function N2(e,t){let o=L2e(t);return` 179 <svg 180 xmlns:xlink="http://www.w3.org/1999/xlink" 181 viewBox="0 0 0 0" 182 width="0" 183 height="0" 184 focusable="false" 185 role="none" 186 aria-hidden="true" 187 style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" 188 > 189 <defs> 190 <filter id="${e}"> 191 <!-- 192 Use sRGB instead of linearRGB so transparency looks correct. 193 Use perceptual brightness to convert to grayscale. 194 --> 195 <feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix> 196 <!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --> 197 <feComponentTransfer color-interpolation-filters="sRGB"> 198 <feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR> 199 <feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG> 200 <feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB> 201 <feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA> 202 </feComponentTransfer> 203 <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --> 204 <feComposite in2="SourceGraphic" operator="in"></feComposite> 205 </filter> 206 </defs> 207 </svg>`}var vc=l(x()),ZF=[],M2e=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");wc([Cc]);function XF({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=fe(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,aS.useMemo)(()=>[...r||ZF,...n||ZF,...o&&i||ZF],[o,r,n,i])}function _ue(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function N2e(e,t){if(!e||!Array.isArray(e))return;let o=t?.find(r=>r?.colors?.every((n,i)=>n===e[i]));return o?`var:preset|duotone|${o.slug}`:void 0}function D2e({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=Ri(o),i=Zo(),s=XF({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=XF({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=fe("color.custom","color.customDuotone"),d=!c,f=!u||a?.length===0&&d;if(s?.length===0&&f||i!=="default")return null;let m=r==="unset"||Array.isArray(r)?r:_ue(r,s);return(0,vc.jsxs)(vc.Fragment,{children:[(0,vc.jsx)(he,{group:"filter",children:(0,vc.jsx)(eP,{value:{filter:{duotone:m}},onChange:p=>{let h={...e,color:{...p?.filter}};t({style:Ce(h)})},settings:n})}),(0,vc.jsx)(mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,vc.jsx)(lT,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:p=>{let h=N2e(p,s),g={...e,color:{...e?.color,duotone:h??p}};t({style:Ce(g)})},settings:n})})]})}var QF={shareWithChildBlocks:!0,edit:D2e,useBlockProps:j2e,attributeKeys:["style"],hasSupport(e){return(0,Vd.hasBlockSupport)(e,"filter.duotone")}};function V2e(e){return(0,Vd.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function F2e({clientId:e,id:t,selector:o,attribute:r}){let n=XF({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:_ue(r,n),a=typeof r=="string"&&s,c=typeof r=="string"&&!a,u=null;a?u=s:(c||i)&&(u=r);let m=o.split(",").map(g=>`.${t}${g.trim()}`).join(", "),p=Array.isArray(u)||u==="unset";rm(p?{css:u!=="unset"?kue(m,t):bue(m),__unstableType:"presets"}:void 0),rm(p?{assets:u!=="unset"?N2(t,u):"",__unstableType:"svgs"}:void 0);let h=pt(e);(0,aS.useEffect)(()=>{if(p&&h&&M2e){let g=h.style.display;h.style.setProperty("display","inline-block"),h.offsetHeight,h.style.setProperty("display",g)}},[p,h,u])}var z2e={};function j2e({clientId:e,name:t,style:o}){let r=(0,vue.useInstanceId)(z2e),n=(0,aS.useMemo)(()=>{let c=(0,Vd.getBlockType)(t);if(c){if(!(0,Vd.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,Vd.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=sa(c);return typeof d=="string"?Gh(f,d):f}return sa(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return F2e({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,yue.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",V2e);var D2=l(Y()),e4=l(nt()),Jm=l($()),V2=l(D()),Ga=l(O()),Qb=l(M());var No=l(x()),t4="layout",{kebabCase:JF}=z(Ga.privateApis);function o4(e){return(0,Jm.hasBlockSupport)(e,"layout")||(0,Jm.hasBlockSupport)(e,"__experimentalLayout")}function F2(e={},t=""){let{layout:o}=e,{default:r}=(0,Jm.getBlockSupport)(t,t4)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(xn[n?.type||"default"]?.className){let a=xn[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,V2.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(_).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${JF(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${JF(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function r4(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=Xi(i?.type||"default"),[a]=fe("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function U2e({layout:e,setAttributes:t,name:o,clientId:r}){let n=Ri(o),{layout:i}=n,{themeSupportsLayout:s}=(0,V2.useSelect)(A=>{let{getSettings:L}=A(_);return{themeSupportsLayout:L().supportsLayout}},[]);if(Zo()!=="default")return null;let c=(0,Jm.getBlockSupport)(o,t4,{}),u={...i,...c},{allowSwitching:d,allowEditing:f=!0,allowInheriting:m=!0,default:p}=u;if(!f)return null;let h={...c,...e},{type:g,default:{type:b="default"}={}}=h,k=g||b,y=!!(m&&(!k||k==="default"||k==="constrained"||h.inherit)),v=e||p||{},{inherit:S=!1,contentSize:w=null}=v;if((k==="default"||k==="constrained")&&!s)return null;let C=Xi(k),E=Xi("constrained"),P=!v.type&&(w||S),R=!!S||!!w,B=A=>t({layout:{type:A}}),T=A=>t({layout:A});return(0,No.jsxs)(No.Fragment,{children:[(0,No.jsx)(he,{children:(0,No.jsxs)(Ga.PanelBody,{title:(0,Qb.__)("Layout"),children:[y&&(0,No.jsx)(No.Fragment,{children:(0,No.jsx)(Ga.ToggleControl,{label:(0,Qb.__)("Inner blocks use content width"),checked:C?.name==="constrained"||R,onChange:()=>t({layout:{type:C?.name==="constrained"||R?"default":"constrained"}}),help:C?.name==="constrained"||R?(0,Qb.__)("Nested blocks use content width with options for full and wide widths."):(0,Qb.__)("Nested blocks will fill the width of this container.")})}),!S&&d&&(0,No.jsx)(H2e,{type:k,onChange:B}),C&&C.name!=="default"&&(0,No.jsx)(C.inspectorControls,{layout:v,onChange:T,layoutBlockSupport:u,name:o,clientId:r}),E&&P&&(0,No.jsx)(E.inspectorControls,{layout:v,onChange:T,layoutBlockSupport:u,name:o,clientId:r})]})}),!S&&C&&(0,No.jsx)(C.toolBarControls,{layout:v,onChange:T,layoutBlockSupport:c,name:o,clientId:r})]})}var Sue={shareWithChildBlocks:!0,edit:U2e,attributeKeys:["layout"],hasSupport(e){return o4(e)}};function H2e({type:e,onChange:t}){return(0,No.jsx)(Ga.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Qb.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:Pj().map(({name:o,label:r})=>(0,No.jsx)(Ga.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function G2e(e){return"type"in(e.attributes?.layout??{})||o4(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function W2e({block:e,props:t,blockGapSupport:o,layoutClasses:r}){let{name:n,attributes:i}=t,s=(0,D2.useInstanceId)(e),{layout:a}=i,{default:c}=(0,Jm.getBlockSupport)(n,t4)||{},u=a?.inherit||a?.contentSize||a?.wideSize?{...a,type:"constrained"}:a||c||{},d=`wp-container-${JF(n)}-is-layout-`,f=`.${d}${s}`,m=o!==null,h=Xi(u?.type||"default")?.getLayoutStyle?.({blockName:n,selector:f,layout:u,style:i?.style,hasBlockGapSupport:m}),g=V({[`${d}${s}`]:!!h},r);return fs({css:h}),(0,No.jsx)(e,{...t,__unstableLayoutClassNames:g})}var $2e=(0,D2.createHigherOrderComponent)(e=>t=>{let{clientId:o,name:r,attributes:n}=t,i=o4(r),s=F2(n,r),a=(0,V2.useSelect)(c=>{if(!i)return;let{getSettings:u,getBlockSettings:d}=z(c(_)),{disableLayoutStyles:f}=u();if(f)return;let[m]=d(o,"spacing.blockGap");return{blockGapSupport:m}},[i,o]);return a?(0,No.jsx)(W2e,{block:e,props:t,layoutClasses:s,...a}):(0,No.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})},"withLayoutStyles");(0,e4.addFilter)("blocks.registerBlockType","core/layout/addAttribute",G2e);(0,e4.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",$2e);var Iue=l(Y()),u4=l(D()),Pue=l(I());var Ls=l(I()),Fd=l(D()),xue=l(Y());function n4(e,t){return Array.from({length:t},(o,r)=>e+r)}var Wa=class{constructor({columnStart:e,rowStart:t,columnEnd:o,rowEnd:r,columnSpan:n,rowSpan:i}={}){this.columnStart=e??1,this.rowStart=t??1,n!==void 0?this.columnEnd=this.columnStart+n-1:this.columnEnd=o??this.columnStart,i!==void 0?this.rowEnd=this.rowStart+i-1:this.rowEnd=r??this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}};function ur(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function i4(e,t){let o=[];for(let r of e.split(" ")){let n=o[o.length-1],i=n?n.end+t:0,s=i+parseFloat(r);o.push({start:i,end:s})}return o}function lS(e,t,o="start"){return e.reduce((r,n,i)=>Math.abs(n[o]-t)<Math.abs(e[r][o]-t)?i:r,0)}function s4(e){let t=ur(e,"grid-template-columns"),o=ur(e,"grid-template-rows"),r=ur(e,"border-top-width"),n=ur(e,"border-right-width"),i=ur(e,"border-bottom-width"),s=ur(e,"border-left-width"),a=ur(e,"padding-top"),c=ur(e,"padding-right"),u=ur(e,"padding-bottom"),d=ur(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,p=f*m;return{numColumns:f,numRows:m,numItems:p,currentColor:ur(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:ur(e,"gap"),inset:` 208 calc(${a} + ${r}) 209 calc(${c} + ${n}) 210 calc(${u} + ${i}) 211 calc(${d} + ${s}) 212 `}}}var Ui=l(x());function cS({clientId:e,contentRef:t,parentLayout:o}){let r=(0,Fd.useSelect)(s=>s(_).getSettings().isDistractionFree,[]),n=pt(e);if(r||!n)return null;let i=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,Ui.jsx)(K2e,{gridClientId:e,gridElement:n,isManualGrid:i,ref:t})}var K2e=(0,Ls.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o},r)=>{let[n,i]=(0,Ls.useState)(()=>s4(t)),[s,a]=(0,Ls.useState)(!1);return(0,Ls.useEffect)(()=>{let c=()=>i(s4(t)),u=new window.ResizeObserver(c);u.observe(t,{box:"border-box"});let d=new window.ResizeObserver(c);return d.observe(t),()=>{u.disconnect(),d.disconnect()}},[t]),(0,Ls.useEffect)(()=>{function c(){a(!0)}function u(){a(!1)}return document.addEventListener("drag",c),document.addEventListener("dragend",u),()=>{document.removeEventListener("drag",c),document.removeEventListener("dragend",u)}},[]),(0,Ui.jsx)(ki,{className:V("block-editor-grid-visualizer",{"is-dropping-allowed":s}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,Ui.jsx)("div",{ref:r,className:"block-editor-grid-visualizer__grid",style:n.style,children:o?(0,Ui.jsx)(q2e,{gridClientId:e,gridInfo:n}):Array.from({length:n.numItems},(c,u)=>(0,Ui.jsx)(wue,{color:n.currentColor},u))})})});function q2e({gridClientId:e,gridInfo:t}){let[o,r]=(0,Ls.useState)(null),n=(0,Fd.useSelect)(s=>{let{getBlockOrder:a,getBlockStyles:c}=z(s(_)),u=a(e);return c(u)},[e]),i=(0,Ls.useMemo)(()=>{let s=[];for(let a of Object.values(n)){let{columnStart:c,rowStart:u,columnSpan:d=1,rowSpan:f=1}=a?.layout??{};!c||!u||s.push(new Wa({columnStart:c,rowStart:u,columnSpan:d,rowSpan:f}))}return s},[n]);return n4(1,t.numRows).map(s=>n4(1,t.numColumns).map(a=>{let c=i.some(d=>d.contains(a,s)),u=o?.contains(a,s)??!1;return(0,Ui.jsx)(wue,{color:t.currentColor,className:u&&"is-highlighted",children:c?(0,Ui.jsx)(Y2e,{column:a,row:s,gridClientId:e,gridInfo:t,setHighlightedRect:r}):(0,Ui.jsx)(Z2e,{column:a,row:s,gridClientId:e,gridInfo:t,setHighlightedRect:r})},`${s}-${a}`)}))}function wue({color:e,children:t,className:o}){return(0,Ui.jsx)("div",{className:V("block-editor-grid-visualizer__cell",o),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function Cue(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,Fd.useSelect)(_),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,Fd.useDispatch)(_),m=Im(o,r.numColumns);return X2e({validateDrag(p){let h=c(p);if(!a(h,o))return!1;let g=i(p),b=new Wa({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new Wa({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(p){let h=i(p);n(new Wa({columnStart:e,rowStart:t,columnSpan:h.style?.layout?.columnSpan,rowSpan:h.style?.layout?.rowSpan}))},onDragLeave(){n(p=>p?.columnStart===e&&p?.rowStart===t?null:p)},onDrop(p){n(null);let h=i(p);u(p,{style:{...h.style,layout:{...h.style?.layout,columnStart:e,rowStart:t}}}),f(),d([p],s(p),o,m(e,t))}})}function Y2e({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,Ui.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:Cue(e,t,o,r,n)})}function Z2e({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Fd.useDispatch)(_),c=Im(o,r.numColumns);return(0,Ui.jsx)(Cu,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:Cue(e,t,o,r,n),style:{color:r.currentColor},onSelect:u=>{u&&(i(u.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),a(),s([u.clientId],o,o,c(e,t)))}})}function X2e({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,Fd.useSelect)(_);return(0,xue.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var Bue=l(O()),uS=l(I());var z2=l(x());function a4({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=pt(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,z2.jsx)(Q2e,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function Q2e({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,uS.useState)(null),[c,u]=(0,uS.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,uS.useEffect)(()=>{let p=new window.ResizeObserver(()=>{let h=o.getBoundingClientRect(),g=r.getBoundingClientRect(),b=h.top>g.top,k=h.bottom<g.bottom,y=h.left>g.left,v=h.right<g.right;u({top:(i||!k)&&b,bottom:k,left:(i||!v)&&y,right:v})});return p.observe(o),()=>p.disconnect()},[o,r,i]);let d={right:"left",left:"right"},f={top:"flex-end",bottom:"flex-start"},m={display:"flex",justifyContent:"center",alignItems:"center",...d[s]&&{justifyContent:d[s]},...f[s]&&{alignItems:f[s]}};return(0,z2.jsx)(ki,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,z2.jsx)(Bue.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:c.bottom,bottomLeft:!1,bottomRight:!1,left:c.left,right:c.right,top:c.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:p,pointerId:h})=>{p.setPointerCapture(h)},onResizeStart:(p,h)=>{a(h)},onResizeStop:(p,h,g)=>{let b=parseFloat(ur(r,"column-gap")),k=parseFloat(ur(r,"row-gap")),y=i4(ur(r,"grid-template-columns"),b),v=i4(ur(r,"grid-template-rows"),k),S=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),w=lS(y,S.left)+1,C=lS(v,S.top)+1,E=lS(y,S.right,"end")+1,P=lS(v,S.bottom,"end")+1;n({columnSpan:E-w+1,rowSpan:P-C+1,columnStart:i?w:void 0,rowStart:i?C:void 0})}})})}var Hi=l(M()),Jb=l(O());var Eue=l(D()),Tue=l(Y());var xr=l(x());function l4({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,Eue.useDispatch)(_),a=e?.columnStart??1,c=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,m=c+d-1,p=t?.columnCount,h=t?.rowCount,g=Im(r,p);return(0,xr.jsx)(mt,{group:"parent",children:(0,xr.jsxs)(Jb.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,xr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,xr.jsx)(dS,{icon:(0,Hi.isRTL)()?Qo:Cr,label:(0,Hi.__)("Move left"),description:(0,Hi.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,xr.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,xr.jsx)(dS,{className:"is-up-button",icon:Qd,label:(0,Hi.__)("Move up"),description:(0,Hi.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,xr.jsx)(dS,{className:"is-down-button",icon:_n,label:(0,Hi.__)("Move down"),description:(0,Hi.__)("Move down"),isDisabled:h&&m>=h,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,xr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,xr.jsx)(dS,{icon:(0,Hi.isRTL)()?Cr:Qo,label:(0,Hi.__)("Move right"),description:(0,Hi.__)("Move right"),isDisabled:p&&f>=p,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function dS({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,Tue.useInstanceId)(dS)}`;return(0,xr.jsxs)(xr.Fragment,{children:[(0,xr.jsx)(Jb.ToolbarButton,{className:V("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,xr.jsx)(Jb.VisuallyHidden,{id:a,children:i})]})}var fS=l(D()),U2=l(I()),j2=l(Y());function c4({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,fS.useSelect)(m=>{let{getBlockAttributes:p,getBlockOrder:h}=m(_),g=m(_).getSelectedBlock();return{gridLayout:p(e).layout??{},blockOrder:h(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,fS.useSelect)(_),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,fS.useDispatch)(_),c=(0,U2.useMemo)(()=>r?new Wa(r):null,[r]),u=(0,j2.usePrevious)(c),d=(0,j2.usePrevious)(t.isManualPlacement),f=(0,j2.usePrevious)(o);(0,U2.useEffect)(()=>{let m={};if(t.isManualPlacement){let p=[];for(let g of o){let{columnStart:b,rowStart:k,columnSpan:y=1,rowSpan:v=1}=n(g).style?.layout??{};!b||!k||p.push(new Wa({columnStart:b,rowStart:k,columnSpan:y,rowSpan:v}))}for(let g of o){let b=n(g),{columnStart:k,rowStart:y,columnSpan:v=1,rowSpan:S=1}=b.style?.layout??{};if(k&&y)continue;let[w,C]=J2e(p,t.columnCount,v,S,u?.columnEnd,u?.rowEnd);p.push(new Wa({columnStart:w,rowStart:C,columnSpan:v,rowSpan:S})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:w,rowStart:C}}}}let h=Math.max(...p.map(g=>g.rowEnd));(!t.rowCount||t.rowCount<h)&&(m[e]={layout:{...t,rowCount:h}});for(let g of f??[])if(!o.includes(g)){let b=i(g);if(b===null||n(b)?.layout?.type==="grid")continue;let y=n(g),{columnStart:v,rowStart:S,columnSpan:w,rowSpan:C,...E}=y.style?.layout??{};if(v||S||w||C){let P=Object.keys(E).length===0;m[g]=pe(y,["style","layout"],P?void 0:E)}}}else{if(d===!0)for(let p of o){let h=n(p),{columnStart:g,rowStart:b,...k}=h.style?.layout??{};if(g||b){let y=Object.keys(k).length===0;m[p]=pe(h,["style","layout"],y?void 0:k)}}t.rowCount&&(m[e]={layout:{...t,rowCount:void 0}})}Object.keys(m).length&&(a(),s(Object.keys(m),m,!0))},[e,t,f,o,u,d,a,n,i,s])}function J2e(e,t,o,r,n=1,i=1){for(let s=i;;s++)for(let a=s===i?n:1;a<=t;a++){let c=new Wa({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var yc=l(x()),eOe={};function tOe({style:e}){let t=(0,u4.useSelect)(g=>!g(_).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=hf()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,Iue.useInstanceId)(eOe),p=`.wp-container-content-${m}`,h="";if(t&&(r==="fixed"&&n?h=`${p} { 213 flex-basis: ${n}; 214 box-sizing: border-box; 215 }`:r==="fill"?h=`${p} { 216 flex-grow: 1; 217 }`:i&&a?h=`${p} { 218 grid-column: ${i} / span ${a}; 219 }`:i?h=`${p} { 220 grid-column: ${i}; 221 }`:a&&(h=`${p} { 222 grid-column: span ${a}; 223 }`),s&&c?h+=`${p} { 224 grid-row: ${s} / span ${c}; 225 }`:s?h+=`${p} { 226 grid-row: ${s}; 227 }`:c&&(h+=`${p} { 228 grid-row: span ${c}; 229 }`),(a||i)&&(f||!d))){let g=parseFloat(f);isNaN(g)&&(g=12);let b=f?.replace(g,"");["px","rem","em"].includes(b)||(b="rem");let k=2;a&&i?k=a+i-1:a?k=a:k=i;let y=b==="px"?24:1.5,v=k*g+(k-1)*y,S=g*2+y-1,w=a&&a>1?"1/-1":"auto";h+=`@container (max-width: ${Math.max(v,S)}${b}) { 230 ${p} { 231 grid-column: ${w}; 232 grid-row: auto; 233 } 234 }`}if(fs({css:h}),!!h)return{className:`wp-container-content-${m}`}}function oOe({clientId:e,style:t,setAttributes:o}){let r=hf()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,yc.jsx)(rOe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function rOe({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a}=(0,u4.useSelect)(f=>{let{getBlockRootClientId:m,getBlockEditingMode:p,getTemplateLock:h}=f(_),g=m(e);return h(g)||p(g)!=="default"?{rootClientId:g,isVisible:!1}:{rootClientId:g,isVisible:!0}},[e]),[c,u]=(0,Pue.useState)();if(!a)return null;function d(f){o({style:{...t,layout:{...t?.layout,...f}}})}return(0,yc.jsxs)(yc.Fragment,{children:[(0,yc.jsx)(cS,{clientId:s,contentRef:u,parentLayout:i}),r&&(0,yc.jsx)(a4,{clientId:e,bounds:c,onChange:d,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,yc.jsx)(l4,{layout:t?.layout,parentLayout:i,onChange:d,gridClientId:s,blockClientId:e})]})}var d4={useBlockProps:tOe,edit:oOe,attributeKeys:["style"],hasSupport(){return!0}};var Oue=l(O()),H2=l(D()),Rue=l(M()),Aue=l(I());var f4=l(x());function nOe({clientId:e}){let{templateLock:t,isLockedByParent:o,isEditingContentOnlySection:r}=(0,H2.useSelect)(a=>{let{getContentLockingParent:c,getTemplateLock:u,getEditedContentOnlySection:d}=z(a(_));return{templateLock:u(e),isLockedByParent:!!c(e),isEditingContentOnlySection:d()===e}},[e]),{stopEditingContentOnlySection:n}=z((0,H2.useDispatch)(_)),i=!o&&t==="contentOnly",s=(0,Aue.useCallback)(()=>{n()},[n]);return window?.__experimentalContentOnlyPatternInsertion||!i&&!r?null:r&&(0,f4.jsx)(mt,{group:"other",children:(0,f4.jsx)(Oue.ToolbarButton,{onClick:s,children:(0,Rue.__)("Done")})})}var Lue={edit:nOe,hasSupport(){return!0}};var p4=l(nt()),m4=l($()),Mue="metadata";function iOe(e){return e?.attributes?.[Mue]?.type||(e.attributes={...e.attributes,[Mue]:{type:"object"}}),e}function sOe(e,t,o,r){if(r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1||r.length>1&&t.length>1&&r.length!==t.length)return e;let n=t[o]?.attributes?.metadata;if(!n)return e;let i={};return n.noteId&&!e.attributes?.metadata?.noteId&&(i.noteId=n.noteId),n.name&&!e.attributes?.metadata?.name&&(0,m4.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,m4.hasBlockSupport)(e.name,"visibility",!0)&&(i.blockVisibility=n.blockVisibility),Object.keys(i).length>0?{...e,attributes:{...e.attributes,metadata:{...e.attributes.metadata,...i}}}:e}(0,p4.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",iOe);(0,p4.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",sOe);var h4=l(M()),G2=l(I()),W2=l(O()),$2=l($()),ek=l(D());var zd=l(x()),aOe={};function lOe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,ek.useSelect)(p=>p($2.store).getBlockTypes(),[]),n=(0,G2.useMemo)(()=>r?.filter(({name:p,blockHooks:h})=>h&&e in h||o.includes(p)),[r,e,o]),i=(0,ek.useSelect)(p=>{let{getBlocks:h,getBlockRootClientId:g,getGlobalBlockCount:b}=p(_),k=g(t),y=n.reduce((v,S)=>{if(b(S.name)===0)return v;let w=S?.blockHooks?.[e],C;switch(w){case"before":case"after":C=h(k);break;case"first_child":case"last_child":C=h(t);break;case void 0:C=[...h(k),...h(t)];break}let E=C?.find(P=>P.name===S.name);return E?{...v,[S.name]:E.clientId}:v},{});return Object.values(y).length>0?y:aOe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,ek.useSelect)(_),{insertBlock:u,removeBlock:d}=(0,ek.useDispatch)(_);if(!n.length)return null;let f=n.reduce((p,h)=>{let[g]=h.name.split("/");return p[g]||(p[g]=[]),p[g].push(h),p},{}),m=(p,h)=>{let g=s(t),b=a(t),k=c(t);switch(h){case"before":case"after":u(p,h==="after"?g+1:g,k,!1);break;case"first_child":case"last_child":u(p,h==="first_child"?0:b,t,!1);break;case void 0:u(p,g+1,k,!1);break}};return(0,zd.jsx)(he,{children:(0,zd.jsxs)(W2.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,h4.__)("Plugins"),initialOpen:!0,children:[(0,zd.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,h4.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(p=>(0,zd.jsxs)(G2.Fragment,{children:[(0,zd.jsx)("h3",{children:p}),f[p].map(h=>{let g=h.name in i;return(0,zd.jsx)(W2.ToggleControl,{checked:g,label:h.title,onChange:()=>{if(!g){let b=h.blockHooks[e];m((0,$2.createBlock)(h.name),b);return}d(i[h.name],!1)}},h.title)})]},p))]})})}var Nue={edit:lOe,attributeKeys:["metadata"],hasSupport(){return!0}};var g4=l(M()),Due=l($()),tk=l(O()),Vue=l(D()),Fue=l(I()),zue=l(Y());var jd=l(x()),cOe=()=>(0,zue.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},uOe=({name:e,metadata:t})=>{let o=(0,Fue.useContext)(Jn),{removeAllBlockBindings:r}=ml(),n=cOe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,Vue.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(_).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=z(c(Due.store));return{bindableAttributes:u?.[e],hasCompatibleFields:Object.values(d()).some(m=>f(m,o)?.length>0)}},[e,o]);if(!i||i.length===0)return null;let{bindings:a}=t||{};return a===void 0&&!s?null:(0,jd.jsx)(he,{group:"bindings",children:(0,jd.jsxs)(tk.__experimentalToolsPanel,{label:(0,g4.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,jd.jsx)(tk.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,jd.jsx)(dv,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,jd.jsx)(tk.__experimentalText,{as:"div",variant:"muted",children:(0,jd.jsx)("p",{children:(0,g4.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},jue={edit:uOe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var Uue=l(nt()),Hue=l($());function dOe(e){return e.__experimentalLabel||(0,Hue.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(o,{context:r})=>{let{metadata:n}=o;if(r==="list-view"&&n?.name)return n.name}),e}(0,Uue.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",dOe);var Gue=l(Y()),Wue=l(nt()),$ue=l(D());var Gi=l(x());function fOe(e){c4(e)}function mOe({clientId:e,layout:t}){let o=(0,$ue.useSelect)(r=>{let{isBlockSelected:n,isDraggingBlocks:i,getTemplateLock:s,getBlockEditingMode:a}=r(_);return!(!i()&&!n(e)||s(e)||a(e)!=="default")},[e]);return(0,Gi.jsxs)(Gi.Fragment,{children:[(0,Gi.jsx)(fOe,{clientId:e}),o&&(0,Gi.jsx)(cS,{clientId:e,parentLayout:t})]})}var pOe=(0,Gue.createHigherOrderComponent)(e=>t=>t.attributes.layout?.type!=="grid"?(0,Gi.jsx)(e,{...t},"edit"):(0,Gi.jsxs)(Gi.Fragment,{children:[(0,Gi.jsx)(mOe,{clientId:t.clientId,layout:t.attributes.layout}),(0,Gi.jsx)(e,{...t},"edit")]}),"addGridVisualizerToBlockEdit");(0,Wue.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",pOe);function K2(e){let t=e.style?.border||{};return{className:P3(e)||void 0,style:As({border:t})}}function b4(e){let{colors:t}=ed(),o=K2(e),{borderColor:r}=e;if(r){let n=Am({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function k4(e){let t=e.style?.shadow||"";return{style:As({shadow:t})}}var v4=l(I());function q2(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=Qn("background-color",t),s=Qn("color",o),a=Ap(r),c=a||n?.color?.gradient,u=V(s,a,{[i]:!c&&!!i,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||r||n?.color?.gradient,"has-link-color":n?.elements?.link?.color}),d=n?.color||{},f=As({color:d});return{className:u||void 0,style:f}}function y4(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=fe("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,v4.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,v4.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=q2(e);if(t){let p=Ds(d,t);m.style.backgroundColor=p.color}if(r&&(m.style.background=$x(f,r)),o){let p=Ds(d,o);m.style.color=p.color}return m}function _4(e){let{style:t}=e,o=t?.spacing||{};return{style:As({spacing:o})}}var Kue=l(O());var{kebabCase:hOe}=z(Kue.privateApis);function S4(e,t){let o=e?.style?.typography||{};o={...o,fontSize:zl({size:e?.style?.typography?.fontSize},t)};let r=As({typography:o}),n=e?.fontFamily?`has-${hOe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:V(n,i,Uc(e?.fontSize)),style:r}}var Y2=l(I());function x4(e){let[t,o]=(0,Y2.useState)(e);return(0,Y2.useEffect)(()=>{e&&o(e)},[e]),t}ice([v2,I2,AF,DF,M2,QF,O2,HD,Sue,Lue,Nue,jue,d4,Bce].filter(Boolean));sce([v2,I2,Die,M2,D3,cue,QF,VF,zF,O2,O3,HD,hZ,d4]);ace([v2,I2,AF,Pce,DF,O3,O2,D3,M2,VF,zF]);var que={button:"wp-element-button",caption:"wp-element-caption"},gOe=e=>que[e]?que[e]:"";var Yue=()=>"";var ok=l(I()),mS=l($()),C4=l(Vo());var Zue=l(x());function B4(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return w4(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case ok.StrictMode:case ok.Fragment:return w4(n.children,t,o);case ok.RawHTML:return;case Sy.Content:return Xue(t,o);case __:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?w4(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return B4(i,t,o)}}function w4(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)B4(e[o],...t)}function Xue(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,mS.getSaveElement)(r,n,(0,Zue.jsx)(Sy.Content,{}));B4(s,e,i)}}function Que(e=[]){mS.__unstableGetBlockProps.skipFilters=!0;let t=[];return Xue(t,e),mS.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof C4.RichTextData?o:C4.RichTextData.fromHTMLString(o))}var Jue=l(O());var E4=l(x());function ede({clientId:e,resizableBoxProps:t,...o}){return(0,E4.jsx)(ki,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,E4.jsx)(Jue.ResizableBox,{...t})})}var tde=l(I()),X2=l(D()),tp=l(O()),Z2=l(M());var ep=l(x());function ode({rules:e}){let{clientIds:t,selectPrevious:o,message:r}=(0,X2.useSelect)(c=>z(c(_)).getRemovalPromptData()),{clearBlockRemovalPrompt:n,setBlockRemovalRules:i,privateRemoveBlocks:s}=z((0,X2.useDispatch)(_));if((0,tde.useEffect)(()=>(i(e),()=>{i()}),[e,i]),!r)return;let a=()=>{s(t,o,!0),n()};return(0,ep.jsxs)(tp.Modal,{title:(0,Z2.__)("Be careful!"),onRequestClose:n,size:"medium",children:[(0,ep.jsx)("p",{children:r}),(0,ep.jsxs)(tp.__experimentalHStack,{justify:"right",children:[(0,ep.jsx)(tp.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,Z2.__)("Cancel")}),(0,ep.jsx)(tp.Button,{variant:"primary",onClick:a,__next40pxDefaultSize:!0,children:(0,Z2.__)("Delete")})]})]})}var T4=l(I());var rk=l(O()),nde=l(I()),vn=l(M()),Q2=l(x()),rde=[{value:"fill",label:(0,vn._x)("Fill","Scale option for dimensions control"),help:(0,vn.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,vn._x)("Contain","Scale option for dimensions control"),help:(0,vn.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,vn._x)("Cover","Scale option for dimensions control"),help:(0,vn.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,vn._x)("None","Scale option for dimensions control"),help:(0,vn.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,vn._x)("Scale down","Scale option for dimensions control"),help:(0,vn.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function ide({panelId:e,value:t,onChange:o,options:r=rde,defaultValue:n=rde[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,nde.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,Q2.jsx)(rk.__experimentalToolsPanelItem,{label:(0,vn.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,Q2.jsx)(rk.__experimentalToggleGroupControl,{label:(0,vn.__)("Scale"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,Q2.jsx)(rk.__experimentalToggleGroupControlOption,{...c},c.value))})})}var nk=l(O()),op=l(M()),_c=l(x());function sde({panelId:e,value:t={},onChange:o=()=>{},units:r,isShownByDefault:n=!0}){let i=t.width==="auto"?"":t.width??"",s=t.height==="auto"?"":t.height??"",a=c=>u=>{let d={...t};u?d[c]=u:delete d[c],o(d)};return(0,_c.jsxs)(_c.Fragment,{children:[(0,_c.jsx)(nk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,op.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,_c.jsx)(nk.__experimentalUnitControl,{label:(0,op.__)("Width"),placeholder:(0,op.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,_c.jsx)(nk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,op.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,_c.jsx)(nk.__experimentalUnitControl,{label:(0,op.__)("Height"),placeholder:(0,op.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var Ud=l(x());function bOe({panelId:e,value:t={},onChange:o=()=>{},aspectRatioOptions:r,defaultAspectRatio:n="auto",scaleOptions:i,defaultScale:s="fill",unitsOptions:a,tools:c=["aspectRatio","widthHeight","scale"]}){let u=t.width===void 0||t.width==="auto"?null:t.width,d=t.height===void 0||t.height==="auto"?null:t.height,f=t.aspectRatio===void 0||t.aspectRatio==="auto"?null:t.aspectRatio,m=t.scale===void 0||t.scale==="fill"?null:t.scale,[p,h]=(0,T4.useState)(m),[g,b]=(0,T4.useState)(f),k=u&&d?"custom":g,y=f||u&&d;return(0,Ud.jsxs)(Ud.Fragment,{children:[c.includes("aspectRatio")&&(0,Ud.jsx)(UI,{panelId:e,options:r,defaultValue:n,value:k,onChange:v=>{let S={...t};v=v==="auto"?null:v,b(v),v?S.aspectRatio=v:delete S.aspectRatio,v?p?S.scale=p:(S.scale=s,h(s)):delete S.scale,v!=="custom"&&u&&d&&delete S.height,o(S)}}),c.includes("widthHeight")&&(0,Ud.jsx)(sde,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:v,height:S})=>{let w={...t};v=v==="auto"?null:v,S=S==="auto"?null:S,v?w.width=v:delete w.width,S?w.height=S:delete w.height,v&&S?delete w.aspectRatio:g&&(w.aspectRatio=g),!g&&!!v!=!!S?delete w.scale:p?w.scale=p:(w.scale=s,h(s)),o(w)}}),c.includes("scale")&&y&&(0,Ud.jsx)(ide,{panelId:e,options:i,defaultValue:s,value:p,onChange:v=>{let S={...t};v=v==="fill"?null:v,h(v),v?S.scale=v:delete S.scale,o(S)}})]})}var ade=bOe;var J2=l(O()),Sc=l(M()),I4=l(x()),lde=[{label:(0,Sc._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,Sc._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,Sc._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,Sc._x)("Full Size","Image size option for resolution control"),value:"full"}];function cde({panelId:e,value:t,onChange:o,options:r=lde,defaultValue:n=lde[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,I4.jsx)(J2.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,Sc.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,I4.jsx)(J2.SelectControl,{label:(0,Sc.__)("Resolution"),value:a,options:r,onChange:o,help:(0,Sc.__)("Select the size of the source image."),size:"__unstable-large"})})}var rp=l(M()),ik=l(O()),dde=l(D());var Ms=l(M()),ude={a:(0,Ms.__)("The <a> element should be used for links that navigate to a different page or to a different section within the same page."),article:(0,Ms.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,Ms.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,Ms.__)("The <button> element should be used for interactive controls that perform an action on the current page, such as opening a modal or toggling content visibility."),div:(0,Ms.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,Ms.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,Ms.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,Ms.__)("The <main> element should be used for the primary content of your document only."),nav:(0,Ms.__)("The <nav> element should be used to identify groups of links that are intended to be used for website or page content navigation."),section:(0,Ms.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var pS=l(x());function fde({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,rp.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]}){let n=!!o&&r.some(a=>a.value==="main"),i=(0,dde.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:c,getBlockAttributes:u}=a(_);return c().some(d=>d===o?!1:u(d)?.tagName==="main")},[o,n]),s=r.map(a=>a.value==="main"&&i&&e!=="main"?{...a,disabled:!0,label:(0,rp.sprintf)((0,rp.__)("%s (Already in use)"),a.label)}:a);return(0,pS.jsxs)(ik.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,pS.jsx)(ik.SelectControl,{__next40pxDefaultSize:!0,label:(0,rp.__)("HTML element"),options:s,value:e,onChange:t,help:ude[e]}),e==="main"&&i&&(0,pS.jsx)(ik.Notice,{status:"warning",isDismissible:!1,children:(0,rp.__)("Multiple <main> elements detected. The duplicate may be in your content or template. This is not valid HTML and may cause accessibility issues. Please change this HTML element.")})]})}var Wi=l(O()),sk=l(I()),eO=l(M());var yn=l(O());var $n=l(x()),{Badge:kOe}=z(yn.privateApis);function mde({title:e,url:t,image:o,badges:r}){return(0,$n.jsxs)(yn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,$n.jsx)(yn.FlexItem,{className:"link-preview-button__content",children:(0,$n.jsxs)(yn.__experimentalHStack,{alignment:"top",children:[o&&(0,$n.jsx)(yn.FlexItem,{className:"link-preview-button__image-container",children:(0,$n.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,$n.jsxs)(yn.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,$n.jsx)(yn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:e}),t&&(0,$n.jsx)(yn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,$n.jsx)(yn.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,$n.jsx)(kOe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,$n.jsx)(Te,{icon:_n,className:"link-preview-button__icon"})]})}var Kn=l(x());function P4({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,sk.useState)(!1),a=(0,sk.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,sk.useRef)(null),{baseControlProps:f,controlProps:m}=(0,Wi.useBaseControlProps)({help:n}),p=h=>{if(s(!1),h){let g={url:h.url,kind:h.kind,type:h.type,id:h.id,title:h.title};t(g)}};return(0,Kn.jsxs)(Wi.BaseControl,{...f,children:[(0,Kn.jsx)(Wi.BaseControl.VisualLabel,{children:r}),(0,Kn.jsxs)(Wi.Button,{ref:d,onClick:()=>s(!i),"aria-haspopup":"dialog","aria-expanded":i,"aria-describedby":m["aria-describedby"],variant:"secondary",__next40pxDefaultSize:!0,className:"link-preview-button",children:[r&&(0,Kn.jsxs)(Wi.VisuallyHidden,{children:[r,":"]}),(0,Kn.jsx)(mde,{title:e.title||(0,eO.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,Kn.jsx)(Wi.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,Kn.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,Kn.jsxs)(Wi.VisuallyHidden,{children:[(0,Kn.jsx)("h2",{id:c,children:(0,eO.__)("Select a link")}),(0,Kn.jsx)("p",{id:u,children:(0,eO.__)("Search for and add a link to the navigation item.")})]}),(0,Kn.jsx)(sd,{value:null,onChange:p,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var O4={};X4(O4,{...E3,ExperimentalBlockCanvas:D5,ExperimentalBlockEditorProvider:sh,getDuotoneFilter:N2,getRichTextValues:Que,PrivateQuickInserter:z1,extractWords:Zx,getNormalizedSearchTerms:nv,normalizeString:rv,PrivateListView:U5,ResizableBoxPopover:ede,useHasBlockToolbar:uE,cleanEmptyObject:Ce,BlockQuickNavigation:yP,LayoutStyle:Rj,BlockManager:_2,BlockRemovalWarningModal:ode,useLayoutClasses:F2,useLayoutStyles:r4,DimensionsTool:ade,ResolutionTool:cde,TabbedSidebar:M1,TextAlignmentControl:DI,usesContextKey:e3,useFlashEditableBlocks:sC,HTMLElementControl:fde,useZoomOut:fy,globalStylesDataKey:Vs,globalStylesLinksDataKey:TS,selectBlockPatternsKey:Bc,requiresWrapperOnCopy:bN,PrivateRichText:S_,PrivateInserterLibrary:hF,reusableBlocksSelectKey:IS,PrivateBlockPopover:Uf,PrivatePublishDateTimePicker:xF,useSpacingSizes:_I,useBlockDisplayTitle:jo,__unstableBlockStyleVariationOverridesWithConfig:w5,setBackgroundStyleDefaults:dP,sectionRootClientIdKey:Ec,CommentIconSlotFill:AB,CommentIconToolbarSlotFill:rE,mediaEditKey:PS,getMediaSelectKey:OS,essentialFormatKey:RS,isIsolatedEditorKey:up,useBlockElement:pt,useBlockElementRef:vf,LinkPicker:P4,useRemoteUrlData:HT});return yde(vOe);})(); 235 /*! Bundled license information: 236 237 autosize/dist/autosize.js: 238 (*! 239 autosize 4.0.2 240 license: MIT 241 http://www.jacklmoore.com/autosize 242 *) 243 244 normalize-wheel/src/isEventSupported.js: 245 (** 246 * Checks if an event is supported in the current execution environment. 247 * 248 * NOTE: This will not work correctly for non-generic events such as `change`, 249 * `reset`, `load`, `error`, and `select`. 250 * 251 * Borrows from Modernizr. 252 * 253 * @param {string} eventNameSuffix Event name, e.g. "click". 254 * @param {?boolean} capture Check if the capture phase is supported. 255 * @return {boolean} True if the event is supported. 256 * @internal 257 * @license Modernizr 3.0.0pre (Custom Build) | MIT 258 *) 259 */
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Wed Apr 22 08:20:11 2026 | Cross-referenced by PHPXref |