| 1 |
"use strict";var wp;(wp||={}).blockEditor=(()=>{var zue=Object.create;var tS=Object.defineProperty;var jue=Object.getOwnPropertyDescriptor;var Hue=Object.getOwnPropertyNames;var Uue=Object.getPrototypeOf,Gue=Object.prototype.hasOwnProperty;var ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Os=(e,t)=>{for(var o in t)tS(e,o,{get:t[o],enumerable:!0})},pF=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Hue(t))!Gue.call(e,n)&&n!==o&&tS(e,n,{get:()=>t[n],enumerable:!(r=jue(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?zue(Uue(e)):{},pF(t||!e||!e.__esModule?tS(o,"default",{value:e,enumerable:!0}):o,e)),Wue=e=>pF(tS({},"__esModule",{value:!0}),e);var K=ee((F2e,hF)=>{hF.exports=window.wp.blocks});var O=ee((z2e,gF)=>{gF.exports=window.wp.element});var V=ee((j2e,bF)=>{bF.exports=window.wp.data});var q=ee((H2e,kF)=>{kF.exports=window.wp.compose});var ot=ee((U2e,vF)=>{vF.exports=window.wp.hooks});var A=ee((Y2e,PF)=>{PF.exports=window.wp.components});var aS=ee((q2e,OF)=>{OF.exports=window.wp.privateApis});var Oe=ee((oOe,NF)=>{NF.exports=window.wp.deprecated});var x=ee((nOe,VF)=>{VF.exports=window.ReactJSXRuntime});var $r=ee((sOe,zF)=>{zF.exports=window.wp.url});var M=ee((bOe,KF)=>{KF.exports=window.wp.i18n});var zd=ee((kOe,YF)=>{"use strict";YF.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 Y=ee((TOe,tz)=>{tz.exports=window.wp.primitives});var Mo=ee((UMe,oz)=>{oz.exports=window.wp.richText});var nz=ee((GMe,rz)=>{rz.exports=window.wp.blockSerializationDefaultParser});var Xo=ee((bNe,Vz)=>{Vz.exports=window.wp.a11y});var qn=ee((kNe,Gz)=>{Gz.exports=window.wp.notices});var gp=ee((vNe,Wz)=>{Wz.exports=window.wp.preferences});var T6=ee((k5e,Mx)=>{var C6={\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"},B6=Object.keys(C6).join("|"),jhe=new RegExp(B6,"g"),Hhe=new RegExp(B6,"");function Uhe(e){return C6[e]}var E6=function(e){return e.replace(jhe,Uhe)},Ghe=function(e){return!!e.match(Hhe)};Mx.exports=E6;Mx.exports.has=Ghe;Mx.exports.remove=E6});var z6=ee((z5e,F6)=>{F6.exports=window.wp.apiFetch});var HL=ee((j5e,j6)=>{j6.exports=window.wp.htmlEntities});var Wk=ee((mDe,aj)=>{aj.exports=window.wp.styleEngine});var nt=ee((fVe,Pj)=>{Pj.exports=window.wp.keycodes});var Ve=ee((OVe,Gj)=>{Gj.exports=window.wp.dom});var $j=ee(rM=>{"use strict";Object.defineProperty(rM,"__esModule",{value:!0});rM.default=Wj;function Wj(){}Wj.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=Nge(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(Mge(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 Mge(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 Nge(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var Yj=ee(Jk=>{"use strict";Object.defineProperty(Jk,"__esModule",{value:!0});Jk.diffChars=Fge;Jk.characterDiff=void 0;var Dge=Vge($j());function Vge(e){return e&&e.__esModule?e:{default:e}}var Kj=new Dge.default;Jk.characterDiff=Kj;function Fge(e,t,o){return Kj.diff(e,t,o)}});var Fs=ee(($Ve,lH)=>{lH.exports=window.React});var uH=ee((KVe,cH)=>{"use strict";var Uge="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";cH.exports=Uge});var pH=ee((YVe,mH)=>{"use strict";var Gge=uH();function dH(){}function fH(){}fH.resetWarningCache=dH;mH.exports=function(){function e(r,n,i,s,a,c){if(c!==Gge){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:fH,resetWarningCache:dH};return o.PropTypes=o,o}});var gH=ee((XVe,hH)=>{hH.exports=pH()();var qVe,ZVe});var kH=ee((uw,bH)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof uw<"u")t(bH,uw);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(uw,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 yH=ee((QVe,vH)=>{var Wge=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};vH.exports=Wge});var SH=ee((JVe,_H)=>{var iM=yH();function $ge(e){var t=iM(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=iM(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=iM(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}_H.exports=$ge});var wH=ee(fl=>{"use strict";var Kge=fl&&fl.__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)}})(),sM=fl&&fl.__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},Yge=fl&&fl.__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};fl.__esModule=!0;var fw=Fs(),ev=gH(),dw=kH(),qge=SH(),Zge=qge,xH="autosize:resized",Xge=(function(e){Kge(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:Zge(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&&dw(o.textarea)}):this.textarea&&dw(this.textarea),this.textarea&&this.textarea.addEventListener(xH,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(xH,this.onResize),dw.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=Yge(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,p=s&&m?m*s:null;return fw.createElement("textarea",sM({},f,{onChange:this.onChange,style:p?sM({},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&&dw.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:ev.number,maxRows:ev.number,onResize:ev.func,innerRef:ev.any,async:ev.bool},t})(fw.Component);fl.TextareaAutosize=fw.forwardRef(function(e,t){return fw.createElement(Xge,sM({},e,{innerRef:t}))})});var lM=ee(aM=>{"use strict";aM.__esModule=!0;var Qge=wH();aM.default=Qge.TextareaAutosize});var tv=ee((n3e,TH)=>{TH.exports=window.wp.warning});var CU=ee((S3e,wU)=>{wU.exports=window.ReactDOM});var rC=ee((rFe,h8)=>{h8.exports=window.wp.blob});var hl=ee((AFe,O8)=>{O8.exports=window.wp.keyboardShortcuts});var TC=ee(()=>{});var IC=ee(()=>{});var lN=ee(()=>{});var P7=ee((Qze,I7)=>{var Ave="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Lve=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},Mve=(e=21)=>{let t="",o=e|0;for(;o--;)t+=Ave[Math.random()*64|0];return t};I7.exports={nanoid:Mve,customAlphabet:Lve}});var cN=ee(()=>{});var R7=ee((t6e,uN)=>{var Se=String,O7=function(){return{isColorSupported:!1,reset:Se,bold:Se,dim:Se,italic:Se,underline:Se,inverse:Se,hidden:Se,strikethrough:Se,black:Se,red:Se,green:Se,yellow:Se,blue:Se,magenta:Se,cyan:Se,white:Se,gray:Se,bgBlack:Se,bgRed:Se,bgGreen:Se,bgYellow:Se,bgBlue:Se,bgMagenta:Se,bgCyan:Se,bgWhite:Se,blackBright:Se,redBright:Se,greenBright:Se,yellowBright:Se,blueBright:Se,magentaBright:Se,cyanBright:Se,whiteBright:Se,bgBlackBright:Se,bgRedBright:Se,bgGreenBright:Se,bgYellowBright:Se,bgBlueBright:Se,bgMagentaBright:Se,bgCyanBright:Se,bgWhiteBright:Se}};uN.exports=O7();uN.exports.createColors=O7});var PC=ee((o6e,M7)=>{"use strict";var A7=R7(),L7=cN(),Pv=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=A7.isColorSupported),L7&&t&&(o=L7(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}=A7.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}};M7.exports=Pv;Pv.default=Pv});var N7=ee(()=>{});var z7=ee((i6e,F7)=>{"use strict";var{SourceMapConsumer:D7,SourceMapGenerator:V7}=TC(),{existsSync:Nve,readFileSync:Dve}=N7(),{dirname:dN,join:Vve}=IC();function Fve(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Ov=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=dN(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new D7(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 Fve(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=dN(t),Nve(t))return this.mapFile=t,Dve(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 D7)return V7.fromSourceMap(o).toString();if(o instanceof V7)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=Vve(dN(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)}};F7.exports=Ov;Ov.default=Ov});var gN=ee((s6e,G7)=>{"use strict";var{SourceMapConsumer:zve,SourceMapGenerator:jve}=TC(),{fileURLToPath:j7,pathToFileURL:OC}=lN(),{isAbsolute:pN,resolve:hN}=IC(),{nanoid:Hve}=P7(),fN=cN(),H7=PC(),Uve=z7(),mN=Symbol("fromOffsetCache"),Gve=!!(zve&&jve),U7=!!(hN&&pN),eh=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&&(!U7||/^\w+:\/\//.test(o.from)||pN(o.from)?this.file=o.from:this.file=hN(o.from)),U7&&Gve){let r=new Uve(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 "+Hve(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 H7(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 H7(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&&(OC&&(i.input.url=OC(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[mN])r=this[mN];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[mN]=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:hN(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;pN(s.source)?c=OC(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||OC(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(j7)u.file=j7(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}};G7.exports=eh;eh.default=eh;fN&&fN.registerInput&&fN.registerInput(eh)});var kN=ee((a6e,Z7)=>{"use strict";var{SourceMapConsumer:$7,SourceMapGenerator:RC}=TC(),{dirname:AC,relative:K7,resolve:Y7,sep:q7}=IC(),{pathToFileURL:W7}=lN(),Wve=gN(),$ve=!!($7&&RC),Kve=!!(AC&&Y7&&K7&&q7),bN=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||AC(t.file),n;this.mapOpts.sourcesContent===!1?(n=new $7(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(),Kve&&$ve&&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=RC.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new RC({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 RC({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?AC(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=AC(Y7(r,this.mapOpts.annotation)));let n=K7(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 Wve(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(W7){let r=W7(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;q7==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};Z7.exports=bN});var vN=ee((l6e,Q7)=>{"use strict";var X7={after:` |
| 12 |
`,beforeClose:` |
| 13 |
`,beforeComment:` |
| 14 |
`,beforeDecl:` |
| 15 |
`,beforeOpen:" ",beforeRule:` |
| 16 |
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Yve(e){return e[0].toUpperCase()+e.slice(1)}var Rv=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 X7[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"+Yve(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=X7[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)}};Q7.exports=Rv;Rv.default=Rv});var LC=ee((c6e,J7)=>{"use strict";var qve=vN();function yN(e,t){new qve(t).stringify(e)}J7.exports=yN;yN.default=yN});var _N=ee((u6e,t9)=>{"use strict";var e9={};t9.exports=function(t){e9[t]||(e9[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var MC=ee((d6e,SN)=>{"use strict";SN.exports.isClean=Symbol("isClean");SN.exports.my=Symbol("my")});var DC=ee((f6e,o9)=>{"use strict";var{isClean:NC,my:Zve}=MC(),Xve=PC(),Qve=vN(),Jve=LC();function xN(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=>xN(s,o)):(i==="object"&&n!==null&&(n=xN(n)),o[r]=n)}return o}var Av=class{constructor(t={}){this.raws={},this[NC]=!1,this[Zve]=!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=xN(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 Xve(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[NC]){this[NC]=!1;let t=this;for(;t=t.parent;)t[NC]=!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 Qve().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=Jve){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}};o9.exports=Av;Av.default=Av});var wN=ee((m6e,r9)=>{"use strict";var eye=DC(),Lv=class extends eye{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]==="$"}};r9.exports=Lv;Lv.default=Lv});var CN=ee((p6e,n9)=>{"use strict";var tye=DC(),Mv=class extends tye{constructor(t){super(t),this.type="comment"}};n9.exports=Mv;Mv.default=Mv});var xf=ee((h6e,m9)=>{"use strict";var{isClean:i9,my:s9}=MC(),a9=wN(),l9=CN(),oye=DC(),c9,BN,EN,u9;function d9(e){return e.map(t=>(t.nodes&&(t.nodes=d9(t.nodes)),delete t.source,t))}function f9(e){if(e[i9]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)f9(t)}var Ji=class e extends oye{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=d9(c9(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 a9(t)]}else if(t.selector)t=[new BN(t)];else if(t.name)t=[new EN(t)];else if(t.text)t=[new l9(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[s9]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[i9]&&f9(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]}};Ji.registerParse=e=>{c9=e};Ji.registerRule=e=>{BN=e};Ji.registerAtRule=e=>{EN=e};Ji.registerRoot=e=>{u9=e};m9.exports=Ji;Ji.default=Ji;Ji.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,EN.prototype):e.type==="rule"?Object.setPrototypeOf(e,BN.prototype):e.type==="decl"?Object.setPrototypeOf(e,a9.prototype):e.type==="comment"?Object.setPrototypeOf(e,l9.prototype):e.type==="root"&&Object.setPrototypeOf(e,u9.prototype),e[s9]=!0,e.nodes&&e.nodes.forEach(t=>{Ji.rebuild(t)})}});var g9=ee((g6e,h9)=>{"use strict";var VC=/[\t\n\f\r "#'()/;[\\\]{}]/g,FC=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,rye=/.[\r\n"'(/\\]/,p9=/[\da-f]/i;h9.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(I){throw t.error("Unclosed "+I,b)}function w(){return y.length===0&&b>=g}function C(I){if(y.length)return y.pop();if(b>=g)return;let R=I?I.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||rye.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:{VC.lastIndex=b+1,VC.test(r),VC.lastIndex===0?s=r.length-1:s=VC.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,p9.test(r.charAt(s)))){for(;p9.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):(FC.lastIndex=b+1,FC.test(r),FC.lastIndex===0?s=r.length-1:s=FC.lastIndex-2,h=["word",r.slice(b,s+1),b,s],k.push(h),b=s);break}}return b++,h}function E(I){y.push(I)}return{back:E,endOfFile:w,nextToken:C,position:v}}});var v9=ee((b6e,k9)=>{"use strict";var b9=xf(),th=class extends b9{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)}};k9.exports=th;th.default=th;b9.registerAtRule(th)});var zC=ee((k6e,x9)=>{"use strict";var y9=xf(),_9,S9,cu=class extends y9{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 _9(new S9,this,t).stringify()}};cu.registerLazyResult=e=>{_9=e};cu.registerProcessor=e=>{S9=e};x9.exports=cu;cu.default=cu;y9.registerRoot(cu)});var C9=ee((v6e,w9)=>{"use strict";var Nv={comma(e){return Nv.split(e,[","],!0)},space(e){let t=[" ",` |
| 24 |
`," "];return Nv.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}};w9.exports=Nv;Nv.default=Nv});var T9=ee((y6e,E9)=>{"use strict";var B9=xf(),nye=C9(),oh=class extends B9{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return nye.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)}};E9.exports=oh;oh.default=oh;B9.registerRule(oh)});var R9=ee((_6e,O9)=>{"use strict";var iye=wN(),sye=g9(),aye=CN(),lye=v9(),cye=zC(),I9=T9(),P9={empty:!0,space:!0};function uye(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var TN=class{constructor(t){this.input=t,this.root=new cye,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 lye;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 aye;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=sye(this.input)}decl(t,o){let r=new iye;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]||uye(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 I9;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",!P9[f]&&!P9[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 I9;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})}};O9.exports=TN});var IN=ee((S6e,A9)=>{"use strict";var dye=xf(),fye=R9(),mye=gN();function jC(e,t){let o=new mye(e,t),r=new fye(o);try{r.parse()}catch(n){throw n}return r.root}A9.exports=jC;jC.default=jC;dye.registerParse(jC)});var M9=ee((x6e,L9)=>{"use strict";var Dv=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}};L9.exports=Dv;Dv.default=Dv});var PN=ee((w6e,N9)=>{"use strict";var pye=M9(),Vv=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 pye(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};N9.exports=Vv;Vv.default=Vv});var V9=ee((B6e,D9)=>{"use strict";var hye=kN(),gye=LC(),C6e=_N(),bye=IN(),kye=PN(),Fv=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=gye;this.result=new kye(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new hye(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=bye;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"}};D9.exports=Fv;Fv.default=Fv});var ON=ee((E6e,j9)=>{"use strict";var vye=xf(),F9,z9,wf=class extends vye{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new F9(new z9,this,t).stringify()}};wf.registerLazyResult=e=>{F9=e};wf.registerProcessor=e=>{z9=e};j9.exports=wf;wf.default=wf});var $9=ee((I6e,W9)=>{"use strict";var{isClean:Ws,my:yye}=MC(),_ye=kN(),Sye=LC(),xye=xf(),wye=ON(),T6e=_N(),H9=PN(),Cye=IN(),Bye=zC(),Eye={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Tye={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},Iye={Once:!0,postcssPlugin:!0,prepare:!0},rh=0;function zv(e){return typeof e=="object"&&typeof e.then=="function"}function G9(e){let t=!1,o=Eye[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,rh,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,rh,o+"Exit"]:[o,o+"Exit"]}function U9(e){let t;return e.type==="document"?t=["Document",rh,"DocumentExit"]:e.type==="root"?t=["Root",rh,"RootExit"]:t=G9(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function RN(e){return e[Ws]=!1,e.nodes&&e.nodes.forEach(t=>RN(t)),e}var AN={},uu=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=RN(o);else if(o instanceof e||o instanceof H9)n=RN(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=Cye;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[yye]&&xye.rebuild(n)}this.result=new H9(t,n,r),this.helpers={...AN,postcss:AN,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(!Tye[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Iye[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(zv(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ws];){t[Ws]=!0;let o=[U9(t)];for(;o.length>0;){let r=this.visitTick(o);if(zv(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 zv(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=Sye;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new _ye(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(zv(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ws];)t[Ws]=!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(zv(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[Ws]){a[Ws]=!0,t.push(U9(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===rh){r.nodes&&r.nodes.length&&(r[Ws]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[Ws]=!0;let o=G9(t);for(let r of o)if(r===rh)t.nodes&&t.each(n=>{n[Ws]||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"}};uu.registerPostcss=e=>{AN=e};W9.exports=uu;uu.default=uu;Bye.registerLazyResult(uu);wye.registerLazyResult(uu)});var Y9=ee((P6e,K9)=>{"use strict";var Pye=V9(),Oye=$9(),Rye=ON(),Aye=zC(),Cf=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 Pye(this,t,o):new Oye(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};K9.exports=Cf;Cf.default=Cf;Aye.registerProcessor(Cf);Rye.registerProcessor(Cf)});var X9=ee((O6e,Z9)=>{Z9.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&&q9(s.source.input.file,n)||i.length&&s.source.input.file&&!q9(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&&Lye(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function q9(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function Lye(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var J9=ee((R6e,Q9)=>{var LN=40,MN=41,HC=39,NN=34,DN=92,nh=47,VN=44,FN=58,UC=42,Mye=117,Nye=85,Dye=43,Vye=/^[a-f0-9?-]+$/i;Q9.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===MN&&g?v=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===VN||m===FN||m===nh&&o.charCodeAt(r+1)!==UC&&(!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===HC||m===NN){r=f,n=m===HC?"'":'"',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)===DN;)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===nh&&o.charCodeAt(f+1)===UC)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===nh||m===UC)&&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===nh||m===VN||m===FN)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(LN===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!==HC&&m!==NN){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===DN;)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(MN===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===DN&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<p&&!(m<=32||m===HC||m===NN||m===VN||m===FN||m===nh||m===LN||m===UC&&b&&b.type==="function"&&b.value==="calc"||m===nh&&b.type==="function"&&b.value==="calc"||m===MN&&g));s=o.slice(f,r),LN===m?k=s:(Mye===s.charCodeAt(0)||Nye===s.charCodeAt(0))&&Dye===s.charCodeAt(1)&&Vye.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 tG=ee((A6e,eG)=>{eG.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 iG=ee((L6e,nG)=>{function oG(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=rG(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function rG(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=oG(e[r],t)+o;return o}return oG(e,t)}nG.exports=rG});var aG=ee((M6e,sG)=>{var GC=45,WC=43,zN=46,Fye=101,zye=69;function jye(e){var t=e.charCodeAt(0),o;if(t===WC||t===GC){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===zN&&r>=48&&r<=57}return t===zN?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}sG.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!jye(e))return!1;for(r=e.charCodeAt(t),(r===WC||r===GC)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===zN&&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===Fye||r===zye)&&(n>=48&&n<=57||(n===WC||n===GC)&&i>=48&&i<=57))for(t+=n===WC||n===GC?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 dG=ee((N6e,uG)=>{var Hye=J9(),lG=tG(),cG=iG();function du(e){return this instanceof du?(this.nodes=Hye(e),this):new du(e)}du.prototype.toString=function(){return Array.isArray(this.nodes)?cG(this.nodes):""};du.prototype.walk=function(e,t){return lG(this.nodes,e,t),this};du.unit=aG();du.walk=lG;du.stringify=cG;uG.exports=du});var mG=ee((D6e,jN)=>{var fG=dG();jN.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=fG(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=fG.stringify(n))}}};jN.exports.postcss=!0});var BG=ee((X6e,CG)=>{CG.exports=window.wp.priorityQueue});var ny=ee((l7e,T$)=>{T$.exports=window.wp.isShallowEqual});var QB=ee((N$e,Eq)=>{Eq.exports=window.wp.tokenList});var aD=ee((Y$e,Hq)=>{"use strict";var kxe=function(t){return vxe(t)&&!yxe(t)};function vxe(e){return!!e&&typeof e=="object"}function yxe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||xxe(e)}var _xe=typeof Symbol=="function"&&Symbol.for,Sxe=_xe?Symbol.for("react.element"):60103;function xxe(e){return e.$$typeof===Sxe}function wxe(e){return Array.isArray(e)?[]:{}}function Ey(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Kh(wxe(e),e,t):e}function Cxe(e,t,o){return e.concat(t).map(function(r){return Ey(r,o)})}function Bxe(e,t){if(!t.customMerge)return Kh;var o=t.customMerge(e);return typeof o=="function"?o:Kh}function Exe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function zq(e){return Object.keys(e).concat(Exe(e))}function jq(e,t){try{return t in e}catch{return!1}}function Txe(e,t){return jq(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Ixe(e,t,o){var r={};return o.isMergeableObject(e)&&zq(e).forEach(function(n){r[n]=Ey(e[n],o)}),zq(t).forEach(function(n){Txe(e,n)||(jq(e,n)&&o.isMergeableObject(t[n])?r[n]=Bxe(n,o)(e[n],t[n],o):r[n]=Ey(t[n],o))}),r}function Kh(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||Cxe,o.isMergeableObject=o.isMergeableObject||kxe,o.cloneUnlessOtherwiseSpecified=Ey;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):Ixe(e,t,o):Ey(t,o)}Kh.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return Kh(r,n,o)},{})};var Pxe=Kh;Hq.exports=Pxe});var qZ=ee((fqe,YZ)=>{YZ.exports=window.wp.commands});var rm=ee((LQe,sJ)=>{sJ.exports=window.wp.date});var DJ=ee((bJe,NJ)=>{var OJ=!1,im,eV,tV,uT,dT,RJ,fT,oV,rV,nV,AJ,iV,sV,LJ,MJ;function cn(){if(!OJ){OJ=!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(iV=/\b(iPhone|iP[ao]d)/.exec(e),sV=/\b(iP[ao]d)/.exec(e),nV=/Android/i.exec(e),LJ=/FBAN\/\w+;/i.exec(e),MJ=/Mobile/i.exec(e),AJ=!!/Win64/.exec(e),t){im=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,im&&document&&document.documentMode&&(im=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);RJ=r?parseFloat(r[1])+4:im,eV=t[2]?parseFloat(t[2]):NaN,tV=t[3]?parseFloat(t[3]):NaN,uT=t[4]?parseFloat(t[4]):NaN,uT?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),dT=t&&t[1]?parseFloat(t[1]):NaN):dT=NaN}else im=eV=tV=dT=uT=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);fT=n?parseFloat(n[1].replace("_",".")):!0}else fT=!1;oV=!!o[2],rV=!!o[3]}else fT=oV=rV=!1}}var aV={ie:function(){return cn()||im},ieCompatibilityMode:function(){return cn()||RJ>im},ie64:function(){return aV.ie()&&AJ},firefox:function(){return cn()||eV},opera:function(){return cn()||tV},webkit:function(){return cn()||uT},safari:function(){return aV.webkit()},chrome:function(){return cn()||dT},windows:function(){return cn()||oV},osx:function(){return cn()||fT},linux:function(){return cn()||rV},iphone:function(){return cn()||iV},mobile:function(){return cn()||iV||sV||nV||MJ},nativeApp:function(){return cn()||LJ},android:function(){return cn()||nV},ipad:function(){return cn()||sV}};NJ.exports=aV});var FJ=ee((kJe,VJ)=>{"use strict";var mT=!!(typeof window<"u"&&window.document&&window.document.createElement),vCe={canUseDOM:mT,canUseWorkers:typeof Worker<"u",canUseEventListeners:mT&&!!(window.addEventListener||window.attachEvent),canUseViewport:mT&&!!window.screen,isInWorker:!mT};VJ.exports=vCe});var UJ=ee((vJe,HJ)=>{"use strict";var zJ=FJ(),jJ;zJ.canUseDOM&&(jJ=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function yCe(e,t){if(!zJ.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&&jJ&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}HJ.exports=yCe});var qJ=ee((yJe,YJ)=>{"use strict";var _Ce=DJ(),SCe=UJ(),GJ=10,WJ=40,$J=800;function KJ(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*GJ,n=o*GJ,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=WJ,n*=WJ):(r*=$J,n*=$J)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}KJ.getEventType=function(){return _Ce.firefox()?"DOMMouseScroll":SCe("wheel")?"wheel":"mousewheel"};YJ.exports=KJ});var XJ=ee((_Je,ZJ)=>{ZJ.exports=qJ()});var Ete=ee((utt,Bte)=>{"use strict";Bte.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 D2e={};Os(D2e,{AlignmentControl:()=>Lx,AlignmentToolbar:()=>w6,Autocomplete:()=>Z6,BlockAlignmentControl:()=>Qx,BlockAlignmentToolbar:()=>kj,BlockBindingsAttributeControl:()=>qk,BlockBindingsSourceFieldsList:()=>Yk,BlockBreadcrumb:()=>jj,BlockCanvas:()=>JZ,BlockColorsStyleSelector:()=>rX,BlockContextProvider:()=>uS,BlockControls:()=>ut,BlockEdit:()=>Ex,BlockEditorKeyboardShortcuts:()=>dC,BlockEditorProvider:()=>z8,BlockFormatControls:()=>D5,BlockIcon:()=>Te,BlockInspector:()=>hle,BlockList:()=>sh,BlockMover:()=>fB,BlockNavigationDropdown:()=>mQ,BlockPopover:()=>m$,BlockPreview:()=>en,BlockSelectionClearer:()=>U8,BlockSettingsMenu:()=>WB,BlockSettingsMenuControls:()=>zB,BlockStyles:()=>mg,BlockTitle:()=>Xk,BlockToolbar:()=>LZ,BlockTools:()=>My,BlockVerticalAlignmentControl:()=>Yx,BlockVerticalAlignmentToolbar:()=>NQ,ButtonBlockAppender:()=>Su,ButtonBlockerAppender:()=>r$,ColorPalette:()=>eJ,ColorPaletteControl:()=>rJ,ContrastChecker:()=>$E,CopyHandler:()=>kle,DefaultBlockAppender:()=>xh,FontSizePicker:()=>AL,HeadingLevelDropdown:()=>wQ,HeightControl:()=>Ky,InnerBlocks:()=>sy,Inserter:()=>ai,InspectorAdvancedControls:()=>Eu,InspectorControls:()=>pe,JustifyContentControl:()=>Bp,JustifyToolbar:()=>zee,LineHeightControl:()=>LT,LinkControl:()=>Lg,MediaPlaceholder:()=>loe,MediaReplaceFlow:()=>Mg,MediaUpload:()=>vu,MediaUploadCheck:()=>ns,MultiSelectScrollIntoView:()=>Sle,NavigableToolbar:()=>Hh,ObserveTyping:()=>Y$,PanelColorSettings:()=>uoe,PlainText:()=>ure,RecursionProvider:()=>n4,RichText:()=>Fg,RichTextShortcut:()=>WV,RichTextToolbarButton:()=>KV,SETTINGS_DEFAULTS:()=>Xb,SkipToSelectedBlock:()=>dI,ToolSelector:()=>Mle,Typewriter:()=>Ble,URLInput:()=>Xu,URLInputButton:()=>vre,URLPopover:()=>td,Warning:()=>Dc,WritingFlow:()=>wC,__experimentalBlockAlignmentMatrixControl:()=>Aj,__experimentalBlockFullHeightAligmentControl:()=>Ij,__experimentalBlockPatternSetup:()=>LQ,__experimentalBlockPatternsList:()=>Ks,__experimentalBlockVariationPicker:()=>CQ,__experimentalBlockVariationTransforms:()=>FE,__experimentalBorderRadiusControl:()=>GE,__experimentalColorGradientControl:()=>Wu,__experimentalColorGradientSettingsDropdown:()=>aT,__experimentalDateFormatPicker:()=>aJ,__experimentalDuotoneControl:()=>YE,__experimentalFontAppearanceControl:()=>XE,__experimentalFontFamilyControl:()=>QE,__experimentalGetBorderClassesAndStyles:()=>O2,__experimentalGetColorClassesAndStyles:()=>R2,__experimentalGetElementClassName:()=>M2e,__experimentalGetGapCSSValue:()=>Er,__experimentalGetGradientClass:()=>_p,__experimentalGetGradientObjectByGradientValue:()=>p6,__experimentalGetShadowClassesAndStyles:()=>tF,__experimentalGetSpacingClassesAndStyles:()=>nF,__experimentalImageEditor:()=>Aee,__experimentalImageSizeControl:()=>Dee,__experimentalImageURLInputUI:()=>Bre,__experimentalInspectorPopoverHeader:()=>e2,__experimentalLetterSpacingControl:()=>eT,__experimentalLibrary:()=>yle,__experimentalLinkControl:()=>AT,__experimentalLinkControlSearchInput:()=>dte,__experimentalLinkControlSearchItem:()=>Qee,__experimentalLinkControlSearchResults:()=>nte,__experimentalListView:()=>LE,__experimentalPanelColorGradientSettings:()=>cT,__experimentalPreviewOptions:()=>jre,__experimentalPublishDateTimePicker:()=>Ole,__experimentalRecursionProvider:()=>Ele,__experimentalResponsiveBlockControl:()=>hre,__experimentalSpacingSizesControl:()=>qg,__experimentalTextDecorationControl:()=>oT,__experimentalTextTransformControl:()=>nT,__experimentalUnitControl:()=>bre,__experimentalUseBlockOverlayActive:()=>Uj,__experimentalUseBlockPreview:()=>OG,__experimentalUseBorderProps:()=>eF,__experimentalUseColorProps:()=>rF,__experimentalUseCustomSides:()=>P4,__experimentalUseGradient:()=>The,__experimentalUseHasRecursion:()=>Tle,__experimentalUseMultipleOriginColorsAndGradients:()=>Ku,__experimentalUseResizeCanvas:()=>Hre,__experimentalWritingModeControl:()=>sT,__unstableBlockSettingsMenuFirstItem:()=>SB,__unstableBlockToolbarLastItem:()=>bB,__unstableEditorStyles:()=>kl,__unstableIframe:()=>Jp,__unstableInserterMenuExtension:()=>b1,__unstableRichTextInputEvent:()=>YV,__unstableUseBlockSelectionClearer:()=>gl,__unstableUseClipboardHandler:()=>ble,__unstableUseMouseMoveTypingReset:()=>ly,__unstableUseTypewriter:()=>t4,__unstableUseTypingObserver:()=>cy,createCustomColorsHOC:()=>f6,getColorClassName:()=>Hn,getColorObjectByAttributeValues:()=>Rs,getColorObjectByColorValue:()=>lS,getComputedFluidTypographyValue:()=>b6,getCustomValueFromPreset:()=>Kx,getFontSize:()=>Sp,getFontSizeClass:()=>Vc,getFontSizeObjectByValue:()=>RL,getGradientSlugByValue:()=>h6,getGradientValueBySlug:()=>Rx,getPxFromCssUnit:()=>_ue,getSpacingPresetCssVar:()=>Gk,getTypographyClassesAndStyles:()=>iF,isValueSpacingPreset:()=>al,privateApis:()=>mF,store:()=>_,storeConfig:()=>kp,transformStyles:()=>Bf,useBlockBindingsUtils:()=>cl,useBlockCommands:()=>gE,useBlockDisplayInformation:()=>mt,useBlockEditContext:()=>Ae,useBlockEditingMode:()=>$o,useBlockProps:()=>vv,useCachedTruthy:()=>sF,useHasRecursion:()=>i4,useInnerBlocksProps:()=>zf,useSetting:()=>l6,useSettings:()=>fe,useStyleOverride:()=>is,withColorContext:()=>WE,withColors:()=>m6,withFontSizes:()=>S6});var Nle=l(K()),Pi=l(O()),r2=l(V()),c4=l(q()),D_=l(ot());var oS=l(O()),vc=Symbol("mayDisplayControls"),Ym=Symbol("mayDisplayParentControls"),rS=Symbol("blockEditingMode"),qm=Symbol("blockBindings"),nS=Symbol("isPreviewMode"),j2={name:"",isSelected:!1},H2=(0,oS.createContext)(j2);H2.displayName="BlockEditContext";var{Provider:iS}=H2;function Ae(){return(0,oS.useContext)(H2)}var $ue={grad:.9,turn:360,rad:360/(2*Math.PI)},Wa=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Lo=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},jn=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},EF=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},yF=function(e){return{r:jn(e.r,0,255),g:jn(e.g,0,255),b:jn(e.b,0,255),a:jn(e.a)}},U2=function(e){return{r:Lo(e.r),g:Lo(e.g),b:Lo(e.b),a:Lo(e.a,3)}},Kue=/^#([0-9a-f]{3,8})$/i,sS=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},TF=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}},IF=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}},_F=function(e){return{h:EF(e.h),s:jn(e.s,0,100),l:jn(e.l,0,100),a:jn(e.a)}},SF=function(e){return{h:Lo(e.h),s:Lo(e.s),l:Lo(e.l),a:Lo(e.a,3)}},xF=function(e){return IF((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},Kb=function(e){return{h:(t=TF(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},Yue=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,que=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zue=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xue=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,$2={string:[[function(e){var t=Kue.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?Lo(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?Lo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Zue.exec(e)||Xue.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:yF({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=Yue.exec(e)||que.exec(e);if(!t)return null;var o,r,n=_F({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*($ue[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return xF(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 Wa(t)&&Wa(o)&&Wa(r)?yF({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(!Wa(t)||!Wa(o)||!Wa(r))return null;var s=_F({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return xF(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!Wa(t)||!Wa(o)||!Wa(r))return null;var s=(function(a){return{h:EF(a.h),s:jn(a.s,0,100),v:jn(a.v,0,100),a:jn(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return IF(s)},"hsv"]]},wF=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]},Que=function(e){return typeof e=="string"?wF(e.trim(),$2.string):typeof e=="object"&&e!==null?wF(e,$2.object):[null,void 0]};var G2=function(e,t){var o=Kb(e);return{h:o.h,s:jn(o.s+100*t,0,100),l:o.l,a:o.a}},W2=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},CF=function(e,t){var o=Kb(e);return{h:o.h,s:o.s,l:jn(o.l+100*t,0,100),a:o.a}},K2=(function(){function e(t){this.parsed=Que(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 Lo(W2(this.rgba),2)},e.prototype.isDark=function(){return W2(this.rgba)<.5},e.prototype.isLight=function(){return W2(this.rgba)>=.5},e.prototype.toHex=function(){return t=U2(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?sS(Lo(255*i)):"","#"+sS(o)+sS(r)+sS(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return U2(this.rgba)},e.prototype.toRgbString=function(){return t=U2(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 SF(Kb(this.rgba))},e.prototype.toHslString=function(){return t=SF(Kb(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=TF(this.rgba),{h:Lo(t.h),s:Lo(t.s),v:Lo(t.v),a:Lo(t.a,3)};var t},e.prototype.invert=function(){return ct({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),ct(G2(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),ct(G2(this.rgba,-t))},e.prototype.grayscale=function(){return ct(G2(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),ct(CF(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),ct(CF(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"?ct({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):Lo(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=Kb(this.rgba);return typeof t=="number"?ct({h:t,s:o.s,l:o.l,a:o.a}):Lo(o.h)},e.prototype.isEqual=function(t){return this.toHex()===ct(t).toHex()},e})(),ct=function(e){return e instanceof K2?e:new K2(e)},BF=[],yc=function(e){e.forEach(function(t){BF.indexOf(t)<0&&(t(K2,$2),BF.push(t))})};function _c(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 Y2=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},q2=function(e){return .2126*Y2(e.r)+.7152*Y2(e.g)+.0722*Y2(e.b)};function Zm(e){e.prototype.luminance=function(){return t=q2(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=q2(i),c=q2(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 LF=l(A());var RF=l(aS()),{lock:AF,unlock:j}=(0,RF.__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");yc([_c,Zm]);var{kebabCase:Jue}=j(LF.privateApis),Rs=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},lS=(e,t)=>e?.find(o=>o.color===t);function Hn(e,t){if(!(!e||!t))return`has-${Jue(t)}-${e}`}function MF(e,t){let o=ct(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var Tx=l(O()),sf=l(q()),u6=l(A());var s6=l(V()),a6=l(Oe());var Bx=l(O()),OL=l(K());function DF(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=DF(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function ede(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=DF(e))&&(r&&(r+=" "),r+=t);return r}var F=ede;var $a=l(K()),WF=l(A()),Zb=l(V()),Fd=l(O());var Xm=l(O()),FF=l(x()),cS=(0,Xm.createContext)({});cS.displayName="BlockContext";function uS({value:e,children:t}){let o=(0,Xm.useContext)(cS),r=(0,Xm.useMemo)(()=>({...o,...e}),[o,e]);return(0,FF.jsx)(cS.Provider,{value:r,children:t})}var Un=cS;var Qm=l($r());function Yb(e){if(e.includes(" "))return!1;let o=(0,Qm.getProtocol)(e),r=(0,Qm.isValidProtocol)(o),n=tde(e),i=e?.startsWith("www."),s=e?.startsWith("#")&&(0,Qm.isValidFragment)(e);return r||i||s||n}function tde(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var ode="__default",jF="core/pattern-overrides";function qb(e){return e?.[ode]?.source===jF}function HF(e,t){if(qb(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:jF};o[r]=n}return o}return e}var UF=l(O()),hn=(0,UF.createContext)({});hn.displayName="PrivateBlockContext";var dS=l(x()),rde={},nde=e=>{let{name:t}=e,o=(0,$a.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,dS.jsx)(r,{...e})},GF=(0,WF.withFilters)("editor.BlockEdit")(nde),ide=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,Zb.useRegistry)(),s=(0,$a.getBlockType)(t),a=(0,Fd.useContext)(Un),c=(0,Zb.useSelect)(k=>j(k($a.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,Fd.useContext)(hn),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,Fd.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:HF(r?.metadata?.bindings,u),context:k,hasPatternOverrides:qb(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),p=(0,Zb.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,I=c[C];!I||!u?.includes(S)||v.set(I,{...v.get(I),[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,I]of Object.entries(C))E==="url"&&(!I||!Yb(I))?y[E]=null:y[E]=I}return{...r,...y}},[r,u,d,o,f,c]),h=(0,Fd.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],I=c[E?.source];I?.setValues&&(v.set(I,{...v.get(I),[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.caption,delete y.href),n(y))})},[u,d,o,f,m,n,c,i]);if(!s)return null;if(s.apiVersion>1)return(0,dS.jsx)(GF,{...e,attributes:p,context:f,setAttributes:h});let g=(0,$a.hasBlockSupport)(s,"className",!0)?(0,$a.getBlockDefaultClassName)(t):null,b=F(g,r?.className,e.className);return(0,dS.jsx)(GF,{...e,attributes:p,className:b,context:f,setAttributes:h})},$F=ide;var r6=l(K()),PL=l(A()),n6=l(V()),Cx=l(M());var wx=l(V());var ek=l(zd()),eO=l(q()),tk=l(V()),XF=l(Oe()),yS=l(K());var Le=l(M()),qF={insertUsage:{}},Xb={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 fS(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function mS(e,t,o,r=1){let n=[...e];return n.splice(t,r),fS(n,e.slice(t,t+r),o)}var As=Symbol("globalStylesDataKey"),pS=Symbol("globalStylesLinks"),Sc=Symbol("selectBlockPatternsKey"),hS=Symbol("reusableBlocksSelect"),xc=Symbol("sectionRootClientIdKey"),gS=Symbol("mediaEditKey"),bS=Symbol("getMediaSelect"),kS=Symbol("essentialFormat"),Jm=Symbol("isIsolatedEditor");var{isContentBlock:sde}=j(yS.privateApis),ade=e=>e;function Jb(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),Jb(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function vS(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 QF(e,t=ade){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 lde(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function Z2(e){return QF(e,t=>{let{attributes:o,...r}=t;return r})}function X2(e){return QF(e,t=>t.attributes)}function cde(e,t){return(0,ek.default)(Object.keys(e),Object.keys(t))}function ude(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,ek.default)(e.clientIds,t.clientIds)&&cde(e.attributes,t.attributes)}function Q2(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 Ka(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 dde=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),Q2(r,o.blocks),Ka(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)}),Ka(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)})}),Ka(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=lde(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),Q2(r,o.blocks),Ka(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)}Ka(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)}),Ka(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),Ka(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),Ka(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})}),Ka(r,i,!1)}}return r};function fde(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:!ude(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function mde(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 pde=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)},hde=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r={...t,byClientId:new Map(Z2(o.blocks)),attributes:new Map(X2(o.blocks)),order:Jb(o.blocks),parents:new Map(vS(o.blocks)),controlledInnerBlocks:{}};return r.tree=new Map(t?.tree),Q2(r,o.blocks),r.tree.set("",{innerBlocks:o.blocks.map(n=>r.tree.get(n.clientId))}),r}return e(t,o)},gde=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},bde=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)},vde=(0,eO.pipe)(tk.combineReducers,bde,dde,pde,gde,hde,fde,mde,kde)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return Z2(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)}),Z2(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 X2(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)}),X2(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=Jb(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=Jb(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,fS(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,mS(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,fS(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,mS(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,mS(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=Jb(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 vS(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return vS(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)}),vS(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 _de(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function Sde(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function xde(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function wde(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function ZF(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 Cde(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=ZF(e.selectionStart,t),r=ZF(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function Bde(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function Ede(e=!0,t){switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e}function Tde(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 Ide(e=!1,t){switch(t.type){case"SET_BLOCK_REMOVAL_RULES":return t.rules}return e}function Pde(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 Ode(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 Rde(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,ek.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function Ade(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e}function Lde(e=Xb,t){switch(t.type){case"UPDATE_SETTINGS":{let o=t.reset?{...Xb,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,XF.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}}return e}function Mde(e=qF,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,tk.select)(yS.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 Nde=(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,ek.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 Dde(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 Vde(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 Fde(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 zde(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 jde(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 Hde(e,t){return t.type==="EDIT_CONTENT_ONLY_SECTION"?t.clientId:e}function Ude(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 Gde(e=null,t){return t.type==="SET_OPENED_BLOCK_SETTINGS_MENU"?t?.clientId??null:e}function Wde(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 $de(e=[],t){switch(t.type){case"REGISTER_INSERTER_MEDIA_CATEGORY":return[...e,t.category]}return e}function Kde(e=!1,t){switch(t.type){case"LAST_FOCUS":return t.lastFocus}return e}function Yde(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function qde(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}var Zde=(0,tk.combineReducers)({blocks:vde,isDragging:Sde,isTyping:_de,isBlockInterfaceHidden:yde,draggedBlocks:xde,selection:Cde,isMultiSelecting:Bde,isSelectionEnabled:Ede,initialPosition:Pde,blocksMode:Ode,blockListSettings:Nde,insertionPoint:qde,insertionCue:Rde,template:Ade,settings:Lde,preferences:Mde,lastBlockAttributesChange:Dde,lastFocus:Kde,expandedBlock:zde,highlightedBlock:Vde,lastBlockInserted:jde,editedContentOnlySection:Hde,blockVisibility:wde,blockEditingModes:Ude,styleOverrides:Wde,removalPromptData:Tde,blockRemovalRules:Ide,openedBlockSettingsMenu:Gde,registeredInserterMediaCategories:$de,zoomLevel:Yde,hasBlockSpotlight:Fde});function JF(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 tO(e,t,o){let r=JF(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)tO(e,n.clientId,o)}function Qb(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 Xde(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function J2(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[xc],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?.[Jm],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 tO(e,t,p=>{let{clientId:h,name:g}=p;if(e.editedContentOnlySection){if(e.editedContentOnlySection===h){r.set(h,"default");return}if(Qb(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(Qb(e,h,c)){r.set(h,"disabled");return}return}let b=Qb(e,h,c);if(b){if(Qb(e,b,c)){r.set(h,"disabled");return}if(Xde(p)){r.set(h,"contentOnly");return}r.set(h,"disabled")}}m.length&&Qb(e,h,m)&&(sde(g)?r.set(h,"contentOnly"):r.set(h,"disabled"))}}),r}function wc({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{tO(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=J2(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function Qde(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=wc({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=wc({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=wc({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=wc({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=JF(r,o.clientId);if(!n)break;let i=wc({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=wc({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=wc({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=wc({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[xc]!==r?.settings?.[xc])return{...r,derivedBlockEditingModes:J2(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:J2(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function Jde(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 ez=(0,eO.pipe)(Qde,Jde)(Zde);var xL={};Os(xL,{__experimentalGetActiveBlockIdByBlockNames:()=>Kme,__experimentalGetAllowedBlocks:()=>Ome,__experimentalGetAllowedPatterns:()=>Mme,__experimentalGetBlockListSettingsForBlocks:()=>zme,__experimentalGetDirectInsertBlock:()=>Rme,__experimentalGetGlobalBlocksByName:()=>Hfe,__experimentalGetLastBlockAttributeChanges:()=>Ume,__experimentalGetParsedPattern:()=>Ame,__experimentalGetPatternTransformItems:()=>Vme,__experimentalGetPatternsByBlockTypes:()=>Dme,__experimentalGetReusableBlockTitle:()=>jme,__unstableGetBlockWithoutInnerBlocks:()=>Ffe,__unstableGetClientIdWithClientIdsTree:()=>_z,__unstableGetClientIdsTree:()=>Sz,__unstableGetContentLockingParent:()=>tpe,__unstableGetSelectedBlocksWithPartialSelection:()=>ume,__unstableGetTemporarilyEditingAsBlocks:()=>ope,__unstableGetVisibleBlocks:()=>Xme,__unstableHasActiveBlockOverlayActive:()=>Dz,__unstableIsFullySelected:()=>sme,__unstableIsLastBlockChangeIgnored:()=>Hme,__unstableIsSelectionCollapsed:()=>ame,__unstableIsSelectionMergeable:()=>cme,__unstableIsWithinBlockOverlay:()=>Qme,__unstableSelectionHasUnmergeableBlock:()=>lme,areInnerBlocksControlled:()=>_x,canEditBlock:()=>Lz,canInsertBlockType:()=>of,canInsertBlocks:()=>wme,canLockBlockType:()=>Bme,canMoveBlock:()=>Az,canMoveBlocks:()=>Cme,canRemoveBlock:()=>kL,canRemoveBlocks:()=>Rz,didAutomaticChange:()=>Wme,getAdjacentBlockClientId:()=>pL,getAllowedBlocks:()=>dL,getBlock:()=>nl,getBlockAttributes:()=>Kn,getBlockCount:()=>Gfe,getBlockEditingMode:()=>Yn,getBlockHierarchyRootClientId:()=>Zfe,getBlockIndex:()=>Ez,getBlockInsertionPoint:()=>yme,getBlockListSettings:()=>SL,getBlockMode:()=>hme,getBlockName:()=>so,getBlockNamesByClientId:()=>Ufe,getBlockOrder:()=>Yr,getBlockParents:()=>tl,getBlockParentsByBlockName:()=>mL,getBlockRootClientId:()=>go,getBlockSelectionEnd:()=>$fe,getBlockSelectionStart:()=>Wfe,getBlockTransformItems:()=>Ime,getBlocks:()=>zfe,getBlocksByClientId:()=>yx,getBlocksByName:()=>wz,getClientIdsOfDescendants:()=>xz,getClientIdsWithDescendants:()=>fp,getDirectInsertBlock:()=>Nz,getDraggedBlockClientIds:()=>bme,getFirstMultiSelectedBlockClientId:()=>hL,getGlobalBlockCount:()=>jfe,getHoveredBlockClientId:()=>Zme,getInserterItems:()=>Tme,getLastMultiSelectedBlockClientId:()=>Cz,getLowestCommonAncestorWithSelectedBlock:()=>Xfe,getMultiSelectedBlockClientIds:()=>Lc,getMultiSelectedBlocks:()=>tme,getMultiSelectedBlocksEndClientId:()=>ime,getMultiSelectedBlocksStartClientId:()=>nme,getNextBlockClientId:()=>Jfe,getPatternsByBlockTypes:()=>Nme,getPreviousBlockClientId:()=>Qfe,getSelectedBlock:()=>qfe,getSelectedBlockClientId:()=>pp,getSelectedBlockClientIds:()=>hp,getSelectedBlockCount:()=>Kfe,getSelectedBlocksInitialCaretPosition:()=>eme,getSelectionEnd:()=>Mk,getSelectionStart:()=>Lk,getSettings:()=>Oc,getTemplate:()=>xme,getTemplateLock:()=>Ls,hasBlockMovingClientId:()=>Gme,hasDraggedInnerBlock:()=>Pz,hasInserterItems:()=>Pme,hasMultiSelection:()=>fme,hasSelectedBlock:()=>Yfe,hasSelectedInnerBlock:()=>Iz,isAncestorBeingDragged:()=>kme,isAncestorMultiSelected:()=>rme,isBlockBeingDragged:()=>gL,isBlockHighlighted:()=>$me,isBlockInsertionPointVisible:()=>_me,isBlockMultiSelected:()=>Bz,isBlockSelected:()=>Tz,isBlockValid:()=>Vfe,isBlockVisible:()=>qme,isBlockWithinSelection:()=>dme,isCaretWithinFormattedText:()=>vme,isDraggingBlocks:()=>Oz,isFirstMultiSelectedBlock:()=>ome,isGroupable:()=>epe,isLastBlockChangePersistent:()=>Fme,isMultiSelecting:()=>mme,isSelectionEnabled:()=>pme,isTyping:()=>gme,isUngroupable:()=>Jme,isValidTemplate:()=>Sme,wasBlockJustInserted:()=>Yme});var De=l(K()),kz=l(O()),vz=l(ot());var _S=l(O()),Ie=(0,_S.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,_S.cloneElement)(e,{width:t,height:t,...o,ref:r}));var SS=l(Y()),oO=l(x()),jd=(0,oO.jsx)(SS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oO.jsx)(SS.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var xS=l(Y()),rO=l(x()),nO=(0,rO.jsx)(xS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rO.jsx)(xS.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var wS=l(Y()),iO=l(x()),Cc=(0,iO.jsx)(wS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iO.jsx)(wS.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var CS=l(Y()),sO=l(x()),Hd=(0,sO.jsx)(CS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sO.jsx)(CS.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var BS=l(Y()),aO=l(x()),Bc=(0,aO.jsx)(BS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aO.jsx)(BS.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var ES=l(Y()),lO=l(x()),cO=(0,lO.jsx)(ES.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lO.jsx)(ES.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 TS=l(Y()),uO=l(x()),Ud=(0,uO.jsx)(TS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uO.jsx)(TS.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var IS=l(Y()),dO=l(x()),Gd=(0,dO.jsx)(IS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dO.jsx)(IS.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 PS=l(Y()),fO=l(x()),mO=(0,fO.jsx)(PS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fO.jsx)(PS.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 OS=l(Y()),pO=l(x()),hO=(0,pO.jsx)(OS.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,pO.jsx)(OS.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 RS=l(Y()),gO=l(x()),bO=(0,gO.jsx)(RS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gO.jsx)(RS.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 AS=l(Y()),kO=l(x()),vO=(0,kO.jsx)(AS.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,kO.jsx)(AS.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 LS=l(Y()),yO=l(x()),Ya=(0,yO.jsx)(LS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yO.jsx)(LS.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var MS=l(Y()),_O=l(x()),Fi=(0,_O.jsx)(MS.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_O.jsx)(MS.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var NS=l(Y()),SO=l(x()),ok=(0,SO.jsx)(NS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SO.jsx)(NS.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var DS=l(Y()),xO=l(x()),wr=(0,xO.jsx)(DS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xO.jsx)(DS.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var VS=l(Y()),wO=l(x()),Ec=(0,wO.jsx)(VS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wO.jsx)(VS.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 FS=l(Y()),CO=l(x()),qo=(0,CO.jsx)(FS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CO.jsx)(FS.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var zS=l(Y()),BO=l(x()),Wd=(0,BO.jsx)(zS.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,BO.jsx)(zS.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var jS=l(Y()),EO=l(x()),$d=(0,EO.jsx)(jS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EO.jsx)(jS.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 HS=l(Y()),TO=l(x()),IO=(0,TO.jsx)(HS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TO.jsx)(HS.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 US=l(Y()),PO=l(x()),OO=(0,PO.jsx)(US.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PO.jsx)(US.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 GS=l(Y()),RO=l(x()),Kd=(0,RO.jsx)(GS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RO.jsx)(GS.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 WS=l(Y()),AO=l(x()),LO=(0,AO.jsx)(WS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AO.jsx)(WS.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 Yd=l(Y()),ep=l(x()),MO=(0,ep.jsxs)(Yd.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ep.jsx)(Yd.G,{opacity:".25",children:(0,ep.jsx)(Yd.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,ep.jsx)(Yd.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 qd=l(Y()),tp=l(x()),NO=(0,tp.jsxs)(qd.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,tp.jsx)(qd.G,{opacity:".25",children:(0,tp.jsx)(qd.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,tp.jsx)(qd.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 Zd=l(Y()),op=l(x()),DO=(0,op.jsxs)(Zd.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,op.jsx)(Zd.G,{opacity:".25",children:(0,op.jsx)(Zd.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,op.jsx)(Zd.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 Xd=l(Y()),rp=l(x()),VO=(0,rp.jsxs)(Xd.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,rp.jsx)(Xd.G,{opacity:".25",children:(0,rp.jsx)(Xd.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,rp.jsx)(Xd.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 $S=l(Y()),FO=l(x()),rk=(0,FO.jsx)($S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FO.jsx)($S.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var KS=l(Y()),zO=l(x()),jO=(0,zO.jsx)(KS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zO.jsx)(KS.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 YS=l(Y()),HO=l(x()),UO=(0,HO.jsx)(YS.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,HO.jsx)(YS.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 qS=l(Y()),GO=l(x()),WO=(0,GO.jsx)(qS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GO.jsx)(qS.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 ZS=l(Y()),$O=l(x()),KO=(0,$O.jsx)(ZS.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$O.jsx)(ZS.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 XS=l(Y()),YO=l(x()),qO=(0,YO.jsx)(XS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YO.jsx)(XS.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var QS=l(Y()),ZO=l(x()),XO=(0,ZO.jsx)(QS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZO.jsx)(QS.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 JS=l(Y()),QO=l(x()),JO=(0,QO.jsx)(JS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QO.jsx)(JS.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 e0=l(Y()),eR=l(x()),tR=(0,eR.jsx)(e0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eR.jsx)(e0.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 t0=l(Y()),oR=l(x()),rR=(0,oR.jsx)(t0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oR.jsx)(t0.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 o0=l(Y()),nR=l(x()),iR=(0,nR.jsx)(o0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nR.jsx)(o0.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 r0=l(Y()),sR=l(x()),np=(0,sR.jsx)(r0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sR.jsx)(r0.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 n0=l(Y()),aR=l(x()),nk=(0,aR.jsx)(n0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aR.jsx)(n0.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 i0=l(Y()),lR=l(x()),ik=(0,lR.jsx)(i0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lR.jsx)(i0.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 s0=l(Y()),cR=l(x()),sk=(0,cR.jsx)(s0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,cR.jsx)(s0.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 a0=l(Y()),uR=l(x()),dR=(0,uR.jsx)(a0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uR.jsx)(a0.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var l0=l(Y()),fR=l(x()),mR=(0,fR.jsx)(l0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fR.jsx)(l0.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 c0=l(Y()),pR=l(x()),hR=(0,pR.jsx)(c0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pR.jsx)(c0.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 u0=l(Y()),gR=l(x()),bR=(0,gR.jsx)(u0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gR.jsx)(u0.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var d0=l(Y()),kR=l(x()),vR=(0,kR.jsx)(d0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kR.jsx)(d0.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 f0=l(Y()),yR=l(x()),_R=(0,yR.jsx)(f0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yR.jsx)(f0.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 m0=l(Y()),SR=l(x()),xR=(0,SR.jsx)(m0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SR.jsx)(m0.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var p0=l(Y()),wR=l(x()),ak=(0,wR.jsx)(p0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,wR.jsx)(p0.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 h0=l(Y()),CR=l(x()),BR=(0,CR.jsx)(h0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,CR.jsx)(h0.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 g0=l(Y()),ER=l(x()),TR=(0,ER.jsx)(g0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ER.jsx)(g0.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var b0=l(Y()),IR=l(x()),PR=(0,IR.jsx)(b0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IR.jsx)(b0.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var k0=l(Y()),OR=l(x()),Tc=(0,OR.jsx)(k0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OR.jsx)(k0.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var v0=l(Y()),RR=l(x()),Ic=(0,RR.jsx)(v0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RR.jsx)(v0.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var y0=l(Y()),AR=l(x()),Pc=(0,AR.jsx)(y0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AR.jsx)(y0.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var _0=l(Y()),LR=l(x()),MR=(0,LR.jsx)(_0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LR.jsx)(_0.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var S0=l(Y()),NR=l(x()),ip=(0,NR.jsx)(S0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NR.jsx)(S0.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var x0=l(Y()),DR=l(x()),VR=(0,DR.jsx)(x0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DR.jsx)(x0.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var w0=l(Y()),FR=l(x()),sp=(0,FR.jsx)(w0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FR.jsx)(w0.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var C0=l(Y()),zR=l(x()),jR=(0,zR.jsx)(C0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zR.jsx)(C0.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var B0=l(Y()),HR=l(x()),qa=(0,HR.jsx)(B0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HR.jsx)(B0.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 E0=l(Y()),UR=l(x()),GR=(0,UR.jsx)(E0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UR.jsx)(E0.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 T0=l(Y()),WR=l(x()),Gn=(0,WR.jsx)(T0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WR.jsx)(T0.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 I0=l(Y()),$R=l(x()),Kr=(0,$R.jsx)(I0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$R.jsx)(I0.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 P0=l(Y()),KR=l(x()),lk=(0,KR.jsx)(P0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,KR.jsx)(P0.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var O0=l(Y()),YR=l(x()),qR=(0,YR.jsx)(O0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,YR.jsx)(O0.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 R0=l(Y()),ZR=l(x()),XR=(0,ZR.jsx)(R0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,ZR.jsx)(R0.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 A0=l(Y()),QR=l(x()),Qd=(0,QR.jsx)(A0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,QR.jsx)(A0.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 ck=l(Y()),uk=l(x()),ap=(0,uk.jsxs)(ck.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,uk.jsx)(ck.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,uk.jsx)(ck.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 L0=l(Y()),JR=l(x()),eA=(0,JR.jsx)(L0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JR.jsx)(L0.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 M0=l(Y()),tA=l(x()),zi=(0,tA.jsx)(M0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tA.jsx)(M0.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var dk=l(Y()),fk=l(x()),Za=(0,fk.jsxs)(dk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,fk.jsx)(dk.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,fk.jsx)(dk.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 N0=l(Y()),oA=l(x()),rA=(0,oA.jsx)(N0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oA.jsx)(N0.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 D0=l(Y()),nA=l(x()),mk=(0,nA.jsx)(D0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nA.jsx)(D0.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var V0=l(Y()),iA=l(x()),sA=(0,iA.jsx)(V0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,iA.jsx)(V0.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 F0=l(Y()),aA=l(x()),Wn=(0,aA.jsx)(F0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aA.jsx)(F0.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var z0=l(Y()),lA=l(x()),cA=(0,lA.jsx)(z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lA.jsx)(z0.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var j0=l(Y()),uA=l(x()),dA=(0,uA.jsx)(j0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uA.jsx)(j0.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var H0=l(Y()),fA=l(x()),mA=(0,fA.jsx)(H0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fA.jsx)(H0.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var U0=l(Y()),pA=l(x()),hA=(0,pA.jsx)(U0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pA.jsx)(U0.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 G0=l(Y()),gA=l(x()),bA=(0,gA.jsx)(G0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,gA.jsx)(G0.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 W0=l(Y()),kA=l(x()),vA=(0,kA.jsx)(W0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kA.jsx)(W0.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 $0=l(Y()),yA=l(x()),Cr=(0,yA.jsx)($0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yA.jsx)($0.Path,{d:"M7 11.5h10V13H7z"})});var K0=l(Y()),_A=l(x()),SA=(0,_A.jsx)(K0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_A.jsx)(K0.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 Y0=l(Y()),xA=l(x()),wA=(0,xA.jsx)(Y0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xA.jsx)(Y0.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 q0=l(Y()),CA=l(x()),BA=(0,CA.jsx)(q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CA.jsx)(q0.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 Z0=l(Y()),EA=l(x()),Xa=(0,EA.jsx)(Z0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,EA.jsx)(Z0.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 pk=l(Y()),hk=l(x()),gk=(0,hk.jsxs)(pk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,hk.jsx)(pk.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,hk.jsx)(pk.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 X0=l(Y()),TA=l(x()),IA=(0,TA.jsx)(X0.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,TA.jsx)(X0.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 Q0=l(Y()),PA=l(x()),J0=(0,PA.jsx)(Q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PA.jsx)(Q0.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var bk=l(Y()),kk=l(x()),OA=(0,kk.jsxs)(bk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,kk.jsx)(bk.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,kk.jsx)(bk.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var lp=l(Y()),cp=l(x()),RA=(0,cp.jsxs)(lp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,cp.jsx)(lp.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,cp.jsx)(lp.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,cp.jsx)(lp.Path,{d:"m18 7.5v9h1.5v-9z"})]});var vk=l(Y()),yk=l(x()),AA=(0,yk.jsxs)(vk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,yk.jsx)(vk.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,yk.jsx)(vk.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var _k=l(Y()),Sk=l(x()),LA=(0,Sk.jsxs)(_k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Sk.jsx)(_k.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,Sk.jsx)(_k.Path,{d:"m18 16.5v-9h1.5v9z"})]});var xk=l(Y()),wk=l(x()),MA=(0,wk.jsxs)(xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,wk.jsx)(xk.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,wk.jsx)(xk.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var up=l(Y()),dp=l(x()),NA=(0,dp.jsxs)(up.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,dp.jsx)(up.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,dp.jsx)(up.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,dp.jsx)(up.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var ex=l(Y()),DA=l(x()),VA=(0,DA.jsx)(ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DA.jsx)(ex.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 tx=l(Y()),FA=l(x()),Ck=(0,FA.jsx)(tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FA.jsx)(tx.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var ox=l(Y()),zA=l(x()),Jd=(0,zA.jsx)(ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zA.jsx)(ox.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var rx=l(Y()),jA=l(x()),HA=(0,jA.jsx)(rx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,jA.jsx)(rx.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 nx=l(Y()),UA=l(x()),$n=(0,UA.jsx)(nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UA.jsx)(nx.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 ix=l(Y()),GA=l(x()),WA=(0,GA.jsx)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(ix.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 sx=l(Y()),$A=l(x()),KA=(0,$A.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(sx.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 ax=l(Y()),YA=l(x()),qA=(0,YA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YA.jsx)(ax.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 lx=l(Y()),ZA=l(x()),XA=(0,ZA.jsx)(lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZA.jsx)(lx.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 cx=l(Y()),QA=l(x()),JA=(0,QA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QA.jsx)(cx.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 ux=l(Y()),eL=l(x()),Qa=(0,eL.jsx)(ux.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,eL.jsx)(ux.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 dx=l(Y()),tL=l(x()),ji=(0,tL.jsx)(dx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,tL.jsx)(dx.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 fx=l(Y()),oL=l(x()),rL=(0,oL.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oL.jsx)(fx.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 mx=l(Y()),nL=l(x()),iL=(0,nL.jsx)(mx.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,nL.jsx)(mx.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 px=l(Y()),sL=l(x()),aL=(0,sL.jsx)(px.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,sL.jsx)(px.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 rl=l(Mo()),gn=l(Oe()),Ee=l(V());var hz=l(K()),gz=l(nz());var qt="core/block-editor";var bx={};Os(bx,{getAllPatterns:()=>kfe,getBlockRemovalRules:()=>dfe,getBlockSettings:()=>sz,getBlockStyles:()=>Cfe,getBlockWithoutAttributes:()=>sfe,getClosestAllowedInsertionPoint:()=>cz,getClosestAllowedInsertionPointForPattern:()=>Efe,getContentLockingParent:()=>lL,getEditedContentOnlySection:()=>cL,getEnabledBlockParents:()=>cfe,getEnabledClientIdsTree:()=>lfe,getExpandedBlock:()=>xfe,getInserterMediaCategories:()=>hfe,getInsertionPoint:()=>Tfe,getLastFocus:()=>_fe,getLastInsertedBlocksClientIds:()=>ife,getOpenedBlockSettingsMenu:()=>ffe,getParentSectionBlock:()=>Ek,getPatternBySlug:()=>bfe,getRegisteredInserterMediaCategories:()=>pfe,getRemovalPromptData:()=>ufe,getReusableBlocks:()=>yfe,getSectionRootClientId:()=>tf,getStyleOverrides:()=>mfe,getZoomLevel:()=>Bfe,hasAllowedPatterns:()=>gfe,hasBlockSpotlight:()=>Pfe,isBlockHidden:()=>Ife,isBlockInterfaceHidden:()=>nfe,isBlockSubtreeDisabled:()=>afe,isContainerInsertableToInContentOnlyMode:()=>Bk,isDragging:()=>Sfe,isEditLockedBlock:()=>uz,isLockedBlock:()=>Ofe,isMoveLockedBlock:()=>dz,isRemoveLockedBlock:()=>fz,isSectionBlock:()=>el,isWithinEditedContentOnlySection:()=>wfe,isZoomOut:()=>uL});var Br=l(V()),gx=l(K());var hx=l(K()),iz=l(ot());function me(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 Ja=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var efe=["color","border","dimensions","typography","spacing"],tfe={"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 sz(e,t,...o){let r=so(e,t),n=[];if(t){let i=t;do{let s=so(e,i);(0,hx.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(efe.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,iz.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=Kn(e,d);if(s=Ja(f.settings?.blocks?.[r],a)??Ja(f.settings,a),s!==void 0)break}let c=Oc(e);if(s===void 0&&r&&(s=Ja(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=Ja(c.__experimentalFeatures,a)),s!==void 0)return hx.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=tfe[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:az}=j(gx.privateApis);function nfe(e){return e.isBlockInterfaceHidden}function ife(e){return e?.lastBlockInserted?.clientIds}function sfe(e,t){return e.blocks.byClientId.get(t)}var afe=(e,t)=>{let o=r=>Yn(e,r)==="disabled"&&Yr(e,r).every(o);return Yr(e,t).every(o)};function Bk(e,t,o){let r=az(t),n=so(e,o),i=az(n);return tf(e)===o||i&&r}function lz(e,t){let o=Yr(e,t),r=[];for(let n of o){let i=lz(e,n);Yn(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var lfe=(0,Br.createRegistrySelector)(()=>(0,Br.createSelector)(lz,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blockEditingModes])),cfe=(0,Br.createSelector)((e,t,o=!1)=>tl(e,t,o).filter(r=>Yn(e,r)!=="disabled"),e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function ufe(e){return e.removalPromptData}function dfe(e){return e.blockRemovalRules}function ffe(e){return e.openedBlockSettingsMenu}var mfe=(0,Br.createSelector)(e=>{let o=fp(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 pfe(e){return e.registeredInserterMediaCategories}var hfe=(0,Br.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]),gfe=(0,Br.createRegistrySelector)(e=>(0,Br.createSelector)((t,o=null)=>{let{getAllPatterns:r}=j(e(qt)),n=r(),{allowedBlockTypes:i}=Oc(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=ef(s);return Ik(c,i)&&c.every(({name:u})=>of(t,u,o))})},(t,o)=>[...Pk(e)(t),...Rc(e)(t,o)])),bfe=(0,Br.createRegistrySelector)(e=>(0,Br.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=j(e(qt)).getReusableBlocks().find(({id:i})=>i===r);return n?Tk(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[Sc]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[j(e(qt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[Sc]?.(e)])),kfe=(0,Br.createRegistrySelector)(e=>(0,Br.createSelector)(t=>[...j(e(qt)).getReusableBlocks().map(o=>Tk(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[Sc]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),Pk(e))),vfe=[],yfe=(0,Br.createRegistrySelector)(e=>t=>{let o=t.settings[hS];return(o?o(e):t.settings.__experimentalReusableBlocks)??vfe});function _fe(e){return e.lastFocus}function Sfe(e){return e.isDragging}function xfe(e){return e.expandedBlock}var lL=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)Ls(e,o)==="contentOnly"&&(r=o);return r},Ek=(e,t)=>{let o=t,r;for(;o=e.blocks.parents.get(o);)el(e,o)&&(r=o);return r};function el(e,t){if(t===e.editedContentOnlySection)return!1;let o=so(e,t);if(o==="core/block")return!0;let r=Kn(e,t),n=o==="core/template-part",i=e.settings?.[Jm];if((r?.metadata?.patternName||n)&&window?.__experimentalContentOnlyPatternInsertion&&!i)return!0;let s=Ls(e,t)==="contentOnly",a=go(e,t),c=Ls(e,a)==="contentOnly";return!!(s&&!c)}function cL(e){return e.editedContentOnlySection}function wfe(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 Cfe=(0,Br.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 tf(e){return e.settings?.[xc]}function uL(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function Bfe(e){return e.zoomLevel}function cz(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>of(e,a,s));if(!o){if(n(o))return o;let s=tf(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=go(e,i);return i}function Efe(e,t,o){let{allowedBlockTypes:r}=Oc(e);if(!Ik(ef(t),r))return null;let i=ef(t).map(({blockName:s})=>s);return cz(e,i,o)}function Tfe(e){return e.insertionPoint}var Ife=(e,t)=>{let o=so(e,t);return(0,gx.hasBlockSupport)(e,o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1};function Pfe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function uz(e,t){return!!Kn(e,t)?.lock?.edit}function dz(e,t){let o=Kn(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=go(e,t);return Ls(e,r)==="all"}function fz(e,t){let o=Kn(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=go(e,t),n=Ls(e,r);return n==="all"||n==="insert"}function Ofe(e,t){return uz(e,t)||dz(e,t)||fz(e,t)}var Rk=l(M()),Bt={user:"user",theme:"theme",directory:"directory"},Ok={full:"fully",unsynced:"unsynced"},rf={name:"allPatterns",label:(0,Rk._x)("All","patterns")},ol={name:"myPatterns",label:(0,Rk.__)("My patterns")},mp={name:"core/starter-content",label:(0,Rk.__)("Starter content")};function kx(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Bt.theme&&(r||n)||t===Bt.directory&&(r||!n)||t===Bt.user&&e.type!==Bt.user||o===Ok.full&&e.syncStatus!==""||o===Ok.unsynced&&e.syncStatus!=="unsynced"&&r)}var Ac=Symbol("isFiltered"),mz=new WeakMap,pz=new WeakMap;function Tk(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:Bt.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 Rfe(e){let t=(0,hz.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 vx(e){let t=mz.get(e);return t||(t=Rfe(e),mz.set(e,t)),t}function ef(e){let t=pz.get(e);return t||(t=(0,gz.parse)(e.content),t=t.filter(o=>o.blockName!==null),pz.set(e,t)),t}var nf=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,Ik=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!nf(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},Pk=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[Sc]?.(e),t.blockPatterns,j(e(qt)).getReusableBlocks()],Rc=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,Yn(e,t),tf(e),el(e,t)];var Afe=(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 Ms(e,t,o="asc"){return e.concat().sort(Afe(t,e,o))}var{isContentBlock:fL}=j(De.privateApis),Lfe=3600*1e3,Mfe=24*3600*1e3,Nfe=168*3600*1e3,Zo=[],Dfe=new Set,yz={[Ac]:!0};function so(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(kz.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 Vfe(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Kn(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function nl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var Ffe=(0,Ee.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Kn(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function zfe(e,t){let o=!t||!_x(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||Zo}var _z=(0,Ee.createSelector)((e,t)=>((0,gn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:Sz(e,t)}),e=>[e.blocks.order]),Sz=(0,Ee.createSelector)((e,t="")=>((0,gn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),Yr(e,t).map(o=>_z(e,o))),e=>[e.blocks.order]),xz=(0,Ee.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]),fp=e=>xz(e,""),jfe=(0,Ee.createSelector)((e,t)=>{let o=fp(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]),wz=(0,Ee.createSelector)((e,t)=>{if(!t)return Zo;let o=Array.isArray(t)?t:[t],n=fp(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:Zo},e=>[e.blocks.order,e.blocks.byClientId]);function Hfe(e,t){return(0,gn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),wz(e,t)}var yx=(0,Ee.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>nl(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),Ufe=(0,Ee.createSelector)((e,t)=>yx(e,t).filter(Boolean).map(o=>o.name),(e,t)=>yx(e,t));function Gfe(e,t){return Yr(e,t).length}function Lk(e){return e.selection.selectionStart}function Mk(e){return e.selection.selectionEnd}function Wfe(e){return e.selection.selectionStart.clientId}function $fe(e){return e.selection.selectionEnd.clientId}function Kfe(e){let t=Lc(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function Yfe(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function pp(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function qfe(e){let t=pp(e);return t?nl(e,t):null}function go(e,t){return e.blocks.parents.get(t)??null}var tl=(0,Ee.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():Zo},e=>[e.blocks.parents]),mL=(0,Ee.createSelector)((e,t,o,r=!1)=>{let n=tl(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(so(e,s)))},e=>[e.blocks.parents]);function Zfe(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function Xfe(e,t){let o=pp(e),r=[...tl(e,t),t],n=[...tl(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 pL(e,t,o=1){if(t===void 0&&(t=pp(e)),t===void 0&&(o<0?t=hL(e):t=Cz(e)),!t)return null;let r=go(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 Qfe(e,t){return pL(e,t,-1)}function Jfe(e,t){return pL(e,t,1)}function eme(e){return e.initialPosition}var hp=(0,Ee.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return Zo;if(t.clientId===o.clientId)return[t.clientId];let r=go(e,t.clientId);if(r===null)return Zo;let n=Yr(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 Lc(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?Zo:hp(e)}var tme=(0,Ee.createSelector)(e=>{let t=Lc(e);return t.length?t.map(o=>nl(e,o)):Zo},e=>[...hp.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function hL(e){return Lc(e)[0]||null}function Cz(e){let t=Lc(e);return t[t.length-1]||null}function ome(e,t){return hL(e)===t}function Bz(e,t){return Lc(e).indexOf(t)!==-1}var rme=(0,Ee.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=go(e,o),r=Bz(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function nme(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function ime(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function sme(e){let t=Lk(e),o=Mk(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function ame(e){let t=Lk(e),o=Mk(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function lme(e){return hp(e).some(t=>{let o=so(e,t);return!(0,De.getBlockType)(o).merge})}function cme(e,t){let o=Lk(e),r=Mk(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=go(e,o.clientId),i=go(e,r.clientId);if(n!==i)return!1;let s=Yr(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=so(e,f);if(!(0,De.getBlockType)(p).merge)return!1;let g=nl(e,m);if(g.name===p)return!0;let b=(0,De.switchToBlockType)(g,p);return b&&b.length}var ume=e=>{let t=Lk(e),o=Mk(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return Zo;let r=go(e,t.clientId),n=go(e,o.clientId);if(r!==n)return Zo;let i=Yr(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=nl(e,c.clientId),f=nl(e,u.clientId),m=d.attributes[c.attributeKey],p=f.attributes[u.attributeKey],h=(0,rl.create)({html:m}),g=(0,rl.create)({html:p});return h=(0,rl.remove)(h,0,c.offset),g=(0,rl.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,rl.toHTMLString)({value:h})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,rl.toHTMLString)({value:g})}}]};function Yr(e,t){return e.blocks.order.get(t||"")||Zo}function Ez(e,t){let o=go(e,t);return Yr(e,o).indexOf(t)}function Tz(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function Iz(e,t,o=!1){let r=hp(e);return r.length?o?r.some(n=>tl(e,n,!0).includes(t)):r.some(n=>go(e,n)===t):!1}function Pz(e,t,o=!1){return Yr(e,t).some(r=>gL(e,r)||o&&Pz(e,r,o))}function dme(e,t){if(!t)return!1;let o=Lc(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function fme(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function mme(e){return e.isMultiSelecting}function pme(e){return e.isSelectionEnabled}function hme(e,t){return e.blocksMode[t]||"visual"}function gme(e){return e.isTyping}function Oz(e){return!!e.draggedBlocks.length}function bme(e){return e.draggedBlocks}function gL(e,t){return e.draggedBlocks.includes(t)}function kme(e,t){return Oz(e)?tl(e,t).some(r=>gL(e,r)):!1}function vme(){return(0,gn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var yme=(0,Ee.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=go(e,i)||void 0,o=Ez(e,n.clientId)+1):o=Yr(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function _me(e){return e.insertionCue!==null}function Sme(e){return e.template.isValid}function xme(e){return e.settings.template}function Ls(e,t){if(!t)return e.settings.templateLock??!1;let o=SL(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var bL=(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}=Oc(e);if(!nf(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(so(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},Nk=(e,t,o=null)=>{if(!bL(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,De.getBlockType)(t);let n=Ls(e,o);if(n&&n!=="contentOnly")return!1;let i=Yn(e,o??"");if(i==="disabled")return!1;let s=SL(e,o);if(o&&s===void 0)return!1;let a=fL(t),c=!!el(e,o),u=!!Ek(e,o);if((c||u)&&!a||(c||i==="contentOnly")&&!Bk(e,t,o))return!1;let d=so(e,o),m=(0,De.getBlockType)(d)?.allowedBlocks,p=nf(m,t);if(p!==!1){let v=s?.allowedBlocks,S=nf(v,t);S!==null&&(p=S)}let h=r.parent,g=nf(h,d),b=!0,k=r.ancestor;k&&(b=[o,...tl(e,o)].some(S=>nf(k,so(e,S))));let y=b&&(p===null&&g===null||p===!0||g===!0);return y&&(0,vz.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:nl.bind(null,e),getBlockParentsByBlockName:mL.bind(null,e)})},of=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)(Nk,(t,o,r)=>Rc(e)(t,r)));function wme(e,t,o=null){return t.every(r=>of(e,so(e,r),o))}function kL(e,t){let o=Kn(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=go(e,t),n=Ls(e,r);if(n&&n!=="contentOnly")return!1;let i=!!Ek(e,t),s=fL(so(e,t));if(i&&!s)return!1;let a=!!el(e,r),c=Yn(e,r);return(a||c==="contentOnly")&&!Bk(e,so(e,t),r)?!1:c!=="disabled"}function Rz(e,t){return t.every(o=>kL(e,o))}function Az(e,t){let o=Kn(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=go(e,t);if(Ls(e,r)==="all")return!1;let i=!!Ek(e,t),s=fL(so(e,t));if(i&&!s)return!1;let a=!!el(e,r),c=Yn(e,r);return(a||c==="contentOnly")&&!Bk(e,so(e,t),r)?!1:Yn(e,r)!=="disabled"}function Cme(e,t){return t.every(o=>Az(e,o))}function Lz(e,t){let o=Kn(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function Bme(e,t){return(0,De.hasBlockSupport)(t,"lock",!0)?!!e.settings?.canLockBlocks:!1}function vL(e,t){return e.preferences.insertUsage?.[t]??null}var Ak=(e,t,o)=>(0,De.hasBlockSupport)(t,"inserter",!0)?Nk(e,t.name,o):!1,Eme=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=vL(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:yL(n,i)}},yL=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<Lfe:return t*4;case o<Mfe:return t*2;case o<Nfe:return t/2;default:return t/4}},Mz=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,De.hasBlockSupport)(o.name,"multiple",!0)||(n=yx(e,fp(e)).some(({name:u})=>u===o.name));let{time:i,count:s=0}=vL(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:yL(i,s)};if(t==="transform")return a;let c=(0,De.getBlockVariations)(o.name,"inserter");return{...a,initialAttributes:{},description:o.description,category:o.category,keywords:o.keywords,parent:o.parent,ancestor:o.ancestor,variations:c,example:o.example,utility:1}},Tme=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=yz)=>{let n=h=>{let g=h.wp_pattern_sync_status?$n:{src:$n,foreground:"var(--wp-block-synced-color)"},b=Tk(h),{time:k,count:y=0}=vL(t,b.name)||{},v=yL(k,y);return{id:b.name,name:"core/block",initialAttributes:{ref:h.id},title:b.title,icon:g,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:v,content:b.content,get blocks(){return vx(b).blocks},syncStatus:b.syncStatus}},i=Nk(t,"core/block",o)?j(e(qt)).getReusableBlocks().map(n):[],s=Mz(t,{buildScope:"inserter"}),a=(0,De.getBlockTypes)().filter(h=>(0,De.hasBlockSupport)(h,"inserter",!0)).map(s);r[Ac]!==!1?a=a.filter(h=>Ak(t,h,o)):a=a.filter(h=>bL(t,h,o)).map(h=>({...h,isAllowedInCurrentRoot:Ak(t,h,o)}));let c=[],u=a.reduce((h,g)=>{let{variations:b=[]}=g;if(b.some(({isDefault:k})=>k)||h.push(g),b.length){let k=Eme(t,g);b.map(k).forEach(y=>{y.id==="core/paragraph/stretchy-paragraph"||y.id==="core/heading/stretchy-heading"?c.push(y):h.push(y)})}return h},[]);u.push(...c);let d=(h,g)=>{let{core:b,noncore:k}=h;return(g.name.startsWith("core/")?b:k).push(g),h},{core:f,noncore:m}=u.reduce(d,{core:[],noncore:[]});return[...[...f,...m],...i]},(t,o)=>[(0,De.getBlockTypes)(),j(e(qt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...Rc(e)(t,o)])),Ime=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=Mz(t,{buildScope:"transform"}),s=(0,De.getBlockTypes)().filter(u=>Ak(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 Ms(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,De.getBlockTypes)(),t.preferences.insertUsage,...Rc(e)(t,r)])),Pme=(e,t=null)=>(0,De.getBlockTypes)().some(n=>Ak(e,n,t))?!0:Nk(e,"core/block",t),dL=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null)=>{if(!o)return;let r=(0,De.getBlockTypes)().filter(i=>Ak(t,i,o));return Nk(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,De.getBlockTypes)(),...Rc(e)(t,o)])),Ome=(0,Ee.createSelector)((e,t=null)=>((0,gn.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),dL(e,t)),(e,t)=>dL.getDependants(e,t));function Nz(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings[t]??{};if(!(!o||!r))return o}function Rme(e,t=null){return(0,gn.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Nz(e,t)}var Ame=(0,Ee.createRegistrySelector)(e=>(t,o)=>{let r=j(e(qt)).getPatternBySlug(o);return r?vx(r):null}),_L=e=>(t,o)=>[...Pk(e)(t),...Rc(e)(t,o)],bz=new WeakMap;function Lme(e){let t=bz.get(e);return t||(t={...e,get blocks(){return vx(e).blocks}},bz.set(e,t)),t}var Mme=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=yz)=>{let{getAllPatterns:n}=j(e(qt)),i=n(),{allowedBlockTypes:s}=Oc(t);return i.filter(({inserter:d=!0})=>!!d).map(Lme).filter(d=>Ik(ef(d),s)).filter(d=>ef(d).every(({blockName:f})=>r[Ac]!==!1?of(t,f,o):bL(t,f,o)))},_L(e))),Nme=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o)return Zo;let n=e(qt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?Zo:s},(t,o,r)=>_L(e)(t,r))),Dme=(0,Ee.createRegistrySelector)(e=>((0,gn.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(qt).getPatternsByBlockTypes)),Vme=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||_x(t,i)))return Zo;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(qt).getPatternsByBlockTypes(n,r)},(t,o,r)=>_L(e)(t,r)));function SL(e,t){return e.blockListSettings[t]}function Oc(e){return e.settings}function Fme(e){return e.blocks.isPersistentChange}var zme=(0,Ee.createSelector)((e,t=[])=>t.reduce((o,r)=>e.blockListSettings[r]?{...o,[r]:e.blockListSettings[r]}:o,{}),e=>[e.blockListSettings]),jme=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o)=>{(0,gn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=j(e(qt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[j(e(qt)).getReusableBlocks()]));function Hme(e){return e.blocks.isIgnoredChange}function Ume(e){return e.lastBlockAttributesChange}function Gme(){return(0,gn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function Wme(e){return!!e.automaticChangeStatus}function $me(e,t){return e.highlightedBlock===t}function _x(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Kme=(0,Ee.createSelector)((e,t)=>{if(!t.length)return null;let o=pp(e);if(t.includes(so(e,o)))return o;let r=Lc(e),n=mL(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function Yme(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function qme(e,t){return e.blockVisibility?.[t]??!0}function Zme(){(0,gn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var Xme=(0,Ee.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?Dfe:t},e=>[e.blockVisibility]);function Dz(e,t){if(Yn(e,t)!=="default")return!1;if(!Lz(e,t))return!0;if(uL(e)){let n=tf(e);if(n){if(Yr(e,n)?.includes(t))return!0}else if(t&&!go(e,t))return!0}return((0,De.hasBlockSupport)(so(e,t),"__experimentalDisableBlockOverlay",!1)?!1:_x(e,t))&&!Tz(e,t)&&!Iz(e,t,!0)}function Qme(e,t){let o=e.blocks.parents.get(t);for(;o;){if(Dz(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Yn(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blockEditingModes.has(t)?e.blockEditingModes.get(t):"default"}var Jme=(0,Ee.createRegistrySelector)(e=>(t,o="")=>{let r=o||pp(t);if(!r||el(t,r))return!1;let{getGroupingBlockName:n}=e(De.store),i=nl(t,r),s=n();return i&&(i.name===s||(0,De.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&kL(t,r)}),epe=(0,Ee.createRegistrySelector)(e=>(t,o=Zo)=>{let{getGroupingBlockName:r}=e(De.store),n=r(),i=o?.length?o:hp(t),s=i?.length?go(t,i[0]):void 0;return of(t,n,s)&&i.length&&Rz(t,i)}),tpe=(e,t)=>((0,gn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),lL(e,t));function ope(e){return(0,gn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),cL(e)}var Sx={};Os(Sx,{__experimentalUpdateSettings:()=>wL,clearBlockRemovalPrompt:()=>lpe,deleteStyleOverride:()=>fpe,editContentOnlySection:()=>BL,ensureDefaultBlock:()=>Uz,expandBlock:()=>gpe,hideBlockInterface:()=>ipe,privateRemoveBlocks:()=>CL,resetZoomLevel:()=>ype,setBlockRemovalRules:()=>cpe,setInsertionPoint:()=>bpe,setLastFocus:()=>mpe,setOpenedBlockSettingsMenu:()=>upe,setStyleOverride:()=>dpe,setZoomLevel:()=>vpe,showBlockInterface:()=>spe,startDragging:()=>ppe,stopDragging:()=>hpe,stopEditingContentOnlySection:()=>kpe,toggleBlockSpotlight:()=>_pe});var Fz=l(O()),zz=l(Oe()),jz=l(Xo()),Hz=l(M()),rpe=e=>Array.isArray(e)?e:[e],npe=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function wL(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,zz.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&&Fz.Platform.OS==="web"){n={};for(let i in r)npe.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function ipe(){return{type:"HIDE_BLOCK_INTERFACE"}}function spe(){return{type:"SHOW_BLOCK_INTERFACE"}}var CL=(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(ape(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(Uz())})},Uz=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function ape(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function lpe(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function cpe(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function upe(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function dpe(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function fpe(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function mpe(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function ppe(){return{type:"START_DRAGGING"}}function hpe(){return{type:"STOP_DRAGGING"}}function gpe(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function bpe(e){return{type:"SET_INSERTION_POINT",value:e}}function BL(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function kpe(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var vpe=(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,jz.speak)((0,Hz.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function ype(){return{type:"RESET_ZOOM_LEVEL"}}function _pe(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}var IL={};Os(IL,{__unstableDeleteSelection:()=>Wpe,__unstableExpandSelection:()=>Kpe,__unstableMarkAutomaticChange:()=>dhe,__unstableMarkLastChangeAsPersistent:()=>che,__unstableMarkNextChangeAsNotPersistent:()=>uhe,__unstableSaveReusableBlock:()=>lhe,__unstableSetEditorMode:()=>fhe,__unstableSetTemporarilyEditingAsBlocks:()=>yhe,__unstableSplitSelection:()=>$pe,clearSelectedBlock:()=>Lpe,duplicateBlocks:()=>phe,enterFormattedText:()=>ohe,exitFormattedText:()=>rhe,flashBlock:()=>bhe,hideInsertionPoint:()=>Hpe,hoverBlock:()=>Tpe,insertAfterBlock:()=>ghe,insertBeforeBlock:()=>hhe,insertBlock:()=>zpe,insertBlocks:()=>Jz,insertDefaultBlock:()=>ihe,mergeBlocks:()=>Ype,moveBlockToPosition:()=>Fpe,moveBlocksDown:()=>Dpe,moveBlocksToPosition:()=>Qz,moveBlocksUp:()=>Vpe,multiSelect:()=>Ape,receiveBlocks:()=>wpe,registerInserterMediaCategory:()=>_he,removeBlock:()=>qpe,removeBlocks:()=>e6,replaceBlock:()=>Npe,replaceBlocks:()=>Zz,replaceInnerBlocks:()=>Zpe,resetBlocks:()=>Spe,resetSelection:()=>xpe,selectBlock:()=>Epe,selectNextBlock:()=>Ppe,selectPreviousBlock:()=>Ipe,selectionChange:()=>nhe,setBlockEditingMode:()=>She,setBlockMovingClientId:()=>mhe,setBlockVisibility:()=>vhe,setHasControlledInnerBlocks:()=>khe,setTemplateValidity:()=>Upe,showInsertionPoint:()=>jpe,startDraggingBlocks:()=>ehe,startMultiSelect:()=>Ope,startTyping:()=>Qpe,stopDraggingBlocks:()=>the,stopMultiSelect:()=>Rpe,stopTyping:()=>Jpe,synchronizeTemplate:()=>Gpe,toggleBlockHighlight:()=>TL,toggleBlockMode:()=>Xpe,toggleSelection:()=>Mpe,unsetBlockEditingMode:()=>xhe,updateBlock:()=>Bpe,updateBlockAttributes:()=>Cpe,updateBlockListSettings:()=>she,updateSettings:()=>ahe,validateBlocksToTemplate:()=>qz});var he=l(K()),xx=l(Xo()),Mc=l(M()),Kz=l(qn()),rt=l(Mo()),Nc=l(Oe()),Yz=l(gp());var $z=l(Mo()),il="\x86";function Dk(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof $z.RichTextData)&&o.toString().indexOf(il)!==-1})}function EL(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var bp=e=>Array.isArray(e)?e:[e],Spe=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(qz(e))},qz=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,he.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function xpe(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function wpe(e){return(0,Nc.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Cpe(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:bp(e),attributes:t,options:o}}function Bpe(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Epe(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Tpe(){return(0,Nc.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var Ipe=(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)}},Ppe=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function Ope(){return{type:"START_MULTI_SELECT"}}function Rpe(){return{type:"STOP_MULTI_SELECT"}}var Ape=(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,xx.speak)((0,Mc.sprintf)((0,Mc._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function Lpe(){return{type:"CLEAR_SELECTED_BLOCK"}}function Mpe(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var Zz=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=bp(e),t=bp(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 Npe(e,t){return Zz(e,t)}var Xz=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:bp(t),rootClientId:o})},Dpe=Xz("MOVE_BLOCKS_DOWN"),Vpe=Xz("MOVE_BLOCKS_UP"),Qz=(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 Fpe(e,t="",o="",r){return Qz([e],t,o,r)}function zpe(e,t,o,r,n){return Jz([e],t,o,r,0,n)}var Jz=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,Nc.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=bp(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 jpe(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 Hpe=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function Upe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var Gpe=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,he.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},Wpe=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,he.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,rt.create)({html:S}),E=(0,rt.create)({html:w});C=(0,rt.remove)(C,b.offset,C.text.length),E=(0,rt.insert)(E,il,0,k.offset);let I=(0,he.cloneBlock)(y,{[b.attributeKey]:(0,rt.toHTMLString)({value:C})}),R=(0,he.cloneBlock)(v,{[k.attributeKey]:(0,rt.toHTMLString)({value:E})}),B=e?I:R,P=y.name===v.name?[B]:(0,he.switchToBlockType)(B,g.name);if(!P||!P.length)return;let T;if(e){let X=P.pop();T=g.merge(X.attributes,R.attributes)}else{let X=P.shift();T=g.merge(I.attributes,X.attributes)}let L=Dk(T),z=T[L],U=(0,rt.create)({html:z}),H=U.text.indexOf(il),N=(0,rt.remove)(U,H,H+1),D=(0,rt.toHTMLString)({value:N});T[L]=D;let W=o.getSelectedBlockClientIds(),$=[...e?P:[],{...h,attributes:{...h.attributes,...T}},...e?[]:P];t.batch(()=>{r.selectionChange(h.clientId,L,H,H),r.replaceBlocks(W,$,0,o.getSelectedBlocksInitialCaretPosition())})},$pe=(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,he.getBlockType)(g.name),y=(0,he.getBlockType)(b.name),v=typeof p.attributeKey=="string"?p.attributeKey:EL(k),S=typeof h.attributeKey=="string"?h.attributeKey:EL(y),w=o.getBlockAttributes(p.clientId);if(w?.metadata?.bindings?.[v]){if(e.length){let{createWarningNotice:Z}=t.dispatch(Kz.store);Z((0,Mc.__)("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,he.isUnmodifiedDefaultBlock)(g)){r.replaceBlocks([p.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(p.clientId).length){let Z=function(){let ce=(0,he.getDefaultBlockName)();return o.canInsertBlockType(ce,s)?(0,he.createBlock)(ce):(0,he.createBlock)(o.getBlockName(p.clientId))};var E=Z;let se=w[v].length;if(p.offset===0&&se){r.insertBlocks([Z()],o.getBlockIndex(p.clientId),s,!1);return}if(p.offset===se){r.insertBlocks([Z()],o.getBlockIndex(p.clientId)+1,s);return}}}let I=g.attributes[v],R=b.attributes[S],B=(0,rt.create)({html:I}),P=(0,rt.create)({html:R});B=(0,rt.remove)(B,p.offset,B.text.length),P=(0,rt.remove)(P,0,h.offset);let T={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[v]:(0,rt.toHTMLString)({value:B})}},L={...b,clientId:g.clientId===b.clientId?(0,he.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[S]:(0,rt.toHTMLString)({value:P})}},z=(0,he.getDefaultBlockName)();if(g.clientId===b.clientId&&z&&L.name!==z&&o.canInsertBlockType(z,s)){let Z=(0,he.switchToBlockType)(L,z);Z?.length===1&&(L=Z[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[T,L]);return}let U,H=[],N=[...e],D=N.shift(),W=(0,he.getBlockType)(T.name),$=W.merge&&D.name===W.name?[D]:(0,he.switchToBlockType)(D,W.name);if($?.length){let Z=$.shift();T={...T,attributes:{...T.attributes,...W.merge(T.attributes,Z.attributes)}},H.push(T),U={clientId:T.clientId,attributeKey:v,offset:(0,rt.create)({html:T.attributes[v]}).text.length},N.unshift(...$)}else(0,he.isUnmodifiedBlock)(T)||H.push(T),H.push(D);let X=N.pop(),te=(0,he.getBlockType)(L.name);if(N.length&&H.push(...N),X){let Z=te.merge&&te.name===X.name?[X]:(0,he.switchToBlockType)(X,te.name);if(Z?.length){let se=Z.pop();H.push({...L,attributes:{...L.attributes,...te.merge(se.attributes,L.attributes)}}),H.push(...Z),U={clientId:L.clientId,attributeKey:S,offset:(0,rt.create)({html:se.attributes[S]}).text.length}}else H.push(X),(0,he.isUnmodifiedBlock)(L)||H.push(L)}else(0,he.isUnmodifiedBlock)(L)||H.push(L);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),H,H.length-1,0),U&&r.selectionChange(U.clientId,U.attributeKey,U.offset,U.offset)})},Kpe=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},Ype=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,he.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,he.getBlockSupport)(a.name,"__experimentalOnMerge")){let w=(0,he.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 I=r.getBlockAttributes(i),R=r.getBlockAttributes(E);Object.keys(I).every(B=>I[B]===R[B])&&(n.moveBlocksToPosition(r.getBlockOrder(E),E,i),n.removeBlock(E,!1))}});return}if((0,he.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,he.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,he.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,he.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,he.cloneBlock)(a),y=(0,he.cloneBlock)(u);if(b){let w=f===i?k:y,C=w.attributes[m],E=(0,rt.insert)((0,rt.create)({html:C}),il,p,p);w.attributes[m]=(0,rt.toHTMLString)({value:E})}let v=a.name===u.name?[y]:(0,he.switchToBlockType)(y,a.name);if(!v||!v.length)return;let S=c.merge(k.attributes,v[0].attributes);if(b){let w=Dk(S),C=S[w],E=(0,rt.create)({html:C}),I=E.text.indexOf(il),R=(0,rt.remove)(E,I,I+1),B=(0,rt.toHTMLString)({value:R});S[w]=B,n.selectionChange(a.clientId,w,I,I)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,...S}},...v.slice(1)],0)},e6=(e,t=!0)=>CL(e,t);function qpe(e,t){return e6([e],t)}function Zpe(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 Xpe(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Qpe(){return{type:"START_TYPING"}}function Jpe(){return{type:"STOP_TYPING"}}function ehe(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function the(){return{type:"STOP_DRAGGING_BLOCKS"}}function ohe(){return(0,Nc.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function rhe(){return(0,Nc.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function nhe(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var ihe=(e,t,o)=>({dispatch:r})=>{let n=(0,he.getDefaultBlockName)();if(!n)return;let i=(0,he.createBlock)(n,e);return r.insertBlock(i,o,t)};function she(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ahe(e){return wL(e,{stripExperimentalSettings:!0})}function lhe(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function che(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function uhe(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var dhe=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},fhe=e=>({registry:t})=>{t.dispatch(Yz.store).set("core","editorTool",e),e==="navigation"?(0,xx.speak)((0,Mc.__)("You are currently in Write mode.")):e==="edit"&&(0,xx.speak)((0,Mc.__)("You are currently in Design mode."))};function mhe(){return(0,Nc.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var phe=(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,he.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=bp(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,he.__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)},hhe=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,he.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i,r)},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+1);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,he.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i+1,r)};function TL(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var bhe=(e,t=150)=>async({dispatch:o})=>{o(TL(e,!0)),await new Promise(r=>setTimeout(r,t)),o(TL(e,!1))};function khe(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function vhe(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function yhe(e){return(0,Nc.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),BL(e)}var _he=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 She(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function xhe(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}var kp={reducer:ez,selectors:xL,actions:IL},_=(0,wx.createReduxStore)(qt,{...kp,persist:["preferences"]}),t6=(0,wx.registerStore)(qt,{...kp,persist:["preferences"]});j(t6).registerPrivateActions(Sx);j(t6).registerPrivateSelectors(bx);j(_).registerPrivateActions(Sx);j(_).registerPrivateSelectors(bx);var vp=l(A()),o6=l(M());var Hi=l(x());function whe({className:e,actions:t,children:o,secondaryActions:r}){return(0,Hi.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Hi.jsx)("div",{className:F(e,"block-editor-warning"),children:(0,Hi.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Hi.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Hi.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Hi.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Hi.jsx)(vp.DropdownMenu,{className:"block-editor-warning__secondary",icon:zi,label:(0,o6.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Hi.jsx)(vp.MenuGroup,{children:r.map((n,i)=>(0,Hi.jsx)(vp.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var Dc=whe;var yp=l(x());function i6({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,n6.useDispatch)(_),n=(0,r6.getBlockType)(t);return(0,yp.jsxs)(Dc,{actions:[(0,yp.jsx)(PL.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,Cx.__)("Find original")},"find-original"),(0,yp.jsx)(PL.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,Cx.__)("Remove")},"remove")],children:[(0,yp.jsxs)("strong",{children:[n?.title,": "]}),(0,Cx.__)("This block can only be used once.")]})}var Vk=l(x());function Ex({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,OL.hasBlockSupport)(i,"layout",!1)||(0,OL.hasBlockSupport)(i,"__experimentalLayout",!1),{originalBlockClientId:h}=(0,Bx.useContext)(hn);return(0,Vk.jsxs)(iS,{value:(0,Bx.useMemo)(()=>({name:i,isSelected:s,clientId:a,layout:p?d:null,__unstableLayoutClassNames:u,[vc]:e,[Ym]:t,[rS]:o,[qm]:m,[nS]:r}),[i,s,a,p,d,u,e,t,o,m,r]),children:[(0,Vk.jsx)($F,{...n}),h&&(0,Vk.jsx)(i6,{originalBlockClientId:h,name:i,onReplace:n.onReplace})]})}function fe(...e){let{clientId:t=null}=Ae();return(0,s6.useSelect)(o=>j(o(_)).getBlockSettings(t,...e),[t,...e])}function l6(e){(0,a6.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 Ix=l(x()),{kebabCase:Che}=j(u6.privateApis),c6=([e,...t])=>e.toUpperCase()+t.join(""),Bhe=e=>(0,sf.createHigherOrderComponent)(t=>o=>(0,Ix.jsx)(t,{...o,colors:e}),"withCustomColorPalette"),Ehe=()=>(0,sf.createHigherOrderComponent)(e=>t=>{let[o,r,n]=fe("color.palette.custom","color.palette.theme","color.palette.default"),i=(0,Tx.useMemo)(()=>[...o||[],...r||[],...n||[]],[o,r,n]);return(0,Ix.jsx)(e,{...t,colors:i})},"withEditorColorPalette");function d6(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:Che(n)}:n}),{});return(0,sf.compose)([t,r=>class extends Tx.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 MF(i,n)}createSetters(){return Object.keys(o).reduce((n,i)=>{let s=c6(i),a=`custom${s}`;return n[`set${s}`]=this.createSetColor(i,a),n},{})}createSetColor(n,i){return s=>{let a=lS(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=Rs(i,n[c],n[`custom${c6(c)}`]),f=s[c];return f?.color===d.color&&f?a[c]=f:a[c]={...d,class:Hn(u,d.slug)},a},{})}render(){return(0,Ix.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function f6(e){return(...t)=>{let o=Bhe(e);return(0,sf.createHigherOrderComponent)(d6(t,o),"withCustomColors")}}function m6(...e){let t=Ehe();return(0,sf.createHigherOrderComponent)(d6(e,t),"withColors")}var Px=l(O()),Ox=l(V());function _p(e){if(e)return`has-${e}-gradient-background`}function Rx(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function p6(e,t){return e?.find(r=>r.gradient===t)}function h6(e,t){let o=p6(e,t);return o&&o.slug}function The({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,Px.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,Ox.useSelect)(p=>{let{getBlockAttributes:h}=p(_),g=h(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,Ox.useDispatch)(_),d=(0,Px.useCallback)(p=>{let h=h6(s,p);if(h){u(o,{[e]:h,[t]:void 0});return}u(o,{[e]:void 0,[t]:p})},[s,o,u]),f=_p(a),m;return a?m=Rx(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var g6=l(A());var{kebabCase:Ihe}=j(g6.privateApis),Sp=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function RL(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function Vc(e){if(e)return`has-${Ihe(e)}-font-size`}var Phe="1600px",Ohe="320px",Rhe=1,Ahe=.25,Lhe=.75,Mhe="14px";function b6({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=Ohe,maximumViewportWidth:n=Phe,scaleFactor:i=Rhe,minimumFontSizeLimit:s}){if(s=Fc(s)?s:Mhe,o){let v=Fc(o);if(!v?.unit)return null;let S=Fc(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),Ahe),Lhe),E=Fk(v.value*C,3);S?.value&&E<S?.value?e=`${S.value}${S.unit}`:e=`${E}${v.unit}`}}let a=Fc(e),c=a?.unit||"rem",u=Fc(t,{coerceTo:c});if(!a||!u)return null;let d=Fc(e,{coerceTo:"rem"}),f=Fc(n,{coerceTo:c}),m=Fc(r,{coerceTo:c});if(!f||!m||!d)return null;let p=f.value-m.value;if(!p)return null;let h=Fk(m.value/100,3),g=Fk(h,3)+c,b=100*((u.value-a.value)/p),k=Fk((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${y}, ${t})`}function Fc(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:Fk(d,3),unit:u}}function Fk(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var k6=l(A());var v6=l(x());function Nhe(e){let[t,o]=fe("typography.fontSizes","typography.customFontSize");return(0,v6.jsx)(k6.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o})}var AL=Nhe;var zk=l(q()),_6=l(O());var LL=l(x()),Dhe=[],y6=([e,...t])=>e.toUpperCase()+t.join(""),S6=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${y6(r)}`,o),{});return(0,zk.createHigherOrderComponent)((0,zk.compose)([(0,zk.createHigherOrderComponent)(o=>r=>{let[n]=fe("typography.fontSizes");return(0,LL.jsx)(o,{...r,fontSizes:n||Dhe})},"withFontSizes"),o=>class extends _6.Component{constructor(r){super(r),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((r,[n,i])=>{let s=y6(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=Sp(n,f,r[d]);return c[u]={...m,class:Vc(f)},c},{});return{...i,...a}}render(){return(0,LL.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var zc=l(M()),Ax=l(A());var x6=l(x()),Vhe=[{icon:Cc,title:(0,zc.__)("Align text left"),align:"left"},{icon:jd,title:(0,zc.__)("Align text center"),align:"center"},{icon:Bc,title:(0,zc.__)("Align text right"),align:"right"}],Fhe={placement:"bottom-start"};function zhe({value:e,onChange:t,alignmentControls:o=Vhe,label:r=(0,zc.__)("Align text"),description:n=(0,zc.__)("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,zc.isRTL)()?Bc:Cc}let d=s?Ax.ToolbarGroup:Ax.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:Fhe};return(0,x6.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 ML=zhe;var NL=l(x()),Lx=e=>(0,NL.jsx)(ML,{...e,isToolbar:!1}),w6=e=>(0,NL.jsx)(ML,{...e,isToolbar:!0});var jx=l(ot()),Hx=l(A()),$6=l(O()),Ux=l(K());var D6=l(V()),Hc=l(K()),jL=l(O());var A6=l(T6());var DL=function(e,t){return DL=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])},DL(e,t)};function I6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");DL(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var xo=function(){return xo=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},xo.apply(this,arguments)};function P6(e){return e.toLowerCase()}var Whe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],$he=/[^A-Z0-9]+/gi;function R6(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?Whe:o,n=t.stripRegexp,i=n===void 0?$he:n,s=t.transform,a=s===void 0?P6:s,c=t.delimiter,u=c===void 0?" ":c,d=O6(O6(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 O6(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var Khe=e=>e.name||"",Yhe=e=>e.title,qhe=e=>e.description||"",Zhe=e=>e.keywords||[],Xhe=e=>e.category,Qhe=()=>null,Jhe=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],ege=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),VL=new Map,FL=new Map;function Nx(e=""){if(VL.has(e))return VL.get(e);let t=R6(e,{splitRegexp:Jhe,stripRegexp:ege}).split(" ").filter(Boolean);return VL.set(e,t),t}function jk(e=""){if(FL.has(e))return FL.get(e);let t=(0,A6.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),FL.set(e,t),t}var Hk=(e="")=>Nx(jk(e)),tge=(e,t)=>e.filter(o=>!Hk(t).some(r=>r.includes(o))),Dx=(e,t,o,r)=>Hk(r).length===0?e:Uk(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),Uk=(e=[],t="",o={})=>{if(Hk(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=Khe,getTitle:n=Yhe,getDescription:i=qhe,getKeywords:s=Zhe,getCategory:a=Xhe,getCollection:c=Qhe}=o,u=r(e),d=n(e),f=i(e),m=s(e),p=a(e),h=c(e),g=jk(t),b=jk(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=Nx(g);tge(v,y).length===0&&(k+=10)}if(k!==0&&u.startsWith("core/")){let y=u!==e.id;k+=y?1:2}return k}var Ns=l(K()),xp=l(V()),Vx=l(O()),L6=l(qn()),Fx=l(M());var rge=(e,t,o)=>{let r=(0,Vx.useMemo)(()=>({[Ac]:!!o}),[o]),[n]=(0,xp.useSelect)(d=>[d(_).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=j((0,xp.useSelect)(_)),{createErrorNotice:s}=(0,xp.useDispatch)(L6.store),[a,c]=(0,xp.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(Ns.store);return[f(),m()]},[]),u=(0,Vx.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:p,content:h},g)=>{let b=i(d,e);if(b===null){let y=(0,Ns.getBlockType)(d)?.title??d;s((0,Fx.sprintf)((0,Fx.__)(`Block "%s" can't be inserted.`),y),{type:"snackbar",id:"inserter-notice"});return}let k=p==="unsynced"?(0,Ns.parse)(h,{__unstableSkipMigrationLogs:!0}):(0,Ns.createBlock)(d,f,(0,Ns.createBlocksFromInnerBlocksTemplate)(m));t(k,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},jc=rge;var M6=l(A());var N6=l(O()),zL=l(x());function nge({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:bO});let n=(0,zL.jsx)(M6.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,zL.jsx)("span",{style:i,className:F("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Te=(0,N6.memo)(nge);var zx=(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 wp=l(x()),ige=()=>{},sge=9;function age(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,D6.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:p}=u(_),{getActiveBlockVariation:h}=u(Hc.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]=jc(t,ige,!0),a=(0,jL.useMemo)(()=>(e.trim()?Dx(n,i,s,e):zx(Ms(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,sge),[e,o,n,i,s,r]);return[(0,jL.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,wp.jsxs)(wp.Fragment,{children:[(0,wp.jsx)(Te,{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,Hc.cloneBlock)(s)):(0,Hc.createBlock)(t,o,(0,Hc.createBlocksFromInnerBlocksTemplate)(r))}}}}var V6=age();var H6=l(z6()),U6=l($r());var G6=l(HL()),af=l(x()),lge=10;function cge(){return{name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await(0,H6.default)({path:(0,U6.addQueryArgs)("/wp/v2/search",{per_page:lge,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,af.jsxs)(af.Fragment,{children:[(0,af.jsx)(Ie,{icon:e.subtype==="page"?Za:vA},"icon"),(0,G6.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,af.jsx)("a",{href:e.url,children:e.title})}}}var W6=cge();var K6=l(x()),uge=[];function Y6({completers:e=uge}){let{name:t}=Ae();return(0,$6.useMemo)(()=>{let o=[...e,W6];return(t===(0,Ux.getDefaultBlockName)()||(0,Ux.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,V6]),(0,jx.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,jx.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function q6(e){return(0,Hx.__unstableUseAutocompleteProps)({...e,completers:Y6(e)})}function dge(e){return(0,K6.jsx)(Hx.Autocomplete,{...e,completers:Y6(e)})}var Z6=dge;var KL=l(M()),Kc=l(A());var gj=l(V());var Zx=l(O());var Zn=l(M());var qr=l(A());var Cp=l(M());var bn={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 kn(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function Uc(e,t=bn,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${kn(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function Gx(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,Cp.sprintf)((0,Cp.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,Cp.sprintf)((0,Cp.__)("Max %s wide"),o)),n}var Ui=l(M());var Wx=8,Gc=["top","right","bottom","left"],X6={top:void 0,right:void 0,bottom:void 0,left:void 0},$x={custom:J0,axial:J0,horizontal:RA,vertical:NA,top:MA,right:LA,bottom:OA,left:AA},Ds={default:(0,Ui.__)("Spacing control"),top:(0,Ui.__)("Top"),bottom:(0,Ui.__)("Bottom"),left:(0,Ui.__)("Left"),right:(0,Ui.__)("Right"),mixed:(0,Ui.__)("Mixed"),vertical:(0,Ui.__)("Vertical"),horizontal:(0,Ui.__)("Horizontal"),axial:(0,Ui.__)("Horizontal & vertical"),custom:(0,Ui.__)("Custom")},sl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function al(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function Kx(e,t){if(!al(e))return e;let o=Q6(e);return t.find(n=>String(n.slug)===o)?.size}function Wc(e,t){if(!e||al(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 Gk(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Q6(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 J6(e,t){if(e===void 0)return 0;let o=parseFloat(e,10)===0?"0":Q6(e),r=t.findIndex(n=>String(n.slug)===o);return r!==-1?r:NaN}function UL(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 fge(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 ej(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&&fge(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(UL(t)&&(a||c))return sl.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]:sl.custom}function mge(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function Er(e,t="0"){let o=mge(e);if(!o)return null;let r=Gk(o?.top)||t,n=Gk(o?.left)||t;return r===n?r:`${r} ${n}`}var Zt=l(x()),pge={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},tj={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},hge={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},oj={horizontal:"center",vertical:"top"},gge=["wrap","nowrap"],nj={name:"flex",label:(0,Zn.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0}=r;return(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsxs)(qr.Flex,{children:[i&&(0,Zt.jsx)(qr.FlexItem,{children:(0,Zt.jsx)(rj,{layout:t,onChange:o})}),n&&(0,Zt.jsx)(qr.FlexItem,{children:(0,Zt.jsx)(yge,{layout:t,onChange:o})})]}),(0,Zt.jsx)(vge,{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,Zt.jsxs)(ut,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,Zt.jsx)(rj,{layout:t,onChange:o,isToolbar:!0}),n&&(0,Zt.jsx)(bge,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=bn}){let{orientation:a="horizontal"}=o,c=r?.spacing?.blockGap&&!Ke(n,"spacing","blockGap")?Er(r?.spacing?.blockGap,"0.5em"):void 0,u=pge[o.justifyContent],d=gge.includes(o.flexWrap)?o.flexWrap:"wrap",f=hge[o.verticalAlignment],m=tj[o.justifyContent]||tj.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=`${kn(t)} { |
| 25 |
${h.join("; ")}; |
| 26 |
}`),i&&c&&(p+=Uc(t,s,"flex",c)),p},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function bge({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?oj.horizontal:oj.vertical,{verticalAlignment:n=r}=e;return(0,Zt.jsx)(Yx,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var kge={placement:"bottom-start"};function rj({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,Zt.jsx)(Bp,{allowedControls:s,value:r,onChange:i,popoverProps:kge});let a=[{value:"left",icon:Ic,label:(0,Zn.__)("Justify items left")},{value:"center",icon:Tc,label:(0,Zn.__)("Justify items center")},{value:"right",icon:Pc,label:(0,Zn.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:ip,label:(0,Zn.__)("Space between items")}):a.push({value:"stretch",icon:sp,label:(0,Zn.__)("Stretch items")}),(0,Zt.jsx)(qr.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,Zn.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,Zt.jsx)(qr.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function vge({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,Zt.jsx)(qr.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Zn.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function yge({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,Zt.jsxs)(qr.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,Zn.__)("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,Zt.jsx)(qr.__experimentalToggleGroupControlOptionIcon,{icon:Gd,value:"horizontal",label:(0,Zn.__)("Horizontal")}),(0,Zt.jsx)(qr.__experimentalToggleGroupControlOptionIcon,{icon:cO,value:"vertical",label:(0,Zn.__)("Vertical")})]})}var ij=l(M());var sj={name:"default",label:(0,ij.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=bn}){let s=Er(o?.spacing?.blockGap),a="";Ke(r,"spacing","blockGap")||(s?.top?a=Er(s?.top):typeof s=="string"&&(a=Er(s)));let c="";return n&&a&&(c+=Uc(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=Gx(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 Zr=l(A()),ll=l(M());var lj=l(Wk());var No=l(x()),cj={name:"constrained",label:(0,ll.__)("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:Ic,label:(0,ll.__)("Justify items left")},{value:"center",icon:Tc,label:(0,ll.__)("Justify items center")},{value:"right",icon:Pc,label:(0,ll.__)("Justify items right")}],[f]=fe("spacing.units"),m=(0,Zr.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,No.jsxs)(Zr.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,No.jsxs)(No.Fragment,{children:[(0,No.jsx)(Zr.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,ll.__)("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,No.jsx)(Zr.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,No.jsx)(Ie,{icon:Hd})})}),(0,No.jsx)(Zr.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,ll.__)("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,No.jsx)(Zr.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,No.jsx)(Ie,{icon:Jd})})}),(0,No.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,ll.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,No.jsx)(Zr.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,ll.__)("Justification"),value:s,onChange:u,children:d.map(({value:p,icon:h,label:g})=>(0,No.jsx)(Zr.__experimentalToggleGroupControlOptionIcon,{value:p,icon:h,label:g},p))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,No.jsx)(ut,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,No.jsx)(Sge,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=bn}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=Er(r?.spacing?.blockGap),f="";Ke(n,"spacing","blockGap")||(d?.top?f=Er(d?.top):typeof d=="string"&&(f=Er(d)));let m=u==="left"?"0 !important":"auto !important",p=u==="right"?"0 !important":"auto !important",h=a||c?` |
| 27 |
${kn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} { |
| 28 |
max-width: ${a??c}; |
| 29 |
margin-left: ${m}; |
| 30 |
margin-right: ${p}; |
| 31 |
} |
| 32 |
${kn(t,"> .alignwide")} { |
| 33 |
max-width: ${c??a}; |
| 34 |
} |
| 35 |
${kn(t,"> .alignfull")} { |
| 36 |
max-width: none; |
| 37 |
} |
| 38 |
`:"";return u==="left"?h+=`${kn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 39 |
{ margin-left: ${m}; }`:u==="right"&&(h+=`${kn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 40 |
{ margin-right: ${p}; }`),r?.spacing?.padding&&(0,lj.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let k=b.value==="0"?"0px":b.value;h+=` |
| 41 |
${kn(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 |
${kn(t,"> .alignfull")} { |
| 46 |
margin-left: calc(${k} * -1); |
| 47 |
} |
| 48 |
`}}),i&&f&&(h+=Uc(t,s,"constrained",f)),h},getOrientation(){return"vertical"},getAlignments(e){let t=Gx(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}},_ge={placement:"bottom-start"};function Sge({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,No.jsx)(Bp,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:_ge})}var Tr=l(M()),Xe=l(A()),qx=l(O());var Ue=l(x()),xge={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},wge=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],uj={name:"grid",label:(0,Tr.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,Ue.jsxs)(Ue.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,Ue.jsx)(Ege,{layout:t,onChange:o}),(0,Ue.jsxs)(Xe.__experimentalVStack,{spacing:4,children:[i&&(0,Ue.jsx)(Bge,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,Ue.jsx)(Cge,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=bn}){let{minimumColumnWidth:a=null,columnCount:c=null,rowCount:u=null}=o,d=r?.spacing?.blockGap&&!Ke(n,"spacing","blockGap")?Er(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=`${kn(t)} { ${m.join("; ")}; }`),i&&d&&(f+=Uc(t,s,"grid",d)),f},getOrientation(){return"horizontal"},getAlignments(){return[]}};function Cge({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,Ue.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,Ue.jsx)(Xe.BaseControl.VisualLabel,{as:"legend",children:(0,Tr.__)("Min. column width")}),(0,Ue.jsxs)(Xe.Flex,{gap:4,children:[(0,Ue.jsx)(Xe.FlexItem,{isBlock:!0,children:(0,Ue.jsx)(Xe.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:wge,min:0,label:(0,Tr.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,Ue.jsx)(Xe.FlexItem,{isBlock:!0,children:(0,Ue.jsx)(Xe.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:u,value:a||0,min:0,max:xge[c]||600,withInputField:!1,label:(0,Tr.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,Ue.jsx)("p",{className:"components-base-control__help",children:(0,Tr.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function Bge({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,Ue.jsx)(Ue.Fragment,{children:(0,Ue.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,Ue.jsx)(Xe.BaseControl.VisualLabel,{as:"legend",children:(0,Tr.__)("Max. columns")}),(0,Ue.jsxs)(Xe.Flex,{gap:4,children:[(0,Ue.jsx)(Xe.FlexItem,{isBlock:!0,children:(0,Ue.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,Tr.__)("Columns"),hideLabelFromVision:!s})}),(0,Ue.jsx)(Xe.FlexItem,{isBlock:!0,children:o&&s?(0,Ue.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,Tr.__)("Rows")}):(0,Ue.jsx)(Xe.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Tr.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function Ege({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,qx.useState)(o||3),[c,u]=(0,qx.useState)(r),[d,f]=(0,qx.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,Tr.__)("Grid items can be manually placed in any position on the grid."):(0,Tr.__)("Grid items are placed automatically depending on their order.");return(0,Ue.jsxs)(Xe.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,Tr.__)("Grid item position"),value:m,onChange:p,isBlock:!0,help:h,children:[(0,Ue.jsx)(Xe.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Tr.__)("Auto")},"auto"),(0,Ue.jsx)(Xe.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Tr.__)("Manual")},"manual")]})}var dj=[sj,nj,cj,uj];function Gi(e="default"){return dj.find(t=>t.name===e)}function fj(){return dj}var GL=l(x()),WL={type:"default"},$L=(0,Zx.createContext)(WL);$L.displayName="BlockLayoutContext";var mj=$L.Provider;function lf(){return(0,Zx.useContext)($L)}function pj({layout:e={},css:t,...o}){let r=Gi(e.type),[n]=fe("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,GL.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,GL.jsx)("style",{children:s})}return null}var Xx=[],hj=["none","left","center","right","wide","full"],Tge=["wide","full"];function $k(e=hj){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,gj.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(_).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=lf();if(t)return Xx;let s=Gi(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?Xx:u}if(s.name!=="default"&&s.name!=="constrained")return Xx;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&Tge.includes(c)?!1:hj.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?Xx:a}var $c=l(M());var Kk={none:{icon:Hd,title:(0,$c._x)("None","Alignment option")},left:{icon:dA,title:(0,$c.__)("Align left")},center:{icon:cA,title:(0,$c.__)("Align center")},right:{icon:mA,title:(0,$c.__)("Align right")},wide:{icon:Jd,title:(0,$c.__)("Wide width")},full:{icon:Ck,title:(0,$c.__)("Full width")}},bj="none";var cf=l(x());function Ige({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=$k(o);if(!!!i.length)return null;function a(p){t([e,"none"].includes(p)?void 0:p)}let c=Kk[e],u=Kk[bj],d=r?Kc.ToolbarGroup:Kc.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,KL.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:p})=>({...Kk[p],isActive:e===p||!e&&p==="none",role:n?"menuitemradio":void 0,onClick:()=>a(p)}))}:{toggleProps:{description:(0,KL.__)("Change alignment")},children:({onClose:p})=>(0,cf.jsx)(cf.Fragment,{children:(0,cf.jsx)(Kc.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:h,info:g})=>{let{icon:b,title:k}=Kk[h],y=h===e||!e&&h==="none";return(0,cf.jsx)(Kc.MenuItem,{icon:b,iconPosition:"left",className:F("components-dropdown-menu__menu-item",{"is-active":y}),isSelected:y,onClick:()=>{a(h),p()},role:"menuitemradio",info:g,children:k},h)})})})};return(0,cf.jsx)(d,{...f,...m})}var YL=Ige;var qL=l(x()),Qx=e=>(0,qL.jsx)(YL,{...e,isToolbar:!1}),kj=e=>(0,qL.jsx)(YL,{...e,isToolbar:!0});var xj=l(zd()),ow=l(M()),rw=l(K()),$i=l(A()),QL=l(V()),wj=l(O()),Cj=l(q());var XL=l(zd()),vj=l(K()),yj=l(A()),_j=l(V()),ew=l(O()),Sj=l(q());var Jx=l(V());function ZL(e){return!e||Object.keys(e).length===0}function cl(e){let{clientId:t}=Ae(),o=e||t,{updateBlockAttributes:r}=(0,Jx.useDispatch)(_),{getBlockAttributes:n}=(0,Jx.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};ZL(f.bindings)&&delete f.bindings,r(o,{metadata:ZL(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:ZL(c)?void 0:c})}}}var Wi=l(x()),{Menu:Yc}=j(yj.privateApis);function Pge({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,ew.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,ew.useContext)(Un),a=(0,_j.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=cl();return(0,Wi.jsxs)(Yc.CheckboxItem,{onChange:()=>{let u=(0,XL.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,XL.default)(e,o.args)??o.key===e?.key,children:[(0,Wi.jsx)(Yc.ItemLabel,{children:o.label}),(0,Wi.jsx)(Yc.ItemHelpText,{children:a[t]})]})}function Yk({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,Sj.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,vj.getBlockBindingsSource)(o);return(0,Wi.jsxs)(Yc,{placement:n?"bottom-start":"left-start",children:[(0,Wi.jsx)(Yc.SubmenuTriggerItem,{children:(0,Wi.jsx)(Yc.ItemLabel,{children:i.label})}),(0,Wi.jsx)(Yc.Popover,{gutter:8,children:(0,Wi.jsx)(Yc.Group,{children:r.map(s=>(0,Wi.jsx)(Pge,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var Xn=l(x()),{Menu:tw}=j($i.privateApis);function qk({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=cl(),n=(0,Cj.useViewportMatch)("medium","<"),i=(0,wj.useContext)(Un),s=(0,QL.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:k,getBlockType:y}=j(g(rw.store)),v=y(o).attributes?.[e]?.type,S=v==="rich-text"?"string":v,w={};return Object.entries(b()).forEach(([C,E])=>{let I=k(E,i);if(!I?.length)return;let R=I.filter(B=>B.type===S);R.length&&(w[C]=R)}),w},[e,o,i]),{canUpdateBlockBindings:a}=(0,QL.useSelect)(g=>({canUpdateBlockBindings:g(_).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,rw.getBlockBindingsSource)(d),p,h=!0;return t===void 0?(c?p=(0,ow.__)("Not connected"):p=(0,ow.__)("No sources available"),h=!0):m?p=s?.[d]?.find(g=>(0,xj.default)(g.args,f))?.label||m?.label||d:(h=!1,p=(0,ow.__)("Source not registered")),(0,Xn.jsx)($i.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,Xn.jsxs)(tw,{placement:n?"bottom-start":"left-start",children:[(0,Xn.jsx)(tw.TriggerButton,{render:(0,Xn.jsx)($i.__experimentalItem,{}),disabled:!c,children:(0,Xn.jsxs)($i.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,Xn.jsx)($i.__experimentalText,{truncate:!0,children:e}),(0,Xn.jsx)($i.__experimentalText,{truncate:!0,variant:h?"muted":void 0,isDestructive:!h,children:p})]})}),!u&&(0,Xn.jsx)(tw.Popover,{gutter:n?8:36,children:(0,Xn.jsx)(tw,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,Xn.jsx)(Yk,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var Bj=l(M()),Ej=l(A());var Tj=l(x());function Oge({isActive:e,label:t=(0,Bj.__)("Full height"),onToggle:o,isDisabled:r}){return(0,Tj.jsx)(Ej.ToolbarButton,{isActive:e,icon:np,label:t,onClick:()=>o(!e),disabled:r})}var Ij=Oge;var Oj=l(M()),Rj=l(nt()),uf=l(A()),Zk=l(x()),Rge=()=>{};function Age(e){let{label:t=(0,Oj.__)("Change matrix alignment"),onChange:o=Rge,value:r="center",isDisabled:n}=e,i=(0,Zk.jsx)(uf.AlignmentMatrixControl.Icon,{value:r});return(0,Zk.jsx)(uf.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,Zk.jsx)(uf.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===Rj.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,Zk.jsx)(uf.AlignmentMatrixControl,{onChange:o,value:r})})}var Aj=Age;var tM=l(A()),sw=l(V()),oM=l(M());var zj=l(O());var Lj=l(V()),nw=l(K());function Do({clientId:e,maximumLength:t,context:o}){let r=(0,Lj.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(_),{getBlockType:a,getActiveBlockVariation:c}=n(nw.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,nw.__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 Xk({clientId:e,maximumLength:t,context:o}){return Do({clientId:e,maximumLength:t,context:o})}var df=l(O()),Dj=l(q());var iw=l(O()),JL=l(q()),Mj=l(x()),Qk=(0,iw.createContext)({refsMap:(0,JL.observableMap)()});Qk.displayName="BlockRefsContext";function Nj({children:e}){let t=(0,iw.useMemo)(()=>({refsMap:(0,JL.observableMap)()}),[]);return(0,Mj.jsx)(Qk.Provider,{value:t,children:e})}function Vj(e){let{refsMap:t}=(0,df.useContext)(Qk);return(0,Dj.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function eM(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function ff(e,t){let{refsMap:o}=(0,df.useContext)(Qk);(0,df.useLayoutEffect)(()=>{eM(t,o.get(e));let r=o.subscribe(e,()=>eM(t,o.get(e)));return()=>{r(),eM(t,null)}},[o,e,t])}function dt(e){let[t,o]=(0,df.useState)(null);return ff(e,o),t}function Fj(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 vn=l(x());function Lge({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,sw.useDispatch)(_),{clientId:r,parents:n,hasSelection:i}=(0,sw.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=j(c(_)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,oM.__)("Document"),a=(0,zj.useRef)();return ff(r,a),(0,vn.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,oM.__)("Block breadcrumb"),children:[(0,vn.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,vn.jsx)(tM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),Fj(c)?.focus()},children:s}),!i&&(0,vn.jsx)("span",{children:s}),!!r&&(0,vn.jsx)(Ie,{icon:Ec,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,vn.jsxs)("li",{children:[(0,vn.jsx)(tM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,vn.jsx)(Xk,{clientId:c,maximumLength:35})}),(0,vn.jsx)(Ie,{icon:Ec,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,vn.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,vn.jsx)(Xk,{clientId:r,maximumLength:35})})]})}var jj=Lge;var Hj=l(V());function Uj(e){return(0,Hj.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(_);return o(e)},[e])}var bE=l(q()),XZ=l(O()),QZ=l(V());var ci=l(V()),Y1=l(q()),Cu=l(O()),J$=l(K());var iu=l(O()),Fe=l(K()),o8=l(A()),Zw=l(V()),r8=l(q()),n8=l(Ve());var ul=l(M()),lw=l(A()),mf=l(O()),Tp=l(K()),cw=l(V());var Qj=l(Yj()),aw=l(M()),Jj=l(K());var qj=l(A()),Zj=l(O()),Xj=l(Ve()),Vs=l(x());function nM({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,Vs.jsxs)("div",{className:i,children:[(0,Vs.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,Vs.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,Vs.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,Vs.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,Vs.jsx)(Zj.RawHTML,{children:(0,Xj.safeHTML)(o)})})]}),(0,Vs.jsx)("div",{className:"block-editor-block-compare__action",children:(0,Vs.jsx)(qj.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var Ep=l(x());function zge({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,Qj.diffChars)(u,d).map((m,p)=>{let h=F({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,Ep.jsx)("span",{className:h,children:m.value},p)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,Jj.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,Ep.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,Ep.jsx)(nM,{title:(0,aw.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,aw.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,Ep.jsx)(nM,{title:(0,aw.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var eH=zge;var dl=l(x()),tH=e=>(0,Tp.rawHandler)({HTML:e.originalContent});function oH({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,cw.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,cw.useDispatch)(_),[i,s]=(0,mf.useState)(!1),a=(0,mf.useCallback)(()=>s(!1),[]),c=(0,mf.useMemo)(()=>({toClassic(){let d=(0,Tp.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,Tp.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=tH(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,Tp.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,mf.useMemo)(()=>[{title:(0,ul._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,ul.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,ul.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,dl.jsxs)(dl.Fragment,{children:[(0,dl.jsx)(Dc,{actions:[(0,dl.jsx)(lw.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,ul.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,ul.__)("Block contains unexpected or invalid content.")}),i&&(0,dl.jsx)(lw.Modal,{title:(0,ul.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,dl.jsx)(eH,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:tH,convertButtonText:(0,ul.__)("Convert to Blocks")})})]})}var rH=l(M());var nH=l(x()),jge=(0,nH.jsx)(Dc,{className:"block-editor-block-list__block-crash-warning",children:(0,rH.__)("This block has encountered an error and cannot be previewed.")}),iH=()=>jge;var sH=l(O()),Hge=class extends sH.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},aH=Hge;var CH=l(lM()),mw=l(O()),pw=l(V()),zs=l(K());var BH=l(x());function Jge({clientId:e}){let[t,o]=(0,mw.useState)(""),r=(0,pw.useSelect)(s=>s(_).getBlock(e),[e]),{updateBlock:n}=(0,pw.useDispatch)(_),i=()=>{let s=(0,zs.getBlockType)(r.name);if(!s)return;let a=(0,zs.getBlockAttributes)(s,t,r.attributes),c=t||(0,zs.getSaveContent)(s,a),[u]=t?(0,zs.validateBlock)({...r,attributes:a,originalContent:c}):[!0];n(e,{attributes:a,originalContent:c,isValid:u}),t||o(c)};return(0,mw.useEffect)(()=>{o((0,zs.getBlockContent)(r))},[r]),(0,BH.jsx)(CH.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:i,onChange:s=>o(s.target.value)})}var EH=Jge;var JU=l(O()),Kw=l(M()),e8=l(K()),Yw=l(q()),t8=l(tv());var uM=rv(),be=e=>ov(e,uM),dM=rv();be.write=e=>ov(e,dM);var hw=rv();be.onStart=e=>ov(e,hw);var fM=rv();be.onFrame=e=>ov(e,fM);var mM=rv();be.onFinish=e=>ov(e,mM);var Ip=[];be.setTimeout=(e,t)=>{let o=be.now()+t,r=()=>{let i=Ip.findIndex(s=>s.cancel==r);~i&&Ip.splice(i,1),Zc-=~i?1:0},n={time:o,handler:e,cancel:r};return Ip.splice(IH(o),0,n),Zc+=1,PH(),n};var IH=e=>~(~Ip.findIndex(t=>t.time>e)||~Ip.length);be.cancel=e=>{hw.delete(e),fM.delete(e),mM.delete(e),uM.delete(e),dM.delete(e)};be.sync=e=>{cM=!0,be.batchedUpdates(e),cM=!1};be.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,be.onStart(o)}return r.handler=e,r.cancel=()=>{hw.delete(o),t=null},r};var pM=typeof window<"u"?window.requestAnimationFrame:()=>{};be.use=e=>pM=e;be.now=typeof performance<"u"?()=>performance.now():Date.now;be.batchedUpdates=e=>e();be.catch=console.error;be.frameLoop="always";be.advance=()=>{be.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):RH()};var qc=-1,Zc=0,cM=!1;function ov(e,t){cM?(t.delete(e),e(0)):(t.add(e),PH())}function PH(){qc<0&&(qc=0,be.frameLoop!=="demand"&&pM(OH))}function ebe(){qc=-1}function OH(){~qc&&(pM(OH),be.batchedUpdates(RH))}function RH(){let e=qc;qc=be.now();let t=IH(qc);if(t&&(AH(Ip.splice(0,t),o=>o.handler()),Zc-=t),!Zc){ebe();return}hw.flush(),uM.flush(e?Math.min(64,qc-e):16.667),fM.flush(),dM.flush(),mM.flush()}function rv(){let e=new Set,t=e;return{add(o){Zc+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return Zc-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,Zc-=t.size,AH(t,r=>r(o)&&e.add(r)),Zc+=e.size,t=e)}}}function AH(e,t){e.forEach(o=>{try{t(o)}catch(r){be.catch(r)}})}var Jn=l(Fs());function yw(){}var FH=(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 js(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 ft=(e,t)=>e.forEach(t);function ei(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 Xr=e=>ne.und(e)?[]:ne.arr(e)?e:[e];function Ap(e,t){if(e.size){let o=Array.from(e);e.clear(),ft(o,t)}}var Lp=(e,...t)=>Ap(e,o=>o(...t)),yM=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),_M,zH,Xc=null,jH=!1,SM=yw,tbe=e=>{e.to&&(zH=e.to),e.now&&(be.now=e.now),e.colors!==void 0&&(Xc=e.colors),e.skipAnimation!=null&&(jH=e.skipAnimation),e.createStringInterpolator&&(_M=e.createStringInterpolator),e.requestAnimationFrame&&be.use(e.requestAnimationFrame),e.batchedUpdates&&(be.batchedUpdates=e.batchedUpdates),e.willAdvance&&(SM=e.willAdvance),e.frameLoop&&(be.frameLoop=e.frameLoop)},yn=Object.freeze({__proto__:null,get createStringInterpolator(){return _M},get to(){return zH},get colors(){return Xc},get skipAnimation(){return jH},get willAdvance(){return SM},assign:tbe}),nv=new Set,Qn=[],hM=[],kw=0,Mp={get idle(){return!nv.size&&!Qn.length},start(e){kw>e.priority?(nv.add(e),be.onStart(obe)):(HH(e),be(kM))},advance:kM,sort(e){if(kw)be.onFrame(()=>Mp.sort(e));else{let t=Qn.indexOf(e);~t&&(Qn.splice(t,1),UH(e))}},clear(){Qn=[],nv.clear()}};function obe(){nv.forEach(HH),nv.clear(),be(kM)}function HH(e){Qn.includes(e)||UH(e)}function UH(e){Qn.splice(rbe(Qn,t=>t.priority>e.priority),0,e)}function kM(e){let t=hM;for(let o=0;o<Qn.length;o++){let r=Qn[o];kw=r.priority,r.idle||(SM(r),r.advance(e),r.idle||t.push(r))}return kw=0,hM=Qn,hM.length=0,Qn=t,Qn.length>0}function rbe(e,t){let o=e.findIndex(t);return o<0?e.length:o}var GH={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},Ki="[-+]?\\d*\\.?\\d+",vw=Ki+"%";function _w(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var nbe=new RegExp("rgb"+_w(Ki,Ki,Ki)),ibe=new RegExp("rgba"+_w(Ki,Ki,Ki,Ki)),sbe=new RegExp("hsl"+_w(Ki,vw,vw)),abe=new RegExp("hsla"+_w(Ki,vw,vw,Ki)),lbe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,cbe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ube=/^#([0-9a-fA-F]{6})$/,dbe=/^#([0-9a-fA-F]{8})$/;function fbe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ube.exec(e))?parseInt(t[1]+"ff",16)>>>0:Xc&&Xc[e]!==void 0?Xc[e]:(t=nbe.exec(e))?(Pp(t[1])<<24|Pp(t[2])<<16|Pp(t[3])<<8|255)>>>0:(t=ibe.exec(e))?(Pp(t[1])<<24|Pp(t[2])<<16|Pp(t[3])<<8|NH(t[4]))>>>0:(t=lbe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=dbe.exec(e))?parseInt(t[1],16)>>>0:(t=cbe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=sbe.exec(e))?(LH(MH(t[1]),gw(t[2]),gw(t[3]))|255)>>>0:(t=abe.exec(e))?(LH(MH(t[1]),gw(t[2]),gw(t[3]))|NH(t[4]))>>>0:null}function gM(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 LH(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=gM(n,r,e+1/3),s=gM(n,r,e),a=gM(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Pp(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function MH(e){return(parseFloat(e)%360+360)%360/360}function NH(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function gw(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function DH(e){let t=fbe(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 Qc=(e,t,o)=>{if(ne.fun(e))return e;if(ne.arr(e))return Qc({range:e,output:t,extrapolate:o});if(ne.str(e.output[0]))return _M(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=pbe(u,i);return mbe(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function mbe(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 pbe(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function vM(){return vM=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},vM.apply(this,arguments)}var Op=Symbol.for("FluidValue.get"),pf=Symbol.for("FluidValue.observers"),Ir=e=>!!(e&&e[Op]),Qo=e=>e&&e[Op]?e[Op]():e,xM=e=>e[pf]||null;function hbe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function hf(e,t){let o=e[pf];o&&o.forEach(r=>{hbe(r,t)})}var Rp=class{constructor(t){if(this[Op]=void 0,this[pf]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");gbe(this,t)}},gbe=(e,t)=>WH(e,Op,t);function Jc(e,t){if(e[Op]){let o=e[pf];o||WH(e,pf,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function eu(e,t){let o=e[pf];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[pf]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var WH=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),bw=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bbe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,VH=new RegExp(`(${bw.source})(%|[a-z]+)`,"i"),kbe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Sw=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,$H=e=>{let[t,o]=vbe(e);if(!t||yM())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&&Sw.test(o))return $H(o);if(o)return o}return e},vbe=e=>{let t=Sw.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},bM,ybe=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,xw=e=>{bM||(bM=Xc?new RegExp(`(${Object.keys(Xc).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>Qo(i).replace(Sw,$H).replace(bbe,DH).replace(bM,DH)),o=t.map(i=>i.match(bw).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=>Qc(vM({},e,{output:i})));return i=>{var s;let a=!VH.test(t[0])&&((s=t.find(u=>VH.test(u)))==null?void 0:s.replace(bw,"")),c=0;return t[0].replace(bw,()=>`${n[c++](i)}${a||""}`).replace(kbe,ybe)}},KH="react-spring: ",YH=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${KH}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},_be=YH(console.warn);function qH(){_be(`${KH}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var a3e=YH(console.warn);function Np(e){return ne.str(e)&&(e[0]=="#"||/\d/.test(e)||!yM()&&Sw.test(e)||e in(Xc||{}))}var iv=yM()?Jn.useEffect:Jn.useLayoutEffect,Sbe=()=>{let e=(0,Jn.useRef)(!1);return iv(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function wM(){let e=(0,Jn.useState)()[1],t=Sbe();return()=>{t.current&&e(Math.random())}}function ZH(e,t){let[o]=(0,Jn.useState)(()=>({inputs:t,result:e()})),r=(0,Jn.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&xbe(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,Jn.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function xbe(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 CM=e=>(0,Jn.useEffect)(e,wbe),wbe=[];var hv=l(Fs()),gv=l(Fs());var eU=l(Fs()),ml=l(Fs()),sv=Symbol.for("Animated:node"),Cbe=e=>!!e&&e[sv]===e,Yi=e=>e&&e[sv],Ew=(e,t)=>FH(e,sv,t),av=e=>e&&e[sv]&&e[sv].getPayload(),ww=class{constructor(){this.payload=void 0,Ew(this,this)}getPayload(){return this.payload||[]}},gf=class e extends ww{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)}},bf=class e extends gf{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Qc({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=Qc({output:[this.getValue(),t]})),this._value=0,super.reset()}},Cw={dependencies:null},kf=class extends ww{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return ei(this.source,(r,n)=>{Cbe(r)?o[n]=r.getValue(t):Ir(r)?o[n]=Qo(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&ft(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return ei(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){Cw.dependencies&&Ir(t)&&Cw.dependencies.add(t);let o=av(t);o&&ft(o,r=>this.add(r))}},BM=class e extends kf{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(Bbe)),!0)}};function Bbe(e){return(Np(e)?bf:gf).create(e)}function Tw(e){let t=Yi(e);return t?t.constructor:ne.arr(e)?BM:Np(e)?bf:gf}function Bw(){return Bw=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},Bw.apply(this,arguments)}var XH=(e,t)=>{let o=!ne.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ml.forwardRef)((r,n)=>{let i=(0,ml.useRef)(null),s=o&&(0,ml.useCallback)(h=>{i.current=Tbe(n,h)},[n]),[a,c]=Ebe(r,t),u=wM(),d=()=>{let h=i.current;if(o&&!h)return;(h?t.applyAnimatedValues(h,a.getValue(!0)):!1)===!1&&u()},f=new EM(d,c),m=(0,ml.useRef)();iv(()=>(m.current=f,ft(c,h=>Jc(h,f)),()=>{m.current&&(ft(m.current.deps,h=>eu(h,m.current)),be.cancel(m.current.update))})),(0,ml.useEffect)(d,[]),CM(()=>()=>{let h=m.current;ft(h.deps,g=>eu(g,h))});let p=t.getComponentProps(a.getValue());return eU.createElement(e,Bw({},p,{ref:s}))})},EM=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&be.write(this.update)}};function Ebe(e,t){let o=new Set;return Cw.dependencies=o,e.style&&(e=Bw({},e,{style:t.createAnimatedStyle(e.style)})),e=new kf(e),Cw.dependencies=null,[e,o]}function Tbe(e,t){return e&&(ne.fun(e)?e(t):e.current=t),t}var QH=Symbol.for("AnimatedComponent"),tU=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new kf(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=JH(s)||"Anonymous";return ne.str(s)?s=i[s]||(i[s]=XH(s,n)):s=s[QH]||(s[QH]=XH(s,n)),s.displayName=`Animated(${a})`,s};return ei(e,(s,a)=>{ne.arr(e)&&(a=JH(s)),i[a]=i(s)}),{animated:i}},JH=e=>ne.str(e)?e:e&&ne.str(e.displayName)?e.displayName:ne.fun(e)&&e.name||null;function Pr(){return Pr=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},Pr.apply(this,arguments)}function vf(e,...t){return ne.fun(e)?e(...t):e}var dv=(e,t)=>e===!0||!!(t&&e&&(ne.fun(e)?e(t):Xr(e).includes(t))),mU=(e,t)=>ne.obj(e)?t&&e[t]:e,pU=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Ibe=e=>e,hU=(e,t=Ibe)=>{let o=Pbe;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},Pbe=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Obe={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 Rbe(e){let t={},o=0;if(ei(e,(r,n)=>{Obe[n]||(t[n]=r,o++)}),o)return t}function gU(e){let t=Rbe(e);if(t){let o={to:t};return ei(e,(r,n)=>n in t||(o[n]=r)),o}return Pr({},e)}function fv(e){return e=Qo(e),ne.arr(e)?e.map(fv):Np(e)?yn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function PM(e){return ne.fun(e)||ne.arr(e)&&ne.obj(e[0])}var Abe={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}},Ow=1.70158,Iw=Ow*1.525,oU=Ow+1,rU=2*Math.PI/3,nU=2*Math.PI/4.5,Pw=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,Lbe={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=>oU*e*e*e-Ow*e*e,easeOutBack:e=>1+oU*Math.pow(e-1,3)+Ow*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Iw+1)*2*e-Iw)/2:(Math.pow(2*e-2,2)*((Iw+1)*(e*2-2)+Iw)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*rU),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*rU)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*nU))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*nU)/2+1,easeInBounce:e=>1-Pw(1-e),easeOutBounce:Pw,easeInOutBounce:e=>e<.5?(1-Pw(1-2*e))/2:(1+Pw(2*e-1))/2},OM=Pr({},Abe.default,{mass:1,damping:1,easing:Lbe.linear,clamp:!1}),RM=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,OM)}};function Mbe(e,t,o){o&&(o=Pr({},o),iU(o,t),t=Pr({},o,t)),iU(e,t),Object.assign(e,t);for(let s in OM)e[s]==null&&(e[s]=OM[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 iU(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 sU=[],AM=class{constructor(){this.changed=!1,this.values=sU,this.toValues=null,this.fromValues=sU,this.to=void 0,this.from=void 0,this.config=new RM,this.immediate=!1}};function bU(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=dv((c=o.cancel)!=null?c:r?.cancel,t);if(f)h();else{ne.und(o.pause)||(n.paused=dv(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||dv(g,t)),u=vf(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-be.now()}function p(){u>0&&!yn.skipAnimation?(n.delayed=!0,d=be.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(Pr({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var zM=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?Dp(e.get()):t.every(o=>o.noop)?kU(e.get()):qi(e.get(),t.every(o=>o.finished)),kU=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),qi=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),Dp=e=>({value:e,cancelled:!0,finished:!1});function vU(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=hU(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)&&Dp(r)||n!==o.asyncId&&qi(r,!1);if(k)throw b.result=k,f(b),b},h=(b,k)=>{let y=new Rw,v=new Aw;return(async()=>{if(yn.skipAnimation)throw mv(o),v.result=qi(r,!1),f(v),v;p(y);let S=ne.obj(b)?Pr({},b):Pr({},k,{to:b});S.parentId=n,ei(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(yn.skipAnimation)return mv(o),qi(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=qi(r.get(),!0,!1)}catch(b){if(b instanceof Rw)g=b.result;else if(b instanceof Aw)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)&&be.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function mv(e,t){Ap(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Rw=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}},Aw=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},LM=e=>e instanceof pv,Nbe=1,pv=class extends Rp{constructor(...t){super(...t),this.id=Nbe++,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=Yi(this);return t&&t.getValue()}to(...t){return yn.to(this,t)}interpolate(...t){return qH(),yn.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){hf(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||Mp.sort(this),hf(this,{type:"priority",parent:this,priority:t})}},yf=Symbol.for("SpringPhase"),yU=1,MM=2,NM=4,TM=e=>(e[yf]&yU)>0,tu=e=>(e[yf]&MM)>0,lv=e=>(e[yf]&NM)>0,aU=(e,t)=>t?e[yf]|=MM|yU:e[yf]&=~MM,lU=(e,t)=>t?e[yf]|=NM:e[yf]&=~NM,DM=class extends pv{constructor(t,o){if(super(),this.key=void 0,this.animation=new AM,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)?Pr({},t):Pr({},o,{from:t});ne.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(tu(this)||this._state.asyncTo)||lv(this)}get goal(){return Qo(this.animation.to)}get velocity(){let t=Yi(this);return t instanceof gf?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return TM(this)}get isAnimating(){return tu(this)}get isPaused(){return lv(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=av(n.to);!a&&Ir(n.to)&&(s=Xr(Qo(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==bf?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,I,R=!1,B=1,P=Math.ceil(t/B);for(let T=0;T<P&&(I=Math.abs(y)>S,!(!I&&(p=Math.abs(m-h)<=v,p)));++T){C&&(R=h==m||h>m==E,R&&(y=-y*w,h=m));let L=-i.tension*1e-6*(h-m),z=-i.friction*.001*y,U=(L+z)/i.mass;y=y+U*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=Yi(this),u=c.getValue();if(o){let d=Qo(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 be.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(tu(this)){let{to:t,config:o}=this.animation;be.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:Pr({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>zM(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),mv(this._state,t&&this._lastCallId),be.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||PM(r))&&(r=void 0),n=ne.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return TM(this)||(t.reverse&&([r,n]=[n,r]),n=Qo(n),ne.und(n)?Yi(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Pr({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,hU(r,(c,u)=>/^on/.test(u)?mU(c,n):c)),uU(this,r,"onProps"),uv(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 bU(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{lv(this)||(lU(this,!0),Lp(a.pauseQueue),uv(this,"onPause",qi(this,cv(this,this.animation.to)),this))},resume:()=>{lv(this)&&(lU(this,!1),tu(this)&&this._resume(),Lp(a.resumeQueue),uv(this,"onResume",qi(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=_U(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(Dp(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(Dp(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=!js(m,d);p&&(c.from=m),m=Qo(m);let h=!js(f,u);h&&this._focus(f);let g=PM(o.to),{config:b}=c,{decay:k,velocity:y}=b;(n||i)&&(b.velocity=0),o.config&&!g&&Mbe(b,vf(o.config,s),o.config!==a.config?vf(a.config,s):void 0);let v=Yi(this);if(!v||ne.und(f))return r(qi(this,!0));let S=ne.und(o.reset)?i&&!o.default:!ne.und(m)&&dv(o.reset,s),w=S?m:this.get(),C=fv(f),E=ne.num(C)||ne.arr(C)||Np(C),I=!g&&(!E||dv(a.immediate||o.immediate,s));if(h){let T=Tw(f);if(T!==v.constructor)if(I)v=this._set(C);else throw Error(`Cannot animate between ${v.constructor.name} and ${T.name}, as the "to" prop suggests`)}let R=v.constructor,B=Ir(f),P=!1;if(!B){let T=S||!TM(this)&&p;(h||T)&&(P=js(fv(w),C),B=!P),(!js(c.immediate,I)&&!I||!js(b.decay,k)||!js(b.velocity,y))&&(B=!0)}if(P&&tu(this)&&(c.changed&&!S?B=!0:B||this._stop(u)),!g&&((B||Ir(u))&&(c.values=v.getPayload(),c.toValues=Ir(f)?null:R==bf?[1]:Xr(C)),c.immediate!=I&&(c.immediate=I,!I&&!S&&this._set(u)),B)){let{onRest:T}=c;ft(Dbe,z=>uU(this,o,z));let L=qi(this,cv(this,u));Lp(this._pendingCalls,L),this._pendingCalls.add(r),c.changed&&be.batchedUpdates(()=>{c.changed=!S,T?.(L,this),S?vf(a.onRest,L):c.onStart==null||c.onStart(L,this)})}S&&this._set(w),g?r(vU(o.to,o,this._state,this)):B?this._start():tu(this)&&!h?this._pendingCalls.add(r):r(kU(w))}_focus(t){let o=this.animation;t!==o.to&&(xM(this)&&this._detach(),o.to=t,xM(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;Ir(o)&&(Jc(o,this),LM(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Ir(t)&&eu(t,this)}_set(t,o=!0){let r=Qo(t);if(!ne.und(r)){let n=Yi(this);if(!n||!js(r,n.getValue())){let i=Tw(r);!n||n.constructor!=i?Ew(this,i.create(r)):n.setValue(r),n&&be.batchedUpdates(()=>{this._onChange(r,o)})}}return Yi(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,uv(this,"onStart",qi(this,cv(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),vf(this.animation.onChange,t,this)),vf(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Yi(this).reset(Qo(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),tu(this)||(aU(this,!0),lv(this)||this._resume())}_resume(){yn.skipAnimation?this.finish():Mp.start(this)}_stop(t,o){if(tu(this)){aU(this,!1);let r=this.animation;ft(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),hf(this,{type:"idle",parent:this});let n=o?Dp(this.get()):qi(this.get(),cv(this,t??r.to));Lp(this._pendingCalls,n),r.changed&&(r.changed=!1,uv(this,"onRest",n,this))}}};function cv(e,t){let o=fv(t),r=fv(e.get());return js(r,o)}function _U(e,t=e.loop,o=e.to){let r=vf(t);if(r){let n=r!==!0&&gU(r),i=(n||e).reverse,s=!n||n.reset;return VM(Pr({},e,{loop:t,default:!1,pause:void 0,to:!i||PM(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function VM(e){let{to:t,from:o}=e=gU(e),r=new Set;return ne.obj(t)&&cU(t,r),ne.obj(o)&&cU(o,r),e.keys=r.size?Array.from(r):null,e}function cU(e,t){ei(e,(o,r)=>o!=null&&t.add(r))}var Dbe=["onStart","onRest","onChange","onPause","onResume"];function uU(e,t,o){e.animation[o]=t[o]!==pU(t,o)?mU(t[o],e.key):void 0}function uv(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 Vbe=["onStart","onChange","onRest"],Fbe=1,Lw=class{constructor(t,o){this.id=Fbe++,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(Pr({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(VM(t)),this}start(t){let{queue:o}=this;return t?o=Xr(t).map(VM):this.queue=[],this._flush?this._flush(this,o):(xU(this,o),zbe(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;ft(Xr(o),n=>r[n].stop(!!t))}else mv(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;ft(Xr(t),r=>o[r].pause())}return this}resume(t){if(ne.und(t))this.start({pause:!1});else{let o=this.springs;ft(Xr(t),r=>o[r].resume())}return this}each(t){ei(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,Ap(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&&Ap(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,Ap(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;be.onFrame(this._onFrame)}};function zbe(e,t){return Promise.all(t.map(o=>SU(e,o))).then(o=>zM(e,o))}async function SU(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)):ft(Vbe,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,Lp(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||pU(t,"cancel")===!0;(d||p&&f.asyncId)&&m.push(bU(++e._lastAsyncId,{props:t,state:f,actions:{pause:yw,resume:yw,start(g,b){p?(mv(f,e._lastAsyncId),b(Dp(e))):(g.onRest=a,b(vU(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let h=zM(e,await Promise.all(m));if(s&&h.finished&&!(o&&h.noop)){let g=_U(t,s,n);if(g)return xU(e,[g]),SU(e,g,!0)}return c&&be.batchedUpdates(()=>c(h,e,e.item)),h}function jbe(e,t){let o=new DM;return o.key=e,t&&Jc(o,t),o}function Hbe(e,t,o){t.keys&&ft(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function xU(e,t){ft(t,o=>{Hbe(e.springs,o,r=>jbe(r,e))})}function Ube(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 Gbe=["children"],jM=e=>{let{children:t}=e,o=Ube(e,Gbe),r=(0,gv.useContext)(Mw),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=ZH(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=Mw;return hv.createElement(s,{value:o},t)},Mw=Wbe(jM,{});jM.Provider=Mw.Provider;jM.Consumer=Mw.Consumer;function Wbe(e,t){return Object.assign(e,hv.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var dU;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(dU||(dU={}));var FM=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=Qc(...o);let r=this._get(),n=Tw(r);Ew(this,n.create(r))}advance(t){let o=this._get(),r=this.get();js(o,r)||(Yi(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&fU(this._active)&&IM(this)}_get(){let t=ne.arr(this.source)?this.source.map(Qo):Xr(Qo(this.source));return this.calc(...t)}_start(){this.idle&&!fU(this._active)&&(this.idle=!1,ft(av(this),t=>{t.done=!1}),yn.skipAnimation?(be.batchedUpdates(()=>this.advance()),IM(this)):Mp.start(this))}_attach(){let t=1;ft(Xr(this.source),o=>{Ir(o)&&Jc(o,this),LM(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){ft(Xr(this.source),t=>{Ir(t)&&eu(t,this)}),this._active.clear(),IM(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=Xr(this.source).reduce((o,r)=>Math.max(o,(LM(r)?r.priority:0)+1),0))}};function $be(e){return e.idle!==!1}function fU(e){return!e.size||Array.from(e).every($be)}function IM(e){e.idle||(e.idle=!0,ft(av(e),t=>{t.done=!0}),hf(e,{type:"idle",parent:e}))}yn.assign({createStringInterpolator:xw,to:(e,t)=>new FM(e,t)});var b3e=Mp.advance;var EU=l(CU());function WM(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 Kbe=["style","children","scrollTop","scrollLeft"],TU=/^--/;function Ybe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!TU.test(e)&&!(bv.hasOwnProperty(e)&&bv[e])?t+"px":(""+t).trim()}var BU={};function qbe(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=WM(r,Kbe),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:BU[f]||(BU[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=Ybe(f,n[f]);TU.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 bv={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},Zbe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Xbe=["Webkit","Ms","Moz","O"];bv=Object.keys(bv).reduce((e,t)=>(Xbe.forEach(o=>e[Zbe(o,t)]=e[t]),e),bv);var Qbe=["x","y","z"],Jbe=/^(matrix|translate|scale|rotate|skew)/,eke=/^(translate)/,tke=/^(rotate|skew)/,HM=(e,t)=>ne.num(e)&&e!==0?e+t:e,Nw=(e,t)=>ne.arr(e)?e.every(o=>Nw(o,t)):ne.num(e)?e===t:parseFloat(e)===t,UM=class extends kf{constructor(t){let{x:o,y:r,z:n}=t,i=WM(t,Qbe),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>HM(u,"px")).join(",")})`,Nw(c,0)])),ei(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(Jbe.test(u)){if(delete i[u],ne.und(c))return;let d=eke.test(u)?"px":tke.test(u)?"deg":"";s.push(Xr(c)),a.push(u==="rotate3d"?([f,m,p,h])=>[`rotate3d(${f},${m},${p},${HM(h,d)})`,Nw(h,0)]:f=>[`${u}(${f.map(m=>HM(m,d)).join(",")})`,Nw(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new GM(s,a)),super(i)}},GM=class extends Rp{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 ft(this.inputs,(r,n)=>{let i=Qo(r[0]),[s,a]=this.transforms[n](ne.arr(i)?i:r.map(Qo));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&ft(this.inputs,o=>ft(o,r=>Ir(r)&&Jc(r,this)))}observerRemoved(t){t==0&&ft(this.inputs,o=>ft(o,r=>Ir(r)&&eu(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),hf(this,t)}},oke=["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"],rke=["scrollTop","scrollLeft"];yn.assign({batchedUpdates:EU.unstable_batchedUpdates,createStringInterpolator:xw,colors:GH});var nke=tU(oke,{applyAnimatedValues:qbe,createAnimatedStyle:e=>new UM(e),getComponentProps:e=>WM(e,rke)}),IU=nke.animated;var Vp=l(O()),OU=l(Ve()),RU=l(V());var ike=200;function PU(e){return{top:e.offsetTop,left:e.offsetLeft}}function ske({triggerAnimationOnChange:e,clientId:t}){let o=(0,Vp.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,RU.useSelect)(_),{previous:d,prevRect:f}=(0,Vp.useMemo)(()=>({previous:o.current&&PU(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,Vp.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,OU.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()>ike){b();return}let y=p||a(t)||c(t);if(y&&g)return;let v=y?"1":"",S=new Lw({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:I}){if(!o.current)return;let{x:R,y:B}=I;R=Math.round(R),B=Math.round(B);let P=R===0&&B===0;o.current.style.transformOrigin="center center",o.current.style.transform=P?null:`translate3d(${R}px,${B}px,0)`,o.current.style.zIndex=v,b()}});o.current.style.transform=void 0;let w=PU(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 Dw=ske;var zw=l(O()),pl=l(Ve()),AU=l(V());var Vw=".block-editor-block-list__block",ake=".block-list-appender",lke=".block-editor-button-block-appender";function Fw(e,t){return e.closest(Vw)===t.closest(Vw)}function ou(e,t){return t.closest([Vw,ake,lke].join(","))===e}function ru(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(Vw);if(o)return o.id.slice(6)}function $M(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 cke(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 uke(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var dke=["core/navigation"];function Fp(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&dke.includes(r)){let s=[e],a;for(;a=s.pop();)if(!uke(a)){for(let c of a.children)if(cke(c)){let u=c.getBoundingClientRect();o=$M(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 LU({clientId:e,initialPosition:t}){let o=(0,zw.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=j((0,AU.useSelect)(_));return(0,zw.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(ou(o.current,s.activeElement))return;let a=pl.focus.tabbable.find(o.current).filter(d=>(0,pl.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!ou(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=pl.focus.tabbable.findNext(o.current);if(d&&ou(o.current,d)&&(0,pl.isFormElement)(d)){d.focus();return}}(0,pl.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var MU=l(q());function jw(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function NU({isEnabled:e=!0}={}){return(0,MU.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",jw),t.addEventListener("mouseover",jw),()=>{t.removeEventListener("mouseout",jw),t.removeEventListener("mouseover",jw),t.classList.remove("is-hovered")}},[e])}var Hw=l(V()),DU=l(q());function VU(e){let{isBlockSelected:t}=(0,Hw.useSelect)(_),{selectBlock:o,selectionChange:r}=(0,Hw.useDispatch)(_);return(0,DU.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}ou(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var zU=l(Ve()),nu=l(nt()),Uw=l(V()),jU=l(q());function FU(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function HU({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s}=j((0,Uw.useSelect)(_)),{insertAfterBlock:a,removeBlock:c,resetZoomLevel:u,startDraggingBlocks:d,stopDraggingBlocks:f,editContentOnlySection:m}=j((0,Uw.useDispatch)(_));return(0,jU.useRefEffect)(p=>{if(!t)return;function h(k){let{keyCode:y,target:v}=k;y!==nu.ENTER&&y!==nu.BACKSPACE&&y!==nu.DELETE||v!==p||(0,zU.isTextField)(v)||(k.preventDefault(),y===nu.ENTER&&r()?u():y===nu.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(),I=p.cloneNode(!0);I.style.visibility="hidden",I.style.display="none";let R=p.id;p.id=null;let B=1;{let Z=p;for(;Z=Z.parentElement;){let{scale:se}=S.getComputedStyle(Z);if(se&&se!=="none"){B=parseFloat(se);break}}}let P=1/B;p.after(I);let T={};for(let Z of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])T[Z]=p.style[Z];let L=S.scrollY,z=S.scrollX,U=k.clientX,H=k.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let N=k.clientX-E.left,D=k.clientY-E.top,W=E.height>200?200/E.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${N*P}px ${D*P}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${W})`,p.style.opacity="0.9",FU(S.getComputedStyle(p).backgroundColor)){let Z="transparent",se=p;for(;se=se.parentElement;){let{backgroundColor:ce}=S.getComputedStyle(se);if(!FU(ce)){Z=ce;break}}p.style.backgroundColor=Z}let $=!1;function X(Z){$||($=!0,p.style.pointerEvents="none");let se=S.scrollY,ce=S.scrollX;p.style.top=`${(Z.clientY-H+se-L)*P}px`,p.style.left=`${(Z.clientX-U+ce-z)*P}px`}function te(){v.removeEventListener("dragover",X),v.removeEventListener("dragend",te),v.removeEventListener("drop",te),v.removeEventListener("scroll",X);for(let[Z,se]of Object.entries(T))p.style[Z]=se;I.remove(),p.id=R,C.remove(),f(),document.body.classList.remove("is-dragging-components-draggable"),v.documentElement.classList.remove("is-dragging")}v.addEventListener("dragover",X),v.addEventListener("dragend",te),v.addEventListener("drop",te),v.addEventListener("scroll",X),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 UU=l(q()),GU=l(O());function WU(){let e=(0,GU.useContext)(Gw);return(0,UU.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var Ww=l(q());function $U({isSelected:e}){let t=(0,Ww.useReducedMotion)();return(0,Ww.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 KU=l(q()),YU=l(V());function $w({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=j((0,YU.useSelect)(_));return(0,KU.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 qU=l(q()),kv=new Map;function fke(e,t){let o=kv.get(e);o||(o=new Set,kv.set(e,o),e.addEventListener("pointerdown",XU)),o.add(t)}function mke(e,t){let o=kv.get(e);o&&(o.delete(t),ZU(t),o.size===0&&(kv.delete(e),e.removeEventListener("pointerdown",XU)))}function ZU(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function XU(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=kv.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)ZU(a)}function QU(){return(0,qU.useRefEffect)(e=>(fke(e.ownerDocument,e),()=>{mke(e.ownerDocument,e)}),[])}function vv(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:I,defaultClassName:R,isSectionBlock:B,isWithinSectionBlock:P,canMove:T,isBlockHidden:L}=(0,JU.useContext)(hn),z=(0,Kw.sprintf)((0,Kw.__)("Block: %s"),d),U=a==="html"&&!t?"-visual":"",H=QU(),N=!P,D=(0,Yw.useMergeRefs)([e.ref,LU({clientId:o,initialPosition:h}),Vj(o),VU(o),HU({clientId:o,isSelected:f}),NU({isEnabled:N}),WU(),Dw({triggerAnimationOnChange:s,clientId:o}),(0,Yw.useDisabled)({isDisabled:!p}),$w({clientId:o,isEnabled:B}),$U({isSelected:f}),T?H:void 0]),W=Ae(),X=!!W[qm]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};u<2&&o===W.clientId&&(0,t8.default)(`Block type "${c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let te=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(te=!0),{tabIndex:g==="disabled"?-1:0,draggable:T&&!w?!0:void 0,...n,...e,ref:D,id:`block-${o}${U}`,role:"document","aria-label":z,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:F("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":te,"is-editing-content-only-section":I,"is-block-hidden":L},r,e.className,n.className,R),style:{...n.style,...e.style,...X}}}vv.save=e8.__unstableGetBlockProps;var ao=l(x());function pke(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=F(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function qw({children:e,isHtml:t,...o}){return(0,ao.jsx)("div",{...vv(o,{__unstableIsHtml:t}),children:e})}function KM({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,iu.useContext)(hn),E=lf()||{},I=(0,ao.jsx)(Ex,{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,Fe.getBlockType)(u);R?.getEditWrapperProps&&(m=pke(m,R.getEditWrapperProps(f)));let B=m&&!!m["data-align"]&&!w,P=a?.includes("is-position-sticky");B&&(I=(0,ao.jsx)("div",{className:F("wp-block",P&&a),"data-align":m["data-align"],children:I}));let T;if(d)t==="html"?T=(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)("div",{style:{display:"none"},children:I}),(0,ao.jsx)(qw,{isHtml:!0,children:(0,ao.jsx)(EH,{clientId:n})})]}):R?.apiVersion>1?T=I:T=(0,ao.jsx)(qw,{children:I});else{let H=e?(0,Fe.serializeRawBlock)(e):(0,Fe.getSaveContent)(R,f);T=(0,ao.jsxs)(qw,{className:"has-warning",children:[(0,ao.jsx)(oH,{clientId:n}),(0,ao.jsx)(iu.RawHTML,{children:(0,n8.safeHTML)(H)})]})}let{"data-align":L,...z}=m??{},U={...z,className:F(z.className,L&&w&&`align${L}`,!(L&&P)&&a)};return(0,ao.jsx)(hn.Provider,{value:{wrapperProps:U,isAligned:B,...C},children:(0,ao.jsx)(aH,{fallback:(0,ao.jsx)(qw,{className:"has-warning",children:(0,ao.jsx)(iH,{})}),children:T})})}var hke=(0,Zw.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 I(){let B=k(p),P=(0,Fe.getDefaultBlockName)(),T=(0,Fe.getBlockType)(P);if(v(p)!==P){let L=(0,Fe.switchToBlockType)(B,P);L&&L.length&&s(p,L)}else if((0,Fe.isUnmodifiedDefaultBlock)(B)){let L=b(p);L&&o.batch(()=>{d(p),f(L)})}else if(T.merge){let L=T.merge({},B.attributes);s([p],[(0,Fe.createBlock)(P,L)])}}function R(B,P=!0){let T=v(B),z=(0,Fe.getBlockType)(T).category==="text",U=C(B),H=S(B),[N]=H;H.length===1&&(0,Fe.isUnmodifiedBlock)(k(N))?d(B):z?o.batch(()=>{if(E(v(N),U))u([N],B,U,w(B));else{let D=(0,Fe.switchToBlockType)(k(N),(0,Fe.getDefaultBlockName)());D&&D.length&&D.every(W=>E(W.name,U))?(n(D,w(B),U,P),d(N,!1)):I()}!S(B).length&&(0,Fe.isUnmodifiedBlock)(k(B))&&d(B,!1)}):I()}if(m){if(h){let P=b(h);if(P)if(v(h)===v(P)){let T=y(h),L=y(P);if(Object.keys(T).every(z=>T[z]===L[z])){o.batch(()=>{u(S(P),P,h),d(P,!1)});return}}else{i(h,P);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 P=g(h);if(P&&v(h)===v(P)){let T=y(h),L=y(P);if(Object.keys(T).every(z=>T[z]===L[z])){o.batch(()=>{u(S(h),h,P),d(h,!1)});return}}R(h)}else I()}},onReplace(m,p,h){m.length&&!(0,Fe.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)}}});KM=(0,r8.compose)(hke,(0,o8.withFilters)("editor.BlockListBlock"))(KM);function gke(e){let{clientId:t,rootClientId:o}=e,r=(0,Zw.useSelect)(ie=>{let{isBlockSelected:J,getBlockMode:G,isSelectionEnabled:oe,getTemplateLock:ue,isSectionBlock:le,getParentSectionBlock:ke,getBlockWithoutAttributes:Be,getBlockAttributes:Re,canRemoveBlock:Kt,canMoveBlock:kt,getSettings:_o,getEditedContentOnlySection:Yt,getBlockEditingMode:We,getBlockName:xt,isFirstMultiSelectedBlock:ro,getMultiSelectedBlockClientIds:$e,hasSelectedInnerBlock:ho,getBlocksByName:Nt,getBlockIndex:no,isBlockMultiSelected:Ni,isBlockSubtreeDisabled:dr,isBlockHighlighted:Ne,__unstableIsFullySelected:So,__unstableSelectionHasUnmergeableBlock:Dt,isBlockBeingDragged:wt,isDragging:Ps,__unstableHasActiveBlockOverlayActive:Di,getSelectedBlocksInitialCaretPosition:ye}=j(ie(_)),Ct=Be(t);if(!Ct)return;let{hasBlockSupport:re,getActiveBlockVariation:Pe}=ie(Fe.store),He=Re(t),{name:io,isValid:Ko}=Ct,zn=(0,Fe.getBlockType)(io),{supportsLayout:Vi,isPreviewMode:Nd,__experimentalBlockBindingsSupportedAttributes:Km}=_o(),Wb=Km?.[io],Dd=zn?.apiVersion>1,kc={isPreviewMode:Nd,blockWithoutAttributes:Ct,name:io,attributes:He,isValid:Ko,themeSupportsLayout:Vi,index:no(t),isReusable:(0,Fe.isReusableBlock)(zn),className:Dd?He.className:void 0,defaultClassName:Dd?(0,Fe.getBlockDefaultClassName)(io):void 0,blockTitle:zn?.title,isBlockHidden:He?.metadata?.blockVisibility===!1,bindableAttributes:Wb};if(Nd)return kc;let{isBlockHidden:$b}=j(ie(_)),Vd=J(t),V2=Kt(t),F2=kt(t),z2=Pe(io,He),de=Ni(t),_e=ho(t,!0),Ze=We(t),fr=(0,Fe.hasBlockSupport)(io,"multiple",!0)?[]:Nt(io),Ua=fr.length&&fr[0]!==t;return{...kc,mode:G(t),isSelectionEnabled:oe(),isLocked:!!ue(o),isSectionBlock:le(t),isWithinSectionBlock:le(t)||!!ke(t),canRemove:V2,canMove:F2,isSelected:Vd,isEditingContentOnlySection:Yt()===t,blockEditingMode:Ze,mayDisplayControls:Vd||ro(t)&&$e().every(Ga=>xt(Ga)===io),mayDisplayParentControls:re(xt(t),"__experimentalExposeControlsToChildren",!1)&&ho(t),blockApiVersion:zn?.apiVersion||1,blockTitle:z2?.title||zn?.title,isSubtreeDisabled:Ze==="disabled"&&dr(t),hasOverlay:Di(t)&&!Ps(),initialPosition:Vd?ye():void 0,isHighlighted:Ne(t),isMultiSelected:de,isPartiallySelected:de&&!So()&&!Dt(),isDragging:wt(t),hasChildSelected:_e,isEditingDisabled:Ze==="disabled",hasEditableOutline:Ze!=="disabled"&&We(o)==="disabled",originalBlockClientId:Ua?fr[0]:!1,isBlockHidden:$b(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:I,initialPosition:R,isHighlighted:B,isMultiSelected:P,isPartiallySelected:T,isReusable:L,isDragging:z,hasChildSelected:U,isSectionBlock:H,isWithinSectionBlock:N,isEditingDisabled:D,hasEditableOutline:W,className:$,defaultClassName:X,originalBlockClientId:te,isBlockHidden:Z,bindableAttributes:se}=r,ce=(0,iu.useMemo)(()=>({...d,attributes:m}),[d,m]);if(!r)return null;let Q={isPreviewMode:n,clientId:t,className:$,index:S,mode:i,name:f,blockApiVersion:w,blockTitle:C,isSelected:h,isSubtreeDisabled:E,hasOverlay:I,initialPosition:R,blockEditingMode:k,isHighlighted:B,isMultiSelected:P,isPartiallySelected:T,isReusable:L,isDragging:z,hasChildSelected:U,isSectionBlock:H,isWithinSectionBlock:N,isEditingDisabled:D,hasEditableOutline:W,isEditingContentOnlySection:b,defaultClassName:X,mayDisplayControls:y,mayDisplayParentControls:v,originalBlockClientId:te,themeSupportsLayout:g,canMove:u,isBlockHidden:Z,bindableAttributes:se};return Z&&!h&&!P&&!U?null:(0,ao.jsx)(hn.Provider,{value:Q,children:(0,ao.jsx)(KM,{...e,mode:i,isSelectionEnabled:s,isLocked:a,canRemove:c,canMove:u,block:ce,name:f,attributes:m,isValid:p,isSelected:h})})}var i8=(0,iu.memo)(gke);var m5=l(V()),n$=l(K());var d5=l(M()),JW=l(HL()),O1=l(V()),R1=l(nt());var XW=l(Xo()),El=l(M()),T1=l(A()),QW=l(O()),I1=l(V()),P1=l(q()),Jv=l(K());var It=l(O()),Sh=l(A()),_u=l(M()),w1=l(q()),YW=l(V());var zp=l(M()),jp=l(O()),a8=l(A()),yv=l(x()),s8=[(0,jp.createInterpolateElement)((0,zp.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,yv.jsx)("kbd",{})}),(0,jp.createInterpolateElement)((0,zp.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,yv.jsx)("kbd",{})}),(0,jp.createInterpolateElement)((0,zp.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,yv.jsx)("kbd",{})}),(0,zp.__)("Drag files into the editor to automatically insert media blocks."),(0,zp.__)("Change a block's type by pressing the block icon on the toolbar.")];function bke(){let[e]=(0,jp.useState)(Math.floor(Math.random()*s8.length));return(0,yv.jsx)(a8.Tip,{children:s8[e]})}var l8=bke;var lh=l(K()),RG=l(O()),AG=l(M());var Zi=l(A()),Xw=l(V()),c8=l(Oe()),Hp=l(M());var Qr=l(x()),{Badge:kke}=j(Zi.privateApis);function vke({children:e,onClick:t}){return t?(0,Qr.jsx)(Zi.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function yke({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,c8.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,Xw.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,Xw.useDispatch)(_),p=a?"div":"h2";return(0,Qr.jsxs)("div",{className:F("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:[f&&(0,Qr.jsx)(Zi.Button,{onClick:()=>m(f),label:f?(0,Hp.__)("Go to parent Navigation block"):(0,Hp.__)("Go to parent section"),style:{minWidth:24,padding:0},icon:(0,Hp.isRTL)()?qo:wr,size:"small"}),c&&(0,Qr.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,Qr.jsx)(Zi.Icon,{icon:(0,Hp.isRTL)()?Ud:Gd})}),(0,Qr.jsxs)(vke,{onClick:a?()=>{m(a)}:void 0,children:[(0,Qr.jsx)(Te,{icon:t,showColors:!0}),(0,Qr.jsxs)(Zi.__experimentalVStack,{spacing:1,children:[(0,Qr.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,Qr.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,Qr.jsx)(kke,{children:e})]}),!a&&!c&&o&&(0,Qr.jsx)(Zi.__experimentalText,{className:"block-editor-block-card__description",children:o}),u]})]})]})}var _v=yke;var KC=l(q()),GN=l(V()),Ef=l(O()),UN=l(Oe());var V8=l(V()),fC=l(O()),F8=l(A());var iC=l(V());var it=(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))(it||{}),Sv=(e=>(e.Processing="PROCESSING",e.Paused="PAUSED",e))(Sv||{}),su=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e))(su||{});var _ke=()=>{},Ske={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:_ke}};function xke(e=Ske,t={type:it.Unknown}){switch(t.type){case it.PauseQueue:return{...e,queueStatus:"paused"};case it.ResumeQueue:return{...e,queueStatus:"active"};case it.Add:return{...e,queue:[...e.queue,t.item]};case it.Cancel:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,error:t.error}:o)};case it.Remove:return{...e,queue:e.queue.filter(o=>o.id!==t.id)};case it.OperationStart:return{...e,queue:e.queue.map(o=>o.id===t.id?{...o,currentOperation:t.operation}:o)};case it.AddOperations:return{...e,queue:e.queue.map(o=>o.id!==t.id?o:{...o,operations:[...o.operations||[],...t.operations]})};case it.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 it.CacheBlobUrl:{let o=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...o,t.blobUrl]}}}case it.RevokeBlobUrls:{let o={...e.blobUrls};return delete o[t.id],{...e,blobUrls:o}}case it.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e}var YM=xke;var Qw={};Os(Qw,{getItems:()=>wke,getSettings:()=>Tke,isUploading:()=>Cke,isUploadingById:()=>Eke,isUploadingByUrl:()=>Bke});function wke(e){return e.queue}function Cke(e){return e.queue.length>=1}function Bke(e,t){return e.queue.some(o=>o.attachment?.url===t||o.sourceUrl===t)}function Eke(e,t){return e.queue.some(o=>o.attachment?.id===t||o.sourceAttachmentId===t)}function Tke(e){return e.settings}var qM={};Os(qM,{getAllItems:()=>Ike,getBlobUrls:()=>Mke,getItem:()=>Pke,getPausedUploadForPost:()=>Ake,isBatchUploaded:()=>Oke,isPaused:()=>Lke,isUploadingToPost:()=>Rke});function Ike(e){return e.queue}function Pke(e,t){return e.queue.find(o=>o.id===t)}function Oke(e,t){return e.queue.filter(r=>t===r.batchId).length===0}function Rke(e,t){return e.queue.some(o=>o.currentOperation===su.Upload&&o.additionalData.post===t)}function Ake(e,t){return e.queue.find(o=>o.status===Sv.Paused&&o.additionalData.post===t)}function Lke(e){return e.queueStatus==="paused"}function Mke(e,t){return e.blobUrls[t]||[]}var oC={};Os(oC,{addItems:()=>Fke,cancelItem:()=>zke});var Jw,Nke=new Uint8Array(16);function ZM(){if(!Jw&&(Jw=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Jw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Jw(Nke)}var Jo=[];for(let e=0;e<256;++e)Jo.push((e+256).toString(16).slice(1));function u8(e,t=0){return Jo[e[t+0]]+Jo[e[t+1]]+Jo[e[t+2]]+Jo[e[t+3]]+"-"+Jo[e[t+4]]+Jo[e[t+5]]+"-"+Jo[e[t+6]]+Jo[e[t+7]]+"-"+Jo[e[t+8]]+Jo[e[t+9]]+"-"+Jo[e[t+10]]+Jo[e[t+11]]+Jo[e[t+12]]+Jo[e[t+13]]+Jo[e[t+14]]+Jo[e[t+15]]}var Dke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),XM={randomUUID:Dke};function Vke(e,t,o){if(XM.randomUUID&&!t&&!e)return XM.randomUUID();e=e||{};let r=e.random||(e.rng||ZM)();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 u8(r)}var xv=Vke;var eC=l(M());var _f=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 d8(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 _f({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,eC.sprintf)((0,eC.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}var tC=l(M());function f8(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 m8(e,t){let o=f8(t);if(!o)return;let r=o.includes(e.type);if(e.type&&!r)throw new _f({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,tC.sprintf)((0,tC.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}var Up=l(M());function p8(e,t){if(e.size<=0)throw new _f({code:"EMPTY_FILE",message:(0,Up.sprintf)((0,Up.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new _f({code:"SIZE_ABOVE_LIMIT",message:(0,Up.sprintf)((0,Up.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Fke({files:e,onChange:t,onSuccess:o,onError:r,onBatchSuccess:n,additionalData:i,allowedTypes:s}){return async({select:a,dispatch:c})=>{let u=xv();for(let d of e){try{d8(d,s),m8(d,a.getSettings().allowedMimeTypes)}catch(f){r?.(f);continue}try{p8(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 zke(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:it.Cancel,id:e,error:t}),n.removeItem(e),n.revokeBlobUrls(e),i.batchId&&r.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}var QM={};Os(QM,{addItem:()=>Gke,finishOperation:()=>qke,pauseQueue:()=>$ke,prepareItem:()=>Zke,processItem:()=>Wke,removeItem:()=>Yke,resumeQueue:()=>Kke,revokeBlobUrls:()=>Qke,updateSettings:()=>Jke,uploadItem:()=>Xke});var Gp=l(rC());var jke=l($r()),Hke=l(M());function g8(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 Uke(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}function b8(e){return Uke(e,e.name)}var k8=class extends File{constructor(e="stub-file"){super([],e)}};function Gke({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=xv(),p=g8(e),h;p instanceof k8||(h=(0,Gp.createBlobURL)(p),f({type:it.CacheBlobUrl,id:m,blobUrl:h})),f({type:it.Add,item:{id:m,batchId:t,status:Sv.Processing,sourceFile:b8(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:[su.Prepare]}}),f.processItem(m)}}function Wke(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:it.OperationStart,id:e,operation:u}),u){case su.Prepare:o.prepareItem(r.id);break;case su.Upload:o.uploadItem(e);break}}}function $ke(){return{type:it.PauseQueue}}function Kke(){return async({select:e,dispatch:t})=>{t({type:it.ResumeQueue});for(let o of e.getAllItems())t.processItem(o.id)}}function Yke(e){return async({select:t,dispatch:o})=>{t.getItem(e)&&o({type:it.Remove,id:e})}}function qke(e,t){return async({dispatch:o})=>{o({type:it.OperationFinish,id:e,item:t}),o.processItem(e)}}function Zke(e){return async({dispatch:t})=>{let o=[su.Upload];t({type:it.AddOperations,id:e,operations:o}),t.finishOperation(e,{})}}function Xke(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,Gp.isBlobURL)(n.url)||o.finishOperation(e,{attachment:n})},onSuccess:([n])=>{o.finishOperation(e,{attachment:n})},onError:n=>{o.cancelItem(e,n)}})}}function Qke(e){return async({select:t,dispatch:o})=>{let r=t.getBlobUrls(e);for(let n of r)(0,Gp.revokeBlobURL)(n);o({type:it.RevokeBlobUrls,id:e})}}function Jke(e){return{type:it.UpdateSettings,settings:e}}var v8=l(aS()),{lock:dFe,unlock:wv}=(0,v8.__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 nC="core/upload-media";var y8={reducer:YM,selectors:Qw,actions:oC},au=(0,iC.createReduxStore)(nC,{reducer:YM,selectors:Qw,actions:oC});(0,iC.register)(au);wv(au).registerPrivateActions(QM);wv(au).registerPrivateSelectors(qM);var w8=l(O()),C8=l(V());var _8=l(O()),Wp=l(V()),S8=l(q());var sC=l(x());function eve(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,Wp.createRegistry)({},t),r.registerStore(nC,y8),e.set(t,r)),r}var tve=(0,S8.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...o})=>{let r=(0,Wp.useRegistry)(),[n]=(0,_8.useState)(()=>new WeakMap),i=eve(n,r,t);return i===r?(0,sC.jsx)(e,{registry:r,...o}):(0,sC.jsx)(Wp.RegistryProvider,{value:i,children:(0,sC.jsx)(e,{registry:i,...o})})},"withRegistryProvider"),x8=tve;var aC=l(x()),ove=x8(e=>{let{children:t,settings:o}=e,{updateSettings:r}=wv((0,C8.useDispatch)(au));return(0,w8.useEffect)(()=>{r(o)},[o,r]),(0,aC.jsx)(aC.Fragment,{children:t})}),JM=ove;var B8=l(O()),$p=l(V()),E8=l(q());var lC=l(x());function rve(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,$p.createRegistry)({},t),r.registerStore(qt,kp),e.set(t,r)),r}var nve=(0,E8.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...o})=>{let r=(0,$p.useRegistry)(),[n]=(0,B8.useState)(()=>new WeakMap),i=rve(n,r,t);return i===r?(0,lC.jsx)(e,{registry:r,...o}):(0,lC.jsx)($p.RegistryProvider,{value:i,children:(0,lC.jsx)(e,{registry:i,...o})})},"withRegistryProvider"),T8=nve;var ti=l(O()),cC=l(V()),P8=l(K());var I8=()=>{};function uC({clientId:e=null,value:t,selection:o,onChange:r=I8,onInput:n=I8}){let i=(0,cC.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,cC.useSelect)(E=>!e||E(_).areInnerBlocksControlled(e),[e]),b=(0,ti.useRef)({incoming:null,outgoing:[]}),k=(0,ti.useRef)(!1),y=()=>{t&&(d(),e?i.batch(()=>{u(e,!0);let E=t.map(I=>(0,P8.cloneBlock)(I));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,ti.useRef)(n),w=(0,ti.useRef)(r);(0,ti.useEffect)(()=>{S.current=n,w.current=r},[n,r]),(0,ti.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,ti.useRef)(!1);(0,ti.useEffect)(()=>{if(!C.current){C.current=!0;return}g||(b.current.outgoing=[],y())},[g]),(0,ti.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:I,__unstableIsLastBlockChangeIgnored:R,areInnerBlocksControlled:B}=i.select(_),P=m(e),T=I(),L=!1;k.current=!0;let z=i.subscribe(()=>{if(e!==null&&f(e)===null||!(!e||B(e)))return;let H=I(),N=m(e),D=N!==P;if(P=N,D&&(b.current.incoming||R())){b.current.incoming=null,T=H;return}(D||L&&!D&&H&&!T)&&(T=H,b.current.outgoing.push(P),(T?w.current:S.current)(P,{selection:{selectionStart:p(),selectionEnd:h(),initialPosition:E()}})),L=D},_);return()=>{k.current=!1,z()}},[i,e]),(0,ti.useEffect)(()=>()=>{v()},[])}var R8=l(O()),A8=l(V()),L8=l(hl()),bo=l(M());function M8(){return null}function ive(){let{registerShortcut:e}=(0,A8.useDispatch)(L8.store);return(0,R8.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,bo.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,bo.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,bo.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,bo.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,bo.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,bo.__)("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,bo.__)("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,bo.__)("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,bo.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,bo.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,bo.__)("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,bo.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,bo.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,bo.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,bo.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,bo.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,bo.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,bo.__)("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,bo.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}})},[e]),null}M8.Register=ive;var dC=M8;var N8=l(O());function sve(e={}){return(0,N8.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes}),[e])}var D8=sve;var Sf=l(x()),ave=()=>{};function lve(e,{allowedTypes:t,additionalData:o={},filesList:r,onError:n=ave,onFileChange:i,onSuccess:s,onBatchSuccess:a}){e.dispatch(au).addItems({files:r,onChange:i,onSuccess:s,onBatchSuccess:a,onError:({message:c})=>n(c),additionalData:o,allowedTypes:t})}var Kp=T8(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=D8(t),i=t;window.__experimentalMediaProcessing&&t.mediaUpload&&(i=(0,fC.useMemo)(()=>({...t,mediaUpload:lve.bind(null,o)}),[t,o]));let{__experimentalUpdateSettings:s}=j((0,V8.useDispatch)(_));(0,fC.useEffect)(()=>{s({...i,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[i,r,s]),uC(e);let a=(0,Sf.jsxs)(F8.SlotFillProvider,{passthrough:!0,children:[!i?.isPreviewMode&&(0,Sf.jsx)(dC.Register,{}),(0,Sf.jsx)(Nj,{children:e.children})]});return window.__experimentalMediaProcessing?(0,Sf.jsx)(JM,{settings:n,useSubRegistry:!1,children:a}):a}),cve=e=>(0,Sf.jsx)(Kp,{...e,stripExperimentalSettings:!0,children:e.children}),z8=cve;var jv=l(q()),SG=l(V()),$C=l(O()),xG=l(A());var Qi=l(O()),C7=l(M()),lu=l(q()),B7=l(A()),sN=l(V());var mC=l(V()),j8=l(q());var H8=l(x());function gl(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,mC.useSelect)(_),{clearSelectedBlock:r}=(0,mC.useDispatch)(_),{clearBlockSelection:n}=e();return(0,j8.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 U8(e){return(0,H8.jsx)("div",{ref:gl(),...e})}var v7=l(V()),y7=l(M()),Tv=l(q()),_7=l(O());var G8=l(q()),W8=l(V());function uve(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 $8(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,W8.useSelect)(uve,[]);return(0,G8.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 Yp=l(Ve()),eN=l(nt()),pC=l(V()),hC=l(q()),Cv=l(O());var tN=l(x());function K8(){let e=(0,Cv.useRef)(),t=(0,Cv.useRef)(),o=(0,Cv.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=j((0,pC.useSelect)(_)),{setLastFocus:d}=j((0,pC.useDispatch)(_)),f=(0,Cv.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=Yp.focus.tabbable.find(e.current);S.length&&(v?S[0]:S[S.length-1]).focus()}}let p=(0,tN.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),h=(0,tN.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,hC.useRefEffect)(k=>{function y(E){if(E.defaultPrevented||E.keyCode!==eN.TAB||!o.current||!t.current)return;let{target:I,shiftKey:R}=E,B=R?"findPrevious":"findNext",P=Yp.focus.tabbable[B](I),T=I.closest("[data-block]"),L=T&&P&&(Fw(T,P)||ou(T,P));if((0,Yp.isFormElement)(P)&&L)return;let z=R?t:o;f.current=!0,z.current.focus({preventScroll:!0})}function v(E){d({...a(),current:E.target});let{ownerDocument:I}=k;!E.relatedTarget&&E.target.hasAttribute("data-block")&&I.activeElement===I.body&&i()===0&&k.focus()}function S(E){if(E.keyCode!==eN.TAB||E.target?.getAttribute("role")==="region"||e.current===E.target)return;let R=E.shiftKey?"findPrevious":"findNext",B=Yp.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,hC.useMergeRefs)([e,g]);return[p,b,h]}var Vo=l(Ve()),Hs=l(nt()),gC=l(V()),Y8=l(q());function dve(e,t,o){let r=t===Hs.UP||t===Hs.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 oN(e,t,o,r){let n=Vo.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&&Fw(a,a.firstElementChild)&&a.firstElementChild.getAttribute("contenteditable")==="true")){if(!Vo.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 q8(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,gC.useSelect)(_),{selectBlock:i}=(0,gC.useDispatch)(_);return(0,Y8.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let p=oN(f,m,s);return p&&ru(p)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:p,shiftKey:h,ctrlKey:g,altKey:b,metaKey:k}=f,y=m===Hs.UP,v=m===Hs.DOWN,S=m===Hs.LEFT,w=m===Hs.RIGHT,C=y||S,E=S||w,I=y||v,R=E||I,B=h||g||b||k,P=I?Vo.isVerticalEdge:Vo.isHorizontalEdge,{ownerDocument:T}=s,{defaultView:L}=T;if(!R)return;if(r()){if(h||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!dve(p,m,B))return;I?a||(a=(0,Vo.computeCaretRect)(L)):a=null;let z=(0,Vo.isRTL)(p)?!C:C,{keepCaretInsideBlock:U}=o();if(h)u(p,C)&&P(p,C)&&(s.contentEditable=!0,s.focus());else if(I&&(0,Vo.isVerticalEdge)(p,C)&&(!b||(0,Vo.isHorizontalEdge)(p,z))&&!U){let H=oN(p,C,s,!0);H&&((0,Vo.placeCaretAtVerticalEdge)(H,b?!C:C,b?void 0:a),f.preventDefault())}else if(E&&L.getSelection().isCollapsed&&(0,Vo.isHorizontalEdge)(p,z)&&!U){let H=oN(p,z,s);(0,Vo.placeCaretAtHorizontalEdge)(H,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var Z8=l(Ve()),bC=l(V()),X8=l(hl()),Q8=l(q());function J8(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,bC.useSelect)(_),{multiSelect:r,selectBlock:n}=(0,bC.useDispatch)(_),i=(0,X8.__unstableUseShortcutEventMatch)();return(0,Q8.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,Z8.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 kC=l(V()),t7=l(q());function e7(e,t){e.contentEditable=t,t&&e.focus()}function o7(){let{startMultiSelect:e,stopMultiSelect:t}=(0,kC.useDispatch)(_),{isSelectionEnabled:o,hasSelectedBlock:r,isDraggingBlocks:n,isMultiSelecting:i}=(0,kC.useSelect)(_);return(0,t7.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a,u,d;function f(){t(),c.removeEventListener("mouseup",f),d=c.requestAnimationFrame(()=>{if(!r())return;e7(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),e7(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 vC=l(V()),i7=l(q()),rN=l(Mo()),s7=l(Ve());function fve(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function mve(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,s7.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function pve(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function r7(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function n7(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function a7(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,vC.useDispatch)(_),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,vC.useSelect)(_);return(0,i7.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=fve(f),p=mve(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()){r7(s,!1);let y=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;y=y?.closest("[contenteditable]"),y?.focus()}return}let g=ru(m),b=ru(p);if(h){let y=n(),v=ru(d.target),S=v!==b;(g===b&&f.isCollapsed||!b||S)&&(b=v),g!==y&&(g=y)}if(g===void 0&&b===void 0){r7(s,!1);return}if(g===b)i()?e(g,g):t(g);else{let y=[...r(g),g],v=[...r(b),b],S=pve(y,v);if(y[S]!==g||v[S]!==b){e(y[S],v[S]);return}let w=n7(m),C=n7(p);if(w&&C){let E=f.getRangeAt(0),I=(0,rN.create)({element:w,range:E,__unstableIsEditableTree:!0}),R=(0,rN.create)({element:C,range:E,__unstableIsEditableTree:!0}),B=I.start??I.end,P=R.start??R.end;o({start:{clientId:g,attributeKey:w.dataset.wpBlockAttributeKey,offset:B},end:{clientId:b,attributeKey:C.dataset.wpBlockAttributeKey,offset:P}})}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 yC=l(V()),l7=l(q());function c7(){let{selectBlock:e}=(0,yC.useDispatch)(_),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,yC.useSelect)(_);return(0,l7.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=ru(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 _C=l(V()),u7=l(q()),bl=l(nt()),Us=l(K());function d7(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,_C.useSelect)(_),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:p,__unstableDeleteSelection:h,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,_C.useDispatch)(_);return(0,u7.useRefEffect)(k=>{function y(w){k.contentEditable==="true"&&w.preventDefault()}function v(w){if(!w.defaultPrevented){if(!n()){if(w.keyCode===bl.ENTER){if(w.shiftKey||e())return;let C=o(),E=i(C),I=c(),R=u();if(I.attributeKey===R.attributeKey){let B=d(C)[I.attributeKey],P=(0,Us.getBlockTransforms)("from").filter(({type:L})=>L==="enter"),T=(0,Us.findTransform)(P,L=>L.regExp.test(B));if(T){f(C,T.transform({content:B})),b();return}}if(!(0,Us.hasBlockSupport)(E,"splitting",!1)&&!w.__deprecatedOnSplit)return;s(E,a(C))&&(m(),w.preventDefault())}return}w.keyCode===bl.ENTER?(k.contentEditable=!1,w.preventDefault(),e()?f(t(),(0,Us.createBlock)((0,Us.getDefaultBlockName)())):m()):w.keyCode===bl.BACKSPACE||w.keyCode===bl.DELETE?(k.contentEditable=!1,w.preventDefault(),e()?p(t()):r()?h(w.keyCode===bl.DELETE):g()):w.key.length===1&&!(w.metaKey||w.ctrlKey)&&(k.contentEditable=!1,r()?h(w.keyCode===bl.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 Gs=l(K()),xC=l(Ve()),Xp=l(V()),k7=l(q());var f7=l(O()),m7=l(K()),Bv=l(V()),oi=l(M()),p7=l(qn());function qp(){let{getBlockName:e}=(0,Bv.useSelect)(_),{getBlockType:t}=(0,Bv.useSelect)(m7.store),{createSuccessNotice:o}=(0,Bv.useDispatch)(p7.store);return(0,f7.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,oi.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,oi.sprintf)((0,oi.__)('Copied "%s" to clipboard.'),a):i=(0,oi.sprintf)((0,oi.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,oi.sprintf)((0,oi._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,oi.sprintf)((0,oi._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var g7=l(Ve()),ri=l(K());var h7=l(Ve());function hve(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 gve(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function Zp({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=hve(o),o=gve(o);let r=(0,h7.getFilesFromDataTransfer)(e);return r.length&&!bve(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function bve(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 nN=Symbol("requiresWrapperOnCopy");function SC(e,t,o){let r=t,[n]=t;if(n&&o.select(ri.store).getBlockType(n.name)[nN]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(_),d=a(n.clientId),f=c(d);f&&(r=(0,ri.createBlock)(f,u(d),r))}let i=(0,ri.serialize)(r);e.clipboardData.setData("text/plain",kve(i)),e.clipboardData.setData("text/html",i)}function b7(e,t){let{plainText:o,html:r,files:n}=Zp(e),i=[];if(n.length){let s=(0,ri.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,ri.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,ri.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function kve(e){return e=e.replace(/<br>/g,` |
| 49 |
`),(0,g7.__unstableStripHTML)(e).trim().replace(/\n\n+/g,` |
| 50 |
|
| 51 |
`)}function Ev(){let e=(0,Xp.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,Xp.useSelect)(_),{flashBlock:m,removeBlocks:p,replaceBlocks:h,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:k}=(0,Xp.useDispatch)(_),y=qp();return(0,k7.useRefEffect)(v=>{function S(w){if(w.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:P}=w,{ownerDocument:T}=P;if(w.type==="copy"||w.type==="cut"?(0,xC.documentHasUncollapsedSelection)(T):(0,xC.documentHasSelection)(T)&&!T.activeElement.isContentEditable)return}let{activeElement:E}=w.target.ownerDocument;if(!v.contains(E))return;let I=c(),R=a()||s(),B=!R&&!I;if(w.type==="copy"||w.type==="cut")if(w.preventDefault(),C.length===1&&m(C[0]),B)b();else{y(w.type,C);let P;if(R)P=t(C);else{let[T,L]=u(),z=t(C.slice(1,C.length-1));P=[T,...z,L]}SC(w,P,e)}if(w.type==="cut")R&&!B?p(C):(w.target.ownerDocument.activeElement.contentEditable=!1,g());else if(w.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:P,mediaUpload:T}=n();if(w.clipboardData.getData("rich-text")==="true")return;let{plainText:z,html:U,files:H}=Zp(w),N=s(),D=[];if(H.length){if(!T){w.preventDefault();return}let te=(0,Gs.getBlockTransforms)("from");D=H.reduce((Z,se)=>{let ce=(0,Gs.findTransform)(te,Q=>Q.type==="files"&&Q.isMatch([se]));return ce&&Z.push(ce.transform([se])),Z},[]).flat()}else D=(0,Gs.pasteHandler)({HTML:U,plainText:z,mode:N?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:P});if(typeof D=="string")return;if(N){h(C,D,D.length-1,-1),w.preventDefault();return}if(!r()&&!(0,Gs.hasBlockSupport)(i(C[0]),"splitting",!1)&&!w.__deprecatedOnSplit)return;let[W]=C,$=f(W),X=[];for(let te of D)if(d(te.name,$))X.push(te);else{let Z=i($),se=te.name!==Z?(0,Gs.switchToBlockType)(te,Z):[te];if(!se)return;for(let ce of se)for(let Q of ce.innerBlocks)X.push(Q)}k(X),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 Qp=l(x());function iN(){let[e,t,o]=K8(),r=(0,v7.useSelect)(n=>n(_).hasMultiSelection(),[]);return[e,(0,Tv.useMergeRefs)([t,Ev(),d7(),o7(),a7(),c7(),$8(),J8(),q8(),(0,Tv.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,y7.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function vve({children:e,...t},o){let[r,n,i]=iN();return(0,Qp.jsxs)(Qp.Fragment,{children:[r,(0,Qp.jsx)("div",{...t,ref:(0,Tv.useMergeRefs)([n,o]),className:F(t.className,"block-editor-writing-flow"),children:e}),i]})}var wC=(0,_7.forwardRef)(vve);var CC=null;function S7(){return CC||(CC=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},[]),CC)}var Jr=l(O()),Iv=l(q());function x7({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function yve(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function _ve(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 Sve(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 w7({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,Iv.useResizeObserver)(),[s,{width:a,height:c}]=(0,Iv.useResizeObserver)(),u=(0,Jr.useRef)(0),d=r!==1,f=(0,Iv.useReducedMotion)(),m=r==="auto-scaled",p=(0,Jr.useRef)(!1),h=(0,Jr.useRef)(null);(0,Jr.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?x7({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,k=(0,Jr.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,Jr.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),v=(0,Jr.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(Sve(k.current,y.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),S=(0,Jr.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,Jr.useRef)(!1);return(0,Jr.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,Jr.useEffect)(()=>{if(t&&(m&&k.current.scaleValue!==1&&(k.current.scaleValue=x7({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=yve(k.current,y.current),y.current.scrollTop=_ve(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 Xi=l(x());function E7(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 xve(e){return(0,lu.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];E7(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}function wve({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,C7.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,sN.useSelect)(N=>{let{getSettings:D}=N(_),W=D();return{resolvedAssets:W.__unstableResolvedAssets,isPreviewMode:W.isPreviewMode}},[]),{styles:f="",scripts:m=""}=u,[p,h]=(0,Qi.useState)(),[g,b]=(0,Qi.useState)([]),k=gl(),[y,v,S]=iN(),w=(0,lu.useRefEffect)(N=>{N._load=()=>{h(N.contentDocument)};let D;function W(Z){Z.preventDefault()}function $(Z){Z.target.tagName==="A"&&Z.target.getAttribute("href")?.startsWith("#")&&(Z.preventDefault(),D.defaultView.location.hash=Z.target.getAttribute("href").slice(1))}let{ownerDocument:X}=N;b(Array.from(X.body.classList).filter(Z=>Z.startsWith("admin-color-")||Z.startsWith("post-type-")||Z==="wp-embed-responsive"));function te(){let{contentDocument:Z}=N,{documentElement:se}=Z;D=Z,se.classList.add("block-editor-iframe__html"),k(se),Z.dir=X.dir;for(let ce of S7())Z.getElementById(ce.id)||(Z.head.appendChild(ce.cloneNode(!0)),d||console.warn(`${ce.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,ce));D.addEventListener("dragover",W,!1),D.addEventListener("drop",W,!1),D.addEventListener("click",$)}return N.addEventListener("load",te),()=>{delete N._load,N.removeEventListener("load",te),D?.removeEventListener("dragover",W),D?.removeEventListener("drop",W),D?.removeEventListener("click",$)}},[]),{contentResizeListener:C,containerResizeListener:E,isZoomedOut:I,scaleContainerWidth:R}=w7({scale:r,frameSize:parseInt(n),iframeDocument:p}),B=(0,lu.useDisabled)({isDisabled:!i}),P=(0,lu.useMergeRefs)([xve(p),e,k,v,B]),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>`,[L,z]=(0,Qi.useMemo)(()=>{let N=URL.createObjectURL(new window.Blob([T],{type:"text/html"}));return[N,()=>URL.revokeObjectURL(N)]},[T]);(0,Qi.useEffect)(()=>z,[z]);let U=o>=0&&!d,H=(0,Xi.jsxs)(Xi.Fragment,{children:[U&&y,(0,Xi.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,lu.useMergeRefs)([s,w]),tabIndex:o,src:L,title:a,onKeyDown:N=>{if(c.onKeyDown&&c.onKeyDown(N),N.currentTarget.ownerDocument!==N.target.ownerDocument){let{stopPropagation:D}=N.nativeEvent;N.nativeEvent.stopPropagation=()=>{},N.stopPropagation(),N.nativeEvent.stopPropagation=D,E7(N,window.KeyboardEvent,N.currentTarget)}},children:p&&(0,Qi.createPortal)((0,Xi.jsxs)("body",{ref:P,className:F("block-editor-iframe__body","editor-styles-wrapper",...g),children:[C,(0,Xi.jsx)(B7.__experimentalStyleProvider,{document:p,children:t})]}),p.documentElement)}),U&&S]});return(0,Xi.jsxs)("div",{className:"block-editor-iframe__container",children:[E,(0,Xi.jsx)("div",{className:F("block-editor-iframe__scale-container",I&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":I&&`${R}px`},children:H})]})}function Cve(e,t){return(0,sN.useSelect)(r=>r(_).getSettings().__internalIsInitialized,[])?(0,Xi.jsx)(wve,{...e,forwardedRef:t}):null}var Jp=(0,Qi.forwardRef)(Cve);var yG=l(A()),ih=l(O()),_G=l(V());var EC={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},Bve=new Set(["combinator","comma"]);var Eve=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(EC[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return EC[e]}};function Tve(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 Ive(e,t=EC){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],Bve.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var Pve=/(['"])([^\\\n]+?)\1/g,Ove=/\\./g;function aN(e,t=EC){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(Ove,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(Pve,(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=Tve(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=Ive(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=Eve(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*BC(e,t){switch(e.type){case"list":for(let o of e.list)yield*BC(o,e);break;case"complex":yield*BC(e.left,e),yield*BC(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function T7(e){let t;return Array.isArray(e)?t=e:t=[...BC(e)].map(([o])=>o),t.map(o=>o.content).join("")}var hG=l(Y9()),gG=l(PC()),bG=l(X9()),kG=l(mG()),pG=new Map,vG=[{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 Uye(e,t){let o=aN(t),r=o.findLastIndex(({content:s,type:a})=>vG.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=aN(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),T7(o)}function Gye({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new hG.default([r&&(0,bG.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:vG.some(d=>a.startsWith(d.content))?Uye(s,a):c}}),o&&(0,kG.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof gG.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 Wye=(e,t="",o)=>{let r=pG.get(t);return r||(r=new WeakMap,pG.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=Gye(n,t,o),r.set(n,i)),i})},Bf=Wye;var fu=l(x());yc([_c,Zm]);function $ye(e,t){return(0,ih.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=ct(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function Kye({styles:e,scope:t,transformOptions:o}){let r=(0,_G.useSelect)(s=>j(s(_)).getStyleOverrides(),[]),[n,i]=(0,ih.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[Bf(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,fu.jsxs)(fu.Fragment,{children:[(0,fu.jsx)("style",{ref:$ye(n,t)}),n.map((s,a)=>(0,fu.jsx)("style",{children:s},a)),(0,fu.jsx)(yG.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 kl=(0,ih.memo)(Kye);var ni=l(x()),Yye=(0,$C.memo)(sh),HN=2e3,qye=[];function Zye({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=qye}){e||(e=t);let[n,{height:i}]=(0,jv.useResizeObserver)(),{styles:s}=(0,SG.useSelect)(d=>({styles:d(_).getSettings().styles}),[]),a=(0,$C.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,ni.jsx)(xG.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>HN?HN*c:void 0,minHeight:o},children:(0,ni.jsxs)(Jp,{contentRef:(0,jv.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:HN,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,ni.jsx)(kl,{styles:a}),n,(0,ni.jsx)(Yye,{renderAppender:!1})]})})}function wG(e){let[t,{width:o}]=(0,jv.useResizeObserver)();return(0,ni.jsxs)(ni.Fragment,{children:[(0,ni.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,ni.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,ni.jsx)(Zye,{...e,containerWidth:o})})]})}var ah=l(O()),TG=l(BG()),EG=(0,TG.createQueue)();function IG({children:e,placeholder:t}){let[o,r]=(0,ah.useState)(!1);return(0,ah.useEffect)(()=>{let n={};return EG.add(n,()=>{(0,ah.flushSync)(()=>{r(!0)})}),()=>{EG.cancel(n)}},[]),o?e:t}var Tf=l(x()),Xye=[];function Qye({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=Xye,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,UN.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,UN.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,GN.useSelect)(u=>u(_).getSettings(),[]),a=(0,Ef.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Ef.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,Tf.jsx)(Kp,{value:c,settings:a,children:(0,Tf.jsx)(wG,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var PG=(0,Ef.memo)(Qye);PG.Async=IG;var en=PG;function OG({blocks:e,props:t={},layout:o}){let r=(0,GN.useSelect)(u=>u(_).getSettings(),[]),n=(0,Ef.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,KC.useDisabled)(),s=(0,KC.useMergeRefs)([t.ref,i]),a=(0,Ef.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,Tf.jsxs)(Kp,{value:a,settings:n,children:[(0,Tf.jsx)(kl,{}),(0,Tf.jsx)(Hv,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:F(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var mu=l(x());function Jye({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,lh.isReusableBlock)(e),c=(0,RG.useMemo)(()=>s?(0,lh.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,lh.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,mu.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,mu.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,mu.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,mu.jsx)(en,{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,mu.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,AG.__)("No preview available.")})}),!a&&(0,mu.jsx)(_v,{title:o,icon:r,description:n})]})}var YC=Jye;var hh=l(M()),_l=l(O()),XN=l(q());var KG=l(K()),YG=l(q());var ph=l(O()),pu=l(K()),WG=l(A()),Uv=l(nt());var jG=l(A()),HG=l(O());var ch=l(O()),LG=l(M()),MG=l(Xo()),NG=l(x());function e_e(e,t){let[o,r]=(0,ch.useState)(!1);return(0,ch.useEffect)(()=>{o&&(0,MG.speak)((0,LG.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,NG.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var WN=(0,ch.forwardRef)(e_e);var DG=l(O()),VG=l(A()),FG=l(x());function t_e(e,t){return(0,FG.jsx)(VG.Composite.Group,{role:"presentation",ref:t,...e})}var $N=(0,DG.forwardRef)(t_e);var ZC=l(A()),zG=l(O()),qC=l(x());function o_e({isFirst:e,as:t,children:o,...r},n){return(0,qC.jsx)(ZC.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,qC.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,qC.jsx)(ZC.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var KN=(0,zG.forwardRef)(o_e);var YN=l(x());function r_e({key:e,children:t}){return(0,YN.jsx)(HG.Fragment,{children:t},e)}function n_e({children:e}){return(0,YN.jsx)(jG.Composite,{focusShift:!0,focusWrap:"horizontal",render:r_e,children:e})}var uh=n_e;var UG=l(A()),QC=l(K()),JC=l(V()),GG=l(O());var fh=l(M()),dh=l(A());var es=l(x());function XC({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,fh.__)("Pattern");return(0,es.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,es.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,es.jsxs)(dh.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,es.jsx)(dh.FlexItem,{children:t?(0,es.jsx)(Te,{icon:t}):n||(0,fh.sprintf)((0,fh._n)("%d block","%d blocks",e),e)}),(0,es.jsx)(dh.FlexItem,{children:(0,es.jsx)(Te,{icon:rk})}),r&&(0,es.jsx)(dh.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,es.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var qN=l(x()),i_e=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,JC.useSelect)(f=>i&&f(QC.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=j((0,JC.useDispatch)(_)),u=(0,GG.useMemo)(()=>n?.type===Bt.user&&n?.syncStatus!=="unsynced"?[(0,QC.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,qN.jsx)(UG.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,qN.jsx)(XC,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},mh=i_e;var vl=l(x());function s_e({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,ph.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,ph.useMemo)(()=>[(0,pu.createBlock)(o.name,o.initialAttributes,(0,pu.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,pu.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,pu.isTemplatePart)(o);return(0,vl.jsx)(mh,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:p})=>(0,vl.jsx)("div",{className:F("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,vl.jsxs)(KN,{isFirst:t,className:F("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:h=>{h.preventDefault(),r(o,(0,Uv.isAppleOS)()?h.metaKey:h.ctrlKey),n(null)},onKeyDown:h=>{let{keyCode:g}=h;g===Uv.ENTER&&(h.preventDefault(),r(o,(0,Uv.isAppleOS)()?h.metaKey:h.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,vl.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,vl.jsx)(Te,{icon:o.icon,showColors:!0})}),(0,vl.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,vl.jsx)(WG.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var $G=(0,ph.memo)(s_e);var Gv=l(x());function a_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 qG({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,YG.useInstanceId)(qG,s);return(0,Gv.jsxs)(WN,{className:s,"aria-label":n,children:[a_e(e,3).map((c,u)=>(0,Gv.jsx)($N,{children:c.map((d,f)=>(0,Gv.jsx)($G,{item:d,className:(0,KG.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var If=qG;var ZG=l(A()),yl=l(x());function l_e({title:e,icon:t,children:o}){return(0,yl.jsxs)(yl.Fragment,{children:[(0,yl.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,yl.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,yl.jsx)(ZG.Icon,{icon:t})]}),(0,yl.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var hu=l_e;var XG=l(M()),ZN=l(x());function c_e(){return(0,ZN.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,ZN.jsx)("p",{children:(0,XG.__)("No results found.")})})}var ts=c_e;var wo=l(x()),u_e=e=>e.name.split("/")[0],d_e=6,f_e=[];function QG({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,_l.useMemo)(()=>Ms(e,"frecency","desc").slice(0,d_e),[e]),c=(0,_l.useMemo)(()=>e.filter(h=>!h.category),[e]),u=(0,_l.useMemo)(()=>{let h={...t};return Object.keys(t).forEach(g=>{h[g]=e.filter(b=>u_e(b)===g),h[g].length===0&&delete h[g]}),h},[e,t]);(0,_l.useEffect)(()=>()=>n(null),[]);let d=(0,XN.useAsyncList)(o),f=o.length===d.length,m=(0,_l.useMemo)(()=>Object.entries(t),[t]),p=(0,XN.useAsyncList)(f?m:f_e);return(0,wo.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,wo.jsx)(hu,{title:(0,hh._x)("Most used","blocks"),children:(0,wo.jsx)(If,{items:a,onSelect:r,onHover:n,label:(0,hh._x)("Most used","blocks")})}),d.map(h=>{let g=e.filter(b=>b.category===h.slug);return!g||!g.length?null:(0,wo.jsx)(hu,{title:h.title,icon:h.icon,children:(0,wo.jsx)(If,{items:g,onSelect:r,onHover:n,label:h.title})},h.slug)}),f&&c.length>0&&(0,wo.jsx)(hu,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,hh.__)("Uncategorized"),children:(0,wo.jsx)(If,{items:c,onSelect:r,onHover:n,label:(0,hh.__)("Uncategorized")})}),p.map(([h,g])=>{let b=u[h];return!b||!b.length?null:(0,wo.jsx)(hu,{title:g.title,icon:g.icon,children:(0,wo.jsx)(If,{items:b,onSelect:r,onHover:n,label:g.title})},h)})]})}function m_e({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=jc(e,t);if(!i.length)return(0,wo.jsx)(ts,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isAllowedInCurrentRoot?u.push(f):d.push(f));return(0,wo.jsx)(uh,{children:(0,wo.jsxs)("div",{ref:n,children:[!!u.length&&(0,wo.jsx)(wo.Fragment,{children:(0,wo.jsx)(QG,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,wo.jsx)(QG,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var JG=(0,_l.forwardRef)(m_e);var yW=l(O()),_W=l(q()),SW=l(A()),xW=l(M());var pW=l(A()),r5=l(O()),hW=l(M());var e1=l(A()),QN=l(M()),Sl=l(x());function p_e({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,Sl.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,Sl.jsx)(e1.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function h_e({searchValue:e,setSearchValue:t}){return(0,Sl.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,Sl.jsx)(e1.SearchControl,{__nextHasNoMarginBottom:!0,onChange:t,value:e,label:(0,QN.__)("Search"),placeholder:(0,QN.__)("Search")})})}function g_e({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,Sl.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,Sl.jsx)(h_e,{searchValue:r,setSearchValue:n}),!r&&(0,Sl.jsx)(p_e,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var eW=g_e;var wl=l(O()),bh=l(M()),cW=l(q()),uW=l(A()),dW=l(Xo());var tW=l(K()),$s=l(O()),xl=l(A()),oW=l(q()),rW=l(M());var tn=l(A()),ii=l(M()),mr=l(x());function t1({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,mr.jsxs)(tn.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,mr.jsx)(tn.__experimentalText,{variant:"muted",children:(0,ii.sprintf)((0,ii._n)("%s item","%s items",r),r)}),t>1&&(0,mr.jsxs)(tn.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,mr.jsxs)(tn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,mr.jsx)(tn.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,ii.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,mr.jsx)("span",{children:"\xAB"})}),(0,mr.jsx)(tn.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,ii.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,mr.jsx)("span",{children:"\u2039"})})]}),(0,mr.jsx)(tn.__experimentalText,{variant:"muted",children:(0,ii.sprintf)((0,ii._x)("%1$s of %2$s","paging"),e,t)}),(0,mr.jsxs)(tn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,mr.jsx)(tn.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,ii.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,mr.jsx)("span",{children:"\u203A"})}),(0,mr.jsx)(tn.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,ii.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,mr.jsx)("span",{children:"\xBB"})})]})]})]})}var Vt=l(x()),b_e=({showTooltip:e,title:t,children:o})=>e?(0,Vt.jsx)(xl.Tooltip,{text:t,children:o}):(0,Vt.jsx)(Vt.Fragment,{children:o});function nW({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,$s.useState)(!1),{blocks:d,viewportWidth:f}=o,p=`block-editor-block-patterns-list__item-description-${(0,oW.useInstanceId)(nW)}`,h=o.type===Bt.user,g=(0,$s.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let k=(0,tW.cloneBlock)(b);return k.attributes.metadata?.categories?.includes(s)&&(k.attributes.metadata.categories=[s]),k}),[d,t,s]);return(0,Vt.jsx)(mh,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:k,onDragEnd:y})=>(0,Vt.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,Vt.jsx)(b_e,{showTooltip:i&&!h,title:o.title,children:(0,Vt.jsxs)(xl.Composite.Item,{render:(0,Vt.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?p:void 0,className:F("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===Bt.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,Vt.jsx)(en.Async,{placeholder:(0,Vt.jsx)(k_e,{}),children:(0,Vt.jsx)(en,{blocks:d,viewportWidth:f})}),(!i||h)&&(0,Vt.jsxs)(xl.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[h&&!o.syncStatus&&(0,Vt.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,Vt.jsx)(Ie,{className:"block-editor-patterns__pattern-icon",icon:$n})}),(0,Vt.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,Vt.jsx)(xl.VisuallyHidden,{id:p,children:o.description})]})})})})}function k_e(){return(0,Vt.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function v_e({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,rW.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,$s.useState)(void 0),[m,p]=(0,$s.useState)(null);(0,$s.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let h=(g,b)=>{p(g.name),r(g,b)};return(0,Vt.jsxs)(xl.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,Vt.jsx)(nW,{id:g.name,pattern:g,onClick:h,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,Vt.jsx)(t1,{...c})]})}var Ks=(0,$s.forwardRef)(v_e);var Pf=l(V()),sW=l(K()),o1=l(M()),aW=l(Xo()),JN=l(O());function iW({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 y_e({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,Pf.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=j((0,Pf.useSelect)(_)),{destinationRootClientId:f,destinationIndex:m}=(0,Pf.useSelect)(S=>{let{getSelectedBlockClientId:w,getBlockRootClientId:C,getBlockIndex:E,getBlockOrder:I,getInsertionPoint:R}=j(S(_)),B=w(),P=e,T,L=R();return t!==void 0?T=t:L&&L.hasOwnProperty("index")?(P=L?.rootClientId?L.rootClientId:e,T=L.index):o?T=E(o):!r&&B?(P=C(B),T=E(B)+1):T=I(P).length,{destinationRootClientId:P,destinationIndex:T}},[e,t,o,r]),{replaceBlocks:p,insertBlocks:h,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:k}=j((0,Pf.useDispatch)(_)),y=(0,JN.useCallback)((S,w,C=!1,E)=>{(C||i||s)&&k(null);let I=c();!r&&I&&(0,sW.isUnmodifiedDefaultBlock)(I,"content")?p(I.clientId,S,null,i||C?0:null,w):h(S,r||E===void 0?m:iW({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,o1.sprintf)((0,o1._n)("%d block added.","%d blocks added.",R),R);(0,aW.speak)(B),n&&n(S)},[r,c,p,h,f,m,n,i,s,k,a]),v=(0,JN.useCallback)(S=>{if(S&&!d()){let w=u(S.name,f);w!==null&&g(w,iW({destinationRootClientId:f,destinationIndex:m,rootClientId:w,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,y,v]}var gu=y_e;var Wv=l(O()),r1=l(K()),$v=l(V()),n1=l(M()),lW=l(qn());var __e=(e,t,o,r)=>{let n=(0,Wv.useMemo)(()=>({[Ac]:!!r}),[r]),{patternCategories:i,patterns:s,userPatternCategories:a}=(0,$v.useSelect)(m=>{let{getSettings:p,__experimentalGetAllowedPatterns:h}=j(m(_)),{__experimentalUserPatternCategories:g,__experimentalBlockPatternCategories:b}=p();return{patterns:h(t,n),userPatternCategories:g,patternCategories:b}},[t,n]),{getClosestAllowedInsertionPointForPattern:c}=j((0,$v.useSelect)(_)),u=(0,Wv.useMemo)(()=>{let m=[...i];return a?.forEach(p=>{m.find(h=>h.name===p.name)||m.push(p)}),m},[i,a]),{createSuccessNotice:d}=(0,$v.useDispatch)(lW.store),f=(0,Wv.useCallback)((m,p)=>{let h=r?t:c(m,t);if(h===null)return;let g=m.type===Bt.user&&m.syncStatus!=="unsynced"?[(0,r1.createBlock)("core/block",{ref:m.id})]:p;e((g??[]).map(b=>{let k=(0,r1.cloneBlock)(b);return k.attributes.metadata?.categories?.includes(o)&&(k.attributes.metadata.categories=[o]),k}),m.name,!1,h),d((0,n1.sprintf)((0,n1.__)('Block pattern "%s" inserted.'),m.title),{type:"snackbar",id:"inserter-notice"})},[d,e,o,t,c,r]);return[s,u,f]},bu=__e;var gh=l(O()),e5=l(q()),t5=l(Ve()),i1=20;function s1(e,t,o,r=""){let[n,i]=(0,gh.useState)(1),s=(0,e5.usePrevious)(t),a=(0,e5.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,gh.useMemo)(()=>e.slice(u*i1,u*i1+i1),[u,e]),f=Math.ceil(e.length/i1),m=p=>{(0,t5.getScrollContainer)(o?.current)?.scrollTo(0,0),i(p)};return(0,gh.useEffect)(function(){(0,t5.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var os=l(x());function S_e({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,os.jsx)(uW.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,bh.sprintf)((0,bh._n)("%d pattern found","%d patterns found",t),t)}):null}function x_e({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,wl.useRef)(),s=(0,cW.useDebounce)(dW.speak,500),[a,c]=gu({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=bu(c,a,t),f=(0,wl.useMemo)(()=>o.map(k=>k.name),[o]),m=(0,wl.useMemo)(()=>{let k=u.filter(y=>{if(t===rf.name||t===ol.name&&y.type===Bt.user||t===mp.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?Uk(k,e):k},[e,u,t,f]);(0,wl.useEffect)(()=>{if(!e)return;let k=m.length,y=(0,bh.sprintf)((0,bh._n)("%d result found.","%d results found.",k),k);s(y)},[e,s,m.length]);let p=s1(m,t,i),[h,g]=(0,wl.useState)(e);e!==h&&(g(e),p.changePage(1));let b=!!m?.length;return(0,os.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,os.jsx)(S_e,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,os.jsx)(uh,{children:b&&(0,os.jsxs)(os.Fragment,{children:[(0,os.jsx)(Ks,{blockPatterns:p.categoryPatterns,onClickPattern:(k,y)=>{d(k,y),n()},isDraggable:!1}),(0,os.jsx)(t1,{...p})]})})]})}var fW=x_e;var o5=l(O()),kh=l(M()),mW=l(Xo());function w_e(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function vh(e,t="all"){let[o,r]=bu(void 0,e),n=(0,o5.useMemo)(()=>t==="all"?o:o.filter(s=>!kx(s,t)),[t,o]);return(0,o5.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=>!w_e(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,kh._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(mp),n.some(a=>a.type===Bt.user)&&s.unshift(ol),n.length>0&&s.unshift({name:rf.name,label:rf.label}),(0,mW.speak)((0,kh.sprintf)((0,kh._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var Of=l(x());function C_e({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,r5.useState)(""),[i,s]=(0,r5.useState)(e?.name),a=vh(t);return(0,Of.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,Of.jsx)(eW,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,Of.jsx)(fW,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function B_e({onModalClose:e,...t}){return(0,Of.jsx)(pW.Modal,{title:(0,hW.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,Of.jsx)(C_e,{onModalClose:e,...t})})}var gW=B_e;var yh=l(M()),Et=l(A());var Fo=l(x());function E_e({title:e}){return(0,Fo.jsx)(Et.__experimentalVStack,{spacing:0,children:(0,Fo.jsx)(Et.__experimentalView,{children:(0,Fo.jsx)(Et.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Fo.jsxs)(Et.__experimentalHStack,{spacing:2,children:[(0,Fo.jsx)(Et.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,yh.isRTL)()?qo:wr,size:"small",label:(0,yh.__)("Back")}),(0,Fo.jsx)(Et.__experimentalSpacer,{children:(0,Fo.jsx)(Et.__experimentalHeading,{level:5,children:e})})]})})})})}function a1({categories:e,children:t}){return(0,Fo.jsxs)(Et.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,Fo.jsx)(Et.Navigator.Screen,{path:"/",children:(0,Fo.jsx)(Et.__experimentalItemGroup,{children:e.map(o=>(0,Fo.jsx)(Et.Navigator.Button,{path:`/category/${o.name}`,as:Et.__experimentalItem,isAction:!0,children:(0,Fo.jsxs)(Et.__experimentalHStack,{children:[(0,Fo.jsx)(Et.FlexBlock,{children:o.label}),(0,Fo.jsx)(Ie,{icon:(0,yh.isRTL)()?wr:qo})]})},o.name))})}),e.map(o=>(0,Fo.jsxs)(Et.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,Fo.jsx)(E_e,{title:(0,yh.__)("Back")}),t(o)]},o.name))]})}var si=l(O()),n5=l(M()),rs=l(A());var rn=l(A()),on=l(M());var l1=l(O());var er=l(x()),bW=e=>e!=="all"&&e!=="user",T_e=e=>e.name===ol.name,I_e=[{value:"all",label:(0,on._x)("All","patterns")},{value:Bt.directory,label:(0,on.__)("Pattern Directory")},{value:Bt.theme,label:(0,on.__)("Theme & Plugins")},{value:Bt.user,label:(0,on.__)("User")}];function kW({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===ol.name?Bt.user:r,a=bW(s),c=T_e(i),u=(0,l1.useMemo)(()=>[{value:"all",label:(0,on._x)("All","patterns")},{value:Ok.full,label:(0,on._x)("Synced","patterns"),disabled:a},{value:Ok.unsynced,label:(0,on._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),bW(f)&&e("all")}return(0,er.jsx)(er.Fragment,{children:(0,er.jsx)(rn.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,on.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,er.jsx)(Ie,{icon:(0,er.jsx)(rn.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,er.jsx)(rn.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,er.jsxs)(er.Fragment,{children:[!c&&(0,er.jsx)(rn.MenuGroup,{label:(0,on.__)("Source"),children:(0,er.jsx)(rn.MenuItemsChoice,{choices:I_e,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,er.jsx)(rn.MenuGroup,{label:(0,on.__)("Type"),children:(0,er.jsx)(rn.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,er.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,l1.createInterpolateElement)((0,on.__)("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,er.jsx)(rn.ExternalLink,{href:(0,on.__)("https://wordpress.org/patterns/")})})})]})})})}var Or=l(x()),P_e=()=>{};function c1({rootClientId:e,onInsert:t,onHover:o=P_e,category:r,showTitlesAsTooltip:n}){let[i,,s]=bu(t,e,r?.name),[a,c]=(0,si.useState)("all"),[u,d]=(0,si.useState)("all"),f=vh(e,u),m=(0,si.useRef)(),p=(0,si.useMemo)(()=>i.filter(y=>kx(y,u,a)?!1:r.name===rf.name||r.name===ol.name&&y.type===Bt.user||r.name===mp.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=s1(p,r,m),{changePage:g}=h;(0,si.useEffect)(()=>()=>o(null),[]);let b=(0,si.useCallback)(y=>{c(y),g(1)},[c,g]),k=(0,si.useCallback)(y=>{d(y),g(1)},[d,g]);return(0,Or.jsxs)(Or.Fragment,{children:[(0,Or.jsxs)(rs.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,Or.jsxs)(rs.__experimentalHStack,{children:[(0,Or.jsx)(rs.FlexBlock,{children:(0,Or.jsx)(rs.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,Or.jsx)(kW,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:k,scrollContainerRef:m,category:r})]}),!p.length&&(0,Or.jsx)(rs.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,n5.__)("No results found")})]}),p.length>0&&(0,Or.jsxs)(Or.Fragment,{children:[(0,Or.jsx)(rs.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,n5.__)("Drag and drop patterns into the canvas.")}),(0,Or.jsx)(Ks,{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 d1=l(q()),f1=l(A()),vW=l(O());var Rf=l(x()),{Tabs:u1}=j(f1.privateApis);function O_e({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,d1.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,d1.usePrevious)(t),c=t?t.name:null,[u,d]=(0,vW.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,Rf.jsxs)(u1,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(p=>p.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,Rf.jsx)(u1.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,Rf.jsx)(u1.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,Rf.jsx)(u1.TabPanel,{tabId:m.name,focusable:!1,children:(0,Rf.jsx)(f1.__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 m1=O_e;var _n=l(x());function R_e({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,yW.useState)(!1),a=vh(r),c=(0,_W.useViewportMatch)("medium","<");return a.length?(0,_n.jsxs)(_n.Fragment,{children:[!c&&(0,_n.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,_n.jsx)(m1,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,_n.jsx)(SW.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,xW.__)("Explore all patterns")})]}),c&&(0,_n.jsx)(a1,{categories:a,children:u=>(0,_n.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,_n.jsx)(c1,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,_n.jsx)(gW,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,_n.jsx)(ts,{})}var wW=R_e;var zW=l(M()),jW=l(q()),HW=l(A()),g1=l(O());var h1=l(A()),NW=l(M()),DW=l(q());var OW=l(A()),RW=l(M());var Tt=l(A()),Sn=l(M()),Ys=l(O()),i5=l(K());var Kv=l(V()),EW=l(qn()),TW=l(rC()),IW=l($r());var CW=l(K()),BW=l(x()),A_e={image:"img",video:"video",audio:"audio"};function p1(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=A_e[t],s=(0,BW.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,CW.createBlock)(`core/${t}`,o),s]}var Qe=l(x()),L_e=["image"],M_e={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function N_e({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,Qe.jsx)(Tt.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,Sn.__)("Options"),popoverProps:M_e,icon:zi,children:()=>(0,Qe.jsx)(Tt.MenuGroup,{children:(0,Qe.jsx)(Tt.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:WO,children:(0,Sn.sprintf)((0,Sn.__)("Report %s"),e.mediaType)})})})}function D_e({onClose:e,onSubmit:t}){return(0,Qe.jsxs)(Tt.Modal,{title:(0,Sn.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,Qe.jsxs)(Tt.__experimentalVStack,{spacing:3,children:[(0,Qe.jsx)("p",{children:(0,Sn.__)("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,Sn.__)("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)(Tt.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Qe.jsx)(Tt.FlexItem,{children:(0,Qe.jsx)(Tt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,Sn.__)("Cancel")})}),(0,Qe.jsx)(Tt.FlexItem,{children:(0,Qe.jsx)(Tt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,Sn.__)("Insert")})})]})]})}function PW({media:e,onClick:t,category:o}){let[r,n]=(0,Ys.useState)(!1),[i,s]=(0,Ys.useState)(!1),[a,c]=(0,Ys.useState)(!1),[u,d]=(0,Ys.useMemo)(()=>p1(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,Kv.useDispatch)(EW.store),{getSettings:p,getBlock:h}=(0,Kv.useSelect)(_),{updateBlockAttributes:g}=(0,Kv.useDispatch)(_),b=(0,Ys.useCallback)(S=>{if(a)return;let w=p(),C=(0,i5.cloneBlock)(S),{id:E,url:I,caption:R}=C.attributes;if(!E&&!w.mediaUpload){n(!0);return}if(E){t(C);return}c(!0),window.fetch(I).then(B=>B.blob()).then(B=>{let P=(0,IW.getFilename)(I)||"image.jpg",T=new File([B],P,{type:B.type});w.mediaUpload({filesList:[T],additionalData:{caption:R},onFileChange([L]){(0,TW.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,Sn.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:L_e,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,Sn.__)("no title"),y=(0,Ys.useCallback)(()=>s(!0),[]),v=(0,Ys.useCallback)(()=>s(!1),[]);return(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(mh,{isEnabled:!0,blocks:[u],children:({draggable:S,onDragStart:w,onDragEnd:C})=>(0,Qe.jsx)("div",{className:F("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)(Tt.Tooltip,{text:k,children:(0,Qe.jsx)(Tt.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)(Tt.Spinner,{})})]})})}),!a&&(0,Qe.jsx)(N_e,{category:o,media:e})]})})}),r&&(0,Qe.jsx)(D_e,{onClose:()=>n(!1),onSubmit:()=>{t((0,i5.cloneBlock)(u)),m((0,Sn.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var s5=l(x());function V_e({mediaList:e,category:t,onClick:o,label:r=(0,RW.__)("Media List")}){return(0,s5.jsx)(OW.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,s5.jsx)(PW,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var AW=V_e;var Cl=l(O()),a5=l(V());function LW(e,t={}){let[o,r]=(0,Cl.useState)(),[n,i]=(0,Cl.useState)(!1),s=(0,Cl.useRef)();return(0,Cl.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 MW(e){let[t,o]=(0,Cl.useState)([]),r=(0,a5.useSelect)(a=>j(a(_)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,a5.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,Cl.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 ku=l(x()),F_e=10;function Yv({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,DW.useDebouncedInput)(),{mediaList:s,isLoading:a}=LW(o,{per_page:i?20:F_e,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,NW.__)("Search");return(0,ku.jsxs)("div",{className:c,children:[(0,ku.jsx)(h1.SearchControl,{__nextHasNoMarginBottom:!0,className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,ku.jsx)("div",{className:`${c}-spinner`,children:(0,ku.jsx)(h1.Spinner,{})}),!a&&!s?.length&&(0,ku.jsx)(ts,{}),!a&&!!s?.length&&(0,ku.jsx)(AW,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var VW=l(V());function z_e({fallback:e=null,children:t}){return(0,VW.useSelect)(r=>{let{getSettings:n}=r(_);return!!n().mediaUpload},[])?t:e}var ns=z_e;var FW=l(A()),j_e=()=>null,vu=(0,FW.withFilters)("editor.MediaUpload")(j_e);var xn=l(x()),H_e=["image","video","audio"];function U_e({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=MW(e),s=(0,jW.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,g1.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=p1(d,f);r(m)},[r]),u=(0,g1.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,xn.jsxs)(xn.Fragment,{children:[!s&&(0,xn.jsxs)("div",{className:`${a}-container`,children:[(0,xn.jsx)(m1,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,xn.jsx)(ns,{children:(0,xn.jsx)(vu,{multiple:!1,onSelect:c,allowedTypes:H_e,render:({open:d})=>(0,xn.jsx)(HW.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,zW.__)("Open Media Library")})})})]}),s&&(0,xn.jsx)(a1,{categories:u,children:d=>(0,xn.jsx)(Yv,{onInsert:r,rootClientId:e,category:d})})]}):(0,xn.jsx)(ts,{})}var l5=U_e;var qv=l(O()),yu=l(M()),c5=l(A()),k1=l(q()),WW=l(Xo()),$W=l(V());var UW=l(A()),{Fill:GW,Slot:G_e}=(0,UW.createSlotFill)("__unstableInserterMenuExtension");GW.Slot=G_e;var b1=GW;var nn=l(x()),W_e=9,$_e=[];function K_e({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,k1.useDebounce)(WW.speak,500),{prioritizedBlocks:k}=(0,$W.useSelect)(N=>({prioritizedBlocks:N(_).getBlockListSettings(n)?.prioritizedInserterBlocks||$_e}),[n]),[y,v]=gu({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:h}),[S,w,C,E]=jc(y,v,g),[I,,R]=bu(v,y,void 0,g),B=(0,qv.useMemo)(()=>{if(c===0)return[];let N=Uk(I,e);return c!==void 0?N.slice(0,c):N},[e,I,c]),P=u;p&&B.length>2&&(P=0);let T=(0,qv.useMemo)(()=>{if(P===0)return[];let N=S.filter($=>$.name!=="core/block"),D=Ms(N,"frecency","desc");!e&&k.length&&(D=zx(D,k));let W=Dx(D,w,C,e);return P!==void 0?W.slice(0,P):W},[e,S,w,C,P,k]);(0,qv.useEffect)(()=>{if(!e)return;let N=T.length+B.length,D=(0,yu.sprintf)((0,yu._n)("%d result found.","%d results found.",N),N);b(D)},[e,b,T,B]);let L=(0,k1.useAsyncList)(T,{step:W_e}),z=T.length>0||B.length>0,U=!!T.length&&(0,nn.jsx)(hu,{title:(0,nn.jsx)(c5.VisuallyHidden,{children:(0,yu.__)("Blocks")}),children:(0,nn.jsx)(If,{items:L,onSelect:E,onHover:o,label:(0,yu.__)("Blocks"),isDraggable:f})}),H=!!B.length&&(0,nn.jsx)(hu,{title:(0,nn.jsx)(c5.VisuallyHidden,{children:(0,yu.__)("Block patterns")}),children:(0,nn.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,nn.jsx)(Ks,{blockPatterns:B,onClickPattern:R,onHover:r,isDraggable:f})})});return(0,nn.jsxs)(uh,{children:[!d&&!z&&(0,nn.jsx)(ts,{}),p?H:U,!!T.length&&!!B.length&&(0,nn.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),p?U:H,d&&(0,nn.jsx)(b1.Slot,{fillProps:{onSelect:E,onHover:o,filterValue:e,hasItems:z,rootClientId:y},children:N=>N.length?N:z?null:(0,nn.jsx)(ts,{})})]})}var v1=K_e;var _1=l(A()),KW=l(O());var Bl=l(x()),{Tabs:y1}=j(_1.privateApis);function Y_e({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,Bl.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,Bl.jsxs)(y1,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,Bl.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,Bl.jsx)(_1.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:$d,label:i,onClick:()=>t(),size:"compact"}),(0,Bl.jsx)(y1.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,Bl.jsx)(y1.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,Bl.jsx)(y1.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var S1=(0,KW.forwardRef)(Y_e);var x1=l(V()),_h=l(O());function Zv(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=j((0,x1.useDispatch)(_)),{isZoomedOut:r,isZoomOut:n}=(0,x1.useSelect)(a=>{let{isZoomOut:c}=j(a(_));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,_h.useRef)(!1),s=(0,_h.useRef)(e);(0,_h.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,_h.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Ge=l(x()),q_e=()=>{};function Z_e({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,YW.useSelect)(le=>{let{isZoomOut:ke,getSectionRootClientId:Be}=j(le(_));return{isZoomOutMode:ke(),hasSectionRootClientId:!!Be()}},[]),[b,k,y]=(0,w1.useDebouncedInput)(a),[v,S]=(0,It.useState)(null),[w,C]=(0,It.useState)(m),[E,I]=(0,It.useState)("all"),[R,B]=(0,It.useState)(null),P=(0,w1.useViewportMatch)("large");function T(){return f||(h?"patterns":"blocks")}let[L,z]=(0,It.useState)(T());Zv(g&&(L==="patterns"||L==="media")&&P);let[H,N,D]=gu({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),W=(0,It.useRef)(),$=(0,It.useCallback)((le,ke,Be,Re)=>{N(le,ke,Be,Re),n(le),window.requestAnimationFrame(()=>{!c&&!W.current?.contains(p.current.ownerDocument.activeElement)&&W.current?.querySelector("button").focus()})},[N,n,c]),X=(0,It.useCallback)((le,ke,...Be)=>{D(!1),N(le,{patternName:ke},...Be),n()},[N,n]),te=(0,It.useCallback)(le=>{D(le),S(le)},[D,S]),Z=(0,It.useCallback)((le,ke)=>{C(le),I(ke),u?.()},[C,u]),se=L==="patterns"&&!y&&!!w,ce=L==="media"&&!!R,Q=(0,It.useMemo)(()=>L==="media"?null:(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsx)(Sh.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:le=>{v&&S(null),k(le)},value:b,label:(0,_u.__)("Search"),placeholder:(0,_u.__)("Search")}),!!y&&(0,Ge.jsx)(v1,{filterValue:y,onSelect:n,onHover:te,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:L==="patterns"})]}),[L,v,S,k,b,y,n,te,c,t,e,r,o]),ie=(0,It.useMemo)(()=>(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Ge.jsx)(JG,{ref:W,rootClientId:H,onInsert:$,onHover:te,showMostUsedBlocks:s})}),i&&(0,Ge.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Ge.jsx)(Sh.VisuallyHidden,{as:"h2",children:(0,_u.__)("A tip for using the block editor")}),(0,Ge.jsx)(l8,{})]})]}),[H,$,te,s,i]),J=(0,It.useMemo)(()=>(0,Ge.jsx)(wW,{rootClientId:H,onInsert:X,onSelectCategory:Z,selectedCategory:w,children:se&&(0,Ge.jsx)(c1,{rootClientId:H,onInsert:X,category:w,patternFilter:E,showTitlesAsTooltip:!0})}),[H,X,Z,E,w,se]),G=(0,It.useMemo)(()=>(0,Ge.jsx)(l5,{rootClientId:H,selectedCategory:R,onSelectCategory:B,onInsert:$,children:ce&&(0,Ge.jsx)(Yv,{rootClientId:H,onInsert:$,category:R})}),[H,$,R,B,ce]),oe=le=>{le!=="patterns"&&C(null),z(le)},ue=(0,It.useRef)();return(0,It.useLayoutEffect)(()=>{ue.current&&window.requestAnimationFrame(()=>{ue.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Ge.jsxs)("div",{className:F("block-editor-inserter__menu",{"show-panel":se||ce,"is-zoom-out":h}),ref:p,children:[(0,Ge.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Ge.jsx)(S1,{ref:ue,onSelect:oe,onClose:d,selectedTab:L,closeButtonLabel:(0,_u.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,_u.__)("Blocks"),panel:(0,Ge.jsxs)(Ge.Fragment,{children:[Q,L==="blocks"&&!y&&ie]})},{name:"patterns",title:(0,_u.__)("Patterns"),panel:(0,Ge.jsxs)(Ge.Fragment,{children:[Q,L==="patterns"&&!y&&J]})},{name:"media",title:(0,_u.__)("Media"),panel:(0,Ge.jsxs)(Ge.Fragment,{children:[Q,G]})}]})}),i&&v&&(0,Ge.jsx)(Sh.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Ge.jsx)(YC,{item:v})})]})}var u5=(0,It.forwardRef)(Z_e);function X_e(e,t){return(0,Ge.jsx)(u5,{...e,onPatternCategorySelection:q_e,ref:t})}var qW=(0,It.forwardRef)(X_e);var C1=l(O()),Xv=l(M()),B1=l(A()),ZW=l(V());var Af=l(x()),Q_e=6,J_e=6,eSe=2;function E1({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,C1.useState)(""),[c,u]=gu({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=jc(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,ZW.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>Q_e;(0,C1.useEffect)(()=>{f&&f(!1)},[f]);let h=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,Af.jsxs)("div",{className:F("block-editor-inserter__quick-inserter",{"has-search":p,"has-expand":f}),children:[p&&(0,Af.jsx)(B1.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,Xv.__)("Search"),placeholder:(0,Xv.__)("Search")}),(0,Af.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,Af.jsx)(v1,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?eSe:0,maxBlockTypes:J_e,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,Af.jsx)(B1.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:h,"aria-label":(0,Xv.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,Xv.__)("Browse all")})]})}var Qv=l(x()),tSe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,toggleProps:i={}})=>{let{as:s=T1.Button,label:a,onClick:c,...u}=i,d=a;!d&&n?d=(0,El.sprintf)((0,El._x)("Add %s","directly add the only allowed block"),r):d||(d=(0,El._x)("Add block","Generic label for block inserter button"));function f(m){e&&e(m),c&&c(m)}return(0,Qv.jsx)(s,{__next40pxDefaultSize:i.as?void 0:!0,icon:Wn,label:d,tooltipPosition:"bottom",onClick:f,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...u})},oSe=class extends QW.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=tSe}=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,Qv.jsx)(E1,{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,Qv.jsx)(qW,{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,Qv.jsx)(T1.Dropdown,{className:"block-editor-inserter",contentClassName:F("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,El.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},ai=(0,P1.compose)([(0,I1.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(_),{getBlockVariations:c}=e(Jv.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,I1.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,Jv.createBlock)(c.name,{...c.attributes||{},...b})}else h=(0,Jv.createBlock)(a.name);p(h,m(),r,d),u&&u(h);let g=(0,El.sprintf)((0,El.__)("%s block added"),a.title);(0,XW.speak)(g)}})),(0,P1.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(oSe);var ey=l(x()),rSe="\uFEFF";function xh({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,O1.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,O1.useDispatch)(_);if(o||n)return null;let a=(0,JW.decodeEntities)(r)||(0,d5.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,ey.jsxs)("div",{"data-root-client-id":e||"",className:F("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,ey.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,d5.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(R1.ENTER===u.keyCode||R1.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:rSe}),(0,ey.jsx)(ai,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var e$=l(A()),f5=l(O()),ty=l(M());var t$=l(Oe());var A1=l(x());function o$({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,A1.jsx)(ai,{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,ty.sprintf)((0,ty._x)("Add %s","directly add the only allowed block"),u):(0,ty._x)("Add block","Generic label for block inserter button");return(0,A1.jsx)(e$.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:F(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,A1.jsx)(Ie,{icon:Wn})})},isAppender:!0})}var r$=(0,f5.forwardRef)((e,t)=>((0,t$.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),o$(e,t))),Su=(0,f5.forwardRef)(o$);var wh=l(x());function nSe({rootClientId:e}){return(0,m5.useSelect)(o=>o(_).canInsertBlockType((0,n$.getDefaultBlockName)(),e))?(0,wh.jsx)(xh,{rootClientId:e}):(0,wh.jsx)(Su,{rootClientId:e,className:"block-list-appender__toggle"})}function i$({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,m5.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(_),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,wh.jsx)(r,{tabIndex:-1,className:F("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,wh.jsx)(t,{}):(0,wh.jsx)(nSe,{rootClientId:e})})}var y$=l(q()),ry=l(V()),_$=l(O()),S$=l(M());var Ch=l(V()),wu=l(O()),N1=l(A()),k$=l(q());var l$=l(V()),xu=l(O()),c$=l(A()),u$=l(M());var a$=l(q()),p5=l(Ve()),s$=new WeakMap;function iSe(e){let t=(0,a$.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=s$.get(u);d||(d=(0,p5.getScrollContainer)(u),s$.set(u,d));let f=(0,p5.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 Lf=iSe;var h5=l(x()),sSe=Number.MAX_SAFE_INTEGER;function aSe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,xu.useReducer)(y=>(y+1)%sSe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,l$.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=dt(e),h=dt(t),g=d==="vertical",b=(0,xu.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,I=0;if(i==="group"){let R=S||v;C=R.top,E=0,I=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,I=S&&v?S.top-v.bottom:0,w=v?v.left:S.left):(C=v?v.top:S.top,I=v?v.height:S.height,(0,u$.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,I)}},[p,h,c,g,m,i,s]),k=Lf(n);return(0,xu.useLayoutEffect)(()=>{if(!p)return;let y=new window.MutationObserver(u);return y.observe(p,{attributes:!0}),()=>{y.disconnect()}},[p]),(0,xu.useLayoutEffect)(()=>{if(!h)return;let y=new window.MutationObserver(u);return y.observe(h,{attributes:!0}),()=>{y.disconnect()}},[h]),(0,xu.useLayoutEffect)(()=>{if(p)return p.ownerDocument.defaultView.addEventListener("resize",u),()=>{p.ownerDocument.defaultView?.removeEventListener("resize",u)}},[p]),!p&&!h||!m?null:(0,h5.jsx)(c$.Popover,{ref:k,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:F("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,h5.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var L1=aSe;var p$=l(V()),h$=l(q()),g$=l(A());var Il=l(O());var d$=l(q()),f$=l(A()),Tl=l(O());var g5=l(x()),lSe=Number.MAX_SAFE_INTEGER;function cSe({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=dt(e),u=dt(t??e),d=(0,d$.useMergeRefs)([a,Lf(n)]),[f,m]=(0,Tl.useReducer)(h=>(h+1)%lSe,0);(0,Tl.useLayoutEffect)(()=>{if(!c)return;let h=new window.MutationObserver(m);return h.observe(c,{attributes:!0}),()=>{h.disconnect()}},[c]);let p=(0,Tl.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?$M(Fp(c),Fp(u)):Fp(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,g5.jsx)(f$.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:p,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:F("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var Mf=(0,Tl.forwardRef)(cSe),uSe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,g5.jsx)(Mf,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),m$=(0,Tl.forwardRef)(uSe);var M1=l(x());function dSe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=dt(e);return(0,M1.jsx)(Mf,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,M1.jsx)(fSe,{selectedElement:a,additionalStyles:n,children:o}):o})}function fSe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,Il.useState)(e.offsetWidth),[i,s]=(0,Il.useState)(e.offsetHeight);(0,Il.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,Il.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,M1.jsx)("div",{style:a,children:o})}var li=(0,Il.forwardRef)(dSe);var b5=l(x()),oy={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function mSe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,p$.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(_),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,h$.useReducedMotion)();return(0,b5.jsx)(li,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,b5.jsx)(g$.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?oy.show:oy.hide,animate:oy.show,exit:r?oy.show:oy.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var b$=mSe;var Pl=l(x()),Bh=(0,wu.createContext)();Bh.displayName="InsertionPointOpenRefContext";function pSe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,Ch.useDispatch)(_),s=(0,wu.useContext)(Bh),a=(0,wu.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:p,isZoomOutMode:h}=(0,Ch.useSelect)(R=>{let{getBlockOrder:B,getBlockListSettings:P,getBlockInsertionPoint:T,isBlockBeingDragged:L,getPreviousBlockClientId:z,getNextBlockClientId:U,getSettings:H,isZoomOut:N}=j(R(_)),D=T(),W=B(D.rootClientId);if(!W.length)return{};let $=W[D.index-1],X=W[D.index];for(;L($);)$=z($);for(;L(X);)X=U(X);let te=H();return{previousClientId:$,nextClientId:X,orientation:P(D.rootClientId)?.orientation||"vertical",rootClientId:D.rootClientId,isDistractionFree:te.isDistractionFree,isInserterShown:D?.__unstableWithInserter,isZoomOutMode:N()}},[]),{getBlockEditingMode:g}=(0,Ch.useSelect)(_),b=(0,k$.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,wu.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 I=F("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,Pl.jsx)(L1,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,Pl.jsxs)(N1.__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:F(I,{"is-with-inserter":m}),onHoverEnd:y,children:[(0,Pl.jsx)(N1.__unstableMotion.div,{variants:w,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,Pl.jsx)(N1.__unstableMotion.div,{variants:C,className:F("block-editor-block-list__insertion-point-inserter"),children:(0,Pl.jsx)(ai,{ref:S,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:R=>{s.current=R},onSelectOrClose:()=>{s.current=!1}})})]})})}function v$(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,Ch.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,Pl.jsx)(b$,{...e},`${t.rootClientId}-${t.index}`):(0,Pl.jsx)(pSe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function x$(){let e=(0,_$.useContext)(Bh),t=(0,ry.useSelect)(g=>g(_).getSettings().isDistractionFree||j(g(_)).isZoomOut(),[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:c,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:m}=j((0,ry.useSelect)(_)),{showInsertionPoint:p,hideInsertionPoint:h}=(0,ry.useDispatch)(_);return(0,y$.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 z=L.getBoundingClientRect();return L.classList.contains("wp-block")&&S==="vertical"&&z.top>C||L.classList.contains("wp-block")&&S==="horizontal"&&((0,S$.isRTL)()?z.right<E:z.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 P=R.getBoundingClientRect();if(S==="horizontal"&&(k.clientY>P.bottom||k.clientY<P.top)||S==="vertical"&&(k.clientX>P.right||k.clientX<P.left)){h();return}let T=r(B);if(T===0){h();return}p(y,T,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,p,h,i,t])}var G$=l(q()),Th=l(O()),W$=l(V()),Ff=l(K());var w$=l(x());function C$({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Ae();return(0,w$.jsx)(Su,{className:F({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var B$=l(x());function E$(){let{clientId:e}=Ae();return(0,B$.jsx)(xh,{rootClientId:e})}var V1=l(O()),P$=l(V()),D1=l(Oe()),O$=l(ny());var iy=new WeakMap;function hSe(){let e;return t=>((e===void 0||!(0,O$.default)(e,t))&&(e=t),e)}function I$(e){let[t]=(0,V1.useState)(hSe);return t(e)}function R$(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,P$.useRegistry)(),p=I$(o),h=I$(r),g=c===void 0||t==="contentOnly"?t:c;(0,V1.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=Gi(f?.type);b.orientation=k.getOrientation(f)}s!==void 0&&((0,D1.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,D1.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,D1.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),iy.get(m)||iy.set(m,{}),iy.get(m)[e]=b,window.queueMicrotask(()=>{let k=iy.get(m);if(Object.keys(k).length){let{updateBlockListSettings:y}=m.dispatch(_);y(k),iy.set(m,{})}})},[e,p,h,g,n,i,s,a,u,d,f,m])}var k5=l(zd()),F1=l(O()),A$=l(V()),L$=l(K());function M$(e,t,o,r){let n=(0,A$.useRegistry)(),i=(0,F1.useRef)(null);(0,F1.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,k5.default)(t,i.current);if(!p||!h)return;i.current=t;let g=(0,L$.synchronizeBlocksWithTemplate)(m,t);(0,k5.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 N$=l(K()),D$=l(V());function V$(e){return(0,D$.useSelect)(t=>{let o=t(_).getBlock(e);if(!o)return;let r=t(N$.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 Vf=l(V()),H1=l(O()),U1=l(q()),H$=l(M()),Eh=l(K());var v5=l(O()),wn=l(K()),Nf=l(V()),F$=l(Ve());function y5(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 gSe(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:p}=y5(u);if(m==="inserter"){s();let h=p.map(g=>(0,wn.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 bSe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,wn.findTransform)((0,wn.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function kSe(e){return t=>{let o=(0,wn.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function z1(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,Nf.useSelect)(_),{getGroupingBlockName:m}=(0,Nf.useSelect)(wn.store),{insertBlocks:p,moveBlocksToPosition:h,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:k,removeBlocks:y}=(0,Nf.useDispatch)(_),v=(0,Nf.useRegistry)(),S=(0,v5.useCallback)((R,B=!0,P=0,T=[])=>{Array.isArray(R)||(R=[R]);let z=c(e)[t];if(r==="replace")k(z,R,void 0,P);else if(r==="group"){let U=f(z);n==="left"?R.push(U):R.unshift(U);let H=R.map($=>(0,wn.createBlock)($.name,$.attributes,$.innerBlocks)),N=R.every($=>$.name==="core/image"),D=i("core/gallery",e),W=(0,wn.createBlock)(N&&D?"core/gallery":m(),{layout:{type:"flex",flexWrap:N&&D?null:"nowrap"}},H);k([z,...T],W,void 0,P)}else p(R,t,e,B,P)},[c,e,t,r,k,f,n,i,m,p]),w=(0,v5.useCallback)((R,B,P)=>{if(r==="replace"){let T=u(R),z=c(e)[t];v.batch(()=>{y(R,!1),k(z,T,void 0,0)})}else h(R,B,e,P)},[r,c,u,h,v,y,k,t,e]),C=gSe(e,t,s,a,w,S,b,r,f),E=bSe(e,d,g,i,S),I=kSe(S);return R=>{let B=(0,F$.getFilesFromDataTransfer)(R.dataTransfer),P=R.dataTransfer.getData("text/html");P?I(P):B.length?E(B):C(R)}}function vSe(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 Df(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=vSe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function j1(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function z$(e,t){return t.top<=e.y&&t.bottom>=e.y}var _5=30,ySe=120,_Se=120;function SSe(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]=Df(t,k,["top","bottom"]);if(k.height>ySe&&y<_5){if(v==="top")return[m,"before"];if(v==="bottom")return[m+1,"after"]}}let p=(0,H$.isRTL)();if(d&&f==="horizontal"){let k=d.getBoundingClientRect(),[y,v]=Df(t,k,["left","right"]);if(k.width>_Se&&y<_5){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]=Df(t,w,n),[I,R]=Df(t,w,["left","right"]),B=j1(t,w);k&&B?C=0:o==="vertical"&&S!=="horizontal"&&(B&&I<_5||!B&&z$(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 G1(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 j$(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function U$({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,Vf.useRegistry)(),[i,s]=(0,H1.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,Vf.useSelect)(Eh.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}=j((0,Vf.useSelect)(_)),{showInsertionPoint:C,hideInsertionPoint:E,startDragging:I,stopDragging:R}=j((0,Vf.useDispatch)(_)),B=z1(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),P=(0,U1.useThrottle)((0,H1.useCallback)((T,L)=>{k()||I();let z=h(),U=[t,...w(t,!0)];if(z.some(G=>U.includes(G)))return;let N=b(t),D=g([t])[0],W=g(z);if(!G1(a,N,W,D))return;let X=S();if(v()&&X!==t)return;let te=m(t).filter(G=>!((0,Eh.hasBlockSupport)(G.name,"visibility",!0)&&G.attributes?.metadata?.blockVisibility===!1));if(te.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let Z=te.map(G=>{let oe=G.clientId;return{isUnmodifiedDefaultBlock:(0,Eh.isUnmodifiedDefaultBlock)(G),getBoundingClientRect:()=>{let ue=L.getElementById(`block-${oe}`);return ue?ue.getBoundingClientRect():null},blockIndex:p(oe),blockOrientation:f(oe)?.orientation}}),se=SSe(Z,{x:T.clientX,y:T.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:p(t)}),[ce,Q,ie]=se,J=Z[ce]?.isUnmodifiedDefaultBlock;if(!(v()&&!J&&Q!=="insert")){if(Q==="group"){let G=te[ce],oe=[G.name,...W].every(Re=>Re==="core/image"),ue=d("core/gallery",t),le=y([G.clientId,h()]),ke=c(u(),"block"),Be=ke&&ke.find(({name:Re})=>Re==="group-row");if(oe&&!ue&&(!le||!Be)||!oe&&(!le||!Be))return}n.batch(()=>{s({index:ce,operation:Q,nearestSide:ie});let G=["before","after"].includes(Q)?o:t;C(G,ce,{operation:Q,nearestSide:ie})})}},[k,b,t,g,h,a,S,v,m,f,e,o,p,n,I,C,d,y,c,u]),200);return(0,U1.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:B,onDragOver(T){P(T,T.currentTarget.ownerDocument)},onDragLeave(T){let{ownerDocument:L}=T.currentTarget;j$(T.relatedTarget,L)||j$(T.target,L)||(P.cancel(),E())},onDragEnd(){P.cancel(),R(),E()}})}var Ol=l(x()),xSe={};function wSe({children:e,clientId:t}){let o=V$(t);return(0,Ol.jsx)(uS,{value:o,children:e})}var CSe=(0,Th.memo)(Hv);function $$(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;R$(t,S,o,r,n,i,s,a,u,m,g,k),M$(t,c,u,f);let C=(0,Ff.getBlockSupport)(y,"layout")||(0,Ff.getBlockSupport)(y,"__experimentalLayout")||xSe,{allowSizingOnChildren:E=!1}=C,I=k||C,R=(0,Th.useMemo)(()=>({...w,...I,...E&&{allowSizingOnChildren:!0}}),[w,I,E]),B=(0,Ol.jsx)(CSe,{rootClientId:t,renderAppender:h,__experimentalAppenderTagName:p,layout:R,wrapperRef:d,placeholder:b});return!v?.providesContext||Object.keys(v.providesContext).length===0?B:(0,Ol.jsx)(wSe,{clientId:t,children:B})}function BSe(e){return uC(e),(0,Ol.jsx)($$,{...e})}var W1=(0,Th.forwardRef)((e,t)=>{let o=zf({ref:t},e);return(0,Ol.jsx)("div",{className:"block-editor-inner-blocks",children:(0,Ol.jsx)("div",{...o})})});function zf(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Ae(),c=(0,W$.useSelect)(S=>{let{getBlockName:w,isZoomOut:C,getTemplateLock:E,getBlockRootClientId:I,getBlockEditingMode:R,getBlockSettings:B,getSectionRootClientId:P}=j(S(_));if(!i){let W=P();return{isDropZoneDisabled:C()&&W!==""}}let{hasBlockSupport:T,getBlockType:L}=S(Ff.store),z=w(i),U=R(i),H=I(i),[N]=B(i,"layout"),D=U==="disabled";if(C()){let W=P();D=i!==W}return{__experimentalCaptureToolbars:T(z,"__experimentalExposeControlsToChildren",!1),name:z,blockType:L(z),parentLock:E(H),parentClientId:H,isDropZoneDisabled:D,defaultLayout:N}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:p,isDropZoneDisabled:h,defaultLayout:g}=c,b=U$({dropZoneElement:n,rootClientId:i,parentClientId:p}),k=(0,G$.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?BSe:$$;return{...e,ref:k,className:F(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,Ol.jsx)(v,{...y,clientId:i}):(0,Ol.jsx)(Hv,{...t})}}zf.save=Ff.__unstableGetInnerBlocksProps;W1.DefaultBlockAppender=E$;W1.ButtonBlockAppender=C$;W1.Content=()=>zf.save().children;var sy=W1;var ay=l(q()),Ih=l(V()),S5=l(Ve()),pr=l(nt());var K$=l(x()),ESe=new Set([pr.UP,pr.RIGHT,pr.DOWN,pr.LEFT,pr.ENTER,pr.BACKSPACE]);function TSe(e){let{keyCode:t,shiftKey:o}=e;return!o&&ESe.has(t)}function ly(){let e=(0,Ih.useSelect)(o=>o(_).isTyping(),[]),{stopTyping:t}=(0,Ih.useDispatch)(_);return(0,ay.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,Ih.useSelect)(i=>{let{isTyping:s}=i(_);return{isTyping:s()}},[]),{startTyping:t,stopTyping:o}=(0,Ih.useDispatch)(_),r=ly(),n=(0,ay.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,S5.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,S5.isTextField)(g)||!i.contains(g)||h==="keydown"&&!TSe(p)||t()}return i.addEventListener("keypress",m),i.addEventListener("keydown",m),()=>{i.removeEventListener("keypress",m),i.removeEventListener("keydown",m)}},[e,t,o]);return(0,ay.useMergeRefs)([r,n])}function ISe({children:e}){return(0,K$.jsx)("div",{ref:cy(),children:e})}var Y$=ISe;var uy=l(A()),q$=l(q()),Z$=l(V()),X$=l(O()),Q$=l(M());var $1=l(x());function x5({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,X$.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,Z$.useSelect)(w=>{let{getInsertionPoint:C,getBlockOrder:E,getSectionRootClientId:I,isBlockInsertionPointVisible:R,getBlockInsertionPoint:B,getDraggedBlockClientIds:P}=j(w(_)),T=I(),L=E(T);return{sectionRootClientId:T,sectionClientIds:L,insertionPoint:C(),blockInsertionPoint:B(),blockInsertionPointVisible:R(),blocksBeingDragged:P()}},[]),f=(0,q$.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,$1.jsx)(uy.__unstableAnimatePresence,{children:m&&(0,$1.jsx)(uy.__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:F("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,$1.jsx)(uy.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,Q$.__)("Drop pattern.")})})})}var Rr=l(x()),Gw=(0,Cu.createContext)();Gw.displayName="IntersectionObserverContext";var K1=new WeakMap,PSe={trailing:!0};function OSe({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,editedContentOnlySection:n}=(0,ci.useSelect)(d=>{let{getSettings:f,isTyping:m,hasBlockSpotlight:p,getEditedContentOnlySection:h}=j(d(_)),{outlineMode:g,focusMode:b}=f();return{isOutlineMode:g&&!m(),isFocusMode:b||p(),editedContentOnlySection:h()}},[]),i=(0,ci.useRegistry)(),{setBlockVisibility:s}=(0,ci.useDispatch)(_),a=(0,Y1.useDebounce)((0,Cu.useCallback)(()=>{let d={};K1.get(i).forEach(([f,m])=>{d[f]=m}),s(d)},[i]),300,PSe),c=(0,Cu.useMemo)(()=>{let{IntersectionObserver:d}=window;if(d)return new d(f=>{K1.get(i)||K1.set(i,[]);for(let m of f){let p=m.target.getAttribute("data-block");K1.get(i).push([p,m.isIntersecting])}a()})},[]),u=zf({ref:(0,Y1.useMergeRefs)([gl(),x$(),cy()]),className:F("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r})},t);return(0,Rr.jsxs)(Gw.Provider,{value:c,children:[(0,Rr.jsx)("div",{...u}),!!n&&(0,Rr.jsx)(RSe,{clientId:n})]})}function RSe({clientId:e}){let{stopEditingContentOnlySection:t}=j((0,ci.useDispatch)(_)),o=(0,ci.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(_);return!s()||n(e)||i(e,!0)},[e]);return(0,Cu.useEffect)(()=>{o||t()},[o,t]),null}function sh(e){return(0,Rr.jsx)(iS,{value:j2,children:(0,Rr.jsx)(OSe,{...e})})}var ASe=[],LSe=new Set;function MSe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=WL}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,ci.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}=j(m(_)),I=h(t);if(p().isPreviewMode)return{order:I,selectedBlocks:ASe,visibleBlocks:LSe};let R=g(),B=R[0],P=!t&&!B&&(!I.length||!E((0,J$.getDefaultBlockName)(),t)),T=!!(t&&B&&t===B),L=k(t);return{order:I,selectedBlocks:R,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!v(t)||S(w(B),t))&&y(t)!=="disabled"&&(!L||L==="contentOnly")&&i&&!C()&&(s||T||P)}},[t,i,s]);return(0,Rr.jsxs)(mj,{value:n,children:[a.map(m=>(0,Rr.jsxs)(ci.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,Rr.jsx)(x5,{clientId:m,rootClientId:t,position:"top"}),(0,Rr.jsx)(i8,{rootClientId:t,clientId:m}),c&&(0,Rr.jsx)(x5,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,Rr.jsx)(i$,{tagName:r,rootClientId:t,CustomAppender:o})]})}function Hv(e){return(0,Rr.jsx)(ci.AsyncModeProvider,{value:!1,children:(0,Rr.jsx)(MSe,{...e})})}var tg=l(V()),yD=l(Ve()),_D=l(A()),$Z=l(hl()),KZ=l(O()),og=l(K()),SD=l(Xo()),rg=l(M());var xK=l(q()),wK=l(V()),CK=l(Ve()),qs=l(O());var Cn=l(M()),jf=l(K()),eB=l(A()),bK=l(q()),kK=l(V()),tB=l(O());var q1=l(A()),tK=l(tv()),oK=l(Oe()),Z1=l(O());var Ar=l(A()),eK=(0,Ar.createSlotFill)("InspectorControls"),NSe=(0,Ar.createSlotFill)("InspectorAdvancedControls"),DSe=(0,Ar.createSlotFill)("InspectorControlsBindings"),VSe=(0,Ar.createSlotFill)("InspectorControlsBackground"),FSe=(0,Ar.createSlotFill)("InspectorControlsBorder"),zSe=(0,Ar.createSlotFill)("InspectorControlsColor"),jSe=(0,Ar.createSlotFill)("InspectorControlsFilter"),HSe=(0,Ar.createSlotFill)("InspectorControlsDimensions"),USe=(0,Ar.createSlotFill)("InspectorControlsPosition"),GSe=(0,Ar.createSlotFill)("InspectorControlsTypography"),WSe=(0,Ar.createSlotFill)("InspectorControlsListView"),$Se=(0,Ar.createSlotFill)("InspectorControlsStyles"),KSe=(0,Ar.createSlotFill)("InspectorControlsEffects"),YSe={default:eK,advanced:NSe,background:VSe,bindings:DSe,border:FSe,color:zSe,dimensions:HSe,effects:KSe,filter:jSe,list:WSe,position:USe,settings:eK,styles:$Se,typography:GSe},Bu=YSe,dy=(0,Ar.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var Ph=l(x());function w5({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,oK.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Ae(),i=Bu[t]?.Fill;return i?n[vc]?(0,Ph.jsx)(q1.__experimentalStyleProvider,{document,children:(0,Ph.jsx)(i,{children:s=>(0,Ph.jsx)(ZSe,{fillProps:s,children:e,resetAllFilter:r})})}):null:((0,tK.default)(`Unknown InspectorControls group "${t}" provided.`),null)}function qSe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,Z1.useContext)(q1.__experimentalToolsPanelContext);return(0,Z1.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function ZSe({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,Ph.jsx)(qSe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,Ph.jsx)(s,{...a,children:i}),n)}var uK=l(A()),dK=l(tv()),fK=l(Oe());var nK=l(A()),X1=l(V()),iK=l(O());var rK=l(q());function zo(){return(0,rK.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function Oh(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 sK=l(x());function aK({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,X1.useDispatch)(_),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,X1.useSelect)(_),c=zo(),u=s(),d=(0,iK.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:xe(b.style)},m[h]=b}),r(p,m,!0)},[n,i,a,u,r]);return(0,sK.jsx)(nK.__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 C5=l(A()),Q1=l(O()),lK=l(x());function cK({Slot:e,fillProps:t,...o}){let r=(0,Q1.useContext)(C5.__experimentalToolsPanelContext),n=(0,Q1.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[C5.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,lK.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var J1=l(x());function B5({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n}){e&&((0,fK.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let i=Bu[t],s=(0,uK.__experimentalUseSlotFills)(i?.name);if(!i)return(0,dK.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i;return o?(0,J1.jsx)(aK,{group:t,label:o,children:(0,J1.jsx)(cK,{...n,fillProps:r,Slot:a})}):(0,J1.jsx)(a,{...n,fillProps:r,bubblesVirtually:!0})}var E5=l(x()),mK=w5;mK.Slot=B5;var Eu=e=>(0,E5.jsx)(w5,{...e,group:"advanced"});Eu.Slot=e=>(0,E5.jsx)(B5,{...e,group:"advanced"});Eu.slotName="InspectorAdvancedControls";var pe=mK;var hK=l(V()),Tu=l(K()),fy=l(M());function pK(e){let t=e?.style?.position?.type;return t==="sticky"?(0,fy.__)("Sticky"):t==="fixed"?(0,fy.__)("Fixed"):null}function mt(e){return(0,hK.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(_),{getBlockType:i,getActiveBlockVariation:s}=t(Tu.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=pK(u);return{isSynced:!1,title:(0,fy.__)("Pattern"),icon:$n,description:k?.description||(0,fy.__)("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,Tu.isReusableBlock)(c)||(0,Tu.isTemplatePart)(c),h=(m?(0,Tu.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=pK(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 my=l(x()),py="position",T5={key:"default",value:"",name:(0,Cn.__)("Default")},I5={key:"sticky",value:"sticky",name:(0,Cn._x)("Sticky","Name for the value of the CSS position property"),hint:(0,Cn.__)("The block will stick to the top of the window instead of scrolling.")},gK={key:"fixed",value:"fixed",name:(0,Cn._x)("Fixed","Name for the value of the CSS position property"),hint:(0,Cn.__)("The block will not move when the page is scrolled.")},XSe=["top","right","bottom","left"],QSe=["sticky","fixed"];function JSe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return QSe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,XSe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function e0e(e){let t=(0,jf.getBlockSupport)(e,py);return!!(t===!0||t?.sticky)}function t0e(e){let t=(0,jf.getBlockSupport)(e,py);return!!(t===!0||t?.fixed)}function o0e(e){return!!(0,jf.getBlockSupport)(e,py)}function vK(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function yK({name:e}={}){let[t,o]=fe("position.fixed","position.sticky"),r=!t&&!o;return!o0e(e)||r}function r0e({style:e={},clientId:t,name:o,setAttributes:r}){let n=t0e(o),i=e0e(o),s=e?.position?.type,{firstParentClientId:a}=(0,kK.useSelect)(p=>{let{getBlockParents:h}=p(_),g=h(t);return{firstParentClientId:g[g.length-1]}},[t]),c=mt(a),u=i&&s===I5.value&&c?(0,Cn.sprintf)((0,Cn.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,tB.useMemo)(()=>{let p=[T5];return(i||s===I5.value)&&p.push(I5),(n||s===gK.value)&&p.push(gK),p},[n,i,s]),f=p=>{let g={...e,position:{...e?.position,type:p,top:p==="sticky"||p==="fixed"?"0px":void 0}};r({style:xe(g)})},m=s&&d.find(p=>p.value===s)||T5;return tB.Platform.select({web:d.length>1?(0,my.jsx)(pe,{group:"position",children:(0,my.jsx)(eB.BaseControl,{__nextHasNoMarginBottom:!0,help:u,children:(0,my.jsx)(eB.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,Cn.__)("Position"),hideLabelFromVision:!0,describedBy:(0,Cn.sprintf)((0,Cn.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:p})=>{f(p.value)},size:"__unstable-large"})})}):null,native:null})}var P5={edit:function(t){return yK(t)?null:(0,my.jsx)(r0e,{...t})},useBlockProps:i0e,attributeKeys:["style"],hasSupport(e){return(0,jf.hasBlockSupport)(e,py)}},n0e={};function i0e({name:e,style:t}){let o=(0,jf.hasBlockSupport)(e,py),r=yK({name:e}),n=o&&!r,i=(0,bK.useInstanceId)(n0e),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=JSe({selector:s,style:t})||"");let c=F({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return is({css:a}),{className:c}}var BK={placement:"top-start"},_K={...BK,flip:!1,shift:!0},s0e={...BK,flip:!0,shift:!1};function SK(e,t,o,r,n){if(!e||!t)return _K;let i=o?.scrollTop||0,s=Fp(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)?_K:s0e}function oB({contentElement:e,clientId:t}){let o=dt(t),[r,n]=(0,qs.useState)(0),{blockIndex:i,isSticky:s}=(0,wK.useSelect)(m=>{let{getBlockIndex:p,getBlockAttributes:h}=m(_);return{blockIndex:p(t),isSticky:vK(h(t))}},[t]),a=(0,qs.useMemo)(()=>{if(e)return(0,CK.getScrollContainer)(e)},[e]),[c,u]=(0,qs.useState)(()=>SK(e,o,a,r,s)),d=(0,xK.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,qs.useCallback)(()=>u(SK(e,o,a,r,s)),[e,o,a,r]);return(0,qs.useLayoutEffect)(f,[i,f]),(0,qs.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 EK=l(V());function rB(e){return(0,EK.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 nB=l(x());function TK({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=rB(e),s=oB({contentElement:t?.current,clientId:e});return(0,nB.jsx)(li,{clientId:o||e,bottomClientId:n,className:F("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,nB.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,nB.jsx)(ai,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var MZ=l(V()),eg=l(O()),NZ=l(hl());var PZ=l(M()),OZ=l(V()),gD=l(O()),RZ=l(q()),zl=l(K()),AZ=l(A());var Hf=l(A()),FK=l(V()),zK=l(M());var AK=l(K()),LK=l(A()),hy=l(V()),gy=l(O()),MK=l(q());var PK=l(Ve()),Zs=l(O()),iB=50,OK=25,a0e=1e3,IK=a0e*(OK/1e3);function RK(){let e=(0,Zs.useRef)(null),t=(0,Zs.useRef)(null),o=(0,Zs.useRef)(null),r=(0,Zs.useRef)(null);(0,Zs.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Zs.useCallback)(a=>{e.current=a.clientY,o.current=(0,PK.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},OK)},[]),i=(0,Zs.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-iB,0),m=Math.max(d-u-iB,0),p=f===0||m===0?0:m/f;t.current=IK*p}else if(a.clientY<u){let f=Math.max(u-iB,0),m=Math.max(u-d-iB,0),p=f===0||m===0?0:m/f;t.current=-IK*p}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var O5=l(x()),l0e=({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,hy.useSelect)(B=>{let{canMoveBlocks:P,getBlockRootClientId:T,getBlockName:L,getBlockAttributes:z,isBlockInsertionPointVisible:U}=B(_),{getBlockType:H,getActiveBlockVariation:N}=B(AK.store),D=T(o[0]),W=L(o[0]),$=N(W,z(o[0]));return{srcRootClientId:D,isDraggable:P(o),icon:$?.icon||H(W)?.icon,visibleInserter:U(),getBlockType:H}},[o]),h=(0,gy.useRef)(!1),[g,b,k]=RK(),{getAllowedBlocks:y,getBlockNamesByClientId:v,getBlockRootClientId:S}=(0,hy.useSelect)(_),{startDraggingBlocks:w,stopDraggingBlocks:C}=(0,hy.useDispatch)(_);(0,gy.useEffect)(()=>()=>{h.current&&C()},[]);let I=dt(o[0])?.closest("body");return(0,gy.useEffect)(()=>{if(!I||!a)return;let P=(0,MK.throttle)(T=>{if(!T.target.closest("[data-block]"))return;let L=v(o),z=T.target.closest("[data-block]").getAttribute("data-block"),U=y(z),H=v([z])[0],N;if(U?.length===0){let D=S(z),W=v([D])[0],$=y(D);N=G1(p,$,L,W)}else N=G1(p,U,L,H);!N&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return I.addEventListener("dragover",P),()=>{I.removeEventListener("dragover",P)}},[o,I,a,y,v,S,p,m]),d?(0,O5.jsx)(LK.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,O5.jsx)(XC,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:B,onDraggableEnd:P})=>t({draggable:!0,onDragStart:B,onDragEnd:P})}):t({draggable:!1})},sB=l0e;var DK=l(K()),aB=l(A()),VK=l(q()),lB=l(V()),cB=l(O()),ui=l(M());var ge=l(M()),Iu=(e,t)=>e==="up"?t==="horizontal"?(0,ge.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ge.isRTL)()?"left":"right":"down":null;function NK(e,t,o,r,n,i,s){let a=o+1;if(e>1)return c0e(e,o,r,n,i,s);if(r&&n)return(0,ge.sprintf)((0,ge.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=Iu("down",s);if(c==="down")return(0,ge.sprintf)((0,ge.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ge.sprintf)((0,ge.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ge.sprintf)((0,ge.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=Iu("down",s);if(c==="down")return(0,ge.sprintf)((0,ge.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ge.sprintf)((0,ge.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ge.sprintf)((0,ge.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=Iu("up",s);if(c==="up")return(0,ge.sprintf)((0,ge.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ge.sprintf)((0,ge.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ge.sprintf)((0,ge.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=Iu("up",s);if(c==="up")return(0,ge.sprintf)((0,ge.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ge.sprintf)((0,ge.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ge.sprintf)((0,ge.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function c0e(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ge.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=Iu("down",i);if(a==="down")return(0,ge.sprintf)((0,ge.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ge.sprintf)((0,ge.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ge.sprintf)((0,ge.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=Iu("down",i);if(a==="down")return(0,ge.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ge.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ge.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=Iu("up",i);if(a==="up")return(0,ge.sprintf)((0,ge.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ge.sprintf)((0,ge.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ge.sprintf)((0,ge.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=Iu("up",i);if(a==="up")return(0,ge.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ge.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ge.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var Rl=l(x()),u0e=(e,t)=>e==="up"?t==="horizontal"?(0,ui.isRTL)()?qo:wr:Wd:e==="down"?t==="horizontal"?(0,ui.isRTL)()?wr:qo:Fi:null,d0e=(e,t)=>e==="up"?t==="horizontal"?(0,ui.isRTL)()?(0,ui.__)("Move right"):(0,ui.__)("Move left"):(0,ui.__)("Move up"):e==="down"?t==="horizontal"?(0,ui.isRTL)()?(0,ui.__)("Move left"):(0,ui.__)("Move right"):(0,ui.__)("Move down"):null,R5=(0,cB.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,VK.useInstanceId)(R5),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,lB.useSelect)(w=>{let{getBlockIndex:C,getBlockRootClientId:E,getBlockOrder:I,getBlock:R,getBlockListSettings:B}=w(_),P=s[0],T=E(P),L=C(P),z=C(s[s.length-1]),U=I(T),H=R(P),N=L===0,D=z===U.length-1,{orientation:W}=B(T)||{};return{blockType:H?(0,DK.getBlockType)(H.name):null,isDisabled:c||(t==="up"?N:D),rootClientId:T,firstIndex:L,isFirst:N,isLast:D,orientation:o||W}},[e,t]),{moveBlocksDown:b,moveBlocksUp:k}=(0,lB.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,Rl.jsxs)(Rl.Fragment,{children:[(0,Rl.jsx)(aB.Button,{__next40pxDefaultSize:!0,ref:n,className:F("block-editor-block-mover-button",`is-${t}-button`),icon:u0e(t,g),label:d0e(t,g),"aria-describedby":S,...r,onClick:d?null:v,disabled:d,accessibleWhenDisabled:!0}),(0,Rl.jsx)(aB.VisuallyHidden,{id:S,children:NK(a,u&&u.title,h,m,p,t==="up"?-1:1,g)})]})}),uB=(0,cB.forwardRef)((e,t)=>(0,Rl.jsx)(R5,{direction:"up",ref:t,...e})),dB=(0,cB.forwardRef)((e,t)=>(0,Rl.jsx)(R5,{direction:"down",ref:t,...e}));var Xs=l(x());function f0e({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:o,isBlockMoverDownButtonDisabled:r}){let{canMove:n,rootClientId:i,isFirst:s,isLast:a,orientation:c,isManualGrid:u}=(0,FK.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,Xs.jsxs)(Hf.ToolbarGroup,{className:F("block-editor-block-mover",{"is-horizontal":c==="horizontal"}),children:[!t&&(0,Xs.jsx)(sB,{clientIds:e,fadeWhenDisabled:!0,children:d=>(0,Xs.jsx)(Hf.Button,{__next40pxDefaultSize:!0,icon:rk,className:"block-editor-block-mover__drag-handle",label:(0,zK.__)("Drag"),tabIndex:"-1",...d})}),!u&&(0,Xs.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Xs.jsx)(Hf.ToolbarItem,{children:d=>(0,Xs.jsx)(uB,{disabled:o,clientIds:e,...d})}),(0,Xs.jsx)(Hf.ToolbarItem,{children:d=>(0,Xs.jsx)(dB,{disabled:r,clientIds:e,...d})})]})]})}var fB=f0e;var UK=l(A()),pB=l(V()),hB=l(M()),GK=l(O());var by=l(V()),Pu=l(O());var{clearTimeout:jK,setTimeout:m0e}=window,HK=200;function p0e({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=HK}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,by.useSelect)(_),{toggleBlockHighlight:s}=(0,by.useDispatch)(_),a=(0,Pu.useRef)(),c=(0,by.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&&jK&&jK(g)},p=g=>{g&&g.stopPropagation(),m(),u(!0)},h=g=>{g&&g.stopPropagation(),m(),a.current=m0e(()=>{f()&&u(!1)},r)};return(0,Pu.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:p,debouncedHideGestures:h}}function Rh({ref:e,highlightParent:t=!1,debounceTimeout:o=HK}){let[r,n]=(0,Pu.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=p0e({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,Pu.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,Pu.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 mB=l(x());function WK(){let{selectBlock:e}=(0,pB.useDispatch)(_),{parentClientId:t}=(0,pB.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=j(i(_)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=mt(t),r=(0,GK.useRef)(),n=Rh({ref:r,highlightParent:!0});return(0,mB.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,mB.jsx)(UK.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,hB.sprintf)((0,hB.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,mB.jsx)(Te,{icon:o?.icon})})},t)}var gB=l(A());var Ah=l(A()),h0e=(0,Ah.createSlotFill)("BlockControls"),g0e=(0,Ah.createSlotFill)("BlockControlsBlock"),b0e=(0,Ah.createSlotFill)("BlockFormatControls"),k0e=(0,Ah.createSlotFill)("BlockControlsOther"),v0e=(0,Ah.createSlotFill)("BlockControlsParent"),y0e={default:h0e,block:g0e,inline:b0e,other:k0e,parent:v0e},ky=y0e;function $K(e,t){let o=Ae();return o[vc]?ky[e]?.Fill:o[Ym]&&t?ky.parent.Fill:null}var Al=l(x());function A5({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=$K(e,r);if(!n)return null;let i=(0,Al.jsxs)(Al.Fragment,{children:[e==="default"&&(0,Al.jsx)(gB.ToolbarGroup,{controls:t}),o]});return(0,Al.jsx)(gB.__experimentalStyleProvider,{document,children:(0,Al.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,Al.jsx)(u,{...d,children:c}),i)}})})}var vy=l(O()),Ll=l(A()),YK=l(tv());var L5=l(x()),{ComponentsContext:KK}=j(Ll.privateApis);function M5({group:e="default",...t}){let o=(0,vy.useContext)(Ll.__experimentalToolbarContext),r=(0,vy.useContext)(KK),n=(0,vy.useMemo)(()=>({forwardedContext:[[Ll.__experimentalToolbarContext.Provider,{value:o}],[KK.Provider,{value:r}]]}),[o,r]),i=ky[e],s=(0,Ll.__experimentalUseSlotFills)(i.name);if(!i)return(0,YK.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,L5.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,L5.jsx)(Ll.ToolbarGroup,{children:c})}var N5=l(x()),qK=A5;qK.Slot=M5;var D5=e=>(0,N5.jsx)(A5,{group:"inline",...e});D5.Slot=e=>(0,N5.jsx)(M5,{group:"inline",...e});var ut=qK;var ZK=l(A()),{Fill:XK,Slot:_0e}=(0,ZK.createSlotFill)("__unstableBlockToolbarLastItem");XK.Slot=_0e;var bB=XK;var GB=l(A());var zh=l(K()),In=l(A()),Lu=l(V());var HB=l(O()),Qs=l(M()),dq=l(hl()),Yf=l(q());var Mh=l(V()),Ou=l(K());var pY=l(O()),_y=l(K()),yy=l(V()),hY=l(qn()),Ml=l(M());var Bn=l(K()),QK=l(O()),S0e="align";var JK="__experimentalBorder",kB="color",x0e="customClassName",eY="typography.__experimentalFontFamily",tY="typography.fontSize",w0e="typography.lineHeight",C0e="typography.__experimentalFontStyle",B0e="typography.__experimentalFontWeight",oY="typography.textAlign",E0e="typography.textColumns",T0e="typography.__experimentalTextDecoration",I0e="typography.__experimentalWritingMode",P0e="typography.__experimentalTextTransform",O0e="typography.__experimentalLetterSpacing",R0e="layout",A0e=[w0e,tY,C0e,B0e,eY,oY,E0e,T0e,P0e,I0e,O0e],L0e=["shadow"],M0e="spacing",N0e=[...L0e,...A0e,JK,kB,M0e],rY=e=>(0,Bn.hasBlockSupport)(e,S0e);function nY(e,t="any"){if(QK.Platform.OS!=="web")return!1;let o=(0,Bn.getBlockSupport)(e,JK);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var iY=e=>{let t=(0,Bn.getBlockSupport)(e,kB);return t!==null&&typeof t=="object"&&!!t.gradients},sY=e=>{let t=(0,Bn.getBlockSupport)(e,kB);return t&&t.background!==!1},aY=e=>(0,Bn.hasBlockSupport)(e,oY);var lY=e=>{let t=(0,Bn.getBlockSupport)(e,kB);return t&&t.text!==!1};var cY=e=>(0,Bn.hasBlockSupport)(e,x0e,!0);var uY=e=>(0,Bn.hasBlockSupport)(e,eY);var dY=e=>(0,Bn.hasBlockSupport)(e,tY);var fY=e=>(0,Bn.hasBlockSupport)(e,R0e);var mY=e=>N0e.some(t=>(0,Bn.hasBlockSupport)(e,t));function D0e(e){try{let t=(0,_y.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var V0e={align:rY,borderColor:e=>nY(e,"color"),backgroundColor:sY,textAlign:aY,textColor:lY,gradient:iY,className:cY,fontFamily:uY,fontSize:dY,layout:fY,style:mY};function F0e(e,t){return Object.entries(V0e).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function V5(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,F0e(t[r],e[r])),V5(e[r].innerBlocks,t[r].innerBlocks,o)}function Lh(){let e=(0,yy.useRegistry)(),{updateBlockAttributes:t}=(0,yy.useDispatch)(_),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,yy.useDispatch)(hY.store);return(0,pY.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,Ml.__)("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,Ml.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!D0e(s)){r((0,Ml.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,_y.parse)(s);if(a.length===1?e.batch(()=>{V5(i,i.map(()=>a[0]),t)}):e.batch(()=>{V5(i,a,t)}),i.length===1){let c=(0,_y.getBlockType)(i[0].name)?.title;o((0,Ml.sprintf)((0,Ml.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,Ml.sprintf)((0,Ml.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function gY({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,Mh.useSelect)(Ou.store),i=(0,Mh.useSelect)(v=>{let{canInsertBlockType:S,getBlockRootClientId:w,getBlocksByClientId:C,getDirectInsertBlock:E,canRemoveBlocks:I}=v(_),R=C(e),B=w(e[0]),P=S(r(),B),T=B?E(B):null;return{canRemove:I(e),canInsertBlock:R.every(L=>(P||!!T)&&S(L.name,B)),canCopyStyles:R.every(L=>!!L&&((0,Ou.hasBlockSupport)(L.name,"color")||(0,Ou.hasBlockSupport)(L.name,"typography"))),canDuplicate:R.every(L=>!!L&&(0,Ou.hasBlockSupport)(L.name,"multiple",!0)&&S(L.name,B))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,Mh.useSelect)(_),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:p,duplicateBlocks:h,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:k}=(0,Mh.useDispatch)(_),y=Lh();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,Ou.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 bY=l(A()),z0e=(0,bY.createSlotFill)(Symbol("CommentIconSlotFill")),vB=z0e;var kY=l(M()),vY=l(A()),yB=l(K()),_B=l(V());var yY=l(x());function j0e({clientId:e}){let t=(0,_B.useSelect)(r=>r(_).getBlock(e),[e]),{replaceBlocks:o}=(0,_B.useDispatch)(_);return!t||t.name!=="core/html"?null:(0,yY.jsx)(vY.MenuItem,{onClick:()=>o(e,(0,yB.rawHandler)({HTML:(0,yB.getBlockContent)(t)})),children:(0,kY.__)("Convert to Blocks")})}var _Y=j0e;var SY=l(A()),{Fill:xY,Slot:H0e}=(0,SY.createSlotFill)("__unstableBlockSettingsMenuFirstItem");xY.Slot=H0e;var SB=xY;var Fh=l(A()),rq=l(K()),nq=l(V());var z5=l(A()),j5=l(M()),BY=l(K()),CB=l(V()),EY=l(nt());var wY=l(K()),CY=l(V());function Sy(e){return(0,CY.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(_),{getGroupingBlockName:s,getBlockType:a}=t(wY.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 xB=l(V()),wB=l(K()),Uf=l(A());var xy=l(M());var Gf=l(x()),U0e={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function G0e(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=Sy(),{replaceBlocks:n}=(0,xB.useDispatch)(_),{canRemove:i,variations:s}=(0,xB.useSelect)(h=>{let{canRemoveBlocks:g}=h(_),{getBlockVariations:b}=h(wB.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=h=>{let g=(0,wB.switchToBlockType)(e,o);typeof h!="string"&&(h="group"),g&&g.length>0&&(g[0].attributes.layout=U0e[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,Gf.jsxs)(Uf.ToolbarGroup,{children:[(0,Gf.jsx)(Uf.ToolbarButton,{icon:sk,label:(0,xy._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,Gf.jsx)(Uf.ToolbarButton,{icon:wA,label:(0,xy._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,Gf.jsx)(Uf.ToolbarButton,{icon:VA,label:(0,xy._x)("Stack","action: convert blocks to stack"),onClick:u}),p&&(0,Gf.jsx)(Uf.ToolbarButton,{icon:ik,label:(0,xy._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var F5=G0e;var Wf=l(x());function TY({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,CB.useSelect)(_),{replaceBlocks:c}=(0,CB.useDispatch)(_),u=()=>{let m=(0,BY.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,Wf.jsxs)(Wf.Fragment,{children:[t&&(0,Wf.jsx)(z5.MenuItem,{shortcut:f.length>1?EY.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,j5._x)("Group","verb")}),o&&(0,Wf.jsx)(z5.MenuItem,{onClick:()=>{d(),s()},children:(0,j5._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var H5=l(M()),OY=l(O()),RY=l(A());var IY=l(V());function En(e){return(0,IY.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=j(t(_));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var di=l(M()),wy=l(O()),lo=l(A());var BB=l(V()),PY=l(K());var vt=l(x()),W0e=["core/navigation"];function $0e(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function EB({clientId:e,onClose:t}){let[o,r]=(0,wy.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=En(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,BB.useSelect)(b=>{let{getBlockName:k,getBlockAttributes:y}=b(_),v=k(e),S=(0,PY.getBlockType)(v);return{allowsEditLocking:W0e.includes(v),templateLock:y(e)?.templateLock,hasTemplateLock:!!S?.attributes?.templateLock}},[e]),[d,f]=(0,wy.useState)(!!c),{updateBlockAttributes:m}=(0,BB.useDispatch)(_),p=mt(e);(0,wy.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,vt.jsx)(lo.Modal,{title:(0,di.sprintf)((0,di.__)("Lock %s"),p.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,vt.jsxs)("form",{onSubmit:b=>{b.preventDefault(),m([e],{lock:o,templateLock:d?$0e(o):void 0}),t()},children:[(0,vt.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,vt.jsx)("legend",{children:(0,di.__)("Select the features you want to lock")}),(0,vt.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,vt.jsxs)("li",{children:[(0,vt.jsx)(lo.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-all",label:(0,di.__)("Lock all"),checked:h,indeterminate:g,onChange:b=>r({move:b,remove:b,...a?{edit:b}:{}})}),(0,vt.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,vt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,vt.jsx)(lo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,di.__)("Lock editing"),checked:!!o.edit,onChange:b=>r(k=>({...k,edit:b}))}),(0,vt.jsx)(lo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Qd:Qa})]}),(0,vt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,vt.jsx)(lo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,di.__)("Lock movement"),checked:o.move,onChange:b=>r(k=>({...k,move:b}))}),(0,vt.jsx)(lo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Qd:Qa})]}),(0,vt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,vt.jsx)(lo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,di.__)("Lock removal"),checked:o.remove,onChange:b=>r(k=>({...k,remove:b}))}),(0,vt.jsx)(lo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Qd:Qa})]})]})]})}),u&&(0,vt.jsx)(lo.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:(0,di.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,vt.jsxs)(lo.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,vt.jsx)(lo.FlexItem,{children:(0,vt.jsx)(lo.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,di.__)("Cancel")})}),(0,vt.jsx)(lo.FlexItem,{children:(0,vt.jsx)(lo.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,di.__)("Apply")})})]})]})})}var $f=l(x());function U5({clientId:e}){let{canLock:t,isLocked:o}=En(e),[r,n]=(0,OY.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,H5.__)("Unlock"):(0,H5.__)("Lock");return(0,$f.jsxs)($f.Fragment,{children:[(0,$f.jsx)(RY.MenuItem,{icon:o?Qa:qR,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,$f.jsx)(EB,{clientId:e,onClose:n})]})}var TB=l(M()),IB=l(A()),Nh=l(O());var Ru=l(x());function G5({clientId:e}){let{canLock:t,isLocked:o}=En(e),[r,n]=(0,Nh.useReducer)(a=>!a,!1),i=(0,Nh.useRef)(!1);if((0,Nh.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,TB.__)("Unlock"):(0,TB.__)("Lock");return!t&&o&&(s=(0,TB.__)("Locked")),(0,Ru.jsxs)(Ru.Fragment,{children:[(0,Ru.jsx)(IB.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,Ru.jsx)(IB.ToolbarButton,{disabled:!t,icon:o?Qd:Qa,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,Ru.jsx)(EB,{clientId:e,onClose:n})]})}var W5=l(M()),AY=l(A()),PB=l(K()),OB=l(V());var LY=l(x()),K0e=()=>{};function MY({clientId:e,onToggle:t=K0e}){let{blockType:o,mode:r,enabled:n}=(0,OB.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(_),f=c(e);return{mode:u(e),blockType:f?(0,PB.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,OB.useDispatch)(_);if(!o||!(0,PB.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,W5.__)("Edit as HTML"):(0,W5.__)("Edit visually");return(0,LY.jsx)(AY.MenuItem,{onClick:()=>{i(e),t()},children:s})}var NY=l(A()),RB=l(V()),DY=l(M());var VY=l(x());function $5({clientId:e,onClose:t}){let{templateLock:o,isLockedByParent:r,isEditingContentOnlySection:n}=(0,RB.useSelect)(u=>{let{getContentLockingParent:d,getTemplateLock:f,getEditedContentOnlySection:m}=j(u(_));return{templateLock:f(e),isLockedByParent:!!d(e),isEditingContentOnlySection:m()===e}},[e]),i=(0,RB.useDispatch)(_),s=!r&&o==="contentOnly";if(window?.__experimentalContentOnlyPatternInsertion||!s&&!n)return null;let{editContentOnlySection:a}=j(i);return!n&&s&&(0,VY.jsx)(NY.MenuItem,{onClick:()=>{a(e),t()},children:(0,DY._x)("Modify","Unlock content locked blocks")})}var UY=l(A()),GY=l(M()),WY=l(O());var as=l(A()),ss=l(M()),zY=l(O()),jY=l(Xo()),AB=l(V());function FY(e){return e?.trim()?.length===0}var Nl=l(x());function HY({clientId:e,onClose:t}){let[o,r]=(0,zY.useState)(),n=mt(e),{metadata:i}=(0,AB.useSelect)(b=>{let{getBlockAttributes:k}=b(_);return{metadata:k(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,AB.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=FY(o),p=d||f,h=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,k=f||m?(0,ss.sprintf)((0,ss.__)('Block name reset to: "%s".'),o):(0,ss.sprintf)((0,ss.__)('Block name changed to: "%s".'),o);(0,jY.speak)(k,"assertive"),s([e],{metadata:xe({...i,name:b})}),t()};return(0,Nl.jsx)(as.Modal,{title:(0,ss.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,Nl.jsx)("form",{onSubmit:b=>{b.preventDefault(),p&&g()},children:(0,Nl.jsxs)(as.__experimentalVStack,{spacing:"3",children:[(0,Nl.jsx)(as.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:o??a,label:(0,ss.__)("Name"),help:u?(0,ss.__)("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,Nl.jsxs)(as.__experimentalHStack,{justify:"right",children:[(0,Nl.jsx)(as.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,ss.__)("Cancel")}),(0,Nl.jsx)(as.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!p,variant:"primary",type:"submit",children:(0,ss.__)("Save")})]})]})})})}var Kf=l(x());function K5({clientId:e}){let[t,o]=(0,WY.useState)(!1);return(0,Kf.jsxs)(Kf.Fragment,{children:[(0,Kf.jsx)(UY.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",children:(0,GY.__)("Rename")}),t&&(0,Kf.jsx)(HY,{clientId:e,onClose:()=>o(!1)})]})}var $Y=l(K());function Y5(e){return{canRename:(0,$Y.getBlockSupport)(e,"renaming",!0)}}var Au=l(M()),KY=l(A());var Dh=l(V()),YY=l(qn()),qY=l(hl());var ZY=l(x());function q5({clientIds:e}){let{updateBlockAttributes:t}=(0,Dh.useDispatch)(_),{createSuccessNotice:o}=(0,Dh.useDispatch)(YY.store),r=(0,Dh.useSelect)(a=>a(_).getBlocksByClientId(e),[e]),n=(0,Dh.useSelect)(a=>a(qY.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),i=r.some(a=>a.attributes.metadata?.blockVisibility===!1);return(0,ZY.jsx)(KY.MenuItem,{icon:i?Xa:ji,onClick:()=>{let a=!i,c=Object.fromEntries(r?.map(({clientId:u,attributes:d})=>[u,{metadata:xe({...d?.metadata,blockVisibility:a?!1:void 0})}]));t(e,c,{uniqueByBlock:!0}),a&&(r.length>1?o((0,Au.sprintf)((0,Au.__)("Blocks hidden. You can access them via the List View (%s)."),n),{id:"block-visibility-hidden",type:"snackbar"}):o((0,Au.sprintf)((0,Au.__)("Block hidden. You can access it via the List View (%s)."),n),{id:"block-visibility-hidden",type:"snackbar"}))},children:i?(0,Au.__)("Show"):(0,Au.__)("Hide")})}var Z5=l(M()),LB=l(A()),MB=l(O());var NB=l(V()),XY=l(K());var Vh=l(x());function X5({clientIds:e}){let{blocks:t,canToggleBlockVisibility:o}=(0,NB.useSelect)(a=>{let{getBlockName:c,getBlocksByClientId:u}=a(_),d=u(e);return{blocks:d,canToggleBlockVisibility:d.every(({clientId:f})=>(0,XY.hasBlockSupport)(c(f),"visibility",!0))}},[e]),r=t.some(a=>a.attributes.metadata?.blockVisibility===!1),n=(0,MB.useRef)(!1),{updateBlockAttributes:i}=(0,NB.useDispatch)(_);if((0,MB.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:xe({...u?.metadata,blockVisibility:r?void 0:!1})}]));i(e,a,{uniqueByBlock:!0})};return(0,Vh.jsx)(Vh.Fragment,{children:(0,Vh.jsx)(LB.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,Vh.jsx)(LB.ToolbarButton,{disabled:!o,icon:r?ji:Xa,label:r?(0,Z5.__)("Hidden"):(0,Z5.__)("Visible"),onClick:s})})})}var QY=l(A()),JY=l(M()),eq=l(V()),FB=l(K());var DB=l(V());function VB(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,DB.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:p}=j(u(_)),h=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:p(e),isEditingContentOnlySection:h===e,editedContentOnlySection:h}},[e]),s=(0,DB.useDispatch)(_),{editContentOnlySection:a,stopEditingContentOnlySection:c}=j(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var tq=l(x());function oq({clientId:e,onClose:t}){let{isSectionBlock:o,isEditingContentOnlySection:r,editContentOnlySection:n}=VB(e),{block:i,onNavigateToEntityRecord:s}=(0,eq.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,FB.isReusableBlock)(i),u=(0,FB.isTemplatePart)(i),d=(c||u)&&s;return(0,tq.jsx)(QY.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,JY._x)("Edit section","Editing a section in the Editor")})}var Tn=l(x()),{Fill:Y0e,Slot:q0e}=(0,Fh.createSlotFill)("BlockSettingsMenuControls"),Z0e=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i}=(0,nq.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,rq.hasBlockSupport)(w.name,"visibility",!0))}},[t]),{canLock:s}=En(r[0]),{canRename:a}=Y5(o[0]),c=r.length===1&&s&&!n,u=r.length===1&&a&&!n,d=i&&!n,f=Sy(r),{isGroupable:m,isUngroupable:p}=f,h=(m||p)&&!n;return(0,Tn.jsx)(q0e,{fillProps:{...e,selectedBlocks:o,selectedClientIds:r},children:g=>!g?.length>0&&!h&&!c?null:(0,Tn.jsxs)(Fh.MenuGroup,{children:[h&&(0,Tn.jsx)(TY,{...f,onClose:e?.onClose}),r.length===1&&(0,Tn.jsx)(oq,{clientId:r[0],onClose:e?.onClose}),c&&(0,Tn.jsx)(U5,{clientId:r[0]}),u&&(0,Tn.jsx)(K5,{clientId:r[0]}),d&&(0,Tn.jsx)(q5,{clientIds:r}),g,r.length===1&&(0,Tn.jsx)($5,{clientId:r[0],onClose:e?.onClose}),e?.count===1&&!n&&(0,Tn.jsx)(MY,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function iq({...e}){return(0,Tn.jsx)(Fh.__experimentalStyleProvider,{document,children:(0,Tn.jsx)(Y0e,{...e})})}iq.Slot=Z0e;var zB=iq;var sq=l(O()),aq=l(A()),lq=l(q()),cq=l(V()),jB=l(M());var Q5=l(x());function uq({parentClientId:e,parentBlockType:t}){let o=(0,lq.useViewportMatch)("medium","<"),{selectBlock:r}=(0,cq.useDispatch)(_),n=(0,sq.useRef)(),i=Rh({ref:n,highlightParent:!0});return o?(0,Q5.jsx)(aq.MenuItem,{...i,ref:n,icon:(0,Q5.jsx)(Te,{icon:t.icon}),onClick:()=>r(e),children:(0,jB.sprintf)((0,jB.__)("Select parent block (%s)"),t.title)}):null}var pt=l(x()),X0e={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function J5({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,Lu.useSelect)(_),{removeBlocks:a}=(0,Lu.useDispatch)(_),c=qp(),u=(0,Yf.useCopyToClipboard)(()=>(0,zh.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,Qs.__)("Copy");return(0,pt.jsx)(In.MenuItem,{ref:u,shortcut:r,children:d})}function eD({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,Lu.useSelect)(B=>{let{getBlockName:P,getBlockRootClientId:T,getPreviousBlockClientId:L,getSelectedBlockClientIds:z,getBlockAttributes:U,getOpenedBlockSettingsMenu:H,getBlockEditingMode:N,isZoomOut:D}=j(B(_)),{getActiveBlockVariation:W}=B(zh.store),$=T(a),X=$&&P($);return{firstParentClientId:$,parentBlockType:$&&(W(X,U($))||(0,zh.getBlockType)(X)),previousBlockClientId:L(a),selectedBlockClientIds:z(),openedBlockSettingsMenu:H(),isContentOnly:N(a)==="contentOnly",isZoomOut:D()}},[a]),{getBlockOrder:g,getSelectedBlockClientIds:b}=(0,Lu.useSelect)(_),{setOpenedBlockSettingsMenu:k}=j((0,Lu.useDispatch)(_)),y=(0,Lu.useSelect)(B=>{let{getShortcutRepresentation:P}=B(dq.store);return{copy:P("core/block-editor/copy"),cut:P("core/block-editor/cut"),duplicate:P("core/block-editor/duplicate"),remove:P("core/block-editor/remove"),insertAfter:P("core/block-editor/insert-after"),insertBefore:P("core/block-editor/insert-before")}},[]),v=f.length>0;async function S(B){if(!r)return;let P=await B;P&&P[0]&&r(P[0],!1)}function w(){if(!r)return;let B=d||c;B||(B=g()[0]);let P=v&&b().length===0;r(B,P)}let C=f?.includes(c),E=i?m===i||!1:void 0;function I(B){B&&m!==i?k(i):!B&&m&&m===i&&k(void 0)}let R=!C&&!!c;return(0,pt.jsx)(gY,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:B,canDuplicate:P,canInsertBlock:T,canRemove:L,onDuplicate:z,onInsertAfter:U,onInsertBefore:H,onRemove:N,onCopy:D,onPasteStyles:W})=>!L&&!P&&!T&&p?null:(0,pt.jsx)(In.DropdownMenu,{icon:zi,label:(0,Qs.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:X0e,open:E,onToggle:I,noIcons:!0,...n,children:({onClose:X})=>(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsxs)(In.MenuGroup,{children:[(0,pt.jsx)(SB.Slot,{fillProps:{onClose:X}}),R&&(0,pt.jsx)(uq,{parentClientId:c,parentBlockType:u}),s===1&&(0,pt.jsx)(_Y,{clientId:a}),!p&&(0,pt.jsx)(J5,{clientIds:t,onCopy:D,shortcut:y.copy}),!p&&(0,pt.jsx)(J5,{clientIds:t,label:(0,Qs.__)("Cut"),eventType:"cut",shortcut:y.cut,__experimentalUpdateSelection:!r}),P&&(0,pt.jsx)(In.MenuItem,{onClick:(0,Yf.pipe)(X,z,S),shortcut:y.duplicate,children:(0,Qs.__)("Duplicate")}),T&&!h&&(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(In.MenuItem,{onClick:(0,Yf.pipe)(X,H),shortcut:y.insertBefore,children:(0,Qs.__)("Add before")}),(0,pt.jsx)(In.MenuItem,{onClick:(0,Yf.pipe)(X,U),shortcut:y.insertAfter,children:(0,Qs.__)("Add after")})]}),s===1&&(0,pt.jsx)(vB.Slot,{fillProps:{clientId:a,onClose:X}})]}),B&&!p&&(0,pt.jsxs)(In.MenuGroup,{children:[(0,pt.jsx)(J5,{clientIds:t,onCopy:D,label:(0,Qs.__)("Copy styles"),eventType:"copyStyles"}),(0,pt.jsx)(In.MenuItem,{onClick:W,children:(0,Qs.__)("Paste styles")})]}),!p&&(0,pt.jsx)(zB.Slot,{fillProps:{onClose:X,count:s,firstBlockClientId:a},clientIds:t}),typeof o=="function"?o({onClose:X}):HB.Children.map(te=>(0,HB.cloneElement)(te,{onClose:X})),L&&(0,pt.jsx)(In.MenuGroup,{children:(0,pt.jsx)(In.MenuItem,{onClick:(0,Yf.pipe)(X,N,w),shortcut:y.remove,children:(0,Qs.__)("Delete")})})]})})})}var fq=eD;var mq=l(A()),Q0e=(0,mq.createSlotFill)(Symbol("CommentIconToolbarSlotFill")),UB=Q0e;var jh=l(x());function J0e({clientIds:e,...t}){return(0,jh.jsxs)(GB.ToolbarGroup,{children:[(0,jh.jsx)(UB.Slot,{}),(0,jh.jsx)(GB.ToolbarItem,{children:o=>(0,jh.jsx)(fq,{clientIds:e,toggleProps:o,...t})})]})}var WB=J0e;var $B=l(A()),pq=l(M()),KB=l(V());var tD=l(x());function hq({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,KB.useSelect)(n=>!!t&&n(_).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,KB.useDispatch)(_);return o?(0,tD.jsx)($B.ToolbarGroup,{children:(0,tD.jsx)($B.ToolbarButton,{onClick:()=>{r(t)},children:(0,pq.__)("Edit visually")})}):null}var YB=l(A()),Lr=l(O()),kq=l(V()),vq=l(Oe()),rD=l(Ve()),yq=l(hl()),_q=l(nt());var oD=l(x());function exe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function gq(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function bq(e){return e.contains(e.ownerDocument.activeElement)}function txe(e){let[t]=rD.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function oxe(e){let[o,r]=(0,Lr.useState)(!0),n=(0,Lr.useCallback)(()=>{let i=rD.focus.tabbable.find(e.current),s=exe(i);s||(0,vq.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,Lr.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function rxe({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,Lr.useState)(t),[c]=(0,Lr.useState)(r),u=(0,Lr.useCallback)(()=>{txe(e.current)},[e]);(0,yq.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,Lr.useEffect)(()=>{a&&u()},[o,a,u]),(0,Lr.useEffect)(()=>{let m=e.current,p=0;return!a&&!bq(m)&&(p=window.requestAnimationFrame(()=>{let h=gq(m),g=c||0;h[g]&&bq(m)&&h[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(p),!n||!m)return;let g=gq(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=j((0,kq.useSelect)(_));(0,Lr.useEffect)(()=>{let m=e.current;if(s){let p=h=>{let g=f();h.keyCode===_q.ESCAPE&&g?.current&&(h.preventDefault(),g.current.focus())};return m.addEventListener("keydown",p),()=>{m.removeEventListener("keydown",p)}}},[s,f,e])}function Hh({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,Lr.useRef)(),u=oxe(c);return rxe({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,oD.jsx)(YB.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,oD.jsx)(YB.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var Sq=l(V()),qB=l(K());function ZB(){return(0,Sq.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(_),i=n(),s=i&&(0,qB.getBlockType)(r(i));return s&&(0,qB.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var Mu=l(A()),xq=l(M()),wq=l(K()),Cq=l(O()),XB=l(V());var Uh=l(x()),nD=[],nxe=6,ixe={placement:"bottom-start"};function Bq({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,XB.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(_),f=c(e),m=f?.metadata?.categories||nD,p=u(e),h=m.length>0?d(p):nD;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:h}},[e]),{replaceBlocks:n}=(0,XB.useDispatch)(_),i=(0,Cq.useMemo)(()=>t.length===0||!r||r.length===0?nD: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,nxe),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,wq.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,Uh.jsx)(Mu.Dropdown,{popoverProps:ixe,renderToggle:({onToggle:a,isOpen:c})=>(0,Uh.jsx)(Mu.ToolbarGroup,{children:(0,Uh.jsx)(Mu.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,xq.__)("Change design")})}),renderContent:()=>(0,Uh.jsx)(Mu.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,Uh.jsx)(Ks,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var cs=l(A()),Qq=l(M()),iE=l(V());var JB=l(V()),Nu=l(K()),Rq=l(O());var iD=l(QB()),Tq=l(M());function Iq(e,t){for(let o of new iD.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 Oq(e)}function Gh(e,t,o){let r=new iD.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function Pq(e){return!e||e.length===0?[]:Oq(e)?e:[{name:"default",label:(0,Tq._x)("Default","block style"),isDefault:!0},...e]}function Oq(e){return e?.find(t=>t.isDefault)}function sxe(e,t){return(0,Rq.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,Nu.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,Nu.cloneBlock)(e)},[e,t?.example,t?.name])}function Wh({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:p}=m(_),h=p(e);if(!h)return{};let g=(0,Nu.getBlockType)(h.name),{getBlockStyles:b}=m(Nu.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,JB.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,JB.useDispatch)(_),c=Pq(r),u=Iq(c,s),d=sxe(n,i);return{onSelect:m=>{let p=Gh(s,u,m);a(e,{className:p}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var Zh=l(K()),Iy=l(V()),nE=l(O());function Aq(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 ko=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var Mq=l(Wk());var axe="1600px",lxe="320px",cxe=1,uxe=.25,dxe=.75,fxe="14px";function Lq({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=lxe,maximumViewportWidth:n=axe,scaleFactor:i=cxe,minimumFontSizeLimit:s}){if(s=Js(s)?s:fxe,o){let v=Js(o);if(!v?.unit||!v?.value)return null;let S=Js(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),uxe),dxe),E=Cy(v.value*C,3);S?.value&&E<S?.value?e=`${S.value}${S.unit}`:e=`${E}${v.unit}`}}let a=Js(e),c=a?.unit||"rem",u=Js(t,{coerceTo:c});if(!a||!u)return null;let d=Js(e,{coerceTo:"rem"}),f=Js(n,{coerceTo:c}),m=Js(r,{coerceTo:c});if(!f||!m||!d)return null;let p=f.value-m.value;if(!p)return null;let h=Cy(m.value/100,3),g=Cy(h,3)+c,b=100*((u.value-a.value)/p),k=Cy((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${y}, ${t})`}function Js(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:Cy(d,3),unit:u}:null}function Cy(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function sD(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function mxe(e){let t=e?.typography??{},o=e?.layout,r=Js(o?.wideSize)?o?.wideSize:null;return sD(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function Dl(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!sD(t?.typography)&&!sD(e))return o;let r=mxe(t)?.fluid??{},n=Lq({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 ea="body",By=":root",eE=[{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)=>Dl(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:[]}];function ls(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 Nq(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=ls(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=ls(e,s)}))}),o}function Dq(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function Vq(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 pxe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,Mq.getCSSValueFromRawStyle)(ko(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function hxe(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 $h(e,t){if(!e||!t)return e;let o=pxe(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=hxe(o.url,t?._links?.["wp:theme-file"])),o}function Fq(e,t,o=[],r="slug",n){let i=[t?ko(e,["blocks",t,...o]):void 0,ko(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"||Fq(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function gxe(e,t,o,[r,n]=[]){let i=eE.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=Fq(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return sn(e,t,c)}return o}function bxe(e,t,o,r=[]){let n=(t?ko(e?.settings??{},["blocks",t,"custom",...r]):void 0)??ko(e?.settings??{},["custom",...r]);return n?sn(e,t,n):o}function sn(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=ko(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"?gxe(e,t,o,c):a==="custom"?bxe(e,t,o,c):o}var Mr=l(K()),Ty=l(Wk()),Yq=l(V());function ta(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 ko(i,`${c}.root`,null)||ko(i,c,null)||m;let p=s?ko(s,`${c}.__experimentalSelector`,null):void 0;return p?ls(u,p):m}let f;return a&&(f=ko(i,c,null)),f||(r?ta(e,d[0],o):null)}function Yh(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 lD(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Oxe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function cD(e,t="0"){let o=Oxe(e);if(!o)return null;let r=lD(o?.top)||t,n=lD(o?.left)||t;return r===n?r:`${r} ${n}`}var Uq={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Gq(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:Uq.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:Uq.backgroundPosition}),t}var Wq={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 Rxe={button:"wp-element-button",caption:"wp-element-caption"},Axe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function Lxe(e="*",t={}){return eE.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=ko(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Yh(c)}-${u}`,m=e.split(",").map(h=>`${h}${f}`).join(","),p=`var(--wp--preset--${n}--${Yh(c)})`;o+=`${m}{${d}: ${p} !important;}`})})}),o},"")}function Mxe(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var $q=(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=qh(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=qh(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function qh(e={},t="",o,r={},n=!1){let i=ea===t,s=Object.entries(Mr.__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=ko(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(!ko(g,[y],!1))return;let v=k.startsWith("--")?k:Yh(k);c.push(`${v}: ${(0,Ty.getCSSValueFromRawStyle)(ko(g,[y]))}`)});else if(ko(e,h,!1)){let b=u.startsWith("--")?u:Yh(u);c.push(`${b}: ${(0,Ty.getCSSValueFromRawStyle)(ko(e,h))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=$h(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...Gq(e.background)}})),(0,Ty.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:Yh(c.key),d=$h(c.value,r);u==="font-size"&&(d=Dl({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function qq({layoutDefinitions:e=Wq,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?cD(t?.spacing?.blockGap):"";if(n&&(o===ea?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===ea?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:p=o===ea?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${p} { ${m.join("; ")}; }`}})}),o===ea&&r&&(s+=`${By} { --wp--style--block-gap: ${a}; }`)),o===ea&&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 Nxe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function tE(e){if(!e)return{};let r=Object.entries(e).filter(([n])=>Nxe.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(r)}var Dxe=(e,t)=>{let o=[];if(!e?.styles)return o;let r=tE(e.styles);return r&&o.push({styles:r,selector:ea,skipSelectorWrapper:!0}),Object.entries(Mr.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!Rxe[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=tE(i),a=i;if(a?.variations){let c={};Object.entries(a.variations).forEach(([u,d])=>{let f=d;c[u]=tE(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&&Mr.__EXPERIMENTAL_ELEMENTS[p]&&o.push({styles:h,selector:ls(m,Mr.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(f?.blocks??{}).forEach(([p,h])=>{let g=typeof t!="string"?ls(m,t[p]?.selector):void 0,b=typeof t!="string"?ls(m,t[p]?.duotoneSelector):void 0,k=typeof t!="string"?Nq(m,t[p]?.featureSelectors??{}):void 0,y=tE(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&&Mr.__EXPERIMENTAL_ELEMENTS[v]&&o.push({styles:S,selector:ls(g,Mr.__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]&&Mr.__EXPERIMENTAL_ELEMENTS[c]&&o.push({styles:u,selector:t[n]?.selector.split(",").map(d=>Mr.__EXPERIMENTAL_ELEMENTS[c].split(",").map(m=>d+" "+m)).join(",")})})}),o},Vxe=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return eE.forEach(({path:c})=>{let u=ko(s,c,!1);u!==!1&&(a=Aq(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:By}),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 oE=(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=Dxe(e,t),u=Vxe(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+=`${By} {`,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=$q(S,k);Object.entries(R).forEach(([B,P])=>{if(P.length){let T=P.join(";");h+=`:root :where(${B}){${T};}`}})}if(b){let R={};k?.filter&&(R.filter=k.filter,delete k.filter);let B=qh(R);B.length&&(h+=`${b}{${B.join(";")};}`)}!n&&(ea===g||v)&&(h+=qq({style:k,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:y}));let E=qh(k,g,d,e,i);if(E?.length){let R=C?g:`:root :where(${g})`;h+=`${R}{${E.join(";")};}`}k?.css&&(h+=Kq(k.css,`:root :where(${g})`)),a.variationStyles&&w&&Object.entries(w).forEach(([R,B])=>{let P=k?.variations?.[R];if(P){if(S){let L=$q(S,P);Object.entries(L).forEach(([z,U])=>{if(U.length){let H=Mxe(z,B),N=U.join(";");h+=`:root :where(${H}){${N};}`}})}let T=qh(P,B,d,e);T.length&&(h+=`:root :where(${B}){${T.join(";")};}`),P?.css&&(h+=Kq(P.css,`:root :where(${B})`))}});let I=Object.entries(k).filter(([R])=>R.startsWith(":"));I?.length&&I.forEach(([R,B])=>{let P=qh(B);if(!P?.length)return;let L=`:root :where(${g.split(",").map(z=>z+R).join(",")}){${P.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=cD(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})=>{(ea===g||By===g)&&(g="");let k=Lxe(g,b);k.length>0&&(h+=k)}),h};var Fxe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(Axe).forEach(([r,n])=>{let i=ta(e,r);i&&(o[n]=i)}),o},rE=(e,t)=>{let{getBlockStyles:o}=(0,Yq.select)(Mr.store),r={};return e.forEach(n=>{let i=n.name,s=ta(n);if(!s)return;let a=ta(n,"filter.duotone");if(!a){let p=ta(n),h=(0,Mr.getBlockSupport)(n,"color.__experimentalDuotone",!1);a=h&&p&&ls(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=Vq(g,s);f[g]=b});let m=Fxe(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 Kq(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(" ")?ls(t,f):Dq(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var Py=l(x()),uD="is-style-";function Zq(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(uD)){let r=o.slice(uD.length);r!=="default"&&t.push(r)}return t},[]):[]}function zxe(e,t=[]){let o=Zq(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function jxe({override:e}){qf(e)}function dD({config:e}){let{getBlockStyles:t,overrides:o}=(0,Iy.useSelect)(i=>({getBlockStyles:i(Zh.store).getBlockStyles,overrides:j(i(_)).getStyleOverrides()}),[]),{getBlockName:r}=(0,Iy.useSelect)(_),n=(0,nE.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=rE((0,Zh.getBlockTypes)(),a.clientId),b=oE(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,Py.jsx)(Py.Fragment,{children:n.map(i=>(0,Py.jsx)(jxe,{override:i},i.id))})}function fD(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=Ja(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 Hxe(e,t,o){let{globalSettings:r,globalStyles:n}=(0,Iy.useSelect)(i=>{let s=i(_).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[As]}},[]);return(0,nE.useMemo)(()=>{let i=fD({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function Uxe({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,Iy.useSelect)(Zh.store),n=r(e),i=zxe(t,n),s=`${uD}${i}-${o}`,{settings:a,styles:c}=Hxe(e,i,o),u=(0,nE.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=rE((0,Zh.getBlockTypes)(),o);return oE(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 qf({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var Xq={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>Zq(e).length>0,useBlockProps:Uxe};var Du=l(x()),Gxe=(0,Du.jsxs)(cs.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,Du.jsx)(cs.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,Du.jsx)(cs.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 Wxe({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=Wh({clientId:e}),{updateBlockAttributes:n}=(0,iE.useDispatch)(_),{globalSettings:i,globalStyles:s,blockName:a}=(0,iE.useSelect)(d=>{let f=d(_).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[As],blockName:d(_).getBlockName(e)}},[e]),c=o?.name?fD({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,Du.jsx)(cs.ToolbarGroup,{children:(0,Du.jsx)(cs.ToolbarButton,{onClick:()=>{let f=(t.findIndex(h=>h.name===o.name)+1)%t.length,m=t[f],p=Gh(r,o,m);n(e,{className:p})},label:(0,Qq.__)("Shuffle styles"),children:(0,Du.jsx)(cs.Icon,{icon:Gxe,style:{fill:c||"transparent"}})})})}var Jq=Wxe;var CZ=l(A()),BZ=l(M()),EZ=l(V());var Ly=l(K()),TZ=l(gp());var oa=l(M()),ra=l(A()),Vu=l(K()),fE=l(V());var aZ=l(M()),Oy=l(A()),lE=l(K()),cE=l(O());var eZ=l(M()),tZ=l(A()),oZ=l(q());var Zf=l(x());function sE({blocks:e}){return(0,oZ.useViewportMatch)("medium","<")?null:(0,Zf.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,Zf.jsx)(tZ.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,Zf.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,Zf.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,eZ.__)("Preview")}),(0,Zf.jsx)(en,{viewportWidth:601,blocks:e})]})})})}var rZ=l(A()),Xh=l(K()),nZ=l(V()),aE=l(O());var Vl=l(x()),$xe={};function iZ({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,nZ.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(_),{getActiveBlockVariation:c,getBlockVariations:u}=i(Xh.store),d=a(e);if(t.length!==1||!d)return $xe;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,aE.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var Kxe=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,aE.useState)();return(0,Vl.jsxs)(Vl.Fragment,{children:[r&&(0,Vl.jsx)(sE,{blocks:(0,Xh.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,Vl.jsx)(Yxe,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function Yxe({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,Vl.jsxs)(rZ.MenuItem,{className:(0,Xh.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,Vl.jsx)(Te,{icon:n,showColors:!0}),i]})}var sZ=Kxe;var an=l(x());function qxe(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,cE.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 Zxe=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,cE.useState)(),{priorityTextTransformations:c,restTransformations:u}=qxe(t),d=c.length&&u.length,f=!!u.length&&(0,an.jsx)(Xxe,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsxs)(Oy.MenuGroup,{label:(0,aZ.__)("Transform to"),className:e,children:[s&&(0,an.jsx)(sE,{blocks:(0,lE.switchToBlockType)(i,s)}),!!o?.length&&(0,an.jsx)(sZ,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,an.jsx)(lZ,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,an.jsx)(Oy.MenuGroup,{className:e,children:f})]})};function Xxe({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,an.jsx)(lZ,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function lZ({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,an.jsxs)(Oy.MenuItem,{className:(0,lE.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,an.jsx)(Te,{icon:n,showColors:!0}),i]})}var cZ=Zxe;var dZ=l(M()),fZ=l(A());var uE=l(A());var Qh=l(x()),Qxe=()=>{};function uZ({clientId:e,onSwitch:t=Qxe}){let{onSelect:o,stylesToRender:r,activeStyle:n}=Wh({clientId:e,onSwitch:t});return!r||r.length===0?null:(0,Qh.jsx)(Qh.Fragment,{children:r.map(i=>{let s=i.label||i.name;return(0,Qh.jsx)(uE.MenuItem,{icon:n.name===i.name?Ya:null,onClick:()=>o(i),children:(0,Qh.jsx)(uE.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:s})},i.name)})})}var mD=l(x());function mZ({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e;return(0,mD.jsx)(fZ.MenuGroup,{label:(0,dZ.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,mD.jsx)(uZ,{clientId:o,onSwitch:t})})}var hD=l(M()),vZ=l(O()),dE=l(q());var us=l(A());var gZ=l(O()),bZ=l(K());var pZ=l(K()),pD=(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=pD(s,t,o);if(a)return a}}},hZ=(e,t)=>{let o=(0,pZ.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var Jxe=(e,t)=>{let o=hZ(t.name,t.attributes);e.attributes={...e.attributes,...o}},ewe=(e,t)=>{let o=t.map(n=>(0,bZ.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=pD(s,n.name,r);if(a){i=!0,r.add(a.clientId),Jxe(a,n);break}}if(!i)return}return o},twe=(e,t)=>(0,gZ.useMemo)(()=>e.reduce((o,r)=>{let n=ewe(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),kZ=twe;var tr=l(x());function owe({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,vZ.useState)(!1),i=kZ(t,e);return i.length?(0,tr.jsxs)(us.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,tr.jsx)(rwe,{patterns:i,onSelect:o}),(0,tr.jsx)(us.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:qo,children:(0,hD.__)("Patterns")})]}):null}function rwe({patterns:e,onSelect:t}){let o=(0,dE.useViewportMatch)("medium","<");return(0,tr.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,tr.jsx)(us.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,tr.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,tr.jsx)(nwe,{patterns:e,onSelect:t})})})})}function nwe({patterns:e,onSelect:t}){return(0,tr.jsx)(us.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,hD.__)("Patterns list"),children:e.map(o=>(0,tr.jsx)(yZ,{pattern:o,onSelect:t},o.name))})}function yZ({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,dE.useInstanceId)(yZ,`${o}-list__item-description`);return(0,tr.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,tr.jsxs)(us.Composite.Item,{render:(0,tr.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,tr.jsx)(en,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,tr.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,tr.jsx)(us.VisuallyHidden,{id:r,children:e.description})]})}var _Z=owe;var Pn=l(x());function iwe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,fE.useDispatch)(_),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,fE.useSelect)(I=>{let{getBlockAttributes:R,getBlocksByClientId:B,getBlockRootClientId:P,getBlockTransformItems:T,__experimentalGetPatternTransformItems:L,canRemoveBlocks:z,getBlockName:U}=I(_),{getBlockStyles:H}=I(Vu.store),N=P(t[0]),D=B(t),W=t.length===1,$=W&&U(t[0]),X=W&&!!H($)?.length;return{blocks:D,possibleBlockTransformations:T(D,N),patterns:L(D,N),isUsingBindings:t.every(te=>!!R(te)?.metadata?.bindings),canRemove:z(t),hasBlockStyles:X}},[t]),f=iZ({clientIds:t,blocks:a});function m(I){I.length>1&&r(I[0].clientId,I[I.length-1].clientId)}function p(I){let R=(0,Vu.switchToBlockType)(a,I);o(t,R),m(R)}function h(I){n(a[0].clientId,{...f.find(({name:R})=>R===I).attributes})}function g(I){o(t,I),m(I)}let b=a.length===1,k=b&&((0,Vu.isTemplatePart)(a[0])||(0,Vu.isReusableBlock)(a[0])),y=!!i?.length&&u&&!k,v=!!f?.length,S=!!s?.length&&u,w=y||v;if(!(d||w||S))return(0,Pn.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,oa.__)("No transforms.")});let E=b?(0,oa._x)("This block is connected.","block toolbar button label and description"):(0,oa._x)("These blocks are connected.","block toolbar button label and description");return(0,Pn.jsxs)("div",{className:"block-editor-block-switcher__container",children:[S&&(0,Pn.jsx)(_Z,{blocks:a,patterns:s,onSelect:I=>{g(I),e()}}),w&&(0,Pn.jsx)(cZ,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:I=>{p(I),e()},onSelectVariation:I=>{h(I),e()}}),d&&(0,Pn.jsx)(mZ,{hoveredBlock:a[0],onSwitch:e}),c&&(0,Pn.jsx)(ra.MenuGroup,{children:(0,Pn.jsx)(ra.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:E})})]})}var swe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,oa.__)("Change block type or style"):(0,oa.sprintf)((0,oa._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,Pn.jsx)(ra.ToolbarGroup,{children:(0,Pn.jsx)(ra.ToolbarItem,{children:s=>(0,Pn.jsx)(ra.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,Pn.jsx)(iwe,{onClose:a,clientIds:t})})})})},SZ=swe;var Jh=l(A()),Ry=l(M()),mE=l(O()),xZ=l(V());var Fl=l(x());function awe({clientIds:e,blockTitle:t}){let o=(0,xZ.useSelect)(i=>{let{getBlockAttributes:s}=i(_);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,Ry.sprintf)((0,Ry.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,Ry.__)("These blocks are editable using overrides."),(0,Fl.jsx)(Jh.__experimentalText,{children:n})}function wZ({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,mE.useState)(!1),s=(0,mE.useRef)();return(0,Fl.jsxs)(Fl.Fragment,{children:[(0,Fl.jsx)(Jh.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,Fl.jsx)(Jh.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,Fl.jsx)(awe,{clientIds:t,blockTitle:o})})]})}var Ay=l(x());function lwe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a}=j(e(_)),{getBlockStyles:c}=e(Ly.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=>qb(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 cwe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=j(e(_)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName&&window?.__experimentalContentOnlyPatternInsertion)return $n;let a=o(i),c=(0,Ly.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(Ly.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:Kd}function IZ({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,EZ.useSelect)(f=>({icon:cwe({select:f,clientIds:e}),showIconLabels:f(TZ.store).get("core","showIconLabels"),variant:lwe({select:f,clientIds:e})}),[e]),i=Do({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,BZ.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,Ay.jsx)(Te,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,Ay.jsx)(SZ,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,Ay.jsx)(wZ,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,Ay.jsx)(CZ.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var Je=l(x());function bD({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,OZ.useSelect)(z=>{let{getBlockName:U,getBlockMode:H,getBlockParents:N,getSelectedBlockClientIds:D,isBlockValid:W,getBlockEditingMode:$,getBlockAttributes:X,getTemplateLock:te,getParentSectionBlock:Z,isZoomOut:se,isSectionBlock:ce}=j(z(_)),Q=D(),ie=Q[0],J=N(ie),oe=Z(ie)??J[J.length-1],ue=U(oe),le=(0,zl.getBlockType)(ue),ke=$(ie),Be=ke==="default",Re=U(ie),Kt=Q.every($e=>W($e)),kt=Q.every($e=>H($e)==="visual"),_o=Q.every($e=>!!X($e)?.metadata?.bindings),Yt=Q.some($e=>te($e)==="contentOnly"),We=se(),xt=ce(ie),ro=window?.__experimentalContentOnlyPatternInsertion&&(We||xt);return{blockClientId:ie,blockClientIds:Q,isDefaultEditingMode:Be,blockType:ie&&(0,zl.getBlockType)(Re),shouldShowVisualToolbar:Kt&&kt,toolbarKey:`${ie}${oe}`,showParentSelector:!We&&le&&ke!=="contentOnly"&&$(oe)!=="disabled"&&(0,zl.hasBlockSupport)(le,"__experimentalParentSelector",!0)&&Q.length===1,isUsingBindings:_o,isSectionContainer:xt,hasContentOnlyLocking:Yt,showShuffleButton:We,showSlots:!We,showGroupButtons:!We,showLockButtons:!We,showBlockVisibilityButton:!We,showSwitchSectionStyleButton:ro}},[]),w=(0,gD.useRef)(null),C=(0,gD.useRef)(),E=Rh({ref:C}),I=!(0,RZ.useViewportMatch)("medium","<");if(!ZB())return null;let B=s.length>1,P=(0,zl.isReusableBlock)(c)||(0,zl.isTemplatePart)(c),T=F("block-editor-block-contextual-toolbar",{"has-parent":f}),L=F("block-editor-block-toolbar",{"is-synced":P,"is-connected":m});return(0,Je.jsx)(Hh,{focusEditorOnEscape:!0,className:T,"aria-label":(0,PZ.__)("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&&I&&(0,Je.jsx)(WK,{}),(d||B)&&(0,Je.jsx)("div",{ref:C,...E,children:(0,Je.jsxs)(AZ.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,Je.jsx)(IZ,{clientIds:s,isSynced:P}),a&&v&&(0,Je.jsx)(X5,{clientIds:s}),!B&&a&&y&&(0,Je.jsx)(G5,{clientId:i}),(0,Je.jsx)(fB,{clientIds:s,hideDragHandle:e})]})}),!h&&d&&B&&k&&(0,Je.jsx)(F5,{}),g&&(0,Je.jsx)(Bq,{clientId:s[0]}),S&&(0,Je.jsx)(Jq,{clientId:s[0]}),d&&b&&(0,Je.jsxs)(Je.Fragment,{children:[!p&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(ut.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,Je.jsx)(ut.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,Je.jsx)(ut.Slot,{className:"block-editor-block-toolbar__slot"}),(0,Je.jsx)(ut.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,Je.jsx)(ut.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,Je.jsx)(bB.Slot,{})]}),(0,Je.jsx)(hq,{clientIds:s}),(0,Je.jsx)(WB,{clientIds:s})]})},u)}function LZ({hideDragHandle:e,variant:t}){return(0,Je.jsx)(bD,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var kD=l(x());function DZ({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=rB(e),s=(0,eg.useRef)();(0,eg.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,MZ.useDispatch)(_),c=(0,eg.useRef)(!1);(0,NZ.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,eg.useEffect)(()=>{c.current=!1});let u=r||e,d=oB({contentElement:o?.current,clientId:u});return!t&&(0,kD.jsx)(Mf,{clientId:u,bottomClientId:i,className:F("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,kD.jsx)(bD,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var pE=l(V()),hE=l(O());var VZ=l(A());var FZ=l(M()),zZ=l(x());function uwe({onClick:e}){return(0,zZ.jsx)(VZ.Button,{variant:"primary",icon:Wn,size:"compact",className:F("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,FZ._x)("Add pattern","Generic label for pattern inserter button")})}var jZ=uwe;var vD=l(x());function dwe(){let[e,t]=(0,hE.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,pE.useSelect)(h=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:k,getSelectedBlockClientId:y,getSectionRootClientId:v,getBlockInsertionPoint:S,isBlockInsertionPointVisible:w}=j(h(_)),C=v();return{hasSelection:!!k().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:y(),blockInsertionPoint:S(),insertionPointVisible:w()}},[]),{showInsertionPoint:u}=j((0,pE.useDispatch)(_));if((0,hE.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,vD.jsx)(L1,{previousClientId:d,nextClientId:p,children:(0,vD.jsx)(jZ,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var HZ=dwe;var UZ=l(V()),GZ=l(K());function WZ(){return(0,UZ.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=j(e(_)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,GZ.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,p=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:p}},[])}var na=l(x());function fwe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s}=j(e(_));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i()}}function My({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a}=(0,tg.useSelect)(fwe,[]),c=(0,$Z.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:u,getSelectedBlockClientIds:d,getBlockRootClientId:f,isGroupable:m,getBlockName:p,getEditedContentOnlySection:h}=j((0,tg.useSelect)(_)),{getGroupingBlockName:g}=(0,tg.useSelect)(og.store),{showEmptyBlockSideInserter:b,showBlockToolbarPopover:k}=WZ(),y=Lh(),{duplicateBlocks:v,removeBlocks:S,replaceBlocks:w,insertAfterBlock:C,insertBeforeBlock:E,selectBlock:I,moveBlocksUp:R,moveBlocksDown:B,expandBlock:P,updateBlockAttributes:T,stopEditingContentOnlySection:L}=j((0,tg.useDispatch)(_));function z(N){if(!N.defaultPrevented){if(c("core/block-editor/move-up",N)||c("core/block-editor/move-down",N)){let D=d();if(D.length){N.preventDefault();let W=f(D[0]);(c("core/block-editor/move-up",N)?"up":"down")==="up"?R(D,W):B(D,W);let X=Array.isArray(D)?D.length:1,te=(0,rg.sprintf)((0,rg._n)("%d block moved.","%d blocks moved.",D.length),X);(0,SD.speak)(te)}}else if(c("core/block-editor/duplicate",N)){let D=d();D.length&&(N.preventDefault(),v(D))}else if(c("core/block-editor/remove",N)){let D=d();D.length&&(N.preventDefault(),S(D))}else if(c("core/block-editor/paste-styles",N)){let D=d();if(D.length){N.preventDefault();let W=u(D);y(W)}}else if(c("core/block-editor/insert-after",N)){let D=d();D.length&&(N.preventDefault(),C(D[D.length-1]))}else if(c("core/block-editor/insert-before",N)){let D=d();D.length&&(N.preventDefault(),E(D[0]))}else if(c("core/block-editor/unselect",N)){if(N.target.closest("[role=toolbar]"))return;let D=d();D.length>1&&(N.preventDefault(),I(D[0]))}else if(c("core/block-editor/collapse-list-view",N)){if((0,yD.isTextField)(N.target)||(0,yD.isTextField)(N.target?.contentWindow?.document?.activeElement))return;N.preventDefault(),P(r)}else if(c("core/block-editor/group",N)){let D=d();if(D.length>1&&m(D)){N.preventDefault();let W=u(D),$=g(),X=(0,og.switchToBlockType)(W,$);w(D,X),(0,SD.speak)((0,rg.__)("Selected blocks are grouped."))}}else if(c("core/block-editor/toggle-block-visibility",N)){let D=d();if(D.length){N.preventDefault();let W=u(D);if(!W.every(Z=>(0,og.hasBlockSupport)(p(Z.clientId),"visibility",!0)))return;let X=W.some(Z=>Z.attributes.metadata?.blockVisibility===!1),te=Object.fromEntries(W.map(({clientId:Z,attributes:se})=>[Z,{metadata:xe({...se?.metadata,blockVisibility:X?void 0:!1})}]));T(D,te,{uniqueByBlock:!0})}}c("core/block-editor/stop-editing-as-blocks",N)&&h()&&L()}}let U=Lf(t),H=Lf(t);return(0,na.jsx)("div",{...o,onKeyDown:z,className:F(o.className,{"block-editor-block-tools--is-dragging":a}),children:(0,na.jsxs)(Bh.Provider,{value:(0,KZ.useRef)(!1),children:[!i&&!s&&(0,na.jsx)(v$,{__unstableContentRef:t}),b&&(0,na.jsx)(TK,{__unstableContentRef:t,clientId:r}),k&&(0,na.jsx)(DZ,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,na.jsx)(_D.Popover.Slot,{name:"block-toolbar",ref:U}),e,(0,na.jsx)(_D.Popover.Slot,{name:"__unstable-block-tools-after",ref:H}),s&&!a&&(0,na.jsx)(HZ,{__unstableContentRef:t})]})})}var fi=l(M()),ia=l(K()),Fu=l(V()),xD=l(qZ());var ZZ=l(x()),mwe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,Fu.useDispatch)(_),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,Fu.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,ia.isTemplatePart)(r[0]);function u(p){p.length>1&&o(p[0].clientId,p[p.length-1].clientId)}function d(p){let h=(0,ia.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,fi.sprintf)((0,fi.__)("Transform to %s"),g),icon:(0,ZZ.jsx)(Te,{icon:b}),callback:({close:k})=>{d(h),k()}}})}},pwe=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,Fu.useSelect)(B=>{let{getSelectedBlockClientIds:P,isUngroupable:T,isGroupable:L}=B(_);return{clientIds:P(),isUngroupable:T(),isGroupable:L()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,getBlockName:c}=(0,Fu.useSelect)(_),{getDefaultBlockName:u,getGroupingBlockName:d}=(0,Fu.useSelect)(ia.store),f=s(t),{removeBlocks:m,replaceBlocks:p,duplicateBlocks:h,insertAfterBlock:g,insertBeforeBlock:b,updateBlockAttributes:k}=(0,Fu.useDispatch)(_),y=()=>{if(!f.length)return;let B=d(),P=(0,ia.switchToBlockType)(f,B);P&&p(t,P)},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,ia.hasBlockSupport)(B.name,"multiple",!0)&&n(B.name,S)),E=a(t),I=f.every(({clientId:B})=>(0,ia.hasBlockSupport)(c(B),"visibility",!0)),R=[];if(C&&R.push({name:"duplicate",label:(0,fi.__)("Duplicate"),callback:()=>h(t,!0),icon:Kd}),w&&R.push({name:"add-before",label:(0,fi.__)("Add before"),callback:()=>{let B=Array.isArray(t)?t[0]:B;b(B)},icon:Wn},{name:"add-after",label:(0,fi.__)("Add after"),callback:()=>{let B=Array.isArray(t)?t[t.length-1]:B;g(B)},icon:Wn}),r&&R.push({name:"Group",label:(0,fi.__)("Group"),callback:y,icon:sk}),o&&R.push({name:"ungroup",label:(0,fi.__)("Ungroup"),callback:v,icon:JA}),E&&R.push({name:"remove",label:(0,fi.__)("Delete"),callback:()=>m(t,!0),icon:XA}),I){let B=f.some(P=>P.attributes.metadata?.blockVisibility===!1);R.push({name:"core/toggle-block-visibility",label:B?(0,fi.__)("Show"):(0,fi.__)("Hide"),callback:()=>{let P=Object.fromEntries(f?.map(({clientId:T,attributes:L})=>[T,{metadata:xe({...L?.metadata,blockVisibility:B?void 0:!1})}]));k(t,P,{uniqueByBlock:!0})},icon:B?Xa:ji})}return{isLoading:!1,commands:R.map(B=>({...B,name:"core/block-editor/action-"+B.name,callback:({close:P})=>{B.callback(),P()}}))}},gE=()=>{(0,xD.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:mwe()}),(0,xD.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:pwe(),context:"block-selection-edit"})};var sa=l(x()),hwe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function wD({shouldIframe:e=!0,height:t="300px",children:o=(0,sa.jsx)(sh,{}),styles:r,contentRef:n,iframeProps:i}){gE();let s=(0,bE.useViewportMatch)("medium","<"),a=ly(),c=gl(),u=(0,XZ.useRef)(),d=(0,bE.useMergeRefs)([n,c,u]),f=(0,QZ.useSelect)(p=>j(p(_)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,sa.jsx)(My,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,sa.jsxs)(Jp,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,sa.jsx)(kl,{styles:r}),o]})}):(0,sa.jsxs)(My,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,sa.jsx)(kl,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:hwe}),(0,sa.jsx)(wC,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%"},children:o})]})}function gwe({children:e,height:t,styles:o}){return(0,sa.jsx)(wD,{height:t,styles:o,children:e})}var JZ=gwe;var aa=l(A()),eX=l(M()),tX=l(nt()),oX=l(Oe()),mi=l(x()),bwe=()=>(0,mi.jsx)(aa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,mi.jsx)(aa.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"})}),kwe=({style:e,className:t})=>(0,mi.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,mi.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,mi.jsx)(bwe,{})})}),vwe=({TextColor:e,BackgroundColor:t})=>({onToggle:o,isOpen:r})=>{let n=i=>{!r&&i.keyCode===tX.DOWN&&(i.preventDefault(),o())};return(0,mi.jsx)(aa.ToolbarGroup,{children:(0,mi.jsx)(aa.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,eX.__)("Open Colors Selector"),onClick:o,onKeyDown:n,icon:(0,mi.jsx)(t,{children:(0,mi.jsx)(e,{children:(0,mi.jsx)(kwe,{})})})})})},ywe=({children:e,...t})=>((0,oX.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,mi.jsx)(aa.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:vwe(t),renderContent:()=>e})),rX=ywe;var uQ=l(Oe()),ME=l(A()),PD=l(M()),dQ=l(V()),fQ=l(O());var dg=l(q()),AE=l(A()),Vy=l(V()),lQ=l(Oe()),Xt=l(O()),TD=l(M());var TE=l(A()),IE=l(O()),PE=l(V());var iX=l(q()),sX=l(Xo()),aX=l(V()),SE=l(O()),ng=l(M());var kE=l(O()),vE=(0,kE.createContext)({});vE.displayName="ListViewContext";var zu=()=>(0,kE.useContext)(vE);var yE=l(O()),nX=l(x());function _E({children:e,...t}){let o=(0,yE.useRef)();return(0,yE.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,nX.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var Ny=l(x()),CD=(0,SE.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=zu(),a=(0,iX.useInstanceId)(CD),{directInsert:c,hideInserter:u}=(0,aX.useSelect)(h=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:k}=j(h(_)),v=g(o)?.directInsert||!1,S=!!b(o)||k();return{directInsert:v,hideInserter:S}},[o]),d=Do({clientId:o,context:"list-view"}),f=Do({clientId:i?.clientId,context:"list-view"});if((0,SE.useEffect)(()=>{f?.length&&(0,sX.speak)((0,ng.sprintf)((0,ng.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,p=(0,ng.sprintf)((0,ng.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,Ny.jsxs)("div",{className:"list-view-appender",children:[(0,Ny.jsx)(ai,{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,Ny.jsx)(_E,{id:m,children:p})]})});var Hu=l(K()),Qf=l(A()),BE=l(q());var vo=l(O()),ag=l(V()),CE=l(M()),EE=l(nt()),AX=l(ny()),LX=l(hl()),MX=l(Xo());var lX=l(A()),cX=l(q()),uX=l(O());var dX=l(x()),_we=IU(lX.__experimentalTreeGridRow),Swe=(0,uX.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=Dw({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,cX.useMergeRefs)([u,d]);return(0,dX.jsx)(_we,{ref:f,className:F("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),fX=Swe;var mX=l(Ve()),pX=l(O());function hX({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,pX.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,mX.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 CX=l(O());var ig=l(A()),_X=l(O());var wE=l(nt()),SX=l(V()),xX=l(K());var gX=l(M()),BD=l(x());function xE({onClick:e}){return(0,BD.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,BD.jsx)(Ie,{icon:(0,gX.isRTL)()?ok:Ec})})}var bX=l(O()),kX=l(V());var xwe=3,vX={"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?vX[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>=xwe)return t}return t}};function wwe(e,t){let o=vX[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function yX({clientId:e,isExpanded:t}){let{block:o}=(0,kX.useSelect)(n=>({block:n(_).getBlock(e)}),[e]);return(0,bX.useMemo)(()=>wwe(o,t),[o,t])}var jo=l(x()),{Badge:Cwe}=j(ig.privateApis);function Bwe({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=mt(t),g=Do({clientId:t,context:"list-view"}),{isLocked:b}=En(t),{canToggleBlockVisibility:k,isBlockHidden:y,hasPatternName:v}=(0,SX.useSelect)(B=>{let{getBlockName:P,getBlockAttributes:T}=B(_),{isBlockHidden:L}=j(B(_)),z=T(t);return{canToggleBlockVisibility:(0,xX.hasBlockSupport)(P(t),"visibility",!0),isBlockHidden:L(t),hasPatternName:!!z?.metadata?.patternName}},[t]),S=b,w=k&&y,C=h?.positionType==="sticky",E=yX({clientId:t,isExpanded:f}),I=B=>{B.dataTransfer.clearData(),c?.(B)};function R(B){(B.keyCode===wE.ENTER||B.keyCode===wE.SPACE)&&o(B)}return(0,jo.jsxs)("a",{className:F("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:R,onMouseDown:n,ref:p,tabIndex:s,onFocus:a,onDragStart:I,onDragEnd:u,draggable:d,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":f,children:[(0,jo.jsx)(xE,{onClick:i}),(0,jo.jsx)(Te,{icon:v?$n:h?.icon,showColors:!0,context:"list-view"}),(0,jo.jsxs)(ig.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,jo.jsx)(ig.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),h?.anchor&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,jo.jsx)(Cwe,{className:"block-editor-list-view-block-select-button__anchor",children:h.anchor})}),C&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,jo.jsx)(Ie,{icon:sA})}),E.length?(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:E.map((B,P)=>(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${B.url})`,zIndex:E.length-P}},B.clientId))}):null,w&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility",children:(0,jo.jsx)(Ie,{icon:ji})}),S&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,jo.jsx)(Ie,{icon:XR})})]})]})}var wX=(0,_X.forwardRef)(Bwe);var ju=l(x()),Ewe=(0,CX.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}=zu(),g=c.includes(f)?c:[f];return(0,ju.jsxs)(ju.Fragment,{children:[m&&(0,ju.jsx)(m,{block:o,insertedBlock:p,setInsertedBlock:h}),(0,ju.jsx)(sB,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:k,onDragEnd:y})=>(0,ju.jsx)(wX,{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})})]})}),BX=Ewe;var Xf=l(M()),EX=l(Ve()),TX=(e,t,o)=>(0,Xf.sprintf)((0,Xf.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),IX=(e,t)=>[e?.positionLabel?`${(0,Xf.sprintf)((0,Xf.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,Xf.__)("This block is locked."):void 0].filter(Boolean).join(" "),PX=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function OX(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 sg(e,t){let o=()=>{let n=t?.querySelector(`[role=row][data-block="${e}"]`);return n?EX.focus.focusable.find(n)[0]:null},r=o();r?r.focus():window.requestAnimationFrame(()=>{r=o(),r&&r.focus()})}function RX({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 or=l(x());function NX({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,vo.useRef)(null),y=(0,vo.useRef)(null),v=(0,vo.useRef)(null),[S,w]=(0,vo.useState)(!1),[C,E]=(0,vo.useState)(),{isLocked:I}=En(e),R=i&&g[0]===e,B=i&&g[g.length-1]===e,{toggleBlockHighlight:P,duplicateBlocks:T,multiSelect:L,replaceBlocks:z,removeBlocks:U,insertAfterBlock:H,insertBeforeBlock:N,setOpenedBlockSettingsMenu:D,updateBlockAttributes:W}=j((0,ag.useDispatch)(_)),$=(0,BE.useDebounce)(P,50),{canInsertBlockType:X,getSelectedBlockClientIds:te,getPreviousBlockClientId:Z,getBlockRootClientId:se,getBlockOrder:ce,getBlockParents:Q,getBlocksByClientId:ie,canEditBlock:J,canMoveBlock:G,canRemoveBlocks:oe,isGroupable:ue}=(0,ag.useSelect)(_),{getGroupingBlockName:le}=(0,ag.useSelect)(Hu.store),ke=mt(e),Be=Lh(),{block:Re,blockName:Kt,allowRightClickOverrides:kt,isBlockHidden:_o}=(0,ag.useSelect)(de=>{let{getBlock:Yo,getBlockName:_e,getSettings:Ze}=de(_),{isBlockHidden:xr}=j(de(_));return{block:Yo(e),blockName:_e(e),allowRightClickOverrides:Ze().allowRightClickOverrides,isBlockHidden:xr(e)}},[e]),Yt=(0,Hu.hasBlockSupport)(Kt,"__experimentalToolbar",!0),xt=`list-view-block-select-button__description-${(0,BE.useInstanceId)(NX)}`,{expand:ro,collapse:$e,collapseAll:ho,BlockSettingsMenu:Nt,listViewInstanceId:no,expandedState:Ni,setInsertedBlock:dr,treeGridElementRef:Ne,rootClientId:So}=zu(),Dt=(0,LX.__unstableUseShortcutEventMatch)();function wt(){let de=te(),Yo=de.includes(e),_e=Yo?de[0]:e,Ze=se(_e);return{blocksToUpdate:Yo?de:[e],firstBlockClientId:_e,firstBlockRootClientId:Ze,selectedBlockClientIds:de}}async function Ps(de){if(de.defaultPrevented||de.target.closest("[role=dialog]"))return;let Yo=[EE.BACKSPACE,EE.DELETE].includes(de.keyCode);if(Dt("core/block-editor/unselect",de)&&g.length>0)de.stopPropagation(),de.preventDefault(),a(de,void 0);else if(Yo||Dt("core/block-editor/remove",de)){let{blocksToUpdate:_e,firstBlockClientId:Ze,firstBlockRootClientId:xr,selectedBlockClientIds:fr}=wt();if(!oe(_e))return;let Ua=Z(Ze)??xr;U(_e,!1);let Ga=fr.length>0&&te().length===0;Ua||(Ua=ce()[0]),re(Ua,Ga)}else if(Dt("core/block-editor/paste-styles",de)){de.preventDefault();let{blocksToUpdate:_e}=wt(),Ze=ie(_e);Be(Ze)}else if(Dt("core/block-editor/duplicate",de)){de.preventDefault();let{blocksToUpdate:_e,firstBlockRootClientId:Ze}=wt();if(ie(_e).every(fr=>!!fr&&(0,Hu.hasBlockSupport)(fr.name,"multiple",!0)&&X(fr.name,Ze))){let fr=await T(_e,!1);fr?.length&&re(fr[0],!1)}}else if(Dt("core/block-editor/insert-before",de)){de.preventDefault();let{blocksToUpdate:_e}=wt();await N(_e[0]);let Ze=te();D(void 0),re(Ze[0],!1)}else if(Dt("core/block-editor/insert-after",de)){de.preventDefault();let{blocksToUpdate:_e}=wt();await H(_e.at(-1));let Ze=te();D(void 0),re(Ze[0],!1)}else if(Dt("core/block-editor/select-all",de)){de.preventDefault();let{firstBlockRootClientId:_e,selectedBlockClientIds:Ze}=wt(),xr=ce(_e);if(!xr.length)return;if((0,AX.default)(Ze,xr)&&_e&&_e!==So){re(_e,!0);return}L(xr[0],xr[xr.length-1],null)}else if(Dt("core/block-editor/collapse-list-view",de)){de.preventDefault();let{firstBlockClientId:_e}=wt(),Ze=Q(_e,!1);ho(),ro(Ze)}else if(Dt("core/block-editor/group",de)){let{blocksToUpdate:_e}=wt();if(_e.length>1&&ue(_e)){de.preventDefault();let Ze=ie(_e),xr=le(),fr=(0,Hu.switchToBlockType)(Ze,xr);z(_e,fr),(0,MX.speak)((0,CE.__)("Selected blocks are grouped."));let Ua=te();D(void 0),re(Ua[0],!1)}}else if(Dt("core/block-editor/toggle-block-visibility",de)){de.preventDefault();let{blocksToUpdate:_e}=wt(),Ze=ie(_e);if(!Ze.every(Ga=>(0,Hu.hasBlockSupport)(Ga.name,"visibility",!0)))return;let fr=Ze.some(Ga=>Ga.attributes.metadata?.blockVisibility===!1),Ua=Object.fromEntries(Ze.map(({clientId:Ga,attributes:Fue})=>[Ga,{metadata:xe({...Fue?.metadata,blockVisibility:fr?void 0:!1})}]));W(_e,Ua,{uniqueByBlock:!0})}}let Di=(0,vo.useCallback)(()=>{w(!0),$(e,!0)},[e,w,$]),ye=(0,vo.useCallback)(()=>{w(!1),$(e,!1)},[e,w,$]),Ct=(0,vo.useCallback)(de=>{a(de,e),de.preventDefault()},[e,a]),re=(0,vo.useCallback)((de,Yo)=>{Yo&&a(void 0,de,null,null),sg(de,Ne?.current)},[a,Ne]),Pe=(0,vo.useCallback)(de=>{de.preventDefault(),de.stopPropagation(),h===!0?$e(e):h===!1&&ro(e)},[e,ro,$e,h]),He=(0,vo.useCallback)(de=>{Yt&&kt&&(v.current?.click(),E(new window.DOMRect(de.clientX,de.clientY,0,0)),de.preventDefault())},[kt,v,Yt]),io=(0,vo.useCallback)(de=>{kt&&de.button===2&&de.preventDefault()},[kt]),Ko=(0,vo.useMemo)(()=>{let{ownerDocument:de}=y?.current||{};if(!(!C||!de))return{ownerDocument:de,getBoundingClientRect(){return C}}},[C]),zn=(0,vo.useCallback)(()=>{E(void 0)},[E]);if(hX({isSelected:i,rowItemRef:y,selectedClientIds:g}),!Re)return null;let Vi=TX(c,f,u),Nd=IX(ke,I),Km=_o?(0,CE.__)("Block is hidden."):null,Wb=f>0,Dd=m&&Wb,kc=F("block-editor-list-view-block__mover-cell",{"is-visible":S||i}),$b=F("block-editor-list-view-block__menu-cell",{"is-visible":S||R}),Vd;Dd?Vd=2:Yt||(Vd=3);let V2=F({"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":!Yt,"is-synced":ke?.isSynced,"is-draggable":G,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),F2=g.includes(e)?g:[e],z2=i&&g.length===1;return(0,or.jsxs)(fX,{className:V2,isDragged:r,onKeyDown:Ps,onMouseEnter:Di,onMouseLeave:ye,onFocus:Di,onBlur:ye,level:u,position:c,rowCount:d,path:p,id:`list-view-${no}-block-${e}`,"data-block":e,"data-expanded":J?h:void 0,ref:y,children:[(0,or.jsx)(Qf.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Vd,ref:k,"aria-selected":!!i,children:({ref:de,tabIndex:Yo,onFocus:_e})=>(0,or.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,or.jsx)(BX,{block:Re,onClick:Ct,onContextMenu:He,onMouseDown:io,onToggleExpanded:Pe,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:de,tabIndex:z2?0:Yo,onFocus:_e,isExpanded:J?h:void 0,selectedClientIds:g,ariaDescribedBy:xt}),(0,or.jsx)(_E,{id:xt,children:[Vi,Nd,Km].filter(Boolean).join(" ")})]})}),Dd&&(0,or.jsx)(or.Fragment,{children:(0,or.jsxs)(Qf.__experimentalTreeGridCell,{className:kc,withoutGridItem:!0,children:[(0,or.jsx)(Qf.__experimentalTreeGridItem,{children:({ref:de,tabIndex:Yo,onFocus:_e})=>(0,or.jsx)(uB,{orientation:"vertical",clientIds:[e],ref:de,tabIndex:Yo,onFocus:_e})}),(0,or.jsx)(Qf.__experimentalTreeGridItem,{children:({ref:de,tabIndex:Yo,onFocus:_e})=>(0,or.jsx)(dB,{orientation:"vertical",clientIds:[e],ref:de,tabIndex:Yo,onFocus:_e})})]})}),Yt&&Nt&&(0,or.jsx)(Qf.__experimentalTreeGridCell,{className:$b,"aria-selected":!!i,ref:v,children:({ref:de,tabIndex:Yo,onFocus:_e})=>(0,or.jsx)(Nt,{clientIds:F2,block:Re,icon:zi,label:(0,CE.__)("Options"),popoverProps:{anchor:Ko},toggleProps:{ref:de,className:"block-editor-list-view-block__menu",tabIndex:Yo,onClick:zn,onFocus:_e,size:"small"},disableOpenOnArrowDown:!0,expand:ro,expandedState:Ni,setInsertedBlock:dr,__experimentalSelectBlock:re})})]})}var DX=(0,vo.memo)(NX);var On=l(x());function VX(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(Twe(t,o,r),0):1}var Twe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+VX(n,e,t,o):r+1,Iwe=()=>{};function FX(e){let{blocks:t,selectBlock:o=Iwe,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=mt(f),b=p||!!g?.isSynced,k=(0,PE.useSelect)(L=>f?L(_).canEditBlock(f):!0,[f]),{blockDropPosition:y,blockDropTargetIndex:v,firstDraggedBlockIndex:S,blockIndexes:w,expandedState:C,draggedClientIds:E}=zu(),I=(0,IE.useRef)();if(!k)return null;let R=h&&i===1,B=t.filter(Boolean),P=B.length,T=R?P+1:P;return I.current=c,(0,On.jsxs)(On.Fragment,{children:[B.map((L,z)=>{let{clientId:U,innerBlocks:H}=L;z>0&&(I.current+=VX(B[z-1],C,E,d));let N=!!E?.includes(U),{displacement:D,isAfterDraggedBlocks:W,isNesting:$}=RX({blockIndexes:w,blockDropTargetIndex:v,blockDropPosition:y,clientId:U,firstDraggedBlockIndex:S,isDragged:N}),{itemInView:X}=u,te=X(I.current),Z=z+1,se=s.length>0?`${s}_${Z}`:`${Z}`,ce=!!H?.length,Q=ce&&m?C[U]??d:void 0,ie=PX(U,n),J=a||ie&&ce,G=N||te||ie&&U===n[0]||z===0||z===P-1;return(0,On.jsxs)(PE.AsyncModeProvider,{value:!ie,children:[G&&(0,On.jsx)(DX,{block:L,selectBlock:o,isSelected:ie,isBranchSelected:J,isDragged:N,level:i,position:Z,rowCount:T,siblingBlockCount:P,showBlockMovers:r,path:se,isExpanded:N?!1:Q,listPosition:I.current,selectedClientIds:n,isSyncedBranch:b,displacement:D,isAfterDraggedBlocks:W,isNesting:$}),!G&&(0,On.jsx)("tr",{children:(0,On.jsx)("td",{className:"block-editor-list-view-placeholder"})}),ce&&Q&&!N&&(0,On.jsx)(FX,{parentId:U,blocks:H,selectBlock:o,showBlockMovers:r,level:i+1,path:se,listPosition:I.current+1,fixedListWindow:u,isBranchSelected:J,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},U)}),R&&(0,On.jsx)(TE.__experimentalTreeGridRow,{level:i,setSize:T,positionInSet:T,isExpanded:!0,children:(0,On.jsx)(TE.__experimentalTreeGridCell,{children:L=>(0,On.jsx)(CD,{clientId:f,nestingLevel:i,blockCount:P,...L})})})]})}var zX=(0,IE.memo)(FX);var lg=l(A()),OE=l(Ve()),jl=l(O()),ED=l(M());var pi=l(x());function jX({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=mt(e),n=Do({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,jl.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,ED.isRTL)(),m=(0,jl.useCallback)((y,v)=>{if(!d)return 0;let S=d.offsetWidth,w=(0,OE.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,E=w===C.body||w===C.documentElement;if(w&&!E){let I=w.getBoundingClientRect(),R=(0,ED.isRTL)()?I.right-y.right:y.left-I.left,B=w.clientWidth;if(B<S+R&&(S=B-R),!f&&y.left+v<I.left)return S-=I.left-y.left,S;if(f&&y.right-v>I.right)return S-=y.right-I.right,S}return S-v},[f,d]),p=(0,jl.useMemo)(()=>{if(!d)return{};let y=d.getBoundingClientRect();return{width:m(y,0)}},[m,d]),h=(0,jl.useMemo)(()=>{if(!d)return{};let y=(0,OE.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,jl.useMemo)(()=>{if(!c)return 1;let y=parseInt(c.getAttribute("aria-level"),10);return y?y+1:1},[c]),b=(0,jl.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),k=(0,jl.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let v=d.getBoundingClientRect(),S=v.left,w=0,C=(0,OE.getScrollContainer)(d,"horizontal"),E=d.ownerDocument,I=C===E.body||C===E.documentElement;if(C&&!I){let P=C.getBoundingClientRect(),T=f?C.offsetWidth-C.clientWidth:0;S<P.left+T&&(S=P.left+T)}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,pi.jsx)(lg.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,pi.jsx)("div",{style:p,className:F("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,pi.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,pi.jsxs)("div",{className:F("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:h,children:[(0,pi.jsx)(xE,{onClick:()=>{}}),(0,pi.jsx)(Te,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,pi.jsx)(lg.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,pi.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,pi.jsx)(lg.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,pi.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var HX=l(Xo()),cg=l(M()),Dy=l(V()),UX=l(O()),Rn=l(nt()),GX=l(K());function WX(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,Dy.useDispatch)(_),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,Dy.useSelect)(_),{getBlockType:u}=(0,Dy.useSelect)(GX.store);return{updateBlockSelection:(0,UX.useCallback)(async(f,m,p,h)=>{if(!f?.shiftKey&&f?.keyCode!==Rn.ESCAPE){o(m,h);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===Rn.ESCAPE,b=f.type==="keydown"&&(f.keyCode===Rn.UP||f.keyCode===Rn.DOWN||f.keyCode===Rn.HOME||f.keyCode===Rn.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 I=n(C),R=n(E),{start:B,end:P}=OX(C,E,I,R);await t(B,P,null)}let v=s();if((f.keyCode===Rn.HOME||f.keyCode===Rn.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,cg.sprintf)((0,cg.__)("%s deselected."),C))}else S.length>1&&(w=(0,cg.sprintf)((0,cg.__)("%s blocks deselected."),S.length));w&&(0,HX.speak)(w,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var $X=l(O());function KX(e){return(0,$X.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 YX=l(V());function qX({blocks:e,rootClientId:t}){return(0,YX.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=j(o(_));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var ZX=l(O()),XX=l(V());function QX({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,XX.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=j(n(_));return{expandedBlock:s(),getBlockParents:i}},[]);(0,ZX.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var JX=l(V()),Jf=l(O()),em=l(q()),eQ=l(M());var Hl=24;function Pwe(e,t,o=1,r=!1){let n=r?t.right-o*Hl:t.left+o*Hl;return r?e.x>n:e.x<n}function Owe(e,t,o=1,r=!1){let n=r?t.right-o*Hl:t.left+o*Hl,i=r?n-e.x:e.x-n,s=Math.round(i/Hl);return Math.abs(s)}function Rwe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function tQ(e,t){let o=e[t+1];return o&&o.isDraggedBlock?tQ(e,t+1):o}function Awe(e,t,o=1,r=!1){let n=r?t.right-o*Hl:t.left+o*Hl;return(r?e.x<n-Hl:e.x>n+Hl)&&e.y<t.bottom}var Lwe=["top","bottom"];function Mwe(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]=Df(t,p,Lwe),b=j1(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=Rwe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||Awe(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&&Pwe(t,s,c.length,o)){let f=tQ(e,a),m=n.nestingLevel,p=f?f.nestingLevel:1;if(m&&p){let h=Owe(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 Nwe={leading:!1,trailing:!0};function oQ({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,JX.useSelect)(_),[c,u]=(0,Jf.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=z1(d,f),p=(0,eQ.isRTL)(),h=(0,em.usePrevious)(d),g=(0,Jf.useCallback)((S,w)=>{let{rootClientId:C}=w||{};C&&w?.dropPosition==="inside"&&!S[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,em.useThrottle)(g,500,Nwe);(0,Jf.useEffect)(()=>{if(c?.dropPosition!=="inside"||h!==c?.rootClientId){b.cancel();return}b(t,c)},[t,h,c,b]);let k=s(),y=(0,em.useThrottle)((0,Jf.useCallback)((S,w)=>{let C={x:S.clientX,y:S.clientY},E=!!k?.length,R=Array.from(w.querySelectorAll("[data-block]")).map(P=>{let T=P.dataset.block,L=P.dataset.expanded==="true",z=P.classList.contains("is-dragging"),U=parseInt(P.getAttribute("aria-level"),10),H=r(T);return{clientId:T,isExpanded:L,rootClientId:H,blockIndex:n(T),element:P,nestingLevel:U||void 0,isDraggedBlock:E?z:!1,innerBlockCount:i(T),canInsertDraggedBlocksAsSibling:E?a(k,H):!0,canInsertDraggedBlocksAsChild:E?a(k,T):!0}}),B=Mwe(R,C,p);B&&u(B)},[a,k,i,n,r,p]),50);return{ref:(0,em.__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 RE=l(O()),rQ=l(V());function nQ({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,RE.useState)(null),{selectedBlockParentClientIds:n}=(0,rQ.useSelect)(i=>{let{getBlockParents:s}=i(_);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,RE.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var ug=l(V()),iQ=l(q());function sQ({selectBlock:e}){let t=(0,ug.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,ug.useSelect)(_),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:p}=(0,ug.useDispatch)(_),h=qp();return(0,iQ.useRefEffect)(g=>{function b(v,S){S&&e(void 0,v,null,null),sg(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:I,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);SC(v,B,t)}if(v.type==="cut"){if(!u(C))return;let B=i(E)??I;f(C,!1);let P=R.length>0&&s().length===0;B||(B=o()[0]),b(B,P)}else if(v.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:B}=a(),P=b7(v,B);if(C.length===1){let[T]=C;if(P.every(L=>c(L.name,T))){p(P,void 0,T),b(P[0]?.clientId,!1);return}}m(C,P,P.length-1,-1),b(P[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 Ul=l(x()),Dwe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,aQ=32;function cQ({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=eD,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,lQ.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,dg.useInstanceId)(cQ),{clientIdsTree:p,draggedClientIds:h,selectedClientIds:g}=qX({blocks:t,rootClientId:a}),b=KX(p),{getBlock:k}=(0,Vy.useSelect)(_),{visibleBlockCount:y}=(0,Vy.useSelect)(J=>{let{getGlobalBlockCount:G,getClientIdsOfDescendants:oe}=J(_),ue=h?.length>0?oe(h).length+1:0;return{visibleBlockCount:G()-ue}},[h]),{updateBlockSelection:v}=WX(),[S,w]=(0,Xt.useReducer)(Dwe,{}),[C,E]=(0,Xt.useState)(null),{setSelectedTreeId:I}=nQ({firstSelectedBlockClientId:g[0],setExpandedState:w}),R=(0,Xt.useCallback)((J,G,oe)=>{v(J,G,null,oe),I(G),u&&u(k(G))},[I,v,u,k]),{ref:B,target:P}=oQ({dropZoneElement:o,expandedState:S,setExpandedState:w}),T=(0,Xt.useRef)(),L=sQ({selectBlock:R}),z=(0,dg.useMergeRefs)([L,T,B,f]);(0,Xt.useEffect)(()=>{g?.length&&sg(g[0],T?.current)},[]);let U=(0,Xt.useCallback)(J=>{if(!J)return;let G=Array.isArray(J)?J:[J];w({type:"expand",clientIds:G})},[w]),H=(0,Xt.useCallback)(J=>{J&&w({type:"collapse",clientIds:[J]})},[w]),N=(0,Xt.useCallback)(()=>{w({type:"clear"})},[w]),D=(0,Xt.useCallback)(J=>{U(J?.dataset?.block)},[U]),W=(0,Xt.useCallback)(J=>{H(J?.dataset?.block)},[H]),$=(0,Xt.useCallback)((J,G,oe)=>{J.shiftKey&&v(J,G?.dataset?.block,oe?.dataset?.block)},[v]);QX({collapseAll:N,expand:U});let X=h?.[0],{blockDropTargetIndex:te,blockDropPosition:Z,firstDraggedBlockIndex:se}=(0,Xt.useMemo)(()=>{let J,G;if(P?.clientId){let oe=b[P.clientId];J=oe===void 0||P?.dropPosition==="top"?oe:oe+1}else P===null&&(J=null);if(X){let oe=b[X];G=oe===void 0||P?.dropPosition==="top"?oe:oe+1}return{blockDropTargetIndex:J,blockDropPosition:P?.dropPosition,firstDraggedBlockIndex:G}},[P,b,X]),ce=(0,Xt.useMemo)(()=>({blockDropPosition:Z,blockDropTargetIndex:te,blockIndexes:b,draggedClientIds:h,expandedState:S,expand:U,firstDraggedBlockIndex:se,collapse:H,collapseAll:N,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:C,setInsertedBlock:E,treeGridElementRef:T,rootClientId:a}),[Z,te,b,h,S,U,se,H,N,s,m,d,C,E,a]),[Q]=(0,dg.__experimentalUseFixedWindowList)(T,aQ,y,{expandedState:S,useWindowing:!0,windowOverscan:40});if(!p.length&&!i)return null;let ie=c&&`block-editor-list-view-description-${m}`;return(0,Ul.jsxs)(Vy.AsyncModeProvider,{value:!0,children:[(0,Ul.jsx)(jX,{draggedBlockClientId:X,listViewRef:T,blockDropTarget:P}),c&&(0,Ul.jsx)(AE.VisuallyHidden,{id:ie,children:c}),(0,Ul.jsx)(AE.__experimentalTreeGrid,{id:e,className:F("block-editor-list-view-tree",{"is-dragging":h?.length>0&&te!==void 0}),"aria-label":(0,TD.__)("Block navigation structure"),ref:z,onCollapseRow:W,onExpandRow:D,onFocusRow:$,applicationAriaLabel:(0,TD.__)("Block navigation structure"),"aria-describedby":ie,style:{"--wp-admin--list-view-dragged-items-height":h?.length?`${aQ*(h.length-1)}px`:null},children:(0,Ul.jsx)(vE.Provider,{value:ce,children:(0,Ul.jsx)(zX,{blocks:p,parentId:a,selectBlock:R,showBlockMovers:r,fixedListWindow:Q,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var ID=(0,Xt.forwardRef)(cQ),LE=(0,Xt.forwardRef)((e,t)=>(0,Ul.jsx)(ID,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var Uu=l(x());function Vwe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,Uu.jsx)(ME.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:lk,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,PD.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function Fwe({isDisabled:e,...t},o){(0,uQ.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,dQ.useSelect)(i=>!!i(_).getBlockCount(),[])&&!e;return(0,Uu.jsx)(ME.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,Uu.jsx)(Vwe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,Uu.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,Uu.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,PD.__)("List view")}),(0,Uu.jsx)(LE,{})]})})}var mQ=(0,fQ.forwardRef)(Fwe);var kQ=l(O()),NE=l(q()),fg=l(A());var pQ=l(O());var hQ=l(x());function gQ({genericPreviewBlock:e,style:t,className:o,activeStyle:r}){let n=Gh(o,r,t),i=(0,pQ.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,hQ.jsx)(YC,{item:i})}var Gl=l(x()),bQ=()=>{};function zwe({clientId:e,onSwitch:t=bQ,onHoverClassName:o=bQ}){let{onSelect:r,stylesToRender:n,activeStyle:i,genericPreviewBlock:s,className:a}=Wh({clientId:e,onSwitch:t}),[c,u]=(0,kQ.useState)(null),d=(0,NE.useViewportMatch)("medium","<");if(!n||n.length===0)return null;let f=(0,NE.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,Gl.jsxs)("div",{className:"block-editor-block-styles",children:[(0,Gl.jsx)("div",{className:"block-editor-block-styles__variants",children:n.map(h=>{let g=h.label||h.name;return(0,Gl.jsx)(fg.Button,{__next40pxDefaultSize:!0,className:F("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,Gl.jsx)(fg.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:g})},h.name)})}),c&&!d&&(0,Gl.jsx)(fg.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,Gl.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>p(null),children:(0,Gl.jsx)(gQ,{activeStyle:i,className:a,genericPreviewBlock:s,style:c})})})]})}var mg=zwe;var xQ=l(A()),pg=l(M());var yQ=l(A()),_Q=l(x()),vQ={0:rA,1:dR,2:mR,3:hR,4:bR,5:vR,6:_R};function OD({level:e}){return vQ[e]?(0,_Q.jsx)(yQ.Icon,{icon:vQ[e]}):null}var DE=l(x()),SQ=[1,2,3,4,5,6],jwe={className:"block-library-heading-level-dropdown"};function wQ({options:e=SQ,value:t,onChange:o}){let r=e.filter(n=>n===0||SQ.includes(n)).sort((n,i)=>n-i);return(0,DE.jsx)(xQ.ToolbarDropdownMenu,{popoverProps:jwe,icon:(0,DE.jsx)(OD,{level:t}),label:(0,pg.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,DE.jsx)(OD,{level:n}),title:n===0?(0,pg.__)("Paragraph"):(0,pg.sprintf)((0,pg.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var Fy=l(M()),zy=l(A());var Wl=l(x());function Hwe({icon:e=GR,label:t=(0,Fy.__)("Choose variation"),instructions:o=(0,Fy.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=F("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,Wl.jsxs)(zy.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,Wl.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,Fy.__)("Block variations"),children:r.map(a=>(0,Wl.jsxs)("li",{children:[(0,Wl.jsx)(zy.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,Wl.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,Wl.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,Wl.jsx)(zy.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,Fy.__)("Skip")})})]})}var CQ=Hwe;var IQ=l(V()),PQ=l(K()),gg=l(A()),RD=l(O()),AD=l(q()),OQ=l(M());var $l=l(M()),hg=l(A());var Gu={carousel:"carousel",grid:"grid"};var An=l(x()),Uwe=({onBlockPatternSelect:e})=>(0,An.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,An.jsx)(hg.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,$l.__)("Choose")})}),Gwe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,An.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,An.jsx)(hg.Button,{size:"compact",icon:(0,$l.isRTL)()?qo:wr,label:(0,$l.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,An.jsx)(hg.Button,{size:"compact",icon:(0,$l.isRTL)()?wr:qo,label:(0,$l.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),Wwe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===Gu.carousel,c=(0,An.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,An.jsx)(hg.Button,{size:"compact",icon:Ck,label:(0,$l.__)("Carousel view"),onClick:()=>t(Gu.carousel),isPressed:a}),(0,An.jsx)(hg.Button,{size:"compact",icon:ik,label:(0,$l.__)("Grid view"),onClick:()=>t(Gu.grid),isPressed:e===Gu.grid})]});return(0,An.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,An.jsx)(Gwe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,An.jsx)(Uwe,{onBlockPatternSelect:s})]})},BQ=Wwe;var EQ=l(V());function $we(e,t,o){return(0,EQ.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 TQ=$we;var Pt=l(x()),Kwe=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===Gu.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,Pt.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,Pt.jsx)("div",{className:i,children:(0,Pt.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,Pt.jsx)(AQ,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,Pt.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,Pt.jsx)(gg.Composite,{role:"listbox",className:i,"aria-label":(0,OQ.__)("Patterns list"),children:o.map(s=>(0,Pt.jsx)(RQ,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function RQ({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,AD.useInstanceId)(RQ,`${r}__item-description`);return(0,Pt.jsx)("div",{className:`${r}__list-item`,children:(0,Pt.jsxs)(gg.Composite.Item,{render:(0,Pt.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,Pt.jsx)(en,{blocks:n,viewportWidth:s}),o&&(0,Pt.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,Pt.jsx)(gg.VisuallyHidden,{id:a,children:i})]})})}function AQ({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,AD.useInstanceId)(AQ,"block-editor-block-pattern-setup-list__item-description");return(0,Pt.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,Pt.jsx)(en,{blocks:n,minHeight:r}),!!s&&(0,Pt.jsx)(gg.VisuallyHidden,{id:a,children:s})]})}var Ywe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=Gu.carousel,showTitles:i=!1})=>{let[s,a]=(0,RD.useState)(n),[c,u]=(0,RD.useState)(0),{replaceBlock:d}=(0,IQ.useDispatch)(_),f=TQ(e,t,o);if(!f?.length)return null;let p=r||(h=>{let g=h.map(b=>(0,PQ.cloneBlock)(b));d(e,g)});return(0,Pt.jsx)(Pt.Fragment,{children:(0,Pt.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,Pt.jsx)(Kwe,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:p,showTitles:i}),(0,Pt.jsx)(BQ,{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)}})]})})},LQ=Ywe;var LD=l(K()),Kl=l(M()),ds=l(A()),VE=l(V()),MD=l(O());var yo=l(x()),{Menu:tm}=j(ds.privateApis);function qwe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,yo.jsxs)("fieldset",{className:e,children:[(0,yo.jsx)(ds.VisuallyHidden,{as:"legend",children:(0,Kl.__)("Transform to variation")}),r.map(n=>(0,yo.jsx)(ds.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,yo.jsx)(Te,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,Kl.sprintf)((0,Kl.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function Zwe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,yo.jsx)("div",{className:e,children:(0,yo.jsxs)(tm,{children:[(0,yo.jsx)(tm.TriggerButton,{render:(0,yo.jsx)(ds.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,Kl.__)("Transform to variation")})}),(0,yo.jsx)(tm.Popover,{position:"bottom",children:(0,yo.jsx)(tm.Group,{children:r.map(n=>(0,yo.jsxs)(tm.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,yo.jsx)(tm.ItemLabel,{children:n.title}),n.description&&(0,yo.jsx)(tm.ItemHelpText,{children:n.description})]},n.name))})})]})})}function Xwe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,yo.jsx)("div",{className:e,children:(0,yo.jsx)(ds.__experimentalToggleGroupControl,{label:(0,Kl.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:r.map(n=>(0,yo.jsx)(ds.__experimentalToggleGroupControlOptionIcon,{icon:(0,yo.jsx)(Te,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,Kl.sprintf)((0,Kl.__)("Transform to %s"),n.title)},n.name))})})}function Qwe({blockClientId:e}){let{updateBlockAttributes:t}=(0,VE.useDispatch)(_),{activeBlockVariation:o,unfilteredVariations:r,blockName:n,isContentOnly:i,isSection:s}=(0,VE.useSelect)(b=>{let{getActiveBlockVariation:k,getBlockVariations:y}=b(LD.store),{getBlockName:v,getBlockAttributes:S,getBlockEditingMode:w,isSectionBlock:C}=j(b(_)),E=e&&v(e),{hasContentRoleAttribute:I}=j(b(LD.store)),R=I(E);return{activeBlockVariation:k(E,S(e),"transform"),unfilteredVariations:E&&y(E,"transform"),blockName:E,isContentOnly:w(e)==="contentOnly"&&!R,isSection:C(e)}},[e]),a=(0,MD.useMemo)(()=>n==="core/paragraph"?o?.name==="stretchy-paragraph"||r.every(b=>["paragraph","stretchy-paragraph"].includes(b.name))?[]:r.filter(b=>b.name!=="stretchy-paragraph"):n==="core/heading"?o?.name==="stretchy-heading"||r.every(b=>["heading","stretchy-heading"].includes(b.name))?[]:r.filter(b=>b.name!=="stretchy-heading"):r,[o?.name,n,r]),c=o?.name,u=(0,MD.useMemo)(()=>{let b=new Set;return a?(a.forEach(k=>{k.icon&&b.add(k.icon?.src||k.icon)}),b.size===a.length):!1},[a]),d=b=>{t(e,{...a.find(({name:k})=>k===b).attributes})},f=window?.__experimentalContentOnlyPatternInsertion&&s;if(!a?.length||i||f)return null;let m="block-editor-block-variation-transforms",h=a.length>5?qwe:Xwe;return(0,yo.jsx)(u?h:Zwe,{className:m,onSelectVariation:d,selectedValue:c,variations:a})}var FE=Qwe;var om=l(M()),zE=l(A());var MQ=l(x()),ND={top:{icon:jR,title:(0,om._x)("Align top","Block vertical alignment setting")},center:{icon:PR,title:(0,om._x)("Align middle","Block vertical alignment setting")},bottom:{icon:TR,title:(0,om._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:VR,title:(0,om._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:MR,title:(0,om._x)("Space between","Block vertical alignment setting")}},Jwe=["top","center","bottom"],eCe="top";function tCe({value:e,onChange:t,controls:o=Jwe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=ND[e],a=ND[eCe],c=n?zE.ToolbarGroup:zE.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,MQ.jsx)(c,{icon:s?s.icon:a.icon,label:(0,om._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...ND[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var DD=tCe;var VD=l(x()),Yx=e=>(0,VD.jsx)(DD,{...e,isToolbar:!1}),NQ=e=>(0,VD.jsx)(DD,{...e,isToolbar:!0});var ln=l(A()),Uy=l(O()),UE=l(M());var DQ=l(A());var FD=l(M()),VQ=l(x());function FQ({isLinked:e,...t}){let o=e?(0,FD.__)("Unlink radii"):(0,FD.__)("Link radii");return(0,VQ.jsx)(DQ.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?Kr:Gn,iconSize:24,label:o})}var zQ=l(A());function oCe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function jQ(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,zQ.__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=oCe(r);return n===0||n?`${n}${i||""}`:void 0}function HQ(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 UQ(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}function bg(e){return e?.includes?e==="0"||e.includes("var:preset|border-radius|"):!1}function GQ(e){if(!e)return;if(e==="0"||e==="default")return e;let t=e.match(/var:preset\|border-radius\|(.+)/);return t?t[1]:void 0}function WQ(e,t){if(e===void 0)return 0;let o=parseFloat(e,10)===0?"0":GQ(e),r=t.findIndex(n=>String(n.slug)===o);return r!==-1?r:NaN}function zD(e,t){if(!bg(e))return e;let o=parseFloat(e,10)===0?"0":GQ(e);return t.find(n=>String(n.slug)===o)?.size}function jD(e,t,o){let r=parseInt(e,10);if(t==="selectList"){if(r===0)return}else if(r===0)return"0";return`var:preset|border-radius|${o[e]?.slug}`}function HD(e,t){if(!e||bg(e)||e==="0")return e;let o=t.find(r=>String(r.size)===String(e));return o?.slug?`var:preset|border-radius|${o.slug}`:e}function $Q(e,t){if(!e||typeof e!="object")return e;let o={};return Object.keys(e).forEach(r=>{let n=e[r];if(bg(n)){let i=zD(n,t);o[r]=i!==void 0?i:n}else o[r]=n}),o}var rr=l(A()),Hy=l(M()),ZQ=l(O());var kg=l(M());var KQ={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},jE=8,HE=[],jy={all:(0,kg.__)("Border radius"),topLeft:(0,kg.__)("Top left"),topRight:(0,kg.__)("Top right"),bottomLeft:(0,kg.__)("Bottom left"),bottomRight:(0,kg.__)("Bottom right")},YQ={all:LO,topLeft:DO,topRight:VO,bottomLeft:MO,bottomRight:NO},UD=0,qQ={px:100,em:20,rem:20};var hi=l(x());function GD({corner:e,onChange:t,selectedUnits:o,setSelectedUnits:r,values:n,units:i,presets:s}){let a=T=>{t(e==="all"?{topLeft:T,topRight:T,bottomLeft:T,bottomRight:T}:{...d,[e]:T})},c=T=>{if(!t)return;let z=!isNaN(parseFloat(T))?T:void 0;a(z)},u=T=>{let L={...o};e==="all"?(L.flat=T,L.topLeft=T,L.topRight=T,L.bottomLeft=T,L.bottomRight=T):L[e]=T,r(L)},d=typeof n!="string"?n:{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n},f;if(e==="all"){let T=$Q(d,s),L=jQ(T);f=HD(L,s)}else f=HD(d[e],s);let m=bg(f)?zD(f,s):f,[p,h]=(0,rr.__experimentalParseQuantityAndUnitFromRawValue)(m),g=f?h:o[e]||o.flat||"px",k=(i&&i.find(T=>T.value===g))?.step||1,[y,v]=(0,ZQ.useState)(f!==void 0&&!bg(f)),S=s.length<=jE,w=WQ(f,s),C=T=>f===void 0?void 0:s[T]?.name,E=s.slice(1,s.length-1).map((T,L)=>({value:L+1,label:void 0})),I=E.length>0,R=[];S||(R=[...s,{name:(0,Hy.__)("Custom"),slug:"custom",size:m}].map((T,L)=>({key:L,name:T.name})));let B=YQ[e],P=T=>{let L=T!==void 0?`${T}${g}`:void 0;a(L)};return(0,hi.jsxs)(rr.__experimentalHStack,{children:[B&&(0,hi.jsx)(rr.Icon,{className:"components-border-radius-control__icon",icon:B,size:24}),(!I||y)&&(0,hi.jsxs)("div",{className:"components-border-radius-control__input-controls-wrapper",children:[(0,hi.jsx)(rr.Tooltip,{text:jy[e],placement:"top",children:(0,hi.jsx)("div",{className:"components-border-radius-control__tooltip-wrapper",children:(0,hi.jsx)(rr.__experimentalUnitControl,{className:"components-border-radius-control__unit-control","aria-label":jy[e],value:[p,g].join(""),onChange:c,onUnitChange:u,size:"__unstable-large",min:UD,units:i})})}),(0,hi.jsx)(rr.RangeControl,{__next40pxDefaultSize:!0,label:(0,Hy.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:p??"",min:UD,max:qQ[g],initialPosition:0,withInputField:!1,onChange:P,step:k,__nextHasNoMarginBottom:!0})]}),I&&S&&!y&&(0,hi.jsx)(rr.RangeControl,{__next40pxDefaultSize:!0,className:"components-border-radius-control__range-control",value:w,onChange:T=>{a(jD(T,"range",s))},withInputField:!1,"aria-valuenow":w,"aria-valuetext":s[w]?.name,renderTooltipContent:C,min:0,max:s.length-1,marks:E,label:jy[e],hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),!S&&!y&&(0,hi.jsx)(rr.CustomSelectControl,{className:"components-border-radius-control__custom-select-control",value:R.find(T=>T.key===w)||R[R.length-1],onChange:T=>{T.selectedItem.key===R.length-1?v(!0):a(jD(T.selectedItem.key,"selectList",s))},options:R,label:jy[e],hideLabelFromVision:!0,size:"__unstable-large"}),I&&(0,hi.jsx)(rr.Button,{label:y?(0,Hy.__)("Use border radius preset"):(0,Hy.__)("Set custom border radius"),icon:gk,onClick:()=>{v(!y)},isPressed:y,size:"small",className:"components-border-radius-control__custom-toggle",iconSize:24})]})}var gi=l(x());function rCe(e){let t=e?.default??HE,o=e?.custom??HE,r=e?.theme??HE;return(0,Uy.useMemo)(()=>{let n=[{name:(0,UE.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>jE?[{name:(0,UE.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function GE({onChange:e,values:t,presets:o}){let[r,n]=(0,Uy.useState)(!UQ(t)||!HQ(t)),i=rCe(o),[s,a]=(0,Uy.useState)({flat:typeof t=="string"?(0,ln.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=fe("spacing.units"),u=(0,ln.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,gi.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,gi.jsxs)(ln.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,gi.jsx)(ln.BaseControl.VisualLabel,{as:"legend",children:(0,UE.__)("Radius")}),(0,gi.jsx)(FQ,{onClick:d,isLinked:r})]}),r?(0,gi.jsx)(gi.Fragment,{children:(0,gi.jsx)(GD,{onChange:e,selectedUnits:s,setSelectedUnits:a,values:t,units:u,corner:"all",presets:i})}):(0,gi.jsx)(ln.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,gi.jsx)(GD,{onChange:e,selectedUnits:s,setSelectedUnits:a,values:t||KQ,units:u,corner:f,presets:i},f))})]})}var JQ=l(A());var XQ=l(q());var QQ=l(x()),WE=(0,XQ.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,QQ.jsx)(e,{...t,colors:c,disableCustomColors:u,hasColorsToChoose:d})},"withColorContext");var eJ=WE(JQ.ColorPalette);var WD=l(M()),fs=l(A());var co=l(x()),{Tabs:vg}=j(fs.privateApis),nCe=["colors","disableCustomColors","gradients","disableCustomGradients"],la={color:"color",gradient:"gradient"};function tJ({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={[la.color]:(0,co.jsx)(fs.ColorPalette,{value:u,onChange:b?v=>{a(v),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:p,headingLevel:h}),[la.gradient]:(0,co.jsx)(fs.GradientPicker,{value:d,onChange:g?v=>{c(v),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:h})},y=v=>(0,co.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:k[v]});return(0,co.jsx)(fs.BaseControl,{__nextHasNoMarginBottom:!0,className:F("block-editor-color-gradient-control",i),children:(0,co.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,co.jsxs)(fs.__experimentalVStack,{spacing:1,children:[m&&(0,co.jsx)("legend",{children:(0,co.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,co.jsx)(fs.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,co.jsx)("div",{children:(0,co.jsxs)(vg,{defaultTabId:d?la.gradient:!!g&&la.color,children:[(0,co.jsxs)(vg.TabList,{children:[(0,co.jsx)(vg.Tab,{tabId:la.color,children:(0,WD.__)("Color")}),(0,co.jsx)(vg.Tab,{tabId:la.gradient,children:(0,WD.__)("Gradient")})]}),(0,co.jsx)(vg.TabPanel,{tabId:la.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.color}),(0,co.jsx)(vg.TabPanel,{tabId:la.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.gradient})]})}),!b&&y(la.color),!g&&y(la.gradient)]})})})}function iCe(e){let[t,o,r,n]=fe("color.palette","color.gradients","color.custom","color.customGradient");return(0,co.jsx)(tJ,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function sCe(e){return nCe.every(t=>e.hasOwnProperty(t))?(0,co.jsx)(tJ,{...e}):(0,co.jsx)(iCe,{...e})}var Wu=sCe;var oJ=l(x());function rJ({onChange:e,value:t,...o}){return(0,oJ.jsx)(Wu,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var ms=l(M()),nJ=l(A()),iJ=l(Xo()),$D=l(x());yc([_c,Zm]);function aCe({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,ms.__)("text color")},{color:f,description:(0,ms.__)("link color")}],p=ct(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=ct(v.color),w=S.isReadable(p,b),C=S.alpha()<1;if(!w){if(h||C)continue;k=g<S.brightness()?(0,ms.sprintf)((0,ms.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),v.description):(0,ms.sprintf)((0,ms.__)("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,ms.__)("This color combination may be hard for people to read.");break}C&&c&&(k=(0,ms.__)("Transparent text may be hard for people to read."),y=(0,ms.__)("Transparent text may be hard for people to read."))}return k?((0,iJ.speak)(y),(0,$D.jsx)("div",{className:"block-editor-contrast-checker",children:(0,$D.jsx)(nJ.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:k})})):null}var $E=aCe;var nr=l(M()),Gy=l(rm()),KE=l(O()),Ln=l(A()),ca=l(x()),$u=new Date;$u.setDate(20);$u.setMonth($u.getMonth()-3);$u.getMonth()===4&&$u.setMonth(3);function aJ({format:e,defaultFormat:t,onChange:o}){return(0,ca.jsxs)(Ln.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,ca.jsx)(Ln.VisuallyHidden,{as:"legend",children:(0,nr.__)("Date format")}),(0,ca.jsx)(Ln.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,nr.__)("Default format"),help:`${(0,nr.__)("Example:")} ${(0,Gy.dateI18n)(t,$u)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,ca.jsx)(lCe,{format:e,onChange:o})]})}function lCe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,nr._x)("n/j/Y","short date format"),(0,nr._x)("n/j/Y g:i A","short date format with time"),(0,nr._x)("M j, Y","medium date format"),(0,nr._x)("M j, Y g:i A","medium date format with time"),(0,nr._x)("F j, Y","long date format"),(0,nr._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,Gy.dateI18n)(a,$u),format:a})),{key:"human-diff",name:(0,Gy.humanTimeDiff)($u),format:"human-diff"}],n={key:"custom",name:(0,nr.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,nr.__)("Enter your own date format")},[i,s]=(0,KE.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,ca.jsxs)(Ln.__experimentalVStack,{children:[(0,ca.jsx)(Ln.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,nr.__)("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,ca.jsx)(Ln.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,nr.__)("Custom format"),hideLabelFromVision:!0,help:(0,KE.createInterpolateElement)((0,nr.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,ca.jsx)(Ln.ExternalLink,{href:(0,nr.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var bi=l(A()),Wy=l(M()),lJ=l(nt());var cJ=l(q()),ua=l(x());function uJ({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,ua.jsx)(bi.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,ua.jsx)(bi.DuotoneSwatch,{values:i}):a=(0,ua.jsx)(Ie,{icon:qO});let c=(0,Wy.__)("Apply duotone filter"),d=`${(0,cJ.useInstanceId)(uJ,"duotone-control",e)}__description`;return(0,ua.jsx)(bi.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,Wy.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,ua.jsx)(bi.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:h=>{!f&&h.keyCode===lJ.DOWN&&(h.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,ua.jsxs)(bi.MenuGroup,{label:(0,Wy.__)("Duotone"),children:[(0,ua.jsx)("p",{children:(0,Wy.__)("Create a two-tone color effect without losing your original image.")}),(0,ua.jsx)(bi.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var YE=uJ;var pJ=l(A()),hJ=l(Oe()),gJ=l(O()),Mn=l(M());var Ho=l(M());var qE=l(M());function dJ(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,qE._x)("Regular","font style");break;case"italic":t=(0,qE._x)("Italic","font style");break;case"oblique":t=(0,qE._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var ps=l(M());function KD(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,ps._x)("Regular","font weight");break;case"bold":case"700":t=(0,ps._x)("Bold","font weight");break;case"100":t=(0,ps._x)("Thin","font weight");break;case"200":t=(0,ps._x)("Extra Light","font weight");break;case"300":t=(0,ps._x)("Light","font weight");break;case"500":t=(0,ps._x)("Medium","font weight");break;case"600":t=(0,ps._x)("Semi Bold","font weight");break;case"800":t=(0,ps._x)("Extra Bold","font weight");break;case"900":t=(0,ps._x)("Black","font weight");break;case"1000":t=(0,ps._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var fJ=[{name:(0,Ho._x)("Regular","font style"),value:"normal"},{name:(0,Ho._x)("Italic","font style"),value:"italic"}],mJ=[{name:(0,Ho._x)("Thin","font weight"),value:"100"},{name:(0,Ho._x)("Extra Light","font weight"),value:"200"},{name:(0,Ho._x)("Light","font weight"),value:"300"},{name:(0,Ho._x)("Regular","font weight"),value:"400"},{name:(0,Ho._x)("Medium","font weight"),value:"500"},{name:(0,Ho._x)("Semi Bold","font weight"),value:"600"},{name:(0,Ho._x)("Bold","font weight"),value:"700"},{name:(0,Ho._x)("Extra Bold","font weight"),value:"800"},{name:(0,Ho._x)("Black","font weight"),value:"900"},{name:(0,Ho._x)("Extra Black","font weight"),value:"1000"}];function ZE(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(KD(m))}}let a=KD(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=dJ(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,Ho._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,Ho._x)("Italic","font style"),value:"italic"}),n&&(t=fJ,o=mJ),t=t.length===0?fJ:t,o=o.length===0?mJ:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,Ho.sprintf)((0,Ho._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 bJ=l(x()),cCe=(e,t)=>e?t?(0,Mn.__)("Appearance"):(0,Mn.__)("Font style"):(0,Mn.__)("Font weight");function XE(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=cCe(r,n),f={key:"default",name:(0,Mn.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:p,combinedStyleAndWeightOptions:h}=ZE(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,gJ.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,Mn.sprintf)((0,Mn.__)("Currently selected font appearance: %s"),v.name):(0,Mn.sprintf)((0,Mn.__)("Currently selected font style: %s"),v.name):(0,Mn.sprintf)((0,Mn.__)("Currently selected font weight: %s"),v.name):(0,Mn.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,hJ.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,bJ.jsx)(pJ.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 kJ=l(A()),vJ=l(Oe()),YD=l(M());var yJ=l(x());function QE({__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,YD.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,vJ.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,yJ.jsx)(kJ.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,YD.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:F("block-editor-font-family-control",n),...i})}var JE=l(A()),_J=l(Oe()),SJ=l(M());var xJ=l(x());function eT({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=fe("spacing.units"),s=(0,JE.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,_J.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,xJ.jsx)(JE.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,SJ.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var $y=l(M()),tT=l(A()),qD=l(x()),uCe=[{label:(0,$y.__)("None"),value:"none",icon:Cr},{label:(0,$y.__)("Underline"),value:"underline",icon:rR},{label:(0,$y.__)("Strikethrough"),value:"line-through",icon:tR}];function oT({value:e,onChange:t,className:o}){return(0,qD.jsx)(tT.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,$y.__)("Decoration"),className:F("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:uCe.map(r=>(0,qD.jsx)(tT.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var yg=l(M());var rT=l(A()),ZD=l(x()),dCe=[{label:(0,yg.__)("None"),value:"none",icon:Cr},{label:(0,yg.__)("Uppercase"),value:"uppercase",icon:iR},{label:(0,yg.__)("Lowercase"),value:"lowercase",icon:JO},{label:(0,yg.__)("Capitalize"),value:"capitalize",icon:XO}];function nT({className:e,value:t,onChange:o}){return(0,ZD.jsx)(rT.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,yg.__)("Letter case"),className:F("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:dCe.map(r=>(0,ZD.jsx)(rT.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var _g=l(M());var iT=l(A()),XD=l(x()),fCe=[{label:(0,_g.__)("Horizontal"),value:"horizontal-tb",icon:KA},{label:(0,_g.__)("Vertical"),value:(0,_g.isRTL)()?"vertical-lr":"vertical-rl",icon:qA}];function sT({className:e,value:t,onChange:o}){return(0,XD.jsx)(iT.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,_g.__)("Orientation"),className:F("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:fCe.map(r=>(0,XD.jsx)(iT.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Nr=l(A()),wJ=l(O()),CJ=l(M());var Co=l(x()),mCe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,Co.jsx)(Nr.__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})},pCe=({colorValue:e,label:t})=>(0,Co.jsxs)(Nr.__experimentalHStack,{justify:"flex-start",children:[(0,Co.jsx)(Nr.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,Co.jsx)(Nr.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),hCe=e=>({onToggle:t,isOpen:o})=>{let{clearable:r,colorValue:n,gradientValue:i,onColorChange:s,onGradientChange:a,label:c}=e,u=(0,wJ.useRef)(void 0),d={onClick:t,className:F("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,Co.jsxs)(Co.Fragment,{children:[(0,Co.jsx)(Nr.Button,{__next40pxDefaultSize:!0,...d,children:(0,Co.jsx)(pCe,{colorValue:m,label:c})}),r&&m&&(0,Co.jsx)(Nr.Button,{__next40pxDefaultSize:!0,label:(0,CJ.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Cr,onClick:()=>{f(),o&&t(),u.current?.focus()}})]})};function aT({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,Co.jsx)(Co.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,Co.jsx)(mCe,{setting:u,...a,children:(0,Co.jsx)(Nr.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:hCe(m),renderContent:()=>(0,Co.jsx)(Nr.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Co.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,Co.jsx)(Wu,{...f})})})})},d)})})}var lT=l(A()),BJ=l(V()),EJ=l(q());var QD=l(O()),nm=l(M());function Ku(){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,QD.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,nm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,nm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,nm._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,QD.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,nm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,nm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,nm._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 hs=l(x()),gCe=["colors","disableCustomColors","gradients","disableCustomGradients"],JD=({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,EJ.useInstanceId)(JD),{batch:m}=(0,BJ.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,hs.jsxs)(lT.__experimentalToolsPanel,{className:F("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,hs.jsx)(aT,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,hs.jsxs)(hs.Fragment,{children:[(0,hs.jsx)(lT.__experimentalSpacer,{marginY:4})," ",i]})]})},bCe=e=>{let t=Ku();return(0,hs.jsx)(JD,{...t,...e})},kCe=e=>gCe.every(t=>e.hasOwnProperty(t))?(0,hs.jsx)(JD,{...e}):(0,hs.jsx)(bCe,{...e}),cT=kCe;var IJ=l(O()),Uo=l(A()),PJ=l(M());var da=l(x()),TJ={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 Ky({label:e=(0,PJ.__)("Height"),onChange:t,value:o}){let r=parseFloat(o),[n]=fe("spacing.units"),i=(0,Uo.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,IJ.useMemo)(()=>(0,Uo.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,Uo.__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,da.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,da.jsx)(Uo.BaseControl.VisualLabel,{as:"legend",children:e}),(0,da.jsxs)(Uo.Flex,{children:[(0,da.jsx)(Uo.FlexItem,{isBlock:!0,children:(0,da.jsx)(Uo.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,da.jsx)(Uo.FlexItem,{isBlock:!0,children:(0,da.jsx)(Uo.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,da.jsx)(Uo.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:TJ[s]?.max??100,step:TJ[s]?.step??.1,withInputField:!1,onChange:a,__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})})})]})]})}var Xy=l(A());var ki=l(Fs()),oee=l(XJ());function xCe(e,t,o,r,n,i){i===void 0&&(i=0);var s=Sg(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 wCe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function Yy(e,t,o,r,n){n===void 0&&(n=0);var i=Sg(t.width,t.height,n),s=i.width,a=i.height;return{x:QJ(e.x,s,o.width,r),y:QJ(e.y,a,o.height,r)}}function QJ(e,t,o,r){var n=t*r/2-o/2;return hT(e,-n,n)}function JJ(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function eee(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function CCe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?BCe:ECe,c=Sg(t.width,t.height,i),u=Sg(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=xo(xo({},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 BCe(e,t){return Math.min(e,Math.max(0,t))}function ECe(e,t){return t}function TCe(e,t,o,r,n,i){var s=Sg(t.width,t.height,o),a=hT(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 ICe(e,t,o){var r=wCe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function PCe(e,t,o,r,n,i){o===void 0&&(o=0);var s=Sg(t.naturalWidth,t.naturalHeight,o),a=hT(ICe(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 tee(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function OCe(e){return e*Math.PI/180}function Sg(e,t,o){var r=OCe(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 hT(e,t,o){return Math.min(Math.max(e,t),o)}function pT(){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 RCe=`.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 |
`,ACe=1,LCe=3,MCe=1,ree=(function(e){I6(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=ki.createRef(),o.imageRef=ki.createRef(),o.videoRef=ki.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=TCe(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=PCe(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=xo(xo({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:xCe(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=xo({},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?Yy(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,oee.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=hT(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?Yy(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?Yy(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return CCe(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?Yy(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=xo({},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=Yy(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=RCe,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=JJ(r,n),this.lastPinchRotation=eee(r,n),this.onDragStart(tee(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=tee(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=JJ(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=eee(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,I=C.cropAreaClassName,R=C.mediaClassName,B=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return ki.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(T){return o.containerRef=T},"data-testid":"container",style:v,className:pT("reactEasyCrop_Container",E)},i?ki.createElement("img",xo({alt:"",className:pT("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:xo(xo({},w),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(p,"deg) scale(").concat(h,")")}),onLoad:this.onMediaLoad})):s&&ki.createElement("video",xo({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:pT("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:xo(xo({},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(P){return ki.createElement("source",xo({key:P.src},P))})),this.state.cropSize&&ki.createElement("div",xo({ref:this.cropperRef,style:xo(xo({},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:pT("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",I)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:LCe,minZoom:ACe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:MCe},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})(ki.Component);var fee=l(O());var wg=l(O());var nee=Object.prototype.hasOwnProperty;function iee(e,t,o){for(o of e.keys())if(sm(o,t))return o}function sm(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--&&sm(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=iee(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=iee(t,n),!n)||!sm(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(nee.call(e,o)&&++r&&!nee.call(t,o)||!(o in t)||!sm(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var gs=l(O());var xg=1,see=5;var gT=e=>e>=0?e%360:(360+e%360)%360,NCe=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 aee(e){return e*Math.PI/180}function DCe(e,t,o){let r=aee(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 lee(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await NCe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=aee(o),{width:c,height:u}=DCe(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 am={crop:{x:0,y:0,width:100,height:100},zoom:xg,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},VCe={x:0,y:0},lV={crop:VCe,croppedArea:am.crop,croppedAreaPixels:null,zoom:am.zoom,rotation:am.rotation,flip:am.flip,aspectRatio:am.aspectRatio,mediaSize:null};function cee(){let[e,t]=(0,gs.useState)(lV),[o,r]=(0,gs.useState)(null),n=(0,gs.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=gT(m.rotation)),{...d,...m}})},[]),i=(0,gs.useCallback)((u=null)=>{if(!u){r(null),n(lV);return}if(typeof u=="object"){let d={...am,...u};r(d),n(d)}},[n,r]),s=(0,gs.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({...lV})},[o,n]),a=(0,gs.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:gT(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return sm(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:gT(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return sm(u,am)===!1},[e,o]),c=(0,gs.useCallback)(async u=>e.croppedAreaPixels?lee(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,gs.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var uee=l(x()),dee=(0,wg.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:xg,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function cV({children:e}){let t=cee(),o=(0,wg.useMemo)(()=>({...t}),[t]);return(0,uee.jsx)(dee.Provider,{value:o,children:e})}var qy=()=>{let e=(0,wg.useContext)(dee);if(!e)throw new Error("Missing ImageCropperContext");return e};var mee=l(x());function uV({src:e,onLoad:t,minZoom:o=xg,maxZoom:r=see,...n}){let{cropperState:i,setCropperState:s}=qy(),{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,fee.useCallback)((k,y)=>{s({croppedArea:k,croppedAreaPixels:y})},[s]);return(0,mee.jsx)(ree,{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 Eg=l(A()),Bg=l(M());var pee=100,hee=300,bT={placement:"bottom-start"};var Cg=l(O());var kT=l(V()),lm=l(O()),Yl=l(M()),gee=l(qn()),bee=l(Ve());var FCe={crop:(0,Yl.__)("Image cropped."),rotate:(0,Yl.__)("Image rotated."),cropAndRotate:(0,Yl.__)("Image cropped and rotated.")};function kee({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,kT.useDispatch)(gee.store),[c,u]=(0,lm.useState)(!1),{editMediaEntity:d}=(0,kT.useSelect)(p=>({editMediaEntity:p(_).getSettings()?.[gS]}),[]),f=(0,lm.useCallback)(()=>{u(!1),i()},[i]),m=(0,lm.useCallback)(async()=>{if(!d){i(),s((0,Yl.__)("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(FCe[h],{type:"snackbar",actions:[{label:(0,Yl.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,Yl.sprintf)((0,Yl.__)("Could not edit image. %s"),(0,bee.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,lm.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var bs=l(O()),vee=l(ot());function yee({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,bs.useState)(),{cropperState:i,setCropperState:s}=qy(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,bs.useCallback)(y=>{s({zoom:y})},[s]),m=(0,bs.useCallback)(y=>{s({aspectRatio:y})},[s]),p=t/o,h=o/t;(0,bs.useEffect)(()=>{m(p)},[]);let[g,b]=(0,bs.useState)(0),k=(0,bs.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"),P=0,T=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)&&(P=B.width),(y===270||y===180)&&(T=B.height);let L=B.getContext("2d");L.translate(P,T),L.rotate(y*Math.PI/180),L.drawImage(R.target,0,0),B.toBlob(z=>{n(URL.createObjectURL(z)),b(y);let U=w?c:B.width/B.height;s({aspectRatio:U,crop:{x:-(u.y*v),y:u.x*v}})})}let E=new window.Image;E.src=e,E.onload=C;let I=(0,vee.applyFilters)("media.crossOrigin",void 0,e);typeof I=="string"&&(E.crossOrigin=I)},[g,p,e,s,u,a,c,h,b]);return(0,bs.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()),dV=(0,Cg.createContext)({});dV.displayName="ImageEditingContext";var fa=()=>(0,Cg.useContext)(dV);function See({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=yee({url:t,naturalWidth:o,naturalHeight:r}),c=kee({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,Cg.useMemo)(()=>({...a,...c}),[a,c]);return(0,_ee.jsx)(dV.Provider,{value:u,children:s})}var vi=l(x());function vT({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,vi.jsx)(Eg.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,vi.jsx)(Eg.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?Ya:void 0,children:i},s))})}function zCe(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 fV({ratio:e,...t}){return{ratio:zCe(e),...t}}function xee({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=fa(),[i,s,a]=fe("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,vi.jsx)(Eg.DropdownMenu,{icon:mO,label:(0,Bg.__)("Aspect Ratio"),popoverProps:bT,toggleProps:e,children:({onClose:c})=>(0,vi.jsxs)(vi.Fragment,{children:[(0,vi.jsx)(vT,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,Bg.__)("Original"),ratio:n},...a?i.map(fV).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,vi.jsx)(vT,{label:(0,Bg.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,vi.jsx)(vT,{label:(0,Bg.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(fV).filter(({ratio:u})=>u>1)}),a&&(0,vi.jsx)(vT,{label:(0,Bg.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(fV).filter(({ratio:u})=>u<1)})]})})}var wee=l(A()),Cee=l(q());var Yu=l(x());function Bee({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=fa(),[u,{width:d}]=(0,Cee.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,Yu.jsxs)("div",{className:F("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,Yu.jsx)(uV,{src:a||e}),s&&(0,Yu.jsx)(wee.Spinner,{})]});return(0,Yu.jsxs)(Yu.Fragment,{children:[u,m]})}var qu=l(A()),mV=l(M());var Zy=l(x());function Eee(){let{isInProgress:e,zoom:t,setZoom:o}=fa();return(0,Zy.jsx)(qu.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:bT,renderToggle:({isOpen:r,onToggle:n})=>(0,Zy.jsx)(qu.ToolbarButton,{icon:BA,label:(0,mV.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,Zy.jsx)(qu.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Zy.jsx)(qu.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,mV.__)("Zoom"),min:pee,max:hee,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var Tee=l(A()),Iee=l(M());var Pee=l(x());function Oee(){let{isInProgress:e,rotateClockwise:t}=fa();return(0,Pee.jsx)(Tee.ToolbarButton,{icon:SA,label:(0,Iee.__)("Rotate"),onClick:t,disabled:e})}var pV=l(A()),hV=l(M());var cm=l(x());function Ree(){let{isInProgress:e,apply:t,cancel:o}=fa();return(0,cm.jsxs)(cm.Fragment,{children:[(0,cm.jsx)(pV.ToolbarButton,{onClick:t,disabled:e,children:(0,hV.__)("Apply")}),(0,cm.jsx)(pV.ToolbarButton,{onClick:o,children:(0,hV.__)("Cancel")})]})}var Nn=l(x());function Aee({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,Nn.jsx)(cV,{children:(0,Nn.jsxs)(See,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,Nn.jsx)(Bee,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,Nn.jsxs)(ut,{children:[(0,Nn.jsxs)(Xy.ToolbarGroup,{children:[(0,Nn.jsx)(Eee,{}),(0,Nn.jsx)(Xy.ToolbarItem,{children:u=>(0,Nn.jsx)(xee,{toggleProps:u})}),(0,Nn.jsx)(Oee,{})]}),(0,Nn.jsx)(Xy.ToolbarGroup,{children:(0,Nn.jsx)(Ree,{})})]})]})})}var Dn=l(A()),Zu=l(M());var Tg=l(O());function Lee(e,t,o,r,n){let[i,s]=(0,Tg.useState)(t??r??""),[a,c]=(0,Tg.useState)(e??o??"");return(0,Tg.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,Tg.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 yi=l(x()),Mee=[25,50,75,100],jCe=()=>{};function Nee(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function Dee({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=jCe}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:p}=Lee(a,s,o,t,c),h=b=>{if(b===void 0){p();return}let{scaledWidth:k,scaledHeight:y}=Nee(b,t,o);p(y,k)},g=Mee.find(b=>{let{scaledWidth:k,scaledHeight:y}=Nee(b,t,o);return f===k&&d===y});return(0,yi.jsxs)(Dn.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,yi.jsx)(Dn.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Zu.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,yi.jsxs)(yi.Fragment,{children:[(0,yi.jsxs)(Dn.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,yi.jsx)(Dn.__experimentalNumberControl,{label:(0,Zu.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,yi.jsx)(Dn.__experimentalNumberControl,{label:(0,Zu.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,yi.jsx)(Dn.__experimentalToggleGroupControl,{label:(0,Zu.__)("Image size presets"),hideLabelFromVision:!0,onChange:h,value:g,isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:Mee.map(b=>(0,yi.jsx)(Dn.__experimentalToggleGroupControlOption,{value:b,label:(0,Zu.sprintf)((0,Zu.__)("%d%%"),b)},b))})]})]})}var yT=l(A());var um=l(M()),Fee=l(x()),Vee={left:Ic,center:Tc,right:Pc,"space-between":ip,stretch:sp};function HCe({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?Vee[r]:Vee.left,c=[{name:"left",icon:Ic,title:(0,um.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:Tc,title:(0,um.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:Pc,title:(0,um.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:ip,title:(0,um.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:sp,title:(0,um.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?yT.ToolbarGroup:yT.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,Fee.jsx)(u,{icon:a,popoverProps:n,label:(0,um.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var gV=HCe;var bV=l(x()),Bp=e=>(0,bV.jsx)(gV,{...e,isToolbar:!1}),zee=e=>(0,bV.jsx)(gV,{...e,isToolbar:!0});var Dr=l(A()),ma=l(M()),ir=l(O()),Rte=l(q()),Ate=l(Ve()),Lte=l(nt()),Mte=l(ny()),RT=l(V()),TV=l(gp());var Nte=l(Oe());var Ig=l(A());var _T=l(q()),ST=l(M()),jee=l(O()),ql=l(x());function Hee({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,_T.useReducedMotion)(),n=r?jee.Fragment:Ig.__unstableAnimatePresence,i=r?"div":Ig.__unstableMotion.div,a=`link-control-settings-drawer-${(0,_T.useInstanceId)(Hee)}`;return(0,ql.jsxs)(ql.Fragment,{children:[(0,ql.jsx)(Ig.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,ST.isRTL)()?ok:Ec,"aria-controls":a,children:(0,ST._x)("Advanced","Additional link settings")}),(0,ql.jsx)(n,{children:t&&(0,ql.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,ql.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var Uee=Hee;var ET=l(O()),BV=l(M()),lte=l(Oe());var Qy=l(M()),ete=l(A());var xT=l(M()),Gee=l(A()),Wee=l(O());var kV=l(x()),UCe=({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,Wee.createInterpolateElement)((0,xT.sprintf)((0,xT.__)("Create: <mark>%s</mark>"),e),{mark:(0,kV.jsx)("mark",{})}),(0,kV.jsx)(Gee.MenuItem,{...o,iconPosition:"left",icon:Wn,className:"block-editor-link-control__search-item",onClick:t,children:n})},$ee=UCe;var Zl=l(M()),CT=l(A());var Kee=l(Ve()),Og=l($r()),Yee=l(q()),qee=l(Oe()),Pg=l(x()),wT={post:{icon:bA,label:(0,Zl.__)("Post")},page:{icon:Za,label:(0,Zl.__)("Page")},post_tag:{icon:WA,label:(0,Zl.__)("Tag")},category:{icon:vO,label:(0,Zl.__)("Category")},attachment:{icon:KO,label:(0,Zl.__)("Attachment")}};function GCe({isURL:e,suggestion:t}){let o=null;return e?o=nk:t.type in wT&&(o=wT[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=xR),t.isBlogHome&&(o=iL))),o?(0,Pg.jsx)(Ie,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function WCe(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function $Ce(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var KCe=(e,...t)=>(...o)=>e(...o,...t),YCe=e=>t=>t==null||t!==t?e:t;function qCe(e){return e&&(0,Yee.pipe)(Og.safeDecodeURI,Og.getPath,YCe(""),KCe(Og.filterURLForDisplay,24),$Ce,WCe)(e)}var Zee=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,Zl.__)("Press ENTER to add this link"):qCe(t.url);return(0,Pg.jsx)(CT.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,Pg.jsx)(GCe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&ZCe(t),className:"block-editor-link-control__search-item",children:(0,Pg.jsx)(CT.TextHighlight,{text:(0,Kee.__unstableStripHTML)(t.title),highlight:o})})};function ZCe(e){return e.isFrontPage?(0,Zl.__)("Front page"):e.isBlogHome?(0,Zl.__)("Blog home"):e.type in wT?wT[e.type].label:e.type}var Xee=Zee,Qee=e=>((0,qee.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,Pg.jsx)(Zee,{...e}));var Jee=l(M()),dm="__CREATE__",vV="tel",yV="link",_V="mailto",SV="internal",xV=[yV,_V,vV,SV],wV=[{id:"opensInNewTab",title:(0,Jee.__)("Open in new tab")}];var tte=l(Oe()),fm=l(x());function ote({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=F("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&xV.includes(i[0].type),p=e&&!m&&!c,h=!d?.type,g=c?(0,Qy.__)("Suggestions"):(0,Qy.sprintf)((0,Qy.__)('Search results for "%s"'),t);return(0,fm.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,fm.jsx)("div",{...r,className:f,"aria-label":g,children:(0,fm.jsx)(ete.MenuGroup,{children:i.map((b,k)=>p&&dm===b.type?(0,fm.jsx)($ee,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,k),isSelected:k===s},b.type):dm===b.type?null:(0,fm.jsx)(Xee,{itemProps:n(b,k),suggestion:b,index:k,onClick:()=>{o(b)},isSelected:k===s,isURL:xV.includes(b.type),searchTerm:t,shouldShowType:h,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var rte=ote,nte=e=>((0,tte.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,fm.jsx)(ote,{...e}));var BT=l($r()),ite=l(O()),ste=l(V());var XCe=()=>Promise.resolve([]),QCe=e=>{let t=yV,o=(0,BT.getProtocol)(e)||"";return o.includes("mailto")&&(t=_V),o.includes("tel")&&(t=vV),e?.startsWith("#")&&(t=SV),Promise.resolve([{id:e,title:e,url:t==="URL"?(0,BT.prependHTTP)(e):e,type:t}])},JCe=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||Yb(e)||!r?a:a.concat({title:e,url:e,type:dm})};function ate(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,ste.useSelect)(a=>{let{getSettings:c}=a(_);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?QCe:XCe;return(0,ite.useCallback)((a,{isInitialSuggestions:c})=>Yb(a)?s(a,{isInitialSuggestions:c}):JCe(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var Rg=l(x()),e1e=()=>Promise.resolve([]),CV=()=>{},cte=(0,ET.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=CV,onChange:a=CV,onSelect:c=CV,showSuggestions:u=!0,renderSuggestions:d=w=>(0,Rg.jsx)(rte,{...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=ate(h,m,i,g),C=u?f||w:e1e,[E,I]=(0,ET.useState)(),R=(z,U)=>{a(z),I(U)},B=z=>d({...z,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:h,handleSuggestionClick:U=>{z.handleSuggestionClick&&z.handleSuggestionClick(U),P(U)}}),P=async z=>{let U=z;if(dm===z.type){try{U=await s(z.title),U?.url&&c(U)}catch{}return}if(m||U&&Object.keys(U).length>=1){let{id:H,url:N,kind:D,type:W,...$}=o??{};c({...$,...U},U)}},T=n??(0,BV.__)("Search or type URL"),L=k&&n!==""?T:(0,BV.__)("Link");return(0,Rg.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,Rg.jsx)(Xu,{disableSuggestions:o?.url===e,label:L,hideLabelFromVision:k,className:r,value:e,onChange:R,placeholder:T,__experimentalRenderSuggestions:u?B:null,__experimentalFetchLinkSuggestions:C,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:p,onSubmit:(z,U)=>{let H=z||E;!H&&!e?.trim()?.length?U.preventDefault():P(H||{url:e})},inputRef:S,suffix:y,disabled:v}),t]})}),ute=cte,dte=e=>((0,lte.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,Rg.jsx)(cte,{...e}));var Qu=l(M()),Xl=l(A()),bte=l(q()),IT=l($r());var kte=l(Ve()),PT=l(V()),vte=l(qn()),yte=l(gp());var fte=l(A()),{Slot:mte,Fill:pte}=(0,fte.createSlotFill)("BlockEditorLinkControlViewer");var hte=l(V()),TT=l(O());function t1e(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 o1e(e){let[t,o]=(0,TT.useReducer)(t1e,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,hte.useSelect)(n=>{let{getSettings:i}=n(_);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,TT.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 gte=o1e;var Qt=l(x());function r1e(e){return e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")}function _te({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,PT.useSelect)(k=>k(yte.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=gte(s),u=a&&Object.keys(a).length,d=e&&(0,IT.filterURLForDisplay)((0,IT.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,kte.__unstableStripHTML)(a?.title||e?.title||d),p=!e?.url||r1e(m)===d,h;a?.icon?h=(0,Qt.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,Qt.jsx)(Ie,{icon:BR,size:32}):h=(0,Qt.jsx)(Ie,{icon:nk});let{createNotice:g}=(0,PT.useDispatch)(vte.store),b=(0,bte.useCopyToClipboard)(e.url,()=>{g("info",(0,Qu.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,Qt.jsx)("div",{role:"group","aria-label":(0,Qu.__)("Manage link"),className:F("block-editor-link-control__search-item",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":f,"is-url-title":m===d}),children:(0,Qt.jsxs)("div",{className:"block-editor-link-control__search-item-top",children:[(0,Qt.jsxs)("span",{className:"block-editor-link-control__search-item-header",role:"figure","aria-label":(0,Qu.__)("Link information"),children:[(0,Qt.jsx)("span",{className:F("block-editor-link-control__search-item-icon",{"is-image":a?.icon}),children:h}),(0,Qt.jsx)("span",{className:"block-editor-link-control__search-item-details",children:f?(0,Qt.jsx)("span",{className:"block-editor-link-control__search-item-error-notice",children:(0,Qu.__)("Link is empty")}):(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)(Xl.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url,children:(0,Qt.jsx)(Xl.__experimentalTruncate,{numberOfLines:1,children:m})}),!p&&(0,Qt.jsx)("span",{className:"block-editor-link-control__search-item-info",children:(0,Qt.jsx)(Xl.__experimentalTruncate,{numberOfLines:1,children:d})})]})})]}),(0,Qt.jsx)(Xl.Button,{icon:mk,label:(0,Qu.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,Qt.jsx)(Xl.Button,{icon:Gn,label:(0,Qu.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,Qt.jsx)(Xl.Button,{icon:OO,label:(0,Qu.__)("Copy link"),ref:b,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,Qt.jsx)(mte,{fillProps:e})]})})}var Ste=l(M()),OT=l(A()),Ag=l(x()),n1e=()=>{},i1e=({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,Ag.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,Ag.jsx)(OT.CheckboxControl,{__nextHasNoMarginBottom:!0,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,Ag.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,Ag.jsx)(OT.VisuallyHidden,{as:"legend",children:(0,Ste.__)("Currently selected link settings")}),n]})},xte=i1e;var wte=l(M()),mm=l(O());function Cte(e){let t=(0,mm.useRef)(),[o,r]=(0,mm.useState)(!1),[n,i]=(0,mm.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=s1e(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,wte.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,mm.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var s1e=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 EV=l(O()),Tte=l(Ete());function Ite(e){let[t,o]=(0,EV.useState)(e||{}),[r,n]=(0,EV.useState)(e);return(0,Tte.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 yt=l(x()),IV=()=>{},Pte="core/block-editor",Ote="linkControlSettingsDrawer";function pm({searchInputPlaceholder:e,value:t,settings:o=wV,onChange:r=IV,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,ir.useState)(!1),{advancedSettingsPreference:C}=(0,RT.useSelect)(Ne=>({advancedSettingsPreference:Ne(TV.store).get(Pte,Ote)??!1}),[]),{set:E}=(0,RT.useDispatch)(TV.store),I=Ne=>{E&&E(Pte,Ote,Ne),w(Ne)},R=C||S,B=(0,ir.useRef)(!0),P=(0,ir.useRef)(),T=(0,ir.useRef)(),L=(0,ir.useRef)(),z=(0,ir.useRef)(),U=o.map(({id:Ne})=>Ne),[H,N,D,W,$]=Ite(t),X=v&&!!H?.id,te=(0,Rte.useInstanceId)(pm,"link-control"),Z=X?`${te}__help`:null,se=t&&!(0,Mte.isShallowEqualObjects)(H,t),[ce,Q]=(0,ir.useState)(u!==void 0?u:!t||!t.url),{createPage:ie,isCreatingPage:J,errorMessage:G}=Cte(d);(0,ir.useEffect)(()=>{u!==void 0&&Q(u)},[u]),(0,ir.useEffect)(()=>{if(B.current)return;(Ate.focus.focusable.find(P.current)[0]||P.current).focus()},[ce,J]),(0,ir.useEffect)(()=>(B.current=!1,()=>{B.current=!0}),[]);let oe=t?.url?.trim()?.length>0,ue=()=>{Q(!1)},le=Ne=>{Ne?.kind==="taxonomy"&&Ne?.url&&(z.current=Ne.url);let So=Object.keys(Ne).reduce((Dt,wt)=>(U.includes(wt)||(Dt[wt]=Ne[wt]),Dt),{});r({...H,...So,title:H?.title||Ne?.title}),ue()},ke=()=>{se&&r({...t,...H,url:We}),ue()},Be=Ne=>{let{keyCode:So}=Ne;So===Lte.ENTER&&!xt&&(Ne.preventDefault(),ke())},Re=()=>{N(t)},Kt=Ne=>{Ne.preventDefault(),Ne.stopPropagation(),Re(),oe?ue():n?.(),i?.()},[kt,_o]=(0,ir.useState)(!1),Yt=()=>{let{id:Ne,kind:So,type:Dt,...wt}=H;N({...wt,id:void 0,kind:void 0,type:void 0,url:void 0}),_o(!0)};(0,ir.useEffect)(()=>{kt&&(L.current?.focus(),_o(!1))},[kt]);let We=m||H?.url||"",xt=!We?.trim()?.length,ro=n&&t&&!ce&&!J,$e=ce&&oe,ho=oe&&k,Nt=(ce||!t)&&!J,no=!se||xt,Ni=!!o?.length&&ce&&oe,dr=(0,ir.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&z.current?{...t,url:z.current}:t,[t]);return(0,yt.jsxs)("div",{tabIndex:-1,ref:P,className:"block-editor-link-control",children:[J&&(0,yt.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,yt.jsx)(Dr.Spinner,{})," ",(0,ma.__)("Creating"),"\u2026"]}),Nt&&(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsxs)("div",{className:F({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":ho,"has-actions":$e}),children:[ho&&(0,yt.jsx)(Dr.TextControl,{__nextHasNoMarginBottom:!0,ref:T,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,ma.__)("Text"),value:H?.title,onChange:W,onKeyDown:Be,__next40pxDefaultSize:!0}),(0,yt.jsx)(ute,{ref:L,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:We,withCreateSuggestion:f,onCreateSuggestion:ie,onChange:D,onSelect:le,showInitialSuggestions:c,allowDirectEntry:!s,showSuggestions:a,suggestionsQuery:p,withURLSuggestion:!h,createSuggestionButtonText:g,hideLabelFromVision:!ho,isEntity:X,suffix:(0,yt.jsx)(a1e,{isEntity:X,showActions:$e,isDisabled:no,onUnlink:Yt,onSubmit:ke,helpTextId:Z})}),X&&Z&&(0,yt.jsx)("p",{id:Z,className:"block-editor-link-control__help",children:(0,ma.sprintf)((0,ma.__)("Synced with the selected %s."),H?.type||"item")})]}),G&&(0,yt.jsx)(Dr.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:G})]}),t&&!ce&&!J&&(0,yt.jsx)(_te,{value:dr,onEditClick:()=>Q(!0),hasRichPreviews:b,hasUnlinkControl:ro,onRemove:()=>{n(),Q(!0)}},dr?.url),Ni&&(0,yt.jsx)("div",{className:"block-editor-link-control__tools",children:!xt&&(0,yt.jsx)(Uee,{settingsOpen:R,setSettingsOpen:I,children:(0,yt.jsx)(xte,{value:H,settings:o,onChange:$(U)})})}),$e&&(0,yt.jsxs)(Dr.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,yt.jsx)(Dr.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:Kt,children:(0,ma.__)("Cancel")}),(0,yt.jsx)(Dr.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:no?IV:ke,className:"block-editor-link-control__search-submit","aria-disabled":no,children:(0,ma.__)("Apply")})]}),!J&&y&&y()]})}function a1e({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,yt.jsx)(Dr.Button,{icon:Gn,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,ma.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,yt.jsx)(Dr.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,yt.jsx)(Dr.Button,{onClick:o?IV:n,label:(0,ma.__)("Submit"),icon:qa,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}pm.ViewerFill=pte;pm.DEFAULT_LINK_SETTINGS=wV;var AT=e=>((0,Nte.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,yt.jsx)(pm,{...e}));AT.ViewerFill=pm.ViewerFill;AT.DEFAULT_LINK_SETTINGS=pm.DEFAULT_LINK_SETTINGS;var Lg=pm;var Vte=l(M()),Fte=l(A()),zte=l(Oe());var Jy=1.5,PV=.01,OV=10,RV="";function Dte(e){return e!==void 0&&e!==RV}var AV=l(x()),l1e=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=Dte(t),s=(d,f)=>{if(i)return d;let m=PV*OV;switch(`${d}`){case`${m}`:return Jy+m;case"0":return f?d:Jy-m;case"":return Jy;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:RV,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,zte.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,AV.jsx)("div",{className:"block-editor-line-height-control",children:(0,AV.jsx)(Fte.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,Vte.__)("Line height"),placeholder:Jy,step:PV,spinFactor:OV,value:c,min:0,spinControls:"custom"})})},LT=l1e;var pa=l(M()),jte=l(Xo()),Vr=l(A()),NT=l(V()),Hte=l(nt());var Ute=l(q()),Gte=l(Ve()),Wte=l(qn()),$te=l(O());function MT(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 Go=l(x()),c1e=()=>{},u1e=0,d1e=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=c1e,name:m=(0,pa.__)("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,NT.useSelect)(H=>{let{getSettings:N}=H(_),D=N();return{mediaUpload:D.mediaUpload,allowedMimeTypes:D.allowedMimeTypes}},[]),I=`block-editor/media-replace-flow/error-notice/${++u1e}`,R=(0,$te.useMemo)(()=>MT(r,E,n),[r,E,n]),B=H=>{let N=(0,Gte.__unstableStripHTML)(H);if(i){i(N);return}setTimeout(()=>{p("error",N,{speak:!0,id:I,isDismissible:!0})},1e3)},P=(H,N)=>{d&&u&&u(),N(),s(H),(0,jte.speak)((0,pa.__)("The media file has been replaced")),h(I)},T=(H,N)=>{let D=H.target.files;if(!y)return N(),s(D);f(D),C({allowedTypes:r,filesList:D,onFileChange:([W])=>{P(W,N)},onError:B})},L=H=>{H.keyCode===Hte.DOWN&&(H.preventDefault(),H.target.click())},U=b&&(!r||r.length===0?!1:r.every(H=>H==="image"||H.startsWith("image/")));return(0,Go.jsx)(Vr.Dropdown,{popoverProps:v,className:w,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:H,onToggle:N})=>S?S({"aria-expanded":H,"aria-haspopup":"true",onClick:N,onKeyDown:L,children:m}):(0,Go.jsx)(Vr.ToolbarButton,{"aria-expanded":H,"aria-haspopup":"true",onClick:N,onKeyDown:L,children:m}),renderContent:({onClose:H})=>(0,Go.jsxs)(Go.Fragment,{children:[(0,Go.jsxs)(Vr.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,Go.jsxs)(ns,{children:[(0,Go.jsx)(vu,{gallery:U,addToGallery:k,multiple:b,value:b?o:t,onSelect:N=>P(N,H),allowedTypes:r,render:({open:N})=>(0,Go.jsx)(Vr.MenuItem,{icon:ap,onClick:N,children:(0,pa.__)("Open Media Library")})}),(0,Go.jsx)(Vr.FormFileUpload,{onChange:N=>{T(N,H)},accept:R,multiple:!!b,render:({openFileDialog:N})=>(0,Go.jsx)(Vr.MenuItem,{icon:rL,onClick:()=>{N()},children:(0,pa._x)("Upload","verb")})})]}),u&&(0,Go.jsx)(Vr.MenuItem,{icon:hA,onClick:u,isPressed:d,children:(0,pa.__)("Use featured image")}),e&&c&&(0,Go.jsx)(Vr.MenuItem,{onClick:()=>{c(),H()},children:(0,pa.__)("Reset")}),typeof g=="function"?g({onClose:H}):g]}),a&&(0,Go.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,Go.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,pa.__)("Current media URL:")}),(0,Go.jsx)(Lg,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:N})=>{a(N)},searchInputPlaceholder:(0,pa.__)("Paste or type URL")})]})]})})},Mg=(0,Ute.compose)([(0,NT.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(Wte.store);return{createNotice:t,removeNotice:o}}),(0,Vr.withFilters)("editor.MediaReplaceFlow")])(d1e);var fo=l(A()),uo=l(M()),od=l(O()),soe=l(V());var aoe=l(Oe());var MV=l(M()),VT=l(O()),Ng=l(A());var ioe=l(Oe());var qte=l(M()),Zte=l(A());var Kte=l(A()),DT=l($r()),LV=l(x());function Yte({url:e,urlLabel:t,className:o}){let r=F(o,"block-editor-url-popover__link-viewer-url");return e?(0,LV.jsx)(Kte.ExternalLink,{className:r,href:e,children:t||(0,DT.filterURLForDisplay)((0,DT.safeDecodeURI)(e))}):(0,LV.jsx)("span",{className:r})}var e_=l(x());function Xte({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,e_.jsxs)("div",{className:F("block-editor-url-popover__link-viewer",e),...i,children:[(0,e_.jsx)(Yte,{url:r,urlLabel:n,className:t}),o&&(0,e_.jsx)(Zte.Button,{icon:mk,label:(0,qte.__)("Edit"),onClick:o,size:"compact"})]})}var ooe=l(M()),roe=l(A());var Ql=l(M()),t_=l(O()),ks=l(nt()),_i=l(A()),Ju=l(q()),Qte=l(V()),Jte=l($r());var ha=l(x()),eoe=l(Fs());function toe(e){return typeof e=="function"}var f1e=class extends t_.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,t_.createRef)(),this.inputRef=e.inputRef||(0,t_.createRef)(),this.updateSuggestions=(0,Ju.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,Jte.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,Ql.sprintf)((0,Ql._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,Ql.__)("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 ks.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case ks.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case ks.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 ks.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case ks.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case ks.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,Ql.__)("Link selected.")));break}case ks.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,ha.jsxs)(ha.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,Ql.__)("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:F("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,Ql.__)("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,ha.jsxs)(_i.BaseControl,{__nextHasNoMarginBottom:!0,...b,children:[(0,ha.jsx)(_i.__experimentalInputControl,{...k,__next40pxDefaultSize:!0}),d&&(0,ha.jsx)(_i.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 toe(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,ha.jsx)(_i.Popover,{placement:"bottom",focusOnMount:!1,children:(0,ha.jsx)("div",{...u,className:F("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,eoe.createElement)(_i.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:F("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},Xu=(0,Ju.compose)(Ju.withSafeTimeout,_i.withSpokenMessages,Ju.withInstanceId,(0,Qte.withSelect)((e,t)=>{if(toe(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(_);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(f1e);var o_=l(x());function noe({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,o_.jsxs)("form",{className:F("block-editor-url-popover__link-editor",t),...n,children:[(0,o_.jsx)(Xu,{value:r,onChange:o,autocompleteRef:e}),(0,o_.jsx)(roe.Button,{icon:qa,label:(0,ooe.__)("Apply"),type:"submit",size:"compact"})]})}var ed=l(x()),{__experimentalPopoverLegacyPositionToPlacement:m1e}=j(Ng.privateApis),p1e="bottom",NV=(0,VT.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=m1e(i)),c=c||p1e;let[u,d]=(0,VT.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,ed.jsxs)(Ng.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,MV.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,ed.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,ed.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,ed.jsx)(Ng.Button,{className:"block-editor-url-popover__settings-toggle",icon:Fi,label:(0,MV.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,ed.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,ed.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});NV.LinkEditor=noe;NV.LinkViewer=Xte;var td=NV;var ze=l(x()),h1e=()=>{},g1e=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,ze.jsx)(td,{anchor:n,onClose:r,children:(0,ze.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,ze.jsx)(fo.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,uo.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,uo.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,ze.jsx)(fo.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,ze.jsx)(fo.Button,{size:"small",icon:qa,label:(0,uo.__)("Apply"),type:"submit"})})})})}),b1e=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,od.useState)(null),[i,s]=(0,od.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,ze.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,ze.jsx)(fo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,uo.__)("Insert from URL")}),i&&(0,ze.jsx)(g1e,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function k1e({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=h1e,onHTMLDrop:w,children:C,mediaLibraryButton:E,placeholder:I,style:R}){w&&(0,aoe.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:B,allowedMimeTypes:P}=(0,soe.useSelect)(Q=>{let{getSettings:ie}=Q(_),J=ie();return{mediaUpload:J.mediaUpload,allowedMimeTypes:J.allowedMimeTypes}},[]),[T,L]=(0,od.useState)("");(0,od.useEffect)(()=>{L(e?.src??"")},[e?.src]);let z=(0,od.useMemo)(()=>MT(t,P,c),[t,P,c]),U=()=>!t||t.length===0?!1:t.every(Q=>Q==="image"||Q.startsWith("image/")),H=Q=>{if(!f||typeof f=="function"&&!f(Q))return g(Q);S(Q);let ie;if(d)if(u){let J=[];ie=G=>{let oe=(e??[]).filter(ue=>ue.id?!J.some(({id:le})=>Number(le)===Number(ue.id)):!J.some(({urlSlug:le})=>ue.url.includes(le)));g(oe.concat(G)),J=G.map(ue=>{let le=ue.url.lastIndexOf("."),ke=ue.url.slice(0,le);return{id:ue.id,urlSlug:ke}})}}else ie=g;else ie=([J])=>g(J);B({allowedTypes:t,filesList:Q,onFileChange:ie,onError:h,multiple:d})};async function N(Q){let{blocks:ie}=y5(Q);if(!ie?.length)return;let J=await Promise.all(ie.map(G=>{let oe=G.name.split("/")[1];return G.attributes.id?(G.attributes.type=oe,G.attributes):new Promise((ue,le)=>{window.fetch(G.attributes.url).then(ke=>ke.blob()).then(ke=>B({filesList:[ke],additionalData:{title:G.attributes.title,alt_text:G.attributes.alt,caption:G.attributes.caption,type:oe},onFileChange:([Be])=>{Be.id&&ue(Be)},allowedTypes:t,onError:le})).catch(()=>ue(G.attributes.url))})})).catch(G=>h(G));J?.length&&g(d?J:J[0])}let D=Q=>{H(Q.target.files)},$=I??(Q=>{let{instructions:ie,title:J}=n;if(!B&&!k&&(ie=(0,uo.__)("To edit this block, you need permission to upload media.")),ie===void 0||J===void 0){let oe=t??[],[ue]=oe,le=oe.length===1,ke=le&&ue==="audio",Be=le&&ue==="image",Re=le&&ue==="video";ie===void 0&&B&&(ie=(0,uo.__)("Drag and drop an image or video, upload, or choose from your library."),ke?ie=(0,uo.__)("Drag and drop an audio file, upload, or choose from your library."):Be?ie=(0,uo.__)("Drag and drop an image, upload, or choose from your library."):Re&&(ie=(0,uo.__)("Drag and drop a video, upload, or choose from your library."))),J===void 0&&(J=(0,uo.__)("Media"),ke?J=(0,uo.__)("Audio"):Be?J=(0,uo.__)("Image"):Re&&(J=(0,uo.__)("Video")))}let G=F("block-editor-media-placeholder",o,{"is-appender":a});return(0,ze.jsxs)(fo.Placeholder,{icon:r,label:J,instructions:ie,className:G,notices:s,onDoubleClick:v,preview:i,style:R,children:[Q,C]})}),X=()=>m?null:(0,ze.jsx)(fo.DropZone,{onFilesDrop:H,onDrop:N,isEligible:Q=>{let ie="wp-block:core/",J=[];for(let G of Q.types)G.startsWith(ie)&&J.push(G.slice(ie.length));return J.every(G=>t.includes(G))&&(d?!0:J.length===1)}}),te=()=>b&&(0,ze.jsx)(fo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,uo.__)("Cancel"),variant:"link",onClick:b,children:(0,uo.__)("Cancel")}),Z=()=>k&&(0,ze.jsx)(b1e,{src:T,onChangeSrc:L,onSelectURL:k}),se=()=>y&&(0,ze.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,ze.jsx)(fo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:y,variant:"secondary",children:(0,uo.__)("Use featured image")})}),ce=()=>{let ie=E??(({open:G})=>(0,ze.jsx)(fo.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{G()},children:(0,uo.__)("Media Library")})),J=(0,ze.jsx)(vu,{addToGallery:u,gallery:d&&U(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:G})=>G):e.id,render:ie});if(B&&a)return(0,ze.jsxs)(ze.Fragment,{children:[X(),(0,ze.jsx)(fo.FormFileUpload,{onChange:D,accept:z,multiple:!!d,render:({openFileDialog:G})=>{let oe=(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(fo.Button,{__next40pxDefaultSize:!0,variant:"primary",className:F("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:G,children:(0,uo._x)("Upload","verb")}),J,Z(),se(),te()]});return $(oe)}})]});if(B){let G=(0,ze.jsxs)(ze.Fragment,{children:[X(),(0,ze.jsx)(fo.FormFileUpload,{render:({openFileDialog:oe})=>(0,ze.jsx)(fo.Button,{__next40pxDefaultSize:!0,onClick:oe,variant:"primary",className:F("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,uo._x)("Upload","verb")}),onChange:D,accept:z,multiple:!!d}),J,Z(),se(),te()]});return $(G)}return $(J)};return p?(0,ze.jsx)(ns,{children:X()}):(0,ze.jsx)(ns,{fallback:$(Z()),children:ce()})}var loe=(0,fo.withFilters)("editor.MediaPlaceholder")(k1e);var coe=l(x()),v1e=({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,coe.jsx)(cT,{settings:o,gradients:[],disableCustomGradients:!0,...t})},uoe=v1e;var lre=l(lM());var cre=l(O());var ire=l(O());var ere=l(zd()),Fr=l(O()),nd=l(V()),tI=l(q()),oI=l(Mo()),tre=l(A()),ore=l(K()),rre=l(Oe()),Wg=l(M());var doe=l(M()),FT=l(A());var DV=l(M()),hm=l(A());var Jl=l(x()),y1e={placement:"bottom-start"},_1e=()=>(0,Jl.jsxs)(Jl.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,Jl.jsx)(hm.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,Jl.jsx)(hm.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,Jl.jsx)(hm.ToolbarItem,{children:r=>(0,Jl.jsx)(hm.DropdownMenu,{icon:Fi,label:(0,DV.__)("More"),toggleProps:{...r,className:F(r.className,{"is-pressed":o}),description:(0,DV.__)("Displays more block tools")},controls:Ms(e.map(([{props:n}])=>n),"title"),popoverProps:y1e})})}})]}),VV=_1e;var rd=l(x());function S1e({popoverAnchor:e}){return(0,rd.jsx)(FT.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,rd.jsx)(Hh,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,doe.__)("Format tools"),children:(0,rd.jsx)(FT.ToolbarGroup,{children:(0,rd.jsx)(VV,{})})})})}var x1e=({inline:e,editableContentElement:t})=>e?(0,rd.jsx)(S1e,{popoverAnchor:t}):(0,rd.jsx)(ut,{group:"inline",children:(0,rd.jsx)(VV,{})}),foe=x1e;var zT=l(O()),moe=l(V());function poe({html:e,value:t}){let o=(0,zT.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,moe.useDispatch)(_);(0,zT.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 goe=l(O()),r_=l(V()),boe=l(Mo());function w1e(e){return e(boe.store).getFormatTypes()}var C1e=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function B1e(e,t){return typeof e!="object"?{[t]:e}:Object.fromEntries(Object.entries(e).map(([o,r])=>[`${t}.${o}`,r]))}function hoe(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 jT({clientId:e,identifier:t,allowedFormats:o,withoutInteractiveFormatting:r,disableNoneEssentialFormatting:n=!1}){let i=(0,r_.useSelect)(w1e,[]),s=(0,goe.useMemo)(()=>i.filter(({name:p,interactive:h,tagName:g,[kS]:b})=>!(o&&!o.includes(p)||n&&!b||r&&(h||C1e.has(g)))),[i,o,n,r]),a=(0,r_.useSelect)(p=>s.reduce((h,g)=>g.__experimentalGetPropsForEditableTreePreparation?{...h,...B1e(g.__experimentalGetPropsForEditableTreePreparation(p,{richTextIdentifier:t,blockClientId:e}),g.name)}:h,{}),[s,e,t]),c=(0,r_.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(hoe(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=hoe(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 Vg=l(O()),Noe=l(q());var n_=l(Mo()),koe=l(ot());var E1e=["`",'"',"'","\u201C\u201D","\u2018\u2019"],voe=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,n_.isCollapsed)(s))return;let u=(0,koe.applyFilters)("blockEditor.wrapSelectionSettings",E1e).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,n_.insert)(s,d,m,m);h=(0,n_.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 HT=l(Mo()),UT=l(K());var yoe=l(Mo());function _oe(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,yoe.insert)(e,o)}function Soe(e){let t=e.length;for(;t--;){let o=Dk(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(il,""),[e[t].clientId,o,0,0];let r=Soe(e[t].innerBlocks);if(r)return r}return[]}var xoe=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,UT.getBlockTransforms)("from").filter(({type:k})=>k==="prefix"),h=(0,UT.findTransform)(p,({prefix:k})=>m===k);if(!h)return;let g=(0,HT.toHTMLString)({value:(0,HT.insert)(c,il,0,u)}),b=h.transform(g);return s(...Soe([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),_oe(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 woe=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 GT=l(nt()),Coe=()=>e=>{function t(o){(GT.isKeyboardEvent.primary(o,"z")||GT.isKeyboardEvent.primary(o,"y")||GT.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var Boe=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 Eoe=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 WT=l(nt());var Toe=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==WT.BACKSPACE&&n!==WT.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 Poe=l(K()),ga=l(Mo()),Ooe=l($r());var T1e=l(O()),I1e=l(K()),P1e=l(x());function Ioe(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function $T(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Dg({allowedFormats:e,disableFormats:t}){return t?Dg.EMPTY_ARRAY:e}Dg.EMPTY_ARRAY=[];var Roe=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}=Zp(n);if(n.preventDefault(),window.console.log(`Received HTML: |
| 171 |
|
| 172 |
`,g),window.console.log(`Received plain text: |
| 173 |
|
| 174 |
`,h),i){s((0,ga.insert)(a,h));return}let b=n.clipboardData.getData("rich-text")==="true";function k(w){let C=c.reduce((E,{__unstablePasteRule:I})=>(I&&E===a&&(E=I(a,{html:g,plainText:h})),E),a);if(C!==a)s(C);else{let E=(0,ga.create)({html:w});Ioe(E,a.activeFormats),s((0,ga.insert)(a,E))}}if(b){k(g);return}if(p){s((0,ga.insert)(a,(0,ga.create)({text:h})));return}let y="INLINE",v=h.trim();f&&(0,ga.isEmpty)(a)&&(0,Ooe.isURL)(v)&&/^https?:/.test(v)&&(y="BLOCKS");let S=(0,Poe.pasteHandler)({HTML:g,plainText:h,mode:y,tagName:u,preserveWhiteSpace:m});typeof S=="string"?k(S):S.length>0&&d&&(0,ga.isEmpty)(a)&&d(S,S.length-1,-1)}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var i_=l(nt()),KT=l(Mo()),Aoe=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===i_.DELETE||n===i_.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===i_.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,KT.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,KT.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var FV=l(nt()),s_=l(Mo()),Loe=e=>t=>{function o(i){if(i.keyCode!==FV.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!==FV.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,s_.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,s_.remove)(g)),d()}):c||a((0,s_.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 Moe=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 O1e=[voe,xoe,woe,Coe,Boe,Eoe,Toe,Roe,Aoe,Loe,Moe];function YT(e){let t=(0,Vg.useRef)(e);(0,Vg.useInsertionEffect)(()=>{t.current=e});let o=(0,Vg.useMemo)(()=>O1e.map(r=>r(t)),[t]);return(0,Noe.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var qT=l(Mo()),ZT=l(O());var Doe=l(x()),Voe=l(Fs()),R1e={},zV=Symbol("usesContext");function A1e({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[zV]:c}=n,u=(0,ZT.useContext)(Un),d=(0,ZT.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):R1e,[c,u]);if(!a)return null;let f=(0,qT.getActiveFormat)(o,s),m=f!==void 0,p=(0,qT.getActiveObject)(o),h=p!==void 0&&p.type===s;return(0,Doe.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 XT({formatTypes:e,...t}){return e.map(o=>(0,Voe.createElement)(A1e,{settings:o,...t,key:o.name}))}var Foe=l(O()),zoe=l(K()),joe=l(Oe());var jV=l(x());function HV(e,t){if(Fg.isEmpty(e)){let o=$T(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,joe.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/"}),zoe.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function a_({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,jV.jsx)(Foe.RawHTML,{children:HV(e,o)}),t?(0,jV.jsx)(t,{...n,children:e}):e}var $oe=l(O()),GV=l(K()),Koe=l(Mo()),Yoe=l(Oe());var Hoe=l(O()),Uoe=l(Oe()),QT=l(V()),Goe=l(nt()),zg=l(Mo());var UV=l(x());function L1e({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,Uoe.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,QT.useSelect)(_),{selectionChange:f}=(0,QT.useDispatch)(_),m=$T(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,UV.jsx)(o,{ref:a,children:h.map((b,k)=>(0,UV.jsx)(JT,{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!==Goe.ENTER)return;y.preventDefault();let{offset:v}=u(),{offset:S}=d();if(typeof v!="number"||typeof S!="number")return;let w=(0,zg.create)({html:b});w.start=v,w.end=S;let C=(0,zg.split)(w).map(I=>(0,zg.toHTMLString)({value:I})),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 Woe=(0,Hoe.forwardRef)(L1e);var qoe=l(x());function Zoe(e){return(0,$oe.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,Yoe.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=GV.children.toHTML(t.value),n=s=>t.onChange(GV.children.fromDOM((0,Koe.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?Woe:e;return(0,qoe.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var Xoe=l(nt()),jg=l(O());function WV({character:e,type:t,onUse:o}){let r=(0,jg.useContext)(Hg),n=(0,jg.useRef)();return n.current=o,(0,jg.useEffect)(()=>{function i(s){Xoe.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var eI=l(A()),Qoe=l(nt()),$V=l(x());function KV({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=Qoe.displayShortcut[t](o)),(0,$V.jsx)(eI.Fill,{name:i,children:(0,$V.jsx)(eI.ToolbarButton,{...r,shortcut:n})})}var Ug=l(O());function YV({inputType:e,onInput:t}){let o=(0,Ug.useContext)(Gg),r=(0,Ug.useRef)();return r.current=t,(0,Ug.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var Vn=l(x()),Hg=(0,Fr.createContext)();Hg.displayName="keyboardShortcutContext";var Gg=(0,Fr.createContext)();Gg.displayName="inputEventContext";var Joe=Symbol("instanceId");function nre(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 JT({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:I,readOnly:R,...B},P){B=nre(B),g&&(0,rre.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let T=(0,tI.useInstanceId)(JT),L=(0,Fr.useRef)(),z=Ae(),{clientId:U,isSelected:H}=z,N=z[qm],D=(0,Fr.useContext)(Un),{bindableAttributes:W}=(0,Fr.useContext)(hn),$=(0,nd.useRegistry)(),X=re=>{if(!H)return{isSelected:!1};let{getSelectionStart:Pe,getSelectionEnd:He,getBlockEditingMode:io}=re(_),Ko=Pe(),zn=He(),Vi;return n===void 0?Vi=Ko.clientId===U&&zn.clientId===U&&(y?Ko.attributeKey===y:Ko[Joe]===T):n&&(Vi=Ko.clientId===U),{selectionStart:Vi?Ko.offset:void 0,selectionEnd:Vi?zn.offset:void 0,isSelected:Vi,isContentOnly:io(U)==="contentOnly"}},{selectionStart:te,selectionEnd:Z,isSelected:se,isContentOnly:ce}=(0,nd.useSelect)(X,[U,y,T,n,H]),{disableBoundBlock:Q,bindingsPlaceholder:ie,bindingsLabel:J}=(0,nd.useSelect)(re=>{if(!N?.[y]||!W)return{};let Pe=N[y],He=(0,ore.getBlockBindingsSource)(Pe.source),io={};if(He?.usesContext?.length)for(let kc of He.usesContext)io[kc]=D[kc];let Ko=!He?.canUserEditValue?.({select:re,context:io,args:Pe.args});if(o.length>0)return{disableBoundBlock:Ko,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:zn}=re(_),Vi=zn(U),Nd=null;He?.getFieldsList&&(Nd=He.getFieldsList({select:re,context:io})?.find($b=>(0,ere.default)($b.args,Pe?.args))?.label);let Km=Nd??He?.label,Wb=Ko?Km:(0,Wg.sprintf)((0,Wg.__)("Add %s"),Km),Dd=Ko?Pe?.args?.key||He?.label:(0,Wg.sprintf)((0,Wg.__)("Empty %s; start writing to edit its value"),Pe?.args?.key||He?.label);return{disableBoundBlock:Ko,bindingsPlaceholder:Vi?.placeholder||Wb,bindingsLabel:Dd}},[N,y,W,o,U,D]),G=!!D?.["pattern/overrides"],oe=N?.__default?.source==="core/pattern-overrides",le=R||Q||G&&!oe,{getSelectionStart:ke,getSelectionEnd:Be,getBlockRootClientId:Re}=(0,nd.useSelect)(_),{selectionChange:Kt}=(0,nd.useDispatch)(_),kt=Dg({allowedFormats:f,disableFormats:C}),_o=!kt||kt.length>0,Yt=(0,Fr.useCallback)((re,Pe)=>{let He={},io=re===void 0&&Pe===void 0,Ko={clientId:U,[y?"attributeKey":Joe]:y||T};if(typeof re=="number"||io){if(Pe===void 0&&Re(U)!==Re(Be().clientId))return;He.start={...Ko,offset:re}}if(typeof Pe=="number"||io){if(re===void 0&&Re(U)!==Re(ke().clientId))return;He.end={...Ko,offset:Pe}}Kt(He)},[U,Re,Be,ke,y,T,Kt]),{formatTypes:We,prepareHandlers:xt,valueHandlers:ro,changeHandlers:$e,dependencies:ho}=jT({clientId:U,identifier:y,allowedFormats:kt,withoutInteractiveFormatting:m,disableNoneEssentialFormatting:ce});function Nt(re){return ro.reduce((Pe,He)=>He(Pe,re.text),re.formats)}function no(re){return We.forEach(Pe=>{Pe.__experimentalCreatePrepareEditableTree&&(re=(0,oI.removeFormat)(re,Pe.name,0,re.text.length))}),re.formats}function Ni(re){return xt.reduce((Pe,He)=>He(Pe,re.text),re.formats)}let{value:dr,getValue:Ne,onChange:So,ref:Dt}=(0,oI.__unstableUseRichText)({value:o,onChange(re,{__unstableFormats:Pe,__unstableText:He}){r(re),Object.values($e).forEach(io=>{io(Pe,He)})},selectionStart:te,selectionEnd:Z,onSelectionChange:Yt,placeholder:ie||d,__unstableIsSelected:se,__unstableDisableFormats:C,preserveWhiteSpace:v,__unstableDependencies:[...ho,t],__unstableAfterParse:Nt,__unstableBeforeSerialize:no,__unstableAddInvisibleFormats:Ni}),wt=q6({onReplace:u,completers:c,record:dr,onChange:So});poe({html:o,value:dr});let Ps=(0,Fr.useRef)(new Set),Di=(0,Fr.useRef)(new Set);function ye(){L.current?.focus()}let Ct=t;return(0,Vn.jsxs)(Vn.Fragment,{children:[se&&(0,Vn.jsx)(Hg.Provider,{value:Ps,children:(0,Vn.jsx)(Gg.Provider,{value:Di,children:(0,Vn.jsxs)(tre.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:dr,onChange:So,onFocus:ye}),(0,Vn.jsx)(XT,{value:dr,onChange:So,onFocus:ye,formatTypes:We,forwardedRef:L})]})})}),se&&_o&&(0,Vn.jsx)(foe,{inline:s,editableContentElement:L.current}),(0,Vn.jsx)(Ct,{role:"textbox","aria-multiline":!E,"aria-readonly":le,...B,draggable:void 0,"aria-label":J||B["aria-label"]||d,...wt,ref:(0,tI.useMergeRefs)([Dt,P,wt.ref,B.ref,YT({registry:$,getValue:Ne,onChange:So,__unstableAllowPrefixTransformations:I,formatTypes:We,onReplace:u,selectionChange:Kt,isSelected:se,disableFormats:C,value:dr,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:w,pastePlainText:S,onMerge:h,onRemove:p,removeEditorOnlyFormats:no,disableLineBreaks:E,onSplitAtEnd:b,onSplitAtDoubleLineEnd:k,keyboardShortcuts:Ps,inputEvents:Di}),L]),contentEditable:!le,suppressContentEditableWarning:!0,className:F("block-editor-rich-text__editable",B.className,"rich-text"),tabIndex:B.tabIndex===0&&!le?null:B.tabIndex,"data-wp-block-attribute-key":y})]})}var l_=Zoe((0,Fr.forwardRef)(JT));l_.Content=a_;l_.isEmpty=e=>!e||e.length===0;var qV=(0,Fr.forwardRef)((e,t)=>{if(Ae()[nS]){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:I,__unstableEmbedURLOnPaste:R,__unstableDisableFormats:B,disableLineBreaks:P,__unstableAllowPrefixTransformations:T,readOnly:L,...z}=nre(e);return(0,Vn.jsx)(i,{ref:t,...z,dangerouslySetInnerHTML:{__html:HV(s,u)}})}return(0,Vn.jsx)(l_,{ref:t,...e,readOnly:!1})});qV.Content=a_;qV.isEmpty=e=>!e||e.length===0;var Fg=qV;var ZV=l(x()),sre=(0,ire.forwardRef)((e,t)=>(0,ZV.jsx)(Fg,{ref:t,...e,__unstableDisableFormats:!0}));sre.Content=({value:e="",tagName:t="div",...o})=>(0,ZV.jsx)(t,{...o,children:e});var are=sre;var XV=l(x()),M1e=(0,cre.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,XV.jsx)(are,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,XV.jsx)(lre.default,{ref:o,className:F("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),ure=M1e;var ba=l(M()),mre=l(O()),pre=l(A());var dre=l(q()),fre=l(A()),rI=l(M()),gm=l(x());function nI({property:e,viewport:t,desc:o}){let r=(0,dre.useInstanceId)(nI),n=o||(0,rI.sprintf)((0,rI._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,gm.jsxs)(gm.Fragment,{children:[(0,gm.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,gm.jsx)(fre.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`,children:n})]})}var ka=l(x());function N1e(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,ba._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,ba.__)("Small screens")},{id:"medium",label:(0,ba.__)("Medium screens")},{id:"large",label:(0,ba.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,ba.sprintf)((0,ba.__)("Use the same %s on all screen sizes."),o),f=(0,ba.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,ka.jsx)(nI,{property:o,viewport:c}),c),p=()=>u.map(h=>(0,ka.jsx)(mre.Fragment,{children:i((0,ka.jsx)(nI,{property:o,viewport:h}),h)},h.id));return(0,ka.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,ka.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,ka.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,ka.jsx)(pre.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,ka.jsxs)("div",{className:F("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):p())]})]})]})}var hre=N1e;var iI=l(A());var gre=l(x());function bre({units:e,...t}){let[o]=fe("spacing.units"),r=(0,iI.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,gre.jsx)(iI.__experimentalUnitControl,{units:r,...t})}var c_=l(M()),kre=l(O()),$g=l(A());var va=l(x());function D1e({url:e,onChange:t}){let[o,r]=(0,kre.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,va.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,va.jsx)($g.Button,{size:"compact",icon:Kr,label:e?(0,c_.__)("Edit link"):(0,c_.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,va.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,va.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,va.jsx)($g.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:Ud,label:(0,c_.__)("Close"),onClick:r}),(0,va.jsx)(Xu,{value:e||"",onChange:t,suffix:(0,va.jsx)($g.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,va.jsx)($g.Button,{size:"small",icon:qa,label:(0,c_.__)("Submit"),type:"submit"})})})]})})]})}var vre=D1e;var un=l(M()),Si=l(O()),wre=l(Ve()),Bo=l(A());var Cre=l($r());var ht=l(x()),QV="none",yre="custom",_re="media",Sre="attachment",xre=["noreferrer","noopener"],Bre=({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,Si.useState)(!1),[g,b]=(0,Si.useState)(null),k=()=>{h(!0)},[y,v]=(0,Si.useState)(!1),[S,w]=(0,Si.useState)(null),C=(0,Si.useRef)(null),E=(0,Si.useRef)();(0,Si.useEffect)(()=>{if(!E.current)return;(wre.focus.focusable.find(E.current)[0]||E.current).focus()},[y,o,d]);let I=()=>{(e===_re||e===Sre)&&w(""),v(!0)},R=()=>{v(!1)},B=()=>{w(null),R(),h(!1)},P=Q=>{let ie=Q?"_blank":void 0,J;if(ie){let G=(c??"").split(" ");xre.forEach(oe=>{G.includes(oe)||G.push(oe)}),J=G.join(" ")}else{let G=(c??"").split(" ").filter(oe=>xre.includes(oe)===!1);J=G.length?G.join(" "):void 0}return{linkTarget:ie,rel:J}},T=()=>Q=>{let ie=C.current;ie&&ie.contains(Q.target)||(h(!1),w(null),R())},L=()=>Q=>{if(S){let ie=U().find(J=>J.url===S)?.linkDestination||yre;t({href:(0,Cre.prependHTTP)(S),linkDestination:ie,lightbox:{enabled:!1}})}R(),w(null),Q.preventDefault()},z=()=>{t({linkDestination:QV,href:""})},U=()=>{let Q=[{linkDestination:_re,title:(0,un.__)("Link to image file"),url:r==="image"?n:void 0,icon:ak}];return r==="image"&&i&&Q.push({linkDestination:Sre,title:(0,un.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:Za}),Q},H=Q=>{let ie=U(),J;Q?J=(ie.find(G=>G.url===Q)||{linkDestination:yre}).linkDestination:J=QV,t({linkDestination:J,href:Q})},N=Q=>{let ie=P(Q);t(ie)},D=Q=>{t({rel:Q})},W=Q=>{t({linkClass:Q})},$=(0,ht.jsxs)(Bo.__experimentalVStack,{spacing:"3",children:[(0,ht.jsx)(Bo.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,un.__)("Open in new tab"),onChange:N,checked:s==="_blank"}),(0,ht.jsx)(Bo.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,un.__)("Link relation"),value:c??"",onChange:D,help:(0,Si.createInterpolateElement)((0,un.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,ht.jsx)(Bo.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,ht.jsx)(Bo.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,un.__)("Link CSS class"),value:a||"",onChange:W})]}),X=S!==null?S:o,te=!d||d&&!u,Z=!X&&te,se=(U().find(Q=>Q.linkDestination===e)||{}).title,ce=()=>{if(d&&u&&!o&&!y)return(0,ht.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,ht.jsx)(Ie,{icon:np}),(0,ht.jsxs)("div",{className:"text",children:[(0,ht.jsx)("p",{children:(0,un.__)("Enlarge on click")}),(0,ht.jsx)("p",{className:"description",children:(0,un.__)("Scales the image with a lightbox effect")})]}),(0,ht.jsx)(Bo.Button,{icon:Gn,label:(0,un.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||y)return(0,ht.jsx)(td.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:X,onChangeInputValue:w,onSubmit:L(),autocompleteRef:C});if(o&&!y)return(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)(td.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:I,urlLabel:se}),(0,ht.jsx)(Bo.Button,{icon:Gn,label:(0,un.__)("Remove link"),onClick:()=>{z(),m?.()},size:"compact"})]})};return(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)(Bo.ToolbarButton,{icon:Kr,className:"components-toolbar__control",label:(0,un.__)("Link"),"aria-expanded":p,onClick:k,ref:b,isActive:!!o||d&&u}),p&&(0,ht.jsx)(td,{ref:E,anchor:g,onFocusOutside:T(),onClose:B,renderSettings:te?()=>$:null,additionalControls:Z&&(0,ht.jsxs)(Bo.NavigableMenu,{children:[U().map(Q=>(0,ht.jsx)(Bo.MenuItem,{icon:Q.icon,iconPosition:"left",onClick:()=>{w(null),H(Q.url),R()},children:Q.title},Q.linkDestination)),u&&(0,ht.jsx)(Bo.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:np,info:(0,un.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{w(null),t({linkDestination:QV,href:""}),f?.(!0),R()},children:(0,un.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:ce()})]})};var Yg=l(A()),Fre=l(O()),aI=l(M());var Ere=l(O()),e3=l(M());var JV=[],V1e=new Intl.Collator("und",{numeric:!0}).compare;function sI(){let[e,t,o,r]=fe("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??JV,i=t??JV,s=o&&r!==!1?o:JV;return(0,Ere.useMemo)(()=>{let a=[{name:(0,e3.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>V1e(c.slug,u.slug)),a.length>Wx?[{name:(0,e3.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var sr=l(A()),Ire=l(V()),u_=l(O()),Pre=l(q()),vs=l(M());var xi=l(x()),Tre={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 Kg({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:c,type:u,value:d}){d=Wc(d,c);let f=c,m=c.length<=Wx,p=(0,Ire.useSelect)($=>$(_).getSettings()?.disableCustomSpacingSizes),[h,g]=(0,u_.useState)(!p&&d!==void 0&&!al(d)),[b,k]=(0,u_.useState)(o),y=(0,Pre.usePrevious)(d);d&&y!==d&&!al(d)&&h!==!0&&g(!0);let[v]=fe("spacing.units"),S=(0,sr.__experimentalUseCustomUnits)({availableUnits:v||["px","em","rem"]}),w=null;!m&&!h&&d!==void 0&&(!al(d)||al(d)&&t)?(f=[...c,{name:t?(0,vs.__)("Mixed"):(0,vs.sprintf)((0,vs.__)("Custom (%s)"),d),slug:"custom",size:d}],w=f.length-1):t||(w=h?Kx(d,c):J6(d,c));let E=(0,u_.useMemo)(()=>(0,sr.__experimentalParseQuantityAndUnitFromRawValue)(w),[w])[1]||S[0]?.value,I=()=>{d===void 0&&r("0")},R=$=>d===void 0?void 0:c[$]?.name,B=parseFloat(w,10),P=$=>!isNaN(parseFloat($))?$:void 0,T=($,X)=>{let te=parseInt($,10);if(X==="selectList"){if(te===0)return;if(te===1)return"0"}else if(te===0)return"0";return`var:preset|spacing|${c[$]?.slug}`},L=$=>{r([$,E].join(""))},z=t?(0,vs.__)("Mixed"):null,U=f.map(($,X)=>({key:X,name:$.name})),H=c.slice(1,c.length-1).map(($,X)=>({value:X+1,label:void 0})),N=Gc.includes(a)&&s?Ds[a]:"",D=s?u?.toLowerCase():u,W=(0,vs.sprintf)((0,vs._x)("%1$s %2$s","spacing"),N,D).trim();return(0,xi.jsxs)(sr.__experimentalHStack,{className:"spacing-sizes-control__wrapper",children:[e&&(0,xi.jsx)(sr.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),h&&(0,xi.jsxs)(xi.Fragment,{children:[(0,xi.jsx)(sr.__experimentalUnitControl,{onMouseOver:i,onMouseOut:n,onFocus:i,onBlur:n,onChange:$=>r(P($)),value:w,units:S,min:b,placeholder:z,disableUnits:t,label:W,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large",onDragStart:()=>{d?.charAt(0)==="-"&&k(0)},onDrag:()=>{d?.charAt(0)==="-"&&k(0)},onDragEnd:()=>{k(o)}}),(0,xi.jsx)(sr.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:n,onFocus:i,onBlur:n,value:B,min:0,max:Tre[E]?.max??10,step:Tre[E]?.steps??.1,withInputField:!1,onChange:L,className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0,label:W,hideLabelFromVision:!0})]}),m&&!h&&(0,xi.jsx)(sr.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:n,className:"spacing-sizes-control__range-control",value:w,onChange:$=>r(T($)),onMouseDown:$=>{$?.nativeEvent?.offsetX<35&&I()},withInputField:!1,"aria-valuenow":w,"aria-valuetext":c[w]?.name,renderTooltipContent:R,min:0,max:c.length-1,marks:H,label:W,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:i,onBlur:n}),!m&&!h&&(0,xi.jsx)(sr.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:U.find($=>$.key===w)||"",onChange:$=>{r(T($.selectedItem.key,"selectList"))},options:U,label:W,hideLabelFromVision:!0,size:"__unstable-large",onMouseOver:i,onMouseOut:n,onFocus:i,onBlur:n}),!p&&(0,xi.jsx)(sr.Button,{label:h?(0,vs.__)("Use size preset"):(0,vs.__)("Set custom size"),icon:gk,onClick:()=>{g(!h)},isPressed:h,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24})]})}var d_=l(x()),Ore=["vertical","horizontal"];function Rre({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]=Wc(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?Ore.filter(d=>UL(n,d)):Ore;return(0,d_.jsx)(d_.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,d_.jsx)(Kg,{icon:$x[d],label:Ds[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 f_=l(x());function Are({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?Gc.filter(d=>n.includes(d)):Gc,u=d=>f=>{let m={...Object.keys(a).reduce((p,h)=>(p[h]=Wc(a[h],i),p),{})};m[d]=f,t(m)};return(0,f_.jsx)(f_.Fragment,{children:c.map(d=>(0,f_.jsx)(Kg,{icon:$x[d],label:Ds[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 Lre=l(x());function Mre({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]=Wc(c[h],s),p),{})};m[d]=f,t(m)};return(0,Lre.jsx)(Kg,{label:Ds[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var Nre=l(A());var t3=l(M()),Dre=l(x());function Vre({isLinked:e,...t}){let o=e?(0,t3.__)("Unlink sides"):(0,t3.__)("Link sides");return(0,Dre.jsx)(Nre.Button,{...t,size:"small",icon:e?Kr:Gn,iconSize:24,label:o})}var ya=l(x());function qg({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Gc,useSelect:c,values:u}){let d=sI(),f=u||X6,m=a?.length===1,p=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[h,g]=(0,Fre.useState)(ej(f,a)),b=()=>{g(h===sl.axial?sl.custom:sl.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===sl.axial?(0,ya.jsx)(Rre,{...y}):h===sl.custom?(0,ya.jsx)(Are,{...y}):(0,ya.jsx)(Mre,{side:h,...y,showSideInLabel:s}),S=Gc.includes(h)&&s?Ds[h]:"",w=(0,aI.sprintf)((0,aI._x)("%1$s %2$s","spacing"),t,S).trim();return(0,ya.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,ya.jsxs)(Yg.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,ya.jsx)(Yg.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:w}),!m&&!p&&(0,ya.jsx)(Vre,{label:t,onClick:b,isLinked:h===sl.axial})]}),(0,ya.jsx)(Yg.__experimentalVStack,{spacing:.5,children:v()})]})}var zre=l(Oe());function jre(){return(0,zre.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var lI=l(O());function Hre(e){let[t,o]=(0,lI.useState)(window.innerWidth);(0,lI.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 Dm=l(M()),Cb=l(K()),QP=l(A()),Z3=l(V());var Zg=l(A()),cI=l(M()),Ure=l(V()),uI=l(K());var bm=l(x());function F1e({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,bm.jsx)(Zg.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,bm.jsx)(Zg.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 z1e({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,bm.jsx)(Zg.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,bm.jsx)(Zg.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 Gre({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=VB(e),{block:s,onNavigateToEntityRecord:a}=(0,Ure.useSelect)(f=>{let{getBlock:m,getSettings:p}=f(_);return{block:m(e),onNavigateToEntityRecord:p().onNavigateToEntityRecord}},[e]);if(!t&&!o)return null;let c=(0,uI.isReusableBlock)(s),u=(0,uI.isTemplatePart)(s);return(c||u)&&a?(0,bm.jsx)(F1e,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:c,isTemplatePartBlock:u}):(0,bm.jsx)(z1e,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var Wre=l(V()),$re=l(M()),Kre=l(A()),Yre=l(O());var qre=l(x());function dI(){let e=(0,Wre.useSelect)(r=>r(_).getBlockSelectionStart(),[]),t=(0,Yre.useRef)();return ff(e,t),e?(0,qre.jsx)(Kre.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,$re.__)("Skip to the selected block")}):null}var fI=l(M()),Zre=l(V());var Xre=l(A());var m_=l(x());function o3(){let e=(0,Zre.useSelect)(t=>t(_).getSelectedBlockCount(),[]);return(0,m_.jsxs)(Xre.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,m_.jsx)(Te,{icon:Kd,showColors:!0}),(0,m_.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,fI.sprintf)((0,fI._n)("%d Block","%d Blocks",e),e)})]})}var wb=l(A()),XP=l(O()),lle=l(gp()),cle=l(V());var p_=l(M()),mI={name:"settings",title:(0,p_.__)("Settings"),value:"settings",icon:IO},pI={name:"styles",title:(0,p_.__)("Styles"),value:"styles",icon:HA},hI={name:"content",title:(0,p_.__)("Content"),value:"content",icon:Za},h_={name:"list",title:(0,p_.__)("List View"),value:"list-view",icon:lk};var g_=l(A()),Qre=l(M());var b_=l(x()),j1e=()=>{let e=(0,g_.__experimentalUseSlotFills)(Eu.slotName),t=(0,g_.__experimentalUseSlotFills)(dy.name),o=!!(e&&e.length),r=!!(t&&t.length);return!o&&!r?null:(0,b_.jsxs)(g_.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,Qre.__)("Advanced"),initialOpen:!1,children:[(0,b_.jsx)(pe.Slot,{group:"advanced"}),(0,b_.jsx)(dy.Slot,{})]})},k_=j1e;var Xg=l(A()),gI=l(V()),r3=l(M());var v_=l(x()),H1e=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,gI.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,gI.useDispatch)(_),n=zo();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:xe({...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,v_.jsx)(Xg.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,r3.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,v_.jsx)(Xg.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,r3.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,v_.jsx)(pe.Slot,{group:"position"})})})},U1e=()=>{let e=(0,Xg.__experimentalUseSlotFills)(Bu.position.name);return!(e&&e.length)?null:(0,v_.jsx)(H1e,{})},bI=U1e;var _a=l(x()),G1e=({showAdvancedControls:e=!1})=>(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsx)(pe.Slot,{}),(0,_a.jsx)(bI,{}),(0,_a.jsx)(pe.Slot,{group:"bindings"}),e&&(0,_a.jsx)("div",{children:(0,_a.jsx)(k_,{})})]}),Jre=G1e;var kie=l(A()),Bm=l(M()),oP=l(V());var E_=l(K()),p3=l(A()),ab=l(O()),tie=l(ot()),oie=l(V());var m3={};Os(m3,{AdvancedPanel:()=>Kne,BackgroundPanel:()=>GI,BorderPanel:()=>RI,ColorPanel:()=>NI,DimensionsPanel:()=>TI,FiltersPanel:()=>VI,ImageSettingsPanel:()=>Wne,TypographyPanel:()=>xI,useHasBackgroundPanel:()=>B_,useHasBorderPanel:()=>OI,useHasBorderPanelControls:()=>__,useHasColorPanel:()=>MI,useHasDimensionsPanel:()=>EI,useHasFiltersPanel:()=>Hne,useHasImageSettingsPanel:()=>Gne,useHasTypographyPanel:()=>SI,useSettingsForBlockElement:()=>vI});var kI=l(O()),ene=l(V()),n3=l(K()),km=l(M());function vI(e,t,o){let{supportedStyles:r,supports:n}=(0,ene.useSelect)(i=>({supportedStyles:j(i(n3.store)).getSupportedStyles(t,o),supports:i(n3.store).getBlockType(t)?.supports}),[t,o]);return(0,kI.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","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,o&&(i.typography.textAlign=!1),i},[e,r,n,o])}function Sa(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,kI.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,km._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,km._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,km._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function y_(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,kI.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,km._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,km._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,km._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var Eo=l(A()),hr=l(M()),id=l(O());var Qg=l(M());var tne=l(O()),yI=l(A()),i3=l(x()),W1e=[{label:(0,Qg.__)("Align text left"),value:"left",icon:Cc},{label:(0,Qg.__)("Align text center"),value:"center",icon:jd},{label:(0,Qg.__)("Align text right"),value:"right",icon:Bc},{label:(0,Qg.__)("Justify text"),value:"justify",icon:nO}],$1e=["left","center","right"];function _I({className:e,value:t,onChange:o,options:r=$1e}){let n=(0,tne.useMemo)(()=>W1e.filter(i=>r.includes(i.value)),[r]);return n.length?(0,i3.jsx)(yI.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,Qg.__)("Text alignment"),className:F("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,i3.jsx)(yI.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}function rne(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 one(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 K1e(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 nne(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=ZE(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?K1e(i,t):a?.find(d=>d.style.fontWeight===one(s,o))?.style?.fontStyle),u||(n=o?one(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var gt=l(x()),Y1e=1,q1e=6;function SI(e){let t=sne(e),o=ane(e),r=lne(e),n=cne(e),i=dne(e),s=une(e),a=fne(e),c=mne(e),u=pne(e),d=ine(e);return t||o||r||n||i||s||d||a||c||u}function ine(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 sne(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function ane(e){return e?.typography?.lineHeight}function lne(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function Z1e(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,hr.__)("Appearance"):(0,hr.__)("Font style"):(0,hr.__)("Font weight")}function cne(e){return e?.typography?.letterSpacing}function une(e){return e?.typography?.textTransform}function dne(e){return e?.typography?.textAlign}function fne(e){return e?.typography?.textDecoration}function mne(e){return e?.typography?.writingMode}function pne(e){return e?.typography?.textColumns}function X1e(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function Q1e({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=zo(),s=()=>{let a=e(o);t(a)};return(0,gt.jsx)(Eo.__experimentalToolsPanel,{label:(0,hr.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var J1e={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function xI({as:e=Q1e,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=J1e,fitText:a=!1}){let c=ye=>sn({settings:n},"",ye),u=sne(n),d=c(r?.typography?.fontFamily),{fontFamilies:f,fontFamilyFaces:m}=(0,id.useMemo)(()=>rne(n,d),[n,d]),p=ye=>{let Ct=f?.find(({fontFamily:re})=>re===ye)?.slug;o(me(t,["typography","fontFamily"],Ct?`var:preset|font-family|${Ct}`:ye||void 0))},h=()=>!!t?.typography?.fontFamily,g=()=>p(void 0),b=ine(n),k=!n?.typography?.customFontSize,y=X1e(n),v=c(r?.typography?.fontSize),S=(()=>{let ye=r?.typography?.fontSize;if(!ye||typeof ye!="string")return;if(ye.startsWith("var:preset|font-size|"))return ye.replace("var:preset|font-size|","");let Ct=ye.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(Ct)return Ct[1]})(),w=(ye,Ct)=>{let re=Ct?.slug?`var:preset|font-size|${Ct?.slug}`:ye;o(me(t,["typography","fontSize"],re||void 0))},C=()=>!!t?.typography?.fontSize,E=()=>w(void 0),I=lne(n),R=Z1e(n),B=n?.typography?.fontStyle,P=n?.typography?.fontWeight,T=c(r?.typography?.fontStyle),L=c(r?.typography?.fontWeight),{nearestFontStyle:z,nearestFontWeight:U}=nne(m,T,L),H=(0,id.useCallback)(({fontStyle:ye,fontWeight:Ct})=>{(ye!==T||Ct!==L)&&o({...t,typography:{...t?.typography,fontStyle:ye||void 0,fontWeight:Ct||void 0}})},[T,L,o,t]),N=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,D=(0,id.useCallback)(()=>{H({})},[H]);(0,id.useEffect)(()=>{z&&U?H({fontStyle:z,fontWeight:U}):D()},[z,U,D,H]);let W=ane(n),$=c(r?.typography?.lineHeight),X=ye=>{o(me(t,["typography","lineHeight"],ye||void 0))},te=()=>t?.typography?.lineHeight!==void 0,Z=()=>X(void 0),se=cne(n),ce=c(r?.typography?.letterSpacing),Q=ye=>{o(me(t,["typography","letterSpacing"],ye||void 0))},ie=()=>!!t?.typography?.letterSpacing,J=()=>Q(void 0),G=pne(n),oe=c(r?.typography?.textColumns),ue=ye=>{o(me(t,["typography","textColumns"],ye||void 0))},le=()=>!!t?.typography?.textColumns,ke=()=>ue(void 0),Be=une(n),Re=c(r?.typography?.textTransform),Kt=ye=>{o(me(t,["typography","textTransform"],ye||void 0))},kt=()=>!!t?.typography?.textTransform,_o=()=>Kt(void 0),Yt=fne(n),We=c(r?.typography?.textDecoration),xt=ye=>{o(me(t,["typography","textDecoration"],ye||void 0))},ro=()=>!!t?.typography?.textDecoration,$e=()=>xt(void 0),ho=mne(n),Nt=c(r?.typography?.writingMode),no=ye=>{o(me(t,["typography","writingMode"],ye||void 0))},Ni=()=>!!t?.typography?.writingMode,dr=()=>no(void 0),Ne=dne(n),So=c(r?.typography?.textAlign),Dt=ye=>{o(me(t,["typography","textAlign"],ye||void 0))},wt=()=>!!t?.typography?.textAlign,Ps=()=>Dt(void 0),Di=(0,id.useCallback)(ye=>({...ye,typography:{}}),[]);return(0,gt.jsxs)(e,{resetAllFilter:Di,value:t,onChange:o,panelId:i,children:[u&&(0,gt.jsx)(Eo.__experimentalToolsPanelItem,{label:(0,hr.__)("Font"),hasValue:h,onDeselect:g,isShownByDefault:s.fontFamily,panelId:i,children:(0,gt.jsx)(QE,{fontFamilies:f,value:d,onChange:p,size:"__unstable-large"})}),b&&!a&&(0,gt.jsx)(Eo.__experimentalToolsPanelItem,{label:(0,hr.__)("Size"),hasValue:C,onDeselect:E,isShownByDefault:s.fontSize,panelId:i,children:(0,gt.jsx)(Eo.FontSizePicker,{value:S||v,valueMode:S?"slug":"literal",onChange:w,fontSizes:y,disableCustomFontSizes:k,withReset:!1,withSlider:!0,size:"__unstable-large"})}),I&&(0,gt.jsx)(Eo.__experimentalToolsPanelItem,{className:"single-column",label:R,hasValue:N,onDeselect:D,isShownByDefault:s.fontAppearance,panelId:i,children:(0,gt.jsx)(XE,{value:{fontStyle:T,fontWeight:L},onChange:H,hasFontStyles:B,hasFontWeights:P,fontFamilyFaces:m,size:"__unstable-large"})}),W&&(0,gt.jsx)(Eo.__experimentalToolsPanelItem,{className:"single-column",label:(0,hr.__)("Line height"),hasValue:te,onDeselect:Z,isShownByDefault:s.lineHeight,panelId:i,children:(0,gt.jsx)(LT,{__unstableInputWidth:"auto",value:$,onChange:X,size:"__unstable-large"})}),se&&(0,gt.jsx)(Eo.__experimentalToolsPanelItem,{className:"single-column",label:(0,hr.__)("Letter spacing"),hasValue:ie,onDeselect:J,isShownByDefault:s.letterSpacing,panelId:i,children:(0,gt.jsx)(eT,{value:ce,onChange:Q,size:"__unstable-large",__unstableInputWidth:"auto"})}),G&&(0,gt.jsx)(Eo.__experimentalToolsPanelItem,{className:"single-column",label:(0,hr.__)("Columns"),hasValue:le,onDeselect:ke,isShownByDefault:s.textColumns,panelId:i,children:(0,gt.jsx)(Eo.__experimentalNumberControl,{label:(0,hr.__)("Columns"),max:q1e,min:Y1e,onChange:ue,size:"__unstable-large",spinControls:"custom",value:oe,initialPosition:1})}),Yt&&(0,gt.jsx)(Eo.__experimentalToolsPanelItem,{className:"single-column",label:(0,hr.__)("Decoration"),hasValue:ro,onDeselect:$e,isShownByDefault:s.textDecoration,panelId:i,children:(0,gt.jsx)(oT,{value:We,onChange:xt,size:"__unstable-large",__unstableInputWidth:"auto"})}),ho&&(0,gt.jsx)(Eo.__experimentalToolsPanelItem,{className:"single-column",label:(0,hr.__)("Orientation"),hasValue:Ni,onDeselect:dr,isShownByDefault:s.writingMode,panelId:i,children:(0,gt.jsx)(sT,{value:Nt,onChange:no,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),Be&&(0,gt.jsx)(Eo.__experimentalToolsPanelItem,{label:(0,hr.__)("Letter case"),hasValue:kt,onDeselect:_o,isShownByDefault:s.textTransform,panelId:i,children:(0,gt.jsx)(nT,{value:Re,onChange:Kt,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),Ne&&(0,gt.jsxs)(Eo.__experimentalToolsPanelItem,{label:(0,hr.__)("Text alignment"),hasValue:wt,onDeselect:Ps,isShownByDefault:s.textAlign,panelId:i,children:[(0,gt.jsx)(_I,{value:So,onChange:Dt,options:["left","center","right","justify"],size:"__unstable-large",__nextHasNoMarginBottom:!0}),So==="justify"&&(0,gt.jsx)("div",{children:(0,gt.jsx)(Eo.Notice,{status:"warning",isDismissible:!1,children:(0,hr.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var mo=l(M()),zt=l(A());var eb=l(O());var Ye=l(A()),To=l(M()),gne=l(O()),wI=l(V());var hne=l(V());function vm(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,hne.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 Ft=l(x());function eBe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,To.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,To.__)("Specify a fixed width."):e==="fixed"?(0,To.__)("Specify a fixed height."):(0,To.__)("Fit contents.")}function bne({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,Ft.jsx)(tBe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,Ft.jsx)(rBe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function tBe({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,To.__)("Width"):(0,To.__)("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,gne.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,Ft.jsxs)(Ye.__experimentalVStack,{as:Ye.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,Ft.jsxs)(Ye.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:oBe(o),value:i||"fit",help:eBe(i,o),onChange:p=>{t({selfStretch:p,flexSize:p!=="fixed"?null:s})},isBlock:!0,children:[(0,Ft.jsx)(Ye.__experimentalToggleGroupControlOption,{value:"fit",label:(0,To._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,Ft.jsx)(Ye.__experimentalToggleGroupControlOption,{value:"fill",label:(0,To._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,Ft.jsx)(Ye.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,To._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,Ft.jsx)(Ye.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:p=>{t({selfStretch:i,flexSize:p})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function oBe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,To.__)("Width"):(0,To.__)("Height")}function rBe({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,wI.useSelect)(w=>w(_).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:p}=(0,wI.useDispatch)(_),h=vm(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,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsxs)(Ye.Flex,{as:Ye.__experimentalToolsPanelItem,hasValue:b,label:(0,To.__)("Grid span"),onDeselect:y,isShownByDefault:r,panelId:n,children:[(0,Ft.jsx)(Ye.FlexItem,{style:{width:"50%"},children:(0,Ft.jsx)(Ye.__experimentalInputControl,{size:"__unstable-large",label:(0,To.__)("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,Ft.jsx)(Ye.FlexItem,{style:{width:"50%"},children:(0,Ft.jsx)(Ye.__experimentalInputControl,{size:"__unstable-large",label:(0,To.__)("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,Ft.jsxs)(Ye.Flex,{as:Ye.__experimentalToolsPanelItem,hasValue:g,label:(0,To.__)("Grid placement"),onDeselect:k,isShownByDefault:!1,panelId:n,children:[(0,Ft.jsx)(Ye.FlexItem,{style:{width:"50%"},children:(0,Ft.jsx)(Ye.__experimentalInputControl,{size:"__unstable-large",label:(0,To.__)("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,Ft.jsx)(Ye.FlexItem,{style:{width:"50%"},children:(0,Ft.jsx)(Ye.__experimentalInputControl,{size:"__unstable-large",label:(0,To.__)("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 CI=l(A()),Jg=l(M());var s3=l(x());function BI({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,Jg._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,Jg._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,s3.jsx)(CI.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,Jg.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,s3.jsx)(CI.SelectControl,{label:(0,Jg.__)("Aspect ratio"),value:a,options:r??p,onChange:o,size:"__unstable-large",__nextHasNoMarginBottom:!0})})}var qe=l(x()),a3=["horizontal","vertical"];function EI(e){let t=yne(e),o=_ne(e),r=Sne(e),n=xne(e),i=wne(e),s=Cne(e),a=Bne(e),c=Ene(e),u=Tne(e);return eb.Platform.OS==="web"&&(t||o||r||n||i||s||a||c||u)}function yne(e){return e?.layout?.contentSize}function _ne(e){return e?.layout?.wideSize}function Sne(e){return e?.spacing?.padding}function xne(e){return e?.spacing?.margin}function wne(e){return e?.spacing?.blockGap}function Cne(e){return e?.dimensions?.minHeight}function Bne(e){return e?.dimensions?.width}function Ene(e){return e?.dimensions?.aspectRatio}function Tne(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 nBe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function kne(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 vne(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function iBe(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 sBe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=zo(),s=()=>{let a=e(o);t(a)};return(0,qe.jsx)(zt.__experimentalToolsPanel,{label:(0,mo.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var xa={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,width:!0,aspectRatio:!0,childLayout:!0};function TI({as:e=sBe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=xa,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=re=>re&&typeof re=="object"?Object.keys(re).reduce((Pe,He)=>(Pe[He]=sn({settings:{dimensions:u,spacing:d}},"",re[He]),Pe),{}):sn({settings:{dimensions:u,spacing:d}},"",re),m=nBe(n),p=(0,zt.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),h=-1/0,[g,b]=(0,eb.useState)(h),k=yne(n)&&c,y=f(r?.layout?.contentSize),v=re=>{o(me(t,["layout","contentSize"],re||void 0))},S=()=>!!t?.layout?.contentSize,w=()=>v(void 0),C=_ne(n)&&c,E=f(r?.layout?.wideSize),I=re=>{o(me(t,["layout","wideSize"],re||void 0))},R=()=>!!t?.layout?.wideSize,B=()=>I(void 0),P=Sne(n),T=f(r?.spacing?.padding),L=vne(T),z=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,U=z&&z.some(re=>a3.includes(re)),H=re=>{let Pe=kne(re,z);o(me(t,["spacing","padding"],Pe))},N=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,D=()=>H(void 0),W=()=>a("padding"),$=xne(n),X=f(r?.spacing?.margin),te=vne(X),Z=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,se=Z&&Z.some(re=>a3.includes(re)),ce=re=>{let Pe=kne(re,Z);o(me(t,["spacing","margin"],Pe))},Q=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,ie=()=>ce(void 0),J=()=>a("margin"),G=wne(n),oe=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,ue=oe&&oe.some(re=>a3.includes(re)),le=f(r?.spacing?.blockGap),ke=iBe(le,ue),Be=re=>{o(me(t,["spacing","blockGap"],re))},Re=re=>{re||Be(null),!ue&&re?.hasOwnProperty("top")?Be(re.top):Be({top:re?.top,left:re?.left})},Kt=()=>Be(void 0),kt=()=>!!t?.spacing?.blockGap,_o=Cne(n),Yt=f(r?.dimensions?.minHeight),We=re=>{let Pe=me(t,["dimensions","minHeight"],re);o(me(Pe,["dimensions","aspectRatio"],void 0))},xt=()=>{We(void 0)},ro=()=>!!t?.dimensions?.minHeight,$e=Bne(n),ho=f(r?.dimensions?.width),Nt=re=>{o(me(t,["dimensions","width"],re))},no=()=>{Nt(void 0)},Ni=()=>!!t?.dimensions?.width,dr=Ene(n),Ne=f(r?.dimensions?.aspectRatio),So=re=>{let Pe=me(t,["dimensions","aspectRatio"],re);o(me(Pe,["dimensions","minHeight"],void 0))},Dt=()=>!!t?.dimensions?.aspectRatio,wt=Tne(n),Ps=r?.layout,Di=re=>{o({...t,layout:{...re}})},ye=(0,eb.useCallback)(re=>({...re,layout:xe({...re?.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:{...re?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...re?.dimensions,minHeight:void 0,aspectRatio:void 0,width:void 0}}),[]),Ct=()=>a(!1);return(0,qe.jsxs)(e,{resetAllFilter:ye,value:t,onChange:o,panelId:i,children:[(k||C)&&(0,qe.jsx)("span",{className:"span-columns",children:(0,mo.__)("Set the width of the main content area.")}),k&&(0,qe.jsx)(zt.__experimentalToolsPanelItem,{label:(0,mo.__)("Content width"),hasValue:S,onDeselect:w,isShownByDefault:s.contentSize??xa.contentSize,panelId:i,children:(0,qe.jsx)(zt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,mo.__)("Content width"),labelPosition:"top",value:y||"",onChange:re=>{v(re)},units:p,prefix:(0,qe.jsx)(zt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,qe.jsx)(Ie,{icon:Hd})})})}),C&&(0,qe.jsx)(zt.__experimentalToolsPanelItem,{label:(0,mo.__)("Wide width"),hasValue:R,onDeselect:B,isShownByDefault:s.wideSize??xa.wideSize,panelId:i,children:(0,qe.jsx)(zt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,mo.__)("Wide width"),labelPosition:"top",value:E||"",onChange:re=>{I(re)},units:p,prefix:(0,qe.jsx)(zt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,qe.jsx)(Ie,{icon:Jd})})})}),P&&(0,qe.jsxs)(zt.__experimentalToolsPanelItem,{hasValue:N,label:(0,mo.__)("Padding"),onDeselect:D,isShownByDefault:s.padding??xa.padding,className:F({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,qe.jsx)(zt.BoxControl,{__next40pxDefaultSize:!0,values:L,onChange:H,label:(0,mo.__)("Padding"),sides:z,units:p,allowReset:!1,splitOnAxis:U,inputProps:{onMouseOver:W,onMouseOut:Ct}}),m&&(0,qe.jsx)(qg,{values:L,onChange:H,label:(0,mo.__)("Padding"),sides:z,units:p,allowReset:!1,onMouseOver:W,onMouseOut:Ct})]}),$&&(0,qe.jsxs)(zt.__experimentalToolsPanelItem,{hasValue:Q,label:(0,mo.__)("Margin"),onDeselect:ie,isShownByDefault:s.margin??xa.margin,className:F({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,qe.jsx)(zt.BoxControl,{__next40pxDefaultSize:!0,values:te,onChange:ce,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(h)},onMouseOver:J,onMouseOut:Ct},label:(0,mo.__)("Margin"),sides:Z,units:p,allowReset:!1,splitOnAxis:se}),m&&(0,qe.jsx)(qg,{values:te,onChange:ce,minimumCustomValue:-1/0,label:(0,mo.__)("Margin"),sides:Z,units:p,allowReset:!1,onMouseOver:J,onMouseOut:Ct})]}),G&&(0,qe.jsxs)(zt.__experimentalToolsPanelItem,{hasValue:kt,label:(0,mo.__)("Block spacing"),onDeselect:Kt,isShownByDefault:s.blockGap??xa.blockGap,className:F({"tools-panel-item-spacing":m,"single-column":!m&&!ue}),panelId:i,children:[!m&&(ue?(0,qe.jsx)(zt.BoxControl,{__next40pxDefaultSize:!0,label:(0,mo.__)("Block spacing"),min:0,onChange:Re,units:p,sides:oe,values:ke,allowReset:!1,splitOnAxis:ue}):(0,qe.jsx)(zt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,mo.__)("Block spacing"),min:0,onChange:Be,units:p,value:le})),m&&(0,qe.jsx)(qg,{label:(0,mo.__)("Block spacing"),min:0,onChange:Re,showSideInLabel:!1,sides:ue?oe:["top"],values:ke,allowReset:!1})]}),wt&&(0,qe.jsx)(bne,{value:Ps,onChange:Di,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??xa.childLayout}),_o&&(0,qe.jsx)(zt.__experimentalToolsPanelItem,{hasValue:ro,label:(0,mo.__)("Minimum height"),onDeselect:xt,isShownByDefault:s.minHeight??xa.minHeight,panelId:i,children:(0,qe.jsx)(Ky,{label:(0,mo.__)("Minimum height"),value:Yt,onChange:We})}),$e&&(0,qe.jsx)(zt.__experimentalToolsPanelItem,{hasValue:Ni,label:(0,mo.__)("Width"),onDeselect:no,isShownByDefault:s.width??xa.width,panelId:i,children:(0,qe.jsx)(Ky,{label:(0,mo.__)("Width"),value:ho,onChange:Nt})}),dr&&(0,qe.jsx)(BI,{hasValue:Dt,value:Ne,onChange:So,panelId:i,isShownByDefault:s.aspectRatio??xa.aspectRatio})]})}var zr=l(A()),ob=l(O()),tb=l(M());var ym=l(M()),po=l(A()),PI=l(O());var _t=l(x()),II=[];function aBe({shadow:e,onShadowChange:t,settings:o}){let r=l3(o);return(0,_t.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,_t.jsxs)(po.__experimentalVStack,{spacing:4,children:[(0,_t.jsx)(po.__experimentalHeading,{level:5,children:(0,ym.__)("Drop shadow")}),(0,_t.jsx)(lBe,{presets:r,activeShadow:e,onSelect:t}),(0,_t.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,_t.jsx)(po.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,ym.__)("Clear")})})]})})}function lBe({presets:e,activeShadow:t,onSelect:o}){return e?(0,_t.jsx)(po.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,ym.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,_t.jsx)(cBe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function cBe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,_t.jsx)(po.Tooltip,{text:t,children:(0,_t.jsx)(po.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:F("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,_t.jsx)("button",{className:F("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,_t.jsx)(Ie,{icon:Ya})})})})}function Ine({shadow:e,onShadowChange:t,settings:o}){return(0,_t.jsx)(po.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:uBe(e,t),renderContent:()=>(0,_t.jsx)(po.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,_t.jsx)(aBe,{shadow:e,onShadowChange:t,settings:o})})})}function uBe(e,t){return({onToggle:o,isOpen:r})=>{let n=(0,PI.useRef)(void 0),i={onClick:o,className:F("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:F("block-editor-global-styles__shadow-editor__remove-button",{"is-open":r}),label:(0,ym.__)("Remove")};return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(po.Button,{__next40pxDefaultSize:!0,...i,children:(0,_t.jsxs)(po.__experimentalHStack,{justify:"flex-start",children:[(0,_t.jsx)(Ie,{className:"block-editor-global-styles__toggle-icon",icon:IA,size:24}),(0,_t.jsx)(po.FlexItem,{children:(0,ym.__)("Drop shadow")})]})}),!!e&&(0,_t.jsx)(po.Button,{__next40pxDefaultSize:!0,size:"small",icon:Cr,...s})]})}}function l3(e){return(0,PI.useMemo)(()=>{if(!e?.shadow)return II;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,ym.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||II,...r||II,...n||II];return s.length&&s.unshift(i),s},[e])}var ys=l(x());function OI(e){return Object.values(__(e)).some(Boolean)}function __(e){return{hasBorderColor:Pne(e),hasBorderRadius:One(e),hasBorderStyle:Rne(e),hasBorderWidth:Ane(e),hasShadow:Lne(e)}}function Pne(e){return e?.border?.color}function One(e){return e?.border?.radius}function Rne(e){return e?.border?.style}function Ane(e){return e?.border?.width}function Lne(e){let t=l3(e);return!!e?.shadow&&t.length>0}function dBe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=zo();return(0,ys.jsx)(zr.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var fBe={radius:!0,color:!0,width:!0,shadow:!0};function RI({as:e=dBe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=fBe}){let c=Sa(n),u=(0,ob.useCallback)(N=>sn({settings:n},"",N),[n]),d=N=>{let W=c.flatMap(({colors:$})=>$).find(({color:$})=>$===N);return W?"var:preset|color|"+W.slug:N},f=(0,ob.useMemo)(()=>{if((0,zr.__experimentalHasSplitBorders)(r?.border)){let N={...r?.border};return["top","right","bottom","left"].forEach(D=>{N[D]={...N[D],color:u(N[D]?.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=Pne(n),h=Rne(n),g=Ane(n),b=One(n),k=(0,ob.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=Lne(n),w=u(r?.shadow),C=n?.shadow?.presets??{},E=C.custom??C.theme??C.default??[],I=N=>{let D=E?.find(({shadow:W})=>W===N)?.slug;o(me(t,["shadow"],D?`var:preset|shadow|${D}`:N||void 0))},R=()=>!!t?.shadow,B=()=>I(void 0),P=()=>{if(v())return m({radius:t?.border?.radius});m(void 0)},T=N=>{let D={...N};(0,zr.__experimentalHasSplitBorders)(D)?["top","right","bottom","left"].forEach(W=>{D[W]&&(D[W]={...D[W],color:d(D[W]?.color)})}):D&&(D.color=d(D.color)),m({radius:f?.radius,...D})},L=(0,ob.useCallback)(N=>({...N,border:void 0,shadow:void 0}),[]),z=a?.color||a?.width,U=p||h||g||b,H=rb({blockName:s,hasShadowControl:S,hasBorderControl:U});return(0,ys.jsxs)(e,{resetAllFilter:L,value:t,onChange:o,panelId:i,label:H,children:[(g||p)&&(0,ys.jsx)(zr.__experimentalToolsPanelItem,{hasValue:()=>(0,zr.__experimentalIsDefinedBorder)(t?.border),label:(0,tb.__)("Border"),onDeselect:()=>P(),isShownByDefault:z,panelId:i,children:(0,ys.jsx)(zr.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:h,onChange:T,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!S,label:(0,tb.__)("Border")})}),b&&(0,ys.jsx)(zr.__experimentalToolsPanelItem,{hasValue:v,label:(0,tb.__)("Radius"),onDeselect:()=>y(void 0),isShownByDefault:a.radius,panelId:i,children:(0,ys.jsx)(GE,{presets:n?.border?.radiusSizes,values:k,onChange:N=>{y(N||void 0)}})}),S&&(0,ys.jsxs)(zr.__experimentalToolsPanelItem,{label:(0,tb.__)("Shadow"),hasValue:R,onDeselect:B,isShownByDefault:a.shadow,panelId:i,children:[U?(0,ys.jsx)(zr.BaseControl.VisualLabel,{as:"legend",children:(0,tb.__)("Shadow")}):null,(0,ys.jsx)(Ine,{shadow:w,onShadowChange:I,settings:n})]})]})}var Ht=l(A()),LI=l(O()),jt=l(M());var et=l(x());function MI(e){let t=Nne(e),o=zne(e),r=Dne(e),n=sd(e),i=Fne(e),s=Vne(e);return t||o||r||n||i||s}function Nne(e){let t=Sa(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Dne(e){let t=Sa(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Vne(e){let t=Sa(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function sd(e){let t=Sa(e),o=y_(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Fne(e){let t=Sa(e),o=y_(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function zne(e){let t=Sa(e),o=y_(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function c3({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=zo(),a=()=>{let c=e(o);t(c)};return(0,et.jsx)(Ht.__experimentalToolsPanel,{label:i||(0,jt.__)("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 mBe={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},pBe={placement:"left-start",offset:36,shift:!0,flip:!0,resize:!1},{Tabs:AI}=j(Ht.privateApis),hBe=({indicators:e,label:t})=>(0,et.jsxs)(Ht.__experimentalHStack,{justify:"flex-start",children:[(0,et.jsx)(Ht.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,et.jsx)(Ht.Flex,{expanded:!1,children:(0,et.jsx)(Ht.ColorIndicator,{colorValue:o})},r))}),(0,et.jsx)(Ht.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Mne({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,et.jsx)(Wu,{...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 gBe({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,LI.useRef)(void 0);return(0,et.jsx)(Ht.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,et.jsx)(Ht.Dropdown,{popoverProps:pBe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:m,isOpen:p})=>{let h={onClick:m,className:F("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)(Ht.Button,{...h,__next40pxDefaultSize:!0,children:(0,et.jsx)(hBe,{indicators:n,label:e})}),t()&&(0,et.jsx)(Ht.Button,{__next40pxDefaultSize:!0,label:(0,jt.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Cr,onClick:()=>{o(),p&&m(),f.current?.focus()}})]})},renderContent:()=>(0,et.jsx)(Ht.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,et.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,et.jsx)(Mne,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,et.jsxs)(AI,{defaultTabId:c?.key,children:[(0,et.jsx)(AI.TabList,{children:i.map(m=>(0,et.jsx)(AI.Tab,{tabId:m.key,children:m.label},m.key))}),i.map(m=>{let{key:p,...h}=m;return(0,et.jsx)(AI.TabPanel,{tabId:p,focusable:!1,children:(0,et.jsx)(Mne,{...h,colorGradientControlSettings:s},p)},p)})]})]})})})})}function NI({as:e=c3,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=mBe,label:a,children:c}){let u=Sa(n),d=y_(n),f=n?.color?.custom,m=n?.color?.customGradient,p=u.length>0||f,h=d.length>0||m,g=G=>sn({settings:n},"",G),b=G=>{let ue=u.flatMap(({colors:le})=>le).find(({color:le})=>le===G);return ue?"var:preset|color|"+ue.slug:G},k=G=>{let ue=d.flatMap(({gradients:le})=>le).find(({gradient:le})=>le===G);return ue?"var:preset|gradient|"+ue.slug:G},y=zne(n),v=g(r?.color?.background),S=g(t?.color?.background),w=g(r?.color?.gradient),C=g(t?.color?.gradient),E=()=>!!S||!!C,I=G=>{let oe=me(t,["color","background"],b(G));oe.color.gradient=void 0,o(oe)},R=G=>{let oe=me(t,["color","gradient"],k(G));oe.color.background=void 0,o(oe)},B=()=>{let G=me(t,["color","background"],void 0);G.color.gradient=void 0,o(G)},P=Dne(n),T=g(r?.elements?.link?.color?.text),L=g(t?.elements?.link?.color?.text),z=G=>{o(me(t,["elements","link","color","text"],b(G)))},U=g(r?.elements?.link?.[":hover"]?.color?.text),H=g(t?.elements?.link?.[":hover"]?.color?.text),N=G=>{o(me(t,["elements","link",":hover","color","text"],b(G)))},D=()=>!!L||!!H,W=()=>{let G=me(t,["elements","link",":hover","color","text"],void 0);G=me(G,["elements","link","color","text"],void 0),o(G)},$=Nne(n),X=g(r?.color?.text),te=g(t?.color?.text),Z=()=>!!te,se=G=>{let oe=me(t,["color","text"],b(G));X===T&&(oe=me(oe,["elements","link","color","text"],b(G))),o(oe)},ce=()=>se(void 0),Q=[{name:"caption",label:(0,jt.__)("Captions"),showPanel:Vne(n)},{name:"button",label:(0,jt.__)("Button"),showPanel:Fne(n)},{name:"heading",label:(0,jt.__)("Heading"),showPanel:sd(n)},{name:"h1",label:(0,jt.__)("H1"),showPanel:sd(n)},{name:"h2",label:(0,jt.__)("H2"),showPanel:sd(n)},{name:"h3",label:(0,jt.__)("H3"),showPanel:sd(n)},{name:"h4",label:(0,jt.__)("H4"),showPanel:sd(n)},{name:"h5",label:(0,jt.__)("H5"),showPanel:sd(n)},{name:"h6",label:(0,jt.__)("H6"),showPanel:sd(n)}],ie=(0,LI.useCallback)(G=>({...G,color:void 0,elements:{...G?.elements,link:{...G?.elements?.link,color:void 0,":hover":{color:void 0}},...Q.reduce((oe,ue)=>({...oe,[ue.name]:{...G?.elements?.[ue.name],color:void 0}}),{})}}),[Q]),J=[$&&{key:"text",label:(0,jt.__)("Text"),hasValue:Z,resetValue:ce,isShownByDefault:s.text,indicators:[X],tabs:[{key:"text",label:(0,jt.__)("Text"),inheritedValue:X,setValue:se,userValue:te}]},y&&{key:"background",label:(0,jt.__)("Background"),hasValue:E,resetValue:B,isShownByDefault:s.background,indicators:[w??v],tabs:[p&&{key:"background",label:(0,jt.__)("Color"),inheritedValue:v,setValue:I,userValue:S},h&&{key:"gradient",label:(0,jt.__)("Gradient"),inheritedValue:w,setValue:R,userValue:C,isGradient:!0}].filter(Boolean)},P&&{key:"link",label:(0,jt.__)("Link"),hasValue:D,resetValue:W,isShownByDefault:s.link,indicators:[T,U],tabs:[{key:"link",label:(0,jt.__)("Default"),inheritedValue:T,setValue:z,userValue:L},{key:"hover",label:(0,jt.__)("Hover"),inheritedValue:U,setValue:N,userValue:H}]}].filter(Boolean);return Q.forEach(({name:G,label:oe,showPanel:ue})=>{if(!ue)return;let le=g(r?.elements?.[G]?.color?.background),ke=g(r?.elements?.[G]?.color?.gradient),Be=g(r?.elements?.[G]?.color?.text),Re=g(t?.elements?.[G]?.color?.background),Kt=g(t?.elements?.[G]?.color?.gradient),kt=g(t?.elements?.[G]?.color?.text),_o=()=>!!(kt||Re||Kt),Yt=()=>{let Nt=me(t,["elements",G,"color","background"],void 0);Nt.elements[G].color.gradient=void 0,Nt.elements[G].color.text=void 0,o(Nt)},We=Nt=>{o(me(t,["elements",G,"color","text"],b(Nt)))},xt=Nt=>{let no=me(t,["elements",G,"color","background"],b(Nt));no.elements[G].color.gradient=void 0,o(no)},ro=Nt=>{let no=me(t,["elements",G,"color","gradient"],k(Nt));no.elements[G].color.background=void 0,o(no)},$e=!0,ho=G!=="caption";J.push({key:G,label:oe,hasValue:_o,resetValue:Yt,isShownByDefault:s[G],indicators:$e&&ho?[Be,ke??le]:[$e?Be:ke??le],tabs:[p&&$e&&{key:"text",label:(0,jt.__)("Text"),inheritedValue:Be,setValue:We,userValue:kt},p&&ho&&{key:"background",label:(0,jt.__)("Background"),inheritedValue:le,setValue:xt,userValue:Re},h&&ho&&{key:"gradient",label:(0,jt.__)("Gradient"),inheritedValue:ke,setValue:ro,userValue:Kt,isGradient:!0}].filter(Boolean)})}),(0,et.jsxs)(e,{resetAllFilter:ie,value:t,onChange:o,panelId:i,label:a,children:[J.map(G=>{let{key:oe,...ue}=G;return(0,et.jsx)(gBe,{...ue,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},oe)}),c]})}var st=l(A()),ec=l(M()),nb=l(O());var Jt=l(x()),DI=[];function jne(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||DI,i=e?.color?.[t]?.theme||DI,s=e?.color?.[t]?.default||DI;return(0,nb.useMemo)(()=>[...n,...i,...r?DI:s],[r,n,i,s])}function Hne(e){return Une(e)}function Une(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function bBe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=zo(),s=()=>{let a=e(o);t(a)};return(0,Jt.jsx)(st.__experimentalToolsPanel,{label:(0,ec._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var kBe={duotone:!0},vBe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,ec.__)("Duotone")},yBe=({indicator:e,label:t})=>(0,Jt.jsxs)(st.__experimentalHStack,{justify:"flex-start",children:[(0,Jt.jsx)(st.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,Jt.jsx)(st.Flex,{expanded:!1,children:e==="unset"||!e?(0,Jt.jsx)(st.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,Jt.jsx)(st.DuotoneSwatch,{values:e})})}),(0,Jt.jsx)(st.FlexItem,{title:t,children:t})]}),_Be=(e,t)=>({onToggle:o,isOpen:r})=>{let n=(0,nb.useRef)(void 0),i={onClick:o,className:F("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,ec.__)("Reset")};return(0,Jt.jsxs)(Jt.Fragment,{children:[(0,Jt.jsx)(st.Button,{__next40pxDefaultSize:!0,...i,children:(0,Jt.jsx)(yBe,{indicator:e,label:(0,ec.__)("Duotone")})}),e&&(0,Jt.jsx)(st.Button,{size:"small",icon:Cr,...s})]})};function VI({as:e=bBe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=kBe}){let a=b=>sn({settings:n},"",b),c=Une(n),u=jne(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=jne(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(me(t,["filter","duotone"],y))},p=()=>!!t?.filter?.duotone,h=()=>m(void 0),g=(0,nb.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,Jt.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,Jt.jsx)(st.__experimentalToolsPanelItem,{label:(0,ec.__)("Duotone"),hasValue:p,onDeselect:h,isShownByDefault:s.duotone,panelId:i,children:(0,Jt.jsx)(st.Dropdown,{popoverProps:vBe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:_Be(f,h),renderContent:()=>(0,Jt.jsx)(st.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,Jt.jsxs)(st.MenuGroup,{label:(0,ec.__)("Duotone"),children:[(0,Jt.jsx)("p",{children:(0,ec.__)("Create a two-tone color effect without losing your original image.")}),(0,Jt.jsx)(st.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var ib=l(A()),S_=l(M());var _m=l(x());function Gne(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function Wne({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=zo(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,_m.jsx)(_m.Fragment,{children:(0,_m.jsx)(ib.__experimentalToolsPanel,{label:(0,S_._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,_m.jsx)(ib.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,S_.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,_m.jsx)(ib.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S_.__)("Enlarge on click"),checked:a,onChange:s})})})})}var sb=l(A()),$ne=l(O()),u3=l(M());var x_=l(x());function Kne({value:e,onChange:t,inheritedValue:o=e}){let[r,n]=(0,$ne.useState)(null),i=o?.css;function s(c){if(t({...e,css:c}),r){let[u]=Bf([{css:c}],".for-validation-only");u&&n(null)}}function a(c){if(!c?.target?.value){n(null);return}let[u]=Bf([{css:c.target.value}],".for-validation-only");n(u===null?(0,u3.__)("There is an error with your CSS structure."):null)}return(0,x_.jsxs)(sb.__experimentalVStack,{spacing:3,children:[r&&(0,x_.jsx)(sb.Notice,{status:"error",onRemove:()=>n(null),children:r}),(0,x_.jsx)(sb.TextareaControl,{label:(0,u3.__)("Additional CSS"),__nextHasNoMarginBottom:!0,value:i,onChange:c=>s(c),onBlur:a,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1})]})}var HI=l(A()),UI=l(O());var Ce=l(A());var St=l(M()),qne=l(qn()),d3=l($r()),tc=l(O()),w_=l(V()),Zne=l(Ve()),Xne=l(rC());var we=l(x()),FI="image",SBe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},jI=()=>{},zI=e=>{window.requestAnimationFrame(()=>{let[t]=Zne.focus.tabbable.find(e?.current);t&&t.focus()})};function xBe(e){return e==="cover"||e===void 0?(0,St.__)("Image covers the space evenly."):e==="contain"?(0,St.__)("Image is contained without distortion."):(0,St.__)("Image has a fixed width.")}var wBe=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}%`},CBe=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 Qne({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=jI}){let{isOpen:s,...a}=o;(0,tc.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,we.jsxs)(Ce.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,we.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,we.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,we.jsxs)(Ce.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,we.jsx)(Ce.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,we.jsx)(Ce.VisuallyHidden,{as:"span",children:t?(0,St.sprintf)((0,St.__)("Background image: %s"),r||n):(0,St.__)("No background image selected")})]})]});return e==="button"?(0,we.jsx)(Ce.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function BBe({label:e,filename:t,url:o,children:r,onToggle:n=jI,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,d3.getFilename)(o)||(0,St.__)("Add background image");return(0,we.jsx)(Ce.Dropdown,{popoverProps:SBe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,St.__)("Background size, position and repeat options."),isOpen:d};return(0,we.jsxs)(we.Fragment,{children:[(0,we.jsx)(Qne,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,we.jsx)(Ce.Button,{__next40pxDefaultSize:!0,label:(0,St.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Cr,onClick:()=>{s(),d&&u(),zI(a)}})]})},renderContent:()=>(0,we.jsx)(Ce.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function EBe(){return(0,we.jsx)(Ce.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,we.jsx)(Ce.Spinner,{})})}function Yne({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=jI,onResetImage:n=jI,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,tc.useState)(!1),{getSettings:d}=(0,w_.useSelect)(_),{id:f,title:m,url:p}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:h}=(0,w_.useDispatch)(qne.store),g=E=>{h(E,{type:"snackbar"}),u(!1)},b=()=>e(me(t,["background","backgroundImage"],void 0)),k=E=>{if(!E||!E.url){b(),u(!1);return}if((0,Xne.isBlobURL)(E.url)){u(!0);return}if(E.media_type&&E.media_type!==FI||!E.media_type&&E.type&&E.type!==FI){g((0,St.__)("Only images can be used as a background image."));return}let I=t?.background?.backgroundSize||s?.backgroundSize,R=t?.background?.backgroundPosition;e(me(t,["background"],{...t?.background,backgroundImage:{url:E.url,id:E.id,source:"file",title:E.title||void 0},backgroundPosition:!R&&(I==="auto"||!I)?"50% 0":R,backgroundSize:I})),u(!1),zI(a)},y=E=>{d().mediaUpload({allowedTypes:[FI],filesList:E,onFileChange([I]){k(I)},onError:g,multiple:!1})},v=Sm(t),S=()=>e(me(t,["background"],{backgroundImage:"none"})),w=!v&&Sm(o),C=m||(0,d3.getFilename)(p)||(0,St.__)("Add background image");return(0,we.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,we.jsx)(EBe,{}),(0,we.jsx)(Mg,{mediaId:f,mediaURL:p,allowedTypes:[FI],accept:"image/*",onSelect:k,popoverProps:{className:F({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,we.jsx)(Qne,{imgUrl:p,filename:m,label:C}),renderToggle:E=>(0,we.jsx)(Ce.Button,{...E,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{zI(a),n()},children:w&&(0,we.jsx)(Ce.MenuItem,{onClick:()=>{zI(a),S(),r()},children:(0,St.__)("Remove")})}),(0,we.jsx)(Ce.DropZone,{onFilesDrop:y,label:(0,St.__)("Drop to upload")})]})}function TBe({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(me(t,["background"],{...t?.background,backgroundPosition:v,backgroundRepeat:y,backgroundSize:k}))},p=k=>{e(me(t,["background","backgroundPosition"],wBe(k)))},h=()=>e(me(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(me(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,we.jsxs)(Ce.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,we.jsx)(Ce.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,St.__)("Focal point"),url:s,value:CBe(b),onChange:p}),(0,we.jsx)(Ce.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,St.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,we.jsxs)(Ce.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,St.__)("Size"),value:d,onChange:m,isBlock:!0,help:xBe(n||r?.backgroundSize),children:[(0,we.jsx)(Ce.__experimentalToggleGroupControlOption,{value:"cover",label:(0,St._x)("Cover","Size option for background image control")},"cover"),(0,we.jsx)(Ce.__experimentalToggleGroupControlOption,{value:"contain",label:(0,St._x)("Contain","Size option for background image control")},"contain"),(0,we.jsx)(Ce.__experimentalToggleGroupControlOption,{value:"auto",label:(0,St._x)("Tile","Size option for background image control")},"tile")]}),(0,we.jsxs)(Ce.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,we.jsx)(Ce.__experimentalUnitControl,{"aria-label":(0,St.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,St.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,we.jsx)(Ce.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,St.__)("Repeat"),checked:f,onChange:h,disabled:d==="cover"})]})]})}function Jne({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,w_.useSelect)(k=>{let{getSettings:y}=k(_),v=y();return{globalStyles:v[As],_links:v[pS]}},[]),a=(0,tc.useMemo)(()=>{let k={background:{}};return o?.background?(Object.entries(o?.background).forEach(([y,v])=>{k.background[y]=$h(v,{styles:i,_links:s})}),k):o},[i,s,o]),c=()=>t(me(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=Sm(e)||Sm(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,p=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[h,g]=(0,tc.useState)(!1),b=(0,tc.useRef)();return(0,we.jsx)("div",{ref:b,className:F("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":h}),children:p?(0,we.jsx)(BBe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,we.jsxs)(Ce.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,we.jsx)(Yne,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,we.jsx)(TBe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,we.jsx)(Yne,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var f3=l(M()),C_=l(x()),IBe={backgroundImage:!0};function B_(e){return UI.Platform.OS==="web"&&e?.background?.backgroundImage}function Sm(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function PBe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=zo();return(0,C_.jsx)(HI.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}function GI({as:e=PBe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=IBe,defaultValues:a={},headerLabel:c=(0,f3.__)("Background image")}){let u=B_(n),d=()=>o(me(t,["background"],{})),f=(0,UI.useCallback)(m=>({...m,background:{}}),[]);return(0,C_.jsx)(e,{resetAllFilter:f,value:t,onChange:o,panelId:i,headerLabel:c,children:u&&(0,C_.jsx)(HI.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,f3.__)("Image"),onDeselect:d,isShownByDefault:s.backgroundImage,panelId:i,children:(0,C_.jsx)(Jne,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})})})}var $I=l(M()),h3=l(x()),wm="__experimentalBorder",T_="shadow",eie=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},xm=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=eie(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=eie(e,"color",o);return r||{color:o}};function WI(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function rie(e){if((0,p3.__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:xe(r),borderColor:o}}function nie(e){return(0,p3.__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 OBe({label:e,children:t,resetAllFilter:o}){let r=(0,ab.useCallback)(n=>{let i=nie(n),s=o(i);return{...n,...rie(s)}},[o]);return(0,h3.jsx)(pe,{group:"border",resetAllFilter:r,label:e,children:t})}function iie({clientId:e,name:t,setAttributes:o,settings:r}){let n=OI(r),{style:i,borderColor:s}=(0,oie.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(_).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,ab.useMemo)(()=>nie({style:i,borderColor:s}),[i,s]),c=d=>{o(rie(d))};if(!n)return null;let u={...(0,E_.getBlockSupport)(t,[wm,"__experimentalDefaultControls"]),...(0,E_.getBlockSupport)(t,[T_,"__experimentalDefaultControls"])};return(0,h3.jsx)(RI,{as:OBe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function KI(e,t="any"){if(ab.Platform.OS!=="web")return!1;let o=(0,E_.getBlockSupport)(e,wm);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function rb({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=wi(e),n=__(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,$I.__)("Border & Shadow"):o?(0,$I.__)("Shadow"):(0,$I.__)("Border")}function RBe(e){return!KI(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function sie(e,t,o){if(!KI(t,"color")||Ke(t,wm,"color"))return e;let r=g3(o),n=F(e.className,r);return e.className=n||void 0,e}function g3(e){let{borderColor:t,style:o}=e,r=Hn("border-color",t);return F({"has-border-color":t||o?.border?.color,[r]:!!r})}function ABe({name:e,borderColor:t,style:o}){let{colors:r}=Ku();if(!KI(e,"color")||Ke(e,wm,"color"))return{};let{color:n}=xm({colors:r,namedColor:t}),{color:i}=xm({colors:r,namedColor:WI(o?.border?.top?.color)}),{color:s}=xm({colors:r,namedColor:WI(o?.border?.right?.color)}),{color:a}=xm({colors:r,namedColor:WI(o?.border?.bottom?.color)}),{color:c}=xm({colors:r,namedColor:WI(o?.border?.left?.color)});return sie({style:xe({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var b3={useBlockProps:ABe,addSaveProps:sie,attributeKeys:["borderColor","style"],hasSupport(e){return KI(e,"color")}};(0,tie.addFilter)("blocks.registerBlockType","core/border/addAttributes",RBe);var _3=l(ot()),oc=l(K()),ad=l(O()),pie=l(V());var v3=l(K()),aie=l(V()),lie=l(O());var y3=l(x()),Cm="background",k3={backgroundSize:"cover",backgroundPosition:"50% 50%"};function YI(e,t="any"){let o=(0,v3.getBlockSupport)(e,Cm);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat:!!o?.[t]}function qI(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:k3.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:k3.backgroundPosition}),t}function LBe({name:e,style:t}){if(!YI(e)||!t?.background?.backgroundImage)return;let o=qI(t?.background);if(o)return{style:{...o}}}function cie(e){return Sm(e)?"has-background":""}function MBe({children:e}){let t=(0,lie.useCallback)(o=>({...o,style:{...o.style,background:void 0}}),[]);return(0,y3.jsx)(pe,{group:"background",resetAllFilter:t,children:e})}function uie({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[As]?.blocks?.[t]}},[e,t]);if(!B_(r)||!YI(t,"backgroundImage"))return null;let s=u=>{o({style:xe(u)})},a={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&YI(t,"backgroundSize")}},c=(0,v3.getBlockSupport)(t,[Cm,"defaultControls"]);return(0,y3.jsx)(GI,{inheritedValue:i,as:MBe,panelId:e,defaultValues:k3,settings:a,onChange:s,defaultControls:c,value:n})}var die={useBlockProps:LBe,attributeKeys:["style"],hasSupport:YI};var XI=l(O());var fie=l(x());function ZI(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function NBe(e){if(!e)return{};let t=e.querySelector("a"),o=t?.innerText?ZI(t,"color"):void 0,r=ZI(e,"color"),n=e,i=ZI(n,"background-color");for(;i==="rgba(0, 0, 0, 0)"&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,i=ZI(n,"background-color");return{textColor:r,backgroundColor:i,linkColor:o}}function DBe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function mie({clientId:e}){let t=dt(e),[o,r]=(0,XI.useReducer)(DBe,{});return(0,XI.useLayoutEffect)(()=>{if(!t)return;function n(){r(NBe(t))}window.requestAnimationFrame(()=>window.requestAnimationFrame(n))}),(0,fie.jsx)($E,{backgroundColor:o.backgroundColor,textColor:o.textColor,linkColor:o.linkColor,enableAlphaChecker:!0})}var QI=l(x()),Wo="color",JI=e=>{let t=(0,oc.getBlockSupport)(e,Wo);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},VBe=e=>{if(ad.Platform.OS!=="web")return!1;let t=(0,oc.getBlockSupport)(e,Wo);return t!==null&&typeof t=="object"&&!!t.link},S3=e=>{let t=(0,oc.getBlockSupport)(e,Wo);return t!==null&&typeof t=="object"&&!!t.gradients},FBe=e=>{let t=(0,oc.getBlockSupport)(e,Wo);return t&&t.background!==!1},zBe=e=>{let t=(0,oc.getBlockSupport)(e,Wo);return t&&t.text!==!1};function jBe(e){return JI(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),S3(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function hie(e,t,o){if(!JI(t)||Ke(t,Wo))return e;let r=S3(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!Ke(t,Wo,g),u=c("text")?Hn("color",i):void 0,d=c("gradients")?_p(s):void 0,f=c("background")?Hn("background-color",n):void 0,m=c("background")||c("gradients"),p=n||a?.color?.background||r&&(s||a?.color?.gradient),h=F(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 gie(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:xe(a),textColor:o,backgroundColor:n,gradient:s}}function bie(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 HBe({children:e,resetAllFilter:t}){let o=(0,ad.useCallback)(r=>{let n=bie(r),i=t(n);return{...r,...gie(i)}},[t]);return(0,QI.jsx)(pe,{group:"color",resetAllFilter:o,children:e})}function eP({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=MI(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,pie.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,ad.useMemo)(()=>bie({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),p=b=>{o(gie(b))};if(!a)return null;s=s||(0,oc.getBlockSupport)(t,[Wo,"__experimentalDefaultControls"]);let h=ad.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,oc.getBlockSupport)(t,[Wo,"enableContrastChecker"])!==!1;return(0,QI.jsx)(NI,{as:n||HBe,panelId:e,settings:r,value:m,onChange:p,defaultControls:s,label:i,enableContrastChecker:(0,oc.getBlockSupport)(t,[Wo,"enableContrastChecker"])!==!1,children:h&&(0,QI.jsx)(mie,{clientId:e})})}function UBe({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,ad.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!JI(e)||Ke(e,Wo))return{};let u={};o&&!Ke(e,Wo,"text")&&(u.color=Rs(c,o)?.color),t&&!Ke(e,Wo,"background")&&(u.backgroundColor=Rs(c,t)?.color);let d=hie({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:F(d.className,!f&&cie(n))}}var x3={useBlockProps:UBe,addSaveProps:hie,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:JI},GBe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function WBe(e,t,o,r){let n=e.name,i={linkColor:VBe(n),textColor:zBe(n),backgroundColor:FBe(n),gradient:S3(n)};return tP(i,GBe,e,t,o,r)}(0,_3.addFilter)("blocks.registerBlockType","core/color/addAttribute",jBe);(0,_3.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",WBe);var Io=l(x());function $Be({blockName:e,clientId:t,contentClientIds:o}){let r=wi(e),{updateBlockAttributes:n}=(0,oP.useDispatch)(_),{hasButton:i,hasHeading:s}=(0,oP.useSelect)(c=>{let u=c(_).getBlockNamesByClientId(o);return{hasButton:u.includes("core/button"),hasHeading:u.includes("core/heading")}},[o]);return(0,Io.jsx)(eP,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:c3,label:(0,Bm.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var KBe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=rb({blockName:e});return(0,Io.jsxs)(Io.Fragment,{children:[o&&(0,Io.jsx)("div",{children:(0,Io.jsx)(kie.PanelBody,{title:(0,Bm.__)("Styles"),children:(0,Io.jsx)(mg,{clientId:t})})}),r&&window?.__experimentalContentOnlyPatternInsertion&&(0,Io.jsx)($Be,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,Io.jsxs)(Io.Fragment,{children:[(0,Io.jsx)(pe.Slot,{group:"color",label:(0,Bm.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Io.jsx)(pe.Slot,{group:"background",label:(0,Bm.__)("Background image")}),(0,Io.jsx)(pe.Slot,{group:"filter"}),(0,Io.jsx)(pe.Slot,{group:"typography",label:(0,Bm.__)("Typography")}),(0,Io.jsx)(pe.Slot,{group:"dimensions",label:(0,Bm.__)("Dimensions")}),(0,Io.jsx)(pe.Slot,{group:"border",label:i}),(0,Io.jsx)(pe.Slot,{group:"styles"})]})]})},vie=KBe;var sle=l(A()),ale=l(M());var rP=l(V()),Ci=l(A());var wa=l(x());function nP({clientIds:e,onSelect:t}){return e.length?(0,wa.jsx)(Ci.__experimentalVStack,{spacing:1,children:e.map(o=>(0,wa.jsx)(YBe,{onSelect:t,clientId:o},o))}):null}function YBe({clientId:e,onSelect:t}){let o=mt(e),r=Do({clientId:e,context:"list-view"}),{isSelected:n}=(0,rP.useSelect)(s=>{let{isBlockSelected:a,hasSelectedInnerBlock:c}=s(_);return{isSelected:a(e)||c(e,!0)}},[e]),{selectBlock:i}=(0,rP.useDispatch)(_);return(0,wa.jsx)(Ci.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:n,onClick:async()=>{await i(e),t&&t(e)},children:(0,wa.jsxs)(Ci.Flex,{children:[(0,wa.jsx)(Ci.FlexItem,{children:(0,wa.jsx)(Te,{icon:o?.icon})}),(0,wa.jsx)(Ci.FlexBlock,{style:{textAlign:"left"},children:(0,wa.jsx)(Ci.__experimentalTruncate,{children:r})})]})})}var M_=l(K()),Wr=l(A()),xb=l(V()),rle=l(M());var w3=l(M());var Ot="isAny",Rt="isNone",gr="isAll",br="isNotAll",jr="between",Hr="inThePast",dn="over",Ut="is",Gt="isNot",ld="lessThan",cd="greaterThan",ud="lessThanOrEqual",dd="greaterThanOrEqual",fd="before",md="after",pd="beforeInc",hd="afterInc",Ca="contains",Ba="notContains",Ea="startsWith",gd="on",bd="notOn";var wat={asc:(0,w3.__)("Sort ascending"),desc:(0,w3.__)("Sort descending")};var yie=[0,1,2,3,4,5,6];var _ie=l(aS()),{lock:Bat,unlock:At}=(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 I_=l(O()),qBe=[];function Ta({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:qBe,[r,n]=(0,I_.useState)(o),[i,s]=(0,I_.useState)(!1);return(0,I_.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 ae=l(M()),Wt=l(O());var C3=l(x()),eo={Name:(0,C3.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,C3.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})},ZBe=[{name:Ot,label:(0,ae.__)("Includes"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),eo),selection:"multi"},{name:Rt,label:(0,ae.__)("Is none of"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),eo),selection:"multi"},{name:gr,label:(0,ae.__)("Includes all"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),eo),selection:"multi"},{name:br,label:(0,ae.__)("Is none of"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),eo),selection:"multi"},{name:jr,label:(0,ae.__)("Between (inc)"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),eo),selection:"custom"},{name:Hr,label:(0,ae.__)("In the past"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),eo),selection:"custom"},{name:dn,label:(0,ae.__)("Over"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),eo),selection:"custom"},{name:Ut,label:(0,ae.__)("Is"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:Gt,label:(0,ae.__)("Is not"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:ld,label:(0,ae.__)("Less than"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:cd,label:(0,ae.__)("Greater than"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:ud,label:(0,ae.__)("Less than or equal"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:dd,label:(0,ae.__)("Greater than or equal"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:fd,label:(0,ae.__)("Before"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:md,label:(0,ae.__)("After"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:pd,label:(0,ae.__)("Before (inc)"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:hd,label:(0,ae.__)("After (inc)"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:Ca,label:(0,ae.__)("Contains"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:Ba,label:(0,ae.__)("Doesn't contain"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:Ea,label:(0,ae.__)("Starts with"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:gd,label:(0,ae.__)("On"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"},{name:bd,label:(0,ae.__)("Not on"),filterText:(e,t)=>(0,Wt.createInterpolateElement)((0,ae.sprintf)((0,ae.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),eo),selection:"single"}];var Sie=()=>ZBe.map(e=>e.name);var XBe=Math.pow(10,8)*24*60*60*1e3,Oat=-XBe,iP=6048e5,xie=864e5;var QBe=3600;var wie=QBe*24,Rat=wie*7,JBe=wie*365.2425,eEe=JBe/12,Aat=eEe*3,B3=Symbol.for("constructDateFrom");function Po(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&B3 in e?e[B3](t):e instanceof Date?new e.constructor(t):new Date(t)}function tt(e,t){return Po(t||e,e)}function Cie(e,t,o){let r=tt(e,o?.in);return isNaN(t)?Po(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 Po(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=Po(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 tEe={};function kd(){return tEe}function rc(e,t){let o=kd(),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 Em(e,t){return rc(e,{...t,weekStartsOn:1})}function aP(e,t){let o=tt(e,t?.in),r=o.getFullYear(),n=Po(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Em(n),s=Po(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=Em(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function E3(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 Bie(e,...t){let o=Po.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function T3(e,t){let o=tt(e,t?.in);return o.setHours(0,0,0,0),o}function Eie(e,t,o){let[r,n]=Bie(o?.in,e,t),i=T3(r),s=T3(n),a=+i-E3(i),c=+s-E3(s);return Math.round((a-c)/xie)}function Tie(e,t){let o=aP(e,t),r=Po(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Em(r)}function Iie(e,t,o){return sP(e,t*12,o)}function Pie(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function lb(e){return!(!Pie(e)&&typeof e!="number"||isNaN(+tt(e)))}function Oie(e,t){let o=tt(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function lP(e,t){let o=tt(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var oEe={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"}},Rie=(e,t,o)=>{let r,n=oEe[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 rEe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nEe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},iEe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Aie={date:cP({formats:rEe,defaultWidth:"full"}),time:cP({formats:nEe,defaultWidth:"full"}),dateTime:cP({formats:iEe,defaultWidth:"full"})};var sEe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Lie=(e,t,o,r)=>sEe[e];function cb(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 aEe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lEe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cEe={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"]},uEe={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"]},dEe={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"}},fEe={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"}},mEe=(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"},Mie={ordinalNumber:mEe,era:cb({values:aEe,defaultWidth:"wide"}),quarter:cb({values:lEe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:cb({values:cEe,defaultWidth:"wide"}),day:cb({values:uEe,defaultWidth:"wide"}),dayPeriod:cb({values:dEe,defaultWidth:"wide",formattingValues:fEe,defaultFormattingWidth:"wide"})};function ub(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)?hEe(a,f=>f.test(s)):pEe(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 pEe(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function hEe(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function Nie(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 gEe=/^(\d+)(th|st|nd|rd)?/i,bEe=/\d+/i,kEe={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},vEe={any:[/^b/i,/^(a|c)/i]},yEe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},_Ee={any:[/1/i,/2/i,/3/i,/4/i]},SEe={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},xEe={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]},wEe={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},CEe={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]},BEe={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},EEe={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}},Die={ordinalNumber:Nie({matchPattern:gEe,parsePattern:bEe,valueCallback:e=>parseInt(e,10)}),era:ub({matchPatterns:kEe,defaultMatchWidth:"wide",parsePatterns:vEe,defaultParseWidth:"any"}),quarter:ub({matchPatterns:yEe,defaultMatchWidth:"wide",parsePatterns:_Ee,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ub({matchPatterns:SEe,defaultMatchWidth:"wide",parsePatterns:xEe,defaultParseWidth:"any"}),day:ub({matchPatterns:wEe,defaultMatchWidth:"wide",parsePatterns:CEe,defaultParseWidth:"any"}),dayPeriod:ub({matchPatterns:BEe,defaultMatchWidth:"any",parsePatterns:EEe,defaultParseWidth:"any"})};var I3={code:"en-US",formatDistance:Rie,formatLong:Aie,formatRelative:Lie,localize:Mie,match:Die,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vie(e,t){let o=tt(e,t?.in);return Eie(o,lP(o))+1}function Fie(e,t){let o=tt(e,t?.in),r=+Em(o)-+Tie(o);return Math.round(r/iP)+1}function uP(e,t){let o=tt(e,t?.in),r=o.getFullYear(),n=kd(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Po(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=rc(s,t),c=Po(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=rc(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function zie(e,t){let o=kd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=uP(e,t),i=Po(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),rc(i,t)}function jie(e,t){let o=tt(e,t?.in),r=+rc(o,t)-+zie(o,t);return Math.round(r/iP)+1}function je(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var nc={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return je(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):je(o+1,2)},d(e,t){return je(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 je(e.getHours()%12||12,t.length)},H(e,t){return je(e.getHours(),t.length)},m(e,t){return je(e.getMinutes(),t.length)},s(e,t){return je(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return je(n,t.length)}};var db={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},P3={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 nc.y(e,t)},Y:function(e,t,o,r){let n=uP(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return je(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):je(i,t.length)},R:function(e,t){let o=aP(e);return je(o,t.length)},u:function(e,t){let o=e.getFullYear();return je(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 je(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 je(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 nc.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 je(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=jie(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):je(n,t.length)},I:function(e,t,o){let r=Fie(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):je(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):nc.d(e,t)},D:function(e,t,o){let r=Vie(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):je(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 je(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 je(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 je(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=db.noon:r===0?n=db.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=db.evening:r>=12?n=db.afternoon:r>=4?n=db.morning:n=db.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 nc.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):nc.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):je(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):je(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):nc.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):nc.s(e,t)},S:function(e,t){return nc.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Uie(r);case"XXXX":case"XX":return Tm(r);case"XXXXX":case"XXX":default:return Tm(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return Uie(r);case"xxxx":case"xx":return Tm(r);case"xxxxx":case"xxx":default:return Tm(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Hie(r,":");case"OOOO":default:return"GMT"+Tm(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Hie(r,":");case"zzzz":default:return"GMT"+Tm(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return je(r,t.length)},T:function(e,t,o){return je(+e,t.length)}};function Hie(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+je(i,2)}function Uie(e,t){return e%60===0?(e>0?"-":"+")+je(Math.abs(e)/60,2):Tm(e,t)}function Tm(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=je(Math.trunc(r/60),2),i=je(r%60,2);return o+n+t+i}var Gie=(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"})}},Wie=(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"})}},TEe=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return Gie(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}}",Gie(r,t)).replace("{{time}}",Wie(n,t))},$ie={p:Wie,P:TEe};var IEe=/^D+$/,PEe=/^Y+$/,OEe=["D","DD","YY","YYYY"];function Kie(e){return IEe.test(e)}function Yie(e){return PEe.test(e)}function qie(e,t,o){let r=REe(e,t,o);if(console.warn(r),OEe.includes(e))throw new RangeError(r)}function REe(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 AEe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,LEe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,MEe=/^'([^]*?)'?$/,NEe=/''/g,DEe=/[a-zA-Z]/;function P_(e,t,o){let r=kd(),n=o?.locale??r.locale??I3,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(!lb(a))throw new RangeError("Invalid time value");let c=t.match(LEe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=$ie[f];return m(d,n.formatLong)}return d}).join("").match(AEe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:VEe(d)};if(P3[f])return{isToken:!0,value:d};if(f.match(DEe))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&&Yie(f)||!o?.useAdditionalDayOfYearTokens&&Kie(f))&&qie(f,t,String(e));let m=P3[f[0]];return m(a,f,n.localize,u)}).join("")}function VEe(e){let t=e.match(MEe);return t?t[1].replace(NEe,"'"):e}function O_(e,t,o){return Cie(e,-t,o)}function Zie(e,t,o){return sP(e,-t,o)}function Xie(e,t,o){return Iie(e,-t,o)}var Qie=l(rm());function vd(e){if(!e)return null;let t=(0,Qie.getDate)(e);return t&&lb(t)?t:null}var Jie=l(M());function kr({item:e,field:t}){let{elements:o,isLoading:r}=Ta({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 fb=(e,t,o)=>o==="asc"?e-t:t-e;function to(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function dP(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 fP(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}function bt(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))}var ese=l(x());function tse(e){let t=e.format;return{separatorThousand:t?.separatorThousand!==void 0&&typeof t.separatorThousand=="string"?t.separatorThousand:",",separatorDecimal:t?.separatorDecimal!==void 0&&typeof t.separatorDecimal=="string"?t.separatorDecimal:".",decimals:t?.decimals!==void 0&&typeof t.decimals=="number"&&t.decimals>=0&&t.decimals<=100&&Number.isInteger(t.decimals)?t.decimals:2}}function FEe(e,t){if(!Number.isFinite(e))return String(e);let{separatorThousand:o,separatorDecimal:r,decimals:n}=t,i=e.toFixed(n),[s,a]=i.split("."),c=o?s.replace(/\B(?=(\d{3})+(?!\d))/g,o):s;return n===0?c:c+r+a}function zEe(e){return e===""||e===void 0||e===null}function jEe({item:e,field:t}){if(t.hasElements)return(0,ese.jsx)(kr,{item:e,field:t});let o=t.getValue({item:e});if([null,void 0].includes(o))return"";let r;return t.type!=="number"?r=tse(t):r=t.format,FEe(Number(o),r)}function HEe(e,t){let o=t.getValue({item:e});return!zEe(o)&&!Number.isFinite(o)?(0,Jie.__)("Value must be a number."):null}var ose={type:"number",render:jEe,Edit:"number",sort:fb,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Gt,ld,cd,ud,dd,jr],validOperators:[Ut,Gt,ld,cd,ud,dd,jr,Ot,Rt,gr,br],getFormat:tse,validate:{required:to,min:dP,max:fP,elements:bt,custom:HEe}};var rse=l(M());var nse=l(x());function ise(e){let t=e.format;return{separatorThousand:t?.separatorThousand!==void 0&&typeof t.separatorThousand=="string"?t.separatorThousand:","}}function UEe(e,t){if(!Number.isFinite(e))return String(e);let{separatorThousand:o}=t,r=Math.trunc(e);return o?String(r).replace(/\B(?=(\d{3})+(?!\d))/g,o):String(r)}function GEe({item:e,field:t}){if(t.hasElements)return(0,nse.jsx)(kr,{item:e,field:t});let o=t.getValue({item:e});if([null,void 0].includes(o))return"";let r;return t.type!=="integer"?r=ise(t):r=t.format,UEe(Number(o),r)}function WEe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,rse.__)("Value must be an integer."):null}var sse={type:"integer",render:GEe,Edit:"integer",sort:fb,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Gt,ld,cd,ud,dd,jr],validOperators:[Ut,Gt,ld,cd,ud,dd,jr,Ot,Rt,gr,br],getFormat:ise,validate:{required:to,min:dP,max:fP,elements:bt,custom:WEe}};var ase=l(A()),lse=l(O());function Lt(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 cse=l(x()),{ValidatedCheckboxControl:$Ee}=At(ase.privateApis);function use({field:e,onChange:t,data:o,hideLabelFromVision:r,validity:n}){let{getValue:i,setValue:s,label:a,description:c,isValid:u}=e,d=(0,lse.useCallback)(()=>{t(s({item:o,value:!i({item:o})}))},[o,i,t,s]);return(0,cse.jsx)($Ee,{required:!!e.isValid?.required,customValidity:Lt(u,n),hidden:r,label:a,help:c,checked:i({item:o}),onChange:d})}var pb=l(A()),Bi=l(O()),R3=l(M()),dse=l(rm());var yd=l(A()),O3=l(O()),Ia=l(M());var mb=l(x()),KEe={[Hr]:[{value:"days",label:(0,Ia.__)("Days")},{value:"weeks",label:(0,Ia.__)("Weeks")},{value:"months",label:(0,Ia.__)("Months")},{value:"years",label:(0,Ia.__)("Years")}],[dn]:[{value:"days",label:(0,Ia.__)("Days ago")},{value:"weeks",label:(0,Ia.__)("Weeks ago")},{value:"months",label:(0,Ia.__)("Months ago")},{value:"years",label:(0,Ia.__)("Years ago")}]};function mP({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=KEe[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,O3.useCallback)(b=>r(d({item:t,value:{value:Number(b),unit:p}})),[r,d,t,p]),g=(0,O3.useCallback)(b=>r(d({item:t,value:{value:m,unit:b}})),[r,d,t,m]);return(0,mb.jsx)(yd.BaseControl,{id:a,__nextHasNoMarginBottom:!0,className:F(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,mb.jsxs)(yd.__experimentalHStack,{spacing:2.5,children:[(0,mb.jsx)(yd.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:h}),(0,mb.jsx)(yd.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,Ia.__)("Unit"),value:p,options:s,onChange:g,hideLabelFromVision:!0})]})})}var _d=l(x()),{DateCalendar:YEe,ValidatedInputControl:qEe}=At(pb.privateApis),ZEe=e=>e?typeof e=="string"?e:P_(e,"yyyy-MM-dd'T'HH:mm"):"";function XEe({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,Bi.useState)(()=>vd(m)||new Date),g=(0,Bi.useRef)(null),b=(0,Bi.useRef)(),k=(0,Bi.useRef)(null),y=(0,Bi.useCallback)(I=>o(c({item:e,value:I})),[e,o,c]);(0,Bi.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let v=(0,Bi.useCallback)(I=>{let R;if(I){let B=I;if(m){let P=vd(m);P&&(B=new Date(I),B.setHours(P.getHours()),B.setMinutes(P.getMinutes()))}R=B.toISOString(),y(R),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(R),k.current&&k.current instanceof HTMLElement&&k.current.focus())},0)},[y,m]),S=(0,Bi.useCallback)(I=>{if(I){let R=new Date(I);y(R.toISOString());let B=vd(R.toISOString());B&&h(B)}else y(void 0)},[y]),{timezone:{string:w},l10n:{startOfWeek:C}}=(0,dse.getSettings)(),E=d?.required&&!r?`${s} (${(0,R3.__)("Required")})`:s;return(0,_d.jsx)(pb.BaseControl,{__nextHasNoMarginBottom:!0,id:i,label:E,help:a,hideLabelFromVision:r,children:(0,_d.jsxs)(pb.__experimentalVStack,{spacing:4,children:[(0,_d.jsx)(YEe,{style:{width:"100%"},selected:m&&vd(m)||void 0,onSelect:v,month:p,onMonthChange:h,timeZone:w||void 0,weekStartsOn:C}),(0,_d.jsx)(qEe,{ref:g,__next40pxDefaultSize:!0,required:!!d?.required,customValidity:Lt(d,n),type:"datetime-local",label:(0,R3.__)("Date time"),hideLabelFromVision:!0,value:m?ZEe(vd(m)||void 0):"",onChange:S})]})})}function fse({data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n,validity:i}){return n===Hr||n===dn?(0,_d.jsx)(mP,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n}):(0,_d.jsx)(XEe,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i})}var $t=l(A()),lt=l(O()),ar=l(M()),Ur=l(rm());var at=l(x()),{DateCalendar:QEe,DateRangeCalendar:JEe}=At($t.privateApis),eTe=[{id:"today",label:(0,ar.__)("Today"),getValue:()=>(0,Ur.getDate)(null)},{id:"yesterday",label:(0,ar.__)("Yesterday"),getValue:()=>{let e=(0,Ur.getDate)(null);return O_(e,1)}},{id:"past-week",label:(0,ar.__)("Past week"),getValue:()=>{let e=(0,Ur.getDate)(null);return O_(e,7)}},{id:"past-month",label:(0,ar.__)("Past month"),getValue:()=>{let e=(0,Ur.getDate)(null);return Zie(e,1)}}],tTe=[{id:"last-7-days",label:(0,ar.__)("Last 7 days"),getValue:()=>{let e=(0,Ur.getDate)(null);return[O_(e,7),e]}},{id:"last-30-days",label:(0,ar.__)("Last 30 days"),getValue:()=>{let e=(0,Ur.getDate)(null);return[O_(e,30),e]}},{id:"month-to-date",label:(0,ar.__)("Month to date"),getValue:()=>{let e=(0,Ur.getDate)(null);return[Oie(e),e]}},{id:"last-year",label:(0,ar.__)("Last year"),getValue:()=>{let e=(0,Ur.getDate)(null);return[Xie(e,1),e]}},{id:"year-to-date",label:(0,ar.__)("Year to date"),getValue:()=>{let e=(0,Ur.getDate)(null);return[lP(e),e]}}],hb=e=>{if(!e)return null;let t=(0,Ur.getDate)(e);return t&&lb(t)?t:null},A3=e=>e?typeof e=="string"?e:P_(e,"yyyy-MM-dd"):"";function mse({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,lt.useState)(void 0),u=(0,lt.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,lt.useEffect)(()=>{if(r){let f=setTimeout(()=>{t?c(Lt(s,t)):u()},0);return()=>clearTimeout(f)}},[r,s,t,u]),(0,at.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,at.jsx)("div",{"aria-live":"polite",children:a&&(0,at.jsxs)("p",{className:F("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0,a.type==="valid"?"is-valid":void 0),children:[(0,at.jsx)($t.Icon,{className:"components-validated-control__indicator-icon",icon:UO,size:16,fill:"currentColor"}),a.message]})})]})}function oTe({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{id:i,type:s,label:a,setValue:c,getValue:u,isValid:d,format:f}=t,[m,p]=(0,lt.useState)(null),h=(0,Ur.getSettings)().l10n.startOfWeek;s==="date"&&(h=f.weekStartsOn);let g=u({item:e}),b=typeof g=="string"?g:void 0,[k,y]=(0,lt.useState)(()=>hb(b)||new Date),[v,S]=(0,lt.useState)(!1),w=(0,lt.useRef)(null),C=(0,lt.useCallback)(T=>o(c({item:e,value:T})),[e,o,c]),E=(0,lt.useCallback)(T=>{let L=T?P_(T,"yyyy-MM-dd"):void 0;C(L),p(null),S(!0)},[C]),I=(0,lt.useCallback)(T=>{let L=T.getValue(),z=A3(L);y(L),C(z),p(T.id),S(!0)},[C]),R=(0,lt.useCallback)(T=>{if(C(T),T){let L=hb(T);L&&y(L)}p(null),S(!0)},[C]),{timezone:{string:B}}=(0,Ur.getSettings)(),P=d?.required?`${a} (${(0,ar.__)("Required")})`:a;return(0,at.jsx)(mse,{field:t,validity:n,inputRefs:w,isTouched:v,setIsTouched:S,children:(0,at.jsx)($t.BaseControl,{__nextHasNoMarginBottom:!0,id:i,className:"dataviews-controls__date",label:P,hideLabelFromVision:r,children:(0,at.jsxs)($t.__experimentalVStack,{spacing:4,children:[(0,at.jsxs)($t.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[eTe.map(T=>{let L=m===T.id;return(0,at.jsx)($t.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:L,size:"small",onClick:()=>I(T),children:T.label},T.id)}),(0,at.jsx)($t.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!m,size:"small",disabled:!!m,accessibleWhenDisabled:!1,children:(0,ar.__)("Custom")})]}),(0,at.jsx)($t.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:w,type:"date",label:(0,ar.__)("Date"),hideLabelFromVision:!0,value:b,onChange:R,required:!!t.isValid?.required}),(0,at.jsx)(QEe,{style:{width:"100%"},selected:b&&hb(b)||void 0,onSelect:E,month:k,onMonthChange:y,timeZone:B||void 0,weekStartsOn:h})]})})})}function rTe({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{id:i,type:s,label:a,getValue:c,setValue:u,format:d}=t,f,m=c({item:e});Array.isArray(m)&&m.length===2&&m.every(z=>typeof z=="string")&&(f=m);let p;s==="date"&&(p=d.weekStartsOn);let h=(0,lt.useCallback)(z=>{o(u({item:e,value:z}))},[e,o,u]),[g,b]=(0,lt.useState)(null),k=(0,lt.useMemo)(()=>{if(!f)return{from:void 0,to:void 0};let[z,U]=f;return{from:hb(z)||void 0,to:hb(U)||void 0}},[f]),[y,v]=(0,lt.useState)(()=>k.from||new Date),[S,w]=(0,lt.useState)(!1),C=(0,lt.useRef)(null),E=(0,lt.useRef)(null),I=(0,lt.useCallback)((z,U)=>{z&&U?h([A3(z),A3(U)]):!z&&!U&&h(void 0)},[h]),R=(0,lt.useCallback)(z=>{I(z?.from,z?.to),b(null),w(!0)},[I]),B=(0,lt.useCallback)(z=>{let[U,H]=z.getValue();v(U),I(U,H),b(z.id),w(!0)},[I]),P=(0,lt.useCallback)((z,U)=>{let[H,N]=f||[void 0,void 0];if(I(z==="from"?U:H,z==="to"?U:N),U){let $=hb(U);$&&v($)}b(null),w(!0)},[f,I]),{timezone:T}=(0,Ur.getSettings)(),L=t.isValid?.required?`${a} (${(0,ar.__)("Required")})`:a;return(0,at.jsx)(mse,{field:t,validity:n,inputRefs:[C,E],isTouched:S,setIsTouched:w,children:(0,at.jsx)($t.BaseControl,{__nextHasNoMarginBottom:!0,id:i,className:"dataviews-controls__date",label:L,hideLabelFromVision:r,children:(0,at.jsxs)($t.__experimentalVStack,{spacing:4,children:[(0,at.jsxs)($t.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[tTe.map(z=>{let U=g===z.id;return(0,at.jsx)($t.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:U,size:"small",onClick:()=>B(z),children:z.label},z.id)}),(0,at.jsx)($t.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",accessibleWhenDisabled:!1,disabled:!!g,children:(0,ar.__)("Custom")})]}),(0,at.jsxs)($t.__experimentalHStack,{spacing:2,children:[(0,at.jsx)($t.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:C,type:"date",label:(0,ar.__)("From"),hideLabelFromVision:!0,value:f?.[0],onChange:z=>P("from",z),required:!!t.isValid?.required}),(0,at.jsx)($t.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:E,type:"date",label:(0,ar.__)("To"),hideLabelFromVision:!0,value:f?.[1],onChange:z=>P("to",z),required:!!t.isValid?.required})]}),(0,at.jsx)(JEe,{style:{width:"100%"},selected:k,onSelect:R,month:y,onMonthChange:v,timeZone:T.string||void 0,weekStartsOn:p})]})})})}function pse({data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n,validity:i}){return n===Hr||n===dn?(0,at.jsx)(mP,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n}):n===jr?(0,at.jsx)(rTe,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i}):(0,at.jsx)(oTe,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i})}var hP=l(A());var hse=l(A()),gse=l(O());var bse=l(x()),{ValidatedInputControl:nTe}=At(hse.privateApis);function Pa({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,gse.useCallback)(b=>o(m({item:e,value:b})),[e,m,o]);return(0,bse.jsx)(nTe,{required:!!p.required,customValidity:Lt(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 pP=l(x());function kse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){return(0,pP.jsx)(Pa,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:"email",prefix:(0,pP.jsx)(hP.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,pP.jsx)(hP.Icon,{icon:jO})})})}var bP=l(A());var gP=l(x());function vse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){return(0,gP.jsx)(Pa,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:"tel",prefix:(0,gP.jsx)(bP.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,gP.jsx)(bP.Icon,{icon:eA})})})}var vP=l(A());var kP=l(x());function yse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){return(0,kP.jsx)(Pa,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:"url",prefix:(0,kP.jsx)(vP.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,kP.jsx)(vP.Icon,{icon:Kr})})})}var ic=l(A()),R_=l(O()),yP=l(M());var Sd=l(x()),{ValidatedNumberControl:iTe}=At(ic.privateApis);function _se(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function sTe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,R_.useCallback)(c=>t([_se(c),i]),[t,i]),a=(0,R_.useCallback)(c=>t([n,_se(c)]),[t,n]);return(0,Sd.jsx)(ic.BaseControl,{__nextHasNoMarginBottom:!0,help:(0,yP.__)("The max. value must be greater than the min. value."),children:(0,Sd.jsxs)(ic.Flex,{direction:"row",gap:4,children:[(0,Sd.jsx)(ic.__experimentalNumberControl,{label:(0,yP.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,Sd.jsx)(ic.__experimentalNumberControl,{label:(0,yP.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function _P({data:e,field:t,onChange:o,hideLabelFromVision:r,operator:n,decimals:i,validity:s}){let a=Math.pow(10,Math.abs(i)*-1),{label:c,description:u,getValue:d,setValue:f,isValid:m}=t,p=d({item:e})??"",h=(0,R_.useCallback)(b=>{o(f({item:e,value:["",void 0].includes(b)?void 0:Number(b)}))},[e,o,f]),g=(0,R_.useCallback)(b=>{o(f({item:e,value:b}))},[e,o,f]);if(n===jr){let b=["",""];return Array.isArray(p)&&p.length===2&&p.every(k=>typeof k=="number"||k==="")&&(b=p),(0,Sd.jsx)(sTe,{value:b,onChange:g,hideLabelFromVision:r,step:a})}return(0,Sd.jsx)(iTe,{required:!!m.required,customValidity:Lt(m,s),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 Sse=l(x());function xse(e){return(0,Sse.jsx)(_P,{...e,decimals:0})}var wse=l(x());function Cse(e){let t=e.field.format?.decimals??2;return(0,wse.jsx)(_P,{...e,decimals:t})}var SP=l(A()),Bse=l(O());var L3=l(x()),{ValidatedRadioControl:aTe}=At(SP.privateApis);function Ese({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}=Ta({elements:t.elements,getElements:t.getElements}),m=a({item:e}),p=(0,Bse.useCallback)(h=>o(c({item:e,value:h})),[e,o,c]);return f?(0,L3.jsx)(SP.Spinner,{}):(0,L3.jsx)(aTe,{required:!!t.isValid?.required,customValidity:Lt(u,n),label:i,help:s,onChange:p,options:d,selected:m,hideLabelFromVision:r})}var xP=l(A()),Tse=l(O());var M3=l(x()),{ValidatedSelectControl:lTe}=At(xP.privateApis);function Ise({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,Tse.useCallback)(b=>o(u({item:e,value:b})),[e,o,u]),{elements:h,isLoading:g}=Ta({elements:t.elements,getElements:t.getElements});return g?(0,M3.jsx)(xP.Spinner,{}):(0,M3.jsx)(lTe,{required:!!t.isValid?.required,customValidity:Lt(d,n),label:s,value:m,help:a,options:h,onChange:p,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:r,multiple:f})}var N3=l(O());var Pse=l(x());function Ose({data:e,field:t,onChange:o,hideLabelFromVision:r,config:n,validity:i}){let{prefix:s,suffix:a}=n||{};return(0,Pse.jsx)(Pa,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:i,prefix:s?(0,N3.createElement)(s):void 0,suffix:a?(0,N3.createElement)(a):void 0})}var Rse=l(A()),Ase=l(O());var Lse=l(x()),{ValidatedToggleControl:cTe}=At(Rse.privateApis);function Mse({field:e,onChange:t,data:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,getValue:a,setValue:c,isValid:u}=e,d=(0,Ase.useCallback)(()=>{t(c({item:o,value:!a({item:o})}))},[t,c,o,a]);return(0,Lse.jsx)(cTe,{required:!!u.required,customValidity:Lt(u,n),hidden:r,__nextHasNoMarginBottom:!0,label:i,help:s,checked:a({item:o}),onChange:d})}var Nse=l(A()),Dse=l(O());var Vse=l(x()),{ValidatedTextareaControl:uTe}=At(Nse.privateApis);function Fse({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,Dse.useCallback)(h=>o(d({item:e,value:h})),[e,o,d]);return(0,Vse.jsx)(uTe,{required:!!f.required,customValidity:Lt(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,__nextHasNoMarginBottom:!0,hideLabelFromVision:r})}var gb=l(A()),zse=l(O());var wP=l(x()),{ValidatedToggleGroupControl:dTe}=At(gb.privateApis);function jse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{getValue:i,setValue:s,isValid:a}=t,c=i({item:e}),u=(0,zse.useCallback)(p=>o(s({item:e,value:p})),[e,o,s]),{elements:d,isLoading:f}=Ta({elements:t.elements,getElements:t.getElements});if(f)return(0,wP.jsx)(gb.Spinner,{});if(d.length===0)return null;let m=d.find(p=>p.value===c);return(0,wP.jsx)(dTe,{required:!!t.isValid?.required,customValidity:Lt(a,n),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:t.label,help:m?.description||t.description,onChange:u,value:c,hideLabelFromVision:r,children:d.map(p=>(0,wP.jsx)(gb.__experimentalToggleGroupControlOption,{label:p.label,value:p.value},p.value))})}var CP=l(A()),BP=l(O());var A_=l(x()),{ValidatedFormTokenField:fTe}=At(CP.privateApis);function Hse({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}=Ta({elements:t.elements,getElements:t.getElements}),p=(0,BP.useMemo)(()=>Array.isArray(d)?d.map(g=>f?.find(k=>k.value===g)||{value:g,label:g}):[],[d,f]),h=(0,BP.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,A_.jsx)(CP.Spinner,{}):(0,A_.jsx)(fTe,{required:!!u?.required,customValidity:Lt(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,A_.jsx)("span",{children:b?.label||g})}return(0,A_.jsx)("span",{children:g})}})}var bb=l(A()),D3=l(O());var xd=l(x()),{ValidatedInputControl:mTe,Picker:pTe}=At(bb.privateApis),hTe=({color:e,onColorChange:t})=>{let o=e&&ct(e).isValid()?e:"#ffffff";return(0,xd.jsx)(bb.Dropdown,{renderToggle:({onToggle:r,isOpen:n})=>(0,xd.jsx)(bb.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,xd.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,xd.jsx)("div",{style:{padding:"16px"},children:(0,xd.jsx)(pTe,{color:ct(o),onChange:t,enableAlpha:!0})})})};function Use({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,D3.useCallback)(p=>{o(c({item:e,value:p.toHex()}))},[e,o,c]),m=(0,D3.useCallback)(p=>{o(c({item:e,value:p||""}))},[e,o,c]);return(0,xd.jsx)(mTe,{required:!!t.isValid?.required,customValidity:Lt(u,n),label:i,placeholder:s,value:d,help:a,onChange:m,hideLabelFromVision:r,type:"text",prefix:(0,xd.jsx)(hTe,{color:d,onColorChange:f})})}var TP=l(A()),IP=l(O()),V3=l(M());var EP=l(x());function Gse({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let[i,s]=(0,IP.useState)(!1),a=(0,IP.useCallback)(()=>{s(c=>!c)},[]);return(0,EP.jsx)(Pa,{data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n,type:i?"text":"password",suffix:(0,EP.jsx)(TP.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,EP.jsx)(TP.Button,{icon:i?ji:Xa,onClick:a,size:"small",label:i?(0,V3.__)("Hide password"):(0,V3.__)("Show password")})})})}function PP(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var $se=l(x()),Wse={array:Hse,checkbox:use,color:Use,datetime:fse,date:pse,email:kse,telephone:vse,url:yse,integer:xse,number:Cse,password:Gse,radio:Ese,select:Ise,text:Ose,toggle:Mse,textarea:Fse,toggleGroup:jse};function gTe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function bTe(e){let{control:t,...o}=e,r=OP(t);return r===null?null:function(i){return(0,$se.jsx)(r,{...i,config:o})}}function Kse(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?OP(e.Edit):gTe(e.Edit)?bTe(e.Edit):PP(e)&&e.type!=="array"?OP("select"):t===null?null:OP(t)}function OP(e){return Object.keys(Wse).includes(e)?Wse[e]:null}function kTe(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 Yse=kTe;var vTe=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},qse=vTe;var yTe=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},Zse=yTe;var Qse=l(M());var Xse=l(x());function Oa({item:e,field:t}){return t.hasElements?(0,Xse.jsx)(kr,{item:e,field:t}):t.getValue({item:e})}var Ra=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function Aa(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 La(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 Ma(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}}var _Te=/^[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 STe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!_Te.test(o)?(0,Qse.__)("Value must be a valid email address."):null}var Jse={type:"email",render:Oa,Edit:"email",sort:Ra,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ot,Rt],validOperators:[Ut,Gt,Ca,Ba,Ea,Ot,Rt,gr,br],getFormat:()=>({}),validate:{required:to,pattern:Ma,minLength:Aa,maxLength:La,elements:bt,custom:STe}};var eae={type:"text",render:Oa,Edit:"text",sort:Ra,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ot,Rt],validOperators:[Ut,Gt,Ca,Ba,Ea,Ot,Rt,gr,br],getFormat:()=>({}),validate:{required:to,pattern:Ma,minLength:Aa,maxLength:La,elements:bt}};var tae=l(x());function xTe({item:e,field:t}){if(t.elements)return(0,tae.jsx)(kr,{item:e,field:t});let o=t.getValue({item:e});if(["",void 0,null].includes(o))return null;try{return vd(o)?.toLocaleString()}catch{return null}}var wTe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},oae={type:"datetime",render:xTe,Edit:"datetime",sort:wTe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[gd,bd,fd,md,pd,hd,Hr,dn],validOperators:[gd,bd,fd,md,pd,hd,Hr,dn],getFormat:()=>({}),validate:{required:to,elements:bt}};var Im=l(rm());var rae=l(x());function nae(e){let t=e.format;return{date:t?.date!==void 0&&typeof t.date=="string"?t.date:(0,Im.getSettings)().formats.date,weekStartsOn:t?.weekStartsOn!==void 0&&yie.includes(t?.weekStartsOn)?t.weekStartsOn:(0,Im.getSettings)().l10n.startOfWeek}}function CTe({item:e,field:t}){if(t.hasElements)return(0,rae.jsx)(kr,{item:e,field:t});let o=t.getValue({item:e});if(!o)return"";let r;return t.type!=="date"?r=nae({}):r=t.format,(0,Im.dateI18n)(r.date,(0,Im.getDate)(o))}var BTe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},iae={type:"date",render:CTe,Edit:"date",sort:BTe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[gd,bd,fd,md,pd,hd,Hr,dn,jr],validOperators:[gd,bd,fd,md,pd,hd,Hr,dn,jr],getFormat:nae,validate:{required:to,elements:bt}};var RP=l(M());function sae(e,t){return t.getValue({item:e})===!0}var aae=l(x());function ETe({item:e,field:t}){return t.hasElements?(0,aae.jsx)(kr,{item:e,field:t}):t.getValue({item:e})===!0?(0,RP.__)("True"):t.getValue({item:e})===!1?(0,RP.__)("False"):null}function TTe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,RP.__)("Value must be true, false, or undefined"):null}var ITe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},lae={type:"boolean",render:ETe,Edit:"checkbox",sort:ITe,validate:{required:sae,elements:bt,custom:TTe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Gt],validOperators:[Ut,Gt],getFormat:()=>({})};var cae={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],getFormat:()=>({}),validate:{}};var F3=l(M());function uae(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function PTe({item:e,field:t}){return(t.getValue({item:e})||[]).join(", ")}function OTe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,F3.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,F3.__)("Every value must be a string.")}var RTe=(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)},dae={type:"array",render:PTe,Edit:"array",sort:RTe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ot,Rt],validOperators:[Ot,Rt,gr,br],getFormat:()=>({}),validate:{required:uae,elements:bt,custom:OTe}};var fae=l(x());function ATe({item:e,field:t}){return t.hasElements?(0,fae.jsx)(kr,{item:e,field:t}):"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}var mae={type:"password",render:ATe,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],getFormat:()=>({}),validate:{required:to,pattern:Ma,minLength:Aa,maxLength:La,elements:bt}};var pae={type:"telephone",render:Oa,Edit:"telephone",sort:Ra,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ot,Rt],validOperators:[Ut,Gt,Ca,Ba,Ea,Ot,Rt,gr,br],getFormat:()=>({}),validate:{required:to,pattern:Ma,minLength:Aa,maxLength:La,elements:bt}};var hae=l(M());var kb=l(x());function LTe({item:e,field:t}){if(t.hasElements)return(0,kb.jsx)(kr,{item:e,field:t});let o=t.getValue({item:e});return!o||!ct(o).isValid()?o:(0,kb.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,kb.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,kb.jsx)("span",{children:o})]})}function MTe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!ct(o).isValid()?(0,hae.__)("Value must be a valid color."):null}var NTe=(e,t,o)=>{let r=ct(e),n=ct(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},gae={type:"color",render:LTe,Edit:"color",sort:NTe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ot,Rt],validOperators:[Ut,Gt,Ot,Rt],getFormat:()=>({}),validate:{required:to,elements:bt,custom:MTe}};var bae={type:"url",render:Oa,Edit:"url",sort:Ra,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ot,Rt],validOperators:[Ut,Gt,Ca,Ba,Ea,Ot,Rt,gr,br],getFormat:()=>({}),validate:{required:to,pattern:Ma,minLength:Aa,maxLength:La,elements:bt}};var DTe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?fb(e,t,o):Ra(e,t,o),kae={render:Oa,Edit:null,sort:DTe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Gt],validOperators:Sie(),getFormat:()=>({}),validate:{required:to,elements:bt}};function vae(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 VTe(e){let t=[Jse,sse,ose,eae,oae,iae,lae,cae,dae,mae,pae,gae,bae].find(o=>o?.type===e);return t||kae}function L_(e){return e.map(t=>{let o=VTe(t.type),r=t.getValue||qse(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||Zse(t.id),elements:t.elements,getElements:t.getElements,hasElements:PP(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:Kse(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:vae(t,o),filterBy:Yse(t,o.defaultOperators,o.validOperators),format:o.getFormat(t)}})}var G3=l(O());var yae=l(O()),_ae=l(x()),z3=(0,yae.createContext)({fields:[]});z3.displayName="DataFormContext";function Sae({fields:e,children:t}){return(0,_ae.jsx)(z3.Provider,{value:{fields:e},children:t})}var Ei=z3;var Hae=l(A()),Uae=l(O());var Lm=l(A());var LP=l(O()),_s=l(A());var vr={type:"regular",labelPosition:"top"},FTe=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 xae(e){let t=vr;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:FTe(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=xae(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?xae(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:vr}).fields}}});return{layout:t,fields:o}}var AP=wae;var Mt=l(x());function zTe({title:e}){return(0,Mt.jsx)(_s.__experimentalVStack,{className:"dataforms-layouts-regular__header",spacing:4,children:(0,Mt.jsxs)(_s.__experimentalHStack,{alignment:"center",children:[(0,Mt.jsx)(_s.__experimentalHeading,{level:2,size:13,children:e}),(0,Mt.jsx)(_s.__experimentalSpacer,{})]})})}function Cae({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{fields:i}=(0,LP.useContext)(Ei),s=t.layout,a=(0,LP.useMemo)(()=>({layout:vr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Mt.jsxs)(Mt.Fragment,{children:[!r&&t.label&&(0,Mt.jsx)(zTe,{title:t.label}),(0,Mt.jsx)(fn,{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,Mt.jsxs)(_s.__experimentalHStack,{className:"dataforms-layouts-regular__field",children:[(0,Mt.jsx)("div",{className:F("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${c}`),children:u.label}),(0,Mt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:u.readOnly===!0?(0,Mt.jsx)(u.render,{item:e,field:u}):(0,Mt.jsx)(u.Edit,{data:e,field:u,onChange:o,hideLabelFromVision:!0,validity:n},u.id)})]}):(0,Mt.jsx)("div",{className:"dataforms-layouts-regular__field",children:u.readOnly===!0?(0,Mt.jsx)(Mt.Fragment,{children:(0,Mt.jsxs)(Mt.Fragment,{children:[!r&&c!=="none"&&(0,Mt.jsx)(_s.BaseControl.VisualLabel,{children:u.label}),(0,Mt.jsx)(u.render,{item:e,field:u})]})}):(0,Mt.jsx)(u.Edit,{data:e,field:u,onChange:o,hideLabelFromVision:c==="none"?!0:r,validity:n})})}var FP=l(A()),zP=l(O());var Ti=l(A()),Eae=l(M()),DP=l(O());var Tae=l(q());var Bae=l(A()),MP=l(M()),vb=l(x());function jTe({summaryFields:e,data:t,labelPosition:o,fieldLabel:r,disabled:n,onClick:i,"aria-expanded":s}){return(0,vb.jsx)(Bae.Button,{className:"dataforms-layouts-panel__summary-button",size:"compact",variant:["none","top"].includes(o)?"link":"tertiary","aria-expanded":s,"aria-label":(0,MP.sprintf)((0,MP._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,vb.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:e.map(a=>(0,vb.jsx)("div",{style:{width:"100%"},children:(0,vb.jsx)(a.render,{item:t,field:a})},a.id))}):e.map(a=>(0,vb.jsx)(a.render,{item:t,field:a},a.id))})}var NP=jTe;var yr=l(x());function HTe({title:e,onClose:t}){return(0,yr.jsx)(Ti.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,yr.jsxs)(Ti.__experimentalHStack,{alignment:"center",children:[e&&(0,yr.jsx)(Ti.__experimentalHeading,{level:2,size:13,children:e}),(0,yr.jsx)(Ti.__experimentalSpacer,{}),t&&(0,yr.jsx)(Ti.Button,{label:(0,Eae.__)("Close"),icon:$d,onClick:t,size:"small"})]})})}function UTe({data:e,field:t,onChange:o,validity:r,labelPosition:n="side",summaryFields:i,fieldDefinition:s,popoverAnchor:a}){let c=t.children?t.label:s?.label,u=(0,DP.useMemo)(()=>({layout:vr,fields:t.children?t.children:[{id:t.id,layout:vr}]}),[t]),d=(0,DP.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),f=(0,DP.useMemo)(()=>({anchor:a,placement:"left-start",offset:36,shift:!0}),[a]),m=(0,Tae.useFocusOnMount)("firstInputElement");return(0,yr.jsx)(Ti.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:f,focusOnMount:!1,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:p,onToggle:h})=>(0,yr.jsx)(NP,{summaryFields:i,data:e,labelPosition:n,fieldLabel:c,disabled:s.readOnly===!0,onClick:h,"aria-expanded":p}),renderContent:({onClose:p})=>(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(HTe,{title:c,onClose:p}),(0,yr.jsx)("div",{ref:m,children:(0,yr.jsx)(fn,{data:e,form:u,onChange:o,validity:d,children:(h,g,b)=>(0,yr.jsx)(h,{data:e,field:g,onChange:o,hideLabelFromVision:(u?.fields??[]).length<2,validity:b},g.id)})})]})})}var Iae=UTe;var H3=l(aD()),sc=l(A()),U3=l(M()),wd=l(O()),Mae=l(q());var Pae=l(aD()),j3=l(zd()),Na=l(O()),_r=l(M());function Oae(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?Oae(r):r.type==="valid")):!0}function GTe(e,t){let o=AP(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]=L_([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]=L_([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function Pm(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 WTe(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=>Pm(u,{elements:{type:"invalid",message:(0,_r.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})&&n(u=>Pm(u,{elements:{type:"invalid",message:(0,_r.__)("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,_r.__)("Unknown error when running elements validation asynchronously."),n(d=>Pm(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function $Te(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=>Pm(c,{custom:{type:"valid",message:(0,_r.__)("Valid")}},[...i,t.id]));return}if(typeof a=="string"){n(c=>Pm(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>Pm(c,{custom:{type:"invalid",message:(0,_r.__)("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,_r.__)("Unknown error when running custom validation asynchronously."),n(u=>Pm(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function Rae(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,_r.__)("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,_r.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,_r.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,_r.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,_r.__)("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,_r.__)("Value must be one of the elements.")}};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function")return WTe(t.field.getElements(),t,o),{elements:{type:"validating",message:(0,_r.__)("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,Pae.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,_r.__)("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 $Te(r,t,o),{custom:{type:"validating",message:(0,_r.__)("Validating\u2026")}};if(t.children.length>0){let n={};t.children.forEach(s=>{n[s.id]=Rae(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 Aae(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>Aae(n,t));return r?{value:o,children:r}:o}function KTe(e,t,o){let[r,n]=(0,Na.useState)(),i=(0,Na.useRef)({}),s=(0,Na.useRef)({}),a=(0,Na.useRef)({}),c=(0,Na.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=GTe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(p=>{let h=Aae(p,e);if(a.current.hasOwnProperty(p.id)&&(0,j3.default)(a.current[p.id],h)){m.push(p.id);return}a.current[p.id]=h;let g=Rae(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,j3.default)(p,h)?p:h})},[e,t,o]);return(0,Na.useEffect)(()=>{c()},[c]),{validity:r,isValid:Oae(r)}}var Lae=KTe;var Gr=l(x());function YTe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n}){let{fields:i}=(0,wd.useContext)(Ei),[s,a]=(0,wd.useState)({}),c=(0,wd.useMemo)(()=>(0,H3.default)(e,s,{arrayMerge:(g,b)=>b}),[e,s]),u=(0,wd.useMemo)(()=>({layout:vr,fields:t.children?t.children:[{id:t.id,layout:vr}]}),[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}=Lae(c,d,u),m=()=>{o(s),n()},p=g=>{a(b=>(0,H3.default)(b,g,{arrayMerge:(k,y)=>y}))},h=(0,Mae.useFocusOnMount)("firstInputElement");return(0,Gr.jsxs)(sc.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,Gr.jsx)("div",{ref:h,children:(0,Gr.jsx)(fn,{data:c,form:u,onChange:p,validity:f,children:(g,b,k)=>(0,Gr.jsx)(g,{data:c,field:b,onChange:p,hideLabelFromVision:u.fields.length<2,validity:k},b.id)})}),(0,Gr.jsxs)(sc.__experimentalHStack,{className:"dataforms-layouts-panel__modal-footer",spacing:3,children:[(0,Gr.jsx)(sc.__experimentalSpacer,{}),(0,Gr.jsx)(sc.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,U3.__)("Cancel")}),(0,Gr.jsx)(sc.Button,{variant:"primary",onClick:m,__next40pxDefaultSize:!0,children:(0,U3.__)("Apply")})]})]})}function qTe({data:e,field:t,onChange:o,labelPosition:r,summaryFields:n,fieldDefinition:i}){let[s,a]=(0,wd.useState)(!1),c=t.children?t.label:i?.label;return(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)(NP,{summaryFields:n,data:e,labelPosition:r,fieldLabel:c,disabled:i.readOnly===!0,onClick:()=>a(!0),"aria-expanded":s}),s&&(0,Gr.jsx)(YTe,{data:e,field:t,onChange:o,fieldLabel:c??"",onClose:()=>a(!1)})]})}var Nae=qTe;function ZTe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var VP=(e,t)=>Array.isArray(e)&&e.length>0?ZTe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var Ss=l(x()),XTe=(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})},QTe=(e,t,o)=>{let r=VP(e.summary,o),n=XTe(t,o);return r.length===0?{summaryFields:n?[n]:[],fieldDefinition:n}:{summaryFields:r,fieldDefinition:n}};function Dae({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,zP.useContext)(Ei),i=t.layout,[s,a]=(0,zP.useState)(null),{fieldDefinition:c,summaryFields:u}=QTe(i,t,n);if(!c)return null;let d=i.labelPosition,f=F("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${d}`),m=t.children?t.label:c?.label,p=i.openAs==="modal"?(0,Ss.jsx)(Nae,{data:e,field:t,onChange:o,labelPosition:d,summaryFields:u,fieldDefinition:c}):(0,Ss.jsx)(Iae,{data:e,field:t,onChange:o,validity:r,labelPosition:d,summaryFields:u,fieldDefinition:c,popoverAnchor:s});return d==="top"?(0,Ss.jsxs)(FP.__experimentalVStack,{className:"dataforms-layouts-panel__field",spacing:0,children:[(0,Ss.jsx)("div",{className:f,style:{paddingBottom:0},children:m}),(0,Ss.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:p})]}):d==="none"?(0,Ss.jsx)("div",{className:"dataforms-layouts-panel__field",children:p}):(0,Ss.jsxs)(FP.__experimentalHStack,{ref:a,className:"dataforms-layouts-panel__field",children:[(0,Ss.jsx)("div",{className:f,children:m}),(0,Ss.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:p})]})}var xs=l(A()),ac=l(O());var oo=l(x()),JTe=({children:e,...t})=>(0,oo.jsx)(xs.CardHeader,{isBorderless:!0,...t,children:(0,oo.jsx)("div",{style:{height:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:e})});function eIe(e){let{isOpened:t,isCollapsible:o}=e,[r,n]=(0,ac.useState)(t),i=(0,ac.useCallback)(()=>{n(u=>!u)},[]),s=(0,ac.useCallback)(({children:u,...d})=>(0,oo.jsxs)(xs.CardHeader,{...d,onClick:i,style:{cursor:"pointer",...d.style},isBorderless:!0,children:[(0,oo.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:u}),(0,oo.jsx)(xs.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:r?Wd:Fi,"aria-expanded":r,"aria-label":r?"Collapse":"Expand"})]}),[i,r]);return{isOpen:o?r:!0,CardHeader:o?s:JTe}}function tIe(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 Vae({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{fields:i}=(0,ac.useContext)(Ei),s=t.layout,a=(0,ac.useMemo)(()=>({layout:vr,fields:t.children??[]}),[t]),{isOpen:c,CardHeader:u}=eIe(s),f=VP(s.summary,i).filter(k=>tIe(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,oo.jsxs)(xs.Card,{className:"dataforms-layouts-card__field",size:m,children:[k&&(0,oo.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,oo.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:t.label}),f.length>0&&s.withHeader&&(0,oo.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:f.map(v=>(0,oo.jsx)(v.render,{item:e,field:v},v.id))})]}),(c||!k)&&(0,oo.jsxs)(xs.CardBody,{size:y,className:"dataforms-layouts-card__field-control",children:[t.description&&(0,oo.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,oo.jsx)(fn,{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=Om("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,oo.jsxs)(xs.Card,{className:"dataforms-layouts-card__field",size:m,children:[g&&(0,oo.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,oo.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:p.label}),f.length>0&&s.withHeader&&(0,oo.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:f.map(k=>(0,oo.jsx)(k.render,{item:e,field:k},k.id))})]}),(c||!g)&&(0,oo.jsx)(xs.CardBody,{size:b,className:"dataforms-layouts-card__field-control",children:(0,oo.jsx)(h,{data:e,field:t,onChange:o,hideLabelFromVision:r||g,validity:n})})]})}var lc=l(A());var Oo=l(x());function oIe({title:e}){return(0,Oo.jsx)(lc.__experimentalVStack,{className:"dataforms-layouts-row__header",spacing:4,children:(0,Oo.jsxs)(lc.__experimentalHStack,{alignment:"center",children:[(0,Oo.jsx)(lc.__experimentalHeading,{level:2,size:13,children:e}),(0,Oo.jsx)(lc.__experimentalSpacer,{})]})})}var rIe=({children:e})=>(0,Oo.jsx)(Oo.Fragment,{children:e});function Fae({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let i=t.layout;if(t.children){let a={layout:vr,fields:t.children};return(0,Oo.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,Oo.jsx)(oIe,{title:t.label}),(0,Oo.jsx)(lc.__experimentalHStack,{alignment:i.alignment,spacing:4,children:(0,Oo.jsx)(fn,{data:e,form:a,onChange:o,validity:n?.children,as:rIe,children:(c,u,d)=>(0,Oo.jsx)("div",{className:"dataforms-layouts-row__field-control",style:i.styles[u.id],children:(0,Oo.jsx)(c,{data:e,field:u,onChange:o,hideLabelFromVision:r,validity:d})},u.id)})})]})}let s=Om("regular")?.component;return s?(0,Oo.jsx)(Oo.Fragment,{children:(0,Oo.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Oo.jsx)(s,{data:e,field:t,onChange:o,validity:n})})}):null}var jP=l(O()),zae=l(M());var Rm=l(x());function jae({data:e,field:t,onChange:o}){let{fields:r}=(0,jP.useContext)(Ei),n=(0,jP.useMemo)(()=>({layout:vr,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,Rm.jsx)(s.render,{item:e,field:s}):a=t.label||(0,zae.__)("More details"),(0,Rm.jsxs)("details",{className:"dataforms-layouts-details__details",children:[(0,Rm.jsx)("summary",{className:"dataforms-layouts-details__summary",children:a}),(0,Rm.jsx)("div",{className:"dataforms-layouts-details__content",children:(0,Rm.jsx)(fn,{data:e,form:n,onChange:o})})]})}var Am=l(x()),nIe=[{type:"regular",component:Cae,wrapper:({children:e})=>(0,Am.jsx)(Lm.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e})},{type:"panel",component:Dae,wrapper:({children:e})=>(0,Am.jsx)(Lm.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:2,children:e})},{type:"card",component:Vae,wrapper:({children:e})=>(0,Am.jsx)(Lm.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:6,children:e})},{type:"row",component:Fae,wrapper:({children:e,layout:t})=>(0,Am.jsx)(Lm.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:(0,Am.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Am.jsx)(Lm.__experimentalHStack,{spacing:4,alignment:t.alignment,children:e})})})},{type:"details",component:jae}];function Om(e){return nIe.find(t=>t.type===e)}var HP=l(x()),iIe=({children:e})=>(0,HP.jsx)(Hae.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e});function fn({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,Uae.useContext)(Ei);function a(u){return s.find(d=>d.id===u.id)}let c=i??Om(t.layout.type)?.wrapper??iIe;return(0,HP.jsx)(c,{layout:t.layout,children:t.fields.map(u=>{let d=Om(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,HP.jsx)(d,{data:e,field:u,onChange:o,validity:r?.[u.id]},u.id)})})}var W3=l(x());function $3({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,G3.useMemo)(()=>AP(t),[t]),s=(0,G3.useMemo)(()=>L_(o),[o]);return t.fields?(0,W3.jsx)(Sae,{fields:s,children:(0,W3.jsx)(fn,{data:e,form:i,onChange:r,validity:n})}):null}var YP=l(O());var _b=l(A());var K3=l(M());var Gae=l(q());function yb({isControl:e}={isControl:!1}){return(0,Gae.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var UP=l(x());function Wae({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=yb();return!e||e.length===0?null:(0,UP.jsx)(_b.DropdownMenu,{icon:zi,label:(0,K3.__)("Options"),popoverProps:r,children:({onClose:n})=>(0,UP.jsx)(_b.MenuGroup,{label:(0,K3.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,UP.jsx)(_b.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?Ya:null,children:i.label},i.id)})})})}var GP=l(A()),$ae=l(q()),Kae=l(V()),Mm=l(O()),WP=l(Mo());var ws=l(x());function Yae({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Kae.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,u=N=>{let D=t.setValue({item:e,value:N});r(D)},[d,f]=(0,Mm.useState)({start:void 0,end:void 0}),[m,p]=(0,Mm.useState)(!1),h=(0,Mm.useRef)(),g=(0,Mm.useRef)(new Set),b=(0,Mm.useRef)(new Set),k=Dg({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats}),{formatTypes:y,prepareHandlers:v,valueHandlers:S,changeHandlers:w,dependencies:C}=jT({clientId:c,identifier:t.id,allowedFormats:k,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,disableNoneEssentialFormatting:!0});function E(N){return S.reduce((D,W)=>W(D,N.text),N.formats)}function I(N){return y.forEach(D=>{D.__experimentalCreatePrepareEditableTree&&(N=(0,WP.removeFormat)(N,D.name,0,N.text.length))}),N.formats}function R(N){return v.reduce((D,W)=>W(D,N.text),N.formats)}function B(){h.current?.focus()}let{value:P,getValue:T,onChange:L,ref:z}=(0,WP.__unstableUseRichText)({value:s,onChange(N,{__unstableFormats:D,__unstableText:W}){u(N),Object.values(w).forEach($=>{$(D,W)})},selectionStart:d.start,selectionEnd:d.end,onSelectionChange:(N,D)=>f({start:N,end:D}),__unstableIsSelected:m,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,__unstableDependencies:C,__unstableAfterParse:E,__unstableBeforeSerialize:I,__unstableAddInvisibleFormats:R}),{baseControlProps:U,controlProps:H}=(0,GP.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,ws.jsxs)(ws.Fragment,{children:[m&&(0,ws.jsx)(Hg.Provider,{value:b,children:(0,ws.jsx)(Gg.Provider,{value:g,children:(0,ws.jsx)("div",{children:(0,ws.jsx)(XT,{value:P,onChange:L,onFocus:B,formatTypes:y,forwardedRef:h,isVisible:!1})})})}),(0,ws.jsx)(GP.BaseControl,{__nextHasNoMarginBottom:!0,...U,children:(0,ws.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,$ae.useMergeRefs)([z,YT({registry:i,getValue:T,onChange:L,formatTypes:y,selectionChange:f,isSelected:m,disableFormats:a?.disableFormats,value:P,tagName:"div",removeEditorOnlyFormats:I,disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:b,inputEvents:g}),h]),onFocus:()=>p(!0),onBlur:()=>p(!1),contentEditable:!0,...H})})]})}var Nm=l(A()),qae=l(V()),Sb=l(M());var Ro=l(x());function sIe({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,Ro.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,Ro.jsx)("img",{className:"block-editor-content-only-controls__media-thumbnail",alt:"",width:24,height:24,src:a});let c;if(n[0]==="image"?c=ak:n[0]==="video"?c=aL:n[0]==="audio"?c=hO:c=ap,c)return(0,Ro.jsx)(Nm.Icon,{icon:c,size:24})}return(0,Ro.jsx)(Nm.Icon,{icon:ap,size:24})}function Zae({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=yb({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,qae.useSelect)(g=>{if(!f)return;let k=g(_).getSettings()[bS];if(k)return k(g,f)},[f]),h;if(s.length===1){let g=s[0];g==="image"?h=(0,Sb.__)("Choose an image\u2026"):g==="video"?h=(0,Sb.__)("Choose a video\u2026"):g==="application"?h=(0,Sb.__)("Choose a file\u2026"):h=(0,Sb.__)("Choose a media item\u2026")}else h=(0,Sb.__)("Choose a media item\u2026");return(0,Ro.jsx)(ns,{children:(0,Ro.jsx)(Mg,{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,Ro.jsx)(Nm.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...g,children:(0,Ro.jsxs)(Nm.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__media-row",children:[m&&(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)(sIe,{attachment:p,field:t,data:e}),(0,Ro.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:p?.title?.raw&&p?.title?.raw!==""?p?.title?.raw:m})]}),!m&&(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"24px",height:"24px"}}),(0,Ro.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:h})]})]})})})})}var cc=l(A()),KP=l(O()),Xae=l(M());var Qae=l($r());var lr=l(x()),Y3="noreferrer noopener",Jae="_blank",$P="nofollow";function aIe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=Jae,i=i?.includes(Y3)?i:i+` ${Y3}`;else{let s=new RegExp(`\\b${Y3}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes($P)?i:(i+` ${$P}`).trim();else{let s=new RegExp(`\\b${$P}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,Qae.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function ele({data:e,field:t,onChange:o,config:r={}}){let[n,i]=(0,KP.useState)(!1),{popoverProps:s}=yb({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===Jae,h=f===$P,g=(0,KP.useMemo)(()=>({url:d,opensInNewTab:p,nofollow:h}),[d,p,h]);return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(cc.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{i(!0)},children:(0,lr.jsxs)(cc.__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)(cc.Icon,{icon:Kr,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)(cc.Icon,{icon:Kr,size:24,style:{opacity:.3}}),(0,lr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,Xae.__)("Link")})]})]})}),n&&(0,lr.jsx)(cc.Popover,{onClose:()=>{i(!1)},...s??{},children:(0,lr.jsx)(Lg,{value:g,onChange:b=>{let k=aIe({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 Me=l(x()),{fieldsKey:lIe,formKey:cIe}=j(M_.privateApis),nle={richtext:Yae,media:Zae,link:ele};function uIe(e){let{control:t,...o}=e,r=nle[t];if(!r)throw new Error(`Control type "${t}" not found`);return function(i){return(0,Me.jsx)(r,{...i,config:o})}}function dIe(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 fIe(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 mIe(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 pIe(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 tle({clientId:e}){let{attributes:t,blockType:o}=(0,xb.useSelect)(f=>{let{getBlockAttributes:m,getBlockName:p}=f(_),{getBlockType:h}=f(M_.store),g=p(e);return{attributes:m(e),blockType:h(g)}},[e]),{updateBlockAttributes:r}=(0,xb.useDispatch)(_),n=Do({clientId:e,context:"list-view"}),i=mt(e),s=o?.[lIe],[a,c]=(0,YP.useState)(()=>o?.[cIe]),u=(0,YP.useMemo)(()=>s?.length?s.map(f=>{let m=nle[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"?dIe(b,f):f.type==="link"?mIe(b,f):b}return g[f.id]},setValue:({item:g,value:b})=>{if(f.mapping){let k=b;f.type==="media"?k=fIe(b,f):f.type==="link"&&(k=pIe(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=uIe({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,Me.jsxs)("div",{className:"block-editor-content-only-controls__fields-container",children:[(0,Me.jsx)("div",{className:"block-editor-content-only-controls__fields-header",children:(0,Me.jsxs)(Wr.__experimentalHStack,{spacing:1,justify:"space-between",expanded:!0,children:[(0,Me.jsxs)(Wr.__experimentalHStack,{spacing:1,justify:"flex-start",children:[(0,Me.jsx)(Te,{icon:i?.icon}),(0,Me.jsx)("div",{children:n})]}),(0,Me.jsx)(Wae,{fields:u,visibleFields:a.fields,onToggleField:d})]})}),(0,Me.jsx)($3,{data:t,fields:u,form:a,onChange:f=>{r(e,f)}})]}):null}function hIe({clientId:e}){let t=Do({clientId:e,context:"list-view"}),o=mt(e);return(0,Me.jsx)("div",{className:"block-editor-content-only-controls__button-panel",children:(0,Me.jsx)(Wr.Navigator.Button,{path:`/${e}`,className:"block-editor-content-only-controls__drill-down-button",children:(0,Me.jsxs)(Wr.__experimentalHStack,{expanded:!0,justify:"space-between",children:[(0,Me.jsxs)(Wr.__experimentalHStack,{justify:"flex-start",spacing:1,children:[(0,Me.jsx)(Te,{icon:o?.icon}),(0,Me.jsx)("div",{children:t})]}),(0,Me.jsx)(Wr.Icon,{icon:Gd})]})})})}function ole({rootClientId:e,contentClientIds:t,parentClientIds:o,isNested:r}){let n=(0,xb.useSelect)(i=>{let{getBlockName:s}=i(_),a=s(e),{hasContentRoleAttribute:c}=j(i(M_.store));return c(a)},[e]);return!n&&!t.length?null:(0,Me.jsxs)(Me.Fragment,{children:[r&&(0,Me.jsx)("div",{className:"block-editor-content-only-controls__button-panel",children:(0,Me.jsx)(Wr.Navigator.BackButton,{className:"block-editor-content-only-controls__back-button",children:(0,Me.jsxs)(Wr.__experimentalHStack,{expanded:!0,spacing:1,justify:"flex-start",children:[(0,Me.jsx)(Wr.Icon,{icon:Ud}),(0,Me.jsx)("div",{children:(0,rle.__)("Back")})]})})}),n&&(0,Me.jsx)(tle,{clientId:e}),t.map(i=>o?.[i]?(0,Me.jsx)(hIe,{clientId:i},i):(0,Me.jsx)(tle,{clientId:i},i))]})}function ile({rootClientId:e}){let{updatedRootClientId:t,nestedContentClientIds:o,contentClientIds:r}=(0,xb.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,Me.jsxs)(Wr.Navigator,{initialPath:"/",children:[(0,Me.jsx)(Wr.Navigator.Screen,{path:"/",className:"block-editor-content-only-controls__screen",children:(0,Me.jsx)(ole,{rootClientId:t??e,contentClientIds:r,parentClientIds:o})}),Object.keys(o).map(n=>(0,Me.jsx)(Wr.Navigator.Screen,{path:`/${n}`,className:"block-editor-content-only-controls__screen",children:(0,Me.jsx)(ole,{isNested:!0,rootClientId:n,contentClientIds:o[n]})},n))]})}var Cd=l(x()),gIe=({rootClientId:e,contentClientIds:t})=>{if(!t||t.length===0)return null;let o=window?.__experimentalContentOnlyPatternInsertion&&window?.__experimentalContentOnlyInspectorFields;return(0,Cd.jsxs)(Cd.Fragment,{children:[!o&&(0,Cd.jsx)(sle.PanelBody,{title:(0,ale.__)("Content"),children:(0,Cd.jsx)(nP,{clientIds:t})}),o&&(0,Cd.jsx)(ile,{rootClientId:e})]})},qP=gIe;var bIe=["core/navigation"],kIe=e=>!bIe.includes(e),ZP=kIe;var cr=l(x()),{Tabs:Bd}=j(wb.privateApis);function q3({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,cle.useSelect)(d=>d(lle.store).get("core","showIconLabels"),[]),a=ZP(e)?void 0:h_.name,[c,u]=(0,XP.useState)(a??r[0]?.name);return(0,XP.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)(Bd,{defaultTabId:a,selectedTabId:c,onSelect:u,children:[(0,cr.jsx)(Bd.TabList,{children:r.map(d=>s?(0,cr.jsx)(Bd.Tab,{tabId:d.name,children:d.title},d.name):(0,cr.jsx)(wb.Tooltip,{text:d.title,children:(0,cr.jsx)(Bd.Tab,{tabId:d.name,"aria-label":d.title,children:(0,cr.jsx)(wb.Icon,{icon:d.icon})})},d.name))}),(0,cr.jsx)(Bd.TabPanel,{tabId:mI.name,focusable:!1,children:(0,cr.jsx)(Jre,{showAdvancedControls:!!e})}),(0,cr.jsx)(Bd.TabPanel,{tabId:pI.name,focusable:!1,children:(0,cr.jsx)(vie,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})}),(0,cr.jsx)(Bd.TabPanel,{tabId:hI.name,focusable:!1,children:(0,cr.jsx)(qP,{rootClientId:t,contentClientIds:i})}),(0,cr.jsx)(Bd.TabPanel,{tabId:h_.name,focusable:!1,children:(0,cr.jsx)(pe.Slot,{group:"list"})})]},t)})}var Ii=l(A()),ule=l(V());var vIe=[];function yIe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function dle(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}=Bu,g=ZP(e),b=(0,Ii.__experimentalUseSlotFills)(d.name),k=!g&&!!b&&b.length,v=[...(0,Ii.__experimentalUseSlotFills)(s.name)||[],...(0,Ii.__experimentalUseSlotFills)(a.name)||[],...(0,Ii.__experimentalUseSlotFills)(u.name)||[],...(0,Ii.__experimentalUseSlotFills)(m.name)||[],...(0,Ii.__experimentalUseSlotFills)(p.name)||[],...(0,Ii.__experimentalUseSlotFills)(h.name)||[]].length,S=[...(0,Ii.__experimentalUseSlotFills)(Eu.slotName)||[],...(0,Ii.__experimentalUseSlotFills)(i.name)||[]],w=[...(0,Ii.__experimentalUseSlotFills)(c.name)||[],...(0,Ii.__experimentalUseSlotFills)(f.name)||[],...k&&v>1?S:[]],C=!!(t&&t.length>0);k&&!o&&n.push(h_),C&&n.push(hI),w.length&&!o&&n.push(mI),(r||v)&&n.push(pI);let E=(0,ule.useSelect)(R=>R(_).getSettings().blockInspectorTabs,[]);return yIe(e,E)?n:vIe}var fle=l(V());function mle(e){return(0,fle.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 _Ie({clientId:e}){return(0,ve.jsx)(QP.PanelBody,{title:(0,Dm.__)("Styles"),children:(0,ve.jsx)(mg,{clientId:e})})}function ple({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showListControls:r=!1,showBindingsControls:n=!0}){let i=rb({blockName:e});return(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)(pe.Slot,{}),r&&(0,ve.jsx)(pe.Slot,{group:"list"}),(0,ve.jsx)(pe.Slot,{group:"color",label:(0,Dm.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,ve.jsx)(pe.Slot,{group:"background",label:(0,Dm.__)("Background image")}),(0,ve.jsx)(pe.Slot,{group:"typography",label:(0,Dm.__)("Typography")}),(0,ve.jsx)(pe.Slot,{group:"dimensions",label:(0,Dm.__)("Dimensions")}),(0,ve.jsx)(pe.Slot,{group:"border",label:i}),(0,ve.jsx)(pe.Slot,{group:"styles"}),o&&(0,ve.jsx)(bI,{}),n&&(0,ve.jsx)(pe.Slot,{group:"bindings"}),t&&(0,ve.jsx)("div",{children:(0,ve.jsx)(k_,{})})]})}function SIe(){let{selectedBlockCount:e,selectedBlockClientId:t,renderedBlockName:o,renderedBlockClientId:r,blockType:n,isSectionBlock:i,isSectionBlockInSelection:s,hasBlockStyles:a,editedContentOnlySection:c}=(0,Z3.useSelect)(b=>{let{getSelectedBlockClientId:k,getSelectedBlockClientIds:y,getSelectedBlockCount:v,getBlockName:S,getParentSectionBlock:w,isSectionBlock:C,getEditedContentOnlySection:E,isWithinEditedContentOnlySection:I}=j(b(_)),{getBlockStyles:R}=b(Cb.store),B=k(),T=I(B)?B:w(B)||B,L=T&&S(T),z=L&&(0,Cb.getBlockType)(L),H=y().some(W=>C(W)),N=L&&R(L),D=N&&N.length>0;return{selectedBlockCount:v(),selectedBlockClientId:B,renderedBlockClientId:T,renderedBlockName:L,blockType:z,isSectionBlockInSelection:H,isSectionBlock:C(T),hasBlockStyles:D,editedContentOnlySection:E()}},[]),u=(0,Z3.useSelect)(b=>{if(!i||!r)return[];let{getClientIdsOfDescendants:k,getBlockName:y,getBlockEditingMode:v}=j(b(_)),S=k(r),w=new Set;return S.forEach(C=>{y(C)==="core/navigation"&&k(C).forEach(I=>w.add(I))}),S.filter(C=>w.has(C)?!1:y(C)!=="core/list-item"&&v(C)==="contentOnly")},[i,r]),d=dle(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)(o3,{}),f?(0,ve.jsx)(q3,{tabs:d}):(0,ve.jsx)(ple,{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)(o3,{})});let h=o===(0,Cb.getUnregisteredTypeHandlerName)();return!n||!r||h?(0,ve.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,Dm.__)("No block selected.")}):(0,ve.jsx)(xIe,{animate:m,wrapper:b=>(0,ve.jsx)(wIe,{blockInspectorAnimationSettings:m,renderedBlockClientId:r,children:b}),children:(0,ve.jsx)(CIe,{renderedBlockClientId:r,selectedBlockClientId:t,blockName:n.name,isSectionBlock:i,availableTabs:d,contentClientIds:u,hasBlockStyles:a,editedContentOnlySection:c})})}var xIe=({animate:e,wrapper:t,children:o})=>e?t(o):o,wIe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,ve.jsx)(QP.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},CIe=({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=mt(a),f=mt(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)(_v,{...d,className:d.isSynced&&"is-synced",parentClientId:a}),(0,ve.jsx)(_v,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),window?.__experimentalContentOnlyPatternInsertion&&(0,ve.jsx)(Gre,{clientId:e}),(0,ve.jsx)(FE,{blockClientId:e}),p&&(0,ve.jsx)(q3,{hasBlockStyles:s,clientId:e,blockName:o,tabs:n,isSectionBlock:r,contentClientIds:i}),!p&&(0,ve.jsxs)(ve.Fragment,{children:[s&&(0,ve.jsx)(_Ie,{clientId:e}),(0,ve.jsx)(qP,{rootClientId:e,contentClientIds:i}),!r&&(0,ve.jsx)(ple,{blockName:o,showListControls:!0}),r&&m&&h&&(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)(pe.Slot,{}),(0,ve.jsx)(k_,{})]})]}),(0,ve.jsx)(dI,{},"back")]})},hle=SIe;var X3=l(Oe());var gle=l(x()),ble=()=>((0,X3.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),Ev());function kle(e){return(0,X3.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,gle.jsx)("div",{...e,ref:Ev()})}var vle=l(V()),Q3=l(O());var J3=l(x()),BIe=()=>{};function EIe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=BIe,shouldFocusBlock:f=!1,onClose:m},p){let{destinationRootClientId:h}=(0,vle.useSelect)(g=>{let{getBlockRootClientId:b}=g(_);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,J3.jsx)(u5,{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 e4=(0,Q3.forwardRef)(EIe);function TIe(e,t){return(0,J3.jsx)(e4,{...e,onPatternCategorySelection:void 0,ref:t})}var yle=(0,Q3.forwardRef)(TIe);var _le=l(Oe());function Sle(){return(0,_le.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var xle=l(q()),N_=l(Ve()),wle=l(V()),Ed=l(nt());var Cle=l(x()),IIe=window.navigator.userAgent.indexOf("Trident")!==-1,PIe=new Set([Ed.UP,Ed.DOWN,Ed.LEFT,Ed.RIGHT]),OIe=.75;function t4(){let e=(0,wle.useSelect)(t=>t(_).hasSelectedBlock(),[]);return(0,xle.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,N_.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(PIe.has(g)){s=b;return}let k=b.top-s.top;if(k===0)return;let y=(0,N_.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<OIe&&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,N_.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 RIe({children:e}){return(0,Cle.jsx)("div",{ref:t4(),className:"block-editor__typewriter",children:e})}var AIe=IIe?e=>e.children:RIe,Ble=AIe;var Vm=l(O()),o4=l(Oe());var r4=l(x()),JP=(0,Vm.createContext)({});JP.displayName="RenderedRefsContext";function LIe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function n4({children:e,uniqueId:t,blockName:o=""}){let r=(0,Vm.useContext)(JP),{name:n}=Ae();o=o||n;let i=(0,Vm.useMemo)(()=>LIe(r,o,t),[r,o,t]);return(0,r4.jsx)(JP.Provider,{value:i,children:e})}function i4(e,t=""){let o=(0,Vm.useContext)(JP),{name:r}=Ae();return t=t||r,!!o[t]?.has(e)}var Ele=e=>((0,o4.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,r4.jsx)(n4,{...e})),Tle=(...e)=>((0,o4.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),i4(...e));var t2=l(A()),s4=l(M()),a4=l(O()),Ple=l(rm());var Fn=l(A());var Ile=l(M()),uc=l(x());function e2({title:e,help:t,actions:o=[],onClose:r}){return(0,uc.jsxs)(Fn.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,uc.jsxs)(Fn.__experimentalHStack,{alignment:"center",children:[(0,uc.jsx)(Fn.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,uc.jsx)(Fn.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,uc.jsx)(Fn.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,uc.jsx)(Fn.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,Ile.__)("Close"),icon:$d,onClick:r})]}),t&&(0,uc.jsx)(Fn.__experimentalText,{children:t})]})}var Bb=l(x());function MIe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,Ple.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?t2.TimePicker:t2.DateTimePicker;return(0,Bb.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,Bb.jsx)(e2,{title:i||(0,s4.__)("Publish"),actions:o?[{label:(0,s4.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,Bb.jsx)(u,{...c})]})}var l4=(0,a4.forwardRef)(MIe);function NIe(e,t){return(0,Bb.jsx)(l4,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var Ole=(0,a4.forwardRef)(NIe);var o2=l(V()),Rle=l(O());function $o(e){let t=Ae(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,o2.useDispatch)(_),i=(0,o2.useSelect)(s=>o?null:s(_).getBlockEditingMode(),[o]);return(0,Rle.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[rS]:i}var Ale=l(Oe()),Lle=l(O());function DIe(){return(0,Ale.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var Mle=(0,Lle.forwardRef)(DIe);var V_=l(x()),xe=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,xe(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function tP(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=Ja(s,d);f&&(a={...a,attributes:me(a.attributes,d,f)})})}),a}function Ke(e,t,o){let n=(0,Nle.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var dc=new WeakMap;function is({id:e,css:t}){return qf({id:e,css:t})}function qf({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=j((0,r2.useDispatch)(_)),c=(0,r2.useRegistry)(),u=(0,Pi.useId)();(0,Pi.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return dc.get(c)||dc.set(c,[]),dc.get(c).push([d,f]),window.queueMicrotask(()=>{dc.get(c)?.length&&c.batch(()=>{dc.get(c).forEach(m=>{s(...m)}),dc.set(c,[])})}),()=>{dc.get(c)?.find(([p])=>p===d)?dc.set(c,dc.get(c).filter(([p])=>p!==d)):a(d)}},[e,t,i,o,r,u,s,a,c])}function wi(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,I,R,B,P,T,L,z,U,H,N,D,W,$,X,te,Z,se,ce,Q,ie,J,G,oe,ue,le,ke,Be,Re,Kt,kt,_o,Yt,We,xt,ro,$e]=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.minHeight","dimensions.width","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"),ho=(0,Pi.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r},color:{palette:{custom:se,theme:Q,default:ie},gradients:{custom:ke,theme:Be,default:Re},duotone:{custom:oe,theme:ue,default:le},defaultGradients:Kt,defaultPalette:J,defaultDuotone:G,custom:Z,customGradient:kt,customDuotone:ce,background:_o,link:Yt,heading:xt,button:ro,text:We},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:P,theme:T},customSpacingSize:R,defaultSpacingSizes:I,padding:w,margin:C,blockGap:E,units:L},border:{color:D,radius:W,style:$,width:X,radiusSizes:te},dimensions:{aspectRatio:z,minHeight:U,width:H},layout:N,parentLayout:t,shadow:$e}),[o,r,n,i,s,a,c,u,d,f,m,p,h,g,b,k,v,S,y,w,C,E,I,R,B,P,T,L,z,U,H,N,t,D,W,$,X,te,Z,se,ce,Q,ie,J,G,oe,ue,le,ke,Be,Re,Kt,kt,_o,Yt,We,xt,ro,$e]);return vI(ho,e)}function Dle(e){e=e.map(o=>({...o,Edit:(0,Pi.memo)(o.edit)}));let t=(0,c4.createHigherOrderComponent)(o=>r=>{let n=Ae();return[...e.map((i,s)=>{let{Edit:a,hasSupport:c,attributeKeys:u=[],shareWithChildBlocks:d}=i;if(!(n[vc]||n[Ym]&&d)||!c(r.name))return null;let m={};for(let p of u)r.attributes[p]&&(m[p]=r.attributes[p]);return(0,V_.jsx)(a,{name:r.name,isSelected:r.isSelected,clientId:r.clientId,setAttributes:r.setAttributes,__unstableParentLayout:r.__unstableParentLayout,...m},s)}),(0,V_.jsx)(o,{...r},"edit")]},"withBlockEditHooks");(0,D_.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function VIe({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,Pi.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var FIe=(0,Pi.memo)(VIe);function Vle(e){let t=(0,c4.createHigherOrderComponent)(o=>r=>{let[n,i]=(0,Pi.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,V_.jsx)(FIe,{index:a,useBlockProps:d,setAllWrapperProps:i,name:r.name,clientId:r.clientId,...m},a)}),(0,V_.jsx)(o,{...r,wrapperProps:n.filter(Boolean).reduce((s,a)=>({...s,...a,className:F(s.className,a.className),style:{...s.style,...a.style}}),r.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,D_.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function Fle(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,D_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,D_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var zle=l(K()),jle=l(ot());function zIe(e){let{apiVersion:t=1}=e;return t<2&&(0,zle.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,jle.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",zIe);var Hle=l(ot()),Oi=l(K());var u4=l(x()),d4=["left","center","right","wide","full"],jIe=["wide","full"];function f4(e,t=!0,o=!0){let r;return Array.isArray(e)?r=d4.filter(n=>e.includes(n)):e===!0?r=[...d4]:r=[],!o||e===!0&&!t?r.filter(n=>!jIe.includes(n)):r}function HIe(e){return"type"in(e.attributes?.align??{})||(0,Oi.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...d4,""]}}),e}function UIe({name:e,align:t,setAttributes:o}){let r=f4((0,Oi.getBlockSupport)(e,"align"),(0,Oi.hasBlockSupport)(e,"alignWide",!0)),n=$k(r).map(({name:a})=>a),i=$o();return!n.length||i!=="default"?null:(0,u4.jsx)(ut,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,u4.jsx)(Qx,{value:t,onChange:a=>{a||(0,Oi.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var n2={shareWithChildBlocks:!0,edit:UIe,useBlockProps:GIe,addSaveProps:WIe,attributeKeys:["align"],hasSupport(e){return(0,Oi.hasBlockSupport)(e,"align",!1)}};function GIe({name:e,align:t}){let o=f4((0,Oi.getBlockSupport)(e,"align"),(0,Oi.hasBlockSupport)(e,"alignWide",!0));return $k(o).some(n=>n.name===t)?{"data-align":t}:{}}function WIe(e,t,o){let{align:r}=o,n=(0,Oi.getBlockSupport)(t,"align"),i=(0,Oi.hasBlockSupport)(t,"alignWide",!0);return f4(n,i).includes(r)&&(e.className=F(`align${r}`,e.className)),e}(0,Hle.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",HIe);var Ule=l(ot());function $Ie(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,Ule.addFilter)("blocks.registerBlockType","core/lock/addAttribute",$Ie);var b4=l(ot()),Pb=l(K());var z_=l(A()),a2=l(M()),tce=l(O()),oce=l(V()),l2=l(K());var mn=l(A()),Qle=l(O()),F_=l(M()),Jle=l(V());var h4=l(K()),qle=l(V()),Ib=l(A()),Cs=l(M()),i2=l(O()),Zle=l(q()),Xle=l(Xo());var m4=l(O()),$le=l(q()),Kle=l(A());var Gle=l(A());var Eb=l(x());function KIe({blockTypes:e,value:t,onItemChange:o}){return(0,Eb.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,Eb.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,Eb.jsx)(Gle.CheckboxControl,{__nextHasNoMarginBottom:!0,label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,Eb.jsx)(Te,{icon:r.icon})]},r.name))})}var Wle=KIe;var Tb=l(x());function Yle({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,$le.useInstanceId)(Yle),i=(0,m4.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:p})=>p!==f.name))},[o,r]),s=(0,m4.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,Tb.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,Tb.jsx)(Kle.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,Tb.jsx)("span",{id:c,children:e})}),(0,Tb.jsx)(Wle,{blockTypes:t,value:a,onItemChange:i})]})}var p4=Yle;var fc=l(x());function s2({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,Zle.useDebounce)(Xle.speak,500),[i,s]=(0,i2.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,qle.useSelect)(m=>({categories:m(h4.store).getCategories(),isMatchingSearchTerm:m(h4.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,i2.useEffect)(()=>{if(!i)return;let m=u.length,p=(0,Cs.sprintf)((0,Cs._n)("%d result found.","%d results found.",m),m);n(p)},[u?.length,i,n]),(0,fc.jsxs)(Ib.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,fc.jsx)(Ib.SearchControl,{__nextHasNoMarginBottom:!0,label:(0,Cs.__)("Search for a block"),placeholder:(0,Cs.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,fc.jsx)(Ib.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,Cs.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d,__nextHasNoMarginBottom:!0}),(0,fc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,Cs.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,fc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,Cs.__)("No blocks found.")}),a.map(m=>(0,fc.jsx)(p4,{title:m.title,blockTypes:u.filter(p=>p.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,fc.jsx)(p4,{title:(0,Cs.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var Bs=l(x());function ece({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,Qle.useState)(o),{updateBlockAttributes:s}=(0,Jle.useDispatch)(_),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,Bs.jsx)(mn.Modal,{title:(0,F_.__)("Manage allowed blocks"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,Bs.jsxs)(mn.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,Bs.jsx)(mn.__experimentalText,{children:(0,F_.__)("Select which blocks can be added inside this container.")}),(0,Bs.jsx)(s2,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,Bs.jsxs)(mn.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Bs.jsx)(mn.FlexItem,{children:(0,Bs.jsx)(mn.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,F_.__)("Cancel")})}),(0,Bs.jsx)(mn.FlexItem,{children:(0,Bs.jsx)(mn.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,F_.__)("Apply")})})]})]})})}var Fm=l(x());function rce({clientId:e}){let[t,o]=(0,tce.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,oce.useSelect)(a=>{let{getBlockAttributes:c}=a(_);return{blockTypes:a(l2.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,l2.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,Fm.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,Fm.jsxs)(z_.BaseControl,{help:(0,a2.__)("Specify which blocks are allowed inside this container."),__nextHasNoMarginBottom:!0,children:[(0,Fm.jsx)(z_.BaseControl.VisualLabel,{children:(0,a2.__)("Allowed Blocks")}),(0,Fm.jsx)(z_.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,a2.__)("Manage allowed blocks")})]}),t&&(0,Fm.jsx)(ece,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var g4=l(x());function YIe({clientId:e}){return $o()==="contentOnly"?null:(0,g4.jsx)(dy.Fill,{children:(0,g4.jsx)(rce,{clientId:e})})}var nce={edit:YIe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,Pb.hasBlockSupport)(e,"allowedBlocks")}};function qIe(e){return e?.attributes?.allowedBlocks?.type||(0,Pb.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,b4.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",qIe);function ZIe(e,t,o,r){if(!(0,Pb.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,Pb.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,b4.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",ZIe);var ice=l(ot()),c2=l(A()),Ob=l(M()),u2=l(K()),sce=l(O());var Da=l(x()),XIe=/[\s#]/g,QIe={type:"string",source:"attribute",attribute:"id",selector:"*"};function JIe(e){return"type"in(e.attributes?.anchor??{})||(0,u2.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:QIe}),e}function ePe({anchor:e,setAttributes:t}){if($o()!=="default")return null;let r=sce.Platform.OS==="web";return(0,Da.jsx)(pe,{group:"advanced",children:(0,Da.jsx)(c2.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,Ob.__)("HTML anchor"),help:(0,Da.jsxs)(Da.Fragment,{children:[(0,Ob.__)("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,Da.jsxs)(Da.Fragment,{children:[" ",(0,Da.jsx)(c2.ExternalLink,{href:(0,Ob.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,Ob.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,Ob.__)("Add an anchor"),onChange:n=>{n=n.replace(XIe,"-"),t({anchor:n})},autoCapitalize:"none",autoComplete:"off"})})}var k4={addSaveProps:tPe,edit:ePe,attributeKeys:["anchor"],hasSupport(e){return(0,u2.hasBlockSupport)(e,"anchor")}};function tPe(e,t,o){return(0,u2.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,ice.addFilter)("blocks.registerBlockType","core/anchor/attribute",JIe);var ace=l(ot()),d2=l(K());function oPe(e){return e?.attributes?.ariaLabel?.type||(0,d2.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function rPe(e,t,o){return(0,d2.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var lce={addSaveProps:rPe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,d2.hasBlockSupport)(e,"ariaLabel")}};(0,ace.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",oPe);var _4=l(ot()),cce=l(A()),v4=l(M()),j_=l(K());var y4=l(x());function nPe(e){return(0,j_.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function iPe({className:e,setAttributes:t}){return $o()!=="default"?null:(0,y4.jsx)(pe,{group:"advanced",children:(0,y4.jsx)(cce.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,v4.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,v4.__)("Separate multiple classes with spaces.")})})}var S4={edit:iPe,addSaveProps:sPe,attributeKeys:["className"],hasSupport(e){return(0,j_.hasBlockSupport)(e,"customClassName",!0)}};function sPe(e,t,o){return(0,j_.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=F(e.className,o.className)),e}function aPe(e,t,o,r){if(!(0,j_.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,_4.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",nPe);(0,_4.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",aPe);var uce=l(ot()),H_=l(K());function lPe(e,t){return(0,H_.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,H_.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,H_.getBlockDefaultClassName)(t.name)),e}(0,uce.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",lPe);var Nce=l(O()),Dce=l(ot()),Pd=l(K()),Vce=l(q()),Nb=l(Wk());var T4=l(K()),g2=l(O()),xce=l(V());var cPe=l(K());var uPe=l(x()),dce="typography.lineHeight";var fce=l(ot()),f2=l(K()),mce=l(QB()),pce=l(A());var U_="typography.__experimentalFontFamily",{kebabCase:dPe}=j(pce.privateApis);function fPe(e){return(0,f2.hasBlockSupport)(e,U_)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function hce(e,t,o){if(!(0,f2.hasBlockSupport)(t,U_)||Ke(t,Ri,"fontFamily")||!o?.fontFamily)return e;let r=new mce.default(e.className);r.add(`has-${dPe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function mPe({name:e,fontFamily:t}){return hce({},e,{fontFamily:t})}var x4={useBlockProps:mPe,addSaveProps:hce,attributeKeys:["fontFamily"],hasSupport(e){return(0,f2.hasBlockSupport)(e,U_)}};(0,fce.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",fPe);var w4=l(ot()),Rb=l(K()),gce=l(QB());var pPe=l(x()),zm="typography.fontSize";function hPe(e){return(0,Rb.hasBlockSupport)(e,zm)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function bce(e,t,o){if(!(0,Rb.hasBlockSupport)(t,zm)||Ke(t,Ri,"fontSize"))return e;let r=new gce.default(e.className);r.add(Vc(o.fontSize));let n=r.value;return e.className=n||void 0,e}function gPe({name:e,fontSize:t,style:o}){let[r,n,i]=fe("typography.fontSizes","typography.fluid","layout");if(!(0,Rb.hasBlockSupport)(e,zm)||Ke(e,Ri,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:Dl({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:Sp(r,t,o?.typography?.fontSize).size}}),!!s)return bce(s,e,{fontSize:t})}var C4={useBlockProps:gPe,addSaveProps:bce,attributeKeys:["fontSize","style","fitText"],hasSupport(e){return(0,Rb.hasBlockSupport)(e,zm)}},bPe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function kPe(e,t,o,r){let n=e.name,i={fontSize:(0,Rb.hasBlockSupport)(n,zm)};return tP(i,bPe,e,t,o,r)}(0,w4.addFilter)("blocks.registerBlockType","core/font/addAttribute",hPe);(0,w4.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",kPe);var m2=l(M()),Ab=l(K());var B4=l(x()),Lb="typography.textAlign",vPe=[{icon:Cc,title:(0,m2.__)("Align text left"),align:"left"},{icon:jd,title:(0,m2.__)("Align text center"),align:"center"},{icon:Bc,title:(0,m2.__)("Align text right"),align:"right"}],kce=["left","center","right"],yPe=[];function E4(e){return Array.isArray(e)?kce.filter(t=>e.includes(t)):e===!0?kce:yPe}function _Pe({style:e,name:t,setAttributes:o}){let n=wi(t)?.typography?.textAlign,i=$o();if(!n||i!=="default")return null;let s=E4((0,Ab.getBlockSupport)(t,Lb));if(!s.length)return null;let a=vPe.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:xe(d)})};return(0,B4.jsx)(ut,{group:"block",children:(0,B4.jsx)(Lx,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var p2={edit:_Pe,useBlockProps:SPe,addSaveProps:xPe,attributeKeys:["style"],hasSupport(e){return(0,Ab.hasBlockSupport)(e,Lb,!1)}};function SPe({name:e,style:t}){if(!t?.typography?.textAlign||!E4((0,Ab.getBlockSupport)(e,Lb)).length||Ke(e,Ri,"textAlign"))return null;let r=t.typography.textAlign;return{className:F({[`has-text-align-${r}`]:r})}}function xPe(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Ab.getBlockSupport)(t,Lb);return E4(n).includes(r)&&!Ke(t,Ri,"textAlign")&&(e.className=F(`has-text-align-${r}`,e.className)),e}var yce=l(ot()),Mb=l(K()),G_=l(O()),_ce=l(V());function wPe(e,t){let o=e.scrollHeight>e.clientHeight,r=5,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 vce(e,t){if(!e)return;t(0);let o=wPe(e,t);return t(o),o}var CPe={},jm="typography.fitText";function BPe(e){return!(0,Mb.hasBlockSupport)(e,jm)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function EPe({fitText:e,name:t,clientId:o}){let r=(0,Mb.hasBlockSupport)(t,jm),n=dt(o),{blockAttributes:i,parentId:s}=(0,_ce.useSelect)(c=>!o||!r||!e?CPe:{blockAttributes:c(_).getBlockAttributes(o),parentId:c(_).getBlockRootClientId(o)},[o,r,e]),a=(0,G_.useCallback)(()=>{if(!n||!r||!e)return;let c=`fit-text-${o}`,u=n.ownerDocument.getElementById(c);u||(u=n.ownerDocument.createElement("style"),u.id=c,n.ownerDocument.head.appendChild(u));let d=`#block-${o}`;vce(n,m=>{m===0?u.textContent="":u.textContent=`${d} { font-size: ${m}px !important; }`})},[n,o,r,e]);(0,G_.useEffect)(()=>{if(!e||!n||!o||!r)return;let c=n,u=c.style.visibility,d=null,f=null,m=null;d=window.requestAnimationFrame(()=>{c.style.visibility="hidden",f=window.requestAnimationFrame(()=>{a(),m=setTimeout(()=>{c.style.visibility=u},10)})});let p;return window.ResizeObserver&&c.parentElement&&(p=new window.ResizeObserver(a),p.observe(c.parentElement),p.observe(c)),()=>{d!==null&&window.cancelAnimationFrame(d),f!==null&&window.cancelAnimationFrame(f),m!==null&&clearTimeout(m),p&&p.disconnect();let h=`fit-text-${o}`,g=c.ownerDocument.getElementById(h);g&&g.remove()}},[e,o,s,a,n,r]),(0,G_.useEffect)(()=>{if(e&&n&&r){let c=window.requestAnimationFrame(()=>{n&&a()});return()=>window.cancelAnimationFrame(c)}},[i,e,a,n,r])}function TPe(e,t,o){if(!(0,Mb.hasBlockSupport)(t,jm))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 IPe({name:e,fitText:t,clientId:o}){return EPe({fitText:t,name:e,clientId:o}),!t||!(0,Mb.hasBlockSupport)(e,jm)?{}:{className:"has-fit-text"}}(0,yce.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",BPe);var PPe=e=>(0,Mb.hasBlockSupport)(e,jm),h2={useBlockProps:IPe,addSaveProps:TPe,attributeKeys:["fitText"],hasSupport:PPe,edit:()=>null};var I4=l(x());function Sce(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var OPe="typography.__experimentalLetterSpacing",RPe="typography.__experimentalTextTransform",APe="typography.__experimentalTextDecoration",LPe="typography.textColumns",MPe="typography.__experimentalFontStyle",NPe="typography.__experimentalFontWeight",DPe="typography.__experimentalWritingMode",Ri="typography",wce=[dce,zm,MPe,NPe,U_,Lb,LPe,APe,DPe,RPe,OPe,jm];function Cce(e){let t={...Sce(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={...Sce(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:xe(t),fontFamily:i,fontSize:n}}function Bce(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 VPe({children:e,resetAllFilter:t}){let o=(0,g2.useCallback)(r=>{let n=Bce(r),i=t(n);return{...r,...Cce(i)}},[t]);return(0,I4.jsx)(pe,{group:"typography",resetAllFilter:o,children:e})}function Ece({clientId:e,name:t,setAttributes:o,settings:r}){let n=SI(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,g2.useMemo)(()=>Bce({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{o(Cce(m))};if(!n)return null;let f=(0,T4.getBlockSupport)(t,[Ri,"__experimentalDefaultControls"]);return(0,I4.jsx)(xI,{as:VPe,panelId:e,settings:r,value:u,onChange:d,defaultControls:f,fitText:c})}var Id=l(O()),k2=l(V()),b2=l(K()),Rce=l(Oe());var Va=l(O()),Tce=l(ny());var W_=l(x());function Ice({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=dt(e),[i,s]=(0,Va.useReducer)(()=>o(n));(0,Va.useEffect)(()=>{n&&r&&s()},[n,r]),(0,Va.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,Va.useRef)(t),[c,u]=(0,Va.useState)(!1);return(0,Va.useEffect)(()=>{if((0,Tce.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,W_.jsx)(li,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,W_.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function Td(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Pce({clientId:e,value:t,forceShow:o}){return(0,W_.jsx)(Ice,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=Td(r,"margin-top"),i=Td(r,"margin-right"),s=Td(r,"margin-bottom"),a=Td(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 Oce({clientId:e,value:t,forceShow:o}){return(0,W_.jsx)(Ice,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:Td(r,"padding-top"),borderRightWidth:Td(r,"padding-right"),borderBottomWidth:Td(r,"padding-bottom"),borderLeftWidth:Td(r,"padding-left")}),forceShow:o})}var mc=l(x()),Fa="dimensions",$_="spacing";function FPe(){let[e,t]=(0,Id.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=j((0,k2.useDispatch)(_));return(0,Id.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function zPe({children:e,resetAllFilter:t}){let o=(0,Id.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,mc.jsx)(pe,{group:"dimensions",resetAllFilter:o,children:e})}function Ace({clientId:e,name:t,setAttributes:o,settings:r}){let n=EI(r),i=(0,k2.useSelect)(m=>{if(n)return m(_).getBlockAttributes(e)?.style},[e,n]),[s,a]=FPe(),c=m=>{o({style:xe(m)})};if(!n)return null;let u=(0,b2.getBlockSupport)(t,[Fa,"__experimentalDefaultControls"]),d=(0,b2.getBlockSupport)(t,[$_,"__experimentalDefaultControls"]),f={...u,...d};return(0,mc.jsxs)(mc.Fragment,{children:[(0,mc.jsx)(TI,{as:zPe,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,mc.jsx)(Oce,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,mc.jsx)(Pce,{forceShow:s==="margin",clientId:e,value:i})]})}function Lce(e,t="any"){if(Id.Platform.OS!=="web")return!1;let o=(0,b2.getBlockSupport)(e,Fa);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.minHeight||o?.width):!!o?.[t]}var Mce={useBlockProps:jPe,attributeKeys:["minHeight","width","style"],hasSupport(e){return Lce(e)}};function jPe({name:e,minHeight:t,style:o}){if(!Lce(e,"aspectRatio")||Ke(e,Fa,"aspectRatio"))return{};let r=F({"has-aspect-ratio":!!o?.dimensions?.aspectRatio}),n={};return o?.dimensions?.aspectRatio?n.minHeight="unset":(t||o?.dimensions?.minHeight)&&(n.aspectRatio="unset"),{className:r,style:n}}function P4(){(0,Rce.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var za=l(x()),HPe=[...wce,wm,Wo,Fa,Cm,$_,T_],R4=e=>HPe.some(t=>(0,Pd.hasBlockSupport)(e,t));function Es(e={}){let t={};return(0,Nb.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function UPe(e){return R4(e)&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}var Fce={[`${wm}.__experimentalSkipSerialization`]:["border"],[`${Wo}.__experimentalSkipSerialization`]:[Wo],[`${Ri}.__experimentalSkipSerialization`]:[Ri],[`${Fa}.__experimentalSkipSerialization`]:[Fa],[`${$_}.__experimentalSkipSerialization`]:[$_],[`${T_}.__experimentalSkipSerialization`]:[T_]},GPe={...Fce,[`${Fa}.aspectRatio`]:[`${Fa}.aspectRatio`],[`${Cm}`]:[Cm]},WPe={[`${Fa}.aspectRatio`]:!0,[`${Cm}`]:!0},$Pe={gradients:"gradient"};function O4(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;O4(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function zce(e,t,o,r=GPe){if(!R4(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=WPe[i]||(0,Pd.getBlockSupport)(t,i);a===!0&&(n=O4(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=$Pe[c]||c;n=O4(n,[[...s,u]])})}),e.style={...Es(n),...e.style},e}function KPe({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=wi(t,r),i=$o(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,za.jsxs)(za.Fragment,{children:[(0,za.jsx)(eP,{...s}),(0,za.jsx)(uie,{...s}),(0,za.jsx)(Ece,{...s}),(0,za.jsx)(iie,{...s}),(0,za.jsx)(Ace,{...s})]})}var v2={edit:KPe,hasSupport:R4,addSaveProps:zce,attributeKeys:["style"],useBlockProps:ZPe},YPe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],qPe={};function ZPe({name:e,style:t}){let o=(0,Vce.useInstanceId)(qPe,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,Nce.useMemo)(()=>{if(!n)return;let s=[];return YPe.forEach(({elementType:a,pseudo:c,elements:u})=>{if(Ke(e,Wo,a))return;let f=n?.[a];if(f){let m=Oh(r,Pd.__EXPERIMENTAL_ELEMENTS[a]);s.push((0,Nb.compileCSS)(f,{selector:m})),c&&c.forEach(p=>{f[p]&&s.push((0,Nb.compileCSS)(f[p],{selector:Oh(r,`${Pd.__EXPERIMENTAL_ELEMENTS[a]}${p}`)}))})}u&&u.forEach(m=>{n[m]&&s.push((0,Nb.compileCSS)(n[m],{selector:Oh(r,Pd.__EXPERIMENTAL_ELEMENTS[m])}))})}),s.length>0?s.join(""):void 0},[r,n,e]);return is({css:i}),zce({className:o},e,{style:t},Fce)}(0,Dce.addFilter)("blocks.registerBlockType","core/style/addAttribute",UPe);var jce=l(ot()),Hce=l(K()),XPe=e=>(0,Hce.hasBlockSupport)(e,"__experimentalSettings",!1);function QPe(e){return XPe(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,jce.addFilter)("blocks.registerBlockType","core/settings/addAttribute",QPe);var Od=l(K()),Wce=l(q()),$ce=l(ot()),K_=l(O());function JPe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=ct(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 Uce(e){return`${e}{filter:none}`}function Gce(e,t){return`${e}{filter:url(#${t})}`}function y2(e,t){let o=JPe(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 pc=l(x()),A4=[],e2e=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");yc([_c]);function L4({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=fe(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,K_.useMemo)(()=>[...r||A4,...n||A4,...o&&i||A4],[o,r,n,i])}function Kce(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function t2e(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 o2e({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=wi(o),i=$o(),s=L4({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=L4({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:Kce(r,s);return(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsx)(pe,{group:"filter",children:(0,pc.jsx)(VI,{value:{filter:{duotone:m}},onChange:p=>{let h={...e,color:{...p?.filter}};t({style:xe(h)})},settings:n})}),(0,pc.jsx)(ut,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,pc.jsx)(YE,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:p=>{let h=t2e(p,s),g={...e,color:{...e?.color,duotone:h??p}};t({style:xe(g)})},settings:n})})]})}var M4={shareWithChildBlocks:!0,edit:o2e,useBlockProps:s2e,attributeKeys:["style"],hasSupport(e){return(0,Od.hasBlockSupport)(e,"filter.duotone")}};function r2e(e){return(0,Od.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function n2e({clientId:e,id:t,selector:o,attribute:r}){let n=L4({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:Kce(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";qf(p?{css:u!=="unset"?Gce(m,t):Uce(m),__unstableType:"presets"}:void 0),qf(p?{assets:u!=="unset"?y2(t,u):"",__unstableType:"svgs"}:void 0);let h=dt(e);(0,K_.useEffect)(()=>{if(p&&h&&e2e){let g=h.style.display;h.style.setProperty("display","inline-block"),h.offsetHeight,h.style.setProperty("display",g)}},[p,h,u])}var i2e={};function s2e({clientId:e,name:t,style:o}){let r=(0,Wce.useInstanceId)(i2e),n=(0,K_.useMemo)(()=>{let c=(0,Od.getBlockType)(t);if(c){if(!(0,Od.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,Od.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=ta(c);return typeof d=="string"?Oh(f,d):f}return ta(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return n2e({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,$ce.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",r2e);var _2=l(q()),D4=l(ot()),Hm=l(K()),S2=l(V()),ja=l(A()),Db=l(M());var Ao=l(x()),V4="layout",{kebabCase:N4}=j(ja.privateApis);function F4(e){return(0,Hm.hasBlockSupport)(e,"layout")||(0,Hm.hasBlockSupport)(e,"__experimentalLayout")}function x2(e={},t=""){let{layout:o}=e,{default:r}=(0,Hm.getBlockSupport)(t,V4)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(bn[n?.type||"default"]?.className){let a=bn[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,S2.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-${N4(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${N4(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function z4(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=Gi(i?.type||"default"),[a]=fe("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function a2e({layout:e,setAttributes:t,name:o,clientId:r}){let n=wi(o),{layout:i}=n,{themeSupportsLayout:s}=(0,S2.useSelect)(T=>{let{getSettings:L}=T(_);return{themeSupportsLayout:L().supportsLayout}},[]);if($o()!=="default")return null;let c=(0,Hm.getBlockSupport)(o,V4,{}),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=Gi(k),E=Gi("constrained"),I=!v.type&&(w||S),R=!!S||!!w,B=T=>t({layout:{type:T}}),P=T=>t({layout:T});return(0,Ao.jsxs)(Ao.Fragment,{children:[(0,Ao.jsx)(pe,{children:(0,Ao.jsxs)(ja.PanelBody,{title:(0,Db.__)("Layout"),children:[y&&(0,Ao.jsx)(Ao.Fragment,{children:(0,Ao.jsx)(ja.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Db.__)("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,Db.__)("Nested blocks use content width with options for full and wide widths."):(0,Db.__)("Nested blocks will fill the width of this container.")})}),!S&&d&&(0,Ao.jsx)(l2e,{type:k,onChange:B}),C&&C.name!=="default"&&(0,Ao.jsx)(C.inspectorControls,{layout:v,onChange:P,layoutBlockSupport:u,name:o,clientId:r}),E&&I&&(0,Ao.jsx)(E.inspectorControls,{layout:v,onChange:P,layoutBlockSupport:u,name:o,clientId:r})]})}),!S&&C&&(0,Ao.jsx)(C.toolBarControls,{layout:v,onChange:P,layoutBlockSupport:c,name:o,clientId:r})]})}var Yce={shareWithChildBlocks:!0,edit:a2e,attributeKeys:["layout"],hasSupport(e){return F4(e)}};function l2e({type:e,onChange:t}){return(0,Ao.jsx)(ja.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Db.__)("Layout type"),__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:fj().map(({name:o,label:r})=>(0,Ao.jsx)(ja.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function c2e(e){return"type"in(e.attributes?.layout??{})||F4(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function u2e({block:e,props:t,blockGapSupport:o,layoutClasses:r}){let{name:n,attributes:i}=t,s=(0,_2.useInstanceId)(e),{layout:a}=i,{default:c}=(0,Hm.getBlockSupport)(n,V4)||{},u=a?.inherit||a?.contentSize||a?.wideSize?{...a,type:"constrained"}:a||c||{},d=`wp-container-${N4(n)}-is-layout-`,f=`.${d}${s}`,m=o!==null,h=Gi(u?.type||"default")?.getLayoutStyle?.({blockName:n,selector:f,layout:u,style:i?.style,hasBlockGapSupport:m}),g=F({[`${d}${s}`]:!!h},r);return is({css:h}),(0,Ao.jsx)(e,{...t,__unstableLayoutClassNames:g})}var d2e=(0,_2.createHigherOrderComponent)(e=>t=>{let{clientId:o,name:r,attributes:n}=t,i=F4(r),s=x2(n,r),a=(0,S2.useSelect)(c=>{if(!i)return;let{getSettings:u,getBlockSettings:d}=j(c(_)),{disableLayoutStyles:f}=u();if(f)return;let[m]=d(o,"spacing.blockGap");return{blockGapSupport:m}},[i,o]);return a?(0,Ao.jsx)(u2e,{block:e,props:t,layoutClasses:s,...a}):(0,Ao.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})},"withLayoutStyles");(0,D4.addFilter)("blocks.registerBlockType","core/layout/addAttribute",c2e);(0,D4.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",d2e);var tue=l(q()),K4=l(V()),oue=l(O());var Ts=l(O()),Rd=l(V()),qce=l(q());function j4(e,t){return Array.from({length:t},(o,r)=>e+r)}var Ha=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 H4(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 Y_(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 U4(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 Ai=l(x());function q_({clientId:e,contentRef:t,parentLayout:o}){let r=(0,Rd.useSelect)(s=>s(_).getSettings().isDistractionFree,[]),n=dt(e);if(r||!n)return null;let i=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,Ai.jsx)(f2e,{gridClientId:e,gridElement:n,isManualGrid:i,ref:t})}var f2e=(0,Ts.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o},r)=>{let[n,i]=(0,Ts.useState)(()=>U4(t)),[s,a]=(0,Ts.useState)(!1);return(0,Ts.useEffect)(()=>{let c=()=>i(U4(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,Ts.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,Ai.jsx)(li,{className:F("block-editor-grid-visualizer",{"is-dropping-allowed":s}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,Ai.jsx)("div",{ref:r,className:"block-editor-grid-visualizer__grid",style:n.style,children:o?(0,Ai.jsx)(m2e,{gridClientId:e,gridInfo:n}):Array.from({length:n.numItems},(c,u)=>(0,Ai.jsx)(Zce,{color:n.currentColor},u))})})});function m2e({gridClientId:e,gridInfo:t}){let[o,r]=(0,Ts.useState)(null),n=(0,Rd.useSelect)(s=>{let{getBlockOrder:a,getBlockStyles:c}=j(s(_)),u=a(e);return c(u)},[e]),i=(0,Ts.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 Ha({columnStart:c,rowStart:u,columnSpan:d,rowSpan:f}))}return s},[n]);return j4(1,t.numRows).map(s=>j4(1,t.numColumns).map(a=>{let c=i.some(d=>d.contains(a,s)),u=o?.contains(a,s)??!1;return(0,Ai.jsx)(Zce,{color:t.currentColor,className:u&&"is-highlighted",children:c?(0,Ai.jsx)(p2e,{column:a,row:s,gridClientId:e,gridInfo:t,setHighlightedRect:r}):(0,Ai.jsx)(h2e,{column:a,row:s,gridClientId:e,gridInfo:t,setHighlightedRect:r})},`${s}-${a}`)}))}function Zce({color:e,children:t,className:o}){return(0,Ai.jsx)("div",{className:F("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 Xce(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,Rd.useSelect)(_),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,Rd.useDispatch)(_),m=vm(o,r.numColumns);return g2e({validateDrag(p){let h=c(p);if(!a(h,o))return!1;let g=i(p),b=new Ha({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new Ha({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(p){let h=i(p);n(new Ha({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 p2e({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,Ai.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:Xce(e,t,o,r,n)})}function h2e({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Rd.useDispatch)(_),c=vm(o,r.numColumns);return(0,Ai.jsx)(Su,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:Xce(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 g2e({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,Rd.useSelect)(_);return(0,qce.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var Qce=l(A()),Z_=l(O());var w2=l(x());function G4({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=dt(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,w2.jsx)(b2e,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function b2e({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,Z_.useState)(null),[c,u]=(0,Z_.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,Z_.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,w2.jsx)(li,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,w2.jsx)(Qce.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=H4(ur(r,"grid-template-columns"),b),v=H4(ur(r,"grid-template-rows"),k),S=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),w=Y_(y,S.left)+1,C=Y_(v,S.top)+1,E=Y_(y,S.right,"end")+1,I=Y_(v,S.bottom,"end")+1;n({columnSpan:E-w+1,rowSpan:I-C+1,columnStart:i?w:void 0,rowStart:i?C:void 0})}})})}var Li=l(M()),Vb=l(A());var Jce=l(V()),eue=l(q());var Sr=l(x());function W4({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,Jce.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=vm(r,p);return(0,Sr.jsx)(ut,{group:"parent",children:(0,Sr.jsxs)(Vb.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Sr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Sr.jsx)(X_,{icon:(0,Li.isRTL)()?qo:wr,label:(0,Li.__)("Move left"),description:(0,Li.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,Sr.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Sr.jsx)(X_,{className:"is-up-button",icon:Wd,label:(0,Li.__)("Move up"),description:(0,Li.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,Sr.jsx)(X_,{className:"is-down-button",icon:Fi,label:(0,Li.__)("Move down"),description:(0,Li.__)("Move down"),isDisabled:h&&m>=h,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,Sr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Sr.jsx)(X_,{icon:(0,Li.isRTL)()?wr:qo,label:(0,Li.__)("Move right"),description:(0,Li.__)("Move right"),isDisabled:p&&f>=p,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function X_({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,eue.useInstanceId)(X_)}`;return(0,Sr.jsxs)(Sr.Fragment,{children:[(0,Sr.jsx)(Vb.ToolbarButton,{className:F("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,Sr.jsx)(Vb.VisuallyHidden,{id:a,children:i})]})}var Q_=l(V()),B2=l(O()),C2=l(q());function $4({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,Q_.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,Q_.useSelect)(_),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Q_.useDispatch)(_),c=(0,B2.useMemo)(()=>r?new Ha(r):null,[r]),u=(0,C2.usePrevious)(c),d=(0,C2.usePrevious)(t.isManualPlacement),f=(0,C2.usePrevious)(o);(0,B2.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 Ha({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]=k2e(p,t.columnCount,v,S,u?.columnEnd,u?.rowEnd);p.push(new Ha({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 I=Object.keys(E).length===0;m[g]=me(y,["style","layout"],I?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]=me(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 k2e(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 Ha({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var hc=l(x()),v2e={};function y2e({style:e}){let t=(0,K4.useSelect)(g=>!g(_).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=lf()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,tue.useInstanceId)(v2e),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(is({css:h}),!!h)return{className:`wp-container-content-${m}`}}function _2e({clientId:e,style:t,setAttributes:o}){let r=lf()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,hc.jsx)(S2e,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function S2e({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a}=(0,K4.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,oue.useState)();if(!a)return null;function d(f){o({style:{...t,layout:{...t?.layout,...f}}})}return(0,hc.jsxs)(hc.Fragment,{children:[(0,hc.jsx)(q_,{clientId:s,contentRef:u,parentLayout:i}),r&&(0,hc.jsx)(G4,{clientId:e,bounds:c,onChange:d,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,hc.jsx)(W4,{layout:t?.layout,parentLayout:i,onChange:d,gridClientId:s,blockClientId:e})]})}var Y4={useBlockProps:y2e,edit:_2e,attributeKeys:["style"],hasSupport(){return!0}};var rue=l(A()),E2=l(V()),nue=l(M()),iue=l(O());var q4=l(x());function x2e({clientId:e}){let{templateLock:t,isLockedByParent:o,isEditingContentOnlySection:r}=(0,E2.useSelect)(a=>{let{getContentLockingParent:c,getTemplateLock:u,getEditedContentOnlySection:d}=j(a(_));return{templateLock:u(e),isLockedByParent:!!c(e),isEditingContentOnlySection:d()===e}},[e]),{stopEditingContentOnlySection:n}=j((0,E2.useDispatch)(_)),i=!o&&t==="contentOnly",s=(0,iue.useCallback)(()=>{n()},[n]);return window?.__experimentalContentOnlyPatternInsertion||!i&&!r?null:r&&(0,q4.jsx)(ut,{group:"other",children:(0,q4.jsx)(rue.ToolbarButton,{onClick:s,children:(0,nue.__)("Done")})})}var sue={edit:x2e,hasSupport(){return!0}};var X4=l(ot()),Z4=l(K()),aue="metadata";function w2e(e){return e?.attributes?.[aue]?.type||(e.attributes={...e.attributes,[aue]:{type:"object"}}),e}function C2e(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,Z4.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,Z4.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,X4.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",w2e);(0,X4.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",C2e);var Q4=l(M()),T2=l(O()),I2=l(A()),P2=l(K()),Fb=l(V());var Ad=l(x()),B2e={};function E2e({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,Fb.useSelect)(p=>p(P2.store).getBlockTypes(),[]),n=(0,T2.useMemo)(()=>r?.filter(({name:p,blockHooks:h})=>h&&e in h||o.includes(p)),[r,e,o]),i=(0,Fb.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(I=>I.name===S.name);return E?{...v,[S.name]:E.clientId}:v},{});return Object.values(y).length>0?y:B2e},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,Fb.useSelect)(_),{insertBlock:u,removeBlock:d}=(0,Fb.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,Ad.jsx)(pe,{children:(0,Ad.jsxs)(I2.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,Q4.__)("Plugins"),initialOpen:!0,children:[(0,Ad.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,Q4.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(p=>(0,Ad.jsxs)(T2.Fragment,{children:[(0,Ad.jsx)("h3",{children:p}),f[p].map(h=>{let g=h.name in i;return(0,Ad.jsx)(I2.ToggleControl,{__nextHasNoMarginBottom:!0,checked:g,label:h.title,onChange:()=>{if(!g){let b=h.blockHooks[e];m((0,P2.createBlock)(h.name),b);return}d(i[h.name],!1)}},h.title)})]},p))]})})}var lue={edit:E2e,attributeKeys:["metadata"],hasSupport(){return!0}};var J4=l(M()),cue=l(K()),zb=l(A()),uue=l(V()),due=l(O()),fue=l(q());var Ld=l(x()),T2e=()=>(0,fue.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},I2e=({name:e,metadata:t})=>{let o=(0,due.useContext)(Un),{removeAllBlockBindings:r}=cl(),n=T2e(),{bindableAttributes:i,hasCompatibleFields:s}=(0,uue.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(_).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=j(c(cue.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,Ld.jsx)(pe,{group:"bindings",children:(0,Ld.jsxs)(zb.__experimentalToolsPanel,{label:(0,J4.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,Ld.jsx)(zb.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,Ld.jsx)(qk,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,Ld.jsx)(zb.__experimentalText,{as:"div",variant:"muted",children:(0,Ld.jsx)("p",{children:(0,J4.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},mue={edit:I2e,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var pue=l(ot()),hue=l(K());function P2e(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,pue.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",P2e);var gue=l(q()),bue=l(ot()),kue=l(V());var Mi=l(x());function O2e(e){$4(e)}function R2e({clientId:e,layout:t}){let o=(0,kue.useSelect)(r=>{let{isBlockSelected:n,isDraggingBlocks:i,getTemplateLock:s,getBlockEditingMode:a}=r(_);return!(!i()&&!n(e)||s(e)||a(e)!=="default")},[e]);return(0,Mi.jsxs)(Mi.Fragment,{children:[(0,Mi.jsx)(O2e,{clientId:e}),o&&(0,Mi.jsx)(q_,{clientId:e,parentLayout:t})]})}var A2e=(0,gue.createHigherOrderComponent)(e=>t=>t.attributes.layout?.type!=="grid"?(0,Mi.jsx)(e,{...t},"edit"):(0,Mi.jsxs)(Mi.Fragment,{children:[(0,Mi.jsx)(R2e,{clientId:t.clientId,layout:t.attributes.layout}),(0,Mi.jsx)(e,{...t},"edit")]}),"addGridVisualizerToBlockEdit");(0,bue.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",A2e);function O2(e){let t=e.style?.border||{};return{className:g3(e)||void 0,style:Es({border:t})}}function eF(e){let{colors:t}=Ku(),o=O2(e),{borderColor:r}=e;if(r){let n=xm({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function tF(e){let t=e.style?.shadow||"";return{style:Es({shadow:t})}}var oF=l(O());function R2(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=Hn("background-color",t),s=Hn("color",o),a=_p(r),c=a||n?.color?.gradient,u=F(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=Es({color:d});return{className:u||void 0,style:f}}function rF(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,oF.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,oF.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=R2(e);if(t){let p=Rs(d,t);m.style.backgroundColor=p.color}if(r&&(m.style.background=Rx(f,r)),o){let p=Rs(d,o);m.style.color=p.color}return m}function nF(e){let{style:t}=e,o=t?.spacing||{};return{style:Es({spacing:o})}}var vue=l(A());var{kebabCase:L2e}=j(vue.privateApis);function iF(e,t){let o=e?.style?.typography||{};o={...o,fontSize:Dl({size:e?.style?.typography?.fontSize},t)};let r=Es({typography:o}),n=e?.fontFamily?`has-${L2e(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:F(n,i,Vc(e?.fontSize)),style:r}}var A2=l(O());function sF(e){let[t,o]=(0,A2.useState)(e);return(0,A2.useEffect)(()=>{e&&o(e)},[e]),t}Dle([n2,p2,k4,S4,v2,M4,h2,P5,Yce,sue,lue,mue,Y4,nce].filter(Boolean));Vle([n2,p2,die,v2,x3,Mce,M4,x4,C4,h2,b3,P5,Xq,Y4]);Fle([n2,p2,k4,lce,S4,b3,h2,x3,v2,x4,C4]);var yue={button:"wp-element-button",caption:"wp-element-caption"},M2e=e=>yue[e]?yue[e]:"";var _ue=()=>"";var jb=l(O()),J_=l(K()),lF=l(Mo());var Sue=l(x());function cF(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return aF(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case jb.StrictMode:case jb.Fragment:return aF(n.children,t,o);case jb.RawHTML:return;case sy.Content:return xue(t,o);case a_:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?aF(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return cF(i,t,o)}}function aF(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)cF(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,J_.getSaveElement)(r,n,(0,Sue.jsx)(sy.Content,{}));cF(s,e,i)}}function wue(e=[]){J_.__unstableGetBlockProps.skipFilters=!0;let t=[];return xue(t,e),J_.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof lF.RichTextData?o:lF.RichTextData.fromHTMLString(o))}var Cue=l(A());var uF=l(x());function Bue({clientId:e,resizableBoxProps:t,...o}){return(0,uF.jsx)(li,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,uF.jsx)(Cue.ResizableBox,{...t})})}var Eue=l(O()),M2=l(V()),Gm=l(A()),L2=l(M());var Um=l(x());function Tue({rules:e}){let{clientIds:t,selectPrevious:o,message:r}=(0,M2.useSelect)(c=>j(c(_)).getRemovalPromptData()),{clearBlockRemovalPrompt:n,setBlockRemovalRules:i,privateRemoveBlocks:s}=j((0,M2.useDispatch)(_));if((0,Eue.useEffect)(()=>(i(e),()=>{i()}),[e,i]),!r)return;let a=()=>{s(t,o,!0),n()};return(0,Um.jsxs)(Gm.Modal,{title:(0,L2.__)("Be careful!"),onRequestClose:n,size:"medium",children:[(0,Um.jsx)("p",{children:r}),(0,Um.jsxs)(Gm.__experimentalHStack,{justify:"right",children:[(0,Um.jsx)(Gm.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,L2.__)("Cancel")}),(0,Um.jsx)(Gm.Button,{variant:"primary",onClick:a,__next40pxDefaultSize:!0,children:(0,L2.__)("Delete")})]})]})}var dF=l(O());var Hb=l(A()),Pue=l(O()),pn=l(M()),N2=l(x()),Iue=[{value:"fill",label:(0,pn._x)("Fill","Scale option for dimensions control"),help:(0,pn.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,pn._x)("Contain","Scale option for dimensions control"),help:(0,pn.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,pn._x)("Cover","Scale option for dimensions control"),help:(0,pn.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,pn._x)("None","Scale option for dimensions control"),help:(0,pn.__)("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,pn._x)("Scale down","Scale option for dimensions control"),help:(0,pn.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function Oue({panelId:e,value:t,onChange:o,options:r=Iue,defaultValue:n=Iue[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,Pue.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,N2.jsx)(Hb.__experimentalToolsPanelItem,{label:(0,pn.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,N2.jsx)(Hb.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,pn.__)("Scale"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,N2.jsx)(Hb.__experimentalToggleGroupControlOption,{...c},c.value))})})}var Ub=l(A()),Wm=l(M()),gc=l(x());function Rue({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,gc.jsxs)(gc.Fragment,{children:[(0,gc.jsx)(Ub.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Wm.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,gc.jsx)(Ub.__experimentalUnitControl,{label:(0,Wm.__)("Width"),placeholder:(0,Wm.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,gc.jsx)(Ub.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Wm.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,gc.jsx)(Ub.__experimentalUnitControl,{label:(0,Wm.__)("Height"),placeholder:(0,Wm.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var Md=l(x());function N2e({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,dF.useState)(m),[g,b]=(0,dF.useState)(f),k=u&&d?"custom":g,y=f||u&&d;return(0,Md.jsxs)(Md.Fragment,{children:[c.includes("aspectRatio")&&(0,Md.jsx)(BI,{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,Md.jsx)(Rue,{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,Md.jsx)(Oue,{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 Aue=N2e;var D2=l(A()),bc=l(M()),fF=l(x()),Lue=[{label:(0,bc._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,bc._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,bc._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,bc._x)("Full Size","Image size option for resolution control"),value:"full"}];function Mue({panelId:e,value:t,onChange:o,options:r=Lue,defaultValue:n=Lue[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,fF.jsx)(D2.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,bc.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,fF.jsx)(D2.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,bc.__)("Resolution"),value:a,options:r,onChange:o,help:(0,bc.__)("Select the size of the source image."),size:"__unstable-large"})})}var $m=l(M()),Gb=l(A()),Due=l(V());var Is=l(M()),Nue={a:(0,Is.__)("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,Is.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,Is.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,Is.__)("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,Is.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,Is.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,Is.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,Is.__)("The <main> element should be used for the primary content of your document only."),nav:(0,Is.__)("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,Is.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var eS=l(x());function Vue({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,$m.__)("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,Due.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,$m.sprintf)((0,$m.__)("%s (Already in use)"),a.label)}:a);return(0,eS.jsxs)(Gb.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,eS.jsx)(Gb.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,$m.__)("HTML element"),options:s,value:e,onChange:t,help:Nue[e]}),e==="main"&&i&&(0,eS.jsx)(Gb.Notice,{status:"warning",isDismissible:!1,children:(0,$m.__)("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 mF={};AF(mF,{...m3,ExperimentalBlockCanvas:wD,ExperimentalBlockEditorProvider:Kp,getDuotoneFilter:y2,getRichTextValues:wue,PrivateQuickInserter:E1,extractWords:Nx,getNormalizedSearchTerms:Hk,normalizeString:jk,PrivateListView:ID,ResizableBoxPopover:Bue,useHasBlockToolbar:ZB,cleanEmptyObject:xe,BlockQuickNavigation:nP,LayoutStyle:pj,BlockManager:s2,BlockRemovalWarningModal:Tue,useLayoutClasses:x2,useLayoutStyles:z4,DimensionsTool:Aue,ResolutionTool:Mue,TabbedSidebar:S1,TextAlignmentControl:_I,usesContextKey:zV,useFlashEditableBlocks:$w,HTMLElementControl:Vue,useZoomOut:Zv,globalStylesDataKey:As,globalStylesLinksDataKey:pS,selectBlockPatternsKey:Sc,requiresWrapperOnCopy:nN,PrivateRichText:l_,PrivateInserterLibrary:e4,reusableBlocksSelectKey:hS,PrivateBlockPopover:Mf,PrivatePublishDateTimePicker:l4,useSpacingSizes:sI,useBlockDisplayTitle:Do,__unstableBlockStyleVariationOverridesWithConfig:dD,setBackgroundStyleDefaults:qI,sectionRootClientIdKey:xc,CommentIconSlotFill:vB,CommentIconToolbarSlotFill:UB,mediaEditKey:gS,getMediaSelectKey:bS,essentialFormatKey:kS,isIsolatedEditorKey:Jm,useBlockElement:dt,useBlockElementRef:ff});return Wue(D2e);})(); |
| 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 |
*/ |
| 260 |
//# sourceMappingURL=index.min.js.map |
| 261 |
|