| 1 |
"use strict";var wp;(wp||={}).blockEditor=(()=>{var oge=Object.create;var F0=Object.defineProperty;var rge=Object.getOwnPropertyDescriptor;var nge=Object.getOwnPropertyNames;var ige=Object.getPrototypeOf,sge=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ka=(e,t)=>{for(var o in t)F0(e,o,{get:t[o],enumerable:!0})},pj=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of nge(t))!sge.call(e,n)&&n!==o&&F0(e,n,{get:()=>t[n],enumerable:!(r=rge(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?oge(ige(e)):{},pj(t||!e||!e.__esModule?F0(o,"default",{value:e,enumerable:!0}):o,e)),age=e=>pj(F0({},"__esModule",{value:!0}),e);var Y=se((DMe,gj)=>{gj.exports=window.wp.blocks});var O=se((MMe,bj)=>{bj.exports=window.wp.element});var F=se((VMe,kj)=>{kj.exports=window.wp.data});var Q=se((FMe,vj)=>{vj.exports=window.wp.compose});var pt=se((zMe,yj)=>{yj.exports=window.wp.hooks});var A=se((WMe,Rj)=>{Rj.exports=window.wp.components});var xA=se(($Me,Oj)=>{Oj.exports=window.wp.privateApis});var Pe=se((JMe,Mj)=>{Mj.exports=window.wp.deprecated});var w=se((e5e,Vj)=>{Vj.exports=window.ReactJSXRuntime});var Gn=se((o5e,zj)=>{zj.exports=window.wp.url});var N=se((m5e,Kj)=>{Kj.exports=window.wp.i18n});var zf=se((p5e,Yj)=>{"use strict";Yj.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 Z=se((w5e,s8)=>{s8.exports=window.wp.primitives});var gr=se((HFe,a8)=>{a8.exports=window.wp.richText});var c8=se((GFe,l8)=>{l8.exports=window.wp.blockSerializationDefaultParser});var er=se((yze,W8)=>{W8.exports=window.wp.a11y});var Ai=se((_ze,X8)=>{X8.exports=window.wp.notices});var vh=se((Sze,Q8)=>{Q8.exports=window.wp.preferences});var N7=se((_6e,wC)=>{var O7={\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"},A7=Object.keys(O7).join("|"),k_e=new RegExp(A7,"g"),v_e=new RegExp(A7,"");function y_e(e){return O7[e]}var L7=function(e){return e.replace(k_e,y_e)},__e=function(e){return!!e.match(v_e)};wC.exports=L7;wC.exports.has=__e;wC.exports.remove=L7});var uy=se((dje,a9)=>{a9.exports=window.wp.styleEngine});var tt=se((u8e,P9)=>{P9.exports=window.wp.keycodes});var Me=se((I8e,G9)=>{G9.exports=window.wp.dom});var $9=se(IM=>{"use strict";Object.defineProperty(IM,"__esModule",{value:!0});IM.default=W9;function W9(){}W9.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 h(){for(var g=-1*u;g<=u;g+=2){var b=void 0,v=f[g-1],k=f[g+1],y=(k?k.newPos:0)-g;v&&(f[g-1]=void 0);var _=v&&v.newPos+1<a,S=k&&0<=y&&y<c;if(!_&&!S){f[g]=void 0;continue}if(!_||S&&v.newPos<k.newPos?(b=fSe(k),i.pushComponent(b.components,void 0,!0)):(b=v,b.newPos++,i.pushComponent(b.components,!0,void 0)),y=i.extractCommon(b,o,t,g),b.newPos+1>=a&&y+1>=c)return s(dSe(i,b.components,o,t,i.useLongestToken));f[g]=b}u++}if(n)(function g(){setTimeout(function(){if(u>d)return n();h()||g()},0)})();else for(;u<=d;){var p=h();if(p)return p}},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 dSe(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(h,p){var g=r[c+p];return g.length>h.length?g:h}),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 fSe(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var Y9=se(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});ky.diffChars=hSe;ky.characterDiff=void 0;var mSe=pSe($9());function pSe(e){return e&&e.__esModule?e:{default:e}}var K9=new mSe.default;ky.characterDiff=K9;function hSe(e,t,o){return K9.diff(e,t,o)}});var je=se((G8e,lU)=>{lU.exports=window.React});var uU=se((W8e,cU)=>{"use strict";var vSe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";cU.exports=vSe});var pU=se(($8e,mU)=>{"use strict";var ySe=uU();function dU(){}function fU(){}fU.resetWarningCache=dU;mU.exports=function(){function e(r,n,i,s,a,c){if(c!==ySe){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:fU,resetWarningCache:dU};return o.PropTypes=o,o}});var gU=se((q8e,hU)=>{hU.exports=pU()();var K8e,Y8e});var kU=se((JC,bU)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof JC<"u")t(bU,JC);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(JC,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 y=window.getComputedStyle(c,null);y.resize==="vertical"?c.style.resize="none":y.resize==="both"&&(c.style.resize="horizontal"),y.boxSizing==="content-box"?u=-(parseFloat(y.paddingTop)+parseFloat(y.paddingBottom)):u=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth),isNaN(u)&&(u=0),b()}function h(y){{var _=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=_}c.style.overflowY=y}function p(y){for(var _=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&_.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),y=y.parentNode;return _}function g(){if(c.scrollHeight!==0){var y=p(c),_=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,y.forEach(function(S){S.node.scrollTop=S.scrollTop}),_&&(document.documentElement.scrollTop=_)}}function b(){g();var y=Math.round(parseFloat(c.style.height)),_=window.getComputedStyle(c,null),S=_.boxSizing==="content-box"?Math.round(parseFloat(_.height)):c.offsetHeight;if(S<y?_.overflowY==="hidden"&&(h("scroll"),g(),S=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):_.overflowY!=="hidden"&&(h("hidden"),g(),S=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==S){f=S;var C=r("autosize:resized");try{c.dispatchEvent(C)}catch{}}}var v=function(){c.clientWidth!==d&&b()},k=function(y){window.removeEventListener("resize",v,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",k,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(y).forEach(function(_){c.style[_]=y[_]}),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",k,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",v,!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:k,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 yU=se((Z8e,vU)=>{var _Se=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};vU.exports=_Se});var SU=se((X8e,_U)=>{var RM=yU();function SSe(e){var t=RM(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=RM(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=RM(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}_U.exports=SSe});var wU=se(Ml=>{"use strict";var xSe=Ml&&Ml.__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)}})(),OM=Ml&&Ml.__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},wSe=Ml&&Ml.__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};Ml.__esModule=!0;var t1=je(),vy=gU(),e1=kU(),CSe=SU(),BSe=CSe,xU="autosize:resized",ESe=(function(e){xSe(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:BSe(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&&e1(o.textarea)}):this.textarea&&e1(this.textarea),this.textarea&&this.textarea.addEventListener(xU,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(xU,this.onResize),e1.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=wSe(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,h=s&&m?m*s:null;return t1.createElement("textarea",OM({},f,{onChange:this.onChange,style:h?OM({},c,{maxHeight:h}):c,ref:function(p){o.textarea=p,typeof o.props.innerRef=="function"?o.props.innerRef(p):o.props.innerRef&&(o.props.innerRef.current=p)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&e1.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:vy.number,maxRows:vy.number,onResize:vy.func,innerRef:vy.any,async:vy.bool},t})(t1.Component);Ml.TextareaAutosize=t1.forwardRef(function(e,t){return t1.createElement(ESe,OM({},e,{innerRef:t}))})});var AM=se((J8e,CU)=>{"use strict";var TSe=wU();CU.exports=TSe.TextareaAutosize});var yy=se((o7e,IU)=>{IU.exports=window.wp.warning});var m5=se((y7e,CH)=>{CH.exports=window.ReactDOM});var Ms=se((Y7e,eG)=>{eG.exports=window.wp.keyboardShortcuts});var bG=se((tUe,gG)=>{gG.exports=window.wp.htmlEntities});var xG=se((cUe,SG)=>{SG.exports=window.wp.uploadMedia});var uB=se(()=>{});var dB=se(()=>{});var D5=se(()=>{});var AW=se((MHe,OW)=>{var Dxe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Mxe=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},Vxe=(e=21)=>{let t="",o=e|0;for(;o--;)t+=Dxe[Math.random()*64|0];return t};OW.exports={nanoid:Vxe,customAlphabet:Mxe}});var M5=se(()=>{});var NW=se((zHe,V5)=>{var we=String,LW=function(){return{isColorSupported:!1,reset:we,bold:we,dim:we,italic:we,underline:we,inverse:we,hidden:we,strikethrough:we,black:we,red:we,green:we,yellow:we,blue:we,magenta:we,cyan:we,white:we,gray:we,bgBlack:we,bgRed:we,bgGreen:we,bgYellow:we,bgBlue:we,bgMagenta:we,bgCyan:we,bgWhite:we,blackBright:we,redBright:we,greenBright:we,yellowBright:we,blueBright:we,magentaBright:we,cyanBright:we,whiteBright:we,bgBlackBright:we,bgRedBright:we,bgGreenBright:we,bgYellowBright:we,bgBlueBright:we,bgMagentaBright:we,bgCyanBright:we,bgWhiteBright:we}};V5.exports=LW();V5.exports.createColors=LW});var fB=se((jHe,VW)=>{"use strict";var DW=NW(),MW=M5(),Yy=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=DW.isColorSupported),MW&&t&&(o=MW(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}=DW.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 h=c(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+c(m)+u+` |
| 2 |
`+h+a("^")}return" "+c(m)+u}).join(` |
| 3 |
`)}toString(){let t=this.showSourceCode();return t&&(t=` |
| 4 |
|
| 5 |
`+t+` |
| 6 |
`),this.name+": "+this.message+t}};VW.exports=Yy;Yy.default=Yy});var FW=se(()=>{});var HW=se((GHe,UW)=>{"use strict";var{SourceMapConsumer:zW,SourceMapGenerator:jW}=uB(),{existsSync:Fxe,readFileSync:zxe}=FW(),{dirname:F5,join:jxe}=dB();function Uxe(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var qy=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=F5(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new zW(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 Uxe(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=F5(t),Fxe(t))return this.mapFile=t,zxe(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 zW)return jW.fromSourceMap(o).toString();if(o instanceof jW)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=jxe(F5(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)}};UW.exports=qy;qy.default=qy});var G5=se((WHe,KW)=>{"use strict";var{SourceMapConsumer:Hxe,SourceMapGenerator:Gxe}=uB(),{fileURLToPath:GW,pathToFileURL:mB}=D5(),{isAbsolute:U5,resolve:H5}=dB(),{nanoid:Wxe}=AW(),z5=M5(),WW=fB(),$xe=HW(),j5=Symbol("fromOffsetCache"),Kxe=!!(Hxe&&Gxe),$W=!!(H5&&U5),sg=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&&(!$W||/^\w+:\/\//.test(o.from)||U5(o.from)?this.file=o.from:this.file=H5(o.from)),$W&&Kxe){let r=new $xe(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 "+Wxe(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 WW(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 WW(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&&(mB&&(i.input.url=mB(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[j5])r=this[j5];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[j5]=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:H5(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;U5(s.source)?c=mB(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||mB(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(GW)u.file=GW(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}};KW.exports=sg;sg.default=sg;z5&&z5.registerInput&&z5.registerInput(sg)});var $5=se(($He,JW)=>{"use strict";var{SourceMapConsumer:qW,SourceMapGenerator:pB}=uB(),{dirname:hB,relative:ZW,resolve:XW,sep:QW}=dB(),{pathToFileURL:YW}=D5(),Yxe=G5(),qxe=!!(qW&&pB),Zxe=!!(hB&&XW&&ZW&&QW),W5=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||hB(t.file),n;this.mapOpts.sourcesContent===!1?(n=new qW(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(),Zxe&&qxe&&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=pB.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new pB({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 pB({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?hB(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=hB(XW(r,this.mapOpts.annotation)));let n=ZW(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 Yxe(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(YW){let r=YW(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;QW==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};JW.exports=W5});var K5=se((KHe,t$)=>{"use strict";var e$={after:` |
| 12 |
`,beforeClose:` |
| 13 |
`,beforeComment:` |
| 14 |
`,beforeDecl:` |
| 15 |
`,beforeOpen:" ",beforeRule:` |
| 16 |
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Xxe(e){return e[0].toUpperCase()+e.slice(1)}var Zy=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 e$[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"+Xxe(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=e$[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)}};t$.exports=Zy;Zy.default=Zy});var gB=se((YHe,o$)=>{"use strict";var Qxe=K5();function Y5(e,t){new Qxe(t).stringify(e)}o$.exports=Y5;Y5.default=Y5});var q5=se((qHe,n$)=>{"use strict";var r$={};n$.exports=function(t){r$[t]||(r$[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var bB=se((ZHe,Z5)=>{"use strict";Z5.exports.isClean=Symbol("isClean");Z5.exports.my=Symbol("my")});var vB=se((XHe,i$)=>{"use strict";var{isClean:kB,my:Jxe}=bB(),ewe=fB(),twe=K5(),owe=gB();function X5(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=>X5(s,o)):(i==="object"&&n!==null&&(n=X5(n)),o[r]=n)}return o}var Xy=class{constructor(t={}){this.raws={},this[kB]=!1,this[Jxe]=!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=X5(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 ewe(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[kB]){this[kB]=!1;let t=this;for(;t=t.parent;)t[kB]=!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 twe().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=owe){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}};i$.exports=Xy;Xy.default=Xy});var Q5=se((QHe,s$)=>{"use strict";var rwe=vB(),Qy=class extends rwe{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]==="$"}};s$.exports=Qy;Qy.default=Qy});var J5=se((JHe,a$)=>{"use strict";var nwe=vB(),Jy=class extends nwe{constructor(t){super(t),this.type="comment"}};a$.exports=Jy;Jy.default=Jy});var xm=se((eGe,g$)=>{"use strict";var{isClean:l$,my:c$}=bB(),u$=Q5(),d$=J5(),iwe=vB(),f$,eV,tV,m$;function p$(e){return e.map(t=>(t.nodes&&(t.nodes=p$(t.nodes)),delete t.source,t))}function h$(e){if(e[l$]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h$(t)}var zs=class e extends iwe{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=p$(f$(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 u$(t)]}else if(t.selector)t=[new eV(t)];else if(t.name)t=[new tV(t)];else if(t.text)t=[new d$(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[c$]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[l$]&&h$(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]}};zs.registerParse=e=>{f$=e};zs.registerRule=e=>{eV=e};zs.registerAtRule=e=>{tV=e};zs.registerRoot=e=>{m$=e};g$.exports=zs;zs.default=zs;zs.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,tV.prototype):e.type==="rule"?Object.setPrototypeOf(e,eV.prototype):e.type==="decl"?Object.setPrototypeOf(e,u$.prototype):e.type==="comment"?Object.setPrototypeOf(e,d$.prototype):e.type==="root"&&Object.setPrototypeOf(e,m$.prototype),e[c$]=!0,e.nodes&&e.nodes.forEach(t=>{zs.rebuild(t)})}});var v$=se((tGe,k$)=>{"use strict";var yB=/[\t\n\f\r "#'()/;[\\\]{}]/g,_B=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,swe=/.[\r\n"'(/\\]/,b$=/[\da-f]/i;k$.exports=function(t,o={}){let r=t.css.valueOf(),n=o.ignoreErrors,i,s,a,c,u,d,f,m,h,p,g=r.length,b=0,v=[],k=[];function y(){return b}function _(R){throw t.error("Unclosed "+R,b)}function S(){return k.length===0&&b>=g}function C(R){if(k.length)return k.pop();if(b>=g)return;let I=R?R.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);p=["space",r.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let E=String.fromCharCode(i);p=[E,E,b];break}case 40:{if(m=v.length?v.pop()[1]:"",h=r.charCodeAt(b+1),m==="url"&&h!==39&&h!==34&&h!==32&&h!==10&&h!==9&&h!==12&&h!==13){s=b;do{if(d=!1,s=r.indexOf(")",s+1),s===-1)if(n||I){s=b;break}else _("bracket");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["brackets",r.slice(b,s+1),b,s],b=s}else s=r.indexOf(")",b+1),c=r.slice(b,s+1),s===-1||swe.test(c)?p=["(","(",b]:(p=["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||I){s=b+1;break}else _("string");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["string",r.slice(b,s+1),b,s],b=s;break}case 64:{yB.lastIndex=b+1,yB.test(r),yB.lastIndex===0?s=r.length-1:s=yB.lastIndex-2,p=["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,b$.test(r.charAt(s)))){for(;b$.test(r.charAt(s+1));)s+=1;r.charCodeAt(s+1)===32&&(s+=1)}p=["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||I?s=r.length:_("comment")),p=["comment",r.slice(b,s+1),b,s],b=s):(_B.lastIndex=b+1,_B.test(r),_B.lastIndex===0?s=r.length-1:s=_B.lastIndex-2,p=["word",r.slice(b,s+1),b,s],v.push(p),b=s);break}}return b++,p}function B(R){k.push(R)}return{back:B,endOfFile:S,nextToken:C,position:y}}});var S$=se((oGe,_$)=>{"use strict";var y$=xm(),ag=class extends y${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)}};_$.exports=ag;ag.default=ag;y$.registerAtRule(ag)});var SB=se((rGe,B$)=>{"use strict";var x$=xm(),w$,C$,Zu=class extends x${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 w$(new C$,this,t).stringify()}};Zu.registerLazyResult=e=>{w$=e};Zu.registerProcessor=e=>{C$=e};B$.exports=Zu;Zu.default=Zu;x$.registerRoot(Zu)});var T$=se((nGe,E$)=>{"use strict";var e_={comma(e){return e_.split(e,[","],!0)},space(e){let t=[" ",` |
| 24 |
`," "];return e_.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}};E$.exports=e_;e_.default=e_});var R$=se((iGe,P$)=>{"use strict";var I$=xm(),awe=T$(),lg=class extends I${constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return awe.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)}};P$.exports=lg;lg.default=lg;I$.registerRule(lg)});var N$=se((sGe,L$)=>{"use strict";var lwe=Q5(),cwe=v$(),uwe=J5(),dwe=S$(),fwe=SB(),O$=R$(),A$={empty:!0,space:!0};function mwe(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var oV=class{constructor(t){this.input=t,this.root=new fwe,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 dwe;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 uwe;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=cwe(this.input)}decl(t,o){let r=new lwe;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]||mwe(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 h=d[m][0];if(f.trim().indexOf("!")===0&&h!=="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 O$;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",!A$[f]&&!A$[d]?c.slice(-1)===","?u=!1:c+=i[1]:u=!1):c+=i[1];if(!u){let m=r.reduce((h,p)=>h+p[1],"");t.raws[o]={raw:m,value:c}}t[o]=c}rule(t){t.pop();let o=new O$;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})}};L$.exports=oV});var rV=se((aGe,D$)=>{"use strict";var pwe=xm(),hwe=N$(),gwe=G5();function xB(e,t){let o=new gwe(e,t),r=new hwe(o);try{r.parse()}catch(n){throw n}return r.root}D$.exports=xB;xB.default=xB;pwe.registerParse(xB)});var V$=se((lGe,M$)=>{"use strict";var t_=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}};M$.exports=t_;t_.default=t_});var nV=se((cGe,F$)=>{"use strict";var bwe=V$(),o_=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 bwe(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};F$.exports=o_;o_.default=o_});var j$=se((dGe,z$)=>{"use strict";var kwe=$5(),vwe=gB(),uGe=q5(),ywe=rV(),_we=nV(),r_=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=vwe;this.result=new _we(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new kwe(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=ywe;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"}};z$.exports=r_;r_.default=r_});var iV=se((fGe,G$)=>{"use strict";var Swe=xm(),U$,H$,wm=class extends Swe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new U$(new H$,this,t).stringify()}};wm.registerLazyResult=e=>{U$=e};wm.registerProcessor=e=>{H$=e};G$.exports=wm;wm.default=wm});var q$=se((pGe,Y$)=>{"use strict";var{isClean:Ra,my:xwe}=bB(),wwe=$5(),Cwe=gB(),Bwe=xm(),Ewe=iV(),mGe=q5(),W$=nV(),Twe=rV(),Iwe=SB(),Pwe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Rwe={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},Owe={Once:!0,postcssPlugin:!0,prepare:!0},cg=0;function n_(e){return typeof e=="object"&&typeof e.then=="function"}function K$(e){let t=!1,o=Pwe[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,cg,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,cg,o+"Exit"]:[o,o+"Exit"]}function $$(e){let t;return e.type==="document"?t=["Document",cg,"DocumentExit"]:e.type==="root"?t=["Root",cg,"RootExit"]:t=K$(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function sV(e){return e[Ra]=!1,e.nodes&&e.nodes.forEach(t=>sV(t)),e}var aV={},Xu=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=sV(o);else if(o instanceof e||o instanceof W$)n=sV(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=Twe;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[xwe]&&Bwe.rebuild(n)}this.result=new W$(t,n,r),this.helpers={...aV,postcss:aV,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(!Rwe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Owe[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(n_(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ra];){t[Ra]=!0;let o=[$$(t)];for(;o.length>0;){let r=this.visitTick(o);if(n_(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 n_(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=Cwe;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new wwe(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(n_(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ra];)t[Ra]=!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(n_(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[Ra]){a[Ra]=!0,t.push($$(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===cg){r.nodes&&r.nodes.length&&(r[Ra]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[Ra]=!0;let o=K$(t);for(let r of o)if(r===cg)t.nodes&&t.each(n=>{n[Ra]||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"}};Xu.registerPostcss=e=>{aV=e};Y$.exports=Xu;Xu.default=Xu;Iwe.registerLazyResult(Xu);Ewe.registerLazyResult(Xu)});var X$=se((hGe,Z$)=>{"use strict";var Awe=j$(),Lwe=q$(),Nwe=iV(),Dwe=SB(),Cm=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 Awe(this,t,o):new Lwe(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};Z$.exports=Cm;Cm.default=Cm;Dwe.registerProcessor(Cm);Nwe.registerProcessor(Cm)});var eK=se((gGe,J$)=>{J$.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&&Q$(s.source.input.file,n)||i.length&&s.source.input.file&&!Q$(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&&Mwe(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function Q$(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function Mwe(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var oK=se((bGe,tK)=>{var lV=40,cV=41,wB=39,uV=34,dV=92,ug=47,fV=44,mV=58,CB=42,Vwe=117,Fwe=85,zwe=43,jwe=/^[a-f0-9?-]+$/i;tK.exports=function(e){for(var t=[],o=e,r,n,i,s,a,c,u,d,f=0,m=o.charCodeAt(f),h=o.length,p=[{nodes:t}],g=0,b,v="",k="",y="";f<h;)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===cV&&g?y=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===fV||m===mV||m===ug&&o.charCodeAt(r+1)!==CB&&(!b||b&&b.type==="function"&&b.value!=="calc")?k=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(m===wB||m===uV){r=f,n=m===wB?"'":'"',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)===dV;)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===ug&&o.charCodeAt(f+1)===CB)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===ug||m===CB)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-k.length,sourceEndIndex:f+s.length,value:s}),f+=1,m=o.charCodeAt(f);else if(m===ug||m===fV||m===mV)s=o[f],t.push({type:"div",sourceIndex:f-k.length,sourceEndIndex:f+s.length,value:s,before:k,after:""}),k="",f+=1,m=o.charCodeAt(f);else if(lV===m){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);if(d=f,s={type:"function",sourceIndex:f-v.length,value:v,before:o.slice(d+1,r)},f=r,v==="url"&&m!==wB&&m!==uV){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===dV;)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),p.push(s),t=s.nodes=[],b=s;v=""}else if(cV===m&&g)f+=1,m=o.charCodeAt(f),b.after=y,b.sourceEndIndex+=y.length,y="",g-=1,p[p.length-1].sourceEndIndex=f,p.pop(),b=p[g],t=b.nodes;else{r=f;do m===dV&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<h&&!(m<=32||m===wB||m===uV||m===fV||m===mV||m===ug||m===lV||m===CB&&b&&b.type==="function"&&b.value==="calc"||m===ug&&b.type==="function"&&b.value==="calc"||m===cV&&g));s=o.slice(f,r),lV===m?v=s:(Vwe===s.charCodeAt(0)||Fwe===s.charCodeAt(0))&&zwe===s.charCodeAt(1)&&jwe.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=p.length-1;f;f-=1)p[f].unclosed=!0,p[f].sourceEndIndex=o.length;return p[0].nodes}});var nK=se((kGe,rK)=>{rK.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 lK=se((vGe,aK)=>{function iK(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=sK(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function sK(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=iK(e[r],t)+o;return o}return iK(e,t)}aK.exports=sK});var uK=se((yGe,cK)=>{var BB=45,EB=43,pV=46,Uwe=101,Hwe=69;function Gwe(e){var t=e.charCodeAt(0),o;if(t===EB||t===BB){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===pV&&r>=48&&r<=57}return t===pV?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}cK.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!Gwe(e))return!1;for(r=e.charCodeAt(t),(r===EB||r===BB)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===pV&&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===Uwe||r===Hwe)&&(n>=48&&n<=57||(n===EB||n===BB)&&i>=48&&i<=57))for(t+=n===EB||n===BB?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 pK=se((_Ge,mK)=>{var Wwe=oK(),dK=nK(),fK=lK();function Qu(e){return this instanceof Qu?(this.nodes=Wwe(e),this):new Qu(e)}Qu.prototype.toString=function(){return Array.isArray(this.nodes)?fK(this.nodes):""};Qu.prototype.walk=function(e,t){return dK(this.nodes,e,t),this};Qu.unit=uK();Qu.walk=dK;Qu.stringify=fK;mK.exports=Qu});var gK=se((SGe,hV)=>{var hK=pK();hV.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=hK(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=hK.stringify(n))}}};hV.exports.postcss=!0});var IK=se((DGe,TK)=>{TK.exports=window.wp.priorityQueue});var AV=se((I$e,IY)=>{IY.exports=window.wp.blob});var __=se((JYe,Vq)=>{Vq.exports=window.wp.isShallowEqual});var IT=se((lJe,IQ)=>{IQ.exports=window.wp.tokenList});var R3=se((yJe,HQ)=>{"use strict";var EEe=function(t){return TEe(t)&&!IEe(t)};function TEe(e){return!!e&&typeof e=="object"}function IEe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||OEe(e)}var PEe=typeof Symbol=="function"&&Symbol.for,REe=PEe?Symbol.for("react.element"):60103;function OEe(e){return e.$$typeof===REe}function AEe(e){return Array.isArray(e)?[]:{}}function W_(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Jg(AEe(e),e,t):e}function LEe(e,t,o){return e.concat(t).map(function(r){return W_(r,o)})}function NEe(e,t){if(!t.customMerge)return Jg;var o=t.customMerge(e);return typeof o=="function"?o:Jg}function DEe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function jQ(e){return Object.keys(e).concat(DEe(e))}function UQ(e,t){try{return t in e}catch{return!1}}function MEe(e,t){return UQ(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function VEe(e,t,o){var r={};return o.isMergeableObject(e)&&jQ(e).forEach(function(n){r[n]=W_(e[n],o)}),jQ(t).forEach(function(n){MEe(e,n)||(UQ(e,n)&&o.isMergeableObject(t[n])?r[n]=NEe(n,o)(e[n],t[n],o):r[n]=W_(t[n],o))}),r}function Jg(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||LEe,o.isMergeableObject=o.isMergeableObject||EEe,o.cloneUnlessOtherwiseSpecified=W_;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):VEe(e,t,o):W_(t,o)}Jg.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return Jg(r,n,o)},{})};var FEe=Jg;HQ.exports=FEe});var QJ=se((eot,XJ)=>{XJ.exports=window.wp.commands});var Wa=se((Eit,foe)=>{foe.exports=window.wp.date});var Woe=se((pst,Goe)=>{var Foe=!1,ap,I4,P4,KI,YI,zoe,qI,R4,O4,A4,joe,L4,N4,Uoe,Hoe;function Rn(){if(!Foe){Foe=!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(L4=/\b(iPhone|iP[ao]d)/.exec(e),N4=/\b(iP[ao]d)/.exec(e),A4=/Android/i.exec(e),Uoe=/FBAN\/\w+;/i.exec(e),Hoe=/Mobile/i.exec(e),joe=!!/Win64/.exec(e),t){ap=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,ap&&document&&document.documentMode&&(ap=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);zoe=r?parseFloat(r[1])+4:ap,I4=t[2]?parseFloat(t[2]):NaN,P4=t[3]?parseFloat(t[3]):NaN,KI=t[4]?parseFloat(t[4]):NaN,KI?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),YI=t&&t[1]?parseFloat(t[1]):NaN):YI=NaN}else ap=I4=P4=YI=KI=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);qI=n?parseFloat(n[1].replace("_",".")):!0}else qI=!1;R4=!!o[2],O4=!!o[3]}else qI=R4=O4=!1}}var D4={ie:function(){return Rn()||ap},ieCompatibilityMode:function(){return Rn()||zoe>ap},ie64:function(){return D4.ie()&&joe},firefox:function(){return Rn()||I4},opera:function(){return Rn()||P4},webkit:function(){return Rn()||KI},safari:function(){return D4.webkit()},chrome:function(){return Rn()||YI},windows:function(){return Rn()||R4},osx:function(){return Rn()||qI},linux:function(){return Rn()||O4},iphone:function(){return Rn()||L4},mobile:function(){return Rn()||L4||N4||A4||Hoe},nativeApp:function(){return Rn()||Uoe},android:function(){return Rn()||A4},ipad:function(){return Rn()||N4}};Goe.exports=D4});var Koe=se((hst,$oe)=>{"use strict";var ZI=!!(typeof window<"u"&&window.document&&window.document.createElement),TIe={canUseDOM:ZI,canUseWorkers:typeof Worker<"u",canUseEventListeners:ZI&&!!(window.addEventListener||window.attachEvent),canUseViewport:ZI&&!!window.screen,isInWorker:!ZI};$oe.exports=TIe});var Xoe=se((gst,Zoe)=>{"use strict";var Yoe=Koe(),qoe;Yoe.canUseDOM&&(qoe=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function IIe(e,t){if(!Yoe.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&&qoe&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}Zoe.exports=IIe});var rre=se((bst,ore)=>{"use strict";var PIe=Woe(),RIe=Xoe(),Qoe=10,Joe=40,ere=800;function tre(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*Qoe,n=o*Qoe,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=Joe,n*=Joe):(r*=ere,n*=ere)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}tre.getEventType=function(){return PIe.firefox()?"DOMMouseScroll":RIe("wheel")?"wheel":"mousewheel"};ore.exports=tre});var ire=se((kst,nre)=>{nre.exports=rre()});var Lne=se((clt,Ane)=>{"use strict";Ane.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 OMe={};ka(OMe,{AlignmentControl:()=>xC,AlignmentToolbar:()=>R7,Autocomplete:()=>Z7,BlockAlignmentControl:()=>zC,BlockAlignmentToolbar:()=>k9,BlockBindingsAttributeControl:()=>py,BlockBindingsSourceFieldsList:()=>my,BlockBreadcrumb:()=>j9,BlockCanvas:()=>ree,BlockColorsStyleSelector:()=>aee,BlockContextProvider:()=>K0,BlockControls:()=>Mt,BlockEdit:()=>gC,BlockEditorKeyboardShortcuts:()=>K1,BlockEditorProvider:()=>HG,BlockFormatControls:()=>f3,BlockIcon:()=>Oe,BlockInspector:()=>Hle,BlockList:()=>mg,BlockMover:()=>ZE,BlockNavigationDropdown:()=>gte,BlockPopover:()=>yq,BlockPreview:()=>wn,BlockSelectionClearer:()=>Aq,BlockSettingsMenu:()=>ST,BlockSettingsMenuControls:()=>bT,BlockStyles:()=>vb,BlockTitle:()=>gy,BlockToolbar:()=>VJ,BlockTools:()=>oS,BlockVerticalAlignmentControl:()=>DC,BlockVerticalAlignmentToolbar:()=>Vte,ButtonBlockAppender:()=>cd,ButtonBlockerAppender:()=>uq,ColorPalette:()=>soe,ColorPaletteControl:()=>coe,ContrastChecker:()=>II,CopyHandler:()=>$le,DefaultBlockAppender:()=>Og,DimensionControl:()=>Ib,FontSizePicker:()=>aM,HeadingLevelDropdown:()=>Cte,HeightControl:()=>Voe,InnerBlocks:()=>x_,Inserter:()=>$i,InspectorAdvancedControls:()=>pd,InspectorControls:()=>pe,JustifyContentControl:()=>Ph,JustifyToolbar:()=>Yre,LineHeightControl:()=>yP,LinkControl:()=>Wd,MediaPlaceholder:()=>hie,MediaReplaceFlow:()=>Hb,MediaUpload:()=>sd,MediaUploadCheck:()=>Ws,MultiSelectScrollIntoView:()=>Zle,NavigableToolbar:()=>qg,ObserveTyping:()=>nZ,PanelColorSettings:()=>bie,PlainText:()=>hse,RecursionProvider:()=>az,RichText:()=>Yb,RichTextShortcut:()=>kF,RichTextToolbarButton:()=>yF,SETTINGS_DEFAULTS:()=>hv,SkipToSelectedBlock:()=>qP,ToolSelector:()=>cce,Typewriter:()=>ece,URLInput:()=>Hd,URLInputButton:()=>wse,URLPopover:()=>Yd,Warning:()=>Bu,WritingFlow:()=>sB,__experimentalBlockAlignmentMatrixControl:()=>A9,__experimentalBlockFullHeightAligmentControl:()=>I9,__experimentalBlockPatternSetup:()=>Nte,__experimentalBlockPatternsList:()=>Aa,__experimentalBlockVariationPicker:()=>Bte,__experimentalBlockVariationTransforms:()=>SI,__experimentalBorderRadiusControl:()=>EI,__experimentalColorGradientControl:()=>Md,__experimentalColorGradientSettingsDropdown:()=>HI,__experimentalDateFormatPicker:()=>moe,__experimentalDuotoneControl:()=>RI,__experimentalFontAppearanceControl:()=>AI,__experimentalFontFamilyControl:()=>LI,__experimentalGetBorderClassesAndStyles:()=>nA,__experimentalGetColorClassesAndStyles:()=>iA,__experimentalGetDimensionsClassesAndStyles:()=>rA,__experimentalGetElementClassName:()=>IMe,__experimentalGetGapCSSValue:()=>kr,__experimentalGetGradientClass:()=>wh,__experimentalGetGradientObjectByGradientValue:()=>_7,__experimentalGetShadowClassesAndStyles:()=>ej,__experimentalGetSpacingClassesAndStyles:()=>rj,__experimentalImageEditor:()=>jre,__experimentalImageSizeControl:()=>Wre,__experimentalImageURLInputUI:()=>Rse,__experimentalInspectorPopoverHeader:()=>Q2,__experimentalLetterSpacingControl:()=>DI,__experimentalLibrary:()=>Yle,__experimentalLinkControl:()=>vP,__experimentalLinkControlSearchInput:()=>vne,__experimentalLinkControlSearchItem:()=>sne,__experimentalLinkControlSearchResults:()=>fne,__experimentalListView:()=>kI,__experimentalPanelColorGradientSettings:()=>WI,__experimentalPreviewOptions:()=>Kse,__experimentalPublishDateTimePicker:()=>ice,__experimentalRecursionProvider:()=>tce,__experimentalResponsiveBlockControl:()=>yse,__experimentalSpacingSizesControl:()=>nk,__experimentalTextDecorationControl:()=>VI,__experimentalTextTransformControl:()=>zI,__experimentalUnitControl:()=>Sse,__experimentalUseBlockOverlayActive:()=>H9,__experimentalUseBlockPreview:()=>LK,__experimentalUseBorderProps:()=>J6,__experimentalUseColorProps:()=>oj,__experimentalUseCustomSides:()=>O6,__experimentalUseGradient:()=>i_e,__experimentalUseHasRecursion:()=>oce,__experimentalUseMultipleOriginColorsAndGradients:()=>Fd,__experimentalUseResizeCanvas:()=>Yse,__experimentalWritingModeControl:()=>UI,__unstableBlockSettingsMenuFirstItem:()=>sT,__unstableBlockToolbarLastItem:()=>tT,__unstableEditorStyles:()=>Hl,__unstableIframe:()=>ig,__unstableInserterMenuExtension:()=>QB,__unstableRichTextInputEvent:()=>_F,__unstableUseBlockSelectionClearer:()=>Nm,__unstableUseClipboardHandler:()=>Wle,__unstableUseMouseMoveTypingReset:()=>C_,__unstableUseTypewriter:()=>nz,__unstableUseTypingObserver:()=>B_,createCustomColorsHOC:()=>v7,getColorClassName:()=>Ci,getColorObjectByAttributeValues:()=>va,getColorObjectByColorValue:()=>W0,getComputedFluidTypographyValue:()=>w7,getCustomValueFromPreset:()=>J7,getDimensionsClassesAndStyles:()=>rA,getFontSize:()=>Ch,getFontSizeClass:()=>Eu,getFontSizeObjectByValue:()=>sM,getGradientSlugByValue:()=>S7,getGradientValueBySlug:()=>_C,getPxFromCssUnit:()=>Nhe,getSpacingPresetCssVar:()=>cy,getTypographyClassesAndStyles:()=>nj,isValueSpacingPreset:()=>NC,privateApis:()=>mj,store:()=>x,storeConfig:()=>_h,transformStyles:()=>dg,useBlockBindingsUtils:()=>Ll,useBlockCommands:()=>eI,useBlockDisplayInformation:()=>It,useBlockEditContext:()=>Ie,useBlockEditingMode:()=>po,useBlockProps:()=>zy,useCachedTruthy:()=>ij,useHasRecursion:()=>lz,useInnerBlocksProps:()=>zm,useSetting:()=>h7,useSettings:()=>he,useStyleOverride:()=>ti,withColorContext:()=>TI,withColors:()=>y7,withFontSizes:()=>I7});function hj(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=hj(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function lge(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=hj(e))&&(r&&(r+=" "),r+=t);return r}var V=lge;var uce=l(Y(),1),fs=l(O(),1),tR=l(F(),1),fz=l(Q(),1),ZS=l(pt(),1);var z0=l(O(),1),ws=Symbol("mayDisplayControls"),Jp=Symbol("mayDisplayParentControls"),nu=Symbol("mayDisplayPatternEditingControls"),j0=Symbol("blockEditingMode"),eh=Symbol("blockBindings"),U0=Symbol("isPreviewMode"),dv=Symbol("isInListViewBlockSupportTree"),pA={name:"",isSelected:!1},hA=(0,z0.createContext)(pA);hA.displayName="BlockEditContext";var{Provider:H0}=hA;function Ie(){return(0,z0.useContext)(hA)}var cge={grad:.9,turn:360,rad:360/(2*Math.PI)},Sl=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Jo=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},wi=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},Tj=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},_j=function(e){return{r:wi(e.r,0,255),g:wi(e.g,0,255),b:wi(e.b,0,255),a:wi(e.a)}},gA=function(e){return{r:Jo(e.r),g:Jo(e.g),b:Jo(e.b),a:Jo(e.a,3)}},uge=/^#([0-9a-f]{3,8})$/i,G0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ij=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}},Pj=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}},Sj=function(e){return{h:Tj(e.h),s:wi(e.s,0,100),l:wi(e.l,0,100),a:wi(e.a)}},xj=function(e){return{h:Jo(e.h),s:Jo(e.s),l:Jo(e.l),a:Jo(e.a,3)}},wj=function(e){return Pj((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},fv=function(e){return{h:(t=Ij(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},dge=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fge=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mge=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,pge=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vA={string:[[function(e){var t=uge.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?Jo(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?Jo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=mge.exec(e)||pge.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:_j({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=dge.exec(e)||fge.exec(e);if(!t)return null;var o,r,n=Sj({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(cge[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return wj(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 Sl(t)&&Sl(o)&&Sl(r)?_j({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(!Sl(t)||!Sl(o)||!Sl(r))return null;var s=Sj({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return wj(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!Sl(t)||!Sl(o)||!Sl(r))return null;var s=(function(a){return{h:Tj(a.h),s:wi(a.s,0,100),v:wi(a.v,0,100),a:wi(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return Pj(s)},"hsv"]]},Cj=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]},hge=function(e){return typeof e=="string"?Cj(e.trim(),vA.string):typeof e=="object"&&e!==null?Cj(e,vA.object):[null,void 0]};var bA=function(e,t){var o=fv(e);return{h:o.h,s:wi(o.s+100*t,0,100),l:o.l,a:o.a}},kA=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Bj=function(e,t){var o=fv(e);return{h:o.h,s:o.s,l:wi(o.l+100*t,0,100),a:o.a}},yA=(function(){function e(t){this.parsed=hge(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 Jo(kA(this.rgba),2)},e.prototype.isDark=function(){return kA(this.rgba)<.5},e.prototype.isLight=function(){return kA(this.rgba)>=.5},e.prototype.toHex=function(){return t=gA(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?G0(Jo(255*i)):"","#"+G0(o)+G0(r)+G0(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return gA(this.rgba)},e.prototype.toRgbString=function(){return t=gA(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 xj(fv(this.rgba))},e.prototype.toHslString=function(){return t=xj(fv(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=Ij(this.rgba),{h:Jo(t.h),s:Jo(t.s),v:Jo(t.v),a:Jo(t.a,3)};var t},e.prototype.invert=function(){return Et({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),Et(bA(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Et(bA(this.rgba,-t))},e.prototype.grayscale=function(){return Et(bA(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Et(Bj(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Et(Bj(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"?Et({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):Jo(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=fv(this.rgba);return typeof t=="number"?Et({h:t,s:o.s,l:o.l,a:o.a}):Jo(o.h)},e.prototype.isEqual=function(t){return this.toHex()===Et(t).toHex()},e})(),Et=function(e){return e instanceof yA?e:new yA(e)},Ej=[],iu=function(e){e.forEach(function(t){Ej.indexOf(t)<0&&(t(yA,vA),Ej.push(t))})};function su(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 h in o)i[h]=new e(o[h]).toRgb();for(var p in o){var g=(a=d,c=i[p],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=p)}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 _A=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},SA=function(e){return .2126*_A(e.r)+.7152*_A(e.g)+.0722*_A(e.b)};function th(e){e.prototype.luminance=function(){return t=SA(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=SA(i),c=SA(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 Nj=l(A(),1);var Aj=l(xA(),1),{lock:Lj,unlock:M}=(0,Aj.__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");iu([su,th]);var{kebabCase:gge}=M(Nj.privateApis),va=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},W0=(e,t)=>e?.find(o=>o.color===t);function Ci(e,t){if(!(!e||!t))return`has-${gge(t)}-${e}`}function Dj(e,t){let o=Et(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var bC=l(O(),1),am=l(Q(),1),b7=l(A(),1);var m7=l(F(),1),p7=l(Pe(),1);var hC=l(O(),1),pC=l(Y(),1);var xl=l(Y(),1),Wj=l(A(),1),pv=l(F(),1),Ff=l(O(),1);var oh=l(O(),1),Fj=l(w(),1),$0=(0,oh.createContext)({});$0.displayName="BlockContext";function K0({value:e,children:t}){let o=(0,oh.useContext)($0),r=(0,oh.useMemo)(()=>({...o,...e}),[o,e]);return(0,Fj.jsx)($0.Provider,{value:r,children:t})}var Pr=$0;var rh=l(Gn(),1);function Df(e){return e?.startsWith("#")&&(0,rh.isValidFragment)(e)}function Mf(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function Vf(e){if(e.includes(" "))return!1;let o=(0,rh.getProtocol)(e),r=(0,rh.isValidProtocol)(o),n=bge(e),i=e?.startsWith("www.");return r||i||Df(e)||n||Mf(e)}function bge(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var kge="__default",jj="core/pattern-overrides";function mv(e){return e?.[kge]?.source===jj}function Uj(e,t){if(mv(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:jj};o[r]=n}return o}return e}var Hj=l(O(),1),mr=(0,Hj.createContext)({});mr.displayName="PrivateBlockContext";var Y0=l(w(),1),vge={},yge=e=>{let{name:t}=e,o=(0,xl.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,Y0.jsx)(r,{...e})},Gj=(0,Wj.withFilters)("editor.BlockEdit")(yge),_ge=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,pv.useRegistry)(),s=(0,xl.getBlockType)(t),a=(0,Ff.useContext)(Pr),c=(0,pv.useSelect)(v=>M(v(xl.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,Ff.useContext)(mr),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,Ff.useMemo)(()=>{let v=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([k])=>s.usesContext.includes(k))):vge;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(k=>{c[k?.source]?.usesContext?.forEach(y=>{v[y]=a[y]})}),{blockBindings:Uj(r?.metadata?.bindings,u),context:v,hasPatternOverrides:mv(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),h=(0,pv.useSelect)(v=>{if(!d)return r;let k={},y=new Map;for(let[_,S]of Object.entries(d)){let{source:C,args:B}=S,R=c[C];!R||!u?.includes(_)||y.set(R,{...y.get(R),[_]:{args:B}})}if(y.size)for(let[_,S]of y){let C={};_.getValues?C=_.getValues({select:v,context:f,clientId:o,bindings:S}):Object.keys(S).forEach(B=>{C[B]=_.label});for(let[B,R]of Object.entries(C))B==="url"&&(!R||!Vf(R))?k[B]=null:k[B]=R}return{...r,...k}},[r,u,d,o,f,c]),p=(0,Ff.useCallback)(v=>{if(!d){n(v);return}i.batch(()=>{let k={...v},y=new Map;for(let[S,C]of Object.entries(k)){if(!d[S]||!u?.includes(S))continue;let B=d[S],R=c[B?.source];R?.setValues&&(y.set(R,{...y.get(R),[S]:{args:B.args,newValue:C}}),delete k[S])}if(y.size)for(let[S,C]of y)S.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:C});let _=!!f["pattern/overrides"];!(m&&_)&&Object.keys(k).length&&(m&&delete k.href,n(k))})},[u,d,o,f,m,n,c,i]);if(!s)return null;if(s.apiVersion>1)return(0,Y0.jsx)(Gj,{...e,attributes:h,context:f,setAttributes:p});let g=(0,xl.hasBlockSupport)(s,"className",!0)?(0,xl.getBlockDefaultClassName)(t):null,b=V(g,r?.className,e.className);return(0,Y0.jsx)(Gj,{...e,attributes:h,className:b,context:f,setAttributes:p})},$j=_ge;var u7=l(Y(),1),iM=l(A(),1),d7=l(F(),1),mC=l(N(),1);var fC=l(F(),1);var bv=l(zf(),1),BA=l(Q(),1),kv=l(F(),1),t8=l(Pe(),1),nx=l(Y(),1);var De=l(N(),1),qj={insertUsage:{}},hv={alignWide:!1,supportsLayout:!0,colors:[{name:(0,De.__)("Black"),slug:"black",color:"#000000"},{name:(0,De.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,De.__)("White"),slug:"white",color:"#ffffff"},{name:(0,De.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,De.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,De.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,De.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,De.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,De.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,De.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,De.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,De.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,De._x)("Small","font size name"),size:13,slug:"small"},{name:(0,De._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,De._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,De._x)("Large","font size name"),size:36,slug:"large"},{name:(0,De._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,De.__)("Thumbnail")},{slug:"medium",name:(0,De.__)("Medium")},{slug:"large",name:(0,De.__)("Large")},{slug:"full",name:(0,De.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,canEditCSS:!1,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,De.__)("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,De.__)("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,De.__)("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,De.__)("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,De.__)("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,De.__)("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,De.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,De.__)("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,De.__)("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,De.__)("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,De.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,De.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function q0(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function Z0(e,t,o,r=1){let n=[...e];return n.splice(t,r),q0(n,e.slice(t,t+r),o)}var Bi=Symbol("globalStylesDataKey"),X0=Symbol("globalStylesLinks"),au=Symbol("selectBlockPatternsKey"),Q0=Symbol("reusableBlocksSelect"),lu=Symbol("sectionRootClientIdKey"),J0=Symbol("mediaEditKey"),ex=Symbol("getMediaSelect"),cu=Symbol("isIsolatedEditor"),Ei=Symbol("deviceTypeKey"),tx=Symbol("isNavigationOverlayContext"),Zj=Symbol("isNavigationPostEditor"),ox=Symbol("mediaUploadOnSuccess");var{isContentBlock:Sge}=M(nx.privateApis),xge=e=>e;function rx(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),rx(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function wA(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 o8(e,t=xge){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 r8(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function Xj(e){return o8(e,t=>{let{attributes:o,...r}=t;return r})}function Qj(e){return o8(e,t=>t.attributes)}function wge(e,t){return(0,bv.default)(Object.keys(e),Object.keys(t))}function Cge(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,bv.default)(e.clientIds,t.clientIds)&&wge(e.attributes,t.attributes)}function Jj(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 uu(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.has(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 Bge=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),Jj(r,o.blocks),uu(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)}),uu(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)})}),uu(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=r8(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),Jj(r,o.blocks),uu(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)}uu(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)}),uu(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),uu(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),uu(r,i,!0);break}}return r};function Ege(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:!Cge(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function Tge(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 Ige=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)},Pge=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=e(void 0,{type:"INSERT_BLOCKS",rootClientId:"",blocks:o.blocks}),n=t?.controlledInnerBlocks??new Set;if(t?.order)for(let s of n){if(!r.byClientId.has(s))continue;r.controlledInnerBlocks.add(s);let a=t.order.get(s);if(!a?.length)continue;r.order.set(s,a);let c=(u,d)=>{let f=t.byClientId.get(u);if(!f)return;r.byClientId.set(u,f),r.attributes.set(u,t.attributes.get(u)),r.parents.set(u,d);let m=t.order.get(u)||[];r.order.set(u,m),m.forEach(h=>c(h,u))};a.forEach(u=>c(u,s))}for(let s of r.controlledInnerBlocks){let a=r.order.get(s);if(!a?.length)continue;let c=a.map(f=>t.tree.get(f)),u=r.tree.get(s);u&&(u.innerBlocks=c),r.tree.set("controlled||"+s,{innerBlocks:c});let d=f=>{let m=t.tree.get(f);if(!m)return;r.tree.set(f,m),(r.order.get(f)||[]).forEach(d)};a.forEach(d)}let i=t?.blockEditingModes??new Map;for(let[s,a]of i)r.tree.has(s)&&r.blockEditingModes.set(s,a);return r}return e(t,o)},Rge=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(t.controlledInnerBlocks.size){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks.has(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},Oge=e=>(t,o)=>{if(o.type==="SET_HAS_CONTROLLED_INNER_BLOCKS"){if(t.order.get(o.clientId)?.length){let n=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:o.clientId,blocks:[]});return e(n,o)}return e(t,o)}return e(t,o)},Age=(0,BA.pipe)(kv.combineReducers,Bge,Ige,Rge,Pge,Ege,Tge,Oge)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return Xj(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)}),Xj(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 Qj(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)}),Qj(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=rx(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=rx(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,q0(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]);if(c===-1)return e;let u=new Map(e);return u.set(r,Z0(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,q0(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,Z0(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,Z0(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=rx(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 wA(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return wA(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)}),wA(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=new Set,{type:t,clientId:o,hasControlledInnerBlocks:r}){if(t==="SET_HAS_CONTROLLED_INNER_BLOCKS"){if(r)return e.has(o)?e:new Set(e).add(o);if(!e.has(o))return e;let n=new Set(e);return n.delete(o),n}return e},blockEditingModes(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}}return e}});function Lge(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function Nge(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function Dge(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function Mge(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function Vge(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function e8(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 Fge(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=e8(e.selectionStart,t),r=e8(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function zge(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function jge(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function Uge(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function Hge(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 Gge(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function Wge(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 $ge(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 Kge(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,bv.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function Yge(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function qge(e=hv,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...hv,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,t8.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function Zge(e=qj,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,kv.select)(nx.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 Xge=(e=new Map,t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let i=r.shift();o.add(i.clientId),r.push(...i.innerBlocks)}let n=new Map(e);for(let i of t.clientIds)o.has(i)||n.delete(i);return n}case"REMOVE_BLOCKS":{let o=new Map(e);for(let r of t.clientIds)o.delete(r);return o}case"UPDATE_BLOCK_LIST_SETTINGS":{let r=(typeof t.clientId=="string"?[[t.clientId,t.settings]]:Object.entries(t.clientId)).filter(([i,s])=>s?!(0,bv.default)(e.get(i),s):e.has(i));if(!r.length)return e;let n=new Map(e);for(let[i,s]of r)s?n.set(i,s):n.delete(i);return n}}return e};function Qge(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 Jge(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 ebe(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 tbe(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 obe(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 rbe(e,t){if(t.type==="EDIT_CONTENT_ONLY_SECTION")return t.clientId;if(!e)return e;switch(t.type){case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":if(t.clientIds.includes(e))return;break;case"RESET_BLOCKS":if(!r8(t.blocks)[e])return;break}return e}function nbe(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 ibe(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function sbe(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function abe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function lbe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function cbe(e={allOpen:!1,panels:{}},t){switch(t.type){case"SET_OPEN_LIST_VIEW_PANEL":return{allOpen:!1,panels:t.clientId?{[t.clientId]:!0}:{}};case"SET_ALL_LIST_VIEW_PANELS_OPEN":return{allOpen:!0,panels:{}};case"TOGGLE_LIST_VIEW_PANEL":return{allOpen:!1,panels:{...e.panels,[t.clientId]:t.isOpen}};case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":{if(!t.clientIds||t.clientIds.length===0)return e;let o={...e.panels},r=!1;return t.clientIds.forEach(n=>{n in o&&(delete o[n],r=!0)}),r?{...e,panels:o}:e}}return e}function ube(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function dbe(e=!1,t){switch(t.type){case"OPEN_LIST_VIEW_CONTENT_PANEL":return!0;case"CLOSE_LIST_VIEW_CONTENT_PANEL":return!1;case"CLEAR_SELECTED_BLOCK":return!1}return e}function fbe(e=null,t){switch(t.type){case"REQUEST_INSPECTOR_TAB":return{tabName:t.tabName,options:t.options};case"CLEAR_REQUESTED_INSPECTOR_TAB":return null}return e}var mbe=(0,kv.combineReducers)({blocks:Age,isDragging:Dge,isTyping:Nge,isBlockInterfaceHidden:Lge,draggedBlocks:Mge,selection:Fge,isMultiSelecting:zge,isSelectionEnabled:jge,initialPosition:Wge,blocksMode:$ge,blockListSettings:Xge,insertionPoint:lbe,insertionCue:Kge,template:Yge,settings:qge,preferences:Zge,lastBlockAttributesChange:Qge,lastFocus:sbe,expandedBlock:tbe,highlightedBlock:Jge,lastBlockInserted:obe,editedContentOnlySection:rbe,blockVisibility:Vge,viewportModalClientIds:Uge,styleOverrides:nbe,removalPromptData:Hge,blockRemovalRules:Gge,registeredInserterMediaCategories:ibe,zoomLevel:abe,hasBlockSpotlight:ebe,openedListViewPanels:cbe,listViewExpandRevision:ube,listViewContentPanelOpen:dbe,requestedInspectorTab:fbe});function n8(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks.has(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 EA(e,t,o){let r=n8(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)EA(e,n.clientId,o)}function gv(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 pbe(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function CA(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[lu],i=e.blocks.order.get(n),s=Array.from(e.blocks.blockEditingModes).some(([,g])=>g==="disabled"),a=[],c=[];e.blocks.controlledInnerBlocks.forEach(g=>{let b=e.blocks.byClientId?.get(g);b?.name==="core/template-part"&&a.push(g),b?.name==="core/block"&&c.push(g)});let u=Array.from(e.blockListSettings).flatMap(([g,b])=>b?.templateLock==="contentOnly"?[g]:[]),d=e.settings?.[cu],f=e.settings?.disableContentOnlyForUnsyncedPatterns,m=d||f?[]:Array.from(e.blocks.attributes.keys()).filter(g=>e.blocks.attributes.get(g)?.metadata?.patternName),h=e.settings?.disableContentOnlyForTemplateParts,p=[...u,...m,...d||h?[]:a];return EA(e,t,g=>{let{clientId:b,name:v}=g,k=!!e.editedContentOnlySection,y=!1;if(k&&(y=b===e.editedContentOnlySection||!!gv(e,b,[e.editedContentOnlySection]),!y)){r.set(b,"disabled");return}if(!e.blocks.blockEditingModes.has(b)){if(s){let _,S=e.blocks.parents.get(b);for(;S!==void 0&&(e.blocks.blockEditingModes.has(S)&&(_=e.blocks.blockEditingModes.get(S)),!_);)S=e.blocks.parents.get(S);if(_==="disabled"){r.set(b,"disabled");return}}if(o){if(b===n){r.set(b,"contentOnly");return}if(!i?.length){r.set(b,"disabled");return}if(i.includes(b)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}if(c.length){if(c.includes(b)){if(gv(e,b,c)){r.set(b,"disabled");return}return}let _=gv(e,b,c);if(_){if(gv(e,_,c)){r.set(b,"disabled");return}if(pbe(g)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}}if(k&&y){r.set(b,"default");return}p.length&&gv(e,b,p)&&(Sge(v)?r.set(b,"contentOnly"):r.set(b,"disabled"))}}),r}function du({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{EA(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=CA(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function hbe(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=du({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=du({prevState:t,nextState:r,addedBlocks:o.blocks});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{if(r.settings?.disableContentOnlyForUnsyncedPatterns)break;let i=[],s=[];for(let c of o?.clientIds){let u=o.options?.uniqueByBlock?o.attributes[c]:o.attributes;if(!u)break;u.metadata?.patternName&&!t.blocks.attributes.get(c)?.metadata?.patternName?i.push(r.blocks.tree.get(c)):u.metadata&&!u.metadata?.patternName&&t.blocks.attributes.get(c)?.metadata?.patternName&&s.push(c)}if(!i?.length&&!s?.length)break;let a=du({prevState:t,nextState:r,addedBlocks:i,removedClientIds:s});if(a)return{...r,derivedBlockEditingModes:a??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.get(c)?.templateLock!=="contentOnly"&&r.blockListSettings.get(c)?.templateLock==="contentOnly",d=t.blockListSettings.get(c)?.templateLock==="contentOnly"&&r.blockListSettings.get(c)?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=du({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=n8(r,o.clientId);if(!n)break;let i=du({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=du({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=du({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=du({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[lu]!==r?.settings?.[lu]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns||!!t?.settings?.[cu]!=!!r?.settings?.[cu]||!!t?.settings?.disableContentOnlyForTemplateParts!=!!r?.settings?.disableContentOnlyForTemplateParts)return{...r,derivedBlockEditingModes:CA(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:CA(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function gbe(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 i8=(0,BA.pipe)(hbe,gbe)(mbe);var QD={};ka(QD,{__experimentalGetActiveBlockIdByBlockNames:()=>hve,__experimentalGetAllowedBlocks:()=>Jke,__experimentalGetAllowedPatterns:()=>rve,__experimentalGetBlockListSettingsForBlocks:()=>lve,__experimentalGetDirectInsertBlock:()=>eve,__experimentalGetGlobalBlocksByName:()=>uke,__experimentalGetLastBlockAttributeChanges:()=>dve,__experimentalGetParsedPattern:()=>tve,__experimentalGetPatternTransformItems:()=>sve,__experimentalGetPatternsByBlockTypes:()=>ive,__experimentalGetReusableBlockTitle:()=>cve,__unstableGetBlockWithoutInnerBlocks:()=>ake,__unstableGetClientIdWithClientIdsTree:()=>T8,__unstableGetClientIdsTree:()=>I8,__unstableGetContentLockingParent:()=>xve,__unstableGetSelectedBlocksWithPartialSelection:()=>Oke,__unstableGetTemporarilyEditingAsBlocks:()=>wve,__unstableGetVisibleBlocks:()=>vve,__unstableHasActiveBlockOverlayActive:()=>G8,__unstableIsFullySelected:()=>Tke,__unstableIsLastBlockChangeIgnored:()=>uve,__unstableIsSelectionCollapsed:()=>Ike,__unstableIsSelectionMergeable:()=>Rke,__unstableIsWithinBlockOverlay:()=>yve,__unstableSelectionHasUnmergeableBlock:()=>Pke,areInnerBlocksControlled:()=>cC,canEditBlock:()=>j8,canInsertBlockType:()=>nm,canInsertBlocks:()=>$ke,canLockBlockType:()=>Yke,canMoveBlock:()=>z8,canMoveBlocks:()=>Kke,canRemoveBlock:()=>YD,canRemoveBlocks:()=>F8,didAutomaticChange:()=>mve,getAdjacentBlockClientId:()=>GD,getAllowedBlocks:()=>jD,getBlock:()=>Il,getBlockAttributes:()=>Ri,getBlockCount:()=>fke,getBlockEditingMode:()=>Oi,getBlockHierarchyRootClientId:()=>kke,getBlockIndex:()=>L8,getBlockInsertionPoint:()=>Uke,getBlockListSettings:()=>lC,getBlockMode:()=>Mke,getBlockName:()=>ht,getBlockNamesByClientId:()=>dke,getBlockOrder:()=>Rr,getBlockParents:()=>Ts,getBlockParentsByBlockName:()=>HD,getBlockRootClientId:()=>Lo,getBlockSelectionEnd:()=>pke,getBlockSelectionStart:()=>mke,getBlockTransformItems:()=>Xke,getBlocks:()=>lke,getBlocksByClientId:()=>aC,getBlocksByName:()=>R8,getClientIdsOfDescendants:()=>P8,getClientIdsWithDescendants:()=>hh,getDirectInsertBlock:()=>H8,getDraggedBlockClientIds:()=>Fke,getFirstMultiSelectedBlockClientId:()=>WD,getGlobalBlockCount:()=>cke,getHoveredBlockClientId:()=>kve,getInserterItems:()=>Zke,getLastMultiSelectedBlockClientId:()=>O8,getLowestCommonAncestorWithSelectedBlock:()=>vke,getMultiSelectedBlockClientIds:()=>wu,getMultiSelectedBlocks:()=>xke,getMultiSelectedBlocksEndClientId:()=>Eke,getMultiSelectedBlocksStartClientId:()=>Bke,getNextBlockClientId:()=>_ke,getPatternsByBlockTypes:()=>nve,getPreviousBlockClientId:()=>yke,getSelectedBlock:()=>bke,getSelectedBlockClientId:()=>bh,getSelectedBlockClientIds:()=>kh,getSelectedBlockCount:()=>hke,getSelectedBlocksInitialCaretPosition:()=>Ske,getSelectionEnd:()=>ey,getSelectionStart:()=>Jv,getSettings:()=>vu,getTemplate:()=>Wke,getTemplateLock:()=>ya,hasBlockMovingClientId:()=>fve,hasDraggedInnerBlock:()=>M8,hasInserterItems:()=>Qke,hasMultiSelection:()=>Lke,hasSelectedBlock:()=>gke,hasSelectedInnerBlock:()=>D8,isAncestorBeingDragged:()=>zke,isAncestorMultiSelected:()=>Cke,isBlockBeingDragged:()=>$D,isBlockHighlighted:()=>pve,isBlockInsertionPointVisible:()=>Hke,isBlockMultiSelected:()=>A8,isBlockSelected:()=>N8,isBlockValid:()=>ske,isBlockVisible:()=>bve,isBlockWithinSelection:()=>Ake,isCaretWithinFormattedText:()=>jke,isDraggingBlocks:()=>V8,isFirstMultiSelectedBlock:()=>wke,isGroupable:()=>Sve,isLastBlockChangePersistent:()=>ave,isMultiSelecting:()=>Nke,isSelectionEnabled:()=>Dke,isTyping:()=>Vke,isUngroupable:()=>_ve,isValidTemplate:()=>Gke,wasBlockJustInserted:()=>gve});var Re=l(Y(),1),C8=l(O(),1),B8=l(pt(),1);var ix=l(O(),1),Be=(0,ix.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,ix.cloneElement)(e,{width:t,height:t,...o,ref:r}));var sx=l(Z(),1),TA=l(w(),1),jf=(0,TA.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TA.jsx)(sx.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var ax=l(Z(),1),IA=l(w(),1),PA=(0,IA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IA.jsx)(ax.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var lx=l(Z(),1),RA=l(w(),1),fu=(0,RA.jsx)(lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RA.jsx)(lx.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var cx=l(Z(),1),OA=l(w(),1),Uf=(0,OA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OA.jsx)(cx.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var ux=l(Z(),1),AA=l(w(),1),mu=(0,AA.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(ux.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var dx=l(Z(),1),LA=l(w(),1),NA=(0,LA.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(dx.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 fx=l(Z(),1),DA=l(w(),1),vv=(0,DA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DA.jsx)(fx.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var mx=l(Z(),1),MA=l(w(),1),yv=(0,MA.jsx)(mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MA.jsx)(mx.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 px=l(Z(),1),VA=l(w(),1),FA=(0,VA.jsx)(px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VA.jsx)(px.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 hx=l(Z(),1),zA=l(w(),1),jA=(0,zA.jsx)(hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zA.jsx)(hx.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 gx=l(Z(),1),UA=l(w(),1),_v=(0,UA.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UA.jsx)(gx.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 bx=l(Z(),1),HA=l(w(),1),GA=(0,HA.jsx)(bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HA.jsx)(bx.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var kx=l(Z(),1),WA=l(w(),1),Cs=(0,WA.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WA.jsx)(kx.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var vx=l(Z(),1),$A=l(w(),1),pr=(0,$A.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(vx.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var yx=l(Z(),1),KA=l(w(),1),Sv=(0,KA.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KA.jsx)(yx.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var _x=l(Z(),1),YA=l(w(),1),Gr=(0,YA.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YA.jsx)(_x.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var Sx=l(Z(),1),qA=l(w(),1),pu=(0,qA.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qA.jsx)(Sx.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 xx=l(Z(),1),ZA=l(w(),1),Uo=(0,ZA.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZA.jsx)(xx.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var wx=l(Z(),1),XA=l(w(),1),Hf=(0,XA.jsx)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(wx.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var Cx=l(Z(),1),QA=l(w(),1),Gf=(0,QA.jsx)(Cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QA.jsx)(Cx.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 Bx=l(Z(),1),JA=l(w(),1),eL=(0,JA.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JA.jsx)(Bx.Path,{fillRule:"evenodd",clipRule:"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"})});var Ex=l(Z(),1),tL=l(w(),1),oL=(0,tL.jsx)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tL.jsx)(Ex.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 Tx=l(Z(),1),rL=l(w(),1),Wf=(0,rL.jsx)(Tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(Tx.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 Ix=l(Z(),1),nL=l(w(),1),iL=(0,nL.jsx)(Ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nL.jsx)(Ix.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 $f=l(Z(),1),nh=l(w(),1),sL=(0,nh.jsxs)($f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,nh.jsx)($f.G,{opacity:".25",children:(0,nh.jsx)($f.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,nh.jsx)($f.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 Kf=l(Z(),1),ih=l(w(),1),aL=(0,ih.jsxs)(Kf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ih.jsx)(Kf.G,{opacity:".25",children:(0,ih.jsx)(Kf.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,ih.jsx)(Kf.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 Yf=l(Z(),1),sh=l(w(),1),lL=(0,sh.jsxs)(Yf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,sh.jsx)(Yf.G,{opacity:".25",children:(0,sh.jsx)(Yf.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,sh.jsx)(Yf.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 qf=l(Z(),1),ah=l(w(),1),cL=(0,ah.jsxs)(qf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ah.jsx)(qf.G,{opacity:".25",children:(0,ah.jsx)(qf.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,ah.jsx)(qf.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 Px=l(Z(),1),uL=l(w(),1),dL=(0,uL.jsx)(Px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uL.jsx)(Px.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})});var Rx=l(Z(),1),fL=l(w(),1),xv=(0,fL.jsx)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fL.jsx)(Rx.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var Ox=l(Z(),1),mL=l(w(),1),pL=(0,mL.jsx)(Ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mL.jsx)(Ox.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 Ax=l(Z(),1),hL=l(w(),1),Zf=(0,hL.jsx)(Ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hL.jsx)(Ax.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 Lx=l(Z(),1),gL=l(w(),1),bL=(0,gL.jsx)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Lx.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 Nx=l(Z(),1),kL=l(w(),1),vL=(0,kL.jsx)(Nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kL.jsx)(Nx.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 Dx=l(Z(),1),yL=l(w(),1),_L=(0,yL.jsx)(Dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yL.jsx)(Dx.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var Mx=l(Z(),1),SL=l(w(),1),xL=(0,SL.jsx)(Mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SL.jsx)(Mx.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 Vx=l(Z(),1),wL=l(w(),1),CL=(0,wL.jsx)(Vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wL.jsx)(Vx.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 Fx=l(Z(),1),BL=l(w(),1),EL=(0,BL.jsx)(Fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BL.jsx)(Fx.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 zx=l(Z(),1),TL=l(w(),1),IL=(0,TL.jsx)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TL.jsx)(zx.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 jx=l(Z(),1),PL=l(w(),1),RL=(0,PL.jsx)(jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PL.jsx)(jx.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 Ux=l(Z(),1),OL=l(w(),1),AL=(0,OL.jsx)(Ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OL.jsx)(Ux.Path,{d:"M12.75 19.45 15 17.5l1 1.1-4 3.4-4-3.4 1-1.1 2.25 1.95V14.5h1.5v4.95ZM19 12.75H5v-1.5h14v1.5ZM16 5.4l-1 1.1-2.25-1.95V9.5h-1.5V4.55L9 6.5 8 5.4 12 2l4 3.4Z"})});var Hx=l(Z(),1),LL=l(w(),1),Gx=(0,LL.jsx)(Hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LL.jsx)(Hx.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 Wx=l(Z(),1),NL=l(w(),1),wv=(0,NL.jsx)(Wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NL.jsx)(Wx.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 $x=l(Z(),1),DL=l(w(),1),Cv=(0,DL.jsx)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DL.jsx)($x.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Kx=l(Z(),1),ML=l(w(),1),Bv=(0,ML.jsx)(Kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ML.jsx)(Kx.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 Yx=l(Z(),1),VL=l(w(),1),FL=(0,VL.jsx)(Yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VL.jsx)(Yx.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var qx=l(Z(),1),zL=l(w(),1),jL=(0,zL.jsx)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zL.jsx)(qx.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 Zx=l(Z(),1),UL=l(w(),1),HL=(0,UL.jsx)(Zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UL.jsx)(Zx.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 Xx=l(Z(),1),GL=l(w(),1),WL=(0,GL.jsx)(Xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GL.jsx)(Xx.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var Qx=l(Z(),1),$L=l(w(),1),KL=(0,$L.jsx)(Qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$L.jsx)(Qx.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 Jx=l(Z(),1),YL=l(w(),1),qL=(0,YL.jsx)(Jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YL.jsx)(Jx.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 ew=l(Z(),1),ZL=l(w(),1),XL=(0,ZL.jsx)(ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZL.jsx)(ew.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var tw=l(Z(),1),QL=l(w(),1),Ev=(0,QL.jsx)(tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QL.jsx)(tw.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 ow=l(Z(),1),JL=l(w(),1),eN=(0,JL.jsx)(ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JL.jsx)(ow.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 rw=l(Z(),1),tN=l(w(),1),oN=(0,tN.jsx)(rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tN.jsx)(rw.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var nw=l(Z(),1),rN=l(w(),1),nN=(0,rN.jsx)(nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rN.jsx)(nw.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var iw=l(Z(),1),iN=l(w(),1),hu=(0,iN.jsx)(iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iN.jsx)(iw.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var sw=l(Z(),1),sN=l(w(),1),gu=(0,sN.jsx)(sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sN.jsx)(sw.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var aw=l(Z(),1),aN=l(w(),1),bu=(0,aN.jsx)(aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aN.jsx)(aw.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var lw=l(Z(),1),lN=l(w(),1),cN=(0,lN.jsx)(lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lN.jsx)(lw.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var cw=l(Z(),1),uN=l(w(),1),lh=(0,uN.jsx)(cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uN.jsx)(cw.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var uw=l(Z(),1),dN=l(w(),1),fN=(0,dN.jsx)(uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dN.jsx)(uw.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var dw=l(Z(),1),mN=l(w(),1),ch=(0,mN.jsx)(dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mN.jsx)(dw.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var fw=l(Z(),1),pN=l(w(),1),hN=(0,pN.jsx)(fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pN.jsx)(fw.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var mw=l(Z(),1),gN=l(w(),1),wl=(0,gN.jsx)(mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gN.jsx)(mw.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 pw=l(Z(),1),bN=l(w(),1),kN=(0,bN.jsx)(pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bN.jsx)(pw.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 hw=l(Z(),1),vN=l(w(),1),Ti=(0,vN.jsx)(hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vN.jsx)(hw.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 gw=l(Z(),1),yN=l(w(),1),bn=(0,yN.jsx)(gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yN.jsx)(gw.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 bw=l(Z(),1),_N=l(w(),1),Tv=(0,_N.jsx)(bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_N.jsx)(bw.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var kw=l(Z(),1),SN=l(w(),1),xN=(0,SN.jsx)(kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SN.jsx)(kw.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 vw=l(Z(),1),wN=l(w(),1),CN=(0,wN.jsx)(vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wN.jsx)(vw.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 yw=l(Z(),1),BN=l(w(),1),Xf=(0,BN.jsx)(yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BN.jsx)(yw.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 Iv=l(Z(),1),Pv=l(w(),1),uh=(0,Pv.jsxs)(Iv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Pv.jsx)(Iv.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Pv.jsx)(Iv.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 _w=l(Z(),1),EN=l(w(),1),Rv=(0,EN.jsx)(_w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EN.jsx)(_w.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 Sw=l(Z(),1),TN=l(w(),1),Bs=(0,TN.jsx)(Sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TN.jsx)(Sw.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Ov=l(Z(),1),Av=l(w(),1),Qf=(0,Av.jsxs)(Ov.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Av.jsx)(Ov.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Av.jsx)(Ov.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 xw=l(Z(),1),IN=l(w(),1),PN=(0,IN.jsx)(xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IN.jsx)(xw.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 ww=l(Z(),1),RN=l(w(),1),Jf=(0,RN.jsx)(ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RN.jsx)(ww.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var Cw=l(Z(),1),ON=l(w(),1),AN=(0,ON.jsx)(Cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ON.jsx)(Cw.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 Bw=l(Z(),1),LN=l(w(),1),Ii=(0,LN.jsx)(Bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LN.jsx)(Bw.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Ew=l(Z(),1),NN=l(w(),1),DN=(0,NN.jsx)(Ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NN.jsx)(Ew.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var Tw=l(Z(),1),MN=l(w(),1),VN=(0,MN.jsx)(Tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MN.jsx)(Tw.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var Iw=l(Z(),1),FN=l(w(),1),zN=(0,FN.jsx)(Iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FN.jsx)(Iw.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Pw=l(Z(),1),jN=l(w(),1),UN=(0,jN.jsx)(Pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jN.jsx)(Pw.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 Rw=l(Z(),1),HN=l(w(),1),GN=(0,HN.jsx)(Rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HN.jsx)(Rw.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 Ow=l(Z(),1),WN=l(w(),1),hr=(0,WN.jsx)(Ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WN.jsx)(Ow.Path,{d:"M7 11.5h10V13H7z"})});var Aw=l(Z(),1),$N=l(w(),1),KN=(0,$N.jsx)(Aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$N.jsx)(Aw.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 Lw=l(Z(),1),YN=l(w(),1),qN=(0,YN.jsx)(Lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YN.jsx)(Lw.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 Nw=l(Z(),1),ZN=l(w(),1),XN=(0,ZN.jsx)(Nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZN.jsx)(Nw.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 Dw=l(Z(),1),QN=l(w(),1),em=(0,QN.jsx)(Dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QN.jsx)(Dw.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 Lv=l(Z(),1),Nv=l(w(),1),JN=(0,Nv.jsxs)(Lv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Nv.jsx)(Lv.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,Nv.jsx)(Lv.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 Mw=l(Z(),1),eD=l(w(),1),tD=(0,eD.jsx)(Mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eD.jsx)(Mw.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 Vw=l(Z(),1),oD=l(w(),1),Fw=(0,oD.jsx)(Vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oD.jsx)(Vw.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var Dv=l(Z(),1),Mv=l(w(),1),rD=(0,Mv.jsxs)(Dv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Mv.jsx)(Dv.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,Mv.jsx)(Dv.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var dh=l(Z(),1),fh=l(w(),1),nD=(0,fh.jsxs)(dh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,fh.jsx)(dh.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,fh.jsx)(dh.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,fh.jsx)(dh.Path,{d:"m18 7.5v9h1.5v-9z"})]});var Vv=l(Z(),1),Fv=l(w(),1),iD=(0,Fv.jsxs)(Vv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Fv.jsx)(Vv.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,Fv.jsx)(Vv.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var zv=l(Z(),1),jv=l(w(),1),sD=(0,jv.jsxs)(zv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,jv.jsx)(zv.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,jv.jsx)(zv.Path,{d:"m18 16.5v-9h1.5v9z"})]});var Uv=l(Z(),1),Hv=l(w(),1),aD=(0,Hv.jsxs)(Uv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Hv.jsx)(Uv.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,Hv.jsx)(Uv.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var mh=l(Z(),1),ph=l(w(),1),lD=(0,ph.jsxs)(mh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ph.jsx)(mh.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,ph.jsx)(mh.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,ph.jsx)(mh.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var zw=l(Z(),1),cD=l(w(),1),uD=(0,cD.jsx)(zw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cD.jsx)(zw.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 jw=l(Z(),1),dD=l(w(),1),Gv=(0,dD.jsx)(jw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dD.jsx)(jw.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var Uw=l(Z(),1),fD=l(w(),1),tm=(0,fD.jsx)(Uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fD.jsx)(Uw.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Hw=l(Z(),1),mD=l(w(),1),pD=(0,mD.jsx)(Hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mD.jsx)(Hw.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 Gw=l(Z(),1),hD=l(w(),1),Pi=(0,hD.jsx)(Gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hD.jsx)(Gw.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 Ww=l(Z(),1),gD=l(w(),1),bD=(0,gD.jsx)(Ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gD.jsx)(Ww.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})});var $w=l(Z(),1),kD=l(w(),1),vD=(0,kD.jsx)($w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kD.jsx)($w.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 Kw=l(Z(),1),yD=l(w(),1),_D=(0,yD.jsx)(Kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yD.jsx)(Kw.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 Yw=l(Z(),1),SD=l(w(),1),xD=(0,SD.jsx)(Yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SD.jsx)(Yw.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 qw=l(Z(),1),wD=l(w(),1),CD=(0,wD.jsx)(qw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wD.jsx)(qw.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 Zw=l(Z(),1),BD=l(w(),1),ED=(0,BD.jsx)(Zw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BD.jsx)(Zw.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 Xw=l(Z(),1),TD=l(w(),1),Cl=(0,TD.jsx)(Xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TD.jsx)(Xw.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 Qw=l(Z(),1),ID=l(w(),1),Es=(0,ID.jsx)(Qw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ID.jsx)(Qw.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 Jw=l(Z(),1),PD=l(w(),1),RD=(0,PD.jsx)(Jw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PD.jsx)(Jw.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 eC=l(Z(),1),OD=l(w(),1),AD=(0,OD.jsx)(eC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OD.jsx)(eC.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 tC=l(Z(),1),LD=l(w(),1),ND=(0,LD.jsx)(tC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LD.jsx)(tC.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 Tl=l(gr(),1),Wn=l(Pe(),1),Ee=l(F(),1);var S8=l(Y(),1),x8=l(c8(),1);var Yt="core/block-editor";var nC={};ka(nC,{getAllPatterns:()=>Lbe,getBlockRemovalRules:()=>Tbe,getBlockSettings:()=>d8,getBlockStyles:()=>zbe,getBlockWithoutAttributes:()=>xbe,getClosestAllowedInsertionPoint:()=>h8,getClosestAllowedInsertionPointForPattern:()=>Ube,getContentLockingParent:()=>DD,getEditedContentOnlySection:()=>MD,getEnabledBlockParents:()=>Bbe,getEnabledClientIdsTree:()=>Cbe,getExpandedBlock:()=>Fbe,getInserterMediaCategories:()=>Rbe,getInsertionPoint:()=>Hbe,getLastFocus:()=>Mbe,getLastInsertedBlocksClientIds:()=>Sbe,getListViewExpandRevision:()=>Xbe,getParentSectionBlock:()=>yu,getPatternBySlug:()=>Abe,getRegisteredInserterMediaCategories:()=>Pbe,getRemovalPromptData:()=>Ebe,getRequestedInspectorTab:()=>Jbe,getReusableBlocks:()=>Dbe,getSectionRootClientId:()=>rm,getStyleOverrides:()=>Ibe,getViewportModalClientIds:()=>Qbe,getZoomLevel:()=>jbe,hasAllowedPatterns:()=>Obe,hasBlockSpotlight:()=>Kbe,isBlockHiddenAnywhere:()=>Gbe,isBlockHiddenAtViewport:()=>g8,isBlockHiddenEverywhere:()=>zD,isBlockInterfaceHidden:()=>_be,isBlockParentHiddenAtViewport:()=>$be,isBlockParentHiddenEverywhere:()=>Wbe,isBlockSubtreeDisabled:()=>wbe,isContainerInsertableToInContentOnlyMode:()=>$v,isDragging:()=>Vbe,isEditLockedBlock:()=>b8,isListViewContentPanelOpen:()=>qbe,isListViewPanelOpened:()=>Zbe,isLockedBlock:()=>Ybe,isMoveLockedBlock:()=>k8,isRemoveLockedBlock:()=>v8,isSectionBlock:()=>_u,isWithinEditedContentOnlySection:()=>VD,isZoomOut:()=>FD});var Wr=l(F(),1),Wv=l(Y(),1);var oC=l(N(),1);var Tt={desktop:{label:(0,oC.__)("Desktop"),icon:dL,key:"desktop"},tablet:{label:(0,oC.__)("Tablet"),icon:bD,key:"tablet"},mobile:{label:(0,oC.__)("Mobile"),icon:Rv,key:"mobile"}},ku=Object.entries(Tt);var rC=l(Y(),1),u8=l(pt(),1);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 Bl=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var bbe=["color","border","dimensions","typography","spacing"],kbe={"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},vbe={"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"},ybe=e=>vbe[e]||e;function d8(e,t,...o){let r=ht(e,t),n=[];if(t){let i=t;do{let s=ht(e,i);(0,rC.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(bbe.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,u8.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=ybe(i);for(let d of n){let f=Ri(e,d);if(s=Bl(f.settings?.blocks?.[r],a)??Bl(f.settings,a),s!==void 0)break}let c=vu(e);if(s===void 0&&r&&(s=Bl(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=Bl(c.__experimentalFeatures,a)),s!==void 0)return rC.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=kbe[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:f8}=M(Wv.privateApis);function _be(e){return e.isBlockInterfaceHidden}function Sbe(e){return e?.lastBlockInserted?.clientIds}function xbe(e,t){return e.blocks.byClientId.get(t)}var wbe=(e,t)=>{let o=r=>Oi(e,r)==="disabled"&&Rr(e,r).every(o);return Rr(e,t).every(o)};function $v(e,t,o){let r=f8(t),n=ht(e,o),i=f8(n);return rm(e)===o||i&&r}function m8(e,t){let o=Rr(e,t),r=[];for(let n of o){let i=m8(e,n);Oi(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var Cbe=(0,Wr.createRegistrySelector)(()=>(0,Wr.createSelector)(m8,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blocks.blockEditingModes])),Bbe=(0,Wr.createSelector)((e,t,o=!1)=>Ts(e,t,o).filter(r=>Oi(e,r)!=="disabled"),e=>[e.blocks.parents,e.blocks.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function Ebe(e){return e.removalPromptData}function Tbe(e){return e.blockRemovalRules}var Ibe=(0,Wr.createSelector)(e=>{let o=hh(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 Pbe(e){return e.registeredInserterMediaCategories}var Rbe=(0,Wr.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]),Obe=(0,Wr.createRegistrySelector)(e=>(0,Wr.createSelector)((t,o=null)=>{let{getAllPatterns:r}=M(e(Yt)),n=r(),{allowedBlockTypes:i}=vu(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=om(s);return Yv(c,i)&&c.every(({name:u})=>nm(t,u,o))})},(t,o)=>[...qv(e)(t),...Su(e)(t,o)])),Abe=(0,Wr.createRegistrySelector)(e=>(0,Wr.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=M(e(Yt)).getReusableBlocks().find(({id:i})=>i===r);return n?Kv(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[au]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[M(e(Yt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[au]?.(e)])),Lbe=(0,Wr.createRegistrySelector)(e=>(0,Wr.createSelector)(t=>[...M(e(Yt)).getReusableBlocks().map(o=>Kv(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[au]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),qv(e))),Nbe=[],Dbe=(0,Wr.createRegistrySelector)(e=>t=>{let o=t.settings[Q0];return(o?o(e):t.settings.__experimentalReusableBlocks)??Nbe});function Mbe(e){return e.lastFocus}function Vbe(e){return e.isDragging}function Fbe(e){return e.expandedBlock}var DD=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)ya(e,o)==="contentOnly"&&(r=o);return r};function p8(e,t){let o=ht(e,t);if(o==="core/block")return!0;let r=Ri(e,t),n=o==="core/template-part",i=e.settings?.[cu],s=e.settings?.disableContentOnlyForUnsyncedPatterns,a=e.settings?.disableContentOnlyForTemplateParts;if((!s&&r?.metadata?.patternName||n&&!a)&&!i)return!0;let c=ya(e,t)==="contentOnly",u=Lo(e,t),d=ya(e,u)==="contentOnly";return!!(c&&!d)}var yu=(e,t)=>{if(VD(e,t))return;let o=t,r;for(;o=e.blocks.parents.get(o);)p8(e,o)&&(r=o);return r};function _u(e,t){return VD(e,t)||yu(e,t)?!1:p8(e,t)}function MD(e){return e.editedContentOnlySection}function VD(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 zbe=(0,Wr.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 rm(e){return e.settings?.[lu]}function FD(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function jbe(e){return e.zoomLevel}function h8(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>nm(e,a,s));if(!o){if(n(o))return o;let s=rm(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=Lo(e,i);return i}function Ube(e,t,o){let{allowedBlockTypes:r}=vu(e);if(!Yv(om(t),r))return null;let i=om(t).map(({blockName:s})=>s);return h8(e,i,o)}function Hbe(e){return e.insertionPoint}var Gbe=(e,t)=>{let o=ht(e,t);if(!(0,Wv.hasBlockSupport)(o,"visibility",!0))return!1;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility;return n===!1?!0:typeof n?.viewport=="object"&&n?.viewport!==null?Object.values(Tt).some(i=>n?.viewport?.[i.key]===!1):!1},zD=(e,t)=>{let o=ht(e,t);return(0,Wv.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},Wbe=(e,t)=>Ts(e,t).some(r=>zD(e,r)),g8=(e,t,o)=>{if(zD(e,t))return!0;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility?.viewport;return typeof n=="object"&&n!==null&&typeof o=="string"?n?.[o.toLowerCase()]===!1:!1},$be=(e,t,o)=>Ts(e,t).some(n=>g8(e,n,o));function Kbe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function b8(e,t){return!!Ri(e,t)?.lock?.edit}function k8(e,t){let o=Ri(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=Lo(e,t);return ya(e,r)==="all"}function v8(e,t){let o=Ri(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=Lo(e,t),n=ya(e,r);return n==="all"||n==="insert"}function Ybe(e,t){return b8(e,t)||k8(e,t)||v8(e,t)}function qbe(e){return e.listViewContentPanelOpen}function Zbe(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function Xbe(e){return e.listViewExpandRevision||0}function Qbe(e){return e.viewportModalClientIds}function Jbe(e){return e.requestedInspectorTab}var Xv=l(N(),1),Dt={user:"user",theme:"theme",directory:"directory"},Zv={full:"fully",unsynced:"unsynced"},im={name:"allPatterns",label:(0,Xv._x)("All","patterns")},El={name:"myPatterns",label:(0,Xv.__)("My patterns")},gh={name:"core/starter-content",label:(0,Xv.__)("Starter content")};function iC(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Dt.theme&&(r||n)||t===Dt.directory&&(r||!n)||t===Dt.user&&e.type!==Dt.user||o===Zv.full&&e.syncStatus!==""||o===Zv.unsynced&&e.syncStatus!=="unsynced"&&r)}var xu=Symbol("isFiltered"),y8=new WeakMap,_8=new WeakMap;function Kv(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:Dt.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 eke(e){let t=(0,S8.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 sC(e){let t=y8.get(e);return t||(t=eke(e),y8.set(e,t)),t}function om(e){let t=_8.get(e);return t||(t=(0,x8.parse)(e.content),t=t.filter(o=>o.blockName!==null),_8.set(e,t)),t}var sm=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,Yv=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!sm(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},qv=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[au]?.(e),t.blockPatterns,M(e(Yt)).getReusableBlocks()],Su=()=>(e,t)=>[e.blockListSettings.get(t),e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Oi(e,t),rm(e),_u(e,t),yu(e,t)];var tke=(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 _a(e,t,o="asc"){return e.concat().sort(tke(t,e,o))}var{isContentBlock:UD}=M(Re.privateApis),oke=3600*1e3,rke=24*3600*1e3,nke=168*3600*1e3,br=[],ike=new Set,E8={[xu]:!0};function ht(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(C8.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 ske(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Ri(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function Il(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var ake=(0,Ee.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Ri(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function lke(e,t){let o=!t||!cC(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||br}var T8=(0,Ee.createSelector)((e,t)=>((0,Wn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:I8(e,t)}),e=>[e.blocks.order]),I8=(0,Ee.createSelector)((e,t="")=>((0,Wn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),Rr(e,t).map(o=>T8(e,o))),e=>[e.blocks.order]),P8=(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]),hh=e=>P8(e,""),cke=(0,Ee.createSelector)((e,t)=>{let o=hh(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]),R8=(0,Ee.createSelector)((e,t)=>{if(!t)return br;let o=Array.isArray(t)?t:[t],n=hh(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:br},e=>[e.blocks.order,e.blocks.byClientId]);function uke(e,t){return(0,Wn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),R8(e,t)}var aC=(0,Ee.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>Il(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),dke=(0,Ee.createSelector)((e,t)=>aC(e,t).filter(Boolean).map(o=>o.name),(e,t)=>aC(e,t));function fke(e,t){return Rr(e,t).length}function Jv(e){return e.selection.selectionStart}function ey(e){return e.selection.selectionEnd}function mke(e){return e.selection.selectionStart.clientId}function pke(e){return e.selection.selectionEnd.clientId}function hke(e){let t=wu(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function gke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function bh(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function bke(e){let t=bh(e);return t?Il(e,t):null}function Lo(e,t){return e.blocks.parents.get(t)??null}var Ts=(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():br},e=>[e.blocks.parents]),HD=(0,Ee.createSelector)((e,t,o,r=!1)=>{let n=Ts(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(ht(e,s)))},e=>[e.blocks.parents]);function kke(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function vke(e,t){let o=bh(e),r=[...Ts(e,t),t],n=[...Ts(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 GD(e,t,o=1){if(t===void 0&&(t=bh(e)),t===void 0&&(o<0?t=WD(e):t=O8(e)),!t)return null;let r=Lo(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 yke(e,t){return GD(e,t,-1)}function _ke(e,t){return GD(e,t,1)}function Ske(e){return e.initialPosition}var kh=(0,Ee.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return br;if(t.clientId===o.clientId)return[t.clientId];let r=Lo(e,t.clientId);if(r===null)return br;let n=Rr(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 wu(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?br:kh(e)}var xke=(0,Ee.createSelector)(e=>{let t=wu(e);return t.length?t.map(o=>Il(e,o)):br},e=>[...kh.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function WD(e){return wu(e)[0]||null}function O8(e){let t=wu(e);return t[t.length-1]||null}function wke(e,t){return WD(e)===t}function A8(e,t){return wu(e).indexOf(t)!==-1}var Cke=(0,Ee.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=Lo(e,o),r=A8(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function Bke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function Eke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function Tke(e){let t=Jv(e),o=ey(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function Ike(e){let t=Jv(e),o=ey(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function Pke(e){return kh(e).some(t=>{let o=ht(e,t);return!(0,Re.getBlockType)(o).merge})}function Rke(e,t){let o=Jv(e),r=ey(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=Lo(e,o.clientId),i=Lo(e,r.clientId);if(n!==i)return!1;let s=Rr(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,h=ht(e,f);if(!(0,Re.getBlockType)(h).merge)return!1;let g=Il(e,m);if(g.name===h)return!0;let b=(0,Re.switchToBlockType)(g,h);return b&&b.length}var Oke=e=>{let t=Jv(e),o=ey(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return br;let r=Lo(e,t.clientId),n=Lo(e,o.clientId);if(r!==n)return br;let i=Rr(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=Il(e,c.clientId),f=Il(e,u.clientId),m=d.attributes[c.attributeKey],h=f.attributes[u.attributeKey],p=(0,Tl.create)({html:m}),g=(0,Tl.create)({html:h});return p=(0,Tl.remove)(p,0,c.offset),g=(0,Tl.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,Tl.toHTMLString)({value:p})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,Tl.toHTMLString)({value:g})}}]};function Rr(e,t){return e.blocks.order.get(t||"")||br}function L8(e,t){let o=Lo(e,t);return Rr(e,o).indexOf(t)}function N8(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function D8(e,t,o=!1){let r=kh(e);return r.length?o?r.some(n=>Ts(e,n,!0).includes(t)):r.some(n=>Lo(e,n)===t):!1}function M8(e,t,o=!1){return Rr(e,t).some(r=>$D(e,r)||o&&M8(e,r,o))}function Ake(e,t){if(!t)return!1;let o=wu(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function Lke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function Nke(e){return e.isMultiSelecting}function Dke(e){return e.isSelectionEnabled}function Mke(e,t){return e.blocksMode[t]||"visual"}function Vke(e){return e.isTyping}function V8(e){return!!e.draggedBlocks.length}function Fke(e){return e.draggedBlocks}function $D(e,t){return e.draggedBlocks.includes(t)}function zke(e,t){return V8(e)?Ts(e,t).some(r=>$D(e,r)):!1}function jke(){return(0,Wn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var Uke=(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=Lo(e,i)||void 0,o=L8(e,n.clientId)+1):o=Rr(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Hke(e){return e.insertionCue!==null}function Gke(e){return e.template.isValid}function Wke(e){return e.settings.template}function ya(e,t){if(!t)return e.settings.templateLock??!1;let o=lC(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var KD=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Re.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=vu(e);if(!sm(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(ht(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},ty=(e,t,o=null)=>{if(e.settings.isPreviewMode||!KD(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Re.getBlockType)(t);let n=ya(e,o);if(n&&n!=="contentOnly")return!1;let i=Oi(e,o??""),s=!!_u(e,o),a=s?o:yu(e,o),c=!!a;if(i==="disabled"&&(!c||t!==(0,Re.getDefaultBlockName)()))return!1;let u=lC(e,o);if(o&&u===void 0)return!1;let d=UD(t);if(c&&!d||c&&ht(e,a)==="core/block")return!1;if(c&&(s||i==="contentOnly"||i==="disabled")&&!$v(e,t,o)){let _=(0,Re.getDefaultBlockName)();if(t===_){if(!Rr(e,o).some(B=>ht(e,B)===_))return!1}else return!1}let f=ht(e,o),h=(0,Re.getBlockType)(f)?.allowedBlocks,p=sm(h,t);if(p!==!1){let _=u?.allowedBlocks,S=sm(_,t);S!==null&&(p=S)}let g=r.parent,b=sm(g,f),v=!0,k=r.ancestor;k&&(v=[o,...Ts(e,o)].some(S=>sm(k,ht(e,S))));let y=v&&(p===null&&b===null||p===!0||b===!0);return y&&(0,B8.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:Il.bind(null,e),getBlockParentsByBlockName:HD.bind(null,e)})},nm=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)(ty,(t,o,r)=>Su(e)(t,r)));function $ke(e,t,o=null){return t.every(r=>nm(e,ht(e,r),o))}function YD(e,t){if(e.settings.isPreviewMode)return!1;let o=Ri(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=Lo(e,t),n=ya(e,r);if(n&&n!=="contentOnly")return!1;let i=!!_u(e,r),s=i?r:yu(e,r),a=!!s,c=UD(ht(e,t));if(a&&!c||a&&ht(e,s)==="core/block")return!1;let u=Oi(e,r),d=ht(e,t),f=(0,Re.getDefaultBlockName)();return a&&(i||d===f||u==="contentOnly")&&!$v(e,ht(e,t),r)?d===f?Rr(e,r).filter(p=>ht(e,p)===f).length>1:!1:u!=="disabled"}function F8(e,t){return t.every(o=>YD(e,o))}function z8(e,t){if(e.settings.isPreviewMode)return!1;let o=Ri(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=Lo(e,t);if(ya(e,r)==="all")return!1;let i=!!yu(e,t),s=UD(ht(e,t));if(i&&!s)return!1;let a=!!_u(e,r),c=Oi(e,r);return i&&(a||c==="contentOnly")&&!$v(e,ht(e,t),r)?!1:Oi(e,r)!=="disabled"}function Kke(e,t){return t.every(o=>z8(e,o))}function j8(e,t){if(e.settings.isPreviewMode)return!1;let o=Ri(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function Yke(e,t){return e.settings.isPreviewMode||!(0,Re.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function qD(e,t){return e.preferences.insertUsage?.[t]??null}var Qv=(e,t,o)=>(0,Re.hasBlockSupport)(t,"inserter",!0)?ty(e,t.name,o):!1,qke=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=qD(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:ZD(n,i),isSearchOnly:o.isSearchOnly}},ZD=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<oke:return t*4;case o<rke:return t*2;case o<nke:return t/2;default:return t/4}},U8=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Re.hasBlockSupport)(o.name,"multiple",!0)||(n=aC(e,hh(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=qD(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:ZD(i,s)};if(t==="transform")return a;let c=(0,Re.getBlockVariations)(o.name,"inserter"),u=(0,Re.getBlockVariations)(o.name,"block"),d=[...c,...u.filter(f=>o.name==="core/heading"&&["h1","h2","h3","h4","h5","h6"].includes(f.name)).map(f=>({...f,isSearchOnly:!0}))];return{...a,initialAttributes:{},description:o.description,category:o.category,keywords:o.keywords,parent:o.parent,ancestor:o.ancestor,variations:d,example:o.example,utility:1}},Zke=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=E8)=>{let n=h=>{let p=h.wp_pattern_sync_status?Pi:{src:Pi,foreground:"var(--wp-block-synced-color)"},g=Kv(h),{time:b,count:v=0}=qD(t,g.name)||{},k=ZD(b,v);return{id:g.name,name:"core/block",initialAttributes:{ref:h.id},title:g.title,icon:p,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:k,content:g.content,get blocks(){return sC(g).blocks},syncStatus:g.syncStatus}},i=ty(t,"core/block",o)?M(e(Yt)).getReusableBlocks().map(n):[],s=U8(t,{buildScope:"inserter"}),a=(0,Re.getBlockTypes)().filter(h=>(0,Re.hasBlockSupport)(h,"inserter",!0)).map(s);if(r[xu]!==!1)a=a.filter(h=>Qv(t,h,o));else{let{getClosestAllowedInsertionPoint:h}=M(e(Yt));a=a.filter(p=>KD(t,p,o)&&h(p.name,o)!==null).map(p=>({...p,isAllowedInCurrentRoot:Qv(t,p,o)}))}let c=a.reduce((h,p)=>{let{variations:g=[]}=p;if(g.some(({isDefault:b})=>b)||h.push(p),g.length){let b=qke(t,p);h.push(...g.map(b))}return h},[]),u=(h,p)=>{let{core:g,noncore:b}=h;return(p.name.startsWith("core/")?g:b).push(p),h},{core:d,noncore:f}=c.reduce(u,{core:[],noncore:[]});return[...[...d,...f],...i]},(t,o)=>[(0,Re.getBlockTypes)(),M(e(Yt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...Su(e)(t,o)])),Xke=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=U8(t,{buildScope:"transform"}),s=(0,Re.getBlockTypes)().filter(u=>Qv(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,Re.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return _a(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,Re.getBlockTypes)(),t.preferences.insertUsage,...Su(e)(t,r)])),Qke=(e,t=null)=>(0,Re.getBlockTypes)().some(n=>Qv(e,n,t))?!0:ty(e,"core/block",t),jD=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Re.getBlockTypes)().filter(i=>Qv(t,i,o));return ty(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Re.getBlockTypes)(),...Su(e)(t,o)])),Jke=(0,Ee.createSelector)((e,t=null)=>((0,Wn.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),jD(e,t)),(e,t)=>jD.getDependants(e,t));function H8(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings.get(t)??{};if(!(!o||!r))return o}function eve(e,t=null){return(0,Wn.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),H8(e,t)}var tve=(0,Ee.createRegistrySelector)(e=>(t,o)=>{let r=M(e(Yt)).getPatternBySlug(o);return r?sC(r):null}),XD=e=>(t,o)=>[...qv(e)(t),...Su(e)(t,o)],w8=new WeakMap;function ove(e){let t=w8.get(e);return t||(t={...e,get blocks(){return sC(e).blocks}},w8.set(e,t)),t}var rve=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=E8)=>{let{getAllPatterns:n}=M(e(Yt)),i=n(),{allowedBlockTypes:s}=vu(t);return i.filter(({inserter:d=!0})=>!!d).map(ove).filter(d=>Yv(om(d),s)).filter(d=>om(d).every(({blockName:f})=>r[xu]!==!1?nm(t,f,o):KD(t,f,o)))},XD(e))),nve=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o)return br;let n=e(Yt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?br:s},(t,o,r)=>XD(e)(t,r))),ive=(0,Ee.createRegistrySelector)(e=>((0,Wn.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Yt).getPatternsByBlockTypes)),sve=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||cC(t,i)))return br;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Yt).getPatternsByBlockTypes(n,r)},(t,o,r)=>XD(e)(t,r)));function lC(e,t){return e.blockListSettings.get(t)}function vu(e){return e.settings}function ave(e){return e.blocks.isPersistentChange}var lve=(0,Ee.createSelector)((e,t=[])=>{let o={};for(let r of t){let n=lC(e,r);n&&(o[r]=n)}return o},e=>[e.blockListSettings]),cve=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o)=>{(0,Wn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=M(e(Yt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[M(e(Yt)).getReusableBlocks()]));function uve(e){return e.blocks.isIgnoredChange}function dve(e){return e.lastBlockAttributesChange}function fve(){return(0,Wn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function mve(e){return!!e.automaticChangeStatus}function pve(e,t){return e.highlightedBlock===t}function cC(e,t){return e.blocks.controlledInnerBlocks.has(t)}var hve=(0,Ee.createSelector)((e,t)=>{if(!t.length)return null;let o=bh(e);if(t.includes(ht(e,o)))return o;let r=wu(e),n=HD(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function gve(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function bve(e,t){return e.blockVisibility?.[t]??!0}function kve(){(0,Wn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var vve=(0,Ee.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?ike:t},e=>[e.blockVisibility]);function G8(e,t){if(Oi(e,t)!=="default")return!1;if(!j8(e,t))return!0;if(FD(e)){let n=rm(e);if(n){if(Rr(e,n)?.includes(t))return!0}else if(t&&!Lo(e,t))return!0}return((0,Re.hasBlockSupport)(ht(e,t),"__experimentalDisableBlockOverlay",!1)?!1:cC(e,t))&&!N8(e,t)&&!D8(e,t,!0)}function yve(e,t){let o=e.blocks.parents.get(t);for(;o;){if(G8(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Oi(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blocks.blockEditingModes.has(t)?e.blocks.blockEditingModes.get(t):"default"}var _ve=(0,Ee.createRegistrySelector)(e=>(t,o="")=>{let r=o||bh(t);if(!r||_u(t,r))return!1;let{getGroupingBlockName:n}=e(Re.store),i=Il(t,r),s=n();return i&&(i.name===s||(0,Re.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&YD(t,r)}),Sve=(0,Ee.createRegistrySelector)(e=>(t,o=br)=>{let{getGroupingBlockName:r}=e(Re.store),n=r(),i=o?.length?o:kh(t),s=i?.length?Lo(t,i[0]):void 0;return nm(t,n,s)&&i.length&&F8(t,i)}),xve=(e,t)=>((0,Wn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),DD(e,t));function wve(e){return(0,Wn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),MD(e)}var uC={};ka(uC,{__experimentalUpdateSettings:()=>JD,clearBlockRemovalPrompt:()=>Pve,clearRequestedInspectorTab:()=>Yve,closeListViewContentPanel:()=>Gve,deleteStyleOverride:()=>Ave,editContentOnlySection:()=>tM,ensureDefaultBlock:()=>Z8,expandBlock:()=>Mve,hideBlockInterface:()=>Eve,hideViewportModal:()=>$ve,openListViewContentPanel:()=>Hve,privateRemoveBlocks:()=>eM,requestInspectorTab:()=>Kve,resetZoomLevel:()=>jve,setBlockRemovalRules:()=>Rve,setInsertionPoint:()=>Vve,setLastFocus:()=>Lve,setStyleOverride:()=>Ove,setZoomLevel:()=>zve,showBlockInterface:()=>Tve,showViewportModal:()=>Wve,startDragging:()=>Nve,stopDragging:()=>Dve,stopEditingContentOnlySection:()=>Fve,toggleBlockSpotlight:()=>Uve});var $8=l(O(),1),K8=l(Pe(),1),Y8=l(er(),1),q8=l(N(),1),Cve=e=>Array.isArray(e)?e:[e],Bve=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function JD(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,K8.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&&$8.Platform.OS==="web"){n={};for(let i in r)Bve.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function Eve(){return{type:"HIDE_BLOCK_INTERFACE"}}function Tve(){return{type:"SHOW_BLOCK_INTERFACE"}}var eM=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=Cve(e),!r.canRemoveBlocks(e)))return;let a=!o&&r.getBlockRemovalRules();if(a){let u=function(h){let p=[],g=[...h];for(;g.length;){let{innerBlocks:b,...v}=g.shift();g.push(...b),p.push(v)}return p};var c=u;let d=e.map(r.getBlock),f=u(d),m;for(let h of a)if(m=h.callback(f),m){n(Ive(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(Z8())})},Z8=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function Ive(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function Pve(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Rve(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Ove(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function Ave(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function Lve(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function Nve(){return{type:"START_DRAGGING"}}function Dve(){return{type:"STOP_DRAGGING"}}function Mve(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function Vve(e){return{type:"SET_INSERTION_POINT",value:e}}function tM(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function Fve(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var zve=(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,Y8.speak)((0,q8.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function jve(){return{type:"RESET_ZOOM_LEVEL"}}function Uve(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function Hve(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function Gve(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function Wve(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function $ve(){return{type:"HIDE_VIEWPORT_MODAL"}}function Kve(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function Yve(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}var nM={};ka(nM,{__unstableDeleteSelection:()=>kye,__unstableExpandSelection:()=>yye,__unstableIncrementListViewExpandRevision:()=>e_e,__unstableMarkAutomaticChange:()=>Vye,__unstableMarkLastChangeAsPersistent:()=>Dye,__unstableMarkNextChangeAsNotPersistent:()=>Mye,__unstableSaveReusableBlock:()=>Nye,__unstableSetAllListViewPanelsOpen:()=>Qye,__unstableSetEditorMode:()=>Fye,__unstableSetOpenListViewPanel:()=>Xye,__unstableSetTemporarilyEditingAsBlocks:()=>Kye,__unstableSplitSelection:()=>vye,__unstableToggleListViewPanel:()=>Jye,clearSelectedBlock:()=>aye,duplicateBlocks:()=>jye,enterFormattedText:()=>Iye,exitFormattedText:()=>Pye,flashBlock:()=>Gye,hideInsertionPoint:()=>hye,hoverBlock:()=>tye,insertAfterBlock:()=>Hye,insertBeforeBlock:()=>Uye,insertBlock:()=>mye,insertBlocks:()=>s7,insertDefaultBlock:()=>Oye,mergeBlocks:()=>_ye,moveBlockToPosition:()=>fye,moveBlocksDown:()=>uye,moveBlocksToPosition:()=>i7,moveBlocksUp:()=>dye,multiSelect:()=>sye,receiveBlocks:()=>Xve,registerInserterMediaCategory:()=>Yye,removeBlock:()=>Sye,removeBlocks:()=>a7,replaceBlock:()=>cye,replaceBlocks:()=>r7,replaceInnerBlocks:()=>xye,resetBlocks:()=>qve,resetSelection:()=>Zve,selectBlock:()=>eye,selectNextBlock:()=>rye,selectPreviousBlock:()=>oye,selectionChange:()=>Rye,setBlockEditingMode:()=>qye,setBlockMovingClientId:()=>zye,setBlockVisibility:()=>$ye,setHasControlledInnerBlocks:()=>Wye,setTemplateValidity:()=>gye,showInsertionPoint:()=>pye,startDraggingBlocks:()=>Eye,startMultiSelect:()=>nye,startTyping:()=>Cye,stopDraggingBlocks:()=>Tye,stopMultiSelect:()=>iye,stopTyping:()=>Bye,synchronizeTemplate:()=>bye,toggleBlockHighlight:()=>rM,toggleBlockMode:()=>wye,toggleSelection:()=>lye,unsetBlockEditingMode:()=>Zye,updateBlock:()=>Jve,updateBlockAttributes:()=>Qve,updateBlockListSettings:()=>Aye,updateSettings:()=>Lye,validateBlocksToTemplate:()=>o7});var ke=l(Y(),1),dC=l(er(),1),Cu=l(N(),1),e7=l(Ai(),1),gt=l(gr(),1),Rl=l(Pe(),1),t7=l(vh(),1);var J8=l(gr(),1),Pl="\x86";function oy(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof J8.RichTextData)&&o.toString().indexOf(Pl)!==-1})}function oM(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var yh=e=>Array.isArray(e)?e:[e],qve=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(o7(e))},o7=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,ke.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function Zve(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function Xve(e){return(0,Rl.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Qve(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:yh(e),attributes:t,options:o}}function Jve(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function eye(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function tye(){return(0,Rl.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var oye=(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);if(i)r.selectBlock(i,-1);else{let s=o.getNextBlockClientId(e);s&&r.selectBlock(s,0)}}},rye=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function nye(){return{type:"START_MULTI_SELECT"}}function iye(){return{type:"STOP_MULTI_SELECT"}}var sye=(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,dC.speak)((0,Cu.sprintf)((0,Cu._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function aye(){return{type:"CLEAR_SELECTED_BLOCK"}}function lye(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var r7=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=yh(e),t=yh(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 cye(e,t){return r7(e,t)}var n7=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:yh(t),rootClientId:o})},uye=n7("MOVE_BLOCKS_DOWN"),dye=n7("MOVE_BLOCKS_UP"),i7=(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 fye(e,t="",o="",r){return i7([e],t,o,r)}function mye(e,t,o,r,n,i){return s7([e],t,o,r,n,i)}var s7=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,Rl.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=yh(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 pye(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 hye=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function gye(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var bye=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,ke.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},kye=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 h=e?m:f,p=o.getBlock(h.clientId),g=(0,ke.getBlockType)(p.name);if(!g.merge)return;let b=f,v=m,k=o.getBlock(b.clientId),y=o.getBlock(v.clientId),_=k.attributes[b.attributeKey],S=y.attributes[v.attributeKey],C=(0,gt.create)({html:_}),B=(0,gt.create)({html:S});C=(0,gt.remove)(C,b.offset,C.text.length),B=(0,gt.insert)(B,Pl,0,v.offset);let R=(0,ke.cloneBlock)(k,{[b.attributeKey]:(0,gt.toHTMLString)({value:C})}),I=(0,ke.cloneBlock)(y,{[v.attributeKey]:(0,gt.toHTMLString)({value:B})}),E=e?R:I,L=k.name===y.name?[E]:(0,ke.switchToBlockType)(E,g.name);if(!L||!L.length)return;let T;if(e){let J=L.pop();T=g.merge(J.attributes,I.attributes)}else{let J=L.shift();T=g.merge(R.attributes,J.attributes)}let P=oy(T),D=T[P],j=(0,gt.create)({html:D}),H=j.text.indexOf(Pl),z=(0,gt.remove)(j,H,H+1),U=(0,gt.toHTMLString)({value:z});T[P]=U;let G=o.getSelectedBlockClientIds(),W=[...e?L:[],{...p,attributes:{...p.attributes,...T}},...e?[]:L];t.batch(()=>{r.selectionChange(p.clientId,P,H,H),r.replaceBlocks(G,W,0,o.getSelectedBlocksInitialCaretPosition())})},vye=(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 h=f,p=m,g=o.getBlock(h.clientId),b=o.getBlock(p.clientId),v=(0,ke.getBlockType)(g.name),k=(0,ke.getBlockType)(b.name),y=typeof h.attributeKey=="string"?h.attributeKey:oM(v),_=typeof p.attributeKey=="string"?p.attributeKey:oM(k),S=o.getBlockAttributes(h.clientId);if(S?.metadata?.bindings?.[y]){if(e.length){let{createWarningNotice:te}=t.dispatch(e7.store);te((0,Cu.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(h.clientId);return}if(!y||!_||typeof n.offset>"u"||typeof i.offset>"u")return;if(h.clientId===p.clientId&&y===_&&h.offset===p.offset){if(e.length){if((0,ke.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([h.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(h.clientId).length){let te=function(){let X=(0,ke.getDefaultBlockName)();return o.canInsertBlockType(X,s)?(0,ke.createBlock)(X):(0,ke.createBlock)(o.getBlockName(h.clientId))};var B=te;let ne=S[y].length;if(h.offset===0&&ne){r.insertBlocks([te()],o.getBlockIndex(h.clientId),s,!1);return}if(h.offset===ne){r.insertBlocks([te()],o.getBlockIndex(h.clientId)+1,s);return}}}let R=g.attributes[y],I=b.attributes[_],E=(0,gt.create)({html:R}),L=(0,gt.create)({html:I});E=(0,gt.remove)(E,h.offset,E.text.length),L=(0,gt.remove)(L,0,p.offset);let T={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[y]:(0,gt.toHTMLString)({value:E})}},P={...b,clientId:g.clientId===b.clientId?(0,ke.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[_]:(0,gt.toHTMLString)({value:L})}},D=(0,ke.getDefaultBlockName)();if(g.clientId===b.clientId&&D&&P.name!==D&&o.canInsertBlockType(D,s)){let te=(0,ke.switchToBlockType)(P,D);te?.length===1&&(P=te[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[T,P]);return}let j,H=[],z=[...e],U=z.shift(),G=(0,ke.getBlockType)(T.name),W=G.merge&&U.name===G.name?[U]:(0,ke.switchToBlockType)(U,G.name);if(W?.length){let te=W.shift();T={...T,attributes:{...T.attributes,...G.merge(T.attributes,te.attributes)}},H.push(T),j={clientId:T.clientId,attributeKey:y,offset:(0,gt.create)({html:T.attributes[y]}).text.length},z.unshift(...W)}else(0,ke.isUnmodifiedBlock)(T)||H.push(T),H.push(U);let J=z.pop(),ce=(0,ke.getBlockType)(P.name);if(z.length&&H.push(...z),J){let te=ce.merge&&ce.name===J.name?[J]:(0,ke.switchToBlockType)(J,ce.name);if(te?.length){let ne=te.pop();H.push({...P,attributes:{...P.attributes,...ce.merge(ne.attributes,P.attributes)}}),H.push(...te),j={clientId:P.clientId,attributeKey:_,offset:(0,gt.create)({html:ne.attributes[_]}).text.length}}else H.push(J),(0,ke.isUnmodifiedBlock)(P)||H.push(P)}else(0,ke.isUnmodifiedBlock)(P)||H.push(P);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),H,H.length-1,0),j&&r.selectionChange(j.clientId,j.attributeKey,j.offset,j.offset)})},yye=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},_ye=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,ke.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,ke.getBlockSupport)(a.name,"__experimentalOnMerge")){let S=(0,ke.switchToBlockType)(u,c.name);if(S?.length!==1){n.selectBlock(a.clientId);return}let[C]=S;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 B=r.getNextBlockClientId(i);if(B&&r.getBlockName(i)===r.getBlockName(B)){let R=r.getBlockAttributes(i),I=r.getBlockAttributes(B);Object.keys(R).every(E=>R[E]===I[E])&&(n.moveBlocksToPosition(r.getBlockOrder(B),B,i),n.removeBlock(B,!1))}});return}if((0,ke.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,ke.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,ke.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,ke.getBlockType)(u.name),{clientId:f,attributeKey:m,offset:h}=r.getSelectionStart(),g=(f===i?c:d).attributes[m],b=(f===i||f===s)&&m!==void 0&&h!==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 v=(0,ke.cloneBlock)(a),k=(0,ke.cloneBlock)(u);if(b){let S=f===i?v:k,C=S.attributes[m],B=(0,gt.insert)((0,gt.create)({html:C}),Pl,h,h);S.attributes[m]=(0,gt.toHTMLString)({value:B})}let y=a.name===u.name?[k]:(0,ke.switchToBlockType)(k,a.name);if(!y||!y.length)return;let _=c.merge(v.attributes,y[0].attributes);if(b){let S=oy(_),C=_[S],B=(0,gt.create)({html:C}),R=B.text.indexOf(Pl),I=(0,gt.remove)(B,R,R+1),E=(0,gt.toHTMLString)({value:I});_[S]=E,n.selectionChange(a.clientId,S,R,R)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,..._}},...y.slice(1)],0)},a7=(e,t=!0)=>eM(e,t);function Sye(e,t){return a7([e],t)}function xye(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 wye(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Cye(){return{type:"START_TYPING"}}function Bye(){return{type:"STOP_TYPING"}}function Eye(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Tye(){return{type:"STOP_DRAGGING_BLOCKS"}}function Iye(){return(0,Rl.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Pye(){return(0,Rl.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Rye(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var Oye=(e,t,o)=>({dispatch:r})=>{let n=(0,ke.getDefaultBlockName)();if(!n)return;let i=(0,ke.createBlock)(n,e);return r.insertBlock(i,o,t)};function Aye(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Lye(e){return JD(e,{stripExperimentalSettings:!0})}function Nye(){return(0,Rl.default)('wp.data.dispatch( "core/block-editor" ).__unstableSaveReusableBlock',{since:"7.1"}),{type:"DO_NOTHING"}}function Dye(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Mye(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var Vye=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},Fye=e=>({registry:t})=>{t.dispatch(t7.store).set("core","editorTool",e),e==="navigation"?(0,dC.speak)((0,Cu.__)("You are currently in Write mode.")):e==="edit"&&(0,dC.speak)((0,Cu.__)("You are currently in Design mode."))};function zye(){return(0,Rl.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var jye=(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,ke.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=yh(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,ke.__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)},Uye=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),i=r?t.getDirectInsertBlock(r):null;if(!i)return o.insertDefaultBlock({},r,n);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,ke.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n,r)},Hye=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),i=r?t.getDirectInsertBlock(r):null;if(!i)return o.insertDefaultBlock({},r,n+1);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,ke.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n+1,r)};function rM(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var Gye=(e,t=150)=>async({dispatch:o})=>{o(rM(e,!0)),await new Promise(r=>setTimeout(r,t)),o(rM(e,!1))};function Wye(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function $ye(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Kye(e){return(0,Rl.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),tM(e)}var Yye=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 qye(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Zye(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function Xye(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function Qye(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function Jye(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function e_e(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var _h={reducer:i8,selectors:QD,actions:nM},x=(0,fC.createReduxStore)(Yt,{..._h,persist:["preferences"]}),l7=(0,fC.registerStore)(Yt,{..._h,persist:["preferences"]});M(l7).registerPrivateActions(uC);M(l7).registerPrivateSelectors(nC);M(x).registerPrivateActions(uC);M(x).registerPrivateSelectors(nC);var Sh=l(A(),1),c7=l(N(),1);var Is=l(w(),1);function t_e({className:e,actions:t,children:o,secondaryActions:r}){return(0,Is.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Is.jsx)("div",{className:V(e,"block-editor-warning"),children:(0,Is.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Is.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Is.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Is.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Is.jsx)(Sh.DropdownMenu,{className:"block-editor-warning__secondary",icon:Bs,label:(0,c7.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Is.jsx)(Sh.MenuGroup,{children:r.map((n,i)=>(0,Is.jsx)(Sh.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var Bu=t_e;var xh=l(w(),1);function f7({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,d7.useDispatch)(x),n=(0,u7.getBlockType)(t);return(0,xh.jsxs)(Bu,{actions:[(0,xh.jsx)(iM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,mC.__)("Find original")},"find-original"),(0,xh.jsx)(iM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,mC.__)("Remove")},"remove")],children:[(0,xh.jsxs)("strong",{children:[n?.title,": "]}),(0,mC.__)("This block can only be used once.")]})}var ry=l(w(),1);function gC({mayDisplayControls:e,mayDisplayParentControls:t,mayDisplayPatternEditingControls:o,blockEditingMode:r,isPreviewMode:n,...i}){let{name:s,isSelected:a,clientId:c,attributes:u={},__unstableLayoutClassNames:d}=i,{layout:f=null,metadata:m={}}=u,{bindings:h}=m,p=(0,pC.hasBlockSupport)(s,"layout",!1)||(0,pC.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!Ie()[dv]||(0,pC.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:v}=(0,hC.useContext)(mr);return(0,ry.jsxs)(H0,{value:(0,hC.useMemo)(()=>({name:s,isSelected:a,clientId:c,layout:p?f:null,__unstableLayoutClassNames:d,[ws]:e,[Jp]:t,[nu]:o&&r!=="disabled",[j0]:r,[eh]:h,[U0]:n,[dv]:b}),[s,a,c,p,f,d,e,t,o,r,h,n,b]),children:[(0,ry.jsx)($j,{...i}),v&&(0,ry.jsx)(f7,{originalBlockClientId:v,name:s,onReplace:i.onReplace})]})}function he(...e){let{clientId:t=null}=Ie();return(0,m7.useSelect)(o=>M(o(x)).getBlockSettings(t,...e),[t,...e])}function h7(e){(0,p7.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]=he(e);return t}var kC=l(w(),1),{kebabCase:o_e}=M(b7.privateApis),g7=([e,...t])=>e.toUpperCase()+t.join(""),r_e=e=>(0,am.createHigherOrderComponent)(t=>function(r){return(0,kC.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),n_e=()=>(0,am.createHigherOrderComponent)(e=>function(o){let[r,n,i]=he("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,bC.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,kC.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function k7(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:o_e(n)}:n}),{});return(0,am.compose)([t,r=>class extends bC.Component{constructor(i){super(i),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(i){let{colors:s}=this.props;return Dj(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=g7(s),c=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,c),i},{})}createSetColor(i,s){return a=>{let c=W0(this.props.colors,a);this.props.setAttributes({[i]:c&&c.slug?c.slug:void 0,[s]:c&&c.slug?void 0:a})}}static getDerivedStateFromProps({attributes:i,colors:s},a){return Object.entries(o).reduce((c,[u,d])=>{let f=va(s,i[u],i[`custom${g7(u)}`]),m=a[u];return m?.color===f.color&&m?c[u]=m:c[u]={...f,class:Ci(d,f.slug)},c},{})}render(){return(0,kC.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function v7(e){return(...t)=>{let o=r_e(e);return(0,am.createHigherOrderComponent)(k7(t,o),"withCustomColors")}}function y7(...e){let t=n_e();return(0,am.createHigherOrderComponent)(k7(e,t),"withColors")}var vC=l(O(),1),yC=l(F(),1);function wh(e){if(e)return`has-${e}-gradient-background`}function _C(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function _7(e,t){return e?.find(r=>r.gradient===t)}function S7(e,t){let o=_7(e,t);return o&&o.slug}function i_e({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Ie(),[r,n,i]=he("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,vC.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,yC.useSelect)(h=>{let{getBlockAttributes:p}=h(x),g=p(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,yC.useDispatch)(x),d=(0,vC.useCallback)(h=>{let p=S7(s,h);if(p){u(o,{[e]:p,[t]:void 0});return}u(o,{[e]:void 0,[t]:h})},[s,o,u]),f=wh(a),m;return a?m=_C(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var x7=l(A(),1);var{kebabCase:s_e}=M(x7.privateApis),Ch=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function sM(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function Eu(e){if(e)return`has-${s_e(e)}-font-size`}var a_e="1600px",l_e="320px",c_e=1,u_e=.25,d_e=.75,f_e="14px";function w7({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=l_e,maximumViewportWidth:n=a_e,scaleFactor:i=c_e,minimumFontSizeLimit:s}){if(s=Tu(s)?s:f_e,o){let y=Tu(o);if(!y?.unit)return null;let _=Tu(s,{coerceTo:y.unit});if(_?.value&&!e&&!t&&y?.value<=_?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let S=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(S),u_e),d_e),B=ny(y.value*C,3);_?.value&&B<_?.value?e=`${_.value}${_.unit}`:e=`${B}${y.unit}`}}let a=Tu(e),c=a?.unit||"rem",u=Tu(t,{coerceTo:c});if(!a||!u)return null;let d=Tu(e,{coerceTo:"rem"}),f=Tu(n,{coerceTo:c}),m=Tu(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=ny(m.value/100,3),g=ny(p,3)+c,b=100*((u.value-a.value)/h),v=ny((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function Tu(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:ny(d,3),unit:u}}function ny(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var C7=l(A(),1);var B7=l(w(),1);function m_e(e){let[t,o]=he("typography.fontSizes","typography.customFontSize");return(0,B7.jsx)(C7.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var aM=m_e;var iy=l(Q(),1),T7=l(O(),1);var lM=l(w(),1),p_e=[],E7=([e,...t])=>e.toUpperCase()+t.join(""),I7=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${E7(r)}`,o),{});return(0,iy.createHigherOrderComponent)((0,iy.compose)([(0,iy.createHigherOrderComponent)(o=>function(n){let[i]=he("typography.fontSizes");return(0,lM.jsx)(o,{...n,fontSizes:i||p_e})},"withFontSizes"),o=>class extends T7.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=E7(i);return n[`set${a}`]=this.createSetFontSize(i,s),n},{})}createSetFontSize(n,i){return s=>{let a=this.props.fontSizes?.find(({size:c})=>c===Number(s));this.props.setAttributes({[n]:a&&a.slug?a.slug:void 0,[i]:a&&a.slug?void 0:s})}}static getDerivedStateFromProps({attributes:n,fontSizes:i},s){let a=(u,d)=>s[d]?n[d]?n[d]!==s[d].slug:s[d].size!==n[u]:!0;if(!Object.values(t).some(a))return null;let c=Object.entries(t).filter(([u,d])=>a(d,u)).reduce((u,[d,f])=>{let m=n[d],h=Ch(i,m,n[f]);return u[d]={...h,class:Eu(m)},u},{});return{...s,...c}}render(){return(0,lM.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var Iu=l(N(),1),SC=l(A(),1);var P7=l(w(),1),h_e=[{icon:fu,title:(0,Iu.__)("Align text left"),align:"left"},{icon:jf,title:(0,Iu.__)("Align text center"),align:"center"},{icon:mu,title:(0,Iu.__)("Align text right"),align:"right"}],g_e={placement:"bottom-start"};function b_e({value:e,onChange:t,alignmentControls:o=h_e,label:r=(0,Iu.__)("Align text"),description:n=(0,Iu.__)("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,Iu.isRTL)()?mu:fu}let d=s?SC.ToolbarGroup:SC.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:g_e};return(0,P7.jsx)(d,{icon:u(),label:r,controls:o.map(m=>{let{align:h}=m;return{...m,isActive:e===h,role:i?"menuitemradio":void 0,onClick:a(h)}}),...f})}var cM=b_e;var uM=l(w(),1),xC=e=>(0,uM.jsx)(cM,{...e,isToolbar:!1}),R7=e=>(0,uM.jsx)(cM,{...e,isToolbar:!0});var PC=l(pt(),1),RC=l(A(),1),$7=l(O(),1),OC=l(Y(),1);var G7=l(F(),1),Ru=l(Y(),1),hM=l(O(),1);var z7=l(N7(),1);var dM=function(e,t){return dM=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])},dM(e,t)};function D7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");dM(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Ho=function(){return Ho=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},Ho.apply(this,arguments)};function M7(e){return e.toLowerCase()}var S_e=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],x_e=/[^A-Z0-9]+/gi;function F7(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?S_e:o,n=t.stripRegexp,i=n===void 0?x_e:n,s=t.transform,a=s===void 0?M7:s,c=t.delimiter,u=c===void 0?" ":c,d=V7(V7(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 V7(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var w_e=e=>e.name||"",C_e=e=>e.title,B_e=e=>e.description||"",E_e=e=>e.keywords||[],T_e=e=>e.category,I_e=()=>null,P_e=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],R_e=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),fM=new Map,mM=new Map;function CC(e=""){if(fM.has(e))return fM.get(e);let t=F7(e,{splitRegexp:P_e,stripRegexp:R_e}).split(" ").filter(Boolean);return fM.set(e,t),t}function sy(e=""){if(mM.has(e))return mM.get(e);let t=(0,z7.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),mM.set(e,t),t}var ay=(e="")=>CC(sy(e)),O_e=(e,t)=>e.filter(o=>!ay(t).some(r=>r.includes(o))),BC=(e,t,o,r)=>ay(r).length===0?e:ly(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),ly=(e=[],t="",o={})=>{if(ay(t).length===0)return e;let n=e.map(i=>[i,A_e(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function A_e(e,t,o={}){let{getName:r=w_e,getTitle:n=C_e,getDescription:i=B_e,getKeywords:s=E_e,getCategory:a=T_e,getCollection:c=I_e}=o,u=r(e),d=n(e),f=i(e),m=s(e),h=a(e),p=c(e),g=sy(t),b=sy(d),v=0;if(g===b)v+=30;else if(b.startsWith(g))v+=20;else{let k=[u,d,f,...m,h,p].join(" "),y=CC(g);O_e(y,k).length===0&&(v+=10)}if(v!==0&&u.startsWith("core/")){let k=u!==e.id;v+=k?1:2}return v}var Sa=l(Y(),1),Bh=l(F(),1),EC=l(O(),1),j7=l(Ai(),1),TC=l(N(),1);var L_e=(e,t,o)=>{let r=(0,EC.useMemo)(()=>({[xu]:!!o}),[o]),[n]=(0,Bh.useSelect)(d=>[d(x).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=M((0,Bh.useSelect)(x)),{createErrorNotice:s}=(0,Bh.useDispatch)(j7.store),[a,c]=(0,Bh.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(Sa.store);return[f(),m()]},[]),u=(0,EC.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:h,content:p},g)=>{let b=i(d,e);if(b===null){let k=(0,Sa.getBlockType)(d)?.title??d;s((0,TC.sprintf)((0,TC.__)(`Block "%s" can't be inserted.`),k),{type:"snackbar",id:"inserter-notice"});return}let v=h==="unsynced"?(0,Sa.parse)(p,{__unstableSkipMigrationLogs:!0}):(0,Sa.createBlock)(d,f,(0,Sa.createBlocksFromInnerBlocksTemplate)(m));t(v,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},Pu=L_e;var U7=l(A(),1);var H7=l(O(),1),pM=l(w(),1);function N_e({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:_v});let n=(0,pM.jsx)(U7.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,pM.jsx)("span",{style:i,className:V("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Oe=(0,H7.memo)(N_e);var IC=(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 Eh=l(w(),1),D_e=()=>{},M_e=9;function V_e(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,G7.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:h}=u(x),{getActiveBlockVariation:p}=u(Ru.store),g=d(),{name:b,attributes:v}=f(g),k=p(b,v),y=h(g);return{selectedBlockId:k?`${b}/${k.name}`:b,rootClientId:y,prioritizedBlocks:m(y)?.prioritizedInserterBlocks}},[]),[n,i,s]=Pu(t,D_e,!0),a=(0,hM.useMemo)(()=>(e.trim()?BC(n,i,s,e):IC(_a(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,M_e),[e,o,n,i,s,r]);return[(0,hM.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,Eh.jsxs)(Eh.Fragment,{children:[(0,Eh.jsx)(Oe,{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,Ru.cloneBlock)(s)):(0,Ru.createBlock)(t,o,(0,Ru.createBlocksFromInnerBlocksTemplate)(r))}}}}var W7=V_e();var K7=l(w(),1),F_e=[];function Y7({completers:e=F_e}){let{name:t}=Ie();return(0,$7.useMemo)(()=>{let o=[...e];return(t===(0,OC.getDefaultBlockName)()||(0,OC.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,W7]),(0,PC.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,PC.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function q7(e){return(0,RC.__unstableUseAutocompleteProps)({...e,completers:Y7(e)})}function z_e(e){return(0,K7.jsx)(RC.Autocomplete,{...e,completers:Y7(e)})}var Z7=z_e;var yM=l(N(),1),Nu=l(A(),1);var g9=l(F(),1);var VC=l(O(),1);var Li=l(N(),1);var kn=l(A(),1);var Th=l(N(),1);var $n={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 Ou(e,t=$n,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 AC(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,Th.sprintf)((0,Th.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,Th.sprintf)((0,Th.__)("Max %s wide"),o)),n}var Ps=l(N(),1);var X7=8,Au=["top","bottom","left","right"],Q7={top:void 0,right:void 0,bottom:void 0,left:void 0},LC={custom:Fw,axial:Fw,horizontal:nD,vertical:lD,top:aD,right:sD,bottom:rD,left:iD},xa={default:(0,Ps.__)("Spacing control"),top:(0,Ps.__)("Top"),bottom:(0,Ps.__)("Bottom"),left:(0,Ps.__)("Left"),right:(0,Ps.__)("Right"),mixed:(0,Ps.__)("Mixed"),vertical:(0,Ps.__)("Vertical"),horizontal:(0,Ps.__)("Horizontal"),axial:(0,Ps.__)("Horizontal & vertical"),custom:(0,Ps.__)("Custom")},Ol={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function NC(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function J7(e,t){if(!NC(e))return e;let o=j_e(e);return t.find(n=>String(n.slug)===o)?.size}function Ih(e,t){if(!e||NC(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 cy(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function j_e(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 gM(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 U_e(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 e9(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&&U_e(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(gM(t)&&(a||c))return Ol.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]:Ol.custom}function H_e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function kr(e,t="0"){let o=H_e(e);if(!o)return null;let r=cy(o?.top)||t,n=cy(o?.left)||t;return r===n?r:`${r} ${n}`}var lo=l(w(),1),G_e={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},t9={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},W_e={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},o9={horizontal:"center",vertical:"top"},$_e=["wrap","nowrap"],n9={name:"flex",label:(0,Li.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0,allowWrap:s=!0}=r;return(0,lo.jsxs)(lo.Fragment,{children:[(0,lo.jsxs)(kn.Flex,{children:[i&&(0,lo.jsx)(kn.FlexItem,{children:(0,lo.jsx)(r9,{layout:t,onChange:o})}),n&&(0,lo.jsx)(kn.FlexItem,{children:(0,lo.jsx)(Z_e,{layout:t,onChange:o})})]}),s&&(0,lo.jsx)(q_e,{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,lo.jsxs)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,lo.jsx)(r9,{layout:t,onChange:o,isToolbar:!0}),n&&(0,lo.jsx)(K_e,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=$n}){let{orientation:c="horizontal"}=o,u="0.5em";if(s){let k=kr(s,"0.5em").split(" ");u=k.length>1?k[1]:k[0]}let d=r?.spacing?.blockGap&&!Ge(n,"spacing","blockGap")?kr(r?.spacing?.blockGap,u):void 0,f=G_e[o.justifyContent],m=$_e.includes(o.flexWrap)?o.flexWrap:"wrap",h=W_e[o.verticalAlignment],p=t9[o.justifyContent]||t9.left,g="",b=[];return m&&m!=="wrap"&&b.push(`flex-wrap: ${m}`),c==="horizontal"?(h&&b.push(`align-items: ${h}`),f&&b.push(`justify-content: ${f}`)):(h&&b.push(`justify-content: ${h}`),b.push("flex-direction: column"),b.push(`align-items: ${p}`)),b.length&&(g=`${Kn(t)} { |
| 25 |
${b.join("; ")}; |
| 26 |
}`),i&&d&&(g+=Ou(t,a,"flex",d)),g},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function K_e({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?o9.horizontal:o9.vertical,{verticalAlignment:n=r}=e;return(0,lo.jsx)(DC,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var Y_e={placement:"bottom-start"};function r9({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,lo.jsx)(Ph,{allowedControls:s,value:r,onChange:i,popoverProps:Y_e});let a=[{value:"left",icon:gu,label:(0,Li.__)("Justify items left")},{value:"center",icon:hu,label:(0,Li.__)("Justify items center")},{value:"right",icon:bu,label:(0,Li.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:lh,label:(0,Li.__)("Space between items")}):a.push({value:"stretch",icon:ch,label:(0,Li.__)("Stretch items")}),(0,lo.jsx)(kn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Li.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,lo.jsx)(kn.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function q_e({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,lo.jsx)(kn.ToggleControl,{label:(0,Li.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function Z_e({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,lo.jsxs)(kn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,Li.__)("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,lo.jsx)(kn.__experimentalToggleGroupControlOptionIcon,{icon:yv,value:"horizontal",label:(0,Li.__)("Horizontal")}),(0,lo.jsx)(kn.__experimentalToggleGroupControlOptionIcon,{icon:NA,value:"vertical",label:(0,Li.__)("Vertical")})]})}var i9=l(N(),1);var s9={name:"default",label:(0,i9.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=$n}){let s=kr(o?.spacing?.blockGap),a="";Ge(r,"spacing","blockGap")||(s?.top?a=kr(s?.top):typeof s=="string"&&(a=kr(s)));let c="";return n&&a&&(c+=Ou(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=AC(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 vn=l(A(),1),Al=l(N(),1);var l9=l(uy(),1);var tr=l(w(),1),c9={name:"constrained",label:(0,Al.__)("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=h=>{o({...t,justifyContent:h})},d=[{value:"left",icon:gu,label:(0,Al.__)("Justify items left")},{value:"center",icon:hu,label:(0,Al.__)("Justify items center")},{value:"right",icon:bu,label:(0,Al.__)("Justify items right")}],[f]=he("spacing.units"),m=(0,vn.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,tr.jsxs)(vn.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,tr.jsxs)(tr.Fragment,{children:[(0,tr.jsx)(vn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Al.__)("Content width"),labelPosition:"top",value:i||n||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,contentSize:h!==""?h:void 0})},units:m,prefix:(0,tr.jsx)(vn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,tr.jsx)(Be,{icon:Uf})})}),(0,tr.jsx)(vn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Al.__)("Wide width"),labelPosition:"top",value:n||i||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,wideSize:h!==""?h:void 0})},units:m,prefix:(0,tr.jsx)(vn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,tr.jsx)(Be,{icon:tm})})}),(0,tr.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,Al.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,tr.jsx)(vn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Al.__)("Justification"),value:s,onChange:u,children:d.map(({value:h,icon:p,label:g})=>(0,tr.jsx)(vn.__experimentalToggleGroupControlOptionIcon,{value:h,icon:p,label:g},h))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,tr.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,tr.jsx)(Q_e,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=$n}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=kr(r?.spacing?.blockGap),f="";Ge(n,"spacing","blockGap")||(d?.top?f=kr(d?.top):typeof d=="string"&&(f=kr(d)));let m=u==="left"?"0 !important":"auto !important",h=u==="right"?"0 !important":"auto !important",p=a||c?` |
| 27 |
${Kn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} { |
| 28 |
max-width: ${a??c}; |
| 29 |
margin-left: ${m}; |
| 30 |
margin-right: ${h}; |
| 31 |
} |
| 32 |
${Kn(t,"> .alignwide")} { |
| 33 |
max-width: ${c??a}; |
| 34 |
} |
| 35 |
${Kn(t,"> .alignfull")} { |
| 36 |
max-width: none; |
| 37 |
} |
| 38 |
`:"";return u==="left"?p+=`${Kn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 39 |
{ margin-left: ${m}; }`:u==="right"&&(p+=`${Kn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 40 |
{ margin-right: ${h}; }`),r?.spacing?.padding&&(0,l9.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let v=b.value==="0"?"0px":b.value;p+=` |
| 41 |
${Kn(t,"> .alignfull")} { |
| 42 |
margin-right: calc(${v} * -1); |
| 43 |
} |
| 44 |
`}else if(b.key==="paddingLeft"){let v=b.value==="0"?"0px":b.value;p+=` |
| 45 |
${Kn(t,"> .alignfull")} { |
| 46 |
margin-left: calc(${v} * -1); |
| 47 |
} |
| 48 |
`}}),i&&f&&(p+=Ou(t,s,"constrained",f)),p},getOrientation(){return"vertical"},getAlignments(e){let t=AC(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}},X_e={placement:"bottom-start"};function Q_e({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,tr.jsx)(Ph,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:X_e})}var $r=l(N(),1),ct=l(A(),1),MC=l(O(),1);var Ze=l(w(),1),J_e={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},eSe=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],u9={name:"grid",label:(0,$r.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,Ze.jsxs)(Ze.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,Ze.jsx)(rSe,{layout:t,onChange:o}),(0,Ze.jsxs)(ct.__experimentalVStack,{spacing:4,children:[i&&(0,Ze.jsx)(oSe,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,Ze.jsx)(tSe,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=$n}){let{minimumColumnWidth:c=null,columnCount:u=null,rowCount:d=null}=o,f="1.2rem";if(s){let b=kr(s,"0.5em").split(" ");f=b.length>1?b[1]:b[0]}let m=r?.spacing?.blockGap&&!Ge(n,"spacing","blockGap")?kr(r?.spacing?.blockGap,f):void 0,h="",p=[];if(c&&u>0){let g=m||f;(g==="0"||g===0)&&(g="0px");let b=`max(min( ${c}, 100%), ( 100% - (${g}*${u-1}) ) / ${u})`;p.push(`grid-template-columns: repeat(auto-fill, minmax(${b}, 1fr))`,"container-type: inline-size"),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)}else u?(p.push(`grid-template-columns: repeat(${u}, minmax(0, 1fr))`),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)):p.push(`grid-template-columns: repeat(auto-fill, minmax(min(${c||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return p.length&&(h=`${Kn(t)} { ${p.join("; ")}; }`),i&&m&&(h+=Ou(t,a,"grid",m)),h},getOrientation(){return"horizontal"},getAlignments(){return[]}};function tSe({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,ct.__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,Ze.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,Ze.jsx)(ct.BaseControl.VisualLabel,{as:"legend",children:(0,$r.__)("Min. column width")}),(0,Ze.jsxs)(ct.Flex,{gap:4,children:[(0,Ze.jsx)(ct.FlexItem,{isBlock:!0,children:(0,Ze.jsx)(ct.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:eSe,min:0,label:(0,$r.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,Ze.jsx)(ct.FlexItem,{isBlock:!0,children:(0,Ze.jsx)(ct.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:J_e[c]||600,withInputField:!1,label:(0,$r.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,Ze.jsx)("p",{className:"components-base-control__help",children:(0,$r.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function oSe({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,Ze.jsx)(ct.BaseControl.VisualLabel,{as:"legend",children:(0,$r.__)("Max. columns")}),(0,Ze.jsxs)(ct.Flex,{gap:4,children:[(0,Ze.jsx)(ct.FlexItem,{isBlock:!0,children:(0,Ze.jsx)(ct.__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,$r.__)("Columns"),hideLabelFromVision:!s})}),(0,Ze.jsx)(ct.FlexItem,{isBlock:!0,children:o&&s?(0,Ze.jsx)(ct.__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,$r.__)("Rows")}):(0,Ze.jsx)(ct.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,$r.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function rSe({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,MC.useState)(o||3),[c,u]=(0,MC.useState)(r),[d,f]=(0,MC.useState)(n||"12rem"),m=i?"manual":"auto",h=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})},p=m==="manual"?(0,$r.__)("Grid items can be manually placed in any position on the grid."):(0,$r.__)("Grid items are placed automatically depending on their order.");return(0,Ze.jsxs)(ct.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,$r.__)("Grid item position"),value:m,onChange:h,isBlock:!0,help:p,children:[(0,Ze.jsx)(ct.__experimentalToggleGroupControlOption,{value:"auto",label:(0,$r.__)("Auto")},"auto"),(0,Ze.jsx)(ct.__experimentalToggleGroupControlOption,{value:"manual",label:(0,$r.__)("Manual")},"manual")]})}var d9=[s9,n9,c9,u9];function Rs(e="default"){return d9.find(t=>t.name===e)}function f9(){return d9}var bM=l(w(),1),kM={type:"default"},vM=(0,VC.createContext)(kM);vM.displayName="BlockLayoutContext";var m9=vM.Provider;function lm(){return(0,VC.useContext)(vM)}function p9({layout:e={},css:t,...o}){let r=Rs(e.type),[n]=he("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,bM.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,bM.jsx)("style",{children:s})}return null}var FC=[],h9=["none","left","center","right","wide","full"],nSe=["wide","full"];function dy(e=h9){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,g9.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(x).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=lm();if(t)return FC;let s=Rs(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?FC:u}if(s.name!=="default"&&s.name!=="constrained")return FC;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&nSe.includes(c)?!1:h9.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?FC:a}var Lu=l(N(),1);var fy={none:{icon:Uf,title:(0,Lu._x)("None","Alignment option")},left:{icon:VN,title:(0,Lu.__)("Align left")},center:{icon:DN,title:(0,Lu.__)("Align center")},right:{icon:zN,title:(0,Lu.__)("Align right")},wide:{icon:tm,title:(0,Lu.__)("Wide width")},full:{icon:Gv,title:(0,Lu.__)("Full width")}},b9="none";var cm=l(w(),1);function iSe({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=dy(o);if(!!!i.length)return null;function a(h){t([e,"none"].includes(h)?void 0:h)}let c=fy[e],u=fy[b9],d=r?Nu.ToolbarGroup:Nu.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,yM.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:h})=>({...fy[h],isActive:e===h||!e&&h==="none",role:n?"menuitemradio":void 0,onClick:()=>a(h)}))}:{toggleProps:{description:(0,yM.__)("Change alignment")},children:({onClose:h})=>(0,cm.jsx)(cm.Fragment,{children:(0,cm.jsx)(Nu.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:p,info:g})=>{let{icon:b,title:v}=fy[p],k=p===e||!e&&p==="none";return(0,cm.jsx)(Nu.MenuItem,{icon:b,iconPosition:"left",className:V("components-dropdown-menu__menu-item",{"is-active":k}),isSelected:k,onClick:()=>{a(p),h()},role:"menuitemradio",info:g,children:v},p)})})})};return(0,cm.jsx)(d,{...f,...m})}var _M=iSe;var SM=l(w(),1),zC=e=>(0,SM.jsx)(_M,{...e,isToolbar:!1}),k9=e=>(0,SM.jsx)(_M,{...e,isToolbar:!0});var x9=l(zf(),1),GC=l(N(),1),WC=l(Y(),1),As=l(A(),1),CM=l(F(),1),w9=l(O(),1),C9=l(Q(),1);var wM=l(zf(),1),v9=l(Y(),1),y9=l(A(),1),_9=l(F(),1),UC=l(O(),1),S9=l(Q(),1);var jC=l(F(),1);function xM(e){return!e||Object.keys(e).length===0}function Ll(e){let{clientId:t}=Ie(),o=e||t,{updateBlockAttributes:r}=(0,jC.useDispatch)(x),{getBlockAttributes:n}=(0,jC.useRegistry)().select(x);return{updateBlockBindings:a=>{let{metadata:{bindings:c,...u}={}}=n(o),d={...c};Object.entries(a).forEach(([m,h])=>{if(!h&&d[m]){delete d[m];return}d[m]=h});let f={...u,bindings:d};xM(f.bindings)&&delete f.bindings,r(o,{metadata:xM(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:xM(c)?void 0:c})}}}var Os=l(w(),1),{Menu:Du}=M(y9.privateApis);function sSe({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,UC.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,UC.useContext)(Pr),a=(0,_9.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=Ll();return(0,Os.jsxs)(Du.CheckboxItem,{onChange:()=>{let u=(0,wM.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,wM.default)(e,o.args)??o.key===e?.key,children:[(0,Os.jsx)(Du.ItemLabel,{children:o.label}),(0,Os.jsx)(Du.ItemHelpText,{children:a[t]})]})}function my({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,S9.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,v9.getBlockBindingsSource)(o);return(0,Os.jsxs)(Du,{placement:n?"bottom-start":"left-start",children:[(0,Os.jsx)(Du.SubmenuTriggerItem,{children:(0,Os.jsx)(Du.ItemLabel,{children:i.label})}),(0,Os.jsx)(Du.Popover,{gutter:8,children:(0,Os.jsx)(Du.Group,{children:r.map(s=>(0,Os.jsx)(sSe,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var Ni=l(w(),1),{Menu:HC}=M(As.privateApis);function py({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=Ll(),n=(0,C9.useViewportMatch)("medium","<"),i=(0,w9.useContext)(Pr),s=(0,CM.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:v,getBlockType:k}=M(g(WC.store)),y=k(o).attributes?.[e];if(y?.enum)return{};let _=y?.type==="rich-text"?"string":y?.type,S={};return Object.entries(b()).forEach(([C,B])=>{let R=v(B,i);if(!R?.length)return;let I=R.filter(E=>E.type===_);I.length&&(S[C]=I)}),S},[e,o,i]),{canUpdateBlockBindings:a}=(0,CM.useSelect)(g=>({canUpdateBlockBindings:g(x).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,WC.getBlockBindingsSource)(d),h,p=!0;return t===void 0?(c?h=(0,GC.__)("Not connected"):h=(0,GC.__)("No sources available"),p=!0):m?h=s?.[d]?.find(g=>(0,x9.default)(g.args,f))?.label||m?.label||d:(p=!1,h=(0,GC.__)("Source not registered")),(0,Ni.jsx)(As.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,Ni.jsxs)(HC,{placement:n?"bottom-start":"left-start",children:[(0,Ni.jsx)(HC.TriggerButton,{render:(0,Ni.jsx)(As.__experimentalItem,{}),disabled:!c,children:(0,Ni.jsxs)(As.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,Ni.jsx)(As.__experimentalText,{truncate:!0,children:e}),(0,Ni.jsx)(As.__experimentalText,{truncate:!0,variant:p?"muted":void 0,isDestructive:!p,children:h})]})}),!u&&(0,Ni.jsx)(HC.Popover,{gutter:n?8:36,children:(0,Ni.jsx)(HC,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,Ni.jsx)(my,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var B9=l(N(),1),E9=l(A(),1);var T9=l(w(),1);function aSe({isActive:e,label:t=(0,B9.__)("Full height"),onToggle:o,isDisabled:r}){return(0,T9.jsx)(E9.ToolbarButton,{isActive:e,icon:AL,label:t,onClick:()=>o(!e),disabled:r})}var I9=aSe;var R9=l(N(),1),O9=l(tt(),1),um=l(A(),1),hy=l(w(),1),lSe=()=>{};function cSe(e){let{label:t=(0,R9.__)("Change matrix alignment"),onChange:o=lSe,value:r="center",isDisabled:n}=e,i=(0,hy.jsx)(um.AlignmentMatrixControl.Icon,{value:r});return(0,hy.jsx)(um.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,hy.jsx)(um.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===O9.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,hy.jsx)(um.AlignmentMatrixControl,{onChange:o,value:r})})}var A9=cSe;var TM=l(A(),1),YC=l(F(),1),qC=l(N(),1);var z9=l(O(),1);var L9=l(F(),1),$C=l(Y(),1);function vr({clientId:e,maximumLength:t,context:o}){let r=(0,L9.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(x),{getBlockType:a,getActiveBlockVariation:c}=n($C.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,$C.__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 gy({clientId:e,maximumLength:t,context:o}){return vr({clientId:e,maximumLength:t,context:o})}var dm=l(O(),1),M9=l(Q(),1);var KC=l(O(),1),BM=l(Q(),1),N9=l(w(),1),by=(0,KC.createContext)({refsMap:(0,BM.observableMap)()});by.displayName="BlockRefsContext";function D9({children:e}){let t=(0,KC.useMemo)(()=>({refsMap:(0,BM.observableMap)()}),[]);return(0,N9.jsx)(by.Provider,{value:t,children:e})}function V9(e){let{refsMap:t}=(0,dm.useContext)(by);return(0,M9.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function EM(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function fm(e,t){let{refsMap:o}=(0,dm.useContext)(by);(0,dm.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 ot(e){let[t,o]=(0,dm.useState)(null);return fm(e,o),t}function F9(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 Yn=l(w(),1);function uSe({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,YC.useDispatch)(x),{clientId:r,parents:n,hasSelection:i}=(0,YC.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=M(c(x)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,qC._x)("Document","noun, breadcrumb"),a=(0,z9.useRef)();return fm(r,a),(0,Yn.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,qC.__)("Block breadcrumb"),children:[(0,Yn.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,Yn.jsx)(TM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),F9(c)?.focus()},children:s}),!i&&(0,Yn.jsx)("span",{children:s}),!!r&&(0,Yn.jsx)(Be,{icon:pu,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,Yn.jsxs)("li",{children:[(0,Yn.jsx)(TM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,Yn.jsx)(gy,{clientId:c,maximumLength:35,context:"breadcrumb"})}),(0,Yn.jsx)(Be,{icon:pu,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,Yn.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,Yn.jsx)(gy,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var j9=uSe;var U9=l(F(),1);function H9(e){return(0,U9.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(x);return o(e)},[e])}var oI=l(Q(),1),eee=l(O(),1),tee=l(F(),1),oee=l(A(),1);var Yi=l(F(),1),IE=l(Q(),1),fd=l(O(),1),cZ=l(Y(),1);var Ku=l(O(),1),We=l(Y(),1),mG=l(A(),1),z1=l(F(),1),j1=l(Q(),1),pG=l(Me(),1);var Nl=l(N(),1),XC=l(A(),1),mm=l(O(),1),Oh=l(Y(),1),QC=l(F(),1);var Q9=l(Y9(),1),ZC=l(N(),1),J9=l(Y(),1);var q9=l(A(),1),Z9=l(O(),1),X9=l(Me(),1),wa=l(w(),1);function PM({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,wa.jsxs)("div",{className:i,children:[(0,wa.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,wa.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,wa.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,wa.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,wa.jsx)(Z9.RawHTML,{children:(0,X9.safeHTML)(o)})})]}),(0,wa.jsx)("div",{className:"block-editor-block-compare__action",children:(0,wa.jsx)(q9.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var Rh=l(w(),1);function gSe({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,Q9.diffChars)(u,d).map((m,h)=>{let p=V({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,Rh.jsx)("span",{className:p,children:m.value},h)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,J9.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,Rh.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,Rh.jsx)(PM,{title:(0,ZC.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,ZC.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,Rh.jsx)(PM,{title:(0,ZC.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var eU=gSe;var Dl=l(w(),1),tU=e=>(0,Oh.rawHandler)({HTML:e.originalContent});function oU({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,QC.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:h}=d(x),p=h(e);return{block:m(e),canInsertHTMLBlock:f("core/html",p),canInsertClassicBlock:f("core/freeform",p)}},[e]),{replaceBlock:n}=(0,QC.useDispatch)(x),[i,s]=(0,mm.useState)(!1),a=(0,mm.useCallback)(()=>s(!1),[]),c=(0,mm.useMemo)(()=>({toClassic(){let d=(0,Oh.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,Oh.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=tU(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,Oh.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,mm.useMemo)(()=>[{title:(0,Nl._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,Nl.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,Nl.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,Dl.jsxs)(Dl.Fragment,{children:[(0,Dl.jsx)(Bu,{actions:[(0,Dl.jsx)(XC.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,Nl.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,Nl.__)("Block contains unexpected or invalid content.")}),i&&(0,Dl.jsx)(XC.Modal,{title:(0,Nl.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,Dl.jsx)(eU,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:tU,convertButtonText:(0,Nl.__)("Convert to Blocks")})})]})}var rU=l(N(),1);var nU=l(w(),1),bSe=(0,nU.jsx)(Bu,{className:"block-editor-block-list__block-crash-warning",children:(0,rU.__)("This block has encountered an error and cannot be previewed.")});function iU(){return bSe}var sU=l(O(),1),kSe=class extends sU.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},aU=kSe;var BU=l(AM(),1),Ah=l(O(),1),o1=l(F(),1),Ca=l(Y(),1);var EU=l(w(),1);function ISe({clientId:e}){let[t,o]=(0,Ah.useState)(""),r=(0,o1.useSelect)(a=>a(x).getBlock(e),[e]),{updateBlock:n}=(0,o1.useDispatch)(x),i=(0,Ah.useMemo)(()=>r?(0,Ca.getBlockContent)(r):"",[r]),s=()=>{let a=(0,Ca.getBlockType)(r.name);if(!a)return;let c=(0,Ca.getBlockAttributes)(a,t,r.attributes),u=t||(0,Ca.getSaveContent)(a,c),[d]=t?(0,Ca.validateBlock)({...r,attributes:c,originalContent:u}):[!0];n(e,{attributes:c,originalContent:u,isValid:d}),t||o(u)};return(0,Ah.useEffect)(()=>{o(i)},[i]),(0,EU.jsx)(BU.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:s,onChange:a=>o(a.target.value)})}var TU=ISe;var uG=l(O(),1),V1=l(N(),1),dG=l(Y(),1),Yh=l(Q(),1),fG=l(yy(),1);var NM=Sy(),_e=e=>_y(e,NM),DM=Sy();_e.write=e=>_y(e,DM);var r1=Sy();_e.onStart=e=>_y(e,r1);var MM=Sy();_e.onFrame=e=>_y(e,MM);var VM=Sy();_e.onFinish=e=>_y(e,VM);var Lh=[];_e.setTimeout=(e,t)=>{let o=_e.now()+t,r=()=>{let i=Lh.findIndex(s=>s.cancel==r);~i&&Lh.splice(i,1),Vu-=~i?1:0},n={time:o,handler:e,cancel:r};return Lh.splice(PU(o),0,n),Vu+=1,RU(),n};var PU=e=>~(~Lh.findIndex(t=>t.time>e)||~Lh.length);_e.cancel=e=>{r1.delete(e),MM.delete(e),VM.delete(e),NM.delete(e),DM.delete(e)};_e.sync=e=>{LM=!0,_e.batchedUpdates(e),LM=!1};_e.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,_e.onStart(o)}return r.handler=e,r.cancel=()=>{r1.delete(o),t=null},r};var FM=typeof window<"u"?window.requestAnimationFrame:()=>{};_e.use=e=>FM=e;_e.now=typeof performance<"u"?()=>performance.now():Date.now;_e.batchedUpdates=e=>e();_e.catch=console.error;_e.frameLoop="always";_e.advance=()=>{_e.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):AU()};var Mu=-1,Vu=0,LM=!1;function _y(e,t){LM?(t.delete(e),e(0)):(t.add(e),RU())}function RU(){Mu<0&&(Mu=0,_e.frameLoop!=="demand"&&FM(OU))}function PSe(){Mu=-1}function OU(){~Mu&&(FM(OU),_e.batchedUpdates(AU))}function AU(){let e=Mu;Mu=_e.now();let t=PU(Mu);if(t&&(LU(Lh.splice(0,t),o=>o.handler()),Vu-=t),!Vu){PSe();return}r1.flush(),NM.flush(e?Math.min(64,Mu-e):16.667),MM.flush(),DM.flush(),VM.flush()}function Sy(){let e=new Set,t=e;return{add(o){Vu+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return Vu-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,Vu-=t.size,LU(t,r=>r(o)&&e.add(r)),Vu+=e.size,t=e)}}}function LU(e,t){e.forEach(o=>{try{t(o)}catch(r){_e.catch(r)}})}var Mi=l(je());function l1(){}var zU=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),le={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 Ba(e,t){if(le.arr(e)){if(!le.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 _t=(e,t)=>e.forEach(t);function Vi(e,t,o){if(le.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 yn=e=>le.und(e)?[]:le.arr(e)?e:[e];function Vh(e,t){if(e.size){let o=Array.from(e);e.clear(),_t(o,t)}}var Fh=(e,...t)=>Vh(e,o=>o(...t)),WM=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),$M,jU,Fu=null,UU=!1,KM=l1,RSe=e=>{e.to&&(jU=e.to),e.now&&(_e.now=e.now),e.colors!==void 0&&(Fu=e.colors),e.skipAnimation!=null&&(UU=e.skipAnimation),e.createStringInterpolator&&($M=e.createStringInterpolator),e.requestAnimationFrame&&_e.use(e.requestAnimationFrame),e.batchedUpdates&&(_e.batchedUpdates=e.batchedUpdates),e.willAdvance&&(KM=e.willAdvance),e.frameLoop&&(_e.frameLoop=e.frameLoop)},qn=Object.freeze({__proto__:null,get createStringInterpolator(){return $M},get to(){return jU},get colors(){return Fu},get skipAnimation(){return UU},get willAdvance(){return KM},assign:RSe}),xy=new Set,Di=[],zM=[],s1=0,zh={get idle(){return!xy.size&&!Di.length},start(e){s1>e.priority?(xy.add(e),_e.onStart(OSe)):(HU(e),_e(HM))},advance:HM,sort(e){if(s1)_e.onFrame(()=>zh.sort(e));else{let t=Di.indexOf(e);~t&&(Di.splice(t,1),GU(e))}},clear(){Di=[],xy.clear()}};function OSe(){xy.forEach(HU),xy.clear(),_e(HM)}function HU(e){Di.includes(e)||GU(e)}function GU(e){Di.splice(ASe(Di,t=>t.priority>e.priority),0,e)}function HM(e){let t=zM;for(let o=0;o<Di.length;o++){let r=Di[o];s1=r.priority,r.idle||(KM(r),r.advance(e),r.idle||t.push(r))}return s1=0,zM=Di,zM.length=0,Di=t,Di.length>0}function ASe(e,t){let o=e.findIndex(t);return o<0?e.length:o}var WU={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},Ls="[-+]?\\d*\\.?\\d+",a1=Ls+"%";function c1(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var LSe=new RegExp("rgb"+c1(Ls,Ls,Ls)),NSe=new RegExp("rgba"+c1(Ls,Ls,Ls,Ls)),DSe=new RegExp("hsl"+c1(Ls,a1,a1)),MSe=new RegExp("hsla"+c1(Ls,a1,a1,Ls)),VSe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,FSe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,zSe=/^#([0-9a-fA-F]{6})$/,jSe=/^#([0-9a-fA-F]{8})$/;function USe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=zSe.exec(e))?parseInt(t[1]+"ff",16)>>>0:Fu&&Fu[e]!==void 0?Fu[e]:(t=LSe.exec(e))?(Nh(t[1])<<24|Nh(t[2])<<16|Nh(t[3])<<8|255)>>>0:(t=NSe.exec(e))?(Nh(t[1])<<24|Nh(t[2])<<16|Nh(t[3])<<8|MU(t[4]))>>>0:(t=VSe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=jSe.exec(e))?parseInt(t[1],16)>>>0:(t=FSe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=DSe.exec(e))?(NU(DU(t[1]),n1(t[2]),n1(t[3]))|255)>>>0:(t=MSe.exec(e))?(NU(DU(t[1]),n1(t[2]),n1(t[3]))|MU(t[4]))>>>0:null}function jM(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 NU(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=jM(n,r,e+1/3),s=jM(n,r,e),a=jM(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Nh(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function DU(e){return(parseFloat(e)%360+360)%360/360}function MU(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function n1(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function VU(e){let t=USe(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 zu=(e,t,o)=>{if(le.fun(e))return e;if(le.arr(e))return zu({range:e,output:t,extrapolate:o});if(le.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=GSe(u,i);return HSe(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function HSe(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 GSe(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function GM(){return GM=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},GM.apply(this,arguments)}var Dh=Symbol.for("FluidValue.get"),pm=Symbol.for("FluidValue.observers"),Kr=e=>!!(e&&e[Dh]),yr=e=>e&&e[Dh]?e[Dh]():e,YM=e=>e[pm]||null;function WSe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function hm(e,t){let o=e[pm];o&&o.forEach(r=>{WSe(r,t)})}var Mh=class{constructor(t){if(this[Dh]=void 0,this[pm]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");$Se(this,t)}},$Se=(e,t)=>$U(e,Dh,t);function ju(e,t){if(e[Dh]){let o=e[pm];o||$U(e,pm,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function Uu(e,t){let o=e[pm];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[pm]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var $U=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),i1=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,KSe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,FU=new RegExp(`(${i1.source})(%|[a-z]+)`,"i"),YSe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,u1=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,KU=e=>{let[t,o]=qSe(e);if(!t||WM())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&&u1.test(o))return KU(o);if(o)return o}return e},qSe=e=>{let t=u1.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},UM,ZSe=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,d1=e=>{UM||(UM=Fu?new RegExp(`(${Object.keys(Fu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>yr(i).replace(u1,KU).replace(KSe,VU).replace(UM,VU)),o=t.map(i=>i.match(i1).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=>zu(GM({},e,{output:i})));return i=>{var s;let a=!FU.test(t[0])&&((s=t.find(u=>FU.test(u)))==null?void 0:s.replace(i1,"")),c=0;return t[0].replace(i1,()=>`${n[c++](i)}${a||""}`).replace(YSe,ZSe)}},YU="react-spring: ",qU=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${YU}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},XSe=qU(console.warn);function ZU(){XSe(`${YU}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var i7e=qU(console.warn);function jh(e){return le.str(e)&&(e[0]=="#"||/\d/.test(e)||!WM()&&u1.test(e)||e in(Fu||{}))}var wy=WM()?Mi.useEffect:Mi.useLayoutEffect,QSe=()=>{let e=(0,Mi.useRef)(!1);return wy(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function qM(){let e=(0,Mi.useState)()[1],t=QSe();return()=>{t.current&&e(Math.random())}}function XU(e,t){let[o]=(0,Mi.useState)(()=>({inputs:t,result:e()})),r=(0,Mi.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&JSe(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,Mi.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function JSe(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 ZM=e=>(0,Mi.useEffect)(e,e0e),e0e=[];var Ly=l(je()),Ny=l(je());var tH=l(je()),Vl=l(je()),Cy=Symbol.for("Animated:node"),t0e=e=>!!e&&e[Cy]===e,Ns=e=>e&&e[Cy],h1=(e,t)=>zU(e,Cy,t),By=e=>e&&e[Cy]&&e[Cy].getPayload(),f1=class{constructor(){this.payload=void 0,h1(this,this)}getPayload(){return this.payload||[]}},gm=class e extends f1{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,le.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 le.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,le.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},bm=class e extends gm{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=zu({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(le.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=zu({output:[this.getValue(),t]})),this._value=0,super.reset()}},m1={dependencies:null},km=class extends f1{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Vi(this.source,(r,n)=>{t0e(r)?o[n]=r.getValue(t):Kr(r)?o[n]=yr(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&_t(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return Vi(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){m1.dependencies&&Kr(t)&&m1.dependencies.add(t);let o=By(t);o&&_t(o,r=>this.add(r))}},XM=class e extends km{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(o0e)),!0)}};function o0e(e){return(jh(e)?bm:gm).create(e)}function g1(e){let t=Ns(e);return t?t.constructor:le.arr(e)?XM:jh(e)?bm:gm}function p1(){return p1=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},p1.apply(this,arguments)}var QU=(e,t)=>{let o=!le.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Vl.forwardRef)((r,n)=>{let i=(0,Vl.useRef)(null),s=o&&(0,Vl.useCallback)(p=>{i.current=n0e(n,p)},[n]),[a,c]=r0e(r,t),u=qM(),d=()=>{let p=i.current;if(o&&!p)return;(p?t.applyAnimatedValues(p,a.getValue(!0)):!1)===!1&&u()},f=new QM(d,c),m=(0,Vl.useRef)();wy(()=>(m.current=f,_t(c,p=>ju(p,f)),()=>{m.current&&(_t(m.current.deps,p=>Uu(p,m.current)),_e.cancel(m.current.update))})),(0,Vl.useEffect)(d,[]),ZM(()=>()=>{let p=m.current;_t(p.deps,g=>Uu(g,p))});let h=t.getComponentProps(a.getValue());return tH.createElement(e,p1({},h,{ref:s}))})},QM=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&_e.write(this.update)}};function r0e(e,t){let o=new Set;return m1.dependencies=o,e.style&&(e=p1({},e,{style:t.createAnimatedStyle(e.style)})),e=new km(e),m1.dependencies=null,[e,o]}function n0e(e,t){return e&&(le.fun(e)?e(t):e.current=t),t}var JU=Symbol.for("AnimatedComponent"),oH=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new km(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=eH(s)||"Anonymous";return le.str(s)?s=i[s]||(i[s]=QU(s,n)):s=s[JU]||(s[JU]=QU(s,n)),s.displayName=`Animated(${a})`,s};return Vi(e,(s,a)=>{le.arr(e)&&(a=eH(s)),i[a]=i(s)}),{animated:i}},eH=e=>le.str(e)?e:e&&le.str(e.displayName)?e.displayName:le.fun(e)&&e.name||null;function Yr(){return Yr=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},Yr.apply(this,arguments)}function vm(e,...t){return le.fun(e)?e(...t):e}var Py=(e,t)=>e===!0||!!(t&&e&&(le.fun(e)?e(t):yn(e).includes(t))),pH=(e,t)=>le.obj(e)?t&&e[t]:e,hH=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,i0e=e=>e,gH=(e,t=i0e)=>{let o=s0e;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);le.und(i)||(r[n]=i)}return r},s0e=["config","onProps","onStart","onChange","onPause","onResume","onRest"],a0e={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 l0e(e){let t={},o=0;if(Vi(e,(r,n)=>{a0e[n]||(t[n]=r,o++)}),o)return t}function bH(e){let t=l0e(e);if(t){let o={to:t};return Vi(e,(r,n)=>n in t||(o[n]=r)),o}return Yr({},e)}function Ry(e){return e=yr(e),le.arr(e)?e.map(Ry):jh(e)?qn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function t5(e){return le.fun(e)||le.arr(e)&&le.obj(e[0])}var c0e={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}},v1=1.70158,b1=v1*1.525,rH=v1+1,nH=2*Math.PI/3,iH=2*Math.PI/4.5,k1=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,u0e={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=>rH*e*e*e-v1*e*e,easeOutBack:e=>1+rH*Math.pow(e-1,3)+v1*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((b1+1)*2*e-b1)/2:(Math.pow(2*e-2,2)*((b1+1)*(e*2-2)+b1)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*nH),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*nH)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*iH))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*iH)/2+1,easeInBounce:e=>1-k1(1-e),easeOutBounce:k1,easeInOutBounce:e=>e<.5?(1-k1(1-2*e))/2:(1+k1(2*e-1))/2},o5=Yr({},c0e.default,{mass:1,damping:1,easing:u0e.linear,clamp:!1}),r5=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,o5)}};function d0e(e,t,o){o&&(o=Yr({},o),sH(o,t),t=Yr({},o,t)),sH(e,t),Object.assign(e,t);for(let s in o5)e[s]==null&&(e[s]=o5[s]);let{mass:r,frequency:n,damping:i}=e;return le.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 sH(e,t){if(!le.und(t.decay))e.duration=void 0;else{let o=!le.und(t.tension)||!le.und(t.friction);(o||!le.und(t.frequency)||!le.und(t.damping)||!le.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var aH=[],n5=class{constructor(){this.changed=!1,this.values=aH,this.toValues=null,this.fromValues=aH,this.to=void 0,this.from=void 0,this.config=new r5,this.immediate=!1}};function kH(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=Py((c=o.cancel)!=null?c:r?.cancel,t);if(f)p();else{le.und(o.pause)||(n.paused=Py(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||Py(g,t)),u=vm(o.delay||0,t),g?(n.resumeQueue.add(h),i.pause()):(i.resume(),h())}function m(){n.resumeQueue.add(h),n.timeouts.delete(d),d.cancel(),u=d.time-_e.now()}function h(){u>0&&!qn.skipAnimation?(n.delayed=!0,d=_e.setTimeout(p,u),n.pauseQueue.add(m),n.timeouts.add(d)):p()}function p(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(Yr({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var d5=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?Uh(e.get()):t.every(o=>o.noop)?vH(e.get()):Ds(e.get(),t.every(o=>o.finished)),vH=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ds=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),Uh=e=>({value:e,cancelled:!0,finished:!1});function yH(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=gH(t,(b,v)=>v==="onRest"?void 0:b),d,f,m=new Promise((b,v)=>(d=b,f=v)),h=b=>{let v=n<=(o.cancelId||0)&&Uh(r)||n!==o.asyncId&&Ds(r,!1);if(v)throw b.result=v,f(b),b},p=(b,v)=>{let k=new y1,y=new _1;return(async()=>{if(qn.skipAnimation)throw Oy(o),y.result=Ds(r,!1),f(y),y;h(k);let _=le.obj(b)?Yr({},b):Yr({},v,{to:b});_.parentId=n,Vi(u,(C,B)=>{le.und(_[B])&&(_[B]=C)});let S=await r.start(_);return h(k),o.paused&&await new Promise(C=>{o.resumeQueue.add(C)}),S})()},g;if(qn.skipAnimation)return Oy(o),Ds(r,!1);try{let b;le.arr(e)?b=(async v=>{for(let k of v)await p(k)})(e):b=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([b.then(d),m]),g=Ds(r.get(),!0,!1)}catch(b){if(b instanceof y1)g=b.result;else if(b instanceof _1)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 le.fun(s)&&_e.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function Oy(e,t){Vh(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var y1=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}},_1=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},i5=e=>e instanceof Ay,f0e=1,Ay=class extends Mh{constructor(...t){super(...t),this.id=f0e++,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=Ns(this);return t&&t.getValue()}to(...t){return qn.to(this,t)}interpolate(...t){return ZU(),qn.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){hm(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||zh.sort(this),hm(this,{type:"priority",parent:this,priority:t})}},ym=Symbol.for("SpringPhase"),_H=1,s5=2,a5=4,JM=e=>(e[ym]&_H)>0,Hu=e=>(e[ym]&s5)>0,Ey=e=>(e[ym]&a5)>0,lH=(e,t)=>t?e[ym]|=s5|_H:e[ym]&=~s5,cH=(e,t)=>t?e[ym]|=a5:e[ym]&=~a5,l5=class extends Ay{constructor(t,o){if(super(),this.key=void 0,this.animation=new n5,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,!le.und(t)||!le.und(o)){let r=le.obj(t)?Yr({},t):Yr({},o,{from:t});le.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Hu(this)||this._state.asyncTo)||Ey(this)}get goal(){return yr(this.animation.to)}get velocity(){let t=Ns(this);return t instanceof gm?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return JM(this)}get isAnimating(){return Hu(this)}get isPaused(){return Ey(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=By(n.to);!a&&Kr(n.to)&&(s=yn(yr(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==bm?1:a?a[f].lastPosition:s[f],h=n.immediate,p=m;if(!h){if(p=d.lastPosition,i.tension<=0){d.done=!0;return}let g=d.elapsedTime+=t,b=n.fromValues[f],v=d.v0!=null?d.v0:d.v0=le.arr(i.velocity)?i.velocity[f]:i.velocity,k,y=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(le.und(i.duration))if(i.decay){let _=i.decay===!0?.998:i.decay,S=Math.exp(-(1-_)*g);p=b+v/(1-_)*(1-S),h=Math.abs(d.lastPosition-p)<=y,k=v*S}else{k=d.lastVelocity==null?v:d.lastVelocity;let _=i.restVelocity||y/10,S=i.clamp?0:i.bounce,C=!le.und(S),B=b==m?d.v0>0:b<m,R,I=!1,E=1,L=Math.ceil(t/E);for(let T=0;T<L&&(R=Math.abs(k)>_,!(!R&&(h=Math.abs(m-p)<=y,h)));++T){C&&(I=p==m||p>m==B,I&&(k=-k*S,p=m));let P=-i.tension*1e-6*(p-m),D=-i.friction*.001*k,j=(P+D)/i.mass;k=k+j*E,p=p+k*E}}else{let _=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)),_=(i.progress||0)+g/this._memoizedDuration,_=_>1?1:_<0?0:_,d.durationProgress=_),p=b+i.easing(_)*(m-b),k=(p-d.lastPosition)/t,h=_==1}d.lastVelocity=k,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),h=!0)}a&&!a[f].done&&(h=!1),h?d.done=!0:o=!1,d.setValue(p,i.round)&&(r=!0)});let c=Ns(this),u=c.getValue();if(o){let d=yr(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 _e.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Hu(this)){let{to:t,config:o}=this.animation;_e.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 le.und(t)?(r=this.queue||[],this.queue=[]):r=[le.obj(t)?t:Yr({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>d5(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),Oy(this._state,t&&this._lastCallId),_e.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=le.obj(r)?r[o]:r,(r==null||t5(r))&&(r=void 0),n=le.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return JM(this)||(t.reverse&&([r,n]=[n,r]),n=yr(n),le.und(n)?Ns(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Yr({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,gH(r,(c,u)=>/^on/.test(u)?pH(c,n):c)),dH(this,r,"onProps"),Iy(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 kH(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{Ey(this)||(cH(this,!0),Fh(a.pauseQueue),Iy(this,"onPause",Ds(this,Ty(this,this.animation.to)),this))},resume:()=>{Ey(this)&&(cH(this,!1),Hu(this)&&this._resume(),Fh(a.resumeQueue),Iy(this,"onResume",Ds(this,Ty(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=SH(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(Uh(this));let n=!le.und(t.to),i=!le.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(Uh(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||le.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let h=!Ba(m,d);h&&(c.from=m),m=yr(m);let p=!Ba(f,u);p&&this._focus(f);let g=t5(o.to),{config:b}=c,{decay:v,velocity:k}=b;(n||i)&&(b.velocity=0),o.config&&!g&&d0e(b,vm(o.config,s),o.config!==a.config?vm(a.config,s):void 0);let y=Ns(this);if(!y||le.und(f))return r(Ds(this,!0));let _=le.und(o.reset)?i&&!o.default:!le.und(m)&&Py(o.reset,s),S=_?m:this.get(),C=Ry(f),B=le.num(C)||le.arr(C)||jh(C),R=!g&&(!B||Py(a.immediate||o.immediate,s));if(p){let T=g1(f);if(T!==y.constructor)if(R)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${T.name}, as the "to" prop suggests`)}let I=y.constructor,E=Kr(f),L=!1;if(!E){let T=_||!JM(this)&&h;(p||T)&&(L=Ba(Ry(S),C),E=!L),(!Ba(c.immediate,R)&&!R||!Ba(b.decay,v)||!Ba(b.velocity,k))&&(E=!0)}if(L&&Hu(this)&&(c.changed&&!_?E=!0:E||this._stop(u)),!g&&((E||Kr(u))&&(c.values=y.getPayload(),c.toValues=Kr(f)?null:I==bm?[1]:yn(C)),c.immediate!=R&&(c.immediate=R,!R&&!_&&this._set(u)),E)){let{onRest:T}=c;_t(m0e,D=>dH(this,o,D));let P=Ds(this,Ty(this,u));Fh(this._pendingCalls,P),this._pendingCalls.add(r),c.changed&&_e.batchedUpdates(()=>{c.changed=!_,T?.(P,this),_?vm(a.onRest,P):c.onStart==null||c.onStart(P,this)})}_&&this._set(S),g?r(yH(o.to,o,this._state,this)):E?this._start():Hu(this)&&!p?this._pendingCalls.add(r):r(vH(S))}_focus(t){let o=this.animation;t!==o.to&&(YM(this)&&this._detach(),o.to=t,YM(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;Kr(o)&&(ju(o,this),i5(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Kr(t)&&Uu(t,this)}_set(t,o=!0){let r=yr(t);if(!le.und(r)){let n=Ns(this);if(!n||!Ba(r,n.getValue())){let i=g1(r);!n||n.constructor!=i?h1(this,i.create(r)):n.setValue(r),n&&_e.batchedUpdates(()=>{this._onChange(r,o)})}}return Ns(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,Iy(this,"onStart",Ds(this,Ty(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),vm(this.animation.onChange,t,this)),vm(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Ns(this).reset(yr(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),Hu(this)||(lH(this,!0),Ey(this)||this._resume())}_resume(){qn.skipAnimation?this.finish():zh.start(this)}_stop(t,o){if(Hu(this)){lH(this,!1);let r=this.animation;_t(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),hm(this,{type:"idle",parent:this});let n=o?Uh(this.get()):Ds(this.get(),Ty(this,t??r.to));Fh(this._pendingCalls,n),r.changed&&(r.changed=!1,Iy(this,"onRest",n,this))}}};function Ty(e,t){let o=Ry(t),r=Ry(e.get());return Ba(r,o)}function SH(e,t=e.loop,o=e.to){let r=vm(t);if(r){let n=r!==!0&&bH(r),i=(n||e).reverse,s=!n||n.reset;return c5(Yr({},e,{loop:t,default:!1,pause:void 0,to:!i||t5(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function c5(e){let{to:t,from:o}=e=bH(e),r=new Set;return le.obj(t)&&uH(t,r),le.obj(o)&&uH(o,r),e.keys=r.size?Array.from(r):null,e}function uH(e,t){Vi(e,(o,r)=>o!=null&&t.add(r))}var m0e=["onStart","onRest","onChange","onPause","onResume"];function dH(e,t,o){e.animation[o]=t[o]!==hH(t,o)?pH(t[o],e.key):void 0}function Iy(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 p0e=["onStart","onChange","onRest"],h0e=1,S1=class{constructor(t,o){this.id=h0e++,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(Yr({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];le.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(c5(t)),this}start(t){let{queue:o}=this;return t?o=yn(t).map(c5):this.queue=[],this._flush?this._flush(this,o):(wH(this,o),g0e(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;_t(yn(o),n=>r[n].stop(!!t))}else Oy(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(le.und(t))this.start({pause:!0});else{let o=this.springs;_t(yn(t),r=>o[r].pause())}return this}resume(t){if(le.und(t))this.start({pause:!1});else{let o=this.springs;_t(yn(t),r=>o[r].resume())}return this}each(t){Vi(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,Vh(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&&Vh(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,Vh(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;_e.onFrame(this._onFrame)}};function g0e(e,t){return Promise.all(t.map(o=>xH(e,o))).then(o=>d5(e,o))}async function xH(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=le.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=le.arr(n)||le.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):_t(p0e,g=>{let b=t[g];if(le.fun(b)){let v=e._events[g];t[g]=({finished:k,cancelled:y})=>{let _=v.get(b);_?(k||(_.finished=!1),y&&(_.cancelled=!0)):v.set(b,{value:null,finished:k||!1,cancelled:y||!1})},u&&(u[g]=t[g])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,Fh(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)),h=t.cancel===!0||hH(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(kH(++e._lastAsyncId,{props:t,state:f,actions:{pause:l1,resume:l1,start(g,b){h?(Oy(f,e._lastAsyncId),b(Uh(e))):(g.onRest=a,b(yH(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let p=d5(e,await Promise.all(m));if(s&&p.finished&&!(o&&p.noop)){let g=SH(t,s,n);if(g)return wH(e,[g]),xH(e,g,!0)}return c&&_e.batchedUpdates(()=>c(p,e,e.item)),p}function b0e(e,t){let o=new l5;return o.key=e,t&&ju(o,t),o}function k0e(e,t,o){t.keys&&_t(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function wH(e,t){_t(t,o=>{k0e(e.springs,o,r=>b0e(r,e))})}function v0e(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 y0e=["children"],f5=e=>{let{children:t}=e,o=v0e(e,y0e),r=(0,Ny.useContext)(x1),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=XU(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=x1;return Ly.createElement(s,{value:o},t)},x1=_0e(f5,{});f5.Provider=x1.Provider;f5.Consumer=x1.Consumer;function _0e(e,t){return Object.assign(e,Ly.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var fH;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(fH||(fH={}));var u5=class extends Ay{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=zu(...o);let r=this._get(),n=g1(r);h1(this,n.create(r))}advance(t){let o=this._get(),r=this.get();Ba(o,r)||(Ns(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&mH(this._active)&&e5(this)}_get(){let t=le.arr(this.source)?this.source.map(yr):yn(yr(this.source));return this.calc(...t)}_start(){this.idle&&!mH(this._active)&&(this.idle=!1,_t(By(this),t=>{t.done=!1}),qn.skipAnimation?(_e.batchedUpdates(()=>this.advance()),e5(this)):zh.start(this))}_attach(){let t=1;_t(yn(this.source),o=>{Kr(o)&&ju(o,this),i5(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){_t(yn(this.source),t=>{Kr(t)&&Uu(t,this)}),this._active.clear(),e5(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=yn(this.source).reduce((o,r)=>Math.max(o,(i5(r)?r.priority:0)+1),0))}};function S0e(e){return e.idle!==!1}function mH(e){return!e.size||Array.from(e).every(S0e)}function e5(e){e.idle||(e.idle=!0,_t(By(e),t=>{t.done=!0}),hm(e,{type:"idle",parent:e}))}qn.assign({createStringInterpolator:d1,to:(e,t)=>new u5(e,t)});var h7e=zh.advance;var EH=l(m5());function b5(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 x0e=["style","children","scrollTop","scrollLeft"],TH=/^--/;function w0e(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!TH.test(e)&&!(Dy.hasOwnProperty(e)&&Dy[e])?t+"px":(""+t).trim()}var BH={};function C0e(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=b5(r,x0e),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:BH[f]||(BH[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=w0e(f,n[f]);TH.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 Dy={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},B0e=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),E0e=["Webkit","Ms","Moz","O"];Dy=Object.keys(Dy).reduce((e,t)=>(E0e.forEach(o=>e[B0e(o,t)]=e[t]),e),Dy);var T0e=["x","y","z"],I0e=/^(matrix|translate|scale|rotate|skew)/,P0e=/^(translate)/,R0e=/^(rotate|skew)/,p5=(e,t)=>le.num(e)&&e!==0?e+t:e,w1=(e,t)=>le.arr(e)?e.every(o=>w1(o,t)):le.num(e)?e===t:parseFloat(e)===t,h5=class extends km{constructor(t){let{x:o,y:r,z:n}=t,i=b5(t,T0e),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>p5(u,"px")).join(",")})`,w1(c,0)])),Vi(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(I0e.test(u)){if(delete i[u],le.und(c))return;let d=P0e.test(u)?"px":R0e.test(u)?"deg":"";s.push(yn(c)),a.push(u==="rotate3d"?([f,m,h,p])=>[`rotate3d(${f},${m},${h},${p5(p,d)})`,w1(p,0)]:f=>[`${u}(${f.map(m=>p5(m,d)).join(",")})`,w1(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new g5(s,a)),super(i)}},g5=class extends Mh{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 _t(this.inputs,(r,n)=>{let i=yr(r[0]),[s,a]=this.transforms[n](le.arr(i)?i:r.map(yr));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&_t(this.inputs,o=>_t(o,r=>Kr(r)&&ju(r,this)))}observerRemoved(t){t==0&&_t(this.inputs,o=>_t(o,r=>Kr(r)&&Uu(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),hm(this,t)}},O0e=["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"],A0e=["scrollTop","scrollLeft"];qn.assign({batchedUpdates:EH.unstable_batchedUpdates,createStringInterpolator:d1,colors:WU});var L0e=oH(O0e,{applyAnimatedValues:C0e,createAnimatedStyle:e=>new h5(e),getComponentProps:e=>b5(e,A0e)}),IH=L0e.animated;var Hh=l(O(),1),RH=l(Me(),1),OH=l(F(),1);var N0e=200;function PH(e){return{top:e.offsetTop,left:e.offsetLeft}}function D0e({triggerAnimationOnChange:e,clientId:t}){let o=(0,Hh.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,OH.useSelect)(x),{previous:d,prevRect:f}=(0,Hh.useMemo)(()=>({previous:o.current&&PH(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,Hh.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,RH.getScrollContainer)(o.current),h=i(t),p=h||s(t),g=u();function b(){if(!g&&p&&f){let I=o.current.getBoundingClientRect().top-f.top;I&&(m.scrollTop+=I)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>N0e){b();return}let k=h||a(t)||c(t);if(k&&g)return;let y=k?"1":"",_=new S1({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:R}){if(!o.current)return;let{x:I,y:E}=R;I=Math.round(I),E=Math.round(E);let L=I===0&&E===0;o.current.style.transformOrigin="center center",o.current.style.transform=L?null:`translate3d(${I}px,${E}px,0)`,o.current.style.zIndex=y,b()}});o.current.style.transform=void 0;let S=PH(o.current),C=Math.round(d.left-S.left),B=Math.round(d.top-S.top);return _.start({x:0,y:0,from:{x:C,y:B}}),()=>{_.stop(),_.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,c,u]),o}var C1=D0e;var E1=l(O(),1),Fl=l(Me(),1),LH=l(F(),1);var B1=".block-editor-block-list__block",M0e=".block-list-appender",V0e=".block-editor-button-block-appender";function AH(e,t){return e.closest(B1)===t.closest(B1)}function Ea(e,t){return t.closest([B1,M0e,V0e].join(","))===e}function Fi(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(B1);if(o)return o.id.slice(6)}function k5(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 F0e(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 z0e(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var j0e=["core/navigation"];function Gh(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&j0e.includes(r)){let s=[e],a;for(;a=s.pop();)if(!z0e(a)){for(let c of a.children)if(F0e(c)){let u=c.getBoundingClientRect();o=k5(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 NH({clientId:e,initialPosition:t}){let o=(0,E1.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=M((0,LH.useSelect)(x));return(0,E1.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(Ea(o.current,s.activeElement))return;let a=Fl.focus.tabbable.find(o.current).filter(d=>(0,Fl.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!Ea(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=Fl.focus.tabbable.findNext(o.current);if(d&&Ea(o.current,d)&&(0,Fl.isFormElement)(d)){d.focus();return}}(0,Fl.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var DH=l(Q(),1);function T1(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function MH({isEnabled:e=!0}={}){return(0,DH.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",T1),t.addEventListener("mouseover",T1),()=>{t.removeEventListener("mouseout",T1),t.removeEventListener("mouseover",T1),t.classList.remove("is-hovered")}},[e])}var I1=l(F(),1),VH=l(Q(),1);function FH(e){let{isBlockSelected:t}=(0,I1.useSelect)(x),{selectBlock:o,selectionChange:r}=(0,I1.useDispatch)(x);return(0,VH.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}Ea(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var Wh=l(Y(),1),jH=l(Me(),1),Gu=l(tt(),1),P1=l(F(),1),UH=l(Q(),1);function zH(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function HH({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=M((0,P1.useSelect)(x)),{insertAfterBlock:c,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:m,editContentOnlySection:h}=M((0,P1.useDispatch)(x));return(0,UH.useRefEffect)(p=>{if(!t)return;function g(k){let{keyCode:y,target:_}=k;y!==Gu.ENTER&&y!==Gu.BACKSPACE&&y!==Gu.DELETE||_!==p||(0,jH.isTextField)(_)||(k.preventDefault(),y===Gu.ENTER&&r()?d():y===Gu.ENTER?c(e):u(e))}function b(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:_}=p,{defaultView:S}=_;S.getSelection().removeAllRanges();let B=_.createElement("div");B.style.width="1px",B.style.height="1px",B.style.position="fixed",B.style.visibility="hidden",_.body.appendChild(B),k.dataTransfer.setDragImage(B,0,0);let R=p.getBoundingClientRect(),I=p.id,E=p.cloneNode();E.style.display="none",p.id=null,p.after(E);let L=1;{let ee=p;for(;ee=ee.parentElement;){let{scale:$}=S.getComputedStyle(ee);if($&&$!=="none"){L=parseFloat($);break}}}let T=1/L,P={};for(let ee of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])P[ee]=p.style[ee];let D=S.scrollY,j=S.scrollX,H=k.clientX,z=k.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let U=k.clientX-R.left,G=k.clientY-R.top,W=R.height>200?200/R.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${U*T}px ${G*T}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${W})`,p.style.opacity="0.9",zH(S.getComputedStyle(p).backgroundColor)){let ee="transparent",$=p;for(;$=$.parentElement;){let{backgroundColor:oe}=S.getComputedStyle($);if(!zH(oe)){ee=oe;break}}p.style.backgroundColor=ee}let J=!1,ce=H,te=z;function ne(ee){ee.clientX===ce&&ee.clientY===te||(ce=ee.clientX,te=ee.clientY,X())}function X(){J||(J=!0,p.style.pointerEvents="none");let ee=te-z,$=ce-H,oe=S.scrollY,ie=S.scrollX,K=oe-D,ae=ie-j,ge=ee+K,fe=$+ae;p.style.top=`${ge*T}px`,p.style.left=`${fe*T}px`}function q(){_.removeEventListener("dragover",ne),_.removeEventListener("dragend",q),_.removeEventListener("drop",q),_.removeEventListener("scroll",X);for(let[ee,$]of Object.entries(P))p.style[ee]=$;E.remove(),p.id=I,B.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),_.documentElement.classList.remove("is-dragging")}_.addEventListener("dragover",ne),_.addEventListener("dragend",q),_.addEventListener("drop",q),_.addEventListener("scroll",X),f([e]),document.body.classList.add("is-dragging-components-draggable"),_.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",g),p.addEventListener("dragstart",b);function v(k){let y=i(e),_=a(e),S=(0,Wh.isReusableBlock)(_),C=(0,Wh.isTemplatePart)(_);!y||s===e||S||C||(k.preventDefault(),h(e))}return p.addEventListener("dblclick",v),()=>{p.removeEventListener("keydown",g),p.removeEventListener("dragstart",b),p.removeEventListener("dblclick",v)}},[e,t,o,a,Wh.isReusableBlock,Wh.isTemplatePart,c,u,r,d,n,f,m,i,s,h])}var GH=l(Q(),1),WH=l(O(),1);function $H(){let e=(0,WH.useContext)(R1);return(0,GH.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var O1=l(Q(),1);function KH({isSelected:e}){let t=(0,O1.useReducedMotion)();return(0,O1.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 YH=l(Q(),1),qH=l(F(),1);function A1({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=M((0,qH.useSelect)(x));return(0,YH.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 ZH=l(Q(),1),My=new Map;function U0e(e,t){let o=My.get(e);o||(o=new Set,My.set(e,o),e.addEventListener("pointerdown",QH)),o.add(t)}function H0e(e,t){let o=My.get(e);o&&(o.delete(t),XH(t),o.size===0&&(My.delete(e),e.removeEventListener("pointerdown",QH)))}function XH(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function QH(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=My.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)XH(a)}function JH(){return(0,ZH.useRefEffect)(e=>(U0e(e.ownerDocument,e),()=>{H0e(e.ownerDocument,e)}),[])}var vo=l(N(),1),_n=l(O(),1),qr=l(A(),1),$h=l(F(),1),rG=l(Ms(),1),nG=l(Ai(),1);var Vy=l(N(),1);function G0e(e,t){if(!e)return!1;let o=e.attributes?.metadata?.blockVisibility;if(o===!0||typeof o!="object")return!1;let r=o.viewport;return!r||typeof r!="object"||!ku.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function tG(e,t){if(!e?.length)return!1;let o=e.filter(r=>G0e(r,t)).length;return o===0?!1:o===e.length?!0:null}function oG(e){if(!e?.length)return!1;let t=e.filter(o=>o&&o.attributes?.metadata?.blockVisibility===!1).length;return t===0?!1:t===e.length?!0:null}function Fy(e){if(!e&&e!==!1)return null;if(e===!1)return(0,Vy.__)("Block is hidden");if(e?.viewport){let t=ku.filter(([o])=>e.viewport?.[o]===!1).map(([,o])=>o.label);if(t.length>0)return(0,Vy.sprintf)((0,Vy.__)("Block is hidden on %s"),t.join(", "))}return null}var co=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='e252bf6889']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","e252bf6889"),e.appendChild(document.createTextNode(".block-editor-block-visibility-modal{z-index:1000001}.block-editor-block-visibility-modal__options{border:0;list-style:none;margin:24px 0;padding:0}.block-editor-block-visibility-modal__options-item{align-items:center;display:flex;gap:24px;justify-content:space-between;margin:0 0 16px}.block-editor-block-visibility-modal__options-item:last-child{margin:0}.block-editor-block-visibility-modal__options-item--everywhere{align-items:start;flex-direction:column}.block-editor-block-visibility-modal__options-checkbox--everywhere{font-weight:600}.block-editor-block-visibility-modal__options-icon--checked{fill:#ddd}.block-editor-block-visibility-modal__sub-options{padding-inline-start:12px;width:100%}.block-editor-block-visibility-modal__description{color:#757575;font-size:12px}.block-editor-block-visibility-info{align-items:center;display:flex;justify-content:start;margin:0 16px 16px;padding-bottom:4px;padding-top:4px}")),document.head.appendChild(e)}var W0e={[Tt.mobile.key]:!1,[Tt.tablet.key]:!1,[Tt.desktop.key]:!1},$0e=[];function v5({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,$h.useDispatch)(nG.store),{updateBlockAttributes:r}=(0,$h.useDispatch)(x),n=(0,$h.useSelect)(k=>k(x).getBlocksByClientId(e)??$0e,[e]),i=(0,$h.useSelect)(k=>k(rG.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,_n.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let k={};return ku.forEach(([,{key:y}])=>{k[y]=tG(n,y)}),{hideEverywhere:oG(n),viewportChecked:k}},[n]),[a,c]=(0,_n.useState)(s?.viewportChecked??{}),[u,d]=(0,_n.useState)(s?.hideEverywhere??!1),f=(0,_n.useCallback)((k,y)=>{c({...a,[k]:y})},[a]),m=(0,_n.useMemo)(()=>{if(!u)return(0,vo.sprintf)((0,vo.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let k=n?.length>1?(0,vo.__)("Blocks hidden. You can access them via the List View (%s)."):(0,vo.__)("Block hidden. You can access it via the List View (%s).");return(0,vo.sprintf)(k,i)},[u,n?.length,i]),h=(0,_n.useMemo)(()=>Object.values(a).some(k=>k===!0||k===null),[a]),p=(0,_n.useMemo)(()=>u!==s.hideEverywhere?!0:ku.some(([,{key:k}])=>a[k]!==s.viewportChecked[k]),[u,a,s]),g=(0,_n.useMemo)(()=>u===null?!0:Object.values(a).some(k=>k===null),[u,a]),b=(0,_n.useCallback)(k=>{k.preventDefault();let y=u?!1:{viewport:ku.reduce((S,[,{key:C}])=>(a[C]&&(S[C]=!1),S),{})},_=Object.fromEntries(n.map(({clientId:S,attributes:C})=>[S,{metadata:Ae({...C?.metadata,blockVisibility:y})}]));r(e,_,{uniqueByBlock:!0}),o(m,{id:u?"block-visibility-hidden":"block-visibility-viewports-updated",type:"snackbar"}),t()},[n,e,o,u,m,t,r,a]),v=n?.length>1;return(0,co.jsx)(qr.Modal,{title:e?.length>1?(0,vo.__)("Hide blocks"):(0,vo.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,co.jsxs)("form",{onSubmit:b,children:[(0,co.jsxs)("fieldset",{children:[(0,co.jsx)("legend",{children:v?(0,vo.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,vo.__)("Select the viewport size for which you want to hide the block.")}),(0,co.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,co.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,co.jsx)(qr.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,vo.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:k=>{d(k),c(W0e)}}),u!==!0&&(0,co.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:ku.map(([,{label:k,icon:y,key:_}])=>(0,co.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,co.jsx)(qr.CheckboxControl,{label:(0,vo.sprintf)((0,vo.__)("Hide on %s"),k),checked:a[_]??!1,indeterminate:a[_]===null,onChange:S=>f(_,S)}),(0,co.jsx)(qr.Icon,{icon:y,className:V({"block-editor-block-visibility-modal__options-icon--checked":a[_]})})]},_))})]})}),v&&g&&(0,co.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,vo.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!v&&u===!0&&(0,co.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,vo.sprintf)((0,vo.__)("Block will be hidden in the editor, and omitted from the published markup on the frontend. You can configure it again by selecting it in the List View (%s)."),i)}),!v&&!u&&h&&(0,co.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,_n.createInterpolateElement)((0,vo.sprintf)((0,vo.__)("Block will be hidden according to the selected viewports. It will be <strong>included in the published markup on the frontend</strong>. You can configure it again by selecting it in the List View (%s)."),i),{strong:(0,co.jsx)("strong",{})})})]}),(0,co.jsxs)(qr.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,co.jsx)(qr.FlexItem,{children:(0,co.jsx)(qr.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,vo.__)("Cancel")})}),(0,co.jsx)(qr.FlexItem,{children:(0,co.jsx)(qr.Button,{variant:"primary",type:"submit",disabled:!p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,vo.__)("Apply")})})]})]})})}var y5=l(Q(),1);function zi(e={}){let{blockVisibility:t=void 0,deviceType:o=Tt.desktop.key,view:r=window}=e,n=(0,y5.useViewportMatch)("mobile",">=",r),i=(0,y5.useViewportMatch)("medium",">=",r),s;return o===Tt.mobile.key?s=Tt.mobile.key:o===Tt.tablet.key?s=Tt.tablet.key:n?n&&!i?s=Tt.tablet.key:s=Tt.desktop.key:s=Tt.mobile.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[s]===!1,currentViewport:s}}var _5=l(N(),1),L1=l(A(),1),N1=l(O(),1);var iG=l(Y(),1),D1=l(F(),1);var S5=l(w(),1);function x5({clientIds:e}){let t=(0,N1.useRef)(!1),{canToggleBlockVisibility:o,areBlocksHiddenAnywhere:r}=(0,D1.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:c,isBlockHiddenAnywhere:u}=M(s(x));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,iG.hasBlockSupport)(c(f),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(f=>u(f))}},[e]),n=(0,D1.useDispatch)(x);if((0,N1.useEffect)(()=>{r&&(t.current=!0)},[r]),!r&&!t.current)return null;let{showViewportModal:i}=M(n);return(0,S5.jsx)(L1.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,S5.jsx)(L1.ToolbarButton,{disabled:!o,icon:r?Es:em,label:r?(0,_5.__)("Hidden"):(0,_5.__)("Visible"),onClick:()=>i(e),"aria-haspopup":"dialog"})})}var w5=l(N(),1),sG=l(A(),1),M1=l(F(),1),aG=l(Ms(),1);var lG=l(w(),1);function C5({clientIds:e}){let{areBlocksHiddenAnywhere:t,shortcut:o}=(0,M1.useSelect)(n=>{let{isBlockHiddenAnywhere:i}=M(n(x));return{areBlocksHiddenAnywhere:e?.every(s=>i(s)),shortcut:n(aG.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),{showViewportModal:r}=M((0,M1.useDispatch)(x));return(0,lG.jsx)(sG.MenuItem,{onClick:()=>r(e),shortcut:o,children:t?(0,w5.__)("Show"):(0,w5.__)("Hide")})}var $u=l(A(),1),B5=l(F(),1),Wu=l(N(),1);var Kh=l(w(),1),{Badge:K0e}=M($u.privateApis),Y0e={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:Tt.desktop.value};function cG({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,hasParentHiddenEverywhere:r}=(0,B5.useSelect)(f=>{if(!e)return Y0e;let{getBlockAttributes:m,isBlockParentHiddenEverywhere:h,getSettings:p}=M(f(x));return{currentBlockVisibility:m(e)?.metadata?.blockVisibility,selectedDeviceType:p()?.[Ei]?.toLowerCase()||Tt.desktop.value,hasParentHiddenEverywhere:h(e)}},[e]),i=ot(e)?.ownerDocument?.defaultView,s=i===null?void 0:i,{isBlockCurrentlyHidden:a,currentViewport:c}=zi({blockVisibility:t,deviceType:o,view:s}),u=(0,B5.useSelect)(f=>!e||!c?!1:M(f(x)).isBlockParentHiddenAtViewport(e,c),[e,c]);if(!(a||r||u))return null;let d;if(a)if(t===!1)d=(0,Wu.__)("Block is hidden");else{let f=Tt[c]?.label||c;d=(0,Wu.sprintf)((0,Wu.__)("Block is hidden on %s"),f)}if(r)d=(0,Wu.__)("Parent block is hidden");else if(u){let f=Tt[c]?.label||c;d=(0,Wu.sprintf)((0,Wu.__)("Parent block is hidden on %s"),f)}return(0,Kh.jsx)(K0e,{className:"block-editor-block-visibility-info",children:(0,Kh.jsxs)($u.__experimentalHStack,{spacing:2,justify:"start",children:[(0,Kh.jsx)($u.Icon,{icon:Es}),(0,Kh.jsx)($u.__experimentalText,{children:d})]})})}function zy(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:h,initialPosition:p,blockEditingMode:g,isHighlighted:b,isMultiSelected:v,isPartiallySelected:k,isReusable:y,isDragging:_,hasChildSelected:S,isEditingDisabled:C,hasEditableOutline:B,isEditingContentOnlySection:R,defaultClassName:I,isSectionBlock:E,isWithinSectionBlock:L,canMove:T,blockVisibility:P,deviceType:D}=(0,uG.useContext)(mr),j=(0,Yh.useRefEffect)(q=>{if(q){let{ownerDocument:ee}=q,{defaultView:$}=ee;j.current=$}},[]),H=(0,V1.sprintf)((0,V1.__)("Block: %s"),d),z=a==="html"&&!t?"-visual":"",U=JH(),G=!L,W=(0,Yh.useMergeRefs)([e.ref,j,NH({clientId:o,initialPosition:p}),V9(o),FH(o),HH({clientId:o,isSelected:f}),MH({isEnabled:G}),$H(),C1({triggerAnimationOnChange:s,clientId:o}),(0,Yh.useDisabled)({isDisabled:!h}),A1({clientId:o,isEnabled:E}),KH({isSelected:f}),T?U:void 0]),J=Ie(),te=!!J[eh]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:ne}=zi({blockVisibility:P,deviceType:D,view:j.current});u<2&&o===J.clientId&&(0,fG.default)(`Block type "${c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let X=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(X=!0),{tabIndex:g==="disabled"?-1:0,draggable:T&&!S?!0:void 0,...n,...e,ref:W,id:`block-${o}${z}`,role:"document","aria-label":H,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:V("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":h,"is-selected":f,"is-highlighted":b,"is-multi-selected":v,"is-partially-selected":k,"is-reusable":y,"is-dragging":_,"has-child-selected":S,"is-editing-disabled":C,"has-editable-outline":B,"has-negative-margin":X,"is-editing-content-only-section":R,"is-block-hidden":ne},r,e.className,n.className,I),style:{...n.style,...e.style,...te}}}zy.save=dG.__unstableGetBlockProps;var yo=l(w(),1);function q0e(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=V(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function F1({children:e,isHtml:t,...o}){return(0,yo.jsx)("div",{...zy(o,{__unstableIsHtml:t}),children:e})}function E5({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:h,onReplace:p,onRemove:g,onInsertBlocksAfter:b,onMerge:v,toggleSelection:k}){let{mayDisplayControls:y,mayDisplayParentControls:_,isSelectionWithinCurrentSection:S,themeSupportsLayout:C,...B}=(0,Ku.useContext)(mr),R=lm()||{},I=(0,yo.jsx)(gC,{name:u,isSelected:i,attributes:f,setAttributes:h,insertBlocksAfter:o?void 0:b,onReplace:r?p:void 0,onRemove:r?g:void 0,mergeBlocks:r?v:void 0,clientId:n,isSelectionEnabled:s,toggleSelection:k,__unstableLayoutClassNames:c,__unstableParentLayout:Object.keys(R).length?R:void 0,mayDisplayControls:y,mayDisplayParentControls:_,mayDisplayPatternEditingControls:S,blockEditingMode:B.blockEditingMode,isPreviewMode:B.isPreviewMode}),E=(0,We.getBlockType)(u);E?.getEditWrapperProps&&(m=q0e(m,E.getEditWrapperProps(f)));let L=m&&!!m["data-align"]&&!C,T=a?.includes("is-position-sticky");L&&(I=(0,yo.jsx)("div",{className:V("wp-block",T&&a),"data-align":m["data-align"],children:I}));let P;if(d)t==="html"?P=(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("div",{style:{display:"none"},children:I}),(0,yo.jsx)(F1,{isHtml:!0,children:(0,yo.jsx)(TU,{clientId:n})})]}):E?.apiVersion>1?P=I:P=(0,yo.jsx)(F1,{children:I});else{let z=e?(0,We.serializeRawBlock)(e):(0,We.getSaveContent)(E,f);P=(0,yo.jsxs)(F1,{className:"has-warning",children:[(0,yo.jsx)(oU,{clientId:n}),(0,yo.jsx)(Ku.RawHTML,{children:(0,pG.safeHTML)(z)})]})}let{"data-align":D,...j}=m??{},H={...j,className:V(j.className,D&&C&&`align${D}`,!(D&&T)&&a)};return(0,yo.jsx)(mr.Provider,{value:{wrapperProps:H,isAligned:L,isSelectionWithinCurrentSection:S,...B},children:(0,yo.jsx)(aU,{fallback:(0,yo.jsx)(F1,{className:"has-warning",children:(0,yo.jsx)(iU,{})}),children:P})})}var Z0e=(0,z1.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(x);return{setAttributes(m){let{getMultiSelectedBlockClientIds:h}=o.select(x),p=h(),{clientId:g,attributes:b}=t,v=p.length?p:[g],k=typeof m=="function"?m(b):m;r(v,k)},onInsertBlocks(m,h){let{rootClientId:p}=t;n(m,h,p)},onInsertBlocksAfter(m){let{clientId:h,rootClientId:p}=t,{getBlockIndex:g}=o.select(x),b=g(h);n(m,b+1,p)},onMerge(m){let{clientId:h,rootClientId:p}=t,{getPreviousBlockClientId:g,getNextBlockClientId:b,getBlock:v,getBlockAttributes:k,getBlockName:y,getBlockOrder:_,getBlockIndex:S,getBlockRootClientId:C,canInsertBlockType:B}=o.select(x);function R(){let E=v(h),L=(0,We.getDefaultBlockName)(),T=(0,We.getBlockType)(L);if(y(h)!==L){let P=(0,We.switchToBlockType)(E,L);P&&P.length&&s(h,P)}else if((0,We.isUnmodifiedDefaultBlock)(E)){let P=b(h);P&&o.batch(()=>{d(h),f(P)})}else if(T.merge){let P=T.merge({},E.attributes);s([h],[(0,We.createBlock)(L,P)])}}function I(E,L=!0){let T=y(E),D=(0,We.getBlockType)(T).category==="text",j=C(E),H=_(E),[z]=H;H.length===1&&(0,We.isUnmodifiedBlock)(v(z))?d(E):D?o.batch(()=>{if(B(y(z),j))u([z],E,j,S(E));else{let U=(0,We.switchToBlockType)(v(z),(0,We.getDefaultBlockName)());U&&U.length&&U.every(G=>B(G.name,j))?(n(U,S(E),j,L),d(z,!1)):R()}!_(E).length&&(0,We.isUnmodifiedBlock)(v(E))&&d(E,!1)}):R()}if(m){if(p){let L=b(p);if(L)if(y(p)===y(L)){let T=k(p),P=k(L);if(Object.keys(T).every(D=>T[D]===P[D])){o.batch(()=>{u(_(L),L,p),d(L,!1)});return}}else{i(p,L);return}}let E=b(h);if(!E)return;_(E).length?I(E,!1):i(h,E)}else{let E=g(h);if(E)i(E,h);else if(p){let L=g(p);if(L&&y(p)===y(L)){let T=k(p),P=k(L);if(Object.keys(T).every(D=>T[D]===P[D])){o.batch(()=>{u(_(p),p,L),d(p,!1)});return}}I(p)}else R()}},onReplace(m,h,p){m.length&&!(0,We.isUnmodifiedDefaultBlock)(m[m.length-1])&&c();let g=m?.length===1&&Array.isArray(m[0])?m[0]:m;s([t.clientId],g,h,p)},onRemove(){d(t.clientId)},toggleSelection(m){a(m)}}});E5=(0,j1.compose)(Z0e,(0,mG.withFilters)("editor.BlockListBlock"))(E5);function X0e(e){let{clientId:t,rootClientId:o}=e,r=(0,z1.useSelect)(K=>{let{isBlockSelected:ae,getBlockMode:ge,isSelectionEnabled:fe,getTemplateLock:xe,isSectionBlock:Ve,getParentSectionBlock:at,getBlockWithoutAttributes:Lt,getBlockAttributes:no,canRemoveBlock:jo,canMoveBlock:lt,getSettings:ur,getEditedContentOnlySection:$t,getBlockEditingMode:io,getBlockName:Ue,isFirstMultiSelectedBlock:Kt,getMultiSelectedBlockClientIds:Je,hasSelectedInnerBlock:He,getBlocksByName:dr,getBlockIndex:pn,isBlockMultiSelected:ze,isBlockSubtreeDisabled:so,isBlockHighlighted:et,__unstableIsFullySelected:Fe,__unstableSelectionHasUnmergeableBlock:yt,isBlockBeingDragged:Oo,isDragging:fr,__unstableHasActiveBlockOverlayActive:be,getSelectedBlocksInitialCaretPosition:Bt}=M(K(x)),Ao=Lt(t);if(!Ao)return;let{hasBlockSupport:qe,getActiveBlockVariation:re}=K(We.store),Ne=no(t),{name:mt,isValid:ou}=Ao,ba=(0,We.getBlockType)(mt),Zp=ur(),{supportsLayout:cv,isPreviewMode:Nf,__experimentalBlockBindingsSupportedAttributes:hn}=Zp,Xp=hn?.[mt],Qp=Ne?.metadata?.blockVisibility,M0=Zp?.[Ei]?.toLowerCase()||"desktop",V0=ba?.apiVersion>1,uv=ze(t),ue=io(t),ao={isPreviewMode:Nf,blockWithoutAttributes:Ao,name:mt,attributes:Ne,isValid:ou,themeSupportsLayout:cv,index:pn(t),isReusable:(0,We.isReusableBlock)(ba),className:V0?Ne.className:void 0,defaultClassName:V0?(0,We.getBlockDefaultClassName)(mt):void 0,blockTitle:ba?.title,bindableAttributes:Xp,blockVisibility:Qp,deviceType:M0,isMultiSelected:uv,blockEditingMode:ue,isEditingDisabled:ue==="disabled"};if(Nf)return ao;let ye=ae(t),Nt=jo(t),gn=lt(t),Ir=re(mt,Ne),ru=!0,dA=He(t,ru),fA=Ve(t)?t:at(t),mA=(0,We.hasBlockSupport)(mt,"multiple",!0)?[]:dr(mt),ege=mA.length&&mA[0]!==t;return{...ao,mode:ge(t),isSelectionEnabled:fe(),isLocked:!!xe(o),isSectionBlock:Ve(t),isWithinSectionBlock:!!fA,isSelectionWithinCurrentSection:ae(fA)||He(fA,ru),blockType:ba,canRemove:Nt,canMove:gn,isSelected:ye,isEditingContentOnlySection:$t()===t,blockEditingMode:ue,mayDisplayControls:ye||Kt(t)&&Je().every(tge=>Ue(tge)===mt),mayDisplayParentControls:qe(Ue(t),"__experimentalExposeControlsToChildren",!1)&&He(t),blockApiVersion:ba?.apiVersion||1,blockTitle:Ir?.title||ba?.title,isSubtreeDisabled:ue==="disabled"&&so(t),hasOverlay:be(t)&&!fr(),initialPosition:ye?Bt():void 0,isHighlighted:et(t),isMultiSelected:uv,isPartiallySelected:uv&&!Fe()&&!yt(),isDragging:Oo(t),hasChildSelected:dA,isEditingDisabled:ue==="disabled",hasEditableOutline:ue!=="disabled"&&io(o)==="disabled",originalBlockClientId:ege?mA[0]:!1,blockVisibility:Qp,deviceType:M0}},[t,o]),n=(0,j1.useRefEffect)(K=>{if(K){let{ownerDocument:ae}=K,{defaultView:ge}=ae;n.current=ge}},[]),{isBlockCurrentlyHidden:i}=zi({blockVisibility:r?.blockVisibility,deviceType:r?.deviceType,view:n.current}),s=(0,Ku.useMemo)(()=>({...r?.blockWithoutAttributes,attributes:r?.attributes}),[r?.blockWithoutAttributes,r?.attributes]);if(!r)return null;let{isPreviewMode:a,mode:c="visual",isSelectionEnabled:u=!1,isLocked:d=!1,canRemove:f=!1,canMove:m=!1,name:h,attributes:p,isValid:g,isSelected:b=!1,themeSupportsLayout:v,isEditingContentOnlySection:k,blockEditingMode:y,mayDisplayControls:_,mayDisplayParentControls:S,index:C,blockApiVersion:B,blockType:R,blockTitle:I,isSubtreeDisabled:E,hasOverlay:L,initialPosition:T,isHighlighted:P,isMultiSelected:D,isPartiallySelected:j,isReusable:H,isDragging:z,hasChildSelected:U,isSectionBlock:G,isWithinSectionBlock:W,isSelectionWithinCurrentSection:J,isEditingDisabled:ce,hasEditableOutline:te,className:ne,defaultClassName:X,originalBlockClientId:q,bindableAttributes:ee,blockVisibility:$,deviceType:oe}=r,ie={isPreviewMode:a,clientId:t,className:ne,index:C,mode:c,name:h,blockApiVersion:B,blockType:R,blockTitle:I,isSelected:b,isSubtreeDisabled:E,hasOverlay:L,initialPosition:T,blockEditingMode:y,isHighlighted:P,isMultiSelected:D,isPartiallySelected:j,isReusable:H,isDragging:z,hasChildSelected:U,isSectionBlock:G,isWithinSectionBlock:W,isSelectionWithinCurrentSection:J,isEditingDisabled:ce,hasEditableOutline:te,isEditingContentOnlySection:k,defaultClassName:X,mayDisplayControls:_,mayDisplayParentControls:S,originalBlockClientId:q,themeSupportsLayout:v,canMove:m,isBlockCurrentlyHidden:i,bindableAttributes:ee,blockVisibility:$,deviceType:oe};return i&&!b&&!D&&!U?null:(0,yo.jsx)(mr.Provider,{value:ie,children:(0,yo.jsx)(E5,{...e,mode:c,isSelectionEnabled:u,isLocked:d,canRemove:f,canMove:m,block:s,name:h,attributes:p,isValid:g,isSelected:b})})}var hG=(0,Ku.memo)(X0e);var UV=l(F(),1),dq=l(Y(),1);var zV=l(N(),1),sq=l(bG(),1),dE=l(F(),1),fE=l(tt(),1);var nq=l(er(),1),Ql=l(N(),1),lE=l(A(),1),iq=l(O(),1),cE=l(F(),1),uE=l(Q(),1),g_=l(Y(),1);var zt=l(O(),1),Rg=l(A(),1),ld=l(N(),1),m_=l(Q(),1),JY=l(F(),1);var qh=l(N(),1),Zh=l(O(),1),vG=l(A(),1),jy=l(w(),1),kG=[(0,Zh.createInterpolateElement)((0,qh.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,jy.jsx)("kbd",{})}),(0,Zh.createInterpolateElement)((0,qh.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,jy.jsx)("kbd",{})}),(0,Zh.createInterpolateElement)((0,qh.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,jy.jsx)("kbd",{})}),(0,qh.__)("Drag files into the editor to automatically insert media blocks."),(0,qh.__)("Change a block's type by pressing the block icon on the toolbar.")];function Q0e(){let[e]=(0,Zh.useState)(Math.floor(Math.random()*kG.length));return(0,jy.jsx)(vG.Tip,{children:kG[e]})}var yG=Q0e;var hg=l(Y(),1),NK=l(O(),1),DK=l(N(),1);var Sn=l(A(),1),U1=l(F(),1),_G=l(Pe(),1),Yu=l(N(),1);var H1=l(Y(),1);var Or=l(w(),1),{Badge:J0e}=M(Sn.privateApis);function exe({children:e,onClick:t}){return t?(0,Or.jsx)(Sn.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function txe({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,_G.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:o}=r);let{parentBlockClientId:f,parentBlockName:m}=(0,U1.useSelect)(g=>{if(a||c||!s)return{};let{getBlockParents:b,getBlockName:v}=g(x),y=b(d,!1).find(_=>{let S=v(_);return S==="core/navigation"||(0,H1.hasBlockSupport)(S,"listView")});return{parentBlockClientId:y,parentBlockName:y?v(y):null}},[d,s,c,a]),{selectBlock:h}=(0,U1.useDispatch)(x),p=a?"div":"h2";return(0,Or.jsx)("div",{className:V("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:(0,Or.jsxs)(Sn.__experimentalVStack,{children:[(0,Or.jsxs)(Sn.__experimentalHStack,{justify:"flex-start",spacing:0,children:[f&&(0,Or.jsx)(Sn.Button,{onClick:()=>h(f),label:m?(0,Yu.sprintf)((0,Yu.__)('Go to "%s" block'),(0,H1.getBlockType)(m)?.title):(0,Yu.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,Yu.isRTL)()?Uo:Gr,size:"small"}),c&&(0,Or.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,Or.jsx)(Sn.Icon,{icon:(0,Yu.isRTL)()?vv:yv})}),(0,Or.jsxs)(exe,{onClick:a?()=>{h(a)}:void 0,children:[(0,Or.jsx)(Oe,{icon:t,showColors:!0}),(0,Or.jsxs)(Sn.__experimentalVStack,{spacing:1,children:[(0,Or.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,Or.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,Or.jsx)(J0e,{children:e})]}),u]})]})]}),!a&&!c&&o&&(0,Or.jsx)(Sn.__experimentalText,{className:"block-editor-block-card__description",children:o})]})})}var Uy=txe;var IB=l(Q(),1),kV=l(F(),1),Bm=l(O(),1),bV=l(Pe(),1);var jG=l(F(),1),qu=l(O(),1),UG=l(A(),1),_m=l(xG(),1);var wG=l(O(),1),Xh=l(F(),1),CG=l(Q(),1);var G1=l(w(),1);function oxe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,Xh.createRegistry)({},t),r.registerStore(Yt,_h),e.set(t,r)),r}var rxe=(0,CG.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,Xh.useRegistry)(),[i]=(0,wG.useState)(()=>new WeakMap),s=oxe(i,n,o);return s===n?(0,G1.jsx)(e,{registry:n,...r}):(0,G1.jsx)(Xh.RegistryProvider,{value:s,children:(0,G1.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),BG=rxe;var Zr=l(O(),1),PG=l(F(),1),RG=l(Y(),1);var EG=l(O(),1),nxe=()=>{},W1=(0,EG.createContext)({getSelection:()=>{},onChangeSelection:nxe});var TG=()=>{};function OG(e,t){let o=(0,RG.cloneBlock)(e);return t.externalToInternal.set(e.clientId,o.clientId),t.internalToExternal.set(o.clientId,e.clientId),e.innerBlocks?.length&&(o.innerBlocks=e.innerBlocks.map(r=>OG(r,t))),o}function AG(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:AG(o.innerBlocks,t)}})}function IG(e,t){let{selectionStart:o,selectionEnd:r,initialPosition:n}=e,i=s=>{if(!s?.clientId)return s;let a=t.internalToExternal.get(s.clientId);return{...s,clientId:a??s.clientId}};return{selectionStart:i(o),selectionEnd:i(r),initialPosition:n}}function $1({clientId:e=null,value:t,onChange:o=TG,onInput:r=TG}){let n=(0,PG.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,Zr.useContext)(W1),{resetBlocks:a,resetSelection:c,replaceInnerBlocks:u,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(x),{getBlockName:m,getBlocks:h,getSelectionStart:p,getSelectionEnd:g}=n.select(x),b=(0,Zr.useRef)({incoming:null,outgoing:[]}),v=(0,Zr.useRef)(!1),k=(0,Zr.useRef)({externalToInternal:new Map,internalToExternal:new Map}),y=(0,Zr.useRef)(null),_=(0,Zr.useRef)(!1),S=()=>{let E=i();if(!E?.selectionStart?.clientId||E===y.current)return;let L=E.selectionStart.clientId;if(e?k.current.externalToInternal.has(L):!!m(L)){y.current=E;let P=D=>!D?.clientId||!e?D:{...D,clientId:k.current.externalToInternal.get(D.clientId)??D.clientId};_.current=!0,c(P(E.selectionStart),P(E.selectionEnd),E.initialPosition),_.current=!1}},C=()=>{t&&(e?n.batch(()=>{k.current.externalToInternal.clear(),k.current.internalToExternal.clear();let E=t.map(L=>OG(L,k.current));d(e,!0),v.current&&(b.current.incoming=E),f(),u(e,E),y.current=null}):(v.current&&(b.current.incoming=t),f(),a(t)))},B=()=>{f(),e?(d(e,!1),f(),u(e,[])):a([])},R=(0,Zr.useRef)(r),I=(0,Zr.useRef)(o);(0,Zr.useEffect)(()=>{R.current=r,I.current=o},[r,o]),(0,Zr.useEffect)(()=>{let E=b.current.outgoing.includes(t),L=h(e)===t;E?b.current.outgoing[b.current.outgoing.length-1]===t&&(b.current.outgoing=[]):L||(b.current.outgoing=[],C(),S())},[t,e]),(0,Zr.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:L,__unstableIsLastBlockChangeIgnored:T,areInnerBlocksControlled:P,getBlockParents:D}=n.select(x),j=h(e),H=L(),z=!1,U=p(),G=g();v.current=!0;let W=n.subscribe(()=>{if(e!==null&&m(e)===null)return;let J=L(),ce=h(e),te=ce!==j;if(j=ce,te&&(b.current.incoming||T())){b.current.incoming=null,H=J;return}let X=te||z&&!te&&J&&!H,q=p(),ee=g(),$=q!==U||ee!==G;$&&(U=q,G=ee),(X||$)&&n.batch(()=>{if(X){H=J;let oe=e?AG(j,k.current):j,ie={selectionStart:q,selectionEnd:ee,initialPosition:E()},K=e?IG(ie,k.current):ie;b.current.outgoing.push(oe),(H?I.current:R.current)(oe,{selection:K})}if($&&!X&&q?.clientId&&!_.current&&(e?k.current.internalToExternal.has(q.clientId):!D(q.clientId).some(ie=>P(ie)))){let ie={selectionStart:q,selectionEnd:ee,initialPosition:E()};s(e?IG(ie,k.current):ie)}}),z=te},x);return()=>{v.current=!1,W()}},[n,e]),(0,Zr.useEffect)(()=>()=>{B()},[])}var LG=l(O(),1),NG=l(F(),1),DG=l(Ms(),1),_o=l(N(),1);function MG(){return null}function ixe(){let{registerShortcut:e}=(0,NG.useDispatch)(DG.store);return(0,LG.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,_o.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,_o.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,_o.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,_o.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,_o.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,_o.__)("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,_o.__)("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,_o.__)("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,_o.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,_o.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,_o.__)("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,_o.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,_o.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,_o.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,_o.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,_o.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,_o.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,_o.__)("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,_o.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,_o.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e]),null}MG.Register=ixe;var K1=MG;var VG=l(O(),1);function sxe(e={}){return(0,VG.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,mediaFinalize:e.mediaFinalize,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var FG=sxe;var zl=l(w(),1),T5=()=>{},zG=!1,Qh=null;function axe(){if(Qh!==null)return Qh;if(!window.__clientSideMediaProcessing||typeof _m.detectClientSideMediaSupport!="function")return Qh=!1,!1;let e=(0,_m.detectClientSideMediaSupport)();return!e||!e.supported?(zG||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),zG=!0),Qh=!1,!1):(Qh=!0,!0)}function lxe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=T5,onFileChange:s,onSuccess:a,onBatchSuccess:c}){e.dispatch(_m.store).addItems({files:Array.from(n),onChange:s,onSuccess:u=>{t?.[ox]?.(u),a?.(u)},onBatchSuccess:c,onError:u=>i(typeof u=="string"?u:u?.message??""),additionalData:r,allowedTypes:o})}function cxe(e){return $1(e),null}var Jh=BG(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=FG(t),i=axe(),s=!!t?.mediaUpload?.__isMediaUploadInterceptor,a=(0,qu.useMemo)(()=>{if(i&&t?.mediaUpload&&!s){let p=lxe.bind(null,o,t);return p.__isMediaUploadInterceptor=!0,{...t,mediaUpload:p}}return t},[t,o,i,s]),{__experimentalUpdateSettings:c}=M((0,jG.useDispatch)(x));(0,qu.useEffect)(()=>{c({...a,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[a,r,c]);let u=(0,qu.useRef)(e.selection);u.current=e.selection;let d=(0,qu.useRef)(e.onChangeSelection??T5);d.current=e.onChangeSelection??T5;let f=(0,qu.useMemo)(()=>({getSelection:()=>u.current,onChangeSelection:(...p)=>d.current(...p)}),[]),m=(0,zl.jsxs)(UG.SlotFillProvider,{passthrough:!0,children:[!a?.isPreviewMode&&(0,zl.jsx)(K1.Register,{}),(0,zl.jsx)(D9,{children:e.children})]}),h=(0,zl.jsxs)(W1.Provider,{value:f,children:[(0,zl.jsx)(cxe,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),m]});return i&&!s?(0,zl.jsx)(_m.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:h}):h}),uxe=e=>(0,zl.jsx)(Jh,{...e,stripExperimentalSettings:!0,children:e.children}),HG=uxe;var i_=l(Q(),1),CK=l(F(),1),TB=l(O(),1),BK=l(A(),1);var Sm=l(O(),1),TW=l(N(),1),Ul=l(Q(),1),IW=l(A(),1),L5=l(F(),1);var _W=l(F(),1),SW=l(N(),1),$y=l(Q(),1),xW=l(O(),1);var GG=l(Q(),1),WG=l(F(),1);function dxe(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(x);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function $G(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,WG.useSelect)(dxe,[]);return(0,GG.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 eg=l(Me(),1),I5=l(tt(),1),Y1=l(F(),1),q1=l(Q(),1),Hy=l(O(),1);var P5=l(w(),1);function KG(){let e=(0,Hy.useRef)(),t=(0,Hy.useRef)(),o=(0,Hy.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=M((0,Y1.useSelect)(x)),{setLastFocus:d}=M((0,Y1.useDispatch)(x)),f=(0,Hy.useRef)();function m(v){let k=e.current.ownerDocument===v.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 y=c(),_=s(y);_.length?e.current.querySelector(`[data-block="${_[0]}"]`).focus():y?e.current.querySelector(`[data-block="${y}"]`).focus():k.focus()}else{let y=v.target.compareDocumentPosition(k)&v.target.DOCUMENT_POSITION_FOLLOWING,_=eg.focus.tabbable.find(e.current);_.length&&(y?_[0]:_[_.length-1]).focus()}}let h=(0,P5.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),p=(0,P5.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,q1.useRefEffect)(v=>{function k(B){if(B.defaultPrevented||B.keyCode!==I5.TAB||!o.current||!t.current)return;let{target:R,shiftKey:I}=B,E=I?"findPrevious":"findNext",L=eg.focus.tabbable[E](R),T=R.closest("[data-block]"),P=T&&L&&(AH(T,L)||Ea(T,L));if((0,eg.isFormElement)(L)&&P)return;let D=I?t:o;f.current=!0,D.current.focus({preventScroll:!0})}function y(B){d({...a(),current:B.target});let{ownerDocument:R}=v;!B.relatedTarget&&B.target.hasAttribute("data-block")&&R.activeElement===R.body&&i()===0&&v.focus()}function _(B){if(B.keyCode!==I5.TAB||B.target?.getAttribute("role")==="region"||e.current===B.target)return;let I=B.shiftKey?"findPrevious":"findNext",E=eg.focus.tabbable[I](B.target);(E===t.current||E===o.current)&&(B.preventDefault(),E.focus({preventScroll:!0}))}let{ownerDocument:S}=v,{defaultView:C}=S;return C.addEventListener("keydown",_),v.addEventListener("keydown",k),v.addEventListener("focusout",y),()=>{C.removeEventListener("keydown",_),v.removeEventListener("keydown",k),v.removeEventListener("focusout",y)}},[]),b=(0,q1.useMergeRefs)([e,g]);return[h,b,p]}var So=l(Me(),1),Ta=l(tt(),1),Z1=l(F(),1),YG=l(Q(),1);function fxe(e,t,o){let r=t===Ta.UP||t===Ta.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 R5(e,t,o,r){let n=So.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(Fi(a)&&So.focus.focusable.find(a).filter(c=>!(0,So.isFormElement)(c)).length!==0||!So.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 qG(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,Z1.useSelect)(x),{selectBlock:i}=(0,Z1.useDispatch)(x);return(0,YG.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let h=R5(f,m,s);return h&&Fi(h)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:h,shiftKey:p,ctrlKey:g,altKey:b,metaKey:v}=f,k=m===Ta.UP,y=m===Ta.DOWN,_=m===Ta.LEFT,S=m===Ta.RIGHT,C=k||_,B=_||S,R=k||y,I=B||R,E=p||g||b||v,L=R?So.isVerticalEdge:So.isHorizontalEdge,{ownerDocument:T}=s,{defaultView:P}=T;if(!I||o().isPreviewMode)return;if(r()){if(p||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!fxe(h,m,E))return;R?a||(a=(0,So.computeCaretRect)(P)):a=null;let D=(0,So.isRTL)(h)?!C:C,{keepCaretInsideBlock:j}=o();if(p)u(h,C)&&L(h,C)&&(s.contentEditable=!0,s.focus());else if(R&&(0,So.isVerticalEdge)(h,C)&&(!b||(0,So.isHorizontalEdge)(h,D))&&!j){let H=R5(h,C,s,!0);H&&((0,So.placeCaretAtVerticalEdge)(H,b?!C:C,b?void 0:a),f.preventDefault())}else if(B&&P.getSelection().isCollapsed&&(0,So.isHorizontalEdge)(h,D)&&!j){let H=R5(h,D,s);(0,So.placeCaretAtHorizontalEdge)(H,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var ZG=l(Q(),1),XG=l(F(),1),Ia=l(tt(),1);function QG(){let e=(0,XG.useSelect)(t=>t(x).getSettings().isPreviewMode,[]);return(0,ZG.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===Ia.TAB,c=n===Ia.UP,u=n===Ia.DOWN,d=n===Ia.LEFT;if(!a&&!(c||u||d||n===Ia.RIGHT))return;let h=a?i:c||d,p=Array.from(t.querySelectorAll("[data-block]"));if(!p.length)return;let g=s.closest("[data-block]"),b=g?p.indexOf(g):-1;if(b===-1||a&&(h&&b===0||!h&&b===p.length-1))return;let v;h?v=b<=0?p.length-1:b-1:v=b===-1||b>=p.length-1?0:b+1,r.preventDefault(),p[v].focus()}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},[e])}var JG=l(Me(),1),X1=l(F(),1),eW=l(Ms(),1),tW=l(Q(),1);function oW(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,X1.useSelect)(x),{multiSelect:r,selectBlock:n}=(0,X1.useDispatch)(x),i=(0,eW.__unstableUseShortcutEventMatch)();return(0,tW.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,JG.isEntirelySelected)(c.target))return;c.preventDefault();let{ownerDocument:d}=c.target,[f]=u,m=Fi(d.activeElement);if(m&&m!==f&&!Ea(d.getElementById("block-"+f),d.activeElement)){n(m);return}let h=o(f),p=e(h);if(u.length===p.length){h&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),n(h));return}r(p[0],p[p.length-1])}return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}},[])}var Q1=l(F(),1),nW=l(Q(),1);function rW(e,t){e.contentEditable=t,t&&e.focus()}function iW(){let{startMultiSelect:e,stopMultiSelect:t}=(0,Q1.useDispatch)(x),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,Q1.useSelect)(x);return(0,nW.useRefEffect)(a=>{let{ownerDocument:c}=a,{defaultView:u}=c,d,f;function m(){t(),u.removeEventListener("mouseup",m),f=u.requestAnimationFrame(()=>{if(!n())return;rW(a,!1);let b=u.getSelection();if(b.rangeCount){let v=b.getRangeAt(0),{commonAncestorContainer:k}=v,y=v.cloneRange();d.contains(k)&&(d.focus(),b.removeAllRanges(),b.addRange(y))}})}let h;function p({target:b}){h=b}function g({buttons:b,target:v,relatedTarget:k}){v.contains(h)&&(v.contains(k)||i()||b===1&&(s()||a!==v&&(v.getAttribute("contenteditable")!=="true"&&!o().isPreviewMode||r()&&(d=v,e(),u.addEventListener("mouseup",m),rW(a,!0)))))}return a.addEventListener("mouseout",g),a.addEventListener("mousedown",p),()=>{a.removeEventListener("mouseout",g),u.removeEventListener("mouseup",m),u.cancelAnimationFrame(f)}},[e,t,r,n])}var tB=l(F(),1),aW=l(Q(),1),eB=l(gr(),1),lW=l(Me(),1);function mxe(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function pxe(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,lW.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function hxe(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function sW(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function J1(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function cW(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,tB.useDispatch)(x),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,tB.useSelect)(x);return(0,aW.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=mxe(f),h=pxe(f);if(!s.contains(m)||!s.contains(h))return;let p=d.shiftKey&&d.type==="mouseup";if(f.isCollapsed&&!p){if(s.contentEditable==="true"&&!i()){sW(s,!1);let k=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;k=k?.closest("[contenteditable]"),k?.focus()}return}let g=Fi(m),b=Fi(h);if(p){let k=n(),y=Fi(d.target),_=y!==b;(g===b&&f.isCollapsed||!b||_)&&(b=y),g!==k&&(g=k)}if(g===void 0&&b===void 0){sW(s,!1);return}if(d.type==="mouseup"&&!d.shiftKey&&!i()&&g===b){let k=Fi(d.target);if(k&&k!==g){f.removeAllRanges();return}}if(g===b)if(i())e(g,g);else{let k=!f.isCollapsed&&(J1(m)||J1(h));if(k&&a.activeElement!==k){let y=f.getRangeAt(0),_=(0,eB.create)({element:k,range:y,__unstableIsEditableTree:!0});o({start:{clientId:g,attributeKey:k.dataset.wpBlockAttributeKey,offset:_.start??0},end:{clientId:g,attributeKey:k.dataset.wpBlockAttributeKey,offset:_.end}})}else t(g)}else{let k=[...r(g),g],y=[...r(b),b],_=hxe(k,y);if(k[_]!==g||y[_]!==b){e(k[_],y[_]);return}let S=J1(m),C=J1(h);if(S&&C){let B=f.getRangeAt(0),R=(0,eB.create)({element:S,range:B,__unstableIsEditableTree:!0}),I=(0,eB.create)({element:C,range:B,__unstableIsEditableTree:!0}),E=R.start??R.end,L=I.start??I.end;o({start:{clientId:g,attributeKey:S.dataset.wpBlockAttributeKey,offset:E},end:{clientId:b,attributeKey:C.dataset.wpBlockAttributeKey,offset:L}})}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 oB=l(F(),1),uW=l(Q(),1);function dW(){let{selectBlock:e}=(0,oB.useDispatch)(x),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,oB.useSelect)(x);return(0,uW.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=Fi(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 rB=l(F(),1),fW=l(Q(),1),jl=l(tt(),1),Vs=l(Y(),1);function mW(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,rB.useSelect)(x),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:h,__unstableDeleteSelection:p,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,rB.useDispatch)(x);return(0,fW.useRefEffect)(v=>{function k(S){v.contentEditable==="true"&&S.preventDefault()}function y(S){if(!S.defaultPrevented){if(!n()){if(S.keyCode===jl.ENTER){if(S.shiftKey||e())return;let C=o(),B=i(C),R=c(),I=u();if(R.attributeKey===I.attributeKey){let E=d(C)[R.attributeKey],L=(0,Vs.getBlockTransforms)("from").filter(({type:P})=>P==="enter"),T=(0,Vs.findTransform)(L,P=>P.regExp.test(E));if(T){f(C,T.transform({content:E})),b();return}}if(!(0,Vs.hasBlockSupport)(B,"splitting",!1)&&!S.__deprecatedOnSplit)return;(s((0,Vs.getDefaultBlockName)(),a(C))||s(B,a(C)))&&(m(),S.preventDefault())}return}S.keyCode===jl.ENTER?(v.contentEditable=!1,S.preventDefault(),e()?f(t(),(0,Vs.createBlock)((0,Vs.getDefaultBlockName)())):m()):S.keyCode===jl.BACKSPACE||S.keyCode===jl.DELETE?(v.contentEditable=!1,S.preventDefault(),e()?h(t()):r()?p(S.keyCode===jl.DELETE):g()):S.key.length===1&&!(S.metaKey||S.ctrlKey)&&(v.contentEditable=!1,r()?p(S.keyCode===jl.DELETE):(S.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function _(S){n()&&(v.contentEditable=!1,r()?p():(S.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}return v.addEventListener("beforeinput",k),v.addEventListener("keydown",y),v.addEventListener("compositionstart",_),()=>{v.removeEventListener("beforeinput",k),v.removeEventListener("keydown",y),v.removeEventListener("compositionstart",_)}},[])}var Pa=l(Y(),1),iB=l(Me(),1),rg=l(F(),1),yW=l(Q(),1);var pW=l(O(),1),hW=l(Y(),1),Gy=l(F(),1),ji=l(N(),1),gW=l(Ai(),1);function tg(){let{getBlockName:e}=(0,Gy.useSelect)(x),{getBlockType:t}=(0,Gy.useSelect)(hW.store),{createSuccessNotice:o}=(0,Gy.useDispatch)(gW.store);return(0,pW.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,ji.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,ji.sprintf)((0,ji.__)('Copied "%s" to clipboard.'),a):i=(0,ji.sprintf)((0,ji.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,ji.sprintf)((0,ji._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,ji.sprintf)((0,ji._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var kW=l(Me(),1),Ui=l(Y(),1);var bW=l(Me(),1);function gxe(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 bxe(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function og({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=gxe(o),o=bxe(o);let r=(0,bW.getFilesFromDataTransfer)(e);return r.length&&!kxe(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function kxe(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 O5=Symbol("requiresWrapperOnCopy");function nB(e,t,o){let r=t,[n]=t;if(n&&o.select(Ui.store).getBlockType(n.name)[O5]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(x),d=a(n.clientId),f=c(d);f&&(r=(0,Ui.createBlock)(f,u(d),r))}let i=(0,Ui.serialize)(r);e.clipboardData.setData("text/plain",vxe(i)),e.clipboardData.setData("text/html",i)}function vW(e,t){let{plainText:o,html:r,files:n}=og(e),i=[];if(n.length){let s=(0,Ui.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,Ui.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,Ui.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function vxe(e){return e=e.replace(/<br>/g,` |
| 49 |
`),(0,kW.__unstableStripHTML)(e).trim().replace(/\n\n+/g,` |
| 50 |
|
| 51 |
`)}function Wy(){let e=(0,rg.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,rg.useSelect)(x),{flashBlock:m,removeBlocks:h,replaceBlocks:p,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:v}=(0,rg.useDispatch)(x),k=tg();return(0,yW.useRefEffect)(y=>{function _(S){if(S.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:L}=S,{ownerDocument:T}=L;if(S.type==="copy"||S.type==="cut"?(0,iB.documentHasUncollapsedSelection)(T):(0,iB.documentHasSelection)(T)&&!T.activeElement.isContentEditable)return}let{activeElement:B}=S.target.ownerDocument;if(!y.contains(B))return;let R=c(),I=a()||s(),E=!I&&!R;if(S.type==="copy"||S.type==="cut")if(S.preventDefault(),C.length===1&&m(C[0]),E)b();else{k(S.type,C);let L;if(I)L=t(C);else{let[T,P]=u(),D=t(C.slice(1,C.length-1));L=[T,...D,P]}nB(S,L,e)}if(S.type==="cut")I&&!E?h(C):(S.target.ownerDocument.activeElement.contentEditable=!1,g());else if(S.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:L,mediaUpload:T}=n();if(S.clipboardData.getData("rich-text")==="true")return;let{plainText:D,html:j,files:H}=og(S),z=s(),U=[];if(H.length){if(!T){S.preventDefault();return}let ce=(0,Pa.getBlockTransforms)("from");U=H.reduce((te,ne)=>{let X=(0,Pa.findTransform)(ce,q=>q.type==="files"&&q.isMatch([ne]));return X&&te.push(X.transform([ne])),te},[]).flat()}else U=(0,Pa.pasteHandler)({HTML:j,plainText:D,mode:z?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:L});if(typeof U=="string")return;if(z){p(C,U,U.length-1,-1),S.preventDefault();return}if(!r()&&!(0,Pa.hasBlockSupport)(i(C[0]),"splitting",!1)&&!S.__deprecatedOnSplit)return;let[G]=C,W=f(G),J=[];for(let ce of U)if(d(ce.name,W))J.push(ce);else{let te=i(W),ne=ce.name!==te?(0,Pa.switchToBlockType)(ce,te):[ce];if(!ne)return;for(let X of ne)for(let q of X.innerBlocks)J.push(q)}v(J),S.preventDefault()}}return y.ownerDocument.addEventListener("copy",_),y.ownerDocument.addEventListener("cut",_),y.ownerDocument.addEventListener("paste",_),()=>{y.ownerDocument.removeEventListener("copy",_),y.ownerDocument.removeEventListener("cut",_),y.ownerDocument.removeEventListener("paste",_)}},[])}var ng=l(w(),1);function A5(){let[e,t,o]=KG(),r=(0,_W.useSelect)(n=>n(x).hasMultiSelection(),[]);return[e,(0,$y.useMergeRefs)([t,Wy(),mW(),iW(),cW(),dW(),$G(),oW(),qG(),QG(),(0,$y.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,SW.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function yxe({children:e,...t},o){let[r,n,i]=A5();return(0,ng.jsxs)(ng.Fragment,{children:[r,(0,ng.jsx)("div",{...t,ref:(0,$y.useMergeRefs)([n,o]),className:V(t.className,"block-editor-writing-flow"),children:e}),i]})}var sB=(0,xW.forwardRef)(yxe);var aB=null;function wW(){return aB||(aB=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},[]),aB)}var xn=l(O(),1),Ky=l(Q(),1);function CW({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function _xe(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function Sxe(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 xxe(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 BW({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,Ky.useResizeObserver)(),[s,{width:a,height:c}]=(0,Ky.useResizeObserver)(),u=(0,xn.useRef)(0),d=r!==1,f=(0,Ky.useReducedMotion)(),m=r==="auto-scaled",h=(0,xn.useRef)(!1),p=(0,xn.useRef)(null);(0,xn.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?CW({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,v=(0,xn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),k=(0,xn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,xn.useCallback)(()=>{let{scrollTop:C}=v.current,{scrollTop:B}=k.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",`${B}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(xxe(v.current,k.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),_=(0,xn.useCallback)(()=>{h.current=!1,p.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",k.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${k.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=k.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"),v.current=k.current},[t]),S=(0,xn.useRef)(!1);return(0,xn.useEffect)(()=>{let C=t&&S.current!==d;if(S.current=d,!!C&&(h.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),(0,xn.useEffect)(()=>{if(t&&(m&&v.current.scaleValue!==1&&(v.current.scaleValue=CW({frameSize:v.current.frameSize,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:a})),b<1&&(h.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`)),h.current))if(h.current=!1,p.current){p.current.reverse();let C=v.current,B=k.current;v.current=B,k.current=C}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=c,k.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},k.current.scrollHeight=_xe(v.current,k.current),k.current.scrollTop=Sxe(v.current,k.current),p.current=y(),f?_():p.current.onfinish=_},[y,_,f,m,b,e,t,i,a,c,o,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:n,containerResizeListener:s}}var Fs=l(w(),1);function PW(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 wxe(e){return(0,Ul.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];PW(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var EW=new WeakMap,Cxe=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function Bxe(e){let t=EW.get(e);if(t)return t;let o=`<!doctype html> |
| 52 |
<html> |
| 53 |
<head> |
| 54 |
<meta charset="utf-8"> |
| 55 |
<base href="${window.location.href}"> |
| 56 |
<style> |
| 57 |
html{ |
| 58 |
height: auto !important; |
| 59 |
min-height: 100%; |
| 60 |
} |
| 61 |
/* Lowest specificity to not override global styles */ |
| 62 |
:where(body) { |
| 63 |
margin: 0; |
| 64 |
/* Default background color in case zoom out mode background |
| 65 |
colors the html element */ |
| 66 |
background-color: white; |
| 67 |
} |
| 68 |
</style> |
| 69 |
${e.styles??""} |
| 70 |
${e.scripts??""} |
| 71 |
</head> |
| 72 |
<body> |
| 73 |
<script>document.currentScript.parentElement.remove()<\/script> |
| 74 |
</body> |
| 75 |
</html>`;return t=URL.createObjectURL(new Blob([o],{type:"text/html"})),EW.set(e,t),Cxe?.register(e,t),t}function Exe({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,TW.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,L5.useSelect)(P=>{let D=P(x).getSettings();return{resolvedAssets:D.__unstableResolvedAssets,isPreviewMode:D.isPreviewMode}},[]),[f,m]=(0,Sm.useState)(),[h,p]=(0,Sm.useState)([]),[g,b,v]=A5(),k=(0,Ul.useRefEffect)(P=>{let D;function j(G){G.preventDefault()}function H(G){G.target.tagName==="A"&&G.target.getAttribute("href")?.startsWith("#")&&(G.preventDefault(),D.defaultView.location.hash=G.target.getAttribute("href").slice(1))}let{ownerDocument:z}=P;p(Array.from(z.body.classList).filter(G=>G.startsWith("admin-color-")||G.startsWith("post-type-")||G==="wp-embed-responsive"));function U(){let{contentDocument:G}=P,{documentElement:W}=G;D=G,m(G),W.classList.add("block-editor-iframe__html"),G.dir=z.dir;for(let J of wW())G.getElementById(J.id)||(G.head.appendChild(J.cloneNode(!0)),d||console.warn(`${J.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,J));D.addEventListener("dragover",j,!1),D.addEventListener("drop",j,!1),D.addEventListener("click",H)}return P.addEventListener("load",U),()=>{m(void 0),P.removeEventListener("load",U),D?.removeEventListener("dragover",j),D?.removeEventListener("drop",j),D?.removeEventListener("click",H)}},[]),{contentResizeListener:y,containerResizeListener:_,isZoomedOut:S,scaleContainerWidth:C}=BW({scale:r,frameSize:parseInt(n),iframeDocument:f}),B=(0,Ul.useDisabled)({isDisabled:!i}),R=(0,Ul.useMergeRefs)([wxe(f),e,b,B]),I=(0,Ul.useRefEffect)(P=>P.ownerDocument.defaultView?(R(P),()=>R(null)):()=>{},[R]),E=Bxe(u),L=o>=0&&!d,T=(0,Fs.jsxs)(Fs.Fragment,{children:[L&&g,(0,Fs.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,Ul.useMergeRefs)([s,k]),tabIndex:o,src:E,title:a,onKeyDown:P=>{if(c.onKeyDown&&c.onKeyDown(P),P.currentTarget.ownerDocument!==P.target.ownerDocument){let{stopPropagation:D}=P.nativeEvent;P.nativeEvent.stopPropagation=()=>{},P.stopPropagation(),P.nativeEvent.stopPropagation=D,PW(P,window.KeyboardEvent,P.currentTarget)}},children:f&&(0,Sm.createPortal)((0,Fs.jsxs)("body",{ref:I,className:V("block-editor-iframe__body","editor-styles-wrapper",...h),children:[y,(0,Fs.jsx)(IW.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),L&&v]});return(0,Fs.jsxs)("div",{className:"block-editor-iframe__container",children:[_,(0,Fs.jsx)("div",{className:V("block-editor-iframe__scale-container",S&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":S&&`${C}px`},children:T})]})}function Txe(e,t){return(0,L5.useSelect)(r=>r(x).getSettings().__internalIsInitialized,[])?(0,Fs.jsx)(Exe,{...e,forwardedRef:t}):null}var ig=(0,Sm.forwardRef)(Txe);var xK=l(A(),1),fg=l(O(),1),wK=l(F(),1);var cB={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},Ixe=new Set(["combinator","comma"]);var Pxe=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(cB[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return cB[e]}};function Rxe(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 Oxe(e,t=cB){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 h=a.slice(u+f.length+1);h&&d.push(h),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],Ixe.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var Axe=/(['"])([^\\\n]+?)\1/g,Lxe=/\\./g;function N5(e,t=cB){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(Lxe,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(Axe,(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=Rxe(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=Oxe(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=Pxe(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*lB(e,t){switch(e.type){case"list":for(let o of e.list)yield*lB(o,e);break;case"complex":yield*lB(e.left,e),yield*lB(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function RW(e){let t;return Array.isArray(e)?t=e:t=[...lB(e)].map(([o])=>o),t.map(o=>o.content).join("")}var kK=l(X$(),1),vK=l(fB(),1),yK=l(eK(),1),_K=l(gK(),1),bK=new Map,SK=[{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 $we(e,t){let o=N5(t),r=o.findLastIndex(({content:s,type:a})=>SK.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=N5(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),RW(o)}function Kwe({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new kK.default([r&&(0,yK.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:SK.some(d=>a.startsWith(d.content))?$we(s,a):c}}),o&&(0,_K.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof vK.default?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i.message+` |
| 76 |
`+i.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i),null}}var Ywe=(e,t="",o)=>{let r=bK.get(t);return r||(r=new WeakMap,bK.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=Kwe(n,t,o),r.set(n,i)),i})},dg=Ywe;var Ju=l(w(),1);iu([su,th]);function qwe(e,t){return(0,fg.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=Et(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function Zwe({styles:e,scope:t,transformOptions:o}){let r=(0,wK.useSelect)(s=>M(s(x)).getStyleOverrides(),[]),[n,i]=(0,fg.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[dg(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,Ju.jsxs)(Ju.Fragment,{children:[(0,Ju.jsx)("style",{ref:qwe(n,t)}),n.map((s,a)=>(0,Ju.jsx)("style",{children:s},a)),(0,Ju.jsx)(xK.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 Hl=(0,fg.memo)(Zwe);var Hi=l(w(),1),Xwe=(0,TB.memo)(mg),gV=2e3,Qwe=[];function Jwe({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=Qwe}){e||(e=t);let[n,{height:i}]=(0,i_.useResizeObserver)(),{styles:s}=(0,CK.useSelect)(d=>({styles:d(x).getSettings().styles}),[]),a=(0,TB.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,Hi.jsx)(BK.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>gV?gV*c:void 0,minHeight:o},children:(0,Hi.jsxs)(ig,{contentRef:(0,i_.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:gV,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,Hi.jsx)(Hl,{styles:a}),n,(0,Hi.jsx)(Xwe,{renderAppender:!1})]})})}function EK(e){let[t,{width:o}]=(0,i_.useResizeObserver)();return(0,Hi.jsxs)(Hi.Fragment,{children:[(0,Hi.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Hi.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Hi.jsx)(Jwe,{...e,containerWidth:o})})]})}var pg=l(O(),1),RK=l(IK(),1),PK=(0,RK.createQueue)();function OK({children:e,placeholder:t}){let[o,r]=(0,pg.useState)(!1);return(0,pg.useEffect)(()=>{let n={};return PK.add(n,()=>{(0,pg.flushSync)(()=>{r(!0)})}),()=>{PK.cancel(n)}},[]),o?e:t}var Em=l(w(),1),eCe=[];function tCe({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=eCe,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,bV.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,bV.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,kV.useSelect)(u=>u(x).getSettings(),[]),a=(0,Bm.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Bm.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,Em.jsx)(Jh,{value:c,settings:a,children:(0,Em.jsx)(EK,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var AK=(0,Bm.memo)(tCe);AK.Async=OK;var wn=AK;function LK({blocks:e,props:t={},layout:o}){let r=(0,kV.useSelect)(u=>u(x).getSettings(),[]),n=(0,Bm.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,IB.useDisabled)(),s=(0,IB.useMergeRefs)([t.ref,i]),a=(0,Bm.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,Em.jsxs)(Jh,{value:a,settings:n,children:[(0,Em.jsx)(Hl,{}),(0,Em.jsx)(s_,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:V(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var ed=l(w(),1);function oCe({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,hg.isReusableBlock)(e),c=(0,NK.useMemo)(()=>s?(0,hg.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,hg.createBlock)(t,i),[t,s,i]),u=144,d=280,f=s?.viewportWidth??500,m=d/f,h=m!==0&&m<1&&u?u/m:u;return(0,ed.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,ed.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,ed.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,ed.jsx)(wn,{blocks:c,viewportWidth:f,minHeight:u,additionalStyles:[{css:` |
| 77 |
body { |
| 78 |
padding: 24px; |
| 79 |
min-height:${Math.round(h)}px; |
| 80 |
display:flex; |
| 81 |
align-items:center; |
| 82 |
} |
| 83 |
.is-root-container { width: 100%; } |
| 84 |
`}]})}):(0,ed.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,DK.__)("No preview available.")})}),!a&&(0,ed.jsx)(Uy,{title:o,icon:r,description:n})]})}var MK=oCe;var Sg=l(N(),1),$l=l(O(),1),CV=l(Q(),1);var XK=l(Y(),1),QK=l(Q(),1);var _g=l(O(),1),td=l(Y(),1),qK=l(A(),1),a_=l(tt(),1);var WK=l(A(),1),$K=l(O(),1);var gg=l(O(),1),VK=l(N(),1),FK=l(er(),1),zK=l(w(),1);function rCe(e,t){let[o,r]=(0,gg.useState)(!1);return(0,gg.useEffect)(()=>{o&&(0,FK.speak)((0,VK.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,zK.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var vV=(0,gg.forwardRef)(rCe);var jK=l(O(),1),UK=l(A(),1),HK=l(w(),1);function nCe(e,t){return(0,HK.jsx)(UK.Composite.Group,{role:"presentation",ref:t,...e})}var yV=(0,jK.forwardRef)(nCe);var RB=l(A(),1),GK=l(O(),1),PB=l(w(),1);function iCe({isFirst:e,as:t,children:o,...r},n){return(0,PB.jsx)(RB.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,PB.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,PB.jsx)(RB.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var _V=(0,GK.forwardRef)(iCe);var SV=l(w(),1);function sCe({key:e,children:t}){return(0,SV.jsx)($K.Fragment,{children:t},e)}function aCe({children:e}){return(0,SV.jsx)(WK.Composite,{focusShift:!0,focusWrap:"horizontal",render:sCe,children:e})}var bg=aCe;var KK=l(A(),1),AB=l(Y(),1),LB=l(F(),1),YK=l(O(),1);var vg=l(N(),1),kg=l(A(),1);var js=l(w(),1);function OB({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,vg.__)("Pattern");return(0,js.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,js.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,js.jsxs)(kg.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,js.jsx)(kg.FlexItem,{children:t?(0,js.jsx)(Oe,{icon:t}):n||(0,vg.sprintf)((0,vg._n)("%d block","%d blocks",e),e)}),(0,js.jsx)(kg.FlexItem,{children:(0,js.jsx)(Oe,{icon:xv})}),r&&(0,js.jsx)(kg.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,js.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var xV=l(w(),1),lCe=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,LB.useSelect)(f=>i&&f(AB.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=M((0,LB.useDispatch)(x)),u=(0,YK.useMemo)(()=>n?.type===Dt.user&&n?.syncStatus!=="unsynced"?[(0,AB.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,xV.jsx)(KK.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:d},onDragStart:f=>{a();let m=new Set;for(let h of d){let p=`wp-block:${h.name}`;m.has(p)||(f.dataTransfer.items.add("",p),m.add(p))}},onDragEnd:()=>{c()},__experimentalDragComponent:(0,xV.jsx)(OB,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},yg=lCe;var Gl=l(w(),1);function cCe({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,_g.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,_g.useMemo)(()=>[(0,td.createBlock)(o.name,o.initialAttributes,(0,td.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,td.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,td.isTemplatePart)(o);return(0,Gl.jsx)(yg,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:h})=>(0,Gl.jsx)("div",{className:V("block-editor-block-types-list__list-item",{"is-synced":d}),draggable:f,onDragStart:p=>{a.current=!0,m&&(n(null),m(p))},onDragEnd:p=>{a.current=!1,h&&h(p)},children:(0,Gl.jsxs)(_V,{isFirst:t,className:V("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:p=>{p.preventDefault(),r(o,(0,a_.isAppleOS)()?p.metaKey:p.ctrlKey),n(null)},onKeyDown:p=>{let{keyCode:g}=p;g===a_.ENTER&&(p.preventDefault(),r(o,(0,a_.isAppleOS)()?p.metaKey:p.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,Gl.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,Gl.jsx)(Oe,{icon:o.icon,showColors:!0})}),(0,Gl.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,Gl.jsx)(qK.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var ZK=(0,_g.memo)(cCe);var l_=l(w(),1);function uCe(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 JK({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,QK.useInstanceId)(JK,s);return(0,l_.jsxs)(vV,{className:s,"aria-label":n,children:[uCe(e,3).map((c,u)=>(0,l_.jsx)(yV,{children:c.map((d,f)=>(0,l_.jsx)(ZK,{item:d,className:(0,XK.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var Tm=JK;var eY=l(A(),1),Wl=l(w(),1);function dCe({title:e,icon:t,children:o}){return(0,Wl.jsxs)(Wl.Fragment,{children:[(0,Wl.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,Wl.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,Wl.jsx)(eY.Icon,{icon:t})]}),(0,Wl.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var od=dCe;var tY=l(N(),1),wV=l(w(),1);function fCe(){return(0,wV.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,wV.jsx)("p",{children:(0,tY.__)("No results found.")})})}var Us=fCe;var Go=l(w(),1),mCe=e=>e.name.split("/")[0],pCe=6,hCe=[];function oY({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,$l.useMemo)(()=>_a(e,"frecency","desc").slice(0,pCe),[e]),c=(0,$l.useMemo)(()=>e.filter(p=>!p.category),[e]),u=(0,$l.useMemo)(()=>{let p={...t};return Object.keys(t).forEach(g=>{p[g]=e.filter(b=>mCe(b)===g),p[g].length===0&&delete p[g]}),p},[e,t]);(0,$l.useEffect)(()=>()=>n(null),[]);let d=(0,CV.useAsyncList)(o),f=o.length===d.length,m=(0,$l.useMemo)(()=>Object.entries(t),[t]),h=(0,CV.useAsyncList)(f?m:hCe);return(0,Go.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,Go.jsx)(od,{title:(0,Sg._x)("Most used","blocks"),children:(0,Go.jsx)(Tm,{items:a,onSelect:r,onHover:n,label:(0,Sg._x)("Most used","blocks")})}),d.map(p=>{let g=e.filter(b=>b.category===p.slug);return!g||!g.length?null:(0,Go.jsx)(od,{title:p.title,icon:p.icon,children:(0,Go.jsx)(Tm,{items:g,onSelect:r,onHover:n,label:p.title})},p.slug)}),f&&c.length>0&&(0,Go.jsx)(od,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Sg.__)("Uncategorized"),children:(0,Go.jsx)(Tm,{items:c,onSelect:r,onHover:n,label:(0,Sg.__)("Uncategorized")})}),h.map(([p,g])=>{let b=u[p];return!b||!b.length?null:(0,Go.jsx)(od,{title:g.title,icon:g.icon,children:(0,Go.jsx)(Tm,{items:b,onSelect:r,onHover:n,label:g.title})},p)})]})}function gCe({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=Pu(e,t);if(!i.length)return(0,Go.jsx)(Us,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,Go.jsx)(bg,{children:(0,Go.jsxs)("div",{ref:n,children:[!!u.length&&(0,Go.jsx)(Go.Fragment,{children:(0,Go.jsx)(oY,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,Go.jsx)(oY,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var rY=(0,$l.forwardRef)(gCe);var wY=l(O(),1),CY=l(Q(),1),BY=l(A(),1),EY=l(N(),1);var kY=l(A(),1),RV=l(O(),1),vY=l(N(),1);var NB=l(A(),1),BV=l(N(),1),Kl=l(w(),1);function bCe({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,Kl.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,Kl.jsx)(NB.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function kCe({searchValue:e,setSearchValue:t}){return(0,Kl.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,Kl.jsx)(NB.SearchControl,{onChange:t,value:e,label:(0,BV.__)("Search"),placeholder:(0,BV.__)("Search")})})}function vCe({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,Kl.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,Kl.jsx)(kCe,{searchValue:r,setSearchValue:n}),!r&&(0,Kl.jsx)(bCe,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var nY=vCe;var ql=l(O(),1),Bg=l(N(),1),mY=l(Q(),1),pY=l(A(),1),hY=l(er(),1);var iY=l(Y(),1),Oa=l(O(),1),Yl=l(A(),1),sY=l(Q(),1),aY=l(N(),1);var Cn=l(A(),1),Gi=l(N(),1),Ar=l(w(),1);function DB({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,Ar.jsxs)(Cn.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,Ar.jsx)(Cn.__experimentalText,{variant:"muted",children:(0,Gi.sprintf)((0,Gi._n)("%s item","%s items",r),r)}),t>1&&(0,Ar.jsxs)(Cn.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,Ar.jsxs)(Cn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,Ar.jsx)(Cn.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,Gi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Ar.jsx)("span",{children:"\xAB"})}),(0,Ar.jsx)(Cn.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,Gi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Ar.jsx)("span",{children:"\u2039"})})]}),(0,Ar.jsx)(Cn.__experimentalText,{variant:"muted",children:(0,Gi.sprintf)((0,Gi._x)("%1$s of %2$s","paging"),e,t)}),(0,Ar.jsxs)(Cn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,Ar.jsx)(Cn.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,Gi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Ar.jsx)("span",{children:"\u203A"})}),(0,Ar.jsx)(Cn.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,Gi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Ar.jsx)("span",{children:"\xBB"})})]})]})]})}var qt=l(w(),1),yCe=({showTooltip:e,title:t,children:o})=>e?(0,qt.jsx)(Yl.Tooltip,{text:t,children:o}):(0,qt.jsx)(qt.Fragment,{children:o});function lY({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,Oa.useState)(!1),{blocks:d,viewportWidth:f}=o,h=`block-editor-block-patterns-list__item-description-${(0,sY.useInstanceId)(lY)}`,p=o.type===Dt.user,g=(0,Oa.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let v=(0,iY.cloneBlock)(b);return v.attributes.metadata?.categories?.includes(s)&&(v.attributes.metadata.categories=[s]),v}),[d,t,s]);return(0,qt.jsx)(yg,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,qt.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:y=>{u(!0),v&&(n?.(null),v(y))},onDragEnd:y=>{u(!1),k&&k(y)},children:(0,qt.jsx)(yCe,{showTooltip:i&&!p,title:o.title,children:(0,qt.jsxs)(Yl.Composite.Item,{render:(0,qt.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?h:void 0,className:V("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===Dt.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,qt.jsx)(wn.Async,{placeholder:(0,qt.jsx)(_Ce,{}),children:(0,qt.jsx)(wn,{blocks:d,viewportWidth:f})}),(!i||p)&&(0,qt.jsxs)(Yl.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[p&&!o.syncStatus&&(0,qt.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,qt.jsx)(Be,{className:"block-editor-patterns__pattern-icon",icon:Pi})}),(0,qt.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,qt.jsx)(Yl.VisuallyHidden,{id:h,children:o.description})]})})})})}function _Ce(){return(0,qt.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function SCe({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,aY.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,Oa.useState)(void 0),[m,h]=(0,Oa.useState)(null);(0,Oa.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let p=(g,b)=>{h(g.name),r(g,b)};return(0,qt.jsxs)(Yl.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,qt.jsx)(lY,{id:g.name,pattern:g,onClick:p,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,qt.jsx)(DB,{...c})]})}var Aa=(0,Oa.forwardRef)(SCe);var Im=l(F(),1),uY=l(Y(),1),MB=l(N(),1),dY=l(er(),1),EV=l(O(),1);function cY({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(x).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(x).getBlockIndex(n[i+1])+1:r.select(x).getBlockOrder(o).length}function xCe({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,Im.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=M((0,Im.useSelect)(x)),{destinationRootClientId:f,destinationIndex:m}=(0,Im.useSelect)(_=>{let{getSelectedBlockClientId:S,getBlockRootClientId:C,getBlockIndex:B,getBlockOrder:R,getInsertionPoint:I}=M(_(x)),E=S(),L=e,T,P=I();return t!==void 0?T=t:P&&P.hasOwnProperty("index")?(L=P?.rootClientId?P.rootClientId:e,T=P.index):o?T=B(o):!r&&E?(L=C(E),T=B(E)+1):T=R(L).length,{destinationRootClientId:L,destinationIndex:T}},[e,t,o,r]),{replaceBlocks:h,insertBlocks:p,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:v}=M((0,Im.useDispatch)(x)),k=(0,EV.useCallback)((_,S,C=!1,B)=>{(C||i||s)&&v(null);let R=c();!r&&R&&(0,uY.isUnmodifiedDefaultBlock)(R,"content")?h(R.clientId,_,null,i||C?0:null,S):p(_,r||B===void 0?m:cY({destinationRootClientId:f,destinationIndex:m,rootClientId:B,registry:a}),r||B===void 0?f:B,s,i||C?0:null,S);let I=Array.isArray(_)?_.length:1,E=(0,MB.sprintf)((0,MB._n)("%d block added.","%d blocks added.",I),I);(0,dY.speak)(E),n&&n(_)},[r,c,h,p,f,m,n,i,s,v,a]),y=(0,EV.useCallback)(_=>{if(_&&!d()){let S=u(_.name,f);S!==null&&g(S,cY({destinationRootClientId:f,destinationIndex:m,rootClientId:S,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,k,y]}var rd=xCe;var xg=l(O(),1),VB=l(Y(),1),wg=l(F(),1),FB=l(N(),1),fY=l(Ai(),1);var wCe=(e,t,o,r)=>{let n=(0,xg.useMemo)(()=>({[xu]:!!r}),[r]),i=(0,wg.useSelect)(p=>{let{getSettings:g}=M(p(x));return g()[tx]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:c}=(0,wg.useSelect)(p=>{let{getSettings:g,__experimentalGetAllowedPatterns:b}=M(p(x)),{__experimentalUserPatternCategories:v,__experimentalBlockPatternCategories:k}=g();return{patterns:b(t,n),userPatternCategories:v,patternCategories:k}},[t,n]),u=(0,xg.useMemo)(()=>a.filter(p=>!(p.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=M((0,wg.useSelect)(x)),f=(0,xg.useMemo)(()=>{let p=[...s];return c?.forEach(g=>{p.find(b=>b.name===g.name)||p.push(g)}),p},[s,c]),{createSuccessNotice:m}=(0,wg.useDispatch)(fY.store),h=(0,xg.useCallback)((p,g)=>{let b=r?t:d(p,t);if(b===null)return;let v=p.type===Dt.user&&p.syncStatus!=="unsynced"?[(0,VB.createBlock)("core/block",{ref:p.id})]:g;e((v??[]).map(k=>{let y=(0,VB.cloneBlock)(k);return y.attributes.metadata?.categories?.includes(o)&&(y.attributes.metadata.categories=[o]),y}),p.name,!1,b),m((0,FB.sprintf)((0,FB.__)('Block pattern "%s" inserted.'),p.title),{type:"snackbar",id:"inserter-notice"})},[m,e,o,t,d,r]);return[u,f,h]},nd=wCe;var Cg=l(O(),1),TV=l(Q(),1),IV=l(Me(),1),zB=20;function jB(e,t,o,r=""){let[n,i]=(0,Cg.useState)(1),s=(0,TV.usePrevious)(t),a=(0,TV.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,Cg.useMemo)(()=>e.slice(u*zB,u*zB+zB),[u,e]),f=Math.ceil(e.length/zB),m=h=>{(0,IV.getScrollContainer)(o?.current)?.scrollTo(0,0),i(h)};return(0,Cg.useEffect)(function(){(0,IV.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var Hs=l(w(),1);function CCe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,Hs.jsx)(pY.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,Bg.sprintf)((0,Bg._n)("%d pattern found","%d patterns found",t),t)}):null}function BCe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,ql.useRef)(),s=(0,mY.useDebounce)(hY.speak,500),[a,c]=rd({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=nd(c,a,t),f=(0,ql.useMemo)(()=>o.map(v=>v.name),[o]),m=(0,ql.useMemo)(()=>{let v=u.filter(k=>{if(t===im.name||t===El.name&&k.type===Dt.user||t===gh.name&&k.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let y=k.categories?.some(_=>f.includes(_))??!1;return!k.categories?.length||!y}return k.categories?.includes(t)});return e?ly(v,e):v},[e,u,t,f]);(0,ql.useEffect)(()=>{if(!e)return;let v=m.length,k=(0,Bg.sprintf)((0,Bg._n)("%d result found.","%d results found.",v),v);s(k)},[e,s,m.length]);let h=jB(m,t,i),[p,g]=(0,ql.useState)(e);e!==p&&(g(e),h.changePage(1));let b=!!m?.length;return(0,Hs.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,Hs.jsx)(CCe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,Hs.jsx)(bg,{children:b&&(0,Hs.jsxs)(Hs.Fragment,{children:[(0,Hs.jsx)(Aa,{blockPatterns:h.categoryPatterns,onClickPattern:(v,k)=>{d(v,k),n()},isDraggable:!1}),(0,Hs.jsx)(DB,{...h})]})})]})}var gY=BCe;var PV=l(O(),1),Eg=l(N(),1),bY=l(er(),1);function ECe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function Tg(e,t="all"){let[o,r]=nd(void 0,e),n=(0,PV.useMemo)(()=>t==="all"?o:o.filter(s=>!iC(s,t)),[t,o]);return(0,PV.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=>!ECe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,Eg._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(gh),n.some(a=>a.type===Dt.user)&&s.unshift(El),n.length>0&&s.unshift({name:im.name,label:im.label}),(0,bY.speak)((0,Eg.sprintf)((0,Eg._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var Pm=l(w(),1);function TCe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,RV.useState)(""),[i,s]=(0,RV.useState)(e?.name),a=Tg(t);return(0,Pm.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,Pm.jsx)(nY,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,Pm.jsx)(gY,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function ICe({onModalClose:e,...t}){return(0,Pm.jsx)(kY.Modal,{title:(0,vY.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,Pm.jsx)(TCe,{onModalClose:e,...t})})}var yY=ICe;var Ig=l(N(),1),Vt=l(A(),1);var or=l(w(),1);function PCe({title:e}){return(0,or.jsx)(Vt.__experimentalVStack,{spacing:0,children:(0,or.jsx)(Vt.__experimentalView,{children:(0,or.jsx)(Vt.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,or.jsxs)(Vt.__experimentalHStack,{spacing:2,children:[(0,or.jsx)(Vt.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,Ig.isRTL)()?Uo:Gr,size:"small",label:(0,Ig.__)("Back")}),(0,or.jsx)(Vt.__experimentalSpacer,{children:(0,or.jsx)(Vt.__experimentalHeading,{level:5,children:e})})]})})})})}function UB({categories:e,children:t}){return(0,or.jsxs)(Vt.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,or.jsx)(Vt.Navigator.Screen,{path:"/",children:(0,or.jsx)(Vt.__experimentalItemGroup,{children:e.map(o=>(0,or.jsx)(Vt.Navigator.Button,{path:`/category/${o.name}`,as:Vt.__experimentalItem,isAction:!0,children:(0,or.jsxs)(Vt.__experimentalHStack,{children:[(0,or.jsx)(Vt.FlexBlock,{children:o.label}),(0,or.jsx)(Be,{icon:(0,Ig.isRTL)()?Gr:Uo})]})},o.name))})}),e.map(o=>(0,or.jsxs)(Vt.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,or.jsx)(PCe,{title:(0,Ig.__)("Back")}),t(o)]},o.name))]})}var Wi=l(O(),1),OV=l(N(),1),Gs=l(A(),1);var En=l(A(),1),Bn=l(N(),1);var HB=l(O(),1);var _r=l(w(),1),_Y=e=>e!=="all"&&e!=="user",RCe=e=>e.name===El.name,OCe=[{value:"all",label:(0,Bn._x)("All","patterns")},{value:Dt.directory,label:(0,Bn.__)("Pattern Directory")},{value:Dt.theme,label:(0,Bn.__)("Theme & Plugins")},{value:Dt.user,label:(0,Bn.__)("User")}];function SY({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===El.name?Dt.user:r,a=_Y(s),c=RCe(i),u=(0,HB.useMemo)(()=>[{value:"all",label:(0,Bn._x)("All","patterns")},{value:Zv.full,label:(0,Bn._x)("Synced","patterns"),disabled:a},{value:Zv.unsynced,label:(0,Bn._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),_Y(f)&&e("all")}return(0,_r.jsx)(_r.Fragment,{children:(0,_r.jsx)(En.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,Bn.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,_r.jsx)(Be,{icon:(0,_r.jsx)(En.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,_r.jsx)(En.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,_r.jsxs)(_r.Fragment,{children:[!c&&(0,_r.jsx)(En.MenuGroup,{label:(0,Bn.__)("Source"),children:(0,_r.jsx)(En.MenuItemsChoice,{choices:OCe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,_r.jsx)(En.MenuGroup,{label:(0,Bn.__)("Type"),children:(0,_r.jsx)(En.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,_r.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,HB.createInterpolateElement)((0,Bn.__)("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,_r.jsx)(En.ExternalLink,{href:(0,Bn.__)("https://wordpress.org/patterns/")})})})]})})})}var Xr=l(w(),1),ACe=()=>{};function GB({rootClientId:e,onInsert:t,onHover:o=ACe,category:r,showTitlesAsTooltip:n}){let[i,,s]=nd(t,e,r?.name),[a,c]=(0,Wi.useState)("all"),[u,d]=(0,Wi.useState)("all"),f=Tg(e,u),m=(0,Wi.useRef)(),h=(0,Wi.useMemo)(()=>i.filter(k=>iC(k,u,a)?!1:r.name===im.name||r.name===El.name&&k.type===Dt.user||r.name===gh.name&&k.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?k.categories?!k.categories.some(y=>f.some(_=>_.name===y)):!0:k.categories?.includes(r.name)),[i,f,r.name,u,a]),p=jB(h,r,m),{changePage:g}=p;(0,Wi.useEffect)(()=>()=>o(null),[]);let b=(0,Wi.useCallback)(k=>{c(k),g(1)},[c,g]),v=(0,Wi.useCallback)(k=>{d(k),g(1)},[d,g]);return(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsxs)(Gs.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,Xr.jsxs)(Gs.__experimentalHStack,{children:[(0,Xr.jsx)(Gs.FlexBlock,{children:(0,Xr.jsx)(Gs.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,Xr.jsx)(SY,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:v,scrollContainerRef:m,category:r})]}),!h.length&&(0,Xr.jsx)(Gs.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,OV.__)("No results found")})]}),h.length>0&&(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)(Gs.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,OV.__)("Drag and drop patterns into the canvas.")}),(0,Xr.jsx)(Aa,{ref:m,blockPatterns:p.categoryPatterns,onClickPattern:s,onHover:o,label:r.label,orientation:"vertical",category:r.name,isDraggable:!0,showTitlesAsTooltip:n,patternFilter:u,pagingProps:p})]})]})}var $B=l(Q(),1),KB=l(A(),1),xY=l(O(),1);var Rm=l(w(),1),{Tabs:WB}=M(KB.privateApis);function LCe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,$B.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,$B.usePrevious)(t),c=t?t.name:null,[u,d]=(0,xY.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,Rm.jsxs)(WB,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(h=>h.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,Rm.jsx)(WB.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,Rm.jsx)(WB.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,Rm.jsx)(WB.TabPanel,{tabId:m.name,focusable:!1,children:(0,Rm.jsx)(KB.__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 YB=LCe;var Zn=l(w(),1);function NCe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,wY.useState)(!1),a=Tg(r),c=(0,CY.useViewportMatch)("medium","<");return a.length?(0,Zn.jsxs)(Zn.Fragment,{children:[!c&&(0,Zn.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,Zn.jsx)(YB,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,Zn.jsx)(BY.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,EY.__)("Explore all patterns")})]}),c&&(0,Zn.jsx)(UB,{categories:a,children:u=>(0,Zn.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,Zn.jsx)(GB,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,Zn.jsx)(yY,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,Zn.jsx)(Us,{})}var TY=NCe;var WY=l(N(),1),$Y=l(Q(),1),KY=l(A(),1),XB=l(O(),1);var ZB=l(A(),1),jY=l(N(),1),UY=l(Q(),1);var DY=l(A(),1),MY=l(N(),1);var Ft=l(A(),1),Xn=l(N(),1),La=l(O(),1),LV=l(Y(),1);var c_=l(F(),1),OY=l(Ai(),1),AY=l(AV(),1),LY=l(Gn(),1);var PY=l(Y(),1),RY=l(w(),1),DCe={image:"img",video:"video",audio:"audio"};function qB(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=DCe[t],s=(0,RY.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,PY.createBlock)(`core/${t}`,o),s]}var ut=l(w(),1),MCe=["image"],VCe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function FCe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,ut.jsx)(Ft.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,Xn.__)("Options"),popoverProps:VCe,icon:Bs,children:()=>(0,ut.jsx)(Ft.MenuGroup,{children:(0,ut.jsx)(Ft.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:bL,children:(0,Xn.sprintf)((0,Xn.__)("Report %s"),e.mediaType)})})})}function zCe({onClose:e,onSubmit:t}){return(0,ut.jsxs)(Ft.Modal,{title:(0,Xn.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,ut.jsxs)(Ft.__experimentalVStack,{spacing:3,children:[(0,ut.jsx)("p",{children:(0,Xn.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,ut.jsx)("p",{children:(0,Xn.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,ut.jsxs)(Ft.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ut.jsx)(Ft.FlexItem,{children:(0,ut.jsx)(Ft.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,Xn.__)("Cancel")})}),(0,ut.jsx)(Ft.FlexItem,{children:(0,ut.jsx)(Ft.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,Xn.__)("Insert")})})]})]})}function NY({media:e,onClick:t,category:o}){let[r,n]=(0,La.useState)(!1),[i,s]=(0,La.useState)(!1),[a,c]=(0,La.useState)(!1),[u,d]=(0,La.useMemo)(()=>qB(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,c_.useDispatch)(OY.store),{getSettings:h,getBlock:p}=(0,c_.useSelect)(x),{updateBlockAttributes:g}=(0,c_.useDispatch)(x),b=(0,La.useCallback)(_=>{if(a)return;let S=h(),C=(0,LV.cloneBlock)(_),{id:B,url:R,caption:I}=C.attributes;if(!B&&!S.mediaUpload){n(!0);return}if(B){t(C);return}c(!0),window.fetch(R).then(E=>E.blob()).then(E=>{let L=(0,LY.getFilename)(R)||"image.jpg",T=new File([E],L,{type:E.type});S.mediaUpload({filesList:[T],additionalData:{caption:I},onFileChange([P]){(0,AY.isBlobURL)(P.url)||(p(C.clientId)?g(C.clientId,{...C.attributes,id:P.id,url:P.url}):(t({...C,attributes:{...C.attributes,id:P.id,url:P.url}}),m((0,Xn.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:MCe,onError(P){f(P,{type:"snackbar",id:"inserter-notice"}),c(!1)}})}).catch(()=>{n(!0),c(!1)})},[a,h,t,m,g,f,p]),v=typeof e.title=="string"?e.title:e.title?.rendered||(0,Xn.__)("no title"),k=(0,La.useCallback)(()=>s(!0),[]),y=(0,La.useCallback)(()=>s(!1),[]);return(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(yg,{isEnabled:!0,blocks:[u],children:({draggable:_,onDragStart:S,onDragEnd:C})=>(0,ut.jsx)("div",{className:V("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:_,onDragStart:S,onDragEnd:C,children:(0,ut.jsxs)("div",{onMouseEnter:k,onMouseLeave:y,children:[(0,ut.jsx)(Ft.Tooltip,{text:v,children:(0,ut.jsx)(Ft.Composite.Item,{render:(0,ut.jsx)("div",{"aria-label":v,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,ut.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,ut.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,ut.jsx)(Ft.Spinner,{})})]})})}),!a&&(0,ut.jsx)(FCe,{category:o,media:e})]})})}),r&&(0,ut.jsx)(zCe,{onClose:()=>n(!1),onSubmit:()=>{t((0,LV.cloneBlock)(u)),m((0,Xn.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var NV=l(w(),1);function jCe({mediaList:e,category:t,onClick:o,label:r=(0,MY.__)("Media List")}){return(0,NV.jsx)(DY.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,NV.jsx)(NY,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var VY=jCe;var Zl=l(O(),1),DV=l(F(),1);function FY(e,t={}){let[o,r]=(0,Zl.useState)(),[n,i]=(0,Zl.useState)(!1),s=(0,Zl.useRef)();return(0,Zl.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 zY(e){let[t,o]=(0,Zl.useState)([]),r=(0,DV.useSelect)(a=>M(a(x)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,DV.useSelect)(a=>{let{canInsertBlockType:c}=a(x);return{canInsertImage:c("core/image",e),canInsertVideo:c("core/video",e),canInsertAudio:c("core/audio",e)}},[e]);return(0,Zl.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 id=l(w(),1),UCe=10;function u_({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,UY.useDebouncedInput)(),{mediaList:s,isLoading:a}=FY(o,{per_page:i?20:UCe,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,jY.__)("Search");return(0,id.jsxs)("div",{className:c,children:[(0,id.jsx)(ZB.SearchControl,{className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,id.jsx)("div",{className:`${c}-spinner`,children:(0,id.jsx)(ZB.Spinner,{})}),!a&&!s?.length&&(0,id.jsx)(Us,{}),!a&&!!s?.length&&(0,id.jsx)(VY,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var HY=l(F(),1);function HCe({fallback:e=null,children:t}){return(0,HY.useSelect)(r=>{let{getSettings:n}=r(x);return!!n().mediaUpload},[])?t:e}var Ws=HCe;var GY=l(A(),1),GCe=()=>null,sd=(0,GY.withFilters)("editor.MediaUpload")(GCe);var Qn=l(w(),1),WCe=["image","video","audio"];function $Ce({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=zY(e),s=(0,$Y.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,XB.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=qB(d,f);r(m)},[r]),u=(0,XB.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,Qn.jsxs)(Qn.Fragment,{children:[!s&&(0,Qn.jsxs)("div",{className:`${a}-container`,children:[(0,Qn.jsx)(YB,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,Qn.jsx)(Ws,{children:(0,Qn.jsx)(sd,{multiple:!1,onSelect:c,allowedTypes:WCe,render:({open:d})=>(0,Qn.jsx)(KY.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,WY.__)("Open Media Library")})})})]}),s&&(0,Qn.jsx)(UB,{categories:u,children:d=>(0,Qn.jsx)(u_,{onInsert:r,rootClientId:e,category:d})})]}):(0,Qn.jsx)(Us,{})}var MV=$Ce;var d_=l(O(),1),ad=l(N(),1),VV=l(A(),1),JB=l(Q(),1),ZY=l(er(),1),XY=l(F(),1);var YY=l(A(),1),{Fill:qY,Slot:KCe}=(0,YY.createSlotFill)("__unstableInserterMenuExtension");qY.Slot=KCe;var QB=qY;var Tn=l(w(),1),YCe=9,qCe=[];function ZCe({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:h,selectBlockOnInsert:p,isQuick:g}){let b=(0,JB.useDebounce)(ZY.speak,500),{prioritizedBlocks:v}=(0,XY.useSelect)(z=>({prioritizedBlocks:z(x).getBlockListSettings(n)?.prioritizedInserterBlocks||qCe}),[n]),[k,y]=rd({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:p}),[_,S,C,B]=Pu(k,y,g),[R,,I]=nd(y,k,void 0,g),E=(0,d_.useMemo)(()=>{if(c===0)return[];let z=ly(R,e);return c!==void 0?z.slice(0,c):z},[e,R,c]),L=u;h&&E.length>2&&(L=0);let T=(0,d_.useMemo)(()=>{if(L===0)return[];let z=_.filter(W=>W.name!=="core/block"),U=_a(z,"frecency","desc");!e&&v.length&&(U=IC(U,v));let G=BC(U,S,C,e);return L!==void 0?G.slice(0,L):G},[e,_,S,C,L,v]);(0,d_.useEffect)(()=>{if(!e)return;let z=T.length+E.length,U=(0,ad.sprintf)((0,ad._n)("%d result found.","%d results found.",z),z);b(U)},[e,b,T,E]);let P=(0,JB.useAsyncList)(T,{step:YCe}),D=T.length>0||E.length>0,j=!!T.length&&(0,Tn.jsx)(od,{title:(0,Tn.jsx)(VV.VisuallyHidden,{children:(0,ad.__)("Blocks")}),children:(0,Tn.jsx)(Tm,{items:P,onSelect:B,onHover:o,label:(0,ad.__)("Blocks"),isDraggable:f})}),H=!!E.length&&(0,Tn.jsx)(od,{title:(0,Tn.jsx)(VV.VisuallyHidden,{children:(0,ad.__)("Block patterns")}),children:(0,Tn.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,Tn.jsx)(Aa,{blockPatterns:E,onClickPattern:I,onHover:r,isDraggable:f})})});return(0,Tn.jsxs)(bg,{children:[!d&&!D&&(0,Tn.jsx)(Us,{}),h?H:j,!!T.length&&!!E.length&&(0,Tn.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?j:H,d&&(0,Tn.jsx)(QB.Slot,{fillProps:{onSelect:B,onHover:o,filterValue:e,hasItems:D,rootClientId:k},children:z=>z.length?z:D?null:(0,Tn.jsx)(Us,{})})]})}var eE=ZCe;var oE=l(A(),1),QY=l(O(),1);var Xl=l(w(),1),{Tabs:tE}=M(oE.privateApis);function XCe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,Xl.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,Xl.jsxs)(tE,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,Xl.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,Xl.jsx)(oE.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:Gf,label:i,onClick:()=>t(),size:"compact"}),(0,Xl.jsx)(tE.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,Xl.jsx)(tE.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,Xl.jsx)(tE.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var rE=(0,QY.forwardRef)(XCe);var nE=l(F(),1),Pg=l(O(),1);function f_(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=M((0,nE.useDispatch)(x)),{isZoomedOut:r,isZoomOut:n}=(0,nE.useSelect)(a=>{let{isZoomOut:c}=M(a(x));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,Pg.useRef)(!1),s=(0,Pg.useRef)(e);(0,Pg.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,Pg.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Xe=l(w(),1),eq=()=>{};function QCe({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},h){let{isZoomOutMode:p,hasSectionRootClientId:g}=(0,JY.useSelect)(fe=>{let{isZoomOut:xe,getSectionRootClientId:Ve}=M(fe(x));return{isZoomOutMode:xe(),hasSectionRootClientId:!!Ve()}},[]),[b,v,k]=(0,m_.useDebouncedInput)(a),[y,_]=(0,zt.useState)(null),[S,C]=(0,zt.useState)(m),[B,R]=(0,zt.useState)("all"),[I,E]=(0,zt.useState)(null),L=(0,m_.useViewportMatch)("large"),P=(0,m_.useViewportMatch)("medium","<")?d:eq;function D(){return f||(p?"patterns":"blocks")}let[j,H]=(0,zt.useState)(D());f_(g&&(j==="patterns"||j==="media")&&L);let[U,G,W]=rd({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),J=(0,zt.useRef)(),ce=(0,zt.useCallback)((fe,xe,Ve,at)=>{G(fe,xe,Ve,at),n(fe),P(),window.requestAnimationFrame(()=>{!c&&!J.current?.contains(h.current.ownerDocument.activeElement)&&J.current?.querySelector("button").focus()})},[G,P,n,h,c]),te=(0,zt.useCallback)((fe,xe,...Ve)=>{W(!1),G(fe,{patternName:xe},...Ve),n(),P()},[G,P,n,W]),ne=(0,zt.useCallback)(fe=>{W(fe),_(fe)},[W,_]),X=(0,zt.useCallback)((fe,xe)=>{C(fe),R(xe),u?.()},[C,u]),q=j==="patterns"&&!k&&!!S,ee=j==="media"&&!!I,$=(0,zt.useMemo)(()=>j==="media"?null:(0,Xe.jsxs)(Xe.Fragment,{children:[(0,Xe.jsx)(Rg.SearchControl,{className:"block-editor-inserter__search",onChange:fe=>{y&&_(null),v(fe)},value:b,label:(0,ld.__)("Search"),placeholder:(0,ld.__)("Search")}),!!k&&(0,Xe.jsx)(eE,{filterValue:k,onSelect:n,onHover:ne,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:j==="patterns"})]}),[j,y,_,v,b,k,n,ne,c,t,e,r,o]),oe=(0,zt.useMemo)(()=>(0,Xe.jsxs)(Xe.Fragment,{children:[(0,Xe.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Xe.jsx)(rY,{ref:J,rootClientId:U,onInsert:ce,onHover:ne,showMostUsedBlocks:s})}),i&&(0,Xe.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Xe.jsx)(Rg.VisuallyHidden,{as:"h2",children:(0,ld.__)("A tip for using the block editor")}),(0,Xe.jsx)(yG,{})]})]}),[U,ce,ne,s,i]),ie=(0,zt.useMemo)(()=>(0,Xe.jsx)(TY,{rootClientId:U,onInsert:te,onSelectCategory:X,selectedCategory:S,children:q&&(0,Xe.jsx)(GB,{rootClientId:U,onInsert:te,category:S,patternFilter:B,showTitlesAsTooltip:!0})}),[U,te,X,B,S,q]),K=(0,zt.useMemo)(()=>(0,Xe.jsx)(MV,{rootClientId:U,selectedCategory:I,onSelectCategory:E,onInsert:ce,children:ee&&(0,Xe.jsx)(u_,{rootClientId:U,onInsert:ce,category:I})}),[U,ce,I,E,ee]),ae=fe=>{fe!=="patterns"&&C(null),H(fe)},ge=(0,zt.useRef)();return(0,zt.useLayoutEffect)(()=>{ge.current&&window.requestAnimationFrame(()=>{ge.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Xe.jsxs)("div",{className:V("block-editor-inserter__menu",{"show-panel":q||ee,"is-zoom-out":p}),ref:h,children:[(0,Xe.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Xe.jsx)(rE,{ref:ge,onSelect:ae,onClose:d,selectedTab:j,closeButtonLabel:(0,ld.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,ld.__)("Blocks"),panel:(0,Xe.jsxs)(Xe.Fragment,{children:[$,j==="blocks"&&!k&&oe]})},{name:"patterns",title:(0,ld.__)("Patterns"),panel:(0,Xe.jsxs)(Xe.Fragment,{children:[$,j==="patterns"&&!k&&ie]})},{name:"media",title:(0,ld.__)("Media"),panel:(0,Xe.jsxs)(Xe.Fragment,{children:[$,K]})}]})}),i&&y&&(0,Xe.jsx)(Rg.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Xe.jsx)(MK,{item:y})})]})}var FV=(0,zt.forwardRef)(QCe);function JCe(e,t){return(0,Xe.jsx)(FV,{...e,onPatternCategorySelection:eq,ref:t})}var tq=(0,zt.forwardRef)(JCe);var iE=l(O(),1),p_=l(N(),1),sE=l(A(),1),oq=l(F(),1);var Om=l(w(),1),e1e=6,t1e=6,o1e=2;function aE({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,iE.useState)(""),[c,u]=rd({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=Pu(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,oq.useSelect)(g=>{let{getSettings:b,getBlockIndex:v,getBlockCount:k}=g(x),y=b(),_=v(o),S=k();return{setInserterIsOpened:y.__experimentalSetIsInserterOpened,insertionIndex:_===-1?S:_}},[o]),h=i&&d.length>e1e;(0,iE.useEffect)(()=>{f&&f(!1)},[f]);let p=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,Om.jsxs)("div",{className:V("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":f}),children:[h&&(0,Om.jsx)(sE.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,p_.__)("Search"),placeholder:(0,p_.__)("Search")}),(0,Om.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,Om.jsx)(eE,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?o1e:0,maxBlockTypes:t1e,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,Om.jsx)(sE.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:p,"aria-label":(0,p_.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,p_.__)("Browse all")})]})}var r1e=50;function rq(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<r1e&&o.length>0?o:null}var h_=l(w(),1),n1e=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}})=>{let{as:a=lE.Button,label:c,onClick:u,...d}=s,f=c;!f&&i?f=i:!f&&n?f=(0,Ql.sprintf)((0,Ql._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):f||(f=(0,Ql._x)("Add block","Generic label for block inserter button"));function m(h){e&&e(h),u&&u(h)}return(0,h_.jsx)(a,{__next40pxDefaultSize:s.as?void 0:!0,icon:Ii,label:f,tooltipPosition:"bottom",onClick:m,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...d})},i1e=class extends iq.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,appenderLabel:i,toggleProps:s,hasItems:a,renderToggle:c=n1e}=this.props;return c({onToggle:e,isOpen:t,disabled:o||!a,blockTitle:r,hasSingleBlockType:n,appenderLabel: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,h_.jsx)(aE,{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,h_.jsx)(tq,{onSelect:()=>{e()},onClose: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,h_.jsx)(lE.Dropdown,{className:"block-editor-inserter",contentClassName:V("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,Ql.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},$i=(0,uE.compose)([(0,cE.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(x),{getBlockVariations:c,getBlockType:u}=e(g_.store);o=o||n(t)||void 0;let d=s(o),f=r&&a(o),m=d?.length===1&&c(d[0].name,"inserter")?.length===0,h=!1;m&&(h=d[0]);let p=f?u(f.name):null,g=rq(f,p);return{hasItems:i(o),hasSingleBlockType:m,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:f,appenderLabel:g,rootClientId:o}}),(0,cE.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:v,getPreviousBlockClientId:k}=o(x);if(!b||!n&&!r)return{};let y={},_={};if(n){let S=v(n),C=v(k(n));S?.name===C?.name&&(_=C?.attributes||{})}else{let S=v(r);if(S?.innerBlocks?.length){let C=S.innerBlocks[S.innerBlocks.length-1];c&&c?.name===C.name&&(_=C.attributes)}}return b.forEach(S=>{_.hasOwnProperty(S)&&(y[S]=_[S])}),y}function m(){let{getBlockIndex:b,getBlockSelectionEnd:v,getBlockOrder:k,getBlockRootClientId:y}=o(x);if(n)return b(n);let _=v();return!i&&_&&y(_)===r?b(_)+1:k(r).length}let{insertBlock:h}=e(x),p;if(c){let b=f(c.attributesToCopy);p=(0,g_.createBlock)(c.name,{...c.attributes||{},...b})}else p=(0,g_.createBlock)(a.name);h(p,m(),r,d),u&&u(p);let g=(0,Ql.sprintf)((0,Ql.__)("%s block added"),a.title);(0,nq.speak)(g)}})),(0,uE.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(i1e);var b_=l(w(),1),s1e="\uFEFF";function Og({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,dE.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:h}=u(x),p=!d(e),{bodyPlaceholder:g}=f();return{showPrompt:p,isLocked:!!m(e),placeholder:g,isManualGrid:h(e)?.layout?.isManualPlacement}},[e]),{insertDefaultBlock:i,startTyping:s}=(0,dE.useDispatch)(x);if(o||n)return null;let a=(0,sq.decodeEntities)(r)||(0,zV.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,b_.jsxs)("div",{"data-root-client-id":e||"",className:V("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,b_.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,zV.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(fE.ENTER===u.keyCode||fE.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:s1e}),(0,b_.jsx)($i,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var aq=l(A(),1),jV=l(O(),1),k_=l(N(),1);var lq=l(Pe(),1);var mE=l(w(),1);function cq({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,mE.jsx)($i,{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,appenderLabel:f})=>{let m=!d,h;return f?h=f:d?h=(0,k_.sprintf)((0,k_._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):h=(0,k_._x)("Add block","Generic label for block inserter button"),(0,mE.jsx)(aq.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:V(t,"block-editor-button-block-appender"),onClick:s,"aria-haspopup":m?"true":void 0,"aria-expanded":m?c:void 0,disabled:a,label:h,showTooltip:!0,children:(0,mE.jsx)(Be,{icon:Ii})})},isAppender:!0})}var uq=(0,jV.forwardRef)((e,t)=>((0,lq.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),cq(e,t))),cd=(0,jV.forwardRef)(cq);var Ag=l(w(),1);function a1e({rootClientId:e}){return(0,UV.useSelect)(o=>o(x).canInsertBlockType((0,dq.getDefaultBlockName)(),e))?(0,Ag.jsx)(Og,{rootClientId:e}):(0,Ag.jsx)(cd,{rootClientId:e,className:"block-list-appender__toggle"})}function fq({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,UV.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(x),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,Ag.jsx)(r,{tabIndex:-1,className:V("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,Ag.jsx)(t,{}):(0,Ag.jsx)(a1e,{rootClientId:e})})}var Eq=l(Q(),1),y_=l(F(),1),Tq=l(O(),1),Iq=l(N(),1);var Lg=l(F(),1),dd=l(O(),1),gE=l(A(),1),Cq=l(Q(),1);var hq=l(F(),1),ud=l(O(),1),gq=l(A(),1),bq=l(N(),1);var pq=l(Q(),1),HV=l(Me(),1),mq=new WeakMap;function l1e(e){let t=(0,pq.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=mq.get(u);d||(d=(0,HV.getScrollContainer)(u),mq.set(u,d));let f=(0,HV.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 Am=l1e;var GV=l(w(),1),c1e=Number.MAX_SAFE_INTEGER;function u1e({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,ud.useReducer)(k=>(k+1)%c1e,0),{orientation:d,rootClientId:f,isVisible:m}=(0,hq.useSelect)(k=>{let{getBlockListSettings:y,getBlockRootClientId:_,isBlockVisible:S}=k(x),C=_(e??t);return{orientation:y(C)?.orientation||"vertical",rootClientId:C,isVisible:S(e)&&S(t)}},[e,t]),h=ot(e),p=ot(t),g=d==="vertical",b=(0,ud.useMemo)(()=>c<0||!h&&!p||!m?void 0:{contextElement:i==="group"?p||h:h||p,getBoundingClientRect(){let y=h?h.getBoundingClientRect():null,_=p?p.getBoundingClientRect():null,S=0,C=0,B=0,R=0;if(i==="group"){let I=_||y;C=I.top,B=0,R=I.bottom-I.top,S=s==="left"?I.left-2:I.right-2}else g?(C=y?y.bottom:_.top,B=y?y.width:_.width,R=_&&y?_.top-y.bottom:0,S=y?y.left:_.left):(C=y?y.top:_.top,R=y?y.height:_.height,(0,bq.isRTL)()?(S=_?_.right:y.left,B=y&&_?y.left-_.right:0):(S=y?y.right:_.left,B=y&&_?_.left-y.right:0),B=Math.max(B,0));return new window.DOMRect(S,C,B,R)}},[h,p,c,g,m,i,s]),v=Am(n);return(0,ud.useLayoutEffect)(()=>{if(!h)return;let k=new window.MutationObserver(u);return k.observe(h,{attributes:!0}),()=>{k.disconnect()}},[h]),(0,ud.useLayoutEffect)(()=>{if(!p)return;let k=new window.MutationObserver(u);return k.observe(p,{attributes:!0}),()=>{k.disconnect()}},[p]),(0,ud.useLayoutEffect)(()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",u),()=>{h.ownerDocument.defaultView?.removeEventListener("resize",u)}},[h]),!h&&!p||!m?null:(0,GV.jsx)(gq.Popover,{ref:v,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:V("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,GV.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var pE=u1e;var _q=l(F(),1),Sq=l(Q(),1),xq=l(A(),1);var ec=l(O(),1);var kq=l(Q(),1),vq=l(A(),1),Jl=l(O(),1);var WV=l(w(),1),d1e=Number.MAX_SAFE_INTEGER;function f1e({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=ot(e),u=ot(t??e),d=(0,kq.useMergeRefs)([a,Am(n)]),[f,m]=(0,Jl.useReducer)(p=>(p+1)%d1e,0);(0,Jl.useLayoutEffect)(()=>{if(!c)return;let p=new window.MutationObserver(m);return p.observe(c,{attributes:!0}),()=>{p.disconnect()}},[c]);let h=(0,Jl.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?k5(Gh(c),Gh(u)):Gh(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,WV.jsx)(vq.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:h,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:V("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var Lm=(0,Jl.forwardRef)(f1e),m1e=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,WV.jsx)(Lm,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),yq=(0,Jl.forwardRef)(m1e);var hE=l(w(),1);function p1e({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=ot(e);return(0,hE.jsx)(Lm,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,hE.jsx)(h1e,{selectedElement:a,additionalStyles:n,children:o}):o})}function h1e({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,ec.useState)(e.offsetWidth),[i,s]=(0,ec.useState)(e.offsetHeight);(0,ec.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,ec.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,hE.jsx)("div",{style:a,children:o})}var Ki=(0,ec.forwardRef)(p1e);var $V=l(w(),1),v_={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function g1e({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,_q.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(x),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,Sq.useReducedMotion)();return(0,$V.jsx)(Ki,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,$V.jsx)(xq.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?v_.show:v_.hide,animate:v_.show,exit:r?v_.show:v_.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var wq=g1e;var tc=l(w(),1),Ng=(0,dd.createContext)();Ng.displayName="InsertionPointOpenRefContext";function b1e({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,Lg.useDispatch)(x),s=(0,dd.useContext)(Ng),a=(0,dd.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:h,isZoomOutMode:p}=(0,Lg.useSelect)(I=>{let{getBlockOrder:E,getBlockListSettings:L,getBlockInsertionPoint:T,isBlockBeingDragged:P,getPreviousBlockClientId:D,getNextBlockClientId:j,getSettings:H,isZoomOut:z}=M(I(x)),U=T(),G=E(U.rootClientId);if(!G.length)return{};let W=G[U.index-1],J=G[U.index];for(;P(W);)W=D(W);for(;P(J);)J=j(J);let ce=H();return{previousClientId:W,nextClientId:J,orientation:L(U.rootClientId)?.orientation||"vertical",rootClientId:U.rootClientId,isDistractionFree:ce.isDistractionFree,isInserterShown:U?.__unstableWithInserter,isZoomOutMode:z()}},[]),{getBlockEditingMode:g}=(0,Lg.useSelect)(x),b=(0,Cq.useReducedMotion)();function v(I){I.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function k(I){I.target===a.current&&!s.current&&i()}function y(I){I.target!==a.current&&(s.current=!0)}let _=(0,dd.useCallback)(I=>{!I&&s.current&&(s.current=!1)},[s]),S={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(h||p&&o!=="insert")return null;let R=V("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,tc.jsx)(pE,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,tc.jsxs)(gE.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:v,onFocus:y,className:V(R,{"is-with-inserter":m}),onHoverEnd:k,children:[(0,tc.jsx)(gE.__unstableMotion.div,{variants:S,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,tc.jsx)(gE.__unstableMotion.div,{variants:C,className:V("block-editor-block-list__insertion-point-inserter"),children:(0,tc.jsx)($i,{ref:_,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:I=>{s.current=I},onSelectOrClose:()=>{s.current=!1}})})]})})}function Bq(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,Lg.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(x),c=i();return{insertionPoint:c,isVisible:s(),isBlockListEmpty:a(c?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,tc.jsx)(wq,{...e},`${t.rootClientId}-${t.index}`):(0,tc.jsx)(b1e,{operation:t.operation,nearestSide:t.nearestSide,...e})}function Pq(){let e=(0,Tq.useContext)(Ng),t=(0,y_.useSelect)(g=>{let b=g(x).getSettings();return b.isDistractionFree||b.isPreviewMode||M(g(x)).isZoomOut()},[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:c,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:m}=M((0,y_.useSelect)(x)),{showInsertionPoint:h,hideInsertionPoint:p}=(0,y_.useDispatch)(x);return(0,Eq.useRefEffect)(g=>{if(t)return;function b(v){if(e===void 0||e.current||v.target.nodeType===v.target.TEXT_NODE||n())return;if(!v.target.classList.contains("block-editor-block-list__layout")){p();return}let k;if(v.target.classList.contains("is-root-container")||(k=(v.target.getAttribute("data-block")?v.target:v.target.closest("[data-block]")).getAttribute("data-block")),a(k)||u(k)==="disabled"||d(k)==="core/block"||k&&f(k).layout?.isManualPlacement)return;let y=o(k),_=y?.orientation||"vertical",S=!!y?.__experimentalCaptureToolbars,C=v.clientY,B=v.clientX,I=Array.from(v.target.children).find(P=>{let D=P.getBoundingClientRect();return P.classList.contains("wp-block")&&_==="vertical"&&D.top>C||P.classList.contains("wp-block")&&_==="horizontal"&&((0,Iq.isRTL)()?D.right<B:D.left>B)});if(!I){p();return}if(!I.id&&(I=I.firstElementChild,!I)){p();return}let E=I.id.slice(6);if(!E||c(E)||m(E)||i().includes(E)&&_==="vertical"&&!S&&!s().hasFixedToolbar)return;let L=I.getBoundingClientRect();if(_==="horizontal"&&(v.clientY>L.bottom||v.clientY<L.top)||_==="vertical"&&(v.clientX>L.right||v.clientX<L.left)){p();return}let T=r(E);if(T===0){p();return}h(k,T,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,h,p,i,t])}var bE=l(F(),1),Rq=l(Q(),1);var Oq=l(w(),1);function Nm(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,bE.useSelect)(x),{clearSelectedBlock:r}=(0,bE.useDispatch)(x),{clearBlockSelection:n}=e();return(0,Rq.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 Aq(e){return(0,Oq.jsx)("div",{ref:Nm(),...e})}var eZ=l(Q(),1),Mg=l(O(),1),tZ=l(F(),1),Fm=l(Y(),1);var Lq=l(w(),1);function Nq({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Ie();return(0,Lq.jsx)(cd,{className:V({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var Dq=l(w(),1);function Mq(){let{clientId:e}=Ie();return(0,Dq.jsx)(Og,{rootClientId:e})}var vE=l(O(),1),zq=l(F(),1),kE=l(Pe(),1),jq=l(__(),1);var S_=new WeakMap;function k1e(){let e;return t=>((e===void 0||!(0,jq.isShallowEqual)(e,t))&&(e=t),e)}function Fq(e){let[t]=(0,vE.useState)(k1e);return t(e)}function Uq(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,zq.useRegistry)(),h=Fq(o),p=Fq(r),g=c===void 0||t==="contentOnly"?t:c;(0,vE.useLayoutEffect)(()=>{let b={allowedBlocks:h,prioritizedInserterBlocks:p,templateLock:g};if(u!==void 0&&(b.__experimentalCaptureToolbars=u),d!==void 0)b.orientation=d;else{let v=Rs(f?.type);b.orientation=v.getOrientation(f)}s!==void 0&&((0,kE.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,kE.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,kE.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),S_.get(m)||S_.set(m,{}),S_.get(m)[e]=b,window.queueMicrotask(()=>{let v=S_.get(m);if(Object.keys(v).length){let{updateBlockListSettings:k}=m.dispatch(x);k(v),S_.set(m,{})}})},[e,h,p,g,n,i,s,a,u,d,f,m])}var KV=l(zf(),1),yE=l(O(),1),Hq=l(F(),1),Gq=l(Y(),1);function Wq(e,t,o,r){let n=(0,Hq.useRegistry)(),i=(0,yE.useRef)(null);(0,yE.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:c,isBlockSelected:u}=n.select(x),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(x);return window.queueMicrotask(()=>{if(s)return;let m=a(e),h=m.length===0||o==="all"||o==="contentOnly",p=!(0,KV.default)(t,i.current);if(!h||!p)return;i.current=t;let g=(0,Gq.synchronizeBlocksWithTemplate)(m,t);(0,KV.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 $q=l(Y(),1),Kq=l(F(),1);function Yq(e){return(0,Kq.useSelect)(t=>{let o=t(x).getBlock(e);if(!o)return;let r=t($q.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 Vm=l(F(),1),xE=l(O(),1),wE=l(Q(),1),Qq=l(N(),1),Dg=l(Y(),1);var YV=l(O(),1),Jn=l(Y(),1),Dm=l(F(),1),qq=l(Me(),1);function qV(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 v1e(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:h}=qV(u);if(m==="inserter"){s();let p=h.map(g=>(0,Jn.cloneBlock)(g));i(p,!0,null)}if(m==="block"){let p=o(f[0]);if(d===e&&p===t||f.includes(e)||r(f).some(k=>k===e))return;if(a==="group"){let k=f.map(y=>c(y));i(k,!0,null,f);return}let g=d===e,b=f.length,v=g&&p<t?t-b:t;n(f,d,v)}}}function y1e(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,Jn.findTransform)((0,Jn.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function _1e(e){return t=>{let o=(0,Jn.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function _E(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,Dm.useSelect)(x),{getGroupingBlockName:m}=(0,Dm.useSelect)(Jn.store),{insertBlocks:h,moveBlocksToPosition:p,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:v,removeBlocks:k}=(0,Dm.useDispatch)(x),y=(0,Dm.useRegistry)(),_=(0,YV.useCallback)((I,E=!0,L=0,T=[])=>{Array.isArray(I)||(I=[I]);let D=c(e)[t];if(r==="replace")v(D,I,void 0,L);else if(r==="group"){let j=f(D);n==="left"?I.push(j):I.unshift(j);let H=I.map(W=>(0,Jn.createBlock)(W.name,W.attributes,W.innerBlocks)),z=I.every(W=>W.name==="core/image"),U=i("core/gallery",e),G=(0,Jn.createBlock)(z&&U?"core/gallery":m(),{layout:{type:"flex",flexWrap:z&&U?null:"nowrap"}},H);v([D,...T],G,void 0,L)}else h(I,t,e,E,L)},[c,e,t,r,v,f,n,i,m,h]),S=(0,YV.useCallback)((I,E,L)=>{if(r==="replace"){let T=u(I),D=c(e)[t];y.batch(()=>{k(I,!1),v(D,T,void 0,0)})}else p(I,E,e,L)},[r,c,u,p,y,k,v,t,e]),C=v1e(e,t,s,a,S,_,b,r,f),B=y1e(e,d,g,i,_),R=_1e(_);return I=>{let E=(0,qq.getFilesFromDataTransfer)(I.dataTransfer),L=I.dataTransfer.getData("text/html");L?R(L):E.length?B(E):C(I)}}function S1e(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 Mm(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=S1e(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function SE(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function Zq(e,t){return t.top<=e.y&&t.bottom>=e.y}var ZV=30,x1e=120,w1e=120;function C1e(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 v=d.getBoundingClientRect(),[k,y]=Mm(t,v,["top","bottom"]);if(v.height>x1e&&k<ZV){if(y==="top")return[m,"before"];if(y==="bottom")return[m+1,"after"]}}let h=(0,Qq.isRTL)();if(d&&f==="horizontal"){let v=d.getBoundingClientRect(),[k,y]=Mm(t,v,["left","right"]);if(v.width>w1e&&k<ZV){if(h&&y==="right"||!h&&y==="left")return[m,"before"];if(h&&y==="left"||!h&&y==="right")return[m+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:v,getBoundingClientRect:k,blockIndex:y,blockOrientation:_})=>{let S=k();if(!S)return;let[C,B]=Mm(t,S,n),[R,I]=Mm(t,S,["left","right"]),E=SE(t,S);v&&E?C=0:o==="vertical"&&_!=="horizontal"&&(E&&R<ZV||!E&&Zq(t,S))&&(c=y,u=I),C<a&&(s=B==="bottom"||!h&&B==="right"||h&&B==="left"?"after":"before",a=C,i=y)});let p=i+(s==="after"?1:-1),g=!!e[i]?.isUnmodifiedDefaultBlock,b=!!e[p]?.isUnmodifiedDefaultBlock;return c!==null?[c,"group",u]:!g&&!b?[s==="after"?i+1:i,"insert"]:[g?i:p,"replace"]}function CE(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 Xq(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function Jq({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,Vm.useRegistry)(),[i,s]=(0,xE.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,Vm.useSelect)(Dg.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:p,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:v,isGroupable:k,isZoomOut:y,getSectionRootClientId:_,getBlockParents:S}=M((0,Vm.useSelect)(x)),{showInsertionPoint:C,hideInsertionPoint:B,startDragging:R,stopDragging:I}=M((0,Vm.useDispatch)(x)),E=_E(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),L=(0,wE.useThrottle)((0,xE.useCallback)((T,P)=>{v()||R();let D=p(),j=[t,...S(t,!0)];if(D.some(oe=>j.includes(oe)))return;let z=b(t),U=g([t])[0],G=g(D);if(!CE(a,z,G,U))return;let J=_();if(y()&&J!==t)return;let ce=m(t).filter(oe=>!((0,Dg.hasBlockSupport)(oe.name,"visibility",!0)&&oe.attributes?.metadata?.blockVisibility===!1));if(ce.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let te=ce.map(oe=>{let ie=oe.clientId;return{isUnmodifiedDefaultBlock:(0,Dg.isUnmodifiedDefaultBlock)(oe),getBoundingClientRect:()=>{let K=P.getElementById(`block-${ie}`);return K?K.getBoundingClientRect():null},blockIndex:h(ie),blockOrientation:f(ie)?.orientation}}),ne=C1e(te,{x:T.clientX,y:T.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:h(t)}),[X,q,ee]=ne,$=te[X]?.isUnmodifiedDefaultBlock;if(!(y()&&!$&&q!=="insert")){if(q==="group"){let oe=ce[X],ie=[oe.name,...G].every(xe=>xe==="core/image"),K=d("core/gallery",t),ae=k([oe.clientId,p()]),ge=c(u(),"block"),fe=ge&&ge.find(({name:xe})=>xe==="group-row");if(ie&&!K&&(!ae||!fe)||!ie&&(!ae||!fe))return}n.batch(()=>{s({index:X,operation:q,nearestSide:ee});let oe=["before","after"].includes(q)?o:t;C(oe,X,{operation:q,nearestSide:ee})})}},[v,b,t,g,p,a,_,y,m,f,e,o,h,n,R,C,d,k,c,u]),200);return(0,wE.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:E,onDragOver(T){L(T,T.currentTarget.ownerDocument)},onDragLeave(T){let{ownerDocument:P}=T.currentTarget;Xq(T.relatedTarget,P)||Xq(T.target,P)||(L.cancel(),B())},onDragEnd(){L.cancel(),I(),B()}})}var oc=l(w(),1),B1e={};function E1e({children:e,clientId:t}){let o=Yq(t);return(0,oc.jsx)(K0,{value:o,children:e})}var T1e=(0,Mg.memo)(s_);function oZ(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:h,renderAppender:p,orientation:g,placeholder:b,layout:v,name:k,blockType:y,parentLock:_,defaultLayout:S}=e;Uq(t,_,o,r,n,i,s,a,u,m,g,v),Wq(t,c,u,f);let C=(0,Fm.getBlockSupport)(k,"layout")||(0,Fm.getBlockSupport)(k,"__experimentalLayout")||B1e,{allowSizingOnChildren:B=!1}=C,R=v||C,I=(0,Mg.useMemo)(()=>({...S,...R,...B&&{allowSizingOnChildren:!0}}),[S,R,B]),E=(0,oc.jsx)(T1e,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:h,layout:I,wrapperRef:d,placeholder:b});return!y?.providesContext||Object.keys(y.providesContext).length===0?E:(0,oc.jsx)(E1e,{clientId:t,children:E})}function I1e(e){return $1(e),(0,oc.jsx)(oZ,{...e})}var BE=(0,Mg.forwardRef)((e,t)=>{let o=zm({ref:t},e);return(0,oc.jsx)("div",{className:"block-editor-inner-blocks",children:(0,oc.jsx)("div",{...o})})});function zm(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Ie(),c=(0,tZ.useSelect)(_=>{let{getBlockName:S,isZoomOut:C,getTemplateLock:B,getBlockRootClientId:R,getBlockEditingMode:I,getBlockSettings:E,getSectionRootClientId:L}=M(_(x));if(!i){let G=L();return{isDropZoneDisabled:C()&&G!==""}}let{hasBlockSupport:T,getBlockType:P}=_(Fm.store),D=S(i),j=I(i),H=R(i),[z]=E(i,"layout"),U=j==="disabled";if(C()){let G=L();U=i!==G}return{__experimentalCaptureToolbars:T(D,"__experimentalExposeControlsToChildren",!1),name:D,blockType:P(D),parentLock:B(H),parentClientId:H,isDropZoneDisabled:U,defaultLayout:z}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:h,isDropZoneDisabled:p,defaultLayout:g}=c,b=Jq({dropZoneElement:n,rootClientId:i,parentClientId:h}),v=(0,eZ.useMergeRefs)([e.ref,r||p||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),k={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:m,defaultLayout:g,...t},y=k.value&&k.onChange?I1e:oZ;return{...e,ref:v,className:V(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,oc.jsx)(y,{...k,clientId:i}):(0,oc.jsx)(s_,{...t})}}zm.save=Fm.__unstableGetInnerBlocksProps;BE.DefaultBlockAppender=Mq;BE.ButtonBlockAppender=Nq;BE.Content=()=>zm.save().children;var x_=BE;var w_=l(Q(),1),Vg=l(F(),1),XV=l(Me(),1),Lr=l(tt(),1);var rZ=l(w(),1),P1e=new Set([Lr.UP,Lr.RIGHT,Lr.DOWN,Lr.LEFT,Lr.ENTER,Lr.BACKSPACE]);function R1e(e){let{keyCode:t,shiftKey:o}=e;return!o&&P1e.has(t)}function C_(){let e=(0,Vg.useSelect)(o=>o(x).isTyping(),[]),{stopTyping:t}=(0,Vg.useDispatch)(x);return(0,w_.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 B_(){let e=(0,Vg.useSelect)(i=>i(x).isTyping(),[]),{startTyping:t,stopTyping:o}=(0,Vg.useDispatch)(x),r=C_(),n=(0,w_.useRefEffect)(i=>{if(e){let d=function(p){let{target:g}=p;h=i.ownerDocument.defaultView.setTimeout(()=>{(0,XV.isTextField)(g)||o()})},f=function(p){let{keyCode:g}=p;(g===Lr.ESCAPE||g===Lr.TAB)&&o()},m=function(){i.ownerDocument.defaultView.getSelection().isCollapsed||o()};var s=d,a=f,c=m;let h;return i.addEventListener("focus",d),i.addEventListener("keydown",f),i.ownerDocument.addEventListener("selectionchange",m),()=>{i.ownerDocument.defaultView.clearTimeout(h),i.removeEventListener("focus",d),i.removeEventListener("keydown",f),i.ownerDocument.removeEventListener("selectionchange",m)}}function u(d){let{type:f,target:m}=d;!(0,XV.isTextField)(m)||!i.contains(m)||f==="keydown"&&!R1e(d)||t()}return i.addEventListener("keypress",u),i.addEventListener("keydown",u),()=>{i.removeEventListener("keypress",u),i.removeEventListener("keydown",u)}},[e,t,o]);return(0,w_.useMergeRefs)([r,n])}function O1e({children:e}){return(0,rZ.jsx)("div",{ref:B_(),children:e})}var nZ=O1e;var E_=l(A(),1),iZ=l(Q(),1),sZ=l(F(),1),aZ=l(O(),1),lZ=l(N(),1);var EE=l(w(),1);function QV({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,aZ.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,sZ.useSelect)(S=>{let{getInsertionPoint:C,getBlockOrder:B,getSectionRootClientId:R,isBlockInsertionPointVisible:I,getBlockInsertionPoint:E,getDraggedBlockClientIds:L}=M(S(x)),T=R(),P=B(T);return{sectionRootClientId:T,sectionClientIds:P,insertionPoint:C(),blockInsertionPoint:E(),blockInsertionPointVisible:I(),blocksBeingDragged:L()}},[]),f=(0,iZ.useReducedMotion)();if(!e)return;let m=!1;if(!(t===i&&s&&s.includes(e)))return null;let p=a?.index===0&&e===s[a.index],g=a&&a.hasOwnProperty("index")&&e===s[a.index-1];o==="top"&&(m=p||c&&u.index===0&&e===s[u.index]),o==="bottom"&&(m=g||c&&e===s[u.index-1]);let b=d[0],v=d.includes(e),k=s.indexOf(b),_=(k>0?s[k-1]:null)===e;return(v||_)&&(m=!1),(0,EE.jsx)(E_.__unstableAnimatePresence,{children:m&&(0,EE.jsx)(E_.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:f?0:.2,ease:[.6,0,.4,1]},className:V("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,EE.jsx)(E_.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,lZ.__)("Drop pattern.")})})})}var Qr=l(w(),1),R1=(0,fd.createContext)();R1.displayName="IntersectionObserverContext";var TE=new WeakMap,A1e={trailing:!0};function L1e({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,Yi.useSelect)(f=>{let{getSettings:m,isTyping:h,hasBlockSpotlight:p,getEditedContentOnlySection:g}=M(f(x)),{outlineMode:b,focusMode:v,isPreviewMode:k}=m();return{isOutlineMode:b&&!h(),isFocusMode:v||p(),isPreviewMode:k,editedContentOnlySection:g()}},[]),s=(0,Yi.useRegistry)(),{setBlockVisibility:a}=(0,Yi.useDispatch)(x),c=(0,IE.useDebounce)((0,fd.useCallback)(()=>{let f={};TE.get(s).forEach(([m,h])=>{f[m]=h}),a(f)},[s]),300,A1e),u=(0,fd.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(m=>{TE.get(s)||TE.set(s,[]);for(let h of m){let p=h.target.getAttribute("data-block");TE.get(s).push([p,h.isIntersecting])}c()})},[]),d=zm({ref:(0,IE.useMergeRefs)([Nm(),Pq(),B_()]),className:V("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,Qr.jsxs)(R1.Provider,{value:u,children:[(0,Qr.jsx)("div",{...d}),!!i&&(0,Qr.jsx)(N1e,{clientId:i})]})}function N1e({clientId:e}){let{stopEditingContentOnlySection:t}=M((0,Yi.useDispatch)(x)),o=(0,Yi.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(x);return!s()||n(e)||i(e,!0)},[e]);return(0,fd.useEffect)(()=>{o||t()},[o,t]),null}function mg(e){return(0,Qr.jsx)(H0,{value:pA,children:(0,Qr.jsx)(L1e,{...e})})}var D1e=[],M1e=new Set;function V1e({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=kM}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,Yi.useSelect)(m=>{let{getSettings:h,getBlockOrder:p,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:v,getBlockEditingMode:k,isSectionBlock:y,isContainerInsertableToInContentOnlyMode:_,getBlockName:S,isZoomOut:C,canInsertBlockType:B}=M(m(x)),R=p(t);if(h().isPreviewMode)return{order:R,selectedBlocks:D1e,visibleBlocks:M1e};let I=g(),E=I[0],L=!t&&!E&&(!R.length||!B((0,cZ.getDefaultBlockName)(),t)),T=!!(t&&E&&t===E),P=v(t);return{order:R,selectedBlocks:I,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!y(t)||_(S(E),t))&&k(t)!=="disabled"&&(!P||P==="contentOnly")&&i&&!C()&&(s||T||L)}},[t,i,s]);return(0,Qr.jsxs)(m9,{value:n,children:[a.map(m=>(0,Qr.jsxs)(Yi.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,Qr.jsx)(QV,{clientId:m,rootClientId:t,position:"top"}),(0,Qr.jsx)(hG,{rootClientId:t,clientId:m}),c&&(0,Qr.jsx)(QV,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,Qr.jsx)(fq,{tagName:r,rootClientId:t,CustomAppender:o})]})}function s_(e){return(0,Qr.jsx)(Yi.AsyncModeProvider,{value:!1,children:(0,Qr.jsx)(V1e,{...e})})}var cb=l(F(),1),K3=l(Me(),1),Y3=l(A(),1),ZJ=l(Ms(),1),JT=l(O(),1),ub=l(Y(),1),q3=l(er(),1),db=l(N(),1);var MZ=l(Q(),1),VZ=l(F(),1),FZ=l(Me(),1),Na=l(O(),1);var ei=l(N(),1),Um=l(Y(),1),VE=l(A(),1),RZ=l(Q(),1),OZ=l(F(),1),FE=l(O(),1);var I_=l(A(),1),pZ=l(yy(),1),hZ=l(Pe(),1),LE=l(O(),1);var Nr=l(A(),1),uZ=(0,Nr.createSlotFill)("InspectorControls"),F1e=(0,Nr.createSlotFill)("InspectorAdvancedControls"),z1e=(0,Nr.createSlotFill)("InspectorControlsBindings"),j1e=(0,Nr.createSlotFill)("InspectorControlsBackground"),U1e=(0,Nr.createSlotFill)("InspectorControlsBorder"),H1e=(0,Nr.createSlotFill)("InspectorControlsColor"),G1e=(0,Nr.createSlotFill)("InspectorControlsFilter"),W1e=(0,Nr.createSlotFill)("InspectorControlsDimensions"),$1e=(0,Nr.createSlotFill)("InspectorControlsPosition"),K1e=(0,Nr.createSlotFill)("InspectorControlsTypography"),Y1e=(0,Nr.createSlotFill)("InspectorControlsListView"),q1e=(0,Nr.createSlotFill)("InspectorControlsStyles"),Z1e=(0,Nr.createSlotFill)("InspectorControlsEffects"),X1e=(0,Nr.createSlotFill)("InspectorControlsContent"),Q1e={default:uZ,advanced:F1e,background:j1e,bindings:z1e,border:U1e,color:H1e,content:X1e,dimensions:W1e,effects:Z1e,filter:G1e,list:Y1e,position:$1e,settings:uZ,styles:q1e,typography:K1e},qi=Q1e,T_=(0,Nr.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var Fg=l(A(),1),RE=l(O(),1),dZ=l(Q(),1),OE=l(F(),1);var PE=l(w(),1),fZ=Symbol("ListViewContentPopover"),{Fill:mZ,Slot:J1e}=(0,Fg.createSlotFill)(fZ);function eBe(){return(0,dZ.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function AE({listViewRef:e}){let{popoverProps:t}=eBe(),o=(0,Fg.__experimentalUseSlotFills)(fZ),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,OE.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(x),f=M(u(x));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,RE.useState)(null);(0,RE.useLayoutEffect)(()=>{if(!n||!e?.current){a(null);return}let u=e.current.querySelector(`[data-block="${n}"]`);a(u)},[n,e]);let{closeListViewContentPanel:c}=M((0,OE.useDispatch)(x));return!i||!r||!s?null:(0,PE.jsx)(Fg.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:c,children:(0,PE.jsx)("div",{style:{width:"280px"},children:(0,PE.jsx)(J1e,{})})})}var md=l(w(),1),tBe=["content","list"],oBe=["default","settings","advanced"];function jm({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,hZ.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Ie(),i=qi[t]?.Fill;if(!i)return(0,pZ.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[nu]){let s=n.name==="core/template-part",a=oBe.includes(t),c=tBe.includes(t);if(!(s&&a||c))return null}return!n[nu]&&!n[ws]?null:t==="content"&&n[dv]&&n[nu]?n[ws]?(0,md.jsx)(I_.__experimentalStyleProvider,{document,children:(0,md.jsx)(mZ,{children:e})}):null:(0,md.jsx)(I_.__experimentalStyleProvider,{document,children:(0,md.jsx)(i,{children:s=>(0,md.jsx)(nBe,{fillProps:s,children:e,resetAllFilter:r})})})}function rBe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,LE.useContext)(I_.__experimentalToolsPanelContext);return(0,LE.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function nBe({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,md.jsx)(rBe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,md.jsx)(s,{...a,children:i}),n)}var xZ=l(A(),1),wZ=l(O(),1),CZ=l(yy(),1),BZ=l(Pe(),1);var bZ=l(A(),1),NE=l(F(),1),kZ=l(O(),1);var gZ=l(Q(),1);function No(){return(0,gZ.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function zg(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 vZ=l(w(),1);function yZ({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,NE.useDispatch)(x),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,NE.useSelect)(x),c=No(),u=s(),d=(0,kZ.useCallback)((f=[])=>{let m={},h=a()?i():[u];h.forEach(p=>{let{style:g}=n(p),b={style:g};f.forEach(v=>{b={...b,...v(b)}}),b={...b,style:Ae(b.style)},m[p]=b}),r(h,m,!0)},[n,i,a,u,r]);return(0,vZ.jsx)(bZ.__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 JV=l(A(),1),DE=l(O(),1),_Z=l(w(),1);function SZ({Slot:e,fillProps:t,...o}){let r=(0,DE.useContext)(JV.__experimentalToolsPanelContext),n=(0,DE.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[JV.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,_Z.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var ME=l(w(),1);function iBe({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,BZ.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=qi[t],a=(0,xZ.__experimentalUseSlotFills)(s?.name);if(!s)return(0,CZ.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:c}=s;return o?(0,ME.jsx)(yZ,{group:t,label:o,children:(0,ME.jsx)(SZ,{...n,fillProps:r,Slot:c})}):(0,ME.jsx)(c,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var e3=(0,wZ.forwardRef)(iBe);var t3=l(w(),1),EZ=jm;EZ.Slot=e3;var pd=e=>(0,t3.jsx)(jm,{...e,group:"advanced"});pd.Slot=function(t){return(0,t3.jsx)(e3,{...t,group:"advanced"})};pd.slotName="InspectorAdvancedControls";var pe=EZ;var IZ=l(F(),1),hd=l(Y(),1),P_=l(N(),1);function TZ(e){let t=e?.style?.position?.type;return t==="sticky"?(0,P_.__)("Sticky"):t==="fixed"?(0,P_.__)("Fixed"):null}function It(e){return(0,IZ.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(x),{getBlockType:i,getActiveBlockVariation:s}=t(hd.store),a=o(e),c=i(a);if(!c)return null;let u=r(e),d=u?.metadata?.patternName;if(d){let v=n(d),k=TZ(u);return{isSynced:!1,title:(0,P_.__)("Pattern"),icon:Pi,description:v?.description||(0,P_.__)("A block pattern."),anchor:u?.anchor,positionLabel:k,positionType:u?.style?.position?.type,name:v?.title||u?.metadata?.name}}let f=s(a,u),m=(0,hd.isReusableBlock)(c)||(0,hd.isTemplatePart)(c),p=(m?(0,hd.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=TZ(u),b={isSynced:m,title:p,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 R_=l(w(),1),O_="position",o3={key:"default",value:"",name:(0,ei.__)("Default")},r3={key:"sticky",value:"sticky",name:(0,ei._x)("Sticky","Name for the value of the CSS position property"),hint:(0,ei.__)("The block will stick to the top of the window instead of scrolling.")},PZ={key:"fixed",value:"fixed",name:(0,ei._x)("Fixed","Name for the value of the CSS position property"),hint:(0,ei.__)("The block will not move when the page is scrolled.")},sBe=["top","right","bottom","left"],aBe=["sticky","fixed"];function lBe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return aBe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,sBe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function cBe(e){let t=(0,Um.getBlockSupport)(e,O_);return!!(t===!0||t?.sticky)}function uBe(e){let t=(0,Um.getBlockSupport)(e,O_);return!!(t===!0||t?.fixed)}function dBe(e){return!!(0,Um.getBlockSupport)(e,O_)}function AZ(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function LZ({name:e}={}){let[t,o]=he("position.fixed","position.sticky"),r=!t&&!o;return!dBe(e)||r}function fBe({style:e={},clientId:t,name:o,setAttributes:r}){let n=uBe(o),i=cBe(o),s=e?.position?.type,{firstParentClientId:a}=(0,OZ.useSelect)(h=>{let{getBlockParents:p}=h(x),g=p(t);return{firstParentClientId:g[g.length-1]}},[t]),c=It(a),u=i&&s===r3.value&&c?(0,ei.sprintf)((0,ei.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,FE.useMemo)(()=>{let h=[o3];return(i||s===r3.value)&&h.push(r3),(n||s===PZ.value)&&h.push(PZ),h},[n,i,s]),f=h=>{let g={...e,position:{...e?.position,type:h,top:h==="sticky"||h==="fixed"?"0px":void 0}};r({style:Ae(g)})},m=s&&d.find(h=>h.value===s)||o3;return FE.Platform.select({web:d.length>1?(0,R_.jsx)(pe,{group:"position",children:(0,R_.jsx)(VE.BaseControl,{help:u,children:(0,R_.jsx)(VE.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,ei.__)("Position"),hideLabelFromVision:!0,describedBy:(0,ei.sprintf)((0,ei.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:h})=>{f(h.value)},size:"__unstable-large"})})}):null,native:null})}var n3={edit:function(t){return LZ(t)?null:(0,R_.jsx)(fBe,{...t})},useBlockProps:pBe,attributeKeys:["style"],hasSupport(e){return(0,Um.hasBlockSupport)(e,O_)}},mBe={};function pBe({name:e,style:t}){let o=(0,Um.hasBlockSupport)(e,O_),r=LZ({name:e}),n=o&&!r,i=(0,RZ.useInstanceId)(mBe),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=lBe({selector:s,style:t})||"");let c=V({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return ti({css:a}),{className:c}}var zZ={placement:"top-start"},NZ={...zZ,flip:!1,shift:!0},hBe={...zZ,flip:!0,shift:!1};function DZ(e,t,o,r,n){if(!e||!t)return NZ;let i=o?.scrollTop||0,s=Gh(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)?NZ:hBe}function zE({contentElement:e,clientId:t}){let o=ot(t),[r,n]=(0,Na.useState)(0),{blockIndex:i,isSticky:s}=(0,VZ.useSelect)(m=>{let{getBlockIndex:h,getBlockAttributes:p}=m(x);return{blockIndex:h(t),isSticky:AZ(p(t))}},[t]),a=(0,Na.useMemo)(()=>{if(e)return(0,FZ.getScrollContainer)(e)},[e]),[c,u]=(0,Na.useState)(()=>DZ(e,o,a,r,s)),d=(0,MZ.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,Na.useCallback)(()=>u(DZ(e,o,a,r,s)),[e,o,a,r]);return(0,Na.useLayoutEffect)(f,[i,f]),(0,Na.useLayoutEffect)(()=>{if(!e||!o)return;let m=e?.ownerDocument?.defaultView;m?.addEventHandler?.("resize",f);let h,p=o?.ownerDocument?.defaultView;return p.ResizeObserver&&(h=new p.ResizeObserver(f),h.observe(o)),()=>{m?.removeEventHandler?.("resize",f),h&&h.disconnect()}},[f,e,o]),{...c,ref:d}}var jZ=l(F(),1);function jE(e){return(0,jZ.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:c,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(x),f=n(e),m=i(f),h=f.find(g=>m[g]?.__experimentalCaptureToolbars),p=!1;if(s()){let g=a();p=c(g.rootClientId)[g.index]===e}return{capturingClientId:h,isInsertionPointVisible:p,lastClientId:u()?d():null,rootClientId:r(e)}},[e])}var UE=l(w(),1);function UZ({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=jE(e),s=zE({contentElement:t?.current,clientId:e});return(0,UE.jsx)(Ki,{clientId:o||e,bottomClientId:n,className:V("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,UE.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,UE.jsx)($i,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var FJ=l(F(),1),lb=l(O(),1),zJ=l(Ms(),1);var LJ=l(N(),1),NJ=l(F(),1),H3=l(O(),1),DJ=l(Q(),1),mc=l(Y(),1),MJ=l(A(),1);var Hm=l(A(),1),JZ=l(F(),1),eX=l(N(),1);var KZ=l(Y(),1),YZ=l(A(),1),A_=l(F(),1),L_=l(O(),1),qZ=l(Q(),1);var GZ=l(Me(),1),Da=l(O(),1),HE=50,WZ=25,gBe=1e3,HZ=gBe*(WZ/1e3);function $Z(){let e=(0,Da.useRef)(null),t=(0,Da.useRef)(null),o=(0,Da.useRef)(null),r=(0,Da.useRef)(null);(0,Da.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Da.useCallback)(a=>{e.current=a.clientY,o.current=(0,GZ.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},WZ)},[]),i=(0,Da.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-HE,0),m=Math.max(d-u-HE,0),h=f===0||m===0?0:m/f;t.current=HZ*h}else if(a.clientY<u){let f=Math.max(u-HE,0),m=Math.max(u-d-HE,0),h=f===0||m===0?0:m/f;t.current=-HZ*h}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var i3=l(w(),1),bBe=({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:h}=(0,A_.useSelect)(E=>{let{canMoveBlocks:L,getBlockRootClientId:T,getBlockName:P,getBlockAttributes:D,isBlockInsertionPointVisible:j}=E(x),{getBlockType:H,getActiveBlockVariation:z}=E(KZ.store),U=T(o[0]),G=P(o[0]),W=z(G,D(o[0]));return{srcRootClientId:U,isDraggable:L(o),icon:W?.icon||H(G)?.icon,visibleInserter:j(),getBlockType:H}},[o]),p=(0,L_.useRef)(!1),[g,b,v]=$Z(),{getAllowedBlocks:k,getBlockNamesByClientId:y,getBlockRootClientId:_}=(0,A_.useSelect)(x),{startDraggingBlocks:S,stopDraggingBlocks:C}=(0,A_.useDispatch)(x);(0,L_.useEffect)(()=>()=>{p.current&&C()},[]);let R=ot(o[0])?.closest("body");return(0,L_.useEffect)(()=>{if(!R||!a)return;let L=(0,qZ.throttle)(T=>{if(!T.target.closest("[data-block]"))return;let P=y(o),D=T.target.closest("[data-block]").getAttribute("data-block"),j=k(D),H=y([D])[0],z;if(j?.length===0){let U=_(D),G=y([U])[0],W=k(U);z=CE(h,W,P,G)}else z=CE(h,j,P,H);!z&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return R.addEventListener("dragover",L),()=>{R.removeEventListener("dragover",L)}},[o,R,a,k,y,_,h,m]),d?(0,i3.jsx)(YZ.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:E=>{window.requestAnimationFrame(()=>{S(o),p.current=!0,g(E),i&&i()})},onDragOver:b,onDragEnd:()=>{C(),p.current=!1,v(),s&&s()},__experimentalDragComponent:c!==void 0?c:(0,i3.jsx)(OB,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:E,onDraggableEnd:L})=>t({draggable:!0,onDragStart:E,onDragEnd:L})}):t({draggable:!1})},GE=bBe;var XZ=l(Y(),1),WE=l(A(),1),QZ=l(Q(),1),$E=l(F(),1),KE=l(O(),1),Zi=l(N(),1),s3=l(tt(),1);var ve=l(N(),1),gd=(e,t)=>e==="up"?t==="horizontal"?(0,ve.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ve.isRTL)()?"left":"right":"down":null;function ZZ(e,t,o,r,n,i,s){let a=o+1;if(e>1)return kBe(e,o,r,n,i,s);if(r&&n)return(0,ve.sprintf)((0,ve.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=gd("down",s);if(c==="down")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=gd("down",s);if(c==="down")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=gd("up",s);if(c==="up")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=gd("up",s);if(c==="up")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function kBe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ve.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=gd("down",i);if(a==="down")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=gd("down",i);if(a==="down")return(0,ve.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ve.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ve.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=gd("up",i);if(a==="up")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=gd("up",i);if(a==="up")return(0,ve.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ve.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ve.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var rc=l(w(),1),vBe=(e,t)=>e==="up"?t==="horizontal"?(0,Zi.isRTL)()?Uo:Gr:Hf:e==="down"?t==="horizontal"?(0,Zi.isRTL)()?Gr:Uo:pr:null,yBe=(e,t)=>e==="up"?t==="horizontal"?(0,Zi.isRTL)()?(0,Zi.__)("Move right"):(0,Zi.__)("Move left"):(0,Zi.__)("Move up"):e==="down"?t==="horizontal"?(0,Zi.isRTL)()?(0,Zi.__)("Move left"):(0,Zi.__)("Move right"):(0,Zi.__)("Move down"):null,a3=(0,KE.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,QZ.useInstanceId)(a3),s=Array.isArray(e)?e:[e],a=s.length,{blockType:c,isDisabled:u,rootClientId:d,isFirst:f,isLast:m,firstIndex:h,orientation:p="vertical"}=(0,$E.useSelect)(_=>{let{getBlockIndex:S,getBlockRootClientId:C,getBlockOrder:B,getBlock:R,getBlockListSettings:I}=_(x),E=s[0],L=C(E),T=S(E),P=S(s[s.length-1]),D=B(L),j=R(E),H=T===0,z=P===D.length-1,{orientation:U}=I(L)||{};return{blockType:j?(0,XZ.getBlockType)(j.name):null,isDisabled:t==="up"?H:z,rootClientId:L,firstIndex:T,isFirst:H,isLast:z,orientation:o||U}},[e,t]),{moveBlocksDown:g,moveBlocksUp:b}=(0,$E.useDispatch)(x),v=t==="up"?b:g,k=_=>{v(e,d),r.onClick&&r.onClick(_)},y=`block-editor-block-mover-button__description-${i}`;return(0,rc.jsxs)(rc.Fragment,{children:[(0,rc.jsx)(WE.Button,{__next40pxDefaultSize:!0,ref:n,className:V("block-editor-block-mover-button",`is-${t}-button`),icon:vBe(t,p),label:yBe(t,p),"aria-describedby":y,...r,onClick:u?null:k,disabled:u,accessibleWhenDisabled:!0,shortcut:t==="up"?s3.displayShortcut.secondary("t"):s3.displayShortcut.secondary("y")}),(0,rc.jsx)(WE.VisuallyHidden,{id:y,children:ZZ(a,c&&c.title,h,f,m,t==="up"?-1:1,p)})]})}),YE=(0,KE.forwardRef)((e,t)=>(0,rc.jsx)(a3,{direction:"up",ref:t,...e})),qE=(0,KE.forwardRef)((e,t)=>(0,rc.jsx)(a3,{direction:"down",ref:t,...e}));var Ma=l(w(),1);function _Be({clientIds:e,hideDragHandle:t}){let{canMove:o,rootClientId:r,isFirst:n,isLast:i,orientation:s,isManualGrid:a}=(0,JZ.useSelect)(c=>{let{getBlockIndex:u,getBlockListSettings:d,canMoveBlocks:f,getBlockOrder:m,getBlockRootClientId:h,getBlockAttributes:p}=c(x),g=Array.isArray(e)?e:[e],b=g[0],v=h(b),k=u(b),y=u(g[g.length-1]),_=m(v),{layout:S={}}=p(v)??{};return{canMove:f(e),rootClientId:v,isFirst:k===0,isLast:y===_.length-1,orientation:d(v)?.orientation,isManualGrid:S.type==="grid"&&S.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!o||n&&i&&!r||t&&a?null:(0,Ma.jsxs)(Hm.ToolbarGroup,{className:V("block-editor-block-mover",{"is-horizontal":s==="horizontal"}),children:[!t&&(0,Ma.jsx)(GE,{clientIds:e,fadeWhenDisabled:!0,children:c=>(0,Ma.jsx)(Hm.Button,{__next40pxDefaultSize:!0,icon:xv,className:"block-editor-block-mover__drag-handle",label:(0,eX.__)("Drag"),tabIndex:"-1",...c})}),!a&&(0,Ma.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Ma.jsx)(Hm.ToolbarItem,{children:c=>(0,Ma.jsx)(YE,{clientIds:e,...c})}),(0,Ma.jsx)(Hm.ToolbarItem,{children:c=>(0,Ma.jsx)(qE,{clientIds:e,...c})})]})]})}var ZE=_Be;var rX=l(A(),1),QE=l(F(),1),JE=l(N(),1),nX=l(O(),1);var N_=l(F(),1),bd=l(O(),1);var{clearTimeout:tX,setTimeout:SBe}=window,oX=200;function xBe({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=oX}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,N_.useSelect)(x),{toggleBlockHighlight:s}=(0,N_.useDispatch)(x),a=(0,bd.useRef)(),c=(0,N_.useSelect)(g=>g(x).getSettings().isDistractionFree,[]),u=g=>{if(g&&c)return;let b=n(),v=o?i(b):b;s(v,g)},d=()=>e?.current&&e.current.matches(":hover"),f=()=>{let g=d();return!t&&!g},m=()=>{let g=a.current;g&&tX&&tX(g)},h=g=>{g&&g.stopPropagation(),m(),u(!0)},p=g=>{g&&g.stopPropagation(),m(),a.current=SBe(()=>{f()&&u(!1)},r)};return(0,bd.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:h,debouncedHideGestures:p}}function jg({ref:e,highlightParent:t=!1,debounceTimeout:o=oX}){let[r,n]=(0,bd.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=xBe({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,bd.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,bd.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 XE=l(w(),1);function iX(){let{selectBlock:e}=(0,QE.useDispatch)(x),{parentClientId:t}=(0,QE.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=M(i(x)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=It(t),r=(0,nX.useRef)(),n=jg({ref:r,highlightParent:!0});return(0,XE.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,XE.jsx)(rX.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,JE.sprintf)((0,JE.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,XE.jsx)(Oe,{icon:o?.icon})})},t)}var eT=l(A(),1);var Ug=l(A(),1),wBe=(0,Ug.createSlotFill)("BlockControls"),CBe=(0,Ug.createSlotFill)("BlockControlsBlock"),BBe=(0,Ug.createSlotFill)("BlockFormatControls"),EBe=(0,Ug.createSlotFill)("BlockControlsOther"),TBe=(0,Ug.createSlotFill)("BlockControlsParent"),IBe={default:wBe,block:CBe,inline:BBe,other:EBe,parent:TBe},D_=IBe;function sX(e,t){let o=Ie();return o[ws]?D_[e]?.Fill:o[Jp]&&t?D_.parent.Fill:null}var nc=l(w(),1);function l3({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=sX(e,r);if(!n)return null;let i=(0,nc.jsxs)(nc.Fragment,{children:[e==="default"&&(0,nc.jsx)(eT.ToolbarGroup,{controls:t}),o]});return(0,nc.jsx)(eT.__experimentalStyleProvider,{document,children:(0,nc.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,nc.jsx)(u,{...d,children:c}),i)}})})}var M_=l(O(),1),ic=l(A(),1),lX=l(yy(),1);var c3=l(w(),1),{ComponentsContext:aX}=M(ic.privateApis);function u3({group:e="default",...t}){let o=(0,M_.useContext)(ic.__experimentalToolbarContext),r=(0,M_.useContext)(aX),n=(0,M_.useMemo)(()=>({forwardedContext:[[ic.__experimentalToolbarContext.Provider,{value:o}],[aX.Provider,{value:r}]]}),[o,r]),i=D_[e],s=(0,ic.__experimentalUseSlotFills)(i.name);if(!i)return(0,lX.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,c3.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,c3.jsx)(ic.ToolbarGroup,{children:c})}var d3=l(w(),1),cX=l3;cX.Slot=u3;var f3=e=>(0,d3.jsx)(l3,{group:"inline",...e});f3.Slot=function(t){return(0,d3.jsx)(u3,{group:"inline",...t})};var Mt=cX;var uX=l(A(),1),{Fill:dX,Slot:PBe}=(0,uX.createSlotFill)("__unstableBlockToolbarLastItem");dX.Slot=PBe;var tT=dX;var _T=l(A(),1);var Kg=l(Y(),1),Jr=l(A(),1),yd=l(F(),1);var vT=l(O(),1),Qi=l(N(),1),mQ=l(Ms(),1),lc=l(Q(),1);var Gg=l(F(),1),kd=l(Y(),1);var TX=l(O(),1),F_=l(Y(),1),V_=l(F(),1),IX=l(Ai(),1),sc=l(N(),1);var oi=l(Y(),1),fX=l(O(),1),RBe="align";var mX="__experimentalBorder",oT="color",OBe="customClassName",pX="typography.__experimentalFontFamily",hX="typography.fontSize",ABe="typography.lineHeight",LBe="typography.__experimentalFontStyle",NBe="typography.__experimentalFontWeight",gX="typography.textAlign",DBe="typography.textColumns",MBe="typography.__experimentalTextDecoration",VBe="typography.__experimentalWritingMode",FBe="typography.__experimentalTextTransform",zBe="typography.__experimentalLetterSpacing",jBe="layout",UBe=[ABe,hX,LBe,NBe,pX,gX,DBe,MBe,FBe,VBe,zBe],HBe=["shadow"],GBe="spacing",WBe=[...HBe,...UBe,mX,oT,GBe],bX=e=>(0,oi.hasBlockSupport)(e,RBe);function kX(e,t="any"){if(fX.Platform.OS!=="web")return!1;let o=(0,oi.getBlockSupport)(e,mX);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var vX=e=>{let t=(0,oi.getBlockSupport)(e,oT);return t!==null&&typeof t=="object"&&!!t.gradients},yX=e=>{let t=(0,oi.getBlockSupport)(e,oT);return t&&t.background!==!1},_X=e=>(0,oi.hasBlockSupport)(e,gX);var SX=e=>{let t=(0,oi.getBlockSupport)(e,oT);return t&&t.text!==!1};var xX=e=>(0,oi.hasBlockSupport)(e,OBe,!0);var wX=e=>(0,oi.hasBlockSupport)(e,pX);var CX=e=>(0,oi.hasBlockSupport)(e,hX);var BX=e=>(0,oi.hasBlockSupport)(e,jBe);var EX=e=>WBe.some(t=>(0,oi.hasBlockSupport)(e,t));function $Be(e){try{let t=(0,F_.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var KBe={align:bX,borderColor:e=>kX(e,"color"),backgroundColor:yX,textAlign:_X,textColor:SX,gradient:vX,className:xX,fontFamily:wX,fontSize:CX,layout:BX,style:EX};function YBe(e,t){return Object.entries(KBe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function m3(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,YBe(t[r],e[r])),m3(e[r].innerBlocks,t[r].innerBlocks,o)}function Hg(){let e=(0,V_.useRegistry)(),{updateBlockAttributes:t}=(0,V_.useDispatch)(x),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,V_.useDispatch)(IX.store);return(0,TX.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,sc.__)("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,sc.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!$Be(s)){r((0,sc.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,F_.parse)(s);if(a.length===1?e.batch(()=>{m3(i,i.map(()=>a[0]),t)}):e.batch(()=>{m3(i,a,t)}),i.length===1){let c=(0,F_.getBlockType)(i[0].name)?.title;o((0,sc.sprintf)((0,sc.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,sc.sprintf)((0,sc.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function PX({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,Gg.useSelect)(kd.store),i=(0,Gg.useSelect)(y=>{let{canInsertBlockType:_,getBlockRootClientId:S,getBlocksByClientId:C,getDirectInsertBlock:B,canRemoveBlocks:R}=y(x),I=C(e),E=S(e[0]),L=_(r(),E),T=E?B(E):null;return{canRemove:R(e),canInsertBlock:I.every(P=>(L||!!T)&&_(P.name,E)),canCopyStyles:I.every(P=>!!P&&((0,kd.hasBlockSupport)(P.name,"color")||(0,kd.hasBlockSupport)(P.name,"typography"))),canDuplicate:I.every(P=>!!P&&(0,kd.hasBlockSupport)(P.name,"multiple",!0)&&_(P.name,E))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,Gg.useSelect)(x),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:h,duplicateBlocks:p,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:v}=(0,Gg.useDispatch)(x),k=Hg();return t({canCopyStyles:d,canDuplicate:f,canInsertBlock:u,canRemove:c,onDuplicate(){return p(e,o)},onRemove(){return m(e,o)},onInsertBefore(){b(e[0])},onInsertAfter(){g(e[e.length-1])},onGroup(){if(!e.length)return;let y=n(),_=(0,kd.switchToBlockType)(s(e),y);_&&h(e,_)},onUngroup(){if(!e.length)return;let y=a(e[0]);y.length&&h(e,y)},onCopy(){e.length===1&&v(e[0])},async onPasteStyles(){await k(s(e))}})}var RX=l(A(),1),qBe=(0,RX.createSlotFill)(Symbol("CommentIconSlotFill")),rT=qBe;var OX=l(N(),1),AX=l(A(),1),nT=l(Y(),1),iT=l(F(),1);var LX=l(w(),1);function ZBe({clientId:e}){let t=(0,iT.useSelect)(r=>r(x).getBlock(e),[e]),{replaceBlocks:o}=(0,iT.useDispatch)(x);return!t||t.name!=="core/html"?null:(0,LX.jsx)(AX.MenuItem,{onClick:()=>o(e,(0,nT.rawHandler)({HTML:(0,nT.getBlockContent)(t)})),children:(0,OX.__)("Convert to Blocks")})}var NX=ZBe;var DX=l(A(),1),{Fill:MX,Slot:XBe}=(0,DX.createSlotFill)("__unstableBlockSettingsMenuFirstItem");MX.Slot=XBe;var sT=MX;var $g=l(A(),1),iQ=l(Y(),1),sQ=l(F(),1);var h3=l(A(),1),g3=l(N(),1),zX=l(Y(),1),cT=l(F(),1),jX=l(tt(),1);var VX=l(Y(),1),FX=l(F(),1);function z_(e){return(0,FX.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(x),{getGroupingBlockName:s,getBlockType:a}=t(VX.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 aT=l(F(),1),lT=l(Y(),1),Gm=l(A(),1);var j_=l(N(),1);var Wm=l(w(),1),QBe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function JBe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=z_(),{replaceBlocks:n}=(0,aT.useDispatch)(x),{canRemove:i,variations:s}=(0,aT.useSelect)(p=>{let{canRemoveBlocks:g}=p(x),{getBlockVariations:b}=p(lT.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=p=>{let g=(0,lT.switchToBlockType)(e,o);typeof p!="string"&&(p="group"),g&&g.length>0&&(g[0].attributes.layout=QBe[p],n(t,g))},c=()=>a("row"),u=()=>a("stack"),d=()=>a("grid");if(!r||!i)return null;let f=!!s.find(({name:p})=>p==="group-row"),m=!!s.find(({name:p})=>p==="group-stack"),h=!!s.find(({name:p})=>p==="group-grid");return(0,Wm.jsxs)(Gm.ToolbarGroup,{children:[(0,Wm.jsx)(Gm.ToolbarButton,{icon:Bv,label:(0,j_._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,Wm.jsx)(Gm.ToolbarButton,{icon:qN,label:(0,j_._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,Wm.jsx)(Gm.ToolbarButton,{icon:uD,label:(0,j_._x)("Stack","action: convert blocks to stack"),onClick:u}),h&&(0,Wm.jsx)(Gm.ToolbarButton,{icon:Cv,label:(0,j_._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var p3=JBe;var $m=l(w(),1);function UX({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,cT.useSelect)(x),{replaceBlocks:c}=(0,cT.useDispatch)(x),u=()=>{let m=(0,zX.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,$m.jsxs)($m.Fragment,{children:[t&&(0,$m.jsx)(h3.MenuItem,{shortcut:f.length>1?jX.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,g3._x)("Group","verb")}),o&&(0,$m.jsx)(h3.MenuItem,{onClick:()=>{d(),s()},children:(0,g3._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var b3=l(N(),1),WX=l(O(),1),$X=l(A(),1);var HX=l(F(),1);function ri(e){return(0,HX.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=M(t(x));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var Xi=l(N(),1),U_=l(O(),1),xo=l(A(),1);var uT=l(F(),1),GX=l(Y(),1);var Pt=l(w(),1),eEe=["core/navigation"];function tEe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function dT({clientId:e,onClose:t}){let[o,r]=(0,U_.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=ri(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,uT.useSelect)(v=>{let{getBlockName:k,getBlockAttributes:y}=v(x),_=k(e),S=(0,GX.getBlockType)(_);return{allowsEditLocking:eEe.includes(_),templateLock:y(e)?.templateLock,hasTemplateLock:!!S?.attributes?.templateLock}},[e]),[d,f]=(0,U_.useState)(!!c),{updateBlockAttributes:m}=(0,uT.useDispatch)(x),h=It(e);(0,U_.useEffect)(()=>{r({move:i,remove:s,...a?{edit:n}:{}})},[n,i,s,a]);let p=Object.values(o).every(Boolean),g=Object.values(o).some(Boolean)&&!p,b=o.move!==i||o.remove!==s||a&&o.edit!==n||u&&d!==!!c;return(0,Pt.jsx)(xo.Modal,{title:(0,Xi.sprintf)((0,Xi.__)("Lock %s"),h.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,Pt.jsxs)("form",{onSubmit:v=>{v.preventDefault(),b&&(m([e],{lock:o,templateLock:d?tEe(o):void 0}),t())},children:[(0,Pt.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,Pt.jsx)("legend",{children:(0,Xi.__)("Select the features you want to lock")}),(0,Pt.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,Pt.jsxs)("li",{children:[(0,Pt.jsx)(xo.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,Xi.__)("Lock all"),checked:p,indeterminate:g,onChange:v=>r({move:v,remove:v,...a?{edit:v}:{}})}),(0,Pt.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,Pt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Pt.jsx)(xo.CheckboxControl,{label:(0,Xi.__)("Lock editing"),checked:!!o.edit,onChange:v=>r(k=>({...k,edit:v}))}),(0,Pt.jsx)(xo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Xf:Cl})]}),(0,Pt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Pt.jsx)(xo.CheckboxControl,{label:(0,Xi.__)("Lock movement"),checked:o.move,onChange:v=>r(k=>({...k,move:v}))}),(0,Pt.jsx)(xo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Xf:Cl})]}),(0,Pt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Pt.jsx)(xo.CheckboxControl,{label:(0,Xi.__)("Lock removal"),checked:o.remove,onChange:v=>r(k=>({...k,remove:v}))}),(0,Pt.jsx)(xo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Xf:Cl})]})]})]})}),u&&(0,Pt.jsx)(xo.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,Xi.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,Pt.jsxs)(xo.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Pt.jsx)(xo.FlexItem,{children:(0,Pt.jsx)(xo.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Xi.__)("Cancel")})}),(0,Pt.jsx)(xo.FlexItem,{children:(0,Pt.jsx)(xo.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Xi.__)("Apply")})})]})]})})}var Km=l(w(),1);function k3({clientId:e}){let{canLock:t,isLocked:o}=ri(e),[r,n]=(0,WX.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,b3.__)("Unlock"):(0,b3.__)("Lock");return(0,Km.jsxs)(Km.Fragment,{children:[(0,Km.jsx)($X.MenuItem,{icon:o?Cl:xN,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,Km.jsx)(dT,{clientId:e,onClose:n})]})}var fT=l(N(),1),mT=l(A(),1),Wg=l(O(),1);var vd=l(w(),1);function v3({clientId:e}){let{canLock:t,isLocked:o}=ri(e),[r,n]=(0,Wg.useReducer)(a=>!a,!1),i=(0,Wg.useRef)(!1);if((0,Wg.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,fT.__)("Unlock"):(0,fT.__)("Lock");return!t&&o&&(s=(0,fT.__)("Locked")),(0,vd.jsxs)(vd.Fragment,{children:[(0,vd.jsx)(mT.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,vd.jsx)(mT.ToolbarButton,{disabled:!t,icon:o?Xf:Cl,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,vd.jsx)(dT,{clientId:e,onClose:n})]})}var y3=l(N(),1),KX=l(A(),1),pT=l(Y(),1),hT=l(F(),1);var YX=l(w(),1),oEe=()=>{};function qX({clientId:e,onToggle:t=oEe}){let{blockType:o,mode:r,enabled:n}=(0,hT.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(x),f=c(e);return{mode:u(e),blockType:f?(0,pT.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,hT.useDispatch)(x);if(!o||!(0,pT.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,y3.__)("Edit as HTML"):(0,y3.__)("Edit visually");return(0,YX.jsx)(KX.MenuItem,{onClick:()=>{i(e),t()},children:s})}var JX=l(A(),1),eQ=l(N(),1),tQ=l(O(),1),oQ=l(F(),1),rQ=l(Ms(),1);var Ks=l(A(),1),$s=l(N(),1),XX=l(O(),1),QX=l(er(),1),gT=l(F(),1);function ZX(e){return e?.trim()?.length===0}var ac=l(w(),1);function Ym({clientId:e,onClose:t}){let[o,r]=(0,XX.useState)(),n=It(e),{metadata:i}=(0,gT.useSelect)(b=>{let{getBlockAttributes:v}=b(x);return{metadata:v(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,gT.useDispatch)(x),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=ZX(o),h=d||f,p=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,v=f||m?(0,$s.sprintf)((0,$s.__)('Block name reset to: "%s".'),o):(0,$s.sprintf)((0,$s.__)('Block name changed to: "%s".'),o);(0,QX.speak)(v,"assertive"),s([e],{metadata:Ae({...i,name:b})}),t()};return(0,ac.jsx)(Ks.Modal,{title:(0,$s.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,ac.jsx)("form",{onSubmit:b=>{b.preventDefault(),h&&g()},children:(0,ac.jsxs)(Ks.__experimentalVStack,{spacing:"3",children:[(0,ac.jsx)(Ks.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,$s.__)("Name"),help:u?(0,$s.__)("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:p}),(0,ac.jsxs)(Ks.__experimentalHStack,{justify:"right",children:[(0,ac.jsx)(Ks.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,$s.__)("Cancel")}),(0,ac.jsx)(Ks.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!h,variant:"primary",type:"submit",children:(0,$s.__)("Save")})]})]})})})}var qm=l(w(),1);function _3({clientId:e}){let[t,o]=(0,tQ.useState)(!1),r=(0,oQ.useSelect)(n=>n(rQ.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,qm.jsxs)(qm.Fragment,{children:[(0,qm.jsx)(JX.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,eQ.__)("Rename")}),t&&(0,qm.jsx)(Ym,{clientId:e,onClose:()=>o(!1)})]})}var nQ=l(Y(),1);function Zm(e){return{canRename:!!e&&(0,nQ.getBlockSupport)(e,"renaming",!0)}}var Ys=l(w(),1),{Fill:rEe,Slot:nEe}=(0,$g.createSlotFill)("BlockSettingsMenuControls"),iEe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,sQ.useSelect)(b=>{let{getBlocksByClientId:v,getBlockNamesByClientId:k,getSelectedBlockClientIds:y,getBlockEditingMode:_,canEditBlock:S}=b(x),C=t!==null?t:y();return{selectedBlocks:k(C),selectedClientIds:C,isContentOnly:_(C[0])==="contentOnly",canToggleSelectedBlocksVisibility:v(C).every(B=>(0,iQ.hasBlockSupport)(B.name,"visibility",!0)),canEdit:S(C[0])}},[t]),{canLock:a}=ri(r[0]),{canRename:c}=Zm(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&c&&!n,f=i&&!n,m=z_(r),{isGroupable:h,isUngroupable:p}=m,g=(h||p)&&!n;return(0,Ys.jsx)(nEe,{fillProps:{...e,canEdit:s,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!g&&!u?null:(0,Ys.jsxs)($g.MenuGroup,{children:[g&&(0,Ys.jsx)(UX,{...m,onClose:e?.onClose}),s&&u&&(0,Ys.jsx)(k3,{clientId:r[0]}),s&&d&&(0,Ys.jsx)(_3,{clientId:r[0]}),s&&f&&(0,Ys.jsx)(C5,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,Ys.jsx)(qX,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function aQ({...e}){return(0,Ys.jsx)($g.__experimentalStyleProvider,{document,children:(0,Ys.jsx)(rEe,{...e})})}aQ.Slot=iEe;var bT=aQ;var lQ=l(O(),1),cQ=l(A(),1),uQ=l(Q(),1),dQ=l(F(),1),kT=l(N(),1);var S3=l(w(),1);function fQ({parentClientId:e,parentBlockType:t}){let o=(0,uQ.useViewportMatch)("medium","<"),{selectBlock:r}=(0,dQ.useDispatch)(x),n=(0,lQ.useRef)(),i=jg({ref:n,highlightParent:!0});return o?(0,S3.jsx)(cQ.MenuItem,{...i,ref:n,icon:(0,S3.jsx)(Oe,{icon:t.icon}),onClick:()=>r(e),children:(0,kT.sprintf)((0,kT.__)("Select parent block (%s)"),t.title)}):null}var Qe=l(w(),1),sEe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function x3({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,yd.useSelect)(x),{removeBlocks:a}=(0,yd.useDispatch)(x),c=tg(),u=(0,lc.useCopyToClipboard)(()=>(0,Kg.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,Qi.__)("Copy");return(0,Qe.jsx)(Jr.MenuItem,{ref:u,shortcut:r,children:d})}function w3({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,isContentOnlyListView:n,...i}){let s=t.length,a=t[0],{firstParentClientId:c,parentBlockType:u,previousBlockClientId:d,selectedBlockClientIds:f,isContentOnly:m,isZoomOut:h,canEdit:p,canMove:g,isFirst:b,isLast:v}=(0,yd.useSelect)(T=>{let{getBlockName:P,getBlockRootClientId:D,getPreviousBlockClientId:j,getSelectedBlockClientIds:H,getBlockAttributes:z,getBlockEditingMode:U,isZoomOut:G,canEditBlock:W,canMoveBlocks:J,getBlockIndex:ce,getBlockCount:te}=M(T(x)),{getActiveBlockVariation:ne}=T(Kg.store),X=D(a),q=X&&P(X);return{firstParentClientId:X,parentBlockType:X&&(ne(q,z(X))||(0,Kg.getBlockType)(q)),previousBlockClientId:j(a),selectedBlockClientIds:H(),isContentOnly:U(a)==="contentOnly",isZoomOut:G(),canEdit:W(a),canMove:J(t),isFirst:ce(a)===0,isLast:ce(a)===te(X)-1}},[a,t]),{getBlockOrder:k,getSelectedBlockClientIds:y}=(0,yd.useSelect)(x),{moveBlocksDown:_,moveBlocksUp:S}=(0,yd.useDispatch)(x),C=(0,yd.useSelect)(T=>{let{getShortcutRepresentation:P}=T(mQ.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")}},[]),B=f.length>0;async function R(T){if(!r)return;let P=await T;P&&P[0]&&r(P[0],!1)}function I(){if(!r)return;let T=d||c;T||(T=k()[0]);let P=B&&y().length===0;r(T,P)}let L=!f?.includes(c)&&!!c;return(0,Qe.jsx)(PX,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:T,canDuplicate:P,canInsertBlock:D,canRemove:j,onDuplicate:H,onInsertAfter:z,onInsertBefore:U,onRemove:G,onCopy:W,onPasteStyles:J})=>!j&&!P&&!D&&m?null:(0,Qe.jsx)(Jr.DropdownMenu,{icon:Bs,label:(0,Qi.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:sEe,noIcons:!0,...i,children:({onClose:te})=>(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsxs)(Jr.MenuGroup,{children:[(0,Qe.jsx)(sT.Slot,{fillProps:{onClose:te}}),L&&(0,Qe.jsx)(fQ,{parentClientId:c,parentBlockType:u}),g&&n&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Jr.MenuItem,{icon:Hf,disabled:b,accessibleWhenDisabled:!0,onClick:(0,lc.pipe)(te,()=>{S(t,c)}),children:(0,Qi.__)("Move up")}),(0,Qe.jsx)(Jr.MenuItem,{icon:pr,disabled:v,accessibleWhenDisabled:!0,onClick:(0,lc.pipe)(te,()=>{_(t,c)}),children:(0,Qi.__)("Move down")})]}),p&&s===1&&(0,Qe.jsx)(NX,{clientId:a}),!m&&(0,Qe.jsx)(x3,{clientIds:t,onCopy:W,shortcut:C.copy}),j&&!m&&(0,Qe.jsx)(x3,{clientIds:t,label:(0,Qi.__)("Cut"),eventType:"cut",shortcut:C.cut,__experimentalUpdateSelection:!r}),P&&(0,Qe.jsx)(Jr.MenuItem,{onClick:(0,lc.pipe)(te,H,R),shortcut:C.duplicate,children:(0,Qi.__)("Duplicate")}),D&&!h&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Jr.MenuItem,{onClick:(0,lc.pipe)(te,U),shortcut:C.insertBefore,children:(0,Qi.__)("Add before")}),(0,Qe.jsx)(Jr.MenuItem,{onClick:(0,lc.pipe)(te,z),shortcut:C.insertAfter,children:(0,Qi.__)("Add after")})]}),p&&s===1&&(0,Qe.jsx)(rT.Slot,{fillProps:{clientId:a,onClose:te}})]}),T&&!m&&(0,Qe.jsxs)(Jr.MenuGroup,{children:[(0,Qe.jsx)(x3,{clientIds:t,onCopy:W,label:(0,Qi.__)("Copy styles"),eventType:"copyStyles"}),p&&(0,Qe.jsx)(Jr.MenuItem,{onClick:J,children:(0,Qi.__)("Paste styles")})]}),!m&&(0,Qe.jsx)(bT.Slot,{fillProps:{onClose:te,count:s,firstBlockClientId:a},clientIds:t}),typeof o=="function"?o({onClose:te}):vT.Children.map(ne=>(0,vT.cloneElement)(ne,{onClose:te})),j&&(0,Qe.jsx)(Jr.MenuGroup,{children:(0,Qe.jsx)(Jr.MenuItem,{onClick:(0,lc.pipe)(te,G,I),shortcut:C.remove,children:(0,Qi.__)("Delete")})})]})})})}var pQ=w3;var hQ=l(A(),1),aEe=(0,hQ.createSlotFill)(Symbol("CommentIconToolbarSlotFill")),yT=aEe;var Yg=l(w(),1);function lEe({clientIds:e,...t}){return(0,Yg.jsxs)(_T.ToolbarGroup,{children:[(0,Yg.jsx)(yT.Slot,{}),(0,Yg.jsx)(_T.ToolbarItem,{children:o=>(0,Yg.jsx)(pQ,{clientIds:e,toggleProps:o,...t})})]})}var ST=lEe;var xT=l(A(),1),gQ=l(N(),1),wT=l(F(),1);var C3=l(w(),1);function bQ({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,wT.useSelect)(n=>!!t&&n(x).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,wT.useDispatch)(x);return o?(0,C3.jsx)(xT.ToolbarGroup,{children:(0,C3.jsx)(xT.ToolbarButton,{onClick:()=>{r(t)},children:(0,gQ.__)("Edit visually")})}):null}var CT=l(A(),1),en=l(O(),1),yQ=l(F(),1),_Q=l(Pe(),1),E3=l(Me(),1),SQ=l(Ms(),1),xQ=l(tt(),1);var B3=l(w(),1);function cEe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function kQ(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function vQ(e){return e.contains(e.ownerDocument.activeElement)}function uEe(e){let[t]=E3.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function dEe(e){let[o,r]=(0,en.useState)(!0),n=(0,en.useCallback)(()=>{let i=E3.focus.tabbable.find(e.current),s=cEe(i);s||(0,_Q.default)("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),r(s)},[e]);return(0,en.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function fEe({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,en.useState)(t),[c]=(0,en.useState)(r),u=(0,en.useCallback)(()=>{uEe(e.current)},[e]);(0,SQ.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,en.useEffect)(()=>{a&&u()},[o,a,u]),(0,en.useEffect)(()=>{let m=e.current,h=0;return!a&&!vQ(m)&&(h=window.requestAnimationFrame(()=>{let p=kQ(m),g=c||0;p[g]&&vQ(m)&&p[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(h),!n||!m)return;let g=kQ(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=M((0,yQ.useSelect)(x));(0,en.useEffect)(()=>{let m=e.current;if(s){let h=p=>{let g=f();p.keyCode===xQ.ESCAPE&&g?.current&&(p.preventDefault(),g.current.focus())};return m.addEventListener("keydown",h),()=>{m.removeEventListener("keydown",h)}}},[s,f,e])}function qg({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,en.useRef)(),u=dEe(c);return fEe({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,B3.jsx)(CT.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,B3.jsx)(CT.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var wQ=l(F(),1),BT=l(Y(),1);function ET(){return(0,wQ.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(x),i=n(),s=i&&(0,BT.getBlockType)(r(i));return s&&(0,BT.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var _d=l(A(),1),CQ=l(N(),1),BQ=l(Y(),1),EQ=l(O(),1),TT=l(F(),1);var Zg=l(w(),1),T3=[],mEe=6,pEe={placement:"bottom-start"};function TQ({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,TT.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(x),f=c(e),m=f?.metadata?.categories||T3,h=u(e),p=m.length>0?d(h):T3;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:p}},[e]),{replaceBlocks:n}=(0,TT.useDispatch)(x),i=(0,EQ.useMemo)(()=>t.length===0||!r||r.length===0?T3: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,mEe),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,BQ.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,Zg.jsx)(_d.Dropdown,{popoverProps:pEe,renderToggle:({onToggle:a,isOpen:c})=>(0,Zg.jsx)(_d.ToolbarGroup,{children:(0,Zg.jsx)(_d.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,CQ.__)("Change design")})}),renderContent:()=>(0,Zg.jsx)(_d.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,Zg.jsx)(Aa,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var Zs=l(A(),1),JQ=l(N(),1),MT=l(F(),1);var RT=l(F(),1),xd=l(Y(),1),AQ=l(O(),1);var I3=l(IT(),1),PQ=l(N(),1);function RQ(e,t){for(let o of new I3.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 PT(e)}function Sd(e,t,o){let r=new I3.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function OQ(e){return!e||e.length===0?[]:PT(e)?e:[{name:"default",label:(0,PQ._x)("Default","block style"),isDefault:!0},...e]}function PT(e){return e?.find(t=>t.isDefault)}function hEe(e,t){return(0,AQ.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,xd.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,xd.cloneBlock)(e)},[e,t?.example,t?.name])}function Xg({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:h}=m(x),p=h(e);if(!p)return{};let g=(0,xd.getBlockType)(p.name),{getBlockStyles:b}=m(xd.store);return{block:g?.example?null:p,blockType:g,styles:b(p.name),className:p.attributes.className||""}},{styles:r,block:n,blockType:i,className:s}=(0,RT.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,RT.useDispatch)(x),c=OQ(r),u=RQ(c,s),d=hEe(n,i);return{onSelect:m=>{let h=Sd(s,u,m);a(e,{className:h}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var Z_=l(Y(),1),Y_=l(F(),1),DT=l(O(),1);function LQ(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 Do=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var DQ=l(uy(),1);var gEe="1600px",bEe="320px",kEe=1,vEe=.25,yEe=.75,_Ee="14px";function NQ({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=bEe,maximumViewportWidth:n=gEe,scaleFactor:i=kEe,minimumFontSizeLimit:s}){if(s=Va(s)?s:_Ee,o){let y=Va(o);if(!y?.unit||!y?.value)return null;let _=Va(s,{coerceTo:y.unit});if(_?.value&&!e&&!t&&y?.value<=_?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let S=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(S),vEe),yEe),B=H_(y.value*C,3);_?.value&&B<_?.value?e=`${_.value}${_.unit}`:e=`${B}${y.unit}`}}let a=Va(e),c=a?.unit||"rem",u=Va(t,{coerceTo:c});if(!a||!u)return null;let d=Va(e,{coerceTo:"rem"}),f=Va(n,{coerceTo:c}),m=Va(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=H_(m.value/100,3),g=H_(p,3)+c,b=100*((u.value-a.value)/h),v=H_((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function Va(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:H_(d,3),unit:u}:null}function H_(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function P3(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function SEe(e){let t=e?.typography??{},o=e?.layout,r=Va(o?.wideSize)?o?.wideSize:null;return P3(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function cc(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!P3(t?.typography)&&!P3(e))return o;let r=SEe(t)?.fluid??{},n=NQ({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 Fa="body",G_=":root",OT=[{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)=>cc(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function qs(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 MQ(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=qs(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=qs(e,s)}))}),o}function VQ(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function FQ(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 xEe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,DQ.getCSSValueFromRawStyle)(Do(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function wEe(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 Qg(e,t){if(!e||!t)return e;let o=xEe(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=wEe(o.url,t?._links?.["wp:theme-file"])),o}function zQ(e,t,o=[],r="slug",n){let i=[t?Do(e,["blocks",t,...o]):void 0,Do(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"||zQ(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function CEe(e,t,o,[r,n]=[]){let i=OT.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=zQ(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return Dr(e,t,c)}return o}function BEe(e,t,o,r=[]){let n=(t?Do(e?.settings??{},["blocks",t,"custom",...r]):void 0)??Do(e?.settings??{},["custom",...r]);return n?Dr(e,t,n):o}function Dr(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=Do(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"?CEe(e,t,o,c):a==="custom"?BEe(e,t,o,c):o}var tn=l(Y(),1),$_=l(uy(),1),ZQ=l(F(),1);function ni(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 Do(i,`${c}.root`,null)||Do(i,c,null)||m;let h=s?Do(s,`${c}.__experimentalSelector`,null):void 0;return h?qs(u,h):m}let f;return a&&(f=Do(i,c,null)),f||(r?ni(e,d[0],o):null)}function eb(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 O3(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function zEe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function A3(e,t="0"){let o=zEe(e);if(!o)return null;let r=O3(o?.top)||t,n=O3(o?.left)||t;return r===n?r:`${r} ${n}`}var GQ={backgroundSize:"cover",backgroundPosition:"50% 50%"};function WQ(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:GQ.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:GQ.backgroundPosition}),t}var $Q={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 jEe={button:"wp-element-button",caption:"wp-element-caption"},UEe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function HEe(e="*",t={}){return OT.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=Do(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${eb(c)}-${u}`,m=e.split(",").map(p=>`${p}${f}`).join(","),h=`var(--wp--preset--${n}--${eb(c)})`;o+=`${m}{${d}: ${h} !important;}`})})}),o},"")}function GEe(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var KQ=(e,t,o)=>{if(o!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",s=".wp-block-paragraph";if(i in e){let a=e[i],c={...e};return delete c[i],c[s]=a,c}return e},YQ=(e,t)=>{let o=".wp-block-button";if(!(o in e))return e;let r={...e};return r[o]=r[o].map(n=>{let i=n.match(/^width:\s*(.+)$/);if(!i)return n;let s=i[1],a=null;s.endsWith("%")&&(a=parseFloat(s));let c="var(--wp--preset--dimension--";if(a===null&&s.startsWith(c)&&s.endsWith(")")){let u=s.slice(c.length,-1),d={...t?.dimensions?.dimensionSizes??{},...t?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(let f of Object.values(d))if(Array.isArray(f)){for(let m of f)if(m.slug===u&&typeof m.size=="string"&&m.size.endsWith("%")){a=parseFloat(m.size);break}if(a!==null)break}}return a===null||isNaN(a)?n:`width: calc(${a} * 1% - (var(--wp--style--block-gap, 0.5em) * (1 - ${a} / 100)))`}),r},qQ=(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=tb(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=tb(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function tb(e={},t="",o,r={},n=!1){let i=Fa===t,s=Object.entries(tn.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return c;let p=d;if(p[0]==="elements"||m)return c;let g=Do(e,p);if(u==="--wp--style--root--padding"&&(typeof g=="string"||!o))return c;if(f&&typeof g!="string")Object.entries(f).forEach(b=>{let[v,k]=b;if(!Do(g,[k],!1))return;let y=v.startsWith("--")?v:eb(v);c.push(`${y}: ${(0,$_.getCSSValueFromRawStyle)(Do(g,[k]))}`)});else if(Do(e,p,!1)){let b=u.startsWith("--")?u:eb(u);c.push(`${b}: ${(0,$_.getCSSValueFromRawStyle)(Do(e,p))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Qg(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...WQ(e.background)}})),(0,$_.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:eb(c.key),d=Qg(c.value,r);u==="font-size"&&(d=cc({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function L3({layoutDefinitions:e=$Q,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?A3(t?.spacing?.blockGap):"";if(n&&(o===Fa?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(([h,p])=>{m.push(`${h}: ${p||a}`)}),m.length){let h="";r?h=o===Fa?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:h=o===Fa?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),o===Fa&&r&&(s+=`${G_} { --wp--style--block-gap: ${a}; }`)),o===Fa&&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 h=[];if(m.rules&&Object.entries(m.rules).forEach(([p,g])=>{h.push(`${p}: ${g}`)}),h.length){let p=`.${u}${m?.selector||""}`;s+=`${p} { ${h.join("; ")}; }`}})})}return s}var WEe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function AT(e){if(!e)return{};let r=Object.entries(e).filter(([n])=>WEe.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(r)}var $Ee=(e,t)=>{let o=[];if(!e?.styles)return o;let r=AT(e.styles);return r&&o.push({styles:r,selector:Fa,skipSelectorWrapper:!0}),Object.entries(tn.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!jEe[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=AT(i),a=i,c=[];if(a?.variations){let u={};Object.entries(a.variations).forEach(([d,f])=>{let m=f;u[d]=AT(m),m?.css&&(u[d].css=m.css);let h=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;Object.entries(m?.elements??{}).forEach(([p,g])=>{g&&tn.__EXPERIMENTAL_ELEMENTS[p]&&c.push({styles:g,selector:qs(h,tn.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(m?.blocks??{}).forEach(([p,g])=>{let b=typeof t!="string"?qs(h,t[p]?.selector):void 0,v=typeof t!="string"?qs(h,t[p]?.duotoneSelector):void 0,k=typeof t!="string"?MQ(h,t[p]?.featureSelectors??{}):void 0,y=AT(g);g?.css&&(y.css=g.css),!(!b||typeof t=="string")&&(c.push({selector:b,duotoneSelector:v,featureSelectors:k,fallbackGapValue:t[p]?.fallbackGapValue,hasLayoutSupport:t[p]?.hasLayoutSupport,styles:y}),Object.entries(g.elements??{}).forEach(([_,S])=>{S&&tn.__EXPERIMENTAL_ELEMENTS[_]&&c.push({styles:S,selector:qs(b,tn.__EXPERIMENTAL_ELEMENTS[_])})}))})}),s.variations=u}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,name:n}),Object.entries(a?.elements??{}).forEach(([u,d])=>{typeof t!="string"&&d&&t?.[n]&&tn.__EXPERIMENTAL_ELEMENTS[u]&&o.push({styles:d,selector:t[n]?.selector.split(",").map(f=>tn.__EXPERIMENTAL_ELEMENTS[u].split(",").map(h=>f+" "+h)).join(",")})}),o.push(...c)}),o},KEe=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return OT.forEach(({path:c})=>{let u=Do(s,c,!1);u!==!1&&(a=LQ(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:G_}),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,featureSelectors:t[s]?.featureSelectors})}),o};var LT=(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=$Ee(e,t),u=KEe(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},h=a.marginReset||a.rootPadding||a.layoutStyles,p="";if(a.presets&&(f||m)&&(p+=`${G_} {`,p=f?p+` --wp--style--global--content-size: ${f};`:p,p=m?p+` --wp--style--global--wide-size: ${m};`:p,p+="}"),h&&(p+=":where(body) {margin: 0;",a.rootPadding&&d&&(p+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) } |
| 85 |
.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } |
| 86 |
.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); } |
| 87 |
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; } |
| 88 |
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0; |
| 89 |
`),p+="}"),a.blockStyles&&c.forEach(({selector:g,duotoneSelector:b,styles:v,fallbackGapValue:k,hasLayoutSupport:y,featureSelectors:_,styleVariationSelectors:S,skipSelectorWrapper:C,name:B})=>{if(_){let E=qQ(_,v);E=KQ(E,e.settings,B),E=YQ(E,e.settings),Object.entries(E).forEach(([L,T])=>{if(T.length){let P=T.join(";");p+=`:root :where(${L}){${P};}`}})}if(b){let E={};v?.filter&&(E.filter=v.filter,delete v.filter);let L=tb(E);L.length&&(p+=`${b}{${L.join(";")};}`)}!n&&(Fa===g||y)&&(p+=L3({style:v,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:k}));let R=tb(v,g,d,e,i);if(R?.length){let E=C?g:`:root :where(${g})`;p+=`${E}{${R.join(";")};}`}v?.css&&(p+=K_(v.css,`:root :where(${g})`)),a.variationStyles&&S&&Object.entries(S).forEach(([E,L])=>{let T=v?.variations?.[E];if(T){if(_){let D=qQ(_,T);D=KQ(D,e.settings,B),D=YQ(D,e.settings),Object.entries(D).forEach(([j,H])=>{if(H.length){let z=GEe(j,L),U=H.join(";");p+=`:root :where(${z}){${U};}`}})}let P=tb(T,L,d,e);if(P.length&&(p+=`:root :where(${L}){${P.join(";")};}`),T?.css&&(p+=K_(T.css,`:root :where(${L})`)),y&&T?.spacing?.blockGap){let D=L+g;p+=L3({style:T,selector:D,hasBlockGapSupport:!0,hasFallbackGapSupport:r,fallbackGapValue:k})}}});let I=Object.entries(v).filter(([E])=>E.startsWith(":"));I?.length&&I.forEach(([E,L])=>{let T=tb(L);if(!T?.length)return;let D=`:root :where(${g.split(",").map(j=>j+E).join(",")}){${T.join(";")};}`;p+=D})}),a.layoutStyles&&(p=p+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p=p+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p=p+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let g=A3(e?.styles?.spacing?.blockGap)||"0.5em";p=p+`:root :where(.wp-site-blocks) > * { margin-block-start: ${g}; margin-block-end: 0; }`,p=p+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",p=p+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&u.forEach(({selector:g,presets:b})=>{(Fa===g||G_===g)&&(g="");let v=HEe(g,b);v.length>0&&(p+=v)}),p};var YEe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(UEe).forEach(([r,n])=>{let i=ni(e,r);i&&(o[n]=i)}),o},NT=(e,t)=>{let{getBlockStyles:o}=(0,ZQ.select)(tn.store),r={};return e.forEach(n=>{let i=n.name,s=ni(n);if(!s)return;let a=ni(n,"filter.duotone");if(!a){let h=ni(n),p=(0,tn.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof p=="string"&&h&&(a=qs(h,p))}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=o(i),f={};d?.forEach(h=>{let p=t?`-${t}`:"",g=`${h.name}${p}`,b=FQ(g,s);f[g]=b});let m=YEe(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 K_(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(" ")?qs(t,f):VQ(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var q_=l(w(),1),N3="is-style-";function XQ(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(N3)){let r=o.slice(N3.length);r!=="default"&&t.push(r)}return t},[]):[]}function D3(e,t=[]){let o=XQ(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function qEe({override:e}){uc(e)}function M3({config:e}){let{overrides:t}=(0,Y_.useSelect)(n=>({overrides:M(n(x)).getStyleOverrides()}),[]),{getBlockName:o}=(0,Y_.useSelect)(x),r=(0,DT.useMemo)(()=>{if(!t?.length)return;let n=[],i=[];for(let[,s]of t)if(s?.variation&&s?.clientId&&!i.includes(s.clientId)){let a=o(s.clientId),c=e?.styles?.blocks?.[a]?.variations?.[s.variation];if(c){let u={settings:e?.settings,styles:{blocks:{[a]:{variations:{[`${s.variation}-${s.clientId}`]:c}}}}},d=NT((0,Z_.getBlockTypes)(),s.clientId),g=LT(u,d,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});n.push({id:`${s.variation}-${s.clientId}`,css:g,__unstableType:"variation",variation:s.variation,clientId:s.clientId}),i.push(s.clientId)}}return n},[e,t,o]);return!r||!r.length?null:(0,q_.jsx)(q_.Fragment,{children:r.map(n=>(0,q_.jsx)(qEe,{override:n},n.id))})}function V3(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=Bl(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 ZEe(e,t,o){let{globalSettings:r,globalStyles:n}=(0,Y_.useSelect)(i=>{let s=i(x).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[Bi]}},[]);return(0,DT.useMemo)(()=>{let i=V3({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function XEe({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,Y_.useSelect)(Z_.store),n=r(e),i=D3(t,n),s=`${N3}${i}-${o}`,{settings:a,styles:c}=ZEe(e,i,o),u=(0,DT.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=NT((0,Z_.getBlockTypes)(),o);return LT(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 uc({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var QQ={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>XQ(e).length>0,useBlockProps:XEe};var wd=l(w(),1),QEe=(0,wd.jsxs)(Zs.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,wd.jsx)(Zs.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,wd.jsx)(Zs.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 JEe({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=Xg({clientId:e}),{updateBlockAttributes:n}=(0,MT.useDispatch)(x),{globalSettings:i,globalStyles:s,blockName:a}=(0,MT.useSelect)(d=>{let f=d(x).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[Bi],blockName:d(x).getBlockName(e)}},[e]),c=o?.name?V3({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,wd.jsx)(Zs.ToolbarGroup,{children:(0,wd.jsx)(Zs.ToolbarButton,{onClick:()=>{let f=(t.findIndex(p=>p.name===o.name)+1)%t.length,m=t[f],h=Sd(r,o,m);n(e,{className:h})},label:(0,JQ.__)("Shuffle styles"),children:(0,wd.jsx)(Zs.Icon,{icon:QEe,style:{fill:c||"transparent"}})})})}var eJ=JEe;var zT=l(A(),1),F3=l(N(),1),tJ=l(F(),1),jT=l(Y(),1);var VT=l(F(),1);function FT(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,VT.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:h}=M(u(x)),p=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:h(e),isEditingContentOnlySection:p===e,editedContentOnlySection:p}},[e]),s=(0,VT.useDispatch)(x),{editContentOnlySection:a,stopEditingContentOnlySection:c}=M(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var z3=l(w(),1);function oJ({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=FT(e),i=(0,tJ.useSelect)(c=>{if(!e)return null;let{getBlockName:u}=c(x),d=u(e);return d?{name:d}:null},[e]);if(!e||!t&&!o||(0,jT.isReusableBlock)(i)||(0,jT.isTemplatePart)(i))return null;let s=o;return(0,z3.jsx)(zT.ToolbarGroup,{children:(0,z3.jsx)(zT.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,F3.__)("Exit pattern"):(0,F3.__)("Edit pattern")})})}var IJ=l(A(),1),PJ=l(N(),1),RJ=l(F(),1);var tS=l(Y(),1),OJ=l(vh(),1);var za=l(N(),1),ja=l(A(),1),Bd=l(Y(),1),qT=l(F(),1);var cJ=l(N(),1),Q_=l(A(),1),HT=l(Y(),1),GT=l(O(),1);var rJ=l(A(),1),nJ=l(Q(),1);var X_=l(w(),1);function Cd({blocks:e,placement:t="right-start",offset:o=16,anchor:r}){return(0,nJ.useViewportMatch)("medium","<")?null:(0,X_.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,X_.jsx)(rJ.Popover,{className:"block-editor-block-switcher__popover-preview",placement:t,focusOnMount:!1,offset:o,anchor:r,children:(0,X_.jsx)("div",{className:"block-editor-block-switcher__preview",children:(0,X_.jsx)(wn,{viewportWidth:601,blocks:e})})})})}var iJ=l(A(),1),ob=l(Y(),1),sJ=l(F(),1),UT=l(O(),1);var dc=l(w(),1),eTe={};function aJ({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,sJ.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(x),{getActiveBlockVariation:c,getBlockVariations:u}=i(ob.store),d=a(e);if(t.length!==1||!d)return eTe;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,UT.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var tTe=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,UT.useState)();return(0,dc.jsxs)(dc.Fragment,{children:[r&&(0,dc.jsx)(Cd,{blocks:(0,ob.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,dc.jsx)(oTe,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function oTe({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,dc.jsxs)(iJ.MenuItem,{className:(0,ob.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,dc.jsx)(Oe,{icon:n,showColors:!0}),i]})}var lJ=tTe;var In=l(w(),1);function rTe(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,GT.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 nTe=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,GT.useState)(),{priorityTextTransformations:c,restTransformations:u}=rTe(t),d=c.length&&u.length,f=!!u.length&&(0,In.jsx)(iTe,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,In.jsxs)(In.Fragment,{children:[(0,In.jsxs)(Q_.MenuGroup,{label:(0,cJ.__)("Transform to"),className:e,children:[s&&(0,In.jsx)(Cd,{blocks:(0,HT.switchToBlockType)(i,s)}),!!o?.length&&(0,In.jsx)(lJ,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,In.jsx)(uJ,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,In.jsx)(Q_.MenuGroup,{className:e,children:f})]})};function iTe({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,In.jsx)(uJ,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function uJ({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,In.jsxs)(Q_.MenuItem,{className:(0,HT.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,In.jsx)(Oe,{icon:n,showColors:!0}),i]})}var dJ=nTe;var pJ=l(N(),1),hJ=l(A(),1),$T=l(O(),1);var WT=l(A(),1);var rb=l(w(),1),fJ=()=>{};function mJ({stylesToRender:e,activeStyle:t,onSelect:o=fJ,onHoverStyle:r=fJ}){return!e||e.length===0?null:(0,rb.jsx)(rb.Fragment,{children:e.map(n=>{let i=n.label||n.name;return(0,rb.jsx)(WT.MenuItem,{icon:t.name===n.name?Cs:null,onClick:()=>o(n),onFocus:()=>r(n),onBlur:()=>r(null),onMouseEnter:()=>r(n),onMouseLeave:()=>r(null),children:(0,rb.jsx)(WT.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:i})},n.name)})})}var J_=l(w(),1);function KT({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e,[r,n]=(0,$T.useState)(null),{onSelect:i,stylesToRender:s,activeStyle:a,genericPreviewBlock:c,className:u}=Xg({clientId:o,onSwitch:t}),d=(0,$T.useMemo)(()=>{if(!r||!c)return null;let f=Sd(u,a,r);return[{...c,attributes:{...c.attributes||{},className:f}}]},[r,c,u,a]);return!s||s.length===0?null:(0,J_.jsxs)(hJ.MenuGroup,{label:(0,pJ.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:[d&&(0,J_.jsx)(Cd,{blocks:d}),(0,J_.jsx)(mJ,{stylesToRender:s,activeStyle:a,onSelect:i,onHoverStyle:n})]})}var U3=l(N(),1),_J=l(O(),1),YT=l(Q(),1);var Xs=l(A(),1);var kJ=l(O(),1),vJ=l(Y(),1);var gJ=l(Y(),1),j3=(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=j3(s,t,o);if(a)return a}}},bJ=(e,t)=>{let o=(0,gJ.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var sTe=(e,t)=>{let o=bJ(t.name,t.attributes);e.attributes={...e.attributes,...o}},aTe=(e,t)=>{let o=t.map(n=>(0,vJ.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=j3(s,n.name,r);if(a){i=!0,r.add(a.clientId),sTe(a,n);break}}if(!i)return}return o},lTe=(e,t)=>(0,kJ.useMemo)(()=>e.reduce((o,r)=>{let n=aTe(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),yJ=lTe;var Sr=l(w(),1);function cTe({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,_J.useState)(!1),i=yJ(t,e);return i.length?(0,Sr.jsxs)(Xs.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,Sr.jsx)(uTe,{patterns:i,onSelect:o}),(0,Sr.jsx)(Xs.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Uo,children:(0,U3.__)("Patterns")})]}):null}function uTe({patterns:e,onSelect:t}){let o=(0,YT.useViewportMatch)("medium","<");return(0,Sr.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,Sr.jsx)(Xs.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,Sr.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,Sr.jsx)(dTe,{patterns:e,onSelect:t})})})})}function dTe({patterns:e,onSelect:t}){return(0,Sr.jsx)(Xs.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,U3.__)("Patterns list"),children:e.map(o=>(0,Sr.jsx)(SJ,{pattern:o,onSelect:t},o.name))})}function SJ({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,YT.useInstanceId)(SJ,`${o}-list__item-description`);return(0,Sr.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,Sr.jsxs)(Xs.Composite.Item,{render:(0,Sr.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,Sr.jsx)(wn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,Sr.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,Sr.jsx)(Xs.VisuallyHidden,{id:r,children:e.description})]})}var xJ=cTe;var ii=l(w(),1);function fTe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,qT.useDispatch)(x),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,qT.useSelect)(R=>{let{getBlockAttributes:I,getBlocksByClientId:E,getBlockRootClientId:L,getBlockTransformItems:T,__experimentalGetPatternTransformItems:P,canRemoveBlocks:D,getBlockName:j}=R(x),{getBlockStyles:H}=R(Bd.store),z=L(t[0]),U=E(t),G=t.length===1,W=G&&j(t[0]),J=G&&!!H(W)?.length;return{blocks:U,possibleBlockTransformations:T(U,z),patterns:P(U,z),isUsingBindings:t.every(ce=>!!I(ce)?.metadata?.bindings),canRemove:D(t),hasBlockStyles:J}},[t]),f=aJ({clientIds:t,blocks:a});function m(R){R.length>1&&r(R[0].clientId,R[R.length-1].clientId)}function h(R){let I=(0,Bd.switchToBlockType)(a,R);o(t,I),m(I)}function p(R){n(a[0].clientId,{...f.find(({name:I})=>I===R).attributes})}function g(R){o(t,R),m(R)}let b=a.length===1,v=b&&((0,Bd.isTemplatePart)(a[0])||(0,Bd.isReusableBlock)(a[0])),k=!!i?.length&&u&&!v,y=!!f?.length,_=!!s?.length&&u,S=k||y;if(!(d||S||_))return(0,ii.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,za.__)("No transforms.")});let B=b?(0,za._x)("This block is connected.","block toolbar button label and description"):(0,za._x)("These blocks are connected.","block toolbar button label and description");return(0,ii.jsxs)("div",{className:"block-editor-block-switcher__container",children:[_&&(0,ii.jsx)(xJ,{blocks:a,patterns:s,onSelect:R=>{g(R),e()}}),S&&(0,ii.jsx)(dJ,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:R=>{h(R),e()},onSelectVariation:R=>{p(R),e()}}),d&&(0,ii.jsx)(KT,{hoveredBlock:a[0],onSwitch:e}),c&&(0,ii.jsx)(ja.MenuGroup,{children:(0,ii.jsx)(ja.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:B})})]})}var mTe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,za.__)("Change block type or style"):(0,za.sprintf)((0,za._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,ii.jsx)(ja.ToolbarGroup,{children:(0,ii.jsx)(ja.ToolbarItem,{children:s=>(0,ii.jsx)(ja.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,ii.jsx)(fTe,{onClose:a,clientIds:t})})})})},wJ=mTe;var CJ=l(N(),1),ib=l(A(),1);var nb=l(w(),1);function BJ({clientIds:e,children:t,label:o,text:r}){return(0,nb.jsx)(ib.ToolbarGroup,{children:(0,nb.jsx)(ib.ToolbarItem,{children:n=>(0,nb.jsx)(ib.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:t,text:r,toggleProps:{description:(0,CJ.__)("Change block style"),...n},menuProps:{orientation:"both"},children:({onClose:i})=>(0,nb.jsx)("div",{className:"block-editor-block-switcher__container",children:(0,nb.jsx)(KT,{hoveredBlock:{clientId:e[0]},onSwitch:i})})})})})}var sb=l(A(),1),eS=l(N(),1),ZT=l(O(),1),EJ=l(F(),1);var fc=l(w(),1);function pTe({clientIds:e,blockTitle:t}){let o=(0,EJ.useSelect)(i=>{let{getBlockAttributes:s}=i(x);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,eS.sprintf)((0,eS.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,eS.__)("These blocks are editable using overrides."),(0,fc.jsx)(sb.__experimentalText,{children:n})}function TJ({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,ZT.useState)(!1),s=(0,ZT.useRef)();return(0,fc.jsxs)(fc.Fragment,{children:[(0,fc.jsx)(sb.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,fc.jsx)(sb.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,fc.jsx)(pTe,{clientIds:t,blockTitle:o})})]})}var ab=l(w(),1);function hTe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:c}=M(e(x)),{getBlockStyles:u}=e(tS.store),d=t.some(I=>s(I)==="contentOnly"),f=t.length===1,m=f&&o(t[0]),h=f&&!!u(m)?.length,p=t.some(I=>!!r(I)?.metadata?.patternName),g=t.every(I=>mv(r(I)?.metadata?.bindings)),b=t.every(I=>n(I,"core/block",!0).length>0),v=i(t),k=t.every(I=>c(I)),y=a(t[0]),_=y==="default",S=y==="contentOnly",B=!p&&_&&(h||v)&&!d&&k,R=g&&b;return B?"switcher":S&&h&&!g&&k?"styles-only":R?"pattern-overrides":"default"}function gTe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=M(e(x)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName)return Pi;let a=o(i),c=(0,tS.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(tS.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:Wf}function AJ({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,RJ.useSelect)(f=>({icon:gTe({select:f,clientIds:e}),showIconLabels:f(OJ.store).get("core","showIconLabels"),variant:hTe({select:f,clientIds:e})}),[e]),i=vr({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,PJ.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,ab.jsx)(Oe,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,ab.jsx)(wJ,{clientIds:e,label:c,text:u,children:d}):n==="styles-only"?(0,ab.jsx)(BJ,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,ab.jsx)(TJ,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,ab.jsx)(IJ.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var rt=l(w(),1);function G3({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:h,hasContentOnlyLocking:p,showShuffleButton:g,showSlots:b,showGroupButtons:v,showLockButtons:k,showBlockVisibilityButton:y,showSwitchSectionStyleButton:_,areSelectedBlocksHiddenOnViewport:S,canEdit:C}=(0,NJ.useSelect)(H=>{let{canEditBlock:z}=H(x),{getBlockName:U,getBlockMode:G,getBlockParents:W,getSelectedBlockClientIds:J,isBlockValid:ce,getBlockEditingMode:te,getBlockAttributes:ne,getSettings:X,getTemplateLock:q,getParentSectionBlock:ee,isZoomOut:$,isSectionBlock:oe,isBlockHiddenAtViewport:ie}=M(H(x)),K=J(),ae=K[0],ge=W(ae),xe=ee(ae)??ge[ge.length-1],Ve=U(xe),at=(0,mc.getBlockType)(Ve),Lt=te(ae),no=Lt==="default",jo=U(ae),lt=K.every(ze=>ce(ze)),ur=K.every(ze=>G(ze)==="visual"),$t=K.every(ze=>!!ne(ze)?.metadata?.bindings),io=K.some(ze=>q(ze)==="contentOnly"),Ue=$(),Kt=oe(ae),Je=z(ae),He=Je&&(Ue||Kt),dr=X()?.[Ei]?.toLowerCase()||"desktop",pn=K.length>0&&K.every(ze=>ie(ze,dr));return{blockClientId:ae,blockClientIds:K,isDefaultEditingMode:no,blockType:ae&&(0,mc.getBlockType)(jo),shouldShowVisualToolbar:lt&&ur,toolbarKey:`${ae}${xe}`,showParentSelector:!Ue&&at&&Lt!=="contentOnly"&&te(xe)!=="disabled"&&(0,mc.hasBlockSupport)(at,"__experimentalParentSelector",!0)&&K.length===1,isUsingBindings:$t,isSectionContainer:Kt,hasContentOnlyLocking:io,showShuffleButton:Ue,showSlots:!Ue,showGroupButtons:!Ue,showLockButtons:!Ue,showBlockVisibilityButton:!Ue,showSwitchSectionStyleButton:He,areSelectedBlocksHiddenOnViewport:pn,canEdit:Je}},[]),B=(0,H3.useRef)(null),R=(0,H3.useRef)(),I=jg({ref:R}),E=!(0,DJ.useViewportMatch)("medium","<");if(!ET())return null;let T=s.length>1,P=(0,mc.isReusableBlock)(c)||(0,mc.isTemplatePart)(c),D=V("block-editor-block-contextual-toolbar",{"has-parent":f}),j=V("block-editor-block-toolbar",{"is-synced":P,"is-connected":m});return(0,rt.jsx)(qg,{focusEditorOnEscape:!0,className:D,"aria-label":(0,LJ.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,rt.jsxs)("div",{ref:B,className:j,children:[f&&!T&&E&&(0,rt.jsx)(iX,{}),(d||T)&&(0,rt.jsx)("div",{ref:R,...I,children:(0,rt.jsxs)(MJ.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,rt.jsx)(AJ,{clientIds:s,isSynced:P}),a&&y&&(0,rt.jsx)(x5,{clientIds:s}),!T&&a&&k&&(0,rt.jsx)(v3,{clientId:i}),(0,rt.jsx)(ZE,{clientIds:s,hideDragHandle:e})]})}),!S&&!p&&d&&T&&v&&(0,rt.jsx)(p3,{}),!T&&C&&(0,rt.jsx)(oJ,{clientId:s[0]}),!S&&g&&(0,rt.jsx)(TQ,{clientId:s[0]}),!S&&_&&(0,rt.jsx)(eJ,{clientId:s[0]}),!S&&d&&b&&(0,rt.jsxs)(rt.Fragment,{children:[!h&&(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)(Mt.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,rt.jsx)(Mt.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,rt.jsx)(Mt.Slot,{className:"block-editor-block-toolbar__slot"}),(0,rt.jsx)(Mt.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,rt.jsx)(Mt.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,rt.jsx)(tT.Slot,{})]}),(0,rt.jsx)(bQ,{clientIds:s}),(0,rt.jsx)(ST,{clientIds:s})]})},u)}function VJ({hideDragHandle:e,variant:t}){return(0,rt.jsx)(G3,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var W3=l(w(),1);function jJ({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=jE(e),s=(0,lb.useRef)();(0,lb.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,FJ.useDispatch)(x),c=(0,lb.useRef)(!1);(0,zJ.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,lb.useEffect)(()=>{c.current=!1});let u=r||e,d=zE({contentElement:o?.current,clientId:u});return!t&&(0,W3.jsx)(Lm,{clientId:u,bottomClientId:i,className:V("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,W3.jsx)(G3,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var XT=l(F(),1),QT=l(O(),1);var UJ=l(A(),1);var HJ=l(N(),1),GJ=l(w(),1);function bTe({onClick:e}){return(0,GJ.jsx)(UJ.Button,{variant:"primary",icon:Ii,size:"compact",className:V("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,HJ._x)("Add pattern","Generic label for pattern inserter button")})}var WJ=bTe;var $3=l(w(),1);function kTe(){let[e,t]=(0,QT.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,XT.useSelect)(p=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:v,getSelectedBlockClientId:k,getSectionRootClientId:y,getBlockInsertionPoint:_,isBlockInsertionPointVisible:S}=M(p(x)),C=y();return{hasSelection:!!v().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:k(),blockInsertionPoint:_(),insertionPointVisible:S()}},[]),{showInsertionPoint:u}=M((0,XT.useDispatch)(x));if((0,QT.useEffect)(()=>{let p=setTimeout(()=>{t(!0)},500);return()=>{clearTimeout(p)}},[]),!e||!o)return null;let d=s,m=r.findIndex(p=>s===p)+1,h=r[m];return c&&a?.index===m?null:(0,$3.jsx)(pE,{previousClientId:d,nextClientId:h,children:(0,$3.jsx)(WJ,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var $J=kTe;var KJ=l(F(),1),YJ=l(Y(),1);function qJ(){return(0,KJ.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=M(e(x)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,YJ.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,h=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:h}},[])}var Ji=l(w(),1);function vTe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=M(e(x));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a()}}function oS({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:c}=(0,cb.useSelect)(vTe,[]),u=(0,ZJ.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:f,getBlockRootClientId:m,getBlockEditingMode:h,getBlockName:p,isGroupable:g,getEditedContentOnlySection:b,canEditBlock:v}=M((0,cb.useSelect)(x)),{getGroupingBlockName:k}=(0,cb.useSelect)(ub.store),{showEmptyBlockSideInserter:y,showBlockToolbarPopover:_}=qJ(),S=Hg(),[C,B]=(0,JT.useState)(null),{canRename:R}=Zm(p(f()[0])),{duplicateBlocks:I,removeBlocks:E,replaceBlocks:L,insertAfterBlock:T,insertBeforeBlock:P,selectBlock:D,moveBlocksUp:j,moveBlocksDown:H,expandBlock:z,stopEditingContentOnlySection:U,showViewportModal:G,hideViewportModal:W}=M((0,cb.useDispatch)(x));function J(ne){if(!ne.defaultPrevented){if(u("core/block-editor/move-up",ne)||u("core/block-editor/move-down",ne)){let X=f();if(X.length){ne.preventDefault();let q=m(X[0]);(u("core/block-editor/move-up",ne)?"up":"down")==="up"?j(X,q):H(X,q);let $=Array.isArray(X)?X.length:1,oe=(0,db.sprintf)((0,db._n)("%d block moved.","%d blocks moved.",X.length),$);(0,q3.speak)(oe)}}else if(u("core/block-editor/duplicate",ne)){let X=f();X.length&&(ne.preventDefault(),I(X))}else if(u("core/block-editor/remove",ne)){let X=f();X.length&&(ne.preventDefault(),E(X))}else if(u("core/block-editor/paste-styles",ne)){let X=f();if(X.length){ne.preventDefault();let q=d(X);S(q)}}else if(u("core/block-editor/insert-after",ne)){let X=f();X.length&&(ne.preventDefault(),T(X[X.length-1]))}else if(u("core/block-editor/insert-before",ne)){let X=f();X.length&&(ne.preventDefault(),P(X[0]))}else if(u("core/block-editor/unselect",ne)){if(ne.target.closest("[role=toolbar]"))return;let X=f();X.length>1&&(ne.preventDefault(),D(X[0]))}else if(u("core/block-editor/collapse-list-view",ne)){if((0,K3.isTextField)(ne.target)||(0,K3.isTextField)(ne.target?.contentWindow?.document?.activeElement))return;ne.preventDefault(),z(r)}else if(u("core/block-editor/group",ne)){let X=f();if(X.length>1&&g(X)){ne.preventDefault();let q=d(X),ee=k(),$=(0,ub.switchToBlockType)(q,ee);L(X,$),(0,q3.speak)((0,db.__)("Selected blocks are grouped."))}}else if(u("core/block-editor/rename",ne)){let X=f();if(X.length===1){let q=h(X[0])==="contentOnly";R&&!q&&v(X[0])&&(ne.preventDefault(),B(X[0]))}}else if(u("core/block-editor/toggle-block-visibility",ne)){let X=f();if(X.length){if(ne.preventDefault(),!d(X).every($=>(0,ub.hasBlockSupport)($.name,"visibility",!0))||X.some($=>h($)!=="default"||!v($)))return;G(X)}}u("core/block-editor/stop-editing-as-blocks",ne)&&b()&&U()}}let ce=Am(t),te=Am(t);return(0,Ji.jsxs)("div",{...o,onKeyDown:J,className:V(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,Ji.jsxs)(Ng.Provider,{value:(0,JT.useRef)(!1),children:[!i&&!s&&(0,Ji.jsx)(Bq,{__unstableContentRef:t}),y&&(0,Ji.jsx)(UZ,{__unstableContentRef:t,clientId:r}),_&&(0,Ji.jsx)(jJ,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,Ji.jsx)(Y3.Popover.Slot,{name:"block-toolbar",ref:ce}),e,(0,Ji.jsx)(Y3.Popover.Slot,{name:"__unstable-block-tools-after",ref:te}),s&&!a&&(0,Ji.jsx)($J,{__unstableContentRef:t})]}),C&&(0,Ji.jsx)(Ym,{clientId:C,onClose:()=>B(null)}),c&&(0,Ji.jsx)(v5,{clientIds:c,onClose:W})]})}var es=l(N(),1),Ua=l(Y(),1),pc=l(F(),1),Z3=l(QJ(),1);var yTe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,pc.useDispatch)(x),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,pc.useSelect)(h=>{let{getBlockRootClientId:p,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:v,canRemoveBlocks:k}=h(x),y=b(),_=v(y);if(_.filter(C=>!C).length>0)return{invalidSelection:!0};let S=p(y[0]);return{blocks:_,clientIds:y,possibleBlockTransformations:g(_,S),canRemove:k(y),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let c=r.length===1&&(0,Ua.isTemplatePart)(r[0]);function u(h){h.length>1&&o(h[0].clientId,h[h.length-1].clientId)}function d(h){let p=(0,Ua.switchToBlockType)(r,h);t(n,p),u(p)}let f=!!s.length&&i&&!c;return!n||n.length<1||!f?{isLoading:!1,commands:[]}:{isLoading:!1,commands:s.map(h=>{let{name:p,title:g,icon:b}=h,v=!b?.src||b?.src==="block-default"?{src:_v}:b;return{name:"core/block-editor/transform-to-"+p.replace("/","-"),label:(0,es.sprintf)((0,es.__)("Transform to %s"),g),icon:v?.src,category:"command",callback:({close:k})=>{d(p),k()}}})}},_Te=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,pc.useSelect)(P=>{let{getSelectedBlockClientIds:D,isUngroupable:j,isGroupable:H}=P(x);return{clientIds:D(),isUngroupable:j(),isGroupable:H()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,isBlockHiddenAnywhere:c}=M((0,pc.useSelect)(x)),{getBlockEditingMode:u}=(0,pc.useSelect)(x),{getDefaultBlockName:d,getGroupingBlockName:f}=(0,pc.useSelect)(Ua.store),m=s(t),h=(0,pc.useDispatch)(x),{removeBlocks:p,replaceBlocks:g,duplicateBlocks:b,insertAfterBlock:v,insertBeforeBlock:k}=h,y=()=>{if(!m.length)return;let P=f(),D=(0,Ua.switchToBlockType)(m,P);D&&g(t,D)},_=()=>{if(!m.length)return;let P=m[0].innerBlocks;P.length&&g(t,P)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let{showViewportModal:S}=M(h),C=i(t[0]),B=n(d(),C),R=m.every(P=>!!P&&(0,Ua.hasBlockSupport)(P.name,"multiple",!0)&&n(P.name,C)),I=a(t),E=[];R&&E.push({name:"duplicate",label:(0,es.__)("Duplicate"),callback:()=>b(t,!0),icon:Wf}),B&&E.push({name:"add-before",label:(0,es.__)("Add before"),callback:()=>{let P=Array.isArray(t)?t[0]:P;k(P)},icon:Ii},{name:"add-after",label:(0,es.__)("Add after"),callback:()=>{let P=Array.isArray(t)?t[t.length-1]:P;v(P)},icon:Ii}),r&&E.push({name:"Group",label:(0,es.__)("Group"),callback:y,icon:Bv}),o&&E.push({name:"ungroup",label:(0,es.__)("Ungroup"),callback:_,icon:ED}),I&&E.push({name:"remove",label:(0,es.__)("Delete"),callback:()=>p(t,!0),icon:CD});let L=m.every(P=>!!P&&(0,Ua.hasBlockSupport)(P.name,"visibility",!0)),T=t.every(P=>u(P)==="default");if(L&&T){let P=t.some(D=>c(D));E.push({name:"toggle-visibility",label:P?(0,es.__)("Show"):(0,es.__)("Hide"),callback:()=>S(t),icon:P?em:Es})}return{isLoading:!1,commands:E.map(P=>({...P,name:"core/block-editor/action-"+P.name,category:"command",callback:({close:D})=>{P.callback(),D()}}))}},eI=()=>{(0,Z3.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:yTe()}),(0,Z3.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:_Te(),context:"block-selection-edit"})};var on=l(w(),1),tI=(0,oee.createSlotFill)(Symbol("BlockCanvasCover"));function JJ({children:e}){return(0,on.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var STe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function X3({shouldIframe:e=!0,height:t="300px",children:o=(0,on.jsx)(mg,{}),styles:r,contentRef:n,iframeProps:i}){eI();let s=(0,oI.useViewportMatch)("medium","<"),a=C_(),c=Nm(),u=(0,eee.useRef)(),d=(0,oI.useMergeRefs)([n,c,u]),f=(0,tee.useSelect)(h=>M(h(x)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,on.jsx)(oS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,on.jsxs)(ig,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,on.jsx)(tI.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,on.jsx)(JJ,{children:p},g))}),(0,on.jsx)(Hl,{styles:r}),o]})}):(0,on.jsxs)(oS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,on.jsx)(tI.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,on.jsx)(JJ,{children:p},g))}),(0,on.jsx)(Hl,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:STe}),(0,on.jsx)(sB,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function xTe({children:e,height:t,styles:o}){return(0,on.jsx)(X3,{height:t,styles:o,children:e})}var ree=xTe;var Ha=l(A(),1),nee=l(N(),1),iee=l(tt(),1),see=l(Pe(),1),ts=l(w(),1),wTe=()=>(0,ts.jsx)(Ha.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,ts.jsx)(Ha.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"})}),CTe=({style:e,className:t})=>(0,ts.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,ts.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,ts.jsx)(wTe,{})})}),BTe=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===iee.DOWN&&(s.preventDefault(),r())};return(0,ts.jsx)(Ha.ToolbarGroup,{children:(0,ts.jsx)(Ha.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,nee.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,ts.jsx)(t,{children:(0,ts.jsx)(e,{children:(0,ts.jsx)(CTe,{})})})})})},ETe=({children:e,...t})=>((0,see.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,ts.jsx)(Ha.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:BTe(t),renderContent:()=>e})),aee=ETe;var mte=l(Pe(),1),vI=l(A(),1),r4=l(N(),1),pte=l(F(),1),hte=l(O(),1);var kb=l(Q(),1),bI=l(A(),1),iS=l(F(),1),dte=l(Pe(),1),Co=l(O(),1),o4=l(N(),1);var fI=l(A(),1),mI=l(O(),1),pI=l(F(),1);var cee=l(Q(),1),uee=l(er(),1),dee=l(F(),1),aI=l(O(),1),fb=l(N(),1);var rI=l(O(),1),nI=(0,rI.createContext)({});nI.displayName="ListViewContext";var Ed=()=>(0,rI.useContext)(nI);var iI=l(O(),1),lee=l(w(),1);function sI({children:e,...t}){let o=(0,iI.useRef)();return(0,iI.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,lee.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var rS=l(w(),1),Q3=(0,aI.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=Ed(),a=(0,cee.useInstanceId)(Q3),{directInsert:c,hideInserter:u}=(0,dee.useSelect)(p=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:v}=M(p(x)),y=g(o)?.directInsert||!1,_=!!b(o)||v();return{directInsert:y,hideInserter:_}},[o]),d=vr({clientId:o,context:"list-view"}),f=vr({clientId:i?.clientId,context:"list-view"});if((0,aI.useEffect)(()=>{f?.length&&(0,uee.speak)((0,fb.sprintf)((0,fb.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,h=(0,fb.sprintf)((0,fb.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,rS.jsxs)("div",{className:"list-view-appender",children:[(0,rS.jsx)($i,{ref:n,rootClientId:o,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:c,__experimentalIsQuick:!0,...r,toggleProps:{"aria-describedby":m},onSelectOrClose:p=>{p?.clientId&&s(p)}}),(0,rS.jsx)(sI,{id:m,children:h})]})});var Pd=l(Y(),1),Qm=l(A(),1),uI=l(Q(),1);var wo=l(O(),1),pb=l(F(),1),e4=l(N(),1),dI=l(tt(),1),Dee=l(__(),1),Mee=l(Ms(),1),Vee=l(er(),1);var fee=l(A(),1),mee=l(Q(),1),pee=l(O(),1);var hee=l(w(),1),TTe=IH(fee.__experimentalTreeGridRow),ITe=(0,pee.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=C1({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,mee.useMergeRefs)([u,d]);return(0,hee.jsx)(TTe,{ref:f,className:V("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),gee=ITe;var bee=l(Me(),1),kee=l(O(),1);function vee({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,kee.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,bee.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 Tee=l(O(),1);var Td=l(A(),1),Cee=l(O(),1);var cI=l(tt(),1),Bee=l(F(),1);var yee=l(N(),1),J3=l(w(),1);function lI({onClick:e}){return(0,J3.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,J3.jsx)(Be,{icon:(0,yee.isRTL)()?Sv:pu})})}var _ee=l(O(),1),See=l(F(),1);var PTe=3,xee={"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?xee[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>=PTe)return t}return t}};function RTe(e,t){let o=xee[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function wee({clientId:e,isExpanded:t}){let{block:o}=(0,See.useSelect)(n=>({block:n(x).getBlock(e)}),[e]);return(0,_ee.useMemo)(()=>RTe(o,t),[o,t])}var Wo=l(w(),1),{Badge:OTe}=M(Td.privateApis);function ATe({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},h){let p=It(t),g=vr({clientId:t,context:"list-view"}),{isLocked:b}=ri(t),{hasPatternName:v,blockVisibility:k}=(0,Bee.useSelect)(I=>{let{getBlockAttributes:E}=M(I(x)),L=E(t);return{hasPatternName:!!L?.metadata?.patternName,blockVisibility:L?.metadata?.blockVisibility}},[t]),y=b,_=p?.positionType==="sticky",S=wee({clientId:t,isExpanded:f}),C=Fy(k),B=I=>{I.dataTransfer.clearData(),c?.(I)};function R(I){(I.keyCode===cI.ENTER||I.keyCode===cI.SPACE)&&o(I)}return(0,Wo.jsxs)("a",{className:V("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:R,onMouseDown:n,ref:h,tabIndex:s,onFocus:a,onDragStart:B,onDragEnd:u,draggable:d,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":f,children:[(0,Wo.jsx)(lI,{onClick:i}),(0,Wo.jsx)(Oe,{icon:v?Pi:p?.icon,showColors:!0,context:"list-view"}),(0,Wo.jsxs)(Td.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Wo.jsx)(Td.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),p?.anchor&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,Wo.jsx)(OTe,{className:"block-editor-list-view-block-select-button__anchor",children:p.anchor})}),_&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,Wo.jsx)(Be,{icon:AN})}),S.length?(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:S.map((I,E)=>(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${I.url})`,zIndex:S.length-E}},I.clientId))}):null,!!C&&(0,Wo.jsx)(Td.Tooltip,{text:C,children:(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,Wo.jsx)(Be,{icon:Es})})}),y&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,Wo.jsx)(Be,{icon:CN})})]})]})}var Eee=(0,Cee.forwardRef)(ATe);var Id=l(w(),1),LTe=(0,Tee.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:h,setInsertedBlock:p}=Ed(),g=c.includes(f)?c:[f];return(0,Id.jsxs)(Id.Fragment,{children:[m&&(0,Id.jsx)(m,{block:o,insertedBlock:h,setInsertedBlock:p}),(0,Id.jsx)(GE,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,Id.jsx)(Eee,{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:v,onDragEnd:k,isExpanded:a,...u})})]})}),Iee=LTe;var Xm=l(N(),1),Pee=l(Me(),1),Ree=(e,t,o)=>(0,Xm.sprintf)((0,Xm.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),Oee=(e,t)=>[e?.positionLabel?`${(0,Xm.sprintf)((0,Xm.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,Xm.__)("This block is locked."):void 0].filter(Boolean).join(" "),Aee=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function Lee(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 mb(e,t){if(!t)return;let o=`[role=row][data-block="${e}"]`;return new Promise(r=>{if(t.querySelector(o))return r(t.querySelector(o));let n=null,i=new window.MutationObserver(()=>{t.querySelector(o)&&(clearTimeout(n),i.disconnect(),r(t.querySelector(o)))});i.observe(t,{childList:!0,subtree:!0}),n=setTimeout(()=>{i.disconnect(),r(null)},3e3)}).then(r=>{r&&r.isConnected&&Pee.focus.focusable.find(r)?.[0]?.focus()})}function Nee({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 rr=l(w(),1);function Fee({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:h,isExpanded:p,selectedClientIds:g,isSyncedBranch:b}){let v=(0,wo.useRef)(null),k=(0,wo.useRef)(null),y=(0,wo.useRef)(null),[_,S]=(0,wo.useState)(!1),[C,B]=(0,wo.useState)(),[R,I]=(0,wo.useState)(!1),{isLocked:E}=ri(e),L=i&&g[0]===e,T=i&&g[g.length-1]===e,{toggleBlockHighlight:P,duplicateBlocks:D,multiSelect:j,replaceBlocks:H,removeBlocks:z,insertAfterBlock:U,insertBeforeBlock:G,showViewportModal:W}=M((0,pb.useDispatch)(x)),J=(0,uI.useDebounce)(P,50),{canInsertBlockType:ce,getSelectedBlockClientIds:te,getPreviousBlockClientId:ne,getBlockRootClientId:X,getBlockOrder:q,getBlockParents:ee,getBlockEditingMode:$,getBlocksByClientId:oe,canEditBlock:ie,canMoveBlock:K,canRemoveBlocks:ae,isGroupable:ge}=(0,pb.useSelect)(x),{getGroupingBlockName:fe}=(0,pb.useSelect)(Pd.store),xe=It(e),Ve=Hg(),{block:at,blockName:Lt,allowRightClickOverrides:no}=(0,pb.useSelect)(ue=>{let{getBlock:ao,getBlockName:ye,getSettings:Nt}=M(ue(x));return{block:ao(e),blockName:ye(e),allowRightClickOverrides:Nt().allowRightClickOverrides}},[e]),{canRename:jo}=Zm(Lt),lt=(0,Pd.hasBlockSupport)(Lt,"__experimentalToolbar",!0),$t=`list-view-block-select-button__description-${(0,uI.useInstanceId)(Fee)}`,{expand:io,collapse:Ue,collapseAll:Kt,BlockSettingsMenu:Je,listViewInstanceId:He,expandedState:dr,setInsertedBlock:pn,treeGridElementRef:ze,rootClientId:so}=Ed(),et=(0,Mee.__unstableUseShortcutEventMatch)();function Fe(){let ue=te(),ao=ue.includes(e),ye=ao?ue[0]:e,Nt=X(ye);return{blocksToUpdate:ao?ue:[e],firstBlockClientId:ye,firstBlockRootClientId:Nt,selectedBlockClientIds:ue}}async function yt(ue){if(ue.defaultPrevented||ue.target.closest("[role=dialog]"))return;let ao=[dI.BACKSPACE,dI.DELETE].includes(ue.keyCode);if(et("core/block-editor/unselect",ue)&&g.length>0)ue.stopPropagation(),ue.preventDefault(),a(ue,void 0);else if(ao||et("core/block-editor/remove",ue)){let{blocksToUpdate:ye,firstBlockClientId:Nt,firstBlockRootClientId:gn,selectedBlockClientIds:Ir}=Fe();if(!ae(ye))return;let ru=ne(Nt)??gn;z(ye,!1);let dA=Ir.length>0&&te().length===0;ru||(ru=q()[0]),Bt(ru,dA)}else if(et("core/block-editor/paste-styles",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Fe(),Nt=oe(ye);Ve(Nt)}else if(et("core/block-editor/duplicate",ue)){ue.preventDefault();let{blocksToUpdate:ye,firstBlockRootClientId:Nt}=Fe();if(oe(ye).every(Ir=>!!Ir&&(0,Pd.hasBlockSupport)(Ir.name,"multiple",!0)&&ce(Ir.name,Nt))){let Ir=await D(ye,!1);Ir?.length&&Bt(Ir[0],!1)}}else if(et("core/block-editor/insert-before",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Fe();await G(ye[0]);let Nt=te();Bt(Nt[0],!1)}else if(et("core/block-editor/insert-after",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Fe();await U(ye.at(-1));let Nt=te();Bt(Nt[0],!1)}else if(et("core/block-editor/select-all",ue)){ue.preventDefault();let{firstBlockRootClientId:ye,selectedBlockClientIds:Nt}=Fe(),gn=q(ye);if(!gn.length)return;if((0,Dee.isShallowEqual)(Nt,gn)&&ye&&ye!==so){Bt(ye,!0);return}j(gn[0],gn[gn.length-1],null)}else if(et("core/block-editor/collapse-list-view",ue)){ue.preventDefault();let{firstBlockClientId:ye}=Fe(),Nt=ee(ye,!1);Kt(),io(Nt)}else if(et("core/block-editor/group",ue)){let{blocksToUpdate:ye}=Fe();if(ye.length>1&&ge(ye)){ue.preventDefault();let Nt=oe(ye),gn=fe(),Ir=(0,Pd.switchToBlockType)(Nt,gn);H(ye,Ir),(0,Vee.speak)((0,e4.__)("Selected blocks are grouped."));let ru=te();Bt(ru[0],!1)}}else if(et("core/block-editor/toggle-block-visibility",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Fe();if(!oe(ye).every(Ir=>(0,Pd.hasBlockSupport)(Ir.name,"visibility",!0))||ye.some(Ir=>$(Ir)!=="default"))return;W(ye)}else if(et("core/block-editor/rename",ue)){let{blocksToUpdate:ye}=Fe(),Nt=$(ye[0])==="contentOnly";ye.length===1&&jo&&!Nt&&(ue.preventDefault(),I(!0))}}let Oo=(0,wo.useCallback)(()=>{S(!0),J(e,!0)},[e,S,J]),fr=(0,wo.useCallback)(()=>{S(!1),J(e,!1)},[e,S,J]),be=(0,wo.useCallback)(ue=>{a(ue,e),ue.preventDefault()},[e,a]),Bt=(0,wo.useCallback)((ue,ao)=>{ao&&a(void 0,ue,null,null),mb(ue,ze?.current)},[a,ze]),Ao=(0,wo.useCallback)(ue=>{ue.preventDefault(),ue.stopPropagation(),p===!0?Ue(e):p===!1&&io(e)},[e,io,Ue,p]),qe=(0,wo.useCallback)(ue=>{let{ownerDocument:ao}=y?.current||{};!ao||!ao.hasFocus()||lt&&no&&(y.current?.click(),B(new window.DOMRect(ue.clientX,ue.clientY,0,0)),ue.preventDefault())},[no,y,lt]),re=(0,wo.useCallback)(ue=>{no&&ue.button===2&&ue.preventDefault()},[no]),Ne=(0,wo.useMemo)(()=>{let{ownerDocument:ue}=k?.current||{};if(!(!C||!ue))return{ownerDocument:ue,getBoundingClientRect(){return C}}},[C]),mt=(0,wo.useCallback)(()=>{B(void 0)},[B]);if(vee({isSelected:i,rowItemRef:k,selectedClientIds:g}),!at)return null;let ou=Ree(c,f,u),ba=Oee(xe,E),Zp=Fy(at?.attributes?.metadata?.blockVisibility),cv=f>0,Nf=m&&cv,hn=V("block-editor-list-view-block__mover-cell",{"is-visible":_||i}),Xp=V("block-editor-list-view-block__menu-cell",{"is-visible":_||L}),Qp;Nf?Qp=2:lt||(Qp=3);let M0=V({"is-selected":i,"is-first-selected":L,"is-last-selected":T,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!lt,"is-synced":xe?.isSynced,"is-draggable":K,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),V0=g.includes(e)?g:[e],uv=i&&g.length===1;return(0,rr.jsxs)(gee,{className:M0,isDragged:r,onKeyDown:yt,onMouseEnter:Oo,onMouseLeave:fr,onFocus:Oo,onBlur:fr,level:u,position:c,rowCount:d,path:h,id:`list-view-${He}-block-${e}`,"data-block":e,"data-expanded":ie?p:void 0,ref:k,children:[(0,rr.jsx)(Qm.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Qp,ref:v,"aria-selected":!!i,children:({ref:ue,tabIndex:ao,onFocus:ye})=>(0,rr.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,rr.jsx)(Iee,{block:at,onClick:be,onContextMenu:qe,onMouseDown:re,onToggleExpanded:Ao,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ue,tabIndex:uv?0:ao,onFocus:ye,isExpanded:ie?p:void 0,selectedClientIds:g,ariaDescribedBy:$t}),(0,rr.jsx)(sI,{id:$t,children:[ou,ba,Zp].filter(Boolean).join(" ")})]})}),Nf&&(0,rr.jsx)(rr.Fragment,{children:(0,rr.jsxs)(Qm.__experimentalTreeGridCell,{className:hn,withoutGridItem:!0,children:[(0,rr.jsx)(Qm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:ao,onFocus:ye})=>(0,rr.jsx)(YE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:ao,onFocus:ye})}),(0,rr.jsx)(Qm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:ao,onFocus:ye})=>(0,rr.jsx)(qE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:ao,onFocus:ye})})]})}),lt&&Je&&(0,rr.jsx)(Qm.__experimentalTreeGridCell,{className:Xp,"aria-selected":!!i,ref:y,children:({ref:ue,tabIndex:ao,onFocus:ye})=>(0,rr.jsx)(Je,{clientIds:V0,block:at,icon:Bs,label:(0,e4.__)("Options"),popoverProps:{anchor:Ne},toggleProps:{ref:ue,className:"block-editor-list-view-block__menu",tabIndex:ao,onClick:mt,onFocus:ye,size:"small"},disableOpenOnArrowDown:!0,expand:io,expandedState:dr,setInsertedBlock:pn,__experimentalSelectBlock:Bt,isContentOnlyListView:!!so&&$(so)==="contentOnly"})}),R&&(0,rr.jsx)(Ym,{clientId:e,onClose:()=>I(!1)})]})}var zee=(0,wo.memo)(Fee);var si=l(w(),1);function jee(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(NTe(t,o,r),0):1}var NTe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+jee(n,e,t,o):r+1,DTe=()=>{};function Uee(e){let{blocks:t,selectBlock:o=DTe,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:h=!1,showAppender:p=!0}=e,g=It(f),b=h||!!g?.isSynced,v=(0,pI.useSelect)(P=>f?P(x).canEditBlock(f):!0,[f]),{blockDropPosition:k,blockDropTargetIndex:y,firstDraggedBlockIndex:_,blockIndexes:S,expandedState:C,draggedClientIds:B}=Ed(),R=(0,mI.useRef)();if(!v)return null;let I=p&&i===1,E=t.filter(Boolean),L=E.length,T=I?L+1:L;return R.current=c,(0,si.jsxs)(si.Fragment,{children:[E.map((P,D)=>{let{clientId:j,innerBlocks:H}=P;D>0&&(R.current+=jee(E[D-1],C,B,d));let z=!!B?.includes(j),{displacement:U,isAfterDraggedBlocks:G,isNesting:W}=Nee({blockIndexes:S,blockDropTargetIndex:y,blockDropPosition:k,clientId:j,firstDraggedBlockIndex:_,isDragged:z}),{itemInView:J}=u,ce=J(R.current),te=D+1,ne=s.length>0?`${s}_${te}`:`${te}`,X=!!H?.length,q=X&&m?C[j]??d:void 0,ee=Aee(j,n),$=a||ee&&X,oe=z||ce||ee&&j===n[0]||D===0||D===L-1;return(0,si.jsxs)(pI.AsyncModeProvider,{value:!ee,children:[oe&&(0,si.jsx)(zee,{block:P,selectBlock:o,isSelected:ee,isBranchSelected:$,isDragged:z,level:i,position:te,rowCount:T,siblingBlockCount:L,showBlockMovers:r,path:ne,isExpanded:z?!1:q,listPosition:R.current,selectedClientIds:n,isSyncedBranch:b,displacement:U,isAfterDraggedBlocks:G,isNesting:W}),!oe&&(0,si.jsx)("tr",{children:(0,si.jsx)("td",{className:"block-editor-list-view-placeholder"})}),X&&q&&!z&&(0,si.jsx)(Uee,{parentId:j,blocks:H,selectBlock:o,showBlockMovers:r,level:i+1,path:ne,listPosition:R.current+1,fixedListWindow:u,isBranchSelected:$,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},j)}),I&&(0,si.jsx)(fI.__experimentalTreeGridRow,{level:i,setSize:T,positionInSet:T,isExpanded:!0,children:(0,si.jsx)(fI.__experimentalTreeGridCell,{children:P=>(0,si.jsx)(Q3,{clientId:f,nestingLevel:i,blockCount:L,...P})})})]})}var Hee=(0,mI.memo)(Uee);var hb=l(A(),1),hI=l(Me(),1),hc=l(O(),1),t4=l(N(),1);var os=l(w(),1);function Gee({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=It(e),n=vr({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,hc.useMemo)(()=>{if(!t.current)return[];let k=i?t.current.querySelector(`[data-block="${i}"]`):void 0,y=s?t.current.querySelector(`[data-block="${s}"]`):void 0;return[k,y]},[t,i,s]),d=u||c,f=(0,t4.isRTL)(),m=(0,hc.useCallback)((k,y)=>{if(!d)return 0;let _=d.offsetWidth,S=(0,hI.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,B=S===C.body||S===C.documentElement;if(S&&!B){let R=S.getBoundingClientRect(),I=(0,t4.isRTL)()?R.right-k.right:k.left-R.left,E=S.clientWidth;if(E<_+I&&(_=E-I),!f&&k.left+y<R.left)return _-=R.left-k.left,_;if(f&&k.right-y>R.right)return _-=k.right-R.right,_}return _-y},[f,d]),h=(0,hc.useMemo)(()=>{if(!d)return{};let k=d.getBoundingClientRect();return{width:m(k,0)}},[m,d]),p=(0,hc.useMemo)(()=>{if(!d)return{};let k=(0,hI.getScrollContainer)(d),y=d.ownerDocument,_=k===y.body||k===y.documentElement;if(k&&!_){let S=k.getBoundingClientRect(),C=d.getBoundingClientRect(),B=f?S.right-C.right:C.left-S.left;if(!f&&S.left>C.left)return{transform:`translateX( ${B}px )`};if(f&&S.right<C.right)return{transform:`translateX( ${B*-1}px )`}}return{}},[f,d]),g=(0,hc.useMemo)(()=>{if(!c)return 1;let k=parseInt(c.getAttribute("aria-level"),10);return k?k+1:1},[c]),b=(0,hc.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),v=(0,hc.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let y=d.getBoundingClientRect(),_=y.left,S=0,C=(0,hI.getScrollContainer)(d,"horizontal"),B=d.ownerDocument,R=C===B.body||C===B.documentElement;if(C&&!R){let L=C.getBoundingClientRect(),T=f?C.offsetWidth-C.clientWidth:0;_<L.left+T&&(_=L.left+T)}a==="top"?S=y.top-y.height*2:S=y.top;let I=m(y,0),E=y.height;return new window.DOMRect(_,S,I,E)}}},[d,a,m,f]);return d?(0,os.jsx)(hb.Popover,{animate:!1,anchor:v,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,os.jsx)("div",{style:h,className:V("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,os.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,os.jsxs)("div",{className:V("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:p,children:[(0,os.jsx)(lI,{onClick:()=>{}}),(0,os.jsx)(Oe,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,os.jsx)(hb.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,os.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,os.jsx)(hb.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,os.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var Wee=l(er(),1),gb=l(N(),1),nS=l(F(),1),$ee=l(O(),1),ai=l(tt(),1),Kee=l(Y(),1);function Yee(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,nS.useDispatch)(x),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,nS.useSelect)(x),{getBlockType:u}=(0,nS.useSelect)(Kee.store);return{updateBlockSelection:(0,$ee.useCallback)(async(f,m,h,p)=>{if(!f?.shiftKey&&f?.keyCode!==ai.ESCAPE){o(m,p);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===ai.ESCAPE,b=f.type==="keydown"&&(f.keyCode===ai.UP||f.keyCode===ai.DOWN||f.keyCode===ai.HOME||f.keyCode===ai.END);if(!b&&!c()&&!a()){o(m,null);return}let v=s(),k=[...n(m),m];if((g||b&&!v.some(C=>k.includes(C)))&&await e(),!g){let C=i(),B=m;b&&(!c()&&!a()&&(C=m),h&&(B=h));let R=n(C),I=n(B),{start:E,end:L}=Lee(C,B,R,I);await t(E,L,null)}let y=s();if((f.keyCode===ai.HOME||f.keyCode===ai.END)&&y.length>1)return;let _=v.filter(C=>!y.includes(C)),S;if(_.length===1){let C=u(r(_[0]))?.title;C&&(S=(0,gb.sprintf)((0,gb.__)("%s deselected."),C))}else _.length>1&&(S=(0,gb.sprintf)((0,gb.__)("%s blocks deselected."),_.length));S&&(0,Wee.speak)(S,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var qee=l(O(),1);function Zee(e){return(0,qee.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 Xee=l(F(),1);function Qee({blocks:e,rootClientId:t}){return(0,Xee.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=M(o(x));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var Jee=l(O(),1),ete=l(F(),1);function tte({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,ete.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=M(n(x));return{expandedBlock:s(),getBlockParents:i}},[]);(0,Jee.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var ote=l(F(),1),Jm=l(O(),1),ep=l(Q(),1),rte=l(N(),1);var gc=24;function MTe(e,t,o=1,r=!1){let n=r?t.right-o*gc:t.left+o*gc;return r?e.x>n:e.x<n}function VTe(e,t,o=1,r=!1){let n=r?t.right-o*gc:t.left+o*gc,i=r?n-e.x:e.x-n,s=Math.round(i/gc);return Math.abs(s)}function FTe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function nte(e,t){let o=e[t+1];return o&&o.isDraggedBlock?nte(e,t+1):o}function zTe(e,t,o=1,r=!1){let n=r?t.right-o*gc:t.left+o*gc;return(r?e.x<n-gc:e.x>n+gc)&&e.y<t.bottom}var jTe=["top","bottom"];function UTe(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 h=m.element.getBoundingClientRect(),[p,g]=Mm(t,h,jTe),b=SE(t,h);if(i===void 0||p<i||b){i=p;let v=e.indexOf(m),k=e[v-1];if(g==="top"&&k&&k.rootClientId===m.rootClientId&&!k.isDraggedBlock?(n=k,r="bottom",s=k.element.getBoundingClientRect(),a=v-1):(n=m,r=g,s=h,a=v),b)break}}if(!n)return;let c=FTe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||zTe(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&&MTe(t,s,c.length,o)){let f=nte(e,a),m=n.nestingLevel,h=f?f.nestingLevel:1;if(m&&h){let p=VTe(t,s,c.length,o),g=Math.max(Math.min(p,m-h),0);if(c[g]){let b=n.blockIndex;if(c[g].nestingLevel===f?.nestingLevel)b=f?.blockIndex;else for(let v=a;v>=0;v--){let k=e[v];if(k.rootClientId===c[g].rootClientId){b=k.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 HTe={leading:!1,trailing:!0};function ite({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,ote.useSelect)(x),[c,u]=(0,Jm.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=_E(d,f),h=(0,rte.isRTL)(),p=(0,ep.usePrevious)(d),g=(0,Jm.useCallback)((_,S)=>{let{rootClientId:C}=S||{};C&&S?.dropPosition==="inside"&&!_[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,ep.useThrottle)(g,500,HTe);(0,Jm.useEffect)(()=>{if(c?.dropPosition!=="inside"||p!==c?.rootClientId){b.cancel();return}b(t,c)},[t,p,c,b]);let v=s(),k=(0,ep.useThrottle)((0,Jm.useCallback)((_,S)=>{let C={x:_.clientX,y:_.clientY},B=!!v?.length,I=Array.from(S.querySelectorAll("[data-block]")).map(L=>{let T=L.dataset.block,P=L.dataset.expanded==="true",D=L.classList.contains("is-dragging"),j=parseInt(L.getAttribute("aria-level"),10),H=r(T);return{clientId:T,isExpanded:P,rootClientId:H,blockIndex:n(T),element:L,nestingLevel:j||void 0,isDraggedBlock:B?D:!1,innerBlockCount:i(T),canInsertDraggedBlocksAsSibling:B?a(v,H):!0,canInsertDraggedBlocksAsChild:B?a(v,T):!0}}),E=UTe(I,C,h);E&&u(E)},[a,v,i,n,r,h]),50);return{ref:(0,ep.__experimentalUseDropZone)({dropZoneElement:e,onDrop(_){k.cancel(),c&&m(_),u(void 0)},onDragLeave(){k.cancel(),u(null)},onDragOver(_){k(_,_.currentTarget)},onDragEnd(){k.cancel(),u(void 0)}}),target:c}}var gI=l(O(),1),ste=l(F(),1);function ate({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,gI.useState)(null),{selectedBlockParentClientIds:n}=(0,ste.useSelect)(i=>{let{getBlockParents:s}=i(x);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,gI.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var bb=l(F(),1),lte=l(Q(),1);function cte({selectBlock:e}){let t=(0,bb.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,bb.useSelect)(x),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:h}=(0,bb.useDispatch)(x),p=tg();return(0,lte.useRefEffect)(g=>{function b(y,_){_&&e(void 0,y,null,null),mb(y,g)}function v(y){let _=s(),S=_.includes(y),C=S?_[0]:y,B=r(C);return{blocksToUpdate:S?_:[y],firstBlockClientId:C,firstBlockRootClientId:B,originallySelectedBlockClientIds:_}}function k(y){if(y.defaultPrevented||!g.contains(y.target.ownerDocument.activeElement))return;let S=y.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!S)return;let{blocksToUpdate:C,firstBlockClientId:B,firstBlockRootClientId:R,originallySelectedBlockClientIds:I}=v(S);if(C.length!==0){if(y.preventDefault(),y.type==="copy"||y.type==="cut"){C.length===1&&d(C[0]),p(y.type,C);let E=n(C);nB(y,E,t)}if(y.type==="cut"){if(!u(C))return;let E=i(B)??R;f(C,!1);let L=I.length>0&&s().length===0;E||(E=o()[0]),b(E,L)}else if(y.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:E}=a(),L=vW(y,E);if(C.length===1){let[T]=C;if(L.every(P=>c(P.name,T))){h(L,void 0,T),b(L[0]?.clientId,!1);return}}m(C,L,L.length-1,-1),b(L[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",k),g.ownerDocument.addEventListener("cut",k),g.ownerDocument.addEventListener("paste",k),()=>{g.ownerDocument.removeEventListener("copy",k),g.ownerDocument.removeEventListener("cut",k),g.ownerDocument.removeEventListener("paste",k)}},[])}var bc=l(w(),1),GTe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,ute=32;function fte({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=w3,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,dte.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,kb.useInstanceId)(fte),{clientIdsTree:h,draggedClientIds:p,selectedClientIds:g}=Qee({blocks:t,rootClientId:a}),b=Zee(h),{getBlock:v,getSelectedBlockClientIds:k}=(0,iS.useSelect)(x),{visibleBlockCount:y}=(0,iS.useSelect)(ie=>{let{getGlobalBlockCount:K,getClientIdsOfDescendants:ae}=ie(x),ge=p?.length>0?ae(p).length+1:0;return{visibleBlockCount:K()-ge}},[p]),{updateBlockSelection:_}=Yee(),[S,C]=(0,Co.useReducer)(GTe,{}),[B,R]=(0,Co.useState)(null),{setSelectedTreeId:I}=ate({firstSelectedBlockClientId:g[0],setExpandedState:C}),E=(0,Co.useCallback)((ie,K,ae)=>{_(ie,K,null,ae),I(K),u&&u(v(K))},[I,_,u,v]),{ref:L,target:T}=ite({dropZoneElement:o,expandedState:S,setExpandedState:C}),P=(0,Co.useRef)(),D=cte({selectBlock:E}),j=(0,Co.useCallback)(ie=>{let[K]=k();K&&ie&&mb(K,ie)},[k]),H=(0,kb.useMergeRefs)([D,j,P,L,f]),z=(0,Co.useCallback)(ie=>{if(!ie)return;let K=Array.isArray(ie)?ie:[ie];C({type:"expand",clientIds:K})},[C]),U=(0,Co.useCallback)(ie=>{ie&&C({type:"collapse",clientIds:[ie]})},[C]),G=(0,Co.useCallback)(()=>{C({type:"clear"})},[C]),W=(0,Co.useCallback)(ie=>{z(ie?.dataset?.block)},[z]),J=(0,Co.useCallback)(ie=>{U(ie?.dataset?.block)},[U]),ce=(0,Co.useCallback)((ie,K,ae)=>{ie.shiftKey&&_(ie,K?.dataset?.block,ae?.dataset?.block)},[_]);tte({collapseAll:G,expand:z});let te=p?.[0],{blockDropTargetIndex:ne,blockDropPosition:X,firstDraggedBlockIndex:q}=(0,Co.useMemo)(()=>{let ie,K;if(T?.clientId){let ae=b[T.clientId];ie=ae===void 0||T?.dropPosition==="top"?ae:ae+1}else T===null&&(ie=null);if(te){let ae=b[te];K=ae===void 0||T?.dropPosition==="top"?ae:ae+1}return{blockDropTargetIndex:ie,blockDropPosition:T?.dropPosition,firstDraggedBlockIndex:K}},[T,b,te]),ee=(0,Co.useMemo)(()=>({blockDropPosition:X,blockDropTargetIndex:ne,blockIndexes:b,draggedClientIds:p,expandedState:S,expand:z,firstDraggedBlockIndex:q,collapse:U,collapseAll:G,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:B,setInsertedBlock:R,treeGridElementRef:P,rootClientId:a}),[X,ne,b,p,S,z,q,U,G,s,m,d,B,R,a]),[$]=(0,kb.__experimentalUseFixedWindowList)(P,ute,y,{expandedState:S,useWindowing:!0,windowOverscan:40});if(!h.length&&!i)return null;let oe=c&&`block-editor-list-view-description-${m}`;return(0,bc.jsxs)(iS.AsyncModeProvider,{value:!0,children:[(0,bc.jsx)(Gee,{draggedBlockClientId:te,listViewRef:P,blockDropTarget:T}),c&&(0,bc.jsx)(bI.VisuallyHidden,{id:oe,children:c}),(0,bc.jsx)(bI.__experimentalTreeGrid,{id:e,className:V("block-editor-list-view-tree",{"is-dragging":p?.length>0&&ne!==void 0}),"aria-label":(0,o4.__)("Block navigation structure"),ref:H,onCollapseRow:J,onExpandRow:W,onFocusRow:ce,applicationAriaLabel:(0,o4.__)("Block navigation structure"),"aria-describedby":oe,style:{"--wp-admin--list-view-dragged-items-height":p?.length?`${ute*(p.length-1)}px`:null},children:(0,bc.jsx)(nI.Provider,{value:ee,children:(0,bc.jsx)(Hee,{blocks:h,parentId:a,selectBlock:E,showBlockMovers:r,fixedListWindow:$,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var sS=(0,Co.forwardRef)(fte),kI=(0,Co.forwardRef)((e,t)=>(0,bc.jsx)(sS,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var Rd=l(w(),1);function WTe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,Rd.jsx)(vI.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:Tv,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,r4.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function $Te({isDisabled:e,...t},o){(0,mte.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,pte.useSelect)(i=>!!i(x).getBlockCount(),[])&&!e;return(0,Rd.jsx)(vI.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,Rd.jsx)(WTe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,Rd.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,Rd.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,r4.__)("List view")}),(0,Rd.jsx)(kI,{})]})})}var gte=(0,hte.forwardRef)($Te);var aS=l(O(),1),kte=l(F(),1),vte=l(Q(),1),Od=l(A(),1),n4=l(N(),1);var kc=l(w(),1),bte=()=>{};function KTe({clientId:e,onSwitch:t=bte,onHoverClassName:o=bte}){let r=(0,kte.useSelect)(S=>S(x).canEditBlock(e),[e]),{onSelect:n,stylesToRender:i,activeStyle:s,genericPreviewBlock:a,className:c}=Xg({clientId:e,onSwitch:t}),[u,d]=(0,aS.useState)(null),[f,m]=(0,aS.useState)(null),h=No(),p=(0,aS.useMemo)(()=>{if(!u||!a)return null;let S=Sd(c,s,u);return[{...a,attributes:{...a.attributes||{},className:S}}]},[u,a,c,s]);if(!r||!i||i.length===0)return null;let g=(0,vte.debounce)(d,250),b=S=>{n(S),o(null),d(null),g.cancel()},v=S=>{if(u===S){g.cancel();return}g(S),o(S?.name??null)},k=PT(i),y=()=>s?.name!==k?.name,_=()=>{b(k)};return(0,kc.jsx)(Od.__experimentalToolsPanel,{label:(0,n4.__)("Styles"),resetAll:_,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:h,children:(0,kc.jsx)(Od.__experimentalToolsPanelItem,{hasValue:y,label:(0,n4.__)("Variation"),onDeselect:_,isShownByDefault:!0,panelId:e,children:(0,kc.jsxs)("div",{ref:m,className:"block-editor-block-styles",children:[(0,kc.jsx)("div",{className:"block-editor-block-styles__variants",children:i.map(S=>{let C=S.label||S.name;return(0,kc.jsx)(Od.Button,{__next40pxDefaultSize:!0,className:V("block-editor-block-styles__item",{"is-active":s.name===S.name}),variant:"secondary",label:C,onMouseEnter:()=>v(S),onFocus:()=>v(S),onMouseLeave:()=>v(null),onBlur:()=>v(null),onClick:()=>b(S),"aria-current":s.name===S.name,children:(0,kc.jsx)(Od.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:C})},S.name)})}),p&&(0,kc.jsx)(Cd,{blocks:p,placement:"left-start",offset:34,anchor:f})]})})})}var vb=KTe;var wte=l(A(),1),yb=l(N(),1);var _te=l(A(),1),Ste=l(w(),1),yte={0:PN,1:FL,2:jL,3:HL,4:WL,5:KL,6:qL};function i4({level:e}){return yte[e]?(0,Ste.jsx)(_te.Icon,{icon:yte[e]}):null}var yI=l(w(),1),xte=[1,2,3,4,5,6],YTe={className:"block-library-heading-level-dropdown"};function Cte({options:e=xte,value:t,onChange:o}){let r=e.filter(n=>n===0||xte.includes(n)).sort((n,i)=>n-i);return(0,yI.jsx)(wte.ToolbarDropdownMenu,{popoverProps:YTe,icon:(0,yI.jsx)(i4,{level:t}),label:(0,yb.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,yI.jsx)(i4,{level:n}),title:n===0?(0,yb.__)("Paragraph"):(0,yb.sprintf)((0,yb.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var lS=l(N(),1),cS=l(A(),1);var vc=l(w(),1);function qTe({icon:e=kN,label:t=(0,lS.__)("Choose variation"),instructions:o=(0,lS.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=V("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,vc.jsxs)(cS.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,vc.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,lS.__)("Block variations"),children:r.map(a=>(0,vc.jsxs)("li",{children:[(0,vc.jsx)(cS.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,vc.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,vc.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,vc.jsx)(cS.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,lS.__)("Skip")})})]})}var Bte=qTe;var Pte=l(F(),1),Rte=l(Y(),1),Sb=l(A(),1),s4=l(O(),1),a4=l(Q(),1),Ote=l(N(),1);var yc=l(N(),1),_b=l(A(),1);var Ad={carousel:"carousel",grid:"grid"};var li=l(w(),1),ZTe=({onBlockPatternSelect:e})=>(0,li.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,li.jsx)(_b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,yc.__)("Choose")})}),XTe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,li.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,li.jsx)(_b.Button,{size:"compact",icon:(0,yc.isRTL)()?Uo:Gr,label:(0,yc.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,li.jsx)(_b.Button,{size:"compact",icon:(0,yc.isRTL)()?Gr:Uo,label:(0,yc.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),QTe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===Ad.carousel,c=(0,li.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,li.jsx)(_b.Button,{size:"compact",icon:Gv,label:(0,yc.__)("Carousel view"),onClick:()=>t(Ad.carousel),isPressed:a}),(0,li.jsx)(_b.Button,{size:"compact",icon:Cv,label:(0,yc.__)("Grid view"),onClick:()=>t(Ad.grid),isPressed:e===Ad.grid})]});return(0,li.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,li.jsx)(XTe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,li.jsx)(ZTe,{onBlockPatternSelect:s})]})},Ete=QTe;var Tte=l(F(),1);function JTe(e,t,o){return(0,Tte.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(x),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var Ite=JTe;var jt=l(w(),1),eIe=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===Ad.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,jt.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,jt.jsx)("div",{className:i,children:(0,jt.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,jt.jsx)(Lte,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,jt.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,jt.jsx)(Sb.Composite,{role:"listbox",className:i,"aria-label":(0,Ote.__)("Patterns list"),children:o.map(s=>(0,jt.jsx)(Ate,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function Ate({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,a4.useInstanceId)(Ate,`${r}__item-description`);return(0,jt.jsx)("div",{className:`${r}__list-item`,children:(0,jt.jsxs)(Sb.Composite.Item,{render:(0,jt.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,jt.jsx)(wn,{blocks:n,viewportWidth:s}),o&&(0,jt.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,jt.jsx)(Sb.VisuallyHidden,{id:a,children:i})]})})}function Lte({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,a4.useInstanceId)(Lte,"block-editor-block-pattern-setup-list__item-description");return(0,jt.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,jt.jsx)(wn,{blocks:n,minHeight:r}),!!s&&(0,jt.jsx)(Sb.VisuallyHidden,{id:a,children:s})]})}var tIe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=Ad.carousel,showTitles:i=!1})=>{let[s,a]=(0,s4.useState)(n),[c,u]=(0,s4.useState)(0),{replaceBlock:d}=(0,Pte.useDispatch)(x),f=Ite(e,t,o);if(!f?.length)return null;let h=r||(p=>{let g=p.map(b=>(0,Rte.cloneBlock)(b));d(e,g)});return(0,jt.jsx)(jt.Fragment,{children:(0,jt.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,jt.jsx)(eIe,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,jt.jsx)(Ete,{viewMode:s,setViewMode:a,activeSlide:c,totalSlides:f.length,handleNext:()=>{u(p=>Math.min(p+1,f.length-1))},handlePrevious:()=>{u(p=>Math.max(p-1,0))},onBlockPatternSelect:()=>{h(f[c].blocks)}})]})})},Nte=tIe;var l4=l(Y(),1),_c=l(N(),1),Qs=l(A(),1),_I=l(F(),1),Dte=l(O(),1);var Mo=l(w(),1),{Menu:tp}=M(Qs.privateApis);function oIe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Mo.jsxs)("fieldset",{className:e,children:[(0,Mo.jsx)(Qs.VisuallyHidden,{as:"legend",children:(0,_c.__)("Transform to variation")}),r.map(n=>(0,Mo.jsx)(Qs.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Mo.jsx)(Oe,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,_c.sprintf)((0,_c.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function rIe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Mo.jsx)("div",{className:e,children:(0,Mo.jsxs)(tp,{children:[(0,Mo.jsx)(tp.TriggerButton,{render:(0,Mo.jsx)(Qs.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,_c.__)("Transform to variation")})}),(0,Mo.jsx)(tp.Popover,{position:"bottom",children:(0,Mo.jsx)(tp.Group,{children:r.map(n=>(0,Mo.jsxs)(tp.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Mo.jsx)(tp.ItemLabel,{children:n.title}),n.description&&(0,Mo.jsx)(tp.ItemHelpText,{children:n.description})]},n.name))})})]})})}function nIe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Mo.jsx)("div",{className:e,children:(0,Mo.jsx)(Qs.__experimentalToggleGroupControl,{label:(0,_c.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,Mo.jsx)(Qs.__experimentalToggleGroupControlOptionIcon,{icon:(0,Mo.jsx)(Oe,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,_c.sprintf)((0,_c.__)("Transform to %s"),n.title)},n.name))})})}function iIe({blockClientId:e}){let{updateBlockAttributes:t}=(0,_I.useDispatch)(x),{activeBlockVariation:o,variations:r,canEdit:n,isContentOnly:i,isSection:s}=(0,_I.useSelect)(p=>{let{getActiveBlockVariation:g,getBlockVariations:b}=p(l4.store),{getBlockName:v,getBlockAttributes:k,getBlockEditingMode:y,isSectionBlock:_}=M(p(x)),{canEditBlock:S}=p(x),C=e&&v(e),{hasContentRoleAttribute:B}=M(p(l4.store)),R=B(C);return{activeBlockVariation:g(C,k(e),"transform"),variations:C&&b(C,"transform"),canEdit:S(e),isContentOnly:y(e)==="contentOnly"&&!R,isSection:_(e)}},[e]),a=o?.name,c=(0,Dte.useMemo)(()=>{let p=new Set;return r?(r.forEach(g=>{g.icon&&p.add(g.icon?.src||g.icon)}),p.size===r.length):!1},[r]),u=p=>{t(e,{...r.find(({name:g})=>g===p).attributes})};if(!r?.length||!n||i||s)return null;let d="block-editor-block-variation-transforms",m=r.length>6?oIe:nIe;return(0,Mo.jsx)(c?m:rIe,{className:d,onSelectVariation:u,selectedValue:a,variations:r})}var SI=iIe;var op=l(N(),1),xI=l(A(),1);var Mte=l(w(),1),c4={top:{icon:hN,title:(0,op._x)("Align top","Block vertical alignment setting")},center:{icon:nN,title:(0,op._x)("Align middle","Block vertical alignment setting")},bottom:{icon:oN,title:(0,op._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:fN,title:(0,op._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:cN,title:(0,op._x)("Space between","Block vertical alignment setting")}},sIe=["top","center","bottom"],aIe="top";function lIe({value:e,onChange:t,controls:o=sIe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=c4[e],a=c4[aIe],c=n?xI.ToolbarGroup:xI.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,Mte.jsx)(c,{icon:s?s.icon:a.icon,label:(0,op._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...c4[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var u4=lIe;var d4=l(w(),1),DC=e=>(0,d4.jsx)(u4,{...e,isToolbar:!1}),Vte=e=>(0,d4.jsx)(u4,{...e,isToolbar:!0});var Pn=l(A(),1),uS=l(O(),1),BI=l(N(),1);var Fte=l(A(),1);var f4=l(N(),1),zte=l(w(),1);function jte({isLinked:e,...t}){let o=e?(0,f4.__)("Unlink radii"):(0,f4.__)("Link radii");return(0,zte.jsx)(Fte.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?bn:Ti,iconSize:24,label:o})}var Ute=l(A(),1);function cIe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function Hte(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,Ute.__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=cIe(r);return n===0||n?`${n}${i||""}`:void 0}function Gte(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 Wte(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var rs=l(A(),1),Xte=l(Q(),1),Nd=l(N(),1);var rp=l(O(),1);var m4=24,$te=8,wI={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rem:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};var Ld=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function Kte(e,t){if(!e)return;if(e==="0"||e==="default")return e;let o=e.match(new RegExp(`var:preset\\|${t}\\|(.+)`));return o?o[1]:void 0}function Yte(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":Kte(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function p4(e,t,o){if(!Ld(e,o))return e;let r=parseFloat(e,10)===0?"0":Kte(e,o);return t.find(i=>String(i.slug)===r)?.size}function qte(e,t,o){if(!e||Ld(e,o)||e==="0")return e;let r=t.find(n=>String(n.size)===String(e));return r?.slug?`var:preset|${o}|${r.slug}`:e}var xb=l(A(),1),Sc=l(w(),1);function Zte({allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:o,minValue:r,parsedQuantity:n,computedUnit:i,units:s,isMixed:a,step:c,max:u,showTooltip:d,value:f,minimumCustomValue:m,onCustomValueChange:h,onCustomValueSliderChange:p,onUnitChange:g,onMouseOut:b,onMouseOver:v,setMinValue:k}){let y=(0,Sc.jsx)(xb.__experimentalUnitControl,{className:"preset-input-control__unit-control",disableUnits:a,hideLabelFromVision:!0,label:t,min:r,onChange:h,onUnitChange:g,onBlur:b,onFocus:v,onMouseOut:b,onMouseOver:v,size:"__unstable-large",units:s,value:[n,i].join(""),placeholder:o,onDragStart:()=>{e&&f?.charAt(0)==="-"&&k(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&k(0)},onDragEnd:()=>{e&&k(m)}});return(0,Sc.jsxs)(Sc.Fragment,{children:[d?(0,Sc.jsx)(xb.Tooltip,{text:t,placement:"top",children:(0,Sc.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:y})}):y,(0,Sc.jsx)(xb.RangeControl,{className:"preset-input-control__custom-value-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:u,min:0,onBlur:b,onChange:p,onFocus:v,onMouseOut:b,onMouseOver:v,step:c,value:n,withInputField:!1,__next40pxDefaultSize:!0})]})}var Dd=l(w(),1);function np({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=wI,disableCustomValues:n,icon:i,isMixed:s,value:a,minimumCustomValue:c,onChange:u,onMouseOut:d,onMouseOver:f,onUnitChange:m,presets:h=[],presetType:p,selectedUnit:g,showTooltip:b,units:v}){let k=(0,rp.useMemo)(()=>qte(a,h,p),[a,h,p]),y=o??"preset-input-control",_=h.slice(1,h.length-1).map(($,oe)=>({value:oe+1,label:void 0})),S=_.length>0,C=h.length<=$te,B=s?(0,Nd.__)("Mixed"):null,[R,I]=(0,rp.useState)(c),[E,L]=(0,rp.useState)(!n&&k!==void 0&&!Ld(k,p)),T=null,P=(0,Xte.usePrevious)(k);(0,rp.useEffect)(()=>{k&&P!==k&&!Ld(k,p)&&E!==!0&&L(!0)},[k,P,p,E]);let D=!C&&!E&&k!==void 0&&(!Ld(k,p)||Ld(k,p)&&s),j=h;D?(j=[...h,{name:s?(0,Nd.__)("Mixed"):(0,Nd.sprintf)((0,Nd.__)("Custom (%s)"),k),slug:"custom",size:k}],T=j.length-1):s||(T=E?p4(k,h,p):Yte(k,h,p));let H=j.map(($,oe)=>({key:oe,name:$.name})),z=Ld(k,p)?p4(k,h,p):k,[U,G]=(0,rs.__experimentalParseQuantityAndUnitFromRawValue)(z),W=G||g||"px",J=v?.find($=>$.value===W),ce=J?.step??r[W]?.steps??.1,te=J?.max??r[W]?.max??10,ne=$=>{if($===void 0||$===""){u(void 0);return}isNaN(parseFloat($))||u($)},X=$=>{u([$,W].join(""))},q=$=>k===void 0?void 0:h[$]?.name,ee=($,oe)=>{let ie=parseInt($,10);if(oe==="selectList"){if(ie===0&&h[0]?.slug==="0")return"0";if(ie===0)return}else if(ie===0)return"0";return`var:preset|${p}|${h[$]?.slug}`};return(0,Dd.jsxs)(rs.__experimentalHStack,{className:`preset-input-control__wrapper ${y}__wrapper`,children:[i&&(0,Dd.jsx)(rs.Icon,{className:"preset-input-control__icon",icon:i,size:m4}),(!S||E)&&(0,Dd.jsx)(Zte,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:B,minValue:R,parsedQuantity:U,computedUnit:W,units:v,isMixed:s,step:ce,max:te,showTooltip:b,value:k,minimumCustomValue:c,onCustomValueChange:ne,onCustomValueSliderChange:X,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:I}),S&&C&&!E&&(0,Dd.jsx)(rs.RangeControl,{"aria-valuenow":T,"aria-valuetext":h[T]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:h.length-1,marks:_,min:0,onBlur:d,onChange:$=>u(ee($)),onFocus:f,onMouseDown:$=>{$?.nativeEvent?.offsetX<35&&k===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:q,step:1,value:T,withInputField:!1,__next40pxDefaultSize:!0}),S&&!C&&!E&&(0,Dd.jsx)(rs.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:$=>{D&&$.selectedItem.key===H.length-1?L(!0):u(ee($.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:H,size:"__unstable-large",value:H.find($=>$.key===T)||""}),S&&!n&&(0,Dd.jsx)(rs.Button,{className:"preset-input-control__custom-toggle",icon:JN,iconSize:m4,isPressed:E,label:E?(0,Nd.__)("Use preset"):(0,Nd.__)("Set custom value"),onClick:()=>{L(!E)},size:"small"})]})}var wb=l(N(),1);var Qte=8,CI=[],h4={all:(0,wb.__)("Border radius"),topLeft:(0,wb.__)("Top left"),topRight:(0,wb.__)("Top right"),bottomLeft:(0,wb.__)("Bottom left"),bottomRight:(0,wb.__)("Bottom right")},g4={all:iL,topLeft:lL,topRight:cL,bottomLeft:sL,bottomRight:aL},b4=0;var xc=l(w(),1);function uIe(e){let t=e?.default??CI,o=e?.custom??CI,r=e?.theme??CI;return(0,uS.useMemo)(()=>{let n=[{name:(0,BI.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>Qte?[{name:(0,BI.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function Jte(e,t){return t==="all"?Hte(e):typeof e=="string"?e:e?.[t]}function eoe(e,t){return t==="all"?e.flat:e[t]}function toe(e,t,o){return r=>{o(e==="all"?{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r}:{...typeof t!="string"?t||{}:{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t},[e]:r})}}function ooe(e,t,o){return r=>{let n={...t};e==="all"?(n.flat=r,n.topLeft=r,n.topRight=r,n.bottomLeft=r,n.bottomRight=r):n[e]=r,o(n)}}function EI({onChange:e,values:t,presets:o}){let[r,n]=(0,uS.useState)(!Wte(t)||!Gte(t)),i=uIe(o),[s,a]=(0,uS.useState)({flat:typeof t=="string"?(0,Pn.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,Pn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,Pn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,Pn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,Pn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=he("spacing.units"),u=(0,Pn.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,xc.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,xc.jsxs)(Pn.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,xc.jsx)(Pn.BaseControl.VisualLabel,{as:"legend",children:(0,BI.__)("Radius")}),(0,xc.jsx)(jte,{onClick:d,isLinked:r})]}),r?(0,xc.jsx)(np,{ariaLabel:h4.all,className:"components-border-radius-control",icon:g4.all,minimumCustomValue:b4,onChange:toe("all",t,e),onUnitChange:ooe("all",s,a),presets:i,presetType:"border-radius",selectedUnit:eoe(s,"all"),showTooltip:!0,units:u,value:Jte(t,"all")}):(0,xc.jsx)(Pn.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,xc.jsx)(np,{ariaLabel:h4[f],className:"components-border-radius-control",icon:g4[f],minimumCustomValue:b4,onChange:toe(f,t,e),onUnitChange:ooe(f,s,a),presets:i,presetType:"border-radius",selectedUnit:eoe(s,f),showTooltip:!0,units:u,value:Jte(t,f)},f))})]})}var ioe=l(A(),1);var roe=l(Q(),1);var noe=l(w(),1),TI=(0,roe.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=he("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),c=a?[...n||[],...r||[],...i||[]]:[...n||[],...i||[]],{colors:u=c,disableCustomColors:d=!s}=o,f=u&&u.length>0||!d;return(0,noe.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var soe=TI(ioe.ColorPalette);var k4=l(N(),1),Js=l(A(),1);var Bo=l(w(),1),{Tabs:Cb}=M(Js.privateApis),dIe=["colors","disableCustomColors","gradients","disableCustomGradients"],Ga={color:"color",gradient:"gradient"};function aoe({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:h,headingLevel:p}){let g=a&&(e&&e.length>0||!o),b=c&&(t&&t.length>0||!r);if(!g&&!b)return null;let v={[Ga.color]:(0,Bo.jsx)(Js.ColorPalette,{value:u,onChange:b?y=>{a(y),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:h,headingLevel:p}),[Ga.gradient]:(0,Bo.jsx)(Js.GradientPicker,{value:d,onChange:g?y=>{c(y),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:p})},k=y=>(0,Bo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:v[y]});return(0,Bo.jsx)(Js.BaseControl,{className:V("block-editor-color-gradient-control",i),children:(0,Bo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,Bo.jsxs)(Js.__experimentalVStack,{spacing:1,children:[m&&(0,Bo.jsx)("legend",{children:(0,Bo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,Bo.jsx)(Js.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,Bo.jsx)("div",{children:(0,Bo.jsxs)(Cb,{defaultTabId:d?Ga.gradient:!!g&&Ga.color,children:[(0,Bo.jsxs)(Cb.TabList,{children:[(0,Bo.jsx)(Cb.Tab,{tabId:Ga.color,children:(0,k4.__)("Color")}),(0,Bo.jsx)(Cb.Tab,{tabId:Ga.gradient,children:(0,k4.__)("Gradient")})]}),(0,Bo.jsx)(Cb.TabPanel,{tabId:Ga.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.color}),(0,Bo.jsx)(Cb.TabPanel,{tabId:Ga.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.gradient})]})}),!b&&k(Ga.color),!g&&k(Ga.gradient)]})})})}function fIe(e){let[t,o,r,n]=he("color.palette","color.gradients","color.custom","color.customGradient");return(0,Bo.jsx)(aoe,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function mIe(e){return dIe.every(t=>e.hasOwnProperty(t))?(0,Bo.jsx)(aoe,{...e}):(0,Bo.jsx)(fIe,{...e})}var Md=mIe;var loe=l(w(),1);function coe({onChange:e,value:t,...o}){return(0,loe.jsx)(Md,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var ea=l(N(),1),uoe=l(A(),1),doe=l(er(),1),v4=l(w(),1);iu([su,th]);function pIe({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,ea.__)("text color")},{color:f,description:(0,ea.__)("link color")}],h=Et(u),p=h.alpha()<1,g=h.brightness(),b={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},v="",k="";for(let y of m){if(!y.color)continue;let _=Et(y.color),S=_.isReadable(h,b),C=_.alpha()<1;if(!S){if(p||C)continue;v=g<_.brightness()?(0,ea.sprintf)((0,ea.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),y.description):(0,ea.sprintf)((0,ea.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),y.description),k=(0,ea.__)("This color combination may be hard for people to read.");break}C&&c&&(v=(0,ea.__)("Transparent text may be hard for people to read."),k=(0,ea.__)("Transparent text may be hard for people to read."))}return v?((0,doe.speak)(k),(0,v4.jsx)("div",{className:"block-editor-contrast-checker",children:(0,v4.jsx)(uoe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:v})})):null}var II=pIe;var xr=l(N(),1),dS=l(Wa(),1),PI=l(O(),1),ci=l(A(),1),$a=l(w(),1),Vd=new Date;Vd.setDate(20);Vd.setMonth(Vd.getMonth()-3);Vd.getMonth()===4&&Vd.setMonth(3);function moe({format:e,defaultFormat:t,onChange:o}){return(0,$a.jsxs)(ci.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,$a.jsx)(ci.VisuallyHidden,{as:"legend",children:(0,xr.__)("Date format")}),(0,$a.jsx)(ci.ToggleControl,{label:(0,xr.__)("Default format"),help:`${(0,xr.__)("Example:")} ${(0,dS.dateI18n)(t,Vd)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,$a.jsx)(hIe,{format:e,onChange:o})]})}function hIe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,xr._x)("n/j/Y","short date format"),(0,xr._x)("n/j/Y g:i A","short date format with time"),(0,xr._x)("M j, Y","medium date format"),(0,xr._x)("M j, Y g:i A","medium date format with time"),(0,xr._x)("F j, Y","long date format"),(0,xr._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,dS.dateI18n)(a,Vd),format:a})),{key:"human-diff",name:(0,dS.humanTimeDiff)(Vd),format:"human-diff"}],n={key:"custom",name:(0,xr.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,xr.__)("Enter your own date format")},[i,s]=(0,PI.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,$a.jsxs)(ci.__experimentalVStack,{children:[(0,$a.jsx)(ci.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,xr.__)("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,$a.jsx)(ci.TextControl,{__next40pxDefaultSize:!0,label:(0,xr.__)("Custom format"),hideLabelFromVision:!0,help:(0,PI.createInterpolateElement)((0,xr.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,$a.jsx)(ci.ExternalLink,{href:(0,xr.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var ns=l(A(),1),fS=l(N(),1),poe=l(tt(),1);var hoe=l(Q(),1),Ka=l(w(),1);function goe({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,Ka.jsx)(ns.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,Ka.jsx)(ns.DuotoneSwatch,{values:i}):a=(0,Ka.jsx)(Be,{icon:_L});let c=(0,fS.__)("Apply duotone filter"),d=`${(0,hoe.useInstanceId)(goe,"duotone-control",e)}__description`;return(0,Ka.jsx)(ns.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,fS.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,Ka.jsx)(ns.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:p=>{!f&&p.keyCode===poe.DOWN&&(p.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,Ka.jsxs)(ns.MenuGroup,{label:(0,fS.__)("Duotone"),children:[(0,Ka.jsx)("p",{children:(0,fS.__)("Create a two-tone color effect without losing your original image.")}),(0,Ka.jsx)(ns.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var RI=goe;var yoe=l(A(),1),_oe=l(Pe(),1),Soe=l(O(),1),ui=l(N(),1);var nr=l(N(),1);var OI=l(N(),1);function boe(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,OI._x)("Regular","font style");break;case"italic":t=(0,OI._x)("Italic","font style");break;case"oblique":t=(0,OI._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var ta=l(N(),1);function y4(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,ta._x)("Regular","font weight");break;case"bold":case"700":t=(0,ta._x)("Bold","font weight");break;case"100":t=(0,ta._x)("Thin","font weight");break;case"200":t=(0,ta._x)("Extra Light","font weight");break;case"300":t=(0,ta._x)("Light","font weight");break;case"500":t=(0,ta._x)("Medium","font weight");break;case"600":t=(0,ta._x)("Semi Bold","font weight");break;case"800":t=(0,ta._x)("Extra Bold","font weight");break;case"900":t=(0,ta._x)("Black","font weight");break;case"1000":t=(0,ta._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var koe=[{name:(0,nr._x)("Regular","font style"),value:"normal"},{name:(0,nr._x)("Italic","font style"),value:"italic"}],voe=[{name:(0,nr._x)("Thin","font weight"),value:"100"},{name:(0,nr._x)("Extra Light","font weight"),value:"200"},{name:(0,nr._x)("Light","font weight"),value:"300"},{name:(0,nr._x)("Regular","font weight"),value:"400"},{name:(0,nr._x)("Medium","font weight"),value:"500"},{name:(0,nr._x)("Semi Bold","font weight"),value:"600"},{name:(0,nr._x)("Bold","font weight"),value:"700"},{name:(0,nr._x)("Extra Bold","font weight"),value:"800"},{name:(0,nr._x)("Black","font weight"),value:"900"},{name:(0,nr._x)("Extra Black","font weight"),value:"1000"}];function Bb(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(h=>h.value===m)||o.push(y4(m))}}let a=y4(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=boe(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,nr._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,nr._x)("Italic","font style"),value:"italic"}),n&&(t=koe,o=voe),t=t.length===0?koe:t,o=o.length===0?voe:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,nr.sprintf)((0,nr._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 xoe=l(w(),1),gIe=(e,t)=>e?t?(0,ui.__)("Appearance"):(0,ui.__)("Font style"):(0,ui.__)("Font weight");function AI(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=gIe(r,n),f={key:"default",name:(0,ui.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:h,combinedStyleAndWeightOptions:p}=Bb(i),g=()=>{let S=[f];return p&&S.push(...p),S},b=()=>{let S=[f];return m.forEach(({name:C,value:B})=>{S.push({key:B,name:C,style:{fontStyle:B,fontWeight:void 0}})}),S},v=()=>{let S=[f];return h.forEach(({name:C,value:B})=>{S.push({key:B,name:C,style:{fontStyle:void 0,fontWeight:B}})}),S},k=(0,Soe.useMemo)(()=>r&&n?g():r?b():v(),[e.options,m,h,p]),y=k.find(S=>S.style.fontStyle===s&&S.style.fontWeight===a)||k[0],_=()=>y?r?n?(0,ui.sprintf)((0,ui.__)("Currently selected font appearance: %s"),y.name):(0,ui.sprintf)((0,ui.__)("Currently selected font style: %s"),y.name):(0,ui.sprintf)((0,ui.__)("Currently selected font weight: %s"),y.name):(0,ui.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,_oe.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,xoe.jsx)(yoe.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:_(),options:k,value:y,onChange:({selectedItem:S})=>o(S.style)})}var woe=l(A(),1),Coe=l(Pe(),1),_4=l(N(),1);var Boe=l(w(),1);function LI({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=he("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,_4.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,Coe.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,Boe.jsx)(woe.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,_4.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:V("block-editor-font-family-control",n),...i})}var NI=l(A(),1),Eoe=l(Pe(),1),Toe=l(N(),1);var Ioe=l(w(),1);function DI({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=he("spacing.units"),s=(0,NI.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,Eoe.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,Ioe.jsx)(NI.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,Toe.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var mS=l(N(),1),MI=l(A(),1),S4=l(w(),1),bIe=[{label:(0,mS.__)("None"),value:"none",icon:hr},{label:(0,mS.__)("Underline"),value:"underline",icon:IL},{label:(0,mS.__)("Strikethrough"),value:"line-through",icon:EL}];function VI({value:e,onChange:t,className:o}){return(0,S4.jsx)(MI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,mS.__)("Decoration"),className:V("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:bIe.map(r=>(0,S4.jsx)(MI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Eb=l(N(),1);var FI=l(A(),1),x4=l(w(),1),kIe=[{label:(0,Eb.__)("None"),value:"none",icon:hr},{label:(0,Eb.__)("Uppercase"),value:"uppercase",icon:RL},{label:(0,Eb.__)("Lowercase"),value:"lowercase",icon:CL},{label:(0,Eb.__)("Capitalize"),value:"capitalize",icon:xL}];function zI({className:e,value:t,onChange:o}){return(0,x4.jsx)(FI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Eb.__)("Letter case"),className:V("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:kIe.map(r=>(0,x4.jsx)(FI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Tb=l(N(),1);var jI=l(A(),1),w4=l(w(),1),vIe=[{label:(0,Tb.__)("Horizontal"),value:"horizontal-tb",icon:_D},{label:(0,Tb.__)("Vertical"),value:(0,Tb.isRTL)()?"vertical-lr":"vertical-rl",icon:xD}];function UI({className:e,value:t,onChange:o}){return(0,w4.jsx)(jI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Tb.__)("Orientation"),className:V("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:vIe.map(r=>(0,w4.jsx)(jI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var rn=l(A(),1),Poe=l(O(),1),Roe=l(N(),1);var $o=l(w(),1),yIe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,$o.jsx)(rn.__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})},_Ie=({colorValue:e,label:t})=>(0,$o.jsxs)(rn.__experimentalHStack,{justify:"flex-start",children:[(0,$o.jsx)(rn.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,$o.jsx)(rn.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),SIe=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:c,label:u}=e,d=(0,Poe.useRef)(void 0),f={onClick:o,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r,ref:d},m=()=>{i?a():s&&c()},h=i??s;return(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)(rn.Button,{__next40pxDefaultSize:!0,...f,children:(0,$o.jsx)(_Ie,{colorValue:h,label:u})}),n&&h&&(0,$o.jsx)(rn.Button,{__next40pxDefaultSize:!0,label:(0,Roe.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:hr,onClick:()=>{m(),r&&o(),d.current?.focus()}})]})};function HI({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,$o.jsx)($o.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,$o.jsx)(yIe,{setting:u,...a,children:(0,$o.jsx)(rn.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:SIe(m),renderContent:()=>(0,$o.jsx)(rn.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,$o.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,$o.jsx)(Md,{...f})})})})},d)})})}var GI=l(A(),1),Ooe=l(F(),1),Aoe=l(Q(),1);var C4=l(O(),1),ip=l(N(),1);function Fd(){let[e,t,o,r,n,i,s,a,c,u]=he("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,C4.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,ip._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,ip._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,ip._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,C4.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,ip._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,ip._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,ip._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 oa=l(w(),1),xIe=["colors","disableCustomColors","gradients","disableCustomGradients"],B4=({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,Aoe.useInstanceId)(B4),{batch:m}=(0,Ooe.useRegistry)();return(!t||t.length===0)&&(!o||o.length===0)&&r&&n&&s?.every(h=>(!h.colors||h.colors.length===0)&&(!h.gradients||h.gradients.length===0)&&(h.disableCustomColors===void 0||h.disableCustomColors)&&(h.disableCustomGradients===void 0||h.disableCustomGradients))?null:(0,oa.jsxs)(GI.__experimentalToolsPanel,{className:V("block-editor-panel-color-gradient-settings",e),label:c?a:void 0,resetAll:()=>{m(()=>{s.forEach(({colorValue:h,gradientValue:p,onColorChange:g,onGradientChange:b})=>{h?g():p&&b()})})},panelId:f,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,oa.jsx)(HI,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,oa.jsxs)(oa.Fragment,{children:[(0,oa.jsx)(GI.__experimentalSpacer,{marginY:4})," ",i]})]})},wIe=e=>{let t=Fd();return(0,oa.jsx)(B4,{...t,...e})},CIe=e=>xIe.every(t=>e.hasOwnProperty(t))?(0,oa.jsx)(B4,{...e}):(0,oa.jsx)(wIe,{...e}),WI=CIe;var $I=l(O(),1),sp=l(A(),1),T4=l(N(),1);var pS=l(w(),1),E4=[],BIe={...wI,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function EIe(e){let t=e?.default??E4,o=e?.custom??E4,r=e?.theme??E4;return(0,$I.useMemo)(()=>[{name:(0,T4.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function Ib({label:e=(0,T4.__)("Dimension"),onChange:t,value:o,dimensionSizes:r}){let[n,i]=he("dimensions.dimensionSizes","spacing.units"),s=r??n,a=(0,sp.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vh","vw"]}),c=EIe(s),[u,d]=(0,$I.useState)(()=>{let[,m]=(0,sp.__experimentalParseQuantityAndUnitFromRawValue)(o);return m||a[0]?.value||"px"}),f=m=>{let[h,p]=(0,sp.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(m)&&p==="px"?t((h/16).toFixed(2)+m):["em","rem"].includes(p)&&m==="px"?t(Math.round(h*16)+m):["%","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(m)&&h>100&&t(100+m),d(m)};return(0,pS.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,pS.jsx)(sp.BaseControl.VisualLabel,{as:"legend",children:e}),(0,pS.jsx)(np,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:BIe,minimumCustomValue:0,onChange:t,onUnitChange:f,presets:c,presetType:"dimension",selectedUnit:u,showTooltip:!0,units:a,value:o})]})}var Noe=l(O(),1),ir=l(A(),1),Doe=l(N(),1),Moe=l(Pe(),1);var Ya=l(w(),1),Loe={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 Voe({label:e=(0,Doe.__)("Height"),onChange:t,value:o}){(0,Moe.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=he("spacing.units"),i=(0,ir.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,Noe.useMemo)(()=>(0,ir.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,ir.__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,Ya.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,Ya.jsx)(ir.BaseControl.VisualLabel,{as:"legend",children:e}),(0,Ya.jsxs)(ir.Flex,{children:[(0,Ya.jsx)(ir.FlexItem,{isBlock:!0,children:(0,Ya.jsx)(ir.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,Ya.jsx)(ir.FlexItem,{isBlock:!0,children:(0,Ya.jsx)(ir.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,Ya.jsx)(ir.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:Loe[s]?.max??100,step:Loe[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var kS=l(A(),1);var is=l(je()),ure=l(ire());function OIe(e,t,o,r,n,i){i===void 0&&(i=0);var s=Pb(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 AIe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function hS(e,t,o,r,n){n===void 0&&(n=0);var i=Pb(t.width,t.height,n),s=i.width,a=i.height;return{x:sre(e.x,s,o.width,r),y:sre(e.y,a,o.height,r)}}function sre(e,t,o,r){var n=t*r/2-o/2;return QI(e,-n,n)}function are(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function lre(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function LIe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?NIe:DIe,c=Pb(t.width,t.height,i),u=Pb(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)),h=u.width>=u.height*r,p=h?{width:Math.round(m*r),height:m}:{width:f,height:Math.round(f/r)},g=Ho(Ho({},p),{x:Math.round(a(u.width-p.width,d.x*u.width/100)),y:Math.round(a(u.height-p.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function NIe(e,t){return Math.min(e,Math.max(0,t))}function DIe(e,t){return t}function MIe(e,t,o,r,n,i){var s=Pb(t.width,t.height,o),a=QI(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 VIe(e,t,o){var r=AIe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function FIe(e,t,o,r,n,i){o===void 0&&(o=0);var s=Pb(t.naturalWidth,t.naturalHeight,o),a=QI(VIe(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 cre(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function zIe(e){return e*Math.PI/180}function Pb(e,t,o){var r=zIe(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 QI(e,t,o){return Math.min(Math.max(e,t),o)}function XI(){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 jIe=`.reactEasyCrop_Container { |
| 90 |
position: absolute; |
| 91 |
top: 0; |
| 92 |
left: 0; |
| 93 |
right: 0; |
| 94 |
bottom: 0; |
| 95 |
overflow: hidden; |
| 96 |
user-select: none; |
| 97 |
touch-action: none; |
| 98 |
cursor: move; |
| 99 |
display: flex; |
| 100 |
justify-content: center; |
| 101 |
align-items: center; |
| 102 |
} |
| 103 |
|
| 104 |
.reactEasyCrop_Image, |
| 105 |
.reactEasyCrop_Video { |
| 106 |
will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ |
| 107 |
} |
| 108 |
|
| 109 |
.reactEasyCrop_Contain { |
| 110 |
max-width: 100%; |
| 111 |
max-height: 100%; |
| 112 |
margin: auto; |
| 113 |
position: absolute; |
| 114 |
top: 0; |
| 115 |
bottom: 0; |
| 116 |
left: 0; |
| 117 |
right: 0; |
| 118 |
} |
| 119 |
.reactEasyCrop_Cover_Horizontal { |
| 120 |
width: 100%; |
| 121 |
height: auto; |
| 122 |
} |
| 123 |
.reactEasyCrop_Cover_Vertical { |
| 124 |
width: auto; |
| 125 |
height: 100%; |
| 126 |
} |
| 127 |
|
| 128 |
.reactEasyCrop_CropArea { |
| 129 |
position: absolute; |
| 130 |
left: 50%; |
| 131 |
top: 50%; |
| 132 |
transform: translate(-50%, -50%); |
| 133 |
border: 1px solid rgba(255, 255, 255, 0.5); |
| 134 |
box-sizing: border-box; |
| 135 |
box-shadow: 0 0 0 9999em; |
| 136 |
color: rgba(0, 0, 0, 0.5); |
| 137 |
overflow: hidden; |
| 138 |
} |
| 139 |
|
| 140 |
.reactEasyCrop_CropAreaRound { |
| 141 |
border-radius: 50%; |
| 142 |
} |
| 143 |
|
| 144 |
.reactEasyCrop_CropAreaGrid::before { |
| 145 |
content: ' '; |
| 146 |
box-sizing: border-box; |
| 147 |
position: absolute; |
| 148 |
border: 1px solid rgba(255, 255, 255, 0.5); |
| 149 |
top: 0; |
| 150 |
bottom: 0; |
| 151 |
left: 33.33%; |
| 152 |
right: 33.33%; |
| 153 |
border-top: 0; |
| 154 |
border-bottom: 0; |
| 155 |
} |
| 156 |
|
| 157 |
.reactEasyCrop_CropAreaGrid::after { |
| 158 |
content: ' '; |
| 159 |
box-sizing: border-box; |
| 160 |
position: absolute; |
| 161 |
border: 1px solid rgba(255, 255, 255, 0.5); |
| 162 |
top: 33.33%; |
| 163 |
bottom: 33.33%; |
| 164 |
left: 0; |
| 165 |
right: 0; |
| 166 |
border-left: 0; |
| 167 |
border-right: 0; |
| 168 |
} |
| 169 |
`,UIe=1,HIe=3,GIe=1,dre=(function(e){D7(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=is.createRef(),o.imageRef=is.createRef(),o.videoRef=is.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=MIe(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=FIe(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,h=u.offsetWidth<f||u.offsetHeight<m,p=f/m,g=void 0;if(h)switch(o.state.mediaObjectFit){default:case"contain":g=d>p?{width:o.containerRect.height*p,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/p};break;case"horizontal-cover":g={width:o.containerRect.width,height:o.containerRect.width/p};break;case"vertical-cover":g={width:o.containerRect.height*p,height:o.containerRect.height};break}else g={width:u.offsetWidth,height:u.offsetHeight};o.mediaSize=Ho(Ho({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:OIe(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=Ho({},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?hS(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,ure.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=QI(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},h=o.props.restrictPosition?hS(m,o.mediaSize,o.state.cropSize,u,o.props.rotation):m;o.props.onCropChange(h)}o.props.onZoomChange(u)}},o.getCropData=function(){if(!o.state.cropSize)return null;var r=o.props.restrictPosition?hS(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return LIe(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?hS(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 h=Ho({},a);switch(r.key){case"ArrowUp":h.y-=m,r.preventDefault();break;case"ArrowDown":h.y+=m,r.preventDefault();break;case"ArrowLeft":h.x-=m,r.preventDefault();break;case"ArrowRight":h.x+=m,r.preventDefault();break;default:return}o.props.restrictPosition&&(h=hS(h,o.mediaSize,o.state.cropSize,d,f)),r.repeat||(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n),c(h)}},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=jIe,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=are(r,n),this.lastPinchRotation=lre(r,n),this.onDragStart(cre(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=cre(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=are(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=lre(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,h=n.rotation,p=n.zoom,g=n.cropShape,b=n.showGrid,v=n.roundCropAreaPixels,k=n.style,y=k.containerStyle,_=k.cropAreaStyle,S=k.mediaStyle,C=n.classes,B=C.containerClassName,R=C.cropAreaClassName,I=C.mediaClassName,E=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return is.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(T){return o.containerRef=T},"data-testid":"container",style:y,className:XI("reactEasyCrop_Container",B)},i?is.createElement("img",Ho({alt:"",className:XI("reactEasyCrop_Image",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",I)},a,{src:i,ref:this.imageRef,style:Ho(Ho({},S),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):s&&is.createElement("video",Ho({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:XI("reactEasyCrop_Video",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",I)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Ho(Ho({},S),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(s)?s:[{src:s}]).map(function(L){return is.createElement("source",Ho({key:L.src},L))})),this.state.cropSize&&is.createElement("div",Ho({ref:this.cropperRef,style:Ho(Ho({},_),{width:v?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:v?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:XI("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",R)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:HIe,minZoom:UIe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:GIe},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})(is.Component);var yre=l(O(),1);var Ob=l(O(),1);var fre=Object.prototype.hasOwnProperty;function mre(e,t,o){for(o of e.keys())if(lp(o,t))return o}function lp(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--&&lp(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=mre(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=mre(t,n),!n)||!lp(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(fre.call(e,o)&&++r&&!fre.call(t,o)||!(o in t)||!lp(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var ra=l(O(),1);var Rb=1,pre=5;var JI=e=>e>=0?e%360:(360+e%360)%360,WIe=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 hre(e){return e*Math.PI/180}function $Ie(e,t,o){let r=hre(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 gre(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await WIe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=hre(o),{width:c,height:u}=$Ie(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(h=>{h&&m(URL.createObjectURL(h))},"image/jpeg")})):null}catch{return null}}var cp={crop:{x:0,y:0,width:100,height:100},zoom:Rb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},KIe={x:0,y:0},M4={crop:KIe,croppedArea:cp.crop,croppedAreaPixels:null,zoom:cp.zoom,rotation:cp.rotation,flip:cp.flip,aspectRatio:cp.aspectRatio,mediaSize:null};function bre(){let[e,t]=(0,ra.useState)(M4),[o,r]=(0,ra.useState)(null),n=(0,ra.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=JI(m.rotation)),{...d,...m}})},[]),i=(0,ra.useCallback)((u=null)=>{if(!u){r(null),n(M4);return}if(typeof u=="object"){let d={...cp,...u};r(d),n(d)}},[n,r]),s=(0,ra.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({...M4})},[o,n]),a=(0,ra.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:JI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return lp(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:JI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return lp(u,cp)===!1},[e,o]),c=(0,ra.useCallback)(async u=>e.croppedAreaPixels?gre(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,ra.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var kre=l(w(),1),vre=(0,Ob.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:Rb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function V4({children:e}){let t=bre(),o=(0,Ob.useMemo)(()=>({...t}),[t]);return(0,kre.jsx)(vre.Provider,{value:o,children:e})}var gS=()=>{let e=(0,Ob.useContext)(vre);if(!e)throw new Error("Missing ImageCropperContext");return e};var _re=l(w(),1);function F4({src:e,onLoad:t,minZoom:o=Rb,maxZoom:r=pre,...n}){let{cropperState:i,setCropperState:s}=gS(),{crop:a,zoom:c,rotation:u,aspectRatio:d,flip:f}=i,m=v=>s({crop:v}),h=v=>s({zoom:v}),p=v=>s({rotation:v}),g=v=>s({mediaSize:v}),b=(0,yre.useCallback)((v,k)=>{s({croppedArea:v,croppedAreaPixels:k})},[s]);return(0,_re.jsx)(dre,{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:h,onCropComplete:b,onMediaLoaded:v=>{t?.(v)},onRotationChange:p,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 Nb=l(A(),1),Lb=l(N(),1);var Sre=100,xre=300,eP={placement:"bottom-start"};var Ab=l(O(),1);var tP=l(F(),1),up=l(O(),1),wc=l(N(),1),wre=l(Ai(),1),Cre=l(Me(),1);var YIe={crop:(0,wc.__)("Image cropped."),rotate:(0,wc.__)("Image rotated."),cropAndRotate:(0,wc.__)("Image cropped and rotated.")};function Bre({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,tP.useDispatch)(wre.store),[c,u]=(0,up.useState)(!1),{editMediaEntity:d}=(0,tP.useSelect)(h=>({editMediaEntity:h(x).getSettings()?.[J0]}),[]),f=(0,up.useCallback)(()=>{u(!1),i()},[i]),m=(0,up.useCallback)(async()=>{if(!d){i(),s((0,wc.__)("Sorry, you are not allowed to edit images on this site."),{id:"image-editing-error",type:"snackbar"});return}u(!0);let h=[];if(t>0&&h.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&h.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),h.length===0){u(!1),i();return}let p=h.length===1?h[0].type:"cropAndRotate";try{let g=await d(r,{src:o,modifiers:h},{throwOnError:!0});g&&(n({id:g.id,url:g.source_url}),a(YIe[p],{type:"snackbar",actions:[{label:(0,wc.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,wc.sprintf)((0,wc.__)("Could not edit image. %s"),(0,Cre.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,up.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var na=l(O(),1),Ere=l(pt(),1);function Tre({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,na.useState)(),{cropperState:i,setCropperState:s}=gS(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,na.useCallback)(k=>{s({zoom:k})},[s]),m=(0,na.useCallback)(k=>{s({aspectRatio:k})},[s]),h=t/o,p=o/t;(0,na.useEffect)(()=>{m(h)},[]);let[g,b]=(0,na.useState)(0),v=(0,na.useCallback)(()=>{let k=(g+90)%360,y=h,S=a!==1||!(h===c||p===c);if(g%180===90&&(y=1/h),k===0){n(),b(k),s({aspectRatio:S?c:h,crop:{x:-(u.y*y),y:u.x*y}});return}function C(I){let E=document.createElement("canvas"),L=0,T=0;k%180?(E.width=I.target.height,E.height=I.target.width):(E.width=I.target.width,E.height=I.target.height),(k===90||k===180)&&(L=E.width),(k===270||k===180)&&(T=E.height);let P=E.getContext("2d");P.translate(L,T),P.rotate(k*Math.PI/180),P.drawImage(I.target,0,0),E.toBlob(D=>{n(URL.createObjectURL(D)),b(k);let j=S?c:E.width/E.height;s({aspectRatio:j,crop:{x:-(u.y*y),y:u.x*y}})})}let B=new window.Image;B.src=e,B.onload=C;let R=(0,Ere.applyFilters)("media.crossOrigin",void 0,e);typeof R=="string"&&(B.crossOrigin=R)},[g,h,e,s,u,a,c,p,b]);return(0,na.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:g,rotateClockwise:v,aspect:c,setAspect:m,defaultAspect:h}),[r,d,a,f,g,v,c,m,h])}var Ire=l(w(),1),z4=(0,Ab.createContext)({});z4.displayName="ImageEditingContext";var qa=()=>(0,Ab.useContext)(z4);function Pre({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=Tre({url:t,naturalWidth:o,naturalHeight:r}),c=Bre({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,Ab.useMemo)(()=>({...a,...c}),[a,c]);return(0,Ire.jsx)(z4.Provider,{value:u,children:s})}var ss=l(w(),1);function oP({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,ss.jsx)(Nb.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,ss.jsx)(Nb.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?Cs:void 0,children:i},s))})}function qIe(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 j4({ratio:e,...t}){return{ratio:qIe(e),...t}}function Rre({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=qa(),[i,s,a]=he("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,ss.jsx)(Nb.DropdownMenu,{icon:FA,label:(0,Lb.__)("Aspect Ratio"),popoverProps:eP,toggleProps:e,children:({onClose:c})=>(0,ss.jsxs)(ss.Fragment,{children:[(0,ss.jsx)(oP,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,Lb.__)("Original"),ratio:n},...a?i.map(j4).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,ss.jsx)(oP,{label:(0,Lb.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,ss.jsx)(oP,{label:(0,Lb.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(j4).filter(({ratio:u})=>u>1)}),a&&(0,ss.jsx)(oP,{label:(0,Lb.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(j4).filter(({ratio:u})=>u<1)})]})})}var Ore=l(A(),1),Are=l(Q(),1);var zd=l(w(),1);function Lre({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=qa(),[u,{width:d}]=(0,Are.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,zd.jsxs)("div",{className:V("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,zd.jsx)(F4,{src:a||e}),s&&(0,zd.jsx)(Ore.Spinner,{})]});return(0,zd.jsxs)(zd.Fragment,{children:[u,m]})}var jd=l(A(),1),U4=l(N(),1);var bS=l(w(),1);function Nre(){let{isInProgress:e,zoom:t,setZoom:o}=qa();return(0,bS.jsx)(jd.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:eP,renderToggle:({isOpen:r,onToggle:n})=>(0,bS.jsx)(jd.ToolbarButton,{icon:XN,label:(0,U4.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,bS.jsx)(jd.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,bS.jsx)(jd.RangeControl,{__next40pxDefaultSize:!0,label:(0,U4.__)("Zoom"),min:Sre,max:xre,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var Dre=l(A(),1),Mre=l(N(),1);var Vre=l(w(),1);function Fre(){let{isInProgress:e,rotateClockwise:t}=qa();return(0,Vre.jsx)(Dre.ToolbarButton,{icon:KN,label:(0,Mre.__)("Rotate"),onClick:t,disabled:e})}var H4=l(A(),1),G4=l(N(),1);var dp=l(w(),1);function zre(){let{isInProgress:e,apply:t,cancel:o}=qa();return(0,dp.jsxs)(dp.Fragment,{children:[(0,dp.jsx)(H4.ToolbarButton,{onClick:t,disabled:e,children:(0,G4.__)("Apply")}),(0,dp.jsx)(H4.ToolbarButton,{onClick:o,children:(0,G4.__)("Cancel")})]})}var di=l(w(),1);function jre({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,di.jsx)(V4,{children:(0,di.jsxs)(Pre,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,di.jsx)(Lre,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,di.jsxs)(Mt,{children:[(0,di.jsxs)(kS.ToolbarGroup,{children:[(0,di.jsx)(Nre,{}),(0,di.jsx)(kS.ToolbarItem,{children:u=>(0,di.jsx)(Rre,{toggleProps:u})}),(0,di.jsx)(Fre,{})]}),(0,di.jsx)(kS.ToolbarGroup,{children:(0,di.jsx)(zre,{})})]})]})})}var fi=l(A(),1),Ud=l(N(),1);var Db=l(O(),1);function Ure(e,t,o,r,n){let[i,s]=(0,Db.useState)(t??r??""),[a,c]=(0,Db.useState)(e??o??"");return(0,Db.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,Db.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 h=m===""?void 0:parseInt(m,10);f==="width"?s(h):c(h),n({[f]:h})},updateDimensions:(f,m)=>{c(f??o),s(m??r),n({height:f,width:m})}}}var as=l(w(),1),Hre=[25,50,75,100],ZIe=()=>{};function Gre(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function Wre({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=ZIe}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:h}=Ure(a,s,o,t,c),p=b=>{if(b===void 0){h();return}let{scaledWidth:v,scaledHeight:k}=Gre(b,t,o);h(k,v)},g=Hre.find(b=>{let{scaledWidth:v,scaledHeight:k}=Gre(b,t,o);return f===v&&d===k});return(0,as.jsxs)(fi.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,as.jsx)(fi.SelectControl,{label:(0,Ud.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,as.jsxs)(as.Fragment,{children:[(0,as.jsxs)(fi.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,as.jsx)(fi.__experimentalNumberControl,{label:(0,Ud.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,as.jsx)(fi.__experimentalNumberControl,{label:(0,Ud.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,as.jsx)(fi.__experimentalToggleGroupControl,{label:(0,Ud.__)("Image size presets"),hideLabelFromVision:!0,onChange:p,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:Hre.map(b=>(0,as.jsx)(fi.__experimentalToggleGroupControlOption,{value:b,label:(0,Ud.sprintf)((0,Ud.__)("%d%%"),b)},b))})]})]})}var rP=l(A(),1);var fp=l(N(),1),Kre=l(w(),1),$re={left:gu,center:hu,right:bu,"space-between":lh,stretch:ch};function XIe({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?$re[r]:$re.left,c=[{name:"left",icon:gu,title:(0,fp.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:hu,title:(0,fp.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:bu,title:(0,fp.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:lh,title:(0,fp.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:ch,title:(0,fp.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?rP.ToolbarGroup:rP.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,Kre.jsx)(u,{icon:a,popoverProps:n,label:(0,fp.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var W4=XIe;var $4=l(w(),1),Ph=e=>(0,$4.jsx)(W4,{...e,isToolbar:!1}),Yre=e=>(0,$4.jsx)(W4,{...e,isToolbar:!0});var nn=l(A(),1),ia=l(N(),1),uo=l(O(),1),Fne=l(Q(),1),zne=l(Me(),1),jne=l(tt(),1),Une=l(__(),1),bP=l(F(),1),tF=l(vh(),1);var Hne=l(Pe(),1),kP=l(Gn(),1);var Mb=l(A(),1);var nP=l(Q(),1),iP=l(N(),1),qre=l(O(),1),Cc=l(w(),1);function Zre({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,nP.useReducedMotion)(),n=r?qre.Fragment:Mb.__unstableAnimatePresence,i=r?"div":Mb.__unstableMotion.div,a=`link-control-settings-drawer-${(0,nP.useInstanceId)(Zre)}`;return(0,Cc.jsxs)(Cc.Fragment,{children:[(0,Cc.jsx)(Mb.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,iP.isRTL)()?Sv:pu,"aria-controls":a,children:(0,iP._x)("Advanced","Additional link settings")}),(0,Cc.jsx)(n,{children:t&&(0,Cc.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,Cc.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var Xre=Zre;var dP=l(O(),1),J4=l(N(),1),gne=l(Pe(),1);var vS=l(N(),1),lne=l(A(),1);var sP=l(N(),1),Qre=l(A(),1),Jre=l(O(),1);var K4=l(w(),1),QIe=({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,Jre.createInterpolateElement)((0,sP.sprintf)((0,sP.__)("Create: <mark>%s</mark>"),e),{mark:(0,K4.jsx)("mark",{})}),(0,K4.jsx)(Qre.MenuItem,{...o,iconPosition:"left",icon:Ii,className:"block-editor-link-control__search-item",onClick:t,children:n})},ene=QIe;var Bc=l(N(),1),lP=l(A(),1);var tne=l(Me(),1),Fb=l(Gn(),1),one=l(Q(),1),rne=l(Pe(),1),Vb=l(w(),1),aP={post:{icon:GN,label:(0,Bc.__)("Post")},page:{icon:Qf,label:(0,Bc.__)("Page")},post_tag:{icon:vD,label:(0,Bc.__)("Tag")},category:{icon:GA,label:(0,Bc.__)("Category")},attachment:{icon:vL,label:(0,Bc.__)("Attachment")}};function JIe({isURL:e,suggestion:t}){let o=null;return e?o=wv:t.type in aP&&(o=aP[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=XL),t.isBlogHome&&(o=AD))),o?(0,Vb.jsx)(Be,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function ePe(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function tPe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var oPe=(e,...t)=>(...o)=>e(...o,...t),rPe=e=>t=>t==null||t!==t?e:t;function nPe(e){return e&&(0,one.pipe)(Fb.safeDecodeURI,Fb.getPath,rPe(""),oPe(Fb.filterURLForDisplay,24),tPe,ePe)(e)}var nne=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,Bc.__)("Press ENTER to add this link"):nPe(t.url);return(0,Vb.jsx)(lP.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,Vb.jsx)(JIe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&iPe(t),className:"block-editor-link-control__search-item",children:(0,Vb.jsx)(lP.TextHighlight,{text:(0,tne.__unstableStripHTML)(t.title),highlight:o})})};function iPe(e){return e.isFrontPage?(0,Bc.__)("Front page"):e.isBlogHome?(0,Bc.__)("Blog home"):e.type in aP?aP[e.type].label:e.type}var ine=nne,sne=e=>((0,rne.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,Vb.jsx)(nne,{...e}));var ane=l(N(),1),mp="__CREATE__",Y4="tel",cP="link",q4="mailto",Z4="internal",zb=[cP,q4,Y4,Z4],X4=[{id:"opensInNewTab",title:(0,ane.__)("Open in new tab")}];var cne=l(Pe(),1),pp=l(w(),1);function une({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=V("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&zb.includes(i[0].type),h=e&&!m&&!c,p=!d?.type,g=c?(0,vS.__)("Suggestions"):(0,vS.sprintf)((0,vS.__)('Search results for "%s"'),t);return(0,pp.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,pp.jsx)("div",{...r,className:f,"aria-label":g,children:(0,pp.jsx)(lne.MenuGroup,{children:i.map((b,v)=>h&&mp===b.type?(0,pp.jsx)(ene,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,v),isSelected:v===s},b.type):mp===b.type?null:(0,pp.jsx)(ine,{itemProps:n(b,v),suggestion:b,index:v,onClick:()=>{o(b)},isSelected:v===s,isURL:zb.includes(b.type),searchTerm:t,shouldShowType:p,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var dne=une,fne=e=>((0,cne.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,pp.jsx)(une,{...e}));var mne=l(O(),1),pne=l(F(),1);var uP=l(Gn(),1);function yS(e){let t=e?.trim();if(!t)return{url:t,type:cP};let o=cP,r=(0,uP.getProtocol)(t)||"";return r.includes("mailto")?o=q4:r.includes("tel")?o=Y4:t?.startsWith("#")&&(o=Z4),Df(t)||Mf(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,uP.prependHTTPS)(t),type:o}}var sPe=()=>Promise.resolve([]),aPe=e=>{let{url:t,type:o}=yS(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},lPe=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||Vf(e)||!r?a:a.concat({title:e,url:e,type:mp})};function hne(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,pne.useSelect)(a=>{let{getSettings:c}=a(x);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?aPe:sPe;return(0,mne.useCallback)((a,{isInitialSuggestions:c})=>Vf(a)?s(a,{isInitialSuggestions:c}):lPe(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var jb=l(w(),1),cPe=()=>Promise.resolve([]),Q4=()=>{},bne=(0,dP.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=Q4,onChange:a=Q4,onSelect:c=Q4,showSuggestions:u=!0,renderSuggestions:d=C=>(0,jb.jsx)(dne,{...C}),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:h=!1,suggestionsQuery:p={},withURLSuggestion:g=!0,createSuggestionButtonText:b,hideLabelFromVision:v=!1,suffix:k,isEntity:y=!1,customValidity:_},S)=>{let C=hne(p,m,i,g),B=u?f||C:cPe,[R,I]=(0,dP.useState)(),E=(j,H)=>{a(j),I(H)},L=j=>d({...j,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:p,handleSuggestionClick:H=>{j.handleSuggestionClick&&j.handleSuggestionClick(H),T(H)}}),T=async j=>{let H=j;if(mp===j.type){try{H=await s(j.title),H?.url&&c(H)}catch{}return}if(m||H&&Object.keys(H).length>=1){let{id:z,url:U,kind:G,type:W,...J}=o??{};c({...J,...H},H)}},P=n??(0,J4.__)("Search or type URL"),D=v&&n!==""?P:(0,J4.__)("Link");return(0,jb.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,jb.jsx)(Hd,{disableSuggestions:o?.url===e,label:D,hideLabelFromVision:v,className:r,value:e,onChange:E,placeholder:P,__experimentalRenderSuggestions:u?L:null,__experimentalFetchLinkSuggestions:B,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,customValidity:_,required:!1,onSubmit:(j,H)=>{let z=j||R;!z&&!e?.trim()?.length?H.preventDefault():T(z||{url:e})},inputRef:S,suffix:k,disabled:y}),t]})}),kne=bne,vne=e=>((0,gne.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,jb.jsx)(bne,{...e}));var Gd=l(N(),1),Vo=l(A(),1),wne=l(Q(),1),pP=l(Gn(),1);var Cne=l(Me(),1),hP=l(F(),1),Bne=l(Ai(),1),Ene=l(vh(),1);var yne=l(A(),1),{Slot:_ne,Fill:Sne}=(0,yne.createSlotFill)("BlockEditorLinkControlViewer");var xne=l(F(),1),fP=l(O(),1);function uPe(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 dPe(e){let[t,o]=(0,fP.useReducer)(uPe,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,xne.useSelect)(n=>{let{getSettings:i}=n(x);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,fP.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 mP=dPe;var St=l(w(),1),{Badge:fPe}=M(Vo.privateApis);function Tne({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,hP.useSelect)(b=>b(Ene.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=mP(s),u=a&&Object.keys(a).length,d=e&&(0,pP.filterURLForDisplay)((0,pP.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,Cne.__unstableStripHTML)(e?.entityTitle||a?.title||e?.title||d),h;a?.icon?h=(0,St.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,St.jsx)(Be,{icon:eN,size:32}):h=(0,St.jsx)(Be,{icon:wv});let{createNotice:p}=(0,hP.useDispatch)(Bne.store),g=(0,wne.useCopyToClipboard)(e.url,()=>{p("info",(0,Gd.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,St.jsx)(Vo.Flex,{role:"group","aria-label":(0,Gd.__)("Manage link"),className:V("block-editor-link-control__preview",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":f,"is-url-title":m===d}),children:(0,St.jsxs)(Vo.Flex,{gap:0,align:"flex-start",children:[(0,St.jsxs)(Vo.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,Gd.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,St.jsx)(Vo.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,St.jsx)("img",{src:e?.image,alt:""})}):(0,St.jsx)(Vo.Flex,{className:V("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,St.jsx)(Vo.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,St.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,Gd.__)("Link is empty")}):(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Vo.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,St.jsx)(Vo.__experimentalTruncate,{numberOfLines:1,children:m})}),(0,St.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,St.jsx)(Vo.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,St.jsx)(Vo.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,v)=>(0,St.jsx)(fPe,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${v}`))})]})})]}),(0,St.jsx)(Vo.Button,{icon:Jf,label:(0,Gd.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,St.jsx)(Vo.Button,{icon:Ti,label:(0,Gd.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,St.jsx)(Vo.Button,{icon:oL,label:(0,Gd.__)("Copy link"),ref:g,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,St.jsx)(_ne,{fillProps:e})]})})}var Ine=l(N(),1),gP=l(A(),1),Ub=l(w(),1),mPe=()=>{},pPe=({value:e,onChange:t=mPe,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,Ub.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,Ub.jsx)(gP.CheckboxControl,{className:"block-editor-link-control__setting",label:i.title,onChange:r(i),checked:e?!!e[i.id]:!1,help:i?.help},i.id)}).filter(Boolean);return(0,Ub.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,Ub.jsx)(gP.VisuallyHidden,{as:"legend",children:(0,Ine.__)("Currently selected link settings")}),n]})},Pne=pPe;var Rne=l(N(),1),hp=l(O(),1);function One(e){let t=(0,hp.useRef)(),[o,r]=(0,hp.useState)(!1),[n,i]=(0,hp.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=hPe(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,Rne.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,hp.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var hPe=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 eF=l(O(),1),Nne=l(Lne(),1);function Dne(e){let[t,o]=(0,eF.useState)(e||{}),[r,n]=(0,eF.useState)(e);return(0,Nne.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 Rt=l(w(),1),oF=()=>{},Mne="core/block-editor",Vne="linkControlSettingsDrawer";function gp({searchInputPlaceholder:e,value:t,settings:o=X4,onChange:r=oF,onInputChange:n,onRemove:i,onCancel:s,noDirectEntry:a=!1,showSuggestions:c=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:f,withCreateSuggestion:m,inputValue:h="",suggestionsQuery:p={},noURLSuggestion:g=!1,createSuggestionButtonText:b,hasRichPreviews:v=!1,hasTextControl:k=!1,renderControlBottom:y=null,handleEntities:_=!1}){m===void 0&&f&&(m=!0);let[S,C]=(0,uo.useState)(!1),[B,R]=(0,uo.useState)(void 0),{advancedSettingsPreference:I}=(0,bP.useSelect)(be=>({advancedSettingsPreference:be(tF.store).get(Mne,Vne)??!1}),[]),{set:E}=(0,bP.useDispatch)(tF.store),L=be=>{E&&E(Mne,Vne,be),C(be)},T=I||S,P=(0,uo.useRef)(!0),D=(0,uo.useRef)(),j=(0,uo.useRef)(),H=(0,uo.useRef)(),z=(0,uo.useRef)(),U=o.map(({id:be})=>be),[G,W,J,ce,te]=Dne(t),ne=be=>{J(be),n?.(be)},X=_&&!!G?.id,q=(0,Fne.useInstanceId)(gp,"link-control"),ee=X?`${q}__help`:null,$=t&&!(0,Une.isShallowEqualObjects)(G,t),[oe,ie]=(0,uo.useState)(d!==void 0?d:!t||!t.url),{createPage:K,isCreatingPage:ae,errorMessage:ge}=One(f);(0,uo.useEffect)(()=>{d!==void 0&&ie(d)},[d]),(0,uo.useEffect)(()=>{if(P.current)return;(zne.focus.focusable.find(D.current)[0]||D.current).focus()},[oe,ae]),(0,uo.useEffect)(()=>(P.current=!1,()=>{P.current=!0}),[]);let fe=(0,uo.useRef)();(0,uo.useEffect)(()=>{if(fe.current===void 0){fe.current=h;return}fe.current!==h&&(console.warn("LinkControl: The inputValue prop is uncontrolled and only sets the initial value. onInputChange is an observer for the input value. Changes to inputValue from the parent will not update the search input."),fe.current=h)},[h]),(0,uo.useEffect)(()=>{if(B?.type==="invalid"){let be=H.current;be&&typeof be.reportValidity=="function"&&be.reportValidity()}},[B]);let xe=t?.url?.trim()?.length>0,Ve=()=>{ie(!1)},at=be=>{let Bt={type:"invalid",message:(0,ia.__)("Please enter a valid URL.")},Ao={type:"valid"},qe=be?.trim();if(!qe?.length||!Vf(qe))return Bt;if(Df(qe)||Mf(qe))return Ao;let re=(0,kP.prependHTTPS)(qe);return(0,kP.isURL)(re)?Ao:Bt},Lt=be=>{if(!(be&&be.id&&be.type&&!zb.includes(be.type))){let qe=be?.url||He,re=at(qe);if(re.type==="invalid"){R(re);return}let{url:Ne}=yS(qe);be={...be,url:Ne}}be?.kind==="taxonomy"&&be?.url&&(z.current=be.url);let Ao=Object.keys(be).reduce((qe,re)=>(U.includes(re)||(qe[re]=be[re]),qe),{});r({...G,...Ao,title:G?.title||be?.title}),R(void 0),Ve()},no=()=>{if(dr)return!1;let be=He.trim(),Bt=G&&G.id&&G.type&&!zb.includes(G.type),Ao=t?.url===be;if(Bt&&Ao)return R(void 0),!0;let qe=at(He);return qe.type==="invalid"?(R(qe),!1):(R(void 0),!0)},jo=()=>{$&&r({...t,...G,url:yS(He).url}),Ve(),R(void 0)},lt=()=>{no()&&jo()},ur=be=>{let{keyCode:Bt}=be;Bt===jne.ENTER&&!dr&&(be.preventDefault(),lt())},$t=()=>{W(t)},io=be=>{be.preventDefault(),be.stopPropagation(),$t(),R(void 0),xe?Ve():i?.(),s?.()},[Ue,Kt]=(0,uo.useState)(!1),Je=()=>{let{id:be,kind:Bt,type:Ao,...qe}=G;W({...qe,id:void 0,kind:void 0,type:void 0,url:void 0}),Kt(!0)};(0,uo.useEffect)(()=>{Ue&&(H.current?.focus(),Kt(!1))},[Ue]);let He=G?.url!==void 0?G.url:h||"",dr=!He?.trim()?.length;(0,uo.useEffect)(()=>{R(void 0)},[He]);let pn=!B,ze=i&&t&&!oe&&!ae,so=oe&&xe,et=xe&&k,Fe=(oe||!t)&&!ae,yt=dr||!pn||t&&!$,Oo=!!o?.length&&oe&&xe,fr=(0,uo.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&z.current?{...t,url:z.current}:t,[t]);return(0,Rt.jsxs)("div",{tabIndex:-1,ref:D,className:"block-editor-link-control",children:[ae&&(0,Rt.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Rt.jsx)(nn.Spinner,{})," ",(0,ia.__)("Creating"),"\u2026"]}),Fe&&(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsxs)("div",{className:V({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":et,"has-actions":so}),children:[et&&(0,Rt.jsx)(nn.TextControl,{ref:j,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,ia.__)("Text"),value:G?.title,onChange:ce,onKeyDown:ur,__next40pxDefaultSize:!0}),(0,Rt.jsx)(kne,{ref:H,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:He,withCreateSuggestion:m,onCreateSuggestion:K,onChange:ne,onSelect:Lt,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:c,suggestionsQuery:p,withURLSuggestion:!g,createSuggestionButtonText:b,hideLabelFromVision:!et,isEntity:X,customValidity:B,suffix:(0,Rt.jsx)(gPe,{isEntity:X,showActions:so,isDisabled:yt,onUnlink:Je,onSubmit:lt,helpTextId:ee})}),X&&ee&&(0,Rt.jsx)("p",{id:ee,className:"block-editor-link-control__help",children:(0,ia.sprintf)((0,ia.__)("Synced with the selected %s."),G?.type||"item")})]}),ge&&(0,Rt.jsx)(nn.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:ge})]}),t&&!oe&&!ae&&(0,Rt.jsx)(Tne,{value:fr,onEditClick:()=>ie(!0),hasRichPreviews:v,hasUnlinkControl:ze,onRemove:()=>{i(),ie(!0)}},fr?.url),Oo&&(0,Rt.jsx)("div",{className:"block-editor-link-control__tools",children:!dr&&(0,Rt.jsx)(Xre,{settingsOpen:T,setSettingsOpen:L,children:(0,Rt.jsx)(Pne,{value:G,settings:o,onChange:te(U)})})}),so&&(0,Rt.jsxs)(nn.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Rt.jsx)(nn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:io,children:(0,ia.__)("Cancel")}),(0,Rt.jsx)(nn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:yt?oF:lt,className:"block-editor-link-control__search-submit","aria-disabled":yt,children:(0,ia.__)("Apply")})]}),!ae&&y&&y()]})}function gPe({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Rt.jsx)(nn.Button,{icon:Ti,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,ia.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Rt.jsx)(nn.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Rt.jsx)(nn.Button,{onClick:o?oF:n,label:(0,ia.__)("Submit"),icon:wl,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}gp.ViewerFill=Sne;gp.DEFAULT_LINK_SETTINGS=X4;var vP=e=>((0,Hne.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Rt.jsx)(gp,{...e}));vP.ViewerFill=gp.ViewerFill;vP.DEFAULT_LINK_SETTINGS=gp.DEFAULT_LINK_SETTINGS;var Wd=gp;var Wne=l(N(),1),$ne=l(A(),1),Kne=l(Pe(),1);var _S=1.5,rF=.01,nF=10,iF="";function Gne(e){return e!==void 0&&e!==iF}var sF=l(w(),1),bPe=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=Gne(t),s=(d,f)=>{if(i)return d;let m=rF*nF;switch(`${d}`){case`${m}`:return _S+m;case"0":return f?d:_S-m;case"":return _S;default:return d}},a=(d,f)=>{let m=["insertText","insertFromPaste"].includes(f.payload.event.nativeEvent?.inputType),h=s(d.value,m);return{...d,value:h}},c=i?t:iF,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,Kne.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,sF.jsx)("div",{className:"block-editor-line-height-control",children:(0,sF.jsx)($ne.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,Wne.__)("Line height"),placeholder:_S,step:rF,spinFactor:nF,value:c,min:0,spinControls:"custom"})})},yP=bPe;var Za=l(N(),1),Yne=l(er(),1),sn=l(A(),1),SP=l(F(),1),qne=l(tt(),1);var Zne=l(Q(),1),Xne=l(Me(),1),Qne=l(Ai(),1),Jne=l(O(),1);function _P(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 sr=l(w(),1),kPe=()=>{},vPe=0,yPe=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=kPe,name:m=(0,Za.__)("Replace"),createNotice:h,removeNotice:p,children:g,multiple:b=!1,addToGallery:v,handleUpload:k=!0,variant:y,popoverProps:_,renderToggle:S,className:C})=>{let{mediaUpload:B,allowedMimeTypes:R}=(0,SP.useSelect)(U=>{let{getSettings:G}=U(x),W=G();return{mediaUpload:W.mediaUpload,allowedMimeTypes:W.allowedMimeTypes}},[]),I=`block-editor/media-replace-flow/error-notice/${++vPe}`,E=(0,Jne.useMemo)(()=>_P(r,R,n),[r,R,n]),L=U=>{let G=(0,Xne.__unstableStripHTML)(U);if(i){i(G);return}setTimeout(()=>{h("error",G,{speak:!0,id:I,isDismissible:!0})},1e3)},T=(U,G)=>{d&&u&&u(),G(),s(U),(0,Yne.speak)((0,Za.__)("The media file has been replaced")),p(I)},P=(U,G)=>{let W=U.target.files;if(!k)return G(),s(W);f(W),B({allowedTypes:r,filesList:W,onFileChange:([J])=>{T(J,G)},onError:L})},D=U=>{U.keyCode===qne.DOWN&&(U.preventDefault(),U.target.click())},H=b&&(!r||r.length===0?!1:r.every(U=>U==="image"||U.startsWith("image/"))),z={..._,variant:y};return(0,sr.jsx)(sn.Dropdown,{popoverProps:z,className:C,contentClassName:V("block-editor-media-replace-flow__options",y&&`is-variant-${y}`),renderToggle:({isOpen:U,onToggle:G})=>S?S({"aria-expanded":U,"aria-haspopup":"true",onClick:G,onKeyDown:D,children:m}):(0,sr.jsx)(sn.ToolbarButton,{"aria-expanded":U,"aria-haspopup":"true",onClick:G,onKeyDown:D,children:m}),renderContent:({onClose:U})=>(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsxs)(sn.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,sr.jsxs)(Ws,{children:[(0,sr.jsx)(sd,{gallery:H,addToGallery:v,multiple:b,value:b?o:t,onSelect:G=>T(G,U),allowedTypes:r,render:({open:G})=>(0,sr.jsx)(sn.MenuItem,{icon:uh,onClick:G,children:(0,Za.__)("Open Media Library")})}),(0,sr.jsx)(sn.FormFileUpload,{onChange:G=>{P(G,U)},accept:E,multiple:!!b,render:({openFileDialog:G})=>(0,sr.jsx)(sn.MenuItem,{icon:RD,onClick:()=>{G()},children:(0,Za._x)("Upload","verb")})})]}),u&&(0,sr.jsx)(sn.MenuItem,{icon:UN,onClick:u,isPressed:d,children:(0,Za.__)("Use featured image")}),typeof g=="function"?g({onClose:U}):g,e&&c&&(0,sr.jsx)(sn.MenuItem,{onClick:()=>{c(),U()},children:(0,Za.__)("Reset")})]}),a&&(0,sr.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,sr.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,Za.__)("Current media URL:")}),(0,sr.jsx)(Wd,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:G})=>{a(G)},searchInputPlaceholder:(0,Za.__)("Paste or type URL")})]})]})})},Hb=(0,Zne.compose)([(0,SP.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(Qne.store);return{createNotice:t,removeNotice:o}}),(0,sn.withFilters)("editor.MediaReplaceFlow")])(yPe);var To=l(A(),1),Eo=l(N(),1),qd=l(O(),1),mie=l(F(),1);var pie=l(Pe(),1);var lF=l(N(),1),wP=l(O(),1),Gb=l(A(),1);var fie=l(Pe(),1);var oie=l(N(),1),rie=l(A(),1);var eie=l(A(),1),xP=l(Gn(),1),aF=l(w(),1);function tie({url:e,urlLabel:t,className:o}){let r=V(o,"block-editor-url-popover__link-viewer-url");return e?(0,aF.jsx)(eie.ExternalLink,{className:r,href:e,children:t||(0,xP.filterURLForDisplay)((0,xP.safeDecodeURI)(e))}):(0,aF.jsx)("span",{className:r})}var SS=l(w(),1);function nie({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,SS.jsxs)("div",{className:V("block-editor-url-popover__link-viewer",e),...i,children:[(0,SS.jsx)(tie,{url:r,urlLabel:n,className:t}),o&&(0,SS.jsx)(rie.Button,{icon:Jf,label:(0,oie.__)("Edit"),onClick:o,size:"compact"})]})}var cie=l(N(),1),uie=l(A(),1);var Ec=l(N(),1),xS=l(O(),1),sa=l(tt(),1),On=l(A(),1),$d=l(Q(),1),iie=l(F(),1),sie=l(Gn(),1);var Xa=l(w(),1),aie=l(je(),1),{ValidatedInputControl:_Pe}=M(On.privateApis);function lie(e){return typeof e=="function"}var SPe=class extends xS.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,xS.createRef)(),this.inputRef=e.inputRef||(0,xS.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,$d.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,sie.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,Ec.sprintf)((0,Ec._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,Ec.__)("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 sa.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case sa.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case sa.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 sa.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case sa.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case sa.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,Ec.__)("Link selected.")));break}case sa.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,Xa.jsxs)(Xa.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,Ec.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:a=!1,help:c=null,disabled:u=!1,customValidity:d,markWhenOptional:f}=this.props,{loading:m,showSuggestions:h,selectedSuggestion:p,suggestionsListboxId:g,suggestionOptionIdPrefix:b}=this.state,v=`url-input-control-${r}`,k={id:v,label:e,className:V("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},y={id:v,value:s,required:this.props.required??!0,type:"text",name:v,autoComplete:"off",onChange:u?()=>{}:this.onChange,onFocus:u?()=>{}:this.onFocus,placeholder:n,onKeyDown:u?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,Ec.__)("URL"),"aria-expanded":h,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":p!==null?`${b}-${p}`:void 0,ref:this.inputRef,disabled:u,suffix:this.props.suffix,help:c},_={customValidity:d,...f!==void 0&&{markWhenOptional:f}};if(i)return i(k,y,m);d!==void 0&&(this.hasRenderedValidation.current=!0);let S=this.hasRenderedValidation.current?_Pe:On.__experimentalInputControl;return(0,Xa.jsxs)(On.BaseControl,{...k,children:[(0,Xa.jsx)(S,{...y,...this.hasRenderedValidation.current?_:{},__next40pxDefaultSize:!0}),m&&(0,Xa.jsx)(On.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 lie(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,Xa.jsx)(On.Popover,{placement:"bottom",focusOnMount:!1,children:(0,Xa.jsx)("div",{...u,className:V("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,aie.createElement)(On.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:V("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},Hd=(0,$d.compose)($d.withSafeTimeout,On.withSpokenMessages,$d.withInstanceId,(0,iie.withSelect)((e,t)=>{if(lie(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(x);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(SPe);var wS=l(w(),1);function die({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,wS.jsxs)("form",{className:V("block-editor-url-popover__link-editor",t),...n,children:[(0,wS.jsx)(Hd,{value:r,onChange:o,autocompleteRef:e}),(0,wS.jsx)(uie.Button,{icon:wl,label:(0,cie.__)("Apply"),type:"submit",size:"compact"})]})}var Kd=l(w(),1),{__experimentalPopoverLegacyPositionToPlacement:xPe}=M(Gb.privateApis),wPe="bottom",cF=(0,wP.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,fie.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=xPe(i)),c=c||wPe;let[u,d]=(0,wP.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,Kd.jsxs)(Gb.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,lF.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,Kd.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,Kd.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,Kd.jsx)(Gb.Button,{className:"block-editor-url-popover__settings-toggle",icon:pr,label:(0,lF.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,Kd.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,Kd.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});cF.LinkEditor=die;cF.LinkViewer=nie;var Yd=cF;var $e=l(w(),1),CPe=()=>{},BPe=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,$e.jsx)(Yd,{anchor:n,onClose:r,children:(0,$e.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,$e.jsx)(To.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,Eo.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,Eo.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,$e.jsx)(To.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,$e.jsx)(To.Button,{size:"small",icon:wl,label:(0,Eo.__)("Apply"),type:"submit"})})})})}),EPe=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,qd.useState)(null),[i,s]=(0,qd.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,$e.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,Eo.__)("Insert from URL")}),i&&(0,$e.jsx)(BPe,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function TPe({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:h,onError:p,onSelect:g,onCancel:b,onSelectURL:v,onToggleFeaturedImage:k,onDoubleClick:y,onFilesPreUpload:_=CPe,onHTMLDrop:S,children:C,mediaLibraryButton:B,placeholder:R,style:I}){S&&(0,pie.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:E,allowedMimeTypes:L}=(0,mie.useSelect)(q=>{let{getSettings:ee}=q(x),$=ee();return{mediaUpload:$.mediaUpload,allowedMimeTypes:$.allowedMimeTypes}},[]),[T,P]=(0,qd.useState)("");(0,qd.useEffect)(()=>{P(e?.src??"")},[e?.src]);let D=(0,qd.useMemo)(()=>_P(t,L,c),[t,L,c]),j=()=>!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);_(q);let ee;if(d)if(u){let $=[];ee=oe=>{let ie=(e??[]).filter(K=>K.id?!$.some(({id:ae})=>Number(ae)===Number(K.id)):!$.some(({urlSlug:ae})=>K.url.includes(ae)));g(ie.concat(oe)),$=oe.map(K=>{let ae=K.url.lastIndexOf("."),ge=K.url.slice(0,ae);return{id:K.id,urlSlug:ge}})}}else ee=g;else ee=([$])=>g($);E({allowedTypes:t,filesList:q,onFileChange:ee,onError:p,multiple:d})};async function z(q){let{blocks:ee}=qV(q);if(!ee?.length)return;let $=await Promise.all(ee.map(oe=>{let ie=oe.name.split("/")[1];return oe.attributes.id?(oe.attributes.type=ie,oe.attributes):new Promise((K,ae)=>{window.fetch(oe.attributes.url).then(ge=>ge.blob()).then(ge=>E({filesList:[ge],additionalData:{title:oe.attributes.title,alt_text:oe.attributes.alt,caption:oe.attributes.caption,type:ie},onFileChange:([fe])=>{fe.id&&K(fe)},allowedTypes:t,onError:ae})).catch(()=>K(oe.attributes.url))})})).catch(oe=>p(oe));$?.length&&g(d?$:$[0])}let U=q=>{H(q.target.files)},W=R??(q=>{let{instructions:ee,title:$}=n;if(!E&&!v&&(ee=(0,Eo.__)("To edit this block, you need permission to upload media.")),ee===void 0||$===void 0){let ie=t??[],[K]=ie,ae=ie.length===1,ge=ae&&K==="audio",fe=ae&&K==="image",xe=ae&&K==="video";ee===void 0&&E&&(ee=(0,Eo.__)("Drag and drop an image or video, upload, or choose from your library."),ge?ee=(0,Eo.__)("Drag and drop an audio file, upload, or choose from your library."):fe?ee=(0,Eo.__)("Drag and drop an image, upload, or choose from your library."):xe&&(ee=(0,Eo.__)("Drag and drop a video, upload, or choose from your library."))),$===void 0&&($=(0,Eo.__)("Media"),ge?$=(0,Eo.__)("Audio"):fe?$=(0,Eo.__)("Image"):xe&&($=(0,Eo.__)("Video")))}let oe=V("block-editor-media-placeholder",o,{"is-appender":a});return(0,$e.jsxs)(To.Placeholder,{icon:r,label:$,instructions:ee,className:oe,notices:s,onDoubleClick:y,preview:i,style:I,children:[q,C]})}),J=()=>m?null:(0,$e.jsx)(To.DropZone,{onFilesDrop:H,onDrop:z,isEligible:q=>{let ee="wp-block:core/",$=[];for(let oe of q.types)oe.startsWith(ee)&&$.push(oe.slice(ee.length));return $.every(oe=>t.includes(oe))&&(d?!0:$.length===1)}}),ce=()=>b&&(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,Eo.__)("Cancel"),variant:"link",onClick:b,children:(0,Eo.__)("Cancel")}),te=()=>v&&(0,$e.jsx)(EPe,{src:T,onChangeSrc:P,onSelectURL:v}),ne=()=>k&&(0,$e.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:k,variant:"secondary",children:(0,Eo.__)("Use featured image")})}),X=()=>{let ee=B??(({open:oe})=>(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{oe()},children:(0,Eo.__)("Media Library")})),$=(0,$e.jsx)(sd,{addToGallery:u,gallery:d&&j(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:oe})=>oe):e.id,render:ee});if(E&&a)return(0,$e.jsxs)($e.Fragment,{children:[J(),(0,$e.jsx)(To.FormFileUpload,{onChange:U,accept:D,multiple:!!d,render:({openFileDialog:oe})=>{let ie=(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:oe,children:(0,Eo._x)("Upload","verb")}),$,te(),ne(),ce()]});return W(ie)}})]});if(E){let oe=(0,$e.jsxs)($e.Fragment,{children:[J(),(0,$e.jsx)(To.FormFileUpload,{render:({openFileDialog:ie})=>(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,onClick:ie,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,Eo._x)("Upload","verb")}),onChange:U,accept:D,multiple:!!d}),$,te(),ne(),ce()]});return W(oe)}return W($)};return h?(0,$e.jsx)(Ws,{children:J()}):(0,$e.jsx)(Ws,{fallback:W(te()),children:X()})}var hie=(0,To.withFilters)("editor.MediaPlaceholder")(TPe);var gie=l(w(),1),IPe=({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,gie.jsx)(WI,{settings:o,gradients:[],disableCustomGradients:!0,...t})},bie=IPe;var mse=l(AM(),1);var pse=l(O(),1);var use=l(O(),1);var nse=l(zf(),1),ar=l(O(),1),Xd=l(F(),1),FP=l(Q(),1),ise=l(gr(),1),sse=l(A(),1),ase=l(Y(),1),lse=l(Pe(),1),ek=l(N(),1);var kie=l(N(),1),CP=l(A(),1);var uF=l(N(),1),bp=l(A(),1);var Tc=l(w(),1),PPe={placement:"bottom-start"},RPe=()=>(0,Tc.jsxs)(Tc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,Tc.jsx)(bp.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,Tc.jsx)(bp.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,Tc.jsx)(bp.ToolbarItem,{children:r=>(0,Tc.jsx)(bp.DropdownMenu,{icon:pr,label:(0,uF.__)("More"),toggleProps:{...r,className:V(r.className,{"is-pressed":o}),description:(0,uF.__)("Displays more block tools")},controls:_a(e.map(([{props:n}])=>n),"title"),popoverProps:PPe})})}})]}),dF=RPe;var Zd=l(w(),1);function OPe({popoverAnchor:e}){return(0,Zd.jsx)(CP.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,Zd.jsx)(qg,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,kie.__)("Format tools"),children:(0,Zd.jsx)(CP.ToolbarGroup,{children:(0,Zd.jsx)(dF,{})})})})}var APe=({inline:e,editableContentElement:t})=>e?(0,Zd.jsx)(OPe,{popoverAnchor:t}):(0,Zd.jsx)(Mt,{group:"inline",children:(0,Zd.jsx)(dF,{})}),vie=APe;var BP=l(O(),1),yie=l(F(),1);function _ie({html:e,value:t}){let o=(0,BP.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,yie.useDispatch)(x);(0,BP.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 Kb=l(O(),1),zie=l(Q(),1);var CS=l(gr(),1),Sie=l(pt(),1);var LPe=["`",'"',"'","\u201C\u201D","\u2018\u2019"],xie=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,CS.isCollapsed)(s))return;let u=(0,Sie.applyFilters)("blockEditor.wrapSelectionSettings",LPe).find(([S,C])=>S===i||C===i);if(!u)return;let[d,f=d]=u,m=s.start,h=s.end+d.length,p=(0,CS.insert)(s,d,m,m);p=(0,CS.insert)(p,f,h,h);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=c.dispatch(x);g(),a(p),b();let v={};for(let S in r)v[S]=r[S];v.data=f;let{ownerDocument:k}=t,{defaultView:y}=k,_=new y.InputEvent("input",v);window.queueMicrotask(()=>{r.target.dispatchEvent(_)}),r.preventDefault()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var EP=l(gr(),1),Wb=l(Y(),1);var wie=l(gr(),1);function Cie(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,wie.insert)(e,o)}function Bie(e){let t=e.length;for(;t--;){let o=oy(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(Pl,""),[e[t].clientId,o,0,0];let r=Bie(e[t].innerBlocks);if(r)return r}return[]}var Eie=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(),h=(0,Wb.getBlockTransforms)("from").filter(({type:v})=>v==="prefix"),p=(0,Wb.findTransform)(h,({prefix:v})=>m===v);if(!p)return;let g=(0,EP.toHTMLString)({value:(0,EP.insert)(c,Pl,0,u)}),b=p.transform(g);return s(...Bie([b])),i([b]),a.dispatch(x).__unstableMarkAutomaticChange(),!0}function r(n){let{inputType:i,type:s}=n,{getValue:a,onChange:c,__unstableAllowPrefixTransformations:u,formatTypes:d,registry:f,onReplace:m}=e.current;if(i!=="insertText"&&s!=="compositionend"||u&&o())return;let h=a(),p=(0,Wb.getBlockTransforms)("from").filter(y=>y.type==="input"),g=(0,Wb.findTransform)(p,y=>y.regExp.test(h.text));if(g){m(g.transform()),f.dispatch(x).__unstableMarkAutomaticChange();return}let b=d.reduce((y,{__unstableInputRule:_})=>(_&&(y=_(y)),y),Cie(h)),{__unstableMarkLastChangeAsPersistent:v,__unstableMarkAutomaticChange:k}=f.dispatch(x);b!==h&&(v(),c({...b,activeFormats:h.activeFormats}),k())}return t.addEventListener("input",r),t.addEventListener("compositionend",r),()=>{t.removeEventListener("input",r),t.removeEventListener("compositionend",r)}};var Tie=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(x).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var TP=l(tt(),1),Iie=()=>e=>{function t(o){(TP.isKeyboardEvent.primary(o,"z")||TP.isKeyboardEvent.primary(o,"y")||TP.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var Pie=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 Rie=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 IP=l(tt(),1);var Oie=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==IP.BACKSPACE&&n!==IP.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(x),{__experimentalUndo:c}=a();c&&s()&&(r.preventDefault(),c())}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var Lie=l(Y(),1),Qa=l(gr(),1),Nie=l(Gn(),1);var NPe=l(O(),1),DPe=l(Y(),1),MPe=l(w(),1);function Aie(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function PP(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function $b({allowedFormats:e,disableFormats:t}){return t?$b.EMPTY_ARRAY:e}$b.EMPTY_ARRAY=[];var Die=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:c,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:h}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:p,html:g}=og(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText): |
| 170 |
|
| 171 |
`,g),window.console.log(`Received plain text (RichText): |
| 172 |
|
| 173 |
`,p),i){s((0,Qa.insert)(a,p));return}let b=n.clipboardData.getData("rich-text")==="true";function v(S){let C=c.reduce((B,{__unstablePasteRule:R})=>(R&&B===a&&(B=R(a,{html:g,plainText:p})),B),a);if(C!==a)s(C);else{let B=(0,Qa.create)({html:S});Aie(B,a.activeFormats),s((0,Qa.insert)(a,B))}}if(b){v(g);return}if(h){s((0,Qa.insert)(a,(0,Qa.create)({text:p})));return}let k="INLINE",y=p.trim();f&&(0,Qa.isEmpty)(a)&&(0,Nie.isURL)(y)&&/^https?:/.test(y)&&(k="BLOCKS");let _=(0,Lie.pasteHandler)({HTML:g,plainText:p,mode:k,tagName:u,preserveWhiteSpace:m});typeof _=="string"?v(_):_.length>0&&d&&(0,Qa.isEmpty)(a)&&d(_,_.length-1,-1)}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var BS=l(tt(),1),RP=l(gr(),1),Mie=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===BS.DELETE||n===BS.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===BS.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,RP.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,RP.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var fF=l(tt(),1),ES=l(gr(),1),Vie=e=>t=>{function o(i){if(i.keyCode!==fF.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!==fF.ENTER)return;let{value:s,onChange:a,disableLineBreaks:c,onSplitAtEnd:u,onSplitAtDoubleLineEnd:d,registry:f}=e.current;i.preventDefault();let{text:m,start:h,end:p}=s;i.shiftKey?c||a((0,ES.insert)(s,` |
| 174 |
`)):u&&h===p&&p===m.length?u():d&&h===p&&p===m.length&&m.slice(-2)===` |
| 175 |
|
| 176 |
`?f.batch(()=>{let g={...s};g.start=g.end-2,a((0,ES.remove)(g)),d()}):c||a((0,ES.insert)(s,` |
| 177 |
`))}let{defaultView:n}=t.ownerDocument;return n.addEventListener("keydown",r),t.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",r),t.removeEventListener("keydown",o)}};var Fie=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(x).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var VPe=[xie,Eie,Tie,Iie,Pie,Rie,Oie,Die,Mie,Vie,Fie];function OP(e){let t=(0,Kb.useRef)(e);(0,Kb.useInsertionEffect)(()=>{t.current=e});let o=(0,Kb.useMemo)(()=>VPe.map(r=>r(t)),[t]);return(0,zie.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var AP=l(gr(),1),LP=l(O(),1);var jie=l(w(),1),Uie=l(je(),1),FPe={},mF=Symbol("usesContext");function zPe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[mF]:c}=n,u=(0,LP.useContext)(Pr),d=(0,LP.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):FPe,[c,u]);if(!a)return null;let f=(0,AP.getActiveFormat)(o,s),m=f!==void 0,h=(0,AP.getActiveObject)(o),p=h!==void 0&&h.type===s;return(0,jie.jsx)(a,{isActive:m,isVisible:i,activeAttributes:m?f.attributes||{}:{},isObjectActive:p,activeObjectAttributes:p?h.attributes||{}:{},value:o,onChange:e,onFocus:t,contentRef:r,context:d},s)}function NP({formatTypes:e,...t}){return e.map(o=>(0,Uie.createElement)(zPe,{settings:o,...t,key:o.name}))}var Hie=l(O(),1),Gie=l(Y(),1),Wie=l(Pe(),1);var pF=l(w(),1);function hF(e,t){if(Yb.isEmpty(e)){let o=PP(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,Wie.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/"}),Gie.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function TS({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,pF.jsx)(Hie.RawHTML,{children:hF(e,o)}),t?(0,pF.jsx)(t,{...n,children:e}):e}var Zie=l(O(),1),bF=l(Y(),1),Xie=l(gr(),1),Qie=l(Pe(),1);var $ie=l(O(),1),Kie=l(Pe(),1),DP=l(F(),1),Yie=l(tt(),1),qb=l(gr(),1);var gF=l(w(),1);function jPe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,Kie.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}=Ie(),{getSelectionStart:u,getSelectionEnd:d}=(0,DP.useSelect)(x),{selectionChange:f}=(0,DP.useDispatch)(x),m=PP(i);r=r||`<${m}></${m}>`;let p=`</${m}>${r}<${m}>`.split(`</${m}><${m}>`);p.shift(),p.pop();function g(b){n(`<${m}>${b.join(`</${m}><${m}>`)}</${m}>`)}return(0,gF.jsx)(o,{ref:a,children:p.map((b,v)=>(0,gF.jsx)(MP,{identifier:`${t}-${v}`,tagName:m,value:b,onChange:k=>{let y=p.slice();y[v]=k,g(y)},isSelected:void 0,onKeyDown:k=>{if(k.keyCode!==Yie.ENTER)return;k.preventDefault();let{offset:y}=u(),{offset:_}=d();if(typeof y!="number"||typeof _!="number")return;let S=(0,qb.create)({html:b});S.start=y,S.end=_;let C=(0,qb.split)(S).map(R=>(0,qb.toHTMLString)({value:R})),B=p.slice();B.splice(v,1,...C),g(B),f(c,`${t}-${v+1}`,0,0)},onMerge:k=>{let y=p.slice(),_=0;if(k){if(!y[v+1])return;y.splice(v,2,y[v]+y[v+1]),_=y[v].length-1}else{if(!y[v-1])return;y.splice(v-1,2,y[v-1]+y[v]),_=y[v-1].length-1}g(y),f(c,`${t}-${v-(k?0:1)}`,_,_)},...s},v))})}var qie=(0,$ie.forwardRef)(jPe);var Jie=l(w(),1);function ese(e){return(0,Zie.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,Qie.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=bF.children.toHTML(t.value),n=s=>t.onChange(bF.children.fromDOM((0,Xie.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?qie:e;return(0,Jie.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var tse=l(tt(),1),Zb=l(O(),1);function kF({character:e,type:t,onUse:o}){let r=(0,Zb.useContext)(Xb),n=(0,Zb.useRef)();return n.current=o,(0,Zb.useEffect)(()=>{function i(s){tse.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var VP=l(A(),1),ose=l(tt(),1),vF=l(w(),1);function yF({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=ose.displayShortcut[t](o)),(0,vF.jsx)(VP.Fill,{name:i,children:(0,vF.jsx)(VP.ToolbarButton,{...r,shortcut:n})})}var Qb=l(O(),1);function _F({inputType:e,onInput:t}){let o=(0,Qb.useContext)(Jb),r=(0,Qb.useRef)();return r.current=t,(0,Qb.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var mi=l(w(),1),{useRichText:UPe}=M(ise.privateApis),Xb=(0,ar.createContext)();Xb.displayName="keyboardShortcutContext";var Jb=(0,ar.createContext)();Jb.displayName="inputEventContext";var rse=Symbol("instanceId");function cse(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:h,disableSuggestions:p,disableAutocorrection:g,...b}=e;return b}function MP({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:h,onMerge:p,onSplit:g,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:v,identifier:k,preserveWhiteSpace:y,__unstablePastePlainText:_,__unstableEmbedURLOnPaste:S,__unstableDisableFormats:C,disableLineBreaks:B,__unstableAllowPrefixTransformations:R,readOnly:I,...E},L){E=cse(E),g&&(0,lse.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let T=(0,FP.useInstanceId)(MP),P=(0,ar.useRef)(),[D,j]=(0,ar.useState)(null),H=Ie(),{clientId:z,isSelected:U,name:G}=H,W=H[eh],J=(0,ar.useContext)(Pr),ce=(0,Xd.useRegistry)(),te=ze=>{if(!U)return{isSelected:!1};let{getSelectionStart:so,getSelectionEnd:et}=ze(x),Fe=so(),yt=et(),Oo;return n===void 0?Oo=Fe.clientId===z&&yt.clientId===z&&(k?Fe.attributeKey===k:Fe[rse]===T):n&&(Oo=Fe.clientId===z),{selectionStart:Oo?Fe.offset:void 0,selectionEnd:Oo?yt.offset:void 0,isSelected:Oo}},{selectionStart:ne,selectionEnd:X,isSelected:q}=(0,Xd.useSelect)(te,[z,k,T,n,U]),{disableBoundBlock:ee,bindingsPlaceholder:$,bindingsLabel:oe}=(0,Xd.useSelect)(ze=>{if(!W?.[k])return{};let{__experimentalBlockBindingsSupportedAttributes:so}=ze(x).getSettings();if(!so?.[G])return{};let Fe=W[k],yt=(0,ase.getBlockBindingsSource)(Fe.source),Oo={};if(yt?.usesContext?.length)for(let mt of yt.usesContext)Oo[mt]=J[mt];let fr=!yt?.canUserEditValue?.({select:ze,context:Oo,args:Fe.args});if(o.length>0)return{disableBoundBlock:fr,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:be}=ze(x),Bt=be(z),Ao=null;yt?.getFieldsList&&(Ao=yt.getFieldsList({select:ze,context:Oo})?.find(ou=>(0,nse.default)(ou.args,Fe?.args))?.label);let qe=Ao??yt?.label,re=fr?qe:(0,ek.sprintf)((0,ek.__)("Add %s"),qe),Ne=fr?Fe?.args?.key||yt?.label:(0,ek.sprintf)((0,ek.__)("Empty %s; start writing to edit its value"),Fe?.args?.key||yt?.label);return{disableBoundBlock:fr,bindingsPlaceholder:Bt?.placeholder||re,bindingsLabel:Ne}},[W,k,G,o,z,J]),ie=!!J?.["pattern/overrides"],K=W?.__default?.source==="core/pattern-overrides",ge=I||ee||ie&&!K,{getSelectionStart:fe,getSelectionEnd:xe,getBlockRootClientId:Ve}=(0,Xd.useSelect)(x),{selectionChange:at}=(0,Xd.useDispatch)(x),Lt=$b({allowedFormats:f,disableFormats:C}),no=!Lt||Lt.length>0,jo=(0,ar.useCallback)((ze,so)=>{let et={},Fe=ze===void 0&&so===void 0,yt={clientId:z,[k?"attributeKey":rse]:k||T};if(typeof ze=="number"||Fe){if(so===void 0&&Ve(z)!==Ve(xe().clientId))return;et.start={...yt,offset:ze}}if(typeof so=="number"||Fe){if(ze===void 0&&Ve(z)!==Ve(fe().clientId))return;et.end={...yt,offset:so}}at(et)},[z,Ve,xe,fe,k,T,at]),{value:lt,getValue:ur,onChange:$t,ref:io,formatTypes:Ue}=UPe({value:o,onChange:r,selectionStart:ne,selectionEnd:X,onSelectionChange:jo,placeholder:$||d,__unstableIsSelected:q,__unstableDisableFormats:C,preserveWhiteSpace:y,__unstableDependencies:[t],allowedFormats:Lt,withoutInteractiveFormatting:m,__unstableFormatTypeHandlerContext:(0,ar.useMemo)(()=>({richTextIdentifier:k,blockClientId:z}),[k,z])}),Kt=q7({onReplace:u,completers:c,record:lt,onChange:$t});_ie({html:o,value:lt});let Je=(0,ar.useRef)(new Set),He=(0,ar.useRef)(new Set);function dr(){P.current?.focus()}let pn=t;return(0,mi.jsxs)(mi.Fragment,{children:[q&&(0,mi.jsx)(Xb.Provider,{value:Je,children:(0,mi.jsx)(Jb.Provider,{value:He,children:(0,mi.jsxs)(sse.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:lt,onChange:$t,onFocus:dr}),(0,mi.jsx)(NP,{value:lt,onChange:$t,onFocus:dr,formatTypes:Ue,forwardedRef:P})]})})}),q&&no&&(0,mi.jsx)(vie,{inline:s,editableContentElement:D}),(0,mi.jsx)(pn,{role:"textbox","aria-multiline":!B,"aria-readonly":ge,...E,draggable:void 0,"aria-label":oe||E["aria-label"]||d,...Kt,ref:(0,FP.useMergeRefs)([io,L,Kt.ref,E.ref,OP({registry:ce,getValue:ur,onChange:$t,__unstableAllowPrefixTransformations:R,formatTypes:Ue,onReplace:u,selectionChange:at,isSelected:q,disableFormats:C,value:lt,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:S,pastePlainText:_,onMerge:p,onRemove:h,disableLineBreaks:B,onSplitAtEnd:b,onSplitAtDoubleLineEnd:v,keyboardShortcuts:Je,inputEvents:He}),P,j]),contentEditable:!ge,suppressContentEditableWarning:!0,className:V("block-editor-rich-text__editable",E.className,"rich-text"),tabIndex:E.tabIndex===0&&!ge?null:E.tabIndex,"data-wp-block-attribute-key":k})]})}var IS=ese((0,ar.forwardRef)(MP));IS.Content=TS;IS.isEmpty=e=>!e||e.length===0;var SF=(0,ar.forwardRef)((e,t)=>{if(Ie()[U0]){let{children:n,tagName:i="div",value:s,onChange:a,isSelected:c,multiline:u,inlineToolbar:d,wrapperClassName:f,autocompleters:m,onReplace:h,placeholder:p,allowedFormats:g,withoutInteractiveFormatting:b,onRemove:v,onMerge:k,onSplit:y,__unstableOnSplitAtEnd:_,__unstableOnSplitAtDoubleLineEnd:S,identifier:C,preserveWhiteSpace:B,__unstablePastePlainText:R,__unstableEmbedURLOnPaste:I,__unstableDisableFormats:E,disableLineBreaks:L,__unstableAllowPrefixTransformations:T,readOnly:P,...D}=cse(e);return(0,mi.jsx)(i,{ref:t,...D,dangerouslySetInnerHTML:{__html:hF(s,u)||"<br>"}})}return(0,mi.jsx)(IS,{ref:t,...e,readOnly:!1})});SF.Content=TS;SF.isEmpty=e=>!e||e.length===0;var Yb=SF;var xF=l(w(),1),dse=(0,use.forwardRef)((e,t)=>(0,xF.jsx)(Yb,{ref:t,...e,__unstableDisableFormats:!0}));dse.Content=function({value:t="",tagName:o="div",...r}){return(0,xF.jsx)(o,{...r,children:t})};var fse=dse;var wF=l(w(),1),HPe=(0,pse.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,wF.jsx)(fse,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,wF.jsx)(mse.default,{ref:o,className:V("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),hse=HPe;var Ja=l(N(),1),kse=l(O(),1),vse=l(A(),1);var gse=l(Q(),1),bse=l(A(),1),zP=l(N(),1),kp=l(w(),1);function jP({property:e,viewport:t,desc:o}){let r=(0,gse.useInstanceId)(jP),n=o||(0,zP.sprintf)((0,zP._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,kp.jsxs)(kp.Fragment,{children:[(0,kp.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,kp.jsx)(bse.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`,children:n})]})}var el=l(w(),1);function GPe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,Ja._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,Ja.__)("Small screens")},{id:"medium",label:(0,Ja.__)("Medium screens")},{id:"large",label:(0,Ja.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,Ja.sprintf)((0,Ja.__)("Use the same %s on all screen sizes."),o),f=(0,Ja.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,el.jsx)(jP,{property:o,viewport:c}),c),h=()=>u.map(p=>(0,el.jsx)(kse.Fragment,{children:i((0,el.jsx)(jP,{property:o,viewport:p}),p)},p.id));return(0,el.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,el.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,el.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,el.jsx)(vse.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,el.jsxs)("div",{className:V("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):h())]})]})]})}var yse=GPe;var UP=l(A(),1);var _se=l(w(),1);function Sse({units:e,...t}){let[o]=he("spacing.units"),r=(0,UP.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,_se.jsx)(UP.__experimentalUnitControl,{units:r,...t})}var PS=l(N(),1),xse=l(O(),1),tk=l(A(),1);var tl=l(w(),1);function WPe({url:e,onChange:t}){let[o,r]=(0,xse.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,tl.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,tl.jsx)(tk.Button,{size:"compact",icon:bn,label:e?(0,PS.__)("Edit link"):(0,PS.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,tl.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,tl.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,tl.jsx)(tk.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:vv,label:(0,PS.__)("Close"),onClick:r}),(0,tl.jsx)(Hd,{value:e||"",onChange:t,suffix:(0,tl.jsx)(tk.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,tl.jsx)(tk.Button,{size:"small",icon:wl,label:(0,PS.__)("Submit"),type:"submit"})})})]})})]})}var wse=WPe;var An=l(N(),1),ls=l(O(),1),Ise=l(Me(),1),Ko=l(A(),1);var Pse=l(Gn(),1);var xt=l(w(),1),CF="none",Cse="custom",Bse="media",Ese="attachment",Tse=["noreferrer","noopener"],Rse=({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[h,p]=(0,ls.useState)(!1),[g,b]=(0,ls.useState)(null),v=()=>{p(!0)},[k,y]=(0,ls.useState)(!1),[_,S]=(0,ls.useState)(null),C=(0,ls.useRef)(null),B=(0,ls.useRef)();(0,ls.useEffect)(()=>{if(!B.current)return;(Ise.focus.focusable.find(B.current)[0]||B.current).focus()},[k,o,d]);let R=()=>{(e===Bse||e===Ese)&&S(""),y(!0)},I=()=>{y(!1)},E=()=>{S(null),I(),p(!1)},L=q=>{let ee=q?"_blank":void 0,$;if(ee){let oe=(c??"").split(" ");Tse.forEach(ie=>{oe.includes(ie)||oe.push(ie)}),$=oe.join(" ")}else{let oe=(c??"").split(" ").filter(ie=>Tse.includes(ie)===!1);$=oe.length?oe.join(" "):void 0}return{linkTarget:ee,rel:$}},T=()=>q=>{let ee=C.current;ee&&ee.contains(q.target)||(p(!1),S(null),I())},P=()=>q=>{if(_){let ee=j().find($=>$.url===_)?.linkDestination||Cse;t({href:(0,Pse.prependHTTPS)(_),linkDestination:ee,lightbox:{enabled:!1}})}I(),S(null),q.preventDefault()},D=()=>{t({linkDestination:CF,href:""})},j=()=>{let q=[{linkDestination:Bse,title:(0,An.__)("Link to image file"),url:r==="image"?n:void 0,icon:Ev}];return r==="image"&&i&&q.push({linkDestination:Ese,title:(0,An.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:Qf}),q},H=q=>{let ee=j(),$;q?$=(ee.find(oe=>oe.url===q)||{linkDestination:Cse}).linkDestination:$=CF,t({linkDestination:$,href:q})},z=q=>{let ee=L(q);t(ee)},U=q=>{t({rel:q})},G=q=>{t({linkClass:q})},W=(0,xt.jsxs)(Ko.__experimentalVStack,{spacing:"3",children:[(0,xt.jsx)(Ko.ToggleControl,{label:(0,An.__)("Open in new tab"),onChange:z,checked:s==="_blank"}),(0,xt.jsx)(Ko.TextControl,{__next40pxDefaultSize:!0,label:(0,An.__)("Link relation"),value:c??"",onChange:U,help:(0,ls.createInterpolateElement)((0,An.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,xt.jsx)(Ko.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,xt.jsx)(Ko.TextControl,{__next40pxDefaultSize:!0,label:(0,An.__)("Link CSS class"),value:a||"",onChange:G})]}),J=_!==null?_:o,ce=!d||d&&!u,te=!J&&ce,ne=(j().find(q=>q.linkDestination===e)||{}).title,X=()=>{if(d&&u&&!o&&!k)return(0,xt.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,xt.jsx)(Be,{icon:Gx}),(0,xt.jsxs)("div",{className:"text",children:[(0,xt.jsx)("p",{children:(0,An.__)("Enlarge on click")}),(0,xt.jsx)("p",{className:"description",children:(0,An.__)("Scales the image with a lightbox effect")})]}),(0,xt.jsx)(Ko.Button,{icon:Ti,label:(0,An.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||k)return(0,xt.jsx)(Yd.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:J,onChangeInputValue:S,onSubmit:P(),autocompleteRef:C});if(o&&!k)return(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(Yd.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:R,urlLabel:ne}),(0,xt.jsx)(Ko.Button,{icon:Ti,label:(0,An.__)("Remove link"),onClick:()=>{D(),m?.()},size:"compact"})]})};return(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(Ko.ToolbarButton,{icon:bn,className:"components-toolbar__control",label:(0,An.__)("Link"),"aria-expanded":h,onClick:v,ref:b,isActive:!!o||d&&u}),h&&(0,xt.jsx)(Yd,{ref:B,anchor:g,onFocusOutside:T(),onClose:E,renderSettings:ce?()=>W:null,additionalControls:te&&(0,xt.jsxs)(Ko.NavigableMenu,{children:[j().map(q=>(0,xt.jsx)(Ko.MenuItem,{icon:q.icon,iconPosition:"left",onClick:()=>{S(null),H(q.url),I()},children:q.title},q.linkDestination)),u&&(0,xt.jsx)(Ko.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:Gx,info:(0,An.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{S(null),t({linkDestination:CF,href:""}),f?.(!0),I()},children:(0,An.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:X()})]})};var rk=l(A(),1),Wse=l(O(),1),WP=l(N(),1);var Ose=l(O(),1),EF=l(N(),1);var BF=[],$Pe=new Intl.Collator("und",{numeric:!0}).compare;function HP(){let[e,t,o,r]=he("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??BF,i=t??BF,s=o&&r!==!1?o:BF;return(0,Ose.useMemo)(()=>{let a=[{name:(0,EF.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>$Pe(c.slug,u.slug)),a.length>X7?[{name:(0,EF.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var Ase=l(O(),1),Lse=l(F(),1),GP=l(N(),1),Nse=l(A(),1);var Dse=l(w(),1),KPe={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 ok({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:c,type:u,value:d,...f}){let m=(0,Lse.useSelect)(_=>_(x).getSettings()?.disableCustomSpacingSizes),[h]=he("spacing.units"),p=(0,Nse.__experimentalUseCustomUnits)({availableUnits:h||["px","em","rem"]}),g=(0,Ase.useMemo)(()=>c?.map(_=>({name:_.name,slug:_.slug,size:_.size}))||[],[c]),b=(Au.includes(a)||["vertical","horizontal"].includes(a))&&s?xa[a]:"",v=s?u?.toLowerCase():u,k=(0,GP.sprintf)((0,GP._x)("%1$s %2$s","spacing"),b,v).trim(),y=p[0]?.value||"px";return(0,Dse.jsx)(np,{allowNegativeOnDrag:o<0,ariaLabel:k,className:"spacing-sizes-control",customValueSettings:KPe,disableCustomValues:m,icon:e,isMixed:t,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,presets:g,presetType:"spacing",selectedUnit:y,units:p,value:d,...f})}var RS=l(w(),1),Mse=["vertical","horizontal"];function Vse({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((h,p)=>(h[p]=Ih(a[p],i),h),{})};d==="vertical"&&(m.top=f,m.bottom=f),d==="horizontal"&&(m.left=f,m.right=f),t(m)},u=n?.length?Mse.filter(d=>gM(n,d)):Mse;return(0,RS.jsx)(RS.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,RS.jsx)(ok,{icon:LC[d],label:xa[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 OS=l(w(),1);function Fse({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?Au.filter(d=>n.includes(d)):Au,u=d=>f=>{let m={...Object.keys(a).reduce((h,p)=>(h[p]=Ih(a[p],i),h),{})};m[d]=f,t(m)};return(0,OS.jsx)(OS.Fragment,{children:c.map(d=>(0,OS.jsx)(ok,{icon:LC[d],label:xa[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 zse=l(w(),1);function jse({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((h,p)=>(h[p]=Ih(c[p],s),h),{})};m[d]=f,t(m)};return(0,zse.jsx)(ok,{label:xa[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var Use=l(A(),1);var TF=l(N(),1),Hse=l(w(),1);function Gse({isLinked:e,...t}){let o=e?(0,TF.__)("Unlink sides"):(0,TF.__)("Link sides");return(0,Hse.jsx)(Use.Button,{...t,size:"small",icon:e?bn:Ti,iconSize:24,label:o})}var ol=l(w(),1);function nk({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Au,useSelect:c,values:u}){let d=HP(),f=u||Q7,m=a?.length===1,h=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[p,g]=(0,Wse.useState)(e9(f,a)),b=()=>{g(p===Ol.axial?Ol.custom:Ol.axial)},k={...e,minimumCustomValue:o,onChange:C=>{let B={...u,...C};r(B)},onMouseOut:n,onMouseOver:i,sides:a,spacingSizes:d,type:t,useSelect:c,values:f},y=()=>p===Ol.axial?(0,ol.jsx)(Vse,{...k}):p===Ol.custom?(0,ol.jsx)(Fse,{...k}):(0,ol.jsx)(jse,{side:p,...k,showSideInLabel:s}),_=Au.includes(p)&&s?xa[p]:"",S=(0,WP.sprintf)((0,WP._x)("%1$s %2$s","spacing"),t,_).trim();return(0,ol.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,ol.jsxs)(rk.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,ol.jsx)(rk.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:S}),!m&&!h&&(0,ol.jsx)(Gse,{label:t,onClick:b,isLinked:p===Ol.axial})]}),(0,ol.jsx)(rk.__experimentalVStack,{spacing:.5,children:y()})]})}var $se=l(Pe(),1);function Kse(){return(0,$se.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var $P=l(O(),1);function Yse(e){let[t,o]=(0,$P.useState)(window.innerWidth);(0,$P.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=781;break;case"Mobile":s=479;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 xk=l(N(),1),rf=l(Y(),1),zle=l(A(),1),JF=l(F(),1),jle=l(O(),1);var ik=l(A(),1),KP=l(N(),1),qse=l(F(),1),YP=l(Y(),1);var vp=l(w(),1);function YPe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,vp.jsx)(ik.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,vp.jsx)(ik.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,KP.__)("Edit original")})})}function qPe({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,vp.jsx)(ik.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,vp.jsx)(ik.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,KP.__)("Exit pattern"):(0,KP.__)("Edit pattern")})})}function Zse({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=FT(e),{block:s,onNavigateToEntityRecord:a,canEdit:c}=(0,qse.useSelect)(m=>{let{getBlock:h,getSettings:p,canEditBlock:g}=m(x);return{block:h(e),onNavigateToEntityRecord:p().onNavigateToEntityRecord,canEdit:g(e)}},[e]);if(!c||!t&&!o)return null;let u=(0,YP.isReusableBlock)(s),d=(0,YP.isTemplatePart)(s);return(u||d)&&a?(0,vp.jsx)(YPe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:u,isTemplatePartBlock:d}):(0,vp.jsx)(qPe,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var Xse=l(F(),1),Qse=l(N(),1),Jse=l(A(),1),eae=l(O(),1);var tae=l(w(),1);function qP(){let e=(0,Xse.useSelect)(r=>r(x).getBlockSelectionStart(),[]),t=(0,eae.useRef)();return fm(e,t),e?(0,tae.jsx)(Jse.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,Qse.__)("Skip to the selected block")}):null}var ZP=l(N(),1),oae=l(F(),1);var rae=l(A(),1);var AS=l(w(),1);function IF(){let e=(0,oae.useSelect)(t=>t(x).getSelectedBlockCount(),[]);return(0,AS.jsxs)(rae.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,AS.jsx)(Oe,{icon:Wf,showColors:!0}),(0,AS.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,ZP.sprintf)((0,ZP._n)("%d Block","%d Blocks",e),e)})]})}var Sk=l(A(),1),ca=l(O(),1),Ale=l(vh(),1),_k=l(F(),1);var LS=l(N(),1),XP={name:"settings",title:(0,LS.__)("Settings"),value:"settings",icon:eL},QP={name:"styles",title:(0,LS.__)("Styles"),value:"styles",icon:pD},JP={name:"content",title:(0,LS.__)("Content"),value:"content",icon:Qf},Ic={name:"list",title:(0,LS.__)("List View"),value:"list-view",icon:Tv};var r2=l(A(),1);var NS=l(A(),1),nae=l(N(),1);var DS=l(w(),1),ZPe=({initialOpen:e=!1})=>{let t=(0,NS.__experimentalUseSlotFills)(pd.slotName),o=(0,NS.__experimentalUseSlotFills)(T_.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,DS.jsxs)(NS.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,nae.__)("Advanced"),initialOpen:e,children:[(0,DS.jsx)(pe.Slot,{group:"advanced"}),(0,DS.jsx)(T_.Slot,{})]})},e2=ZPe;var sk=l(A(),1),t2=l(F(),1),PF=l(N(),1);var MS=l(w(),1),XPe=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,t2.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:c}=s(x),u=c(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,t2.useDispatch)(x),n=No();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:Ae({...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,MS.jsx)(sk.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,PF.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,MS.jsx)(sk.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,PF.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,MS.jsx)(pe.Slot,{group:"position"})})})},QPe=()=>{let e=(0,sk.__experimentalUseSlotFills)(qi.position.name);return!(e&&e.length)?null:(0,MS.jsx)(XPe,{})},o2=QPe;var rl=l(w(),1),JPe=({showAdvancedControls:e=!1})=>{let t=(0,r2.__experimentalUseSlotFills)(qi.default.name),o=(0,r2.__experimentalUseSlotFills)(qi.position.name),r=(0,r2.__experimentalUseSlotFills)(qi.bindings.name),n=!!t?.length||!!o?.length||!!r?.length;return(0,rl.jsxs)(rl.Fragment,{children:[(0,rl.jsx)(pe.Slot,{}),(0,rl.jsx)(o2,{}),(0,rl.jsx)(pe.Slot,{group:"bindings"}),e&&(0,rl.jsx)("div",{children:(0,rl.jsx)(e2,{initialOpen:!n})})]})},iae=JPe;var vk=l(N(),1),W2=l(F(),1);var WS=l(Y(),1),jF=l(A(),1),kk=l(O(),1),dle=l(pt(),1),fle=l(F(),1);var zF={};ka(zF,{AdvancedPanel:()=>E2,BackgroundPanel:()=>A2,BorderPanel:()=>k2,ColorPanel:()=>S2,DimensionsPanel:()=>p2,FiltersPanel:()=>w2,ImageSettingsPanel:()=>ele,StateControl:()=>cle,TypographyPanel:()=>c2,useHasBackgroundPanel:()=>O2,useHasBorderPanel:()=>b2,useHasBorderPanelControls:()=>FS,useHasColorPanel:()=>_2,useHasDimensionsPanel:()=>m2,useHasFiltersPanel:()=>Xae,useHasImageSettingsPanel:()=>Jae,useHasTypographyPanel:()=>l2,useSettingsForBlockElement:()=>i2});var n2=l(O(),1),sae=l(F(),1),RF=l(Y(),1),yp=l(N(),1);function i2(e,t,o){let{supportedStyles:r,supports:n}=(0,sae.useSelect)(i=>({supportedStyles:M(i(RF.store)).getSupportedStyles(t,o),supports:i(RF.store).getBlockType(t)?.supports}),[t,o]);return(0,n2.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")&&!r.includes("backgroundGradient")&&(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","textIndent","writingMode"].forEach(s=>{r.includes(s)||(i.typography={...i.typography,[s]:!1})}),r.includes("textIndent")&&(i.typography={...i.typography,textIndent:i.typography?.textIndent??"subsequent"}),r.includes("columnCount")||(i.typography={...i.typography,textColumns:!1}),["contentSize","wideSize"].forEach(s=>{r.includes(s)||(i.layout={...i.layout,[s]:!1})}),["padding","margin","blockGap"].forEach(s=>{r.includes(s)||(i.spacing={...i.spacing,[s]:!1});let a=Array.isArray(n?.spacing?.[s])?n?.spacing?.[s]:n?.spacing?.[s]?.sides;a?.length&&i.spacing?.[s]&&(i.spacing={...i.spacing,[s]:{...i.spacing?.[s],sides:a}})}),["aspectRatio","height","minHeight","width"].forEach(s=>{r.includes(s)||(i.dimensions={...i.dimensions,[s]:!1})}),["radius","color","style","width"].forEach(s=>{r.includes("border"+s.charAt(0).toUpperCase()+s.slice(1))||(i.border={...i.border,[s]:!1})}),[["backgroundImage","backgroundImage"],["backgroundSize","backgroundSize"],["backgroundGradient","gradient"]].forEach(([s,a])=>{r.includes(s)||(i.background={...i.background,[a]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function nl(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,n2.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,yp._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,yp._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,yp._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function _p(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,n2.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,yp._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,yp._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,yp._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var fo=l(A(),1),zo=l(N(),1),lk=l(O(),1);var ak=l(N(),1);var aae=l(O(),1),s2=l(A(),1),OF=l(w(),1),e2e=[{label:(0,ak.__)("Align text left"),value:"left",icon:fu},{label:(0,ak.__)("Align text center"),value:"center",icon:jf},{label:(0,ak.__)("Align text right"),value:"right",icon:mu},{label:(0,ak.__)("Justify text"),value:"justify",icon:PA}],t2e=["left","center","right"];function a2({className:e,value:t,onChange:o,options:r=t2e}){let n=(0,aae.useMemo)(()=>e2e.filter(i=>r.includes(i.value)),[r]);return n.length?(0,OF.jsx)(s2.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,ak.__)("Text alignment"),className:V("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,OF.jsx)(s2.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var Fo=l(A(),1),VS=l(N(),1);var cs=l(w(),1);function lae({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",withSlider:n=!1,hasBottomMargin:i=!1,help:s,...a}){let[c]=he("spacing.units"),u=(0,Fo.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[d,f]=(0,Fo.__experimentalParseQuantityAndUnitFromRawValue)(t,u),m=!!f&&["em","rem","%","ch","vw","vh"].includes(f);return n?(0,cs.jsxs)(Fo.__experimentalView,{style:i?{marginBottom:12}:void 0,children:[(0,cs.jsx)(Fo.BaseControl.VisualLabel,{children:(0,VS.__)("Line indent")}),(0,cs.jsxs)(Fo.Flex,{children:[(0,cs.jsx)(Fo.FlexItem,{isBlock:!0,children:(0,cs.jsx)(Fo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,VS.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:t,onChange:o,size:a.size,units:u,__unstableInputWidth:r,min:0})}),n&&(0,cs.jsx)(Fo.FlexItem,{isBlock:!0,children:(0,cs.jsx)(Fo.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,cs.jsx)(Fo.RangeControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,VS.__)("Line indent"),hideLabelFromVision:!0,value:d,withInputField:!1,onChange:h=>{o?.(h===void 0?void 0:h+(f??"px"))},min:0,max:m?10:100,step:m?.1:1,initialPosition:0})})})]}),s&&(0,cs.jsx)("p",{className:"components-base-control__help",children:s})]}):(0,cs.jsx)(Fo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...a,label:(0,VS.__)("Line indent"),value:t,__unstableInputWidth:r,units:u,onChange:o,help:s})}function uae(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 cae(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 o2e(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 dae(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=Bb(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?o2e(i,t):a?.find(d=>d.style.fontWeight===cae(s,o))?.style?.fontStyle),u||(n=o?cae(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var nt=l(w(),1),r2e=1,n2e=6;function l2(e){let t=mae(e),o=pae(e),r=hae(e),n=gae(e),i=kae(e),s=bae(e),a=vae(e),c=Sae(e),u=yae(e),d=_ae(e),f=fae(e);return t||o||r||n||i||s||f||a||c||u||d}function fae(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 mae(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function pae(e){return e?.typography?.lineHeight}function hae(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function i2e(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,zo.__)("Appearance"):(0,zo.__)("Font style"):(0,zo.__)("Font weight")}function gae(e){return e?.typography?.letterSpacing}function bae(e){return e?.typography?.textTransform}function kae(e){return e?.typography?.textAlign}function vae(e){return e?.typography?.textDecoration}function yae(e){return e?.typography?.writingMode}function _ae(e){return e?.typography?.textColumns}function Sae(e){return e?.typography?.textIndent}function s2e(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function a2e({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=No(),s=()=>{let a=e(o);t(a)};return(0,nt.jsx)(fo.__experimentalToolsPanel,{label:(0,zo.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var l2e={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function c2({as:e=a2e,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=l2e,isGlobalStyles:a=!1}){let c=re=>Dr({settings:n},"",re),u=mae(n),d=c(r?.typography?.fontFamily),{fontFamilies:f,fontFamilyFaces:m}=(0,lk.useMemo)(()=>uae(n,d),[n,d]),h=re=>{let Ne=f?.find(({fontFamily:hn})=>hn===re)?.slug,mt=me(t,["typography","fontFamily"],Ne?`var:preset|font-family|${Ne}`:re||void 0),ou=f?.find(({fontFamily:hn})=>hn===re)?.fontFace??[],{fontStyles:ba,fontWeights:Zp}=Bb(ou),cv=ba?.some(({value:hn})=>hn===T),Nf=Zp?.some(({value:hn})=>hn?.toString()===P?.toString());if(!cv||!Nf){let{nearestFontStyle:hn,nearestFontWeight:Xp}=dae(ou,T,P);hn||Xp?mt={...mt,typography:{...mt?.typography,fontStyle:hn||void 0,fontWeight:Xp||void 0}}:(T||P)&&(mt={...mt,typography:{...mt?.typography,fontStyle:void 0,fontWeight:void 0}})}o(mt)},p=()=>!!t?.typography?.fontFamily,g=()=>h(void 0),b=fae(n),v=!n?.typography?.customFontSize,k=s2e(n),y=c(r?.typography?.fontSize),_=(()=>{let re=r?.typography?.fontSize;if(!re||typeof re!="string")return;if(re.startsWith("var:preset|font-size|"))return re.replace("var:preset|font-size|","");let Ne=re.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(Ne)return Ne[1]})(),S=(re,Ne)=>{let mt=Ne?.slug?`var:preset|font-size|${Ne?.slug}`:re;o(me(t,["typography","fontSize"],mt||void 0))},C=()=>!!t?.typography?.fontSize,B=()=>S(void 0),R=hae(n),I=i2e(n),E=n?.typography?.fontStyle,L=n?.typography?.fontWeight,T=c(r?.typography?.fontStyle),P=c(r?.typography?.fontWeight),D=(0,lk.useCallback)(({fontStyle:re,fontWeight:Ne})=>{(re!==T||Ne!==P)&&o({...t,typography:{...t?.typography,fontStyle:re||void 0,fontWeight:Ne||void 0}})},[T,P,o,t]),j=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,H=(0,lk.useCallback)(()=>{D({})},[D]),z=pae(n),U=c(r?.typography?.lineHeight),G=re=>{o(me(t,["typography","lineHeight"],re||void 0))},W=()=>t?.typography?.lineHeight!==void 0,J=()=>G(void 0),ce=gae(n),te=c(r?.typography?.letterSpacing),ne=re=>{o(me(t,["typography","letterSpacing"],re||void 0))},X=()=>!!t?.typography?.letterSpacing,q=()=>ne(void 0),ee=Sae(n),$=c(r?.typography?.textIndent),ie=(n?.typography?.textIndent??"subsequent")==="all",K=re=>{o(me(t,["typography","textIndent"],re||void 0))},ae=re=>{o({...t,settings:{typography:{textIndent:re?"all":"subsequent"}}})},ge=()=>!!t?.typography?.textIndent,fe=()=>{o(me(t,["typography","textIndent"],void 0))},xe=ie?(0,zo.__)("Indents the first line of all paragraphs."):(0,zo.__)("Indents the first line of each paragraph after the first one."),Ve=_ae(n),at=c(r?.typography?.textColumns),Lt=re=>{o(me(t,["typography","textColumns"],re||void 0))},no=()=>!!t?.typography?.textColumns,jo=()=>Lt(void 0),lt=bae(n),ur=c(r?.typography?.textTransform),$t=re=>{o(me(t,["typography","textTransform"],re||void 0))},io=()=>!!t?.typography?.textTransform,Ue=()=>$t(void 0),Kt=vae(n),Je=c(r?.typography?.textDecoration),He=re=>{o(me(t,["typography","textDecoration"],re||void 0))},dr=()=>!!t?.typography?.textDecoration,pn=()=>He(void 0),ze=yae(n),so=c(r?.typography?.writingMode),et=re=>{o(me(t,["typography","writingMode"],re||void 0))},Fe=()=>!!t?.typography?.writingMode,yt=()=>et(void 0),Oo=kae(n),fr=c(r?.typography?.textAlign),be=re=>{o(me(t,["typography","textAlign"],re||void 0))},Bt=()=>!!t?.typography?.textAlign,Ao=()=>be(void 0),qe=(0,lk.useCallback)(re=>({...re,typography:{}}),[]);return(0,nt.jsxs)(e,{resetAllFilter:qe,value:t,onChange:o,panelId:i,children:[u&&(0,nt.jsx)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Font"),hasValue:p,onDeselect:g,isShownByDefault:s.fontFamily,panelId:i,children:(0,nt.jsx)(LI,{fontFamilies:f,value:d,onChange:h,size:"__unstable-large"})}),b&&(0,nt.jsx)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Size"),hasValue:C,onDeselect:B,isShownByDefault:s.fontSize,panelId:i,children:(0,nt.jsx)(fo.FontSizePicker,{value:_||y,valueMode:_?"slug":"literal",onChange:S,fontSizes:k,disableCustomFontSizes:v,withReset:!1,withSlider:!0,size:"__unstable-large"})}),R&&(0,nt.jsx)(fo.__experimentalToolsPanelItem,{label:I,hasValue:j,onDeselect:H,isShownByDefault:s.fontAppearance,panelId:i,children:(0,nt.jsx)(AI,{value:{fontStyle:T,fontWeight:P},onChange:D,hasFontStyles:E,hasFontWeights:L,fontFamilyFaces:m,size:"__unstable-large"})}),z&&(0,nt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Line height"),hasValue:W,onDeselect:J,isShownByDefault:s.lineHeight,panelId:i,children:(0,nt.jsx)(yP,{__unstableInputWidth:"auto",value:U,onChange:G,size:"__unstable-large"})}),ce&&(0,nt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Letter spacing"),hasValue:X,onDeselect:q,isShownByDefault:s.letterSpacing,panelId:i,children:(0,nt.jsx)(DI,{value:te,onChange:ne,size:"__unstable-large",__unstableInputWidth:"auto"})}),ee&&(0,nt.jsxs)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Line indent"),hasValue:ge,onDeselect:fe,isShownByDefault:s.textIndent,panelId:i,children:[(0,nt.jsx)(lae,{value:$,onChange:K,size:"__unstable-large",__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,nt.jsx)(fo.ToggleControl,{label:(0,zo.__)("Indent all paragraphs"),checked:ie,onChange:ae,help:xe})]}),Ve&&(0,nt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Columns"),hasValue:no,onDeselect:jo,isShownByDefault:s.textColumns,panelId:i,children:(0,nt.jsx)(fo.__experimentalNumberControl,{label:(0,zo.__)("Columns"),max:n2e,min:r2e,onChange:Lt,size:"__unstable-large",spinControls:"custom",value:at,initialPosition:1})}),Kt&&(0,nt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Decoration"),hasValue:dr,onDeselect:pn,isShownByDefault:s.textDecoration,panelId:i,children:(0,nt.jsx)(VI,{value:Je,onChange:He,size:"__unstable-large",__unstableInputWidth:"auto"})}),ze&&(0,nt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Orientation"),hasValue:Fe,onDeselect:yt,isShownByDefault:s.writingMode,panelId:i,children:(0,nt.jsx)(UI,{value:so,onChange:et,size:"__unstable-large"})}),lt&&(0,nt.jsx)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Letter case"),hasValue:io,onDeselect:Ue,isShownByDefault:s.textTransform,panelId:i,children:(0,nt.jsx)(zI,{value:ur,onChange:$t,showNone:!0,isBlock:!0,size:"__unstable-large"})}),Oo&&(0,nt.jsxs)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Text alignment"),hasValue:Bt,onDeselect:Ao,isShownByDefault:s.textAlign,panelId:i,children:[(0,nt.jsx)(a2,{value:fr,onChange:be,options:["left","center","right","justify"],size:"__unstable-large"}),fr==="justify"&&(0,nt.jsx)("div",{children:(0,nt.jsx)(fo.Notice,{status:"warning",isDismissible:!1,children:(0,zo.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var Xt=l(N(),1),Ut=l(A(),1);var uk=l(O(),1);var it=l(A(),1),Yo=l(N(),1),wae=l(O(),1),u2=l(F(),1);var xae=l(F(),1);function Sp(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,xae.useSelect)(x);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 Zt=l(w(),1);function c2e(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,Yo.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,Yo.__)("Specify a fixed width."):e==="fixed"?(0,Yo.__)("Specify a fixed height."):(0,Yo.__)("Fit contents.")}function Cae({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,Zt.jsx)(u2e,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,Zt.jsx)(f2e,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function u2e({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,Yo.__)("Width"):(0,Yo.__)("Height"),[d]=he("spacing.units"),f=(0,it.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,wae.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,Zt.jsxs)(it.__experimentalVStack,{as:it.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,Zt.jsxs)(it.__experimentalToggleGroupControl,{size:"__unstable-large",label:d2e(o),value:i||"fit",help:c2e(i,o),onChange:h=>{t({selfStretch:h,flexSize:h!=="fixed"?null:s})},isBlock:!0,children:[(0,Zt.jsx)(it.__experimentalToggleGroupControlOption,{value:"fit",label:(0,Yo._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,Zt.jsx)(it.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Yo._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,Zt.jsx)(it.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,Yo._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,Zt.jsx)(it.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:h=>{t({selfStretch:i,flexSize:h})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function d2e(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,Yo.__)("Width"):(0,Yo.__)("Height")}function f2e({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,u2.useSelect)(S=>S(x).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:h}=(0,u2.useDispatch)(x),p=Sp(f,u||3),g=()=>!!i||!!s,b=()=>!!a||!!c,v=()=>{t({columnStart:void 0,rowStart:void 0})},k=()=>{t({columnSpan:void 0,rowSpan:void 0})},y=u?u-(i??1)+1:void 0,_=window.__experimentalEnableGridInteractivity&&d?d-(s??1)+1:void 0;return(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsxs)(it.Flex,{as:it.__experimentalToolsPanelItem,hasValue:b,label:(0,Yo.__)("Grid span"),onDeselect:k,isShownByDefault:r,panelId:n,children:[(0,Zt.jsx)(it.FlexItem,{style:{width:"50%"},children:(0,Zt.jsx)(it.__experimentalInputControl,{size:"__unstable-large",label:(0,Yo.__)("Column span"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10),B=y?Math.min(C,y):C;t({columnStart:i,rowStart:s,rowSpan:c,columnSpan:B})},value:a??1,min:1,max:y})}),(0,Zt.jsx)(it.FlexItem,{style:{width:"50%"},children:(0,Zt.jsx)(it.__experimentalInputControl,{size:"__unstable-large",label:(0,Yo.__)("Row span"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10),B=_?Math.min(C,_):C;t({columnStart:i,rowStart:s,columnSpan:a,rowSpan:B})},value:c??1,min:1,max:_})})]}),window.__experimentalEnableGridInteractivity&&(0,Zt.jsxs)(it.Flex,{as:it.__experimentalToolsPanelItem,hasValue:g,label:(0,Yo.__)("Grid placement"),onDeselect:v,isShownByDefault:!1,panelId:n,children:[(0,Zt.jsx)(it.FlexItem,{style:{width:"50%"},children:(0,Zt.jsx)(it.__experimentalInputControl,{size:"__unstable-large",label:(0,Yo.__)("Column"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10);t({columnStart:C,rowStart:s,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(C,s))},value:i??1,min:1,max:u?u-(a??1)+1:void 0})}),(0,Zt.jsx)(it.FlexItem,{style:{width:"50%"},children:(0,Zt.jsx)(it.__experimentalInputControl,{size:"__unstable-large",label:(0,Yo.__)("Row"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10);t({columnStart:i,rowStart:C,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(i,C))},value:s??1,min:1,max:d?d-(c??1)+1:void 0})})]})]})}var d2=l(A(),1),ck=l(N(),1);var AF=l(w(),1);function f2({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=he("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.map(({name:p,ratio:g})=>({label:p,value:g})),m=c?.map(({name:p,ratio:g})=>({label:p,value:g})),h=[{label:(0,ck._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,ck._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,AF.jsx)(d2.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,ck.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,AF.jsx)(d2.SelectControl,{label:(0,ck.__)("Aspect ratio"),value:a,options:r??h,onChange:o,size:"__unstable-large"})})}var Ke=l(w(),1),LF=["horizontal","vertical"];function m2(e){let t=Tae(e),o=Iae(e),r=Pae(e),n=Rae(e),i=Oae(e),s=Aae(e),a=Lae(e),c=Nae(e),u=Dae(e),d=Mae(e);return uk.Platform.OS==="web"&&(t||o||r||n||i||s||a||c||u||d)}function Tae(e){return e?.layout?.contentSize}function Iae(e){return e?.layout?.wideSize}function Pae(e){return e?.spacing?.padding}function Rae(e){return e?.spacing?.margin}function Oae(e){return e?.spacing?.blockGap}function Aae(e){return e?.dimensions?.height}function Lae(e){return e?.dimensions?.minHeight}function Nae(e){return e?.dimensions?.width}function Dae(e){return e?.dimensions?.aspectRatio}function Mae(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 m2e(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function Bae(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 Eae(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function p2e(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 h2e({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=No(),s=()=>{let a=e(o);t(a)};return(0,Ke.jsx)(Ut.__experimentalToolsPanel,{label:(0,Xt.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var aa={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,aspectRatio:!0,childLayout:!0};function p2({as:e=h2e,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=aa,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=re=>re&&typeof re=="object"?Object.keys(re).reduce((Ne,mt)=>(Ne[mt]=Dr({settings:{dimensions:u,spacing:d}},"",re[mt]),Ne),{}):Dr({settings:{dimensions:u,spacing:d}},"",re),m=m2e(n),h=(0,Ut.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),p=-1/0,[g,b]=(0,uk.useState)(p),v=Tae(n)&&c,k=f(r?.layout?.contentSize),y=re=>{o(me(t,["layout","contentSize"],re||void 0))},_=()=>!!t?.layout?.contentSize,S=()=>y(void 0),C=Iae(n)&&c,B=f(r?.layout?.wideSize),R=re=>{o(me(t,["layout","wideSize"],re||void 0))},I=()=>!!t?.layout?.wideSize,E=()=>R(void 0),L=Pae(n),T=f(r?.spacing?.padding),P=Eae(T),D=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,j=D&&D.some(re=>LF.includes(re)),H=re=>{let Ne=Bae(re,D);o(me(t,["spacing","padding"],Ne))},z=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,U=()=>H(void 0),G=()=>a("padding"),W=Rae(n),J=f(r?.spacing?.margin),ce=Eae(J),te=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,ne=te&&te.some(re=>LF.includes(re)),X=re=>{let Ne=Bae(re,te);o(me(t,["spacing","margin"],Ne))},q=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,ee=()=>X(void 0),$=()=>a("margin"),oe=Oae(n),ie=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,K=ie&&ie.some(re=>LF.includes(re)),ae=f(r?.spacing?.blockGap),ge=p2e(ae,K),fe=re=>{o(me(t,["spacing","blockGap"],re))},xe=re=>{re||fe(null),!K&&re?.hasOwnProperty("top")?fe(re.top):fe({top:re?.top,left:re?.left})},Ve=()=>fe(void 0),at=()=>!!t?.spacing?.blockGap,Lt=Lae(n),no=f(r?.dimensions?.minHeight),jo=re=>{let Ne=me(t,["dimensions","minHeight"],re);o(me(Ne,["dimensions","aspectRatio"],void 0))},lt=()=>{jo(void 0)},ur=()=>!!t?.dimensions?.minHeight,$t=Aae(n),io=f(r?.dimensions?.height),Ue=re=>{let Ne=me(t,["dimensions","height"],re);o(me(Ne,["dimensions","aspectRatio"],void 0))},Kt=()=>{Ue(void 0)},Je=()=>!!t?.dimensions?.height,He=Nae(n),dr=f(r?.dimensions?.width),pn=re=>{o(me(t,["dimensions","width"],re))},ze=()=>{pn(void 0)},so=()=>!!t?.dimensions?.width,et=Dae(n),Fe=f(r?.dimensions?.aspectRatio),yt=re=>{let Ne=me(t,["dimensions","aspectRatio"],re);o(me(Ne,["dimensions","minHeight"],void 0))},Oo=()=>!!t?.dimensions?.aspectRatio,fr=Mae(n),be=r?.layout,Bt=re=>{o({...t,layout:{...re}})},Ao=(0,uk.useCallback)(re=>({...re,layout:Ae({...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,height:void 0,minHeight:void 0,aspectRatio:void 0,width:void 0}}),[]),qe=()=>a(!1);return(0,Ke.jsxs)(e,{resetAllFilter:Ao,value:t,onChange:o,panelId:i,children:[(v||C)&&(0,Ke.jsx)("span",{className:"span-columns",children:(0,Xt.__)("Set the width of the main content area.")}),v&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{label:(0,Xt.__)("Content width"),hasValue:_,onDeselect:S,isShownByDefault:s.contentSize??aa.contentSize,panelId:i,children:(0,Ke.jsx)(Ut.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Content width"),labelPosition:"top",value:k||"",onChange:re=>{y(re)},units:h,prefix:(0,Ke.jsx)(Ut.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Ke.jsx)(Be,{icon:Uf})})})}),C&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{label:(0,Xt.__)("Wide width"),hasValue:I,onDeselect:E,isShownByDefault:s.wideSize??aa.wideSize,panelId:i,children:(0,Ke.jsx)(Ut.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Wide width"),labelPosition:"top",value:B||"",onChange:re=>{R(re)},units:h,prefix:(0,Ke.jsx)(Ut.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Ke.jsx)(Be,{icon:tm})})})}),L&&(0,Ke.jsxs)(Ut.__experimentalToolsPanelItem,{hasValue:z,label:(0,Xt.__)("Padding"),onDeselect:U,isShownByDefault:s.padding??aa.padding,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,Ke.jsx)(Ut.BoxControl,{__next40pxDefaultSize:!0,values:P,onChange:H,label:(0,Xt.__)("Padding"),sides:D,units:h,allowReset:!1,splitOnAxis:j,inputProps:{onMouseOver:G,onMouseOut:qe}}),m&&(0,Ke.jsx)(nk,{values:P,onChange:H,label:(0,Xt.__)("Padding"),sides:D,units:h,allowReset:!1,onMouseOver:G,onMouseOut:qe})]}),W&&(0,Ke.jsxs)(Ut.__experimentalToolsPanelItem,{hasValue:q,label:(0,Xt.__)("Margin"),onDeselect:ee,isShownByDefault:s.margin??aa.margin,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,Ke.jsx)(Ut.BoxControl,{__next40pxDefaultSize:!0,values:ce,onChange:X,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(p)},onMouseOver:$,onMouseOut:qe},label:(0,Xt.__)("Margin"),sides:te,units:h,allowReset:!1,splitOnAxis:ne}),m&&(0,Ke.jsx)(nk,{values:ce,onChange:X,minimumCustomValue:-1/0,label:(0,Xt.__)("Margin"),sides:te,units:h,allowReset:!1,onMouseOver:$,onMouseOut:qe})]}),oe&&(0,Ke.jsxs)(Ut.__experimentalToolsPanelItem,{hasValue:at,label:(0,Xt.__)("Block spacing"),onDeselect:Ve,isShownByDefault:s.blockGap??aa.blockGap,className:V({"tools-panel-item-spacing":m,"single-column":!m&&!K}),panelId:i,children:[!m&&(K?(0,Ke.jsx)(Ut.BoxControl,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Block spacing"),min:0,onChange:xe,units:h,sides:ie,values:ge,allowReset:!1,splitOnAxis:K}):(0,Ke.jsx)(Ut.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Block spacing"),min:0,onChange:fe,units:h,value:ae})),m&&(0,Ke.jsx)(nk,{label:(0,Xt.__)("Block spacing"),min:0,onChange:xe,showSideInLabel:!1,sides:K?ie:["top"],values:ge,allowReset:!1})]}),fr&&(0,Ke.jsx)(Cae,{value:be,onChange:Bt,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??aa.childLayout}),Lt&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{hasValue:ur,label:(0,Xt.__)("Minimum height"),onDeselect:lt,isShownByDefault:s.minHeight??aa.minHeight,panelId:i,children:(0,Ke.jsx)(Ib,{label:(0,Xt.__)("Minimum height"),value:no,onChange:jo,dimensionSizes:u?.dimensionSizes})}),$t&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{hasValue:Je,label:(0,Xt.__)("Height"),onDeselect:Kt,isShownByDefault:s.height??aa.height,panelId:i,children:(0,Ke.jsx)(Ib,{label:(0,Xt.__)("Height"),value:io,onChange:Ue,dimensionSizes:u?.dimensionSizes})}),He&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{hasValue:so,label:(0,Xt.__)("Width"),onDeselect:ze,isShownByDefault:s.width??aa.width,panelId:i,children:(0,Ke.jsx)(Ib,{label:(0,Xt.__)("Width"),value:dr,onChange:pn,dimensionSizes:u?.dimensionSizes})}),et&&(0,Ke.jsx)(f2,{hasValue:Oo,value:Fe,onChange:yt,panelId:i,isShownByDefault:s.aspectRatio??aa.aspectRatio})]})}var an=l(A(),1),fk=l(O(),1),dk=l(N(),1);var xp=l(N(),1),Io=l(A(),1),g2=l(O(),1);var Ot=l(w(),1),h2=[];function g2e({shadow:e,onShadowChange:t,settings:o}){let r=NF(o);return(0,Ot.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Ot.jsxs)(Io.__experimentalVStack,{spacing:4,children:[(0,Ot.jsx)(Io.__experimentalHeading,{level:5,children:(0,xp.__)("Drop shadow")}),(0,Ot.jsx)(b2e,{presets:r,activeShadow:e,onSelect:t}),(0,Ot.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Ot.jsx)(Io.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,xp.__)("Clear")})})]})})}function b2e({presets:e,activeShadow:t,onSelect:o}){return e?(0,Ot.jsx)(Io.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,xp.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,Ot.jsx)(k2e,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function k2e({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Ot.jsx)(Io.Tooltip,{text:t,children:(0,Ot.jsx)(Io.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:V("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Ot.jsx)("button",{className:V("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Ot.jsx)(Be,{icon:Cs})})})})}function Vae({shadow:e,onShadowChange:t,settings:o}){return(0,Ot.jsx)(Io.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:v2e(e,t),renderContent:()=>(0,Ot.jsx)(Io.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Ot.jsx)(g2e,{shadow:e,onShadowChange:t,settings:o})})})}function v2e(e,t){return function({onToggle:r,isOpen:n}){let i=(0,g2.useRef)(void 0),s={onClick:r,className:V("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(void 0),i.current?.focus()},className:V("block-editor-global-styles__shadow-editor__remove-button",{"is-open":n}),label:(0,xp.__)("Remove")};return(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(Io.Button,{__next40pxDefaultSize:!0,...s,children:(0,Ot.jsxs)(Io.__experimentalHStack,{justify:"flex-start",children:[(0,Ot.jsx)(Be,{className:"block-editor-global-styles__toggle-icon",icon:tD,size:24}),(0,Ot.jsx)(Io.FlexItem,{children:(0,xp.__)("Drop shadow")})]})}),!!e&&(0,Ot.jsx)(Io.Button,{__next40pxDefaultSize:!0,size:"small",icon:hr,...a})]})}}function NF(e){return(0,g2.useMemo)(()=>{if(!e?.shadow)return h2;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,xp.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||h2,...r||h2,...n||h2];return s.length&&s.unshift(i),s},[e])}var la=l(w(),1);function b2(e){return Object.values(FS(e)).some(Boolean)}function FS(e){return{hasBorderColor:Fae(e),hasBorderRadius:zae(e),hasBorderStyle:jae(e),hasBorderWidth:Uae(e),hasShadow:Hae(e)}}function Fae(e){return e?.border?.color}function zae(e){return e?.border?.radius}function jae(e){return e?.border?.style}function Uae(e){return e?.border?.width}function Hae(e){let t=NF(e);return!!e?.shadow&&t.length>0}function y2e({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=No();return(0,la.jsx)(an.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var _2e={radius:!0,color:!0,width:!0,shadow:!0};function k2({as:e=y2e,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=_2e}){let c=nl(n),u=(0,fk.useCallback)(z=>Dr({settings:n},"",z),[n]),d=z=>{let G=c.flatMap(({colors:W})=>W).find(({color:W})=>W===z);return G?"var:preset|color|"+G.slug:z},f=(0,fk.useMemo)(()=>{if((0,an.__experimentalHasSplitBorders)(r?.border)){let z={...r?.border};return["top","right","bottom","left"].forEach(U=>{z[U]={...z[U],color:u(z[U]?.color)}}),z}return{...r?.border,color:r?.border?.color?u(r?.border?.color):void 0}},[r?.border,u]),m=z=>o({...t,border:z}),h=Fae(n),p=jae(n),g=Uae(n),b=zae(n),v=(0,fk.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]),k=z=>m({...f,radius:z}),y=()=>{let z=t?.border?.radius;return typeof z=="object"?Object.entries(z).some(Boolean):!!z},_=Hae(n),S=u(r?.shadow),C=n?.shadow?.presets??{},B=C.custom??C.theme??C.default??[],R=z=>{let U=B?.find(({shadow:G})=>G===z)?.slug;o(me(t,["shadow"],U?`var:preset|shadow|${U}`:z||void 0))},I=()=>!!t?.shadow,E=()=>R(void 0),L=()=>{if(y())return m({radius:t?.border?.radius});m(void 0)},T=z=>{let U={...z};(0,an.__experimentalHasSplitBorders)(U)?["top","right","bottom","left"].forEach(G=>{U[G]&&(U[G]={...U[G],color:d(U[G]?.color)})}):U&&(U.color=d(U.color)),m({radius:f?.radius,...U})},P=(0,fk.useCallback)(z=>({...z,border:void 0,shadow:void 0}),[]),D=a?.color||a?.width,j=h||p||g||b,H=mk({blockName:s,hasShadowControl:_,hasBorderControl:j});return(0,la.jsxs)(e,{resetAllFilter:P,value:t,onChange:o,panelId:i,label:H,children:[(g||h)&&(0,la.jsx)(an.__experimentalToolsPanelItem,{hasValue:()=>(0,an.__experimentalIsDefinedBorder)(t?.border),label:(0,dk.__)("Border"),onDeselect:()=>L(),isShownByDefault:D,panelId:i,children:(0,la.jsx)(an.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:p,onChange:T,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!_,label:(0,dk.__)("Border")})}),b&&(0,la.jsx)(an.__experimentalToolsPanelItem,{hasValue:y,label:(0,dk.__)("Radius"),onDeselect:()=>k(void 0),isShownByDefault:a.radius,panelId:i,children:(0,la.jsx)(EI,{presets:n?.border?.radiusSizes,values:v,onChange:z=>{k(z||void 0)}})}),_&&(0,la.jsxs)(an.__experimentalToolsPanelItem,{label:(0,dk.__)("Shadow"),hasValue:I,onDeselect:E,isShownByDefault:a.shadow,panelId:i,children:[j?(0,la.jsx)(an.BaseControl.VisualLabel,{as:"legend",children:(0,dk.__)("Shadow")}):null,(0,la.jsx)(Vae,{shadow:S,onShadowChange:R,settings:n})]})]})}var Jt=l(A(),1),y2=l(O(),1),Qt=l(N(),1);var dt=l(w(),1);function _2(e){let t=Wae(e),o=qae(e),r=$ae(e),n=Qd(e),i=Yae(e),s=Kae(e);return t||o||r||n||i||s}function Wae(e){let t=nl(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function $ae(e){let t=nl(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Kae(e){let t=nl(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function Qd(e){let t=nl(e),o=_p(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Yae(e){let t=nl(e),o=_p(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function qae(e){let t=nl(e),o=_p(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function DF({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=No(),a=()=>{let c=e(o);t(c)};return(0,dt.jsx)(Jt.__experimentalToolsPanel,{label:i||(0,Qt.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,dt.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var S2e={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},x2e={placement:"left-start",offset:36,shift:!0},{Tabs:v2}=M(Jt.privateApis),w2e=({indicators:e,label:t})=>(0,dt.jsxs)(Jt.__experimentalHStack,{justify:"flex-start",children:[(0,dt.jsx)(Jt.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,dt.jsx)(Jt.Flex,{expanded:!1,children:(0,dt.jsx)(Jt.ColorIndicator,{colorValue:o})},r))}),(0,dt.jsx)(Jt.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Gae({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,dt.jsx)(Md,{...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 MF({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a,className:c="block-editor-tools-panel-color-gradient-settings__item"}){let u=i.find(h=>h.userValue!==void 0),{key:d,...f}=i[0]??{},m=(0,y2.useRef)(void 0);return(0,dt.jsx)(Jt.__experimentalToolsPanelItem,{className:c,hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,dt.jsx)(Jt.Dropdown,{popoverProps:x2e,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:h,isOpen:p})=>{let g={onClick:h,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":p}),"aria-expanded":p,ref:m};return(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(Jt.Button,{...g,__next40pxDefaultSize:!0,children:(0,dt.jsx)(w2e,{indicators:n,label:e})}),t()&&(0,dt.jsx)(Jt.Button,{__next40pxDefaultSize:!0,label:(0,Qt.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:hr,onClick:()=>{o(),p&&h(),m.current?.focus()}})]})},renderContent:()=>(0,dt.jsx)(Jt.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,dt.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,dt.jsx)(Gae,{...f,colorGradientControlSettings:s},d),i.length>1&&(0,dt.jsxs)(v2,{defaultTabId:u?.key,children:[(0,dt.jsx)(v2.TabList,{children:i.map(h=>(0,dt.jsx)(v2.Tab,{tabId:h.key,children:h.label},h.key))}),i.map(h=>{let{key:p,...g}=h;return(0,dt.jsx)(v2.TabPanel,{tabId:p,focusable:!1,children:(0,dt.jsx)(Gae,{...g,colorGradientControlSettings:s},p)},p)})]})]})})})})}function S2({as:e=DF,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=S2e,label:a,children:c}){let u=nl(n),d=_p(n),f=n?.color?.custom,m=n?.color?.customGradient,h=u.length>0||f,p=d.length>0||m,g=!!n?.background?.gradient,b=p&&!g,v=K=>Dr({settings:n},"",K),k=K=>{let ge=u.flatMap(({colors:fe})=>fe).find(({color:fe})=>fe===K);return ge?"var:preset|color|"+ge.slug:K},y=K=>{let ge=d.flatMap(({gradients:fe})=>fe).find(({gradient:fe})=>fe===K);return ge?"var:preset|gradient|"+ge.slug:K},_=qae(n),S=v(r?.color?.background),C=v(t?.color?.background),B=v(r?.color?.gradient),R=v(t?.color?.gradient),I=()=>!!C||!g&&!!R,E=K=>{let ae=me(t,["color","background"],k(K));g||(ae.color.gradient=void 0),o(ae)},L=K=>{let ae=me(t,["color","gradient"],y(K));ae.color.background=void 0,o(ae)},T=()=>{let K=me(t,["color","background"],void 0);g||(K.color.gradient=void 0),o(K)},P=$ae(n),D=v(r?.elements?.link?.color?.text),j=v(t?.elements?.link?.color?.text),H=K=>{o(me(t,["elements","link","color","text"],k(K)))},z=v(r?.elements?.link?.[":hover"]?.color?.text),U=v(t?.elements?.link?.[":hover"]?.color?.text),G=K=>{o(me(t,["elements","link",":hover","color","text"],k(K)))},W=()=>!!j||!!U,J=()=>{let K=me(t,["elements","link",":hover","color","text"],void 0);K=me(K,["elements","link","color","text"],void 0),o(K)},ce=Wae(n),te=v(r?.color?.text),ne=v(t?.color?.text),X=()=>!!ne,q=K=>{let ae=me(t,["color","text"],k(K));te===D&&(ae=me(ae,["elements","link","color","text"],k(K))),o(ae)},ee=()=>q(void 0),$=[{name:"caption",label:(0,Qt.__)("Captions"),showPanel:Kae(n)},{name:"button",label:(0,Qt.__)("Button"),showPanel:Yae(n)},{name:"heading",label:(0,Qt.__)("Heading"),showPanel:Qd(n)},{name:"h1",label:(0,Qt.__)("H1"),showPanel:Qd(n)},{name:"h2",label:(0,Qt.__)("H2"),showPanel:Qd(n)},{name:"h3",label:(0,Qt.__)("H3"),showPanel:Qd(n)},{name:"h4",label:(0,Qt.__)("H4"),showPanel:Qd(n)},{name:"h5",label:(0,Qt.__)("H5"),showPanel:Qd(n)},{name:"h6",label:(0,Qt.__)("H6"),showPanel:Qd(n)}],oe=(0,y2.useCallback)(K=>({...K,color:void 0,elements:{...K?.elements,link:{...K?.elements?.link,color:void 0,":hover":{color:void 0}},...$.reduce((ae,ge)=>({...ae,[ge.name]:{...K?.elements?.[ge.name],color:void 0}}),{})}}),[$]),ie=[ce&&{key:"text",label:(0,Qt.__)("Text"),hasValue:X,resetValue:ee,isShownByDefault:s.text,indicators:[te],tabs:[{key:"text",label:(0,Qt.__)("Text"),inheritedValue:te,setValue:q,userValue:ne}]},_&&{key:"background",label:(0,Qt.__)("Background"),hasValue:I,resetValue:T,isShownByDefault:s.background,indicators:[(b?B:void 0)??S],tabs:[h&&{key:"background",label:(0,Qt.__)("Color"),inheritedValue:S,setValue:E,userValue:C},b&&{key:"gradient",label:(0,Qt.__)("Gradient"),inheritedValue:B,setValue:L,userValue:R,isGradient:!0}].filter(Boolean)},P&&{key:"link",label:(0,Qt.__)("Link"),hasValue:W,resetValue:J,isShownByDefault:s.link,indicators:[D,z],tabs:[{key:"link",label:(0,Qt.__)("Default"),inheritedValue:D,setValue:H,userValue:j},{key:"hover",label:(0,Qt.__)("Hover"),inheritedValue:z,setValue:G,userValue:U}]}].filter(Boolean);return $.forEach(({name:K,label:ae,showPanel:ge})=>{if(!ge)return;let fe=v(r?.elements?.[K]?.color?.background),xe=v(r?.elements?.[K]?.color?.gradient),Ve=v(r?.elements?.[K]?.color?.text),at=v(t?.elements?.[K]?.color?.background),Lt=v(t?.elements?.[K]?.color?.gradient),no=v(t?.elements?.[K]?.color?.text),jo=()=>!!(no||at||Lt),lt=()=>{let Je=me(t,["elements",K,"color","background"],void 0);Je.elements[K].color.gradient=void 0,Je.elements[K].color.text=void 0,o(Je)},ur=Je=>{o(me(t,["elements",K,"color","text"],k(Je)))},$t=Je=>{let He=me(t,["elements",K,"color","background"],k(Je));He.elements[K].color.gradient=void 0,o(He)},io=Je=>{let He=me(t,["elements",K,"color","gradient"],y(Je));He.elements[K].color.background=void 0,o(He)},Ue=!0,Kt=K!=="caption";ie.push({key:K,label:ae,hasValue:jo,resetValue:lt,isShownByDefault:s[K],indicators:Ue&&Kt?[Ve,xe??fe]:[Ue?Ve:xe??fe],tabs:[h&&Ue&&{key:"text",label:(0,Qt.__)("Text"),inheritedValue:Ve,setValue:ur,userValue:no},h&&Kt&&{key:"background",label:(0,Qt.__)("Background"),inheritedValue:fe,setValue:$t,userValue:at},p&&Kt&&{key:"gradient",label:(0,Qt.__)("Gradient"),inheritedValue:xe,setValue:io,userValue:Lt,isGradient:!0}].filter(Boolean)})}),(0,dt.jsxs)(e,{resetAllFilter:oe,value:t,onChange:o,panelId:i,label:a,children:[ie.map(K=>{let{key:ae,...ge}=K;return(0,dt.jsx)(MF,{...ge,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},ae)}),c]})}var bt=l(A(),1),Pc=l(N(),1),pk=l(O(),1);var mo=l(w(),1),x2=[];function Zae(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||x2,i=e?.color?.[t]?.theme||x2,s=e?.color?.[t]?.default||x2;return(0,pk.useMemo)(()=>[...n,...i,...r?x2:s],[r,n,i,s])}function Xae(e){return Qae(e)}function Qae(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function C2e({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=No(),s=()=>{let a=e(o);t(a)};return(0,mo.jsx)(bt.__experimentalToolsPanel,{label:(0,Pc._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var B2e={duotone:!0},E2e={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,Pc.__)("Duotone")},T2e=({indicator:e,label:t})=>(0,mo.jsxs)(bt.__experimentalHStack,{justify:"flex-start",children:[(0,mo.jsx)(bt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,mo.jsx)(bt.Flex,{expanded:!1,children:e==="unset"||!e?(0,mo.jsx)(bt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,mo.jsx)(bt.DuotoneSwatch,{values:e})})}),(0,mo.jsx)(bt.FlexItem,{title:t,children:t})]}),I2e=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,pk.useRef)(void 0),s={onClick:r,className:V("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(),i.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,Pc.__)("Reset")};return(0,mo.jsxs)(mo.Fragment,{children:[(0,mo.jsx)(bt.Button,{__next40pxDefaultSize:!0,...s,children:(0,mo.jsx)(T2e,{indicator:e,label:(0,Pc.__)("Duotone")})}),e&&(0,mo.jsx)(bt.Button,{size:"small",icon:hr,...a})]})};function w2({as:e=C2e,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=B2e}){let a=b=>Dr({settings:n},"",b),c=Qae(n),u=Zae(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=Zae(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),m=b=>{let v=u.find(({colors:y})=>y===b),k=v?`var:preset|duotone|${v.slug}`:b;o(me(t,["filter","duotone"],k))},h=()=>!!t?.filter?.duotone,p=()=>m(void 0),g=(0,pk.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,mo.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,mo.jsx)(bt.__experimentalToolsPanelItem,{label:(0,Pc.__)("Duotone"),hasValue:h,onDeselect:p,isShownByDefault:s.duotone,panelId:i,children:(0,mo.jsx)(bt.Dropdown,{popoverProps:E2e,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:I2e(f,p),renderContent:()=>(0,mo.jsx)(bt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,mo.jsxs)(bt.MenuGroup,{label:(0,Pc.__)("Duotone"),children:[(0,mo.jsx)("p",{children:(0,Pc.__)("Create a two-tone color effect without losing your original image.")}),(0,mo.jsx)(bt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var hk=l(A(),1),zS=l(N(),1);var wp=l(w(),1);function Jae(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function ele({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=No(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,wp.jsx)(wp.Fragment,{children:(0,wp.jsx)(hk.__experimentalToolsPanel,{label:(0,zS._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,wp.jsx)(hk.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,zS.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,wp.jsx)(hk.ToggleControl,{label:(0,zS.__)("Enlarge on click"),checked:a,onChange:s})})})})}var gk=l(A(),1),tle=l(O(),1),C2=l(N(),1);var jS=l(w(),1);function B2(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function E2({value:e,onChange:t,inheritedValue:o=e,help:r}){let[n,i]=(0,tle.useState)(null),s=o?.css;function a(u){if(t({...e,css:u}),!B2(u)){i((0,C2.__)("The custom CSS is invalid. Do not use <> markup."));return}n&&i(null)}function c(u){let d=u?.target?.value;if(!d||!B2(d))return;let[f]=dg([{css:d}],".for-validation-only");i(f===null?(0,C2.__)("There is an error with your CSS structure."):null)}return(0,jS.jsxs)(gk.__experimentalVStack,{spacing:3,children:[n&&(0,jS.jsx)(gk.Notice,{status:"error",onRemove:()=>i(null),children:n}),(0,jS.jsx)(gk.TextareaControl,{label:(0,C2.__)("Additional CSS"),value:s,onChange:u=>a(u),onBlur:c,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1,help:r})]})}var R2=l(A(),1),GS=l(O(),1),HS=l(N(),1);var Ce=l(A(),1);var At=l(N(),1),rle=l(Ai(),1),VF=l(Gn(),1),Rc=l(O(),1),US=l(F(),1),nle=l(Me(),1),ile=l(AV(),1);var Te=l(w(),1),T2="image",P2e={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},P2=()=>{},I2=e=>{window.requestAnimationFrame(()=>{let[t]=nle.focus.tabbable.find(e?.current);t&&t.focus()})};function R2e(e){return e==="cover"||e===void 0?(0,At.__)("Image covers the space evenly."):e==="contain"?(0,At.__)("Image is contained without distortion."):(0,At.__)("Image has a fixed width.")}var O2e=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}%`},A2e=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 sle({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=P2}){let{isOpen:s,...a}=o;(0,Rc.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Te.jsxs)(Ce.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,Te.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,Te.jsxs)(Ce.FlexBlock,{children:[(0,Te.jsx)(Ce.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Te.jsx)(Ce.VisuallyHidden,{as:"span",children:t?(0,At.sprintf)((0,At.__)("Background image: %s"),r||n):(0,At.__)("No background image selected")})]})]});return e==="button"?(0,Te.jsx)(Ce.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function L2e({label:e,filename:t,url:o,children:r,onToggle:n=P2,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,VF.getFilename)(o)||(0,At.__)("Image");return(0,Te.jsx)(Ce.Dropdown,{popoverProps:P2e,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,At.__)("Background size, position and repeat options."),isOpen:d};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(sle,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Te.jsx)(Ce.Button,{__next40pxDefaultSize:!0,label:(0,At.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:hr,onClick:()=>{s(),d&&u(),I2(a)}})]})},renderContent:()=>(0,Te.jsx)(Ce.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function N2e(){return(0,Te.jsx)(Ce.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Te.jsx)(Ce.Spinner,{})})}function ole({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=P2,onResetImage:n=P2,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,Rc.useState)(!1),{getSettings:d}=(0,US.useSelect)(x),{id:f,title:m,url:h}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:p}=(0,US.useDispatch)(rle.store),g=B=>{p(B,{type:"snackbar"}),u(!1)},b=()=>e(me(t,["background","backgroundImage"],void 0)),v=B=>{if(!B||!B.url){b(),u(!1);return}if((0,ile.isBlobURL)(B.url)){u(!0);return}if(B.media_type&&B.media_type!==T2||!B.media_type&&B.type&&B.type!==T2){g((0,At.__)("Only images can be used as a background image."));return}let R=t?.background?.backgroundSize||s?.backgroundSize,I=t?.background?.backgroundPosition;e(me(t,["background"],{...t?.background,backgroundImage:{url:B.url,id:B.id,source:"file",title:B.title||void 0},backgroundPosition:!I&&(R==="auto"||!R)?"50% 0":I,backgroundSize:R})),u(!1),I2(a)},k=B=>{d().mediaUpload({allowedTypes:[T2],filesList:B,onFileChange([R]){v(R)},onError:g,multiple:!1})},y=Jd(t),_=()=>e(me(t,["background"],{backgroundImage:"none"})),S=!y&&Jd(o),C=m||(0,VF.getFilename)(h)||(0,At.__)("Image");return(0,Te.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Te.jsx)(N2e,{}),(0,Te.jsx)(Hb,{mediaId:f,mediaURL:h,allowedTypes:[T2],accept:"image/*",onSelect:v,popoverProps:{className:V({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Te.jsx)(sle,{imgUrl:h,filename:m,label:C}),renderToggle:B=>(0,Te.jsx)(Ce.Button,{...B,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{I2(a),n()},children:S&&(0,Te.jsx)(Ce.MenuItem,{onClick:()=>{I2(a),_(),r()},children:(0,At.__)("Remove")})}),(0,Te.jsx)(Ce.DropZone,{onFilesDrop:k,label:(0,At.__)("Drop to upload")})]})}function D2e({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=v=>{let k=i,y=c;v==="contain"&&(k="no-repeat",y=void 0),v==="cover"&&(k=void 0,y=void 0),(d==="cover"||d==="contain")&&v==="auto"&&(k=void 0,t?.background?.backgroundImage?.id&&(y="50% 0")),!v&&d==="auto"&&(v="auto"),e(me(t,["background"],{...t?.background,backgroundPosition:y,backgroundRepeat:k,backgroundSize:v}))},h=v=>{e(me(t,["background","backgroundPosition"],O2e(v)))},p=()=>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,Te.jsxs)(Ce.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Te.jsx)(Ce.FocalPointPicker,{label:(0,At.__)("Focal point"),url:s,value:A2e(b),onChange:h}),(0,Te.jsx)(Ce.ToggleControl,{label:(0,At.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Te.jsxs)(Ce.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,At.__)("Size"),value:d,onChange:m,isBlock:!0,help:R2e(n||r?.backgroundSize),children:[(0,Te.jsx)(Ce.__experimentalToggleGroupControlOption,{value:"cover",label:(0,At._x)("Cover","Size option for background image control")},"cover"),(0,Te.jsx)(Ce.__experimentalToggleGroupControlOption,{value:"contain",label:(0,At._x)("Contain","Size option for background image control")},"contain"),(0,Te.jsx)(Ce.__experimentalToggleGroupControlOption,{value:"auto",label:(0,At._x)("Tile","Size option for background image control")},"tile")]}),(0,Te.jsxs)(Ce.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Te.jsx)(Ce.__experimentalUnitControl,{"aria-label":(0,At.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,At.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Te.jsx)(Ce.ToggleControl,{label:(0,At.__)("Repeat"),checked:f,onChange:p,disabled:d==="cover"})]})]})}function ale({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,US.useSelect)(v=>{let{getSettings:k}=v(x),y=k();return{globalStyles:y[Bi],_links:y[X0]}},[]),a=(0,Rc.useMemo)(()=>{let v={background:{}};return o?.background?(Object.entries(o?.background).forEach(([k,y])=>{v.background[k]=Qg(y,{styles:i,_links:s})}),v):o},[i,s,o]),c=()=>t(me(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=Jd(e)||Jd(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,h=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[p,g]=(0,Rc.useState)(!1),b=(0,Rc.useRef)();return(0,Te.jsx)("div",{ref:b,className:V("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":p}),children:h?(0,Te.jsx)(L2e,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Te.jsxs)(Ce.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Te.jsx)(ole,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Te.jsx)(D2e,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Te.jsx)(ole,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var ef=l(w(),1),M2e={backgroundImage:!0,gradient:!0};function lle(e,t){return GS.Platform.OS==="web"&&e?.background?.[t]}function O2(e){let{backgroundImage:t,gradient:o}=e?.background||{};return GS.Platform.OS==="web"&&(t||o)}function Jd(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function FF(e){return typeof e?.background?.gradient=="string"&&e?.background?.gradient!==""}function V2e({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=No();return(0,ef.jsx)(R2.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,hasInnerWrapper:!0,className:"background-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,ef.jsx)("div",{className:"background-block-support-panel__inner-wrapper",children:n})})}function A2({as:e=V2e,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=M2e,defaultValues:a={},headerLabel:c=(0,HS.__)("Background")}){let u=_p(n),d=n?.color?.customGradient,f=u.length>0||d,m=lle(n,"gradient"),h=f&&m,p=lle(n,"backgroundImage"),g=(0,GS.useCallback)(B=>({...B,background:{},color:m?{...B?.color,gradient:void 0}:B?.color}),[m]);if(!h&&!p)return null;let b=B=>Dr({settings:n},"",B),v=B=>{let I=u.flatMap(({gradients:E})=>E).find(({gradient:E})=>E===B);return I?"var:preset|gradient|"+I.slug:B},k=()=>o(me(t,["background","backgroundImage"],void 0)),y=()=>{let B=me(t,["background","gradient"],void 0);B=me(B,["color","gradient"],void 0),o(B)},_=b(t?.background?.gradient??t?.color?.gradient),S=b(r?.background?.gradient??r?.color?.gradient),C=B=>{let R=me(t,["background","gradient"],v(B));R=me(R,["color","gradient"],void 0),o(R)};return(0,ef.jsxs)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,headerLabel:c,children:[p&&(0,ef.jsx)(R2.__experimentalToolsPanelItem,{className:"block-editor-background-panel__item",hasValue:()=>Jd(t),label:(0,HS.__)("Image"),onDeselect:k,isShownByDefault:s.backgroundImage,panelId:i,children:(0,ef.jsx)(ale,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})}),h&&(0,ef.jsx)(MF,{className:"block-editor-background-panel__item",label:(0,HS.__)("Gradient"),hasValue:()=>FF(t),resetValue:y,isShownByDefault:s.gradient,indicators:[_],tabs:[{key:"gradient",label:(0,HS.__)("Gradient"),inheritedValue:_??S,setValue:C,userValue:_,isGradient:!0}],colorGradientControlSettings:{gradients:u,disableCustomGradients:!d},panelId:i})]})}var Cp=l(N(),1);var bk=l(A(),1),L2=l(w(),1);function cle({states:e=[],value:t="default",onChange:o}){if(!e||e.length===0)return null;let r=[{label:(0,Cp.__)("Default"),value:"default"},...e.map(i=>({label:i.label,value:i.value}))],n=()=>r.find(s=>s.value===t)?.label||(0,Cp.__)("Default");return(0,L2.jsx)(bk.DropdownMenu,{icon:pr,label:(0,Cp.sprintf)((0,Cp.__)("State: %s"),n()),text:n(),toggleProps:{size:"compact",variant:"tertiary",iconPosition:"right"},children:({onClose:i})=>(0,L2.jsx)(bk.MenuGroup,{label:(0,Cp.__)("State"),children:r.map(s=>(0,L2.jsx)(bk.MenuItem,{onClick:()=>{o(s.value),i()},icon:t===s.value?Cs:null,children:s.label},s.value))})})}var D2=l(N(),1),UF=l(w(),1),Ep="__experimentalBorder",$S="shadow",ule=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},Bp=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=ule(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=ule(e,"color",o);return r||{color:o}};function N2(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function mle(e){if((0,jF.__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:Ae(r),borderColor:o}}function ple(e){return(0,jF.__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 F2e({label:e,children:t,resetAllFilter:o}){let r=(0,kk.useCallback)(n=>{let i=ple(n),s=o(i);return{...n,...mle(s)}},[o]);return(0,UF.jsx)(pe,{group:"border",resetAllFilter:r,label:e,children:t})}function hle({clientId:e,name:t,setAttributes:o,settings:r}){let n=b2(r),{style:i,borderColor:s}=(0,fle.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(x).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,kk.useMemo)(()=>ple({style:i,borderColor:s}),[i,s]),c=d=>{o(mle(d))};if(!n)return null;let u={...(0,WS.getBlockSupport)(t,[Ep,"__experimentalDefaultControls"]),...(0,WS.getBlockSupport)(t,[$S,"__experimentalDefaultControls"])};return(0,UF.jsx)(k2,{as:F2e,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function M2(e,t="any"){if(kk.Platform.OS!=="web")return!1;let o=(0,WS.getBlockSupport)(e,Ep);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function mk({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=us(e),n=FS(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,D2.__)("Border & Shadow"):o?(0,D2.__)("Shadow"):(0,D2.__)("Border")}function z2e(e){return!M2(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function gle(e,t,o){if(!M2(t,"color")||Ge(t,Ep,"color"))return e;let r=HF(o),n=V(e.className,r);return e.className=n||void 0,e}function HF(e){let{borderColor:t,style:o}=e,r=Ci("border-color",t);return V({"has-border-color":t||o?.border?.color,[r]:!!r})}function j2e({name:e,borderColor:t,style:o}){let{colors:r}=Fd();if(!M2(e,"color")||Ge(e,Ep,"color"))return{};let{color:n}=Bp({colors:r,namedColor:t}),{color:i}=Bp({colors:r,namedColor:N2(o?.border?.top?.color)}),{color:s}=Bp({colors:r,namedColor:N2(o?.border?.right?.color)}),{color:a}=Bp({colors:r,namedColor:N2(o?.border?.bottom?.color)}),{color:c}=Bp({colors:r,namedColor:N2(o?.border?.left?.color)});return gle({style:Ae({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var GF={useBlockProps:j2e,addSaveProps:gle,attributeKeys:["borderColor","style"],hasSupport(e){return M2(e,"color")}};(0,dle.addFilter)("blocks.registerBlockType","core/border/addAttributes",z2e);var YF=l(pt(),1),Oc=l(Y(),1),tf=l(O(),1),Ble=l(F(),1);var $F=l(Y(),1),ble=l(F(),1),KF=l(O(),1);var V2=l(w(),1),Tp="background",WF={backgroundSize:"cover",backgroundPosition:"50% 50%"};function KS(e,t="any"){let o=(0,$F.getBlockSupport)(e,Tp);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat||!!o?.gradient:!!o?.[t]}function F2(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:WF.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:WF.backgroundPosition}),t}function U2e({name:e,style:t}){if(!KS(e)||!t?.background?.backgroundImage)return;let o=F2(t?.background);if(o)return{style:{...o}}}function kle(e){return Jd(e)||FF(e)?"has-background":""}function H2e({children:e,backgroundGradientSupported:t=!1}){let o=(0,KF.useCallback)(r=>{let n=r.className?.includes("has-background")?r.className.split(" ").filter(i=>i!=="has-background").join(" ")||void 0:r.className;return{...r,className:n,style:Ae({...r.style,background:void 0,color:t?{...r.style?.color,gradient:void 0}:r.style?.color})}},[t]);return(0,V2.jsx)(pe,{group:"background",resetAllFilter:o,children:e})}function vle({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,className:i,inheritedValue:s}=(0,ble.useSelect)(h=>{let{getBlockAttributes:p,getSettings:g}=h(x),b=g(),v=p(e);return{style:v?.style,className:v?.className,inheritedValue:b[Bi]?.blocks?.[t]}},[e,t]),a=KS(t,"gradient"),c=(0,KF.useCallback)(({children:h})=>(0,V2.jsx)(H2e,{backgroundGradientSupported:a,children:h}),[a]);if(!O2(r)||!KS(t))return null;let u=h=>{let p=a&&!!n?.color?.gradient,g={style:Ae(a?{...h,color:{...h?.color,gradient:void 0}}:h)};p&&h?.background?.gradient?g.className=V(i,"has-background"):!h?.background?.gradient&&i?.includes("has-background")&&(g.className=i.split(" ").filter(b=>b!=="has-background").join(" ")||void 0),o(g)},d=a&&!n?.background?.gradient&&n?.color?.gradient?{...n,background:{...n?.background,gradient:n?.color?.gradient}}:n,f={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&KS(t,"backgroundSize")}},m=(0,$F.getBlockSupport)(t,[Tp,"__experimentalDefaultControls"]);return(0,V2.jsx)(A2,{inheritedValue:s,as:c,panelId:e,defaultValues:WF,settings:f,onChange:u,defaultControls:m,value:d})}var yle={useBlockProps:U2e,attributeKeys:["style"],hasSupport:KS};var YS=l(O(),1),Sle=l(F(),1),xle=l(Y(),1);var wle=l(w(),1);function z2(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function _le(e,t){if(!e||!t)return{};let o=ni(t,"color.text",{fallback:!0}),r=ni(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=z2(n,"color"),c=s&&s.textContent?z2(s,"color"):void 0,u=i,d=z2(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=z2(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:c}}function G2e(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function Cle({clientId:e,name:t}){let o=ot(e),[r,n]=(0,YS.useReducer)(G2e,{}),i=(0,Sle.useSelect)(s=>t?s(xle.store).getBlockType(t):void 0,[t]);return(0,YS.useLayoutEffect)(()=>{!o||!i||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>n(_le(o,i))))}),(0,YS.useLayoutEffect)(()=>{if(!o||!i)return;let s=new window.MutationObserver(()=>{n(_le(o,i))});return s.observe(o,{attributes:!0,attributeFilter:["class","style"]}),()=>{s.disconnect()}},[o,i]),(0,wle.jsx)(II,{backgroundColor:r.backgroundColor,textColor:r.textColor,linkColor:r.linkColor,enableAlphaChecker:!0})}var j2=l(w(),1),lr="color",U2=e=>{let t=(0,Oc.getBlockSupport)(e,lr);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},W2e=e=>{if(tf.Platform.OS!=="web")return!1;let t=(0,Oc.getBlockSupport)(e,lr);return t!==null&&typeof t=="object"&&!!t.link},qF=e=>{let t=(0,Oc.getBlockSupport)(e,lr);return t!==null&&typeof t=="object"&&!!t.gradients},$2e=e=>{let t=(0,Oc.getBlockSupport)(e,lr);return t&&t.background!==!1},K2e=e=>{let t=(0,Oc.getBlockSupport)(e,lr);return t&&t.text!==!1};function Y2e(e){return U2(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),qF(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function Ele(e,t,o){if(!U2(t)||Ge(t,lr))return e;let r=qF(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!Ge(t,lr,g),u=c("text")?Ci("color",i):void 0,d=c("gradients")?wh(s):void 0,f=c("background")?Ci("background-color",n):void 0,m=c("background")||c("gradients"),h=n||a?.color?.background||r&&(s||a?.color?.gradient),p=V(e.className,u,d,{[f]:(!r||!a?.color?.gradient)&&!!f,"has-text-color":c("text")&&(i||a?.color?.text),"has-background":m&&h,"has-link-color":c("link")&&a?.elements?.link?.color});return e.className=p||void 0,e}function Tle(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:Ae(a),textColor:o,backgroundColor:n,gradient:s}}function Ile(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 q2e({children:e,resetAllFilter:t}){let o=(0,tf.useCallback)(r=>{let n=Ile(r),i=t(n);return{...r,...Tle(i)}},[t]);return(0,j2.jsx)(pe,{group:"color",resetAllFilter:o,children:e})}function H2({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=_2(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,Ble.useSelect)(b=>{if(!a)return{};let{style:v,textColor:k,backgroundColor:y,gradient:_}=b(x).getBlockAttributes(e)||{};return{style:v,textColor:k,backgroundColor:y,gradient:_}},[e,a]),m=(0,tf.useMemo)(()=>Ile({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),h=b=>{o(Tle(b))};if(!a)return null;s=s||(0,Oc.getBlockSupport)(t,[lr,"__experimentalDefaultControls"]);let p=tf.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,Oc.getBlockSupport)(t,[lr,"enableContrastChecker"])!==!1;return(0,j2.jsx)(S2,{as:n||q2e,panelId:e,settings:r,value:m,onChange:h,defaultControls:s,label:i,enableContrastChecker:(0,Oc.getBlockSupport)(t,[lr,"enableContrastChecker"])!==!1,children:p&&(0,j2.jsx)(Cle,{clientId:e,name:t})})}function Z2e({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=he("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,tf.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!U2(e)||Ge(e,lr))return{};let u={};o&&!Ge(e,lr,"text")&&(u.color=va(c,o)?.color),t&&!Ge(e,lr,"background")&&(u.backgroundColor=va(c,t)?.color);let d=Ele({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:V(d.className,!f&&kle(n))}}var ZF={useBlockProps:Z2e,addSaveProps:Ele,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:U2},X2e={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Q2e(e,t,o,r){let n=e.name,i={linkColor:W2e(n),textColor:K2e(n),backgroundColor:$2e(n),gradient:qF(n)};return G2(i,X2e,e,t,o,r)}(0,YF.addFilter)("blocks.registerBlockType","core/color/addAttribute",Y2e);(0,YF.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",Q2e);var wr=l(w(),1);function J2e({blockName:e,clientId:t,contentClientIds:o}){let r=us(e),{updateBlockAttributes:n}=(0,W2.useDispatch)(x),{hasButtons:i,hasHeading:s}=(0,W2.useSelect)(c=>{let u=c(x).getBlockNamesByClientId(o);return{hasButtons:u.includes("core/buttons"),hasHeading:u.includes("core/heading")}},[o]);return(0,wr.jsx)(H2,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:DF,label:(0,vk.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var eRe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=mk({blockName:e});return(0,wr.jsxs)(wr.Fragment,{children:[o&&(0,wr.jsx)(vb,{clientId:t}),r&&(0,wr.jsx)(J2e,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,wr.jsxs)(wr.Fragment,{children:[(0,wr.jsx)(pe.Slot,{group:"color",label:(0,vk.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,wr.jsx)(pe.Slot,{group:"background",label:(0,vk.__)("Background image"),className:"background-block-support-panel__inner-wrapper"}),(0,wr.jsx)(pe.Slot,{group:"filter"}),(0,wr.jsx)(pe.Slot,{group:"typography",label:(0,vk.__)("Typography")}),(0,wr.jsx)(pe.Slot,{group:"dimensions",label:(0,vk.__)("Dimensions")}),(0,wr.jsx)(pe.Slot,{group:"border",label:i}),(0,wr.jsx)(pe.Slot,{group:"styles"})]})]})},Ple=eRe;var Rle=l(A(),1),Ole=l(N(),1);var $2=l(Y(),1),K2=l(F(),1),pi=l(A(),1);var ds=l(w(),1);function Y2({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,ds.jsx)(pi.__experimentalVStack,{spacing:1,children:e.map(n=>(0,ds.jsx)(tRe,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function tRe({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=It(e),{isSelected:i,childBlocks:s,hasListViewSupport:a,blockName:c}=(0,K2.useSelect)(g=>{let{isBlockSelected:b,hasSelectedInnerBlock:v,getBlockOrder:k,getBlockName:y}=g(x),_=y(e);return{isSelected:b(e)||v(e,!0),childBlocks:k(e),hasListViewSupport:_==="core/navigation"||(0,$2.hasBlockSupport)(_,"listView"),blockName:_}},[e]),u=(0,$2.getBlockType)(c),f=vr({clientId:e,context:"list-view"})||u?.title||c,{selectBlock:m}=(0,K2.useDispatch)(x),p=s&&s.length>0&&r&&a;return(0,ds.jsx)(pi.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:i,onClick:async()=>{await m(e),p&&o&&o(e),t&&t(e)},children:(0,ds.jsxs)(pi.Flex,{children:[(0,ds.jsx)(pi.FlexItem,{children:(0,ds.jsx)(Oe,{icon:n?.icon})}),(0,ds.jsx)(pi.FlexBlock,{style:{textAlign:"left"},children:(0,ds.jsx)(pi.__experimentalTruncate,{children:f})}),p&&(0,ds.jsx)(pi.FlexItem,{children:(0,ds.jsx)(Be,{icon:Uo,size:24})})]})})}var yk=l(w(),1),oRe=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,yk.jsx)(yk.Fragment,{children:!r&&(0,yk.jsx)(Rle.PanelBody,{title:(0,Ole.__)("Content"),children:(0,yk.jsx)(Y2,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},q2=oRe;var qo=l(w(),1),{Tabs:of}=M(Sk.privateApis);function XF({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,ca.useRef)(null),a=(0,_k.useSelect)(_=>_(Ale.store).get("core","showIconLabels"),[]),{requestedTab:c}=(0,_k.useSelect)(_=>({requestedTab:M(_(x)).getRequestedInspectorTab()})),[u,d]=(0,ca.useState)(()=>c?.tabName??r[0]?.name),f=(0,ca.useRef)(!1),m=(0,ca.useRef)(!1),{__unstableSetOpenListViewPanel:h,__unstableIncrementListViewExpandRevision:p,__unstableSetAllListViewPanelsOpen:g}=(0,_k.useDispatch)(x),{clearRequestedInspectorTab:b}=M((0,_k.useDispatch)(x));(0,ca.useEffect)(()=>{f.current=!1},[t]),(0,ca.useEffect)(()=>{c&&(d(c.tabName),c.tabName===Ic.name&&c.options?.openPanel&&(h(c.options.openPanel),p()),m.current=!0,f.current=!0,b())},[c,h,p,b]),(0,ca.useEffect)(()=>{u===Ic.name&&!f.current&&(g(),p())},[t,u,g,p]),(0,ca.useEffect)(()=>{if(!r?.length||f.current&&r.some(S=>S.name===u))return;let _=r[0]?.name;u!==_&&d(_)},[r,u]);let v=_=>{d(_),f.current=!0,_===Ic.name&&!m.current&&(g(),p()),m.current=!1},k=r.some(_=>_.name===Ic.name),y=_=>{k&&(h(_),p(),m.current=!0,v(Ic.name))};return(0,qo.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,qo.jsxs)(of,{selectedTabId:u,onSelect:v,children:[(0,qo.jsx)(of.TabList,{children:r.map(_=>a?(0,qo.jsx)(of.Tab,{tabId:_.name,children:_.title},_.name):(0,qo.jsx)(Sk.Tooltip,{text:_.title,children:(0,qo.jsx)(of.Tab,{tabId:_.name,"aria-label":_.title,children:(0,qo.jsx)(Sk.Icon,{icon:_.icon})})},_.name))}),(0,qo.jsxs)(of.TabPanel,{tabId:JP.name,focusable:!1,children:[(0,qo.jsx)(q2,{contentClientIds:i,onSwitchToListView:y,hasListViewTab:k}),(0,qo.jsx)(pe.Slot,{group:"content"})]}),(0,qo.jsxs)(of.TabPanel,{tabId:Ic.name,focusable:!1,children:[(0,qo.jsx)(pe.Slot,{group:"list",ref:s}),(0,qo.jsx)(AE,{listViewRef:s})]}),(0,qo.jsx)(of.TabPanel,{tabId:XP.name,focusable:!1,children:(0,qo.jsx)(iae,{showAdvancedControls:!!e})}),(0,qo.jsx)(of.TabPanel,{tabId:QP.name,focusable:!1,children:(0,qo.jsx)(Ple,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var hi=l(A(),1),Lle=l(F(),1);var rRe=[];function nRe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function Nle(e,t,o,r){let n=[],{bindings:i,border:s,color:a,content:c,default:u,dimensions:d,list:f,position:m,styles:h,typography:p,effects:g}=qi,b=(0,hi.__experimentalUseSlotFills)(f.name),v=!!b&&b.length,k=(0,hi.__experimentalUseSlotFills)(c.name),y=!!k&&k.length,S=[...(0,hi.__experimentalUseSlotFills)(s.name)||[],...(0,hi.__experimentalUseSlotFills)(a.name)||[],...(0,hi.__experimentalUseSlotFills)(d.name)||[],...(0,hi.__experimentalUseSlotFills)(h.name)||[],...(0,hi.__experimentalUseSlotFills)(p.name)||[],...(0,hi.__experimentalUseSlotFills)(g.name)||[]].length,C=[...(0,hi.__experimentalUseSlotFills)(pd.slotName)||[],...(0,hi.__experimentalUseSlotFills)(i.name)||[]],B=[...(0,hi.__experimentalUseSlotFills)(u.name)||[],...(0,hi.__experimentalUseSlotFills)(m.name)||[],...v&&S>1?C:[]],R=window?.__experimentalContentOnlyInspectorFields,I=y||!R&&t?.length;I&&n.push(JP),v&&n.push(Ic),(B.length||C.length&&(I||v))&&n.push(XP),(r||S)&&n.push(QP);let E=(0,Lle.useSelect)(T=>T(x).getSettings().blockInspectorTabs,[]);return nRe(e,E)?n:rRe}var Dle=l(A(),1);var QF=l(w(),1),{Fill:iRe,Slot:sRe}=(0,Dle.createSlotFill)(Symbol("InspectorControlsLastItem")),Mle=e=>Ie()[ws]?(0,QF.jsx)(iRe,{...e}):null;Mle.Slot=function(t){return(0,QF.jsx)(sRe,{...t})};var Z2=Mle;var Vle=l(F(),1);function Fle(e){return(0,Vle.useSelect)(t=>{if(e){let o=t(x).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(x),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var Se=l(w(),1);function Ule({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=mk({blockName:e});return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(pe.Slot,{}),(0,Se.jsx)(pe.Slot,{group:"color",label:(0,xk.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Se.jsx)(pe.Slot,{group:"background",label:(0,xk.__)("Background image"),className:"background-block-support-panel__inner-wrapper"}),(0,Se.jsx)(pe.Slot,{group:"typography",label:(0,xk.__)("Typography")}),(0,Se.jsx)(pe.Slot,{group:"dimensions",label:(0,xk.__)("Dimensions")}),(0,Se.jsx)(pe.Slot,{group:"border",label:n}),(0,Se.jsx)(pe.Slot,{group:"styles"}),o&&(0,Se.jsx)(o2,{}),r&&(0,Se.jsx)(pe.Slot,{group:"bindings"}),t&&(0,Se.jsx)("div",{children:(0,Se.jsx)(e2,{})})]})}function aRe(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a}=(0,JF.useSelect)(g=>{let{getSelectedBlockClientId:b,getSelectedBlockClientIds:v,getSelectedBlockCount:k,getBlockName:y,getParentSectionBlock:_,isSectionBlock:S,getEditedContentOnlySection:C,isWithinEditedContentOnlySection:B}=M(g(x)),{getBlockStyles:R}=g(rf.store),I=b(),L=B(I)?I:_(I)||I,T=L&&y(L),P=T&&(0,rf.getBlockType)(T),j=v().some(U=>S(U)),H=T&&R(T),z=H&&H.length>0;return{selectedBlockCount:k(),renderedBlockClientId:L,renderedBlockName:T,blockType:P,isSectionBlockInSelection:j,isSectionBlock:S(L),hasBlockStyles:z,editedContentOnlySection:C()}},[]),c=(0,JF.useSelect)(g=>{if(!n||!o)return[];let{getClientIdsOfDescendants:b,getBlockName:v,getBlockEditingMode:k}=M(g(x)),y=b(o),_=new Set;return y.forEach(S=>{let C=v(S);(C==="core/navigation"||(0,rf.hasBlockSupport)(C,"listView"))&&b(S).forEach(R=>_.add(R))}),y.filter(S=>!_.has(S)&&k(S)==="contentOnly")},[n,o]),u=Nle(r?.name,c,n,s),d=u?.length>1,f=Fle(r),m=e>1;if(m&&!i)return(0,Se.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,Se.jsx)(IF,{}),d?(0,Se.jsx)(XF,{tabs:u}):(0,Se.jsx)(Ule,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(m&&i)return(0,Se.jsx)("div",{className:"block-editor-block-inspector",children:(0,Se.jsx)(IF,{})});let h=t===(0,rf.getUnregisteredTypeHandlerName)();return!r||!o||h?(0,Se.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,xk.__)("No block selected.")}):(0,Se.jsx)(lRe,{animate:f,wrapper:g=>(0,Se.jsx)(cRe,{blockInspectorAnimationSettings:f,renderedBlockClientId:o,children:g}),children:(0,Se.jsx)(uRe,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:u,contentClientIds:c,hasBlockStyles:s,editedContentOnlySection:a})})}var lRe=({animate:e,wrapper:t,children:o})=>e?t(o):o,cRe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,Se.jsx)(zle.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},uRe=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s})=>{let a=(0,jle.useRef)(null),c=r?.length>1,u=s&&s!==e,d=It(s),f=It(e),m=f.isSynced;return(0,Se.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,Se.jsx)(Uy,{...d,className:d?.isSynced&&"is-synced",parentClientId:s}),(0,Se.jsx)(Uy,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),(0,Se.jsx)(cG,{clientId:e}),(0,Se.jsx)(Zse,{clientId:e}),(0,Se.jsx)(SI,{blockClientId:e}),c&&(0,Se.jsx)(Se.Fragment,{children:(0,Se.jsx)(XF,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!c&&(0,Se.jsxs)(Se.Fragment,{children:[i&&(0,Se.jsx)(vb,{clientId:e}),(0,Se.jsx)(q2,{contentClientIds:n}),(0,Se.jsx)(pe.Slot,{group:"content"}),(0,Se.jsx)(pe.Slot,{group:"list",ref:a}),(0,Se.jsx)(AE,{listViewRef:a}),!o&&(0,Se.jsx)(Ule,{blockName:t})]}),(0,Se.jsx)(Z2.Slot,{}),(0,Se.jsx)(qP,{},"back")]})},Hle=aRe;var ez=l(Pe(),1);var Gle=l(w(),1),Wle=()=>((0,ez.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),Wy());function $le(e){return(0,ez.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,Gle.jsx)("div",{...e,ref:Wy()})}var Kle=l(F(),1),tz=l(O(),1);var oz=l(w(),1),dRe=()=>{};function fRe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=dRe,shouldFocusBlock:f=!1,onClose:m},h){let{destinationRootClientId:p}=(0,Kle.useSelect)(g=>{let{getBlockRootClientId:b}=g(x);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,oz.jsx)(FV,{onSelect:d,rootClientId:p,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n,__experimentalInsertionIndex:i,__experimentalFilterValue:c,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:a,shouldFocusBlock:f,ref:h,onClose:m})}var rz=(0,tz.forwardRef)(fRe);function mRe(e,t){return(0,oz.jsx)(rz,{...e,onPatternCategorySelection:void 0,ref:t})}var Yle=(0,tz.forwardRef)(mRe);var qle=l(Pe(),1);function Zle(){return(0,qle.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var Xle=l(Q(),1),qS=l(Me(),1),Qle=l(F(),1),nf=l(tt(),1);var Jle=l(w(),1),pRe=window.navigator.userAgent.indexOf("Trident")!==-1,hRe=new Set([nf.UP,nf.DOWN,nf.LEFT,nf.RIGHT]),gRe=.75;function nz(){let e=(0,Qle.useSelect)(t=>t(x).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(!h())return;let b=(0,qS.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(hRe.has(g)){s=b;return}let v=b.top-s.top;if(v===0)return;let k=(0,qS.getScrollContainer)(t);if(!k)return;let y=k===o.body||k===o.documentElement,_=y?r.scrollY:k.scrollTop,S=y?0:k.getBoundingClientRect().top,C=y?s.top/r.innerHeight:(s.top-S)/(r.innerHeight-S);if(_===0&&C<gRe&&p()){s=b;return}let B=y?r.innerHeight:k.clientHeight;if(s.top+s.height>S+B||s.top<S){s=b;return}y?r.scrollBy(0,v):k.scrollTop+=v}function d(){o.addEventListener("selectionchange",f)}function f(){o.removeEventListener("selectionchange",f),m()}function m(){h()&&(s=(0,qS.computeCaretRect)(r))}function h(){return t.contains(o.activeElement)&&o.activeElement.isContentEditable}function p(){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 bRe({children:e}){return(0,Jle.jsx)("div",{ref:nz(),className:"block-editor__typewriter",children:e})}var kRe=pRe?e=>e.children:bRe,ece=kRe;var Ip=l(O(),1),iz=l(Pe(),1);var sz=l(w(),1),X2=(0,Ip.createContext)({});X2.displayName="RenderedRefsContext";function vRe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function az({children:e,uniqueId:t,blockName:o=""}){let r=(0,Ip.useContext)(X2),{name:n}=Ie();o=o||n;let i=(0,Ip.useMemo)(()=>vRe(r,o,t),[r,o,t]);return(0,sz.jsx)(X2.Provider,{value:i,children:e})}function lz(e,t=""){let o=(0,Ip.useContext)(X2),{name:r}=Ie();return t=t||r,!!o[t]?.has(e)}var tce=e=>((0,iz.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,sz.jsx)(az,{...e})),oce=(...e)=>((0,iz.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),lz(...e));var J2=l(A(),1),cz=l(N(),1),uz=l(O(),1),nce=l(Wa(),1);var gi=l(A(),1);var rce=l(N(),1),Ac=l(w(),1);function Q2({title:e,help:t,actions:o=[],onClose:r}){return(0,Ac.jsxs)(gi.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,Ac.jsxs)(gi.__experimentalHStack,{alignment:"center",children:[(0,Ac.jsx)(gi.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,Ac.jsx)(gi.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,Ac.jsx)(gi.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,Ac.jsx)(gi.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,rce.__)("Close"),icon:Gf,onClick:r})]}),t&&(0,Ac.jsx)(gi.__experimentalText,{children:t})]})}var wk=l(w(),1);function yRe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,nce.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?J2.TimePicker:J2.DateTimePicker;return(0,wk.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,wk.jsx)(Q2,{title:i||(0,cz.__)("Publish"),actions:o?[{label:(0,cz.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,wk.jsx)(u,{...c})]})}var dz=(0,uz.forwardRef)(yRe);function _Re(e,t){return(0,wk.jsx)(dz,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var ice=(0,uz.forwardRef)(_Re);var eR=l(F(),1),sce=l(O(),1);function po(e){let t=Ie(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,eR.useDispatch)(x),i=(0,eR.useSelect)(s=>o?null:s(x).getBlockEditingMode(),[o]);return(0,sce.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[j0]:i}var ace=l(Pe(),1),lce=l(O(),1);function SRe(){return(0,ace.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var cce=(0,lce.forwardRef)(SRe);var XS=l(w(),1),Ae=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Ae(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function G2(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=Bl(s,d);f&&(a={...a,attributes:me(a.attributes,d,f)})})}),a}function Ge(e,t,o){let n=(0,uce.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var Lc=new WeakMap;function ti({id:e,css:t}){return uc({id:e,css:t})}function uc({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=M((0,tR.useDispatch)(x)),c=(0,tR.useRegistry)(),u=(0,fs.useId)();(0,fs.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return Lc.get(c)||Lc.set(c,[]),Lc.get(c).push([d,f]),window.queueMicrotask(()=>{Lc.get(c)?.length&&c.batch(()=>{Lc.get(c).forEach(m=>{s(...m)}),Lc.set(c,[])})}),()=>{Lc.get(c)?.find(([h])=>h===d)?Lc.set(c,Lc.get(c).filter(([h])=>h!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function us(e,t){let[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,y,_,S,C,B,R,I,E,L,T,P,D,j,H,z,U,G,W,J,ce,te,ne,X,q,ee,$,oe,ie,K,ae,ge,fe,xe,Ve,at,Lt,no,jo,lt,ur,$t,io,Ue,Kt,Je]=he("background.backgroundImage","background.backgroundSize","background.gradient","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.textIndent","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow"),He=(0,fs.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r,gradient:n},color:{palette:{custom:$,theme:ie,default:K},gradients:{custom:at,theme:Lt,default:no},duotone:{custom:fe,theme:xe,default:Ve},defaultGradients:jo,defaultPalette:ae,defaultDuotone:ge,custom:ee,customGradient:lt,customDuotone:oe,background:ur,link:$t,heading:Ue,button:Kt,text:io},typography:{fontFamilies:{custom:i,default:s,theme:a},fontSizes:{custom:u,default:d,theme:f},customFontSize:m,defaultFontSizes:c,fontStyle:h,fontWeight:p,lineHeight:g,textAlign:b,textColumns:v,textDecoration:k,textIndent:y,textTransform:S,letterSpacing:C,writingMode:_},spacing:{spacingSizes:{custom:T,default:P,theme:D},customSpacingSize:L,defaultSpacingSizes:E,padding:B,margin:R,blockGap:I,units:j},border:{color:ce,radius:te,style:ne,width:X,radiusSizes:q},dimensions:{aspectRatio:H,height:z,minHeight:U,width:G,dimensionSizes:W},layout:J,parentLayout:t,shadow:Je}),[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,y,S,C,_,B,R,I,E,L,T,P,D,j,H,z,U,G,W,J,t,ce,te,ne,X,q,ee,$,oe,ie,K,ae,ge,fe,xe,Ve,at,Lt,no,jo,lt,ur,$t,io,Ue,Kt,Je]);return i2(He,e)}function dce(e){e=e.map(o=>({...o,Edit:(0,fs.memo)(o.edit)}));let t=(0,fz.createHigherOrderComponent)(o=>function(n){let i=Ie();return[...e.map((s,a)=>{let{Edit:c,hasSupport:u,attributeKeys:d=[],shareWithChildBlocks:f,supportsPatternEditing:m}=s;if(!(m&&i[nu]||i[ws]||i[Jp]&&f)||!u(n.name))return null;let p={};for(let g of d)n.attributes[g]&&(p[g]=n.attributes[g]);return(0,XS.jsx)(c,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...p},a)}),(0,XS.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,ZS.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function xRe({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,fs.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var wRe=(0,fs.memo)(xRe);function fce(e){let t=(0,fz.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,fs.useState)(Array(e.length).fill(void 0));return[...e.map((a,c)=>{let{hasSupport:u,attributeKeys:d=[],useBlockProps:f,isMatch:m}=a,h={};for(let p of d)n.attributes[p]&&(h[p]=n.attributes[p]);return!Object.keys(h).length||!u(n.name)||m&&!m(h)?null:(0,XS.jsx)(wRe,{index:c,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...h},c)}),(0,XS.jsx)(o,{...n,wrapperProps:i.filter(Boolean).reduce((a,c)=>({...a,...c,className:V(a.className,c.className),style:{...a.style,...c.style}}),n.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,ZS.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function mce(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,ZS.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,ZS.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var pce=l(Y(),1),hce=l(pt(),1);function CRe(e){let{apiVersion:t=1}=e;return t<2&&(0,pce.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,hce.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",CRe);function gce(e){e.hasAttribute("crossorigin")||e.setAttribute("crossorigin","anonymous")}if(window.crossOriginIsolated){let e=function(){document.body?t.observe(document.body,{childList:!0,attributes:!0,subtree:!0}):document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",()=>{document.body&&t.observe(document.body,{childList:!0,attributes:!0,subtree:!0})})};BRe=e;let t=new window.MutationObserver(o=>{o.forEach(r=>{[r.addedNodes,r.target].forEach(n=>{(n instanceof window.NodeList?n:[n]).forEach(s=>{let a=s;a.querySelectorAll&&(a.querySelectorAll("source,script,video,link").forEach(c=>{gce(c)}),["SOURCE","SCRIPT","VIDEO","LINK"].includes(a.nodeName)&&gce(a))})})})});e()}var BRe;var bce=l(pt(),1),ms=l(Y(),1);var mz=l(w(),1),pz=["left","center","right","wide","full"],ERe=["wide","full"];function hz(e,t=!0,o=!0){let r;return Array.isArray(e)?r=pz.filter(n=>e.includes(n)):e===!0?r=[...pz]:r=[],!o||e===!0&&!t?r.filter(n=>!ERe.includes(n)):r}function TRe(e){return"type"in(e.attributes?.align??{})||(0,ms.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...pz,""]}}),e}function IRe({name:e,align:t,setAttributes:o}){let r=hz((0,ms.getBlockSupport)(e,"align"),(0,ms.hasBlockSupport)(e,"alignWide",!0)),n=dy(r).map(({name:a})=>a),i=po();return!n.length||i!=="default"?null:(0,mz.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,mz.jsx)(zC,{value:t,onChange:a=>{a||(0,ms.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var oR={shareWithChildBlocks:!0,edit:IRe,useBlockProps:PRe,addSaveProps:RRe,attributeKeys:["align"],hasSupport(e){return(0,ms.hasBlockSupport)(e,"align",!1)}};function PRe({name:e,align:t}){let o=hz((0,ms.getBlockSupport)(e,"align"),(0,ms.hasBlockSupport)(e,"alignWide",!0));return dy(o).some(n=>n.name===t)?{"data-align":t}:{}}function RRe(e,t,o){let{align:r}=o,n=(0,ms.getBlockSupport)(t,"align"),i=(0,ms.hasBlockSupport)(t,"alignWide",!0);return hz(n,i).includes(r)&&(e.className=V(`align${r}`,e.className)),e}(0,bce.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",TRe);var kce=l(pt(),1);function ORe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,kce.addFilter)("blocks.registerBlockType","core/lock/addAttribute",ORe);var yz=l(pt(),1),Ik=l(Y(),1);var QS=l(A(),1),iR=l(N(),1),Pce=l(O(),1),Rce=l(F(),1),sR=l(Y(),1);var Ln=l(A(),1),Ece=l(O(),1),Tk=l(N(),1),Tce=l(F(),1);var kz=l(Y(),1),wce=l(F(),1),Ek=l(A(),1),ua=l(N(),1),rR=l(O(),1),Cce=l(Q(),1),Bce=l(er(),1);var gz=l(O(),1),_ce=l(Q(),1),Sce=l(A(),1);var vce=l(A(),1);var Ck=l(w(),1);function ARe({blockTypes:e,value:t,onItemChange:o}){return(0,Ck.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,Ck.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,Ck.jsx)(vce.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,Ck.jsx)(Oe,{icon:r.icon})]},r.name))})}var yce=ARe;var Bk=l(w(),1);function xce({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,_ce.useInstanceId)(xce),i=(0,gz.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:h})=>h!==f.name))},[o,r]),s=(0,gz.useCallback)(f=>{r(f?[...o,...t.filter(m=>!o.find(({name:h})=>h===m.name))]:o.filter(m=>!t.find(({name:h})=>h===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,Bk.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,Bk.jsx)(Sce.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,Bk.jsx)("span",{id:c,children:e})}),(0,Bk.jsx)(yce,{blockTypes:t,value:a,onItemChange:i})]})}var bz=xce;var Nc=l(w(),1);function nR({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,Cce.useDebounce)(Bce.speak,500),[i,s]=(0,rR.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,wce.useSelect)(m=>({categories:m(kz.store).getCategories(),isMatchingSearchTerm:m(kz.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,rR.useEffect)(()=>{if(!i)return;let m=u.length,h=(0,ua.sprintf)((0,ua._n)("%d result found.","%d results found.",m),m);n(h)},[u?.length,i,n]),(0,Nc.jsxs)(Ek.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,Nc.jsx)(Ek.SearchControl,{label:(0,ua.__)("Search for a block"),placeholder:(0,ua.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,Nc.jsx)(Ek.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,ua.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,Nc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,ua.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,Nc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,ua.__)("No blocks found.")}),a.map(m=>(0,Nc.jsx)(bz,{title:m.title,blockTypes:u.filter(h=>h.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,Nc.jsx)(bz,{title:(0,ua.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var da=l(w(),1);function Ice({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,Ece.useState)(o),{updateBlockAttributes:s}=(0,Tce.useDispatch)(x),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,da.jsx)(Ln.Modal,{title:(0,Tk._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,da.jsxs)(Ln.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,da.jsx)(Ln.__experimentalText,{children:(0,Tk.__)("Select which blocks can be added inside this container.")}),(0,da.jsx)(nR,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,da.jsxs)(Ln.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,da.jsx)(Ln.FlexItem,{children:(0,da.jsx)(Ln.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,Tk.__)("Cancel")})}),(0,da.jsx)(Ln.FlexItem,{children:(0,da.jsx)(Ln.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,Tk.__)("Apply")})})]})]})})}var Pp=l(w(),1);function Oce({clientId:e}){let[t,o]=(0,Pce.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,Rce.useSelect)(a=>{let{getBlockAttributes:c}=a(x);return{blockTypes:a(sR.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,sR.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,Pp.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,Pp.jsxs)(QS.BaseControl,{help:(0,iR.__)("Specify which blocks are allowed inside this container."),children:[(0,Pp.jsx)(QS.BaseControl.VisualLabel,{children:(0,iR.__)("Allowed Blocks")}),(0,Pp.jsx)(QS.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,iR.__)("Manage allowed blocks")})]}),t&&(0,Pp.jsx)(Ice,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var vz=l(w(),1);function LRe({clientId:e}){return po()==="contentOnly"?null:(0,vz.jsx)(T_.Fill,{children:(0,vz.jsx)(Oce,{clientId:e})})}var Ace={edit:LRe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,Ik.hasBlockSupport)(e,"allowedBlocks")}};function NRe(e){return e?.attributes?.allowedBlocks?.type||(0,Ik.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,yz.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",NRe);function DRe(e,t,o,r){if(!(0,Ik.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,Ik.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,yz.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",DRe);var Lce=l(pt(),1),aR=l(A(),1),Pk=l(N(),1),lR=l(Y(),1),Nce=l(O(),1);var il=l(w(),1),MRe=/[\s#]/g;function VRe(e){return"type"in(e.attributes?.anchor??{})||(0,lR.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function FRe({anchor:e,setAttributes:t}){if(po()!=="default")return null;let r=Nce.Platform.OS==="web";return(0,il.jsx)(pe,{group:"advanced",children:(0,il.jsx)(aR.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,Pk.__)("HTML anchor"),help:(0,il.jsxs)(il.Fragment,{children:[(0,Pk.__)("Enter a word or two\u2014without spaces\u2014to 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,il.jsxs)(il.Fragment,{children:[" ",(0,il.jsx)(aR.ExternalLink,{href:(0,Pk.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,Pk.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,Pk.__)("Add an anchor"),onChange:n=>{n=n.replace(MRe,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var _z={addSaveProps:zRe,edit:FRe,attributeKeys:["anchor"],hasSupport(e){return(0,lR.hasBlockSupport)(e,"anchor")}};function zRe(e,t,o){return(0,lR.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Lce.addFilter)("blocks.registerBlockType","core/anchor/attribute",VRe);var Dce=l(pt(),1),cR=l(Y(),1);function jRe(e){return e?.attributes?.ariaLabel?.type||(0,cR.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function URe(e,t,o){return(0,cR.hasBlockSupport)(t,"ariaLabel")&&!Ge(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var Mce={addSaveProps:URe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,cR.hasBlockSupport)(e,"ariaLabel")}};(0,Dce.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",jRe);var Yk=l(Y(),1),npe=l(Q(),1),TO=l(A(),1),IO=l(F(),1);var Oue=l(O(),1);var Rp=l(je(),1);function Vce({controlled:e,default:t,name:o,state:r="value"}){let{current:n}=Rp.useRef(e!==void 0),[i,s]=Rp.useState(t),a=n?e:i,c=Rp.useCallback(u=>{n||s(u)},[]);return[a,c]}var xz=l(je(),1);var zce=l(je(),1),Fce={};function Op(e,t){let o=zce.useRef(Fce);return o.current===Fce&&(o.current=e(t)),o}var Sz=xz[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],HRe=Sz&&Sz!==xz.useLayoutEffect?Sz:e=>e();function ps(e){let t=Op(GRe).current;return t.next=e,HRe(t.effect),t.trampoline}function GRe(){let e={next:void 0,callback:WRe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function WRe(){}var jce=l(je(),1),$Re=()=>{},Cr=typeof document<"u"?jce.useLayoutEffect:$Re;function KRe(e,t){return function(r,...n){let i=new URL(e);return i.searchParams.set("code",r.toString()),n.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${r}; visit ${i} for the full message.`}}var YRe=KRe("https://base-ui.com/production-error","Base UI"),Rk=YRe;var Ap=l(je(),1);function JS(e,t,o,r){let n=Op(Hce).current;return qRe(n,e,t,o,r)&&Gce(n,[e,t,o,r]),n.callback}function Uce(e){let t=Op(Hce).current;return ZRe(t,e)&&Gce(t,e),t.callback}function Hce(){return{callback:null,cleanup:null,refs:[]}}function qRe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function ZRe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function Gce(e,t){if(e.refs=t,t.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){let r=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=i(o);typeof s=="function"&&(r[n]=s);break}case"object":{i.current=o;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=r[n];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}default:}}}}}}var Kce=l(je(),1);var Wce=l(je(),1),XRe=parseInt(Wce.version,10);function $ce(e){return XRe>=e}function wz(e){if(!Kce.isValidElement(e))return null;let t=e,o=t.props;return($ce(19)?o?.ref:t.ref)??null}function e0(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Yce(e,t){let o={};for(let r in e){let n=e[r];if(t?.hasOwnProperty(r)){let i=t[r](n);i!=null&&Object.assign(o,i);continue}n===!0?o[`data-${r.toLowerCase()}`]="":n&&(o[`data-${r.toLowerCase()}`]=n.toString())}return o}function qce(e,t){return typeof e=="function"?e(t):e}function Zce(e,t){return typeof e=="function"?e(t):e}var Cz={};function Br(e,t,o,r,n){if(!o&&!r&&!n&&!e)return uR(t);let i=uR(e);return t&&(i=t0(i,t)),o&&(i=t0(i,o)),r&&(i=t0(i,r)),n&&(i=t0(i,n)),i}function Xce(e){if(e.length===0)return Cz;if(e.length===1)return uR(e[0]);let t=uR(e[0]);for(let o=1;o<e.length;o+=1)t=t0(t,e[o]);return t}function uR(e){return Bz(e)?{...Jce(e,Cz)}:QRe(e)}function t0(e,t){return Bz(t)?Jce(t,e):JRe(e,t)}function QRe(e){let t={...e};for(let o in t){let r=t[o];Qce(o,r)&&(t[o]=eue(r))}return t}function JRe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=e0(e.style,r);break}case"className":{e[o]=Ez(e.className,r);break}default:Qce(o,r)?e[o]=eOe(e[o],r):e[o]=r}}return e}function Qce(e,t){let o=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2);return o===111&&r===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function Bz(e){return typeof e=="function"}function Jce(e,t){return Bz(e)?e(t):e??Cz}function eOe(e,t){return t?e?o=>{if(tue(o)){let n=o;o0(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let r=t(o);return e?.(o),r}:eue(t):e}function eue(e){return e&&(t=>(tue(t)&&o0(t),e(t)))}function o0(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ez(e,t){return t?e?t+" "+e:t:e}function tue(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var tOe=Object.freeze([]),Dc=Object.freeze({});var oOe="data-base-ui-swipe-ignore",rOe="data-swipe-ignore",$kt=`[${oOe}]`,Kkt=`[${rOe}]`;var Tz=l(je(),1);function sf(e,t,o={}){let r=t.render,n=nOe(t,o);if(o.enabled===!1)return null;let i=o.state??Dc;return aOe(e,r,n,i)}function nOe(e,t={}){let{className:o,style:r,render:n}=e,{state:i=Dc,ref:s,props:a,stateAttributesMapping:c,enabled:u=!0}=t,d=u?qce(o,i):void 0,f=u?Zce(r,i):void 0,m=u?Yce(i,c):Dc,h=u&&a?iOe(a):void 0,p=u?e0(m,h)??{}:Dc;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=Uce([p.ref,wz(n),...s]):p.ref=JS(p.ref,wz(n),s):JS(null,null)),u?(d!==void 0&&(p.className=Ez(p.className,d)),f!==void 0&&(p.style=e0(p.style,f)),p):Dc}function iOe(e){return Array.isArray(e)?Xce(e):Br(void 0,e)}var sOe=Symbol.for("react.lazy");function aOe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=Br(o,t.props);n.ref=o.ref;let i=t;return i?.$$typeof===sOe&&(i=Ap.Children.toArray(t)[0]),Ap.cloneElement(i,n)}if(e&&typeof e=="string")return lOe(e,o);throw new Error(Rk(8))}function lOe(e,t){return e==="button"?(0,Tz.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,Tz.createElement)("img",{alt:"",...t,key:t.key}):Ap.createElement(e,t)}var Ok={};ka(Ok,{cancelOpen:()=>DOe,chipRemovePress:()=>kOe,clearPress:()=>bOe,closePress:()=>hOe,closeWatcher:()=>IOe,dayPress:()=>UOe,decrementPress:()=>_Oe,disabled:()=>VOe,drag:()=>AOe,escapeKey:()=>TOe,focusOut:()=>EOe,imperativeAction:()=>FOe,incrementPress:()=>yOe,inputBlur:()=>wOe,inputChange:()=>SOe,inputClear:()=>xOe,inputPaste:()=>COe,inputPress:()=>BOe,itemPress:()=>pOe,keyboard:()=>ROe,linkPress:()=>gOe,listNavigation:()=>POe,monthChange:()=>HOe,none:()=>cOe,outsidePress:()=>mOe,pointer:()=>OOe,scrub:()=>NOe,siblingOpen:()=>MOe,swipe:()=>zOe,trackPress:()=>vOe,triggerFocus:()=>fOe,triggerHover:()=>dOe,triggerPress:()=>uOe,valuePropChange:()=>GOe,wheel:()=>LOe,windowResize:()=>jOe});var cOe="none",uOe="trigger-press",dOe="trigger-hover",fOe="trigger-focus",mOe="outside-press",pOe="item-press",hOe="close-press",gOe="link-press",bOe="clear-press",kOe="chip-remove-press",vOe="track-press",yOe="increment-press",_Oe="decrement-press",SOe="input-change",xOe="input-clear",wOe="input-blur",COe="input-paste",BOe="input-press",EOe="focus-out",TOe="escape-key",IOe="close-watcher",POe="list-navigation",ROe="keyboard",OOe="pointer",AOe="drag",LOe="wheel",NOe="scrub",DOe="cancel-open",MOe="sibling-open",VOe="disabled",FOe="imperative-action",zOe="swipe",jOe="window-resize",UOe="day-press",HOe="month-change",GOe="value-prop-change";function dR(e,t,o,r){let n=!1,i=!1,s=r??Dc;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){i=!0},get isCanceled(){return n},get isPropagationAllowed(){return i},trigger:o,...s}}var fR=l(je(),1);var WOe=l(je(),1),oue={...WOe};var rue=0;function $Oe(e,t="mui"){let[o,r]=fR.useState(e),n=e||o;return fR.useEffect(()=>{o==null&&(rue+=1,r(`${t}-${rue}`))},[o,t]),n}var nue=oue.useId;function iue(e,t){if(nue!==void 0){let o=nue();return e??(t?`${t}-${o}`:o)}return $Oe(e,t)}function sue(e){return iue(e,"base-ui")}var bi=l(je(),1);var cue=l(m5(),1);var aue=l(je(),1),KOe=[];function mR(e){aue.useEffect(e,KOe)}var pR=null,bvt=globalThis.requestAnimationFrame,Iz=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let n=0;n<o.length;n+=1)o[n]?.(t)};request(t){let o=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),o}cancel(t){let o=t-this.startId;o<0||o>=this.callbacks.length||(this.callbacks[o]=null,this.callbacksCount-=1)}},hR=new Iz,eo=class e{static create(){return new e}static request(t){return hR.request(t)}static cancel(t){return hR.cancel(t)}currentId=pR;request(t){this.cancel(),this.currentId=hR.request(()=>{this.currentId=pR,t()})}cancel=()=>{this.currentId!==pR&&(hR.cancel(this.currentId),this.currentId=pR)};disposeEffect=()=>this.cancel};function gR(){let e=Op(eo.create).current;return mR(e.disposeEffect),e}function lue(e){return e==null?e:"current"in e?e.current:e}var Lp=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),YOe={[Lp.startingStyle]:""},qOe={[Lp.endingStyle]:""},bR={transitionStatus(e){return e==="starting"?YOe:e==="ending"?qOe:null}};function kR(e,t=!1,o=!0){let r=gR();return ps((n,i=null)=>{r.cancel();let s=lue(e);if(s==null)return;let a=s,c=()=>{cue.flushSync(n)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function u(){Promise.all(a.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||c()}).catch(()=>{if(o){i?.aborted||c();return}let d=a.getAnimations();!i?.aborted&&d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})}if(t){let d=Lp.startingStyle;if(!a.hasAttribute(d)){r.request(u);return}let f=new MutationObserver(()=>{a.hasAttribute(d)||(f.disconnect(),u())});f.observe(a,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}r.request(u)})}var Pz=l(je(),1);function uue(e,t=!1,o=!1){let[r,n]=Pz.useState(e&&t?"idle":void 0),[i,s]=Pz.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&r!=="ending"&&!o&&n("ending"),!e&&!i&&r==="ending"&&n(void 0),Cr(()=>{if(!e&&i&&r!=="ending"&&o){let a=eo.request(()=>{n("ending")});return()=>{eo.cancel(a)}}},[e,i,r,o]),Cr(()=>{if(!e||t)return;let a=eo.request(()=>{n(void 0)});return()=>{eo.cancel(a)}},[t,e]),Cr(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&n("starting");let a=eo.request(()=>{n("idle")});return()=>{eo.cancel(a)}},[t,e,i,r]),{mounted:i,setMounted:s,transitionStatus:r}}function due(e){let{open:t,defaultOpen:o,onOpenChange:r,disabled:n}=e,i=t!==void 0,[s,a]=Vce({controlled:t,default:o,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=uue(s,!0,!0),[f,m]=bi.useState(s),[{height:h,width:p},g]=bi.useState({height:void 0,width:void 0}),b=sue(),[v,k]=bi.useState(),y=v??b,[_,S]=bi.useState(!1),[C,B]=bi.useState(!1),R=bi.useRef(null),I=bi.useRef(null),E=bi.useRef(null),L=bi.useRef(null),T=kR(L,!1),P=ps(D=>{let j=!s,H=dR(Ok.triggerPress,D.nativeEvent);if(r(j,H),H.isCanceled)return;let z=L.current;I.current==="css-animation"&&z!=null&&z.style.removeProperty("animation-name"),!_&&!C&&(I.current!=null&&I.current!=="css-animation"&&!c&&j&&u(!0),I.current==="css-animation"&&(!f&&j&&m(!0),!c&&j&&u(!0))),a(j),I.current==="none"&&c&&!j&&u(!1)});return Cr(()=>{i&&I.current==="none"&&!s&&u(!1)},[i,s,t,u]),bi.useMemo(()=>({abortControllerRef:R,animationTypeRef:I,disabled:n,handleTrigger:P,height:h,mounted:c,open:s,panelId:y,panelRef:L,runOnceAnimationsFinish:T,setDimensions:g,setHiddenUntilFound:S,setKeepMounted:B,setMounted:u,setOpen:a,setPanelIdState:k,setVisible:m,transitionDimensionRef:E,transitionStatus:d,visible:f,width:p}),[R,I,n,P,h,c,s,y,L,T,g,S,B,u,a,m,E,d,f,p])}var vR=l(je(),1),Rz=vR.createContext(void 0);function yR(){let e=vR.useContext(Rz);if(e===void 0)throw new Error(Rk(15));return e}var Np=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Lp.startingStyle]="startingStyle",e[e.endingStyle=Lp.endingStyle]="endingStyle",e})({});var fue=(function(e){return e.panelOpen="data-panel-open",e})({});var ZOe={[Np.open]:""},XOe={[Np.closed]:""},mue={open(e){return e?{[fue.panelOpen]:""}:null}},pue={open(e){return e?ZOe:XOe}};var Ak=l(je(),1);function QOe(){return typeof window<"u"}function JOe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hue(e){return QOe()?e instanceof HTMLElement||e instanceof JOe(e).HTMLElement:!1}var _R=l(je(),1),eAe=_R.createContext(void 0);function gue(e=!1){let t=_R.useContext(eAe);if(t===void 0&&!e)throw new Error(Rk(16));return t}var bue=l(je(),1);function kue(e){let{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:n=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:bue.useMemo(()=>{let u={onKeyDown(d){o&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(u.tabIndex=n,!i&&o&&(u.tabIndex=t?n:-1)),(i&&(t||s)||!i&&o)&&(u["aria-disabled"]=o),i&&(!t||a)&&(u.disabled=o),u},[r,o,t,s,a,i,n])}}function Az(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:n=!0,composite:i}=e,s=Ak.useRef(null),a=gue(!0),c=i??a!==void 0,{props:u}=kue({focusableWhenDisabled:o,disabled:t,composite:c,tabIndex:r,isNativeButton:n}),d=Ak.useCallback(()=>{let h=s.current;Oz(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);Cr(d,[d]);let f=Ak.useCallback((h={})=>{let{onClick:p,onMouseDown:g,onKeyUp:b,onKeyDown:v,onPointerDown:k,...y}=h;return Br({type:n?"button":void 0,onClick(S){if(t){S.preventDefault();return}p?.(S)},onMouseDown(S){t||g?.(S)},onKeyDown(S){if(t||(o0(S),v?.(S),S.baseUIHandlerPrevented))return;let C=S.target===S.currentTarget,B=S.currentTarget,R=Oz(B),I=!n&&tAe(B),E=C&&(n?R:!I),L=S.key==="Enter",T=S.key===" ",P=B.getAttribute("role"),D=P?.startsWith("menuitem")||P==="option"||P==="gridcell";if(C&&c&&T){if(S.defaultPrevented&&D)return;S.preventDefault(),I||n&&R?(B.click(),S.preventBaseUIHandler()):E&&(p?.(S),S.preventBaseUIHandler());return}E&&(!n&&(T||L)&&S.preventDefault(),!n&&L&&p?.(S))},onKeyUp(S){if(!t){if(o0(S),b?.(S),S.target===S.currentTarget&&n&&c&&Oz(S.currentTarget)&&S.key===" "){S.preventDefault();return}S.baseUIHandlerPrevented||S.target===S.currentTarget&&!n&&!c&&S.key===" "&&p?.(S)}},onPointerDown(S){if(t){S.preventDefault();return}k?.(S)}},n?void 0:{role:"button"},u,y)},[t,u,c,n]),m=ps(h=>{s.current=h,d()});return{getButtonProps:f,buttonRef:m}}function Oz(e){return hue(e)&&e.tagName==="BUTTON"}function tAe(e){return!!(e?.tagName==="A"&&e?.href)}var sl=l(je(),1);function vue(e,t,o,r){return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o,r)}}var yue=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function _ue(e){let{abortControllerRef:t,animationTypeRef:o,externalRef:r,height:n,hiddenUntilFound:i,keepMounted:s,id:a,mounted:c,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:m,setDimensions:h,setMounted:p,setOpen:g,setVisible:b,transitionDimensionRef:v,visible:k,width:y}=e,_=sl.useRef(!1),S=sl.useRef(null),C=sl.useRef(d),B=sl.useRef(d),R=gR(),I=sl.useMemo(()=>o.current==="css-animation"?!k:!d&&!c,[d,c,k,o]),E=ps(T=>{if(!T)return;if(o.current==null||v.current==null){let j=getComputedStyle(T),H=j.animationName!=="none"&&j.animationName!=="",z=j.transitionDuration!=="0s"&&j.transitionDuration!=="";H&&z||(j.animationName==="none"&&j.transitionDuration!=="0s"?o.current="css-transition":j.animationName!=="none"&&j.transitionDuration==="0s"?o.current="css-animation":o.current="none"),T.getAttribute(yue.orientation)==="horizontal"||j.transitionProperty.indexOf("width")>-1?v.current="width":v.current="height"}if(o.current!=="css-transition")return;(n===void 0||y===void 0)&&(h({height:T.scrollHeight,width:T.scrollWidth}),B.current&&T.style.setProperty("transition-duration","0s"));let P=-1,D=-1;return P=eo.request(()=>{B.current=!1,D=eo.request(()=>{setTimeout(()=>{T.style.removeProperty("transition-duration")})})}),()=>{eo.cancel(P),eo.cancel(D)}}),L=JS(r,f,E);return Cr(()=>{if(o.current!=="css-transition")return;let T=f.current;if(!T)return;let P=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){let D={"justify-content":T.style.justifyContent,"align-items":T.style.alignItems,"align-content":T.style.alignContent,"justify-items":T.style.justifyItems};Object.keys(D).forEach(j=>{T.style.setProperty(j,"initial","important")}),!B.current&&!s&&T.setAttribute(Np.startingStyle,""),h({height:T.scrollHeight,width:T.scrollWidth}),P=eo.request(()=>{Object.entries(D).forEach(([j,H])=>{H===""?T.style.removeProperty(j):T.style.setProperty(j,H)})})}else{if(T.scrollHeight===0&&T.scrollWidth===0)return;h({height:T.scrollHeight,width:T.scrollWidth});let D=new AbortController;t.current=D;let j=D.signal,H=null,z=Np.endingStyle;return H=new MutationObserver(U=>{U.some(W=>W.type==="attributes"&&W.attributeName===z)&&(H?.disconnect(),H=null,m(()=>{h({height:0,width:0}),T.style.removeProperty("content-visibility"),p(!1),t.current===D&&(t.current=null)},j))}),H.observe(T,{attributes:!0,attributeFilter:[z]}),()=>{H?.disconnect(),R.cancel(),t.current===D&&(D.abort(),t.current=null)}}return()=>{eo.cancel(P)}},[t,o,R,i,s,c,d,f,m,h,p]),Cr(()=>{if(o.current!=="css-animation")return;let T=f.current;T&&(S.current=T.style.animationName||S.current,T.style.setProperty("animation-name","none"),h({height:T.scrollHeight,width:T.scrollWidth}),!C.current&&!_.current&&T.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),p(!0),b(!0)):(t.current=new AbortController,m(()=>{p(!1),b(!1),t.current=null},t.current.signal)))},[t,o,d,f,m,h,p,b,k]),mR(()=>{let T=eo.request(()=>{C.current=!1});return()=>eo.cancel(T)}),Cr(()=>{if(!i)return;let T=f.current;if(!T)return;let P=-1,D=-1;return d&&_.current&&(T.style.transitionDuration="0s",h({height:T.scrollHeight,width:T.scrollWidth}),P=eo.request(()=>{_.current=!1,D=eo.request(()=>{setTimeout(()=>{T.style.removeProperty("transition-duration")})})})),()=>{eo.cancel(P),eo.cancel(D)}},[i,d,f,h]),Cr(()=>{let T=f.current;T&&i&&I&&(T.setAttribute("hidden","until-found"),o.current==="css-transition"&&T.setAttribute(Np.startingStyle,""))},[i,I,o,f]),sl.useEffect(function(){let P=f.current;if(!P)return;function D(j){_.current=!0,g(!0),u(!0,dR(Ok.none,j))}return vue(P,"beforematch",D)},[u,f,g]),sl.useMemo(()=>({props:{hidden:I,id:a,ref:L}}),[I,a,L])}var Sue=l(je(),1);function xue(e){let{enabled:t=!0,open:o,ref:r,onComplete:n}=e,i=ps(n),s=kR(r,o,!1);Sue.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,o,i,s])}var af={};ka(af,{Panel:()=>Eue,Root:()=>Cue,Trigger:()=>Bue});var r0=l(je(),1);var SR={...pue,...bR};var wue=l(w(),1),Cue=r0.forwardRef(function(t,o){let{render:r,className:n,defaultOpen:i=!1,disabled:s=!1,onOpenChange:a,open:c,style:u,...d}=t,f=ps(a),m=due({open:c,defaultOpen:i,onOpenChange:f,disabled:s}),h=r0.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),p=r0.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),g=sf("div",t,{state:h,ref:o,props:d,stateAttributesMapping:SR});return(0,wue.jsx)(Rz.Provider,{value:p,children:g})});var xR=l(je(),1);var oAe={...mue,...bR},Bue=xR.forwardRef(function(t,o){let{panelId:r,open:n,handleTrigger:i,state:s,disabled:a}=yR(),{className:c,disabled:u=a,id:d,render:f,nativeButton:m=!0,style:h,...p}=t,{getButtonProps:g,buttonRef:b}=Az({disabled:u,focusableWhenDisabled:!0,native:m}),v=xR.useMemo(()=>({"aria-controls":n?r:void 0,"aria-expanded":n,onClick:i}),[r,n,i]);return sf("button",t,{state:s,ref:[o,b],props:[v,p,g],stateAttributesMapping:oAe})});var wR=l(je(),1);var Lz=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var Eue=wR.forwardRef(function(t,o){let{className:r,hiddenUntilFound:n,keepMounted:i,render:s,id:a,style:c,...u}=t,{abortControllerRef:d,animationTypeRef:f,height:m,mounted:h,onOpenChange:p,open:g,panelId:b,panelRef:v,runOnceAnimationsFinish:k,setDimensions:y,setHiddenUntilFound:_,setKeepMounted:S,setMounted:C,setPanelIdState:B,setOpen:R,setVisible:I,state:E,transitionDimensionRef:L,visible:T,width:P,transitionStatus:D}=yR(),j=n??!1,H=i??!1;Cr(()=>{if(a)return B(a),()=>{B(void 0)}},[a,B]),Cr(()=>{_(j)},[_,j]),Cr(()=>{S(H)},[S,H]);let{props:z}=_ue({abortControllerRef:d,animationTypeRef:f,externalRef:o,height:m,hiddenUntilFound:j,id:b,keepMounted:H,mounted:h,onOpenChange:p,open:g,panelRef:v,runOnceAnimationsFinish:k,setDimensions:y,setMounted:C,setOpen:R,setVisible:I,transitionDimensionRef:L,visible:T,width:P});xue({open:g&&D==="idle",ref:v,onComplete(){g&&y({height:void 0,width:void 0})}});let U=wR.useMemo(()=>({...E,transitionStatus:D}),[E,D]),G=sf("div",t,{state:U,ref:[o,v],props:[z,{style:{[Lz.collapsiblePanelHeight]:m===void 0?"auto":`${m}px`,[Lz.collapsiblePanelWidth]:P===void 0?"auto":`${P}px`}},u],stateAttributesMapping:SR});return H||j||h?G:null});function hs(e){return sf(e.defaultTagName??"div",e,e)}var Pue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='4130d64bea']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","4130d64bea"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}')),document.head.appendChild(e)}var Tue={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='1fb29d3a3c']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","1fb29d3a3c"),e.appendChild(document.createTextNode("._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}")),document.head.appendChild(e)}var Iue={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},n0=(0,Pue.forwardRef)(function({variant:t="body-md",render:o,className:r,...n},i){return hs({render:o,defaultTagName:"span",ref:i,props:Br(n,{className:V(Tue.text,t.startsWith("heading-")&&Iue.heading,t.startsWith("body-")&&Iue.p,Tue[t],r)})})});var Aue=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='d6a685e1aa']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","d6a685e1aa"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6be);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee995);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c6f7cd);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-fg-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}")),document.head.appendChild(e)}var Rue={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},Nz=(0,Oue.forwardRef)(function({intent:t="none",className:o,...r},n){return(0,Aue.jsx)(n0,{ref:n,className:V(Rue.badge,Rue[`is-${t}-intent`],o),...r,variant:"body-sm"})});var Lue=l(O(),1),Nue=l(Z(),1),Due=l(w(),1),Dz=(0,Lue.forwardRef)(function({icon:t,size:o=24,...r},n){return(0,Due.jsx)(Nue.SVG,{ref:n,fill:"currentColor",...t.props,...r,width:o,height:o})});var al={};ka(al,{Content:()=>ER,FullBleed:()=>jue,Header:()=>BR,Root:()=>CR,Title:()=>Hue});var Mue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='e3ae230cea']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","e3ae230cea"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}")),document.head.appendChild(e)}var rAe={"box-sizing":"_336cd3e4e743482f__box-sizing"};if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='14f5e9ddeb']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","14f5e9ddeb"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}")),document.head.appendChild(e)}var nAe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},CR=(0,Mue.forwardRef)(function({render:t,...o},r){let n=V(nAe.root,rAe["box-sizing"]);return hs({defaultTagName:"div",render:t,ref:r,props:Br({className:n},o)})});var Vue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='14f5e9ddeb']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","14f5e9ddeb"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}")),document.head.appendChild(e)}var iAe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},BR=(0,Vue.forwardRef)(function({render:t,...o},r){return hs({defaultTagName:"div",render:t,ref:r,props:Br({className:iAe.header},o)})});var Fue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='14f5e9ddeb']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","14f5e9ddeb"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}")),document.head.appendChild(e)}var sAe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},ER=(0,Fue.forwardRef)(function({render:t,...o},r){return hs({defaultTagName:"div",render:t,ref:r,props:Br({className:sAe.content},o)})});var zue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='14f5e9ddeb']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","14f5e9ddeb"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}")),document.head.appendChild(e)}var aAe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},jue=(0,zue.forwardRef)(function({render:t,...o},r){return hs({defaultTagName:"div",render:t,ref:r,props:Br({className:aAe.fullbleed},o)})});var Uue=l(O(),1);var Mz=l(w(),1),lAe=(0,Mz.jsx)("div",{}),Hue=(0,Uue.forwardRef)(function({render:t=lAe,children:o,...r},n){return(0,Mz.jsx)(n0,{ref:n,variant:"heading-lg",render:t,...r,children:o})});var Gue=l(O(),1),Wue=l(w(),1),Vz=(0,Gue.forwardRef)(function(t,o){return(0,Wue.jsx)(af.Panel,{ref:o,...t})});var $ue=l(O(),1),Kue=l(w(),1),Fz=(0,$ue.forwardRef)(function(t,o){return(0,Kue.jsx)(af.Root,{ref:o,...t})});var Yue=l(O(),1),que=l(w(),1),zz=(0,Yue.forwardRef)(function(t,o){return(0,que.jsx)(af.Trigger,{ref:o,...t})});var Dp={};ka(Dp,{Content:()=>nde,Header:()=>Jue,HeaderDescription:()=>tde,Root:()=>Xue});var Zue=l(O(),1);var Uz=l(w(),1),Xue=(0,Zue.forwardRef)(function({render:t,...o},r){return(0,Uz.jsx)(Fz,{ref:r,render:(0,Uz.jsx)(CR,{render:t}),...o})});var Lk=l(O(),1);var Que=l(O(),1),TR=(0,Que.createContext)({setDescriptionId:()=>{}});var Mc=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='718ddb3557']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","718ddb3557"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}")),document.head.appendChild(e)}var i0={"header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content","content-inner":"_41bfdbf7b6c087c2__content-inner"};if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='2a5ab8f3a7']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","2a5ab8f3a7"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){--_gcd-a-transition:outline 0.1s ease-out;transition:outline .1s ease-out}outline:0 solid #0000;outline-offset:1px}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9))}}")),document.head.appendChild(e)}var cAe={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"},Jue=(0,Lk.forwardRef)(function({children:t,className:o,render:r,...n},i){let[s,a]=(0,Lk.useState)(),c=(0,Lk.useMemo)(()=>({setDescriptionId:a}),[a]);return(0,Mc.jsx)(TR.Provider,{value:c,children:(0,Mc.jsxs)(zz,{className:V(i0.header,o),render:(0,Mc.jsx)(BR,{ref:i,render:r,...n}),nativeButton:!1,"aria-describedby":s,children:[(0,Mc.jsx)("div",{className:i0["header-content"],children:t}),(0,Mc.jsx)("div",{className:V(i0["header-trigger-positioner"]),children:(0,Mc.jsx)("div",{className:V(i0["header-trigger-wrapper"],cAe["outset-ring--focus-parent-visible"]),children:(0,Mc.jsx)(Dz,{icon:pr,className:i0["header-trigger"]})})})]})})});var lf=l(O(),1);var ede=l(w(),1),tde=(0,lf.forwardRef)(function({children:t,className:o,...r},n){let i=(0,lf.useId)(),{setDescriptionId:s}=(0,lf.useContext)(TR);return(0,lf.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,ede.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:o,...r,children:t})});var rde=l(O(),1);var Hz=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='718ddb3557']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","718ddb3557"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}")),document.head.appendChild(e)}var ode={"header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content","content-inner":"_41bfdbf7b6c087c2__content-inner"},nde=(0,rde.forwardRef)(function({className:t,render:o,children:r,hiddenUntilFound:n=!0,...i},s){return(0,Hz.jsx)(Vz,{ref:s,className:V(ode.content,t),hiddenUntilFound:n,...i,children:(0,Hz.jsx)(ER,{className:ode["content-inner"],render:o,children:r})})});var ide=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='b51ff41489']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","b51ff41489"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var uAe={stack:"_19ce0419607e1896__stack"},dAe={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Le=(0,ide.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},c){let u={gap:o&&dAe[o],alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return hs({render:s,ref:c,props:Br(a,{style:u,className:uAe.stack})})});var Gz=l(N(),1);var Ht="isAny",Gt="isNone",Mr="isAll",Vr="isNotAll",ln="between",cn="inThePast",Nn="over",to="is",oo="isNot",cf="lessThan",uf="greaterThan",df="lessThanOrEqual",ff="greaterThanOrEqual",mf="before",pf="after",hf="beforeInc",gf="afterInc",ll="contains",cl="notContains",ul="startsWith",bf="on",kf="notOn";var uSt={asc:(0,Gz.__)("Sort ascending"),desc:(0,Gz.__)("Sort descending")};var sde=l(xA(),1),{lock:fSt,unlock:wt}=(0,sde.__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 s0=l(O(),1),fAe=[];function Dn({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:fAe,[r,n]=(0,s0.useState)(o),[i,s]=(0,s0.useState)(!1);return(0,s0.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 mAe=Math.pow(10,8)*24*60*60*1e3,hSt=-mAe,IR=6048e5,ade=864e5;var pAe=3600;var lde=pAe*24,gSt=lde*7,hAe=lde*365.2425,gAe=hAe/12,bSt=gAe*3,Wz=Symbol.for("constructDateFrom");function Zo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Wz in e?e[Wz](t):e instanceof Date?new e.constructor(t):new Date(t)}function ft(e,t){return Zo(t||e,e)}function PR(e,t,o){let r=ft(e,o?.in);return isNaN(t)?Zo(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function RR(e,t,o){let r=ft(e,o?.in);if(isNaN(t))return Zo(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=Zo(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 bAe={};function vf(){return bAe}function Vc(e,t){let o=vf(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=ft(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 Mp(e,t){return Vc(e,{...t,weekStartsOn:1})}function OR(e,t){let o=ft(e,t?.in),r=o.getFullYear(),n=Zo(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Mp(n),s=Zo(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=Mp(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function $z(e){let t=ft(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 cde(e,...t){let o=Zo.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function Kz(e,t){let o=ft(e,t?.in);return o.setHours(0,0,0,0),o}function ude(e,t,o){let[r,n]=cde(o?.in,e,t),i=Kz(r),s=Kz(n),a=+i-$z(i),c=+s-$z(s);return Math.round((a-c)/ade)}function dde(e,t){let o=OR(e,t),r=Zo(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Mp(r)}function fde(e,t,o){return PR(e,t*7,o)}function mde(e,t,o){return RR(e,t*12,o)}function pde(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Fc(e){return!(!pde(e)&&typeof e!="number"||isNaN(+ft(e)))}function hde(e,t){let o=ft(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function AR(e,t){let o=ft(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var kAe={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"}},gde=(e,t,o)=>{let r,n=kAe[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 LR(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var vAe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yAe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_Ae={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bde={date:LR({formats:vAe,defaultWidth:"full"}),time:LR({formats:yAe,defaultWidth:"full"}),dateTime:LR({formats:_Ae,defaultWidth:"full"})};var SAe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kde=(e,t,o,r)=>SAe[e];function Nk(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 xAe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wAe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CAe={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"]},BAe={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"]},EAe={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"}},TAe={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"}},IAe=(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"},vde={ordinalNumber:IAe,era:Nk({values:xAe,defaultWidth:"wide"}),quarter:Nk({values:wAe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Nk({values:CAe,defaultWidth:"wide"}),day:Nk({values:BAe,defaultWidth:"wide"}),dayPeriod:Nk({values:EAe,defaultWidth:"wide",formattingValues:TAe,defaultFormattingWidth:"wide"})};function Dk(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)?RAe(a,f=>f.test(s)):PAe(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 PAe(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function RAe(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function yde(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 OAe=/^(\d+)(th|st|nd|rd)?/i,AAe=/\d+/i,LAe={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},NAe={any:[/^b/i,/^(a|c)/i]},DAe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},MAe={any:[/1/i,/2/i,/3/i,/4/i]},VAe={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},FAe={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]},zAe={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},jAe={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]},UAe={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},HAe={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}},_de={ordinalNumber:yde({matchPattern:OAe,parsePattern:AAe,valueCallback:e=>parseInt(e,10)}),era:Dk({matchPatterns:LAe,defaultMatchWidth:"wide",parsePatterns:NAe,defaultParseWidth:"any"}),quarter:Dk({matchPatterns:DAe,defaultMatchWidth:"wide",parsePatterns:MAe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Dk({matchPatterns:VAe,defaultMatchWidth:"wide",parsePatterns:FAe,defaultParseWidth:"any"}),day:Dk({matchPatterns:zAe,defaultMatchWidth:"wide",parsePatterns:jAe,defaultParseWidth:"any"}),dayPeriod:Dk({matchPatterns:UAe,defaultMatchWidth:"any",parsePatterns:HAe,defaultParseWidth:"any"})};var Yz={code:"en-US",formatDistance:gde,formatLong:bde,formatRelative:kde,localize:vde,match:_de,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Sde(e,t){let o=ft(e,t?.in);return ude(o,AR(o))+1}function xde(e,t){let o=ft(e,t?.in),r=+Mp(o)-+dde(o);return Math.round(r/IR)+1}function NR(e,t){let o=ft(e,t?.in),r=o.getFullYear(),n=vf(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Zo(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=Vc(s,t),c=Zo(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=Vc(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function wde(e,t){let o=vf(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=NR(e,t),i=Zo(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),Vc(i,t)}function Cde(e,t){let o=ft(e,t?.in),r=+Vc(o,t)-+wde(o,t);return Math.round(r/IR)+1}function Ye(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var zc={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return Ye(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):Ye(o+1,2)},d(e,t){return Ye(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];default:return o==="am"?"a.m.":"p.m."}},h(e,t){return Ye(e.getHours()%12||12,t.length)},H(e,t){return Ye(e.getHours(),t.length)},m(e,t){return Ye(e.getMinutes(),t.length)},s(e,t){return Ye(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return Ye(n,t.length)}};var Mk={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qz={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"});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 zc.y(e,t)},Y:function(e,t,o,r){let n=NR(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return Ye(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):Ye(i,t.length)},R:function(e,t){let o=OR(e);return Ye(o,t.length)},u:function(e,t){let o=e.getFullYear();return Ye(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 Ye(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"});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 Ye(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"});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 zc.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"});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 Ye(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"});default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let n=Cde(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):Ye(n,t.length)},I:function(e,t,o){let r=xde(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):Ye(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):zc.d(e,t)},D:function(e,t,o){let r=Sde(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):Ye(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"});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 Ye(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"});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 Ye(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"});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 Ye(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"});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"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),n;switch(r===12?n=Mk.noon:r===0?n=Mk.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"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),n;switch(r>=17?n=Mk.evening:r>=12?n=Mk.afternoon:r>=4?n=Mk.morning:n=Mk.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"});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 zc.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):zc.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):Ye(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):Ye(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):zc.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):zc.s(e,t)},S:function(e,t){return zc.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ede(r);case"XXXX":case"XX":return Vp(r);default:return Vp(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return Ede(r);case"xxxx":case"xx":return Vp(r);default:return Vp(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Bde(r,":");default:return"GMT"+Vp(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Bde(r,":");default:return"GMT"+Vp(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return Ye(r,t.length)},T:function(e,t,o){return Ye(+e,t.length)}};function Bde(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+Ye(i,2)}function Ede(e,t){return e%60===0?(e>0?"-":"+")+Ye(Math.abs(e)/60,2):Vp(e,t)}function Vp(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Ye(Math.trunc(r/60),2),i=Ye(r%60,2);return o+n+t+i}var Tde=(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"});default:return t.date({width:"full"})}},Ide=(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"});default:return t.time({width:"full"})}},GAe=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return Tde(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;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Tde(r,t)).replace("{{time}}",Ide(n,t))},Pde={p:Ide,P:GAe};var WAe=/^D+$/,$Ae=/^Y+$/,KAe=["D","DD","YY","YYYY"];function Rde(e){return WAe.test(e)}function Ode(e){return $Ae.test(e)}function Ade(e,t,o){let r=YAe(e,t,o);if(console.warn(r),KAe.includes(e))throw new RangeError(r)}function YAe(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 qAe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ZAe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,XAe=/^'([^]*?)'?$/,QAe=/''/g,JAe=/[a-zA-Z]/;function Zz(e,t,o){let r=vf(),n=o?.locale??r.locale??Yz,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=ft(e,o?.in);if(!Fc(a))throw new RangeError("Invalid time value");let c=t.match(ZAe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Pde[f];return m(d,n.formatLong)}return d}).join("").match(qAe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:eLe(d)};if(qz[f])return{isToken:!0,value:d};if(f.match(JAe))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&&Ode(f)||!o?.useAdditionalDayOfYearTokens&&Rde(f))&&Ade(f,t,String(e));let m=qz[f[0]];return m(a,f,n.localize,u)}).join("")}function eLe(e){let t=e.match(XAe);return t?t[1].replace(QAe,"'"):e}function Fp(e,t,o){return PR(e,-t,o)}function DR(e,t,o){return RR(e,-t,o)}function Lde(e,t,o){return fde(e,-t,o)}function MR(e,t,o){return mde(e,-t,o)}var de=l(N(),1),ho=l(O(),1),un=l(Wa(),1);var Xz=l(w(),1),Po={Name:(0,Xz.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,Xz.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Nde(e,t){switch(t){case"days":return Fp(new Date,e);case"weeks":return Lde(new Date,e);case"months":return DR(new Date,e);case"years":return MR(new Date,e);default:return new Date}}var Dde={label:(0,de.__)("Is none of"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Po),filter:((e,t,o)=>{if(!o?.length)return!0;let r=t.getValue({item:e});return Array.isArray(r)?!o.some(n=>r.includes(n)):typeof r=="string"?!o.includes(r):!1}),selection:"multi"},Mde=[{name:Ht,label:(0,de.__)("Includes"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Po),filter(e,t,o){if(!o?.length)return!0;let r=t.getValue({item:e});return Array.isArray(r)?o.some(n=>r.includes(n)):typeof r=="string"?o.includes(r):!1},selection:"multi"},{name:Gt,...Dde},{name:Mr,label:(0,de.__)("Includes all"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Po),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:Vr,...Dde},{name:ln,label:(0,de.__)("Between (inc)"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),Po),filter(e,t,o){if(!Array.isArray(o)||o.length!==2||o[0]===void 0||o[1]===void 0)return!0;let r=t.getValue({item:e});return typeof r=="number"||r instanceof Date||typeof r=="string"?r>=o[0]&&r<=o[1]:!1},selection:"custom"},{name:cn,label:(0,de.__)("In the past"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Po),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Nde(o.value,o.unit),n=(0,un.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Nn,label:(0,de.__)("Over"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Po),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Nde(o.value,o.unit);return(0,un.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:to,label:(0,de.__)("Is"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:oo,label:(0,de.__)("Is not"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:cf,label:(0,de.__)("Less than"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:uf,label:(0,de.__)("Greater than"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:df,label:(0,de.__)("Less than or equal"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:ff,label:(0,de.__)("Greater than or equal"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:mf,label:(0,de.__)("Before"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o);return(0,un.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:pf,label:(0,de.__)("After"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o);return(0,un.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:hf,label:(0,de.__)("Before (inc)"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o);return(0,un.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:gf,label:(0,de.__)("After (inc)"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o);return(0,un.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:ll,label:(0,de.__)("Contains"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:cl,label:(0,de.__)("Doesn't contain"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&!r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:ul,label:(0,de.__)("Starts with"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&r.toLowerCase().startsWith(String(o).toLowerCase())},selection:"single"},{name:bf,label:(0,de.__)("On"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o),n=(0,un.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:kf,label:(0,de.__)("Not on"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o),n=(0,un.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],Vde=e=>Mde.find(t=>t.name===e),Fde=()=>Mde.map(e=>e.name);var zde=l(A(),1),jde=l(O(),1);function kt(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 Ude=l(w(),1),{ValidatedCheckboxControl:tLe}=wt(zde.privateApis);function Hde({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,label:c,description:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),m=(0,jde.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,Ude.jsx)(tLe,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:kt(d,i),hidden:r,label:c,help:u,checked:s({item:o}),onChange:m,disabled:f})}var VR=l(A(),1),Gde=l(O(),1);var Qz=l(w(),1),{ValidatedComboboxControl:oLe}=wt(VR.privateApis);function FR({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,Gde.useCallback)(g=>o(u({item:e,value:g??""})),[e,o,u]),{elements:h,isLoading:p}=Dn({elements:t.elements,getElements:t.getElements});return p?(0,Qz.jsx)(VR.Spinner,{}):(0,Qz.jsx)(oLe,{required:!!t.isValid?.required,customValidity:kt(d,n),label:i,value:f,help:s,placeholder:a,options:h,onChange:m,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var UR=l(A(),1),gs=l(O(),1),jR=l(N(),1),ki=l(Wa(),1);var Fk=l(A(),1),Jz=l(O(),1),dl=l(N(),1);var Vk=l(w(),1),rLe={[cn]:[{value:"days",label:(0,dl.__)("Days")},{value:"weeks",label:(0,dl.__)("Weeks")},{value:"months",label:(0,dl.__)("Months")},{value:"years",label:(0,dl.__)("Years")}],[Nn]:[{value:"days",label:(0,dl.__)("Days ago")},{value:"weeks",label:(0,dl.__)("Weeks ago")},{value:"months",label:(0,dl.__)("Months ago")},{value:"years",label:(0,dl.__)("Years ago")}]};function zR({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=rLe[i===cn?"inThePast":"over"],{id:a,label:c,description:u,getValue:d,setValue:f}=o,m=o.isDisabled({item:t,field:o}),h=d({item:t}),{value:p="",unit:g=s[0].value}=h&&typeof h=="object"?h:{},b=(0,Jz.useCallback)(k=>r(f({item:t,value:{value:Number(k),unit:g}})),[r,f,t,g]),v=(0,Jz.useCallback)(k=>r(f({item:t,value:{value:p,unit:k}})),[r,f,t,p]);return(0,Vk.jsx)(Fk.BaseControl,{id:a,className:V(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,Vk.jsxs)(Le,{direction:"row",gap:"sm",children:[(0,Vk.jsx)(Fk.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:p,onChange:b,disabled:m}),(0,Vk.jsx)(Fk.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,dl.__)("Unit"),value:g,options:s,onChange:v,hideLabelFromVision:!0,disabled:m})]})})}var Wde=l(O(),1);function a0(e,t){let o=typeof e.min?.constraint=="string"?e.min.constraint:void 0,r=typeof e.max?.constraint=="string"?e.max.constraint:void 0,n=(0,Wde.useMemo)(()=>{let i=[];if(o){let s=t(o);s&&i.push({before:s})}if(r){let s=t(r);s&&i.push({after:s})}return i.length>0?i:void 0},[o,r,t]);return{minConstraint:o,maxConstraint:r,disabledMatchers:n}}var $de=l(Wa(),1);function l0(e){if(!e)return null;let t=(0,$de.getDate)(e);return t&&Fc(t)?t:null}var yf=l(w(),1),{DateCalendar:nLe,ValidatedInputControl:iLe}=wt(UR.privateApis),e6=e=>e?(0,ki.dateI18n)("Y-m-d\\TH:i",(0,ki.getDate)(e)):"";function sLe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,config:s}){let{compact:a}=s||{},{id:c,label:u,description:d,setValue:f,getValue:m,isValid:h}=t,p=t.isDisabled({item:e,field:t}),g=m({item:e}),b=typeof g=="string"?g:void 0,[v,k]=(0,gs.useState)(()=>l0(b)||new Date),y=(0,gs.useRef)(null),_=(0,gs.useRef)(void 0),S=(0,gs.useRef)(null),{minConstraint:C,maxConstraint:B,disabledMatchers:R}=a0(h,l0),I=(0,gs.useCallback)(H=>o(f({item:e,value:H})),[e,o,f]);(0,gs.useEffect)(()=>()=>{_.current&&clearTimeout(_.current)},[]);let E=(0,gs.useCallback)(H=>{let z;if(H){let U=(0,ki.dateI18n)("Y-m-d",H),G;b?G=(0,ki.dateI18n)("H:i",(0,ki.getDate)(b)):G=(0,ki.dateI18n)("H:i",H),z=(0,ki.getDate)(`${U}T${G}`).toISOString(),I(z),_.current&&clearTimeout(_.current)}else I(void 0);S.current=y.current&&y.current.ownerDocument.activeElement,_.current=setTimeout(()=>{y.current&&(y.current.focus(),y.current.blur(),I(z),S.current&&S.current instanceof HTMLElement&&S.current.focus())},0)},[I,b]),L=(0,gs.useCallback)(H=>{if(H){let z=(0,ki.getDate)(H);I(z.toISOString());let U=l0(z.toISOString());U&&k(U)}else I(void 0)},[I]),{format:T}=t,P=T.weekStartsOn??(0,ki.getSettings)().l10n.startOfWeek,{timezone:{string:D}}=(0,ki.getSettings)(),j=u;return h?.required&&!n&&!r?j=`${u} (${(0,jR.__)("Required")})`:!h?.required&&n&&!r&&(j=`${u} (${(0,jR.__)("Optional")})`),(0,yf.jsx)(UR.BaseControl,{id:c,label:j,help:d,hideLabelFromVision:r,children:(0,yf.jsxs)(Le,{direction:"column",gap:"lg",children:[(0,yf.jsx)(iLe,{ref:y,__next40pxDefaultSize:!0,required:!!h?.required,customValidity:kt(h,i),type:"datetime-local",label:(0,jR.__)("Date time"),hideLabelFromVision:!0,value:e6(b),onChange:L,disabled:p,min:C?e6(C):void 0,max:B?e6(B):void 0}),!a&&(0,yf.jsx)(nLe,{style:{width:"100%"},selected:b&&l0(b)||void 0,onSelect:E,month:v,onMonthChange:k,timeZone:D||void 0,weekStartsOn:P,disabled:p||R})]})})}function Kde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s,config:a}){return i===cn||i===Nn?(0,yf.jsx)(zR,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,yf.jsx)(sLe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,config:a})}var zr=l(A(),1),st=l(O(),1),Xo=l(N(),1),Fr=l(Wa(),1);var vt=l(w(),1),{DateCalendar:aLe,DateRangeCalendar:lLe}=wt(zr.privateApis),cLe=[{id:"today",label:(0,Xo.__)("Today"),getValue:()=>(0,Fr.getDate)(null)},{id:"yesterday",label:(0,Xo.__)("Yesterday"),getValue:()=>{let e=(0,Fr.getDate)(null);return Fp(e,1)}},{id:"past-week",label:(0,Xo.__)("Past week"),getValue:()=>{let e=(0,Fr.getDate)(null);return Fp(e,7)}},{id:"past-month",label:(0,Xo.__)("Past month"),getValue:()=>{let e=(0,Fr.getDate)(null);return DR(e,1)}}],uLe=[{id:"last-7-days",label:(0,Xo.__)("Last 7 days"),getValue:()=>{let e=(0,Fr.getDate)(null);return[Fp(e,7),e]}},{id:"last-30-days",label:(0,Xo.__)("Last 30 days"),getValue:()=>{let e=(0,Fr.getDate)(null);return[Fp(e,30),e]}},{id:"month-to-date",label:(0,Xo.__)("Month to date"),getValue:()=>{let e=(0,Fr.getDate)(null);return[hde(e),e]}},{id:"last-year",label:(0,Xo.__)("Last year"),getValue:()=>{let e=(0,Fr.getDate)(null);return[MR(e,1),e]}},{id:"year-to-date",label:(0,Xo.__)("Year to date"),getValue:()=>{let e=(0,Fr.getDate)(null);return[AR(e),e]}}],_f=e=>{if(!e)return null;let t=(0,Fr.getDate)(e);return t&&Fc(t)?t:null},t6=e=>e?typeof e=="string"?e:Zz(e,"yyyy-MM-dd"):"";function Yde({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,st.useState)(void 0),u=(0,st.useCallback)(()=>{let f=Array.isArray(o)?o:[o];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[o]);return(0,st.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=t?kt(s,t):void 0;for(let h of f){let p=h.current;p&&p.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[o,s,t]),(0,st.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=h=>{h.preventDefault(),n(!0)};for(let h of f)h.current?.addEventListener("invalid",m);return()=>{for(let h of f)h.current?.removeEventListener("invalid",m)}},[o,n]),(0,st.useEffect)(()=>{if(!r)return;let f=t?kt(s,t):void 0;f?c(f):u()},[r,s,t,u]),(0,vt.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,vt.jsx)("div",{"aria-live":"polite",children:a&&(0,vt.jsxs)("p",{className:V("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,vt.jsx)(zr.Icon,{className:"components-validated-control__indicator-icon",icon:Zf,size:16,fill:"currentColor"}),a.message]})})]})}function dLe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:c,setValue:u,getValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),[p,g]=(0,st.useState)(null),b=m.weekStartsOn??(0,Fr.getSettings)().l10n.startOfWeek,v=d({item:e}),k=typeof v=="string"?v:void 0,[y,_]=(0,st.useState)(()=>_f(k)||new Date),[S,C]=(0,st.useState)(!1),B=(0,st.useRef)(null),{minConstraint:R,maxConstraint:I,disabledMatchers:E}=a0(f,_f),L=(0,st.useCallback)(z=>o(u({item:e,value:z})),[e,o,u]),T=(0,st.useCallback)(z=>{let U=z?Zz(z,"yyyy-MM-dd"):void 0;L(U),g(null),C(!0)},[L]),P=(0,st.useCallback)(z=>{let U=z.getValue(),G=t6(U);_(U),L(G),g(z.id),C(!0)},[L]),D=(0,st.useCallback)(z=>{if(L(z),z){let U=_f(z);U&&_(U)}g(null),C(!0)},[L]),{timezone:{string:j}}=(0,Fr.getSettings)(),H=a;return f?.required&&!n?H=`${a} (${(0,Xo.__)("Required")})`:!f?.required&&n&&(H=`${a} (${(0,Xo.__)("Optional")})`),(0,vt.jsx)(Yde,{field:t,validity:i,inputRefs:B,isTouched:S,setIsTouched:C,children:(0,vt.jsx)(zr.BaseControl,{id:s,className:"dataviews-controls__date",label:H,help:c,hideLabelFromVision:r,children:(0,vt.jsxs)(Le,{direction:"column",gap:"lg",children:[(0,vt.jsxs)(Le,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[cLe.map(z=>{let U=p===z.id;return(0,vt.jsx)(zr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:U,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>P(z),children:z.label},z.id)}),(0,vt.jsx)(zr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!p,size:"small",disabled:!!p||h,accessibleWhenDisabled:!0,children:(0,Xo.__)("Custom")})]}),(0,vt.jsx)(zr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:B,type:"date",label:(0,Xo.__)("Date"),hideLabelFromVision:!0,value:k,onChange:D,required:!!t.isValid?.required,disabled:h,min:R,max:I}),(0,vt.jsx)(aLe,{style:{width:"100%"},selected:k&&_f(k)||void 0,onSelect:T,month:y,onMonthChange:_,timeZone:j||void 0,weekStartsOn:b,disabled:h||E,disableNavigation:h})]})})})}function fLe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:c,getValue:u,setValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),p,g=u({item:e});Array.isArray(g)&&g.length===2&&g.every(W=>typeof W=="string")&&(p=g);let b=m.weekStartsOn??(0,Fr.getSettings)().l10n.startOfWeek,{minConstraint:v,maxConstraint:k,disabledMatchers:y}=a0(f,_f),_=(0,st.useCallback)(W=>{o(d({item:e,value:W}))},[e,o,d]),[S,C]=(0,st.useState)(null),B=(0,st.useMemo)(()=>{if(!p)return{from:void 0,to:void 0};let[W,J]=p;return{from:_f(W)||void 0,to:_f(J)||void 0}},[p]),[R,I]=(0,st.useState)(()=>B.from||new Date),[E,L]=(0,st.useState)(!1),T=(0,st.useRef)(null),P=(0,st.useRef)(null),D=(0,st.useCallback)((W,J)=>{W&&J?_([t6(W),t6(J)]):!W&&!J&&_(void 0)},[_]),j=(0,st.useCallback)(W=>{D(W?.from,W?.to),C(null),L(!0)},[D]),H=(0,st.useCallback)(W=>{let[J,ce]=W.getValue();I(J),D(J,ce),C(W.id),L(!0)},[D]),z=(0,st.useCallback)((W,J)=>{let[ce,te]=p||[void 0,void 0];if(D(W==="from"?J:ce,W==="to"?J:te),J){let q=_f(J);q&&I(q)}C(null),L(!0)},[p,D]),{timezone:U}=(0,Fr.getSettings)(),G=a;return t.isValid?.required&&!n?G=`${a} (${(0,Xo.__)("Required")})`:!t.isValid?.required&&n&&(G=`${a} (${(0,Xo.__)("Optional")})`),(0,vt.jsx)(Yde,{field:t,validity:i,inputRefs:[T,P],isTouched:E,setIsTouched:L,children:(0,vt.jsx)(zr.BaseControl,{id:s,className:"dataviews-controls__date",label:G,help:c,hideLabelFromVision:r,children:(0,vt.jsxs)(Le,{direction:"column",gap:"lg",children:[(0,vt.jsxs)(Le,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[uLe.map(W=>{let J=S===W.id;return(0,vt.jsx)(zr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:J,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>H(W),children:W.label},W.id)}),(0,vt.jsx)(zr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!S,size:"small",accessibleWhenDisabled:!0,disabled:!!S||h,children:(0,Xo.__)("Custom")})]}),(0,vt.jsxs)(Le,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,vt.jsx)(zr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:T,type:"date",label:(0,Xo.__)("From"),hideLabelFromVision:!0,value:p?.[0],onChange:W=>z("from",W),required:!!t.isValid?.required,disabled:h,min:v,max:k}),(0,vt.jsx)(zr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:P,type:"date",label:(0,Xo.__)("To"),hideLabelFromVision:!0,value:p?.[1],onChange:W=>z("to",W),required:!!t.isValid?.required,disabled:h,min:v,max:k})]}),(0,vt.jsx)(lLe,{style:{width:"100%"},selected:B,onSelect:j,month:R,onMonthChange:I,timeZone:U.string||void 0,weekStartsOn:b,disabled:h||y})]})})})}function qde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===cn||i===Nn?(0,vt.jsx)(zR,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===ln?(0,vt.jsx)(fLe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,vt.jsx)(dLe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var HR=l(A(),1),Zde=l(O(),1);var o6=l(w(),1),{ValidatedSelectControl:mLe}=wt(HR.privateApis);function GR({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{type:s,label:a,description:c,getValue:u,setValue:d,isValid:f}=t,m=t.isDisabled({item:e,field:t}),h=s==="array",p=u({item:e})??(h?[]:""),g=(0,Zde.useCallback)(k=>o(d({item:e,value:k})),[e,o,d]),{elements:b,isLoading:v}=Dn({elements:t.elements,getElements:t.getElements});return v?(0,o6.jsx)(HR.Spinner,{}):(0,o6.jsx)(mLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:kt(f,i),label:a,value:p,help:c,options:b,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:h,disabled:m})}var r6=l(w(),1),pLe=10;function Xde(e){let{field:t}=e,{elements:o}=Dn({elements:t.elements,getElements:t.getElements});return o.length>=pLe?(0,r6.jsx)(FR,{...e}):(0,r6.jsx)(GR,{...e})}var $R=l(A(),1);var Qde=l(A(),1),Jde=l(O(),1);var efe=l(w(),1),{ValidatedInputControl:hLe}=wt(Qde.privateApis);function fl({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,type:i,prefix:s,suffix:a,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:p}=t,g=m({item:e}),b=t.isDisabled({item:e,field:t}),v=(0,Jde.useCallback)(k=>o(h({item:e,value:k})),[e,h,o]);return(0,efe.jsx)(hLe,{required:!!p.required,markWhenOptional:n,customValidity:kt(p,c),label:u,placeholder:d,value:g??"",help:f,onChange:v,hideLabelFromVision:r,type:i,prefix:s,suffix:a,disabled:b,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 WR=l(w(),1);function tfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,WR.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,WR.jsx)($R.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,WR.jsx)($R.Icon,{icon:pL})})})}var YR=l(A(),1);var KR=l(w(),1);function ofe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,KR.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,KR.jsx)(YR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,KR.jsx)(YR.Icon,{icon:Rv})})})}var ZR=l(A(),1);var qR=l(w(),1);function rfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,qR.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,qR.jsx)(ZR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,qR.jsx)(ZR.Icon,{icon:bn})})})}var jc=l(A(),1),c0=l(O(),1),XR=l(N(),1);var Sf=l(w(),1),{ValidatedNumberControl:gLe}=wt(jc.privateApis);function nfe(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function bLe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,c0.useCallback)(c=>t([nfe(c),i]),[t,i]),a=(0,c0.useCallback)(c=>t([n,nfe(c)]),[t,n]);return(0,Sf.jsx)(jc.BaseControl,{help:(0,XR.__)("The max. value must be greater than the min. value."),children:(0,Sf.jsxs)(jc.Flex,{direction:"row",gap:4,children:[(0,Sf.jsx)(jc.__experimentalNumberControl,{label:(0,XR.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,Sf.jsx)(jc.__experimentalNumberControl,{label:(0,XR.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function QR({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){let a=t.format?.decimals??0,c=Math.pow(10,Math.abs(a)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,p=f({item:e})??"",g=t.isDisabled({item:e,field:t}),b=(0,c0.useCallback)(k=>{o(m({item:e,value:["",void 0].includes(k)?void 0:Number(k)}))},[e,o,m]),v=(0,c0.useCallback)(k=>{o(m({item:e,value:k}))},[e,o,m]);if(i===ln){let k=["",""];return Array.isArray(p)&&p.length===2&&p.every(y=>typeof y=="number"||y==="")&&(k=p),(0,Sf.jsx)(bLe,{value:k,onChange:v,hideLabelFromVision:r,step:c})}return(0,Sf.jsx)(gLe,{required:!!h.required,markWhenOptional:n,customValidity:kt(h,s),label:u,help:d,value:p,onChange:b,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0,disabled:g})}var ife=l(w(),1);function sfe(e){return(0,ife.jsx)(QR,{...e})}var afe=l(w(),1);function lfe(e){return(0,afe.jsx)(QR,{...e})}var JR=l(A(),1),cfe=l(O(),1);var n6=l(w(),1),{ValidatedRadioControl:kLe}=wt(JR.privateApis);function ufe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),{elements:m,isLoading:h}=Dn({elements:t.elements,getElements:t.getElements}),p=c({item:e}),g=(0,cfe.useCallback)(b=>o(u({item:e,value:b})),[e,o,u]);return h?(0,n6.jsx)(JR.Spinner,{}):(0,n6.jsx)(kLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:kt(d,i),label:s,help:a,onChange:g,options:m,selected:p,hideLabelFromVision:r,disabled:f})}var i6=l(O(),1);var dfe=l(w(),1);function ffe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:c}=i||{};return(0,dfe.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,i6.createElement)(a):void 0,suffix:c?(0,i6.createElement)(c):void 0})}var mfe=l(A(),1),pfe=l(O(),1);var hfe=l(w(),1),{ValidatedToggleControl:vLe}=wt(mfe.privateApis);function gfe({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),m=(0,pfe.useCallback)(()=>{t(u({item:o,value:!c({item:o})}))},[t,u,o,c]);return(0,hfe.jsx)(vLe,{required:!!d.required,markWhenOptional:n,customValidity:kt(d,i),hidden:r,label:s,help:a,checked:c({item:o}),onChange:m,disabled:f})}var bfe=l(A(),1),kfe=l(O(),1);var vfe=l(w(),1),{ValidatedTextareaControl:yLe}=wt(bfe.privateApis);function yfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},c=t.isDisabled({item:e,field:t}),{label:u,placeholder:d,description:f,setValue:m,isValid:h}=t,p=t.getValue({item:e}),g=(0,kfe.useCallback)(b=>o(m({item:e,value:b})),[e,o,m]);return(0,vfe.jsx)(yLe,{required:!!h.required,markWhenOptional:n,customValidity:kt(h,s),label:u,placeholder:d,value:p??"",help:f,onChange:g,rows:a,disabled:c,minLength:h.minLength?h.minLength.constraint:void 0,maxLength:h.maxLength?h.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var zk=l(A(),1),_fe=l(O(),1);var eO=l(w(),1),{ValidatedToggleGroupControl:_Le}=wt(zk.privateApis);function Sfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:c}=t,u=t.isDisabled({item:e,field:t}),d=s({item:e}),f=(0,_fe.useCallback)(g=>o(a({item:e,value:g})),[e,o,a]),{elements:m,isLoading:h}=Dn({elements:t.elements,getElements:t.getElements});if(h)return(0,eO.jsx)(zk.Spinner,{});if(m.length===0)return null;let p=m.find(g=>g.value===d);return(0,eO.jsx)(_Le,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:kt(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:p?.description||t.description,onChange:f,value:d,hideLabelFromVision:r,children:m.map(g=>(0,eO.jsx)(zk.__experimentalToggleGroupControlOption,{label:g.label,value:g.value,disabled:u},g.value))})}var tO=l(A(),1),oO=l(O(),1);var u0=l(w(),1),{ValidatedFormTokenField:SLe}=wt(tO.privateApis);function xfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e}),m=t.isDisabled({item:e,field:t}),{elements:h,isLoading:p}=Dn({elements:t.elements,getElements:t.getElements}),g=(0,oO.useMemo)(()=>Array.isArray(f)?f.map(v=>h?.find(y=>y.value===v)||{value:v,label:v}):[],[f,h]),b=(0,oO.useCallback)(v=>{let k=v.map(y=>typeof y=="object"&&"value"in y?y.value:y);o(u({item:e,value:k}))},[o,u,e]);return p?(0,u0.jsx)(tO.Spinner,{}):(0,u0.jsx)(SLe,{required:!!d?.required,markWhenOptional:n,customValidity:kt(d,i),label:r?void 0:s,value:g,onChange:b,placeholder:a,suggestions:h?.map(v=>v.value),disabled:m,__experimentalValidateInput:v=>t.isValid?.elements&&h?h.some(k=>k.value===v||k.label===v):!0,__experimentalExpandOnFocus:h&&h.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:v=>typeof v=="object"&&"label"in v?v.label:typeof v=="string"&&h&&h.find(y=>y.value===v)?.label||v,__experimentalRenderItem:({item:v})=>{if(typeof v=="string"&&h){let k=h.find(y=>y.value===v);return(0,u0.jsx)("span",{children:k?.label||v})}return(0,u0.jsx)("span",{children:v})}})}var Mn=l(A(),1),s6=l(O(),1),wfe=l(N(),1);var Uc=l(w(),1),{ValidatedInputControl:xLe}=wt(Mn.privateApis),wLe=({color:e,onColorChange:t,disabled:o})=>{let r=e&&Et(e).isValid()?e:"#ffffff";return(0,Uc.jsx)(Mn.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,Uc.jsx)(Mn.Button,{onClick:n,"aria-label":(0,wfe.__)("Open color picker"),size:"small",disabled:o,accessibleWhenDisabled:!0,icon:()=>(0,Uc.jsx)(Mn.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,Uc.jsx)(Mn.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Uc.jsx)(Mn.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function Cfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),m=t.getValue({item:e})||"",h=(0,s6.useCallback)(g=>{o(u({item:e,value:g}))},[e,o,u]),p=(0,s6.useCallback)(g=>{o(u({item:e,value:g||""}))},[e,o,u]);return(0,Uc.jsx)(xLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:kt(d,i),label:s,placeholder:a,value:m,help:c,onChange:p,hideLabelFromVision:r,type:"text",disabled:f,prefix:(0,Uc.jsx)(Mn.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Uc.jsx)(wLe,{color:m,onColorChange:h,disabled:f})})})}var nO=l(A(),1),iO=l(O(),1),a6=l(N(),1);var rO=l(w(),1);function Bfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,iO.useState)(!1),c=t.isDisabled({item:e,field:t}),u=(0,iO.useCallback)(()=>{a(d=>!d)},[]);return(0,rO.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,rO.jsx)(nO.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,rO.jsx)(nO.Button,{icon:s?Es:em,onClick:u,size:"small",label:s?(0,a6.__)("Hide password"):(0,a6.__)("Show password"),disabled:c,accessibleWhenDisabled:!0})})})}function sO(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var Tfe=l(w(),1),Efe={adaptiveSelect:Xde,array:xfe,checkbox:Hde,color:Cfe,combobox:FR,datetime:Kde,date:qde,email:tfe,telephone:ofe,url:rfe,integer:sfe,number:lfe,password:Bfe,radio:ufe,select:GR,text:ffe,toggle:gfe,textarea:yfe,toggleGroup:Sfe};function CLe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function BLe(e){let{control:t,...o}=e,r=aO(t);return r===null?null:function(i){return(0,Tfe.jsx)(r,{...i,config:o})}}function Ife(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?aO(e.Edit):CLe(e.Edit)?BLe(e.Edit):sO(e)&&e.type!=="array"?aO("adaptiveSelect"):t===null?null:aO(t)}function aO(e){return Object.keys(Efe).includes(e)?Efe[e]:null}function ELe(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 Pfe=ELe;var TLe=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},Rfe=TLe;var ILe=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},Ofe=ILe;var Lfe=l(N(),1);function lO({item:e,field:t}){let{elements:o,isLoading:r}=Dn({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 Afe=l(w(),1);function go({item:e,field:t}){return t.hasElements?(0,Afe.jsx)(lO,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var ml=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function bo(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function pl(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 hl(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 gl(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let o=new RegExp(t.isValid.pattern.constraint),r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:o.test(String(r))}catch{return!1}}function Ct(e,t){let r=(t.elements??[]).map(i=>i.value);if(r.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>r.includes(i))}function PLe({item:e,field:t}){return t.getValue({item:e})}var dn=PLe;var RLe=/^[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 OLe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!RLe.test(o)?(0,Lfe.__)("Value must be a valid email address."):null}var Nfe={type:"email",render:go,Edit:"email",sort:ml,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,ll,cl,ul,Ht,Gt,Mr,Vr],format:{},getValueFormatted:dn,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct,custom:OLe}};var Dfe=l(N(),1);var jk=(e,t,o)=>o==="asc"?e-t:t-e;function cO(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 uO(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:Number(o)<=t.isValid.max.constraint}var Mfe={separatorThousand:","};function ALe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="integer"?r=Mfe:r=t.format;let{separatorThousand:n}=r,i=Math.trunc(o);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function LLe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,Dfe.__)("Value must be an integer."):null}var Vfe={type:"integer",render:go,Edit:"integer",sort:jk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[to,oo,cf,uf,df,ff,ln],validOperators:[to,oo,cf,uf,df,ff,ln,Ht,Gt,Mr,Vr],format:Mfe,getValueFormatted:ALe,validate:{required:bo,min:cO,max:uO,elements:Ct,custom:LLe}};var Ffe=l(N(),1);var zfe={separatorThousand:",",separatorDecimal:".",decimals:2};function NLe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="number"?r=zfe:r=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=r,a=o.toFixed(s),[c,u]=a.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return s===0?d:d+i+u}function DLe(e){return e===""||e===void 0||e===null}function MLe(e,t){let o=t.getValue({item:e});return!DLe(o)&&!Number.isFinite(o)?(0,Ffe.__)("Value must be a number."):null}var jfe={type:"number",render:go,Edit:"number",sort:jk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[to,oo,cf,uf,df,ff,ln],validOperators:[to,oo,cf,uf,df,ff,ln,Ht,Gt,Mr,Vr],format:zfe,getValueFormatted:NLe,validate:{required:bo,min:cO,max:uO,elements:Ct,custom:MLe}};var Ufe={type:"text",render:go,Edit:"text",sort:ml,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,ll,cl,ul,Ht,Gt,Mr,Vr],format:{},getValueFormatted:dn,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct}};var zp=l(Wa(),1);var Gfe=l(Wa(),1);function Hfe(e){if(!e||!Fc(new Date(e)))return null;let t=(0,Gfe.getDate)(e);return t&&Fc(t)?t:null}function Wfe(e,t,o){let r=t.isValid[o]?.constraint;if(typeof r!="string")return!1;let n=t.getValue({item:e}),i=Array.isArray(n)?n[o==="min"?0:n.length-1]:n;if(i==null||i==="")return!0;let s=Hfe(r),a=Hfe(String(i));return!!s&&!!a&&(o==="min"?a.getTime()>=s.getTime():a.getTime()<=s.getTime())}function dO(e,t){return Wfe(e,t,"min")}function fO(e,t){return Wfe(e,t,"max")}var $fe={datetime:(0,zp.getSettings)().formats.datetime,weekStartsOn:(0,zp.getSettings)().l10n.startOfWeek};function VLe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=$fe:r=t.format,(0,zp.dateI18n)(r.datetime,(0,zp.getDate)(o))}var FLe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Kfe={type:"datetime",render:go,Edit:"datetime",sort:FLe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[bf,kf,mf,pf,hf,gf,cn,Nn],validOperators:[bf,kf,mf,pf,hf,gf,cn,Nn],format:$fe,getValueFormatted:VLe,validate:{required:bo,elements:Ct,min:dO,max:fO}};var jp=l(Wa(),1);var Yfe={date:(0,jp.getSettings)().formats.date,weekStartsOn:(0,jp.getSettings)().l10n.startOfWeek};function zLe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=Yfe:r=t.format,(0,jp.dateI18n)(r.date,(0,jp.getDate)(o))}var jLe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},qfe={type:"date",render:go,Edit:"date",sort:jLe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[bf,kf,mf,pf,hf,gf,cn,Nn,ln],validOperators:[bf,kf,mf,pf,hf,gf,cn,Nn,ln],format:Yfe,getValueFormatted:zLe,validate:{required:bo,elements:Ct,min:dO,max:fO}};var mO=l(N(),1);function Zfe(e,t){return t.getValue({item:e})===!0}function ULe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,mO.__)("True"):o===!1?(0,mO.__)("False"):""}function HLe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,mO.__)("Value must be true, false, or undefined"):null}var GLe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},Xfe={type:"boolean",render:go,Edit:"checkbox",sort:GLe,validate:{required:Zfe,elements:Ct,custom:HLe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[to,oo],validOperators:[to,oo],format:{},getValueFormatted:ULe};var Qfe={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:dn,validate:{}};var l6=l(N(),1);function Jfe(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function eme({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function WLe({item:e,field:t}){return eme({item:e,field:t})}function $Le(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,l6.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,l6.__)("Every value must be a string.")}var KLe=(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)},tme={type:"array",render:WLe,Edit:"array",sort:KLe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[Ht,Gt,Mr,Vr],format:{},getValueFormatted:eme,validate:{required:Jfe,elements:Ct,custom:$Le}};function YLe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var ome={type:"password",render:go,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:YLe,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct}};var rme={type:"telephone",render:go,Edit:"telephone",sort:ml,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,ll,cl,ul,Ht,Gt,Mr,Vr],format:{},getValueFormatted:dn,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct}};var nme=l(N(),1);var Uk=l(w(),1);function qLe({item:e,field:t}){if(t.hasElements)return(0,Uk.jsx)(lO,{item:e,field:t});let o=dn({item:e,field:t});return!o||!Et(o).isValid()?o:(0,Uk.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Uk.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,Uk.jsx)("span",{children:o})]})}function ZLe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Et(o).isValid()?(0,nme.__)("Value must be a valid color."):null}var XLe=(e,t,o)=>{let r=Et(e),n=Et(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},ime={type:"color",render:qLe,Edit:"color",sort:XLe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,Ht,Gt],format:{},getValueFormatted:dn,validate:{required:bo,elements:Ct,custom:ZLe}};var sme={type:"url",render:go,Edit:"url",sort:ml,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,ll,cl,ul,Ht,Gt,Mr,Vr],format:{},getValueFormatted:dn,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct}};var QLe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?jk(e,t,o):ml(e,t,o),ame={render:go,Edit:null,sort:QLe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[to,oo],validOperators:Fde(),format:{},getValueFormatted:dn,validate:{required:bo,elements:Ct}};function JLe(e){return e==="integer"||e==="number"}function eNe(e){return e==="date"||e==="datetime"}function lme(e,t,o){let r=t.validate[o];if(r&&(typeof e=="number"&&JLe(t.type)||typeof e=="string"&&eNe(t.type)))return{constraint:e,validate:r}}function cme(e,t){let o=e.isValid,r;o?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let n;(o?.elements===!0||o?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(n={constraint:!0,validate:t.validate.elements});let i=lme(o?.min,t,"min"),s=lme(o?.max,t,"max"),a=o?.minLength,c;typeof a=="number"&&t.validate.minLength!==void 0&&(c={constraint:a,validate:t.validate.minLength});let u=o?.maxLength,d;typeof u=="number"&&t.validate.maxLength!==void 0&&(d={constraint:u,validate:t.validate.maxLength});let f=o?.pattern,m;f!==void 0&&t.validate.pattern!==void 0&&(m={constraint:f,validate:t.validate.pattern});let h=o?.custom??t.validate.custom;return{required:r,elements:n,min:i,max:s,minLength:c,maxLength:d,pattern:m,custom:h}}function ume(e){return e.validOperators.reduce((t,o)=>{let r=Vde(o);return r?.filter&&(t[o]=r.filter),t},{})}function tNe(e,t){return{...t.format,...e.format}}var dme=tNe;function oNe(e){let t=[Nfe,Vfe,jfe,Ufe,Kfe,qfe,Xfe,Qfe,tme,ome,rme,ime,sme].find(o=>o?.type===e);return t||ame}function d0(e){return e.map(t=>{let o=oNe(t.type),r=t.getValue||Rfe(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||Ofe(t.id),elements:t.elements,getElements:t.getElements,hasElements:sO(t),isVisible:t.isVisible,isDisabled:typeof t.isDisabled=="function"?t.isDisabled:()=>!!t.isDisabled,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:Ife(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:cme(t,o),filterBy:Pfe(t,o.defaultOperators,o.validOperators),filter:ume(o),format:dme(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var m6=l(O(),1);var fme=l(O(),1),mme=l(w(),1),c6=(0,fme.createContext)({fields:[]});c6.displayName="DataFormContext";function pme({fields:e,children:t}){return(0,mme.jsx)(c6.Provider,{value:{fields:e},children:t})}var bs=c6;var xO=l(O(),1);var hO=l(O(),1),m0=l(A(),1);var f0=l(N(),1),jr={type:"regular",labelPosition:"top"},rNe=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 hme(e){let t=jr;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],n=e?.openAs,i;typeof n=="object"&&n.type==="modal"?i={type:"modal",applyLabel:n.applyLabel?.trim()||(0,f0.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,f0.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,f0.__)("Apply"),cancelLabel:(0,f0.__)("Cancel")}:i={type:"dropdown"},t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:i,summary:r,editVisibility:e?.editVisibility??"on-hover"}}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:rNe(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 gme(e){let t=hme(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?hme(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:gme({fields:r.children,layout:jr}).fields}}});return{layout:t,fields:o}}var pO=gme;var Wt=l(w(),1);function nNe({title:e}){return(0,Wt.jsx)(Le,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Wt.jsx)(Le,{direction:"row",align:"center",children:(0,Wt.jsx)(m0.__experimentalHeading,{level:2,size:13,children:e})})})}function bme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,hO.useContext)(bs),a=t.layout,c=(0,hO.useMemo)(()=>({layout:jr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Wt.jsxs)(Wt.Fragment,{children:[!r&&t.label&&(0,Wt.jsx)(nNe,{title:t.label}),(0,Wt.jsx)(Vn,{data:e,form:c,onChange:o,validity:i?.children})]});let u=a.labelPosition,d=s.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,Wt.jsxs)(Le,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Wt.jsx)("div",{className:V("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,Wt.jsx)(m0.BaseControl.VisualLabel,{children:d.label})}),(0,Wt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,Wt.jsx)(d.render,{item:e,field:d}):(0,Wt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,Wt.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,Wt.jsx)(Wt.Fragment,{children:(0,Wt.jsxs)(Wt.Fragment,{children:[!r&&u!=="none"&&(0,Wt.jsx)(m0.BaseControl.VisualLabel,{children:d.label}),(0,Wt.jsx)(d.render,{item:e,field:d})]})}):(0,Wt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var d6=l(R3(),1),Up=l(A(),1),fa=l(O(),1),vO=l(Q(),1);var Gk=l(A(),1),Hk=l(N(),1);var Sme=l(Q(),1),xme=l(O(),1);function iNe(e,t){return V("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var kme=iNe;var gO=l(A(),1);var p0=l(w(),1);function sNe(e,t,o){return e?(0,p0.jsx)(gO.Tooltip,{text:t,placement:"top",children:(0,p0.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,p0.jsx)(gO.Icon,{icon:Zf,size:16}),o]})}):o}var vme=sNe;function yme(e){if(!e)return;let t=Object.keys(e).filter(o=>o!=="children");for(let o of t){let r=e[o];if(r!==void 0&&r.type==="invalid")return r.message?r.message:o==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let o of Object.values(e.children)){let r=yme(o);if(r)return r}}var _me=yme;var vi=l(w(),1);function h0({data:e,field:t,fieldLabel:o,summaryFields:r,validity:n,touched:i,disabled:s,onClick:a,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=_me(n),m=i&&!!f,h=kme(u,m),p=vme(m,f,o),g=V("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":s,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),b=(0,Sme.useInstanceId)(h0,"dataforms-layouts-panel__field-control"),v=m?(0,Hk.sprintf)((0,Hk._x)("Edit %s (has errors)","field"),o||""):(0,Hk.sprintf)((0,Hk._x)("Edit %s","field"),o||""),k=(0,xme.useRef)(null);return(0,vi.jsxs)("div",{ref:k,className:g,onClick:s?void 0:()=>{let S=k.current?.ownerDocument.defaultView?.getSelection();S&&S.toString().length>0||a()},onKeyDown:s?void 0:S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),a())},children:[u!=="none"&&(0,vi.jsx)("span",{className:h,children:p}),u==="none"&&m&&(0,vi.jsx)(Gk.Tooltip,{text:f,placement:"top",children:(0,vi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,vi.jsx)(Gk.Icon,{icon:Zf,size:16})})}),(0,vi.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,vi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(S=>(0,vi.jsx)("span",{style:{width:"100%"},children:(0,vi.jsx)(S.render,{item:e,field:S})},S.id))}):r.map(S=>(0,vi.jsx)(S.render,{item:e,field:S},S.id))}),!s&&(0,vi.jsx)(Gk.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:v,icon:Jf,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var wme=l(R3(),1),u6=l(zf(),1),bl=l(O(),1),fn=l(N(),1);function Cme(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?Cme(r):r.type!=="invalid"&&r.type!=="validating")):!0}function aNe(e,t){let o=pO(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]=d0([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]=d0([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function Wk(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[a]={...n[a]},n=n[a]}let i=o[o.length-1];return n[i]={...n[i]||{},...t},r}function Bme(e,t,o){if(!e||t.length===0)return e;let r={...e},n=r;for(let a=0;a<t.length-1;a++){let c=t[a];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let s={...n[i]};if(delete s[o],Object.keys(s).length===0?delete n[i]:n[i]=s,Object.keys(r).length!==0)return r}function lNe(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=>Wk(u,{elements:{type:"invalid",message:(0,fn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>Wk(u,{elements:{type:"invalid",message:(0,fn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>Bme(u,[...i,t.id],"elements"))}}).catch(c=>{if(a!==r.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,fn.__)("Unknown error when running elements validation asynchronously."),n(d=>Wk(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function cNe(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=>Bme(c,[...i,t.id],"custom"));return}if(typeof a=="string"){n(c=>Wk(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>Wk(c,{custom:{type:"invalid",message:(0,fn.__)("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,fn.__)("Unknown error when running custom validation asynchronously."),n(u=>Wk(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function Eme(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,fn.__)("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,fn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,fn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,fn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,fn.__)("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,fn.__)("Value must be one of the elements.")}};let r;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});r=t.field.isValid.custom((0,wme.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let s;return i instanceof Error?s=i.message:s=String(i)||(0,fn.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:s}}}if(typeof r=="string")return{custom:{type:"invalid",message:r}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(lNe(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,fn.__)("Validating\u2026")}),r instanceof Promise&&(cNe(r,t,o),n.custom={type:"validating",message:(0,fn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=Eme(e,a,{...o,path:[...o.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([a,c])=>{c!==void 0&&(s[a]=c)}),Object.keys(s).length===0?void 0:{children:s}}}function Tme(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>Tme(n,t));return r?{value:o,children:r}:o}function uNe(e,t,o){let[r,n]=(0,bl.useState)(),i=(0,bl.useRef)({}),s=(0,bl.useRef)({}),a=(0,bl.useRef)({}),c=(0,bl.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=aNe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let p=Tme(h,e);if(a.current.hasOwnProperty(h.id)&&(0,u6.default)(a.current[h.id],p)){m.push(h.id);return}a.current[h.id]=p;let g=Eme(e,h,u);g!==void 0&&(f[h.id]=g)}),n(h=>{let p={...h,...f},g=[...m,...Object.keys(f)];return Object.keys(p).forEach(v=>{p&&!g.includes(v)&&delete p[v]}),Object.keys(p).length===0&&(p=void 0),(0,u6.default)(h,p)?h:p})},[e,t,o]);return(0,bl.useEffect)(()=>{c()},[c]),{validity:r,isValid:Cme(r)}}var Ime=uNe;var Pme=l(O(),1);function xf(e,t){(0,Pme.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var Rme=l(O(),1);function dNe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var bO=(e,t)=>Array.isArray(e)&&e.length>0?dNe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var fNe=(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})};function mNe(e){let{fields:t}=(0,Rme.useContext)(bs),o=e.layout,r=bO(o.summary,t),n=fNe(e,t),i=e.children?e.label:n?.label;return r.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:r,fieldDefinition:n,fieldLabel:i}}var kO=mNe;var mn=l(w(),1);function pNe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n,touched:i}){let{openAs:s}=t.layout,{applyLabel:a,cancelLabel:c}=s,{fields:u}=(0,fa.useContext)(bs),[d,f]=(0,fa.useState)({}),m=(0,fa.useMemo)(()=>(0,d6.default)(e,d,{arrayMerge:(S,C)=>C}),[e,d]),h=(0,fa.useMemo)(()=>({layout:jr,fields:t.children?t.children:[{id:t.id,layout:jr}]}),[t]),p=u.map(S=>({...S,Edit:S.Edit===null?void 0:S.Edit,isValid:{required:S.isValid.required?.constraint,elements:S.isValid.elements?.constraint,min:S.isValid.min?.constraint,max:S.isValid.max?.constraint,pattern:S.isValid.pattern?.constraint,minLength:S.isValid.minLength?.constraint,maxLength:S.isValid.maxLength?.constraint}})),{validity:g}=Ime(m,p,h),b=()=>{o(d),n()},v=S=>{f(C=>(0,d6.default)(C,S,{arrayMerge:(B,R)=>R}))},k=(0,vO.useFocusOnMount)("firstInputElement"),y=(0,fa.useRef)(null),_=(0,vO.useMergeRefs)([k,y]);return xf(y,i),(0,mn.jsxs)(Up.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,mn.jsx)("div",{ref:_,children:(0,mn.jsx)(Vn,{data:m,form:h,onChange:v,validity:g,children:(S,C,B,R)=>(0,mn.jsx)(S,{data:m,field:C,onChange:v,hideLabelFromVision:h.fields.length<2,markWhenOptional:R,validity:B},C.id)})}),(0,mn.jsxs)(Le,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,mn.jsx)(Up.__experimentalSpacer,{style:{flex:1}}),(0,mn.jsx)(Up.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,mn.jsx)(Up.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:a})]})]})}function hNe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,fa.useState)(!1),[s,a]=(0,fa.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=kO(t);if(!c)return null;let f=()=>{a(!1),i(!0)};return(0,mn.jsxs)(mn.Fragment,{children:[(0,mn.jsx)(h0,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:c.readOnly===!0,onClick:()=>a(!0),"aria-expanded":s}),s&&(0,mn.jsx)(pNe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var Ome=hNe;var wf=l(A(),1),Ame=l(N(),1),Hc=l(O(),1);var Lme=l(Q(),1);var Ur=l(w(),1);function gNe({title:e,onClose:t}){return(0,Ur.jsx)(Le,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Ur.jsxs)(Le,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Ur.jsx)(wf.__experimentalHeading,{level:2,size:13,children:e}),(0,Ur.jsx)(wf.__experimentalSpacer,{style:{flex:1}}),t&&(0,Ur.jsx)(wf.Button,{label:(0,Ame.__)("Close"),icon:Gf,onClick:t,size:"small"})]})})}function bNe({touched:e,children:t}){let o=(0,Hc.useRef)(null);return xf(o,e),(0,Ur.jsx)("div",{ref:o,children:t})}function kNe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,Hc.useState)(!1),[s,a]=(0,Hc.useState)(null),c=(0,Hc.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,Lme.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,Hc.useMemo)(()=>({layout:jr,fields:t.children?t.children:[{id:t.id,layout:jr}]}),[t]),m=(0,Hc.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:h,fieldLabel:p,summaryFields:g}=kO(t);return h?(0,Ur.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Ur.jsx)(wf.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:v})=>(0,Ur.jsx)(h0,{data:e,field:t,fieldLabel:p,summaryFields:g,validity:r,touched:n,disabled:h.readOnly===!0,onClick:v,"aria-expanded":b}),renderContent:({onClose:b})=>(0,Ur.jsx)(bNe,{touched:n,children:(0,Ur.jsxs)("div",{ref:u,...d,children:[(0,Ur.jsx)(gNe,{title:p,onClose:b}),(0,Ur.jsx)(Vn,{data:e,form:f,onChange:o,validity:m,children:(v,k,y,_)=>(0,Ur.jsx)(v,{data:e,field:k,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:_,validity:y},k.id)})]})})})}):null}var Nme=kNe;var f6=l(w(),1);function Dme({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs.type==="modal"?(0,f6.jsx)(Ome,{data:e,field:t,onChange:o,validity:r}):(0,f6.jsx)(Nme,{data:e,field:t,onChange:o,validity:r})}var Fn=l(O(),1);var yO=l(N(),1),Mme=l(w(),1);function Vme(e){if(!e)return 0;let t=0,o=Object.keys(e).filter(r=>r!=="children");for(let r of o)e[r]?.type==="invalid"&&t++;if(e.children)for(let r of Object.values(e.children))t+=Vme(r);return t}function _O({validity:e}){let t=Vme(e);return t===0?null:(0,Mme.jsx)(Nz,{intent:"high",children:(0,yO.sprintf)((0,yO._n)("%d field needs attention","%d fields need attention",t),t)})}var ko=l(w(),1);function vNe(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 yNe({data:e,fields:t,label:o,layout:r,isOpen:n,touched:i,validity:s}){let c=bO(r.summary,t).filter(f=>vNe(f,r.summary,n)),u=i&&r.isCollapsible,d=c.length>0&&r.withHeader;return(0,ko.jsxs)(Le,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,ko.jsx)(al.Title,{children:o}),(u||d)&&(0,ko.jsxs)(Dp.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,ko.jsx)(_O,{validity:s}),d&&(0,ko.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,ko.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function _Ne({data:e,field:t,form:o,onChange:r,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:a}){if(t.children)return(0,ko.jsxs)(ko.Fragment,{children:[t.description&&(0,ko.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,ko.jsx)(Vn,{data:e,form:o,onChange:r,validity:s?.children})]});let c=Hp("regular")?.component;return c?(0,ko.jsx)(c,{data:e,field:t,onChange:r,hideLabelFromVision:n||a,markWhenOptional:i,validity:s}):null}function Fme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,Fn.useContext)(bs),a=t.layout,c=(0,Fn.useRef)(null),u=(0,Fn.useMemo)(()=>({layout:jr,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=a,[m,h]=(0,Fn.useState)(d),[p,g]=(0,Fn.useState)(!1);(0,Fn.useEffect)(()=>{h(d)},[d]);let b=(0,Fn.useCallback)(C=>{C||g(!0),h(C)},[]),v=(0,Fn.useCallback)(()=>{g(!0)},[]);xf(c,(f?m:!0)&&p);let k=t.label,y;if(t.children)y=!!k&&a.withHeader;else{let C=s.find(B=>B.id===t.id);if(!C||!C.Edit)return null;k=C.label,y=!!k&&a.withHeader}let _=(0,ko.jsx)(_Ne,{data:e,field:t,form:u,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,withHeader:y}),S=(0,ko.jsx)(yNe,{data:e,fields:s,label:k,layout:a,isOpen:f?!!m:!0,touched:p,validity:i});return y&&f?(0,ko.jsxs)(Dp.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:b,children:[(0,ko.jsx)(Dp.Header,{children:S}),(0,ko.jsx)(Dp.Content,{ref:c,onBlur:v,children:_})]}):(0,ko.jsxs)(al.Root,{className:"dataforms-layouts-card__field",children:[y&&(0,ko.jsx)(al.Header,{children:S}),(0,ko.jsx)(al.Content,{ref:c,onBlur:v,children:_})]})}var zme=l(A(),1);var cr=l(w(),1);function SNe({title:e}){return(0,cr.jsx)(Le,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,cr.jsx)(Le,{direction:"row",align:"center",children:(0,cr.jsx)(zme.__experimentalHeading,{level:2,size:13,children:e})})})}var xNe=({children:e})=>(0,cr.jsx)(cr.Fragment,{children:e});function jme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:jr,fields:t.children};return(0,cr.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,cr.jsx)(SNe,{title:t.label}),(0,cr.jsx)(Le,{direction:"row",align:s.alignment,gap:"lg",children:(0,cr.jsx)(Vn,{data:e,form:c,onChange:o,validity:i?.children,as:xNe,children:(u,d,f)=>(0,cr.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,cr.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=Hp("regular")?.component;return a?(0,cr.jsx)(cr.Fragment,{children:(0,cr.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,cr.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var zn=l(O(),1),Ume=l(N(),1);var Gc=l(w(),1);function Hme({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,zn.useContext)(bs),i=(0,zn.useRef)(null),s=(0,zn.useRef)(null),[a,c]=(0,zn.useState)(!1),[u,d]=(0,zn.useState)(!1),f=(0,zn.useMemo)(()=>({layout:jr,fields:t.children??[]}),[t]);(0,zn.useEffect)(()=>{let b=i.current;if(!b)return;let v=()=>{let k=b.open;k||c(!0),d(k)};return b.addEventListener("toggle",v),()=>{b.removeEventListener("toggle",v)}},[]),xf(s,u&&a);let m=(0,zn.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",p=h?n.find(b=>b.id===h):void 0,g;return p&&p.render?g=(0,Gc.jsx)(p.render,{item:e,field:p}):g=t.label||(0,Ume.__)("More details"),(0,Gc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,Gc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,Gc.jsxs)(Le,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[g,a&&(0,Gc.jsx)(_O,{validity:r})]})}),(0,Gc.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,Gc.jsx)(Vn,{data:e,form:f,onChange:o,validity:r?.children})})]})}var Gp=l(w(),1),wNe=[{type:"regular",component:bme,wrapper:({children:e})=>(0,Gp.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Dme,wrapper:({children:e})=>(0,Gp.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:Fme,wrapper:({children:e})=>(0,Gp.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:jme,wrapper:({children:e,layout:t})=>(0,Gp.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Gp.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Gp.jsx)(Le,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Hme}];function Hp(e){return wNe.find(t=>t.type===e)}var SO=l(w(),1),CNe=({children:e})=>(0,SO.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function Vn({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,xO.useContext)(bs),a=(0,xO.useMemo)(()=>{let d=s.filter(m=>!!m.isValid?.required).length,f=s.length-d;return d>f},[s]);function c(d){return s.find(f=>f.id===d.id)}let u=i??Hp(t.layout.type)?.wrapper??CNe;return(0,SO.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=Hp(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:c(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,r?.[d.id],a):(0,SO.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var p6=l(w(),1);function g0({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,m6.useMemo)(()=>pO(t),[t]),s=(0,m6.useMemo)(()=>d0(o),[o]);return t.fields?(0,p6.jsx)(pme,{fields:s,children:(0,p6.jsx)(Vn,{data:e,form:i,onChange:r,validity:n})}):null}var Bf=l(O(),1),ipe=l(N(),1);var Kk=l(A(),1);var h6=l(N(),1);var Gme=l(Q(),1);function $k({isControl:e}={isControl:!1}){return(0,Gme.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var wO=l(w(),1);function Wme({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=$k();return!e||e.length===0?null:(0,wO.jsx)(Kk.DropdownMenu,{icon:Bs,label:(0,h6.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,wO.jsx)(Kk.MenuGroup,{label:(0,h6.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,wO.jsx)(Kk.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?Cs:null,children:i.label},i.id)})})})}var CO=l(A(),1),$me=l(Q(),1),Kme=l(F(),1),Wc=l(O(),1),Yme=l(gr(),1);var ma=l(w(),1),{useRichText:BNe}=M(Yme.privateApis);function qme({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Kme.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,[u,d]=(0,Wc.useState)({start:void 0,end:void 0}),[f,m]=(0,Wc.useState)(!1),h=(0,Wc.useRef)(),p=(0,Wc.useRef)(new Set),g=(0,Wc.useRef)(new Set),b=$b({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function v(){h.current?.focus()}let{value:k,getValue:y,onChange:_,ref:S,formatTypes:C}=BNe({value:s,onChange(I){r(t.setValue({item:e,value:I}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(I,E)=>d({start:I,end:E}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,Wc.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:c}),[t.id,c])}),{baseControlProps:B,controlProps:R}=(0,CO.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,ma.jsxs)(ma.Fragment,{children:[f&&(0,ma.jsx)(Xb.Provider,{value:g,children:(0,ma.jsx)(Jb.Provider,{value:p,children:(0,ma.jsx)("div",{children:(0,ma.jsx)(NP,{value:k,onChange:_,onFocus:v,formatTypes:C,forwardedRef:h,isVisible:!1})})})}),(0,ma.jsx)(CO.BaseControl,{...B,children:(0,ma.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,$me.useMergeRefs)([S,OP({registry:i,getValue:y,onChange:_,formatTypes:C,selectionChange:d,isSelected:f,disableFormats:a?.disableFormats,value:k,tagName:"div",disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:g,inputEvents:p}),h]),onFocus:()=>m(!0),onBlur:()=>m(!1),contentEditable:!0,...R})})]})}var Cf=l(A(),1),Zme=l(F(),1),Xme=l(Me(),1),Qme=l(O(),1),Wp=l(N(),1);var ro=l(w(),1),ENe=e=>{window.requestAnimationFrame(()=>{let[t]=Xme.focus.tabbable.find(e?.current);t&&t.focus()})};function TNe({data:e,field:t,attachment:o,config:r}){let{allowedTypes:n=[],multiple:i=!1}=r||{};if(i)return"todo multiple";if(o?.media_type==="image"||o?.poster)return(0,ro.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,ro.jsx)("img",{alt:"",width:20,height:20,src:o.media_type==="image"?o.source_url:o.poster})});if(n.length===1){let a=t.getValue({item:e})?.url;if(n[0]==="image"&&a)return(0,ro.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,ro.jsx)("img",{alt:"",width:20,height:20,src:a})});let c;if(n[0]==="image"?c=Ev:n[0]==="video"?c=ND:n[0]==="audio"?c=jA:c=uh,c)return(0,ro.jsx)(Cf.Icon,{icon:c,size:20})}return(0,ro.jsx)(Cf.Icon,{icon:uh,size:20})}function Jme({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=$k({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:c=!1}=r,u=i?.id,d=i?.url,f=(0,Zme.useSelect)(p=>{if(!u)return;let b=p(x).getSettings()[ex];if(b)return b(p,u)},[u]),m;if(s.length===1){let p=s[0];p==="image"?m=(0,Wp.__)("Image"):p==="video"?m=(0,Wp.__)("Video"):p==="application"?m=(0,Wp.__)("File"):m=(0,Wp.__)("Media")}else m=(0,Wp.__)("Media");let h=(0,Qme.useRef)();return(0,ro.jsx)(Ws,{children:(0,ro.jsxs)("div",{ref:h,className:"block-editor-content-only-controls",children:[(0,ro.jsx)(Hb,{className:"block-editor-content-only-controls__media-replace-flow",allowedTypes:s,mediaId:u,mediaURL:d,multiple:a,popoverProps:n,onReset:()=>{o(t.setValue({item:e,value:{}}))},...c&&{useFeaturedImage:!!i?.featuredImage,onToggleFeaturedImage:()=>{o(t.setValue({item:e,value:{featuredImage:!i?.featuredImage}}))}},onSelect:p=>{if(p.id&&p.url){let g={...p,mediaType:p.media_type};c&&(g.featuredImage=!1),o(t.setValue({item:e,value:g}))}},renderToggle:p=>(0,ro.jsx)(Cf.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...p,children:(0,ro.jsxs)(Cf.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"20px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)(TNe,{attachment:f,field:t,data:e,config:r}),(0,ro.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"20px",height:"20px"}}),(0,ro.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})}),d&&(0,ro.jsx)(Cf.Button,{label:(0,Wp.__)("Reset"),className:"block-editor-content-only-controls__media-reset",size:"small",icon:hr,onClick:()=>{o(t.setValue({item:e,value:{}})),ENe(h)}})]})})}var $c=l(A(),1),EO=l(O(),1),epe=l(N(),1);var tpe=l(Gn(),1);var Er=l(w(),1),g6="noreferrer noopener",ope="_blank",BO="nofollow";function INe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=ope,i=i?.includes(g6)?i:i+` ${g6}`;else{let s=new RegExp(`\\b${g6}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(BO)?i:(i+` ${BO}`).trim();else{let s=new RegExp(`\\b${BO}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,tpe.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function rpe({data:e,field:t,onChange:o}){let[r,n]=(0,EO.useState)(!1),{popoverProps:i}=$k({isControl:!0}),s=t.getValue({item:e}),a=s?.url,c=s?.rel||"",d=s?.linkTarget===ope,f=c===BO,m=(0,EO.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)($c.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,Er.jsxs)($c.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)($c.Icon,{icon:bn,size:24}),(0,Er.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)($c.Icon,{icon:bn,size:24,style:{opacity:.3}}),(0,Er.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,epe.__)("Link")})]})]})}),r&&(0,Er.jsx)($c.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,Er.jsx)(Wd,{value:m,onChange:h=>{let p=INe({rel:c,...h});o(t.setValue({item:e,value:p}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var Tr=l(w(),1),{fieldsKey:spe,formKey:b6}=M(Yk.privateApis);function k6(e,t={}){return function(r){return(0,Tr.jsx)(e,{...r,config:t})}}function PNe({clientId:e,blockType:t,setAttributes:o,isMultiBlock:r=!1}){let n=vr({clientId:e,context:"list-view"}),i=It(e),s=t?.[spe],a=(0,Bf.useContext)(Pr),c=(0,IO.useSelect)(v=>{let k=v(x).getBlockAttributes(e);if(!k?.metadata?.bindings)return k;let{getBlockBindingsSource:y}=M(v(Yk.store));return Object.entries(k.metadata.bindings).reduce((_,[S,C])=>{let B=y(C.source);if(!B)return _;let R=B.getValues({select:v,context:a,bindings:{[S]:C}});return{..._,...R}},k)},[a,e]),{selectBlock:u,toggleBlockHighlight:d}=(0,IO.useDispatch)(x),f=(0,npe.useDebounce)(d,50),m=(0,Bf.useMemo)(()=>r?{...t?.[b6],fields:[t?.[b6]?.fields?.[0]]}:t?.[b6],[t,r]),[h,p]=(0,Bf.useState)(m),g=(0,Bf.useMemo)(()=>s?.length?s.map(v=>{let k={...v};return typeof v.Edit=="string"&&v.Edit==="rich-text"?k.Edit=k6(qme,{clientId:e}):typeof v.Edit=="string"&&v.Edit==="link"?k.Edit=k6(rpe):typeof v.Edit=="object"&&v.Edit.control==="media"&&(k.Edit=k6(Jme,{...v.Edit})),k}):[],[s,e]);if(!s?.length)return null;let b=v=>{p(k=>k.fields?.includes(v)?{...k,fields:k.fields.filter(y=>y!==v)}:{...k,fields:[...k.fields||[],v]})};return(0,Tr.jsxs)("div",{className:"block-editor-block-fields__container",onMouseEnter:r?()=>f(e,!0):void 0,onMouseLeave:()=>r?f(e,!1):void 0,onFocus:r?()=>{u(e,null)}:void 0,children:[(0,Tr.jsx)("div",{className:"block-editor-block-fields__header",children:(0,Tr.jsxs)(TO.__experimentalHStack,{spacing:1,children:[r&&(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)(Oe,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,Tr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Tr.jsx)(TO.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,Tr.jsx)(Wme,{fields:g,visibleFields:h.fields,onToggleField:b})]}),!r&&(0,Tr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,ipe.__)("Content")})]})}),(0,Tr.jsx)(g0,{data:c,fields:g,form:h,onChange:o})]})}function RNe(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,Yk.getBlockType)(e)?.[spe])}function ONe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,Bf.useContext)(mr);return(0,Tr.jsx)(jm,{group:"content",children:(0,Tr.jsx)(PNe,{...e,blockType:t,isMultiBlock:o})})}var ape={edit:ONe,hasSupport:RNe,attributeKeys:[],supportsPatternEditing:!0};var _6=l(pt(),1),lpe=l(A(),1),v6=l(N(),1),b0=l(Y(),1);var y6=l(w(),1);function ANe(e){return(0,b0.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function LNe({className:e,setAttributes:t}){return po()!=="default"?null:(0,y6.jsx)(pe,{group:"advanced",children:(0,y6.jsx)(lpe.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,v6.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,v6.__)("Separate multiple classes with spaces.")})})}var S6={edit:LNe,addSaveProps:NNe,attributeKeys:["className"],hasSupport(e){return(0,b0.hasBlockSupport)(e,"customClassName",!0)}};function NNe(e,t,o){return(0,b0.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=V(e.className,o.className)),e}function DNe(e,t,o,r){if(!(0,b0.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,_6.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",ANe);(0,_6.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",DNe);var cpe=l(pt(),1),k0=l(Y(),1);function MNe(e,t){return(0,k0.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,k0.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,k0.getBlockDefaultClassName)(t.name)),e}(0,cpe.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",MNe);var zpe=l(O(),1),jpe=l(pt(),1),qc=l(Y(),1),Upe=l(Q(),1),Qk=l(uy(),1);var P6=l(Y(),1),NO=l(O(),1),Epe=l(F(),1);var VNe=l(Y(),1);var FNe=l(w(),1),upe="typography.lineHeight";var dpe=l(pt(),1),PO=l(Y(),1),fpe=l(IT(),1),mpe=l(A(),1);var v0="typography.__experimentalFontFamily",{kebabCase:zNe}=M(mpe.privateApis);function jNe(e){return(0,PO.hasBlockSupport)(e,v0)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function ppe(e,t,o){if(!(0,PO.hasBlockSupport)(t,v0)||Ge(t,ks,"fontFamily")||!o?.fontFamily)return e;let r=new fpe.default(e.className);r.add(`has-${zNe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function UNe({name:e,fontFamily:t}){return ppe({},e,{fontFamily:t})}var x6={useBlockProps:UNe,addSaveProps:ppe,attributeKeys:["fontFamily"],hasSupport(e){return(0,PO.hasBlockSupport)(e,v0)}};(0,dpe.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",jNe);var w6=l(pt(),1),qk=l(Y(),1),hpe=l(IT(),1);var HNe=l(w(),1),$p="typography.fontSize";function GNe(e){return(0,qk.hasBlockSupport)(e,$p)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function gpe(e,t,o){if(!(0,qk.hasBlockSupport)(t,$p)||Ge(t,ks,"fontSize"))return e;let r=new hpe.default(e.className);r.add(Eu(o.fontSize));let n=r.value;return e.className=n||void 0,e}function WNe({name:e,fontSize:t,style:o}){let[r,n,i]=he("typography.fontSizes","typography.fluid","layout");if(!(0,qk.hasBlockSupport)(e,$p)||Ge(e,ks,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:cc({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:Ch(r,t,o?.typography?.fontSize).size}}),!!s)return gpe(s,e,{fontSize:t})}var C6={useBlockProps:WNe,addSaveProps:gpe,attributeKeys:["fontSize","style"],hasSupport(e){return(0,qk.hasBlockSupport)(e,$p)}},$Ne={fontSize:[["fontSize"],["style","typography","fontSize"]]};function KNe(e,t,o,r){let n=e.name,i={fontSize:(0,qk.hasBlockSupport)(n,$p)};return G2(i,$Ne,e,t,o,r)}(0,w6.addFilter)("blocks.registerBlockType","core/font/addAttribute",GNe);(0,w6.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",KNe);var RO=l(N(),1),Zk=l(Y(),1);var B6=l(w(),1),Xk="typography.textAlign",YNe=[{icon:fu,title:(0,RO.__)("Align text left"),align:"left"},{icon:jf,title:(0,RO.__)("Align text center"),align:"center"},{icon:mu,title:(0,RO.__)("Align text right"),align:"right"}],bpe=["left","center","right"],qNe=[];function E6(e){return Array.isArray(e)?bpe.filter(t=>e.includes(t)):e===!0?bpe:qNe}function ZNe({style:e,name:t,setAttributes:o}){let n=us(t)?.typography?.textAlign,i=po();if(!n||i!=="default")return null;let s=E6((0,Zk.getBlockSupport)(t,Xk));if(!s.length)return null;let a=YNe.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:Ae(d)})};return(0,B6.jsx)(Mt,{group:"block",children:(0,B6.jsx)(xC,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var OO={edit:ZNe,useBlockProps:XNe,addSaveProps:QNe,attributeKeys:["style"],hasSupport(e){return(0,Zk.hasBlockSupport)(e,Xk,!1)}};function XNe({name:e,style:t}){if(!t?.typography?.textAlign||!E6((0,Zk.getBlockSupport)(e,Xk)).length||Ge(e,ks,"textAlign"))return null;let r=t.typography.textAlign;return{className:V({[`has-text-align-${r}`]:r})}}function QNe(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Zk.getBlockSupport)(t,Xk);return E6(n).includes(r)&&!Ge(t,ks,"textAlign")&&(e.className=V(`has-text-align-${r}`,e.className)),e}var I6=l(pt(),1),Ef=l(Y(),1),Kp=l(O(),1),wpe=l(F(),1),y0=l(N(),1),AO=l(A(),1),Cpe=l(Q(),1);function JNe(e,t){let o=e.scrollHeight>e.clientHeight,r=0,n=2400,i=r,s=window.getComputedStyle(e),a=parseFloat(s.paddingLeft)||0,c=parseFloat(s.paddingRight)||0,u=document.createRange();u.selectNodeContents(e);let d=e,f=e.parentElement;if(f){let h=window.getComputedStyle(f);h?.display==="flex"&&(d=f,a+=parseFloat(h.paddingLeft)||0,c+=parseFloat(h.paddingRight)||0)}let m=d.clientHeight;for(;r<=n;){let h=Math.floor((r+n)/2);t(h);let g=u.getBoundingClientRect().width,b=e.scrollWidth<=d.clientWidth&&g<=d.clientWidth-a-c,v=o||e.scrollHeight<=d.clientHeight||e.scrollHeight<=m;d.clientHeight>m&&(m=d.clientHeight),b&&v?(i=h,r=h+1):n=h-1}return u.detach(),i}function kpe(e,t){if(!e)return;t(0);let o=JNe(e,t);return t(o),o}var vpe=l(O(),1),ype=l(N(),1),_pe=l(A(),1),Spe=l(er(),1),T6=l(w(),1);function xpe(){let e=(0,ype.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,vpe.useEffect)(()=>{(0,Spe.speak)(e)},[e]),(0,T6.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,T6.jsx)(_pe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var jn=l(w(),1),eDe={},tDe=12,Kc="typography.fitText";function oDe(e){return!(0,Ef.hasBlockSupport)(e,Kc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function rDe({fitText:e,name:t,clientId:o}){let[r,n]=(0,Kp.useState)(null),i=(0,Ef.hasBlockSupport)(t,Kc),s=ot(o),{blockAttributes:a,parentId:c,blockMode:u}=(0,wpe.useSelect)(f=>{if(!o||!i||!e)return eDe;let m=f(x).getBlockMode(o);return m==="html"?{blockMode:m}:{blockAttributes:f(x).getBlockAttributes(o),parentId:f(x).getBlockRootClientId(o),blockMode:m}},[o,i,e]),d=(0,Kp.useCallback)(()=>{if(!s||!i||!e)return;let f=`fit-text-${o}`,m=s.ownerDocument.getElementById(f);m||(m=s.ownerDocument.createElement("style"),m.id=f,s.ownerDocument.head.appendChild(m));let h=`#block-${o}`,g=kpe(s,b=>{b===0?m.textContent="":m.textContent=`${h} { font-size: ${b}px !important; }`});n(g)},[s,o,i,e]);return(0,Kp.useEffect)(()=>{if(!e||!s||!o||!i||u==="html")return;let f=s,m=f.style.visibility,h=null,p=null,g=null;h=window.requestAnimationFrame(()=>{f.style.visibility="hidden",p=window.requestAnimationFrame(()=>{d(),g=setTimeout(()=>{f.style.visibility=m},10)})});let b;return window.ResizeObserver&&f.parentElement&&(b=new window.ResizeObserver(d),b.observe(f.parentElement),b.observe(f)),()=>{h!==null&&window.cancelAnimationFrame(h),p!==null&&window.cancelAnimationFrame(p),g!==null&&clearTimeout(g),b&&b.disconnect();let v=`fit-text-${o}`,k=f.ownerDocument.getElementById(v);k&&k.remove()}},[e,o,c,d,s,i,u]),(0,Kp.useEffect)(()=>{if(e&&s&&i&&u!=="html"){let f=window.requestAnimationFrame(()=>{s&&d()});return()=>window.cancelAnimationFrame(f)}},[a,e,d,s,i,u]),{fontSize:r}}function nDe({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i}){return(0,Ef.hasBlockSupport)(r,Kc)?(0,jn.jsx)(AO.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,y0.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:(0,jn.jsx)(AO.ToggleControl,{label:(0,y0.__)("Fit text"),checked:t,onChange:()=>{let s=!t||void 0,a={fitText:s};s&&(n&&(a.fontSize=void 0),i?.typography?.fontSize&&(a.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(a)},help:t?(0,y0.__)("Text will resize to fit its container."):(0,y0.__)("The text will resize to fit its container, resetting other font size settings.")})}):null}function iDe(e,t,o){if(!(0,Ef.hasBlockSupport)(t,Kc))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 sDe({name:e,fitText:t}){return t&&(0,Ef.hasBlockSupport)(e,Kc)?{className:"has-fit-text"}:{}}(0,I6.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",oDe);var aDe=e=>(0,Ef.hasBlockSupport)(e,Kc);function lDe({fitText:e,name:t,clientId:o,isSelected:r}){let{fontSize:n}=rDe({fitText:e,name:t,clientId:o});return r&&n&&n<tDe?(0,jn.jsx)(pe,{group:"typography",children:(0,jn.jsx)(xpe,{})}):null}var cDe=(0,Cpe.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:c}=n;return(0,Ef.hasBlockSupport)(r,Kc)?(0,jn.jsxs)(jn.Fragment,{children:[(0,jn.jsx)(e,{...o}),(0,jn.jsx)(pe,{group:"typography",children:(0,jn.jsx)(nDe,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})}),c&&(0,jn.jsx)(lDe,{fitText:c,name:r,clientId:i,isSelected:s})]}):(0,jn.jsx)(e,{...o})},"addFitTextControl");(0,I6.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",cDe);var LO={useBlockProps:sDe,addSaveProps:iDe,attributeKeys:["fitText","fontSize","style"],hasSupport:aDe,edit:()=>null};var R6=l(w(),1);function Bpe(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var uDe="typography.__experimentalLetterSpacing",dDe="typography.__experimentalTextTransform",fDe="typography.__experimentalTextDecoration",mDe="typography.textIndent",pDe="typography.textColumns",hDe="typography.__experimentalFontStyle",gDe="typography.__experimentalFontWeight",bDe="typography.__experimentalWritingMode",ks="typography",Tpe=[upe,$p,hDe,gDe,v0,Xk,pDe,fDe,mDe,bDe,dDe,uDe,Kc];function Ipe(e){let t={...Bpe(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={...Bpe(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:Ae(t),fontFamily:i,fontSize:n}}function Ppe(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 kDe({children:e,resetAllFilter:t}){let o=(0,NO.useCallback)(r=>{let n=Ppe(r),i=t(n);return{...r,...Ipe(i)}},[t]);return(0,R6.jsx)(pe,{group:"typography",resetAllFilter:o,children:e})}function Rpe({clientId:e,name:t,setAttributes:o,settings:r}){let n=l2(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,Epe.useSelect)(m=>{if(!n)return{};let{style:h,fontFamily:p,fontSize:g,fitText:b}=m(x).getBlockAttributes(e)||{};return{style:h,fontFamily:p,fontSize:g,fitText:b}},[e,n]),u=(0,NO.useMemo)(()=>Ppe({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let h=Ipe(m);(h.fontSize||h.style?.typography?.fontSize)&&c&&(h.fitText=void 0),o(h)};if(!n)return null;let f=(0,P6.getBlockSupport)(t,[ks,"__experimentalDefaultControls"]);return(0,R6.jsx)(c2,{as:kDe,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var If=l(O(),1),MO=l(F(),1),DO=l(Y(),1),Dpe=l(Pe(),1);var kl=l(O(),1),Ope=l(__(),1);var _0=l(w(),1);function Ape({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=ot(e),[i,s]=(0,kl.useReducer)(()=>o(n));(0,kl.useEffect)(()=>{n&&r&&s()},[n,r]),(0,kl.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,kl.useRef)(t),[c,u]=(0,kl.useState)(!1);return(0,kl.useEffect)(()=>{if((0,Ope.isShallowEqual)(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,_0.jsx)(Ki,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,_0.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function Tf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Lpe({clientId:e,value:t,forceShow:o}){return(0,_0.jsx)(Ape,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=Tf(r,"margin-top"),i=Tf(r,"margin-right"),s=Tf(r,"margin-bottom"),a=Tf(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 Npe({clientId:e,value:t,forceShow:o}){return(0,_0.jsx)(Ape,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:Tf(r,"padding-top"),borderRightWidth:Tf(r,"padding-right"),borderBottomWidth:Tf(r,"padding-bottom"),borderLeftWidth:Tf(r,"padding-left")}),forceShow:o})}var Yc=l(w(),1),vl="dimensions",S0="spacing";function vDe(){let[e,t]=(0,If.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=M((0,MO.useDispatch)(x));return(0,If.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function yDe({children:e,resetAllFilter:t}){let o=(0,If.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,Yc.jsx)(pe,{group:"dimensions",resetAllFilter:o,children:e})}function Mpe({clientId:e,name:t,setAttributes:o,settings:r}){let n=m2(r),i=(0,MO.useSelect)(m=>{if(n)return m(x).getBlockAttributes(e)?.style},[e,n]),[s,a]=vDe(),c=m=>{o({style:Ae(m)})};if(!n)return null;let u=(0,DO.getBlockSupport)(t,[vl,"__experimentalDefaultControls"]),d=(0,DO.getBlockSupport)(t,[S0,"__experimentalDefaultControls"]),f={...u,...d};return(0,Yc.jsxs)(Yc.Fragment,{children:[(0,Yc.jsx)(p2,{as:yDe,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,Yc.jsx)(Npe,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,Yc.jsx)(Lpe,{forceShow:s==="margin",clientId:e,value:i})]})}function Vpe(e,t="any"){if(If.Platform.OS!=="web")return!1;let o=(0,DO.getBlockSupport)(e,vl);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width):!!o?.[t]}var Fpe={useBlockProps:_De,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return Vpe(e)}};function _De({name:e,height:t,minHeight:o,style:r}){if(!Vpe(e,"aspectRatio")||Ge(e,vl,"aspectRatio"))return{};let n=V({"has-aspect-ratio":!!r?.dimensions?.aspectRatio}),i={};return r?.dimensions?.aspectRatio?(i.minHeight="unset",i.height="unset"):(o||r?.dimensions?.minHeight||t||r?.dimensions?.height)&&(i.aspectRatio="unset"),{className:n,style:i}}function O6(){(0,Dpe.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var yl=l(w(),1),SDe=[...Tpe,Ep,lr,vl,Tp,S0,$S],L6=e=>SDe.some(t=>(0,qc.hasBlockSupport)(e,t));function yi(e={}){let t={};return(0,Qk.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function xDe(e){return!L6(e)&&!(0,qc.hasBlockSupport)(e,"customCSS",!0)||e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e}var Hpe={[`${Ep}.__experimentalSkipSerialization`]:["border"],[`${lr}.__experimentalSkipSerialization`]:[lr],[`${ks}.__experimentalSkipSerialization`]:[ks],[`${vl}.__experimentalSkipSerialization`]:[vl],[`${S0}.__experimentalSkipSerialization`]:[S0],[`${$S}.__experimentalSkipSerialization`]:[$S]},wDe={...Hpe,[`${vl}.aspectRatio`]:[`${vl}.aspectRatio`],[`${Tp}`]:[Tp]},CDe={[`${vl}.aspectRatio`]:!0,[`${Tp}`]:!0},BDe={gradients:"gradient"};function A6(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;A6(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function Gpe(e,t,o,r=wDe){if(!L6(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=CDe[i]||(0,qc.getBlockSupport)(t,i);a===!0&&(n=A6(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=BDe[c]||c;n=A6(n,[[...s,u]])})}),e.style={...yi(n),...e.style},e}function EDe({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=us(t,r),i=po(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,yl.jsxs)(yl.Fragment,{children:[(0,yl.jsx)(H2,{...s}),(0,yl.jsx)(vle,{...s}),(0,yl.jsx)(Rpe,{...s}),(0,yl.jsx)(hle,{...s}),(0,yl.jsx)(Mpe,{...s})]})}var VO={edit:EDe,hasSupport:L6,addSaveProps:Gpe,attributeKeys:["style"],useBlockProps:RDe},TDe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],IDe={};function PDe(e,t,o){if(!e)return;let r=[];return TDe.forEach(({elementType:n,pseudo:i,elements:s})=>{if(Ge(t,lr,n))return;let c=e?.[n];if(c){let u=zg(o,qc.__EXPERIMENTAL_ELEMENTS[n]);r.push((0,Qk.compileCSS)(c,{selector:u})),i&&i.forEach(d=>{c[d]&&r.push((0,Qk.compileCSS)(c[d],{selector:zg(o,`${qc.__EXPERIMENTAL_ELEMENTS[n]}${d}`)}))})}s&&s.forEach(u=>{e[u]&&r.push((0,Qk.compileCSS)(e[u],{selector:zg(o,qc.__EXPERIMENTAL_ELEMENTS[u])}))})}),r.length>0?r.join(""):void 0}function RDe({name:e,style:t}){let o=(0,Upe.useInstanceId)(IDe,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,zpe.useMemo)(()=>PDe(n,e,r),[r,n,e]);return ti({css:i}),Gpe({className:o},e,{style:t},Hpe)}(0,jpe.addFilter)("blocks.registerBlockType","core/style/addAttribute",xDe);var Wpe=l(pt(),1),$pe=l(Y(),1),ODe=e=>(0,$pe.hasBlockSupport)(e,"__experimentalSettings",!1);function ADe(e){return ODe(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,Wpe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",ADe);var Pf=l(Y(),1),qpe=l(Q(),1),Zpe=l(pt(),1),x0=l(O(),1);function LDe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=Et(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 Kpe(e){return`${e}{filter:none}`}function Ype(e,t){return`${e}{filter:url(#${t})}`}function FO(e,t){let o=LDe(t);return` |
| 178 |
<svg |
| 179 |
xmlns:xlink="http://www.w3.org/1999/xlink" |
| 180 |
viewBox="0 0 0 0" |
| 181 |
width="0" |
| 182 |
height="0" |
| 183 |
focusable="false" |
| 184 |
role="none" |
| 185 |
aria-hidden="true" |
| 186 |
style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" |
| 187 |
> |
| 188 |
<defs> |
| 189 |
<filter id="${e}"> |
| 190 |
<!-- |
| 191 |
Use sRGB instead of linearRGB so transparency looks correct. |
| 192 |
Use perceptual brightness to convert to grayscale. |
| 193 |
--> |
| 194 |
<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> |
| 195 |
<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --> |
| 196 |
<feComponentTransfer color-interpolation-filters="sRGB"> |
| 197 |
<feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR> |
| 198 |
<feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG> |
| 199 |
<feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB> |
| 200 |
<feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA> |
| 201 |
</feComponentTransfer> |
| 202 |
<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --> |
| 203 |
<feComposite in2="SourceGraphic" operator="in"></feComposite> |
| 204 |
</filter> |
| 205 |
</defs> |
| 206 |
</svg>`}var Zc=l(w(),1),N6=[],NDe=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");iu([su]);function D6({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=he(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,x0.useMemo)(()=>[...r||N6,...n||N6,...o&&i||N6],[o,r,n,i])}function Xpe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function DDe(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 MDe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=us(o),i=po(),s=D6({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=D6({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=he("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:Xpe(r,s);return(0,Zc.jsxs)(Zc.Fragment,{children:[(0,Zc.jsx)(pe,{group:"filter",children:(0,Zc.jsx)(w2,{value:{filter:{duotone:m}},onChange:h=>{let p={...e,color:{...h?.filter}};t({style:Ae(p)})},settings:n})}),(0,Zc.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Zc.jsx)(RI,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:h=>{let p=DDe(h,s),g={...e,color:{...e?.color,duotone:p??h}};t({style:Ae(g)})},settings:n})})]})}var M6={shareWithChildBlocks:!0,edit:MDe,useBlockProps:jDe,attributeKeys:["style"],hasSupport(e){return(0,Pf.hasBlockSupport)(e,"filter.duotone")}};function VDe(e){return(0,Pf.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function FDe({clientId:e,id:t,selector:o,attribute:r}){let n=D6({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:Xpe(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(", "),h=Array.isArray(u)||u==="unset";uc(h?{css:u!=="unset"?Ype(m,t):Kpe(m),__unstableType:"presets"}:void 0),uc(h?{assets:u!=="unset"?FO(t,u):"",__unstableType:"svgs"}:void 0);let p=ot(e);(0,x0.useEffect)(()=>{if(h&&p&&NDe){let g=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",g)}},[h,p,u])}var zDe={};function jDe({clientId:e,name:t,style:o}){let r=(0,qpe.useInstanceId)(zDe),n=(0,x0.useMemo)(()=>{let c=(0,Pf.getBlockType)(t);if(c){if(!(0,Pf.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,Pf.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=ni(c);return typeof d=="string"?zg(f,d):f}return ni(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return FDe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,Zpe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",VDe);var Qpe=l(O(),1),Jpe=l(F(),1),ehe=l(Q(),1),w0=l(Y(),1),jO=l(N(),1);var zO=l(w(),1),UDe={},HDe={};function GDe({blockName:e,setAttributes:t,style:o}){if(po()!=="default")return null;let n=(0,w0.getBlockType)(e);function i(a){let c=a?.css?.trim()?a.css:void 0;t({style:Ae({...a,css:c})})}let s=(0,jO.sprintf)((0,jO.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value, e.g. color: red;."),n?.title);return(0,zO.jsx)(pe,{group:"advanced",children:(0,zO.jsx)(E2,{value:o,onChange:i,inheritedValue:o,help:s})})}function WDe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,Jpe.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(x);return{style:s(e)?.style||HDe,canEditCSS:a().canEditCSS}},[e]);return n?(0,zO.jsx)(GDe,{blockName:t,setAttributes:o,style:r}):null}function $De({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&B2(t),r=(0,ehe.useInstanceId)(UDe,"wp-custom-css"),n=`.${r}`,i=(0,Qpe.useMemo)(()=>{if(o)return K_(t,n)},[t,n,o]);return ti({css:i}),o?{className:`has-custom-css ${r}`}:{}}function KDe(e,t,o){if(!(0,w0.hasBlockSupport)(t,"customCSS",!0)||!o?.style?.css?.trim())return e;let r=e.className?`${e.className} has-custom-css`:"has-custom-css";return{...e,className:r}}var UO={edit:WDe,useBlockProps:$De,addSaveProps:KDe,attributeKeys:["style"],hasSupport(e){return(0,w0.hasBlockSupport)(e,"customCSS",!0)}};var HO=l(Q(),1),F6=l(pt(),1),Xc=l(Y(),1),GO=l(F(),1),_l=l(A(),1),Jk=l(N(),1);var Qo=l(w(),1),YDe="is-style-",z6="layout",{kebabCase:V6}=M(_l.privateApis);function j6(e){return(0,Xc.hasBlockSupport)(e,"layout")||(0,Xc.hasBlockSupport)(e,"__experimentalLayout")}function WO(e={},t=""){let{layout:o}=e,{default:r}=(0,Xc.getBlockSupport)(t,z6)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if($n[n?.type||"default"]?.className){let a=$n[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,GO.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(x).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${V6(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${V6(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function U6(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=Rs(i?.type||"default"),[a]=he("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function qDe({layout:e,setAttributes:t,name:o,clientId:r}){let n=us(o),{layout:i}=n,{themeSupportsLayout:s}=(0,GO.useSelect)(T=>{let{getSettings:P}=T(x);return{themeSupportsLayout:P().supportsLayout}},[]);if(po()!=="default")return null;let c=(0,Xc.getBlockSupport)(o,z6,{}),u={...i,...c},{allowSwitching:d,allowEditing:f=!0,allowInheriting:m=!0,default:h}=u;if(!f)return null;let p={...c,...e},{type:g,default:{type:b="default"}={}}=p,v=g||b,k=!!(m&&(!v||v==="default"||v==="constrained"||p.inherit)),y=e||h||{},{inherit:_=!1,contentSize:S=null}=y;if((v==="default"||v==="constrained")&&!s)return null;let C=Rs(v),B=Rs("constrained"),R=!y.type&&(S||_),I=!!_||!!S,E=T=>t({layout:{type:T}}),L=T=>t({layout:T});return(0,Qo.jsxs)(Qo.Fragment,{children:[(0,Qo.jsx)(pe,{children:(0,Qo.jsxs)(_l.PanelBody,{title:(0,Jk.__)("Layout"),children:[k&&(0,Qo.jsx)(Qo.Fragment,{children:(0,Qo.jsx)(_l.ToggleControl,{label:(0,Jk.__)("Inner blocks use content width"),checked:C?.name==="constrained"||I,onChange:()=>t({layout:{type:C?.name==="constrained"||I?"default":"constrained"}}),help:C?.name==="constrained"||I?(0,Jk.__)("Nested blocks use content width with options for full and wide widths."):(0,Jk.__)("Nested blocks will fill the width of this container.")})}),!_&&d&&(0,Qo.jsx)(ZDe,{type:v,onChange:E}),C&&C.name!=="default"&&(0,Qo.jsx)(C.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r}),B&&R&&(0,Qo.jsx)(B.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r})]})}),!_&&C&&(0,Qo.jsx)(C.toolBarControls,{layout:y,onChange:L,layoutBlockSupport:c,name:o,clientId:r})]})}var the={shareWithChildBlocks:!0,edit:qDe,attributeKeys:["layout"],hasSupport(e){return j6(e)}};function ZDe({type:e,onChange:t}){return(0,Qo.jsx)(_l.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Jk.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:f9().map(({name:o,label:r})=>(0,Qo.jsx)(_l.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function XDe(e){return"type"in(e.attributes?.layout??{})||j6(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function QDe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,layoutClasses:n}){let{name:i,attributes:s}=t,a=(0,HO.useInstanceId)(e),{layout:c}=s,{default:u}=(0,Xc.getBlockSupport)(i,z6)||{},d=c?.inherit||c?.contentSize||c?.wideSize?{...c,type:"constrained"}:c||u||{},f=`wp-container-${V6(i)}-is-layout-`,m=`.${f}${a}`,h=o!==null,g=Rs(d?.type||"default")?.getLayoutStyle?.({blockName:i,selector:m,layout:d,style:s?.style,hasBlockGapSupport:h,globalBlockGapValue:r}),b=V({[`${f}${a}`]:!!g},n);return ti({css:g}),(0,Qo.jsx)(e,{...t,__unstableLayoutClassNames:b})}var JDe=(0,HO.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=j6(n),a=WO(i,n),c=(0,GO.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=M(u(x)),m=d(),{disableLayoutStyles:h}=m;if(h)return;let[p]=f(r,"spacing.blockGap"),g=m[Bi],b,v=i?.className;if(v?.includes(YDe)){let{getBlockStyles:y}=u(Xc.store),_=y(n),S=D3(v,_);b=S?g?.blocks?.[n]?.variations?.[S]?.spacing?.blockGap:void 0}let k=b??g?.blocks?.[n]?.spacing?.blockGap??g?.spacing?.blockGap;return{blockGapSupport:p,globalBlockGapValue:k}},[s,r,i?.className,n]);return c?(0,Qo.jsx)(QDe,{block:e,props:o,layoutClasses:a,...c}):(0,Qo.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,F6.addFilter)("blocks.registerBlockType","core/layout/addAttribute",XDe);(0,F6.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",JDe);var che=l(Q(),1),K6=l(F(),1),uhe=l(O(),1);var vs=l(O(),1),Rf=l(F(),1),rhe=l(Q(),1);function B0(e,t){return Array.from({length:t},(o,r)=>e+r)}var pa=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 Ro(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function C0(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 Qc(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 eMe(e,t){let o=parseFloat(Ro(e,"column-gap")),r=parseFloat(Ro(e,"row-gap")),n=C0(Ro(e,"grid-template-columns"),o),i=C0(Ro(e,"grid-template-rows"),r),s=Qc(n,t.left)+1,a=Qc(i,t.top)+1,c=Qc(n,t.right,"end")+1,u=Qc(i,t.bottom,"end")+1;return new pa({columnStart:s,columnEnd:c,rowStart:a,rowEnd:u})}function ohe(e){return eMe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function H6(e){let t=Ro(e,"grid-template-columns"),o=Ro(e,"grid-template-rows"),r=Ro(e,"border-top-width"),n=Ro(e,"border-right-width"),i=Ro(e,"border-bottom-width"),s=Ro(e,"border-left-width"),a=Ro(e,"padding-top"),c=Ro(e,"padding-right"),u=Ro(e,"padding-bottom"),d=Ro(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,h=f*m;return{numColumns:f,numRows:m,numItems:h,currentColor:Ro(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:Ro(e,"gap"),inset:` |
| 207 |
calc(${a} + ${r}) |
| 208 |
calc(${c} + ${n}) |
| 209 |
calc(${u} + ${i}) |
| 210 |
calc(${d} + ${s}) |
| 211 |
`}}}var _i=l(w(),1);function E0({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,Rf.useSelect)(a=>a(x).getSettings().isDistractionFree,[]),i=ot(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,_i.jsx)(tMe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var tMe=(0,vs.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,vs.useState)(()=>H6(t)),[a,c]=(0,vs.useState)(!1),u=ot(r),d=(0,vs.useMemo)(()=>u?ohe(u):null,[u]);return(0,vs.useEffect)(()=>{let f=()=>s(H6(t)),m=new window.ResizeObserver(f);m.observe(t,{box:"border-box"});let h=new window.ResizeObserver(f);h.observe(t);for(let p of t.children)h.observe(p);return()=>{m.disconnect(),h.disconnect()}},[t]),(0,vs.useEffect)(()=>{function f(){c(!0)}function m(){c(!1)}return document.addEventListener("drag",f),document.addEventListener("dragend",m),()=>{document.removeEventListener("drag",f),document.removeEventListener("dragend",m)}},[]),(0,_i.jsx)(Ki,{className:V("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,_i.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,_i.jsx)(rMe,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,_i.jsx)(oMe,{gridInfo:i,childGridRect:d})})})});function oMe({gridInfo:e,childGridRect:t}){return B0(1,e.numRows).map(o=>B0(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,_i.jsx)(nhe,{color:n},`${o}-${r}`)}))}function rMe({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,vs.useState)(null),i=(0,Rf.useSelect)(a=>{let{getBlockOrder:c,getBlockStyles:u}=M(a(x)),d=c(e);return u(d)},[e]),s=(0,vs.useMemo)(()=>{let a=[];for(let c of Object.values(i)){let{columnStart:u,rowStart:d,columnSpan:f=1,rowSpan:m=1}=c?.layout??{};!u||!d||a.push(new pa({columnStart:u,rowStart:d,columnSpan:f,rowSpan:m}))}return a},[i]);return B0(1,t.numRows).map(a=>B0(1,t.numColumns).map(c=>{let u=o?.contains(c,a),d=t.currentColor;u&&(d="transparent");let f=s.some(h=>h.contains(c,a)),m=r?.contains(c,a)??!1;return(0,_i.jsx)(nhe,{color:d,className:m&&"is-highlighted",children:f&&!u?(0,_i.jsx)(nMe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,_i.jsx)(iMe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${c}`)}))}function nhe({color:e,children:t,className:o}){return(0,_i.jsx)("div",{className:V("block-editor-grid-visualizer__cell",o),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function ihe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,Rf.useSelect)(x),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,Rf.useDispatch)(x),m=Sp(o,r.numColumns);return sMe({validateDrag(h){let p=c(h);if(!a(p,o))return!1;let g=i(h),b=new pa({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new pa({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(h){let p=i(h);n(new pa({columnStart:e,rowStart:t,columnSpan:p.style?.layout?.columnSpan,rowSpan:p.style?.layout?.rowSpan}))},onDragLeave(){n(h=>h?.columnStart===e&&h?.rowStart===t?null:h)},onDrop(h){n(null);let p=i(h);u(h,{style:{...p.style,layout:{...p.style?.layout,columnStart:e,rowStart:t}}}),f(),d([h],s(h),o,m(e,t))}})}function nMe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,_i.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:ihe(e,t,o,r,n)})}function iMe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Rf.useDispatch)(x),c=Sp(o,r.numColumns);return(0,_i.jsx)(cd,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:ihe(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 sMe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,Rf.useSelect)(x);return(0,rhe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var she=l(A(),1),T0=l(O(),1);var $O=l(w(),1);function G6({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=ot(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,$O.jsx)(aMe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function aMe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,T0.useState)(null),[c,u]=(0,T0.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,T0.useEffect)(()=>{let h=new window.ResizeObserver(()=>{let p=o.getBoundingClientRect(),g=r.getBoundingClientRect(),b=p.top>g.top,v=p.bottom<g.bottom,k=p.left>g.left,y=p.right<g.right;u({top:(i||!v)&&b,bottom:v,left:(i||!y)&&k,right:y})});return h.observe(o),()=>h.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,$O.jsx)(Ki,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,$O.jsx)(she.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:h,pointerId:p})=>{h.setPointerCapture(p)},onResizeStart:(h,p)=>{a(p)},onResizeStop:(h,p,g)=>{let b=parseFloat(Ro(r,"column-gap")),v=parseFloat(Ro(r,"row-gap")),k=C0(Ro(r,"grid-template-columns"),b),y=C0(Ro(r,"grid-template-rows"),v),_=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),S=Qc(k,_.left)+1,C=Qc(y,_.top)+1,B=Qc(k,_.right,"end")+1,R=Qc(y,_.bottom,"end")+1;n({columnSpan:B-S+1,rowSpan:R-C+1,columnStart:i?S:void 0,rowStart:i?C:void 0})}})})}var ys=l(N(),1),ev=l(A(),1);var ahe=l(F(),1),lhe=l(Q(),1);var Hr=l(w(),1);function W6({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,ahe.useDispatch)(x),a=e?.columnStart??1,c=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,m=c+d-1,h=t?.columnCount,p=t?.rowCount,g=Sp(r,h);return(0,Hr.jsx)(Mt,{group:"parent",children:(0,Hr.jsxs)(ev.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Hr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Hr.jsx)(I0,{icon:(0,ys.isRTL)()?Uo:Gr,label:(0,ys.__)("Move left"),description:(0,ys.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,Hr.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Hr.jsx)(I0,{className:"is-up-button",icon:Hf,label:(0,ys.__)("Move up"),description:(0,ys.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,Hr.jsx)(I0,{className:"is-down-button",icon:pr,label:(0,ys.__)("Move down"),description:(0,ys.__)("Move down"),isDisabled:p&&m>=p,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,Hr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Hr.jsx)(I0,{icon:(0,ys.isRTL)()?Gr:Uo,label:(0,ys.__)("Move right"),description:(0,ys.__)("Move right"),isDisabled:h&&f>=h,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function I0({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,lhe.useInstanceId)(I0)}`;return(0,Hr.jsxs)(Hr.Fragment,{children:[(0,Hr.jsx)(ev.ToolbarButton,{className:V("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,Hr.jsx)(ev.VisuallyHidden,{id:a,children:i})]})}var P0=l(F(),1),YO=l(O(),1),KO=l(Q(),1);function $6({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,P0.useSelect)(m=>{let{getBlockAttributes:h,getBlockOrder:p}=m(x),g=m(x).getSelectedBlock();return{gridLayout:h(e).layout??{},blockOrder:p(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,P0.useSelect)(x),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,P0.useDispatch)(x),c=(0,YO.useMemo)(()=>r?new pa(r):null,[r]),u=(0,KO.usePrevious)(c),d=(0,KO.usePrevious)(t.isManualPlacement),f=(0,KO.usePrevious)(o);(0,YO.useEffect)(()=>{let m={};if(t.isManualPlacement){let h=[];for(let g of o){let{columnStart:b,rowStart:v,columnSpan:k=1,rowSpan:y=1}=n(g).style?.layout??{};!b||!v||h.push(new pa({columnStart:b,rowStart:v,columnSpan:k,rowSpan:y}))}for(let g of o){let b=n(g),{columnStart:v,rowStart:k,columnSpan:y=1,rowSpan:_=1}=b.style?.layout??{};if(v&&k)continue;let[S,C]=lMe(h,t.columnCount,y,_,u?.columnEnd,u?.rowEnd);h.push(new pa({columnStart:S,rowStart:C,columnSpan:y,rowSpan:_})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:S,rowStart:C}}}}let p=Math.max(...h.map(g=>g.rowEnd));(!t.rowCount||t.rowCount<p)&&(m[e]={layout:{...t,rowCount:p}});for(let g of f??[])if(!o.includes(g)){let b=i(g);if(b===null||n(b)?.layout?.type==="grid")continue;let k=n(g),{columnStart:y,rowStart:_,columnSpan:S,rowSpan:C,...B}=k.style?.layout??{};if(y||_||S||C){let R=Object.keys(B).length===0;m[g]=me(k,["style","layout"],R?void 0:B)}}}else{if(d===!0)for(let h of o){let p=n(h),{columnStart:g,rowStart:b,...v}=p.style?.layout??{};if(g||b){let k=Object.keys(v).length===0;m[h]=me(p,["style","layout"],k?void 0:v)}}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 lMe(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 pa({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var Jc=l(w(),1),cMe={};function uMe({style:e}){let t=(0,K6.useSelect)(g=>!g(x).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=lm()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,che.useInstanceId)(cMe),h=`.wp-container-content-${m}`,p="";if(t&&(r==="fixed"&&n?p=`${h} { |
| 212 |
flex-basis: ${n}; |
| 213 |
box-sizing: border-box; |
| 214 |
}`:r==="fill"?p=`${h} { |
| 215 |
flex-grow: 1; |
| 216 |
}`:i&&a?p=`${h} { |
| 217 |
grid-column: ${i} / span ${a}; |
| 218 |
}`:i?p=`${h} { |
| 219 |
grid-column: ${i}; |
| 220 |
}`:a&&(p=`${h} { |
| 221 |
grid-column: span ${a}; |
| 222 |
}`),s&&c?p+=`${h} { |
| 223 |
grid-row: ${s} / span ${c}; |
| 224 |
}`:s?p+=`${h} { |
| 225 |
grid-row: ${s}; |
| 226 |
}`:c&&(p+=`${h} { |
| 227 |
grid-row: span ${c}; |
| 228 |
}`),(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 v=2;a&&i?v=a+i-1:a?v=a:v=i;let k=b==="px"?24:1.5,y=v*g+(v-1)*k,_=g*2+k-1,S=a&&a>1?"1/-1":"auto";p+=`@container (max-width: ${Math.max(y,_)}${b}) { |
| 229 |
${h} { |
| 230 |
grid-column: ${S}; |
| 231 |
grid-row: auto; |
| 232 |
} |
| 233 |
}`}if(ti({css:p}),!!p)return{className:`wp-container-content-${m}`}}function dMe({clientId:e,style:t,setAttributes:o}){let r=lm()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,Jc.jsx)(fMe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function fMe({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a,parentBlockVisibility:c,blockBlockVisibility:u,deviceType:d,isChildBlockAGrid:f}=(0,K6.useSelect)(y=>{let{getBlockRootClientId:_,getBlockEditingMode:S,getTemplateLock:C,getBlockAttributes:B,getSettings:R}=y(x),I=_(e);if(C(I)||S(I)!=="default")return{rootClientId:I,isVisible:!1};let E=B(I),L=B(e),T=R();return{rootClientId:I,isVisible:!0,parentBlockVisibility:E?.metadata?.blockVisibility,blockBlockVisibility:L?.metadata?.blockVisibility,deviceType:T?.[Ei]?.toLowerCase()||Tt.desktop.value,isChildBlockAGrid:L?.layout?.type==="grid"}},[e]),{isBlockCurrentlyHidden:m}=zi({blockVisibility:c,deviceType:d}),{isBlockCurrentlyHidden:h}=zi({blockVisibility:u,deviceType:d}),[p,g]=(0,uhe.useState)(),b=f?e:void 0;if(!a||m)return null;let v=r&&!h;function k(y){o({style:{...t,layout:{...t?.layout,...y}}})}return(0,Jc.jsxs)(Jc.Fragment,{children:[(0,Jc.jsx)(E0,{clientId:s,contentRef:g,parentLayout:i,childGridClientId:b}),v&&(0,Jc.jsx)(G6,{clientId:e,bounds:p,onChange:k,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,Jc.jsx)(W6,{layout:t?.layout,parentLayout:i,onChange:k,gridClientId:s,blockClientId:e})]})}var Y6={useBlockProps:uMe,edit:dMe,attributeKeys:["style"],hasSupport(){return!0}};var Z6=l(pt(),1),q6=l(Y(),1),dhe="metadata";function mMe(e){return e?.attributes?.[dhe]?.type||(e.attributes={...e.attributes,[dhe]:{type:"object"}}),e}function pMe(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,q6.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,q6.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,Z6.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",mMe);(0,Z6.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",pMe);var X6=l(N(),1),qO=l(O(),1),ZO=l(A(),1),XO=l(Y(),1),tv=l(F(),1);var Of=l(w(),1),hMe={};function gMe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,tv.useSelect)(h=>h(XO.store).getBlockTypes(),[]),n=(0,qO.useMemo)(()=>r?.filter(({name:h,blockHooks:p})=>p&&e in p||o.includes(h)),[r,e,o]),i=(0,tv.useSelect)(h=>{let{getBlocks:p,getBlockRootClientId:g,getGlobalBlockCount:b}=h(x),v=g(t),k=n.reduce((y,_)=>{if(b(_.name)===0)return y;let S=_?.blockHooks?.[e],C;switch(S){case"before":case"after":C=p(v);break;case"first_child":case"last_child":C=p(t);break;case void 0:C=[...p(v),...p(t)];break}let B=C?.find(R=>R.name===_.name);return B?{...y,[_.name]:B.clientId}:y},{});return Object.values(k).length>0?k:hMe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,tv.useSelect)(x),{insertBlock:u,removeBlock:d}=(0,tv.useDispatch)(x);if(!n.length)return null;let f=n.reduce((h,p)=>{let[g]=p.name.split("/");return h[g]||(h[g]=[]),h[g].push(p),h},{}),m=(h,p)=>{let g=s(t),b=a(t),v=c(t);switch(p){case"before":case"after":u(h,p==="after"?g+1:g,v,!1);break;case"first_child":case"last_child":u(h,p==="first_child"?0:b,t,!1);break;case void 0:u(h,g+1,v,!1);break}};return(0,Of.jsx)(pe,{children:(0,Of.jsxs)(ZO.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,X6.__)("Plugins"),initialOpen:!0,children:[(0,Of.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,X6.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(h=>(0,Of.jsxs)(qO.Fragment,{children:[(0,Of.jsx)("h3",{children:h}),f[h].map(p=>{let g=p.name in i;return(0,Of.jsx)(ZO.ToggleControl,{checked:g,label:p.title,onChange:()=>{if(!g){let b=p.blockHooks[e];m((0,XO.createBlock)(p.name),b);return}d(i[p.name],!1)}},p.title)})]},h))]})})}var fhe={edit:gMe,attributeKeys:["metadata"],hasSupport(){return!0}};var Q6=l(N(),1),mhe=l(Y(),1),ov=l(A(),1),phe=l(F(),1),hhe=l(O(),1),ghe=l(Q(),1);var Af=l(w(),1),bMe=()=>(0,ghe.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},kMe=({name:e,metadata:t})=>{let o=(0,hhe.useContext)(Pr),{removeAllBlockBindings:r}=Ll(),n=bMe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,phe.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(x).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=M(c(mhe.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,Af.jsx)(pe,{group:"bindings",children:(0,Af.jsxs)(ov.__experimentalToolsPanel,{label:(0,Q6.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,Af.jsx)(ov.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,Af.jsx)(py,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,Af.jsx)(ov.__experimentalText,{as:"div",variant:"muted",children:(0,Af.jsx)("p",{children:(0,Q6.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},bhe={edit:kMe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var khe=l(N(),1),vhe=l(A(),1),eA=l(F(),1),R0=l(Y(),1),yhe=l(O(),1);var QO=l(F(),1);function JO(e){let{isOpened:t,expandRevision:o}=(0,QO.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=M(i(x));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,QO.useDispatch)(x);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var rv=l(w(),1),vMe="listView";function _he(e){return(0,R0.hasBlockSupport)(e,vMe)}function yMe({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,yhe.useContext)(mr),{isOpened:r,expandRevision:n,handleToggle:i}=JO(e),{openListViewContentPanel:s}=M((0,eA.useDispatch)(x)),a=_he(t),{hasChildren:c,isNestedListView:u}=(0,eA.useSelect)(h=>{let{getBlockCount:p,getBlockParents:g,getBlockName:b}=h(x),k=g(e,!1).find(y=>{let _=b(y);return _==="core/navigation"||(0,R0.hasBlockSupport)(_,"listView")});return{hasChildren:!!p(e),isNestedListView:k}},[e]),f=(0,R0.getBlockType)(t)?.title||t;return!a||u?null:(0,rv.jsx)(jm,{group:"list",children:(0,rv.jsxs)(vhe.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!c&&(0,rv.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,khe.__)("No items yet.")}),(0,rv.jsx)(sS,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var She={edit:yMe,hasSupport:_he,attributeKeys:[],supportsPatternEditing:!0};var xhe=l(pt(),1),whe=l(Y(),1);function _Me(e){return e.__experimentalLabel||(0,whe.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(o,{context:r})=>{let{metadata:n}=o;if((r==="list-view"||r==="breadcrumb")&&n?.name)return n.name}),e}(0,xhe.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",_Me);var Che=l(Q(),1),Bhe=l(pt(),1),Ehe=l(F(),1);var _s=l(w(),1);function SMe(e){$6(e)}function xMe({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n,isAnyAncestorHidden:i}=(0,Ehe.useSelect)(a=>{let{isBlockSelected:c,hasSelectedInnerBlock:u,isDraggingBlocks:d,getTemplateLock:f,getBlockEditingMode:m,getBlockAttributes:h,getSettings:p}=a(x);if(!d()&&!c(e)||f(e)||m(e)!=="default"||u(e))return{isVisible:!1};let{isBlockParentHiddenAtViewport:g}=M(a(x)),b=h(e),k=p()?.[Ei]?.toLowerCase()||Tt.desktop.value;return{isVisible:!0,blockVisibility:b?.metadata?.blockVisibility,deviceType:k,isAnyAncestorHidden:g(e,k)}},[e]),{isBlockCurrentlyHidden:s}=zi({blockVisibility:r,deviceType:n});return(0,_s.jsxs)(_s.Fragment,{children:[(0,_s.jsx)(SMe,{clientId:e}),o&&!s&&!i&&(0,_s.jsx)(E0,{clientId:e,parentLayout:t})]})}var wMe=(0,Che.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,_s.jsx)(e,{...o},"edit"):(0,_s.jsxs)(_s.Fragment,{children:[(0,_s.jsx)(xMe,{clientId:o.clientId,layout:o.attributes.layout}),(0,_s.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,Bhe.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",wMe);var O0=l(Y(),1),Ihe=l(A(),1),Phe=l(F(),1);var oA=l(O(),1),Rhe=l(N(),1);function The(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=CMe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function CMe(e,t){let o=t.type,r={id:e,label:t.label||e,type:o==="string"?"text":o};return t.enum&&Array.isArray(t.enum)&&(r.elements=t.enum.map(n=>({value:n,label:String(n)}))),r}var tA=l(w(),1);function BMe(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function EMe({name:e,clientId:t,setAttributes:o}){let r=po(),n=(0,oA.useContext)(Pr),i=(0,Phe.useSelect)(u=>{let d=u(x).getBlockAttributes(t);if(!d?.metadata?.bindings)return d;let{getBlockBindingsSource:f}=M(u(O0.store));return Object.entries(d.metadata.bindings).reduce((m,[h,p])=>{let g=f(p.source);if(!g)return m;let b=g.getValues({select:u,context:n,bindings:{[h]:p}});return{...m,...b}},d)},[n,t]),s=(0,O0.getBlockType)(e),{fields:a,form:c}=(0,oA.useMemo)(()=>s?.attributes?The(s.attributes):{fields:[],form:{fields:[]}},[s?.attributes]);return r!=="default"||!a||a.length===0?null:(0,tA.jsx)(pe,{children:(0,tA.jsx)(Ihe.PanelBody,{title:(0,Rhe.__)("Settings"),children:(0,tA.jsx)(g0,{data:i,fields:a,form:c,onChange:o})})})}var Ohe={edit:EMe,attributeKeys:[],hasSupport(e){let t=(0,O0.getBlockType)(e);return BMe(t?.attributes)}};function rA(e){let{style:t}=e,o=t?.dimensions||{},r=yi({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function nA(e){let t=e.style?.border||{};return{className:HF(e)||void 0,style:yi({border:t})}}function J6(e){let{colors:t}=Fd(),o=nA(e),{borderColor:r}=e;if(r){let n=Bp({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function ej(e){let t=e.style?.shadow||"";return{style:yi({shadow:t})}}var tj=l(O(),1);function iA(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=Ci("background-color",t),s=Ci("color",o),a=wh(r),c=a||n?.color?.gradient,u=V(s,a,{[i]:!c&&!!i,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||r||n?.color?.gradient,"has-link-color":n?.elements?.link?.color}),d=n?.color||{},f=yi({color:d});return{className:u||void 0,style:f}}function oj(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=he("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,tj.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,tj.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=iA(e);if(t){let h=va(d,t);m.style.backgroundColor=h.color}if(r&&(m.style.background=_C(f,r)),o){let h=va(d,o);m.style.color=h.color}return m}function rj(e){let{style:t}=e,o=t?.spacing||{};return{style:yi({spacing:o})}}var Ahe=l(A(),1);var{kebabCase:TMe}=M(Ahe.privateApis);function nj(e,t){let o=e?.style?.typography||{};o={...o,fontSize:cc({size:e?.style?.typography?.fontSize},t)};let r=yi({typography:o}),n=e?.fontFamily?`has-${TMe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:V(n,i,Eu(e?.fontSize)),style:r}}var sA=l(O(),1);function ij(e){let[t,o]=(0,sA.useState)(e);return(0,sA.useEffect)(()=>{e&&o(e)},[e]),t}dce([oR,OO,_z,S6,VO,UO,M6,LO,n3,the,fhe,bhe,Y6,Ace,ape,She,Ohe].filter(Boolean));fce([oR,OO,yle,VO,ZF,Fpe,M6,x6,C6,LO,GF,UO,n3,QQ,Y6]);mce([oR,OO,_z,Mce,S6,GF,UO,LO,ZF,VO,x6,C6]);var Lhe={button:"wp-element-button",caption:"wp-element-caption"},IMe=e=>Lhe[e]?Lhe[e]:"";var Nhe=()=>"";var nv=l(O(),1),A0=l(Y(),1),aj=l(gr(),1);var Dhe=l(w(),1);function lj(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return sj(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case nv.StrictMode:case nv.Fragment:return sj(n.children,t,o);case nv.RawHTML:return;case x_.Content:return Mhe(t,o);case TS:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?sj(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return lj(i,t,o)}}function sj(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)lj(e[o],...t)}function Mhe(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,A0.getSaveElement)(r,n,(0,Dhe.jsx)(x_.Content,{}));lj(s,e,i)}}function Vhe(e=[]){A0.__unstableGetBlockProps.skipFilters=!0;let t=[];return Mhe(t,e),A0.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof aj.RichTextData?o:aj.RichTextData.fromHTMLString(o))}var Fhe=l(A(),1);var cj=l(w(),1);function zhe({clientId:e,resizableBoxProps:t,...o}){return(0,cj.jsx)(Ki,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,cj.jsx)(Fhe.ResizableBox,{...t})})}var N0=l(O(),1),aA=l(F(),1),ha=l(A(),1),L0=l(N(),1);var Ss=l(w(),1);function jhe({rules:e}){let[t,o]=(0,N0.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,aA.useSelect)(p=>M(p(x)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:c}=M((0,aA.useDispatch)(x));if((0,N0.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,N0.useEffect)(()=>{o(!1)},[r]),!i)return;let u=typeof i=="object"&&i!==null,d=u?i.description:i,f=u&&i.requireConfirmation,m=f&&!t,h=()=>{c(r,n,!0),s()};return(0,Ss.jsx)(ha.Modal,{title:(0,L0.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,Ss.jsxs)(ha.__experimentalVStack,{spacing:4,children:[(0,Ss.jsxs)("div",{children:[(0,Ss.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,Ss.jsxs)("p",{children:[i.warning&&(0,Ss.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,Ss.jsx)(ha.CheckboxControl,{label:(0,L0.__)("I understand the consequences"),checked:t,onChange:o}),(0,Ss.jsxs)(ha.__experimentalHStack,{justify:"right",children:[(0,Ss.jsx)(ha.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,L0.__)("Cancel")}),(0,Ss.jsx)(ha.Button,{variant:"primary",onClick:h,disabled:m,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,L0.__)("Delete")})]})]})})}var uj=l(O(),1);var iv=l(A(),1),Hhe=l(O(),1),Un=l(N(),1),lA=l(w(),1),Uhe=[{value:"fill",label:(0,Un._x)("Fill","Scale option for dimensions control"),help:(0,Un.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,Un._x)("Contain","Scale option for dimensions control"),help:(0,Un.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,Un._x)("Cover","Scale option for dimensions control"),help:(0,Un.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,Un._x)("None","Scale option for dimensions control"),help:(0,Un.__)("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,Un._x)("Scale down","Scale option for dimensions control"),help:(0,Un.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function Ghe({panelId:e,value:t,onChange:o,options:r=Uhe,defaultValue:n=Uhe[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,Hhe.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,lA.jsx)(iv.__experimentalToolsPanelItem,{label:(0,Un.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,lA.jsx)(iv.__experimentalToggleGroupControl,{label:(0,Un.__)("Scale"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,lA.jsx)(iv.__experimentalToggleGroupControlOption,{...c},c.value))})})}var sv=l(A(),1),Yp=l(N(),1),eu=l(w(),1);function Whe({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,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsx)(sv.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Yp.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,eu.jsx)(sv.__experimentalUnitControl,{label:(0,Yp.__)("Width"),placeholder:(0,Yp.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,eu.jsx)(sv.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Yp.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,eu.jsx)(sv.__experimentalUnitControl,{label:(0,Yp.__)("Height"),placeholder:(0,Yp.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var Lf=l(w(),1);function PMe({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,[h,p]=(0,uj.useState)(m),[g,b]=(0,uj.useState)(f),v=u&&d?"custom":g,k=f||u&&d;return(0,Lf.jsxs)(Lf.Fragment,{children:[c.includes("aspectRatio")&&(0,Lf.jsx)(f2,{panelId:e,options:r,defaultValue:n,value:v,onChange:y=>{let _={...t};y=y==="auto"?null:y,b(y),y?_.aspectRatio=y:delete _.aspectRatio,y?h?_.scale=h:(_.scale=s,p(s)):delete _.scale,y!=="custom"&&u&&d&&delete _.height,o(_)}}),c.includes("widthHeight")&&(0,Lf.jsx)(Whe,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:y,height:_})=>{let S={...t};y=y==="auto"?null:y,_=_==="auto"?null:_,y?S.width=y:delete S.width,_?S.height=_:delete S.height,y&&_?delete S.aspectRatio:g&&(S.aspectRatio=g),!g&&!!y!=!!_?delete S.scale:h?S.scale=h:(S.scale=s,p(s)),o(S)}}),c.includes("scale")&&k&&(0,Lf.jsx)(Ghe,{panelId:e,options:i,defaultValue:s,value:h,onChange:y=>{let _={...t};y=y==="fill"?null:y,p(y),y?_.scale=y:delete _.scale,o(_)}})]})}var $he=PMe;var cA=l(A(),1),tu=l(N(),1),dj=l(w(),1),Khe=[{label:(0,tu._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,tu._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,tu._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,tu._x)("Full Size","Image size option for resolution control"),value:"full"}];function Yhe({panelId:e,value:t,onChange:o,options:r=Khe,defaultValue:n=Khe[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,dj.jsx)(cA.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,tu.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,dj.jsx)(cA.SelectControl,{label:(0,tu.__)("Resolution"),value:a,options:r,onChange:o,help:(0,tu.__)("Select the size of the source image."),size:"__unstable-large"})})}var qp=l(N(),1),av=l(A(),1),Zhe=l(F(),1);var ga=l(N(),1),qhe={a:(0,ga.__)("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,ga.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,ga.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,ga.__)("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,ga.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,ga.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,ga.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,ga.__)("The <main> element should be used for the primary content of your document only."),nav:(0,ga.__)("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,ga.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var D0=l(w(),1);function Xhe({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,qp.__)("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,Zhe.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:c,getBlockAttributes:u}=a(x);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,qp.sprintf)((0,qp.__)("%s (Already in use)"),a.label)}:a);return(0,D0.jsxs)(av.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,D0.jsx)(av.SelectControl,{__next40pxDefaultSize:!0,label:(0,qp.__)("HTML element"),options:s,value:e,onChange:t,help:qhe[e]}),e==="main"&&i&&(0,D0.jsx)(av.Notice,{status:"warning",isDismissible:!1,children:(0,qp.__)("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 xs=l(A(),1),lv=l(O(),1),uA=l(N(),1);var Hn=l(A(),1);var Qhe=l(Me(),1);var Si=l(w(),1),{Badge:RMe}=M(Hn.privateApis);function Jhe({title:e,url:t,image:o,badges:r}){return(0,Si.jsxs)(Hn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,Si.jsx)(Hn.FlexItem,{className:"link-preview-button__content",children:(0,Si.jsxs)(Hn.__experimentalHStack,{alignment:"top",children:[o&&(0,Si.jsx)(Hn.FlexItem,{className:"link-preview-button__image-container",children:(0,Si.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,Si.jsxs)(Hn.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,Si.jsx)(Hn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:(0,Qhe.__unstableStripHTML)(e)}),t&&(0,Si.jsx)(Hn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,Si.jsx)(Hn.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,Si.jsx)(RMe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,Si.jsx)(Be,{icon:pr,className:"link-preview-button__icon"})]})}var xi=l(w(),1);function fj({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,lv.useState)(!1),a=(0,lv.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,lv.useRef)(null),{baseControlProps:f,controlProps:m}=(0,xs.useBaseControlProps)({help:n}),h=p=>{if(s(!1),p){let g={url:p.url,kind:p.kind,type:p.type,id:p.id,title:p.title};t(g)}};return(0,xi.jsxs)(xs.BaseControl,{...f,children:[(0,xi.jsx)(xs.BaseControl.VisualLabel,{children:r}),(0,xi.jsxs)(xs.Button,{ref:d,onClick:()=>s(!i),"aria-haspopup":"dialog","aria-expanded":i,"aria-describedby":m["aria-describedby"],variant:"secondary",__next40pxDefaultSize:!0,className:"link-preview-button",children:[r&&(0,xi.jsxs)(xs.VisuallyHidden,{children:[r,":"]}),(0,xi.jsx)(Jhe,{title:e.title||(0,uA.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,xi.jsx)(xs.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,xi.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,xi.jsxs)(xs.VisuallyHidden,{children:[(0,xi.jsx)("h2",{id:c,children:(0,uA.__)("Select a link")}),(0,xi.jsx)("p",{id:u,children:(0,uA.__)("Search for and add a link to the navigation item.")})]}),(0,xi.jsx)(Wd,{value:null,onChange:h,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var mj={};Lj(mj,{...zF,ExperimentalBlockCanvas:X3,BlockCanvasCover:tI,ExperimentalBlockEditorProvider:Jh,getDuotoneFilter:FO,getRichTextValues:Vhe,PrivateQuickInserter:aE,extractWords:CC,getNormalizedSearchTerms:ay,normalizeString:sy,PrivateListView:sS,ResizableBoxPopover:zhe,InspectorControlsLastItem:Z2,useHasBlockToolbar:ET,cleanEmptyObject:Ae,usePrivateStyleOverride:uc,BlockQuickNavigation:Y2,LayoutStyle:p9,BlockManager:nR,BlockRemovalWarningModal:jhe,useLayoutClasses:WO,useLayoutStyles:U6,DimensionsTool:$he,ResolutionTool:Yhe,TabbedSidebar:rE,TextAlignmentControl:a2,usesContextKey:mF,useFlashEditableBlocks:A1,HTMLElementControl:Xhe,useZoomOut:f_,globalStylesDataKey:Bi,globalStylesLinksDataKey:X0,selectBlockPatternsKey:au,requiresWrapperOnCopy:O5,PrivateRichText:IS,PrivateInserterLibrary:rz,reusableBlocksSelectKey:Q0,PrivateBlockPopover:Lm,PrivatePublishDateTimePicker:dz,useSpacingSizes:HP,useBlockDisplayTitle:vr,BlockStyleVariationOverridesWithConfig:M3,setBackgroundStyleDefaults:F2,sectionRootClientIdKey:lu,CommentIconSlotFill:rT,CommentIconToolbarSlotFill:yT,mediaEditKey:J0,getMediaSelectKey:ex,deviceTypeKey:Ei,isIsolatedEditorKey:cu,isNavigationOverlayContextKey:tx,isNavigationPostEditorKey:Zj,mediaUploadOnSuccessKey:ox,useBlockElement:ot,useBlockElementRef:fm,LinkPicker:fj,useRemoteUrlData:mP,PrivateBlockContext:mr,useListViewPanelState:JO,isHashLink:Df,isRelativePath:Mf});return age(OMe);})(); |
| 234 |
/*! Bundled license information: |
| 235 |
|
| 236 |
autosize/dist/autosize.js: |
| 237 |
(*! |
| 238 |
autosize 4.0.2 |
| 239 |
license: MIT |
| 240 |
http://www.jacklmoore.com/autosize |
| 241 |
*) |
| 242 |
|
| 243 |
normalize-wheel/src/isEventSupported.js: |
| 244 |
(** |
| 245 |
* Checks if an event is supported in the current execution environment. |
| 246 |
* |
| 247 |
* NOTE: This will not work correctly for non-generic events such as `change`, |
| 248 |
* `reset`, `load`, `error`, and `select`. |
| 249 |
* |
| 250 |
* Borrows from Modernizr. |
| 251 |
* |
| 252 |
* @param {string} eventNameSuffix Event name, e.g. "click". |
| 253 |
* @param {?boolean} capture Check if the capture phase is supported. |
| 254 |
* @return {boolean} True if the event is supported. |
| 255 |
* @internal |
| 256 |
* @license Modernizr 3.0.0pre (Custom Build) | MIT |
| 257 |
*) |
| 258 |
*/ |
| 259 |
//# sourceMappingURL=index.min.js.map |
| 260 |
|