- md5
- 9e742ae1fe546a34cdadee84b859531b
- sha1
- 837558bd43c6b6fd46c72afa8b1a3cd3a79ab1a4
- sha256
- 3c3191b707e46b8943a1133b83950274e223fd7849d4e036f4487e954b5534dc
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
"use strict";var wp;(wp||={}).blockEditor=(()=>{var Mme=Object.create;var n0=Object.defineProperty;var Dme=Object.getOwnPropertyDescriptor;var Vme=Object.getOwnPropertyNames;var Fme=Object.getPrototypeOf,zme=Object.prototype.hasOwnProperty;var re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ip=(e,t)=>{for(var o in t)n0(e,o,{get:t[o],enumerable:!0})},r6=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Vme(t))!zme.call(e,n)&&n!==o&&n0(e,n,{get:()=>t[n],enumerable:!(r=Dme(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?Mme(Fme(e)):{},r6(t||!e||!e.__esModule?n0(o,"default",{value:e,enumerable:!0}):o,e)),jme=e=>r6(n0({},"__esModule",{value:!0}),e);var $=re((cLe,i6)=>{i6.exports=window.wp.blocks});var P=re((uLe,s6)=>{s6.exports=window.wp.element});var F=re((dLe,a6)=>{a6.exports=window.wp.data});var Z=re((fLe,l6)=>{l6.exports=window.wp.compose});var rt=re((mLe,c6)=>{c6.exports=window.wp.hooks});var A=re((kLe,y6)=>{y6.exports=window.wp.components});var bO=re((vLe,S6)=>{S6.exports=window.wp.privateApis});var Re=re((BLe,B6)=>{B6.exports=window.wp.deprecated});var w=re((ELe,E6)=>{E6.exports=window.ReactJSXRuntime});var un=re((ILe,I6)=>{I6.exports=window.wp.url});var N=re((zLe,M6)=>{M6.exports=window.wp.i18n});var bf=re((jLe,D6)=>{"use strict";D6.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],o.get(n[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(t[n]!==o[n])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var Y=re((XLe,G6)=>{G6.exports=window.wp.primitives});var ur=re((kVe,W6)=>{W6.exports=window.wp.richText});var K6=re((vVe,$6)=>{$6.exports=window.wp.blockSerializationDefaultParser});var Zo=re((qVe,Tj)=>{Tj.exports=window.wp.a11y});var Ti=re((ZVe,Lj)=>{Lj.exports=window.wp.notices});var Xp=re((XVe,Nj)=>{Nj.exports=window.wp.preferences});var kU=re((Z3e,Uw)=>{var hU={\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"},gU=Object.keys(hU).join("|"),ove=new RegExp(gU,"g"),rve=new RegExp(gU,"");function nve(e){return hU[e]}var bU=function(e){return e.replace(ove,nve)},ive=function(e){return!!e.match(rve)};Uw.exports=bU;Uw.exports.has=ive;Uw.exports.remove=bU});var PU=re((kFe,IU)=>{IU.exports=window.wp.apiFetch});var pM=re((vFe,RU)=>{RU.exports=window.wp.htmlEntities});var zv=re((WFe,XU)=>{XU.exports=window.wp.styleEngine});var it=re((G4e,yH)=>{yH.exports=window.wp.keycodes});var Fe=re((cze,LH)=>{LH.exports=window.wp.dom});var MH=re(TM=>{"use strict";Object.defineProperty(TM,"__esModule",{value:!0});TM.default=NH;function NH(){}NH.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 S=v&&v.newPos+1<a,x=k&&0<=y&&y<c;if(!S&&!x){f[g]=void 0;continue}if(!S||x&&v.newPos<k.newPos?(b=Qve(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(Xve(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 Xve(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 Qve(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var VH=re(Yv=>{"use strict";Object.defineProperty(Yv,"__esModule",{value:!0});Yv.diffChars=tye;Yv.characterDiff=void 0;var Jve=eye(MH());function eye(e){return e&&e.__esModule?e:{default:e}}var DH=new Jve.default;Yv.characterDiff=DH;function tye(e,t,o){return DH.diff(e,t,o)}});var zr=re((wze,QH)=>{QH.exports=window.React});var e8=re((Cze,JH)=>{"use strict";var iye="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";JH.exports=iye});var n8=re((Bze,r8)=>{"use strict";var sye=e8();function t8(){}function o8(){}o8.resetWarningCache=t8;r8.exports=function(){function e(r,n,i,s,a,c){if(c!==sye){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:o8,resetWarningCache:t8};return o.PropTypes=o,o}});var s8=re((Ize,i8)=>{i8.exports=n8()();var Eze,Tze});var l8=re((bC,a8)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof bC<"u")t(a8,bC);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(bC,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 S=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=S}c.style.overflowY=y}function p(y){for(var S=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&S.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),y=y.parentNode;return S}function g(){if(c.scrollHeight!==0){var y=p(c),S=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,y.forEach(function(x){x.node.scrollTop=x.scrollTop}),S&&(document.documentElement.scrollTop=S)}}function b(){g();var y=Math.round(parseFloat(c.style.height)),S=window.getComputedStyle(c,null),x=S.boxSizing==="content-box"?Math.round(parseFloat(S.height)):c.offsetHeight;if(x<y?S.overflowY==="hidden"&&(h("scroll"),g(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):S.overflowY!=="hidden"&&(h("hidden"),g(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==x){f=x;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(S){c.style[S]=y[S]}),o.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",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 u8=re((Pze,c8)=>{var aye=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};c8.exports=aye});var f8=re((Rze,d8)=>{var PM=u8();function lye(e){var t=PM(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=PM(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=PM(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}d8.exports=lye});var p8=re(Rl=>{"use strict";var cye=Rl&&Rl.__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)}})(),RM=Rl&&Rl.__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},uye=Rl&&Rl.__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};Rl.__esModule=!0;var vC=zr(),qv=s8(),kC=l8(),dye=f8(),fye=dye,m8="autosize:resized",mye=(function(e){cye(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:fye(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&&kC(o.textarea)}):this.textarea&&kC(this.textarea),this.textarea&&this.textarea.addEventListener(m8,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(m8,this.onResize),kC.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=uye(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,h=s&&m?m*s:null;return vC.createElement("textarea",RM({},f,{onChange:this.onChange,style:h?RM({},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&&kC.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:qv.number,maxRows:qv.number,onResize:qv.func,innerRef:qv.any,async:qv.bool},t})(vC.Component);Rl.TextareaAutosize=vC.forwardRef(function(e,t){return vC.createElement(mye,RM({},e,{innerRef:t}))})});var OM=re((Aze,h8)=>{"use strict";var pye=p8();h8.exports=pye.TextareaAutosize});var Zv=re((Mze,v8)=>{v8.exports=window.wp.warning});var g7=re((e6e,h7)=>{h7.exports=window.ReactDOM});var Is=re((T6e,W7)=>{W7.exports=window.wp.keyboardShortcuts});var m9=re((jje,f9)=>{f9.exports=window.wp.uploadMedia});var E1=re(()=>{});var T1=re(()=>{});var ND=re(()=>{});var wG=re((pHe,xG)=>{var x_e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",w_e=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},C_e=(e=21)=>{let t="",o=e|0;for(;o--;)t+=x_e[Math.random()*64|0];return t};xG.exports={nanoid:C_e,customAlphabet:w_e}});var MD=re(()=>{});var BG=re((bHe,DD)=>{var Ce=String,CG=function(){return{isColorSupported:!1,reset:Ce,bold:Ce,dim:Ce,italic:Ce,underline:Ce,inverse:Ce,hidden:Ce,strikethrough:Ce,black:Ce,red:Ce,green:Ce,yellow:Ce,blue:Ce,magenta:Ce,cyan:Ce,white:Ce,gray:Ce,bgBlack:Ce,bgRed:Ce,bgGreen:Ce,bgYellow:Ce,bgBlue:Ce,bgMagenta:Ce,bgCyan:Ce,bgWhite:Ce,blackBright:Ce,redBright:Ce,greenBright:Ce,yellowBright:Ce,blueBright:Ce,magentaBright:Ce,cyanBright:Ce,whiteBright:Ce,bgBlackBright:Ce,bgRedBright:Ce,bgGreenBright:Ce,bgYellowBright:Ce,bgBlueBright:Ce,bgMagentaBright:Ce,bgCyanBright:Ce,bgWhiteBright:Ce}};DD.exports=CG();DD.exports.createColors=CG});var I1=re((kHe,IG)=>{"use strict";var EG=BG(),TG=MD(),wy=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=EG.isColorSupported),TG&&t&&(o=TG(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}=EG.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+`
`+h+a("^")}return" "+c(m)+u}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`
`+t+`
`),this.name+": "+this.message+t}};IG.exports=wy;wy.default=wy});var PG=re(()=>{});var LG=re((SHe,AG)=>{"use strict";var{SourceMapConsumer:RG,SourceMapGenerator:OG}=E1(),{existsSync:B_e,readFileSync:E_e}=PG(),{dirname:VD,join:T_e}=T1();function I_e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Cy=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=VD(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new RG(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 I_e(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=VD(t),B_e(t))return this.mapFile=t,E_e(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 RG)return OG.fromSourceMap(o).toString();if(o instanceof OG)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=T_e(VD(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)}};AG.exports=Cy;Cy.default=Cy});var HD=re((_He,VG)=>{"use strict";var{SourceMapConsumer:P_e,SourceMapGenerator:R_e}=E1(),{fileURLToPath:NG,pathToFileURL:P1}=ND(),{isAbsolute:jD,resolve:UD}=T1(),{nanoid:O_e}=wG(),FD=MD(),MG=I1(),A_e=LG(),zD=Symbol("fromOffsetCache"),L_e=!!(P_e&&R_e),DG=!!(UD&&jD),Mh=class{constructor(t,o={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,o.from&&(!DG||/^\w+:\/\//.test(o.from)||jD(o.from)?this.file=o.from:this.file=UD(o.from)),DG&&L_e){let r=new A_e(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 "+O_e(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 MG(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 MG(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&&(P1&&(i.input.url=P1(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[zD])r=this[zD];else{let i=this.css.split(`
`);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[zD]=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:UD(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;jD(s.source)?c=P1(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||P1(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(NG)u.file=NG(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}};VG.exports=Mh;Mh.default=Mh;FD&&FD.registerInput&&FD.registerInput(Mh)});var WD=re((xHe,GG)=>{"use strict";var{SourceMapConsumer:zG,SourceMapGenerator:R1}=E1(),{dirname:O1,relative:jG,resolve:UG,sep:HG}=T1(),{pathToFileURL:FG}=ND(),N_e=HD(),M_e=!!(zG&&R1),D_e=!!(O1&&UG&&jG&&HG),GD=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=`
`;this.css.includes(`\r
`)&&(o=`\r
`),this.css+=o+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let o=this.toUrl(this.path(t.file)),r=t.root||O1(t.file),n;this.mapOpts.sourcesContent===!1?(n=new zG(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(),D_e&&M_e&&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=R1.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new R1({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 R1({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(`
`),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?O1(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=O1(UG(r,this.mapOpts.annotation)));let n=jG(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 N_e(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(FG){let r=FG(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;HG==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};GG.exports=GD});var $D=re((wHe,$G)=>{"use strict";var WG={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function V_e(e){return e[0].toUpperCase()+e.slice(1)}var By=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(`
`)){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 WG[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"+V_e(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=WG[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(`
`)&&(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(`
`)&&(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(`
`)&&(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(`
`)&&(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(`
`);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)}};$G.exports=By;By.default=By});var A1=re((CHe,KG)=>{"use strict";var F_e=$D();function KD(e,t){new F_e(t).stringify(e)}KG.exports=KD;KD.default=KD});var YD=re((BHe,qG)=>{"use strict";var YG={};qG.exports=function(t){YG[t]||(YG[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var L1=re((EHe,qD)=>{"use strict";qD.exports.isClean=Symbol("isClean");qD.exports.my=Symbol("my")});var M1=re((THe,ZG)=>{"use strict";var{isClean:N1,my:z_e}=L1(),j_e=I1(),U_e=$D(),H_e=A1();function ZD(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=>ZD(s,o)):(i==="object"&&n!==null&&(n=ZD(n)),o[r]=n)}return o}var Ey=class{constructor(t={}){this.raws={},this[N1]=!1,this[z_e]=!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=ZD(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 j_e(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[N1]){this[N1]=!1;let t=this;for(;t=t.parent;)t[N1]=!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]===`
`?(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 U_e().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=H_e){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}};ZG.exports=Ey;Ey.default=Ey});var XD=re((IHe,XG)=>{"use strict";var G_e=M1(),Ty=class extends G_e{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]==="$"}};XG.exports=Ty;Ty.default=Ty});var QD=re((PHe,QG)=>{"use strict";var W_e=M1(),Iy=class extends W_e{constructor(t){super(t),this.type="comment"}};QG.exports=Iy;Iy.default=Iy});var tm=re((RHe,aW)=>{"use strict";var{isClean:JG,my:eW}=L1(),tW=XD(),oW=QD(),$_e=M1(),rW,JD,e5,nW;function iW(e){return e.map(t=>(t.nodes&&(t.nodes=iW(t.nodes)),delete t.source,t))}function sW(e){if(e[JG]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)sW(t)}var Rs=class e extends $_e{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=iW(rW(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 tW(t)]}else if(t.selector)t=[new JD(t)];else if(t.name)t=[new e5(t)];else if(t.text)t=[new oW(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[eW]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[JG]&&sW(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]}};Rs.registerParse=e=>{rW=e};Rs.registerRule=e=>{JD=e};Rs.registerAtRule=e=>{e5=e};Rs.registerRoot=e=>{nW=e};aW.exports=Rs;Rs.default=Rs;Rs.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,e5.prototype):e.type==="rule"?Object.setPrototypeOf(e,JD.prototype):e.type==="decl"?Object.setPrototypeOf(e,tW.prototype):e.type==="comment"?Object.setPrototypeOf(e,oW.prototype):e.type==="root"&&Object.setPrototypeOf(e,nW.prototype),e[eW]=!0,e.nodes&&e.nodes.forEach(t=>{Rs.rebuild(t)})}});var uW=re((OHe,cW)=>{"use strict";var D1=/[\t\n\f\r "#'()/;[\\\]{}]/g,V1=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,K_e=/.[\r\n"'(/\\]/,lW=/[\da-f]/i;cW.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 S(I){throw t.error("Unclosed "+I,b)}function x(){return k.length===0&&b>=g}function C(I){if(k.length)return k.pop();if(b>=g)return;let O=I?I.ignoreUnclosed:!1;switch(i=r.charCodeAt(b),i){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,i=r.charCodeAt(s);while(i===32||i===10||i===9||i===13||i===12);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||O){s=b;break}else S("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||K_e.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||O){s=b+1;break}else S("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:{D1.lastIndex=b+1,D1.test(r),D1.lastIndex===0?s=r.length-1:s=D1.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,lW.test(r.charAt(s)))){for(;lW.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||O?s=r.length:S("comment")),p=["comment",r.slice(b,s+1),b,s],b=s):(V1.lastIndex=b+1,V1.test(r),V1.lastIndex===0?s=r.length-1:s=V1.lastIndex-2,p=["word",r.slice(b,s+1),b,s],v.push(p),b=s);break}}return b++,p}function B(I){k.push(I)}return{back:B,endOfFile:x,nextToken:C,position:y}}});var mW=re((AHe,fW)=>{"use strict";var dW=tm(),Dh=class extends dW{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)}};fW.exports=Dh;Dh.default=Dh;dW.registerAtRule(Dh)});var F1=re((LHe,bW)=>{"use strict";var pW=tm(),hW,gW,Nu=class extends pW{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 hW(new gW,this,t).stringify()}};Nu.registerLazyResult=e=>{hW=e};Nu.registerProcessor=e=>{gW=e};bW.exports=Nu;Nu.default=Nu;pW.registerRoot(Nu)});var vW=re((NHe,kW)=>{"use strict";var Py={comma(e){return Py.split(e,[","],!0)},space(e){let t=[" ",`
`," "];return Py.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}};kW.exports=Py;Py.default=Py});var _W=re((MHe,SW)=>{"use strict";var yW=tm(),Y_e=vW(),Vh=class extends yW{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Y_e.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)}};SW.exports=Vh;Vh.default=Vh;yW.registerRule(Vh)});var BW=re((DHe,CW)=>{"use strict";var q_e=XD(),Z_e=uW(),X_e=QD(),Q_e=mW(),J_e=F1(),xW=_W(),wW={empty:!0,space:!0};function e0e(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var t5=class{constructor(t){this.input=t,this.root=new J_e,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 Q_e;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 X_e;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=Z_e(this.input)}decl(t,o){let r=new q_e;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]||e0e(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 xW;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",!wW[f]&&!wW[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 xW;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})}};CW.exports=t5});var o5=re((VHe,EW)=>{"use strict";var t0e=tm(),o0e=BW(),r0e=HD();function z1(e,t){let o=new r0e(e,t),r=new o0e(o);try{r.parse()}catch(n){throw n}return r.root}EW.exports=z1;z1.default=z1;t0e.registerParse(z1)});var IW=re((FHe,TW)=>{"use strict";var Ry=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}};TW.exports=Ry;Ry.default=Ry});var r5=re((zHe,PW)=>{"use strict";var n0e=IW(),Oy=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 n0e(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};PW.exports=Oy;Oy.default=Oy});var OW=re((UHe,RW)=>{"use strict";var i0e=WD(),s0e=A1(),jHe=YD(),a0e=o5(),l0e=r5(),Ay=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=s0e;this.result=new l0e(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new i0e(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=a0e;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"}};RW.exports=Ay;Ay.default=Ay});var n5=re((HHe,NW)=>{"use strict";var c0e=tm(),AW,LW,om=class extends c0e{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new AW(new LW,this,t).stringify()}};om.registerLazyResult=e=>{AW=e};om.registerProcessor=e=>{LW=e};NW.exports=om;om.default=om});var zW=re((WHe,FW)=>{"use strict";var{isClean:xa,my:u0e}=L1(),d0e=WD(),f0e=A1(),m0e=tm(),p0e=n5(),GHe=YD(),MW=r5(),h0e=o5(),g0e=F1(),b0e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},k0e={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},v0e={Once:!0,postcssPlugin:!0,prepare:!0},Fh=0;function Ly(e){return typeof e=="object"&&typeof e.then=="function"}function VW(e){let t=!1,o=b0e[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,Fh,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,Fh,o+"Exit"]:[o,o+"Exit"]}function DW(e){let t;return e.type==="document"?t=["Document",Fh,"DocumentExit"]:e.type==="root"?t=["Root",Fh,"RootExit"]:t=VW(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function i5(e){return e[xa]=!1,e.nodes&&e.nodes.forEach(t=>i5(t)),e}var s5={},Mu=class e{constructor(t,o,r){this.stringified=!1,this.processed=!1;let n;if(typeof o=="object"&&o!==null&&(o.type==="root"||o.type==="document"))n=i5(o);else if(o instanceof e||o instanceof MW)n=i5(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=h0e;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[u0e]&&m0e.rebuild(n)}this.result=new MW(t,n,r),this.helpers={...s5,postcss:s5,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(!k0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!v0e[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(Ly(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[xa];){t[xa]=!0;let o=[DW(t)];for(;o.length>0;){let r=this.visitTick(o);if(Ly(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 Ly(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=f0e;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new d0e(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(Ly(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[xa];)t[xa]=!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(Ly(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[xa]){a[xa]=!0,t.push(DW(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===Fh){r.nodes&&r.nodes.length&&(r[xa]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[xa]=!0;let o=VW(t);for(let r of o)if(r===Fh)t.nodes&&t.each(n=>{n[xa]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Mu.registerPostcss=e=>{s5=e};FW.exports=Mu;Mu.default=Mu;g0e.registerLazyResult(Mu);p0e.registerLazyResult(Mu)});var UW=re(($He,jW)=>{"use strict";var y0e=OW(),S0e=zW(),_0e=n5(),x0e=F1(),rm=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 y0e(this,t,o):new S0e(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};jW.exports=rm;rm.default=rm;x0e.registerProcessor(rm);_0e.registerProcessor(rm)});var WW=re((KHe,GW)=>{GW.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&&HW(s.source.input.file,n)||i.length&&s.source.input.file&&!HW(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&&w0e(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function HW(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function w0e(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var KW=re((YHe,$W)=>{var a5=40,l5=41,j1=39,c5=34,u5=92,zh=47,d5=44,f5=58,U1=42,C0e=117,B0e=85,E0e=43,T0e=/^[a-f0-9?-]+$/i;$W.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===l5&&g?y=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===d5||m===f5||m===zh&&o.charCodeAt(r+1)!==U1&&(!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===j1||m===c5){r=f,n=m===j1?"'":'"',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)===u5;)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===zh&&o.charCodeAt(f+1)===U1)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===zh||m===U1)&&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===zh||m===d5||m===f5)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(a5===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!==j1&&m!==c5){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===u5;)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(l5===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===u5&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<h&&!(m<=32||m===j1||m===c5||m===d5||m===f5||m===zh||m===a5||m===U1&&b&&b.type==="function"&&b.value==="calc"||m===zh&&b.type==="function"&&b.value==="calc"||m===l5&&g));s=o.slice(f,r),a5===m?v=s:(C0e===s.charCodeAt(0)||B0e===s.charCodeAt(0))&&E0e===s.charCodeAt(1)&&T0e.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 qW=re((qHe,YW)=>{YW.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 JW=re((ZHe,QW)=>{function ZW(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=XW(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function XW(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=ZW(e[r],t)+o;return o}return ZW(e,t)}QW.exports=XW});var t$=re((XHe,e$)=>{var H1=45,G1=43,m5=46,I0e=101,P0e=69;function R0e(e){var t=e.charCodeAt(0),o;if(t===G1||t===H1){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===m5&&r>=48&&r<=57}return t===m5?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}e$.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!R0e(e))return!1;for(r=e.charCodeAt(t),(r===G1||r===H1)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===m5&&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===I0e||r===P0e)&&(n>=48&&n<=57||(n===G1||n===H1)&&i>=48&&i<=57))for(t+=n===G1||n===H1?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 i$=re((QHe,n$)=>{var O0e=KW(),o$=qW(),r$=JW();function Du(e){return this instanceof Du?(this.nodes=O0e(e),this):new Du(e)}Du.prototype.toString=function(){return Array.isArray(this.nodes)?r$(this.nodes):""};Du.prototype.walk=function(e,t){return o$(this.nodes,e,t),this};Du.unit=t$();Du.walk=o$;Du.stringify=r$;n$.exports=Du});var a$=re((JHe,p5)=>{var s$=i$();p5.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=s$(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=s$.stringify(n))}}};p5.exports.postcss=!0});var y$=re((m8e,v$)=>{v$.exports=window.wp.priorityQueue});var O5=re((s9e,vK)=>{vK.exports=window.wp.blob});var Xy=re((PWe,TY)=>{TY.exports=window.wp.isShallowEqual});var KE=re((Fqe,vX)=>{vX.exports=window.wp.tokenList});var IV=re((Xqe,AX)=>{"use strict";var p1e=function(t){return h1e(t)&&!g1e(t)};function h1e(e){return!!e&&typeof e=="object"}function g1e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||v1e(e)}var b1e=typeof Symbol=="function"&&Symbol.for,k1e=b1e?Symbol.for("react.element"):60103;function v1e(e){return e.$$typeof===k1e}function y1e(e){return Array.isArray(e)?[]:{}}function SS(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Pg(y1e(e),e,t):e}function S1e(e,t,o){return e.concat(t).map(function(r){return SS(r,o)})}function _1e(e,t){if(!t.customMerge)return Pg;var o=t.customMerge(e);return typeof o=="function"?o:Pg}function x1e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function RX(e){return Object.keys(e).concat(x1e(e))}function OX(e,t){try{return t in e}catch{return!1}}function w1e(e,t){return OX(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function C1e(e,t,o){var r={};return o.isMergeableObject(e)&&RX(e).forEach(function(n){r[n]=SS(e[n],o)}),RX(t).forEach(function(n){w1e(e,n)||(OX(e,n)&&o.isMergeableObject(t[n])?r[n]=_1e(n,o)(e[n],t[n],o):r[n]=SS(t[n],o))}),r}function Pg(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||S1e,o.isMergeableObject=o.isMergeableObject||p1e,o.cloneUnlessOtherwiseSpecified=SS;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):C1e(e,t,o):SS(t,o)}Pg.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return Pg(r,n,o)},{})};var B1e=Pg;AX.exports=B1e});var zQ=re((wQe,FQ)=>{FQ.exports=window.wp.commands});var hc=re((tot,ote)=>{ote.exports=window.wp.date});var Nte=re((Uot,Lte)=>{var Ite=!1,Um,T3,I3,dI,fI,Pte,mI,P3,R3,O3,Rte,A3,L3,Ote,Ate;function Bn(){if(!Ite){Ite=!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(A3=/\b(iPhone|iP[ao]d)/.exec(e),L3=/\b(iP[ao]d)/.exec(e),O3=/Android/i.exec(e),Ote=/FBAN\/\w+;/i.exec(e),Ate=/Mobile/i.exec(e),Rte=!!/Win64/.exec(e),t){Um=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Um&&document&&document.documentMode&&(Um=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Pte=r?parseFloat(r[1])+4:Um,T3=t[2]?parseFloat(t[2]):NaN,I3=t[3]?parseFloat(t[3]):NaN,dI=t[4]?parseFloat(t[4]):NaN,dI?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),fI=t&&t[1]?parseFloat(t[1]):NaN):fI=NaN}else Um=T3=I3=fI=dI=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);mI=n?parseFloat(n[1].replace("_",".")):!0}else mI=!1;P3=!!o[2],R3=!!o[3]}else mI=P3=R3=!1}}var N3={ie:function(){return Bn()||Um},ieCompatibilityMode:function(){return Bn()||Pte>Um},ie64:function(){return N3.ie()&&Rte},firefox:function(){return Bn()||T3},opera:function(){return Bn()||I3},webkit:function(){return Bn()||dI},safari:function(){return N3.webkit()},chrome:function(){return Bn()||fI},windows:function(){return Bn()||P3},osx:function(){return Bn()||mI},linux:function(){return Bn()||R3},iphone:function(){return Bn()||A3},mobile:function(){return Bn()||A3||L3||O3||Ate},nativeApp:function(){return Bn()||Ote},android:function(){return Bn()||O3},ipad:function(){return Bn()||L3}};Lte.exports=N3});var Dte=re((Hot,Mte)=>{"use strict";var pI=!!(typeof window<"u"&&window.document&&window.document.createElement),gEe={canUseDOM:pI,canUseWorkers:typeof Worker<"u",canUseEventListeners:pI&&!!(window.addEventListener||window.attachEvent),canUseViewport:pI&&!!window.screen,isInWorker:!pI};Mte.exports=gEe});var jte=re((Got,zte)=>{"use strict";var Vte=Dte(),Fte;Vte.canUseDOM&&(Fte=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function bEe(e,t){if(!Vte.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&&Fte&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}zte.exports=bEe});var Kte=re((Wot,$te)=>{"use strict";var kEe=Nte(),vEe=jte(),Ute=10,Hte=40,Gte=800;function Wte(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*Ute,n=o*Ute,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=Hte,n*=Hte):(r*=Gte,n*=Gte)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}Wte.getEventType=function(){return kEe.firefox()?"DOMMouseScroll":vEe("wheel")?"wheel":"mousewheel"};$te.exports=Wte});var qte=re(($ot,Yte)=>{Yte.exports=Kte()});var wre=re((Dnt,xre)=>{"use strict";xre.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 iLe={};Ip(iLe,{AlignmentControl:()=>jw,AlignmentToolbar:()=>pU,Autocomplete:()=>zU,BlockAlignmentControl:()=>nC,BlockAlignmentToolbar:()=>lH,BlockBindingsAttributeControl:()=>Gv,BlockBindingsSourceFieldsList:()=>Hv,BlockBreadcrumb:()=>RH,BlockCanvas:()=>WQ,BlockColorsStyleSelector:()=>qQ,BlockContextProvider:()=>f0,BlockControls:()=>Mt,BlockEdit:()=>Lw,BlockEditorKeyboardShortcuts:()=>f1,BlockEditorProvider:()=>A9,BlockFormatControls:()=>uV,BlockIcon:()=>Oe,BlockInspector:()=>Oae,BlockList:()=>Hh,BlockMover:()=>pE,BlockNavigationDropdown:()=>nee,BlockPopover:()=>uY,BlockPreview:()=>kn,BlockSelectionClearer:()=>xY,BlockSettingsMenu:()=>zE,BlockSettingsMenuControls:()=>NE,BlockStyles:()=>Yg,BlockTitle:()=>$v,BlockToolbar:()=>BQ,BlockTools:()=>PS,BlockVerticalAlignmentControl:()=>eC,BlockVerticalAlignmentToolbar:()=>Tee,ButtonBlockAppender:()=>Yu,ButtonBlockerAppender:()=>eY,ColorPalette:()=>Zee,ColorPaletteControl:()=>Jee,ContrastChecker:()=>KT,CopyHandler:()=>Nae,DefaultBlockAppender:()=>lg,DimensionControl:()=>nb,FontSizePicker:()=>iM,HeadingLevelDropdown:()=>hee,HeightControl:()=>Tte,InnerBlocks:()=>Jy,Inserter:()=>Ui,InspectorAdvancedControls:()=>Ju,InspectorControls:()=>fe,JustifyContentControl:()=>lh,JustifyToolbar:()=>Voe,LineHeightControl:()=>VI,LinkControl:()=>Bd,MediaPlaceholder:()=>ine,MediaReplaceFlow:()=>kb,MediaUpload:()=>Wu,MediaUploadCheck:()=>Ms,MultiSelectScrollIntoView:()=>Fae,NavigableToolbar:()=>Cg,ObserveTyping:()=>YY,PanelColorSettings:()=>ane,PlainText:()=>iie,RecursionProvider:()=>i4,RichText:()=>xb,RichTextShortcut:()=>bF,RichTextToolbarButton:()=>vF,SETTINGS_DEFAULTS:()=>Gk,SkipToSelectedBlock:()=>mP,ToolSelector:()=>Qae,Typewriter:()=>Hae,URLInput:()=>wd,URLInputButton:()=>pie,URLPopover:()=>Id,Warning:()=>du,WritingFlow:()=>x1,__experimentalBlockAlignmentMatrixControl:()=>xH,__experimentalBlockFullHeightAligmentControl:()=>vH,__experimentalBlockPatternSetup:()=>Cee,__experimentalBlockPatternsList:()=>Ca,__experimentalBlockVariationPicker:()=>gee,__experimentalBlockVariationTransforms:()=>zT,__experimentalBorderRadiusControl:()=>WT,__experimentalColorGradientControl:()=>kd,__experimentalColorGradientSettingsDropdown:()=>aI,__experimentalDateFormatPicker:()=>rte,__experimentalDuotoneControl:()=>qT,__experimentalFontAppearanceControl:()=>XT,__experimentalFontFamilyControl:()=>QT,__experimentalGetBorderClassesAndStyles:()=>QR,__experimentalGetColorClassesAndStyles:()=>JR,__experimentalGetElementClassName:()=>oLe,__experimentalGetGapCSSValue:()=>fr,__experimentalGetGradientClass:()=>oh,__experimentalGetGradientObjectByGradientValue:()=>nU,__experimentalGetShadowClassesAndStyles:()=>Hz,__experimentalGetSpacingClassesAndStyles:()=>$z,__experimentalImageEditor:()=>Roe,__experimentalImageSizeControl:()=>Noe,__experimentalImageURLInputUI:()=>Sie,__experimentalInspectorPopoverHeader:()=>h2,__experimentalLetterSpacingControl:()=>eI,__experimentalLibrary:()=>Dae,__experimentalLinkControl:()=>DI,__experimentalLinkControlSearchInput:()=>cre,__experimentalLinkControlSearchItem:()=>Zoe,__experimentalLinkControlSearchResults:()=>ore,__experimentalListView:()=>NT,__experimentalPanelColorGradientSettings:()=>cI,__experimentalPreviewOptions:()=>Die,__experimentalPublishDateTimePicker:()=>Yae,__experimentalRecursionProvider:()=>Gae,__experimentalResponsiveBlockControl:()=>uie,__experimentalSpacingSizesControl:()=>Ab,__experimentalTextDecorationControl:()=>oI,__experimentalTextTransformControl:()=>nI,__experimentalUnitControl:()=>fie,__experimentalUseBlockOverlayActive:()=>AH,__experimentalUseBlockPreview:()=>C$,__experimentalUseBorderProps:()=>Uz,__experimentalUseColorProps:()=>Wz,__experimentalUseCustomSides:()=>vz,__experimentalUseGradient:()=>Hke,__experimentalUseHasRecursion:()=>Wae,__experimentalUseMultipleOriginColorsAndGradients:()=>yd,__experimentalUseResizeCanvas:()=>Vie,__experimentalWritingModeControl:()=>sI,__unstableBlockSettingsMenuFirstItem:()=>wE,__unstableBlockToolbarLastItem:()=>vE,__unstableEditorStyles:()=>Ml,__unstableIframe:()=>Nh,__unstableInserterMenuExtension:()=>gB,__unstableRichTextInputEvent:()=>yF,__unstableUseBlockSelectionClearer:()=>mm,__unstableUseClipboardHandler:()=>Lae,__unstableUseMouseMoveTypingReset:()=>tS,__unstableUseTypewriter:()=>o4,__unstableUseTypingObserver:()=>oS,createCustomColorsHOC:()=>oU,getColorClassName:()=>yi,getColorObjectByAttributeValues:()=>ua,getColorObjectByColorValue:()=>u0,getComputedFluidTypographyValue:()=>aU,getCustomValueFromPreset:()=>HU,getDimensionsClassesAndStyles:()=>jz,getFontSize:()=>rh,getFontSizeClass:()=>fu,getFontSizeObjectByValue:()=>nM,getGradientSlugByValue:()=>iU,getGradientValueBySlug:()=>Fw,getPxFromCssUnit:()=>gme,getSpacingPresetCssVar:()=>Fv,getTypographyClassesAndStyles:()=>Kz,isValueSpacingPreset:()=>Jw,privateApis:()=>o6,store:()=>_,storeConfig:()=>Jp,transformStyles:()=>jh,useBlockBindingsUtils:()=>Tl,useBlockCommands:()=>bT,useBlockDisplayInformation:()=>Tt,useBlockEditContext:()=>Pe,useBlockEditingMode:()=>Mo,useBlockProps:()=>gy,useCachedTruthy:()=>Yz,useHasRecursion:()=>s4,useInnerBlocksProps:()=>km,useSetting:()=>Qj,useSettings:()=>me,useStyleOverride:()=>Zn,withColorContext:()=>$T,withColors:()=>rU,withFontSizes:()=>fU});function n6(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=n6(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Ume(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=n6(e))&&(r&&(r+=" "),r+=t);return r}var V=Ume;var Jae=l($(),1),as=l(P(),1),k2=l(F(),1),u4=l(Z(),1),x_=l(rt(),1);var i0=l(P(),1),bs=Symbol("mayDisplayControls"),Pp=Symbol("mayDisplayParentControls"),$c=Symbol("mayDisplayPatternEditingControls"),s0=Symbol("blockEditingMode"),Rp=Symbol("blockBindings"),a0=Symbol("isPreviewMode"),zk=Symbol("isInListViewBlockSupportTree"),lO={name:"",isSelected:!1},cO=(0,i0.createContext)(lO);cO.displayName="BlockEditContext";var{Provider:l0}=cO;function Pe(){return(0,i0.useContext)(cO)}var Hme={grad:.9,turn:360,rad:360/(2*Math.PI)},ml=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},qo=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},vi=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},b6=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},u6=function(e){return{r:vi(e.r,0,255),g:vi(e.g,0,255),b:vi(e.b,0,255),a:vi(e.a)}},uO=function(e){return{r:qo(e.r),g:qo(e.g),b:qo(e.b),a:qo(e.a,3)}},Gme=/^#([0-9a-f]{3,8})$/i,c0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},k6=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}},v6=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}},d6=function(e){return{h:b6(e.h),s:vi(e.s,0,100),l:vi(e.l,0,100),a:vi(e.a)}},f6=function(e){return{h:qo(e.h),s:qo(e.s),l:qo(e.l),a:qo(e.a,3)}},m6=function(e){return v6((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},jk=function(e){return{h:(t=k6(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},Wme=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,$me=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kme=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yme=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mO={string:[[function(e){var t=Gme.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?qo(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?qo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Kme.exec(e)||Yme.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:u6({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=Wme.exec(e)||$me.exec(e);if(!t)return null;var o,r,n=d6({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(Hme[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return m6(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 ml(t)&&ml(o)&&ml(r)?u6({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(!ml(t)||!ml(o)||!ml(r))return null;var s=d6({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return m6(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!ml(t)||!ml(o)||!ml(r))return null;var s=(function(a){return{h:b6(a.h),s:vi(a.s,0,100),v:vi(a.v,0,100),a:vi(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return v6(s)},"hsv"]]},p6=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]},qme=function(e){return typeof e=="string"?p6(e.trim(),mO.string):typeof e=="object"&&e!==null?p6(e,mO.object):[null,void 0]};var dO=function(e,t){var o=jk(e);return{h:o.h,s:vi(o.s+100*t,0,100),l:o.l,a:o.a}},fO=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},h6=function(e,t){var o=jk(e);return{h:o.h,s:o.s,l:vi(o.l+100*t,0,100),a:o.a}},pO=(function(){function e(t){this.parsed=qme(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 qo(fO(this.rgba),2)},e.prototype.isDark=function(){return fO(this.rgba)<.5},e.prototype.isLight=function(){return fO(this.rgba)>=.5},e.prototype.toHex=function(){return t=uO(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?c0(qo(255*i)):"","#"+c0(o)+c0(r)+c0(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return uO(this.rgba)},e.prototype.toRgbString=function(){return t=uO(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 f6(jk(this.rgba))},e.prototype.toHslString=function(){return t=f6(jk(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=k6(this.rgba),{h:qo(t.h),s:qo(t.s),v:qo(t.v),a:qo(t.a,3)};var t},e.prototype.invert=function(){return Bt({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),Bt(dO(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Bt(dO(this.rgba,-t))},e.prototype.grayscale=function(){return Bt(dO(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Bt(h6(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Bt(h6(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"?Bt({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):qo(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=jk(this.rgba);return typeof t=="number"?Bt({h:t,s:o.s,l:o.l,a:o.a}):qo(o.h)},e.prototype.isEqual=function(t){return this.toHex()===Bt(t).toHex()},e})(),Bt=function(e){return e instanceof pO?e:new pO(e)},g6=[],Kc=function(e){e.forEach(function(t){g6.indexOf(t)<0&&(t(pO,mO),g6.push(t))})};function Yc(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 hO=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},gO=function(e){return .2126*hO(e.r)+.7152*hO(e.g)+.0722*hO(e.b)};function Op(e){e.prototype.luminance=function(){return t=gO(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=gO(i),c=gO(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 w6=l(A(),1);var _6=l(bO(),1),{lock:x6,unlock:M}=(0,_6.__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");Kc([Yc,Op]);var{kebabCase:Zme}=M(w6.privateApis),ua=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},u0=(e,t)=>e?.find(o=>o.color===t);function yi(e,t){if(!(!e||!t))return`has-${Zme(t)}-${e}`}function C6(e,t){let o=Bt(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var Nw=l(P(),1),Vf=l(Z(),1),eU=l(A(),1);var Zj=l(F(),1),Xj=l(Re(),1);var Aw=l(P(),1),Ow=l($(),1);var pl=l($(),1),L6=l(A(),1),Hk=l(F(),1),gf=l(P(),1);var Ap=l(P(),1),T6=l(w(),1),d0=(0,Ap.createContext)({});d0.displayName="BlockContext";function f0({value:e,children:t}){let o=(0,Ap.useContext)(d0),r=(0,Ap.useMemo)(()=>({...o,...e}),[o,e]);return(0,T6.jsx)(d0.Provider,{value:r,children:t})}var cn=d0;var Lp=l(un(),1);function mf(e){return e?.startsWith("#")&&(0,Lp.isValidFragment)(e)}function pf(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function hf(e){if(e.includes(" "))return!1;let o=(0,Lp.getProtocol)(e),r=(0,Lp.isValidProtocol)(o),n=Xme(e),i=e?.startsWith("www.");return r||i||mf(e)||n||pf(e)}function Xme(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var Qme="__default",P6="core/pattern-overrides";function Uk(e){return e?.[Qme]?.source===P6}function R6(e,t){if(Uk(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:P6};o[r]=n}return o}return e}var O6=l(P(),1),cr=(0,O6.createContext)({});cr.displayName="PrivateBlockContext";var m0=l(w(),1),Jme={},epe=e=>{let{name:t}=e,o=(0,pl.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,m0.jsx)(r,{...e})},A6=(0,L6.withFilters)("editor.BlockEdit")(epe),tpe=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,Hk.useRegistry)(),s=(0,pl.getBlockType)(t),a=(0,gf.useContext)(cn),c=(0,Hk.useSelect)(v=>M(v(pl.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,gf.useContext)(cr),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,gf.useMemo)(()=>{let v=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([k])=>s.usesContext.includes(k))):Jme;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(k=>{c[k?.source]?.usesContext?.forEach(y=>{v[y]=a[y]})}),{blockBindings:R6(r?.metadata?.bindings,u),context:v,hasPatternOverrides:Uk(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),h=(0,Hk.useSelect)(v=>{if(!d)return r;let k={},y=new Map;for(let[S,x]of Object.entries(d)){let{source:C,args:B}=x,I=c[C];!I||!u?.includes(S)||y.set(I,{...y.get(I),[S]:{args:B}})}if(y.size)for(let[S,x]of y){let C={};S.getValues?C=S.getValues({select:v,context:f,clientId:o,bindings:x}):Object.keys(x).forEach(B=>{C[B]=S.label});for(let[B,I]of Object.entries(C))B==="url"&&(!I||!hf(I))?k[B]=null:k[B]=I}return{...r,...k}},[r,u,d,o,f,c]),p=(0,gf.useCallback)(v=>{if(!d){n(v);return}i.batch(()=>{let k={...v},y=new Map;for(let[x,C]of Object.entries(k)){if(!d[x]||!u?.includes(x))continue;let B=d[x],I=c[B?.source];I?.setValues&&(y.set(I,{...y.get(I),[x]:{args:B.args,newValue:C}}),delete k[x])}if(y.size)for(let[x,C]of y)x.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:C});let S=!!f["pattern/overrides"];!(m&&S)&&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,m0.jsx)(A6,{...e,attributes:h,context:f,setAttributes:p});let g=(0,pl.hasBlockSupport)(s,"className",!0)?(0,pl.getBlockDefaultClassName)(t):null,b=V(g,r?.className,e.className);return(0,m0.jsx)(A6,{...e,attributes:h,className:b,context:f,setAttributes:p})},N6=tpe;var Kj=l($(),1),rM=l(A(),1),Yj=l(F(),1),Rw=l(N(),1);var Pw=l(F(),1);var Kk=l(bf(),1),_O=l(Z(),1),Yk=l(F(),1),z6=l(Re(),1),_0=l($(),1);var Le=l(N(),1),V6={insertUsage:{}},Gk={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Le.__)("Black"),slug:"black",color:"#000000"},{name:(0,Le.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Le.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Le.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Le.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Le.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Le.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Le.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Le.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Le.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Le.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Le.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Le._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Le._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Le._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Le._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Le._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Le.__)("Thumbnail")},{slug:"medium",name:(0,Le.__)("Medium")},{slug:"large",name:(0,Le.__)("Large")},{slug:"full",name:(0,Le.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,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,Le.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,Le.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,Le.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,Le.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,Le.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,Le.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,Le.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Le.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,Le.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,Le.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,Le.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Le.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function p0(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function h0(e,t,o,r=1){let n=[...e];return n.splice(t,r),p0(n,e.slice(t,t+r),o)}var Si=Symbol("globalStylesDataKey"),g0=Symbol("globalStylesLinks"),qc=Symbol("selectBlockPatternsKey"),b0=Symbol("reusableBlocksSelect"),Zc=Symbol("sectionRootClientIdKey"),k0=Symbol("mediaEditKey"),v0=Symbol("getMediaSelect"),Np=Symbol("isIsolatedEditor"),_i=Symbol("deviceTypeKey"),y0=Symbol("isNavigationOverlayContext");var{isContentBlock:ope}=M(_0.privateApis),rpe=e=>e;function $k(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),$k(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function S0(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 j6(e,t=rpe){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 npe(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function kO(e){return j6(e,t=>{let{attributes:o,...r}=t;return r})}function vO(e){return j6(e,t=>t.attributes)}function ipe(e,t){return(0,Kk.default)(Object.keys(e),Object.keys(t))}function spe(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,Kk.default)(e.clientIds,t.clientIds)&&ipe(e.attributes,t.attributes)}function yO(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 hl(e,t,o=!1){let r=e.tree,n=new Set([]),i=new Set;for(let s of t){let a=o?s:e.parents.get(s);do if(e.controlledInnerBlocks[a]){i.add(a);break}else n.add(a),a=e.parents.get(a);while(a!==void 0)}for(let s of n)r.set(s,{...r.get(s)});for(let s of n)r.get(s).innerBlocks=(e.order.get(s)||[]).map(a=>r.get(a));for(let s of i)r.set("controlled||"+s,{innerBlocks:(e.order.get(s)||[]).map(a=>r.get(a))})}var ape=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),yO(r,o.blocks),hl(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)}),hl(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)})}),hl(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=npe(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),yO(r,o.blocks),hl(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)}hl(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)}),hl(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),hl(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),hl(r,i,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{let i=[];r.attributes.forEach((s,a)=>{r.byClientId.get(a).name==="core/block"&&s.ref===o.updatedId&&i.push(a)}),r.tree=new Map(r.tree),i.forEach(s=>{r.tree.set(s,{...r.byClientId.get(s),attributes:r.attributes.get(s),innerBlocks:r.tree.get(s).innerBlocks})}),hl(r,i,!1)}}return r};function lpe(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:!spe(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function cpe(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 upe=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)},dpe=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=t?.controlledInnerBlocks??{},n={...t,byClientId:new Map(kO(o.blocks)),attributes:new Map(vO(o.blocks)),order:$k(o.blocks),parents:new Map(S0(o.blocks)),controlledInnerBlocks:r};if(t?.order)for(let i of Object.keys(r)){if(!r[i]||!n.byClientId.has(i))continue;let s=t.order.get(i);if(!s?.length)continue;n.order.set(i,s);let a=(c,u)=>{let d=t.byClientId?.get(c);if(!d)return;n.byClientId.set(c,d),n.attributes.set(c,t.attributes?.get(c)),n.parents.set(c,u);let f=t.order?.get(c)||[];n.order.set(c,f),f.forEach(m=>a(m,c))};s.forEach(c=>a(c,i))}n.tree=new Map(t?.tree),yO(n,o.blocks);for(let i of Object.keys(r)){if(!r[i]||!n.byClientId.has(i))continue;let s=n.order.get(i);if(!s?.length)continue;let a=s.map(u=>n.tree.get(u)),c=n.tree.get(i);c&&(c.innerBlocks=a),n.tree.set("controlled||"+i,{innerBlocks:a})}return n.tree.set("",{innerBlocks:o.blocks.map(i=>n.tree.get(i.clientId))}),n}return e(t,o)},fpe=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(Object.keys(t.controlledInnerBlocks).length){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks[c.clientId]&&(r[c.clientId]=!0)}}let n=t;t.order.get(o.rootClientId)&&(n=e(n,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(o.rootClientId)}));let i=n;if(o.blocks.length){i=e(i,{...o,type:"INSERT_BLOCKS",index:0});let s=new Map(i.order);Object.keys(r).forEach(a=>{t.order.get(a)&&s.set(a,t.order.get(a))}),i.order=s,i.tree=new Map(i.tree),Object.keys(r).forEach(a=>{let c=`controlled||${a}`;t.tree.has(c)&&i.tree.set(c,t.tree.get(c))})}return i},mpe=e=>(t,o)=>{if(t&&o.type==="SAVE_REUSABLE_BLOCK_SUCCESS"){let{id:r,updatedId:n}=o;if(r===n)return t;t={...t},t.attributes=new Map(t.attributes),t.attributes.forEach((i,s)=>{let{name:a}=t.byClientId.get(s);a==="core/block"&&i.ref===r&&t.attributes.set(s,{...i,ref:n})})}return e(t,o)},ppe=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)},hpe=(0,_O.pipe)(Yk.combineReducers,mpe,ape,upe,fpe,dpe,lpe,cpe,ppe)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return kO(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)}),kO(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 vO(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)}),vO(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=$k(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=$k(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,p0(r,n.get(o),i)),s}case"MOVE_BLOCKS_TO_POSITION":{let{fromRootClientId:o="",toRootClientId:r="",clientIds:n}=t,{index:i=e.get(r).length}=t;if(o===r){let c=e.get(r).indexOf(n[0]),u=new Map(e);return u.set(r,h0(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,p0(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,h0(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,h0(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=$k(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 S0(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return S0(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)}),S0(t.blocks,e.get(t.clientIds[0])).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},controlledInnerBlocks(e={},{type:t,clientId:o,hasControlledInnerBlocks:r}){return t==="SET_HAS_CONTROLLED_INNER_BLOCKS"?{...e,[o]:r}:e}});function gpe(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function bpe(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function kpe(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function vpe(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function ype(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function F6(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 Spe(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=F6(e.selectionStart,t),r=F6(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function _pe(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function xpe(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function wpe(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function Cpe(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 Bpe(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function Epe(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 Tpe(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 Ipe(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,Kk.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function Ppe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function Rpe(e=Gk,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...Gk,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,z6.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function Ope(e=V6,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,Yk.select)(_0.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 Ape=(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let n=r.shift();o.add(n.clientId),r.push(...n.innerBlocks)}return Object.fromEntries(Object.entries(e).filter(([n])=>!t.clientIds.includes(n)||o.has(n)))}case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter(([o])=>!t.clientIds.includes(o)));case"UPDATE_BLOCK_LIST_SETTINGS":{let o=typeof t.clientId=="string"?{[t.clientId]:t.settings}:t.clientId;for(let n in o)o[n]?(0,Kk.default)(e[n],o[n])&&delete o[n]:e[n]||delete o[n];if(Object.keys(o).length===0)return e;let r={...e,...o};for(let n in o)o[n]||delete r[n];return r}}return e};function Lpe(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 Npe(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 Mpe(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 Dpe(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 Vpe(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 Fpe(e,t){return t.type==="EDIT_CONTENT_ONLY_SECTION"?t.clientId:e}function zpe(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;let o=new Map(e);return o.delete(t.clientId),o}case"RESET_BLOCKS":return e.has("")?new Map().set("",e.get("")):e}return e}function jpe(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 Upe(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function Hpe(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function Gpe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function Wpe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function $pe(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}case"RESET_BLOCKS":return{allOpen:!1,panels:{}}}return e}function Kpe(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function Ype(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 qpe(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 Zpe=(0,Yk.combineReducers)({blocks:hpe,isDragging:kpe,isTyping:bpe,isBlockInterfaceHidden:gpe,draggedBlocks:vpe,selection:Spe,isMultiSelecting:_pe,isSelectionEnabled:xpe,initialPosition:Epe,blocksMode:Tpe,blockListSettings:Ape,insertionPoint:Wpe,insertionCue:Ipe,template:Ppe,settings:Rpe,preferences:Ope,lastBlockAttributesChange:Lpe,lastFocus:Hpe,expandedBlock:Dpe,highlightedBlock:Npe,lastBlockInserted:Vpe,editedContentOnlySection:Fpe,blockVisibility:ype,viewportModalClientIds:wpe,blockEditingModes:zpe,styleOverrides:jpe,removalPromptData:Cpe,blockRemovalRules:Bpe,registeredInserterMediaCategories:Upe,zoomLevel:Gpe,hasBlockSpotlight:Mpe,openedListViewPanels:$pe,listViewExpandRevision:Kpe,listViewContentPanelOpen:Ype,requestedInspectorTab:qpe});function U6(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);let o=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:o?.innerBlocks}}function xO(e,t,o){let r=U6(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)xO(e,n.clientId,o)}function Wk(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 Xpe(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function SO(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[Zc],i=e.blocks.order.get(n),s=Array.from(e.blockEditingModes).some(([,p])=>p==="disabled"),a=[],c=[];Object.keys(e.blocks.controlledInnerBlocks).forEach(p=>{let g=e.blocks.byClientId?.get(p);g?.name==="core/template-part"&&a.push(p),g?.name==="core/block"&&c.push(p)});let u=Object.keys(e.blockListSettings).filter(p=>e.blockListSettings[p]?.templateLock==="contentOnly"),d=e.settings?.[Np],f=e.settings?.disableContentOnlyForUnsyncedPatterns,m=d||f?[]:Array.from(e.blocks.attributes.keys()).filter(p=>e.blocks.attributes.get(p)?.metadata?.patternName),h=[...u,...m,...d?[]:a];return xO(e,t,p=>{let{clientId:g,name:b}=p;if(e.editedContentOnlySection){if(e.editedContentOnlySection===g){r.set(g,"default");return}if(Wk(e,g,[e.editedContentOnlySection])){r.set(g,"default");return}r.set(g,"disabled");return}if(!e.blockEditingModes.has(g)){if(s){let v,k=e.blocks.parents.get(g);for(;k!==void 0&&(e.blockEditingModes.has(k)&&(v=e.blockEditingModes.get(k)),!v);)k=e.blocks.parents.get(k);if(v==="disabled"){r.set(g,"disabled");return}}if(o){if(g===n){r.set(g,"contentOnly");return}if(!i?.length){r.set(g,"disabled");return}if(i.includes(g)){r.set(g,"contentOnly");return}r.set(g,"disabled");return}if(c.length){if(c.includes(g)){if(Wk(e,g,c)){r.set(g,"disabled");return}return}let v=Wk(e,g,c);if(v){if(Wk(e,v,c)){r.set(g,"disabled");return}if(Xpe(p)){r.set(g,"contentOnly");return}r.set(g,"disabled")}}h.length&&Wk(e,g,h)&&(ope(b)?r.set(g,"contentOnly"):r.set(g,"disabled"))}}),r}function Xc({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{xO(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=SO(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function Qpe(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=Xc({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=Xc({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=Xc({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[c]?.templateLock!=="contentOnly"&&r.blockListSettings[c]?.templateLock==="contentOnly",d=t.blockListSettings[c]?.templateLock==="contentOnly"&&r.blockListSettings[c]?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=Xc({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=U6(r,o.clientId);if(!n)break;let i=Xc({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=Xc({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=Xc({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=Xc({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[Zc]!==r?.settings?.[Zc]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns)return{...r,derivedBlockEditingModes:SO(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:SO(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function Jpe(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 H6=(0,_O.pipe)(Qpe,Jpe)(Zpe);var ZN={};Ip(ZN,{__experimentalGetActiveBlockIdByBlockNames:()=>Jge,__experimentalGetAllowedBlocks:()=>Dge,__experimentalGetAllowedPatterns:()=>jge,__experimentalGetBlockListSettingsForBlocks:()=>$ge,__experimentalGetDirectInsertBlock:()=>Vge,__experimentalGetGlobalBlocksByName:()=>Yhe,__experimentalGetLastBlockAttributeChanges:()=>qge,__experimentalGetParsedPattern:()=>Fge,__experimentalGetPatternTransformItems:()=>Gge,__experimentalGetPatternsByBlockTypes:()=>Hge,__experimentalGetReusableBlockTitle:()=>Kge,__unstableGetBlockWithoutInnerBlocks:()=>Whe,__unstableGetClientIdWithClientIdsTree:()=>dj,__unstableGetClientIdsTree:()=>fj,__unstableGetContentLockingParent:()=>abe,__unstableGetSelectedBlocksWithPartialSelection:()=>gge,__unstableGetTemporarilyEditingAsBlocks:()=>lbe,__unstableGetVisibleBlocks:()=>rbe,__unstableHasActiveBlockOverlayActive:()=>Ej,__unstableIsFullySelected:()=>fge,__unstableIsLastBlockChangeIgnored:()=>Yge,__unstableIsSelectionCollapsed:()=>mge,__unstableIsSelectionMergeable:()=>hge,__unstableIsWithinBlockOverlay:()=>nbe,__unstableSelectionHasUnmergeableBlock:()=>pge,areInnerBlocksControlled:()=>Ew,canEditBlock:()=>wj,canInsertBlockType:()=>Nf,canInsertBlocks:()=>Pge,canLockBlockType:()=>Oge,canMoveBlock:()=>xj,canMoveBlocks:()=>Rge,canRemoveBlock:()=>WN,canRemoveBlocks:()=>_j,didAutomaticChange:()=>Xge,getAdjacentBlockClientId:()=>jN,getAllowedBlocks:()=>VN,getBlock:()=>wl,getBlockAttributes:()=>Bi,getBlockCount:()=>Zhe,getBlockEditingMode:()=>Ei,getBlockHierarchyRootClientId:()=>oge,getBlockIndex:()=>bj,getBlockInsertionPoint:()=>Bge,getBlockListSettings:()=>qN,getBlockMode:()=>Sge,getBlockName:()=>dt,getBlockNamesByClientId:()=>qhe,getBlockOrder:()=>_r,getBlockParents:()=>ys,getBlockParentsByBlockName:()=>zN,getBlockRootClientId:()=>Io,getBlockSelectionEnd:()=>Qhe,getBlockSelectionStart:()=>Xhe,getBlockTransformItems:()=>Nge,getBlocks:()=>$he,getBlocksByClientId:()=>Bw,getBlocksByName:()=>pj,getClientIdsOfDescendants:()=>mj,getClientIdsWithDescendants:()=>Kp,getDirectInsertBlock:()=>Bj,getDraggedBlockClientIds:()=>xge,getFirstMultiSelectedBlockClientId:()=>UN,getGlobalBlockCount:()=>Khe,getHoveredBlockClientId:()=>obe,getInserterItems:()=>Lge,getLastMultiSelectedBlockClientId:()=>hj,getLowestCommonAncestorWithSelectedBlock:()=>rge,getMultiSelectedBlockClientIds:()=>lu,getMultiSelectedBlocks:()=>age,getMultiSelectedBlocksEndClientId:()=>dge,getMultiSelectedBlocksStartClientId:()=>uge,getNextBlockClientId:()=>ige,getPatternsByBlockTypes:()=>Uge,getPreviousBlockClientId:()=>nge,getSelectedBlock:()=>tge,getSelectedBlockClientId:()=>qp,getSelectedBlockClientIds:()=>Zp,getSelectedBlockCount:()=>Jhe,getSelectedBlocksInitialCaretPosition:()=>sge,getSelectionEnd:()=>Pv,getSelectionStart:()=>Iv,getSettings:()=>iu,getTemplate:()=>Ige,getTemplateLock:()=>da,hasBlockMovingClientId:()=>Zge,hasDraggedInnerBlock:()=>yj,hasInserterItems:()=>Mge,hasMultiSelection:()=>kge,hasSelectedBlock:()=>ege,hasSelectedInnerBlock:()=>vj,isAncestorBeingDragged:()=>wge,isAncestorMultiSelected:()=>cge,isBlockBeingDragged:()=>HN,isBlockHighlighted:()=>Qge,isBlockInsertionPointVisible:()=>Ege,isBlockMultiSelected:()=>gj,isBlockSelected:()=>kj,isBlockValid:()=>Ghe,isBlockVisible:()=>tbe,isBlockWithinSelection:()=>bge,isCaretWithinFormattedText:()=>Cge,isDraggingBlocks:()=>Sj,isFirstMultiSelectedBlock:()=>lge,isGroupable:()=>sbe,isLastBlockChangePersistent:()=>Wge,isMultiSelecting:()=>vge,isSelectionEnabled:()=>yge,isTyping:()=>_ge,isUngroupable:()=>ibe,isValidTemplate:()=>Tge,wasBlockJustInserted:()=>ebe});var Ee=l($(),1),lj=l(P(),1),cj=l(rt(),1);var x0=l(P(),1),xe=(0,x0.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,x0.cloneElement)(e,{width:t,height:t,...o,ref:r}));var w0=l(Y(),1),wO=l(w(),1),kf=(0,wO.jsx)(w0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wO.jsx)(w0.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var C0=l(Y(),1),CO=l(w(),1),BO=(0,CO.jsx)(C0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CO.jsx)(C0.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var B0=l(Y(),1),EO=l(w(),1),Qc=(0,EO.jsx)(B0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EO.jsx)(B0.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var E0=l(Y(),1),TO=l(w(),1),vf=(0,TO.jsx)(E0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TO.jsx)(E0.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var T0=l(Y(),1),IO=l(w(),1),Jc=(0,IO.jsx)(T0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IO.jsx)(T0.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var I0=l(Y(),1),PO=l(w(),1),RO=(0,PO.jsx)(I0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PO.jsx)(I0.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 P0=l(Y(),1),OO=l(w(),1),qk=(0,OO.jsx)(P0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OO.jsx)(P0.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var R0=l(Y(),1),AO=l(w(),1),Zk=(0,AO.jsx)(R0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AO.jsx)(R0.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 O0=l(Y(),1),LO=l(w(),1),NO=(0,LO.jsx)(O0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LO.jsx)(O0.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 A0=l(Y(),1),MO=l(w(),1),DO=(0,MO.jsx)(A0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MO.jsx)(A0.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 L0=l(Y(),1),VO=l(w(),1),Xk=(0,VO.jsx)(L0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VO.jsx)(L0.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 N0=l(Y(),1),FO=l(w(),1),zO=(0,FO.jsx)(N0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FO.jsx)(N0.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 M0=l(Y(),1),jO=l(w(),1),gl=(0,jO.jsx)(M0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jO.jsx)(M0.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var D0=l(Y(),1),UO=l(w(),1),Fn=(0,UO.jsx)(D0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UO.jsx)(D0.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var V0=l(Y(),1),HO=l(w(),1),Qk=(0,HO.jsx)(V0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HO.jsx)(V0.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var F0=l(Y(),1),GO=l(w(),1),Nr=(0,GO.jsx)(F0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GO.jsx)(F0.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var z0=l(Y(),1),WO=l(w(),1),eu=(0,WO.jsx)(z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WO.jsx)(z0.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 j0=l(Y(),1),$O=l(w(),1),Vo=(0,$O.jsx)(j0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$O.jsx)(j0.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var U0=l(Y(),1),KO=l(w(),1),yf=(0,KO.jsx)(U0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KO.jsx)(U0.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var H0=l(Y(),1),YO=l(w(),1),Sf=(0,YO.jsx)(H0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YO.jsx)(H0.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 G0=l(Y(),1),qO=l(w(),1),ZO=(0,qO.jsx)(G0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qO.jsx)(G0.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 W0=l(Y(),1),XO=l(w(),1),QO=(0,XO.jsx)(W0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XO.jsx)(W0.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 $0=l(Y(),1),JO=l(w(),1),_f=(0,JO.jsx)($0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JO.jsx)($0.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 K0=l(Y(),1),eA=l(w(),1),tA=(0,eA.jsx)(K0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eA.jsx)(K0.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 xf=l(Y(),1),Mp=l(w(),1),oA=(0,Mp.jsxs)(xf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Mp.jsx)(xf.G,{opacity:".25",children:(0,Mp.jsx)(xf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Mp.jsx)(xf.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 wf=l(Y(),1),Dp=l(w(),1),rA=(0,Dp.jsxs)(wf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Dp.jsx)(wf.G,{opacity:".25",children:(0,Dp.jsx)(wf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Dp.jsx)(wf.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 Cf=l(Y(),1),Vp=l(w(),1),nA=(0,Vp.jsxs)(Cf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Vp.jsx)(Cf.G,{opacity:".25",children:(0,Vp.jsx)(Cf.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,Vp.jsx)(Cf.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 Bf=l(Y(),1),Fp=l(w(),1),iA=(0,Fp.jsxs)(Bf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Fp.jsx)(Bf.G,{opacity:".25",children:(0,Fp.jsx)(Bf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Fp.jsx)(Bf.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 Y0=l(Y(),1),sA=l(w(),1),aA=(0,sA.jsx)(Y0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sA.jsx)(Y0.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 q0=l(Y(),1),lA=l(w(),1),Jk=(0,lA.jsx)(q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lA.jsx)(q0.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var Z0=l(Y(),1),cA=l(w(),1),uA=(0,cA.jsx)(Z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cA.jsx)(Z0.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 X0=l(Y(),1),dA=l(w(),1),Ef=(0,dA.jsx)(X0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dA.jsx)(X0.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 Q0=l(Y(),1),fA=l(w(),1),mA=(0,fA.jsx)(Q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fA.jsx)(Q0.Path,{d:"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 J0=l(Y(),1),pA=l(w(),1),hA=(0,pA.jsx)(J0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pA.jsx)(J0.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 ex=l(Y(),1),gA=l(w(),1),bA=(0,gA.jsx)(ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gA.jsx)(ex.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var tx=l(Y(),1),kA=l(w(),1),vA=(0,kA.jsx)(tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kA.jsx)(tx.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 ox=l(Y(),1),yA=l(w(),1),SA=(0,yA.jsx)(ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yA.jsx)(ox.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 rx=l(Y(),1),_A=l(w(),1),xA=(0,_A.jsx)(rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_A.jsx)(rx.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 nx=l(Y(),1),wA=l(w(),1),CA=(0,wA.jsx)(nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wA.jsx)(nx.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 ix=l(Y(),1),BA=l(w(),1),EA=(0,BA.jsx)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BA.jsx)(ix.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 sx=l(Y(),1),TA=l(w(),1),IA=(0,TA.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TA.jsx)(sx.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 ax=l(Y(),1),PA=l(w(),1),lx=(0,PA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PA.jsx)(ax.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 cx=l(Y(),1),RA=l(w(),1),ev=(0,RA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RA.jsx)(cx.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 ux=l(Y(),1),OA=l(w(),1),tv=(0,OA.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OA.jsx)(ux.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 dx=l(Y(),1),AA=l(w(),1),ov=(0,AA.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(dx.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 fx=l(Y(),1),LA=l(w(),1),NA=(0,LA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(fx.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var mx=l(Y(),1),MA=l(w(),1),DA=(0,MA.jsx)(mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MA.jsx)(mx.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 px=l(Y(),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:"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 hx=l(Y(),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:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var gx=l(Y(),1),UA=l(w(),1),HA=(0,UA.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UA.jsx)(gx.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 bx=l(Y(),1),GA=l(w(),1),WA=(0,GA.jsx)(bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(bx.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 kx=l(Y(),1),$A=l(w(),1),KA=(0,$A.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(kx.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var vx=l(Y(),1),YA=l(w(),1),rv=(0,YA.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YA.jsx)(vx.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 yx=l(Y(),1),qA=l(w(),1),ZA=(0,qA.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qA.jsx)(yx.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 Sx=l(Y(),1),XA=l(w(),1),QA=(0,XA.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(Sx.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var _x=l(Y(),1),JA=l(w(),1),eL=(0,JA.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JA.jsx)(_x.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var xx=l(Y(),1),tL=l(w(),1),tu=(0,tL.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tL.jsx)(xx.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var wx=l(Y(),1),oL=l(w(),1),ou=(0,oL.jsx)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oL.jsx)(wx.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var Cx=l(Y(),1),rL=l(w(),1),ru=(0,rL.jsx)(Cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(Cx.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var Bx=l(Y(),1),nL=l(w(),1),iL=(0,nL.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nL.jsx)(Bx.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var Ex=l(Y(),1),sL=l(w(),1),zp=(0,sL.jsx)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sL.jsx)(Ex.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var Tx=l(Y(),1),aL=l(w(),1),lL=(0,aL.jsx)(Tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aL.jsx)(Tx.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var Ix=l(Y(),1),cL=l(w(),1),jp=(0,cL.jsx)(Ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cL.jsx)(Ix.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var Px=l(Y(),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:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var Rx=l(Y(),1),fL=l(w(),1),bl=(0,fL.jsx)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fL.jsx)(Rx.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 Ox=l(Y(),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,{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 Ax=l(Y(),1),hL=l(w(),1),xi=(0,hL.jsx)(Ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hL.jsx)(Ax.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 Lx=l(Y(),1),gL=l(w(),1),dn=(0,gL.jsx)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Lx.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 Nx=l(Y(),1),bL=l(w(),1),nv=(0,bL.jsx)(Nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bL.jsx)(Nx.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var Mx=l(Y(),1),kL=l(w(),1),vL=(0,kL.jsx)(Mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kL.jsx)(Mx.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 Dx=l(Y(),1),yL=l(w(),1),SL=(0,yL.jsx)(Dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yL.jsx)(Dx.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 Vx=l(Y(),1),_L=l(w(),1),Tf=(0,_L.jsx)(Vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_L.jsx)(Vx.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(Y(),1),sv=l(w(),1),Up=(0,sv.jsxs)(iv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,sv.jsx)(iv.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,sv.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 Fx=l(Y(),1),xL=l(w(),1),av=(0,xL.jsx)(Fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xL.jsx)(Fx.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 zx=l(Y(),1),wL=l(w(),1),ks=(0,wL.jsx)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wL.jsx)(zx.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var lv=l(Y(),1),cv=l(w(),1),kl=(0,cv.jsxs)(lv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,cv.jsx)(lv.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,cv.jsx)(lv.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 jx=l(Y(),1),CL=l(w(),1),BL=(0,CL.jsx)(jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CL.jsx)(jx.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 Ux=l(Y(),1),EL=l(w(),1),If=(0,EL.jsx)(Ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EL.jsx)(Ux.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var Hx=l(Y(),1),TL=l(w(),1),IL=(0,TL.jsx)(Hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TL.jsx)(Hx.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 Gx=l(Y(),1),PL=l(w(),1),wi=(0,PL.jsx)(Gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PL.jsx)(Gx.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Wx=l(Y(),1),RL=l(w(),1),OL=(0,RL.jsx)(Wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RL.jsx)(Wx.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var $x=l(Y(),1),AL=l(w(),1),LL=(0,AL.jsx)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AL.jsx)($x.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var Kx=l(Y(),1),NL=l(w(),1),ML=(0,NL.jsx)(Kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NL.jsx)(Kx.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Yx=l(Y(),1),DL=l(w(),1),VL=(0,DL.jsx)(Yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DL.jsx)(Yx.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 qx=l(Y(),1),FL=l(w(),1),zL=(0,FL.jsx)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FL.jsx)(qx.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 Zx=l(Y(),1),jL=l(w(),1),UL=(0,jL.jsx)(Zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jL.jsx)(Zx.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var Xx=l(Y(),1),HL=l(w(),1),Mr=(0,HL.jsx)(Xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HL.jsx)(Xx.Path,{d:"M7 11.5h10V13H7z"})});var Qx=l(Y(),1),GL=l(w(),1),WL=(0,GL.jsx)(Qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GL.jsx)(Qx.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 Jx=l(Y(),1),$L=l(w(),1),KL=(0,$L.jsx)(Jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$L.jsx)(Jx.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 ew=l(Y(),1),YL=l(w(),1),qL=(0,YL.jsx)(ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YL.jsx)(ew.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 tw=l(Y(),1),ZL=l(w(),1),Pf=(0,ZL.jsx)(tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZL.jsx)(tw.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 uv=l(Y(),1),dv=l(w(),1),XL=(0,dv.jsxs)(uv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,dv.jsx)(uv.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,dv.jsx)(uv.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 ow=l(Y(),1),QL=l(w(),1),JL=(0,QL.jsx)(ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QL.jsx)(ow.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 rw=l(Y(),1),eN=l(w(),1),nw=(0,eN.jsx)(rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eN.jsx)(rw.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var fv=l(Y(),1),mv=l(w(),1),tN=(0,mv.jsxs)(fv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,mv.jsx)(fv.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)(fv.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var Hp=l(Y(),1),Gp=l(w(),1),oN=(0,Gp.jsxs)(Hp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Gp.jsx)(Hp.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,Gp.jsx)(Hp.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,Gp.jsx)(Hp.Path,{d:"m18 7.5v9h1.5v-9z"})]});var pv=l(Y(),1),hv=l(w(),1),rN=(0,hv.jsxs)(pv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,hv.jsx)(pv.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)(pv.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var gv=l(Y(),1),bv=l(w(),1),nN=(0,bv.jsxs)(gv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,bv.jsx)(gv.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,bv.jsx)(gv.Path,{d:"m18 16.5v-9h1.5v9z"})]});var kv=l(Y(),1),vv=l(w(),1),iN=(0,vv.jsxs)(kv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,vv.jsx)(kv.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,vv.jsx)(kv.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var Wp=l(Y(),1),$p=l(w(),1),sN=(0,$p.jsxs)(Wp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$p.jsx)(Wp.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$p.jsx)(Wp.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,$p.jsx)(Wp.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var iw=l(Y(),1),aN=l(w(),1),lN=(0,aN.jsx)(iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aN.jsx)(iw.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 sw=l(Y(),1),cN=l(w(),1),yv=(0,cN.jsx)(sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cN.jsx)(sw.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var aw=l(Y(),1),uN=l(w(),1),Rf=(0,uN.jsx)(aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uN.jsx)(aw.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var lw=l(Y(),1),dN=l(w(),1),fN=(0,dN.jsx)(lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dN.jsx)(lw.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 cw=l(Y(),1),mN=l(w(),1),Ci=(0,mN.jsx)(cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mN.jsx)(cw.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 uw=l(Y(),1),pN=l(w(),1),hN=(0,pN.jsx)(uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pN.jsx)(uw.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 dw=l(Y(),1),gN=l(w(),1),bN=(0,gN.jsx)(dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gN.jsx)(dw.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 fw=l(Y(),1),kN=l(w(),1),vN=(0,kN.jsx)(fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kN.jsx)(fw.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 mw=l(Y(),1),yN=l(w(),1),SN=(0,yN.jsx)(mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yN.jsx)(mw.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 pw=l(Y(),1),_N=l(w(),1),xN=(0,_N.jsx)(pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_N.jsx)(pw.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 hw=l(Y(),1),wN=l(w(),1),CN=(0,wN.jsx)(hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wN.jsx)(hw.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 gw=l(Y(),1),BN=l(w(),1),vl=(0,BN.jsx)(gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BN.jsx)(gw.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 bw=l(Y(),1),EN=l(w(),1),vs=(0,EN.jsx)(bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EN.jsx)(bw.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 kw=l(Y(),1),TN=l(w(),1),IN=(0,TN.jsx)(kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TN.jsx)(kw.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 vw=l(Y(),1),PN=l(w(),1),RN=(0,PN.jsx)(vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PN.jsx)(vw.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 yw=l(Y(),1),ON=l(w(),1),AN=(0,ON.jsx)(yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ON.jsx)(yw.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 xl=l(ur(),1),zn=l(Re(),1),Te=l(F(),1);var ij=l($(),1),sj=l(K6(),1);var Wt="core/block-editor";var xw={};Ip(xw,{getAllPatterns:()=>bhe,getBlockRemovalRules:()=>dhe,getBlockSettings:()=>q6,getBlockStyles:()=>whe,getBlockWithoutAttributes:()=>she,getClosestAllowedInsertionPoint:()=>Q6,getClosestAllowedInsertionPointForPattern:()=>Bhe,getContentLockingParent:()=>LN,getEditedContentOnlySection:()=>NN,getEnabledBlockParents:()=>che,getEnabledClientIdsTree:()=>lhe,getExpandedBlock:()=>_he,getInserterMediaCategories:()=>phe,getInsertionPoint:()=>Ehe,getLastFocus:()=>yhe,getLastInsertedBlocksClientIds:()=>ihe,getListViewExpandRevision:()=>Nhe,getParentSectionBlock:()=>Af,getPatternBySlug:()=>ghe,getRegisteredInserterMediaCategories:()=>mhe,getRemovalPromptData:()=>uhe,getRequestedInspectorTab:()=>Dhe,getReusableBlocks:()=>vhe,getSectionRootClientId:()=>Lf,getStyleOverrides:()=>fhe,getViewportModalClientIds:()=>Mhe,getZoomLevel:()=>Che,hasAllowedPatterns:()=>hhe,hasBlockSpotlight:()=>Rhe,isBlockHiddenAnywhere:()=>The,isBlockHiddenAtViewport:()=>J6,isBlockHiddenEverywhere:()=>DN,isBlockInterfaceHidden:()=>nhe,isBlockParentHiddenAtViewport:()=>Phe,isBlockParentHiddenEverywhere:()=>Ihe,isBlockSubtreeDisabled:()=>ahe,isContainerInsertableToInContentOnlyMode:()=>_v,isDragging:()=>She,isEditLockedBlock:()=>ej,isListViewContentPanelOpen:()=>Ahe,isListViewPanelOpened:()=>Lhe,isLockedBlock:()=>Ohe,isMoveLockedBlock:()=>tj,isRemoveLockedBlock:()=>oj,isSectionBlock:()=>Sl,isWithinEditedContentOnlySection:()=>xhe,isZoomOut:()=>MN});var Dr=l(F(),1),Sv=l($(),1);var Sw=l(N(),1);var Et={desktop:{label:(0,Sw.__)("Desktop"),icon:aA,key:"desktop"},tablet:{label:(0,Sw.__)("Tablet"),icon:hN,key:"tablet"},mobile:{label:(0,Sw.__)("Mobile"),icon:av,key:"mobile"}},nu=Object.entries(Et);var _w=l($(),1),Y6=l(rt(),1);function pe(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var yl=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var ehe=["color","border","dimensions","typography","spacing"],the={"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},ohe={"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"},rhe=e=>ohe[e]||e;function q6(e,t,...o){let r=dt(e,t),n=[];if(t){let i=t;do{let s=dt(e,i);(0,_w.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(ehe.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,Y6.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=rhe(i);for(let d of n){let f=Bi(e,d);if(s=yl(f.settings?.blocks?.[r],a)??yl(f.settings,a),s!==void 0)break}let c=iu(e);if(s===void 0&&r&&(s=yl(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=yl(c.__experimentalFeatures,a)),s!==void 0)return _w.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=the[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:Z6}=M(Sv.privateApis);function nhe(e){return e.isBlockInterfaceHidden}function ihe(e){return e?.lastBlockInserted?.clientIds}function she(e,t){return e.blocks.byClientId.get(t)}var ahe=(e,t)=>{let o=r=>Ei(e,r)==="disabled"&&_r(e,r).every(o);return _r(e,t).every(o)};function _v(e,t,o){let r=Z6(t),n=dt(e,o),i=Z6(n);return Lf(e)===o||i&&r}function X6(e,t){let o=_r(e,t),r=[];for(let n of o){let i=X6(e,n);Ei(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var lhe=(0,Dr.createRegistrySelector)(()=>(0,Dr.createSelector)(X6,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blockEditingModes])),che=(0,Dr.createSelector)((e,t,o=!1)=>ys(e,t,o).filter(r=>Ei(e,r)!=="disabled"),e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function uhe(e){return e.removalPromptData}function dhe(e){return e.blockRemovalRules}var fhe=(0,Dr.createSelector)(e=>{let o=Kp(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 mhe(e){return e.registeredInserterMediaCategories}var phe=(0,Dr.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]),hhe=(0,Dr.createRegistrySelector)(e=>(0,Dr.createSelector)((t,o=null)=>{let{getAllPatterns:r}=M(e(Wt)),n=r(),{allowedBlockTypes:i}=iu(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=Of(s);return wv(c,i)&&c.every(({name:u})=>Nf(t,u,o))})},(t,o)=>[...Cv(e)(t),...su(e)(t,o)])),ghe=(0,Dr.createRegistrySelector)(e=>(0,Dr.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=M(e(Wt)).getReusableBlocks().find(({id:i})=>i===r);return n?xv(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[qc]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[M(e(Wt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[qc]?.(e)])),bhe=(0,Dr.createRegistrySelector)(e=>(0,Dr.createSelector)(t=>[...M(e(Wt)).getReusableBlocks().map(o=>xv(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[qc]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),Cv(e))),khe=[],vhe=(0,Dr.createRegistrySelector)(e=>t=>{let o=t.settings[b0];return(o?o(e):t.settings.__experimentalReusableBlocks)??khe});function yhe(e){return e.lastFocus}function She(e){return e.isDragging}function _he(e){return e.expandedBlock}var LN=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)da(e,o)==="contentOnly"&&(r=o);return r},Af=(e,t)=>{let o=t,r;for(;o=e.blocks.parents.get(o);)Sl(e,o)&&(r=o);return r};function Sl(e,t){if(t===e.editedContentOnlySection)return!1;let o=dt(e,t);if(o==="core/block")return!0;let r=Bi(e,t),n=o==="core/template-part",i=e.settings?.[Np];if((!e.settings?.disableContentOnlyForUnsyncedPatterns&&r?.metadata?.patternName||n)&&!i)return!0;let a=da(e,t)==="contentOnly",c=Io(e,t),u=da(e,c)==="contentOnly";return!!(a&&!u)}function NN(e){return e.editedContentOnlySection}function xhe(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 whe=(0,Dr.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 Lf(e){return e.settings?.[Zc]}function MN(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function Che(e){return e.zoomLevel}function Q6(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>Nf(e,a,s));if(!o){if(n(o))return o;let s=Lf(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=Io(e,i);return i}function Bhe(e,t,o){let{allowedBlockTypes:r}=iu(e);if(!wv(Of(t),r))return null;let i=Of(t).map(({blockName:s})=>s);return Q6(e,i,o)}function Ehe(e){return e.insertionPoint}var The=(e,t)=>{let o=dt(e,t);if(!(0,Sv.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(Et).some(i=>n?.viewport?.[i.key]===!1):!1},DN=(e,t)=>{let o=dt(e,t);return(0,Sv.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},Ihe=(e,t)=>ys(e,t).some(r=>DN(e,r)),J6=(e,t,o)=>{if(DN(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},Phe=(e,t,o)=>ys(e,t).some(n=>J6(e,n,o));function Rhe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function ej(e,t){return!!Bi(e,t)?.lock?.edit}function tj(e,t){let o=Bi(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=Io(e,t);return da(e,r)==="all"}function oj(e,t){let o=Bi(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=Io(e,t),n=da(e,r);return n==="all"||n==="insert"}function Ohe(e,t){return ej(e,t)||tj(e,t)||oj(e,t)}function Ahe(e){return e.listViewContentPanelOpen}function Lhe(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function Nhe(e){return e.listViewExpandRevision||0}function Mhe(e){return e.viewportModalClientIds}function Dhe(e){return e.requestedInspectorTab}var Ev=l(N(),1),Nt={user:"user",theme:"theme",directory:"directory"},Bv={full:"fully",unsynced:"unsynced"},Mf={name:"allPatterns",label:(0,Ev._x)("All","patterns")},_l={name:"myPatterns",label:(0,Ev.__)("My patterns")},Yp={name:"core/starter-content",label:(0,Ev.__)("Starter content")};function ww(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Nt.theme&&(r||n)||t===Nt.directory&&(r||!n)||t===Nt.user&&e.type!==Nt.user||o===Bv.full&&e.syncStatus!==""||o===Bv.unsynced&&e.syncStatus!=="unsynced"&&r)}var au=Symbol("isFiltered"),rj=new WeakMap,nj=new WeakMap;function xv(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:Nt.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 Vhe(e){let t=(0,ij.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 Cw(e){let t=rj.get(e);return t||(t=Vhe(e),rj.set(e,t)),t}function Of(e){let t=nj.get(e);return t||(t=(0,sj.parse)(e.content),t=t.filter(o=>o.blockName!==null),nj.set(e,t)),t}var Df=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,wv=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!Df(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},Cv=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[qc]?.(e),t.blockPatterns,M(e(Wt)).getReusableBlocks()],su=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Ei(e,t),Lf(e),Sl(e,t),Af(e,t)];var Fhe=(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 fa(e,t,o="asc"){return e.concat().sort(Fhe(t,e,o))}var{isContentBlock:FN}=M(Ee.privateApis),zhe=3600*1e3,jhe=24*3600*1e3,Uhe=168*3600*1e3,dr=[],Hhe=new Set,uj={[au]:!0};function dt(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(lj.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 Ghe(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Bi(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function wl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var Whe=(0,Te.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Bi(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function $he(e,t){let o=!t||!Ew(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||dr}var dj=(0,Te.createSelector)((e,t)=>((0,zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:fj(e,t)}),e=>[e.blocks.order]),fj=(0,Te.createSelector)((e,t="")=>((0,zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),_r(e,t).map(o=>dj(e,o))),e=>[e.blocks.order]),mj=(0,Te.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]),Kp=e=>mj(e,""),Khe=(0,Te.createSelector)((e,t)=>{let o=Kp(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]),pj=(0,Te.createSelector)((e,t)=>{if(!t)return dr;let o=Array.isArray(t)?t:[t],n=Kp(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:dr},e=>[e.blocks.order,e.blocks.byClientId]);function Yhe(e,t){return(0,zn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),pj(e,t)}var Bw=(0,Te.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>wl(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),qhe=(0,Te.createSelector)((e,t)=>Bw(e,t).filter(Boolean).map(o=>o.name),(e,t)=>Bw(e,t));function Zhe(e,t){return _r(e,t).length}function Iv(e){return e.selection.selectionStart}function Pv(e){return e.selection.selectionEnd}function Xhe(e){return e.selection.selectionStart.clientId}function Qhe(e){return e.selection.selectionEnd.clientId}function Jhe(e){let t=lu(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function ege(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function qp(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function tge(e){let t=qp(e);return t?wl(e,t):null}function Io(e,t){return e.blocks.parents.get(t)??null}var ys=(0,Te.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():dr},e=>[e.blocks.parents]),zN=(0,Te.createSelector)((e,t,o,r=!1)=>{let n=ys(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(dt(e,s)))},e=>[e.blocks.parents]);function oge(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function rge(e,t){let o=qp(e),r=[...ys(e,t),t],n=[...ys(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 jN(e,t,o=1){if(t===void 0&&(t=qp(e)),t===void 0&&(o<0?t=UN(e):t=hj(e)),!t)return null;let r=Io(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 nge(e,t){return jN(e,t,-1)}function ige(e,t){return jN(e,t,1)}function sge(e){return e.initialPosition}var Zp=(0,Te.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return dr;if(t.clientId===o.clientId)return[t.clientId];let r=Io(e,t.clientId);if(r===null)return dr;let n=_r(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 lu(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?dr:Zp(e)}var age=(0,Te.createSelector)(e=>{let t=lu(e);return t.length?t.map(o=>wl(e,o)):dr},e=>[...Zp.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function UN(e){return lu(e)[0]||null}function hj(e){let t=lu(e);return t[t.length-1]||null}function lge(e,t){return UN(e)===t}function gj(e,t){return lu(e).indexOf(t)!==-1}var cge=(0,Te.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=Io(e,o),r=gj(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function uge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function dge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function fge(e){let t=Iv(e),o=Pv(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function mge(e){let t=Iv(e),o=Pv(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function pge(e){return Zp(e).some(t=>{let o=dt(e,t);return!(0,Ee.getBlockType)(o).merge})}function hge(e,t){let o=Iv(e),r=Pv(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=Io(e,o.clientId),i=Io(e,r.clientId);if(n!==i)return!1;let s=_r(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=dt(e,f);if(!(0,Ee.getBlockType)(h).merge)return!1;let g=wl(e,m);if(g.name===h)return!0;let b=(0,Ee.switchToBlockType)(g,h);return b&&b.length}var gge=e=>{let t=Iv(e),o=Pv(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return dr;let r=Io(e,t.clientId),n=Io(e,o.clientId);if(r!==n)return dr;let i=_r(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=wl(e,c.clientId),f=wl(e,u.clientId),m=d.attributes[c.attributeKey],h=f.attributes[u.attributeKey],p=(0,xl.create)({html:m}),g=(0,xl.create)({html:h});return p=(0,xl.remove)(p,0,c.offset),g=(0,xl.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,xl.toHTMLString)({value:p})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,xl.toHTMLString)({value:g})}}]};function _r(e,t){return e.blocks.order.get(t||"")||dr}function bj(e,t){let o=Io(e,t);return _r(e,o).indexOf(t)}function kj(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function vj(e,t,o=!1){let r=Zp(e);return r.length?o?r.some(n=>ys(e,n,!0).includes(t)):r.some(n=>Io(e,n)===t):!1}function yj(e,t,o=!1){return _r(e,t).some(r=>HN(e,r)||o&&yj(e,r,o))}function bge(e,t){if(!t)return!1;let o=lu(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function kge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function vge(e){return e.isMultiSelecting}function yge(e){return e.isSelectionEnabled}function Sge(e,t){return e.blocksMode[t]||"visual"}function _ge(e){return e.isTyping}function Sj(e){return!!e.draggedBlocks.length}function xge(e){return e.draggedBlocks}function HN(e,t){return e.draggedBlocks.includes(t)}function wge(e,t){return Sj(e)?ys(e,t).some(r=>HN(e,r)):!1}function Cge(){return(0,zn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var Bge=(0,Te.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=Io(e,i)||void 0,o=bj(e,n.clientId)+1):o=_r(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Ege(e){return e.insertionCue!==null}function Tge(e){return e.template.isValid}function Ige(e){return e.settings.template}function da(e,t){if(!t)return e.settings.templateLock??!1;let o=qN(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var GN=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Ee.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=iu(e);if(!Df(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(dt(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},Rv=(e,t,o=null)=>{if(e.settings.isPreviewMode||!GN(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Ee.getBlockType)(t);let n=da(e,o);if(n&&n!=="contentOnly")return!1;let i=Ei(e,o??"");if(i==="disabled"&&t!==(0,Ee.getDefaultBlockName)())return!1;let s=qN(e,o);if(o&&s===void 0)return!1;let a=FN(t),c=!!Sl(e,o),u=c?o:Af(e,o),d=!!u;if(d&&!a||d&&dt(e,u)==="core/block")return!1;if((c||i==="contentOnly")&&!_v(e,t,o))if(t===(0,Ee.getDefaultBlockName)()){if(!_r(e,o).some(C=>dt(e,C)===(0,Ee.getDefaultBlockName)()))return!1}else return!1;let f=dt(e,o),h=(0,Ee.getBlockType)(f)?.allowedBlocks,p=Df(h,t);if(p!==!1){let S=s?.allowedBlocks,x=Df(S,t);x!==null&&(p=x)}let g=r.parent,b=Df(g,f),v=!0,k=r.ancestor;k&&(v=[o,...ys(e,o)].some(x=>Df(k,dt(e,x))));let y=v&&(p===null&&b===null||p===!0||b===!0);return y&&(0,cj.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:wl.bind(null,e),getBlockParentsByBlockName:zN.bind(null,e)})},Nf=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)(Rv,(t,o,r)=>su(e)(t,r)));function Pge(e,t,o=null){return t.every(r=>Nf(e,dt(e,r),o))}function WN(e,t){if(e.settings.isPreviewMode)return!1;let o=Bi(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=Io(e,t),n=da(e,r);if(n&&n!=="contentOnly")return!1;let i=!!Sl(e,r),s=i?r:Af(e,r),a=!!s,c=FN(dt(e,t));if(a&&!c||a&&dt(e,s)==="core/block")return!1;let u=Ei(e,r),d=dt(e,t);if((i||u==="contentOnly"||d===(0,Ee.getDefaultBlockName)())&&!_v(e,dt(e,t),r))if(d===(0,Ee.getDefaultBlockName)()){if(_r(e,r).filter(h=>dt(e,h)===(0,Ee.getDefaultBlockName)()).length>1)return!0}else return!1;return u!=="disabled"}function _j(e,t){return t.every(o=>WN(e,o))}function xj(e,t){if(e.settings.isPreviewMode)return!1;let o=Bi(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=Io(e,t);if(da(e,r)==="all")return!1;let i=!!Af(e,t),s=FN(dt(e,t));if(i&&!s)return!1;let a=!!Sl(e,r),c=Ei(e,r);return(a||c==="contentOnly")&&!_v(e,dt(e,t),r)?!1:Ei(e,r)!=="disabled"}function Rge(e,t){return t.every(o=>xj(e,o))}function wj(e,t){if(e.settings.isPreviewMode)return!1;let o=Bi(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function Oge(e,t){return e.settings.isPreviewMode||!(0,Ee.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function $N(e,t){return e.preferences.insertUsage?.[t]??null}var Tv=(e,t,o)=>(0,Ee.hasBlockSupport)(t,"inserter",!0)?Rv(e,t.name,o):!1,Age=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=$N(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:KN(n,i),isSearchOnly:o.isSearchOnly}},KN=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<zhe:return t*4;case o<jhe:return t*2;case o<Uhe:return t/2;default:return t/4}},Cj=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Ee.hasBlockSupport)(o.name,"multiple",!0)||(n=Bw(e,Kp(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=$N(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:KN(i,s)};if(t==="transform")return a;let c=(0,Ee.getBlockVariations)(o.name,"inserter"),u=(0,Ee.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}},Lge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null,r=uj)=>{let n=h=>{let p=h.wp_pattern_sync_status?Ci:{src:Ci,foreground:"var(--wp-block-synced-color)"},g=xv(h),{time:b,count:v=0}=$N(t,g.name)||{},k=KN(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 Cw(g).blocks},syncStatus:g.syncStatus}},i=Rv(t,"core/block",o)?M(e(Wt)).getReusableBlocks().map(n):[],s=Cj(t,{buildScope:"inserter"}),a=(0,Ee.getBlockTypes)().filter(h=>(0,Ee.hasBlockSupport)(h,"inserter",!0)).map(s);if(r[au]!==!1)a=a.filter(h=>Tv(t,h,o));else{let{getClosestAllowedInsertionPoint:h}=M(e(Wt));a=a.filter(p=>GN(t,p,o)&&h(p.name,o)!==null).map(p=>({...p,isAllowedInCurrentRoot:Tv(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=Age(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,Ee.getBlockTypes)(),M(e(Wt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...su(e)(t,o)])),Nge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=Cj(t,{buildScope:"transform"}),s=(0,Ee.getBlockTypes)().filter(u=>Tv(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,Ee.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return fa(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,Ee.getBlockTypes)(),t.preferences.insertUsage,...su(e)(t,r)])),Mge=(e,t=null)=>(0,Ee.getBlockTypes)().some(n=>Tv(e,n,t))?!0:Rv(e,"core/block",t),VN=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Ee.getBlockTypes)().filter(i=>Tv(t,i,o));return Rv(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Ee.getBlockTypes)(),...su(e)(t,o)])),Dge=(0,Te.createSelector)((e,t=null)=>((0,zn.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),VN(e,t)),(e,t)=>VN.getDependants(e,t));function Bj(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings[t]??{};if(!(!o||!r))return o}function Vge(e,t=null){return(0,zn.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Bj(e,t)}var Fge=(0,Te.createRegistrySelector)(e=>(t,o)=>{let r=M(e(Wt)).getPatternBySlug(o);return r?Cw(r):null}),YN=e=>(t,o)=>[...Cv(e)(t),...su(e)(t,o)],aj=new WeakMap;function zge(e){let t=aj.get(e);return t||(t={...e,get blocks(){return Cw(e).blocks}},aj.set(e,t)),t}var jge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o=null,r=uj)=>{let{getAllPatterns:n}=M(e(Wt)),i=n(),{allowedBlockTypes:s}=iu(t);return i.filter(({inserter:d=!0})=>!!d).map(zge).filter(d=>wv(Of(d),s)).filter(d=>Of(d).every(({blockName:f})=>r[au]!==!1?Nf(t,f,o):GN(t,f,o)))},YN(e))),Uge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{if(!o)return dr;let n=e(Wt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?dr:s},(t,o,r)=>YN(e)(t,r))),Hge=(0,Te.createRegistrySelector)(e=>((0,zn.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Wt).getPatternsByBlockTypes)),Gge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||Ew(t,i)))return dr;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Wt).getPatternsByBlockTypes(n,r)},(t,o,r)=>YN(e)(t,r)));function qN(e,t){return e.blockListSettings[t]}function iu(e){return e.settings}function Wge(e){return e.blocks.isPersistentChange}var $ge=(0,Te.createSelector)((e,t=[])=>t.reduce((o,r)=>e.blockListSettings[r]?{...o,[r]:e.blockListSettings[r]}:o,{}),e=>[e.blockListSettings]),Kge=(0,Te.createRegistrySelector)(e=>(0,Te.createSelector)((t,o)=>{(0,zn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=M(e(Wt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[M(e(Wt)).getReusableBlocks()]));function Yge(e){return e.blocks.isIgnoredChange}function qge(e){return e.lastBlockAttributesChange}function Zge(){return(0,zn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function Xge(e){return!!e.automaticChangeStatus}function Qge(e,t){return e.highlightedBlock===t}function Ew(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Jge=(0,Te.createSelector)((e,t)=>{if(!t.length)return null;let o=qp(e);if(t.includes(dt(e,o)))return o;let r=lu(e),n=zN(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function ebe(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function tbe(e,t){return e.blockVisibility?.[t]??!0}function obe(){(0,zn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var rbe=(0,Te.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?Hhe:t},e=>[e.blockVisibility]);function Ej(e,t){if(Ei(e,t)!=="default")return!1;if(!wj(e,t))return!0;if(MN(e)){let n=Lf(e);if(n){if(_r(e,n)?.includes(t))return!0}else if(t&&!Io(e,t))return!0}return((0,Ee.hasBlockSupport)(dt(e,t),"__experimentalDisableBlockOverlay",!1)?!1:Ew(e,t))&&!kj(e,t)&&!vj(e,t,!0)}function nbe(e,t){let o=e.blocks.parents.get(t);for(;o;){if(Ej(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Ei(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blockEditingModes.has(t)?e.blockEditingModes.get(t):"default"}var ibe=(0,Te.createRegistrySelector)(e=>(t,o="")=>{let r=o||qp(t);if(!r||Sl(t,r))return!1;let{getGroupingBlockName:n}=e(Ee.store),i=wl(t,r),s=n();return i&&(i.name===s||(0,Ee.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&WN(t,r)}),sbe=(0,Te.createRegistrySelector)(e=>(t,o=dr)=>{let{getGroupingBlockName:r}=e(Ee.store),n=r(),i=o?.length?o:Zp(t),s=i?.length?Io(t,i[0]):void 0;return Nf(t,n,s)&&i.length&&_j(t,i)}),abe=(e,t)=>((0,zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),LN(e,t));function lbe(e){return(0,zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),NN(e)}var Tw={};Ip(Tw,{__experimentalUpdateSettings:()=>XN,clearBlockRemovalPrompt:()=>pbe,clearRequestedInspectorTab:()=>Obe,closeListViewContentPanel:()=>Tbe,deleteStyleOverride:()=>bbe,editContentOnlySection:()=>JN,ensureDefaultBlock:()=>Aj,expandBlock:()=>Sbe,hideBlockInterface:()=>dbe,hideViewportModal:()=>Pbe,openListViewContentPanel:()=>Ebe,privateRemoveBlocks:()=>QN,requestInspectorTab:()=>Rbe,resetZoomLevel:()=>Cbe,setBlockRemovalRules:()=>hbe,setInsertionPoint:()=>_be,setLastFocus:()=>kbe,setStyleOverride:()=>gbe,setZoomLevel:()=>wbe,showBlockInterface:()=>fbe,showViewportModal:()=>Ibe,startDragging:()=>vbe,stopDragging:()=>ybe,stopEditingContentOnlySection:()=>xbe,toggleBlockSpotlight:()=>Bbe});var Ij=l(P(),1),Pj=l(Re(),1),Rj=l(Zo(),1),Oj=l(N(),1),cbe=e=>Array.isArray(e)?e:[e],ube=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function XN(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,Pj.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&&Ij.Platform.OS==="web"){n={};for(let i in r)ube.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function dbe(){return{type:"HIDE_BLOCK_INTERFACE"}}function fbe(){return{type:"SHOW_BLOCK_INTERFACE"}}var QN=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=cbe(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(mbe(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(Aj())})},Aj=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function mbe(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function pbe(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function hbe(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function gbe(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function bbe(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function kbe(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function vbe(){return{type:"START_DRAGGING"}}function ybe(){return{type:"STOP_DRAGGING"}}function Sbe(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function _be(e){return{type:"SET_INSERTION_POINT",value:e}}function JN(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function xbe(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var wbe=(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,Rj.speak)((0,Oj.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function Cbe(){return{type:"RESET_ZOOM_LEVEL"}}function Bbe(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function Ebe(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function Tbe(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function Ibe(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function Pbe(){return{type:"HIDE_VIEWPORT_MODAL"}}function Rbe(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function Obe(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}var oM={};Ip(oM,{__unstableDeleteSelection:()=>oke,__unstableExpandSelection:()=>nke,__unstableIncrementListViewExpandRevision:()=>Vke,__unstableMarkAutomaticChange:()=>_ke,__unstableMarkLastChangeAsPersistent:()=>yke,__unstableMarkNextChangeAsNotPersistent:()=>Ske,__unstableSaveReusableBlock:()=>vke,__unstableSetAllListViewPanelsOpen:()=>Mke,__unstableSetEditorMode:()=>xke,__unstableSetOpenListViewPanel:()=>Nke,__unstableSetTemporarilyEditingAsBlocks:()=>Rke,__unstableSplitSelection:()=>rke,__unstableToggleListViewPanel:()=>Dke,clearSelectedBlock:()=>Wbe,duplicateBlocks:()=>Cke,enterFormattedText:()=>mke,exitFormattedText:()=>pke,flashBlock:()=>Tke,hideInsertionPoint:()=>Jbe,hoverBlock:()=>Fbe,insertAfterBlock:()=>Eke,insertBeforeBlock:()=>Bke,insertBlock:()=>Xbe,insertBlocks:()=>Hj,insertDefaultBlock:()=>gke,mergeBlocks:()=>ike,moveBlockToPosition:()=>Zbe,moveBlocksDown:()=>Ybe,moveBlocksToPosition:()=>Uj,moveBlocksUp:()=>qbe,multiSelect:()=>Gbe,receiveBlocks:()=>Nbe,registerInserterMediaCategory:()=>Oke,removeBlock:()=>ske,removeBlocks:()=>Gj,replaceBlock:()=>Kbe,replaceBlocks:()=>zj,replaceInnerBlocks:()=>ake,resetBlocks:()=>Abe,resetSelection:()=>Lbe,selectBlock:()=>Vbe,selectNextBlock:()=>jbe,selectPreviousBlock:()=>zbe,selectionChange:()=>hke,setBlockEditingMode:()=>Ake,setBlockMovingClientId:()=>wke,setBlockVisibility:()=>Pke,setHasControlledInnerBlocks:()=>Ike,setTemplateValidity:()=>eke,showInsertionPoint:()=>Qbe,startDraggingBlocks:()=>dke,startMultiSelect:()=>Ube,startTyping:()=>cke,stopDraggingBlocks:()=>fke,stopMultiSelect:()=>Hbe,stopTyping:()=>uke,synchronizeTemplate:()=>tke,toggleBlockHighlight:()=>tM,toggleBlockMode:()=>lke,toggleSelection:()=>$be,unsetBlockEditingMode:()=>Lke,updateBlock:()=>Dbe,updateBlockAttributes:()=>Mbe,updateBlockListSettings:()=>bke,updateSettings:()=>kke,validateBlocksToTemplate:()=>Fj});var be=l($(),1),Iw=l(Zo(),1),cu=l(N(),1),Dj=l(Ti(),1),ft=l(ur(),1),uu=l(Re(),1),Vj=l(Xp(),1);var Mj=l(ur(),1),Cl="\x86";function Ov(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof Mj.RichTextData)&&o.toString().indexOf(Cl)!==-1})}function eM(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var Qp=e=>Array.isArray(e)?e:[e],Abe=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(Fj(e))},Fj=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,be.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function Lbe(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function Nbe(e){return(0,uu.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Mbe(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Qp(e),attributes:t,options:o}}function Dbe(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Vbe(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Fbe(){return(0,uu.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var zbe=(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)}}},jbe=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function Ube(){return{type:"START_MULTI_SELECT"}}function Hbe(){return{type:"STOP_MULTI_SELECT"}}var Gbe=(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,Iw.speak)((0,cu.sprintf)((0,cu._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function Wbe(){return{type:"CLEAR_SELECTED_BLOCK"}}function $be(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var zj=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=Qp(e),t=Qp(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 Kbe(e,t){return zj(e,t)}var jj=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:Qp(t),rootClientId:o})},Ybe=jj("MOVE_BLOCKS_DOWN"),qbe=jj("MOVE_BLOCKS_UP"),Uj=(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 Zbe(e,t="",o="",r){return Uj([e],t,o,r)}function Xbe(e,t,o,r,n,i){return Hj([e],t,o,r,n,i)}var Hj=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,uu.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=Qp(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 Qbe(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 Jbe=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function eke(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var tke=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,be.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},oke=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,be.getBlockType)(p.name);if(!g.merge)return;let b=f,v=m,k=o.getBlock(b.clientId),y=o.getBlock(v.clientId),S=k.attributes[b.attributeKey],x=y.attributes[v.attributeKey],C=(0,ft.create)({html:S}),B=(0,ft.create)({html:x});C=(0,ft.remove)(C,b.offset,C.text.length),B=(0,ft.insert)(B,Cl,0,v.offset);let I=(0,be.cloneBlock)(k,{[b.attributeKey]:(0,ft.toHTMLString)({value:C})}),O=(0,be.cloneBlock)(y,{[v.attributeKey]:(0,ft.toHTMLString)({value:B})}),E=e?I:O,L=k.name===y.name?[E]:(0,be.switchToBlockType)(E,g.name);if(!L||!L.length)return;let T;if(e){let ne=L.pop();T=g.merge(ne.attributes,O.attributes)}else{let ne=L.shift();T=g.merge(I.attributes,ne.attributes)}let R=Ov(T),D=T[R],j=(0,ft.create)({html:D}),G=j.text.indexOf(Cl),z=(0,ft.remove)(j,G,G+1),H=(0,ft.toHTMLString)({value:z});T[R]=H;let W=o.getSelectedBlockClientIds(),te=[...e?L:[],{...p,attributes:{...p.attributes,...T}},...e?[]:L];t.batch(()=>{r.selectionChange(p.clientId,R,G,G),r.replaceBlocks(W,te,0,o.getSelectedBlocksInitialCaretPosition())})},rke=(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,be.getBlockType)(g.name),k=(0,be.getBlockType)(b.name),y=typeof h.attributeKey=="string"?h.attributeKey:eM(v),S=typeof p.attributeKey=="string"?p.attributeKey:eM(k),x=o.getBlockAttributes(h.clientId);if(x?.metadata?.bindings?.[y]){if(e.length){let{createWarningNotice:X}=t.dispatch(Dj.store);X((0,cu.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(h.clientId);return}if(!y||!S||typeof n.offset>"u"||typeof i.offset>"u")return;if(h.clientId===p.clientId&&y===S&&h.offset===p.offset){if(e.length){if((0,be.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([h.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(h.clientId).length){let X=function(){let le=(0,be.getDefaultBlockName)();return o.canInsertBlockType(le,s)?(0,be.createBlock)(le):(0,be.createBlock)(o.getBlockName(h.clientId))};var B=X;let ee=x[y].length;if(h.offset===0&&ee){r.insertBlocks([X()],o.getBlockIndex(h.clientId),s,!1);return}if(h.offset===ee){r.insertBlocks([X()],o.getBlockIndex(h.clientId)+1,s);return}}}let I=g.attributes[y],O=b.attributes[S],E=(0,ft.create)({html:I}),L=(0,ft.create)({html:O});E=(0,ft.remove)(E,h.offset,E.text.length),L=(0,ft.remove)(L,0,p.offset);let T={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[y]:(0,ft.toHTMLString)({value:E})}},R={...b,clientId:g.clientId===b.clientId?(0,be.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[S]:(0,ft.toHTMLString)({value:L})}},D=(0,be.getDefaultBlockName)();if(g.clientId===b.clientId&&D&&R.name!==D&&o.canInsertBlockType(D,s)){let X=(0,be.switchToBlockType)(R,D);X?.length===1&&(R=X[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[T,R]);return}let j,G=[],z=[...e],H=z.shift(),W=(0,be.getBlockType)(T.name),te=W.merge&&H.name===W.name?[H]:(0,be.switchToBlockType)(H,W.name);if(te?.length){let X=te.shift();T={...T,attributes:{...T.attributes,...W.merge(T.attributes,X.attributes)}},G.push(T),j={clientId:T.clientId,attributeKey:y,offset:(0,ft.create)({html:T.attributes[y]}).text.length},z.unshift(...te)}else(0,be.isUnmodifiedBlock)(T)||G.push(T),G.push(H);let ne=z.pop(),ae=(0,be.getBlockType)(R.name);if(z.length&&G.push(...z),ne){let X=ae.merge&&ae.name===ne.name?[ne]:(0,be.switchToBlockType)(ne,ae.name);if(X?.length){let ee=X.pop();G.push({...R,attributes:{...R.attributes,...ae.merge(ee.attributes,R.attributes)}}),G.push(...X),j={clientId:R.clientId,attributeKey:S,offset:(0,ft.create)({html:ee.attributes[S]}).text.length}}else G.push(ne),(0,be.isUnmodifiedBlock)(R)||G.push(R)}else(0,be.isUnmodifiedBlock)(R)||G.push(R);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),G,G.length-1,0),j&&r.selectionChange(j.clientId,j.attributeKey,j.offset,j.offset)})},nke=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},ike=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,be.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,be.getBlockSupport)(a.name,"__experimentalOnMerge")){let x=(0,be.switchToBlockType)(u,c.name);if(x?.length!==1){n.selectBlock(a.clientId);return}let[C]=x;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 I=r.getBlockAttributes(i),O=r.getBlockAttributes(B);Object.keys(I).every(E=>I[E]===O[E])&&(n.moveBlocksToPosition(r.getBlockOrder(B),B,i),n.removeBlock(B,!1))}});return}if((0,be.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,be.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,be.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,be.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,be.cloneBlock)(a),k=(0,be.cloneBlock)(u);if(b){let x=f===i?v:k,C=x.attributes[m],B=(0,ft.insert)((0,ft.create)({html:C}),Cl,h,h);x.attributes[m]=(0,ft.toHTMLString)({value:B})}let y=a.name===u.name?[k]:(0,be.switchToBlockType)(k,a.name);if(!y||!y.length)return;let S=c.merge(v.attributes,y[0].attributes);if(b){let x=Ov(S),C=S[x],B=(0,ft.create)({html:C}),I=B.text.indexOf(Cl),O=(0,ft.remove)(B,I,I+1),E=(0,ft.toHTMLString)({value:O});S[x]=E,n.selectionChange(a.clientId,x,I,I)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,...S}},...y.slice(1)],0)},Gj=(e,t=!0)=>QN(e,t);function ske(e,t){return Gj([e],t)}function ake(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 lke(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function cke(){return{type:"START_TYPING"}}function uke(){return{type:"STOP_TYPING"}}function dke(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function fke(){return{type:"STOP_DRAGGING_BLOCKS"}}function mke(){return(0,uu.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function pke(){return(0,uu.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function hke(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var gke=(e,t,o)=>({dispatch:r})=>{let n=(0,be.getDefaultBlockName)();if(!n)return;let i=(0,be.createBlock)(n,e);return r.insertBlock(i,o,t)};function bke(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function kke(e){return XN(e,{stripExperimentalSettings:!0})}function vke(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function yke(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Ske(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var _ke=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},xke=e=>({registry:t})=>{t.dispatch(Vj.store).set("core","editorTool",e),e==="navigation"?(0,Iw.speak)((0,cu.__)("You are currently in Write mode.")):e==="edit"&&(0,Iw.speak)((0,cu.__)("You are currently in Design mode."))};function wke(){return(0,uu.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var Cke=(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,be.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=Qp(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,be.__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)},Bke=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,be.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i,r)},Eke=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i+1);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,be.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i+1,r)};function tM(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var Tke=(e,t=150)=>async({dispatch:o})=>{o(tM(e,!0)),await new Promise(r=>setTimeout(r,t)),o(tM(e,!1))};function Ike(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Pke(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Rke(e){return(0,uu.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),JN(e)}var Oke=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 Ake(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Lke(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function Nke(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function Mke(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function Dke(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function Vke(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var Jp={reducer:H6,selectors:ZN,actions:oM},_=(0,Pw.createReduxStore)(Wt,{...Jp,persist:["preferences"]}),Wj=(0,Pw.registerStore)(Wt,{...Jp,persist:["preferences"]});M(Wj).registerPrivateActions(Tw);M(Wj).registerPrivateSelectors(xw);M(_).registerPrivateActions(Tw);M(_).registerPrivateSelectors(xw);var eh=l(A(),1),$j=l(N(),1);var Ss=l(w(),1);function Fke({className:e,actions:t,children:o,secondaryActions:r}){return(0,Ss.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Ss.jsx)("div",{className:V(e,"block-editor-warning"),children:(0,Ss.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Ss.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Ss.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Ss.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Ss.jsx)(eh.DropdownMenu,{className:"block-editor-warning__secondary",icon:ks,label:(0,$j.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Ss.jsx)(eh.MenuGroup,{children:r.map((n,i)=>(0,Ss.jsx)(eh.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var du=Fke;var th=l(w(),1);function qj({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,Yj.useDispatch)(_),n=(0,Kj.getBlockType)(t);return(0,th.jsxs)(du,{actions:[(0,th.jsx)(rM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,Rw.__)("Find original")},"find-original"),(0,th.jsx)(rM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,Rw.__)("Remove")},"remove")],children:[(0,th.jsxs)("strong",{children:[n?.title,": "]}),(0,Rw.__)("This block can only be used once.")]})}var Av=l(w(),1);function Lw({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,Ow.hasBlockSupport)(s,"layout",!1)||(0,Ow.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!Pe()[zk]||(0,Ow.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:v}=(0,Aw.useContext)(cr);return(0,Av.jsxs)(l0,{value:(0,Aw.useMemo)(()=>({name:s,isSelected:a,clientId:c,layout:p?f:null,__unstableLayoutClassNames:d,[bs]:e,[Pp]:t,[$c]:o&&r!=="disabled",[s0]:r,[Rp]:h,[a0]:n,[zk]:b}),[s,a,c,p,f,d,e,t,o,r,h,n,b]),children:[(0,Av.jsx)(N6,{...i}),v&&(0,Av.jsx)(qj,{originalBlockClientId:v,name:s,onReplace:i.onReplace})]})}function me(...e){let{clientId:t=null}=Pe();return(0,Zj.useSelect)(o=>M(o(_)).getBlockSettings(t,...e),[t,...e])}function Qj(e){(0,Xj.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]=me(e);return t}var Mw=l(w(),1),{kebabCase:zke}=M(eU.privateApis),Jj=([e,...t])=>e.toUpperCase()+t.join(""),jke=e=>(0,Vf.createHigherOrderComponent)(t=>function(r){return(0,Mw.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),Uke=()=>(0,Vf.createHigherOrderComponent)(e=>function(o){let[r,n,i]=me("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,Nw.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,Mw.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function tU(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:zke(n)}:n}),{});return(0,Vf.compose)([t,r=>class extends Nw.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 C6(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=Jj(s),c=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,c),i},{})}createSetColor(i,s){return a=>{let c=u0(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=ua(s,i[u],i[`custom${Jj(u)}`]),m=a[u];return m?.color===f.color&&m?c[u]=m:c[u]={...f,class:yi(d,f.slug)},c},{})}render(){return(0,Mw.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function oU(e){return(...t)=>{let o=jke(e);return(0,Vf.createHigherOrderComponent)(tU(t,o),"withCustomColors")}}function rU(...e){let t=Uke();return(0,Vf.createHigherOrderComponent)(tU(e,t),"withColors")}var Dw=l(P(),1),Vw=l(F(),1);function oh(e){if(e)return`has-${e}-gradient-background`}function Fw(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function nU(e,t){return e?.find(r=>r.gradient===t)}function iU(e,t){let o=nU(e,t);return o&&o.slug}function Hke({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Pe(),[r,n,i]=me("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,Dw.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,Vw.useSelect)(h=>{let{getBlockAttributes:p}=h(_),g=p(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,Vw.useDispatch)(_),d=(0,Dw.useCallback)(h=>{let p=iU(s,h);if(p){u(o,{[e]:p,[t]:void 0});return}u(o,{[e]:void 0,[t]:h})},[s,o,u]),f=oh(a),m;return a?m=Fw(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var sU=l(A(),1);var{kebabCase:Gke}=M(sU.privateApis),rh=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function nM(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function fu(e){if(e)return`has-${Gke(e)}-font-size`}var Wke="1600px",$ke="320px",Kke=1,Yke=.25,qke=.75,Zke="14px";function aU({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=$ke,maximumViewportWidth:n=Wke,scaleFactor:i=Kke,minimumFontSizeLimit:s}){if(s=mu(s)?s:Zke,o){let y=mu(o);if(!y?.unit)return null;let S=mu(s,{coerceTo:y.unit});if(S?.value&&!e&&!t&&y?.value<=S?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let x=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),Yke),qke),B=Lv(y.value*C,3);S?.value&&B<S?.value?e=`${S.value}${S.unit}`:e=`${B}${y.unit}`}}let a=mu(e),c=a?.unit||"rem",u=mu(t,{coerceTo:c});if(!a||!u)return null;let d=mu(e,{coerceTo:"rem"}),f=mu(n,{coerceTo:c}),m=mu(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=Lv(m.value/100,3),g=Lv(p,3)+c,b=100*((u.value-a.value)/h),v=Lv((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function mu(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:Lv(d,3),unit:u}}function Lv(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var lU=l(A(),1);var cU=l(w(),1);function Xke(e){let[t,o]=me("typography.fontSizes","typography.customFontSize");return(0,cU.jsx)(lU.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var iM=Xke;var Nv=l(Z(),1),dU=l(P(),1);var sM=l(w(),1),Qke=[],uU=([e,...t])=>e.toUpperCase()+t.join(""),fU=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${uU(r)}`,o),{});return(0,Nv.createHigherOrderComponent)((0,Nv.compose)([(0,Nv.createHigherOrderComponent)(o=>function(n){let[i]=me("typography.fontSizes");return(0,sM.jsx)(o,{...n,fontSizes:i||Qke})},"withFontSizes"),o=>class extends dU.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=uU(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=rh(i,m,n[f]);return u[d]={...h,class:fu(m)},u},{});return{...s,...c}}render(){return(0,sM.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var pu=l(N(),1),zw=l(A(),1);var mU=l(w(),1),Jke=[{icon:Qc,title:(0,pu.__)("Align text left"),align:"left"},{icon:kf,title:(0,pu.__)("Align text center"),align:"center"},{icon:Jc,title:(0,pu.__)("Align text right"),align:"right"}],eve={placement:"bottom-start"};function tve({value:e,onChange:t,alignmentControls:o=Jke,label:r=(0,pu.__)("Align text"),description:n=(0,pu.__)("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,pu.isRTL)()?Jc:Qc}let d=s?zw.ToolbarGroup:zw.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:eve};return(0,mU.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 aM=tve;var lM=l(w(),1),jw=e=>(0,lM.jsx)(aM,{...e,isToolbar:!1}),pU=e=>(0,lM.jsx)(aM,{...e,isToolbar:!0});var Yw=l(rt(),1),qw=l(A(),1),MU=l(P(),1),Zw=l($(),1);var EU=l(F(),1),gu=l($(),1),mM=l(P(),1);var xU=l(kU(),1);var cM=function(e,t){return cM=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])},cM(e,t)};function vU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");cM(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Fo=function(){return Fo=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},Fo.apply(this,arguments)};function yU(e){return e.toLowerCase()}var sve=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ave=/[^A-Z0-9]+/gi;function _U(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?sve:o,n=t.stripRegexp,i=n===void 0?ave:n,s=t.transform,a=s===void 0?yU:s,c=t.delimiter,u=c===void 0?" ":c,d=SU(SU(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 SU(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var lve=e=>e.name||"",cve=e=>e.title,uve=e=>e.description||"",dve=e=>e.keywords||[],fve=e=>e.category,mve=()=>null,pve=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],hve=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),uM=new Map,dM=new Map;function Hw(e=""){if(uM.has(e))return uM.get(e);let t=_U(e,{splitRegexp:pve,stripRegexp:hve}).split(" ").filter(Boolean);return uM.set(e,t),t}function Mv(e=""){if(dM.has(e))return dM.get(e);let t=(0,xU.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),dM.set(e,t),t}var Dv=(e="")=>Hw(Mv(e)),gve=(e,t)=>e.filter(o=>!Dv(t).some(r=>r.includes(o))),Gw=(e,t,o,r)=>Dv(r).length===0?e:Vv(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),Vv=(e=[],t="",o={})=>{if(Dv(t).length===0)return e;let n=e.map(i=>[i,bve(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function bve(e,t,o={}){let{getName:r=lve,getTitle:n=cve,getDescription:i=uve,getKeywords:s=dve,getCategory:a=fve,getCollection:c=mve}=o,u=r(e),d=n(e),f=i(e),m=s(e),h=a(e),p=c(e),g=Mv(t),b=Mv(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=Hw(g);gve(y,k).length===0&&(v+=10)}if(v!==0&&u.startsWith("core/")){let k=u!==e.id;v+=k?1:2}return v}var ma=l($(),1),nh=l(F(),1),Ww=l(P(),1),wU=l(Ti(),1),$w=l(N(),1);var kve=(e,t,o)=>{let r=(0,Ww.useMemo)(()=>({[au]:!!o}),[o]),[n]=(0,nh.useSelect)(d=>[d(_).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=M((0,nh.useSelect)(_)),{createErrorNotice:s}=(0,nh.useDispatch)(wU.store),[a,c]=(0,nh.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(ma.store);return[f(),m()]},[]),u=(0,Ww.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:h,content:p},g)=>{let b=i(d,e);if(b===null){let k=(0,ma.getBlockType)(d)?.title??d;s((0,$w.sprintf)((0,$w.__)(`Block "%s" can't be inserted.`),k),{type:"snackbar",id:"inserter-notice"});return}let v=h==="unsynced"?(0,ma.parse)(p,{__unstableSkipMigrationLogs:!0}):(0,ma.createBlock)(d,f,(0,ma.createBlocksFromInnerBlocksTemplate)(m));t(v,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},hu=kve;var CU=l(A(),1);var BU=l(P(),1),fM=l(w(),1);function vve({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:Xk});let n=(0,fM.jsx)(CU.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,fM.jsx)("span",{style:i,className:V("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Oe=(0,BU.memo)(vve);var Kw=(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 ih=l(w(),1),yve=()=>{},Sve=9;function _ve(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,EU.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:h}=u(_),{getActiveBlockVariation:p}=u(gu.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]=hu(t,yve,!0),a=(0,mM.useMemo)(()=>(e.trim()?Gw(n,i,s,e):Kw(fa(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,Sve),[e,o,n,i,s,r]);return[(0,mM.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,ih.jsxs)(ih.Fragment,{children:[(0,ih.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,gu.cloneBlock)(s)):(0,gu.createBlock)(t,o,(0,gu.createBlocksFromInnerBlocksTemplate)(r))}}}}var TU=_ve();var OU=l(PU(),1),AU=l(un(),1);var LU=l(pM(),1),Ff=l(w(),1),xve=10;function wve(){return{name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await(0,OU.default)({path:(0,AU.addQueryArgs)("/wp/v2/search",{per_page:xve,search:e,type:"post",order_by:"menu_order"})});return t=t.filter(o=>o.title!==""),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,Ff.jsxs)(Ff.Fragment,{children:[(0,Ff.jsx)(xe,{icon:e.subtype==="page"?kl:UL},"icon"),(0,LU.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,Ff.jsx)("a",{href:e.url,children:e.title})}}}var NU=wve();var DU=l(w(),1),Cve=[];function VU({completers:e=Cve}){let{name:t}=Pe();return(0,MU.useMemo)(()=>{let o=[...e,NU];return(t===(0,Zw.getDefaultBlockName)()||(0,Zw.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,TU]),(0,Yw.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,Yw.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function FU(e){return(0,qw.__unstableUseAutocompleteProps)({...e,completers:VU(e)})}function Bve(e){return(0,DU.jsx)(qw.Autocomplete,{...e,completers:VU(e)})}var zU=Bve;var vM=l(N(),1),yu=l(A(),1);var sH=l(F(),1);var oC=l(P(),1);var Ii=l(N(),1);var fn=l(A(),1);var sh=l(N(),1);var jn={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 Un(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function bu(e,t=jn,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${Un(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function Xw(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,sh.sprintf)((0,sh.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,sh.sprintf)((0,sh.__)("Max %s wide"),o)),n}var _s=l(N(),1);var jU=8,ku=["top","right","bottom","left"],UU={top:void 0,right:void 0,bottom:void 0,left:void 0},Qw={custom:nw,axial:nw,horizontal:oN,vertical:sN,top:iN,right:nN,bottom:tN,left:rN},pa={default:(0,_s.__)("Spacing control"),top:(0,_s.__)("Top"),bottom:(0,_s.__)("Bottom"),left:(0,_s.__)("Left"),right:(0,_s.__)("Right"),mixed:(0,_s.__)("Mixed"),vertical:(0,_s.__)("Vertical"),horizontal:(0,_s.__)("Horizontal"),axial:(0,_s.__)("Horizontal & vertical"),custom:(0,_s.__)("Custom")},Bl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Jw(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function HU(e,t){if(!Jw(e))return e;let o=Eve(e);return t.find(n=>String(n.slug)===o)?.size}function ah(e,t){if(!e||Jw(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 Fv(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Eve(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 hM(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 Tve(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 GU(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&&Tve(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(hM(t)&&(a||c))return Bl.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]:Bl.custom}function Ive(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function fr(e,t="0"){let o=Ive(e);if(!o)return null;let r=Fv(o?.top)||t,n=Fv(o?.left)||t;return r===n?r:`${r} ${n}`}var oo=l(w(),1),Pve={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},WU={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Rve={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},$U={horizontal:"center",vertical:"top"},Ove=["wrap","nowrap"],YU={name:"flex",label:(0,Ii.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0,allowWrap:s=!0}=r;return(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsxs)(fn.Flex,{children:[i&&(0,oo.jsx)(fn.FlexItem,{children:(0,oo.jsx)(KU,{layout:t,onChange:o})}),n&&(0,oo.jsx)(fn.FlexItem,{children:(0,oo.jsx)(Mve,{layout:t,onChange:o})})]}),s&&(0,oo.jsx)(Nve,{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,oo.jsxs)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,oo.jsx)(KU,{layout:t,onChange:o,isToolbar:!0}),n&&(0,oo.jsx)(Ave,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=jn}){let{orientation:c="horizontal"}=o,u="0.5em";if(s){let k=fr(s,"0.5em").split(" ");u=k.length>1?k[1]:k[0]}let d=r?.spacing?.blockGap&&!He(n,"spacing","blockGap")?fr(r?.spacing?.blockGap,u):void 0,f=Pve[o.justifyContent],m=Ove.includes(o.flexWrap)?o.flexWrap:"wrap",h=Rve[o.verticalAlignment],p=WU[o.justifyContent]||WU.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=`${Un(t)} {
${b.join("; ")};
}`),i&&d&&(g+=bu(t,a,"flex",d)),g},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function Ave({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?$U.horizontal:$U.vertical,{verticalAlignment:n=r}=e;return(0,oo.jsx)(eC,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var Lve={placement:"bottom-start"};function KU({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,oo.jsx)(lh,{allowedControls:s,value:r,onChange:i,popoverProps:Lve});let a=[{value:"left",icon:ou,label:(0,Ii.__)("Justify items left")},{value:"center",icon:tu,label:(0,Ii.__)("Justify items center")},{value:"right",icon:ru,label:(0,Ii.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:zp,label:(0,Ii.__)("Space between items")}):a.push({value:"stretch",icon:jp,label:(0,Ii.__)("Stretch items")}),(0,oo.jsx)(fn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Ii.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,oo.jsx)(fn.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function Nve({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,oo.jsx)(fn.ToggleControl,{label:(0,Ii.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function Mve({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,oo.jsxs)(fn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,Ii.__)("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,oo.jsx)(fn.__experimentalToggleGroupControlOptionIcon,{icon:Zk,value:"horizontal",label:(0,Ii.__)("Horizontal")}),(0,oo.jsx)(fn.__experimentalToggleGroupControlOptionIcon,{icon:RO,value:"vertical",label:(0,Ii.__)("Vertical")})]})}var qU=l(N(),1);var ZU={name:"default",label:(0,qU.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=jn}){let s=fr(o?.spacing?.blockGap),a="";He(r,"spacing","blockGap")||(s?.top?a=fr(s?.top):typeof s=="string"&&(a=fr(s)));let c="";return n&&a&&(c+=bu(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=Xw(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 mn=l(A(),1),El=l(N(),1);var QU=l(zv(),1);var Xo=l(w(),1),JU={name:"constrained",label:(0,El.__)("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:ou,label:(0,El.__)("Justify items left")},{value:"center",icon:tu,label:(0,El.__)("Justify items center")},{value:"right",icon:ru,label:(0,El.__)("Justify items right")}],[f]=me("spacing.units"),m=(0,mn.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,Xo.jsxs)(mn.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,Xo.jsxs)(Xo.Fragment,{children:[(0,Xo.jsx)(mn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,El.__)("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,Xo.jsx)(mn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Xo.jsx)(xe,{icon:vf})})}),(0,Xo.jsx)(mn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,El.__)("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,Xo.jsx)(mn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Xo.jsx)(xe,{icon:Rf})})}),(0,Xo.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,El.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,Xo.jsx)(mn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,El.__)("Justification"),value:s,onChange:u,children:d.map(({value:h,icon:p,label:g})=>(0,Xo.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{value:h,icon:p,label:g},h))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,Xo.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Xo.jsx)(Vve,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=jn}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=fr(r?.spacing?.blockGap),f="";He(n,"spacing","blockGap")||(d?.top?f=fr(d?.top):typeof d=="string"&&(f=fr(d)));let m=u==="left"?"0 !important":"auto !important",h=u==="right"?"0 !important":"auto !important",p=a||c?`
${Un(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {
max-width: ${a??c};
margin-left: ${m};
margin-right: ${h};
}
${Un(t,"> .alignwide")} {
max-width: ${c??a};
}
${Un(t,"> .alignfull")} {
max-width: none;
}
`:"";return u==="left"?p+=`${Un(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
{ margin-left: ${m}; }`:u==="right"&&(p+=`${Un(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
{ margin-right: ${h}; }`),r?.spacing?.padding&&(0,QU.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let v=b.value==="0"?"0px":b.value;p+=`
${Un(t,"> .alignfull")} {
margin-right: calc(${v} * -1);
}
`}else if(b.key==="paddingLeft"){let v=b.value==="0"?"0px":b.value;p+=`
${Un(t,"> .alignfull")} {
margin-left: calc(${v} * -1);
}
`}}),i&&f&&(p+=bu(t,s,"constrained",f)),p},getOrientation(){return"vertical"},getAlignments(e){let t=Xw(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}},Dve={placement:"bottom-start"};function Vve({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,Xo.jsx)(lh,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:Dve})}var Vr=l(N(),1),nt=l(A(),1),tC=l(P(),1);var qe=l(w(),1),Fve={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},zve=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],eH={name:"grid",label:(0,Vr.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,qe.jsxs)(qe.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,qe.jsx)(Hve,{layout:t,onChange:o}),(0,qe.jsxs)(nt.__experimentalVStack,{spacing:4,children:[i&&(0,qe.jsx)(Uve,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,qe.jsx)(jve,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=jn}){let{minimumColumnWidth:c=null,columnCount:u=null,rowCount:d=null}=o,f="1.2rem";if(s){let b=fr(s,"0.5em").split(" ");f=b.length>1?b[1]:b[0]}let m=r?.spacing?.blockGap&&!He(n,"spacing","blockGap")?fr(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=`${Un(t)} { ${p.join("; ")}; }`),i&&m&&(h+=bu(t,a,"grid",m)),h},getOrientation(){return"horizontal"},getAlignments(){return[]}};function jve({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,nt.__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,qe.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,qe.jsx)(nt.BaseControl.VisualLabel,{as:"legend",children:(0,Vr.__)("Min. column width")}),(0,qe.jsxs)(nt.Flex,{gap:4,children:[(0,qe.jsx)(nt.FlexItem,{isBlock:!0,children:(0,qe.jsx)(nt.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:zve,min:0,label:(0,Vr.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,qe.jsx)(nt.FlexItem,{isBlock:!0,children:(0,qe.jsx)(nt.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:Fve[c]||600,withInputField:!1,label:(0,Vr.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,qe.jsx)("p",{className:"components-base-control__help",children:(0,Vr.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function Uve({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,qe.jsx)(qe.Fragment,{children:(0,qe.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,qe.jsx)(nt.BaseControl.VisualLabel,{as:"legend",children:(0,Vr.__)("Max. columns")}),(0,qe.jsxs)(nt.Flex,{gap:4,children:[(0,qe.jsx)(nt.FlexItem,{isBlock:!0,children:(0,qe.jsx)(nt.__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,Vr.__)("Columns"),hideLabelFromVision:!s})}),(0,qe.jsx)(nt.FlexItem,{isBlock:!0,children:o&&s?(0,qe.jsx)(nt.__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,Vr.__)("Rows")}):(0,qe.jsx)(nt.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Vr.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function Hve({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,tC.useState)(o||3),[c,u]=(0,tC.useState)(r),[d,f]=(0,tC.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,Vr.__)("Grid items can be manually placed in any position on the grid."):(0,Vr.__)("Grid items are placed automatically depending on their order.");return(0,qe.jsxs)(nt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Vr.__)("Grid item position"),value:m,onChange:h,isBlock:!0,help:p,children:[(0,qe.jsx)(nt.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Vr.__)("Auto")},"auto"),(0,qe.jsx)(nt.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Vr.__)("Manual")},"manual")]})}var tH=[ZU,YU,JU,eH];function xs(e="default"){return tH.find(t=>t.name===e)}function oH(){return tH}var gM=l(w(),1),bM={type:"default"},kM=(0,oC.createContext)(bM);kM.displayName="BlockLayoutContext";var rH=kM.Provider;function zf(){return(0,oC.useContext)(kM)}function nH({layout:e={},css:t,...o}){let r=xs(e.type),[n]=me("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,gM.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,gM.jsx)("style",{children:s})}return null}var rC=[],iH=["none","left","center","right","wide","full"],Gve=["wide","full"];function jv(e=iH){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,sH.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(_).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=zf();if(t)return rC;let s=xs(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?rC:u}if(s.name!=="default"&&s.name!=="constrained")return rC;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&Gve.includes(c)?!1:iH.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?rC:a}var vu=l(N(),1);var Uv={none:{icon:vf,title:(0,vu._x)("None","Alignment option")},left:{icon:LL,title:(0,vu.__)("Align left")},center:{icon:OL,title:(0,vu.__)("Align center")},right:{icon:ML,title:(0,vu.__)("Align right")},wide:{icon:Rf,title:(0,vu.__)("Wide width")},full:{icon:yv,title:(0,vu.__)("Full width")}},aH="none";var jf=l(w(),1);function Wve({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=jv(o);if(!!!i.length)return null;function a(h){t([e,"none"].includes(h)?void 0:h)}let c=Uv[e],u=Uv[aH],d=r?yu.ToolbarGroup:yu.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,vM.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:h})=>({...Uv[h],isActive:e===h||!e&&h==="none",role:n?"menuitemradio":void 0,onClick:()=>a(h)}))}:{toggleProps:{description:(0,vM.__)("Change alignment")},children:({onClose:h})=>(0,jf.jsx)(jf.Fragment,{children:(0,jf.jsx)(yu.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:p,info:g})=>{let{icon:b,title:v}=Uv[p],k=p===e||!e&&p==="none";return(0,jf.jsx)(yu.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,jf.jsx)(d,{...f,...m})}var yM=Wve;var SM=l(w(),1),nC=e=>(0,SM.jsx)(yM,{...e,isToolbar:!1}),lH=e=>(0,SM.jsx)(yM,{...e,isToolbar:!0});var mH=l(bf(),1),lC=l(N(),1),cC=l($(),1),Cs=l(A(),1),wM=l(F(),1),pH=l(P(),1),hH=l(Z(),1);var xM=l(bf(),1),cH=l($(),1),uH=l(A(),1),dH=l(F(),1),sC=l(P(),1),fH=l(Z(),1);var iC=l(F(),1);function _M(e){return!e||Object.keys(e).length===0}function Tl(e){let{clientId:t}=Pe(),o=e||t,{updateBlockAttributes:r}=(0,iC.useDispatch)(_),{getBlockAttributes:n}=(0,iC.useRegistry)().select(_);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};_M(f.bindings)&&delete f.bindings,r(o,{metadata:_M(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:_M(c)?void 0:c})}}}var ws=l(w(),1),{Menu:Su}=M(uH.privateApis);function $ve({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,sC.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,sC.useContext)(cn),a=(0,dH.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=Tl();return(0,ws.jsxs)(Su.CheckboxItem,{onChange:()=>{let u=(0,xM.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,xM.default)(e,o.args)??o.key===e?.key,children:[(0,ws.jsx)(Su.ItemLabel,{children:o.label}),(0,ws.jsx)(Su.ItemHelpText,{children:a[t]})]})}function Hv({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,fH.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,cH.getBlockBindingsSource)(o);return(0,ws.jsxs)(Su,{placement:n?"bottom-start":"left-start",children:[(0,ws.jsx)(Su.SubmenuTriggerItem,{children:(0,ws.jsx)(Su.ItemLabel,{children:i.label})}),(0,ws.jsx)(Su.Popover,{gutter:8,children:(0,ws.jsx)(Su.Group,{children:r.map(s=>(0,ws.jsx)($ve,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var Pi=l(w(),1),{Menu:aC}=M(Cs.privateApis);function Gv({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=Tl(),n=(0,hH.useViewportMatch)("medium","<"),i=(0,pH.useContext)(cn),s=(0,wM.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:v,getBlockType:k}=M(g(cC.store)),y=k(o).attributes?.[e]?.type,S=y==="rich-text"?"string":y,x={};return Object.entries(b()).forEach(([C,B])=>{let I=v(B,i);if(!I?.length)return;let O=I.filter(E=>E.type===S);O.length&&(x[C]=O)}),x},[e,o,i]),{canUpdateBlockBindings:a}=(0,wM.useSelect)(g=>({canUpdateBlockBindings:g(_).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,cC.getBlockBindingsSource)(d),h,p=!0;return t===void 0?(c?h=(0,lC.__)("Not connected"):h=(0,lC.__)("No sources available"),p=!0):m?h=s?.[d]?.find(g=>(0,mH.default)(g.args,f))?.label||m?.label||d:(p=!1,h=(0,lC.__)("Source not registered")),(0,Pi.jsx)(Cs.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,Pi.jsxs)(aC,{placement:n?"bottom-start":"left-start",children:[(0,Pi.jsx)(aC.TriggerButton,{render:(0,Pi.jsx)(Cs.__experimentalItem,{}),disabled:!c,children:(0,Pi.jsxs)(Cs.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,Pi.jsx)(Cs.__experimentalText,{truncate:!0,children:e}),(0,Pi.jsx)(Cs.__experimentalText,{truncate:!0,variant:p?"muted":void 0,isDestructive:!p,children:h})]})}),!u&&(0,Pi.jsx)(aC.Popover,{gutter:n?8:36,children:(0,Pi.jsx)(aC,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,Pi.jsx)(Hv,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var gH=l(N(),1),bH=l(A(),1);var kH=l(w(),1);function Kve({isActive:e,label:t=(0,gH.__)("Full height"),onToggle:o,isDisabled:r}){return(0,kH.jsx)(bH.ToolbarButton,{isActive:e,icon:IA,label:t,onClick:()=>o(!e),disabled:r})}var vH=Kve;var SH=l(N(),1),_H=l(it(),1),Uf=l(A(),1),Wv=l(w(),1),Yve=()=>{};function qve(e){let{label:t=(0,SH.__)("Change matrix alignment"),onChange:o=Yve,value:r="center",isDisabled:n}=e,i=(0,Wv.jsx)(Uf.AlignmentMatrixControl.Icon,{value:r});return(0,Wv.jsx)(Uf.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,Wv.jsx)(Uf.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===_H.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,Wv.jsx)(Uf.AlignmentMatrixControl,{onChange:o,value:r})})}var xH=qve;var EM=l(A(),1),fC=l(F(),1),mC=l(N(),1);var PH=l(P(),1);var wH=l(F(),1),uC=l($(),1);function Fr({clientId:e,maximumLength:t,context:o}){let r=(0,wH.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(_),{getBlockType:a,getActiveBlockVariation:c}=n(uC.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,uC.__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 $v({clientId:e,maximumLength:t,context:o}){return Fr({clientId:e,maximumLength:t,context:o})}var Hf=l(P(),1),EH=l(Z(),1);var dC=l(P(),1),CM=l(Z(),1),CH=l(w(),1),Kv=(0,dC.createContext)({refsMap:(0,CM.observableMap)()});Kv.displayName="BlockRefsContext";function BH({children:e}){let t=(0,dC.useMemo)(()=>({refsMap:(0,CM.observableMap)()}),[]);return(0,CH.jsx)(Kv.Provider,{value:t,children:e})}function TH(e){let{refsMap:t}=(0,Hf.useContext)(Kv);return(0,EH.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function BM(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Gf(e,t){let{refsMap:o}=(0,Hf.useContext)(Kv);(0,Hf.useLayoutEffect)(()=>{BM(t,o.get(e));let r=o.subscribe(e,()=>BM(t,o.get(e)));return()=>{r(),BM(t,null)}},[o,e,t])}function mt(e){let[t,o]=(0,Hf.useState)(null);return Gf(e,o),t}function IH(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 Hn=l(w(),1);function Zve({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,fC.useDispatch)(_),{clientId:r,parents:n,hasSelection:i}=(0,fC.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=M(c(_)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,mC._x)("Document","noun, breadcrumb"),a=(0,PH.useRef)();return Gf(r,a),(0,Hn.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,mC.__)("Block breadcrumb"),children:[(0,Hn.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,Hn.jsx)(EM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),IH(c)?.focus()},children:s}),!i&&(0,Hn.jsx)("span",{children:s}),!!r&&(0,Hn.jsx)(xe,{icon:eu,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,Hn.jsxs)("li",{children:[(0,Hn.jsx)(EM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,Hn.jsx)($v,{clientId:c,maximumLength:35,context:"breadcrumb"})}),(0,Hn.jsx)(xe,{icon:eu,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,Hn.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,Hn.jsx)($v,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var RH=Zve;var OH=l(F(),1);function AH(e){return(0,OH.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(_);return o(e)},[e])}var vT=l(Z(),1),UQ=l(P(),1),HQ=l(F(),1),GQ=l(A(),1);var Gi=l(F(),1),KB=l(Z(),1),Xu=l(P(),1),JY=l($(),1);var Ou=l(P(),1),Ge=l($(),1),n9=l(A(),1),s1=l(F(),1),i9=l(Z(),1),s9=l(Fe(),1);var Il=l(N(),1),hC=l(A(),1),Wf=l(P(),1),uh=l($(),1),gC=l(F(),1);var UH=l(VH(),1),pC=l(N(),1),HH=l($(),1);var FH=l(A(),1),zH=l(P(),1),jH=l(Fe(),1),ha=l(w(),1);function IM({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,ha.jsxs)("div",{className:i,children:[(0,ha.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,ha.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,ha.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,ha.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,ha.jsx)(zH.RawHTML,{children:(0,jH.safeHTML)(o)})})]}),(0,ha.jsx)("div",{className:"block-editor-block-compare__action",children:(0,ha.jsx)(FH.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var ch=l(w(),1);function oye({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,UH.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,ch.jsx)("span",{className:p,children:m.value},h)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,HH.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,ch.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,ch.jsx)(IM,{title:(0,pC.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,pC.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,ch.jsx)(IM,{title:(0,pC.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var GH=oye;var Pl=l(w(),1),WH=e=>(0,uh.rawHandler)({HTML:e.originalContent});function $H({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,gC.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:h}=d(_),p=h(e);return{block:m(e),canInsertHTMLBlock:f("core/html",p),canInsertClassicBlock:f("core/freeform",p)}},[e]),{replaceBlock:n}=(0,gC.useDispatch)(_),[i,s]=(0,Wf.useState)(!1),a=(0,Wf.useCallback)(()=>s(!1),[]),c=(0,Wf.useMemo)(()=>({toClassic(){let d=(0,uh.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,uh.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=WH(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,uh.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,Wf.useMemo)(()=>[{title:(0,Il._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,Il.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,Il.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,Pl.jsxs)(Pl.Fragment,{children:[(0,Pl.jsx)(du,{actions:[(0,Pl.jsx)(hC.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,Il.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,Il.__)("Block contains unexpected or invalid content.")}),i&&(0,Pl.jsx)(hC.Modal,{title:(0,Il.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,Pl.jsx)(GH,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:WH,convertButtonText:(0,Il.__)("Convert to Blocks")})})]})}var KH=l(N(),1);var YH=l(w(),1),rye=(0,YH.jsx)(du,{className:"block-editor-block-list__block-crash-warning",children:(0,KH.__)("This block has encountered an error and cannot be previewed.")}),qH=()=>rye;var ZH=l(P(),1),nye=class extends ZH.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},XH=nye;var g8=l(OM(),1),yC=l(P(),1),SC=l(F(),1),ga=l($(),1);var b8=l(w(),1);function hye({clientId:e}){let[t,o]=(0,yC.useState)(""),r=(0,SC.useSelect)(s=>s(_).getBlock(e),[e]),{updateBlock:n}=(0,SC.useDispatch)(_),i=()=>{let s=(0,ga.getBlockType)(r.name);if(!s)return;let a=(0,ga.getBlockAttributes)(s,t,r.attributes),c=t||(0,ga.getSaveContent)(s,a),[u]=t?(0,ga.validateBlock)({...r,attributes:a,originalContent:c}):[!0];n(e,{attributes:a,originalContent:c,isValid:u}),t||o(c)};return(0,yC.useEffect)(()=>{o((0,ga.getBlockContent)(r))},[r]),(0,b8.jsx)(g8.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:i,onChange:s=>o(s.target.value)})}var k8=hye;var t9=l(P(),1),r1=l(N(),1),o9=l($(),1),n1=l(Z(),1),r9=l(Zv(),1);var LM=Qv(),ye=e=>Xv(e,LM),NM=Qv();ye.write=e=>Xv(e,NM);var _C=Qv();ye.onStart=e=>Xv(e,_C);var MM=Qv();ye.onFrame=e=>Xv(e,MM);var DM=Qv();ye.onFinish=e=>Xv(e,DM);var dh=[];ye.setTimeout=(e,t)=>{let o=ye.now()+t,r=()=>{let i=dh.findIndex(s=>s.cancel==r);~i&&dh.splice(i,1),xu-=~i?1:0},n={time:o,handler:e,cancel:r};return dh.splice(y8(o),0,n),xu+=1,S8(),n};var y8=e=>~(~dh.findIndex(t=>t.time>e)||~dh.length);ye.cancel=e=>{_C.delete(e),MM.delete(e),DM.delete(e),LM.delete(e),NM.delete(e)};ye.sync=e=>{AM=!0,ye.batchedUpdates(e),AM=!1};ye.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,ye.onStart(o)}return r.handler=e,r.cancel=()=>{_C.delete(o),t=null},r};var VM=typeof window<"u"?window.requestAnimationFrame:()=>{};ye.use=e=>VM=e;ye.now=typeof performance<"u"?()=>performance.now():Date.now;ye.batchedUpdates=e=>e();ye.catch=console.error;ye.frameLoop="always";ye.advance=()=>{ye.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):x8()};var _u=-1,xu=0,AM=!1;function Xv(e,t){AM?(t.delete(e),e(0)):(t.add(e),S8())}function S8(){_u<0&&(_u=0,ye.frameLoop!=="demand"&&VM(_8))}function gye(){_u=-1}function _8(){~_u&&(VM(_8),ye.batchedUpdates(x8))}function x8(){let e=_u;_u=ye.now();let t=y8(_u);if(t&&(w8(dh.splice(0,t),o=>o.handler()),xu-=t),!xu){gye();return}_C.flush(),LM.flush(e?Math.min(64,_u-e):16.667),MM.flush(),NM.flush(),DM.flush()}function Qv(){let e=new Set,t=e;return{add(o){xu+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return xu-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,xu-=t.size,w8(t,r=>r(o)&&e.add(r)),xu+=e.size,t=e)}}}function w8(e,t){e.forEach(o=>{try{t(o)}catch(r){ye.catch(r)}})}var Oi=l(zr());function EC(){}var P8=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),ie={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(ie.arr(e)){if(!ie.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 kt=(e,t)=>e.forEach(t);function Ai(e,t,o){if(ie.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 pn=e=>ie.und(e)?[]:ie.arr(e)?e:[e];function hh(e,t){if(e.size){let o=Array.from(e);e.clear(),kt(o,t)}}var gh=(e,...t)=>hh(e,o=>o(...t)),GM=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),WM,R8,wu=null,O8=!1,$M=EC,bye=e=>{e.to&&(R8=e.to),e.now&&(ye.now=e.now),e.colors!==void 0&&(wu=e.colors),e.skipAnimation!=null&&(O8=e.skipAnimation),e.createStringInterpolator&&(WM=e.createStringInterpolator),e.requestAnimationFrame&&ye.use(e.requestAnimationFrame),e.batchedUpdates&&(ye.batchedUpdates=e.batchedUpdates),e.willAdvance&&($M=e.willAdvance),e.frameLoop&&(ye.frameLoop=e.frameLoop)},Gn=Object.freeze({__proto__:null,get createStringInterpolator(){return WM},get to(){return R8},get colors(){return wu},get skipAnimation(){return O8},get willAdvance(){return $M},assign:bye}),Jv=new Set,Ri=[],FM=[],CC=0,bh={get idle(){return!Jv.size&&!Ri.length},start(e){CC>e.priority?(Jv.add(e),ye.onStart(kye)):(A8(e),ye(UM))},advance:UM,sort(e){if(CC)ye.onFrame(()=>bh.sort(e));else{let t=Ri.indexOf(e);~t&&(Ri.splice(t,1),L8(e))}},clear(){Ri=[],Jv.clear()}};function kye(){Jv.forEach(A8),Jv.clear(),ye(UM)}function A8(e){Ri.includes(e)||L8(e)}function L8(e){Ri.splice(vye(Ri,t=>t.priority>e.priority),0,e)}function UM(e){let t=FM;for(let o=0;o<Ri.length;o++){let r=Ri[o];CC=r.priority,r.idle||($M(r),r.advance(e),r.idle||t.push(r))}return CC=0,FM=Ri,FM.length=0,Ri=t,Ri.length>0}function vye(e,t){let o=e.findIndex(t);return o<0?e.length:o}var N8={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},Bs="[-+]?\\d*\\.?\\d+",BC=Bs+"%";function TC(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var yye=new RegExp("rgb"+TC(Bs,Bs,Bs)),Sye=new RegExp("rgba"+TC(Bs,Bs,Bs,Bs)),_ye=new RegExp("hsl"+TC(Bs,BC,BC)),xye=new RegExp("hsla"+TC(Bs,BC,BC,Bs)),wye=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Cye=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Bye=/^#([0-9a-fA-F]{6})$/,Eye=/^#([0-9a-fA-F]{8})$/;function Tye(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Bye.exec(e))?parseInt(t[1]+"ff",16)>>>0:wu&&wu[e]!==void 0?wu[e]:(t=yye.exec(e))?(fh(t[1])<<24|fh(t[2])<<16|fh(t[3])<<8|255)>>>0:(t=Sye.exec(e))?(fh(t[1])<<24|fh(t[2])<<16|fh(t[3])<<8|E8(t[4]))>>>0:(t=wye.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Eye.exec(e))?parseInt(t[1],16)>>>0:(t=Cye.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=_ye.exec(e))?(C8(B8(t[1]),xC(t[2]),xC(t[3]))|255)>>>0:(t=xye.exec(e))?(C8(B8(t[1]),xC(t[2]),xC(t[3]))|E8(t[4]))>>>0:null}function zM(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 C8(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=zM(n,r,e+1/3),s=zM(n,r,e),a=zM(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function fh(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function B8(e){return(parseFloat(e)%360+360)%360/360}function E8(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function xC(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function T8(e){let t=Tye(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 Cu=(e,t,o)=>{if(ie.fun(e))return e;if(ie.arr(e))return Cu({range:e,output:t,extrapolate:o});if(ie.str(e.output[0]))return WM(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=Pye(u,i);return Iye(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function Iye(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 Pye(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function HM(){return HM=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},HM.apply(this,arguments)}var mh=Symbol.for("FluidValue.get"),$f=Symbol.for("FluidValue.observers"),jr=e=>!!(e&&e[mh]),mr=e=>e&&e[mh]?e[mh]():e,KM=e=>e[$f]||null;function Rye(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Kf(e,t){let o=e[$f];o&&o.forEach(r=>{Rye(r,t)})}var ph=class{constructor(t){if(this[mh]=void 0,this[$f]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");Oye(this,t)}},Oye=(e,t)=>M8(e,mh,t);function Bu(e,t){if(e[mh]){let o=e[$f];o||M8(e,$f,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function Eu(e,t){let o=e[$f];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[$f]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var M8=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),wC=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Aye=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,I8=new RegExp(`(${wC.source})(%|[a-z]+)`,"i"),Lye=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,IC=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,D8=e=>{let[t,o]=Nye(e);if(!t||GM())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&&IC.test(o))return D8(o);if(o)return o}return e},Nye=e=>{let t=IC.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},jM,Mye=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,PC=e=>{jM||(jM=wu?new RegExp(`(${Object.keys(wu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>mr(i).replace(IC,D8).replace(Aye,T8).replace(jM,T8)),o=t.map(i=>i.match(wC).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=>Cu(HM({},e,{output:i})));return i=>{var s;let a=!I8.test(t[0])&&((s=t.find(u=>I8.test(u)))==null?void 0:s.replace(wC,"")),c=0;return t[0].replace(wC,()=>`${n[c++](i)}${a||""}`).replace(Lye,Mye)}},V8="react-spring: ",F8=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${V8}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},Dye=F8(console.warn);function z8(){Dye(`${V8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Fze=F8(console.warn);function kh(e){return ie.str(e)&&(e[0]=="#"||/\d/.test(e)||!GM()&&IC.test(e)||e in(wu||{}))}var ey=GM()?Oi.useEffect:Oi.useLayoutEffect,Vye=()=>{let e=(0,Oi.useRef)(!1);return ey(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function YM(){let e=(0,Oi.useState)()[1],t=Vye();return()=>{t.current&&e(Math.random())}}function j8(e,t){let[o]=(0,Oi.useState)(()=>({inputs:t,result:e()})),r=(0,Oi.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&Fye(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,Oi.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function Fye(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 qM=e=>(0,Oi.useEffect)(e,zye),zye=[];var uy=l(zr()),dy=l(zr());var W8=l(zr()),Ol=l(zr()),ty=Symbol.for("Animated:node"),jye=e=>!!e&&e[ty]===e,Es=e=>e&&e[ty],LC=(e,t)=>P8(e,ty,t),oy=e=>e&&e[ty]&&e[ty].getPayload(),RC=class{constructor(){this.payload=void 0,LC(this,this)}getPayload(){return this.payload||[]}},Yf=class e extends RC{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,ie.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 ie.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,ie.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},qf=class e extends Yf{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Cu({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(ie.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=Cu({output:[this.getValue(),t]})),this._value=0,super.reset()}},OC={dependencies:null},Zf=class extends RC{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Ai(this.source,(r,n)=>{jye(r)?o[n]=r.getValue(t):jr(r)?o[n]=mr(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&kt(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return Ai(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){OC.dependencies&&jr(t)&&OC.dependencies.add(t);let o=oy(t);o&&kt(o,r=>this.add(r))}},ZM=class e extends Zf{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(Uye)),!0)}};function Uye(e){return(kh(e)?qf:Yf).create(e)}function NC(e){let t=Es(e);return t?t.constructor:ie.arr(e)?ZM:kh(e)?qf:Yf}function AC(){return AC=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},AC.apply(this,arguments)}var U8=(e,t)=>{let o=!ie.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ol.forwardRef)((r,n)=>{let i=(0,Ol.useRef)(null),s=o&&(0,Ol.useCallback)(p=>{i.current=Gye(n,p)},[n]),[a,c]=Hye(r,t),u=YM(),d=()=>{let p=i.current;if(o&&!p)return;(p?t.applyAnimatedValues(p,a.getValue(!0)):!1)===!1&&u()},f=new XM(d,c),m=(0,Ol.useRef)();ey(()=>(m.current=f,kt(c,p=>Bu(p,f)),()=>{m.current&&(kt(m.current.deps,p=>Eu(p,m.current)),ye.cancel(m.current.update))})),(0,Ol.useEffect)(d,[]),qM(()=>()=>{let p=m.current;kt(p.deps,g=>Eu(g,p))});let h=t.getComponentProps(a.getValue());return W8.createElement(e,AC({},h,{ref:s}))})},XM=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&ye.write(this.update)}};function Hye(e,t){let o=new Set;return OC.dependencies=o,e.style&&(e=AC({},e,{style:t.createAnimatedStyle(e.style)})),e=new Zf(e),OC.dependencies=null,[e,o]}function Gye(e,t){return e&&(ie.fun(e)?e(t):e.current=t),t}var H8=Symbol.for("AnimatedComponent"),$8=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new Zf(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=G8(s)||"Anonymous";return ie.str(s)?s=i[s]||(i[s]=U8(s,n)):s=s[H8]||(s[H8]=U8(s,n)),s.displayName=`Animated(${a})`,s};return Ai(e,(s,a)=>{ie.arr(e)&&(a=G8(s)),i[a]=i(s)}),{animated:i}},G8=e=>ie.str(e)?e:e&&ie.str(e.displayName)?e.displayName:ie.fun(e)&&e.name||null;function Ur(){return Ur=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},Ur.apply(this,arguments)}function Xf(e,...t){return ie.fun(e)?e(...t):e}var sy=(e,t)=>e===!0||!!(t&&e&&(ie.fun(e)?e(t):pn(e).includes(t))),n7=(e,t)=>ie.obj(e)?t&&e[t]:e,i7=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Wye=e=>e,s7=(e,t=Wye)=>{let o=$ye;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);ie.und(i)||(r[n]=i)}return r},$ye=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Kye={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 Yye(e){let t={},o=0;if(Ai(e,(r,n)=>{Kye[n]||(t[n]=r,o++)}),o)return t}function a7(e){let t=Yye(e);if(t){let o={to:t};return Ai(e,(r,n)=>n in t||(o[n]=r)),o}return Ur({},e)}function ay(e){return e=mr(e),ie.arr(e)?e.map(ay):kh(e)?Gn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function eD(e){return ie.fun(e)||ie.arr(e)&&ie.obj(e[0])}var qye={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}},VC=1.70158,MC=VC*1.525,K8=VC+1,Y8=2*Math.PI/3,q8=2*Math.PI/4.5,DC=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,Zye={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=>K8*e*e*e-VC*e*e,easeOutBack:e=>1+K8*Math.pow(e-1,3)+VC*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((MC+1)*2*e-MC)/2:(Math.pow(2*e-2,2)*((MC+1)*(e*2-2)+MC)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Y8),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Y8)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*q8))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*q8)/2+1,easeInBounce:e=>1-DC(1-e),easeOutBounce:DC,easeInOutBounce:e=>e<.5?(1-DC(1-2*e))/2:(1+DC(2*e-1))/2},tD=Ur({},qye.default,{mass:1,damping:1,easing:Zye.linear,clamp:!1}),oD=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,tD)}};function Xye(e,t,o){o&&(o=Ur({},o),Z8(o,t),t=Ur({},o,t)),Z8(e,t),Object.assign(e,t);for(let s in tD)e[s]==null&&(e[s]=tD[s]);let{mass:r,frequency:n,damping:i}=e;return ie.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 Z8(e,t){if(!ie.und(t.decay))e.duration=void 0;else{let o=!ie.und(t.tension)||!ie.und(t.friction);(o||!ie.und(t.frequency)||!ie.und(t.damping)||!ie.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var X8=[],rD=class{constructor(){this.changed=!1,this.values=X8,this.toValues=null,this.fromValues=X8,this.to=void 0,this.from=void 0,this.config=new oD,this.immediate=!1}};function l7(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=sy((c=o.cancel)!=null?c:r?.cancel,t);if(f)p();else{ie.und(o.pause)||(n.paused=sy(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||sy(g,t)),u=Xf(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-ye.now()}function h(){u>0&&!Gn.skipAnimation?(n.delayed=!0,d=ye.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(Ur({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var uD=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?vh(e.get()):t.every(o=>o.noop)?c7(e.get()):Ts(e.get(),t.every(o=>o.finished)),c7=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ts=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),vh=e=>({value:e,cancelled:!0,finished:!1});function u7(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=s7(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)&&vh(r)||n!==o.asyncId&&Ts(r,!1);if(v)throw b.result=v,f(b),b},p=(b,v)=>{let k=new FC,y=new zC;return(async()=>{if(Gn.skipAnimation)throw ly(o),y.result=Ts(r,!1),f(y),y;h(k);let S=ie.obj(b)?Ur({},b):Ur({},v,{to:b});S.parentId=n,Ai(u,(C,B)=>{ie.und(S[B])&&(S[B]=C)});let x=await r.start(S);return h(k),o.paused&&await new Promise(C=>{o.resumeQueue.add(C)}),x})()},g;if(Gn.skipAnimation)return ly(o),Ts(r,!1);try{let b;ie.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=Ts(r.get(),!0,!1)}catch(b){if(b instanceof FC)g=b.result;else if(b instanceof zC)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 ie.fun(s)&&ye.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function ly(e,t){hh(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var FC=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}},zC=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},nD=e=>e instanceof cy,Qye=1,cy=class extends ph{constructor(...t){super(...t),this.id=Qye++,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=Es(this);return t&&t.getValue()}to(...t){return Gn.to(this,t)}interpolate(...t){return z8(),Gn.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){Kf(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||bh.sort(this),Kf(this,{type:"priority",parent:this,priority:t})}},Qf=Symbol.for("SpringPhase"),d7=1,iD=2,sD=4,QM=e=>(e[Qf]&d7)>0,Tu=e=>(e[Qf]&iD)>0,ry=e=>(e[Qf]&sD)>0,Q8=(e,t)=>t?e[Qf]|=iD|d7:e[Qf]&=~iD,J8=(e,t)=>t?e[Qf]|=sD:e[Qf]&=~sD,aD=class extends cy{constructor(t,o){if(super(),this.key=void 0,this.animation=new rD,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,!ie.und(t)||!ie.und(o)){let r=ie.obj(t)?Ur({},t):Ur({},o,{from:t});ie.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Tu(this)||this._state.asyncTo)||ry(this)}get goal(){return mr(this.animation.to)}get velocity(){let t=Es(this);return t instanceof Yf?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return QM(this)}get isAnimating(){return Tu(this)}get isPaused(){return ry(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=oy(n.to);!a&&jr(n.to)&&(s=pn(mr(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==qf?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=ie.arr(i.velocity)?i.velocity[f]:i.velocity,k,y=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(ie.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,x=Math.exp(-(1-S)*g);p=b+v/(1-S)*(1-x),h=Math.abs(d.lastPosition-p)<=y,k=v*x}else{k=d.lastVelocity==null?v:d.lastVelocity;let S=i.restVelocity||y/10,x=i.clamp?0:i.bounce,C=!ie.und(x),B=b==m?d.v0>0:b<m,I,O=!1,E=1,L=Math.ceil(t/E);for(let T=0;T<L&&(I=Math.abs(k)>S,!(!I&&(h=Math.abs(m-p)<=y,h)));++T){C&&(O=p==m||p>m==B,O&&(k=-k*x,p=m));let R=-i.tension*1e-6*(p-m),D=-i.friction*.001*k,j=(R+D)/i.mass;k=k+j*E,p=p+k*E}}else{let S=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,g=d.elapsedTime+=t)),S=(i.progress||0)+g/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),p=b+i.easing(S)*(m-b),k=(p-d.lastPosition)/t,h=S==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=Es(this),u=c.getValue();if(o){let d=mr(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 ye.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Tu(this)){let{to:t,config:o}=this.animation;ye.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 ie.und(t)?(r=this.queue||[],this.queue=[]):r=[ie.obj(t)?t:Ur({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>uD(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),ly(this._state,t&&this._lastCallId),ye.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=ie.obj(r)?r[o]:r,(r==null||eD(r))&&(r=void 0),n=ie.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return QM(this)||(t.reverse&&([r,n]=[n,r]),n=mr(n),ie.und(n)?Es(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Ur({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,s7(r,(c,u)=>/^on/.test(u)?n7(c,n):c)),t7(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 l7(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{ry(this)||(J8(this,!0),gh(a.pauseQueue),iy(this,"onPause",Ts(this,ny(this,this.animation.to)),this))},resume:()=>{ry(this)&&(J8(this,!1),Tu(this)&&this._resume(),gh(a.resumeQueue),iy(this,"onResume",Ts(this,ny(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=f7(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(vh(this));let n=!ie.und(t.to),i=!ie.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(vh(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||ie.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let h=!ba(m,d);h&&(c.from=m),m=mr(m);let p=!ba(f,u);p&&this._focus(f);let g=eD(o.to),{config:b}=c,{decay:v,velocity:k}=b;(n||i)&&(b.velocity=0),o.config&&!g&&Xye(b,Xf(o.config,s),o.config!==a.config?Xf(a.config,s):void 0);let y=Es(this);if(!y||ie.und(f))return r(Ts(this,!0));let S=ie.und(o.reset)?i&&!o.default:!ie.und(m)&&sy(o.reset,s),x=S?m:this.get(),C=ay(f),B=ie.num(C)||ie.arr(C)||kh(C),I=!g&&(!B||sy(a.immediate||o.immediate,s));if(p){let T=NC(f);if(T!==y.constructor)if(I)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${T.name}, as the "to" prop suggests`)}let O=y.constructor,E=jr(f),L=!1;if(!E){let T=S||!QM(this)&&h;(p||T)&&(L=ba(ay(x),C),E=!L),(!ba(c.immediate,I)&&!I||!ba(b.decay,v)||!ba(b.velocity,k))&&(E=!0)}if(L&&Tu(this)&&(c.changed&&!S?E=!0:E||this._stop(u)),!g&&((E||jr(u))&&(c.values=y.getPayload(),c.toValues=jr(f)?null:O==qf?[1]:pn(C)),c.immediate!=I&&(c.immediate=I,!I&&!S&&this._set(u)),E)){let{onRest:T}=c;kt(Jye,D=>t7(this,o,D));let R=Ts(this,ny(this,u));gh(this._pendingCalls,R),this._pendingCalls.add(r),c.changed&&ye.batchedUpdates(()=>{c.changed=!S,T?.(R,this),S?Xf(a.onRest,R):c.onStart==null||c.onStart(R,this)})}S&&this._set(x),g?r(u7(o.to,o,this._state,this)):E?this._start():Tu(this)&&!p?this._pendingCalls.add(r):r(c7(x))}_focus(t){let o=this.animation;t!==o.to&&(KM(this)&&this._detach(),o.to=t,KM(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;jr(o)&&(Bu(o,this),nD(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;jr(t)&&Eu(t,this)}_set(t,o=!0){let r=mr(t);if(!ie.und(r)){let n=Es(this);if(!n||!ba(r,n.getValue())){let i=NC(r);!n||n.constructor!=i?LC(this,i.create(r)):n.setValue(r),n&&ye.batchedUpdates(()=>{this._onChange(r,o)})}}return Es(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,iy(this,"onStart",Ts(this,ny(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),Xf(this.animation.onChange,t,this)),Xf(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Es(this).reset(mr(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),Tu(this)||(Q8(this,!0),ry(this)||this._resume())}_resume(){Gn.skipAnimation?this.finish():bh.start(this)}_stop(t,o){if(Tu(this)){Q8(this,!1);let r=this.animation;kt(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Kf(this,{type:"idle",parent:this});let n=o?vh(this.get()):Ts(this.get(),ny(this,t??r.to));gh(this._pendingCalls,n),r.changed&&(r.changed=!1,iy(this,"onRest",n,this))}}};function ny(e,t){let o=ay(t),r=ay(e.get());return ba(r,o)}function f7(e,t=e.loop,o=e.to){let r=Xf(t);if(r){let n=r!==!0&&a7(r),i=(n||e).reverse,s=!n||n.reset;return lD(Ur({},e,{loop:t,default:!1,pause:void 0,to:!i||eD(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function lD(e){let{to:t,from:o}=e=a7(e),r=new Set;return ie.obj(t)&&e7(t,r),ie.obj(o)&&e7(o,r),e.keys=r.size?Array.from(r):null,e}function e7(e,t){Ai(e,(o,r)=>o!=null&&t.add(r))}var Jye=["onStart","onRest","onChange","onPause","onResume"];function t7(e,t,o){e.animation[o]=t[o]!==i7(t,o)?n7(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 eSe=["onStart","onChange","onRest"],tSe=1,jC=class{constructor(t,o){this.id=tSe++,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(Ur({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];ie.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(lD(t)),this}start(t){let{queue:o}=this;return t?o=pn(t).map(lD):this.queue=[],this._flush?this._flush(this,o):(p7(this,o),oSe(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;kt(pn(o),n=>r[n].stop(!!t))}else ly(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ie.und(t))this.start({pause:!0});else{let o=this.springs;kt(pn(t),r=>o[r].pause())}return this}resume(t){if(ie.und(t))this.start({pause:!1});else{let o=this.springs;kt(pn(t),r=>o[r].resume())}return this}each(t){Ai(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,hh(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&&hh(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,hh(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;ye.onFrame(this._onFrame)}};function oSe(e,t){return Promise.all(t.map(o=>m7(e,o))).then(o=>uD(e,o))}async function m7(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=ie.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ie.arr(n)||ie.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):kt(eSe,g=>{let b=t[g];if(ie.fun(b)){let v=e._events[g];t[g]=({finished:k,cancelled:y})=>{let S=v.get(b);S?(k||(S.finished=!1),y&&(S.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,gh(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||i7(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(l7(++e._lastAsyncId,{props:t,state:f,actions:{pause:EC,resume:EC,start(g,b){h?(ly(f,e._lastAsyncId),b(vh(e))):(g.onRest=a,b(u7(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let p=uD(e,await Promise.all(m));if(s&&p.finished&&!(o&&p.noop)){let g=f7(t,s,n);if(g)return p7(e,[g]),m7(e,g,!0)}return c&&ye.batchedUpdates(()=>c(p,e,e.item)),p}function rSe(e,t){let o=new aD;return o.key=e,t&&Bu(o,t),o}function nSe(e,t,o){t.keys&&kt(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function p7(e,t){kt(t,o=>{nSe(e.springs,o,r=>rSe(r,e))})}function iSe(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 sSe=["children"],dD=e=>{let{children:t}=e,o=iSe(e,sSe),r=(0,dy.useContext)(UC),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=j8(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=UC;return uy.createElement(s,{value:o},t)},UC=aSe(dD,{});dD.Provider=UC.Provider;dD.Consumer=UC.Consumer;function aSe(e,t){return Object.assign(e,uy.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var o7;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(o7||(o7={}));var cD=class extends cy{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Cu(...o);let r=this._get(),n=NC(r);LC(this,n.create(r))}advance(t){let o=this._get(),r=this.get();ba(o,r)||(Es(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&r7(this._active)&&JM(this)}_get(){let t=ie.arr(this.source)?this.source.map(mr):pn(mr(this.source));return this.calc(...t)}_start(){this.idle&&!r7(this._active)&&(this.idle=!1,kt(oy(this),t=>{t.done=!1}),Gn.skipAnimation?(ye.batchedUpdates(()=>this.advance()),JM(this)):bh.start(this))}_attach(){let t=1;kt(pn(this.source),o=>{jr(o)&&Bu(o,this),nD(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){kt(pn(this.source),t=>{jr(t)&&Eu(t,this)}),this._active.clear(),JM(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=pn(this.source).reduce((o,r)=>Math.max(o,(nD(r)?r.priority:0)+1),0))}};function lSe(e){return e.idle!==!1}function r7(e){return!e.size||Array.from(e).every(lSe)}function JM(e){e.idle||(e.idle=!0,kt(oy(e),t=>{t.done=!0}),Kf(e,{type:"idle",parent:e}))}Gn.assign({createStringInterpolator:PC,to:(e,t)=>new cD(e,t)});var qze=bh.advance;var k7=l(g7());function hD(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 cSe=["style","children","scrollTop","scrollLeft"],v7=/^--/;function uSe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!v7.test(e)&&!(fy.hasOwnProperty(e)&&fy[e])?t+"px":(""+t).trim()}var b7={};function dSe(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=hD(r,cSe),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:b7[f]||(b7[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=uSe(f,n[f]);v7.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 fy={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},fSe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),mSe=["Webkit","Ms","Moz","O"];fy=Object.keys(fy).reduce((e,t)=>(mSe.forEach(o=>e[fSe(o,t)]=e[t]),e),fy);var pSe=["x","y","z"],hSe=/^(matrix|translate|scale|rotate|skew)/,gSe=/^(translate)/,bSe=/^(rotate|skew)/,fD=(e,t)=>ie.num(e)&&e!==0?e+t:e,HC=(e,t)=>ie.arr(e)?e.every(o=>HC(o,t)):ie.num(e)?e===t:parseFloat(e)===t,mD=class extends Zf{constructor(t){let{x:o,y:r,z:n}=t,i=hD(t,pSe),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>fD(u,"px")).join(",")})`,HC(c,0)])),Ai(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(hSe.test(u)){if(delete i[u],ie.und(c))return;let d=gSe.test(u)?"px":bSe.test(u)?"deg":"";s.push(pn(c)),a.push(u==="rotate3d"?([f,m,h,p])=>[`rotate3d(${f},${m},${h},${fD(p,d)})`,HC(p,0)]:f=>[`${u}(${f.map(m=>fD(m,d)).join(",")})`,HC(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new pD(s,a)),super(i)}},pD=class extends ph{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 kt(this.inputs,(r,n)=>{let i=mr(r[0]),[s,a]=this.transforms[n](ie.arr(i)?i:r.map(mr));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&kt(this.inputs,o=>kt(o,r=>jr(r)&&Bu(r,this)))}observerRemoved(t){t==0&&kt(this.inputs,o=>kt(o,r=>jr(r)&&Eu(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Kf(this,t)}},kSe=["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"],vSe=["scrollTop","scrollLeft"];Gn.assign({batchedUpdates:k7.unstable_batchedUpdates,createStringInterpolator:PC,colors:N8});var ySe=$8(kSe,{applyAnimatedValues:dSe,createAnimatedStyle:e=>new mD(e),getComponentProps:e=>hD(e,vSe)}),y7=ySe.animated;var yh=l(P(),1),_7=l(Fe(),1),x7=l(F(),1);var SSe=200;function S7(e){return{top:e.offsetTop,left:e.offsetLeft}}function _Se({triggerAnimationOnChange:e,clientId:t}){let o=(0,yh.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,x7.useSelect)(_),{previous:d,prevRect:f}=(0,yh.useMemo)(()=>({previous:o.current&&S7(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,yh.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,_7.getScrollContainer)(o.current),h=i(t),p=h||s(t),g=u();function b(){if(!g&&p&&f){let O=o.current.getBoundingClientRect().top-f.top;O&&(m.scrollTop+=O)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>SSe){b();return}let k=h||a(t)||c(t);if(k&&g)return;let y=k?"1":"",S=new jC({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:I}){if(!o.current)return;let{x:O,y:E}=I;O=Math.round(O),E=Math.round(E);let L=O===0&&E===0;o.current.style.transformOrigin="center center",o.current.style.transform=L?null:`translate3d(${O}px,${E}px,0)`,o.current.style.zIndex=y,b()}});o.current.style.transform=void 0;let x=S7(o.current),C=Math.round(d.left-x.left),B=Math.round(d.top-x.top);return S.start({x:0,y:0,from:{x:C,y:B}}),()=>{S.stop(),S.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,c,u]),o}var GC=_Se;var $C=l(P(),1),Al=l(Fe(),1),C7=l(F(),1);var WC=".block-editor-block-list__block",xSe=".block-list-appender",wSe=".block-editor-button-block-appender";function w7(e,t){return e.closest(WC)===t.closest(WC)}function ka(e,t){return t.closest([WC,xSe,wSe].join(","))===e}function Li(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(WC);if(o)return o.id.slice(6)}function gD(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 CSe(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 BSe(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var ESe=["core/navigation"];function Sh(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&ESe.includes(r)){let s=[e],a;for(;a=s.pop();)if(!BSe(a)){for(let c of a.children)if(CSe(c)){let u=c.getBoundingClientRect();o=gD(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 B7({clientId:e,initialPosition:t}){let o=(0,$C.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=M((0,C7.useSelect)(_));return(0,$C.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(ka(o.current,s.activeElement))return;let a=Al.focus.tabbable.find(o.current).filter(d=>(0,Al.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!ka(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=Al.focus.tabbable.findNext(o.current);if(d&&ka(o.current,d)&&(0,Al.isFormElement)(d)){d.focus();return}}(0,Al.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var E7=l(Z(),1);function KC(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function T7({isEnabled:e=!0}={}){return(0,E7.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",KC),t.addEventListener("mouseover",KC),()=>{t.removeEventListener("mouseout",KC),t.removeEventListener("mouseover",KC),t.classList.remove("is-hovered")}},[e])}var YC=l(F(),1),I7=l(Z(),1);function P7(e){let{isBlockSelected:t}=(0,YC.useSelect)(_),{selectBlock:o,selectionChange:r}=(0,YC.useDispatch)(_);return(0,I7.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}ka(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var _h=l($(),1),O7=l(Fe(),1),Iu=l(it(),1),qC=l(F(),1),A7=l(Z(),1);function R7(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function L7({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=M((0,qC.useSelect)(_)),{insertAfterBlock:c,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:m,editContentOnlySection:h}=M((0,qC.useDispatch)(_));return(0,A7.useRefEffect)(p=>{if(!t)return;function g(k){let{keyCode:y,target:S}=k;y!==Iu.ENTER&&y!==Iu.BACKSPACE&&y!==Iu.DELETE||S!==p||(0,O7.isTextField)(S)||(k.preventDefault(),y===Iu.ENTER&&r()?d():y===Iu.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:S}=p,{defaultView:x}=S;x.getSelection().removeAllRanges();let B=S.createElement("div");B.style.width="1px",B.style.height="1px",B.style.position="fixed",B.style.visibility="hidden",S.body.appendChild(B),k.dataTransfer.setDragImage(B,0,0);let I=p.getBoundingClientRect(),O=p.id,E=p.cloneNode();E.style.display="none",p.id=null,p.after(E);let L=1;{let J=p;for(;J=J.parentElement;){let{scale:q}=x.getComputedStyle(J);if(q&&q!=="none"){L=parseFloat(q);break}}}let T=1/L,R={};for(let J of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])R[J]=p.style[J];let D=x.scrollY,j=x.scrollX,G=k.clientX,z=k.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let H=k.clientX-I.left,W=k.clientY-I.top,te=I.height>200?200/I.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${H*T}px ${W*T}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${te})`,p.style.opacity="0.9",R7(x.getComputedStyle(p).backgroundColor)){let J="transparent",q=p;for(;q=q.parentElement;){let{backgroundColor:U}=x.getComputedStyle(q);if(!R7(U)){J=U;break}}p.style.backgroundColor=J}let ne=!1,ae=G,X=z;function ee(J){J.clientX===ae&&J.clientY===X||(ae=J.clientX,X=J.clientY,le())}function le(){ne||(ne=!0,p.style.pointerEvents="none");let J=X-z,q=ae-G,U=x.scrollY,K=x.scrollX,se=U-D,ce=K-j,Se=J+se,he=q+ce;p.style.top=`${Se*T}px`,p.style.left=`${he*T}px`}function Q(){S.removeEventListener("dragover",ee),S.removeEventListener("dragend",Q),S.removeEventListener("drop",Q),S.removeEventListener("scroll",le);for(let[J,q]of Object.entries(R))p.style[J]=q;E.remove(),p.id=O,B.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),S.documentElement.classList.remove("is-dragging")}S.addEventListener("dragover",ee),S.addEventListener("dragend",Q),S.addEventListener("drop",Q),S.addEventListener("scroll",le),f([e]),document.body.classList.add("is-dragging-components-draggable"),S.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",g),p.addEventListener("dragstart",b);function v(k){let y=i(e),S=a(e),x=(0,_h.isReusableBlock)(S),C=(0,_h.isTemplatePart)(S);!y||s===e||x||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,_h.isReusableBlock,_h.isTemplatePart,c,u,r,d,n,f,m,i,s,h])}var N7=l(Z(),1),M7=l(P(),1);function D7(){let e=(0,M7.useContext)(ZC);return(0,N7.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var XC=l(Z(),1);function V7({isSelected:e}){let t=(0,XC.useReducedMotion)();return(0,XC.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 F7=l(Z(),1),z7=l(F(),1);function QC({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=M((0,z7.useSelect)(_));return(0,F7.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 j7=l(Z(),1),my=new Map;function TSe(e,t){let o=my.get(e);o||(o=new Set,my.set(e,o),e.addEventListener("pointerdown",H7)),o.add(t)}function ISe(e,t){let o=my.get(e);o&&(o.delete(t),U7(t),o.size===0&&(my.delete(e),e.removeEventListener("pointerdown",H7)))}function U7(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function H7(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)U7(a)}function G7(){return(0,j7.useRefEffect)(e=>(TSe(e.ownerDocument,e),()=>{ISe(e.ownerDocument,e)}),[])}var fo=l(N(),1),hn=l(P(),1),Hr=l(A(),1),xh=l(F(),1),Y7=l(Is(),1),q7=l(Ti(),1);var py=l(N(),1);function PSe(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"||!nu.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function $7(e,t){if(!e?.length)return!1;let o=e.filter(r=>PSe(r,t)).length;return o===0?!1:o===e.length?!0:null}function K7(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 hy(e){if(!e&&e!==!1)return null;if(e===!1)return(0,py.__)("Block is hidden");if(e?.viewport){let t=nu.filter(([o])=>e.viewport?.[o]===!1).map(([,o])=>o.label);if(t.length>0)return(0,py.sprintf)((0,py.__)("Block is hidden on %s"),t.join(", "))}return null}var ro=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='a7bd308a9a']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","a7bd308a9a"),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 RSe={[Et.mobile.key]:!1,[Et.tablet.key]:!1,[Et.desktop.key]:!1},OSe=[];function bD({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,xh.useDispatch)(q7.store),{updateBlockAttributes:r}=(0,xh.useDispatch)(_),n=(0,xh.useSelect)(k=>k(_).getBlocksByClientId(e)??OSe,[e]),i=(0,xh.useSelect)(k=>k(Y7.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,hn.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let k={};return nu.forEach(([,{key:y}])=>{k[y]=$7(n,y)}),{hideEverywhere:K7(n),viewportChecked:k}},[n]),[a,c]=(0,hn.useState)(s?.viewportChecked??{}),[u,d]=(0,hn.useState)(s?.hideEverywhere??!1),f=(0,hn.useCallback)((k,y)=>{c({...a,[k]:y})},[a]),m=(0,hn.useMemo)(()=>{if(!u)return(0,fo.sprintf)((0,fo.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let k=n?.length>1?(0,fo.__)("Blocks hidden. You can access them via the List View (%s)."):(0,fo.__)("Block hidden. You can access it via the List View (%s).");return(0,fo.sprintf)(k,i)},[u,n?.length,i]),h=(0,hn.useMemo)(()=>Object.values(a).some(k=>k===!0||k===null),[a]),p=(0,hn.useMemo)(()=>u!==s.hideEverywhere?!0:nu.some(([,{key:k}])=>a[k]!==s.viewportChecked[k]),[u,a,s]),g=(0,hn.useMemo)(()=>u===null?!0:Object.values(a).some(k=>k===null),[u,a]),b=(0,hn.useCallback)(k=>{k.preventDefault();let y=u?!1:{viewport:nu.reduce((x,[,{key:C}])=>(a[C]&&(x[C]=!1),x),{})},S=Object.fromEntries(n.map(({clientId:x,attributes:C})=>[x,{metadata:Ne({...C?.metadata,blockVisibility:y})}]));r(e,S,{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,ro.jsx)(Hr.Modal,{title:e?.length>1?(0,fo.__)("Hide blocks"):(0,fo.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,ro.jsxs)("form",{onSubmit:b,children:[(0,ro.jsxs)("fieldset",{children:[(0,ro.jsx)("legend",{children:v?(0,fo.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,fo.__)("Select the viewport size for which you want to hide the block.")}),(0,ro.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,ro.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,ro.jsx)(Hr.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,fo.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:k=>{d(k),c(RSe)}}),u!==!0&&(0,ro.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:nu.map(([,{label:k,icon:y,key:S}])=>(0,ro.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,ro.jsx)(Hr.CheckboxControl,{label:(0,fo.sprintf)((0,fo.__)("Hide on %s"),k),checked:a[S]??!1,indeterminate:a[S]===null,onChange:x=>f(S,x)}),(0,ro.jsx)(Hr.Icon,{icon:y,className:V({"block-editor-block-visibility-modal__options-icon--checked":a[S]})})]},S))})]})}),v&&g&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,fo.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!v&&u===!0&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,fo.sprintf)((0,fo.__)("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,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,hn.createInterpolateElement)((0,fo.sprintf)((0,fo.__)("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,ro.jsx)("strong",{})})})]}),(0,ro.jsxs)(Hr.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ro.jsx)(Hr.FlexItem,{children:(0,ro.jsx)(Hr.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,fo.__)("Cancel")})}),(0,ro.jsx)(Hr.FlexItem,{children:(0,ro.jsx)(Hr.Button,{variant:"primary",type:"submit",disabled:!p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fo.__)("Apply")})})]})]})})}var kD=l(Z(),1);function Ni(e={}){let{blockVisibility:t=void 0,deviceType:o=Et.desktop.key}=e,r=(0,kD.useViewportMatch)("mobile",">="),n=(0,kD.useViewportMatch)("medium",">="),i;return o===Et.mobile.key?i=Et.mobile.key:o===Et.tablet.key?i=Et.tablet.key:r?r&&!n?i=Et.tablet.key:i=Et.desktop.key:i=Et.mobile.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[i]===!1,currentViewport:i}}var vD=l(N(),1),JC=l(A(),1),e1=l(P(),1);var Z7=l($(),1),t1=l(F(),1);var yD=l(w(),1);function SD({clientIds:e}){let t=(0,e1.useRef)(!1),{canToggleBlockVisibility:o,areBlocksHiddenAnywhere:r}=(0,t1.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:c,isBlockHiddenAnywhere:u}=M(s(_));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,Z7.hasBlockSupport)(c(f),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(f=>u(f))}},[e]),n=(0,t1.useDispatch)(_);if((0,e1.useEffect)(()=>{r&&(t.current=!0)},[r]),!r&&!t.current)return null;let{showViewportModal:i}=M(n);return(0,yD.jsx)(JC.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,yD.jsx)(JC.ToolbarButton,{disabled:!o,icon:r?vs:Pf,label:r?(0,vD.__)("Hidden"):(0,vD.__)("Visible"),onClick:()=>i(e),"aria-haspopup":"dialog"})})}var _D=l(N(),1),X7=l(A(),1),o1=l(F(),1),Q7=l(Is(),1);var J7=l(w(),1);function xD({clientIds:e}){let{areBlocksHiddenAnywhere:t,shortcut:o}=(0,o1.useSelect)(n=>{let{isBlockHiddenAnywhere:i}=M(n(_));return{areBlocksHiddenAnywhere:e?.every(s=>i(s)),shortcut:n(Q7.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),{showViewportModal:r}=M((0,o1.useDispatch)(_));return(0,J7.jsx)(X7.MenuItem,{onClick:()=>r(e),shortcut:o,children:t?(0,_D.__)("Show"):(0,_D.__)("Hide")})}var Ru=l(A(),1),wD=l(F(),1),Pu=l(N(),1);var wh=l(w(),1),{Badge:ASe}=M(Ru.privateApis),LSe={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:Et.desktop.value};function e9({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,hasParentHiddenEverywhere:r}=(0,wD.useSelect)(c=>{if(!e)return LSe;let{getBlockAttributes:u,isBlockParentHiddenEverywhere:d,getSettings:f}=M(c(_));return{currentBlockVisibility:u(e)?.metadata?.blockVisibility,selectedDeviceType:f()?.[_i]?.toLowerCase()||Et.desktop.value,hasParentHiddenEverywhere:d(e)}},[e]),{isBlockCurrentlyHidden:n,currentViewport:i}=Ni({blockVisibility:t,deviceType:o}),s=(0,wD.useSelect)(c=>!e||!i?!1:M(c(_)).isBlockParentHiddenAtViewport(e,i),[e,i]);if(!(n||r||s))return null;let a;if(n)if(t===!1)a=(0,Pu.__)("Block is hidden");else{let c=Et[i]?.label||i;a=(0,Pu.sprintf)((0,Pu.__)("Block is hidden on %s"),c)}if(r)a=(0,Pu.__)("Parent block is hidden");else if(s){let c=Et[i]?.label||i;a=(0,Pu.sprintf)((0,Pu.__)("Parent block is hidden on %s"),c)}return(0,wh.jsx)(ASe,{className:"block-editor-block-visibility-info",children:(0,wh.jsxs)(Ru.__experimentalHStack,{spacing:2,justify:"start",children:[(0,wh.jsx)(Ru.Icon,{icon:vs}),(0,wh.jsx)(Ru.__experimentalText,{children:a})]})})}function gy(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:S,hasChildSelected:x,isEditingDisabled:C,hasEditableOutline:B,isEditingContentOnlySection:I,defaultClassName:O,isSectionBlock:E,isWithinSectionBlock:L,canMove:T,blockVisibility:R,deviceType:D}=(0,t9.useContext)(cr),j=(0,r1.sprintf)((0,r1.__)("Block: %s"),d),G=a==="html"&&!t?"-visual":"",z=G7(),H=!L,W=(0,n1.useMergeRefs)([e.ref,B7({clientId:o,initialPosition:p}),TH(o),P7(o),L7({clientId:o,isSelected:f}),T7({isEnabled:H}),D7(),GC({triggerAnimationOnChange:s,clientId:o}),(0,n1.useDisabled)({isDisabled:!h}),QC({clientId:o,isEnabled:E}),V7({isSelected:f}),T?z:void 0]),te=Pe(),ae=!!te[Rp]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:X}=Ni({blockVisibility:R,deviceType:D});u<2&&o===te.clientId&&(0,r9.default)(`Block type "${c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let ee=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(ee=!0),{tabIndex:g==="disabled"?-1:0,draggable:T&&!x?!0:void 0,...n,...e,ref:W,id:`block-${o}${G}`,role:"document","aria-label":j,"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":S,"has-child-selected":x,"is-editing-disabled":C,"has-editable-outline":B,"has-negative-margin":ee,"is-editing-content-only-section":I,"is-block-hidden":X},r,e.className,n.className,O),style:{...n.style,...e.style,...ae}}}gy.save=o9.__unstableGetBlockProps;var mo=l(w(),1);function NSe(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 i1({children:e,isHtml:t,...o}){return(0,mo.jsx)("div",{...gy(o,{__unstableIsHtml:t}),children:e})}function CD({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:S,isSelectionWithinCurrentSection:x,themeSupportsLayout:C,...B}=(0,Ou.useContext)(cr),I=zf()||{},O=(0,mo.jsx)(Lw,{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(I).length?I:void 0,mayDisplayControls:y,mayDisplayParentControls:S,mayDisplayPatternEditingControls:x,blockEditingMode:B.blockEditingMode,isPreviewMode:B.isPreviewMode}),E=(0,Ge.getBlockType)(u);E?.getEditWrapperProps&&(m=NSe(m,E.getEditWrapperProps(f)));let L=m&&!!m["data-align"]&&!C,T=a?.includes("is-position-sticky");L&&(O=(0,mo.jsx)("div",{className:V("wp-block",T&&a),"data-align":m["data-align"],children:O}));let R;if(d)t==="html"?R=(0,mo.jsxs)(mo.Fragment,{children:[(0,mo.jsx)("div",{style:{display:"none"},children:O}),(0,mo.jsx)(i1,{isHtml:!0,children:(0,mo.jsx)(k8,{clientId:n})})]}):E?.apiVersion>1?R=O:R=(0,mo.jsx)(i1,{children:O});else{let z=e?(0,Ge.serializeRawBlock)(e):(0,Ge.getSaveContent)(E,f);R=(0,mo.jsxs)(i1,{className:"has-warning",children:[(0,mo.jsx)($H,{clientId:n}),(0,mo.jsx)(Ou.RawHTML,{children:(0,s9.safeHTML)(z)})]})}let{"data-align":D,...j}=m??{},G={...j,className:V(j.className,D&&C&&`align${D}`,!(D&&T)&&a)};return(0,mo.jsx)(cr.Provider,{value:{wrapperProps:G,isAligned:L,isSelectionWithinCurrentSection:x,...B},children:(0,mo.jsx)(XH,{fallback:(0,mo.jsx)(i1,{className:"has-warning",children:(0,mo.jsx)(qH,{})}),children:R})})}var MSe=(0,s1.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(_);return{setAttributes(m){let{getMultiSelectedBlockClientIds:h}=o.select(_),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(_),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:S,getBlockIndex:x,getBlockRootClientId:C,canInsertBlockType:B}=o.select(_);function I(){let E=v(h),L=(0,Ge.getDefaultBlockName)(),T=(0,Ge.getBlockType)(L);if(y(h)!==L){let R=(0,Ge.switchToBlockType)(E,L);R&&R.length&&s(h,R)}else if((0,Ge.isUnmodifiedDefaultBlock)(E)){let R=b(h);R&&o.batch(()=>{d(h),f(R)})}else if(T.merge){let R=T.merge({},E.attributes);s([h],[(0,Ge.createBlock)(L,R)])}}function O(E,L=!0){let T=y(E),D=(0,Ge.getBlockType)(T).category==="text",j=C(E),G=S(E),[z]=G;G.length===1&&(0,Ge.isUnmodifiedBlock)(v(z))?d(E):D?o.batch(()=>{if(B(y(z),j))u([z],E,j,x(E));else{let H=(0,Ge.switchToBlockType)(v(z),(0,Ge.getDefaultBlockName)());H&&H.length&&H.every(W=>B(W.name,j))?(n(H,x(E),j,L),d(z,!1)):I()}!S(E).length&&(0,Ge.isUnmodifiedBlock)(v(E))&&d(E,!1)}):I()}if(m){if(p){let L=b(p);if(L)if(y(p)===y(L)){let T=k(p),R=k(L);if(Object.keys(T).every(D=>T[D]===R[D])){o.batch(()=>{u(S(L),L,p),d(L,!1)});return}}else{i(p,L);return}}let E=b(h);if(!E)return;S(E).length?O(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),R=k(L);if(Object.keys(T).every(D=>T[D]===R[D])){o.batch(()=>{u(S(p),p,L),d(p,!1)});return}}O(p)}else I()}},onReplace(m,h,p){m.length&&!(0,Ge.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)}}});CD=(0,i9.compose)(MSe,(0,n9.withFilters)("editor.BlockListBlock"))(CD);function DSe(e){let{clientId:t,rootClientId:o}=e,r=(0,s1.useSelect)(se=>{let{isBlockSelected:ce,getBlockMode:Se,isSelectionEnabled:he,getTemplateLock:we,isSectionBlock:De,getParentSectionBlock:ct,getBlockWithoutAttributes:Jt,getBlockAttributes:uo,canRemoveBlock:Do,canMoveBlock:ot,getSettings:sr,getEditedContentOnlySection:ze,getBlockEditingMode:wt,getBlockName:je,isFirstMultiSelectedBlock:At,getMultiSelectedBlockClientIds:ar,hasSelectedInnerBlock:Ue,getBlocksByName:Lr,getBlockIndex:ki,isBlockMultiSelected:eo,isBlockSubtreeDisabled:Bo,isBlockHighlighted:Xe,__unstableIsFullySelected:Ve,__unstableSelectionHasUnmergeableBlock:bt,isBlockBeingDragged:Eo,isDragging:lr,__unstableHasActiveBlockOverlayActive:ge,getSelectedBlocksInitialCaretPosition:Ct}=M(se(_)),To=Jt(t);if(!To)return;let{hasBlockSupport:Ye,getActiveBlockVariation:oe}=se(Ge.store),Ae=uo(t),{name:ut,isValid:Gc}=To,ca=(0,Ge.getBlockType)(ut),Bp=sr(),{supportsLayout:Vk,isPreviewMode:ff,__experimentalBlockBindingsSupportedAttributes:an}=Bp,Ep=an?.[ut],Tp=Ae?.metadata?.blockVisibility,o0=Bp?.[_i]?.toLowerCase()||"desktop",r0=ca?.apiVersion>1,Fk=eo(t),ue=wt(t),to={isPreviewMode:ff,blockWithoutAttributes:To,name:ut,attributes:Ae,isValid:Gc,themeSupportsLayout:Vk,index:ki(t),isReusable:(0,Ge.isReusableBlock)(ca),className:r0?Ae.className:void 0,defaultClassName:r0?(0,Ge.getBlockDefaultClassName)(ut):void 0,blockTitle:ca?.title,bindableAttributes:Ep,blockVisibility:Tp,deviceType:o0,isMultiSelected:Fk,blockEditingMode:ue,isEditingDisabled:ue==="disabled"};if(ff)return to;let ve=ce(t),Lt=Do(t),ln=ot(t),Sr=oe(ut,Ae),Wc=!0,iO=Ue(t,Wc),sO=De(t)?t:ct(t),aO=(0,Ge.hasBlockSupport)(ut,"multiple",!0)?[]:Lr(ut),Lme=aO.length&&aO[0]!==t;return{...to,mode:Se(t),isSelectionEnabled:he(),isLocked:!!we(o),isSectionBlock:De(t),isWithinSectionBlock:!!sO,isSelectionWithinCurrentSection:ce(sO)||Ue(sO,Wc),blockType:ca,canRemove:Lt,canMove:ln,isSelected:ve,isEditingContentOnlySection:ze()===t,blockEditingMode:ue,mayDisplayControls:ve||At(t)&&ar().every(Nme=>je(Nme)===ut),mayDisplayParentControls:Ye(je(t),"__experimentalExposeControlsToChildren",!1)&&Ue(t),blockApiVersion:ca?.apiVersion||1,blockTitle:Sr?.title||ca?.title,isSubtreeDisabled:ue==="disabled"&&Bo(t),hasOverlay:ge(t)&&!lr(),initialPosition:ve?Ct():void 0,isHighlighted:Xe(t),isMultiSelected:Fk,isPartiallySelected:Fk&&!Ve()&&!bt(),isDragging:Eo(t),hasChildSelected:iO,isEditingDisabled:ue==="disabled",hasEditableOutline:ue!=="disabled"&&wt(o)==="disabled",originalBlockClientId:Lme?aO[0]:!1,blockVisibility:Tp,deviceType:o0}},[t,o]),{isPreviewMode:n,mode:i="visual",isSelectionEnabled:s=!1,isLocked:a=!1,canRemove:c=!1,canMove:u=!1,blockWithoutAttributes:d,name:f,attributes:m,isValid:h,isSelected:p=!1,themeSupportsLayout:g,isEditingContentOnlySection:b,blockEditingMode:v,mayDisplayControls:k,mayDisplayParentControls:y,index:S,blockApiVersion:x,blockType:C,blockTitle:B,isSubtreeDisabled:I,hasOverlay:O,initialPosition:E,isHighlighted:L,isMultiSelected:T,isPartiallySelected:R,isReusable:D,isDragging:j,hasChildSelected:G,isSectionBlock:z,isWithinSectionBlock:H,isSelectionWithinCurrentSection:W,isEditingDisabled:te,hasEditableOutline:ne,className:ae,defaultClassName:X,originalBlockClientId:ee,bindableAttributes:le,blockVisibility:Q,deviceType:J}=r,{isBlockCurrentlyHidden:q}=Ni({blockVisibility:Q,deviceType:J}),U=(0,Ou.useMemo)(()=>({...d,attributes:m}),[d,m]);if(!r)return null;let K={isPreviewMode:n,clientId:t,className:ae,index:S,mode:i,name:f,blockApiVersion:x,blockType:C,blockTitle:B,isSelected:p,isSubtreeDisabled:I,hasOverlay:O,initialPosition:E,blockEditingMode:v,isHighlighted:L,isMultiSelected:T,isPartiallySelected:R,isReusable:D,isDragging:j,hasChildSelected:G,isSectionBlock:z,isWithinSectionBlock:H,isSelectionWithinCurrentSection:W,isEditingDisabled:te,hasEditableOutline:ne,isEditingContentOnlySection:b,defaultClassName:X,mayDisplayControls:k,mayDisplayParentControls:y,originalBlockClientId:ee,themeSupportsLayout:g,canMove:u,isBlockCurrentlyHidden:q,bindableAttributes:le,blockVisibility:Q,deviceType:J};return q&&!p&&!T&&!G?null:(0,mo.jsx)(cr.Provider,{value:K,children:(0,mo.jsx)(CD,{...e,mode:i,isSelectionEnabled:s,isLocked:a,canRemove:c,canMove:u,block:U,name:f,attributes:m,isValid:h,isSelected:p})})}var a9=(0,Ou.memo)(DSe);var j5=l(F(),1),tY=l($(),1);var F5=l(N(),1),ZK=l(pM(),1),IB=l(F(),1),PB=l(it(),1);var YK=l(Zo(),1),Wl=l(N(),1),BB=l(A(),1),qK=l(P(),1),EB=l(F(),1),TB=l(Z(),1),$y=l($(),1);var Ft=l(P(),1),ag=l(A(),1),Ku=l(N(),1),Hy=l(Z(),1),HK=l(F(),1);var Ch=l(N(),1),Bh=l(P(),1),c9=l(A(),1),by=l(w(),1),l9=[(0,Bh.createInterpolateElement)((0,Ch.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,by.jsx)("kbd",{})}),(0,Bh.createInterpolateElement)((0,Ch.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,by.jsx)("kbd",{})}),(0,Bh.createInterpolateElement)((0,Ch.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,by.jsx)("kbd",{})}),(0,Ch.__)("Drag files into the editor to automatically insert media blocks."),(0,Ch.__)("Change a block's type by pressing the block icon on the toolbar.")];function VSe(){let[e]=(0,Bh.useState)(Math.floor(Math.random()*l9.length));return(0,by.jsx)(c9.Tip,{children:l9[e]})}var u9=VSe;var Wh=l($(),1),B$=l(P(),1),E$=l(N(),1);var gn=l(A(),1),a1=l(F(),1),d9=l(Re(),1),Au=l(N(),1);var l1=l($(),1);var xr=l(w(),1),{Badge:FSe}=M(gn.privateApis);function zSe({children:e,onClick:t}){return t?(0,xr.jsx)(gn.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function jSe({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,d9.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,a1.useSelect)(g=>{if(a||c||!s)return{};let{getBlockParents:b,getBlockName:v}=g(_),y=b(d,!1).find(S=>{let x=v(S);return x==="core/navigation"||(0,l1.hasBlockSupport)(x,"listView")});return{parentBlockClientId:y,parentBlockName:y?v(y):null}},[d,s,c,a]),{selectBlock:h}=(0,a1.useDispatch)(_),p=a?"div":"h2";return(0,xr.jsx)("div",{className:V("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:(0,xr.jsxs)(gn.__experimentalVStack,{children:[(0,xr.jsxs)(gn.__experimentalHStack,{justify:"flex-start",spacing:0,children:[f&&(0,xr.jsx)(gn.Button,{onClick:()=>h(f),label:m?(0,Au.sprintf)((0,Au.__)('Go to "%s" block'),(0,l1.getBlockType)(m)?.title):(0,Au.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,Au.isRTL)()?Vo:Nr,size:"small"}),c&&(0,xr.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,xr.jsx)(gn.Icon,{icon:(0,Au.isRTL)()?qk:Zk})}),(0,xr.jsxs)(zSe,{onClick:a?()=>{h(a)}:void 0,children:[(0,xr.jsx)(Oe,{icon:t,showColors:!0}),(0,xr.jsxs)(gn.__experimentalVStack,{spacing:1,children:[(0,xr.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,xr.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,xr.jsx)(FSe,{children:e})]}),u]})]})]}),!a&&!c&&o&&(0,xr.jsx)(gn.__experimentalText,{className:"block-editor-block-card__description",children:o})]})})}var ky=jSe;var $1=l(Z(),1),b5=l(F(),1),nm=l(P(),1),g5=l(Re(),1);var R9=l(F(),1),Lu=l(P(),1),O9=l(A(),1),Jf=l(m9(),1);var p9=l(P(),1),Eh=l(F(),1),h9=l(Z(),1);var c1=l(w(),1);function USe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,Eh.createRegistry)({},t),r.registerStore(Wt,Jp),e.set(t,r)),r}var HSe=(0,h9.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,Eh.useRegistry)(),[i]=(0,p9.useState)(()=>new WeakMap),s=USe(i,n,o);return s===n?(0,c1.jsx)(e,{registry:n,...r}):(0,c1.jsx)(Eh.RegistryProvider,{value:s,children:(0,c1.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),g9=HSe;var Gr=l(P(),1),y9=l(F(),1),S9=l($(),1);var b9=l(P(),1),GSe=()=>{},u1=(0,b9.createContext)({getSelection:()=>{},onChangeSelection:GSe});var k9=()=>{};function _9(e,t){let o=(0,S9.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=>_9(r,t))),o}function x9(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:x9(o.innerBlocks,t)}})}function v9(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 d1({clientId:e=null,value:t,onChange:o=k9,onInput:r=k9}){let n=(0,y9.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,Gr.useContext)(u1),{resetBlocks:a,resetSelection:c,replaceInnerBlocks:u,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(_),{getBlockName:m,getBlocks:h,getSelectionStart:p,getSelectionEnd:g}=n.select(_),b=(0,Gr.useRef)({incoming:null,outgoing:[]}),v=(0,Gr.useRef)(!1),k=(0,Gr.useRef)({externalToInternal:new Map,internalToExternal:new Map}),y=(0,Gr.useRef)(null),S=(0,Gr.useRef)(!1),x=()=>{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 R=D=>!D?.clientId||!e?D:{...D,clientId:k.current.externalToInternal.get(D.clientId)??D.clientId};S.current=!0,c(R(E.selectionStart),R(E.selectionEnd),E.initialPosition),S.current=!1}},C=()=>{t&&(e?n.batch(()=>{k.current.externalToInternal.clear(),k.current.internalToExternal.clear();let E=t.map(L=>_9(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([])},I=(0,Gr.useRef)(r),O=(0,Gr.useRef)(o);(0,Gr.useEffect)(()=>{I.current=r,O.current=o},[r,o]),(0,Gr.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(),x())},[t,e]),(0,Gr.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:L,__unstableIsLastBlockChangeIgnored:T,areInnerBlocksControlled:R,getBlockParents:D}=n.select(_),j=h(e),G=L(),z=!1,H=p(),W=g();v.current=!0;let te=n.subscribe(()=>{if(e!==null&&m(e)===null)return;let ne=L(),ae=h(e),X=ae!==j;if(j=ae,X&&(b.current.incoming||T())){b.current.incoming=null,G=ne;return}let le=X||z&&!X&&ne&&!G,Q=p(),J=g(),q=Q!==H||J!==W;q&&(H=Q,W=J),(le||q)&&n.batch(()=>{if(le){G=ne;let U=e?x9(j,k.current):j,K={selectionStart:Q,selectionEnd:J,initialPosition:E()},se=e?v9(K,k.current):K;b.current.outgoing.push(U),(G?O.current:I.current)(U,{selection:se})}if(q&&!le&&Q?.clientId&&!S.current&&(e?k.current.internalToExternal.has(Q.clientId):!D(Q.clientId).some(K=>R(K)))){let K={selectionStart:Q,selectionEnd:J,initialPosition:E()};s(e?v9(K,k.current):K)}}),z=X},_);return()=>{v.current=!1,te()}},[n,e]),(0,Gr.useEffect)(()=>()=>{B()},[])}var w9=l(P(),1),C9=l(F(),1),B9=l(Is(),1),po=l(N(),1);function E9(){return null}function WSe(){let{registerShortcut:e}=(0,C9.useDispatch)(B9.store);return(0,w9.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,po.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,po.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,po.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,po.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,po.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,po.__)("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,po.__)("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,po.__)("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,po.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,po.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,po.__)("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,po.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,po.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,po.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,po.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,po.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,po.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,po.__)("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,po.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,po.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e]),null}E9.Register=WSe;var f1=E9;var T9=l(P(),1);function $Se(e={}){return(0,T9.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var I9=$Se;var Ll=l(w(),1),BD=()=>{},P9=!1,Th=null;function KSe(){if(Th!==null)return Th;if(!window.__clientSideMediaProcessing||typeof Jf.detectClientSideMediaSupport!="function")return Th=!1,!1;let e=(0,Jf.detectClientSideMediaSupport)();return!e||!e.supported?(P9||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),P9=!0),Th=!1,!1):(Th=!0,!0)}function YSe(e,{allowedTypes:t,additionalData:o={},filesList:r,onError:n=BD,onFileChange:i,onSuccess:s,onBatchSuccess:a}){e.dispatch(Jf.store).addItems({files:Array.from(r),onChange:i,onSuccess:s,onBatchSuccess:a,onError:({message:c})=>n(c),additionalData:o,allowedTypes:t})}function qSe(e){return d1(e),null}var Ih=g9(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=I9(t),i=KSe(),s=(0,Lu.useMemo)(()=>i&&t?.mediaUpload?{...t,mediaUpload:YSe.bind(null,o)}:t,[t,o,i]),{__experimentalUpdateSettings:a}=M((0,R9.useDispatch)(_));(0,Lu.useEffect)(()=>{a({...s,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[s,r,a]);let c=(0,Lu.useRef)(e.selection);c.current=e.selection;let u=(0,Lu.useRef)(e.onChangeSelection??BD);u.current=e.onChangeSelection??BD;let d=(0,Lu.useMemo)(()=>({getSelection:()=>c.current,onChangeSelection:(...h)=>u.current(...h)}),[]),f=(0,Ll.jsxs)(O9.SlotFillProvider,{passthrough:!0,children:[!s?.isPreviewMode&&(0,Ll.jsx)(f1.Register,{}),(0,Ll.jsx)(BH,{children:e.children})]}),m=(0,Ll.jsxs)(u1.Provider,{value:d,children:[(0,Ll.jsx)(qSe,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),f]});return i?(0,Ll.jsx)(Jf.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:m}):m}),ZSe=e=>(0,Ll.jsx)(Ih,{...e,stripExperimentalSettings:!0,children:e.children}),A9=ZSe;var Ny=l(Z(),1),g$=l(F(),1),W1=l(P(),1),b$=l(A(),1);var em=l(P(),1),vG=l(N(),1),_a=l(Z(),1),yG=l(A(),1),AD=l(F(),1);var fG=l(F(),1),mG=l(N(),1),_y=l(Z(),1),pG=l(P(),1);var L9=l(Z(),1),N9=l(F(),1);function XSe(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(_);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function M9(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,N9.useSelect)(XSe,[]);return(0,L9.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 Ph=l(Fe(),1),ED=l(it(),1),m1=l(F(),1),p1=l(Z(),1),vy=l(P(),1);var TD=l(w(),1);function D9(){let e=(0,vy.useRef)(),t=(0,vy.useRef)(),o=(0,vy.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=M((0,m1.useSelect)(_)),{setLastFocus:d}=M((0,m1.useDispatch)(_)),f=(0,vy.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=s(y);S.length?e.current.querySelector(`[data-block="${S[0]}"]`).focus():y?e.current.querySelector(`[data-block="${y}"]`).focus():k.focus()}else{let y=v.target.compareDocumentPosition(k)&v.target.DOCUMENT_POSITION_FOLLOWING,S=Ph.focus.tabbable.find(e.current);S.length&&(y?S[0]:S[S.length-1]).focus()}}let h=(0,TD.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),p=(0,TD.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,p1.useRefEffect)(v=>{function k(B){if(B.defaultPrevented||B.keyCode!==ED.TAB||!o.current||!t.current)return;let{target:I,shiftKey:O}=B,E=O?"findPrevious":"findNext",L=Ph.focus.tabbable[E](I),T=I.closest("[data-block]"),R=T&&L&&(w7(T,L)||ka(T,L));if((0,Ph.isFormElement)(L)&&R)return;let D=O?t:o;f.current=!0,D.current.focus({preventScroll:!0})}function y(B){d({...a(),current:B.target});let{ownerDocument:I}=v;!B.relatedTarget&&B.target.hasAttribute("data-block")&&I.activeElement===I.body&&i()===0&&v.focus()}function S(B){if(B.keyCode!==ED.TAB||B.target?.getAttribute("role")==="region"||e.current===B.target)return;let O=B.shiftKey?"findPrevious":"findNext",E=Ph.focus.tabbable[O](B.target);(E===t.current||E===o.current)&&(B.preventDefault(),E.focus({preventScroll:!0}))}let{ownerDocument:x}=v,{defaultView:C}=x;return C.addEventListener("keydown",S),v.addEventListener("keydown",k),v.addEventListener("focusout",y),()=>{C.removeEventListener("keydown",S),v.removeEventListener("keydown",k),v.removeEventListener("focusout",y)}},[]),b=(0,p1.useMergeRefs)([e,g]);return[h,b,p]}var ho=l(Fe(),1),va=l(it(),1),h1=l(F(),1),V9=l(Z(),1);function QSe(e,t,o){let r=t===va.UP||t===va.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 ID(e,t,o,r){let n=ho.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(Li(a)&&ho.focus.focusable.find(a).filter(c=>!(0,ho.isFormElement)(c)).length!==0||!ho.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 F9(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,h1.useSelect)(_),{selectBlock:i}=(0,h1.useDispatch)(_);return(0,V9.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let h=ID(f,m,s);return h&&Li(h)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:h,shiftKey:p,ctrlKey:g,altKey:b,metaKey:v}=f,k=m===va.UP,y=m===va.DOWN,S=m===va.LEFT,x=m===va.RIGHT,C=k||S,B=S||x,I=k||y,O=B||I,E=p||g||b||v,L=I?ho.isVerticalEdge:ho.isHorizontalEdge,{ownerDocument:T}=s,{defaultView:R}=T;if(!O||o().isPreviewMode)return;if(r()){if(p||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!QSe(h,m,E))return;I?a||(a=(0,ho.computeCaretRect)(R)):a=null;let D=(0,ho.isRTL)(h)?!C:C,{keepCaretInsideBlock:j}=o();if(p)u(h,C)&&L(h,C)&&(s.contentEditable=!0,s.focus());else if(I&&(0,ho.isVerticalEdge)(h,C)&&(!b||(0,ho.isHorizontalEdge)(h,D))&&!j){let G=ID(h,C,s,!0);G&&((0,ho.placeCaretAtVerticalEdge)(G,b?!C:C,b?void 0:a),f.preventDefault())}else if(B&&R.getSelection().isCollapsed&&(0,ho.isHorizontalEdge)(h,D)&&!j){let G=ID(h,D,s);(0,ho.placeCaretAtHorizontalEdge)(G,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var z9=l(Z(),1),j9=l(F(),1),ya=l(it(),1);function U9(){let e=(0,j9.useSelect)(t=>t(_).getSettings().isPreviewMode,[]);return(0,z9.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===ya.TAB,c=n===ya.UP,u=n===ya.DOWN,d=n===ya.LEFT;if(!a&&!(c||u||d||n===ya.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 H9=l(Fe(),1),g1=l(F(),1),G9=l(Is(),1),W9=l(Z(),1);function $9(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,g1.useSelect)(_),{multiSelect:r,selectBlock:n}=(0,g1.useDispatch)(_),i=(0,G9.__unstableUseShortcutEventMatch)();return(0,W9.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,H9.isEntirelySelected)(c.target))return;c.preventDefault();let{ownerDocument:d}=c.target,[f]=u,m=Li(d.activeElement);if(m&&m!==f&&!ka(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 b1=l(F(),1),Y9=l(Z(),1);function K9(e,t){e.contentEditable=t,t&&e.focus()}function q9(){let{startMultiSelect:e,stopMultiSelect:t}=(0,b1.useDispatch)(_),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,b1.useSelect)(_);return(0,Y9.useRefEffect)(a=>{let{ownerDocument:c}=a,{defaultView:u}=c,d,f;function m(){t(),u.removeEventListener("mouseup",m),f=u.requestAnimationFrame(()=>{if(!n())return;K9(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),K9(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 k1=l(F(),1),Q9=l(Z(),1),PD=l(ur(),1),J9=l(Fe(),1);function JSe(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function e_e(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,J9.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function t_e(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function Z9(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function X9(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function eG(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,k1.useDispatch)(_),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,k1.useSelect)(_);return(0,Q9.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=JSe(f),h=e_e(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()){Z9(s,!1);let k=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;k=k?.closest("[contenteditable]"),k?.focus()}return}let g=Li(m),b=Li(h);if(p){let k=n(),y=Li(d.target),S=y!==b;(g===b&&f.isCollapsed||!b||S)&&(b=y),g!==k&&(g=k)}if(g===void 0&&b===void 0){Z9(s,!1);return}if(d.type==="mouseup"&&!d.shiftKey&&!i()&&g===b){let k=Li(d.target);if(k&&k!==g){f.removeAllRanges();return}}if(g===b)i()?e(g,g):t(g);else{let k=[...r(g),g],y=[...r(b),b],S=t_e(k,y);if(k[S]!==g||y[S]!==b){e(k[S],y[S]);return}let x=X9(m),C=X9(h);if(x&&C){let B=f.getRangeAt(0),I=(0,PD.create)({element:x,range:B,__unstableIsEditableTree:!0}),O=(0,PD.create)({element:C,range:B,__unstableIsEditableTree:!0}),E=I.start??I.end,L=O.start??O.end;o({start:{clientId:g,attributeKey:x.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 v1=l(F(),1),tG=l(Z(),1);function oG(){let{selectBlock:e}=(0,v1.useDispatch)(_),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,v1.useSelect)(_);return(0,tG.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=Li(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 y1=l(F(),1),rG=l(Z(),1),Nl=l(it(),1),Ps=l($(),1);function nG(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,y1.useSelect)(_),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:h,__unstableDeleteSelection:p,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,y1.useDispatch)(_);return(0,rG.useRefEffect)(v=>{function k(x){v.contentEditable==="true"&&x.preventDefault()}function y(x){if(!x.defaultPrevented){if(!n()){if(x.keyCode===Nl.ENTER){if(x.shiftKey||e())return;let C=o(),B=i(C),I=c(),O=u();if(I.attributeKey===O.attributeKey){let E=d(C)[I.attributeKey],L=(0,Ps.getBlockTransforms)("from").filter(({type:R})=>R==="enter"),T=(0,Ps.findTransform)(L,R=>R.regExp.test(E));if(T){f(C,T.transform({content:E})),b();return}}if(!(0,Ps.hasBlockSupport)(B,"splitting",!1)&&!x.__deprecatedOnSplit)return;(s((0,Ps.getDefaultBlockName)(),a(C))||s(B,a(C)))&&(m(),x.preventDefault())}return}x.keyCode===Nl.ENTER?(v.contentEditable=!1,x.preventDefault(),e()?f(t(),(0,Ps.createBlock)((0,Ps.getDefaultBlockName)())):m()):x.keyCode===Nl.BACKSPACE||x.keyCode===Nl.DELETE?(v.contentEditable=!1,x.preventDefault(),e()?h(t()):r()?p(x.keyCode===Nl.DELETE):g()):x.key.length===1&&!(x.metaKey||x.ctrlKey)&&(v.contentEditable=!1,r()?p(x.keyCode===Nl.DELETE):(x.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function S(x){n()&&(v.contentEditable=!1,r()?p():(x.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}return v.addEventListener("beforeinput",k),v.addEventListener("keydown",y),v.addEventListener("compositionstart",S),()=>{v.removeEventListener("beforeinput",k),v.removeEventListener("keydown",y),v.removeEventListener("compositionstart",S)}},[])}var Sa=l($(),1),_1=l(Fe(),1),Ah=l(F(),1),dG=l(Z(),1);var iG=l(P(),1),sG=l($(),1),yy=l(F(),1),Mi=l(N(),1),aG=l(Ti(),1);function Rh(){let{getBlockName:e}=(0,yy.useSelect)(_),{getBlockType:t}=(0,yy.useSelect)(sG.store),{createSuccessNotice:o}=(0,yy.useDispatch)(aG.store);return(0,iG.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,Mi.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,Mi.sprintf)((0,Mi.__)('Copied "%s" to clipboard.'),a):i=(0,Mi.sprintf)((0,Mi.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,Mi.sprintf)((0,Mi._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,Mi.sprintf)((0,Mi._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var cG=l(Fe(),1),Di=l($(),1);var lG=l(Fe(),1);function o_e(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 r_e(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function Oh({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=o_e(o),o=r_e(o);let r=(0,lG.getFilesFromDataTransfer)(e);return r.length&&!n_e(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function n_e(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 RD=Symbol("requiresWrapperOnCopy");function S1(e,t,o){let r=t,[n]=t;if(n&&o.select(Di.store).getBlockType(n.name)[RD]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(_),d=a(n.clientId),f=c(d);f&&(r=(0,Di.createBlock)(f,u(d),r))}let i=(0,Di.serialize)(r);e.clipboardData.setData("text/plain",i_e(i)),e.clipboardData.setData("text/html",i)}function uG(e,t){let{plainText:o,html:r,files:n}=Oh(e),i=[];if(n.length){let s=(0,Di.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,Di.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,Di.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function i_e(e){return e=e.replace(/<br>/g,`
`),(0,cG.__unstableStripHTML)(e).trim().replace(/\n\n+/g,`
`)}function Sy(){let e=(0,Ah.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,Ah.useSelect)(_),{flashBlock:m,removeBlocks:h,replaceBlocks:p,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:v}=(0,Ah.useDispatch)(_),k=Rh();return(0,dG.useRefEffect)(y=>{function S(x){if(x.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:L}=x,{ownerDocument:T}=L;if(x.type==="copy"||x.type==="cut"?(0,_1.documentHasUncollapsedSelection)(T):(0,_1.documentHasSelection)(T)&&!T.activeElement.isContentEditable)return}let{activeElement:B}=x.target.ownerDocument;if(!y.contains(B))return;let I=c(),O=a()||s(),E=!O&&!I;if(x.type==="copy"||x.type==="cut")if(x.preventDefault(),C.length===1&&m(C[0]),E)b();else{k(x.type,C);let L;if(O)L=t(C);else{let[T,R]=u(),D=t(C.slice(1,C.length-1));L=[T,...D,R]}S1(x,L,e)}if(x.type==="cut")O&&!E?h(C):(x.target.ownerDocument.activeElement.contentEditable=!1,g());else if(x.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:L,mediaUpload:T}=n();if(x.clipboardData.getData("rich-text")==="true")return;let{plainText:D,html:j,files:G}=Oh(x),z=s(),H=[];if(G.length){if(!T){x.preventDefault();return}let ae=(0,Sa.getBlockTransforms)("from");H=G.reduce((X,ee)=>{let le=(0,Sa.findTransform)(ae,Q=>Q.type==="files"&&Q.isMatch([ee]));return le&&X.push(le.transform([ee])),X},[]).flat()}else H=(0,Sa.pasteHandler)({HTML:j,plainText:D,mode:z?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:L});if(typeof H=="string")return;if(z){p(C,H,H.length-1,-1),x.preventDefault();return}if(!r()&&!(0,Sa.hasBlockSupport)(i(C[0]),"splitting",!1)&&!x.__deprecatedOnSplit)return;let[W]=C,te=f(W),ne=[];for(let ae of H)if(d(ae.name,te))ne.push(ae);else{let X=i(te),ee=ae.name!==X?(0,Sa.switchToBlockType)(ae,X):[ae];if(!ee)return;for(let le of ee)for(let Q of le.innerBlocks)ne.push(Q)}v(ne),x.preventDefault()}}return y.ownerDocument.addEventListener("copy",S),y.ownerDocument.addEventListener("cut",S),y.ownerDocument.addEventListener("paste",S),()=>{y.ownerDocument.removeEventListener("copy",S),y.ownerDocument.removeEventListener("cut",S),y.ownerDocument.removeEventListener("paste",S)}},[])}var Lh=l(w(),1);function OD(){let[e,t,o]=D9(),r=(0,fG.useSelect)(n=>n(_).hasMultiSelection(),[]);return[e,(0,_y.useMergeRefs)([t,Sy(),nG(),q9(),eG(),oG(),M9(),$9(),F9(),U9(),(0,_y.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,mG.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function s_e({children:e,...t},o){let[r,n,i]=OD();return(0,Lh.jsxs)(Lh.Fragment,{children:[r,(0,Lh.jsx)("div",{...t,ref:(0,_y.useMergeRefs)([n,o]),className:V(t.className,"block-editor-writing-flow"),children:e}),i]})}var x1=(0,pG.forwardRef)(s_e);var w1=null;function hG(){return w1||(w1=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},[]),w1)}var bn=l(P(),1),xy=l(Z(),1);function gG({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function a_e(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function l_e(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 c_e(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 bG({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,xy.useResizeObserver)(),[s,{width:a,height:c}]=(0,xy.useResizeObserver)(),u=(0,bn.useRef)(0),d=r!==1,f=(0,xy.useReducedMotion)(),m=r==="auto-scaled",h=(0,bn.useRef)(!1),p=(0,bn.useRef)(null);(0,bn.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?gG({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,v=(0,bn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),k=(0,bn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,bn.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(c_e(v.current,k.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),S=(0,bn.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]),x=(0,bn.useRef)(!1);return(0,bn.useEffect)(()=>{let C=t&&x.current!==d;if(x.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,bn.useEffect)(()=>{if(t&&(m&&v.current.scaleValue!==1&&(v.current.scaleValue=gG({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=a_e(v.current,k.current),k.current.scrollTop=l_e(v.current,k.current),p.current=y(),f?S():p.current.onfinish=S},[y,S,f,m,b,e,t,i,a,c,o,g]),{isZoomedOut:d,scaleContainerWidth:g,containerWidth:a,contentResizeListener:n,containerResizeListener:s}}var Vi=l(w(),1),u_e=_a.useViewportMatch.__experimentalWidthProvider;function SG(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 d_e(e){return(0,_a.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];SG(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var kG=new WeakMap,f_e=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function m_e(e){let t=kG.get(e);if(t)return t;let o=`<!doctype html>
<html>
<head>
<meta charset="utf-8">
<base href="${window.location.href}">
<script>window.frameElement._load()<\/script>
<style>
html{
height: auto !important;
min-height: 100%;
}
/* Lowest specificity to not override global styles */
:where(body) {
margin: 0;
/* Default background color in case zoom out mode background
colors the html element */
background-color: white;
}
</style>
${e.styles??""}
${e.scripts??""}
</head>
<body>
<script>document.currentScript.parentElement.remove()<\/script>
</body>
</html>`;return t=URL.createObjectURL(new Blob([o],{type:"text/html"})),kG.set(e,t),f_e?.register(e,t),t}function p_e({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,vG.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,AD.useSelect)(R=>{let D=R(_).getSettings();return{resolvedAssets:D.__unstableResolvedAssets,isPreviewMode:D.isPreviewMode}},[]),[f,m]=(0,em.useState)(),[h,p]=(0,em.useState)([]),[g,b,v]=OD(),k=(0,_a.useRefEffect)(R=>{R._load=()=>{m(R.contentDocument)};let D;function j(W){W.preventDefault()}function G(W){W.target.tagName==="A"&&W.target.getAttribute("href")?.startsWith("#")&&(W.preventDefault(),D.defaultView.location.hash=W.target.getAttribute("href").slice(1))}let{ownerDocument:z}=R;p(Array.from(z.body.classList).filter(W=>W.startsWith("admin-color-")||W.startsWith("post-type-")||W==="wp-embed-responsive"));function H(){let{contentDocument:W}=R,{documentElement:te}=W;D=W,te.classList.add("block-editor-iframe__html"),W.dir=z.dir;for(let ne of hG())W.getElementById(ne.id)||(W.head.appendChild(ne.cloneNode(!0)),d||console.warn(`${ne.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,ne));D.addEventListener("dragover",j,!1),D.addEventListener("drop",j,!1),D.addEventListener("click",G)}return R.addEventListener("load",H),()=>{delete R._load,R.removeEventListener("load",H),D?.removeEventListener("dragover",j),D?.removeEventListener("drop",j),D?.removeEventListener("click",G)}},[]),{contentResizeListener:y,containerResizeListener:S,containerWidth:x,isZoomedOut:C,scaleContainerWidth:B}=bG({scale:r,frameSize:parseInt(n),iframeDocument:f}),I=(0,_a.useDisabled)({isDisabled:!i}),O=(0,_a.useMergeRefs)([d_e(f),e,b,I]),E=m_e(u),L=o>=0&&!d,T=(0,Vi.jsxs)(Vi.Fragment,{children:[L&&g,(0,Vi.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,_a.useMergeRefs)([s,k]),tabIndex:o,src:E,title:a,onKeyDown:R=>{if(c.onKeyDown&&c.onKeyDown(R),R.currentTarget.ownerDocument!==R.target.ownerDocument){let{stopPropagation:D}=R.nativeEvent;R.nativeEvent.stopPropagation=()=>{},R.stopPropagation(),R.nativeEvent.stopPropagation=D,SG(R,window.KeyboardEvent,R.currentTarget)}},children:f&&(0,em.createPortal)((0,Vi.jsxs)("body",{ref:O,className:V("block-editor-iframe__body","editor-styles-wrapper",...h),children:[y,(0,Vi.jsx)(yG.__experimentalStyleProvider,{document:f,children:(0,Vi.jsx)(u_e,{value:x,children:t})})]}),f.documentElement)}),L&&v]});return(0,Vi.jsxs)("div",{className:"block-editor-iframe__container",children:[S,(0,Vi.jsx)("div",{className:V("block-editor-iframe__scale-container",C&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":C&&`${B}px`},children:T})]})}function h_e(e,t){return(0,AD.useSelect)(r=>r(_).getSettings().__internalIsInitialized,[])?(0,Vi.jsx)(p_e,{...e,forwardedRef:t}):null}var Nh=(0,em.forwardRef)(h_e);var p$=l(A(),1),Uh=l(P(),1),h$=l(F(),1);var B1={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},g_e=new Set(["combinator","comma"]);var b_e=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(B1[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return B1[e]}};function k_e(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 v_e(e,t=B1){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],g_e.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var y_e=/(['"])([^\\\n]+?)\1/g,S_e=/\\./g;function LD(e,t=B1){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(S_e,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(y_e,(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=k_e(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=v_e(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=b_e(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*C1(e,t){switch(e.type){case"list":for(let o of e.list)yield*C1(o,e);break;case"complex":yield*C1(e.left,e),yield*C1(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function _G(e){let t;return Array.isArray(e)?t=e:t=[...C1(e)].map(([o])=>o),t.map(o=>o.content).join("")}var c$=l(UW(),1),u$=l(I1(),1),d$=l(WW(),1),f$=l(a$(),1),l$=new Map,m$=[{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 A0e(e,t){let o=LD(t),r=o.findLastIndex(({content:s,type:a})=>m$.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=LD(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),_G(o)}function L0e({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new c$.default([r&&(0,d$.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:m$.some(d=>a.startsWith(d.content))?A0e(s,a):c}}),o&&(0,f$.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof u$.default?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i.message+`
`+i.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i),null}}var N0e=(e,t="",o)=>{let r=l$.get(t);return r||(r=new WeakMap,l$.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=L0e(n,t,o),r.set(n,i)),i})},jh=N0e;var Vu=l(w(),1);Kc([Yc,Op]);function M0e(e,t){return(0,Uh.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=Bt(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function D0e({styles:e,scope:t,transformOptions:o}){let r=(0,h$.useSelect)(s=>M(s(_)).getStyleOverrides(),[]),[n,i]=(0,Uh.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[jh(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,Vu.jsxs)(Vu.Fragment,{children:[(0,Vu.jsx)("style",{ref:M0e(n,t)}),n.map((s,a)=>(0,Vu.jsx)("style",{children:s},a)),(0,Vu.jsx)(p$.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 Ml=(0,Uh.memo)(D0e);var Fi=l(w(),1),V0e=(0,W1.memo)(Hh),h5=2e3,F0e=[];function z0e({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=F0e}){e||(e=t);let[n,{height:i}]=(0,Ny.useResizeObserver)(),{styles:s}=(0,g$.useSelect)(d=>({styles:d(_).getSettings().styles}),[]),a=(0,W1.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,Fi.jsx)(b$.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>h5?h5*c:void 0,minHeight:o},children:(0,Fi.jsxs)(Nh,{contentRef:(0,Ny.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:h5,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,Fi.jsx)(Ml,{styles:a}),n,(0,Fi.jsx)(V0e,{renderAppender:!1})]})})}function k$(e){let[t,{width:o}]=(0,Ny.useResizeObserver)();return(0,Fi.jsxs)(Fi.Fragment,{children:[(0,Fi.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Fi.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Fi.jsx)(z0e,{...e,containerWidth:o})})]})}var Gh=l(P(),1),_$=l(y$(),1),S$=(0,_$.createQueue)();function x$({children:e,placeholder:t}){let[o,r]=(0,Gh.useState)(!1);return(0,Gh.useEffect)(()=>{let n={};return S$.add(n,()=>{(0,Gh.flushSync)(()=>{r(!0)})}),()=>{S$.cancel(n)}},[]),o?e:t}var im=l(w(),1),j0e=[];function U0e({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=j0e,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,g5.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,g5.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,b5.useSelect)(u=>u(_).getSettings(),[]),a=(0,nm.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,nm.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,im.jsx)(Ih,{value:c,settings:a,children:(0,im.jsx)(k$,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var w$=(0,nm.memo)(U0e);w$.Async=x$;var kn=w$;function C$({blocks:e,props:t={},layout:o}){let r=(0,b5.useSelect)(u=>u(_).getSettings(),[]),n=(0,nm.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,$1.useDisabled)(),s=(0,$1.useMergeRefs)([t.ref,i]),a=(0,nm.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,im.jsxs)(Ih,{value:a,settings:n,children:[(0,im.jsx)(Ml,{}),(0,im.jsx)(My,{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 Fu=l(w(),1);function H0e({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,Wh.isReusableBlock)(e),c=(0,B$.useMemo)(()=>s?(0,Wh.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,Wh.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,Fu.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,Fu.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,Fu.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,Fu.jsx)(kn,{blocks:c,viewportWidth:f,minHeight:u,additionalStyles:[{css:`
body {
padding: 24px;
min-height:${Math.round(h)}px;
display:flex;
align-items:center;
}
.is-root-container { width: 100%; }
`}]})}):(0,Fu.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,E$.__)("No preview available.")})}),!a&&(0,Fu.jsx)(ky,{title:o,icon:r,description:n})]})}var K1=H0e;var Qh=l(N(),1),Fl=l(P(),1),w5=l(Z(),1);var j$=l($(),1),U$=l(Z(),1);var Xh=l(P(),1),zu=l($(),1),F$=l(A(),1),Dy=l(it(),1);var N$=l(A(),1),M$=l(P(),1);var $h=l(P(),1),T$=l(N(),1),I$=l(Zo(),1),P$=l(w(),1);function G0e(e,t){let[o,r]=(0,$h.useState)(!1);return(0,$h.useEffect)(()=>{o&&(0,I$.speak)((0,T$.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,P$.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var k5=(0,$h.forwardRef)(G0e);var R$=l(P(),1),O$=l(A(),1),A$=l(w(),1);function W0e(e,t){return(0,A$.jsx)(O$.Composite.Group,{role:"presentation",ref:t,...e})}var v5=(0,R$.forwardRef)(W0e);var q1=l(A(),1),L$=l(P(),1),Y1=l(w(),1);function $0e({isFirst:e,as:t,children:o,...r},n){return(0,Y1.jsx)(q1.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,Y1.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,Y1.jsx)(q1.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var y5=(0,L$.forwardRef)($0e);var S5=l(w(),1);function K0e({key:e,children:t}){return(0,S5.jsx)(M$.Fragment,{children:t},e)}function Y0e({children:e}){return(0,S5.jsx)(N$.Composite,{focusShift:!0,focusWrap:"horizontal",render:K0e,children:e})}var Kh=Y0e;var D$=l(A(),1),X1=l($(),1),Q1=l(F(),1),V$=l(P(),1);var qh=l(N(),1),Yh=l(A(),1);var Os=l(w(),1);function Z1({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,qh.__)("Pattern");return(0,Os.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,Os.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,Os.jsxs)(Yh.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,Os.jsx)(Yh.FlexItem,{children:t?(0,Os.jsx)(Oe,{icon:t}):n||(0,qh.sprintf)((0,qh._n)("%d block","%d blocks",e),e)}),(0,Os.jsx)(Yh.FlexItem,{children:(0,Os.jsx)(Oe,{icon:Jk})}),r&&(0,Os.jsx)(Yh.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,Os.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var _5=l(w(),1),q0e=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,Q1.useSelect)(f=>i&&f(X1.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=M((0,Q1.useDispatch)(_)),u=(0,V$.useMemo)(()=>n?.type===Nt.user&&n?.syncStatus!=="unsynced"?[(0,X1.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,_5.jsx)(D$.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,_5.jsx)(Z1,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},Zh=q0e;var Dl=l(w(),1);function Z0e({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,Xh.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,Xh.useMemo)(()=>[(0,zu.createBlock)(o.name,o.initialAttributes,(0,zu.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,zu.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,zu.isTemplatePart)(o);return(0,Dl.jsx)(Zh,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:h})=>(0,Dl.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,Dl.jsxs)(y5,{isFirst:t,className:V("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:p=>{p.preventDefault(),r(o,(0,Dy.isAppleOS)()?p.metaKey:p.ctrlKey),n(null)},onKeyDown:p=>{let{keyCode:g}=p;g===Dy.ENTER&&(p.preventDefault(),r(o,(0,Dy.isAppleOS)()?p.metaKey:p.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,Dl.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,Dl.jsx)(Oe,{icon:o.icon,showColors:!0})}),(0,Dl.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,Dl.jsx)(F$.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var z$=(0,Xh.memo)(Z0e);var Vy=l(w(),1);function X0e(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 H$({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,U$.useInstanceId)(H$,s);return(0,Vy.jsxs)(k5,{className:s,"aria-label":n,children:[X0e(e,3).map((c,u)=>(0,Vy.jsx)(v5,{children:c.map((d,f)=>(0,Vy.jsx)(z$,{item:d,className:(0,j$.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var sm=H$;var G$=l(A(),1),Vl=l(w(),1);function Q0e({title:e,icon:t,children:o}){return(0,Vl.jsxs)(Vl.Fragment,{children:[(0,Vl.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,Vl.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,Vl.jsx)(G$.Icon,{icon:t})]}),(0,Vl.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var ju=Q0e;var W$=l(N(),1),x5=l(w(),1);function J0e(){return(0,x5.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,x5.jsx)("p",{children:(0,W$.__)("No results found.")})})}var As=J0e;var zo=l(w(),1),exe=e=>e.name.split("/")[0],txe=6,oxe=[];function $$({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,Fl.useMemo)(()=>fa(e,"frecency","desc").slice(0,txe),[e]),c=(0,Fl.useMemo)(()=>e.filter(p=>!p.category),[e]),u=(0,Fl.useMemo)(()=>{let p={...t};return Object.keys(t).forEach(g=>{p[g]=e.filter(b=>exe(b)===g),p[g].length===0&&delete p[g]}),p},[e,t]);(0,Fl.useEffect)(()=>()=>n(null),[]);let d=(0,w5.useAsyncList)(o),f=o.length===d.length,m=(0,Fl.useMemo)(()=>Object.entries(t),[t]),h=(0,w5.useAsyncList)(f?m:oxe);return(0,zo.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,zo.jsx)(ju,{title:(0,Qh._x)("Most used","blocks"),children:(0,zo.jsx)(sm,{items:a,onSelect:r,onHover:n,label:(0,Qh._x)("Most used","blocks")})}),d.map(p=>{let g=e.filter(b=>b.category===p.slug);return!g||!g.length?null:(0,zo.jsx)(ju,{title:p.title,icon:p.icon,children:(0,zo.jsx)(sm,{items:g,onSelect:r,onHover:n,label:p.title})},p.slug)}),f&&c.length>0&&(0,zo.jsx)(ju,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Qh.__)("Uncategorized"),children:(0,zo.jsx)(sm,{items:c,onSelect:r,onHover:n,label:(0,Qh.__)("Uncategorized")})}),h.map(([p,g])=>{let b=u[p];return!b||!b.length?null:(0,zo.jsx)(ju,{title:g.title,icon:g.icon,children:(0,zo.jsx)(sm,{items:b,onSelect:r,onHover:n,label:g.title})},p)})]})}function rxe({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=hu(e,t);if(!i.length)return(0,zo.jsx)(As,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,zo.jsx)(Kh,{children:(0,zo.jsxs)("div",{ref:n,children:[!!u.length&&(0,zo.jsx)(zo.Fragment,{children:(0,zo.jsx)($$,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,zo.jsx)($$,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var K$=(0,Fl.forwardRef)(rxe);var pK=l(P(),1),hK=l(Z(),1),gK=l(A(),1),bK=l(N(),1);var lK=l(A(),1),P5=l(P(),1),cK=l(N(),1);var J1=l(A(),1),C5=l(N(),1),zl=l(w(),1);function nxe({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,zl.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,zl.jsx)(J1.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function ixe({searchValue:e,setSearchValue:t}){return(0,zl.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,zl.jsx)(J1.SearchControl,{onChange:t,value:e,label:(0,C5.__)("Search"),placeholder:(0,C5.__)("Search")})})}function sxe({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,zl.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,zl.jsx)(ixe,{searchValue:r,setSearchValue:n}),!r&&(0,zl.jsx)(nxe,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var Y$=sxe;var Ul=l(P(),1),og=l(N(),1),rK=l(Z(),1),nK=l(A(),1),iK=l(Zo(),1);var q$=l($(),1),wa=l(P(),1),jl=l(A(),1),Z$=l(Z(),1),X$=l(N(),1);var vn=l(A(),1),zi=l(N(),1),wr=l(w(),1);function eB({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,wr.jsxs)(vn.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,wr.jsx)(vn.__experimentalText,{variant:"muted",children:(0,zi.sprintf)((0,zi._n)("%s item","%s items",r),r)}),t>1&&(0,wr.jsxs)(vn.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,wr.jsxs)(vn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,wr.jsx)(vn.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,zi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,wr.jsx)("span",{children:"\xAB"})}),(0,wr.jsx)(vn.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,zi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,wr.jsx)("span",{children:"\u2039"})})]}),(0,wr.jsx)(vn.__experimentalText,{variant:"muted",children:(0,zi.sprintf)((0,zi._x)("%1$s of %2$s","paging"),e,t)}),(0,wr.jsxs)(vn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,wr.jsx)(vn.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,zi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,wr.jsx)("span",{children:"\u203A"})}),(0,wr.jsx)(vn.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,zi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,wr.jsx)("span",{children:"\xBB"})})]})]})]})}var $t=l(w(),1),axe=({showTooltip:e,title:t,children:o})=>e?(0,$t.jsx)(jl.Tooltip,{text:t,children:o}):(0,$t.jsx)($t.Fragment,{children:o});function Q$({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,wa.useState)(!1),{blocks:d,viewportWidth:f}=o,h=`block-editor-block-patterns-list__item-description-${(0,Z$.useInstanceId)(Q$)}`,p=o.type===Nt.user,g=(0,wa.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let v=(0,q$.cloneBlock)(b);return v.attributes.metadata?.categories?.includes(s)&&(v.attributes.metadata.categories=[s]),v}),[d,t,s]);return(0,$t.jsx)(Zh,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,$t.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,$t.jsx)(axe,{showTooltip:i&&!p,title:o.title,children:(0,$t.jsxs)(jl.Composite.Item,{render:(0,$t.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===Nt.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,$t.jsx)(kn.Async,{placeholder:(0,$t.jsx)(lxe,{}),children:(0,$t.jsx)(kn,{blocks:d,viewportWidth:f})}),(!i||p)&&(0,$t.jsxs)(jl.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[p&&!o.syncStatus&&(0,$t.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,$t.jsx)(xe,{className:"block-editor-patterns__pattern-icon",icon:Ci})}),(0,$t.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,$t.jsx)(jl.VisuallyHidden,{id:h,children:o.description})]})})})})}function lxe(){return(0,$t.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function cxe({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,X$.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,wa.useState)(void 0),[m,h]=(0,wa.useState)(null);(0,wa.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let p=(g,b)=>{h(g.name),r(g,b)};return(0,$t.jsxs)(jl.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,$t.jsx)(Q$,{id:g.name,pattern:g,onClick:p,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,$t.jsx)(eB,{...c})]})}var Ca=(0,wa.forwardRef)(cxe);var am=l(F(),1),eK=l($(),1),tB=l(N(),1),tK=l(Zo(),1),B5=l(P(),1);function J$({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(_).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(_).getBlockIndex(n[i+1])+1:r.select(_).getBlockOrder(o).length}function uxe({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,am.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=M((0,am.useSelect)(_)),{destinationRootClientId:f,destinationIndex:m}=(0,am.useSelect)(S=>{let{getSelectedBlockClientId:x,getBlockRootClientId:C,getBlockIndex:B,getBlockOrder:I,getInsertionPoint:O}=M(S(_)),E=x(),L=e,T,R=O();return t!==void 0?T=t:R&&R.hasOwnProperty("index")?(L=R?.rootClientId?R.rootClientId:e,T=R.index):o?T=B(o):!r&&E?(L=C(E),T=B(E)+1):T=I(L).length,{destinationRootClientId:L,destinationIndex:T}},[e,t,o,r]),{replaceBlocks:h,insertBlocks:p,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:v}=M((0,am.useDispatch)(_)),k=(0,B5.useCallback)((S,x,C=!1,B)=>{(C||i||s)&&v(null);let I=c();!r&&I&&(0,eK.isUnmodifiedDefaultBlock)(I,"content")?h(I.clientId,S,null,i||C?0:null,x):p(S,r||B===void 0?m:J$({destinationRootClientId:f,destinationIndex:m,rootClientId:B,registry:a}),r||B===void 0?f:B,s,i||C?0:null,x);let O=Array.isArray(S)?S.length:1,E=(0,tB.sprintf)((0,tB._n)("%d block added.","%d blocks added.",O),O);(0,tK.speak)(E),n&&n(S)},[r,c,h,p,f,m,n,i,s,v,a]),y=(0,B5.useCallback)(S=>{if(S&&!d()){let x=u(S.name,f);x!==null&&g(x,J$({destinationRootClientId:f,destinationIndex:m,rootClientId:x,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,k,y]}var Uu=uxe;var Jh=l(P(),1),oB=l($(),1),eg=l(F(),1),rB=l(N(),1),oK=l(Ti(),1);var dxe=(e,t,o,r)=>{let n=(0,Jh.useMemo)(()=>({[au]:!!r}),[r]),i=(0,eg.useSelect)(p=>{let{getSettings:g}=M(p(_));return g()[y0]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:c}=(0,eg.useSelect)(p=>{let{getSettings:g,__experimentalGetAllowedPatterns:b}=M(p(_)),{__experimentalUserPatternCategories:v,__experimentalBlockPatternCategories:k}=g();return{patterns:b(t,n),userPatternCategories:v,patternCategories:k}},[t,n]),u=(0,Jh.useMemo)(()=>a.filter(p=>!(p.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=M((0,eg.useSelect)(_)),f=(0,Jh.useMemo)(()=>{let p=[...s];return c?.forEach(g=>{p.find(b=>b.name===g.name)||p.push(g)}),p},[s,c]),{createSuccessNotice:m}=(0,eg.useDispatch)(oK.store),h=(0,Jh.useCallback)((p,g)=>{let b=r?t:d(p,t);if(b===null)return;let v=p.type===Nt.user&&p.syncStatus!=="unsynced"?[(0,oB.createBlock)("core/block",{ref:p.id})]:g;e((v??[]).map(k=>{let y=(0,oB.cloneBlock)(k);return y.attributes.metadata?.categories?.includes(o)&&(y.attributes.metadata.categories=[o]),y}),p.name,!1,b),m((0,rB.sprintf)((0,rB.__)('Block pattern "%s" inserted.'),p.title),{type:"snackbar",id:"inserter-notice"})},[m,e,o,t,d,r]);return[u,f,h]},Hu=dxe;var tg=l(P(),1),E5=l(Z(),1),T5=l(Fe(),1),nB=20;function iB(e,t,o,r=""){let[n,i]=(0,tg.useState)(1),s=(0,E5.usePrevious)(t),a=(0,E5.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,tg.useMemo)(()=>e.slice(u*nB,u*nB+nB),[u,e]),f=Math.ceil(e.length/nB),m=h=>{(0,T5.getScrollContainer)(o?.current)?.scrollTo(0,0),i(h)};return(0,tg.useEffect)(function(){(0,T5.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var Ls=l(w(),1);function fxe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,Ls.jsx)(nK.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,og.sprintf)((0,og._n)("%d pattern found","%d patterns found",t),t)}):null}function mxe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,Ul.useRef)(),s=(0,rK.useDebounce)(iK.speak,500),[a,c]=Uu({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=Hu(c,a,t),f=(0,Ul.useMemo)(()=>o.map(v=>v.name),[o]),m=(0,Ul.useMemo)(()=>{let v=u.filter(k=>{if(t===Mf.name||t===_l.name&&k.type===Nt.user||t===Yp.name&&k.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let y=k.categories?.some(S=>f.includes(S))??!1;return!k.categories?.length||!y}return k.categories?.includes(t)});return e?Vv(v,e):v},[e,u,t,f]);(0,Ul.useEffect)(()=>{if(!e)return;let v=m.length,k=(0,og.sprintf)((0,og._n)("%d result found.","%d results found.",v),v);s(k)},[e,s,m.length]);let h=iB(m,t,i),[p,g]=(0,Ul.useState)(e);e!==p&&(g(e),h.changePage(1));let b=!!m?.length;return(0,Ls.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,Ls.jsx)(fxe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,Ls.jsx)(Kh,{children:b&&(0,Ls.jsxs)(Ls.Fragment,{children:[(0,Ls.jsx)(Ca,{blockPatterns:h.categoryPatterns,onClickPattern:(v,k)=>{d(v,k),n()},isDraggable:!1}),(0,Ls.jsx)(eB,{...h})]})})]})}var sK=mxe;var I5=l(P(),1),rg=l(N(),1),aK=l(Zo(),1);function pxe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function ng(e,t="all"){let[o,r]=Hu(void 0,e),n=(0,I5.useMemo)(()=>t==="all"?o:o.filter(s=>!ww(s,t)),[t,o]);return(0,I5.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=>!pxe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,rg._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(Yp),n.some(a=>a.type===Nt.user)&&s.unshift(_l),n.length>0&&s.unshift({name:Mf.name,label:Mf.label}),(0,aK.speak)((0,rg.sprintf)((0,rg._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var lm=l(w(),1);function hxe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,P5.useState)(""),[i,s]=(0,P5.useState)(e?.name),a=ng(t);return(0,lm.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,lm.jsx)(Y$,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,lm.jsx)(sK,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function gxe({onModalClose:e,...t}){return(0,lm.jsx)(lK.Modal,{title:(0,cK.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,lm.jsx)(hxe,{onModalClose:e,...t})})}var uK=gxe;var ig=l(N(),1),Dt=l(A(),1);var Qo=l(w(),1);function bxe({title:e}){return(0,Qo.jsx)(Dt.__experimentalVStack,{spacing:0,children:(0,Qo.jsx)(Dt.__experimentalView,{children:(0,Qo.jsx)(Dt.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Qo.jsxs)(Dt.__experimentalHStack,{spacing:2,children:[(0,Qo.jsx)(Dt.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,ig.isRTL)()?Vo:Nr,size:"small",label:(0,ig.__)("Back")}),(0,Qo.jsx)(Dt.__experimentalSpacer,{children:(0,Qo.jsx)(Dt.__experimentalHeading,{level:5,children:e})})]})})})})}function sB({categories:e,children:t}){return(0,Qo.jsxs)(Dt.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,Qo.jsx)(Dt.Navigator.Screen,{path:"/",children:(0,Qo.jsx)(Dt.__experimentalItemGroup,{children:e.map(o=>(0,Qo.jsx)(Dt.Navigator.Button,{path:`/category/${o.name}`,as:Dt.__experimentalItem,isAction:!0,children:(0,Qo.jsxs)(Dt.__experimentalHStack,{children:[(0,Qo.jsx)(Dt.FlexBlock,{children:o.label}),(0,Qo.jsx)(xe,{icon:(0,ig.isRTL)()?Nr:Vo})]})},o.name))})}),e.map(o=>(0,Qo.jsxs)(Dt.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,Qo.jsx)(bxe,{title:(0,ig.__)("Back")}),t(o)]},o.name))]})}var ji=l(P(),1),R5=l(N(),1),Ns=l(A(),1);var Sn=l(A(),1),yn=l(N(),1);var aB=l(P(),1);var pr=l(w(),1),dK=e=>e!=="all"&&e!=="user",kxe=e=>e.name===_l.name,vxe=[{value:"all",label:(0,yn._x)("All","patterns")},{value:Nt.directory,label:(0,yn.__)("Pattern Directory")},{value:Nt.theme,label:(0,yn.__)("Theme & Plugins")},{value:Nt.user,label:(0,yn.__)("User")}];function fK({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===_l.name?Nt.user:r,a=dK(s),c=kxe(i),u=(0,aB.useMemo)(()=>[{value:"all",label:(0,yn._x)("All","patterns")},{value:Bv.full,label:(0,yn._x)("Synced","patterns"),disabled:a},{value:Bv.unsynced,label:(0,yn._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),dK(f)&&e("all")}return(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsx)(Sn.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,yn.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,pr.jsx)(xe,{icon:(0,pr.jsx)(Sn.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsx)(Sn.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,pr.jsxs)(pr.Fragment,{children:[!c&&(0,pr.jsx)(Sn.MenuGroup,{label:(0,yn.__)("Source"),children:(0,pr.jsx)(Sn.MenuItemsChoice,{choices:vxe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,pr.jsx)(Sn.MenuGroup,{label:(0,yn.__)("Type"),children:(0,pr.jsx)(Sn.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,pr.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,aB.createInterpolateElement)((0,yn.__)("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,pr.jsx)(Sn.ExternalLink,{href:(0,yn.__)("https://wordpress.org/patterns/")})})})]})})})}var Wr=l(w(),1),yxe=()=>{};function lB({rootClientId:e,onInsert:t,onHover:o=yxe,category:r,showTitlesAsTooltip:n}){let[i,,s]=Hu(t,e,r?.name),[a,c]=(0,ji.useState)("all"),[u,d]=(0,ji.useState)("all"),f=ng(e,u),m=(0,ji.useRef)(),h=(0,ji.useMemo)(()=>i.filter(k=>ww(k,u,a)?!1:r.name===Mf.name||r.name===_l.name&&k.type===Nt.user||r.name===Yp.name&&k.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?k.categories?!k.categories.some(y=>f.some(S=>S.name===y)):!0:k.categories?.includes(r.name)),[i,f,r.name,u,a]),p=iB(h,r,m),{changePage:g}=p;(0,ji.useEffect)(()=>()=>o(null),[]);let b=(0,ji.useCallback)(k=>{c(k),g(1)},[c,g]),v=(0,ji.useCallback)(k=>{d(k),g(1)},[d,g]);return(0,Wr.jsxs)(Wr.Fragment,{children:[(0,Wr.jsxs)(Ns.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,Wr.jsxs)(Ns.__experimentalHStack,{children:[(0,Wr.jsx)(Ns.FlexBlock,{children:(0,Wr.jsx)(Ns.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,Wr.jsx)(fK,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:v,scrollContainerRef:m,category:r})]}),!h.length&&(0,Wr.jsx)(Ns.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,R5.__)("No results found")})]}),h.length>0&&(0,Wr.jsxs)(Wr.Fragment,{children:[(0,Wr.jsx)(Ns.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,R5.__)("Drag and drop patterns into the canvas.")}),(0,Wr.jsx)(Ca,{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 uB=l(Z(),1),dB=l(A(),1),mK=l(P(),1);var cm=l(w(),1),{Tabs:cB}=M(dB.privateApis);function Sxe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,uB.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,uB.usePrevious)(t),c=t?t.name:null,[u,d]=(0,mK.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,cm.jsxs)(cB,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(h=>h.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,cm.jsx)(cB.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,cm.jsx)(cB.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,cm.jsx)(cB.TabPanel,{tabId:m.name,focusable:!1,children:(0,cm.jsx)(dB.__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 fB=Sxe;var Wn=l(w(),1);function _xe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,pK.useState)(!1),a=ng(r),c=(0,hK.useViewportMatch)("medium","<");return a.length?(0,Wn.jsxs)(Wn.Fragment,{children:[!c&&(0,Wn.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,Wn.jsx)(fB,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,Wn.jsx)(gK.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,bK.__)("Explore all patterns")})]}),c&&(0,Wn.jsx)(sB,{categories:a,children:u=>(0,Wn.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,Wn.jsx)(lB,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,Wn.jsx)(uK,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,Wn.jsx)(As,{})}var kK=_xe;var NK=l(N(),1),MK=l(Z(),1),DK=l(A(),1),hB=l(P(),1);var pB=l(A(),1),RK=l(N(),1),OK=l(Z(),1);var BK=l(A(),1),EK=l(N(),1);var Vt=l(A(),1),$n=l(N(),1),Ba=l(P(),1),A5=l($(),1);var Fy=l(F(),1),_K=l(Ti(),1),xK=l(O5(),1),wK=l(un(),1);var yK=l($(),1),SK=l(w(),1),xxe={image:"img",video:"video",audio:"audio"};function mB(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=xxe[t],s=(0,SK.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,yK.createBlock)(`core/${t}`,o),s]}var st=l(w(),1),wxe=["image"],Cxe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function Bxe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,st.jsx)(Vt.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,$n.__)("Options"),popoverProps:Cxe,icon:ks,children:()=>(0,st.jsx)(Vt.MenuGroup,{children:(0,st.jsx)(Vt.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:mA,children:(0,$n.sprintf)((0,$n.__)("Report %s"),e.mediaType)})})})}function Exe({onClose:e,onSubmit:t}){return(0,st.jsxs)(Vt.Modal,{title:(0,$n.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,st.jsxs)(Vt.__experimentalVStack,{spacing:3,children:[(0,st.jsx)("p",{children:(0,$n.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,st.jsx)("p",{children:(0,$n.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,st.jsxs)(Vt.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,st.jsx)(Vt.FlexItem,{children:(0,st.jsx)(Vt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,$n.__)("Cancel")})}),(0,st.jsx)(Vt.FlexItem,{children:(0,st.jsx)(Vt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,$n.__)("Insert")})})]})]})}function CK({media:e,onClick:t,category:o}){let[r,n]=(0,Ba.useState)(!1),[i,s]=(0,Ba.useState)(!1),[a,c]=(0,Ba.useState)(!1),[u,d]=(0,Ba.useMemo)(()=>mB(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,Fy.useDispatch)(_K.store),{getSettings:h,getBlock:p}=(0,Fy.useSelect)(_),{updateBlockAttributes:g}=(0,Fy.useDispatch)(_),b=(0,Ba.useCallback)(S=>{if(a)return;let x=h(),C=(0,A5.cloneBlock)(S),{id:B,url:I,caption:O}=C.attributes;if(!B&&!x.mediaUpload){n(!0);return}if(B){t(C);return}c(!0),window.fetch(I).then(E=>E.blob()).then(E=>{let L=(0,wK.getFilename)(I)||"image.jpg",T=new File([E],L,{type:E.type});x.mediaUpload({filesList:[T],additionalData:{caption:O},onFileChange([R]){(0,xK.isBlobURL)(R.url)||(p(C.clientId)?g(C.clientId,{...C.attributes,id:R.id,url:R.url}):(t({...C,attributes:{...C.attributes,id:R.id,url:R.url}}),m((0,$n.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:wxe,onError(R){f(R,{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,$n.__)("no title"),k=(0,Ba.useCallback)(()=>s(!0),[]),y=(0,Ba.useCallback)(()=>s(!1),[]);return(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Zh,{isEnabled:!0,blocks:[u],children:({draggable:S,onDragStart:x,onDragEnd:C})=>(0,st.jsx)("div",{className:V("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:S,onDragStart:x,onDragEnd:C,children:(0,st.jsxs)("div",{onMouseEnter:k,onMouseLeave:y,children:[(0,st.jsx)(Vt.Tooltip,{text:v,children:(0,st.jsx)(Vt.Composite.Item,{render:(0,st.jsx)("div",{"aria-label":v,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,st.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,st.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,st.jsx)(Vt.Spinner,{})})]})})}),!a&&(0,st.jsx)(Bxe,{category:o,media:e})]})})}),r&&(0,st.jsx)(Exe,{onClose:()=>n(!1),onSubmit:()=>{t((0,A5.cloneBlock)(u)),m((0,$n.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var L5=l(w(),1);function Txe({mediaList:e,category:t,onClick:o,label:r=(0,EK.__)("Media List")}){return(0,L5.jsx)(BK.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,L5.jsx)(CK,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var TK=Txe;var Hl=l(P(),1),N5=l(F(),1);function IK(e,t={}){let[o,r]=(0,Hl.useState)(),[n,i]=(0,Hl.useState)(!1),s=(0,Hl.useRef)();return(0,Hl.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 PK(e){let[t,o]=(0,Hl.useState)([]),r=(0,N5.useSelect)(a=>M(a(_)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,N5.useSelect)(a=>{let{canInsertBlockType:c}=a(_);return{canInsertImage:c("core/image",e),canInsertVideo:c("core/video",e),canInsertAudio:c("core/audio",e)}},[e]);return(0,Hl.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 Gu=l(w(),1),Ixe=10;function zy({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,OK.useDebouncedInput)(),{mediaList:s,isLoading:a}=IK(o,{per_page:i?20:Ixe,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,RK.__)("Search");return(0,Gu.jsxs)("div",{className:c,children:[(0,Gu.jsx)(pB.SearchControl,{className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,Gu.jsx)("div",{className:`${c}-spinner`,children:(0,Gu.jsx)(pB.Spinner,{})}),!a&&!s?.length&&(0,Gu.jsx)(As,{}),!a&&!!s?.length&&(0,Gu.jsx)(TK,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var AK=l(F(),1);function Pxe({fallback:e=null,children:t}){return(0,AK.useSelect)(r=>{let{getSettings:n}=r(_);return!!n().mediaUpload},[])?t:e}var Ms=Pxe;var LK=l(A(),1),Rxe=()=>null,Wu=(0,LK.withFilters)("editor.MediaUpload")(Rxe);var Kn=l(w(),1),Oxe=["image","video","audio"];function Axe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=PK(e),s=(0,MK.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,hB.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=mB(d,f);r(m)},[r]),u=(0,hB.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,Kn.jsxs)(Kn.Fragment,{children:[!s&&(0,Kn.jsxs)("div",{className:`${a}-container`,children:[(0,Kn.jsx)(fB,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,Kn.jsx)(Ms,{children:(0,Kn.jsx)(Wu,{multiple:!1,onSelect:c,allowedTypes:Oxe,render:({open:d})=>(0,Kn.jsx)(DK.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,NK.__)("Open Media Library")})})})]}),s&&(0,Kn.jsx)(sB,{categories:u,children:d=>(0,Kn.jsx)(zy,{onInsert:r,rootClientId:e,category:d})})]}):(0,Kn.jsx)(As,{})}var M5=Axe;var jy=l(P(),1),$u=l(N(),1),D5=l(A(),1),bB=l(Z(),1),zK=l(Zo(),1),jK=l(F(),1);var VK=l(A(),1),{Fill:FK,Slot:Lxe}=(0,VK.createSlotFill)("__unstableInserterMenuExtension");FK.Slot=Lxe;var gB=FK;var _n=l(w(),1),Nxe=9,Mxe=[];function Dxe({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,bB.useDebounce)(zK.speak,500),{prioritizedBlocks:v}=(0,jK.useSelect)(z=>({prioritizedBlocks:z(_).getBlockListSettings(n)?.prioritizedInserterBlocks||Mxe}),[n]),[k,y]=Uu({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:p}),[S,x,C,B]=hu(k,y,g),[I,,O]=Hu(y,k,void 0,g),E=(0,jy.useMemo)(()=>{if(c===0)return[];let z=Vv(I,e);return c!==void 0?z.slice(0,c):z},[e,I,c]),L=u;h&&E.length>2&&(L=0);let T=(0,jy.useMemo)(()=>{if(L===0)return[];let z=S.filter(te=>te.name!=="core/block"),H=fa(z,"frecency","desc");!e&&v.length&&(H=Kw(H,v));let W=Gw(H,x,C,e);return L!==void 0?W.slice(0,L):W},[e,S,x,C,L,v]);(0,jy.useEffect)(()=>{if(!e)return;let z=T.length+E.length,H=(0,$u.sprintf)((0,$u._n)("%d result found.","%d results found.",z),z);b(H)},[e,b,T,E]);let R=(0,bB.useAsyncList)(T,{step:Nxe}),D=T.length>0||E.length>0,j=!!T.length&&(0,_n.jsx)(ju,{title:(0,_n.jsx)(D5.VisuallyHidden,{children:(0,$u.__)("Blocks")}),children:(0,_n.jsx)(sm,{items:R,onSelect:B,onHover:o,label:(0,$u.__)("Blocks"),isDraggable:f})}),G=!!E.length&&(0,_n.jsx)(ju,{title:(0,_n.jsx)(D5.VisuallyHidden,{children:(0,$u.__)("Block patterns")}),children:(0,_n.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,_n.jsx)(Ca,{blockPatterns:E,onClickPattern:O,onHover:r,isDraggable:f})})});return(0,_n.jsxs)(Kh,{children:[!d&&!D&&(0,_n.jsx)(As,{}),h?G:j,!!T.length&&!!E.length&&(0,_n.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?j:G,d&&(0,_n.jsx)(gB.Slot,{fillProps:{onSelect:B,onHover:o,filterValue:e,hasItems:D,rootClientId:k},children:z=>z.length?z:D?null:(0,_n.jsx)(As,{})})]})}var kB=Dxe;var yB=l(A(),1),UK=l(P(),1);var Gl=l(w(),1),{Tabs:vB}=M(yB.privateApis);function Vxe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,Gl.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,Gl.jsxs)(vB,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,Gl.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,Gl.jsx)(yB.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:Sf,label:i,onClick:()=>t(),size:"compact"}),(0,Gl.jsx)(vB.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,Gl.jsx)(vB.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,Gl.jsx)(vB.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var SB=(0,UK.forwardRef)(Vxe);var _B=l(F(),1),sg=l(P(),1);function Uy(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=M((0,_B.useDispatch)(_)),{isZoomedOut:r,isZoomOut:n}=(0,_B.useSelect)(a=>{let{isZoomOut:c}=M(a(_));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,sg.useRef)(!1),s=(0,sg.useRef)(e);(0,sg.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,sg.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Ze=l(w(),1),GK=()=>{};function Fxe({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,HK.useSelect)(he=>{let{isZoomOut:we,getSectionRootClientId:De}=M(he(_));return{isZoomOutMode:we(),hasSectionRootClientId:!!De()}},[]),[b,v,k]=(0,Hy.useDebouncedInput)(a),[y,S]=(0,Ft.useState)(null),[x,C]=(0,Ft.useState)(m),[B,I]=(0,Ft.useState)("all"),[O,E]=(0,Ft.useState)(null),L=(0,Hy.useViewportMatch)("large"),R=(0,Hy.useViewportMatch)("medium","<")?d:GK;function D(){return f||(p?"patterns":"blocks")}let[j,G]=(0,Ft.useState)(D());Uy(g&&(j==="patterns"||j==="media")&&L);let[H,W,te]=Uu({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),ne=(0,Ft.useRef)(),ae=(0,Ft.useCallback)((he,we,De,ct)=>{W(he,we,De,ct),n(he),R(),window.requestAnimationFrame(()=>{!c&&!ne.current?.contains(h.current.ownerDocument.activeElement)&&ne.current?.querySelector("button").focus()})},[W,R,n,h,c]),X=(0,Ft.useCallback)((he,we,...De)=>{te(!1),W(he,{patternName:we},...De),n(),R()},[W,R,n,te]),ee=(0,Ft.useCallback)(he=>{te(he),S(he)},[te,S]),le=(0,Ft.useCallback)((he,we)=>{C(he),I(we),u?.()},[C,u]),Q=j==="patterns"&&!k&&!!x,J=j==="media"&&!!O,q=(0,Ft.useMemo)(()=>j==="media"?null:(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ag.SearchControl,{className:"block-editor-inserter__search",onChange:he=>{y&&S(null),v(he)},value:b,label:(0,Ku.__)("Search"),placeholder:(0,Ku.__)("Search")}),!!k&&(0,Ze.jsx)(kB,{filterValue:k,onSelect:n,onHover:ee,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:j==="patterns"})]}),[j,y,S,v,b,k,n,ee,c,t,e,r,o]),U=(0,Ft.useMemo)(()=>(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Ze.jsx)(K$,{ref:ne,rootClientId:H,onInsert:ae,onHover:ee,showMostUsedBlocks:s})}),i&&(0,Ze.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Ze.jsx)(ag.VisuallyHidden,{as:"h2",children:(0,Ku.__)("A tip for using the block editor")}),(0,Ze.jsx)(u9,{})]})]}),[H,ae,ee,s,i]),K=(0,Ft.useMemo)(()=>(0,Ze.jsx)(kK,{rootClientId:H,onInsert:X,onSelectCategory:le,selectedCategory:x,children:Q&&(0,Ze.jsx)(lB,{rootClientId:H,onInsert:X,category:x,patternFilter:B,showTitlesAsTooltip:!0})}),[H,X,le,B,x,Q]),se=(0,Ft.useMemo)(()=>(0,Ze.jsx)(M5,{rootClientId:H,selectedCategory:O,onSelectCategory:E,onInsert:ae,children:J&&(0,Ze.jsx)(zy,{rootClientId:H,onInsert:ae,category:O})}),[H,ae,O,E,J]),ce=he=>{he!=="patterns"&&C(null),G(he)},Se=(0,Ft.useRef)();return(0,Ft.useLayoutEffect)(()=>{Se.current&&window.requestAnimationFrame(()=>{Se.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Ze.jsxs)("div",{className:V("block-editor-inserter__menu",{"show-panel":Q||J,"is-zoom-out":p}),ref:h,children:[(0,Ze.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Ze.jsx)(SB,{ref:Se,onSelect:ce,onClose:d,selectedTab:j,closeButtonLabel:(0,Ku.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,Ku.__)("Blocks"),panel:(0,Ze.jsxs)(Ze.Fragment,{children:[q,j==="blocks"&&!k&&U]})},{name:"patterns",title:(0,Ku.__)("Patterns"),panel:(0,Ze.jsxs)(Ze.Fragment,{children:[q,j==="patterns"&&!k&&K]})},{name:"media",title:(0,Ku.__)("Media"),panel:(0,Ze.jsxs)(Ze.Fragment,{children:[q,se]})}]})}),i&&y&&(0,Ze.jsx)(ag.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Ze.jsx)(K1,{item:y})})]})}var V5=(0,Ft.forwardRef)(Fxe);function zxe(e,t){return(0,Ze.jsx)(V5,{...e,onPatternCategorySelection:GK,ref:t})}var WK=(0,Ft.forwardRef)(zxe);var xB=l(P(),1),Gy=l(N(),1),wB=l(A(),1),$K=l(F(),1);var um=l(w(),1),jxe=6,Uxe=6,Hxe=2;function CB({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,xB.useState)(""),[c,u]=Uu({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=hu(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,$K.useSelect)(g=>{let{getSettings:b,getBlockIndex:v,getBlockCount:k}=g(_),y=b(),S=v(o),x=k();return{setInserterIsOpened:y.__experimentalSetIsInserterOpened,insertionIndex:S===-1?x:S}},[o]),h=i&&d.length>jxe;(0,xB.useEffect)(()=>{f&&f(!1)},[f]);let p=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,um.jsxs)("div",{className:V("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":f}),children:[h&&(0,um.jsx)(wB.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,Gy.__)("Search"),placeholder:(0,Gy.__)("Search")}),(0,um.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,um.jsx)(kB,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?Hxe:0,maxBlockTypes:Uxe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,um.jsx)(wB.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:p,"aria-label":(0,Gy.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,Gy.__)("Browse all")})]})}var Gxe=50;function KK(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<Gxe&&o.length>0?o:null}var Wy=l(w(),1),Wxe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}})=>{let{as:a=BB.Button,label:c,onClick:u,...d}=s,f=c;!f&&i?f=i:!f&&n?f=(0,Wl.sprintf)((0,Wl._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):f||(f=(0,Wl._x)("Add block","Generic label for block inserter button"));function m(h){e&&e(h),u&&u(h)}return(0,Wy.jsx)(a,{__next40pxDefaultSize:s.as?void 0:!0,icon:wi,label:f,tooltipPosition:"bottom",onClick:m,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...d})},$xe=class extends qK.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=Wxe}=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,Wy.jsx)(CB,{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,Wy.jsx)(WK,{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,Wy.jsx)(BB.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,Wl.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},Ui=(0,TB.compose)([(0,EB.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(_),{getBlockVariations:c,getBlockType:u}=e($y.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=KK(f,p);return{hasItems:i(o),hasSingleBlockType:m,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:f,appenderLabel:g,rootClientId:o}}),(0,EB.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(_);if(!b||!n&&!r)return{};let y={},S={};if(n){let x=v(n),C=v(k(n));x?.name===C?.name&&(S=C?.attributes||{})}else{let x=v(r);if(x?.innerBlocks?.length){let C=x.innerBlocks[x.innerBlocks.length-1];c&&c?.name===C.name&&(S=C.attributes)}}return b.forEach(x=>{S.hasOwnProperty(x)&&(y[x]=S[x])}),y}function m(){let{getBlockIndex:b,getBlockSelectionEnd:v,getBlockOrder:k,getBlockRootClientId:y}=o(_);if(n)return b(n);let S=v();return!i&&S&&y(S)===r?b(S)+1:k(r).length}let{insertBlock:h}=e(_),p;if(c){let b=f(c.attributesToCopy);p=(0,$y.createBlock)(c.name,{...c.attributes||{},...b})}else p=(0,$y.createBlock)(a.name);h(p,m(),r,d),u&&u(p);let g=(0,Wl.sprintf)((0,Wl.__)("%s block added"),a.title);(0,YK.speak)(g)}})),(0,TB.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])($xe);var Ky=l(w(),1),Kxe="\uFEFF";function lg({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,IB.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:h}=u(_),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,IB.useDispatch)(_);if(o||n)return null;let a=(0,ZK.decodeEntities)(r)||(0,F5.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,Ky.jsxs)("div",{"data-root-client-id":e||"",className:V("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,Ky.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,F5.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(PB.ENTER===u.keyCode||PB.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:Kxe}),(0,Ky.jsx)(Ui,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var XK=l(A(),1),z5=l(P(),1),Yy=l(N(),1);var QK=l(Re(),1);var RB=l(w(),1);function JK({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,RB.jsx)(Ui,{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,Yy.sprintf)((0,Yy._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):h=(0,Yy._x)("Add block","Generic label for block inserter button"),(0,RB.jsx)(XK.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,RB.jsx)(xe,{icon:wi})})},isAppender:!0})}var eY=(0,z5.forwardRef)((e,t)=>((0,QK.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),JK(e,t))),Yu=(0,z5.forwardRef)(JK);var cg=l(w(),1);function Yxe({rootClientId:e}){return(0,j5.useSelect)(o=>o(_).canInsertBlockType((0,tY.getDefaultBlockName)(),e))?(0,cg.jsx)(lg,{rootClientId:e}):(0,cg.jsx)(Yu,{rootClientId:e,className:"block-list-appender__toggle"})}function oY({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,j5.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(_),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,cg.jsx)(r,{tabIndex:-1,className:V("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,cg.jsx)(t,{}):(0,cg.jsx)(Yxe,{rootClientId:e})})}var bY=l(Z(),1),Zy=l(F(),1),kY=l(P(),1),vY=l(N(),1);var ug=l(F(),1),Zu=l(P(),1),LB=l(A(),1),hY=l(Z(),1);var iY=l(F(),1),qu=l(P(),1),sY=l(A(),1),aY=l(N(),1);var nY=l(Z(),1),U5=l(Fe(),1),rY=new WeakMap;function qxe(e){let t=(0,nY.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=rY.get(u);d||(d=(0,U5.getScrollContainer)(u),rY.set(u,d));let f=(0,U5.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 dm=qxe;var H5=l(w(),1),Zxe=Number.MAX_SAFE_INTEGER;function Xxe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,qu.useReducer)(k=>(k+1)%Zxe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,iY.useSelect)(k=>{let{getBlockListSettings:y,getBlockRootClientId:S,isBlockVisible:x}=k(_),C=S(e??t);return{orientation:y(C)?.orientation||"vertical",rootClientId:C,isVisible:x(e)&&x(t)}},[e,t]),h=mt(e),p=mt(t),g=d==="vertical",b=(0,qu.useMemo)(()=>c<0||!h&&!p||!m?void 0:{contextElement:i==="group"?p||h:h||p,getBoundingClientRect(){let y=h?h.getBoundingClientRect():null,S=p?p.getBoundingClientRect():null,x=0,C=0,B=0,I=0;if(i==="group"){let O=S||y;C=O.top,B=0,I=O.bottom-O.top,x=s==="left"?O.left-2:O.right-2}else g?(C=y?y.bottom:S.top,B=y?y.width:S.width,I=S&&y?S.top-y.bottom:0,x=y?y.left:S.left):(C=y?y.top:S.top,I=y?y.height:S.height,(0,aY.isRTL)()?(x=S?S.right:y.left,B=y&&S?y.left-S.right:0):(x=y?y.right:S.left,B=y&&S?S.left-y.right:0),B=Math.max(B,0));return new window.DOMRect(x,C,B,I)}},[h,p,c,g,m,i,s]),v=dm(n);return(0,qu.useLayoutEffect)(()=>{if(!h)return;let k=new window.MutationObserver(u);return k.observe(h,{attributes:!0}),()=>{k.disconnect()}},[h]),(0,qu.useLayoutEffect)(()=>{if(!p)return;let k=new window.MutationObserver(u);return k.observe(p,{attributes:!0}),()=>{k.disconnect()}},[p]),(0,qu.useLayoutEffect)(()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",u),()=>{h.ownerDocument.defaultView?.removeEventListener("resize",u)}},[h]),!h&&!p||!m?null:(0,H5.jsx)(sY.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,H5.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var OB=Xxe;var dY=l(F(),1),fY=l(Z(),1),mY=l(A(),1);var Kl=l(P(),1);var lY=l(Z(),1),cY=l(A(),1),$l=l(P(),1);var G5=l(w(),1),Qxe=Number.MAX_SAFE_INTEGER;function Jxe({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=mt(e),u=mt(t??e),d=(0,lY.useMergeRefs)([a,dm(n)]),[f,m]=(0,$l.useReducer)(p=>(p+1)%Qxe,0);(0,$l.useLayoutEffect)(()=>{if(!c)return;let p=new window.MutationObserver(m);return p.observe(c,{attributes:!0}),()=>{p.disconnect()}},[c]);let h=(0,$l.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?gD(Sh(c),Sh(u)):Sh(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,G5.jsx)(cY.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 fm=(0,$l.forwardRef)(Jxe),ewe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,G5.jsx)(fm,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),uY=(0,$l.forwardRef)(ewe);var AB=l(w(),1);function twe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=mt(e);return(0,AB.jsx)(fm,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,AB.jsx)(owe,{selectedElement:a,additionalStyles:n,children:o}):o})}function owe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,Kl.useState)(e.offsetWidth),[i,s]=(0,Kl.useState)(e.offsetHeight);(0,Kl.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,Kl.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,AB.jsx)("div",{style:a,children:o})}var Hi=(0,Kl.forwardRef)(twe);var W5=l(w(),1),qy={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function rwe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,dY.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(_),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,fY.useReducedMotion)();return(0,W5.jsx)(Hi,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,W5.jsx)(mY.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?qy.show:qy.hide,animate:qy.show,exit:r?qy.show:qy.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var pY=rwe;var Yl=l(w(),1),dg=(0,Zu.createContext)();dg.displayName="InsertionPointOpenRefContext";function nwe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,ug.useDispatch)(_),s=(0,Zu.useContext)(dg),a=(0,Zu.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:h,isZoomOutMode:p}=(0,ug.useSelect)(O=>{let{getBlockOrder:E,getBlockListSettings:L,getBlockInsertionPoint:T,isBlockBeingDragged:R,getPreviousBlockClientId:D,getNextBlockClientId:j,getSettings:G,isZoomOut:z}=M(O(_)),H=T(),W=E(H.rootClientId);if(!W.length)return{};let te=W[H.index-1],ne=W[H.index];for(;R(te);)te=D(te);for(;R(ne);)ne=j(ne);let ae=G();return{previousClientId:te,nextClientId:ne,orientation:L(H.rootClientId)?.orientation||"vertical",rootClientId:H.rootClientId,isDistractionFree:ae.isDistractionFree,isInserterShown:H?.__unstableWithInserter,isZoomOutMode:z()}},[]),{getBlockEditingMode:g}=(0,ug.useSelect)(_),b=(0,hY.useReducedMotion)();function v(O){O.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function k(O){O.target===a.current&&!s.current&&i()}function y(O){O.target!==a.current&&(s.current=!0)}let S=(0,Zu.useCallback)(O=>{!O&&s.current&&(s.current=!1)},[s]),x={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 I=V("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,Yl.jsx)(OB,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,Yl.jsxs)(LB.__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(I,{"is-with-inserter":m}),onHoverEnd:k,children:[(0,Yl.jsx)(LB.__unstableMotion.div,{variants:x,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,Yl.jsx)(LB.__unstableMotion.div,{variants:C,className:V("block-editor-block-list__insertion-point-inserter"),children:(0,Yl.jsx)(Ui,{ref:S,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:O=>{s.current=O},onSelectOrClose:()=>{s.current=!1}})})]})})}function gY(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,ug.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(_),c=i();return{insertionPoint:c,isVisible:s(),isBlockListEmpty:a(c?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,Yl.jsx)(pY,{...e},`${t.rootClientId}-${t.index}`):(0,Yl.jsx)(nwe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function yY(){let e=(0,kY.useContext)(dg),t=(0,Zy.useSelect)(g=>{let b=g(_).getSettings();return b.isDistractionFree||b.isPreviewMode||M(g(_)).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,Zy.useSelect)(_)),{showInsertionPoint:h,hideInsertionPoint:p}=(0,Zy.useDispatch)(_);return(0,bY.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),S=y?.orientation||"vertical",x=!!y?.__experimentalCaptureToolbars,C=v.clientY,B=v.clientX,O=Array.from(v.target.children).find(R=>{let D=R.getBoundingClientRect();return R.classList.contains("wp-block")&&S==="vertical"&&D.top>C||R.classList.contains("wp-block")&&S==="horizontal"&&((0,vY.isRTL)()?D.right<B:D.left>B)});if(!O){p();return}if(!O.id&&(O=O.firstElementChild,!O)){p();return}let E=O.id.slice(6);if(!E||c(E)||m(E)||i().includes(E)&&S==="vertical"&&!x&&!s().hasFixedToolbar)return;let L=O.getBoundingClientRect();if(S==="horizontal"&&(v.clientY>L.bottom||v.clientY<L.top)||S==="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 NB=l(F(),1),SY=l(Z(),1);var _Y=l(w(),1);function mm(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,NB.useSelect)(_),{clearSelectedBlock:r}=(0,NB.useDispatch)(_),{clearBlockSelection:n}=e();return(0,SY.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 xY(e){return(0,_Y.jsx)("div",{ref:mm(),...e})}var GY=l(Z(),1),mg=l(P(),1),WY=l(F(),1),bm=l($(),1);var wY=l(w(),1);function CY({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Pe();return(0,wY.jsx)(Yu,{className:V({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var BY=l(w(),1);function EY(){let{clientId:e}=Pe();return(0,BY.jsx)(lg,{rootClientId:e})}var DB=l(P(),1),PY=l(F(),1),MB=l(Re(),1),RY=l(Xy(),1);var Qy=new WeakMap;function iwe(){let e;return t=>((e===void 0||!(0,RY.isShallowEqual)(e,t))&&(e=t),e)}function IY(e){let[t]=(0,DB.useState)(iwe);return t(e)}function OY(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,PY.useRegistry)(),h=IY(o),p=IY(r),g=c===void 0||t==="contentOnly"?t:c;(0,DB.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=xs(f?.type);b.orientation=v.getOrientation(f)}s!==void 0&&((0,MB.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,MB.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,MB.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),Qy.get(m)||Qy.set(m,{}),Qy.get(m)[e]=b,window.queueMicrotask(()=>{let v=Qy.get(m);if(Object.keys(v).length){let{updateBlockListSettings:k}=m.dispatch(_);k(v),Qy.set(m,{})}})},[e,h,p,g,n,i,s,a,u,d,f,m])}var $5=l(bf(),1),VB=l(P(),1),AY=l(F(),1),LY=l($(),1);function NY(e,t,o,r){let n=(0,AY.useRegistry)(),i=(0,VB.useRef)(null);(0,VB.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:c,isBlockSelected:u}=n.select(_),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(_);return window.queueMicrotask(()=>{if(s)return;let m=a(e),h=m.length===0||o==="all"||o==="contentOnly",p=!(0,$5.default)(t,i.current);if(!h||!p)return;i.current=t;let g=(0,LY.synchronizeBlocksWithTemplate)(m,t);(0,$5.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 MY=l($(),1),DY=l(F(),1);function VY(e){return(0,DY.useSelect)(t=>{let o=t(_).getBlock(e);if(!o)return;let r=t(MY.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 gm=l(F(),1),jB=l(P(),1),UB=l(Z(),1),UY=l(N(),1),fg=l($(),1);var K5=l(P(),1),Yn=l($(),1),pm=l(F(),1),FY=l(Fe(),1);function Y5(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch{return t}return t}function swe(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:h}=Y5(u);if(m==="inserter"){s();let p=h.map(g=>(0,Yn.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 awe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,Yn.findTransform)((0,Yn.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function lwe(e){return t=>{let o=(0,Yn.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function FB(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,pm.useSelect)(_),{getGroupingBlockName:m}=(0,pm.useSelect)(Yn.store),{insertBlocks:h,moveBlocksToPosition:p,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:v,removeBlocks:k}=(0,pm.useDispatch)(_),y=(0,pm.useRegistry)(),S=(0,K5.useCallback)((O,E=!0,L=0,T=[])=>{Array.isArray(O)||(O=[O]);let D=c(e)[t];if(r==="replace")v(D,O,void 0,L);else if(r==="group"){let j=f(D);n==="left"?O.push(j):O.unshift(j);let G=O.map(te=>(0,Yn.createBlock)(te.name,te.attributes,te.innerBlocks)),z=O.every(te=>te.name==="core/image"),H=i("core/gallery",e),W=(0,Yn.createBlock)(z&&H?"core/gallery":m(),{layout:{type:"flex",flexWrap:z&&H?null:"nowrap"}},G);v([D,...T],W,void 0,L)}else h(O,t,e,E,L)},[c,e,t,r,v,f,n,i,m,h]),x=(0,K5.useCallback)((O,E,L)=>{if(r==="replace"){let T=u(O),D=c(e)[t];y.batch(()=>{k(O,!1),v(D,T,void 0,0)})}else p(O,E,e,L)},[r,c,u,p,y,k,v,t,e]),C=swe(e,t,s,a,x,S,b,r,f),B=awe(e,d,g,i,S),I=lwe(S);return O=>{let E=(0,FY.getFilesFromDataTransfer)(O.dataTransfer),L=O.dataTransfer.getData("text/html");L?I(L):E.length?B(E):C(O)}}function cwe(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 hm(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=cwe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function zB(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function zY(e,t){return t.top<=e.y&&t.bottom>=e.y}var q5=30,uwe=120,dwe=120;function fwe(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]=hm(t,v,["top","bottom"]);if(v.height>uwe&&k<q5){if(y==="top")return[m,"before"];if(y==="bottom")return[m+1,"after"]}}let h=(0,UY.isRTL)();if(d&&f==="horizontal"){let v=d.getBoundingClientRect(),[k,y]=hm(t,v,["left","right"]);if(v.width>dwe&&k<q5){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:S})=>{let x=k();if(!x)return;let[C,B]=hm(t,x,n),[I,O]=hm(t,x,["left","right"]),E=zB(t,x);v&&E?C=0:o==="vertical"&&S!=="horizontal"&&(E&&I<q5||!E&&zY(t,x))&&(c=y,u=O),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 HB(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 jY(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function HY({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,gm.useRegistry)(),[i,s]=(0,jB.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,gm.useSelect)(fg.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:p,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:v,isGroupable:k,isZoomOut:y,getSectionRootClientId:S,getBlockParents:x}=M((0,gm.useSelect)(_)),{showInsertionPoint:C,hideInsertionPoint:B,startDragging:I,stopDragging:O}=M((0,gm.useDispatch)(_)),E=FB(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),L=(0,UB.useThrottle)((0,jB.useCallback)((T,R)=>{v()||I();let D=p(),j=[t,...x(t,!0)];if(D.some(U=>j.includes(U)))return;let z=b(t),H=g([t])[0],W=g(D);if(!HB(a,z,W,H))return;let ne=S();if(y()&&ne!==t)return;let ae=m(t).filter(U=>!((0,fg.hasBlockSupport)(U.name,"visibility",!0)&&U.attributes?.metadata?.blockVisibility===!1));if(ae.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let X=ae.map(U=>{let K=U.clientId;return{isUnmodifiedDefaultBlock:(0,fg.isUnmodifiedDefaultBlock)(U),getBoundingClientRect:()=>{let se=R.getElementById(`block-${K}`);return se?se.getBoundingClientRect():null},blockIndex:h(K),blockOrientation:f(K)?.orientation}}),ee=fwe(X,{x:T.clientX,y:T.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:h(t)}),[le,Q,J]=ee,q=X[le]?.isUnmodifiedDefaultBlock;if(!(y()&&!q&&Q!=="insert")){if(Q==="group"){let U=ae[le],K=[U.name,...W].every(we=>we==="core/image"),se=d("core/gallery",t),ce=k([U.clientId,p()]),Se=c(u(),"block"),he=Se&&Se.find(({name:we})=>we==="group-row");if(K&&!se&&(!ce||!he)||!K&&(!ce||!he))return}n.batch(()=>{s({index:le,operation:Q,nearestSide:J});let U=["before","after"].includes(Q)?o:t;C(U,le,{operation:Q,nearestSide:J})})}},[v,b,t,g,p,a,S,y,m,f,e,o,h,n,I,C,d,k,c,u]),200);return(0,UB.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:E,onDragOver(T){L(T,T.currentTarget.ownerDocument)},onDragLeave(T){let{ownerDocument:R}=T.currentTarget;jY(T.relatedTarget,R)||jY(T.target,R)||(L.cancel(),B())},onDragEnd(){L.cancel(),O(),B()}})}var ql=l(w(),1),mwe={};function pwe({children:e,clientId:t}){let o=VY(t);return(0,ql.jsx)(f0,{value:o,children:e})}var hwe=(0,mg.memo)(My);function $Y(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:S,defaultLayout:x}=e;OY(t,S,o,r,n,i,s,a,u,m,g,v),NY(t,c,u,f);let C=(0,bm.getBlockSupport)(k,"layout")||(0,bm.getBlockSupport)(k,"__experimentalLayout")||mwe,{allowSizingOnChildren:B=!1}=C,I=v||C,O=(0,mg.useMemo)(()=>({...x,...I,...B&&{allowSizingOnChildren:!0}}),[x,I,B]),E=(0,ql.jsx)(hwe,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:h,layout:O,wrapperRef:d,placeholder:b});return!y?.providesContext||Object.keys(y.providesContext).length===0?E:(0,ql.jsx)(pwe,{clientId:t,children:E})}function gwe(e){return d1(e),(0,ql.jsx)($Y,{...e})}var GB=(0,mg.forwardRef)((e,t)=>{let o=km({ref:t},e);return(0,ql.jsx)("div",{className:"block-editor-inner-blocks",children:(0,ql.jsx)("div",{...o})})});function km(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Pe(),c=(0,WY.useSelect)(S=>{let{getBlockName:x,isZoomOut:C,getTemplateLock:B,getBlockRootClientId:I,getBlockEditingMode:O,getBlockSettings:E,getSectionRootClientId:L}=M(S(_));if(!i){let W=L();return{isDropZoneDisabled:C()&&W!==""}}let{hasBlockSupport:T,getBlockType:R}=S(bm.store),D=x(i),j=O(i),G=I(i),[z]=E(i,"layout"),H=j==="disabled";if(C()){let W=L();H=i!==W}return{__experimentalCaptureToolbars:T(D,"__experimentalExposeControlsToChildren",!1),name:D,blockType:R(D),parentLock:B(G),parentClientId:G,isDropZoneDisabled:H,defaultLayout:z}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:h,isDropZoneDisabled:p,defaultLayout:g}=c,b=HY({dropZoneElement:n,rootClientId:i,parentClientId:h}),v=(0,GY.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?gwe:$Y;return{...e,ref:v,className:V(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,ql.jsx)(y,{...k,clientId:i}):(0,ql.jsx)(My,{...t})}}km.save=bm.__unstableGetInnerBlocksProps;GB.DefaultBlockAppender=EY;GB.ButtonBlockAppender=CY;GB.Content=()=>km.save().children;var Jy=GB;var eS=l(Z(),1),pg=l(F(),1),Z5=l(Fe(),1),Cr=l(it(),1);var KY=l(w(),1),bwe=new Set([Cr.UP,Cr.RIGHT,Cr.DOWN,Cr.LEFT,Cr.ENTER,Cr.BACKSPACE]);function kwe(e){let{keyCode:t,shiftKey:o}=e;return!o&&bwe.has(t)}function tS(){let e=(0,pg.useSelect)(o=>o(_).isTyping(),[]),{stopTyping:t}=(0,pg.useDispatch)(_);return(0,eS.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 oS(){let{isTyping:e}=(0,pg.useSelect)(i=>{let{isTyping:s}=i(_);return{isTyping:s()}},[]),{startTyping:t,stopTyping:o}=(0,pg.useDispatch)(_),r=tS(),n=(0,eS.useRefEffect)(i=>{let{ownerDocument:s}=i,{defaultView:a}=s,c=a.getSelection();if(e){let h=function(v){let{target:k}=v;b=a.setTimeout(()=>{(0,Z5.isTextField)(k)||o()})},p=function(v){let{keyCode:k}=v;(k===Cr.ESCAPE||k===Cr.TAB)&&o()},g=function(){c.isCollapsed||o()};var u=h,d=p,f=g;let b;return i.addEventListener("focus",h),i.addEventListener("keydown",p),s.addEventListener("selectionchange",g),()=>{a.clearTimeout(b),i.removeEventListener("focus",h),i.removeEventListener("keydown",p),s.removeEventListener("selectionchange",g)}}function m(h){let{type:p,target:g}=h;!(0,Z5.isTextField)(g)||!i.contains(g)||p==="keydown"&&!kwe(h)||t()}return i.addEventListener("keypress",m),i.addEventListener("keydown",m),()=>{i.removeEventListener("keypress",m),i.removeEventListener("keydown",m)}},[e,t,o]);return(0,eS.useMergeRefs)([r,n])}function vwe({children:e}){return(0,KY.jsx)("div",{ref:oS(),children:e})}var YY=vwe;var rS=l(A(),1),qY=l(Z(),1),ZY=l(F(),1),XY=l(P(),1),QY=l(N(),1);var WB=l(w(),1);function X5({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,XY.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,ZY.useSelect)(x=>{let{getInsertionPoint:C,getBlockOrder:B,getSectionRootClientId:I,isBlockInsertionPointVisible:O,getBlockInsertionPoint:E,getDraggedBlockClientIds:L}=M(x(_)),T=I(),R=B(T);return{sectionRootClientId:T,sectionClientIds:R,insertionPoint:C(),blockInsertionPoint:E(),blockInsertionPointVisible:O(),blocksBeingDragged:L()}},[]),f=(0,qY.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),S=(k>0?s[k-1]:null)===e;return(v||S)&&(m=!1),(0,WB.jsx)(rS.__unstableAnimatePresence,{children:m&&(0,WB.jsx)(rS.__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,WB.jsx)(rS.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,QY.__)("Drop pattern.")})})})}var $r=l(w(),1),ZC=(0,Xu.createContext)();ZC.displayName="IntersectionObserverContext";var $B=new WeakMap,ywe={trailing:!0};function Swe({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,Gi.useSelect)(f=>{let{getSettings:m,isTyping:h,hasBlockSpotlight:p,getEditedContentOnlySection:g}=M(f(_)),{outlineMode:b,focusMode:v,isPreviewMode:k}=m();return{isOutlineMode:b&&!h(),isFocusMode:v||p(),isPreviewMode:k,editedContentOnlySection:g()}},[]),s=(0,Gi.useRegistry)(),{setBlockVisibility:a}=(0,Gi.useDispatch)(_),c=(0,KB.useDebounce)((0,Xu.useCallback)(()=>{let f={};$B.get(s).forEach(([m,h])=>{f[m]=h}),a(f)},[s]),300,ywe),u=(0,Xu.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(m=>{$B.get(s)||$B.set(s,[]);for(let h of m){let p=h.target.getAttribute("data-block");$B.get(s).push([p,h.isIntersecting])}c()})},[]),d=km({ref:(0,KB.useMergeRefs)([mm(),yY(),oS()]),className:V("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,$r.jsxs)(ZC.Provider,{value:u,children:[(0,$r.jsx)("div",{...d}),!!i&&(0,$r.jsx)(_we,{clientId:i})]})}function _we({clientId:e}){let{stopEditingContentOnlySection:t}=M((0,Gi.useDispatch)(_)),o=(0,Gi.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(_);return!s()||n(e)||i(e,!0)},[e]);return(0,Xu.useEffect)(()=>{o||t()},[o,t]),null}function Hh(e){return(0,$r.jsx)(l0,{value:lO,children:(0,$r.jsx)(Swe,{...e})})}var xwe=[],wwe=new Set;function Cwe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=bM}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,Gi.useSelect)(m=>{let{getSettings:h,getBlockOrder:p,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:v,getBlockEditingMode:k,isSectionBlock:y,isContainerInsertableToInContentOnlyMode:S,getBlockName:x,isZoomOut:C,canInsertBlockType:B}=M(m(_)),I=p(t);if(h().isPreviewMode)return{order:I,selectedBlocks:xwe,visibleBlocks:wwe};let O=g(),E=O[0],L=!t&&!E&&(!I.length||!B((0,JY.getDefaultBlockName)(),t)),T=!!(t&&E&&t===E),R=v(t);return{order:I,selectedBlocks:O,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!y(t)||S(x(E),t))&&k(t)!=="disabled"&&(!R||R==="contentOnly")&&i&&!C()&&(s||T||L)}},[t,i,s]);return(0,$r.jsxs)(rH,{value:n,children:[a.map(m=>(0,$r.jsxs)(Gi.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,$r.jsx)(X5,{clientId:m,rootClientId:t,position:"top"}),(0,$r.jsx)(a9,{rootClientId:t,clientId:m}),c&&(0,$r.jsx)(X5,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,$r.jsx)(oY,{tagName:r,rootClientId:t,CustomAppender:o})]})}function My(e){return(0,$r.jsx)(Gi.AsyncModeProvider,{value:!1,children:(0,$r.jsx)(Cwe,{...e})})}var Vg=l(F(),1),$V=l(Fe(),1),KV=l(A(),1),VQ=l(Is(),1),gT=l(P(),1),Fg=l($(),1),YV=l(Zo(),1),zg=l(N(),1);var Eq=l(Z(),1),Tq=l(F(),1),Iq=l(Fe(),1),Ea=l(P(),1);var qn=l(N(),1),ym=l($(),1),oE=l(A(),1),Sq=l(Z(),1),_q=l(F(),1),rE=l(P(),1);var iS=l(A(),1),nq=l(Zv(),1),iq=l(Re(),1),QB=l(P(),1);var Br=l(A(),1),eq=(0,Br.createSlotFill)("InspectorControls"),Bwe=(0,Br.createSlotFill)("InspectorAdvancedControls"),Ewe=(0,Br.createSlotFill)("InspectorControlsBindings"),Twe=(0,Br.createSlotFill)("InspectorControlsBackground"),Iwe=(0,Br.createSlotFill)("InspectorControlsBorder"),Pwe=(0,Br.createSlotFill)("InspectorControlsColor"),Rwe=(0,Br.createSlotFill)("InspectorControlsFilter"),Owe=(0,Br.createSlotFill)("InspectorControlsDimensions"),Awe=(0,Br.createSlotFill)("InspectorControlsPosition"),Lwe=(0,Br.createSlotFill)("InspectorControlsTypography"),Nwe=(0,Br.createSlotFill)("InspectorControlsListView"),Mwe=(0,Br.createSlotFill)("InspectorControlsStyles"),Dwe=(0,Br.createSlotFill)("InspectorControlsEffects"),Vwe=(0,Br.createSlotFill)("InspectorControlsContent"),Fwe={default:eq,advanced:Bwe,background:Twe,bindings:Ewe,border:Iwe,color:Pwe,content:Vwe,dimensions:Owe,effects:Dwe,filter:Rwe,list:Nwe,position:Awe,settings:eq,styles:Mwe,typography:Lwe},Wi=Fwe,nS=(0,Br.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var hg=l(A(),1),qB=l(P(),1),tq=l(Z(),1),ZB=l(F(),1);var YB=l(w(),1),oq=Symbol("ListViewContentPopover"),{Fill:rq,Slot:zwe}=(0,hg.createSlotFill)(oq);function jwe(){return(0,tq.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function XB({listViewRef:e}){let{popoverProps:t}=jwe(),o=(0,hg.__experimentalUseSlotFills)(oq),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,ZB.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(_),f=M(u(_));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,qB.useState)(null);(0,qB.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,ZB.useDispatch)(_));return!i||!r||!s?null:(0,YB.jsx)(hg.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:c,children:(0,YB.jsx)("div",{style:{width:"280px"},children:(0,YB.jsx)(zwe,{})})})}var Qu=l(w(),1),Uwe=["content","list"],Hwe=["default","settings","advanced"];function vm({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,iq.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Pe(),i=Wi[t]?.Fill;if(!i)return(0,nq.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[$c]){let s=n.name==="core/template-part",a=Hwe.includes(t),c=Uwe.includes(t);if(!(s&&a||c))return null}return!n[$c]&&!n[bs]?null:t==="content"&&n[zk]&&n[$c]?n[bs]?(0,Qu.jsx)(iS.__experimentalStyleProvider,{document,children:(0,Qu.jsx)(rq,{children:e})}):null:(0,Qu.jsx)(iS.__experimentalStyleProvider,{document,children:(0,Qu.jsx)(i,{children:s=>(0,Qu.jsx)(Wwe,{fillProps:s,children:e,resetAllFilter:r})})})}function Gwe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,QB.useContext)(iS.__experimentalToolsPanelContext);return(0,QB.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function Wwe({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,Qu.jsx)(Gwe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,Qu.jsx)(s,{...a,children:i}),n)}var mq=l(A(),1),pq=l(P(),1),hq=l(Zv(),1),gq=l(Re(),1);var aq=l(A(),1),JB=l(F(),1),lq=l(P(),1);var sq=l(Z(),1);function Po(){return(0,sq.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function gg(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 cq=l(w(),1);function uq({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,JB.useDispatch)(_),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,JB.useSelect)(_),c=Po(),u=s(),d=(0,lq.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:Ne(b.style)},m[p]=b}),r(h,m,!0)},[n,i,a,u,r]);return(0,cq.jsx)(aq.__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 Q5=l(A(),1),eE=l(P(),1),dq=l(w(),1);function fq({Slot:e,fillProps:t,...o}){let r=(0,eE.useContext)(Q5.__experimentalToolsPanelContext),n=(0,eE.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[Q5.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,dq.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var tE=l(w(),1);function $we({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,gq.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=Wi[t],a=(0,mq.__experimentalUseSlotFills)(s?.name);if(!s)return(0,hq.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:c}=s;return o?(0,tE.jsx)(uq,{group:t,label:o,children:(0,tE.jsx)(fq,{...n,fillProps:r,Slot:c})}):(0,tE.jsx)(c,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var J5=(0,pq.forwardRef)($we);var eV=l(w(),1),bq=vm;bq.Slot=J5;var Ju=e=>(0,eV.jsx)(vm,{...e,group:"advanced"});Ju.Slot=function(t){return(0,eV.jsx)(J5,{...t,group:"advanced"})};Ju.slotName="InspectorAdvancedControls";var fe=bq;var vq=l(F(),1),ed=l($(),1),sS=l(N(),1);function kq(e){let t=e?.style?.position?.type;return t==="sticky"?(0,sS.__)("Sticky"):t==="fixed"?(0,sS.__)("Fixed"):null}function Tt(e){return(0,vq.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(_),{getBlockType:i,getActiveBlockVariation:s}=t(ed.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=kq(u);return{isSynced:!1,title:(0,sS.__)("Pattern"),icon:Ci,description:v?.description||(0,sS.__)("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,ed.isReusableBlock)(c)||(0,ed.isTemplatePart)(c),p=(m?(0,ed.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=kq(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 aS=l(w(),1),lS="position",tV={key:"default",value:"",name:(0,qn.__)("Default")},oV={key:"sticky",value:"sticky",name:(0,qn._x)("Sticky","Name for the value of the CSS position property"),hint:(0,qn.__)("The block will stick to the top of the window instead of scrolling.")},yq={key:"fixed",value:"fixed",name:(0,qn._x)("Fixed","Name for the value of the CSS position property"),hint:(0,qn.__)("The block will not move when the page is scrolled.")},Kwe=["top","right","bottom","left"],Ywe=["sticky","fixed"];function qwe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return Ywe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,Kwe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function Zwe(e){let t=(0,ym.getBlockSupport)(e,lS);return!!(t===!0||t?.sticky)}function Xwe(e){let t=(0,ym.getBlockSupport)(e,lS);return!!(t===!0||t?.fixed)}function Qwe(e){return!!(0,ym.getBlockSupport)(e,lS)}function xq(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function wq({name:e}={}){let[t,o]=me("position.fixed","position.sticky"),r=!t&&!o;return!Qwe(e)||r}function Jwe({style:e={},clientId:t,name:o,setAttributes:r}){let n=Xwe(o),i=Zwe(o),s=e?.position?.type,{firstParentClientId:a}=(0,_q.useSelect)(h=>{let{getBlockParents:p}=h(_),g=p(t);return{firstParentClientId:g[g.length-1]}},[t]),c=Tt(a),u=i&&s===oV.value&&c?(0,qn.sprintf)((0,qn.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,rE.useMemo)(()=>{let h=[tV];return(i||s===oV.value)&&h.push(oV),(n||s===yq.value)&&h.push(yq),h},[n,i,s]),f=h=>{let g={...e,position:{...e?.position,type:h,top:h==="sticky"||h==="fixed"?"0px":void 0}};r({style:Ne(g)})},m=s&&d.find(h=>h.value===s)||tV;return rE.Platform.select({web:d.length>1?(0,aS.jsx)(fe,{group:"position",children:(0,aS.jsx)(oE.BaseControl,{help:u,children:(0,aS.jsx)(oE.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,qn.__)("Position"),hideLabelFromVision:!0,describedBy:(0,qn.sprintf)((0,qn.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:h})=>{f(h.value)},size:"__unstable-large"})})}):null,native:null})}var rV={edit:function(t){return wq(t)?null:(0,aS.jsx)(Jwe,{...t})},useBlockProps:tCe,attributeKeys:["style"],hasSupport(e){return(0,ym.hasBlockSupport)(e,lS)}},eCe={};function tCe({name:e,style:t}){let o=(0,ym.hasBlockSupport)(e,lS),r=wq({name:e}),n=o&&!r,i=(0,Sq.useInstanceId)(eCe),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=qwe({selector:s,style:t})||"");let c=V({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return Zn({css:a}),{className:c}}var Pq={placement:"top-start"},Cq={...Pq,flip:!1,shift:!0},oCe={...Pq,flip:!0,shift:!1};function Bq(e,t,o,r,n){if(!e||!t)return Cq;let i=o?.scrollTop||0,s=Sh(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)?Cq:oCe}function nE({contentElement:e,clientId:t}){let o=mt(t),[r,n]=(0,Ea.useState)(0),{blockIndex:i,isSticky:s}=(0,Tq.useSelect)(m=>{let{getBlockIndex:h,getBlockAttributes:p}=m(_);return{blockIndex:h(t),isSticky:xq(p(t))}},[t]),a=(0,Ea.useMemo)(()=>{if(e)return(0,Iq.getScrollContainer)(e)},[e]),[c,u]=(0,Ea.useState)(()=>Bq(e,o,a,r,s)),d=(0,Eq.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,Ea.useCallback)(()=>u(Bq(e,o,a,r,s)),[e,o,a,r]);return(0,Ea.useLayoutEffect)(f,[i,f]),(0,Ea.useLayoutEffect)(()=>{if(!e||!o)return;let m=e?.ownerDocument?.defaultView;m?.addEventHandler?.("resize",f);let 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 Rq=l(F(),1);function iE(e){return(0,Rq.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:c,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(_),f=n(e),m=i(f),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 sE=l(w(),1);function Oq({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=iE(e),s=nE({contentElement:t?.current,clientId:e});return(0,sE.jsx)(Hi,{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,sE.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,sE.jsx)(Ui,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var EQ=l(F(),1),Dg=l(P(),1),TQ=l(Is(),1);var _Q=l(N(),1),xQ=l(F(),1),UV=l(P(),1),wQ=l(Z(),1),ic=l($(),1),CQ=l(A(),1);var Sm=l(A(),1),Hq=l(F(),1),Gq=l(N(),1);var Dq=l($(),1),Vq=l(A(),1),cS=l(F(),1),uS=l(P(),1),Fq=l(Z(),1);var Lq=l(Fe(),1),Ta=l(P(),1),aE=50,Nq=25,rCe=1e3,Aq=rCe*(Nq/1e3);function Mq(){let e=(0,Ta.useRef)(null),t=(0,Ta.useRef)(null),o=(0,Ta.useRef)(null),r=(0,Ta.useRef)(null);(0,Ta.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Ta.useCallback)(a=>{e.current=a.clientY,o.current=(0,Lq.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},Nq)},[]),i=(0,Ta.useCallback)(a=>{if(!o.current)return;let c=o.current.offsetHeight,u=e.current-o.current.offsetTop,d=a.clientY-o.current.offsetTop;if(a.clientY>u){let f=Math.max(c-u-aE,0),m=Math.max(d-u-aE,0),h=f===0||m===0?0:m/f;t.current=Aq*h}else if(a.clientY<u){let f=Math.max(u-aE,0),m=Math.max(u-d-aE,0),h=f===0||m===0?0:m/f;t.current=-Aq*h}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var nV=l(w(),1),nCe=({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,cS.useSelect)(E=>{let{canMoveBlocks:L,getBlockRootClientId:T,getBlockName:R,getBlockAttributes:D,isBlockInsertionPointVisible:j}=E(_),{getBlockType:G,getActiveBlockVariation:z}=E(Dq.store),H=T(o[0]),W=R(o[0]),te=z(W,D(o[0]));return{srcRootClientId:H,isDraggable:L(o),icon:te?.icon||G(W)?.icon,visibleInserter:j(),getBlockType:G}},[o]),p=(0,uS.useRef)(!1),[g,b,v]=Mq(),{getAllowedBlocks:k,getBlockNamesByClientId:y,getBlockRootClientId:S}=(0,cS.useSelect)(_),{startDraggingBlocks:x,stopDraggingBlocks:C}=(0,cS.useDispatch)(_);(0,uS.useEffect)(()=>()=>{p.current&&C()},[]);let I=mt(o[0])?.closest("body");return(0,uS.useEffect)(()=>{if(!I||!a)return;let L=(0,Fq.throttle)(T=>{if(!T.target.closest("[data-block]"))return;let R=y(o),D=T.target.closest("[data-block]").getAttribute("data-block"),j=k(D),G=y([D])[0],z;if(j?.length===0){let H=S(D),W=y([H])[0],te=k(H);z=HB(h,te,R,W)}else z=HB(h,j,R,G);!z&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return I.addEventListener("dragover",L),()=>{I.removeEventListener("dragover",L)}},[o,I,a,k,y,S,h,m]),d?(0,nV.jsx)(Vq.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:E=>{window.requestAnimationFrame(()=>{x(o),p.current=!0,g(E),i&&i()})},onDragOver:b,onDragEnd:()=>{C(),p.current=!1,v(),s&&s()},__experimentalDragComponent:c!==void 0?c:(0,nV.jsx)(Z1,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:E,onDraggableEnd:L})=>t({draggable:!0,onDragStart:E,onDragEnd:L})}):t({draggable:!1})},lE=nCe;var jq=l($(),1),cE=l(A(),1),Uq=l(Z(),1),uE=l(F(),1),dE=l(P(),1),$i=l(N(),1);var ke=l(N(),1),td=(e,t)=>e==="up"?t==="horizontal"?(0,ke.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ke.isRTL)()?"left":"right":"down":null;function zq(e,t,o,r,n,i,s){let a=o+1;if(e>1)return iCe(e,o,r,n,i,s);if(r&&n)return(0,ke.sprintf)((0,ke.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=td("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=td("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=td("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=td("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function iCe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ke.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=td("down",i);if(a==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=td("down",i);if(a==="down")return(0,ke.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=td("up",i);if(a==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=td("up",i);if(a==="up")return(0,ke.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var Zl=l(w(),1),sCe=(e,t)=>e==="up"?t==="horizontal"?(0,$i.isRTL)()?Vo:Nr:yf:e==="down"?t==="horizontal"?(0,$i.isRTL)()?Nr:Vo:Fn:null,aCe=(e,t)=>e==="up"?t==="horizontal"?(0,$i.isRTL)()?(0,$i.__)("Move right"):(0,$i.__)("Move left"):(0,$i.__)("Move up"):e==="down"?t==="horizontal"?(0,$i.isRTL)()?(0,$i.__)("Move left"):(0,$i.__)("Move right"):(0,$i.__)("Move down"):null,iV=(0,dE.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,Uq.useInstanceId)(iV),s=Array.isArray(e)?e:[e],a=s.length,{disabled:c}=r,{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:h,firstIndex:p,orientation:g="vertical"}=(0,uE.useSelect)(x=>{let{getBlockIndex:C,getBlockRootClientId:B,getBlockOrder:I,getBlock:O,getBlockListSettings:E}=x(_),L=s[0],T=B(L),R=C(L),D=C(s[s.length-1]),j=I(T),G=O(L),z=R===0,H=D===j.length-1,{orientation:W}=E(T)||{};return{blockType:G?(0,jq.getBlockType)(G.name):null,isDisabled:c||(t==="up"?z:H),rootClientId:T,firstIndex:R,isFirst:z,isLast:H,orientation:o||W}},[e,t]),{moveBlocksDown:b,moveBlocksUp:v}=(0,uE.useDispatch)(_),k=t==="up"?v:b,y=x=>{k(e,f),r.onClick&&r.onClick(x)},S=`block-editor-block-mover-button__description-${i}`;return(0,Zl.jsxs)(Zl.Fragment,{children:[(0,Zl.jsx)(cE.Button,{__next40pxDefaultSize:!0,ref:n,className:V("block-editor-block-mover-button",`is-${t}-button`),icon:sCe(t,g),label:aCe(t,g),"aria-describedby":S,...r,onClick:d?null:y,disabled:d,accessibleWhenDisabled:!0}),(0,Zl.jsx)(cE.VisuallyHidden,{id:S,children:zq(a,u&&u.title,p,m,h,t==="up"?-1:1,g)})]})}),fE=(0,dE.forwardRef)((e,t)=>(0,Zl.jsx)(iV,{direction:"up",ref:t,...e})),mE=(0,dE.forwardRef)((e,t)=>(0,Zl.jsx)(iV,{direction:"down",ref:t,...e}));var Ia=l(w(),1);function lCe({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:o,isBlockMoverDownButtonDisabled:r}){let{canMove:n,rootClientId:i,isFirst:s,isLast:a,orientation:c,isManualGrid:u}=(0,Hq.useSelect)(d=>{let{getBlockIndex:f,getBlockListSettings:m,canMoveBlocks:h,getBlockOrder:p,getBlockRootClientId:g,getBlockAttributes:b}=d(_),v=Array.isArray(e)?e:[e],k=v[0],y=g(k),S=f(k),x=f(v[v.length-1]),C=p(y),{layout:B={}}=b(y)??{};return{canMove:h(e),rootClientId:y,isFirst:S===0,isLast:x===C.length-1,orientation:m(y)?.orientation,isManualGrid:B.type==="grid"&&B.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!n||s&&a&&!i||t&&u?null:(0,Ia.jsxs)(Sm.ToolbarGroup,{className:V("block-editor-block-mover",{"is-horizontal":c==="horizontal"}),children:[!t&&(0,Ia.jsx)(lE,{clientIds:e,fadeWhenDisabled:!0,children:d=>(0,Ia.jsx)(Sm.Button,{__next40pxDefaultSize:!0,icon:Jk,className:"block-editor-block-mover__drag-handle",label:(0,Gq.__)("Drag"),tabIndex:"-1",...d})}),!u&&(0,Ia.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Ia.jsx)(Sm.ToolbarItem,{children:d=>(0,Ia.jsx)(fE,{disabled:o,clientIds:e,...d})}),(0,Ia.jsx)(Sm.ToolbarItem,{children:d=>(0,Ia.jsx)(mE,{disabled:r,clientIds:e,...d})})]})]})}var pE=lCe;var Kq=l(A(),1),gE=l(F(),1),bE=l(N(),1),Yq=l(P(),1);var dS=l(F(),1),od=l(P(),1);var{clearTimeout:Wq,setTimeout:cCe}=window,$q=200;function uCe({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=$q}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,dS.useSelect)(_),{toggleBlockHighlight:s}=(0,dS.useDispatch)(_),a=(0,od.useRef)(),c=(0,dS.useSelect)(g=>g(_).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&&Wq&&Wq(g)},h=g=>{g&&g.stopPropagation(),m(),u(!0)},p=g=>{g&&g.stopPropagation(),m(),a.current=cCe(()=>{f()&&u(!1)},r)};return(0,od.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:h,debouncedHideGestures:p}}function bg({ref:e,highlightParent:t=!1,debounceTimeout:o=$q}){let[r,n]=(0,od.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=uCe({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,od.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,od.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 hE=l(w(),1);function qq(){let{selectBlock:e}=(0,gE.useDispatch)(_),{parentClientId:t}=(0,gE.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=M(i(_)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=Tt(t),r=(0,Yq.useRef)(),n=bg({ref:r,highlightParent:!0});return(0,hE.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,hE.jsx)(Kq.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,bE.sprintf)((0,bE.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,hE.jsx)(Oe,{icon:o?.icon})})},t)}var kE=l(A(),1);var kg=l(A(),1),dCe=(0,kg.createSlotFill)("BlockControls"),fCe=(0,kg.createSlotFill)("BlockControlsBlock"),mCe=(0,kg.createSlotFill)("BlockFormatControls"),pCe=(0,kg.createSlotFill)("BlockControlsOther"),hCe=(0,kg.createSlotFill)("BlockControlsParent"),gCe={default:dCe,block:fCe,inline:mCe,other:pCe,parent:hCe},fS=gCe;function Zq(e,t){let o=Pe();return o[bs]?fS[e]?.Fill:o[Pp]&&t?fS.parent.Fill:null}var Xl=l(w(),1);function sV({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=Zq(e,r);if(!n)return null;let i=(0,Xl.jsxs)(Xl.Fragment,{children:[e==="default"&&(0,Xl.jsx)(kE.ToolbarGroup,{controls:t}),o]});return(0,Xl.jsx)(kE.__experimentalStyleProvider,{document,children:(0,Xl.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,Xl.jsx)(u,{...d,children:c}),i)}})})}var mS=l(P(),1),Ql=l(A(),1),Qq=l(Zv(),1);var aV=l(w(),1),{ComponentsContext:Xq}=M(Ql.privateApis);function lV({group:e="default",...t}){let o=(0,mS.useContext)(Ql.__experimentalToolbarContext),r=(0,mS.useContext)(Xq),n=(0,mS.useMemo)(()=>({forwardedContext:[[Ql.__experimentalToolbarContext.Provider,{value:o}],[Xq.Provider,{value:r}]]}),[o,r]),i=fS[e],s=(0,Ql.__experimentalUseSlotFills)(i.name);if(!i)return(0,Qq.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,aV.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,aV.jsx)(Ql.ToolbarGroup,{children:c})}var cV=l(w(),1),Jq=sV;Jq.Slot=lV;var uV=e=>(0,cV.jsx)(sV,{group:"inline",...e});uV.Slot=function(t){return(0,cV.jsx)(lV,{group:"inline",...t})};var Mt=Jq;var eZ=l(A(),1),{Fill:tZ,Slot:bCe}=(0,eZ.createSlotFill)("__unstableBlockToolbarLastItem");tZ.Slot=bCe;var vE=tZ;var FE=l(A(),1);var xg=l($(),1),Jn=l(A(),1),Pm=l(F(),1);var DE=l(P(),1),Pa=l(N(),1),rX=l(Is(),1),Im=l(Z(),1);var yg=l(F(),1),rd=l($(),1);var kZ=l(P(),1),hS=l($(),1),pS=l(F(),1),vZ=l(Ti(),1),Jl=l(N(),1);var Xn=l($(),1),oZ=l(P(),1),kCe="align";var rZ="__experimentalBorder",yE="color",vCe="customClassName",nZ="typography.__experimentalFontFamily",iZ="typography.fontSize",yCe="typography.lineHeight",SCe="typography.__experimentalFontStyle",_Ce="typography.__experimentalFontWeight",sZ="typography.textAlign",xCe="typography.textColumns",wCe="typography.__experimentalTextDecoration",CCe="typography.__experimentalWritingMode",BCe="typography.__experimentalTextTransform",ECe="typography.__experimentalLetterSpacing",TCe="layout",ICe=[yCe,iZ,SCe,_Ce,nZ,sZ,xCe,wCe,BCe,CCe,ECe],PCe=["shadow"],RCe="spacing",OCe=[...PCe,...ICe,rZ,yE,RCe],aZ=e=>(0,Xn.hasBlockSupport)(e,kCe);function lZ(e,t="any"){if(oZ.Platform.OS!=="web")return!1;let o=(0,Xn.getBlockSupport)(e,rZ);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var cZ=e=>{let t=(0,Xn.getBlockSupport)(e,yE);return t!==null&&typeof t=="object"&&!!t.gradients},uZ=e=>{let t=(0,Xn.getBlockSupport)(e,yE);return t&&t.background!==!1},dZ=e=>(0,Xn.hasBlockSupport)(e,sZ);var fZ=e=>{let t=(0,Xn.getBlockSupport)(e,yE);return t&&t.text!==!1};var mZ=e=>(0,Xn.hasBlockSupport)(e,vCe,!0);var pZ=e=>(0,Xn.hasBlockSupport)(e,nZ);var hZ=e=>(0,Xn.hasBlockSupport)(e,iZ);var gZ=e=>(0,Xn.hasBlockSupport)(e,TCe);var bZ=e=>OCe.some(t=>(0,Xn.hasBlockSupport)(e,t));function ACe(e){try{let t=(0,hS.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var LCe={align:aZ,borderColor:e=>lZ(e,"color"),backgroundColor:uZ,textAlign:dZ,textColor:fZ,gradient:cZ,className:mZ,fontFamily:pZ,fontSize:hZ,layout:gZ,style:bZ};function NCe(e,t){return Object.entries(LCe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function dV(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,NCe(t[r],e[r])),dV(e[r].innerBlocks,t[r].innerBlocks,o)}function vg(){let e=(0,pS.useRegistry)(),{updateBlockAttributes:t}=(0,pS.useDispatch)(_),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,pS.useDispatch)(vZ.store);return(0,kZ.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,Jl.__)("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,Jl.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!ACe(s)){r((0,Jl.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,hS.parse)(s);if(a.length===1?e.batch(()=>{dV(i,i.map(()=>a[0]),t)}):e.batch(()=>{dV(i,a,t)}),i.length===1){let c=(0,hS.getBlockType)(i[0].name)?.title;o((0,Jl.sprintf)((0,Jl.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,Jl.sprintf)((0,Jl.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function yZ({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,yg.useSelect)(rd.store),i=(0,yg.useSelect)(y=>{let{canInsertBlockType:S,getBlockRootClientId:x,getBlocksByClientId:C,getDirectInsertBlock:B,canRemoveBlocks:I}=y(_),O=C(e),E=x(e[0]),L=S(r(),E),T=E?B(E):null;return{canRemove:I(e),canInsertBlock:O.every(R=>(L||!!T)&&S(R.name,E)),canCopyStyles:O.every(R=>!!R&&((0,rd.hasBlockSupport)(R.name,"color")||(0,rd.hasBlockSupport)(R.name,"typography"))),canDuplicate:O.every(R=>!!R&&(0,rd.hasBlockSupport)(R.name,"multiple",!0)&&S(R.name,E))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,yg.useSelect)(_),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:h,duplicateBlocks:p,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:v}=(0,yg.useDispatch)(_),k=vg();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(),S=(0,rd.switchToBlockType)(s(e),y);S&&h(e,S)},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 SZ=l(A(),1),MCe=(0,SZ.createSlotFill)(Symbol("CommentIconSlotFill")),SE=MCe;var _Z=l(N(),1),xZ=l(A(),1),_E=l($(),1),xE=l(F(),1);var wZ=l(w(),1);function DCe({clientId:e}){let t=(0,xE.useSelect)(r=>r(_).getBlock(e),[e]),{replaceBlocks:o}=(0,xE.useDispatch)(_);return!t||t.name!=="core/html"?null:(0,wZ.jsx)(xZ.MenuItem,{onClick:()=>o(e,(0,_E.rawHandler)({HTML:(0,_E.getBlockContent)(t)})),children:(0,_Z.__)("Convert to Blocks")})}var CZ=DCe;var BZ=l(A(),1),{Fill:EZ,Slot:VCe}=(0,BZ.createSlotFill)("__unstableBlockSettingsMenuFirstItem");EZ.Slot=VCe;var wE=EZ;var _g=l(A(),1),qZ=l($(),1),ZZ=l(F(),1);var mV=l(A(),1),pV=l(N(),1),PZ=l($(),1),EE=l(F(),1),RZ=l(it(),1);var TZ=l($(),1),IZ=l(F(),1);function gS(e){return(0,IZ.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(_),{getGroupingBlockName:s,getBlockType:a}=t(TZ.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 CE=l(F(),1),BE=l($(),1),_m=l(A(),1);var bS=l(N(),1);var xm=l(w(),1),FCe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function zCe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=gS(),{replaceBlocks:n}=(0,CE.useDispatch)(_),{canRemove:i,variations:s}=(0,CE.useSelect)(p=>{let{canRemoveBlocks:g}=p(_),{getBlockVariations:b}=p(BE.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=p=>{let g=(0,BE.switchToBlockType)(e,o);typeof p!="string"&&(p="group"),g&&g.length>0&&(g[0].attributes.layout=FCe[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,xm.jsxs)(_m.ToolbarGroup,{children:[(0,xm.jsx)(_m.ToolbarButton,{icon:ov,label:(0,bS._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,xm.jsx)(_m.ToolbarButton,{icon:KL,label:(0,bS._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,xm.jsx)(_m.ToolbarButton,{icon:lN,label:(0,bS._x)("Stack","action: convert blocks to stack"),onClick:u}),h&&(0,xm.jsx)(_m.ToolbarButton,{icon:tv,label:(0,bS._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var fV=zCe;var wm=l(w(),1);function OZ({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,EE.useSelect)(_),{replaceBlocks:c}=(0,EE.useDispatch)(_),u=()=>{let m=(0,PZ.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,wm.jsxs)(wm.Fragment,{children:[t&&(0,wm.jsx)(mV.MenuItem,{shortcut:f.length>1?RZ.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,pV._x)("Group","verb")}),o&&(0,wm.jsx)(mV.MenuItem,{onClick:()=>{d(),s()},children:(0,pV._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var hV=l(N(),1),NZ=l(P(),1),MZ=l(A(),1);var AZ=l(F(),1);function Qn(e){return(0,AZ.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=M(t(_));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var Ki=l(N(),1),kS=l(P(),1),go=l(A(),1);var TE=l(F(),1),LZ=l($(),1);var It=l(w(),1),jCe=["core/navigation"];function UCe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function IE({clientId:e,onClose:t}){let[o,r]=(0,kS.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=Qn(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,TE.useSelect)(v=>{let{getBlockName:k,getBlockAttributes:y}=v(_),S=k(e),x=(0,LZ.getBlockType)(S);return{allowsEditLocking:jCe.includes(S),templateLock:y(e)?.templateLock,hasTemplateLock:!!x?.attributes?.templateLock}},[e]),[d,f]=(0,kS.useState)(!!c),{updateBlockAttributes:m}=(0,TE.useDispatch)(_),h=Tt(e);(0,kS.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,It.jsx)(go.Modal,{title:(0,Ki.sprintf)((0,Ki.__)("Lock %s"),h.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,It.jsxs)("form",{onSubmit:v=>{v.preventDefault(),b&&(m([e],{lock:o,templateLock:d?UCe(o):void 0}),t())},children:[(0,It.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,It.jsx)("legend",{children:(0,Ki.__)("Select the features you want to lock")}),(0,It.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,It.jsxs)("li",{children:[(0,It.jsx)(go.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,Ki.__)("Lock all"),checked:p,indeterminate:g,onChange:v=>r({move:v,remove:v,...a?{edit:v}:{}})}),(0,It.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(go.CheckboxControl,{label:(0,Ki.__)("Lock editing"),checked:!!o.edit,onChange:v=>r(k=>({...k,edit:v}))}),(0,It.jsx)(go.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Tf:vl})]}),(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(go.CheckboxControl,{label:(0,Ki.__)("Lock movement"),checked:o.move,onChange:v=>r(k=>({...k,move:v}))}),(0,It.jsx)(go.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Tf:vl})]}),(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(go.CheckboxControl,{label:(0,Ki.__)("Lock removal"),checked:o.remove,onChange:v=>r(k=>({...k,remove:v}))}),(0,It.jsx)(go.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Tf:vl})]})]})]})}),u&&(0,It.jsx)(go.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,Ki.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,It.jsxs)(go.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,It.jsx)(go.FlexItem,{children:(0,It.jsx)(go.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Ki.__)("Cancel")})}),(0,It.jsx)(go.FlexItem,{children:(0,It.jsx)(go.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Ki.__)("Apply")})})]})]})})}var Cm=l(w(),1);function gV({clientId:e}){let{canLock:t,isLocked:o}=Qn(e),[r,n]=(0,NZ.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,hV.__)("Unlock"):(0,hV.__)("Lock");return(0,Cm.jsxs)(Cm.Fragment,{children:[(0,Cm.jsx)(MZ.MenuItem,{icon:o?vl:vL,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,Cm.jsx)(IE,{clientId:e,onClose:n})]})}var PE=l(N(),1),RE=l(A(),1),Sg=l(P(),1);var nd=l(w(),1);function bV({clientId:e}){let{canLock:t,isLocked:o}=Qn(e),[r,n]=(0,Sg.useReducer)(a=>!a,!1),i=(0,Sg.useRef)(!1);if((0,Sg.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,PE.__)("Unlock"):(0,PE.__)("Lock");return!t&&o&&(s=(0,PE.__)("Locked")),(0,nd.jsxs)(nd.Fragment,{children:[(0,nd.jsx)(RE.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,nd.jsx)(RE.ToolbarButton,{disabled:!t,icon:o?Tf:vl,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,nd.jsx)(IE,{clientId:e,onClose:n})]})}var kV=l(N(),1),DZ=l(A(),1),OE=l($(),1),AE=l(F(),1);var VZ=l(w(),1),HCe=()=>{};function FZ({clientId:e,onToggle:t=HCe}){let{blockType:o,mode:r,enabled:n}=(0,AE.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(_),f=c(e);return{mode:u(e),blockType:f?(0,OE.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,AE.useDispatch)(_);if(!o||!(0,OE.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,kV.__)("Edit as HTML"):(0,kV.__)("Edit visually");return(0,VZ.jsx)(DZ.MenuItem,{onClick:()=>{i(e),t()},children:s})}var HZ=l(A(),1),GZ=l(N(),1),WZ=l(P(),1),$Z=l(F(),1),KZ=l(Is(),1);var Vs=l(A(),1),Ds=l(N(),1),jZ=l(P(),1),UZ=l(Zo(),1),LE=l(F(),1);function zZ(e){return e?.trim()?.length===0}var ec=l(w(),1);function Bm({clientId:e,onClose:t}){let[o,r]=(0,jZ.useState)(),n=Tt(e),{metadata:i}=(0,LE.useSelect)(b=>{let{getBlockAttributes:v}=b(_);return{metadata:v(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,LE.useDispatch)(_),a=i?.name||"",c=n?.title,u=!!a&&!!i?.bindings&&Object.values(i.bindings).some(b=>b.source==="core/pattern-overrides"),d=o!==void 0&&o!==a,f=o===c,m=zZ(o),h=d||f,p=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,v=f||m?(0,Ds.sprintf)((0,Ds.__)('Block name reset to: "%s".'),o):(0,Ds.sprintf)((0,Ds.__)('Block name changed to: "%s".'),o);(0,UZ.speak)(v,"assertive"),s([e],{metadata:Ne({...i,name:b})}),t()};return(0,ec.jsx)(Vs.Modal,{title:(0,Ds.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,ec.jsx)("form",{onSubmit:b=>{b.preventDefault(),h&&g()},children:(0,ec.jsxs)(Vs.__experimentalVStack,{spacing:"3",children:[(0,ec.jsx)(Vs.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,Ds.__)("Name"),help:u?(0,Ds.__)("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,ec.jsxs)(Vs.__experimentalHStack,{justify:"right",children:[(0,ec.jsx)(Vs.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Ds.__)("Cancel")}),(0,ec.jsx)(Vs.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!h,variant:"primary",type:"submit",children:(0,Ds.__)("Save")})]})]})})})}var Em=l(w(),1);function vV({clientId:e}){let[t,o]=(0,WZ.useState)(!1),r=(0,$Z.useSelect)(n=>n(KZ.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,Em.jsxs)(Em.Fragment,{children:[(0,Em.jsx)(HZ.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,GZ.__)("Rename")}),t&&(0,Em.jsx)(Bm,{clientId:e,onClose:()=>o(!1)})]})}var YZ=l($(),1);function Tm(e){return{canRename:!!e&&(0,YZ.getBlockSupport)(e,"renaming",!0)}}var Fs=l(w(),1),{Fill:GCe,Slot:WCe}=(0,_g.createSlotFill)("BlockSettingsMenuControls"),$Ce=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,ZZ.useSelect)(b=>{let{getBlocksByClientId:v,getBlockNamesByClientId:k,getSelectedBlockClientIds:y,getBlockEditingMode:S,canEditBlock:x}=b(_),C=t!==null?t:y();return{selectedBlocks:k(C),selectedClientIds:C,isContentOnly:S(C[0])==="contentOnly",canToggleSelectedBlocksVisibility:v(C).every(B=>(0,qZ.hasBlockSupport)(B.name,"visibility",!0)),canEdit:x(C[0])}},[t]),{canLock:a}=Qn(r[0]),{canRename:c}=Tm(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&c&&!n,f=i&&!n,m=gS(r),{isGroupable:h,isUngroupable:p}=m,g=(h||p)&&!n;return(0,Fs.jsx)(WCe,{fillProps:{...e,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!g&&!u?null:(0,Fs.jsxs)(_g.MenuGroup,{children:[g&&(0,Fs.jsx)(OZ,{...m,onClose:e?.onClose}),s&&u&&(0,Fs.jsx)(gV,{clientId:r[0]}),s&&d&&(0,Fs.jsx)(vV,{clientId:r[0]}),s&&f&&(0,Fs.jsx)(xD,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,Fs.jsx)(FZ,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function XZ({...e}){return(0,Fs.jsx)(_g.__experimentalStyleProvider,{document,children:(0,Fs.jsx)(GCe,{...e})})}XZ.Slot=$Ce;var NE=XZ;var QZ=l(P(),1),JZ=l(A(),1),eX=l(Z(),1),tX=l(F(),1),ME=l(N(),1);var yV=l(w(),1);function oX({parentClientId:e,parentBlockType:t}){let o=(0,eX.useViewportMatch)("medium","<"),{selectBlock:r}=(0,tX.useDispatch)(_),n=(0,QZ.useRef)(),i=bg({ref:n,highlightParent:!0});return o?(0,yV.jsx)(JZ.MenuItem,{...i,ref:n,icon:(0,yV.jsx)(Oe,{icon:t.icon}),onClick:()=>r(e),children:(0,ME.sprintf)((0,ME.__)("Select parent block (%s)"),t.title)}):null}var vt=l(w(),1),KCe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function SV({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,Pm.useSelect)(_),{removeBlocks:a}=(0,Pm.useDispatch)(_),c=Rh(),u=(0,Im.useCopyToClipboard)(()=>(0,xg.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,Pa.__)("Copy");return(0,vt.jsx)(Jn.MenuItem,{ref:u,shortcut:r,children:d})}function _V({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,...n}){let i=t.length,s=t[0],{firstParentClientId:a,parentBlockType:c,previousBlockClientId:u,selectedBlockClientIds:d,isContentOnly:f,isZoomOut:m,canEdit:h}=(0,Pm.useSelect)(C=>{let{getBlockName:B,getBlockRootClientId:I,getPreviousBlockClientId:O,getSelectedBlockClientIds:E,getBlockAttributes:L,getBlockEditingMode:T,isZoomOut:R,canEditBlock:D}=M(C(_)),{getActiveBlockVariation:j}=C(xg.store),G=I(s),z=G&&B(G);return{firstParentClientId:G,parentBlockType:G&&(j(z,L(G))||(0,xg.getBlockType)(z)),previousBlockClientId:O(s),selectedBlockClientIds:E(),isContentOnly:T(s)==="contentOnly",isZoomOut:R(),canEdit:D(s)}},[s]),{getBlockOrder:p,getSelectedBlockClientIds:g}=(0,Pm.useSelect)(_),b=(0,Pm.useSelect)(C=>{let{getShortcutRepresentation:B}=C(rX.store);return{copy:B("core/block-editor/copy"),cut:B("core/block-editor/cut"),duplicate:B("core/block-editor/duplicate"),remove:B("core/block-editor/remove"),insertAfter:B("core/block-editor/insert-after"),insertBefore:B("core/block-editor/insert-before")}},[]),v=d.length>0;async function k(C){if(!r)return;let B=await C;B&&B[0]&&r(B[0],!1)}function y(){if(!r)return;let C=u||a;C||(C=p()[0]);let B=v&&g().length===0;r(C,B)}let x=!d?.includes(a)&&!!a;return(0,vt.jsx)(yZ,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:C,canDuplicate:B,canInsertBlock:I,canRemove:O,onDuplicate:E,onInsertAfter:L,onInsertBefore:T,onRemove:R,onCopy:D,onPasteStyles:j})=>!O&&!B&&!I&&f?null:(0,vt.jsx)(Jn.DropdownMenu,{icon:ks,label:(0,Pa.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:KCe,noIcons:!0,...n,children:({onClose:z})=>(0,vt.jsxs)(vt.Fragment,{children:[(0,vt.jsxs)(Jn.MenuGroup,{children:[(0,vt.jsx)(wE.Slot,{fillProps:{onClose:z}}),x&&(0,vt.jsx)(oX,{parentClientId:a,parentBlockType:c}),h&&i===1&&(0,vt.jsx)(CZ,{clientId:s}),!f&&(0,vt.jsx)(SV,{clientIds:t,onCopy:D,shortcut:b.copy}),O&&!f&&(0,vt.jsx)(SV,{clientIds:t,label:(0,Pa.__)("Cut"),eventType:"cut",shortcut:b.cut,__experimentalUpdateSelection:!r}),B&&(0,vt.jsx)(Jn.MenuItem,{onClick:(0,Im.pipe)(z,E,k),shortcut:b.duplicate,children:(0,Pa.__)("Duplicate")}),I&&!m&&(0,vt.jsxs)(vt.Fragment,{children:[(0,vt.jsx)(Jn.MenuItem,{onClick:(0,Im.pipe)(z,T),shortcut:b.insertBefore,children:(0,Pa.__)("Add before")}),(0,vt.jsx)(Jn.MenuItem,{onClick:(0,Im.pipe)(z,L),shortcut:b.insertAfter,children:(0,Pa.__)("Add after")})]}),h&&i===1&&(0,vt.jsx)(SE.Slot,{fillProps:{clientId:s,onClose:z}})]}),C&&!f&&(0,vt.jsxs)(Jn.MenuGroup,{children:[(0,vt.jsx)(SV,{clientIds:t,onCopy:D,label:(0,Pa.__)("Copy styles"),eventType:"copyStyles"}),h&&(0,vt.jsx)(Jn.MenuItem,{onClick:j,children:(0,Pa.__)("Paste styles")})]}),!f&&(0,vt.jsx)(NE.Slot,{fillProps:{onClose:z,count:i,firstBlockClientId:s},clientIds:t}),typeof o=="function"?o({onClose:z}):DE.Children.map(H=>(0,DE.cloneElement)(H,{onClose:z})),O&&(0,vt.jsx)(Jn.MenuGroup,{children:(0,vt.jsx)(Jn.MenuItem,{onClick:(0,Im.pipe)(z,R,y),shortcut:b.remove,children:(0,Pa.__)("Delete")})})]})})})}var nX=_V;var iX=l(A(),1),YCe=(0,iX.createSlotFill)(Symbol("CommentIconToolbarSlotFill")),VE=YCe;var wg=l(w(),1);function qCe({clientIds:e,...t}){return(0,wg.jsxs)(FE.ToolbarGroup,{children:[(0,wg.jsx)(VE.Slot,{}),(0,wg.jsx)(FE.ToolbarItem,{children:o=>(0,wg.jsx)(nX,{clientIds:e,toggleProps:o,...t})})]})}var zE=qCe;var jE=l(A(),1),sX=l(N(),1),UE=l(F(),1);var xV=l(w(),1);function aX({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,UE.useSelect)(n=>!!t&&n(_).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,UE.useDispatch)(_);return o?(0,xV.jsx)(jE.ToolbarGroup,{children:(0,xV.jsx)(jE.ToolbarButton,{onClick:()=>{r(t)},children:(0,sX.__)("Edit visually")})}):null}var HE=l(A(),1),Kr=l(P(),1),uX=l(F(),1),dX=l(Re(),1),CV=l(Fe(),1),fX=l(Is(),1),mX=l(it(),1);var wV=l(w(),1);function ZCe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function lX(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function cX(e){return e.contains(e.ownerDocument.activeElement)}function XCe(e){let[t]=CV.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function QCe(e){let[o,r]=(0,Kr.useState)(!0),n=(0,Kr.useCallback)(()=>{let i=CV.focus.tabbable.find(e.current),s=ZCe(i);s||(0,dX.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,Kr.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function JCe({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,Kr.useState)(t),[c]=(0,Kr.useState)(r),u=(0,Kr.useCallback)(()=>{XCe(e.current)},[e]);(0,fX.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,Kr.useEffect)(()=>{a&&u()},[o,a,u]),(0,Kr.useEffect)(()=>{let m=e.current,h=0;return!a&&!cX(m)&&(h=window.requestAnimationFrame(()=>{let p=lX(m),g=c||0;p[g]&&cX(m)&&p[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(h),!n||!m)return;let g=lX(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=M((0,uX.useSelect)(_));(0,Kr.useEffect)(()=>{let m=e.current;if(s){let h=p=>{let g=f();p.keyCode===mX.ESCAPE&&g?.current&&(p.preventDefault(),g.current.focus())};return m.addEventListener("keydown",h),()=>{m.removeEventListener("keydown",h)}}},[s,f,e])}function Cg({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,Kr.useRef)(),u=QCe(c);return JCe({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,wV.jsx)(HE.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,wV.jsx)(HE.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var pX=l(F(),1),GE=l($(),1);function WE(){return(0,pX.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(_),i=n(),s=i&&(0,GE.getBlockType)(r(i));return s&&(0,GE.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var id=l(A(),1),hX=l(N(),1),gX=l($(),1),bX=l(P(),1),$E=l(F(),1);var Bg=l(w(),1),BV=[],e1e=6,t1e={placement:"bottom-start"};function kX({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,$E.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(_),f=c(e),m=f?.metadata?.categories||BV,h=u(e),p=m.length>0?d(h):BV;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:p}},[e]),{replaceBlocks:n}=(0,$E.useDispatch)(_),i=(0,bX.useMemo)(()=>t.length===0||!r||r.length===0?BV: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,e1e),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,gX.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,Bg.jsx)(id.Dropdown,{popoverProps:t1e,renderToggle:({onToggle:a,isOpen:c})=>(0,Bg.jsx)(id.ToolbarGroup,{children:(0,Bg.jsx)(id.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,hX.__)("Change design")})}),renderContent:()=>(0,Bg.jsx)(id.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,Bg.jsx)(Ca,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var js=l(A(),1),UX=l(N(),1),tT=l(F(),1);var qE=l(F(),1),sd=l($(),1),xX=l(P(),1);var EV=l(KE(),1),yX=l(N(),1);function SX(e,t){for(let o of new EV.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 YE(e)}function Eg(e,t,o){let r=new EV.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function _X(e){return!e||e.length===0?[]:YE(e)?e:[{name:"default",label:(0,yX._x)("Default","block style"),isDefault:!0},...e]}function YE(e){return e?.find(t=>t.isDefault)}function o1e(e,t){return(0,xX.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,sd.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,sd.cloneBlock)(e)},[e,t?.example,t?.name])}function Tg({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:h}=m(_),p=h(e);if(!p)return{};let g=(0,sd.getBlockType)(p.name),{getBlockStyles:b}=m(sd.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,qE.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,qE.useDispatch)(_),c=_X(r),u=SX(c,s),d=o1e(n,i);return{onSelect:m=>{let h=Eg(s,u,m);a(e,{className:h}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var Ag=l($(),1),wS=l(F(),1),eT=l(P(),1);function wX(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 Ro=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var BX=l(zv(),1);var r1e="1600px",n1e="320px",i1e=1,s1e=.25,a1e=.75,l1e="14px";function CX({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=n1e,maximumViewportWidth:n=r1e,scaleFactor:i=i1e,minimumFontSizeLimit:s}){if(s=Ra(s)?s:l1e,o){let y=Ra(o);if(!y?.unit||!y?.value)return null;let S=Ra(s,{coerceTo:y.unit});if(S?.value&&!e&&!t&&y?.value<=S?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let x=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),s1e),a1e),B=vS(y.value*C,3);S?.value&&B<S?.value?e=`${S.value}${S.unit}`:e=`${B}${y.unit}`}}let a=Ra(e),c=a?.unit||"rem",u=Ra(t,{coerceTo:c});if(!a||!u)return null;let d=Ra(e,{coerceTo:"rem"}),f=Ra(n,{coerceTo:c}),m=Ra(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=vS(m.value/100,3),g=vS(p,3)+c,b=100*((u.value-a.value)/h),v=vS((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function Ra(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:vS(d,3),unit:u}:null}function vS(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function TV(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function c1e(e){let t=e?.typography??{},o=e?.layout,r=Ra(o?.wideSize)?o?.wideSize:null;return TV(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function tc(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!TV(t?.typography)&&!TV(e))return o;let r=c1e(t)?.fluid??{},n=CX({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 Oa="body",yS=":root",ZE=[{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)=>tc(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 zs(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 EX(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=zs(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=zs(e,s)}))}),o}function TX(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function IX(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 u1e(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,BX.getCSSValueFromRawStyle)(Ro(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function d1e(e,t){if(!e||!t||!Array.isArray(t))return e;let o=t.find(r=>r?.name===e);return o?.href?o?.href:e}function Ig(e,t){if(!e||!t)return e;let o=u1e(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=d1e(o.url,t?._links?.["wp:theme-file"])),o}function PX(e,t,o=[],r="slug",n){let i=[t?Ro(e,["blocks",t,...o]):void 0,Ro(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"||PX(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function f1e(e,t,o,[r,n]=[]){let i=ZE.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=PX(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return xn(e,t,c)}return o}function m1e(e,t,o,r=[]){let n=(t?Ro(e?.settings??{},["blocks",t,"custom",...r]):void 0)??Ro(e?.settings??{},["custom",...r]);return n?xn(e,t,n):o}function xn(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=Ro(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"?f1e(e,t,o,c):a==="custom"?m1e(e,t,o,c):o}var Yr=l($(),1),_S=l(zv(),1),FX=l(F(),1);function ei(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 Ro(i,`${c}.root`,null)||Ro(i,c,null)||m;let h=s?Ro(s,`${c}.__experimentalSelector`,null):void 0;return h?zs(u,h):m}let f;return a&&(f=Ro(i,c,null)),f||(r?ei(e,d[0],o):null)}function Rg(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 PV(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function E1e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function RV(e,t="0"){let o=E1e(e);if(!o)return null;let r=PV(o?.top)||t,n=PV(o?.left)||t;return r===n?r:`${r} ${n}`}var LX={backgroundSize:"cover",backgroundPosition:"50% 50%"};function NX(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:LX.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:LX.backgroundPosition}),t}var MX={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 T1e={button:"wp-element-button",caption:"wp-element-caption"},I1e={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function P1e(e="*",t={}){return ZE.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=Ro(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Rg(c)}-${u}`,m=e.split(",").map(p=>`${p}${f}`).join(","),h=`var(--wp--preset--${n}--${Rg(c)})`;o+=`${m}{${d}: ${h} !important;}`})})}),o},"")}function R1e(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var DX=(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},VX=(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=Og(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=Og(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function Og(e={},t="",o,r={},n=!1){let i=Oa===t,s=Object.entries(Yr.__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=Ro(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(!Ro(g,[k],!1))return;let y=v.startsWith("--")?v:Rg(v);c.push(`${y}: ${(0,_S.getCSSValueFromRawStyle)(Ro(g,[k]))}`)});else if(Ro(e,p,!1)){let b=u.startsWith("--")?u:Rg(u);c.push(`${b}: ${(0,_S.getCSSValueFromRawStyle)(Ro(e,p))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Ig(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...NX(e.background)}})),(0,_S.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:Rg(c.key),d=Ig(c.value,r);u==="font-size"&&(d=tc({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function OV({layoutDefinitions:e=MX,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?RV(t?.spacing?.blockGap):"";if(n&&(o===Oa?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===Oa?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:h=o===Oa?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),o===Oa&&r&&(s+=`${yS} { --wp--style--block-gap: ${a}; }`)),o===Oa&&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 O1e=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function XE(e){if(!e)return{};let r=Object.entries(e).filter(([n])=>O1e.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(r)}var A1e=(e,t)=>{let o=[];if(!e?.styles)return o;let r=XE(e.styles);return r&&o.push({styles:r,selector:Oa,skipSelectorWrapper:!0}),Object.entries(Yr.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!T1e[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=XE(i),a=i,c=[];if(a?.variations){let u={};Object.entries(a.variations).forEach(([d,f])=>{let m=f;u[d]=XE(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&&Yr.__EXPERIMENTAL_ELEMENTS[p]&&c.push({styles:g,selector:zs(h,Yr.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(m?.blocks??{}).forEach(([p,g])=>{let b=typeof t!="string"?zs(h,t[p]?.selector):void 0,v=typeof t!="string"?zs(h,t[p]?.duotoneSelector):void 0,k=typeof t!="string"?EX(h,t[p]?.featureSelectors??{}):void 0,y=XE(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,x])=>{x&&Yr.__EXPERIMENTAL_ELEMENTS[S]&&c.push({styles:x,selector:zs(b,Yr.__EXPERIMENTAL_ELEMENTS[S])})}))})}),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]&&Yr.__EXPERIMENTAL_ELEMENTS[u]&&o.push({styles:d,selector:t[n]?.selector.split(",").map(f=>Yr.__EXPERIMENTAL_ELEMENTS[u].split(",").map(h=>f+" "+h)).join(",")})}),o.push(...c)}),o},L1e=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return ZE.forEach(({path:c})=>{let u=Ro(s,c,!1);u!==!1&&(a=wX(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:yS}),Object.entries(e.settings?.blocks??{}).forEach(([s,a])=>{let c=a.custom;if(typeof t=="string"||!t[s])return;let u=r(a);(Object.keys(u).length>0||c)&&o.push({presets:u,custom:c,selector:t[s]?.selector})}),o};var QE=(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=A1e(e,t),u=L1e(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+=`${yS} {`,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) }
.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
`),p+="}"),a.blockStyles&&c.forEach(({selector:g,duotoneSelector:b,styles:v,fallbackGapValue:k,hasLayoutSupport:y,featureSelectors:S,styleVariationSelectors:x,skipSelectorWrapper:C,name:B})=>{if(S){let E=VX(S,v);E=DX(E,e.settings,B),Object.entries(E).forEach(([L,T])=>{if(T.length){let R=T.join(";");p+=`:root :where(${L}){${R};}`}})}if(b){let E={};v?.filter&&(E.filter=v.filter,delete v.filter);let L=Og(E);L.length&&(p+=`${b}{${L.join(";")};}`)}!n&&(Oa===g||y)&&(p+=OV({style:v,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:k}));let I=Og(v,g,d,e,i);if(I?.length){let E=C?g:`:root :where(${g})`;p+=`${E}{${I.join(";")};}`}v?.css&&(p+=xS(v.css,`:root :where(${g})`)),a.variationStyles&&x&&Object.entries(x).forEach(([E,L])=>{let T=v?.variations?.[E];if(T){if(S){let D=VX(S,T);D=DX(D,e.settings,B),Object.entries(D).forEach(([j,G])=>{if(G.length){let z=R1e(j,L),H=G.join(";");p+=`:root :where(${z}){${H};}`}})}let R=Og(T,L,d,e);if(R.length&&(p+=`:root :where(${L}){${R.join(";")};}`),T?.css&&(p+=xS(T.css,`:root :where(${L})`)),y&&T?.spacing?.blockGap){let D=L+g;p+=OV({style:T,selector:D,hasBlockGapSupport:!0,hasFallbackGapSupport:r,fallbackGapValue:k})}}});let O=Object.entries(v).filter(([E])=>E.startsWith(":"));O?.length&&O.forEach(([E,L])=>{let T=Og(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=RV(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})=>{(Oa===g||yS===g)&&(g="");let v=P1e(g,b);v.length>0&&(p+=v)}),p};var N1e=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(I1e).forEach(([r,n])=>{let i=ei(e,r);i&&(o[n]=i)}),o},JE=(e,t)=>{let{getBlockStyles:o}=(0,FX.select)(Yr.store),r={};return e.forEach(n=>{let i=n.name,s=ei(n);if(!s)return;let a=ei(n,"filter.duotone");if(!a){let h=ei(n),p=(0,Yr.getBlockSupport)(n,"color.__experimentalDuotone",!1);a=p&&h&&zs(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=IX(g,s);f[g]=b});let m=N1e(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 xS(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(" ")?zs(t,f):TX(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var CS=l(w(),1),AV="is-style-";function zX(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(AV)){let r=o.slice(AV.length);r!=="default"&&t.push(r)}return t},[]):[]}function LV(e,t=[]){let o=zX(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function M1e({override:e}){oc(e)}function NV({config:e}){let{getBlockStyles:t,overrides:o}=(0,wS.useSelect)(i=>({getBlockStyles:i(Ag.store).getBlockStyles,overrides:M(i(_)).getStyleOverrides()}),[]),{getBlockName:r}=(0,wS.useSelect)(_),n=(0,eT.useMemo)(()=>{if(!o?.length)return;let i=[],s=[];for(let[,a]of o)if(a?.variation&&a?.clientId&&!s.includes(a.clientId)){let c=r(a.clientId),u=e?.styles?.blocks?.[c]?.variations?.[a.variation];if(u){let d={settings:e?.settings,styles:{blocks:{[c]:{variations:{[`${a.variation}-${a.clientId}`]:u}}}}},f=JE((0,Ag.getBlockTypes)(),a.clientId),b=QE(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});i.push({id:`${a.variation}-${a.clientId}`,css:b,__unstableType:"variation",variation:a.variation,clientId:a.clientId}),s.push(a.clientId)}}return i},[e,o,t,r]);return!n||!n.length?null:(0,CS.jsx)(CS.Fragment,{children:n.map(i=>(0,CS.jsx)(M1e,{override:i},i.id))})}function MV(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=yl(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 D1e(e,t,o){let{globalSettings:r,globalStyles:n}=(0,wS.useSelect)(i=>{let s=i(_).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[Si]}},[]);return(0,eT.useMemo)(()=>{let i=MV({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function V1e({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,wS.useSelect)(Ag.store),n=r(e),i=LV(t,n),s=`${AV}${i}-${o}`,{settings:a,styles:c}=D1e(e,i,o),u=(0,eT.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=JE((0,Ag.getBlockTypes)(),o);return QE(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 oc({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var jX={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>zX(e).length>0,useBlockProps:V1e};var ad=l(w(),1),F1e=(0,ad.jsxs)(js.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,ad.jsx)(js.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,ad.jsx)(js.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 z1e({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=Tg({clientId:e}),{updateBlockAttributes:n}=(0,tT.useDispatch)(_),{globalSettings:i,globalStyles:s,blockName:a}=(0,tT.useSelect)(d=>{let f=d(_).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[Si],blockName:d(_).getBlockName(e)}},[e]),c=o?.name?MV({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,ad.jsx)(js.ToolbarGroup,{children:(0,ad.jsx)(js.ToolbarButton,{onClick:()=>{let f=(t.findIndex(p=>p.name===o.name)+1)%t.length,m=t[f],h=Eg(r,o,m);n(e,{className:h})},label:(0,UX.__)("Shuffle styles"),children:(0,ad.jsx)(js.Icon,{icon:F1e,style:{fill:c||"transparent"}})})})}var HX=z1e;var nT=l(A(),1),DV=l(N(),1),GX=l(F(),1),iT=l($(),1);var oT=l(F(),1);function rT(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,oT.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:h}=M(u(_)),p=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:h(e),isEditingContentOnlySection:p===e,editedContentOnlySection:p}},[e]),s=(0,oT.useDispatch)(_),{editContentOnlySection:a,stopEditingContentOnlySection:c}=M(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var VV=l(w(),1);function WX({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=rT(e),i=(0,GX.useSelect)(c=>{if(!e)return null;let{getBlockName:u}=c(_),d=u(e);return d?{name:d}:null},[e]);if(!e||!t&&!o||(0,iT.isReusableBlock)(i)||(0,iT.isTemplatePart)(i))return null;let s=o;return(0,VV.jsx)(nT.ToolbarGroup,{children:(0,VV.jsx)(nT.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,DV.__)("Exit pattern"):(0,DV.__)("Edit pattern")})})}var bQ=l(A(),1),kQ=l(N(),1),vQ=l(F(),1);var IS=l($(),1),yQ=l(Xp(),1);var Aa=l(N(),1),La=l(A(),1),ld=l($(),1),fT=l(F(),1);var JX=l(N(),1),BS=l(A(),1),lT=l($(),1),cT=l(P(),1);var $X=l(N(),1),KX=l(A(),1),YX=l(Z(),1);var Rm=l(w(),1);function sT({blocks:e}){return(0,YX.useViewportMatch)("medium","<")?null:(0,Rm.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,Rm.jsx)(KX.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,Rm.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,Rm.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,$X.__)("Preview")}),(0,Rm.jsx)(kn,{viewportWidth:601,blocks:e})]})})})}var qX=l(A(),1),Lg=l($(),1),ZX=l(F(),1),aT=l(P(),1);var rc=l(w(),1),j1e={};function XX({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,ZX.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(_),{getActiveBlockVariation:c,getBlockVariations:u}=i(Lg.store),d=a(e);if(t.length!==1||!d)return j1e;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,aT.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var U1e=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,aT.useState)();return(0,rc.jsxs)(rc.Fragment,{children:[r&&(0,rc.jsx)(sT,{blocks:(0,Lg.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,rc.jsx)(H1e,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function H1e({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,rc.jsxs)(qX.MenuItem,{className:(0,Lg.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,rc.jsx)(Oe,{icon:n,showColors:!0}),i]})}var QX=U1e;var wn=l(w(),1);function G1e(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,cT.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 W1e=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,cT.useState)(),{priorityTextTransformations:c,restTransformations:u}=G1e(t),d=c.length&&u.length,f=!!u.length&&(0,wn.jsx)($1e,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsxs)(BS.MenuGroup,{label:(0,JX.__)("Transform to"),className:e,children:[s&&(0,wn.jsx)(sT,{blocks:(0,lT.switchToBlockType)(i,s)}),!!o?.length&&(0,wn.jsx)(QX,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,wn.jsx)(eQ,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,wn.jsx)(BS.MenuGroup,{className:e,children:f})]})};function $1e({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,wn.jsx)(eQ,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function eQ({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,wn.jsxs)(BS.MenuItem,{className:(0,lT.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),children:[(0,wn.jsx)(Oe,{icon:n,showColors:!0}),i]})}var tQ=W1e;var rQ=l(N(),1),nQ=l(A(),1);var uT=l(A(),1);var Ng=l(w(),1),K1e=()=>{};function oQ({clientId:e,onSwitch:t=K1e}){let{onSelect:o,stylesToRender:r,activeStyle:n}=Tg({clientId:e,onSwitch:t});return!r||r.length===0?null:(0,Ng.jsx)(Ng.Fragment,{children:r.map(i=>{let s=i.label||i.name;return(0,Ng.jsx)(uT.MenuItem,{icon:n.name===i.name?gl:null,onClick:()=>o(i),children:(0,Ng.jsx)(uT.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:s})},i.name)})})}var FV=l(w(),1);function iQ({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e;return(0,FV.jsx)(nQ.MenuGroup,{label:(0,rQ.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,FV.jsx)(oQ,{clientId:o,onSwitch:t})})}var jV=l(N(),1),dQ=l(P(),1),dT=l(Z(),1);var Us=l(A(),1);var lQ=l(P(),1),cQ=l($(),1);var sQ=l($(),1),zV=(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=zV(s,t,o);if(a)return a}}},aQ=(e,t)=>{let o=(0,sQ.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var Y1e=(e,t)=>{let o=aQ(t.name,t.attributes);e.attributes={...e.attributes,...o}},q1e=(e,t)=>{let o=t.map(n=>(0,cQ.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=zV(s,n.name,r);if(a){i=!0,r.add(a.clientId),Y1e(a,n);break}}if(!i)return}return o},Z1e=(e,t)=>(0,lQ.useMemo)(()=>e.reduce((o,r)=>{let n=q1e(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),uQ=Z1e;var hr=l(w(),1);function X1e({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,dQ.useState)(!1),i=uQ(t,e);return i.length?(0,hr.jsxs)(Us.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,hr.jsx)(Q1e,{patterns:i,onSelect:o}),(0,hr.jsx)(Us.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Vo,children:(0,jV.__)("Patterns")})]}):null}function Q1e({patterns:e,onSelect:t}){let o=(0,dT.useViewportMatch)("medium","<");return(0,hr.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,hr.jsx)(Us.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,hr.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,hr.jsx)(J1e,{patterns:e,onSelect:t})})})})}function J1e({patterns:e,onSelect:t}){return(0,hr.jsx)(Us.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,jV.__)("Patterns list"),children:e.map(o=>(0,hr.jsx)(fQ,{pattern:o,onSelect:t},o.name))})}function fQ({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,dT.useInstanceId)(fQ,`${o}-list__item-description`);return(0,hr.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,hr.jsxs)(Us.Composite.Item,{render:(0,hr.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,hr.jsx)(kn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,hr.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,hr.jsx)(Us.VisuallyHidden,{id:r,children:e.description})]})}var mQ=X1e;var ti=l(w(),1);function eBe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,fT.useDispatch)(_),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,fT.useSelect)(I=>{let{getBlockAttributes:O,getBlocksByClientId:E,getBlockRootClientId:L,getBlockTransformItems:T,__experimentalGetPatternTransformItems:R,canRemoveBlocks:D,getBlockName:j}=I(_),{getBlockStyles:G}=I(ld.store),z=L(t[0]),H=E(t),W=t.length===1,te=W&&j(t[0]),ne=W&&!!G(te)?.length;return{blocks:H,possibleBlockTransformations:T(H,z),patterns:R(H,z),isUsingBindings:t.every(ae=>!!O(ae)?.metadata?.bindings),canRemove:D(t),hasBlockStyles:ne}},[t]),f=XX({clientIds:t,blocks:a});function m(I){I.length>1&&r(I[0].clientId,I[I.length-1].clientId)}function h(I){let O=(0,ld.switchToBlockType)(a,I);o(t,O),m(O)}function p(I){n(a[0].clientId,{...f.find(({name:O})=>O===I).attributes})}function g(I){o(t,I),m(I)}let b=a.length===1,v=b&&((0,ld.isTemplatePart)(a[0])||(0,ld.isReusableBlock)(a[0])),k=!!i?.length&&u&&!v,y=!!f?.length,S=!!s?.length&&u,x=k||y;if(!(d||x||S))return(0,ti.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,Aa.__)("No transforms.")});let B=b?(0,Aa._x)("This block is connected.","block toolbar button label and description"):(0,Aa._x)("These blocks are connected.","block toolbar button label and description");return(0,ti.jsxs)("div",{className:"block-editor-block-switcher__container",children:[S&&(0,ti.jsx)(mQ,{blocks:a,patterns:s,onSelect:I=>{g(I),e()}}),x&&(0,ti.jsx)(tQ,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:I=>{h(I),e()},onSelectVariation:I=>{p(I),e()}}),d&&(0,ti.jsx)(iQ,{hoveredBlock:a[0],onSwitch:e}),c&&(0,ti.jsx)(La.MenuGroup,{children:(0,ti.jsx)(La.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:B})})]})}var tBe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,Aa.__)("Change block type or style"):(0,Aa.sprintf)((0,Aa._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,ti.jsx)(La.ToolbarGroup,{children:(0,ti.jsx)(La.ToolbarItem,{children:s=>(0,ti.jsx)(La.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:e,text:r,toggleProps:{description:i,...s},menuProps:{orientation:"both"},children:({onClose:a})=>(0,ti.jsx)(eBe,{onClose:a,clientIds:t})})})})},pQ=tBe;var Mg=l(A(),1),ES=l(N(),1),mT=l(P(),1),hQ=l(F(),1);var nc=l(w(),1);function oBe({clientIds:e,blockTitle:t}){let o=(0,hQ.useSelect)(i=>{let{getBlockAttributes:s}=i(_);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,nc.jsx)(Mg.__experimentalText,{children:n})}function gQ({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,mT.useState)(!1),s=(0,mT.useRef)();return(0,nc.jsxs)(nc.Fragment,{children:[(0,nc.jsx)(Mg.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,nc.jsx)(Mg.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,nc.jsx)(oBe,{clientIds:t,blockTitle:o})})]})}var TS=l(w(),1);function rBe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:c}=M(e(_)),{getBlockStyles:u}=e(IS.store),d=t.some(B=>s(B)==="contentOnly"),f=t.length===1,m=f&&o(t[0]),h=f&&!!u(m)?.length,p=t.some(B=>!!r(B)?.metadata?.patternName),g=t.every(B=>Uk(r(B)?.metadata?.bindings)),b=t.every(B=>n(B,"core/block",!0).length>0),v=i(t),k=t.every(B=>c(B)),y=a(t[0])==="default",x=!p&&y&&(h||v)&&!d&&k,C=g&&b;return x?"switcher":C?"pattern-overrides":"default"}function nBe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=M(e(_)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName)return Ci;let a=o(i),c=(0,IS.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(IS.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:_f}function SQ({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,vQ.useSelect)(f=>({icon:nBe({select:f,clientIds:e}),showIconLabels:f(yQ.store).get("core","showIconLabels"),variant:rBe({select:f,clientIds:e})}),[e]),i=Fr({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,kQ.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,TS.jsx)(Oe,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,TS.jsx)(pQ,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,TS.jsx)(gQ,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,TS.jsx)(bQ.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var Qe=l(w(),1);function HV({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:S,areSelectedBlocksHiddenOnViewport:x}=(0,xQ.useSelect)(j=>{let{getBlockName:G,getBlockMode:z,getBlockParents:H,getSelectedBlockClientIds:W,isBlockValid:te,getBlockEditingMode:ne,getBlockAttributes:ae,getSettings:X,getTemplateLock:ee,getParentSectionBlock:le,isZoomOut:Q,isSectionBlock:J,isBlockHiddenAtViewport:q}=M(j(_)),U=W(),K=U[0],se=H(K),Se=le(K)??se[se.length-1],he=G(Se),we=(0,ic.getBlockType)(he),De=ne(K),ct=De==="default",Jt=G(K),uo=U.every(Ue=>te(Ue)),Do=U.every(Ue=>z(Ue)==="visual"),ot=U.every(Ue=>!!ae(Ue)?.metadata?.bindings),sr=U.some(Ue=>ee(Ue)==="contentOnly"),ze=Q(),wt=J(K),je=ze||wt,At=X()?.[_i]?.toLowerCase()||"desktop",ar=U.length>0&&U.every(Ue=>q(Ue,At));return{blockClientId:K,blockClientIds:U,isDefaultEditingMode:ct,blockType:K&&(0,ic.getBlockType)(Jt),shouldShowVisualToolbar:uo&&Do,toolbarKey:`${K}${Se}`,showParentSelector:!ze&&we&&De!=="contentOnly"&&ne(Se)!=="disabled"&&(0,ic.hasBlockSupport)(we,"__experimentalParentSelector",!0)&&U.length===1,isUsingBindings:ot,isSectionContainer:wt,hasContentOnlyLocking:sr,showShuffleButton:ze,showSlots:!ze,showGroupButtons:!ze,showLockButtons:!ze,showBlockVisibilityButton:!ze,showSwitchSectionStyleButton:je,areSelectedBlocksHiddenOnViewport:ar}},[]),C=(0,UV.useRef)(null),B=(0,UV.useRef)(),I=bg({ref:B}),O=!(0,wQ.useViewportMatch)("medium","<");if(!WE())return null;let L=s.length>1,T=(0,ic.isReusableBlock)(c)||(0,ic.isTemplatePart)(c),R=V("block-editor-block-contextual-toolbar",{"has-parent":f}),D=V("block-editor-block-toolbar",{"is-synced":T,"is-connected":m});return(0,Qe.jsx)(Cg,{focusEditorOnEscape:!0,className:R,"aria-label":(0,_Q.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,Qe.jsxs)("div",{ref:C,className:D,children:[f&&!L&&O&&(0,Qe.jsx)(qq,{}),(d||L)&&(0,Qe.jsx)("div",{ref:B,...I,children:(0,Qe.jsxs)(CQ.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,Qe.jsx)(SQ,{clientIds:s,isSynced:T}),a&&y&&(0,Qe.jsx)(SD,{clientIds:s}),!L&&a&&k&&(0,Qe.jsx)(bV,{clientId:i}),(0,Qe.jsx)(pE,{clientIds:s,hideDragHandle:e})]})}),!x&&!p&&d&&L&&v&&(0,Qe.jsx)(fV,{}),!L&&(0,Qe.jsx)(WX,{clientId:s[0]}),!x&&g&&(0,Qe.jsx)(kX,{clientId:s[0]}),!x&&S&&(0,Qe.jsx)(HX,{clientId:s[0]}),!x&&d&&b&&(0,Qe.jsxs)(Qe.Fragment,{children:[!h&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Mt.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,Qe.jsx)(Mt.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(vE.Slot,{})]}),(0,Qe.jsx)(aX,{clientIds:s}),(0,Qe.jsx)(zE,{clientIds:s})]})},u)}function BQ({hideDragHandle:e,variant:t}){return(0,Qe.jsx)(HV,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var GV=l(w(),1);function IQ({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=iE(e),s=(0,Dg.useRef)();(0,Dg.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,EQ.useDispatch)(_),c=(0,Dg.useRef)(!1);(0,TQ.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,Dg.useEffect)(()=>{c.current=!1});let u=r||e,d=nE({contentElement:o?.current,clientId:u});return!t&&(0,GV.jsx)(fm,{clientId:u,bottomClientId:i,className:V("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,GV.jsx)(HV,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var pT=l(F(),1),hT=l(P(),1);var PQ=l(A(),1);var RQ=l(N(),1),OQ=l(w(),1);function iBe({onClick:e}){return(0,OQ.jsx)(PQ.Button,{variant:"primary",icon:wi,size:"compact",className:V("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,RQ._x)("Add pattern","Generic label for pattern inserter button")})}var AQ=iBe;var WV=l(w(),1);function sBe(){let[e,t]=(0,hT.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,pT.useSelect)(p=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:v,getSelectedBlockClientId:k,getSectionRootClientId:y,getBlockInsertionPoint:S,isBlockInsertionPointVisible:x}=M(p(_)),C=y();return{hasSelection:!!v().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:k(),blockInsertionPoint:S(),insertionPointVisible:x()}},[]),{showInsertionPoint:u}=M((0,pT.useDispatch)(_));if((0,hT.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,WV.jsx)(OB,{previousClientId:d,nextClientId:h,children:(0,WV.jsx)(AQ,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var LQ=sBe;var NQ=l(F(),1),MQ=l($(),1);function DQ(){return(0,NQ.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=M(e(_)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,MQ.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,h=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:h}},[])}var Yi=l(w(),1);function aBe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=M(e(_));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a()}}function PS({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:c}=(0,Vg.useSelect)(aBe,[]),u=(0,VQ.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:f,getBlockRootClientId:m,getBlockEditingMode:h,getBlockName:p,isGroupable:g,getEditedContentOnlySection:b}=M((0,Vg.useSelect)(_)),{getGroupingBlockName:v}=(0,Vg.useSelect)(Fg.store),{showEmptyBlockSideInserter:k,showBlockToolbarPopover:y}=DQ(),S=vg(),[x,C]=(0,gT.useState)(null),{canRename:B}=Tm(p(f()[0])),{duplicateBlocks:I,removeBlocks:O,replaceBlocks:E,insertAfterBlock:L,insertBeforeBlock:T,selectBlock:R,moveBlocksUp:D,moveBlocksDown:j,expandBlock:G,stopEditingContentOnlySection:z,showViewportModal:H,hideViewportModal:W}=M((0,Vg.useDispatch)(_));function te(X){if(!X.defaultPrevented){if(u("core/block-editor/move-up",X)||u("core/block-editor/move-down",X)){let ee=f();if(ee.length){X.preventDefault();let le=m(ee[0]);(u("core/block-editor/move-up",X)?"up":"down")==="up"?D(ee,le):j(ee,le);let J=Array.isArray(ee)?ee.length:1,q=(0,zg.sprintf)((0,zg._n)("%d block moved.","%d blocks moved.",ee.length),J);(0,YV.speak)(q)}}else if(u("core/block-editor/duplicate",X)){let ee=f();ee.length&&(X.preventDefault(),I(ee))}else if(u("core/block-editor/remove",X)){let ee=f();ee.length&&(X.preventDefault(),O(ee))}else if(u("core/block-editor/paste-styles",X)){let ee=f();if(ee.length){X.preventDefault();let le=d(ee);S(le)}}else if(u("core/block-editor/insert-after",X)){let ee=f();ee.length&&(X.preventDefault(),L(ee[ee.length-1]))}else if(u("core/block-editor/insert-before",X)){let ee=f();ee.length&&(X.preventDefault(),T(ee[0]))}else if(u("core/block-editor/unselect",X)){if(X.target.closest("[role=toolbar]"))return;let ee=f();ee.length>1&&(X.preventDefault(),R(ee[0]))}else if(u("core/block-editor/collapse-list-view",X)){if((0,$V.isTextField)(X.target)||(0,$V.isTextField)(X.target?.contentWindow?.document?.activeElement))return;X.preventDefault(),G(r)}else if(u("core/block-editor/group",X)){let ee=f();if(ee.length>1&&g(ee)){X.preventDefault();let le=d(ee),Q=v(),J=(0,Fg.switchToBlockType)(le,Q);E(ee,J),(0,YV.speak)((0,zg.__)("Selected blocks are grouped."))}}else if(u("core/block-editor/rename",X)){let ee=f();if(ee.length===1){let le=h(ee[0])==="contentOnly";B&&!le&&(X.preventDefault(),C(ee[0]))}}else if(u("core/block-editor/toggle-block-visibility",X)){let ee=f();if(ee.length){if(X.preventDefault(),!d(ee).every(J=>(0,Fg.hasBlockSupport)(J.name,"visibility",!0))||ee.some(J=>h(J)!=="default"))return;H(ee)}}u("core/block-editor/stop-editing-as-blocks",X)&&b()&&z()}}let ne=dm(t),ae=dm(t);return(0,Yi.jsxs)("div",{...o,onKeyDown:te,className:V(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,Yi.jsxs)(dg.Provider,{value:(0,gT.useRef)(!1),children:[!i&&!s&&(0,Yi.jsx)(gY,{__unstableContentRef:t}),k&&(0,Yi.jsx)(Oq,{__unstableContentRef:t,clientId:r}),y&&(0,Yi.jsx)(IQ,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,Yi.jsx)(KV.Popover.Slot,{name:"block-toolbar",ref:ne}),e,(0,Yi.jsx)(KV.Popover.Slot,{name:"__unstable-block-tools-after",ref:ae}),s&&!a&&(0,Yi.jsx)(LQ,{__unstableContentRef:t})]}),x&&(0,Yi.jsx)(Bm,{clientId:x,onClose:()=>C(null)}),c&&(0,Yi.jsx)(bD,{clientIds:c,onClose:W})]})}var qi=l(N(),1),Na=l($(),1),sc=l(F(),1),qV=l(zQ(),1);var lBe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,sc.useDispatch)(_),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,sc.useSelect)(h=>{let{getBlockRootClientId:p,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:v,canRemoveBlocks:k}=h(_),y=b(),S=v(y);if(S.filter(C=>!C).length>0)return{invalidSelection:!0};let x=p(y[0]);return{blocks:S,clientIds:y,possibleBlockTransformations:g(S,x),canRemove:k(y),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let c=r.length===1&&(0,Na.isTemplatePart)(r[0]);function u(h){h.length>1&&o(h[0].clientId,h[h.length-1].clientId)}function d(h){let p=(0,Na.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:Xk}:b;return{name:"core/block-editor/transform-to-"+p.replace("/","-"),label:(0,qi.sprintf)((0,qi.__)("Transform to %s"),g),icon:v?.src,category:"command",callback:({close:k})=>{d(p),k()}}})}},cBe=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,sc.useSelect)(R=>{let{getSelectedBlockClientIds:D,isUngroupable:j,isGroupable:G}=R(_);return{clientIds:D(),isUngroupable:j(),isGroupable:G()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,isBlockHiddenAnywhere:c}=M((0,sc.useSelect)(_)),{getBlockEditingMode:u}=(0,sc.useSelect)(_),{getDefaultBlockName:d,getGroupingBlockName:f}=(0,sc.useSelect)(Na.store),m=s(t),h=(0,sc.useDispatch)(_),{removeBlocks:p,replaceBlocks:g,duplicateBlocks:b,insertAfterBlock:v,insertBeforeBlock:k}=h,y=()=>{if(!m.length)return;let R=f(),D=(0,Na.switchToBlockType)(m,R);D&&g(t,D)},S=()=>{if(!m.length)return;let R=m[0].innerBlocks;R.length&&g(t,R)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let{showViewportModal:x}=M(h),C=i(t[0]),B=n(d(),C),I=m.every(R=>!!R&&(0,Na.hasBlockSupport)(R.name,"multiple",!0)&&n(R.name,C)),O=a(t),E=[];I&&E.push({name:"duplicate",label:(0,qi.__)("Duplicate"),callback:()=>b(t,!0),icon:_f}),B&&E.push({name:"add-before",label:(0,qi.__)("Add before"),callback:()=>{let R=Array.isArray(t)?t[0]:R;k(R)},icon:wi},{name:"add-after",label:(0,qi.__)("Add after"),callback:()=>{let R=Array.isArray(t)?t[t.length-1]:R;v(R)},icon:wi}),r&&E.push({name:"Group",label:(0,qi.__)("Group"),callback:y,icon:ov}),o&&E.push({name:"ungroup",label:(0,qi.__)("Ungroup"),callback:S,icon:CN}),O&&E.push({name:"remove",label:(0,qi.__)("Delete"),callback:()=>p(t,!0),icon:xN});let L=m.every(R=>!!R&&(0,Na.hasBlockSupport)(R.name,"visibility",!0)),T=t.every(R=>u(R)==="default");if(L&&T){let R=t.some(D=>c(D));E.push({name:"toggle-visibility",label:R?(0,qi.__)("Show"):(0,qi.__)("Hide"),callback:()=>x(t),icon:R?Pf:vs})}return{isLoading:!1,commands:E.map(R=>({...R,name:"core/block-editor/action-"+R.name,category:"command",callback:({close:D})=>{R.callback(),D()}}))}},bT=()=>{(0,qV.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:lBe()}),(0,qV.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:cBe(),context:"block-selection-edit"})};var qr=l(w(),1),kT=(0,GQ.createSlotFill)(Symbol("BlockCanvasCover"));function jQ({children:e}){return(0,qr.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var uBe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function ZV({shouldIframe:e=!0,height:t="300px",children:o=(0,qr.jsx)(Hh,{}),styles:r,contentRef:n,iframeProps:i}){bT();let s=(0,vT.useViewportMatch)("medium","<"),a=tS(),c=mm(),u=(0,UQ.useRef)(),d=(0,vT.useMergeRefs)([n,c,u]),f=(0,HQ.useSelect)(h=>M(h(_)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,qr.jsx)(PS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,qr.jsxs)(Nh,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,qr.jsx)(kT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,qr.jsx)(jQ,{children:p},g))}),(0,qr.jsx)(Ml,{styles:r}),o]})}):(0,qr.jsxs)(PS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,qr.jsx)(kT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,qr.jsx)(jQ,{children:p},g))}),(0,qr.jsx)(Ml,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:uBe}),(0,qr.jsx)(x1,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function dBe({children:e,height:t,styles:o}){return(0,qr.jsx)(ZV,{height:t,styles:o,children:e})}var WQ=dBe;var Ma=l(A(),1),$Q=l(N(),1),KQ=l(it(),1),YQ=l(Re(),1),Zi=l(w(),1),fBe=()=>(0,Zi.jsx)(Ma.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,Zi.jsx)(Ma.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"})}),mBe=({style:e,className:t})=>(0,Zi.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,Zi.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,Zi.jsx)(fBe,{})})}),pBe=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===KQ.DOWN&&(s.preventDefault(),r())};return(0,Zi.jsx)(Ma.ToolbarGroup,{children:(0,Zi.jsx)(Ma.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,$Q.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,Zi.jsx)(t,{children:(0,Zi.jsx)(e,{children:(0,Zi.jsx)(mBe,{})})})})})},hBe=({children:e,...t})=>((0,YQ.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,Zi.jsx)(Ma.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:pBe(t),renderContent:()=>e})),qQ=hBe;var tee=l(Re(),1),MT=l(A(),1),o3=l(N(),1),oee=l(F(),1),ree=l(P(),1);var Kg=l(Z(),1),LT=l(A(),1),AS=l(F(),1),JJ=l(Re(),1),ko=l(P(),1),t3=l(N(),1);var IT=l(A(),1),PT=l(P(),1),RT=l(F(),1);var XQ=l(Z(),1),QQ=l(Zo(),1),JQ=l(F(),1),wT=l(P(),1),jg=l(N(),1);var yT=l(P(),1),ST=(0,yT.createContext)({});ST.displayName="ListViewContext";var cd=()=>(0,yT.useContext)(ST);var _T=l(P(),1),ZQ=l(w(),1);function xT({children:e,...t}){let o=(0,_T.useRef)();return(0,_T.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,ZQ.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var RS=l(w(),1),XV=(0,wT.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=cd(),a=(0,XQ.useInstanceId)(XV),{directInsert:c,hideInserter:u}=(0,JQ.useSelect)(p=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:v}=M(p(_)),y=g(o)?.directInsert||!1,S=!!b(o)||v();return{directInsert:y,hideInserter:S}},[o]),d=Fr({clientId:o,context:"list-view"}),f=Fr({clientId:i?.clientId,context:"list-view"});if((0,wT.useEffect)(()=>{f?.length&&(0,QQ.speak)((0,jg.sprintf)((0,jg.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,h=(0,jg.sprintf)((0,jg.__)("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)(Ui,{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)(xT,{id:m,children:h})]})});var fd=l($(),1),Am=l(A(),1),ET=l(Z(),1);var bo=l(P(),1),Hg=l(F(),1),JV=l(N(),1),TT=l(it(),1),wJ=l(Xy(),1),CJ=l(Is(),1),BJ=l(Zo(),1);var eJ=l(A(),1),tJ=l(Z(),1),oJ=l(P(),1);var rJ=l(w(),1),gBe=y7(eJ.__experimentalTreeGridRow),bBe=(0,oJ.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=GC({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,tJ.useMergeRefs)([u,d]);return(0,rJ.jsx)(gBe,{ref:f,className:V("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),nJ=bBe;var iJ=l(Fe(),1),sJ=l(P(),1);function aJ({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,sJ.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,iJ.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 gJ=l(P(),1);var ud=l(A(),1),mJ=l(P(),1);var BT=l(it(),1),pJ=l(F(),1);var lJ=l(N(),1),QV=l(w(),1);function CT({onClick:e}){return(0,QV.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,QV.jsx)(xe,{icon:(0,lJ.isRTL)()?Qk:eu})})}var cJ=l(P(),1),uJ=l(F(),1);var kBe=3,dJ={"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?dJ[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>=kBe)return t}return t}};function vBe(e,t){let o=dJ[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function fJ({clientId:e,isExpanded:t}){let{block:o}=(0,uJ.useSelect)(n=>({block:n(_).getBlock(e)}),[e]);return(0,cJ.useMemo)(()=>vBe(o,t),[o,t])}var jo=l(w(),1),{Badge:yBe}=M(ud.privateApis);function SBe({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=Tt(t),g=Fr({clientId:t,context:"list-view"}),{isLocked:b}=Qn(t),{hasPatternName:v,blockVisibility:k}=(0,pJ.useSelect)(O=>{let{getBlockAttributes:E}=M(O(_)),L=E(t);return{hasPatternName:!!L?.metadata?.patternName,blockVisibility:L?.metadata?.blockVisibility}},[t]),y=b,S=p?.positionType==="sticky",x=fJ({clientId:t,isExpanded:f}),C=hy(k),B=O=>{O.dataTransfer.clearData(),c?.(O)};function I(O){(O.keyCode===BT.ENTER||O.keyCode===BT.SPACE)&&o(O)}return(0,jo.jsxs)("a",{className:V("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:I,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,jo.jsx)(CT,{onClick:i}),(0,jo.jsx)(Oe,{icon:v?Ci:p?.icon,showColors:!0,context:"list-view"}),(0,jo.jsxs)(ud.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,jo.jsx)(ud.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),p?.anchor&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,jo.jsx)(yBe,{className:"block-editor-list-view-block-select-button__anchor",children:p.anchor})}),S&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,jo.jsx)(xe,{icon:IL})}),x.length?(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:x.map((O,E)=>(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${O.url})`,zIndex:x.length-E}},O.clientId))}):null,!!C&&(0,jo.jsx)(ud.Tooltip,{text:C,children:(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,jo.jsx)(xe,{icon:vs})})}),y&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,jo.jsx)(xe,{icon:SL})})]})]})}var hJ=(0,mJ.forwardRef)(SBe);var dd=l(w(),1),_Be=(0,gJ.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}=cd(),g=c.includes(f)?c:[f];return(0,dd.jsxs)(dd.Fragment,{children:[m&&(0,dd.jsx)(m,{block:o,insertedBlock:h,setInsertedBlock:p}),(0,dd.jsx)(lE,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,dd.jsx)(hJ,{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})})]})}),bJ=_Be;var Om=l(N(),1),kJ=l(Fe(),1),vJ=(e,t,o)=>(0,Om.sprintf)((0,Om.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),yJ=(e,t)=>[e?.positionLabel?`${(0,Om.sprintf)((0,Om.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,Om.__)("This block is locked."):void 0].filter(Boolean).join(" "),SJ=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function _J(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 Ug(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&&kJ.focus.focusable.find(r)?.[0]?.focus()})}function xJ({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 Jo=l(w(),1);function EJ({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,bo.useRef)(null),k=(0,bo.useRef)(null),y=(0,bo.useRef)(null),[S,x]=(0,bo.useState)(!1),[C,B]=(0,bo.useState)(),[I,O]=(0,bo.useState)(!1),{isLocked:E}=Qn(e),L=i&&g[0]===e,T=i&&g[g.length-1]===e,{toggleBlockHighlight:R,duplicateBlocks:D,multiSelect:j,replaceBlocks:G,removeBlocks:z,insertAfterBlock:H,insertBeforeBlock:W,showViewportModal:te}=M((0,Hg.useDispatch)(_)),ne=(0,ET.useDebounce)(R,50),{canInsertBlockType:ae,getSelectedBlockClientIds:X,getPreviousBlockClientId:ee,getBlockRootClientId:le,getBlockOrder:Q,getBlockParents:J,getBlockEditingMode:q,getBlocksByClientId:U,canEditBlock:K,canMoveBlock:se,canRemoveBlocks:ce,isGroupable:Se}=(0,Hg.useSelect)(_),{getGroupingBlockName:he}=(0,Hg.useSelect)(fd.store),we=Tt(e),De=vg(),{block:ct,blockName:Jt,allowRightClickOverrides:uo}=(0,Hg.useSelect)(ue=>{let{getBlock:to,getBlockName:ve,getSettings:Lt}=M(ue(_));return{block:to(e),blockName:ve(e),allowRightClickOverrides:Lt().allowRightClickOverrides}},[e]),{canRename:Do}=Tm(Jt),ot=(0,fd.hasBlockSupport)(Jt,"__experimentalToolbar",!0),ze=`list-view-block-select-button__description-${(0,ET.useInstanceId)(EJ)}`,{expand:wt,collapse:je,collapseAll:At,BlockSettingsMenu:ar,listViewInstanceId:Ue,expandedState:Lr,setInsertedBlock:ki,treeGridElementRef:eo,rootClientId:Bo}=cd(),Xe=(0,CJ.__unstableUseShortcutEventMatch)();function Ve(){let ue=X(),to=ue.includes(e),ve=to?ue[0]:e,Lt=le(ve);return{blocksToUpdate:to?ue:[e],firstBlockClientId:ve,firstBlockRootClientId:Lt,selectedBlockClientIds:ue}}async function bt(ue){if(ue.defaultPrevented||ue.target.closest("[role=dialog]"))return;let to=[TT.BACKSPACE,TT.DELETE].includes(ue.keyCode);if(Xe("core/block-editor/unselect",ue)&&g.length>0)ue.stopPropagation(),ue.preventDefault(),a(ue,void 0);else if(to||Xe("core/block-editor/remove",ue)){let{blocksToUpdate:ve,firstBlockClientId:Lt,firstBlockRootClientId:ln,selectedBlockClientIds:Sr}=Ve();if(!ce(ve))return;let Wc=ee(Lt)??ln;z(ve,!1);let iO=Sr.length>0&&X().length===0;Wc||(Wc=Q()[0]),Ct(Wc,iO)}else if(Xe("core/block-editor/paste-styles",ue)){ue.preventDefault();let{blocksToUpdate:ve}=Ve(),Lt=U(ve);De(Lt)}else if(Xe("core/block-editor/duplicate",ue)){ue.preventDefault();let{blocksToUpdate:ve,firstBlockRootClientId:Lt}=Ve();if(U(ve).every(Sr=>!!Sr&&(0,fd.hasBlockSupport)(Sr.name,"multiple",!0)&&ae(Sr.name,Lt))){let Sr=await D(ve,!1);Sr?.length&&Ct(Sr[0],!1)}}else if(Xe("core/block-editor/insert-before",ue)){ue.preventDefault();let{blocksToUpdate:ve}=Ve();await W(ve[0]);let Lt=X();Ct(Lt[0],!1)}else if(Xe("core/block-editor/insert-after",ue)){ue.preventDefault();let{blocksToUpdate:ve}=Ve();await H(ve.at(-1));let Lt=X();Ct(Lt[0],!1)}else if(Xe("core/block-editor/select-all",ue)){ue.preventDefault();let{firstBlockRootClientId:ve,selectedBlockClientIds:Lt}=Ve(),ln=Q(ve);if(!ln.length)return;if((0,wJ.isShallowEqual)(Lt,ln)&&ve&&ve!==Bo){Ct(ve,!0);return}j(ln[0],ln[ln.length-1],null)}else if(Xe("core/block-editor/collapse-list-view",ue)){ue.preventDefault();let{firstBlockClientId:ve}=Ve(),Lt=J(ve,!1);At(),wt(Lt)}else if(Xe("core/block-editor/group",ue)){let{blocksToUpdate:ve}=Ve();if(ve.length>1&&Se(ve)){ue.preventDefault();let Lt=U(ve),ln=he(),Sr=(0,fd.switchToBlockType)(Lt,ln);G(ve,Sr),(0,BJ.speak)((0,JV.__)("Selected blocks are grouped."));let Wc=X();Ct(Wc[0],!1)}}else if(Xe("core/block-editor/toggle-block-visibility",ue)){ue.preventDefault();let{blocksToUpdate:ve}=Ve();if(!U(ve).every(Sr=>(0,fd.hasBlockSupport)(Sr.name,"visibility",!0))||ve.some(Sr=>q(Sr)!=="default"))return;te(ve)}else if(Xe("core/block-editor/rename",ue)){let{blocksToUpdate:ve}=Ve(),Lt=q(ve[0])==="contentOnly";ve.length===1&&Do&&!Lt&&(ue.preventDefault(),O(!0))}}let Eo=(0,bo.useCallback)(()=>{x(!0),ne(e,!0)},[e,x,ne]),lr=(0,bo.useCallback)(()=>{x(!1),ne(e,!1)},[e,x,ne]),ge=(0,bo.useCallback)(ue=>{a(ue,e),ue.preventDefault()},[e,a]),Ct=(0,bo.useCallback)((ue,to)=>{to&&a(void 0,ue,null,null),Ug(ue,eo?.current)},[a,eo]),To=(0,bo.useCallback)(ue=>{ue.preventDefault(),ue.stopPropagation(),p===!0?je(e):p===!1&&wt(e)},[e,wt,je,p]),Ye=(0,bo.useCallback)(ue=>{let{ownerDocument:to}=y?.current||{};!to||!to.hasFocus()||ot&&uo&&(y.current?.click(),B(new window.DOMRect(ue.clientX,ue.clientY,0,0)),ue.preventDefault())},[uo,y,ot]),oe=(0,bo.useCallback)(ue=>{uo&&ue.button===2&&ue.preventDefault()},[uo]),Ae=(0,bo.useMemo)(()=>{let{ownerDocument:ue}=k?.current||{};if(!(!C||!ue))return{ownerDocument:ue,getBoundingClientRect(){return C}}},[C]),ut=(0,bo.useCallback)(()=>{B(void 0)},[B]);if(aJ({isSelected:i,rowItemRef:k,selectedClientIds:g}),!ct)return null;let Gc=vJ(c,f,u),ca=yJ(we,E),Bp=hy(ct?.attributes?.metadata?.blockVisibility),Vk=f>0,ff=m&&Vk,an=V("block-editor-list-view-block__mover-cell",{"is-visible":S||i}),Ep=V("block-editor-list-view-block__menu-cell",{"is-visible":S||L}),Tp;ff?Tp=2:ot||(Tp=3);let o0=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":!ot,"is-synced":we?.isSynced,"is-draggable":se,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),r0=g.includes(e)?g:[e],Fk=i&&g.length===1;return(0,Jo.jsxs)(nJ,{className:o0,isDragged:r,onKeyDown:bt,onMouseEnter:Eo,onMouseLeave:lr,onFocus:Eo,onBlur:lr,level:u,position:c,rowCount:d,path:h,id:`list-view-${Ue}-block-${e}`,"data-block":e,"data-expanded":K?p:void 0,ref:k,children:[(0,Jo.jsx)(Am.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Tp,ref:v,"aria-selected":!!i,children:({ref:ue,tabIndex:to,onFocus:ve})=>(0,Jo.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,Jo.jsx)(bJ,{block:ct,onClick:ge,onContextMenu:Ye,onMouseDown:oe,onToggleExpanded:To,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ue,tabIndex:Fk?0:to,onFocus:ve,isExpanded:K?p:void 0,selectedClientIds:g,ariaDescribedBy:ze}),(0,Jo.jsx)(xT,{id:ze,children:[Gc,ca,Bp].filter(Boolean).join(" ")})]})}),ff&&(0,Jo.jsx)(Jo.Fragment,{children:(0,Jo.jsxs)(Am.__experimentalTreeGridCell,{className:an,withoutGridItem:!0,children:[(0,Jo.jsx)(Am.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:to,onFocus:ve})=>(0,Jo.jsx)(fE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:to,onFocus:ve})}),(0,Jo.jsx)(Am.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:to,onFocus:ve})=>(0,Jo.jsx)(mE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:to,onFocus:ve})})]})}),ot&&ar&&(0,Jo.jsx)(Am.__experimentalTreeGridCell,{className:Ep,"aria-selected":!!i,ref:y,children:({ref:ue,tabIndex:to,onFocus:ve})=>(0,Jo.jsx)(ar,{clientIds:r0,block:ct,icon:ks,label:(0,JV.__)("Options"),popoverProps:{anchor:Ae},toggleProps:{ref:ue,className:"block-editor-list-view-block__menu",tabIndex:to,onClick:ut,onFocus:ve,size:"small"},disableOpenOnArrowDown:!0,expand:wt,expandedState:Lr,setInsertedBlock:ki,__experimentalSelectBlock:Ct})}),I&&(0,Jo.jsx)(Bm,{clientId:e,onClose:()=>O(!1)})]})}var TJ=(0,bo.memo)(EJ);var oi=l(w(),1);function IJ(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(xBe(t,o,r),0):1}var xBe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+IJ(n,e,t,o):r+1,wBe=()=>{};function PJ(e){let{blocks:t,selectBlock:o=wBe,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=Tt(f),b=h||!!g?.isSynced,v=(0,RT.useSelect)(R=>f?R(_).canEditBlock(f):!0,[f]),{blockDropPosition:k,blockDropTargetIndex:y,firstDraggedBlockIndex:S,blockIndexes:x,expandedState:C,draggedClientIds:B}=cd(),I=(0,PT.useRef)();if(!v)return null;let O=p&&i===1,E=t.filter(Boolean),L=E.length,T=O?L+1:L;return I.current=c,(0,oi.jsxs)(oi.Fragment,{children:[E.map((R,D)=>{let{clientId:j,innerBlocks:G}=R;D>0&&(I.current+=IJ(E[D-1],C,B,d));let z=!!B?.includes(j),{displacement:H,isAfterDraggedBlocks:W,isNesting:te}=xJ({blockIndexes:x,blockDropTargetIndex:y,blockDropPosition:k,clientId:j,firstDraggedBlockIndex:S,isDragged:z}),{itemInView:ne}=u,ae=ne(I.current),X=D+1,ee=s.length>0?`${s}_${X}`:`${X}`,le=!!G?.length,Q=le&&m?C[j]??d:void 0,J=SJ(j,n),q=a||J&&le,U=z||ae||J&&j===n[0]||D===0||D===L-1;return(0,oi.jsxs)(RT.AsyncModeProvider,{value:!J,children:[U&&(0,oi.jsx)(TJ,{block:R,selectBlock:o,isSelected:J,isBranchSelected:q,isDragged:z,level:i,position:X,rowCount:T,siblingBlockCount:L,showBlockMovers:r,path:ee,isExpanded:z?!1:Q,listPosition:I.current,selectedClientIds:n,isSyncedBranch:b,displacement:H,isAfterDraggedBlocks:W,isNesting:te}),!U&&(0,oi.jsx)("tr",{children:(0,oi.jsx)("td",{className:"block-editor-list-view-placeholder"})}),le&&Q&&!z&&(0,oi.jsx)(PJ,{parentId:j,blocks:G,selectBlock:o,showBlockMovers:r,level:i+1,path:ee,listPosition:I.current+1,fixedListWindow:u,isBranchSelected:q,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},j)}),O&&(0,oi.jsx)(IT.__experimentalTreeGridRow,{level:i,setSize:T,positionInSet:T,isExpanded:!0,children:(0,oi.jsx)(IT.__experimentalTreeGridCell,{children:R=>(0,oi.jsx)(XV,{clientId:f,nestingLevel:i,blockCount:L,...R})})})]})}var RJ=(0,PT.memo)(PJ);var Gg=l(A(),1),OT=l(Fe(),1),ac=l(P(),1),e3=l(N(),1);var Xi=l(w(),1);function OJ({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=Tt(e),n=Fr({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,ac.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,e3.isRTL)(),m=(0,ac.useCallback)((k,y)=>{if(!d)return 0;let S=d.offsetWidth,x=(0,OT.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,B=x===C.body||x===C.documentElement;if(x&&!B){let I=x.getBoundingClientRect(),O=(0,e3.isRTL)()?I.right-k.right:k.left-I.left,E=x.clientWidth;if(E<S+O&&(S=E-O),!f&&k.left+y<I.left)return S-=I.left-k.left,S;if(f&&k.right-y>I.right)return S-=k.right-I.right,S}return S-y},[f,d]),h=(0,ac.useMemo)(()=>{if(!d)return{};let k=d.getBoundingClientRect();return{width:m(k,0)}},[m,d]),p=(0,ac.useMemo)(()=>{if(!d)return{};let k=(0,OT.getScrollContainer)(d),y=d.ownerDocument,S=k===y.body||k===y.documentElement;if(k&&!S){let x=k.getBoundingClientRect(),C=d.getBoundingClientRect(),B=f?x.right-C.right:C.left-x.left;if(!f&&x.left>C.left)return{transform:`translateX( ${B}px )`};if(f&&x.right<C.right)return{transform:`translateX( ${B*-1}px )`}}return{}},[f,d]),g=(0,ac.useMemo)(()=>{if(!c)return 1;let k=parseInt(c.getAttribute("aria-level"),10);return k?k+1:1},[c]),b=(0,ac.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),v=(0,ac.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let y=d.getBoundingClientRect(),S=y.left,x=0,C=(0,OT.getScrollContainer)(d,"horizontal"),B=d.ownerDocument,I=C===B.body||C===B.documentElement;if(C&&!I){let L=C.getBoundingClientRect(),T=f?C.offsetWidth-C.clientWidth:0;S<L.left+T&&(S=L.left+T)}a==="top"?x=y.top-y.height*2:x=y.top;let O=m(y,0),E=y.height;return new window.DOMRect(S,x,O,E)}}},[d,a,m,f]);return d?(0,Xi.jsx)(Gg.Popover,{animate:!1,anchor:v,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,Xi.jsx)("div",{style:h,className:V("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,Xi.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,Xi.jsxs)("div",{className:V("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:p,children:[(0,Xi.jsx)(CT,{onClick:()=>{}}),(0,Xi.jsx)(Oe,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,Xi.jsx)(Gg.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,Xi.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Xi.jsx)(Gg.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,Xi.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var AJ=l(Zo(),1),Wg=l(N(),1),OS=l(F(),1),LJ=l(P(),1),ri=l(it(),1),NJ=l($(),1);function MJ(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,OS.useDispatch)(_),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,OS.useSelect)(_),{getBlockType:u}=(0,OS.useSelect)(NJ.store);return{updateBlockSelection:(0,LJ.useCallback)(async(f,m,h,p)=>{if(!f?.shiftKey&&f?.keyCode!==ri.ESCAPE){o(m,p);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===ri.ESCAPE,b=f.type==="keydown"&&(f.keyCode===ri.UP||f.keyCode===ri.DOWN||f.keyCode===ri.HOME||f.keyCode===ri.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 I=n(C),O=n(B),{start:E,end:L}=_J(C,B,I,O);await t(E,L,null)}let y=s();if((f.keyCode===ri.HOME||f.keyCode===ri.END)&&y.length>1)return;let S=v.filter(C=>!y.includes(C)),x;if(S.length===1){let C=u(r(S[0]))?.title;C&&(x=(0,Wg.sprintf)((0,Wg.__)("%s deselected."),C))}else S.length>1&&(x=(0,Wg.sprintf)((0,Wg.__)("%s blocks deselected."),S.length));x&&(0,AJ.speak)(x,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var DJ=l(P(),1);function VJ(e){return(0,DJ.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 FJ=l(F(),1);function zJ({blocks:e,rootClientId:t}){return(0,FJ.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=M(o(_));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var jJ=l(P(),1),UJ=l(F(),1);function HJ({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,UJ.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=M(n(_));return{expandedBlock:s(),getBlockParents:i}},[]);(0,jJ.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var GJ=l(F(),1),Lm=l(P(),1),Nm=l(Z(),1),WJ=l(N(),1);var lc=24;function CBe(e,t,o=1,r=!1){let n=r?t.right-o*lc:t.left+o*lc;return r?e.x>n:e.x<n}function BBe(e,t,o=1,r=!1){let n=r?t.right-o*lc:t.left+o*lc,i=r?n-e.x:e.x-n,s=Math.round(i/lc);return Math.abs(s)}function EBe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function $J(e,t){let o=e[t+1];return o&&o.isDraggedBlock?$J(e,t+1):o}function TBe(e,t,o=1,r=!1){let n=r?t.right-o*lc:t.left+o*lc;return(r?e.x<n-lc:e.x>n+lc)&&e.y<t.bottom}var IBe=["top","bottom"];function PBe(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]=hm(t,h,IBe),b=zB(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=EBe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||TBe(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&&CBe(t,s,c.length,o)){let f=$J(e,a),m=n.nestingLevel,h=f?f.nestingLevel:1;if(m&&h){let p=BBe(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 RBe={leading:!1,trailing:!0};function KJ({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,GJ.useSelect)(_),[c,u]=(0,Lm.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=FB(d,f),h=(0,WJ.isRTL)(),p=(0,Nm.usePrevious)(d),g=(0,Lm.useCallback)((S,x)=>{let{rootClientId:C}=x||{};C&&x?.dropPosition==="inside"&&!S[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,Nm.useThrottle)(g,500,RBe);(0,Lm.useEffect)(()=>{if(c?.dropPosition!=="inside"||p!==c?.rootClientId){b.cancel();return}b(t,c)},[t,p,c,b]);let v=s(),k=(0,Nm.useThrottle)((0,Lm.useCallback)((S,x)=>{let C={x:S.clientX,y:S.clientY},B=!!v?.length,O=Array.from(x.querySelectorAll("[data-block]")).map(L=>{let T=L.dataset.block,R=L.dataset.expanded==="true",D=L.classList.contains("is-dragging"),j=parseInt(L.getAttribute("aria-level"),10),G=r(T);return{clientId:T,isExpanded:R,rootClientId:G,blockIndex:n(T),element:L,nestingLevel:j||void 0,isDraggedBlock:B?D:!1,innerBlockCount:i(T),canInsertDraggedBlocksAsSibling:B?a(v,G):!0,canInsertDraggedBlocksAsChild:B?a(v,T):!0}}),E=PBe(O,C,h);E&&u(E)},[a,v,i,n,r,h]),50);return{ref:(0,Nm.__experimentalUseDropZone)({dropZoneElement:e,onDrop(S){k.cancel(),c&&m(S),u(void 0)},onDragLeave(){k.cancel(),u(null)},onDragOver(S){k(S,S.currentTarget)},onDragEnd(){k.cancel(),u(void 0)}}),target:c}}var AT=l(P(),1),YJ=l(F(),1);function qJ({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,AT.useState)(null),{selectedBlockParentClientIds:n}=(0,YJ.useSelect)(i=>{let{getBlockParents:s}=i(_);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,AT.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var $g=l(F(),1),ZJ=l(Z(),1);function XJ({selectBlock:e}){let t=(0,$g.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,$g.useSelect)(_),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:h}=(0,$g.useDispatch)(_),p=Rh();return(0,ZJ.useRefEffect)(g=>{function b(y,S){S&&e(void 0,y,null,null),Ug(y,g)}function v(y){let S=s(),x=S.includes(y),C=x?S[0]:y,B=r(C);return{blocksToUpdate:x?S:[y],firstBlockClientId:C,firstBlockRootClientId:B,originallySelectedBlockClientIds:S}}function k(y){if(y.defaultPrevented||!g.contains(y.target.ownerDocument.activeElement))return;let x=y.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!x)return;let{blocksToUpdate:C,firstBlockClientId:B,firstBlockRootClientId:I,originallySelectedBlockClientIds:O}=v(x);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);S1(y,E,t)}if(y.type==="cut"){if(!u(C))return;let E=i(B)??I;f(C,!1);let L=O.length>0&&s().length===0;E||(E=o()[0]),b(E,L)}else if(y.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:E}=a(),L=uG(y,E);if(C.length===1){let[T]=C;if(L.every(R=>c(R.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 cc=l(w(),1),OBe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,QJ=32;function eee({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=_V,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,JJ.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,Kg.useInstanceId)(eee),{clientIdsTree:h,draggedClientIds:p,selectedClientIds:g}=zJ({blocks:t,rootClientId:a}),b=VJ(h),{getBlock:v,getSelectedBlockClientIds:k}=(0,AS.useSelect)(_),{visibleBlockCount:y}=(0,AS.useSelect)(K=>{let{getGlobalBlockCount:se,getClientIdsOfDescendants:ce}=K(_),Se=p?.length>0?ce(p).length+1:0;return{visibleBlockCount:se()-Se}},[p]),{updateBlockSelection:S}=MJ(),[x,C]=(0,ko.useReducer)(OBe,{}),[B,I]=(0,ko.useState)(null),{setSelectedTreeId:O}=qJ({firstSelectedBlockClientId:g[0],setExpandedState:C}),E=(0,ko.useCallback)((K,se,ce)=>{S(K,se,null,ce),O(se),u&&u(v(se))},[O,S,u,v]),{ref:L,target:T}=KJ({dropZoneElement:o,expandedState:x,setExpandedState:C}),R=(0,ko.useRef)(),D=XJ({selectBlock:E}),j=(0,ko.useCallback)(K=>{let[se]=k();se&&K&&Ug(se,K)},[k]),G=(0,Kg.useMergeRefs)([D,j,R,L,f]),z=(0,ko.useCallback)(K=>{if(!K)return;let se=Array.isArray(K)?K:[K];C({type:"expand",clientIds:se})},[C]),H=(0,ko.useCallback)(K=>{K&&C({type:"collapse",clientIds:[K]})},[C]),W=(0,ko.useCallback)(()=>{C({type:"clear"})},[C]),te=(0,ko.useCallback)(K=>{z(K?.dataset?.block)},[z]),ne=(0,ko.useCallback)(K=>{H(K?.dataset?.block)},[H]),ae=(0,ko.useCallback)((K,se,ce)=>{K.shiftKey&&S(K,se?.dataset?.block,ce?.dataset?.block)},[S]);HJ({collapseAll:W,expand:z});let X=p?.[0],{blockDropTargetIndex:ee,blockDropPosition:le,firstDraggedBlockIndex:Q}=(0,ko.useMemo)(()=>{let K,se;if(T?.clientId){let ce=b[T.clientId];K=ce===void 0||T?.dropPosition==="top"?ce:ce+1}else T===null&&(K=null);if(X){let ce=b[X];se=ce===void 0||T?.dropPosition==="top"?ce:ce+1}return{blockDropTargetIndex:K,blockDropPosition:T?.dropPosition,firstDraggedBlockIndex:se}},[T,b,X]),J=(0,ko.useMemo)(()=>({blockDropPosition:le,blockDropTargetIndex:ee,blockIndexes:b,draggedClientIds:p,expandedState:x,expand:z,firstDraggedBlockIndex:Q,collapse:H,collapseAll:W,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:B,setInsertedBlock:I,treeGridElementRef:R,rootClientId:a}),[le,ee,b,p,x,z,Q,H,W,s,m,d,B,I,a]),[q]=(0,Kg.__experimentalUseFixedWindowList)(R,QJ,y,{expandedState:x,useWindowing:!0,windowOverscan:40});if(!h.length&&!i)return null;let U=c&&`block-editor-list-view-description-${m}`;return(0,cc.jsxs)(AS.AsyncModeProvider,{value:!0,children:[(0,cc.jsx)(OJ,{draggedBlockClientId:X,listViewRef:R,blockDropTarget:T}),c&&(0,cc.jsx)(LT.VisuallyHidden,{id:U,children:c}),(0,cc.jsx)(LT.__experimentalTreeGrid,{id:e,className:V("block-editor-list-view-tree",{"is-dragging":p?.length>0&&ee!==void 0}),"aria-label":(0,t3.__)("Block navigation structure"),ref:G,onCollapseRow:ne,onExpandRow:te,onFocusRow:ae,applicationAriaLabel:(0,t3.__)("Block navigation structure"),"aria-describedby":U,style:{"--wp-admin--list-view-dragged-items-height":p?.length?`${QJ*(p.length-1)}px`:null},children:(0,cc.jsx)(ST.Provider,{value:J,children:(0,cc.jsx)(RJ,{blocks:h,parentId:a,selectBlock:E,showBlockMovers:r,fixedListWindow:q,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var LS=(0,ko.forwardRef)(eee),NT=(0,ko.forwardRef)((e,t)=>(0,cc.jsx)(LS,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var md=l(w(),1);function ABe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,md.jsx)(MT.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:nv,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,o3.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function LBe({isDisabled:e,...t},o){(0,tee.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,oee.useSelect)(i=>!!i(_).getBlockCount(),[])&&!e;return(0,md.jsx)(MT.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,md.jsx)(ABe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,md.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,md.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,o3.__)("List view")}),(0,md.jsx)(NT,{})]})})}var nee=(0,ree.forwardRef)(LBe);var cee=l(P(),1),DT=l(Z(),1),Da=l(A(),1),r3=l(N(),1);var iee=l(P(),1);var see=l(w(),1);function aee({genericPreviewBlock:e,style:t,className:o,activeStyle:r}){let n=Eg(o,r,t),i=(0,iee.useMemo)(()=>({name:e.name,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:n+" block-editor-block-styles__block-preview-container"},example:e}),[e,t,n]);return(0,see.jsx)(K1,{item:i})}var Hs=l(w(),1),lee=()=>{};function NBe({clientId:e,onSwitch:t=lee,onHoverClassName:o=lee}){let{onSelect:r,stylesToRender:n,activeStyle:i,genericPreviewBlock:s,className:a}=Tg({clientId:e,onSwitch:t}),[c,u]=(0,cee.useState)(null),d=(0,DT.useViewportMatch)("medium","<"),f=Po();if(!n||n.length===0)return null;let m=(0,DT.debounce)(u,250),h=k=>{r(k),o(null),u(null),m.cancel()},p=k=>{if(c===k){m.cancel();return}m(k),o(k?.name??null)},g=YE(n),b=()=>i?.name!==g?.name,v=()=>{h(g)};return(0,Hs.jsx)(Da.__experimentalToolsPanel,{label:(0,r3.__)("Styles"),resetAll:v,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:f,children:(0,Hs.jsx)(Da.__experimentalToolsPanelItem,{hasValue:b,label:(0,r3.__)("Variation"),onDeselect:v,isShownByDefault:!0,panelId:e,children:(0,Hs.jsxs)("div",{className:"block-editor-block-styles",children:[(0,Hs.jsx)("div",{className:"block-editor-block-styles__variants",children:n.map(k=>{let y=k.label||k.name;return(0,Hs.jsx)(Da.Button,{__next40pxDefaultSize:!0,className:V("block-editor-block-styles__item",{"is-active":i.name===k.name}),variant:"secondary",label:y,onMouseEnter:()=>p(k),onFocus:()=>p(k),onMouseLeave:()=>p(null),onBlur:()=>p(null),onClick:()=>h(k),"aria-current":i.name===k.name,children:(0,Hs.jsx)(Da.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:y})},k.name)})}),c&&!d&&(0,Hs.jsx)(Da.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,Hs.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>p(null),children:(0,Hs.jsx)(aee,{activeStyle:i,className:a,genericPreviewBlock:s,style:c})})})]})})})}var Yg=NBe;var pee=l(A(),1),qg=l(N(),1);var dee=l(A(),1),fee=l(w(),1),uee={0:BL,1:NA,2:DA,3:FA,4:jA,5:HA,6:WA};function n3({level:e}){return uee[e]?(0,fee.jsx)(dee.Icon,{icon:uee[e]}):null}var VT=l(w(),1),mee=[1,2,3,4,5,6],MBe={className:"block-library-heading-level-dropdown"};function hee({options:e=mee,value:t,onChange:o}){let r=e.filter(n=>n===0||mee.includes(n)).sort((n,i)=>n-i);return(0,VT.jsx)(pee.ToolbarDropdownMenu,{popoverProps:MBe,icon:(0,VT.jsx)(n3,{level:t}),label:(0,qg.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,VT.jsx)(n3,{level:n}),title:n===0?(0,qg.__)("Paragraph"):(0,qg.sprintf)((0,qg.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var NS=l(N(),1),MS=l(A(),1);var uc=l(w(),1);function DBe({icon:e=pL,label:t=(0,NS.__)("Choose variation"),instructions:o=(0,NS.__)("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,uc.jsxs)(MS.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,uc.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,NS.__)("Block variations"),children:r.map(a=>(0,uc.jsxs)("li",{children:[(0,uc.jsx)(MS.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,uc.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,uc.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,uc.jsx)(MS.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,NS.__)("Skip")})})]})}var gee=DBe;var yee=l(F(),1),See=l($(),1),Xg=l(A(),1),i3=l(P(),1),s3=l(Z(),1),_ee=l(N(),1);var dc=l(N(),1),Zg=l(A(),1);var pd={carousel:"carousel",grid:"grid"};var ni=l(w(),1),VBe=({onBlockPatternSelect:e})=>(0,ni.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,ni.jsx)(Zg.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,dc.__)("Choose")})}),FBe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,ni.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,ni.jsx)(Zg.Button,{size:"compact",icon:(0,dc.isRTL)()?Vo:Nr,label:(0,dc.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,ni.jsx)(Zg.Button,{size:"compact",icon:(0,dc.isRTL)()?Nr:Vo,label:(0,dc.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),zBe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===pd.carousel,c=(0,ni.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,ni.jsx)(Zg.Button,{size:"compact",icon:yv,label:(0,dc.__)("Carousel view"),onClick:()=>t(pd.carousel),isPressed:a}),(0,ni.jsx)(Zg.Button,{size:"compact",icon:tv,label:(0,dc.__)("Grid view"),onClick:()=>t(pd.grid),isPressed:e===pd.grid})]});return(0,ni.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,ni.jsx)(FBe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,ni.jsx)(VBe,{onBlockPatternSelect:s})]})},bee=zBe;var kee=l(F(),1);function jBe(e,t,o){return(0,kee.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(_),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var vee=jBe;var zt=l(w(),1),UBe=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===pd.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,zt.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,zt.jsx)("div",{className:i,children:(0,zt.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,zt.jsx)(wee,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,zt.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,zt.jsx)(Xg.Composite,{role:"listbox",className:i,"aria-label":(0,_ee.__)("Patterns list"),children:o.map(s=>(0,zt.jsx)(xee,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function xee({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,s3.useInstanceId)(xee,`${r}__item-description`);return(0,zt.jsx)("div",{className:`${r}__list-item`,children:(0,zt.jsxs)(Xg.Composite.Item,{render:(0,zt.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,zt.jsx)(kn,{blocks:n,viewportWidth:s}),o&&(0,zt.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,zt.jsx)(Xg.VisuallyHidden,{id:a,children:i})]})})}function wee({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,s3.useInstanceId)(wee,"block-editor-block-pattern-setup-list__item-description");return(0,zt.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,zt.jsx)(kn,{blocks:n,minHeight:r}),!!s&&(0,zt.jsx)(Xg.VisuallyHidden,{id:a,children:s})]})}var HBe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=pd.carousel,showTitles:i=!1})=>{let[s,a]=(0,i3.useState)(n),[c,u]=(0,i3.useState)(0),{replaceBlock:d}=(0,yee.useDispatch)(_),f=vee(e,t,o);if(!f?.length)return null;let h=r||(p=>{let g=p.map(b=>(0,See.cloneBlock)(b));d(e,g)});return(0,zt.jsx)(zt.Fragment,{children:(0,zt.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,zt.jsx)(UBe,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,zt.jsx)(bee,{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)}})]})})},Cee=HBe;var a3=l($(),1),fc=l(N(),1),Gs=l(A(),1),FT=l(F(),1),Bee=l(P(),1);var Oo=l(w(),1),{Menu:Mm}=M(Gs.privateApis);function GBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Oo.jsxs)("fieldset",{className:e,children:[(0,Oo.jsx)(Gs.VisuallyHidden,{as:"legend",children:(0,fc.__)("Transform to variation")}),r.map(n=>(0,Oo.jsx)(Gs.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Oo.jsx)(Oe,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,fc.sprintf)((0,fc.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function WBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Oo.jsx)("div",{className:e,children:(0,Oo.jsxs)(Mm,{children:[(0,Oo.jsx)(Mm.TriggerButton,{render:(0,Oo.jsx)(Gs.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,fc.__)("Transform to variation")})}),(0,Oo.jsx)(Mm.Popover,{position:"bottom",children:(0,Oo.jsx)(Mm.Group,{children:r.map(n=>(0,Oo.jsxs)(Mm.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Oo.jsx)(Mm.ItemLabel,{children:n.title}),n.description&&(0,Oo.jsx)(Mm.ItemHelpText,{children:n.description})]},n.name))})})]})})}function $Be({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Oo.jsx)("div",{className:e,children:(0,Oo.jsx)(Gs.__experimentalToggleGroupControl,{label:(0,fc.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,Oo.jsx)(Gs.__experimentalToggleGroupControlOptionIcon,{icon:(0,Oo.jsx)(Oe,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,fc.sprintf)((0,fc.__)("Transform to %s"),n.title)},n.name))})})}function KBe({blockClientId:e}){let{updateBlockAttributes:t}=(0,FT.useDispatch)(_),{activeBlockVariation:o,variations:r,isContentOnly:n,isSection:i}=(0,FT.useSelect)(h=>{let{getActiveBlockVariation:p,getBlockVariations:g}=h(a3.store),{getBlockName:b,getBlockAttributes:v,getBlockEditingMode:k,isSectionBlock:y}=M(h(_)),S=e&&b(e),{hasContentRoleAttribute:x}=M(h(a3.store)),C=x(S);return{activeBlockVariation:p(S,v(e),"transform"),variations:S&&g(S,"transform"),isContentOnly:k(e)==="contentOnly"&&!C,isSection:y(e)}},[e]),s=o?.name,a=(0,Bee.useMemo)(()=>{let h=new Set;return r?(r.forEach(p=>{p.icon&&h.add(p.icon?.src||p.icon)}),h.size===r.length):!1},[r]),c=h=>{t(e,{...r.find(({name:p})=>p===h).attributes})};if(!r?.length||n||i)return null;let u="block-editor-block-variation-transforms",f=r.length>6?GBe:$Be;return(0,Oo.jsx)(a?f:WBe,{className:u,onSelectVariation:c,selectedValue:s,variations:r})}var zT=KBe;var Dm=l(N(),1),jT=l(A(),1);var Eee=l(w(),1),l3={top:{icon:dL,title:(0,Dm._x)("Align top","Block vertical alignment setting")},center:{icon:eL,title:(0,Dm._x)("Align middle","Block vertical alignment setting")},bottom:{icon:QA,title:(0,Dm._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:lL,title:(0,Dm._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:iL,title:(0,Dm._x)("Space between","Block vertical alignment setting")}},YBe=["top","center","bottom"],qBe="top";function ZBe({value:e,onChange:t,controls:o=YBe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=l3[e],a=l3[qBe],c=n?jT.ToolbarGroup:jT.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,Eee.jsx)(c,{icon:s?s.icon:a.icon,label:(0,Dm._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...l3[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var c3=ZBe;var u3=l(w(),1),eC=e=>(0,u3.jsx)(c3,{...e,isToolbar:!1}),Tee=e=>(0,u3.jsx)(c3,{...e,isToolbar:!0});var Cn=l(A(),1),DS=l(P(),1),GT=l(N(),1);var Iee=l(A(),1);var d3=l(N(),1),Pee=l(w(),1);function Ree({isLinked:e,...t}){let o=e?(0,d3.__)("Unlink radii"):(0,d3.__)("Link radii");return(0,Pee.jsx)(Iee.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?dn:xi,iconSize:24,label:o})}var Oee=l(A(),1);function XBe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function Aee(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,Oee.__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=XBe(r);return n===0||n?`${n}${i||""}`:void 0}function Lee(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 Nee(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var Qi=l(A(),1),jee=l(Z(),1),gd=l(N(),1);var Vm=l(P(),1);var f3=24,Mee=8,UT={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 hd=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function Dee(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 Vee(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":Dee(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function m3(e,t,o){if(!hd(e,o))return e;let r=parseFloat(e,10)===0?"0":Dee(e,o);return t.find(i=>String(i.slug)===r)?.size}function Fee(e,t,o){if(!e||hd(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 Qg=l(A(),1),mc=l(w(),1);function zee({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,mc.jsx)(Qg.__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,mc.jsxs)(mc.Fragment,{children:[d?(0,mc.jsx)(Qg.Tooltip,{text:t,placement:"top",children:(0,mc.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:y})}):y,(0,mc.jsx)(Qg.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 bd=l(w(),1);function Fm({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=UT,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,Vm.useMemo)(()=>Fee(a,h,p),[a,h,p]),y=o??"preset-input-control",S=h.slice(1,h.length-1).map((q,U)=>({value:U+1,label:void 0})),x=S.length>0,C=h.length<=Mee,B=s?(0,gd.__)("Mixed"):null,[I,O]=(0,Vm.useState)(c),[E,L]=(0,Vm.useState)(!n&&k!==void 0&&!hd(k,p)),T=null,R=(0,jee.usePrevious)(k);(0,Vm.useEffect)(()=>{k&&R!==k&&!hd(k,p)&&E!==!0&&L(!0)},[k,R,p,E]);let D=!C&&!E&&k!==void 0&&(!hd(k,p)||hd(k,p)&&s),j=h;D?(j=[...h,{name:s?(0,gd.__)("Mixed"):(0,gd.sprintf)((0,gd.__)("Custom (%s)"),k),slug:"custom",size:k}],T=j.length-1):s||(T=E?m3(k,h,p):Vee(k,h,p));let G=j.map((q,U)=>({key:U,name:q.name})),z=hd(k,p)?m3(k,h,p):k,[H,W]=(0,Qi.__experimentalParseQuantityAndUnitFromRawValue)(z),te=W||g||"px",ne=v?.find(q=>q.value===te),ae=ne?.step??r[te]?.steps??.1,X=ne?.max??r[te]?.max??10,ee=q=>{let K=!isNaN(parseFloat(q))?q:void 0;K!==void 0&&u(K)},le=q=>{u([q,te].join(""))},Q=q=>k===void 0?void 0:h[q]?.name,J=(q,U)=>{let K=parseInt(q,10);if(U==="selectList"){if(K===0&&h[0]?.slug==="0")return"0";if(K===0)return}else if(K===0)return"0";return`var:preset|${p}|${h[q]?.slug}`};return(0,bd.jsxs)(Qi.__experimentalHStack,{className:`preset-input-control__wrapper ${y}__wrapper`,children:[i&&(0,bd.jsx)(Qi.Icon,{className:"preset-input-control__icon",icon:i,size:f3}),(!x||E)&&(0,bd.jsx)(zee,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:B,minValue:I,parsedQuantity:H,computedUnit:te,units:v,isMixed:s,step:ae,max:X,showTooltip:b,value:k,minimumCustomValue:c,onCustomValueChange:ee,onCustomValueSliderChange:le,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:O}),x&&C&&!E&&(0,bd.jsx)(Qi.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:S,min:0,onBlur:d,onChange:q=>u(J(q)),onFocus:f,onMouseDown:q=>{q?.nativeEvent?.offsetX<35&&k===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:Q,step:1,value:T,withInputField:!1,__next40pxDefaultSize:!0}),x&&!C&&!E&&(0,bd.jsx)(Qi.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:q=>{D&&q.selectedItem.key===G.length-1?L(!0):u(J(q.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:G,size:"__unstable-large",value:G.find(q=>q.key===T)||""}),x&&!n&&(0,bd.jsx)(Qi.Button,{className:"preset-input-control__custom-toggle",icon:XL,iconSize:f3,isPressed:E,label:E?(0,gd.__)("Use preset"):(0,gd.__)("Set custom value"),onClick:()=>{L(!E)},size:"small"})]})}var Jg=l(N(),1);var Uee=8,HT=[],p3={all:(0,Jg.__)("Border radius"),topLeft:(0,Jg.__)("Top left"),topRight:(0,Jg.__)("Top right"),bottomLeft:(0,Jg.__)("Bottom left"),bottomRight:(0,Jg.__)("Bottom right")},h3={all:tA,topLeft:nA,topRight:iA,bottomLeft:oA,bottomRight:rA},g3=0;var pc=l(w(),1);function QBe(e){let t=e?.default??HT,o=e?.custom??HT,r=e?.theme??HT;return(0,DS.useMemo)(()=>{let n=[{name:(0,GT.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>Uee?[{name:(0,GT.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function Hee(e,t){return t==="all"?Aee(e):typeof e=="string"?e:e?.[t]}function Gee(e,t){return t==="all"?e.flat:e[t]}function Wee(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 $ee(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 WT({onChange:e,values:t,presets:o}){let[r,n]=(0,DS.useState)(!Nee(t)||!Lee(t)),i=QBe(o),[s,a]=(0,DS.useState)({flat:typeof t=="string"?(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=me("spacing.units"),u=(0,Cn.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,pc.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,pc.jsxs)(Cn.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,pc.jsx)(Cn.BaseControl.VisualLabel,{as:"legend",children:(0,GT.__)("Radius")}),(0,pc.jsx)(Ree,{onClick:d,isLinked:r})]}),r?(0,pc.jsx)(Fm,{ariaLabel:p3.all,className:"components-border-radius-control",icon:h3.all,minimumCustomValue:g3,onChange:Wee("all",t,e),onUnitChange:$ee("all",s,a),presets:i,presetType:"border-radius",selectedUnit:Gee(s,"all"),showTooltip:!0,units:u,value:Hee(t,"all")}):(0,pc.jsx)(Cn.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,pc.jsx)(Fm,{ariaLabel:p3[f],className:"components-border-radius-control",icon:h3[f],minimumCustomValue:g3,onChange:Wee(f,t,e),onUnitChange:$ee(f,s,a),presets:i,presetType:"border-radius",selectedUnit:Gee(s,f),showTooltip:!0,units:u,value:Hee(t,f)},f))})]})}var qee=l(A(),1);var Kee=l(Z(),1);var Yee=l(w(),1),$T=(0,Kee.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=me("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,Yee.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var Zee=$T(qee.ColorPalette);var b3=l(N(),1),Ws=l(A(),1);var vo=l(w(),1),{Tabs:eb}=M(Ws.privateApis),JBe=["colors","disableCustomColors","gradients","disableCustomGradients"],Va={color:"color",gradient:"gradient"};function Xee({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={[Va.color]:(0,vo.jsx)(Ws.ColorPalette,{value:u,onChange:b?y=>{a(y),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:h,headingLevel:p}),[Va.gradient]:(0,vo.jsx)(Ws.GradientPicker,{value:d,onChange:g?y=>{c(y),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:p})},k=y=>(0,vo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:v[y]});return(0,vo.jsx)(Ws.BaseControl,{className:V("block-editor-color-gradient-control",i),children:(0,vo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,vo.jsxs)(Ws.__experimentalVStack,{spacing:1,children:[m&&(0,vo.jsx)("legend",{children:(0,vo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,vo.jsx)(Ws.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,vo.jsx)("div",{children:(0,vo.jsxs)(eb,{defaultTabId:d?Va.gradient:!!g&&Va.color,children:[(0,vo.jsxs)(eb.TabList,{children:[(0,vo.jsx)(eb.Tab,{tabId:Va.color,children:(0,b3.__)("Color")}),(0,vo.jsx)(eb.Tab,{tabId:Va.gradient,children:(0,b3.__)("Gradient")})]}),(0,vo.jsx)(eb.TabPanel,{tabId:Va.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.color}),(0,vo.jsx)(eb.TabPanel,{tabId:Va.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.gradient})]})}),!b&&k(Va.color),!g&&k(Va.gradient)]})})})}function eEe(e){let[t,o,r,n]=me("color.palette","color.gradients","color.custom","color.customGradient");return(0,vo.jsx)(Xee,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function tEe(e){return JBe.every(t=>e.hasOwnProperty(t))?(0,vo.jsx)(Xee,{...e}):(0,vo.jsx)(eEe,{...e})}var kd=tEe;var Qee=l(w(),1);function Jee({onChange:e,value:t,...o}){return(0,Qee.jsx)(kd,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var $s=l(N(),1),ete=l(A(),1),tte=l(Zo(),1),k3=l(w(),1);Kc([Yc,Op]);function oEe({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,$s.__)("text color")},{color:f,description:(0,$s.__)("link color")}],h=Bt(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 S=Bt(y.color),x=S.isReadable(h,b),C=S.alpha()<1;if(!x){if(p||C)continue;v=g<S.brightness()?(0,$s.sprintf)((0,$s.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),y.description):(0,$s.sprintf)((0,$s.__)("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,$s.__)("This color combination may be hard for people to read.");break}C&&c&&(v=(0,$s.__)("Transparent text may be hard for people to read."),k=(0,$s.__)("Transparent text may be hard for people to read."))}return v?((0,tte.speak)(k),(0,k3.jsx)("div",{className:"block-editor-contrast-checker",children:(0,k3.jsx)(ete.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:v})})):null}var KT=oEe;var gr=l(N(),1),VS=l(hc(),1),YT=l(P(),1),ii=l(A(),1),Fa=l(w(),1),vd=new Date;vd.setDate(20);vd.setMonth(vd.getMonth()-3);vd.getMonth()===4&&vd.setMonth(3);function rte({format:e,defaultFormat:t,onChange:o}){return(0,Fa.jsxs)(ii.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,Fa.jsx)(ii.VisuallyHidden,{as:"legend",children:(0,gr.__)("Date format")}),(0,Fa.jsx)(ii.ToggleControl,{label:(0,gr.__)("Default format"),help:`${(0,gr.__)("Example:")} ${(0,VS.dateI18n)(t,vd)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,Fa.jsx)(rEe,{format:e,onChange:o})]})}function rEe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,gr._x)("n/j/Y","short date format"),(0,gr._x)("n/j/Y g:i A","short date format with time"),(0,gr._x)("M j, Y","medium date format"),(0,gr._x)("M j, Y g:i A","medium date format with time"),(0,gr._x)("F j, Y","long date format"),(0,gr._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,VS.dateI18n)(a,vd),format:a})),{key:"human-diff",name:(0,VS.humanTimeDiff)(vd),format:"human-diff"}],n={key:"custom",name:(0,gr.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,gr.__)("Enter your own date format")},[i,s]=(0,YT.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,Fa.jsxs)(ii.__experimentalVStack,{children:[(0,Fa.jsx)(ii.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,gr.__)("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,Fa.jsx)(ii.TextControl,{__next40pxDefaultSize:!0,label:(0,gr.__)("Custom format"),hideLabelFromVision:!0,help:(0,YT.createInterpolateElement)((0,gr.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,Fa.jsx)(ii.ExternalLink,{href:(0,gr.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var Ji=l(A(),1),FS=l(N(),1),nte=l(it(),1);var ite=l(Z(),1),za=l(w(),1);function ste({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,za.jsx)(Ji.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,za.jsx)(Ji.DuotoneSwatch,{values:i}):a=(0,za.jsx)(xe,{icon:bA});let c=(0,FS.__)("Apply duotone filter"),d=`${(0,ite.useInstanceId)(ste,"duotone-control",e)}__description`;return(0,za.jsx)(Ji.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,FS.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,za.jsx)(Ji.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:p=>{!f&&p.keyCode===nte.DOWN&&(p.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,za.jsxs)(Ji.MenuGroup,{label:(0,FS.__)("Duotone"),children:[(0,za.jsx)("p",{children:(0,FS.__)("Create a two-tone color effect without losing your original image.")}),(0,za.jsx)(Ji.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var qT=ste;var ute=l(A(),1),dte=l(Re(),1),fte=l(P(),1),si=l(N(),1);var er=l(N(),1);var ZT=l(N(),1);function ate(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,ZT._x)("Regular","font style");break;case"italic":t=(0,ZT._x)("Italic","font style");break;case"oblique":t=(0,ZT._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var Ks=l(N(),1);function v3(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,Ks._x)("Regular","font weight");break;case"bold":case"700":t=(0,Ks._x)("Bold","font weight");break;case"100":t=(0,Ks._x)("Thin","font weight");break;case"200":t=(0,Ks._x)("Extra Light","font weight");break;case"300":t=(0,Ks._x)("Light","font weight");break;case"500":t=(0,Ks._x)("Medium","font weight");break;case"600":t=(0,Ks._x)("Semi Bold","font weight");break;case"800":t=(0,Ks._x)("Extra Bold","font weight");break;case"900":t=(0,Ks._x)("Black","font weight");break;case"1000":t=(0,Ks._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var lte=[{name:(0,er._x)("Regular","font style"),value:"normal"},{name:(0,er._x)("Italic","font style"),value:"italic"}],cte=[{name:(0,er._x)("Thin","font weight"),value:"100"},{name:(0,er._x)("Extra Light","font weight"),value:"200"},{name:(0,er._x)("Light","font weight"),value:"300"},{name:(0,er._x)("Regular","font weight"),value:"400"},{name:(0,er._x)("Medium","font weight"),value:"500"},{name:(0,er._x)("Semi Bold","font weight"),value:"600"},{name:(0,er._x)("Bold","font weight"),value:"700"},{name:(0,er._x)("Extra Bold","font weight"),value:"800"},{name:(0,er._x)("Black","font weight"),value:"900"},{name:(0,er._x)("Extra Black","font weight"),value:"1000"}];function tb(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(v3(m))}}let a=v3(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=ate(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,er._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,er._x)("Italic","font style"),value:"italic"}),n&&(t=lte,o=cte),t=t.length===0?lte:t,o=o.length===0?cte:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,er.sprintf)((0,er._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 mte=l(w(),1),nEe=(e,t)=>e?t?(0,si.__)("Appearance"):(0,si.__)("Font style"):(0,si.__)("Font weight");function XT(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=nEe(r,n),f={key:"default",name:(0,si.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:h,combinedStyleAndWeightOptions:p}=tb(i),g=()=>{let x=[f];return p&&x.push(...p),x},b=()=>{let x=[f];return m.forEach(({name:C,value:B})=>{x.push({key:B,name:C,style:{fontStyle:B,fontWeight:void 0}})}),x},v=()=>{let x=[f];return h.forEach(({name:C,value:B})=>{x.push({key:B,name:C,style:{fontStyle:void 0,fontWeight:B}})}),x},k=(0,fte.useMemo)(()=>r&&n?g():r?b():v(),[e.options,m,h,p]),y=k.find(x=>x.style.fontStyle===s&&x.style.fontWeight===a)||k[0],S=()=>y?r?n?(0,si.sprintf)((0,si.__)("Currently selected font appearance: %s"),y.name):(0,si.sprintf)((0,si.__)("Currently selected font style: %s"),y.name):(0,si.sprintf)((0,si.__)("Currently selected font weight: %s"),y.name):(0,si.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,dte.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,mte.jsx)(ute.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:S(),options:k,value:y,onChange:({selectedItem:x})=>o(x.style)})}var pte=l(A(),1),hte=l(Re(),1),y3=l(N(),1);var gte=l(w(),1);function QT({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=me("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,y3.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,hte.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,gte.jsx)(pte.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,y3.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:V("block-editor-font-family-control",n),...i})}var JT=l(A(),1),bte=l(Re(),1),kte=l(N(),1);var vte=l(w(),1);function eI({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=me("spacing.units"),s=(0,JT.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,bte.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,vte.jsx)(JT.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,kte.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var zS=l(N(),1),tI=l(A(),1),S3=l(w(),1),iEe=[{label:(0,zS.__)("None"),value:"none",icon:Mr},{label:(0,zS.__)("Underline"),value:"underline",icon:CA},{label:(0,zS.__)("Strikethrough"),value:"line-through",icon:xA}];function oI({value:e,onChange:t,className:o}){return(0,S3.jsx)(tI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,zS.__)("Decoration"),className:V("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:iEe.map(r=>(0,S3.jsx)(tI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var ob=l(N(),1);var rI=l(A(),1),_3=l(w(),1),sEe=[{label:(0,ob.__)("None"),value:"none",icon:Mr},{label:(0,ob.__)("Uppercase"),value:"uppercase",icon:EA},{label:(0,ob.__)("Lowercase"),value:"lowercase",icon:SA},{label:(0,ob.__)("Capitalize"),value:"capitalize",icon:vA}];function nI({className:e,value:t,onChange:o}){return(0,_3.jsx)(rI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,ob.__)("Letter case"),className:V("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:sEe.map(r=>(0,_3.jsx)(rI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var rb=l(N(),1);var iI=l(A(),1),x3=l(w(),1),aEe=[{label:(0,rb.__)("Horizontal"),value:"horizontal-tb",icon:vN},{label:(0,rb.__)("Vertical"),value:(0,rb.isRTL)()?"vertical-lr":"vertical-rl",icon:SN}];function sI({className:e,value:t,onChange:o}){return(0,x3.jsx)(iI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,rb.__)("Orientation"),className:V("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:aEe.map(r=>(0,x3.jsx)(iI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Zr=l(A(),1),yte=l(P(),1),Ste=l(N(),1);var Uo=l(w(),1),lEe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,Uo.jsx)(Zr.__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})},cEe=({colorValue:e,label:t})=>(0,Uo.jsxs)(Zr.__experimentalHStack,{justify:"flex-start",children:[(0,Uo.jsx)(Zr.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,Uo.jsx)(Zr.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),uEe=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:c,label:u}=e,d=(0,yte.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,Uo.jsxs)(Uo.Fragment,{children:[(0,Uo.jsx)(Zr.Button,{__next40pxDefaultSize:!0,...f,children:(0,Uo.jsx)(cEe,{colorValue:h,label:u})}),n&&h&&(0,Uo.jsx)(Zr.Button,{__next40pxDefaultSize:!0,label:(0,Ste.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Mr,onClick:()=>{m(),r&&o(),d.current?.focus()}})]})};function aI({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,Uo.jsx)(Uo.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,Uo.jsx)(lEe,{setting:u,...a,children:(0,Uo.jsx)(Zr.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:uEe(m),renderContent:()=>(0,Uo.jsx)(Zr.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Uo.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,Uo.jsx)(kd,{...f})})})})},d)})})}var lI=l(A(),1),_te=l(F(),1),xte=l(Z(),1);var w3=l(P(),1),zm=l(N(),1);function yd(){let[e,t,o,r,n,i,s,a,c,u]=me("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,w3.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,zm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,zm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,zm._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,w3.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,zm._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,zm._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,zm._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 Ys=l(w(),1),dEe=["colors","disableCustomColors","gradients","disableCustomGradients"],C3=({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,xte.useInstanceId)(C3),{batch:m}=(0,_te.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,Ys.jsxs)(lI.__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,Ys.jsx)(aI,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,Ys.jsxs)(Ys.Fragment,{children:[(0,Ys.jsx)(lI.__experimentalSpacer,{marginY:4})," ",i]})]})},fEe=e=>{let t=yd();return(0,Ys.jsx)(C3,{...t,...e})},mEe=e=>dEe.every(t=>e.hasOwnProperty(t))?(0,Ys.jsx)(C3,{...e}):(0,Ys.jsx)(fEe,{...e}),cI=mEe;var uI=l(P(),1),jm=l(A(),1),E3=l(N(),1);var jS=l(w(),1),B3=[],pEe={...UT,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function hEe(e){let t=e?.default??B3,o=e?.custom??B3,r=e?.theme??B3;return(0,uI.useMemo)(()=>[{name:(0,E3.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function nb({label:e=(0,E3.__)("Dimension"),onChange:t,value:o}){let[r,n]=me("dimensions.dimensionSizes","spacing.units"),i=(0,jm.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=hEe(r),[a,c]=(0,uI.useState)(()=>{let[,d]=(0,jm.__experimentalParseQuantityAndUnitFromRawValue)(o);return d||i[0]?.value||"px"}),u=d=>{let[f,m]=(0,jm.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(d)&&m==="px"?t((f/16).toFixed(2)+d):["em","rem"].includes(m)&&d==="px"?t(Math.round(f*16)+d):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(d)&&f>100&&t(100+d),c(d)};return(0,jS.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,jS.jsx)(jm.BaseControl.VisualLabel,{as:"legend",children:e}),(0,jS.jsx)(Fm,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:pEe,minimumCustomValue:0,onChange:t,onUnitChange:u,presets:s,presetType:"dimension",selectedUnit:a,showTooltip:!0,units:i,value:o})]})}var Cte=l(P(),1),tr=l(A(),1),Bte=l(N(),1),Ete=l(Re(),1);var ja=l(w(),1),wte={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 Tte({label:e=(0,Bte.__)("Height"),onChange:t,value:o}){(0,Ete.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=me("spacing.units"),i=(0,tr.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,Cte.useMemo)(()=>(0,tr.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,tr.__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,ja.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,ja.jsx)(tr.BaseControl.VisualLabel,{as:"legend",children:e}),(0,ja.jsxs)(tr.Flex,{children:[(0,ja.jsx)(tr.FlexItem,{isBlock:!0,children:(0,ja.jsx)(tr.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,ja.jsx)(tr.FlexItem,{isBlock:!0,children:(0,ja.jsx)(tr.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ja.jsx)(tr.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:wte[s]?.max??100,step:wte[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var WS=l(A(),1);var es=l(zr()),eoe=l(qte());function yEe(e,t,o,r,n,i){i===void 0&&(i=0);var s=ib(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 SEe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function US(e,t,o,r,n){n===void 0&&(n=0);var i=ib(t.width,t.height,n),s=i.width,a=i.height;return{x:Zte(e.x,s,o.width,r),y:Zte(e.y,a,o.height,r)}}function Zte(e,t,o,r){var n=t*r/2-o/2;return gI(e,-n,n)}function Xte(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Qte(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function _Ee(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?xEe:wEe,c=ib(t.width,t.height,i),u=ib(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=Fo(Fo({},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 xEe(e,t){return Math.min(e,Math.max(0,t))}function wEe(e,t){return t}function CEe(e,t,o,r,n,i){var s=ib(t.width,t.height,o),a=gI(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 BEe(e,t,o){var r=SEe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function EEe(e,t,o,r,n,i){o===void 0&&(o=0);var s=ib(t.naturalWidth,t.naturalHeight,o),a=gI(BEe(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 Jte(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function TEe(e){return e*Math.PI/180}function ib(e,t,o){var r=TEe(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 gI(e,t,o){return Math.min(Math.max(e,t),o)}function hI(){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 IEe=`.reactEasyCrop_Container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
user-select: none;
touch-action: none;
cursor: move;
display: flex;
justify-content: center;
align-items: center;
}
.reactEasyCrop_Image,
.reactEasyCrop_Video {
will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
}
.reactEasyCrop_Contain {
max-width: 100%;
max-height: 100%;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.reactEasyCrop_Cover_Horizontal {
width: 100%;
height: auto;
}
.reactEasyCrop_Cover_Vertical {
width: auto;
height: 100%;
}
.reactEasyCrop_CropArea {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border: 1px solid rgba(255, 255, 255, 0.5);
box-sizing: border-box;
box-shadow: 0 0 0 9999em;
color: rgba(0, 0, 0, 0.5);
overflow: hidden;
}
.reactEasyCrop_CropAreaRound {
border-radius: 50%;
}
.reactEasyCrop_CropAreaGrid::before {
content: ' ';
box-sizing: border-box;
position: absolute;
border: 1px solid rgba(255, 255, 255, 0.5);
top: 0;
bottom: 0;
left: 33.33%;
right: 33.33%;
border-top: 0;
border-bottom: 0;
}
.reactEasyCrop_CropAreaGrid::after {
content: ' ';
box-sizing: border-box;
position: absolute;
border: 1px solid rgba(255, 255, 255, 0.5);
top: 33.33%;
bottom: 33.33%;
left: 0;
right: 0;
border-left: 0;
border-right: 0;
}
`,PEe=1,REe=3,OEe=1,toe=(function(e){vU(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=es.createRef(),o.imageRef=es.createRef(),o.videoRef=es.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=CEe(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=EEe(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=Fo(Fo({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:yEe(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=Fo({},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?US(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,eoe.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=gI(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?US(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?US(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return _Ee(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?US(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=Fo({},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=US(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=IEe,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=Xte(r,n),this.lastPinchRotation=Qte(r,n),this.onDragStart(Jte(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=Jte(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=Xte(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=Qte(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,S=k.cropAreaStyle,x=k.mediaStyle,C=n.classes,B=C.containerClassName,I=C.cropAreaClassName,O=C.mediaClassName,E=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return es.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(T){return o.containerRef=T},"data-testid":"container",style:y,className:hI("reactEasyCrop_Container",B)},i?es.createElement("img",Fo({alt:"",className:hI("reactEasyCrop_Image",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},a,{src:i,ref:this.imageRef,style:Fo(Fo({},x),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):s&&es.createElement("video",Fo({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:hI("reactEasyCrop_Video",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",O)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Fo(Fo({},x),{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 es.createElement("source",Fo({key:L.src},L))})),this.state.cropSize&&es.createElement("div",Fo({ref:this.cropperRef,style:Fo(Fo({},S),{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:hI("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",I)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:REe,minZoom:PEe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:OEe},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})(es.Component);var uoe=l(P(),1);var ab=l(P(),1);var ooe=Object.prototype.hasOwnProperty;function roe(e,t,o){for(o of e.keys())if(Hm(o,t))return o}function Hm(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--&&Hm(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=roe(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=roe(t,n),!n)||!Hm(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(ooe.call(e,o)&&++r&&!ooe.call(t,o)||!(o in t)||!Hm(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var qs=l(P(),1);var sb=1,noe=5;var bI=e=>e>=0?e%360:(360+e%360)%360,AEe=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 ioe(e){return e*Math.PI/180}function LEe(e,t,o){let r=ioe(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 soe(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await AEe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=ioe(o),{width:c,height:u}=LEe(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 Gm={crop:{x:0,y:0,width:100,height:100},zoom:sb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},NEe={x:0,y:0},M3={crop:NEe,croppedArea:Gm.crop,croppedAreaPixels:null,zoom:Gm.zoom,rotation:Gm.rotation,flip:Gm.flip,aspectRatio:Gm.aspectRatio,mediaSize:null};function aoe(){let[e,t]=(0,qs.useState)(M3),[o,r]=(0,qs.useState)(null),n=(0,qs.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=bI(m.rotation)),{...d,...m}})},[]),i=(0,qs.useCallback)((u=null)=>{if(!u){r(null),n(M3);return}if(typeof u=="object"){let d={...Gm,...u};r(d),n(d)}},[n,r]),s=(0,qs.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({...M3})},[o,n]),a=(0,qs.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:bI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Hm(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:bI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Hm(u,Gm)===!1},[e,o]),c=(0,qs.useCallback)(async u=>e.croppedAreaPixels?soe(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,qs.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var loe=l(w(),1),coe=(0,ab.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:sb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function D3({children:e}){let t=aoe(),o=(0,ab.useMemo)(()=>({...t}),[t]);return(0,loe.jsx)(coe.Provider,{value:o,children:e})}var HS=()=>{let e=(0,ab.useContext)(coe);if(!e)throw new Error("Missing ImageCropperContext");return e};var doe=l(w(),1);function V3({src:e,onLoad:t,minZoom:o=sb,maxZoom:r=noe,...n}){let{cropperState:i,setCropperState:s}=HS(),{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,uoe.useCallback)((v,k)=>{s({croppedArea:v,croppedAreaPixels:k})},[s]);return(0,doe.jsx)(toe,{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 ub=l(A(),1),cb=l(N(),1);var foe=100,moe=300,kI={placement:"bottom-start"};var lb=l(P(),1);var vI=l(F(),1),Wm=l(P(),1),gc=l(N(),1),poe=l(Ti(),1),hoe=l(Fe(),1);var MEe={crop:(0,gc.__)("Image cropped."),rotate:(0,gc.__)("Image rotated."),cropAndRotate:(0,gc.__)("Image cropped and rotated.")};function goe({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,vI.useDispatch)(poe.store),[c,u]=(0,Wm.useState)(!1),{editMediaEntity:d}=(0,vI.useSelect)(h=>({editMediaEntity:h(_).getSettings()?.[k0]}),[]),f=(0,Wm.useCallback)(()=>{u(!1),i()},[i]),m=(0,Wm.useCallback)(async()=>{if(!d){i(),s((0,gc.__)("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(MEe[p],{type:"snackbar",actions:[{label:(0,gc.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,gc.sprintf)((0,gc.__)("Could not edit image. %s"),(0,hoe.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,Wm.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var Zs=l(P(),1),boe=l(rt(),1);function koe({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,Zs.useState)(),{cropperState:i,setCropperState:s}=HS(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,Zs.useCallback)(k=>{s({zoom:k})},[s]),m=(0,Zs.useCallback)(k=>{s({aspectRatio:k})},[s]),h=t/o,p=o/t;(0,Zs.useEffect)(()=>{m(h)},[]);let[g,b]=(0,Zs.useState)(0),v=(0,Zs.useCallback)(()=>{let k=(g+90)%360,y=h,x=a!==1||!(h===c||p===c);if(g%180===90&&(y=1/h),k===0){n(),b(k),s({aspectRatio:x?c:h,crop:{x:-(u.y*y),y:u.x*y}});return}function C(O){let E=document.createElement("canvas"),L=0,T=0;k%180?(E.width=O.target.height,E.height=O.target.width):(E.width=O.target.width,E.height=O.target.height),(k===90||k===180)&&(L=E.width),(k===270||k===180)&&(T=E.height);let R=E.getContext("2d");R.translate(L,T),R.rotate(k*Math.PI/180),R.drawImage(O.target,0,0),E.toBlob(D=>{n(URL.createObjectURL(D)),b(k);let j=x?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 I=(0,boe.applyFilters)("media.crossOrigin",void 0,e);typeof I=="string"&&(B.crossOrigin=I)},[g,h,e,s,u,a,c,p,b]);return(0,Zs.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 voe=l(w(),1),F3=(0,lb.createContext)({});F3.displayName="ImageEditingContext";var Ua=()=>(0,lb.useContext)(F3);function yoe({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=koe({url:t,naturalWidth:o,naturalHeight:r}),c=goe({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,lb.useMemo)(()=>({...a,...c}),[a,c]);return(0,voe.jsx)(F3.Provider,{value:u,children:s})}var ts=l(w(),1);function yI({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,ts.jsx)(ub.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,ts.jsx)(ub.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?gl:void 0,children:i},s))})}function DEe(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 z3({ratio:e,...t}){return{ratio:DEe(e),...t}}function Soe({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=Ua(),[i,s,a]=me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,ts.jsx)(ub.DropdownMenu,{icon:NO,label:(0,cb.__)("Aspect Ratio"),popoverProps:kI,toggleProps:e,children:({onClose:c})=>(0,ts.jsxs)(ts.Fragment,{children:[(0,ts.jsx)(yI,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,cb.__)("Original"),ratio:n},...a?i.map(z3).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,ts.jsx)(yI,{label:(0,cb.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,ts.jsx)(yI,{label:(0,cb.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(z3).filter(({ratio:u})=>u>1)}),a&&(0,ts.jsx)(yI,{label:(0,cb.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(z3).filter(({ratio:u})=>u<1)})]})})}var _oe=l(A(),1),xoe=l(Z(),1);var Sd=l(w(),1);function woe({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=Ua(),[u,{width:d}]=(0,xoe.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,Sd.jsxs)("div",{className:V("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,Sd.jsx)(V3,{src:a||e}),s&&(0,Sd.jsx)(_oe.Spinner,{})]});return(0,Sd.jsxs)(Sd.Fragment,{children:[u,m]})}var _d=l(A(),1),j3=l(N(),1);var GS=l(w(),1);function Coe(){let{isInProgress:e,zoom:t,setZoom:o}=Ua();return(0,GS.jsx)(_d.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:kI,renderToggle:({isOpen:r,onToggle:n})=>(0,GS.jsx)(_d.ToolbarButton,{icon:qL,label:(0,j3.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,GS.jsx)(_d.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,GS.jsx)(_d.RangeControl,{__next40pxDefaultSize:!0,label:(0,j3.__)("Zoom"),min:foe,max:moe,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var Boe=l(A(),1),Eoe=l(N(),1);var Toe=l(w(),1);function Ioe(){let{isInProgress:e,rotateClockwise:t}=Ua();return(0,Toe.jsx)(Boe.ToolbarButton,{icon:WL,label:(0,Eoe.__)("Rotate"),onClick:t,disabled:e})}var U3=l(A(),1),H3=l(N(),1);var $m=l(w(),1);function Poe(){let{isInProgress:e,apply:t,cancel:o}=Ua();return(0,$m.jsxs)($m.Fragment,{children:[(0,$m.jsx)(U3.ToolbarButton,{onClick:t,disabled:e,children:(0,H3.__)("Apply")}),(0,$m.jsx)(U3.ToolbarButton,{onClick:o,children:(0,H3.__)("Cancel")})]})}var ai=l(w(),1);function Roe({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,ai.jsx)(D3,{children:(0,ai.jsxs)(yoe,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,ai.jsx)(woe,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,ai.jsxs)(Mt,{children:[(0,ai.jsxs)(WS.ToolbarGroup,{children:[(0,ai.jsx)(Coe,{}),(0,ai.jsx)(WS.ToolbarItem,{children:u=>(0,ai.jsx)(Soe,{toggleProps:u})}),(0,ai.jsx)(Ioe,{})]}),(0,ai.jsx)(WS.ToolbarGroup,{children:(0,ai.jsx)(Poe,{})})]})]})})}var li=l(A(),1),xd=l(N(),1);var db=l(P(),1);function Ooe(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 os=l(w(),1),Aoe=[25,50,75,100],VEe=()=>{};function Loe(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function Noe({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=VEe}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:h}=Ooe(a,s,o,t,c),p=b=>{if(b===void 0){h();return}let{scaledWidth:v,scaledHeight:k}=Loe(b,t,o);h(k,v)},g=Aoe.find(b=>{let{scaledWidth:v,scaledHeight:k}=Loe(b,t,o);return f===v&&d===k});return(0,os.jsxs)(li.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,os.jsx)(li.SelectControl,{label:(0,xd.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,os.jsxs)(os.Fragment,{children:[(0,os.jsxs)(li.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,os.jsx)(li.__experimentalNumberControl,{label:(0,xd.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,os.jsx)(li.__experimentalNumberControl,{label:(0,xd.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,os.jsx)(li.__experimentalToggleGroupControl,{label:(0,xd.__)("Image size presets"),hideLabelFromVision:!0,onChange:p,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:Aoe.map(b=>(0,os.jsx)(li.__experimentalToggleGroupControlOption,{value:b,label:(0,xd.sprintf)((0,xd.__)("%d%%"),b)},b))})]})]})}var SI=l(A(),1);var Km=l(N(),1),Doe=l(w(),1),Moe={left:ou,center:tu,right:ru,"space-between":zp,stretch:jp};function FEe({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?Moe[r]:Moe.left,c=[{name:"left",icon:ou,title:(0,Km.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:tu,title:(0,Km.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:ru,title:(0,Km.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:zp,title:(0,Km.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:jp,title:(0,Km.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?SI.ToolbarGroup:SI.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,Doe.jsx)(u,{icon:a,popoverProps:n,label:(0,Km.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var G3=FEe;var W3=l(w(),1),lh=e=>(0,W3.jsx)(G3,{...e,isToolbar:!1}),Voe=e=>(0,W3.jsx)(G3,{...e,isToolbar:!0});var Xr=l(A(),1),Xs=l(N(),1),no=l(P(),1),Ire=l(Z(),1),Pre=l(Fe(),1),Rre=l(it(),1),Ore=l(Xy(),1),NI=l(F(),1),eF=l(Xp(),1);var Are=l(Re(),1),MI=l(un(),1);var fb=l(A(),1);var _I=l(Z(),1),xI=l(N(),1),Foe=l(P(),1),bc=l(w(),1);function zoe({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,_I.useReducedMotion)(),n=r?Foe.Fragment:fb.__unstableAnimatePresence,i=r?"div":fb.__unstableMotion.div,a=`link-control-settings-drawer-${(0,_I.useInstanceId)(zoe)}`;return(0,bc.jsxs)(bc.Fragment,{children:[(0,bc.jsx)(fb.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,xI.isRTL)()?Qk:eu,"aria-controls":a,children:(0,xI._x)("Advanced","Additional link settings")}),(0,bc.jsx)(n,{children:t&&(0,bc.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,bc.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var joe=zoe;var II=l(P(),1),Q3=l(N(),1),sre=l(Re(),1);var $S=l(N(),1),Qoe=l(A(),1);var wI=l(N(),1),Uoe=l(A(),1),Hoe=l(P(),1);var $3=l(w(),1),zEe=({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,Hoe.createInterpolateElement)((0,wI.sprintf)((0,wI.__)("Create: <mark>%s</mark>"),e),{mark:(0,$3.jsx)("mark",{})}),(0,$3.jsx)(Uoe.MenuItem,{...o,iconPosition:"left",icon:wi,className:"block-editor-link-control__search-item",onClick:t,children:n})},Goe=zEe;var kc=l(N(),1),BI=l(A(),1);var Woe=l(Fe(),1),pb=l(un(),1),$oe=l(Z(),1),Koe=l(Re(),1),mb=l(w(),1),CI={post:{icon:zL,label:(0,kc.__)("Post")},page:{icon:kl,label:(0,kc.__)("Page")},post_tag:{icon:bN,label:(0,kc.__)("Tag")},category:{icon:zO,label:(0,kc.__)("Category")},attachment:{icon:hA,label:(0,kc.__)("Attachment")}};function jEe({isURL:e,suggestion:t}){let o=null;return e?o=ev:t.type in CI&&(o=CI[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=KA),t.isBlogHome&&(o=RN))),o?(0,mb.jsx)(xe,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function UEe(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function HEe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var GEe=(e,...t)=>(...o)=>e(...o,...t),WEe=e=>t=>t==null||t!==t?e:t;function $Ee(e){return e&&(0,$oe.pipe)(pb.safeDecodeURI,pb.getPath,WEe(""),GEe(pb.filterURLForDisplay,24),HEe,UEe)(e)}var Yoe=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,kc.__)("Press ENTER to add this link"):$Ee(t.url);return(0,mb.jsx)(BI.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,mb.jsx)(jEe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&KEe(t),className:"block-editor-link-control__search-item",children:(0,mb.jsx)(BI.TextHighlight,{text:(0,Woe.__unstableStripHTML)(t.title),highlight:o})})};function KEe(e){return e.isFrontPage?(0,kc.__)("Front page"):e.isBlogHome?(0,kc.__)("Blog home"):e.type in CI?CI[e.type].label:e.type}var qoe=Yoe,Zoe=e=>((0,Koe.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,mb.jsx)(Yoe,{...e}));var Xoe=l(N(),1),Ym="__CREATE__",K3="tel",EI="link",Y3="mailto",q3="internal",hb=[EI,Y3,K3,q3],Z3=[{id:"opensInNewTab",title:(0,Xoe.__)("Open in new tab")}];var Joe=l(Re(),1),qm=l(w(),1);function ere({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&&hb.includes(i[0].type),h=e&&!m&&!c,p=!d?.type,g=c?(0,$S.__)("Suggestions"):(0,$S.sprintf)((0,$S.__)('Search results for "%s"'),t);return(0,qm.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,qm.jsx)("div",{...r,className:f,"aria-label":g,children:(0,qm.jsx)(Qoe.MenuGroup,{children:i.map((b,v)=>h&&Ym===b.type?(0,qm.jsx)(Goe,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,v),isSelected:v===s},b.type):Ym===b.type?null:(0,qm.jsx)(qoe,{itemProps:n(b,v),suggestion:b,index:v,onClick:()=>{o(b)},isSelected:v===s,isURL:hb.includes(b.type),searchTerm:t,shouldShowType:p,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var tre=ere,ore=e=>((0,Joe.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,qm.jsx)(ere,{...e}));var rre=l(P(),1),nre=l(F(),1);var TI=l(un(),1);function KS(e){let t=e?.trim();if(!t)return{url:t,type:EI};let o=EI,r=(0,TI.getProtocol)(t)||"";return r.includes("mailto")?o=Y3:r.includes("tel")?o=K3:t?.startsWith("#")&&(o=q3),mf(t)||pf(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,TI.prependHTTPS)(t),type:o}}var YEe=()=>Promise.resolve([]),qEe=e=>{let{url:t,type:o}=KS(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},ZEe=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||hf(e)||!r?a:a.concat({title:e,url:e,type:Ym})};function ire(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,nre.useSelect)(a=>{let{getSettings:c}=a(_);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?qEe:YEe;return(0,rre.useCallback)((a,{isInitialSuggestions:c})=>hf(a)?s(a,{isInitialSuggestions:c}):ZEe(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var gb=l(w(),1),XEe=()=>Promise.resolve([]),X3=()=>{},are=(0,II.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=X3,onChange:a=X3,onSelect:c=X3,showSuggestions:u=!0,renderSuggestions:d=C=>(0,gb.jsx)(tre,{...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},x)=>{let C=ire(p,m,i,g),B=u?f||C:XEe,[I,O]=(0,II.useState)(),E=(j,G)=>{a(j),O(G)},L=j=>d({...j,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:p,handleSuggestionClick:G=>{j.handleSuggestionClick&&j.handleSuggestionClick(G),T(G)}}),T=async j=>{let G=j;if(Ym===j.type){try{G=await s(j.title),G?.url&&c(G)}catch{}return}if(m||G&&Object.keys(G).length>=1){let{id:z,url:H,kind:W,type:te,...ne}=o??{};c({...ne,...G},G)}},R=n??(0,Q3.__)("Search or type URL"),D=v&&n!==""?R:(0,Q3.__)("Link");return(0,gb.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,gb.jsx)(wd,{disableSuggestions:o?.url===e,label:D,hideLabelFromVision:v,className:r,value:e,onChange:E,placeholder:R,__experimentalRenderSuggestions:u?L:null,__experimentalFetchLinkSuggestions:B,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,customValidity:S,required:!1,onSubmit:(j,G)=>{let z=j||I;!z&&!e?.trim()?.length?G.preventDefault():T(z||{url:e})},inputRef:x,suffix:k,disabled:y}),t]})}),lre=are,cre=e=>((0,sre.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,gb.jsx)(are,{...e}));var Cd=l(N(),1),Ao=l(A(),1),pre=l(Z(),1),OI=l(un(),1);var hre=l(Fe(),1),AI=l(F(),1),gre=l(Ti(),1),bre=l(Xp(),1);var ure=l(A(),1),{Slot:dre,Fill:fre}=(0,ure.createSlotFill)("BlockEditorLinkControlViewer");var mre=l(F(),1),PI=l(P(),1);function QEe(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 JEe(e){let[t,o]=(0,PI.useReducer)(QEe,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,mre.useSelect)(n=>{let{getSettings:i}=n(_);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,PI.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 RI=JEe;var yt=l(w(),1),{Badge:eTe}=M(Ao.privateApis);function kre({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,AI.useSelect)(b=>b(bre.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=RI(s),u=a&&Object.keys(a).length,d=e&&(0,OI.filterURLForDisplay)((0,OI.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,hre.__unstableStripHTML)(a?.title||e?.title||d),h;a?.icon?h=(0,yt.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,yt.jsx)(xe,{icon:ZA,size:32}):h=(0,yt.jsx)(xe,{icon:ev});let{createNotice:p}=(0,AI.useDispatch)(gre.store),g=(0,pre.useCopyToClipboard)(e.url,()=>{p("info",(0,Cd.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,yt.jsx)(Ao.Flex,{role:"group","aria-label":(0,Cd.__)("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,yt.jsxs)(Ao.Flex,{gap:0,align:"flex-start",children:[(0,yt.jsxs)(Ao.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,Cd.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,yt.jsx)(Ao.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,yt.jsx)("img",{src:e?.image,alt:""})}):(0,yt.jsx)(Ao.Flex,{className:V("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,yt.jsx)(Ao.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,yt.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,Cd.__)("Link is empty")}):(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(Ao.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,yt.jsx)(Ao.__experimentalTruncate,{numberOfLines:1,children:m})}),(0,yt.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,yt.jsx)(Ao.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,yt.jsx)(Ao.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,v)=>(0,yt.jsx)(eTe,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${v}`))})]})})]}),(0,yt.jsx)(Ao.Button,{icon:If,label:(0,Cd.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,yt.jsx)(Ao.Button,{icon:xi,label:(0,Cd.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,yt.jsx)(Ao.Button,{icon:QO,label:(0,Cd.__)("Copy link"),ref:g,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,yt.jsx)(dre,{fillProps:e})]})})}var vre=l(N(),1),LI=l(A(),1),bb=l(w(),1),tTe=()=>{},oTe=({value:e,onChange:t=tTe,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,bb.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,bb.jsx)(LI.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,bb.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,bb.jsx)(LI.VisuallyHidden,{as:"legend",children:(0,vre.__)("Currently selected link settings")}),n]})},yre=oTe;var Sre=l(N(),1),Zm=l(P(),1);function _re(e){let t=(0,Zm.useRef)(),[o,r]=(0,Zm.useState)(!1),[n,i]=(0,Zm.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=rTe(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,Sre.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,Zm.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var rTe=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 J3=l(P(),1),Cre=l(wre(),1);function Bre(e){let[t,o]=(0,J3.useState)(e||{}),[r,n]=(0,J3.useState)(e);return(0,Cre.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 Pt=l(w(),1),tF=()=>{},Ere="core/block-editor",Tre="linkControlSettingsDrawer";function Xm({searchInputPlaceholder:e,value:t,settings:o=Z3,onChange:r=tF,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:S=!1}){m===void 0&&f&&(m=!0);let[x,C]=(0,no.useState)(!1),[B,I]=(0,no.useState)(void 0),{advancedSettingsPreference:O}=(0,NI.useSelect)(ge=>({advancedSettingsPreference:ge(eF.store).get(Ere,Tre)??!1}),[]),{set:E}=(0,NI.useDispatch)(eF.store),L=ge=>{E&&E(Ere,Tre,ge),C(ge)},T=O||x,R=(0,no.useRef)(!0),D=(0,no.useRef)(),j=(0,no.useRef)(),G=(0,no.useRef)(),z=(0,no.useRef)(),H=o.map(({id:ge})=>ge),[W,te,ne,ae,X]=Bre(t),ee=ge=>{ne(ge),n?.(ge)},le=S&&!!W?.id,Q=(0,Ire.useInstanceId)(Xm,"link-control"),J=le?`${Q}__help`:null,q=t&&!(0,Ore.isShallowEqualObjects)(W,t),[U,K]=(0,no.useState)(d!==void 0?d:!t||!t.url),{createPage:se,isCreatingPage:ce,errorMessage:Se}=_re(f);(0,no.useEffect)(()=>{d!==void 0&&K(d)},[d]),(0,no.useEffect)(()=>{if(R.current)return;(Pre.focus.focusable.find(D.current)[0]||D.current).focus()},[U,ce]),(0,no.useEffect)(()=>(R.current=!1,()=>{R.current=!0}),[]);let he=(0,no.useRef)();(0,no.useEffect)(()=>{if(he.current===void 0){he.current=h;return}he.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."),he.current=h)},[h]),(0,no.useEffect)(()=>{if(B?.type==="invalid"){let ge=G.current;ge&&typeof ge.reportValidity=="function"&&ge.reportValidity()}},[B]);let we=t?.url?.trim()?.length>0,De=()=>{K(!1)},ct=ge=>{let Ct={type:"invalid",message:(0,Xs.__)("Please enter a valid URL.")},To={type:"valid"},Ye=ge?.trim();if(!Ye?.length||!hf(Ye))return Ct;if(mf(Ye)||pf(Ye))return To;let oe=(0,MI.prependHTTPS)(Ye);return(0,MI.isURL)(oe)?To:Ct},Jt=ge=>{if(!(ge&&ge.id&&ge.type&&!hb.includes(ge.type))){let Ye=ge?.url||Ue,oe=ct(Ye);if(oe.type==="invalid"){I(oe);return}let{url:Ae}=KS(Ye);ge={...ge,url:Ae}}ge?.kind==="taxonomy"&&ge?.url&&(z.current=ge.url);let To=Object.keys(ge).reduce((Ye,oe)=>(H.includes(oe)||(Ye[oe]=ge[oe]),Ye),{});r({...W,...To,title:W?.title||ge?.title}),I(void 0),De()},uo=()=>{if(Lr)return!1;let ge=Ue.trim(),Ct=W&&W.id&&W.type&&!hb.includes(W.type),To=t?.url===ge;if(Ct&&To)return I(void 0),!0;let Ye=ct(Ue);return Ye.type==="invalid"?(I(Ye),!1):(I(void 0),!0)},Do=()=>{q&&r({...t,...W,url:KS(Ue).url}),De(),I(void 0)},ot=()=>{uo()&&Do()},sr=ge=>{let{keyCode:Ct}=ge;Ct===Rre.ENTER&&!Lr&&(ge.preventDefault(),ot())},ze=()=>{te(t)},wt=ge=>{ge.preventDefault(),ge.stopPropagation(),ze(),I(void 0),we?De():i?.(),s?.()},[je,At]=(0,no.useState)(!1),ar=()=>{let{id:ge,kind:Ct,type:To,...Ye}=W;te({...Ye,id:void 0,kind:void 0,type:void 0,url:void 0}),At(!0)};(0,no.useEffect)(()=>{je&&(G.current?.focus(),At(!1))},[je]);let Ue=W?.url!==void 0?W.url:h||"",Lr=!Ue?.trim()?.length;(0,no.useEffect)(()=>{I(void 0)},[Ue]);let ki=!B,eo=i&&t&&!U&&!ce,Bo=U&&we,Xe=we&&k,Ve=(U||!t)&&!ce,bt=Lr||!ki||t&&!q,Eo=!!o?.length&&U&&we,lr=(0,no.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&z.current?{...t,url:z.current}:t,[t]);return(0,Pt.jsxs)("div",{tabIndex:-1,ref:D,className:"block-editor-link-control",children:[ce&&(0,Pt.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Pt.jsx)(Xr.Spinner,{})," ",(0,Xs.__)("Creating"),"\u2026"]}),Ve&&(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsxs)("div",{className:V({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":Xe,"has-actions":Bo}),children:[Xe&&(0,Pt.jsx)(Xr.TextControl,{ref:j,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,Xs.__)("Text"),value:W?.title,onChange:ae,onKeyDown:sr,__next40pxDefaultSize:!0}),(0,Pt.jsx)(lre,{ref:G,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:Ue,withCreateSuggestion:m,onCreateSuggestion:se,onChange:ee,onSelect:Jt,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:c,suggestionsQuery:p,withURLSuggestion:!g,createSuggestionButtonText:b,hideLabelFromVision:!Xe,isEntity:le,customValidity:B,suffix:(0,Pt.jsx)(nTe,{isEntity:le,showActions:Bo,isDisabled:bt,onUnlink:ar,onSubmit:ot,helpTextId:J})}),le&&J&&(0,Pt.jsx)("p",{id:J,className:"block-editor-link-control__help",children:(0,Xs.sprintf)((0,Xs.__)("Synced with the selected %s."),W?.type||"item")})]}),Se&&(0,Pt.jsx)(Xr.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:Se})]}),t&&!U&&!ce&&(0,Pt.jsx)(kre,{value:lr,onEditClick:()=>K(!0),hasRichPreviews:v,hasUnlinkControl:eo,onRemove:()=>{i(),K(!0)}},lr?.url),Eo&&(0,Pt.jsx)("div",{className:"block-editor-link-control__tools",children:!Lr&&(0,Pt.jsx)(joe,{settingsOpen:T,setSettingsOpen:L,children:(0,Pt.jsx)(yre,{value:W,settings:o,onChange:X(H)})})}),Bo&&(0,Pt.jsxs)(Xr.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Pt.jsx)(Xr.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:wt,children:(0,Xs.__)("Cancel")}),(0,Pt.jsx)(Xr.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:bt?tF:ot,className:"block-editor-link-control__search-submit","aria-disabled":bt,children:(0,Xs.__)("Apply")})]}),!ce&&y&&y()]})}function nTe({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Pt.jsx)(Xr.Button,{icon:xi,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,Xs.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Pt.jsx)(Xr.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Pt.jsx)(Xr.Button,{onClick:o?tF:n,label:(0,Xs.__)("Submit"),icon:bl,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}Xm.ViewerFill=fre;Xm.DEFAULT_LINK_SETTINGS=Z3;var DI=e=>((0,Are.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Pt.jsx)(Xm,{...e}));DI.ViewerFill=Xm.ViewerFill;DI.DEFAULT_LINK_SETTINGS=Xm.DEFAULT_LINK_SETTINGS;var Bd=Xm;var Nre=l(N(),1),Mre=l(A(),1),Dre=l(Re(),1);var YS=1.5,oF=.01,rF=10,nF="";function Lre(e){return e!==void 0&&e!==nF}var iF=l(w(),1),iTe=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=Lre(t),s=(d,f)=>{if(i)return d;let m=oF*rF;switch(`${d}`){case`${m}`:return YS+m;case"0":return f?d:YS-m;case"":return YS;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:nF,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,Dre.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,iF.jsx)("div",{className:"block-editor-line-height-control",children:(0,iF.jsx)(Mre.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,Nre.__)("Line height"),placeholder:YS,step:oF,spinFactor:rF,value:c,min:0,spinControls:"custom"})})},VI=iTe;var Ha=l(N(),1),Vre=l(Zo(),1),Qr=l(A(),1),zI=l(F(),1),Fre=l(it(),1);var zre=l(Z(),1),jre=l(Fe(),1),Ure=l(Ti(),1),Hre=l(P(),1);function FI(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 or=l(w(),1),sTe=()=>{},aTe=0,lTe=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=sTe,name:m=(0,Ha.__)("Replace"),createNotice:h,removeNotice:p,children:g,multiple:b=!1,addToGallery:v,handleUpload:k=!0,variant:y,popoverProps:S,renderToggle:x,className:C})=>{let{mediaUpload:B,allowedMimeTypes:I}=(0,zI.useSelect)(H=>{let{getSettings:W}=H(_),te=W();return{mediaUpload:te.mediaUpload,allowedMimeTypes:te.allowedMimeTypes}},[]),O=`block-editor/media-replace-flow/error-notice/${++aTe}`,E=(0,Hre.useMemo)(()=>FI(r,I,n),[r,I,n]),L=H=>{let W=(0,jre.__unstableStripHTML)(H);if(i){i(W);return}setTimeout(()=>{h("error",W,{speak:!0,id:O,isDismissible:!0})},1e3)},T=(H,W)=>{d&&u&&u(),W(),s(H),(0,Vre.speak)((0,Ha.__)("The media file has been replaced")),p(O)},R=(H,W)=>{let te=H.target.files;if(!k)return W(),s(te);f(te),B({allowedTypes:r,filesList:te,onFileChange:([ne])=>{T(ne,W)},onError:L})},D=H=>{H.keyCode===Fre.DOWN&&(H.preventDefault(),H.target.click())},G=b&&(!r||r.length===0?!1:r.every(H=>H==="image"||H.startsWith("image/"))),z={...S,variant:y};return(0,or.jsx)(Qr.Dropdown,{popoverProps:z,className:C,contentClassName:V("block-editor-media-replace-flow__options",y&&`is-variant-${y}`),renderToggle:({isOpen:H,onToggle:W})=>x?x({"aria-expanded":H,"aria-haspopup":"true",onClick:W,onKeyDown:D,children:m}):(0,or.jsx)(Qr.ToolbarButton,{"aria-expanded":H,"aria-haspopup":"true",onClick:W,onKeyDown:D,children:m}),renderContent:({onClose:H})=>(0,or.jsxs)(or.Fragment,{children:[(0,or.jsxs)(Qr.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,or.jsxs)(Ms,{children:[(0,or.jsx)(Wu,{gallery:G,addToGallery:v,multiple:b,value:b?o:t,onSelect:W=>T(W,H),allowedTypes:r,render:({open:W})=>(0,or.jsx)(Qr.MenuItem,{icon:Up,onClick:W,children:(0,Ha.__)("Open Media Library")})}),(0,or.jsx)(Qr.FormFileUpload,{onChange:W=>{R(W,H)},accept:E,multiple:!!b,render:({openFileDialog:W})=>(0,or.jsx)(Qr.MenuItem,{icon:IN,onClick:()=>{W()},children:(0,Ha._x)("Upload","verb")})})]}),u&&(0,or.jsx)(Qr.MenuItem,{icon:VL,onClick:u,isPressed:d,children:(0,Ha.__)("Use featured image")}),typeof g=="function"?g({onClose:H}):g,e&&c&&(0,or.jsx)(Qr.MenuItem,{onClick:()=>{c(),H()},children:(0,Ha.__)("Reset")})]}),a&&(0,or.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,or.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,Ha.__)("Current media URL:")}),(0,or.jsx)(Bd,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:W})=>{a(W)},searchInputPlaceholder:(0,Ha.__)("Paste or type URL")})]})]})})},kb=(0,zre.compose)([(0,zI.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(Ure.store);return{createNotice:t,removeNotice:o}}),(0,Qr.withFilters)("editor.MediaReplaceFlow")])(lTe);var So=l(A(),1),yo=l(N(),1),Pd=l(P(),1),rne=l(F(),1);var nne=l(Re(),1);var aF=l(N(),1),UI=l(P(),1),vb=l(A(),1);var one=l(Re(),1);var $re=l(N(),1),Kre=l(A(),1);var Gre=l(A(),1),jI=l(un(),1),sF=l(w(),1);function Wre({url:e,urlLabel:t,className:o}){let r=V(o,"block-editor-url-popover__link-viewer-url");return e?(0,sF.jsx)(Gre.ExternalLink,{className:r,href:e,children:t||(0,jI.filterURLForDisplay)((0,jI.safeDecodeURI)(e))}):(0,sF.jsx)("span",{className:r})}var qS=l(w(),1);function Yre({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,qS.jsxs)("div",{className:V("block-editor-url-popover__link-viewer",e),...i,children:[(0,qS.jsx)(Wre,{url:r,urlLabel:n,className:t}),o&&(0,qS.jsx)(Kre.Button,{icon:If,label:(0,$re.__)("Edit"),onClick:o,size:"compact"})]})}var Jre=l(N(),1),ene=l(A(),1);var vc=l(N(),1),ZS=l(P(),1),Qs=l(it(),1),En=l(A(),1),Ed=l(Z(),1),qre=l(F(),1),Zre=l(un(),1);var Ga=l(w(),1),Xre=l(zr(),1),{ValidatedInputControl:cTe}=M(En.privateApis);function Qre(e){return typeof e=="function"}var uTe=class extends ZS.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,ZS.createRef)(),this.inputRef=e.inputRef||(0,ZS.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,Ed.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,Zre.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,vc.sprintf)((0,vc._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,vc.__)("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 Qs.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case Qs.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case Qs.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 Qs.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case Qs.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case Qs.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,vc.__)("Link selected.")));break}case Qs.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,Ga.jsxs)(Ga.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,vc.__)("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,vc.__)("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},S={customValidity:d,...f!==void 0&&{markWhenOptional:f}};if(i)return i(k,y,m);d!==void 0&&(this.hasRenderedValidation.current=!0);let x=this.hasRenderedValidation.current?cTe:En.__experimentalInputControl;return(0,Ga.jsxs)(En.BaseControl,{...k,children:[(0,Ga.jsx)(x,{...y,...this.hasRenderedValidation.current?S:{},__next40pxDefaultSize:!0}),m&&(0,Ga.jsx)(En.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 Qre(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,Ga.jsx)(En.Popover,{placement:"bottom",focusOnMount:!1,children:(0,Ga.jsx)("div",{...u,className:V("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,Xre.createElement)(En.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))})})}},wd=(0,Ed.compose)(Ed.withSafeTimeout,En.withSpokenMessages,Ed.withInstanceId,(0,qre.withSelect)((e,t)=>{if(Qre(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(_);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(uTe);var XS=l(w(),1);function tne({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,XS.jsxs)("form",{className:V("block-editor-url-popover__link-editor",t),...n,children:[(0,XS.jsx)(wd,{value:r,onChange:o,autocompleteRef:e}),(0,XS.jsx)(ene.Button,{icon:bl,label:(0,Jre.__)("Apply"),type:"submit",size:"compact"})]})}var Td=l(w(),1),{__experimentalPopoverLegacyPositionToPlacement:dTe}=M(vb.privateApis),fTe="bottom",lF=(0,UI.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,one.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=dTe(i)),c=c||fTe;let[u,d]=(0,UI.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,Td.jsxs)(vb.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,aF.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,Td.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,Td.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,Td.jsx)(vb.Button,{className:"block-editor-url-popover__settings-toggle",icon:Fn,label:(0,aF.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,Td.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,Td.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});lF.LinkEditor=tne;lF.LinkViewer=Yre;var Id=lF;var We=l(w(),1),mTe=()=>{},pTe=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,We.jsx)(Id,{anchor:n,onClose:r,children:(0,We.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,We.jsx)(So.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,yo.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,yo.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,We.jsx)(So.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,We.jsx)(So.Button,{size:"small",icon:bl,label:(0,yo.__)("Apply"),type:"submit"})})})})}),hTe=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,Pd.useState)(null),[i,s]=(0,Pd.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,We.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,yo.__)("Insert from URL")}),i&&(0,We.jsx)(pTe,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function gTe({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:S=mTe,onHTMLDrop:x,children:C,mediaLibraryButton:B,placeholder:I,style:O}){x&&(0,nne.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:E,allowedMimeTypes:L}=(0,rne.useSelect)(Q=>{let{getSettings:J}=Q(_),q=J();return{mediaUpload:q.mediaUpload,allowedMimeTypes:q.allowedMimeTypes}},[]),[T,R]=(0,Pd.useState)("");(0,Pd.useEffect)(()=>{R(e?.src??"")},[e?.src]);let D=(0,Pd.useMemo)(()=>FI(t,L,c),[t,L,c]),j=()=>!t||t.length===0?!1:t.every(Q=>Q==="image"||Q.startsWith("image/")),G=Q=>{if(!f||typeof f=="function"&&!f(Q))return g(Q);S(Q);let J;if(d)if(u){let q=[];J=U=>{let K=(e??[]).filter(se=>se.id?!q.some(({id:ce})=>Number(ce)===Number(se.id)):!q.some(({urlSlug:ce})=>se.url.includes(ce)));g(K.concat(U)),q=U.map(se=>{let ce=se.url.lastIndexOf("."),Se=se.url.slice(0,ce);return{id:se.id,urlSlug:Se}})}}else J=g;else J=([q])=>g(q);E({allowedTypes:t,filesList:Q,onFileChange:J,onError:p,multiple:d})};async function z(Q){let{blocks:J}=Y5(Q);if(!J?.length)return;let q=await Promise.all(J.map(U=>{let K=U.name.split("/")[1];return U.attributes.id?(U.attributes.type=K,U.attributes):new Promise((se,ce)=>{window.fetch(U.attributes.url).then(Se=>Se.blob()).then(Se=>E({filesList:[Se],additionalData:{title:U.attributes.title,alt_text:U.attributes.alt,caption:U.attributes.caption,type:K},onFileChange:([he])=>{he.id&&se(he)},allowedTypes:t,onError:ce})).catch(()=>se(U.attributes.url))})})).catch(U=>p(U));q?.length&&g(d?q:q[0])}let H=Q=>{G(Q.target.files)},te=I??(Q=>{let{instructions:J,title:q}=n;if(!E&&!v&&(J=(0,yo.__)("To edit this block, you need permission to upload media.")),J===void 0||q===void 0){let K=t??[],[se]=K,ce=K.length===1,Se=ce&&se==="audio",he=ce&&se==="image",we=ce&&se==="video";J===void 0&&E&&(J=(0,yo.__)("Drag and drop an image or video, upload, or choose from your library."),Se?J=(0,yo.__)("Drag and drop an audio file, upload, or choose from your library."):he?J=(0,yo.__)("Drag and drop an image, upload, or choose from your library."):we&&(J=(0,yo.__)("Drag and drop a video, upload, or choose from your library."))),q===void 0&&(q=(0,yo.__)("Media"),Se?q=(0,yo.__)("Audio"):he?q=(0,yo.__)("Image"):we&&(q=(0,yo.__)("Video")))}let U=V("block-editor-media-placeholder",o,{"is-appender":a});return(0,We.jsxs)(So.Placeholder,{icon:r,label:q,instructions:J,className:U,notices:s,onDoubleClick:y,preview:i,style:O,children:[Q,C]})}),ne=()=>m?null:(0,We.jsx)(So.DropZone,{onFilesDrop:G,onDrop:z,isEligible:Q=>{let J="wp-block:core/",q=[];for(let U of Q.types)U.startsWith(J)&&q.push(U.slice(J.length));return q.every(U=>t.includes(U))&&(d?!0:q.length===1)}}),ae=()=>b&&(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,yo.__)("Cancel"),variant:"link",onClick:b,children:(0,yo.__)("Cancel")}),X=()=>v&&(0,We.jsx)(hTe,{src:T,onChangeSrc:R,onSelectURL:v}),ee=()=>k&&(0,We.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:k,variant:"secondary",children:(0,yo.__)("Use featured image")})}),le=()=>{let J=B??(({open:U})=>(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{U()},children:(0,yo.__)("Media Library")})),q=(0,We.jsx)(Wu,{addToGallery:u,gallery:d&&j(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:U})=>U):e.id,render:J});if(E&&a)return(0,We.jsxs)(We.Fragment,{children:[ne(),(0,We.jsx)(So.FormFileUpload,{onChange:H,accept:D,multiple:!!d,render:({openFileDialog:U})=>{let K=(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:U,children:(0,yo._x)("Upload","verb")}),q,X(),ee(),ae()]});return te(K)}})]});if(E){let U=(0,We.jsxs)(We.Fragment,{children:[ne(),(0,We.jsx)(So.FormFileUpload,{render:({openFileDialog:K})=>(0,We.jsx)(So.Button,{__next40pxDefaultSize:!0,onClick:K,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,yo._x)("Upload","verb")}),onChange:H,accept:D,multiple:!!d}),q,X(),ee(),ae()]});return te(U)}return te(q)};return h?(0,We.jsx)(Ms,{children:ne()}):(0,We.jsx)(Ms,{fallback:te(X()),children:le()})}var ine=(0,So.withFilters)("editor.MediaPlaceholder")(gTe);var sne=l(w(),1),bTe=({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,sne.jsx)(cI,{settings:o,gradients:[],disableCustomGradients:!0,...t})},ane=bTe;var rie=l(OM(),1);var nie=l(P(),1);var eie=l(P(),1);var Yne=l(bf(),1),rr=l(P(),1),Od=l(F(),1),rP=l(Z(),1),qne=l(ur(),1),Zne=l(A(),1),Xne=l($(),1),Qne=l(Re(),1),Ib=l(N(),1);var lne=l(N(),1),HI=l(A(),1);var cF=l(N(),1),Qm=l(A(),1);var yc=l(w(),1),kTe={placement:"bottom-start"},vTe=()=>(0,yc.jsxs)(yc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,yc.jsx)(Qm.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,yc.jsx)(Qm.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,yc.jsx)(Qm.ToolbarItem,{children:r=>(0,yc.jsx)(Qm.DropdownMenu,{icon:Fn,label:(0,cF.__)("More"),toggleProps:{...r,className:V(r.className,{"is-pressed":o}),description:(0,cF.__)("Displays more block tools")},controls:fa(e.map(([{props:n}])=>n),"title"),popoverProps:kTe})})}})]}),uF=vTe;var Rd=l(w(),1);function yTe({popoverAnchor:e}){return(0,Rd.jsx)(HI.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,Rd.jsx)(Cg,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,lne.__)("Format tools"),children:(0,Rd.jsx)(HI.ToolbarGroup,{children:(0,Rd.jsx)(uF,{})})})})}var STe=({inline:e,editableContentElement:t})=>e?(0,Rd.jsx)(yTe,{popoverAnchor:t}):(0,Rd.jsx)(Mt,{group:"inline",children:(0,Rd.jsx)(uF,{})}),cne=STe;var GI=l(P(),1),une=l(F(),1);function dne({html:e,value:t}){let o=(0,GI.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,une.useDispatch)(_);(0,GI.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 _b=l(P(),1),Pne=l(Z(),1);var QS=l(ur(),1),fne=l(rt(),1);var _Te=["`",'"',"'","\u201C\u201D","\u2018\u2019"],mne=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,QS.isCollapsed)(s))return;let u=(0,fne.applyFilters)("blockEditor.wrapSelectionSettings",_Te).find(([x,C])=>x===i||C===i);if(!u)return;let[d,f=d]=u,m=s.start,h=s.end+d.length,p=(0,QS.insert)(s,d,m,m);p=(0,QS.insert)(p,f,h,h);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=c.dispatch(_);g(),a(p),b();let v={};for(let x in r)v[x]=r[x];v.data=f;let{ownerDocument:k}=t,{defaultView:y}=k,S=new y.InputEvent("input",v);window.queueMicrotask(()=>{r.target.dispatchEvent(S)}),r.preventDefault()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var WI=l(ur(),1),yb=l($(),1);var pne=l(ur(),1);function hne(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,pne.insert)(e,o)}function gne(e){let t=e.length;for(;t--;){let o=Ov(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(Cl,""),[e[t].clientId,o,0,0];let r=gne(e[t].innerBlocks);if(r)return r}return[]}var bne=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,yb.getBlockTransforms)("from").filter(({type:v})=>v==="prefix"),p=(0,yb.findTransform)(h,({prefix:v})=>m===v);if(!p)return;let g=(0,WI.toHTMLString)({value:(0,WI.insert)(c,Cl,0,u)}),b=p.transform(g);return s(...gne([b])),i([b]),a.dispatch(_).__unstableMarkAutomaticChange(),!0}function r(n){let{inputType:i,type:s}=n,{getValue:a,onChange:c,__unstableAllowPrefixTransformations:u,formatTypes:d,registry:f,onReplace:m}=e.current;if(i!=="insertText"&&s!=="compositionend"||u&&o())return;let h=a(),p=(0,yb.getBlockTransforms)("from").filter(y=>y.type==="input"),g=(0,yb.findTransform)(p,y=>y.regExp.test(h.text));if(g){m(g.transform()),f.dispatch(_).__unstableMarkAutomaticChange();return}let b=d.reduce((y,{__unstableInputRule:S})=>(S&&(y=S(y)),y),hne(h)),{__unstableMarkLastChangeAsPersistent:v,__unstableMarkAutomaticChange:k}=f.dispatch(_);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 kne=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(_).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var $I=l(it(),1),vne=()=>e=>{function t(o){($I.isKeyboardEvent.primary(o,"z")||$I.isKeyboardEvent.primary(o,"y")||$I.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var yne=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 Sne=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 KI=l(it(),1);var _ne=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==KI.BACKSPACE&&n!==KI.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(_),{__experimentalUndo:c}=a();c&&s()&&(r.preventDefault(),c())}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var wne=l($(),1),Wa=l(ur(),1),Cne=l(un(),1);var xTe=l(P(),1),wTe=l($(),1),CTe=l(w(),1);function xne(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function YI(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Sb({allowedFormats:e,disableFormats:t}){return t?Sb.EMPTY_ARRAY:e}Sb.EMPTY_ARRAY=[];var Bne=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}=Oh(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText):
`,g),window.console.log(`Received plain text (RichText):
`,p),i){s((0,Wa.insert)(a,p));return}let b=n.clipboardData.getData("rich-text")==="true";function v(x){let C=c.reduce((B,{__unstablePasteRule:I})=>(I&&B===a&&(B=I(a,{html:g,plainText:p})),B),a);if(C!==a)s(C);else{let B=(0,Wa.create)({html:x});xne(B,a.activeFormats),s((0,Wa.insert)(a,B))}}if(b){v(g);return}if(h){s((0,Wa.insert)(a,(0,Wa.create)({text:p})));return}let k="INLINE",y=p.trim();f&&(0,Wa.isEmpty)(a)&&(0,Cne.isURL)(y)&&/^https?:/.test(y)&&(k="BLOCKS");let S=(0,wne.pasteHandler)({HTML:g,plainText:p,mode:k,tagName:u,preserveWhiteSpace:m});typeof S=="string"?v(S):S.length>0&&d&&(0,Wa.isEmpty)(a)&&d(S,S.length-1,-1)}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var JS=l(it(),1),qI=l(ur(),1),Ene=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===JS.DELETE||n===JS.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===JS.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,qI.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,qI.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var dF=l(it(),1),e_=l(ur(),1),Tne=e=>t=>{function o(i){if(i.keyCode!==dF.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!==dF.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,e_.insert)(s,`
`)):u&&h===p&&p===m.length?u():d&&h===p&&p===m.length&&m.slice(-2)===`
`?f.batch(()=>{let g={...s};g.start=g.end-2,a((0,e_.remove)(g)),d()}):c||a((0,e_.insert)(s,`
`))}let{defaultView:n}=t.ownerDocument;return n.addEventListener("keydown",r),t.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",r),t.removeEventListener("keydown",o)}};var Ine=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(_).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var BTe=[mne,bne,kne,vne,yne,Sne,_ne,Bne,Ene,Tne,Ine];function ZI(e){let t=(0,_b.useRef)(e);(0,_b.useInsertionEffect)(()=>{t.current=e});let o=(0,_b.useMemo)(()=>BTe.map(r=>r(t)),[t]);return(0,Pne.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var XI=l(ur(),1),QI=l(P(),1);var Rne=l(w(),1),One=l(zr(),1),ETe={},fF=Symbol("usesContext");function TTe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[fF]:c}=n,u=(0,QI.useContext)(cn),d=(0,QI.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):ETe,[c,u]);if(!a)return null;let f=(0,XI.getActiveFormat)(o,s),m=f!==void 0,h=(0,XI.getActiveObject)(o),p=h!==void 0&&h.type===s;return(0,Rne.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 JI({formatTypes:e,...t}){return e.map(o=>(0,One.createElement)(TTe,{settings:o,...t,key:o.name}))}var Ane=l(P(),1),Lne=l($(),1),Nne=l(Re(),1);var mF=l(w(),1);function pF(e,t){if(xb.isEmpty(e)){let o=YI(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,Nne.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/"}),Lne.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function t_({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,mF.jsx)(Ane.RawHTML,{children:pF(e,o)}),t?(0,mF.jsx)(t,{...n,children:e}):e}var zne=l(P(),1),gF=l($(),1),jne=l(ur(),1),Une=l(Re(),1);var Mne=l(P(),1),Dne=l(Re(),1),eP=l(F(),1),Vne=l(it(),1),wb=l(ur(),1);var hF=l(w(),1);function ITe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,Dne.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}=Pe(),{getSelectionStart:u,getSelectionEnd:d}=(0,eP.useSelect)(_),{selectionChange:f}=(0,eP.useDispatch)(_),m=YI(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,hF.jsx)(o,{ref:a,children:p.map((b,v)=>(0,hF.jsx)(tP,{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!==Vne.ENTER)return;k.preventDefault();let{offset:y}=u(),{offset:S}=d();if(typeof y!="number"||typeof S!="number")return;let x=(0,wb.create)({html:b});x.start=y,x.end=S;let C=(0,wb.split)(x).map(I=>(0,wb.toHTMLString)({value:I})),B=p.slice();B.splice(v,1,...C),g(B),f(c,`${t}-${v+1}`,0,0)},onMerge:k=>{let y=p.slice(),S=0;if(k){if(!y[v+1])return;y.splice(v,2,y[v]+y[v+1]),S=y[v].length-1}else{if(!y[v-1])return;y.splice(v-1,2,y[v-1]+y[v]),S=y[v-1].length-1}g(y),f(c,`${t}-${v-(k?0:1)}`,S,S)},...s},v))})}var Fne=(0,Mne.forwardRef)(ITe);var Hne=l(w(),1);function Gne(e){return(0,zne.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,Une.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=gF.children.toHTML(t.value),n=s=>t.onChange(gF.children.fromDOM((0,jne.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?Fne:e;return(0,Hne.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var Wne=l(it(),1),Cb=l(P(),1);function bF({character:e,type:t,onUse:o}){let r=(0,Cb.useContext)(Bb),n=(0,Cb.useRef)();return n.current=o,(0,Cb.useEffect)(()=>{function i(s){Wne.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var oP=l(A(),1),$ne=l(it(),1),kF=l(w(),1);function vF({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=$ne.displayShortcut[t](o)),(0,kF.jsx)(oP.Fill,{name:i,children:(0,kF.jsx)(oP.ToolbarButton,{...r,shortcut:n})})}var Eb=l(P(),1);function yF({inputType:e,onInput:t}){let o=(0,Eb.useContext)(Tb),r=(0,Eb.useRef)();return r.current=t,(0,Eb.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var ci=l(w(),1),{useRichText:PTe}=M(qne.privateApis),Bb=(0,rr.createContext)();Bb.displayName="keyboardShortcutContext";var Tb=(0,rr.createContext)();Tb.displayName="inputEventContext";var Kne=Symbol("instanceId");function Jne(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 tP({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:S,__unstableEmbedURLOnPaste:x,__unstableDisableFormats:C,disableLineBreaks:B,__unstableAllowPrefixTransformations:I,readOnly:O,...E},L){E=Jne(E),g&&(0,Qne.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let T=(0,rP.useInstanceId)(tP),R=(0,rr.useRef)(),[D,j]=(0,rr.useState)(null),G=Pe(),{clientId:z,isSelected:H,name:W}=G,te=G[Rp],ne=(0,rr.useContext)(cn),ae=(0,Od.useRegistry)(),X=eo=>{if(!H)return{isSelected:!1};let{getSelectionStart:Bo,getSelectionEnd:Xe}=eo(_),Ve=Bo(),bt=Xe(),Eo;return n===void 0?Eo=Ve.clientId===z&&bt.clientId===z&&(k?Ve.attributeKey===k:Ve[Kne]===T):n&&(Eo=Ve.clientId===z),{selectionStart:Eo?Ve.offset:void 0,selectionEnd:Eo?bt.offset:void 0,isSelected:Eo}},{selectionStart:ee,selectionEnd:le,isSelected:Q}=(0,Od.useSelect)(X,[z,k,T,n,H]),{disableBoundBlock:J,bindingsPlaceholder:q,bindingsLabel:U}=(0,Od.useSelect)(eo=>{if(!te?.[k])return{};let{__experimentalBlockBindingsSupportedAttributes:Bo}=eo(_).getSettings();if(!Bo?.[W])return{};let Ve=te[k],bt=(0,Xne.getBlockBindingsSource)(Ve.source),Eo={};if(bt?.usesContext?.length)for(let ut of bt.usesContext)Eo[ut]=ne[ut];let lr=!bt?.canUserEditValue?.({select:eo,context:Eo,args:Ve.args});if(o.length>0)return{disableBoundBlock:lr,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:ge}=eo(_),Ct=ge(z),To=null;bt?.getFieldsList&&(To=bt.getFieldsList({select:eo,context:Eo})?.find(Gc=>(0,Yne.default)(Gc.args,Ve?.args))?.label);let Ye=To??bt?.label,oe=lr?Ye:(0,Ib.sprintf)((0,Ib.__)("Add %s"),Ye),Ae=lr?Ve?.args?.key||bt?.label:(0,Ib.sprintf)((0,Ib.__)("Empty %s; start writing to edit its value"),Ve?.args?.key||bt?.label);return{disableBoundBlock:lr,bindingsPlaceholder:Ct?.placeholder||oe,bindingsLabel:Ae}},[te,k,W,o,z,ne]),K=!!ne?.["pattern/overrides"],se=te?.__default?.source==="core/pattern-overrides",Se=O||J||K&&!se,{getSelectionStart:he,getSelectionEnd:we,getBlockRootClientId:De}=(0,Od.useSelect)(_),{selectionChange:ct}=(0,Od.useDispatch)(_),Jt=Sb({allowedFormats:f,disableFormats:C}),uo=!Jt||Jt.length>0,Do=(0,rr.useCallback)((eo,Bo)=>{let Xe={},Ve=eo===void 0&&Bo===void 0,bt={clientId:z,[k?"attributeKey":Kne]:k||T};if(typeof eo=="number"||Ve){if(Bo===void 0&&De(z)!==De(we().clientId))return;Xe.start={...bt,offset:eo}}if(typeof Bo=="number"||Ve){if(eo===void 0&&De(z)!==De(he().clientId))return;Xe.end={...bt,offset:Bo}}ct(Xe)},[z,De,we,he,k,T,ct]),{value:ot,getValue:sr,onChange:ze,ref:wt,formatTypes:je}=PTe({value:o,onChange:r,selectionStart:ee,selectionEnd:le,onSelectionChange:Do,placeholder:q||d,__unstableIsSelected:Q,__unstableDisableFormats:C,preserveWhiteSpace:y,__unstableDependencies:[t],allowedFormats:Jt,withoutInteractiveFormatting:m,__unstableFormatTypeHandlerContext:(0,rr.useMemo)(()=>({richTextIdentifier:k,blockClientId:z}),[k,z])}),At=FU({onReplace:u,completers:c,record:ot,onChange:ze});dne({html:o,value:ot});let ar=(0,rr.useRef)(new Set),Ue=(0,rr.useRef)(new Set);function Lr(){R.current?.focus()}let ki=t;return(0,ci.jsxs)(ci.Fragment,{children:[Q&&(0,ci.jsx)(Bb.Provider,{value:ar,children:(0,ci.jsx)(Tb.Provider,{value:Ue,children:(0,ci.jsxs)(Zne.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:ot,onChange:ze,onFocus:Lr}),(0,ci.jsx)(JI,{value:ot,onChange:ze,onFocus:Lr,formatTypes:je,forwardedRef:R})]})})}),Q&&uo&&(0,ci.jsx)(cne,{inline:s,editableContentElement:D}),(0,ci.jsx)(ki,{role:"textbox","aria-multiline":!B,"aria-readonly":Se,...E,draggable:void 0,"aria-label":U||E["aria-label"]||d,...At,ref:(0,rP.useMergeRefs)([wt,L,At.ref,E.ref,ZI({registry:ae,getValue:sr,onChange:ze,__unstableAllowPrefixTransformations:I,formatTypes:je,onReplace:u,selectionChange:ct,isSelected:Q,disableFormats:C,value:ot,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:x,pastePlainText:S,onMerge:p,onRemove:h,disableLineBreaks:B,onSplitAtEnd:b,onSplitAtDoubleLineEnd:v,keyboardShortcuts:ar,inputEvents:Ue}),R,j]),contentEditable:!Se,suppressContentEditableWarning:!0,className:V("block-editor-rich-text__editable",E.className,"rich-text"),tabIndex:E.tabIndex===0&&!Se?null:E.tabIndex,"data-wp-block-attribute-key":k})]})}var o_=Gne((0,rr.forwardRef)(tP));o_.Content=t_;o_.isEmpty=e=>!e||e.length===0;var SF=(0,rr.forwardRef)((e,t)=>{if(Pe()[a0]){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:S,__unstableOnSplitAtDoubleLineEnd:x,identifier:C,preserveWhiteSpace:B,__unstablePastePlainText:I,__unstableEmbedURLOnPaste:O,__unstableDisableFormats:E,disableLineBreaks:L,__unstableAllowPrefixTransformations:T,readOnly:R,...D}=Jne(e);return(0,ci.jsx)(i,{ref:t,...D,dangerouslySetInnerHTML:{__html:pF(s,u)||"<br>"}})}return(0,ci.jsx)(o_,{ref:t,...e,readOnly:!1})});SF.Content=t_;SF.isEmpty=e=>!e||e.length===0;var xb=SF;var _F=l(w(),1),tie=(0,eie.forwardRef)((e,t)=>(0,_F.jsx)(xb,{ref:t,...e,__unstableDisableFormats:!0}));tie.Content=function({value:t="",tagName:o="div",...r}){return(0,_F.jsx)(o,{...r,children:t})};var oie=tie;var xF=l(w(),1),RTe=(0,nie.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,xF.jsx)(oie,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,xF.jsx)(rie.default,{ref:o,className:V("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),iie=RTe;var $a=l(N(),1),lie=l(P(),1),cie=l(A(),1);var sie=l(Z(),1),aie=l(A(),1),nP=l(N(),1),Jm=l(w(),1);function iP({property:e,viewport:t,desc:o}){let r=(0,sie.useInstanceId)(iP),n=o||(0,nP.sprintf)((0,nP._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,Jm.jsxs)(Jm.Fragment,{children:[(0,Jm.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,Jm.jsx)(aie.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`,children:n})]})}var Ka=l(w(),1);function OTe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,$a._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,$a.__)("Small screens")},{id:"medium",label:(0,$a.__)("Medium screens")},{id:"large",label:(0,$a.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,$a.sprintf)((0,$a.__)("Use the same %s on all screen sizes."),o),f=(0,$a.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,Ka.jsx)(iP,{property:o,viewport:c}),c),h=()=>u.map(p=>(0,Ka.jsx)(lie.Fragment,{children:i((0,Ka.jsx)(iP,{property:o,viewport:p}),p)},p.id));return(0,Ka.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,Ka.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,Ka.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,Ka.jsx)(cie.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,Ka.jsxs)("div",{className:V("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):h())]})]})]})}var uie=OTe;var sP=l(A(),1);var die=l(w(),1);function fie({units:e,...t}){let[o]=me("spacing.units"),r=(0,sP.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,die.jsx)(sP.__experimentalUnitControl,{units:r,...t})}var r_=l(N(),1),mie=l(P(),1),Pb=l(A(),1);var Ya=l(w(),1);function ATe({url:e,onChange:t}){let[o,r]=(0,mie.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,Ya.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,Ya.jsx)(Pb.Button,{size:"compact",icon:dn,label:e?(0,r_.__)("Edit link"):(0,r_.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,Ya.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,Ya.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,Ya.jsx)(Pb.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:qk,label:(0,r_.__)("Close"),onClick:r}),(0,Ya.jsx)(wd,{value:e||"",onChange:t,suffix:(0,Ya.jsx)(Pb.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ya.jsx)(Pb.Button,{size:"small",icon:bl,label:(0,r_.__)("Submit"),type:"submit"})})})]})})]})}var pie=ATe;var Tn=l(N(),1),rs=l(P(),1),vie=l(Fe(),1),Ho=l(A(),1);var yie=l(un(),1);var St=l(w(),1),wF="none",hie="custom",gie="media",bie="attachment",kie=["noreferrer","noopener"],Sie=({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,rs.useState)(!1),[g,b]=(0,rs.useState)(null),v=()=>{p(!0)},[k,y]=(0,rs.useState)(!1),[S,x]=(0,rs.useState)(null),C=(0,rs.useRef)(null),B=(0,rs.useRef)();(0,rs.useEffect)(()=>{if(!B.current)return;(vie.focus.focusable.find(B.current)[0]||B.current).focus()},[k,o,d]);let I=()=>{(e===gie||e===bie)&&x(""),y(!0)},O=()=>{y(!1)},E=()=>{x(null),O(),p(!1)},L=Q=>{let J=Q?"_blank":void 0,q;if(J){let U=(c??"").split(" ");kie.forEach(K=>{U.includes(K)||U.push(K)}),q=U.join(" ")}else{let U=(c??"").split(" ").filter(K=>kie.includes(K)===!1);q=U.length?U.join(" "):void 0}return{linkTarget:J,rel:q}},T=()=>Q=>{let J=C.current;J&&J.contains(Q.target)||(p(!1),x(null),O())},R=()=>Q=>{if(S){let J=j().find(q=>q.url===S)?.linkDestination||hie;t({href:(0,yie.prependHTTPS)(S),linkDestination:J,lightbox:{enabled:!1}})}O(),x(null),Q.preventDefault()},D=()=>{t({linkDestination:wF,href:""})},j=()=>{let Q=[{linkDestination:gie,title:(0,Tn.__)("Link to image file"),url:r==="image"?n:void 0,icon:rv}];return r==="image"&&i&&Q.push({linkDestination:bie,title:(0,Tn.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:kl}),Q},G=Q=>{let J=j(),q;Q?q=(J.find(U=>U.url===Q)||{linkDestination:hie}).linkDestination:q=wF,t({linkDestination:q,href:Q})},z=Q=>{let J=L(Q);t(J)},H=Q=>{t({rel:Q})},W=Q=>{t({linkClass:Q})},te=(0,St.jsxs)(Ho.__experimentalVStack,{spacing:"3",children:[(0,St.jsx)(Ho.ToggleControl,{label:(0,Tn.__)("Open in new tab"),onChange:z,checked:s==="_blank"}),(0,St.jsx)(Ho.TextControl,{__next40pxDefaultSize:!0,label:(0,Tn.__)("Link relation"),value:c??"",onChange:H,help:(0,rs.createInterpolateElement)((0,Tn.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,St.jsx)(Ho.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,St.jsx)(Ho.TextControl,{__next40pxDefaultSize:!0,label:(0,Tn.__)("Link CSS class"),value:a||"",onChange:W})]}),ne=S!==null?S:o,ae=!d||d&&!u,X=!ne&&ae,ee=(j().find(Q=>Q.linkDestination===e)||{}).title,le=()=>{if(d&&u&&!o&&!k)return(0,St.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,St.jsx)(xe,{icon:lx}),(0,St.jsxs)("div",{className:"text",children:[(0,St.jsx)("p",{children:(0,Tn.__)("Enlarge on click")}),(0,St.jsx)("p",{className:"description",children:(0,Tn.__)("Scales the image with a lightbox effect")})]}),(0,St.jsx)(Ho.Button,{icon:xi,label:(0,Tn.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||k)return(0,St.jsx)(Id.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:ne,onChangeInputValue:x,onSubmit:R(),autocompleteRef:C});if(o&&!k)return(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Id.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:I,urlLabel:ee}),(0,St.jsx)(Ho.Button,{icon:xi,label:(0,Tn.__)("Remove link"),onClick:()=>{D(),m?.()},size:"compact"})]})};return(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Ho.ToolbarButton,{icon:dn,className:"components-toolbar__control",label:(0,Tn.__)("Link"),"aria-expanded":h,onClick:v,ref:b,isActive:!!o||d&&u}),h&&(0,St.jsx)(Id,{ref:B,anchor:g,onFocusOutside:T(),onClose:E,renderSettings:ae?()=>te:null,additionalControls:X&&(0,St.jsxs)(Ho.NavigableMenu,{children:[j().map(Q=>(0,St.jsx)(Ho.MenuItem,{icon:Q.icon,iconPosition:"left",onClick:()=>{x(null),G(Q.url),O()},children:Q.title},Q.linkDestination)),u&&(0,St.jsx)(Ho.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:lx,info:(0,Tn.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{x(null),t({linkDestination:wF,href:""}),f?.(!0),O()},children:(0,Tn.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:le()})]})};var Ob=l(A(),1),Nie=l(P(),1),cP=l(N(),1);var _ie=l(P(),1),BF=l(N(),1);var CF=[],LTe=new Intl.Collator("und",{numeric:!0}).compare;function aP(){let[e,t,o,r]=me("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??CF,i=t??CF,s=o&&r!==!1?o:CF;return(0,_ie.useMemo)(()=>{let a=[{name:(0,BF.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>LTe(c.slug,u.slug)),a.length>jU?[{name:(0,BF.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var xie=l(P(),1),wie=l(F(),1),lP=l(N(),1),Cie=l(A(),1);var Bie=l(w(),1),NTe={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 Rb({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,wie.useSelect)(S=>S(_).getSettings()?.disableCustomSpacingSizes),[h]=me("spacing.units"),p=(0,Cie.__experimentalUseCustomUnits)({availableUnits:h||["px","em","rem"]}),g=(0,xie.useMemo)(()=>c?.map(S=>({name:S.name,slug:S.slug,size:S.size}))||[],[c]),b=(ku.includes(a)||["vertical","horizontal"].includes(a))&&s?pa[a]:"",v=s?u?.toLowerCase():u,k=(0,lP.sprintf)((0,lP._x)("%1$s %2$s","spacing"),b,v).trim(),y=p[0]?.value||"px";return(0,Bie.jsx)(Fm,{allowNegativeOnDrag:o<0,ariaLabel:k,className:"spacing-sizes-control",customValueSettings:NTe,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 n_=l(w(),1),Eie=["vertical","horizontal"];function Tie({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]=ah(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?Eie.filter(d=>hM(n,d)):Eie;return(0,n_.jsx)(n_.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,n_.jsx)(Rb,{icon:Qw[d],label:pa[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 i_=l(w(),1);function Iie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?ku.filter(d=>n.includes(d)):ku,u=d=>f=>{let m={...Object.keys(a).reduce((h,p)=>(h[p]=ah(a[p],i),h),{})};m[d]=f,t(m)};return(0,i_.jsx)(i_.Fragment,{children:c.map(d=>(0,i_.jsx)(Rb,{icon:Qw[d],label:pa[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 Pie=l(w(),1);function Rie({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]=ah(c[p],s),h),{})};m[d]=f,t(m)};return(0,Pie.jsx)(Rb,{label:pa[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var Oie=l(A(),1);var EF=l(N(),1),Aie=l(w(),1);function Lie({isLinked:e,...t}){let o=e?(0,EF.__)("Unlink sides"):(0,EF.__)("Link sides");return(0,Aie.jsx)(Oie.Button,{...t,size:"small",icon:e?dn:xi,iconSize:24,label:o})}var qa=l(w(),1);function Ab({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=ku,useSelect:c,values:u}){let d=aP(),f=u||UU,m=a?.length===1,h=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[p,g]=(0,Nie.useState)(GU(f,a)),b=()=>{g(p===Bl.axial?Bl.custom:Bl.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===Bl.axial?(0,qa.jsx)(Tie,{...k}):p===Bl.custom?(0,qa.jsx)(Iie,{...k}):(0,qa.jsx)(Rie,{side:p,...k,showSideInLabel:s}),S=ku.includes(p)&&s?pa[p]:"",x=(0,cP.sprintf)((0,cP._x)("%1$s %2$s","spacing"),t,S).trim();return(0,qa.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,qa.jsxs)(Ob.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,qa.jsx)(Ob.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:x}),!m&&!h&&(0,qa.jsx)(Lie,{label:t,onClick:b,isLinked:p===Bl.axial})]}),(0,qa.jsx)(Ob.__experimentalVStack,{spacing:.5,children:y()})]})}var Mie=l(Re(),1);function Die(){return(0,Mie.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var uP=l(P(),1);function Vie(e){let[t,o]=(0,uP.useState)(window.innerWidth);(0,uP.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 Xb=l(N(),1),Md=l($(),1),Iae=l(A(),1),XF=l(F(),1),Pae=l(P(),1);var Lb=l(A(),1),dP=l(N(),1),Fie=l(F(),1),fP=l($(),1);var ep=l(w(),1);function MTe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,ep.jsx)(Lb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,ep.jsx)(Lb.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,dP.__)("Edit original")})})}function DTe({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,ep.jsx)(Lb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,ep.jsx)(Lb.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,dP.__)("Exit pattern"):(0,dP.__)("Edit pattern")})})}function zie({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=rT(e),{block:s,onNavigateToEntityRecord:a}=(0,Fie.useSelect)(f=>{let{getBlock:m,getSettings:h}=f(_);return{block:m(e),onNavigateToEntityRecord:h().onNavigateToEntityRecord}},[e]);if(!t&&!o)return null;let c=(0,fP.isReusableBlock)(s),u=(0,fP.isTemplatePart)(s);return(c||u)&&a?(0,ep.jsx)(MTe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:c,isTemplatePartBlock:u}):(0,ep.jsx)(DTe,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var jie=l(F(),1),Uie=l(N(),1),Hie=l(A(),1),Gie=l(P(),1);var Wie=l(w(),1);function mP(){let e=(0,jie.useSelect)(r=>r(_).getBlockSelectionStart(),[]),t=(0,Gie.useRef)();return Gf(e,t),e?(0,Wie.jsx)(Hie.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,Uie.__)("Skip to the selected block")}):null}var pP=l(N(),1),$ie=l(F(),1);var Kie=l(A(),1);var s_=l(w(),1);function TF(){let e=(0,$ie.useSelect)(t=>t(_).getSelectedBlockCount(),[]);return(0,s_.jsxs)(Kie.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,s_.jsx)(Oe,{icon:_f,showColors:!0}),(0,s_.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,pP.sprintf)((0,pP._n)("%d Block","%d Blocks",e),e)})]})}var Zb=l(A(),1),ta=l(P(),1),_ae=l(Xp(),1),qb=l(F(),1);var a_=l(N(),1),hP={name:"settings",title:(0,a_.__)("Settings"),value:"settings",icon:ZO},gP={name:"styles",title:(0,a_.__)("Styles"),value:"styles",icon:fN},bP={name:"content",title:(0,a_.__)("Content"),value:"content",icon:kl},Sc={name:"list",title:(0,a_.__)("List View"),value:"list-view",icon:nv};var SP=l(A(),1);var l_=l(A(),1),Yie=l(N(),1);var c_=l(w(),1),VTe=({initialOpen:e=!1})=>{let t=(0,l_.__experimentalUseSlotFills)(Ju.slotName),o=(0,l_.__experimentalUseSlotFills)(nS.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,c_.jsxs)(l_.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,Yie.__)("Advanced"),initialOpen:e,children:[(0,c_.jsx)(fe.Slot,{group:"advanced"}),(0,c_.jsx)(nS.Slot,{})]})},kP=VTe;var Nb=l(A(),1),vP=l(F(),1),IF=l(N(),1);var u_=l(w(),1),FTe=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,vP.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:c}=s(_),u=c(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,vP.useDispatch)(_),n=Po();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:Ne({...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,u_.jsx)(Nb.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,IF.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,u_.jsx)(Nb.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,IF.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,u_.jsx)(fe.Slot,{group:"position"})})})},zTe=()=>{let e=(0,Nb.__experimentalUseSlotFills)(Wi.position.name);return!(e&&e.length)?null:(0,u_.jsx)(FTe,{})},yP=zTe;var Za=l(w(),1),jTe=({showAdvancedControls:e=!1})=>{let t=(0,SP.__experimentalUseSlotFills)(Wi.default.name),o=(0,SP.__experimentalUseSlotFills)(Wi.position.name),r=(0,SP.__experimentalUseSlotFills)(Wi.bindings.name),n=!!t?.length||!!o?.length||!!r?.length;return(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsx)(fe.Slot,{}),(0,Za.jsx)(yP,{}),(0,Za.jsx)(fe.Slot,{group:"bindings"}),e&&(0,Za.jsx)("div",{children:(0,Za.jsx)(kP,{initialOpen:!n})})]})},qie=jTe;var Kb=l(N(),1),l2=l(F(),1);var v_=l($(),1),FF=l(A(),1),$b=l(P(),1),Jse=l(rt(),1),eae=l(F(),1);var VF={};Ip(VF,{AdvancedPanel:()=>WP,BackgroundPanel:()=>XP,BorderPanel:()=>MP,ColorPanel:()=>zP,DimensionsPanel:()=>OP,FiltersPanel:()=>UP,ImageSettingsPanel:()=>Gse,TypographyPanel:()=>EP,useHasBackgroundPanel:()=>k_,useHasBorderPanel:()=>NP,useHasBorderPanelControls:()=>m_,useHasColorPanel:()=>FP,useHasDimensionsPanel:()=>RP,useHasFiltersPanel:()=>jse,useHasImageSettingsPanel:()=>Hse,useHasTypographyPanel:()=>BP,useSettingsForBlockElement:()=>xP});var _P=l(P(),1),Zie=l(F(),1),PF=l($(),1),tp=l(N(),1);function xP(e,t,o){let{supportedStyles:r,supports:n}=(0,Zie.useSelect)(i=>({supportedStyles:M(i(PF.store)).getSupportedStyles(t,o),supports:i(PF.store).getBlockType(t)?.supports}),[t,o]);return(0,_P.useMemo)(()=>{let i={...e};return r.includes("fontSize")||(i.typography={...i.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),r.includes("fontFamily")||(i.typography={...i.typography,fontFamilies:{}}),i.color={...i.color,text:i.color?.text&&r.includes("color"),background:i.color?.background&&(r.includes("background")||r.includes("backgroundColor")),button:i.color?.button&&r.includes("buttonColor"),heading:i.color?.heading&&r.includes("headingColor"),link:i.color?.link&&r.includes("linkColor"),caption:i.color?.caption&&r.includes("captionColor")},r.includes("background")||(i.color.gradients=[],i.color.customGradient=!1),r.includes("filter")||(i.color.defaultDuotone=!1,i.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","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","backgroundSize"].forEach(s=>{r.includes(s)||(i.background={...i.background,[s]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function Xa(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,_P.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,tp._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,tp._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,tp._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function d_(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,_P.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,tp._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,tp._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,tp._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var io=l(A(),1),No=l(N(),1),Db=l(P(),1);var Mb=l(N(),1);var Xie=l(P(),1),wP=l(A(),1),RF=l(w(),1),UTe=[{label:(0,Mb.__)("Align text left"),value:"left",icon:Qc},{label:(0,Mb.__)("Align text center"),value:"center",icon:kf},{label:(0,Mb.__)("Align text right"),value:"right",icon:Jc},{label:(0,Mb.__)("Justify text"),value:"justify",icon:BO}],HTe=["left","center","right"];function CP({className:e,value:t,onChange:o,options:r=HTe}){let n=(0,Xie.useMemo)(()=>UTe.filter(i=>r.includes(i.value)),[r]);return n.length?(0,RF.jsx)(wP.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Mb.__)("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,RF.jsx)(wP.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var Lo=l(A(),1),f_=l(N(),1);var ns=l(w(),1);function Qie({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",withSlider:n=!1,hasBottomMargin:i=!1,help:s,...a}){let[c]=me("spacing.units"),u=(0,Lo.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[d,f]=(0,Lo.__experimentalParseQuantityAndUnitFromRawValue)(t,u),m=!!f&&["em","rem","%","ch","vw","vh"].includes(f);return n?(0,ns.jsxs)(Lo.__experimentalView,{style:i?{marginBottom:12}:void 0,children:[(0,ns.jsx)(Lo.BaseControl.VisualLabel,{children:(0,f_.__)("Line indent")}),(0,ns.jsxs)(Lo.Flex,{children:[(0,ns.jsx)(Lo.FlexItem,{isBlock:!0,children:(0,ns.jsx)(Lo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,f_.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:t,onChange:o,size:a.size,units:u,__unstableInputWidth:r,min:0})}),n&&(0,ns.jsx)(Lo.FlexItem,{isBlock:!0,children:(0,ns.jsx)(Lo.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ns.jsx)(Lo.RangeControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,f_.__)("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,ns.jsx)("p",{className:"components-base-control__help",children:s})]}):(0,ns.jsx)(Lo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...a,label:(0,f_.__)("Line indent"),value:t,__unstableInputWidth:r,units:u,onChange:o,help:s})}function ese(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 Jie(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 GTe(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 tse(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=tb(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?GTe(i,t):a?.find(d=>d.style.fontWeight===Jie(s,o))?.style?.fontStyle),u||(n=o?Jie(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var Je=l(w(),1),WTe=1,$Te=6;function BP(e){let t=rse(e),o=nse(e),r=ise(e),n=sse(e),i=lse(e),s=ase(e),a=cse(e),c=fse(e),u=use(e),d=dse(e),f=ose(e);return t||o||r||n||i||s||f||a||c||u||d}function ose(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 rse(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function nse(e){return e?.typography?.lineHeight}function ise(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function KTe(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,No.__)("Appearance"):(0,No.__)("Font style"):(0,No.__)("Font weight")}function sse(e){return e?.typography?.letterSpacing}function ase(e){return e?.typography?.textTransform}function lse(e){return e?.typography?.textAlign}function cse(e){return e?.typography?.textDecoration}function use(e){return e?.typography?.writingMode}function dse(e){return e?.typography?.textColumns}function fse(e){return e?.typography?.textIndent}function YTe(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function qTe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Po(),s=()=>{let a=e(o);t(a)};return(0,Je.jsx)(io.__experimentalToolsPanel,{label:(0,No.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var ZTe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function EP({as:e=qTe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=ZTe,isGlobalStyles:a=!1}){let c=oe=>xn({settings:n},"",oe),u=rse(n),d=c(r?.typography?.fontFamily),{fontFamilies:f,fontFamilyFaces:m}=(0,Db.useMemo)(()=>ese(n,d),[n,d]),h=oe=>{let Ae=f?.find(({fontFamily:an})=>an===oe)?.slug,ut=pe(t,["typography","fontFamily"],Ae?`var:preset|font-family|${Ae}`:oe||void 0),Gc=f?.find(({fontFamily:an})=>an===oe)?.fontFace??[],{fontStyles:ca,fontWeights:Bp}=tb(Gc),Vk=ca?.some(({value:an})=>an===T),ff=Bp?.some(({value:an})=>an?.toString()===R?.toString());if(!Vk||!ff){let{nearestFontStyle:an,nearestFontWeight:Ep}=tse(Gc,T,R);an||Ep?ut={...ut,typography:{...ut?.typography,fontStyle:an||void 0,fontWeight:Ep||void 0}}:(T||R)&&(ut={...ut,typography:{...ut?.typography,fontStyle:void 0,fontWeight:void 0}})}o(ut)},p=()=>!!t?.typography?.fontFamily,g=()=>h(void 0),b=ose(n),v=!n?.typography?.customFontSize,k=YTe(n),y=c(r?.typography?.fontSize),S=(()=>{let oe=r?.typography?.fontSize;if(!oe||typeof oe!="string")return;if(oe.startsWith("var:preset|font-size|"))return oe.replace("var:preset|font-size|","");let Ae=oe.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(Ae)return Ae[1]})(),x=(oe,Ae)=>{let ut=Ae?.slug?`var:preset|font-size|${Ae?.slug}`:oe;o(pe(t,["typography","fontSize"],ut||void 0))},C=()=>!!t?.typography?.fontSize,B=()=>x(void 0),I=ise(n),O=KTe(n),E=n?.typography?.fontStyle,L=n?.typography?.fontWeight,T=c(r?.typography?.fontStyle),R=c(r?.typography?.fontWeight),D=(0,Db.useCallback)(({fontStyle:oe,fontWeight:Ae})=>{(oe!==T||Ae!==R)&&o({...t,typography:{...t?.typography,fontStyle:oe||void 0,fontWeight:Ae||void 0}})},[T,R,o,t]),j=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,G=(0,Db.useCallback)(()=>{D({})},[D]),z=nse(n),H=c(r?.typography?.lineHeight),W=oe=>{o(pe(t,["typography","lineHeight"],oe||void 0))},te=()=>t?.typography?.lineHeight!==void 0,ne=()=>W(void 0),ae=sse(n),X=c(r?.typography?.letterSpacing),ee=oe=>{o(pe(t,["typography","letterSpacing"],oe||void 0))},le=()=>!!t?.typography?.letterSpacing,Q=()=>ee(void 0),J=fse(n),q=c(r?.typography?.textIndent),K=(n?.typography?.textIndent??"subsequent")==="all",se=oe=>{o(pe(t,["typography","textIndent"],oe||void 0))},ce=oe=>{o({...t,settings:{typography:{textIndent:oe?"all":"subsequent"}}})},Se=()=>!!t?.typography?.textIndent,he=()=>{o(pe(t,["typography","textIndent"],void 0))},we=K?(0,No.__)("Indents the first line of all paragraphs."):(0,No.__)("Indents the first line of each paragraph after the first one."),De=dse(n),ct=c(r?.typography?.textColumns),Jt=oe=>{o(pe(t,["typography","textColumns"],oe||void 0))},uo=()=>!!t?.typography?.textColumns,Do=()=>Jt(void 0),ot=ase(n),sr=c(r?.typography?.textTransform),ze=oe=>{o(pe(t,["typography","textTransform"],oe||void 0))},wt=()=>!!t?.typography?.textTransform,je=()=>ze(void 0),At=cse(n),ar=c(r?.typography?.textDecoration),Ue=oe=>{o(pe(t,["typography","textDecoration"],oe||void 0))},Lr=()=>!!t?.typography?.textDecoration,ki=()=>Ue(void 0),eo=use(n),Bo=c(r?.typography?.writingMode),Xe=oe=>{o(pe(t,["typography","writingMode"],oe||void 0))},Ve=()=>!!t?.typography?.writingMode,bt=()=>Xe(void 0),Eo=lse(n),lr=c(r?.typography?.textAlign),ge=oe=>{o(pe(t,["typography","textAlign"],oe||void 0))},Ct=()=>!!t?.typography?.textAlign,To=()=>ge(void 0),Ye=(0,Db.useCallback)(oe=>({...oe,typography:{}}),[]);return(0,Je.jsxs)(e,{resetAllFilter:Ye,value:t,onChange:o,panelId:i,children:[u&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Font"),hasValue:p,onDeselect:g,isShownByDefault:s.fontFamily,panelId:i,children:(0,Je.jsx)(QT,{fontFamilies:f,value:d,onChange:h,size:"__unstable-large"})}),b&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Size"),hasValue:C,onDeselect:B,isShownByDefault:s.fontSize,panelId:i,children:(0,Je.jsx)(io.FontSizePicker,{value:S||y,valueMode:S?"slug":"literal",onChange:x,fontSizes:k,disableCustomFontSizes:v,withReset:!1,withSlider:!0,size:"__unstable-large"})}),I&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:O,hasValue:j,onDeselect:G,isShownByDefault:s.fontAppearance,panelId:i,children:(0,Je.jsx)(XT,{value:{fontStyle:T,fontWeight:R},onChange:D,hasFontStyles:E,hasFontWeights:L,fontFamilyFaces:m,size:"__unstable-large"})}),z&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Line height"),hasValue:te,onDeselect:ne,isShownByDefault:s.lineHeight,panelId:i,children:(0,Je.jsx)(VI,{__unstableInputWidth:"auto",value:H,onChange:W,size:"__unstable-large"})}),ae&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Letter spacing"),hasValue:le,onDeselect:Q,isShownByDefault:s.letterSpacing,panelId:i,children:(0,Je.jsx)(eI,{value:X,onChange:ee,size:"__unstable-large",__unstableInputWidth:"auto"})}),J&&(0,Je.jsxs)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Line indent"),hasValue:Se,onDeselect:he,isShownByDefault:s.textIndent,panelId:i,children:[(0,Je.jsx)(Qie,{value:q,onChange:se,size:"__unstable-large",__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,Je.jsx)(io.ToggleControl,{label:(0,No.__)("Indent all paragraphs"),checked:K,onChange:ce,help:we})]}),De&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Columns"),hasValue:uo,onDeselect:Do,isShownByDefault:s.textColumns,panelId:i,children:(0,Je.jsx)(io.__experimentalNumberControl,{label:(0,No.__)("Columns"),max:$Te,min:WTe,onChange:Jt,size:"__unstable-large",spinControls:"custom",value:ct,initialPosition:1})}),At&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Decoration"),hasValue:Lr,onDeselect:ki,isShownByDefault:s.textDecoration,panelId:i,children:(0,Je.jsx)(oI,{value:ar,onChange:Ue,size:"__unstable-large",__unstableInputWidth:"auto"})}),eo&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,No.__)("Orientation"),hasValue:Ve,onDeselect:bt,isShownByDefault:s.writingMode,panelId:i,children:(0,Je.jsx)(sI,{value:Bo,onChange:Xe,size:"__unstable-large"})}),ot&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Letter case"),hasValue:wt,onDeselect:je,isShownByDefault:s.textTransform,panelId:i,children:(0,Je.jsx)(nI,{value:sr,onChange:ze,showNone:!0,isBlock:!0,size:"__unstable-large"})}),Eo&&(0,Je.jsxs)(io.__experimentalToolsPanelItem,{label:(0,No.__)("Text alignment"),hasValue:Ct,onDeselect:To,isShownByDefault:s.textAlign,panelId:i,children:[(0,Je.jsx)(CP,{value:lr,onChange:ge,options:["left","center","right","justify"],size:"__unstable-large"}),lr==="justify"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(io.Notice,{status:"warning",isDismissible:!1,children:(0,No.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var Yt=l(N(),1),jt=l(A(),1);var Fb=l(P(),1);var et=l(A(),1),Go=l(N(),1),pse=l(P(),1),TP=l(F(),1);var mse=l(F(),1);function op(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,mse.useSelect)(_);return(i,s)=>{let a=(s-1)*t+i-1,c=0;for(let u of o(e)){let{columnStart:d,rowStart:f}=r(u).style?.layout??{};(f-1)*t+d-1<a&&c++}return c}}var Kt=l(w(),1);function XTe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,Go.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,Go.__)("Specify a fixed width."):e==="fixed"?(0,Go.__)("Specify a fixed height."):(0,Go.__)("Fit contents.")}function hse({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,Kt.jsx)(QTe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,Kt.jsx)(eIe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function QTe({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,Go.__)("Width"):(0,Go.__)("Height"),[d]=me("spacing.units"),f=(0,et.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,pse.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,Kt.jsxs)(et.__experimentalVStack,{as:et.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,Kt.jsxs)(et.__experimentalToggleGroupControl,{size:"__unstable-large",label:JTe(o),value:i||"fit",help:XTe(i,o),onChange:h=>{t({selfStretch:h,flexSize:h!=="fixed"?null:s})},isBlock:!0,children:[(0,Kt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fit",label:(0,Go._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,Kt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Go._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,Kt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,Go._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,Kt.jsx)(et.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:h=>{t({selfStretch:i,flexSize:h})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function JTe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,Go.__)("Width"):(0,Go.__)("Height")}function eIe({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,TP.useSelect)(x=>x(_).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:h}=(0,TP.useDispatch)(_),p=op(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,S=window.__experimentalEnableGridInteractivity&&d?d-(s??1)+1:void 0;return(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsxs)(et.Flex,{as:et.__experimentalToolsPanelItem,hasValue:b,label:(0,Go.__)("Grid span"),onDeselect:k,isShownByDefault:r,panelId:n,children:[(0,Kt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,Kt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Column span"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,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,Kt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,Kt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Row span"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10),B=S?Math.min(C,S):C;t({columnStart:i,rowStart:s,columnSpan:a,rowSpan:B})},value:c??1,min:1,max:S})})]}),window.__experimentalEnableGridInteractivity&&(0,Kt.jsxs)(et.Flex,{as:et.__experimentalToolsPanelItem,hasValue:g,label:(0,Go.__)("Grid placement"),onDeselect:v,isShownByDefault:!1,panelId:n,children:[(0,Kt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,Kt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Column"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,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,Kt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,Kt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Row"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,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 IP=l(A(),1),Vb=l(N(),1);var OF=l(w(),1);function PP({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=me("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,Vb._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,Vb._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,OF.jsx)(IP.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,Vb.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,OF.jsx)(IP.SelectControl,{label:(0,Vb.__)("Aspect ratio"),value:a,options:r??h,onChange:o,size:"__unstable-large"})})}var $e=l(w(),1),AF=["horizontal","vertical"];function RP(e){let t=kse(e),o=vse(e),r=yse(e),n=Sse(e),i=_se(e),s=xse(e),a=wse(e),c=Cse(e),u=Bse(e),d=Ese(e);return Fb.Platform.OS==="web"&&(t||o||r||n||i||s||a||c||u||d)}function kse(e){return e?.layout?.contentSize}function vse(e){return e?.layout?.wideSize}function yse(e){return e?.spacing?.padding}function Sse(e){return e?.spacing?.margin}function _se(e){return e?.spacing?.blockGap}function xse(e){return e?.dimensions?.height}function wse(e){return e?.dimensions?.minHeight}function Cse(e){return e?.dimensions?.width}function Bse(e){return e?.dimensions?.aspectRatio}function Ese(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 tIe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function gse(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 bse(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function oIe(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 rIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Po(),s=()=>{let a=e(o);t(a)};return(0,$e.jsx)(jt.__experimentalToolsPanel,{label:(0,Yt.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var Js={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,aspectRatio:!0,childLayout:!0};function OP({as:e=rIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=Js,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=oe=>oe&&typeof oe=="object"?Object.keys(oe).reduce((Ae,ut)=>(Ae[ut]=xn({settings:{dimensions:u,spacing:d}},"",oe[ut]),Ae),{}):xn({settings:{dimensions:u,spacing:d}},"",oe),m=tIe(n),h=(0,jt.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),p=-1/0,[g,b]=(0,Fb.useState)(p),v=kse(n)&&c,k=f(r?.layout?.contentSize),y=oe=>{o(pe(t,["layout","contentSize"],oe||void 0))},S=()=>!!t?.layout?.contentSize,x=()=>y(void 0),C=vse(n)&&c,B=f(r?.layout?.wideSize),I=oe=>{o(pe(t,["layout","wideSize"],oe||void 0))},O=()=>!!t?.layout?.wideSize,E=()=>I(void 0),L=yse(n),T=f(r?.spacing?.padding),R=bse(T),D=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,j=D&&D.some(oe=>AF.includes(oe)),G=oe=>{let Ae=gse(oe,D);o(pe(t,["spacing","padding"],Ae))},z=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,H=()=>G(void 0),W=()=>a("padding"),te=Sse(n),ne=f(r?.spacing?.margin),ae=bse(ne),X=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,ee=X&&X.some(oe=>AF.includes(oe)),le=oe=>{let Ae=gse(oe,X);o(pe(t,["spacing","margin"],Ae))},Q=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,J=()=>le(void 0),q=()=>a("margin"),U=_se(n),K=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,se=K&&K.some(oe=>AF.includes(oe)),ce=f(r?.spacing?.blockGap),Se=oIe(ce,se),he=oe=>{o(pe(t,["spacing","blockGap"],oe))},we=oe=>{oe||he(null),!se&&oe?.hasOwnProperty("top")?he(oe.top):he({top:oe?.top,left:oe?.left})},De=()=>he(void 0),ct=()=>!!t?.spacing?.blockGap,Jt=wse(n),uo=f(r?.dimensions?.minHeight),Do=oe=>{let Ae=pe(t,["dimensions","minHeight"],oe);o(pe(Ae,["dimensions","aspectRatio"],void 0))},ot=()=>{Do(void 0)},sr=()=>!!t?.dimensions?.minHeight,ze=xse(n),wt=f(r?.dimensions?.height),je=oe=>{let Ae=pe(t,["dimensions","height"],oe);o(pe(Ae,["dimensions","aspectRatio"],void 0))},At=()=>{je(void 0)},ar=()=>!!t?.dimensions?.height,Ue=Cse(n),Lr=f(r?.dimensions?.width),ki=oe=>{o(pe(t,["dimensions","width"],oe))},eo=()=>{ki(void 0)},Bo=()=>!!t?.dimensions?.width,Xe=Bse(n),Ve=f(r?.dimensions?.aspectRatio),bt=oe=>{let Ae=pe(t,["dimensions","aspectRatio"],oe);o(pe(Ae,["dimensions","minHeight"],void 0))},Eo=()=>!!t?.dimensions?.aspectRatio,lr=Ese(n),ge=r?.layout,Ct=oe=>{o({...t,layout:{...oe}})},To=(0,Fb.useCallback)(oe=>({...oe,layout:Ne({...oe?.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:{...oe?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...oe?.dimensions,height:void 0,minHeight:void 0,aspectRatio:void 0,width:void 0}}),[]),Ye=()=>a(!1);return(0,$e.jsxs)(e,{resetAllFilter:To,value:t,onChange:o,panelId:i,children:[(v||C)&&(0,$e.jsx)("span",{className:"span-columns",children:(0,Yt.__)("Set the width of the main content area.")}),v&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{label:(0,Yt.__)("Content width"),hasValue:S,onDeselect:x,isShownByDefault:s.contentSize??Js.contentSize,panelId:i,children:(0,$e.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Yt.__)("Content width"),labelPosition:"top",value:k||"",onChange:oe=>{y(oe)},units:h,prefix:(0,$e.jsx)(jt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$e.jsx)(xe,{icon:vf})})})}),C&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{label:(0,Yt.__)("Wide width"),hasValue:O,onDeselect:E,isShownByDefault:s.wideSize??Js.wideSize,panelId:i,children:(0,$e.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Yt.__)("Wide width"),labelPosition:"top",value:B||"",onChange:oe=>{I(oe)},units:h,prefix:(0,$e.jsx)(jt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,$e.jsx)(xe,{icon:Rf})})})}),L&&(0,$e.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:z,label:(0,Yt.__)("Padding"),onDeselect:H,isShownByDefault:s.padding??Js.padding,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,$e.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,values:R,onChange:G,label:(0,Yt.__)("Padding"),sides:D,units:h,allowReset:!1,splitOnAxis:j,inputProps:{onMouseOver:W,onMouseOut:Ye}}),m&&(0,$e.jsx)(Ab,{values:R,onChange:G,label:(0,Yt.__)("Padding"),sides:D,units:h,allowReset:!1,onMouseOver:W,onMouseOut:Ye})]}),te&&(0,$e.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:Q,label:(0,Yt.__)("Margin"),onDeselect:J,isShownByDefault:s.margin??Js.margin,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,$e.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,values:ae,onChange:le,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(p)},onMouseOver:q,onMouseOut:Ye},label:(0,Yt.__)("Margin"),sides:X,units:h,allowReset:!1,splitOnAxis:ee}),m&&(0,$e.jsx)(Ab,{values:ae,onChange:le,minimumCustomValue:-1/0,label:(0,Yt.__)("Margin"),sides:X,units:h,allowReset:!1,onMouseOver:q,onMouseOut:Ye})]}),U&&(0,$e.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:ct,label:(0,Yt.__)("Block spacing"),onDeselect:De,isShownByDefault:s.blockGap??Js.blockGap,className:V({"tools-panel-item-spacing":m,"single-column":!m&&!se}),panelId:i,children:[!m&&(se?(0,$e.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,label:(0,Yt.__)("Block spacing"),min:0,onChange:we,units:h,sides:K,values:Se,allowReset:!1,splitOnAxis:se}):(0,$e.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Yt.__)("Block spacing"),min:0,onChange:he,units:h,value:ce})),m&&(0,$e.jsx)(Ab,{label:(0,Yt.__)("Block spacing"),min:0,onChange:we,showSideInLabel:!1,sides:se?K:["top"],values:Se,allowReset:!1})]}),lr&&(0,$e.jsx)(hse,{value:ge,onChange:Ct,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??Js.childLayout}),Jt&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{hasValue:sr,label:(0,Yt.__)("Minimum height"),onDeselect:ot,isShownByDefault:s.minHeight??Js.minHeight,panelId:i,children:(0,$e.jsx)(nb,{label:(0,Yt.__)("Minimum height"),value:uo,onChange:Do})}),ze&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{hasValue:ar,label:(0,Yt.__)("Height"),onDeselect:At,isShownByDefault:s.height??Js.height,panelId:i,children:(0,$e.jsx)(nb,{label:(0,Yt.__)("Height"),value:wt,onChange:je})}),Ue&&(0,$e.jsx)(jt.__experimentalToolsPanelItem,{hasValue:Bo,label:(0,Yt.__)("Width"),onDeselect:eo,isShownByDefault:s.width??Js.width,panelId:i,children:(0,$e.jsx)(nb,{label:(0,Yt.__)("Width"),value:Lr,onChange:ki})}),Xe&&(0,$e.jsx)(PP,{hasValue:Eo,value:Ve,onChange:bt,panelId:i,isShownByDefault:s.aspectRatio??Js.aspectRatio})]})}var Jr=l(A(),1),jb=l(P(),1),zb=l(N(),1);var rp=l(N(),1),_o=l(A(),1),LP=l(P(),1);var Rt=l(w(),1),AP=[];function nIe({shadow:e,onShadowChange:t,settings:o}){let r=LF(o);return(0,Rt.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Rt.jsxs)(_o.__experimentalVStack,{spacing:4,children:[(0,Rt.jsx)(_o.__experimentalHeading,{level:5,children:(0,rp.__)("Drop shadow")}),(0,Rt.jsx)(iIe,{presets:r,activeShadow:e,onSelect:t}),(0,Rt.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Rt.jsx)(_o.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,rp.__)("Clear")})})]})})}function iIe({presets:e,activeShadow:t,onSelect:o}){return e?(0,Rt.jsx)(_o.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,rp.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,Rt.jsx)(sIe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function sIe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Rt.jsx)(_o.Tooltip,{text:t,children:(0,Rt.jsx)(_o.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:V("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Rt.jsx)("button",{className:V("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Rt.jsx)(xe,{icon:gl})})})})}function Tse({shadow:e,onShadowChange:t,settings:o}){return(0,Rt.jsx)(_o.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:aIe(e,t),renderContent:()=>(0,Rt.jsx)(_o.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Rt.jsx)(nIe,{shadow:e,onShadowChange:t,settings:o})})})}function aIe(e,t){return function({onToggle:r,isOpen:n}){let i=(0,LP.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,rp.__)("Remove")};return(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(_o.Button,{__next40pxDefaultSize:!0,...s,children:(0,Rt.jsxs)(_o.__experimentalHStack,{justify:"flex-start",children:[(0,Rt.jsx)(xe,{className:"block-editor-global-styles__toggle-icon",icon:JL,size:24}),(0,Rt.jsx)(_o.FlexItem,{children:(0,rp.__)("Drop shadow")})]})}),!!e&&(0,Rt.jsx)(_o.Button,{__next40pxDefaultSize:!0,size:"small",icon:Mr,...a})]})}}function LF(e){return(0,LP.useMemo)(()=>{if(!e?.shadow)return AP;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,rp.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||AP,...r||AP,...n||AP];return s.length&&s.unshift(i),s},[e])}var ea=l(w(),1);function NP(e){return Object.values(m_(e)).some(Boolean)}function m_(e){return{hasBorderColor:Ise(e),hasBorderRadius:Pse(e),hasBorderStyle:Rse(e),hasBorderWidth:Ose(e),hasShadow:Ase(e)}}function Ise(e){return e?.border?.color}function Pse(e){return e?.border?.radius}function Rse(e){return e?.border?.style}function Ose(e){return e?.border?.width}function Ase(e){let t=LF(e);return!!e?.shadow&&t.length>0}function lIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Po();return(0,ea.jsx)(Jr.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var cIe={radius:!0,color:!0,width:!0,shadow:!0};function MP({as:e=lIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=cIe}){let c=Xa(n),u=(0,jb.useCallback)(z=>xn({settings:n},"",z),[n]),d=z=>{let W=c.flatMap(({colors:te})=>te).find(({color:te})=>te===z);return W?"var:preset|color|"+W.slug:z},f=(0,jb.useMemo)(()=>{if((0,Jr.__experimentalHasSplitBorders)(r?.border)){let z={...r?.border};return["top","right","bottom","left"].forEach(H=>{z[H]={...z[H],color:u(z[H]?.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=Ise(n),p=Rse(n),g=Ose(n),b=Pse(n),v=(0,jb.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},S=Ase(n),x=u(r?.shadow),C=n?.shadow?.presets??{},B=C.custom??C.theme??C.default??[],I=z=>{let H=B?.find(({shadow:W})=>W===z)?.slug;o(pe(t,["shadow"],H?`var:preset|shadow|${H}`:z||void 0))},O=()=>!!t?.shadow,E=()=>I(void 0),L=()=>{if(y())return m({radius:t?.border?.radius});m(void 0)},T=z=>{let H={...z};(0,Jr.__experimentalHasSplitBorders)(H)?["top","right","bottom","left"].forEach(W=>{H[W]&&(H[W]={...H[W],color:d(H[W]?.color)})}):H&&(H.color=d(H.color)),m({radius:f?.radius,...H})},R=(0,jb.useCallback)(z=>({...z,border:void 0,shadow:void 0}),[]),D=a?.color||a?.width,j=h||p||g||b,G=Ub({blockName:s,hasShadowControl:S,hasBorderControl:j});return(0,ea.jsxs)(e,{resetAllFilter:R,value:t,onChange:o,panelId:i,label:G,children:[(g||h)&&(0,ea.jsx)(Jr.__experimentalToolsPanelItem,{hasValue:()=>(0,Jr.__experimentalIsDefinedBorder)(t?.border),label:(0,zb.__)("Border"),onDeselect:()=>L(),isShownByDefault:D,panelId:i,children:(0,ea.jsx)(Jr.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:p,onChange:T,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!S,label:(0,zb.__)("Border")})}),b&&(0,ea.jsx)(Jr.__experimentalToolsPanelItem,{hasValue:y,label:(0,zb.__)("Radius"),onDeselect:()=>k(void 0),isShownByDefault:a.radius,panelId:i,children:(0,ea.jsx)(WT,{presets:n?.border?.radiusSizes,values:v,onChange:z=>{k(z||void 0)}})}),S&&(0,ea.jsxs)(Jr.__experimentalToolsPanelItem,{label:(0,zb.__)("Shadow"),hasValue:O,onDeselect:E,isShownByDefault:a.shadow,panelId:i,children:[j?(0,ea.jsx)(Jr.BaseControl.VisualLabel,{as:"legend",children:(0,zb.__)("Shadow")}):null,(0,ea.jsx)(Tse,{shadow:x,onShadowChange:I,settings:n})]})]})}var Zt=l(A(),1),VP=l(P(),1),qt=l(N(),1);var at=l(w(),1);function FP(e){let t=Nse(e),o=Fse(e),r=Mse(e),n=Ad(e),i=Vse(e),s=Dse(e);return t||o||r||n||i||s}function Nse(e){let t=Xa(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Mse(e){let t=Xa(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Dse(e){let t=Xa(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function Ad(e){let t=Xa(e),o=d_(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Vse(e){let t=Xa(e),o=d_(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Fse(e){let t=Xa(e),o=d_(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function NF({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Po(),a=()=>{let c=e(o);t(c)};return(0,at.jsx)(Zt.__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,at.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var uIe={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},dIe={placement:"left-start",offset:36,shift:!0},{Tabs:DP}=M(Zt.privateApis),fIe=({indicators:e,label:t})=>(0,at.jsxs)(Zt.__experimentalHStack,{justify:"flex-start",children:[(0,at.jsx)(Zt.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,at.jsx)(Zt.Flex,{expanded:!1,children:(0,at.jsx)(Zt.ColorIndicator,{colorValue:o})},r))}),(0,at.jsx)(Zt.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Lse({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,at.jsx)(kd,{...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 mIe({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a}){let c=i.find(m=>m.userValue!==void 0),{key:u,...d}=i[0]??{},f=(0,VP.useRef)(void 0);return(0,at.jsx)(Zt.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,at.jsx)(Zt.Dropdown,{popoverProps:dIe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:m,isOpen:h})=>{let p={onClick:m,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":h}),"aria-expanded":h,ref:f};return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Zt.Button,{...p,__next40pxDefaultSize:!0,children:(0,at.jsx)(fIe,{indicators:n,label:e})}),t()&&(0,at.jsx)(Zt.Button,{__next40pxDefaultSize:!0,label:(0,qt.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Mr,onClick:()=>{o(),h&&m(),f.current?.focus()}})]})},renderContent:()=>(0,at.jsx)(Zt.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,at.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,at.jsx)(Lse,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,at.jsxs)(DP,{defaultTabId:c?.key,children:[(0,at.jsx)(DP.TabList,{children:i.map(m=>(0,at.jsx)(DP.Tab,{tabId:m.key,children:m.label},m.key))}),i.map(m=>{let{key:h,...p}=m;return(0,at.jsx)(DP.TabPanel,{tabId:h,focusable:!1,children:(0,at.jsx)(Lse,{...p,colorGradientControlSettings:s},h)},h)})]})]})})})})}function zP({as:e=NF,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=uIe,label:a,children:c}){let u=Xa(n),d=d_(n),f=n?.color?.custom,m=n?.color?.customGradient,h=u.length>0||f,p=d.length>0||m,g=U=>xn({settings:n},"",U),b=U=>{let se=u.flatMap(({colors:ce})=>ce).find(({color:ce})=>ce===U);return se?"var:preset|color|"+se.slug:U},v=U=>{let se=d.flatMap(({gradients:ce})=>ce).find(({gradient:ce})=>ce===U);return se?"var:preset|gradient|"+se.slug:U},k=Fse(n),y=g(r?.color?.background),S=g(t?.color?.background),x=g(r?.color?.gradient),C=g(t?.color?.gradient),B=()=>!!S||!!C,I=U=>{let K=pe(t,["color","background"],b(U));K.color.gradient=void 0,o(K)},O=U=>{let K=pe(t,["color","gradient"],v(U));K.color.background=void 0,o(K)},E=()=>{let U=pe(t,["color","background"],void 0);U.color.gradient=void 0,o(U)},L=Mse(n),T=g(r?.elements?.link?.color?.text),R=g(t?.elements?.link?.color?.text),D=U=>{o(pe(t,["elements","link","color","text"],b(U)))},j=g(r?.elements?.link?.[":hover"]?.color?.text),G=g(t?.elements?.link?.[":hover"]?.color?.text),z=U=>{o(pe(t,["elements","link",":hover","color","text"],b(U)))},H=()=>!!R||!!G,W=()=>{let U=pe(t,["elements","link",":hover","color","text"],void 0);U=pe(U,["elements","link","color","text"],void 0),o(U)},te=Nse(n),ne=g(r?.color?.text),ae=g(t?.color?.text),X=()=>!!ae,ee=U=>{let K=pe(t,["color","text"],b(U));ne===T&&(K=pe(K,["elements","link","color","text"],b(U))),o(K)},le=()=>ee(void 0),Q=[{name:"caption",label:(0,qt.__)("Captions"),showPanel:Dse(n)},{name:"button",label:(0,qt.__)("Button"),showPanel:Vse(n)},{name:"heading",label:(0,qt.__)("Heading"),showPanel:Ad(n)},{name:"h1",label:(0,qt.__)("H1"),showPanel:Ad(n)},{name:"h2",label:(0,qt.__)("H2"),showPanel:Ad(n)},{name:"h3",label:(0,qt.__)("H3"),showPanel:Ad(n)},{name:"h4",label:(0,qt.__)("H4"),showPanel:Ad(n)},{name:"h5",label:(0,qt.__)("H5"),showPanel:Ad(n)},{name:"h6",label:(0,qt.__)("H6"),showPanel:Ad(n)}],J=(0,VP.useCallback)(U=>({...U,color:void 0,elements:{...U?.elements,link:{...U?.elements?.link,color:void 0,":hover":{color:void 0}},...Q.reduce((K,se)=>({...K,[se.name]:{...U?.elements?.[se.name],color:void 0}}),{})}}),[Q]),q=[te&&{key:"text",label:(0,qt.__)("Text"),hasValue:X,resetValue:le,isShownByDefault:s.text,indicators:[ne],tabs:[{key:"text",label:(0,qt.__)("Text"),inheritedValue:ne,setValue:ee,userValue:ae}]},k&&{key:"background",label:(0,qt.__)("Background"),hasValue:B,resetValue:E,isShownByDefault:s.background,indicators:[x??y],tabs:[h&&{key:"background",label:(0,qt.__)("Color"),inheritedValue:y,setValue:I,userValue:S},p&&{key:"gradient",label:(0,qt.__)("Gradient"),inheritedValue:x,setValue:O,userValue:C,isGradient:!0}].filter(Boolean)},L&&{key:"link",label:(0,qt.__)("Link"),hasValue:H,resetValue:W,isShownByDefault:s.link,indicators:[T,j],tabs:[{key:"link",label:(0,qt.__)("Default"),inheritedValue:T,setValue:D,userValue:R},{key:"hover",label:(0,qt.__)("Hover"),inheritedValue:j,setValue:z,userValue:G}]}].filter(Boolean);return Q.forEach(({name:U,label:K,showPanel:se})=>{if(!se)return;let ce=g(r?.elements?.[U]?.color?.background),Se=g(r?.elements?.[U]?.color?.gradient),he=g(r?.elements?.[U]?.color?.text),we=g(t?.elements?.[U]?.color?.background),De=g(t?.elements?.[U]?.color?.gradient),ct=g(t?.elements?.[U]?.color?.text),Jt=()=>!!(ct||we||De),uo=()=>{let je=pe(t,["elements",U,"color","background"],void 0);je.elements[U].color.gradient=void 0,je.elements[U].color.text=void 0,o(je)},Do=je=>{o(pe(t,["elements",U,"color","text"],b(je)))},ot=je=>{let At=pe(t,["elements",U,"color","background"],b(je));At.elements[U].color.gradient=void 0,o(At)},sr=je=>{let At=pe(t,["elements",U,"color","gradient"],v(je));At.elements[U].color.background=void 0,o(At)},ze=!0,wt=U!=="caption";q.push({key:U,label:K,hasValue:Jt,resetValue:uo,isShownByDefault:s[U],indicators:ze&&wt?[he,Se??ce]:[ze?he:Se??ce],tabs:[h&&ze&&{key:"text",label:(0,qt.__)("Text"),inheritedValue:he,setValue:Do,userValue:ct},h&&wt&&{key:"background",label:(0,qt.__)("Background"),inheritedValue:ce,setValue:ot,userValue:we},p&&wt&&{key:"gradient",label:(0,qt.__)("Gradient"),inheritedValue:Se,setValue:sr,userValue:De,isGradient:!0}].filter(Boolean)})}),(0,at.jsxs)(e,{resetAllFilter:J,value:t,onChange:o,panelId:i,label:a,children:[q.map(U=>{let{key:K,...se}=U;return(0,at.jsx)(mIe,{...se,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},K)}),c]})}var pt=l(A(),1),_c=l(N(),1),Hb=l(P(),1);var so=l(w(),1),jP=[];function zse(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||jP,i=e?.color?.[t]?.theme||jP,s=e?.color?.[t]?.default||jP;return(0,Hb.useMemo)(()=>[...n,...i,...r?jP:s],[r,n,i,s])}function jse(e){return Use(e)}function Use(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function pIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Po(),s=()=>{let a=e(o);t(a)};return(0,so.jsx)(pt.__experimentalToolsPanel,{label:(0,_c._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var hIe={duotone:!0},gIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,_c.__)("Duotone")},bIe=({indicator:e,label:t})=>(0,so.jsxs)(pt.__experimentalHStack,{justify:"flex-start",children:[(0,so.jsx)(pt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,so.jsx)(pt.Flex,{expanded:!1,children:e==="unset"||!e?(0,so.jsx)(pt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,so.jsx)(pt.DuotoneSwatch,{values:e})})}),(0,so.jsx)(pt.FlexItem,{title:t,children:t})]}),kIe=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,Hb.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,_c.__)("Reset")};return(0,so.jsxs)(so.Fragment,{children:[(0,so.jsx)(pt.Button,{__next40pxDefaultSize:!0,...s,children:(0,so.jsx)(bIe,{indicator:e,label:(0,_c.__)("Duotone")})}),e&&(0,so.jsx)(pt.Button,{size:"small",icon:Mr,...a})]})};function UP({as:e=pIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=hIe}){let a=b=>xn({settings:n},"",b),c=Use(n),u=zse(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=zse(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(pe(t,["filter","duotone"],k))},h=()=>!!t?.filter?.duotone,p=()=>m(void 0),g=(0,Hb.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,so.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,so.jsx)(pt.__experimentalToolsPanelItem,{label:(0,_c.__)("Duotone"),hasValue:h,onDeselect:p,isShownByDefault:s.duotone,panelId:i,children:(0,so.jsx)(pt.Dropdown,{popoverProps:gIe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:kIe(f,p),renderContent:()=>(0,so.jsx)(pt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,so.jsxs)(pt.MenuGroup,{label:(0,_c.__)("Duotone"),children:[(0,so.jsx)("p",{children:(0,_c.__)("Create a two-tone color effect without losing your original image.")}),(0,so.jsx)(pt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var Gb=l(A(),1),p_=l(N(),1);var np=l(w(),1);function Hse(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function Gse({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=Po(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,np.jsx)(np.Fragment,{children:(0,np.jsx)(Gb.__experimentalToolsPanel,{label:(0,p_._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,np.jsx)(Gb.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,p_.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,np.jsx)(Gb.ToggleControl,{label:(0,p_.__)("Enlarge on click"),checked:a,onChange:s})})})})}var Wb=l(A(),1),Wse=l(P(),1),HP=l(N(),1);var h_=l(w(),1);function GP(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function WP({value:e,onChange:t,inheritedValue:o=e,help:r}){let[n,i]=(0,Wse.useState)(null),s=o?.css;function a(u){if(t({...e,css:u}),!GP(u)){i((0,HP.__)("The custom CSS is invalid. Do not use <> markup."));return}n&&i(null)}function c(u){let d=u?.target?.value;if(!d||!GP(d))return;let[f]=jh([{css:d}],".for-validation-only");i(f===null?(0,HP.__)("There is an error with your CSS structure."):null)}return(0,h_.jsxs)(Wb.__experimentalVStack,{spacing:3,children:[n&&(0,h_.jsx)(Wb.Notice,{status:"error",onRemove:()=>i(null),children:n}),(0,h_.jsx)(Wb.TextareaControl,{label:(0,HP.__)("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 qP=l(A(),1),ZP=l(P(),1),DF=l(N(),1);var Be=l(A(),1);var Ot=l(N(),1),Kse=l(Ti(),1),MF=l(un(),1),xc=l(P(),1),g_=l(F(),1),Yse=l(Fe(),1),qse=l(O5(),1);var Ie=l(w(),1),$P="image",vIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},YP=()=>{},KP=e=>{window.requestAnimationFrame(()=>{let[t]=Yse.focus.tabbable.find(e?.current);t&&t.focus()})};function yIe(e){return e==="cover"||e===void 0?(0,Ot.__)("Image covers the space evenly."):e==="contain"?(0,Ot.__)("Image is contained without distortion."):(0,Ot.__)("Image has a fixed width.")}var SIe=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}%`},_Ie=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 Zse({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=YP}){let{isOpen:s,...a}=o;(0,xc.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Ie.jsxs)(Be.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,Ie.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,Ie.jsxs)(Be.FlexBlock,{children:[(0,Ie.jsx)(Be.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Ie.jsx)(Be.VisuallyHidden,{as:"span",children:t?(0,Ot.sprintf)((0,Ot.__)("Background image: %s"),r||n):(0,Ot.__)("No background image selected")})]})]});return e==="button"?(0,Ie.jsx)(Be.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function xIe({label:e,filename:t,url:o,children:r,onToggle:n=YP,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,MF.getFilename)(o)||(0,Ot.__)("Image");return(0,Ie.jsx)(Be.Dropdown,{popoverProps:vIe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,Ot.__)("Background size, position and repeat options."),isOpen:d};return(0,Ie.jsxs)(Ie.Fragment,{children:[(0,Ie.jsx)(Zse,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Ie.jsx)(Be.Button,{__next40pxDefaultSize:!0,label:(0,Ot.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Mr,onClick:()=>{s(),d&&u(),KP(a)}})]})},renderContent:()=>(0,Ie.jsx)(Be.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function wIe(){return(0,Ie.jsx)(Be.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Ie.jsx)(Be.Spinner,{})})}function $se({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=YP,onResetImage:n=YP,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,xc.useState)(!1),{getSettings:d}=(0,g_.useSelect)(_),{id:f,title:m,url:h}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:p}=(0,g_.useDispatch)(Kse.store),g=B=>{p(B,{type:"snackbar"}),u(!1)},b=()=>e(pe(t,["background","backgroundImage"],void 0)),v=B=>{if(!B||!B.url){b(),u(!1);return}if((0,qse.isBlobURL)(B.url)){u(!0);return}if(B.media_type&&B.media_type!==$P||!B.media_type&&B.type&&B.type!==$P){g((0,Ot.__)("Only images can be used as a background image."));return}let I=t?.background?.backgroundSize||s?.backgroundSize,O=t?.background?.backgroundPosition;e(pe(t,["background"],{...t?.background,backgroundImage:{url:B.url,id:B.id,source:"file",title:B.title||void 0},backgroundPosition:!O&&(I==="auto"||!I)?"50% 0":O,backgroundSize:I})),u(!1),KP(a)},k=B=>{d().mediaUpload({allowedTypes:[$P],filesList:B,onFileChange([I]){v(I)},onError:g,multiple:!1})},y=ip(t),S=()=>e(pe(t,["background"],{backgroundImage:"none"})),x=!y&&ip(o),C=m||(0,MF.getFilename)(h)||(0,Ot.__)("Image");return(0,Ie.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Ie.jsx)(wIe,{}),(0,Ie.jsx)(kb,{mediaId:f,mediaURL:h,allowedTypes:[$P],accept:"image/*",onSelect:v,popoverProps:{className:V({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Ie.jsx)(Zse,{imgUrl:h,filename:m,label:C}),renderToggle:B=>(0,Ie.jsx)(Be.Button,{...B,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{KP(a),n()},children:x&&(0,Ie.jsx)(Be.MenuItem,{onClick:()=>{KP(a),S(),r()},children:(0,Ot.__)("Remove")})}),(0,Ie.jsx)(Be.DropZone,{onFilesDrop:k,label:(0,Ot.__)("Drop to upload")})]})}function CIe({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(pe(t,["background"],{...t?.background,backgroundPosition:y,backgroundRepeat:k,backgroundSize:v}))},h=v=>{e(pe(t,["background","backgroundPosition"],SIe(v)))},p=()=>e(pe(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(pe(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,Ie.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Ie.jsx)(Be.FocalPointPicker,{label:(0,Ot.__)("Focal point"),url:s,value:_Ie(b),onChange:h}),(0,Ie.jsx)(Be.ToggleControl,{label:(0,Ot.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Ie.jsxs)(Be.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Ot.__)("Size"),value:d,onChange:m,isBlock:!0,help:yIe(n||r?.backgroundSize),children:[(0,Ie.jsx)(Be.__experimentalToggleGroupControlOption,{value:"cover",label:(0,Ot._x)("Cover","Size option for background image control")},"cover"),(0,Ie.jsx)(Be.__experimentalToggleGroupControlOption,{value:"contain",label:(0,Ot._x)("Contain","Size option for background image control")},"contain"),(0,Ie.jsx)(Be.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Ot._x)("Tile","Size option for background image control")},"tile")]}),(0,Ie.jsxs)(Be.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Ie.jsx)(Be.__experimentalUnitControl,{"aria-label":(0,Ot.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,Ot.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Ie.jsx)(Be.ToggleControl,{label:(0,Ot.__)("Repeat"),checked:f,onChange:p,disabled:d==="cover"})]})]})}function Xse({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,g_.useSelect)(v=>{let{getSettings:k}=v(_),y=k();return{globalStyles:y[Si],_links:y[g0]}},[]),a=(0,xc.useMemo)(()=>{let v={background:{}};return o?.background?(Object.entries(o?.background).forEach(([k,y])=>{v.background[k]=Ig(y,{styles:i,_links:s})}),v):o},[i,s,o]),c=()=>t(pe(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=ip(e)||ip(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,h=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[p,g]=(0,xc.useState)(!1),b=(0,xc.useRef)();return(0,Ie.jsx)("div",{ref:b,className:V("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":p}),children:h?(0,Ie.jsx)(xIe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Ie.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Ie.jsx)($se,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Ie.jsx)(CIe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Ie.jsx)($se,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var b_=l(w(),1),BIe={backgroundImage:!0};function k_(e){return ZP.Platform.OS==="web"&&e?.background?.backgroundImage}function ip(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function EIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=Po();return(0,b_.jsx)(qP.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}function XP({as:e=EIe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=BIe,defaultValues:a={},headerLabel:c=(0,DF.__)("Background")}){let u=k_(n),d=()=>o(pe(t,["background"],{})),f=(0,ZP.useCallback)(m=>({...m,background:{}}),[]);return(0,b_.jsx)(e,{resetAllFilter:f,value:t,onChange:o,panelId:i,headerLabel:c,children:u&&(0,b_.jsx)(qP.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,DF.__)("Image"),onDeselect:d,isShownByDefault:s.backgroundImage,panelId:i,children:(0,b_.jsx)(Xse,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})})})}var JP=l(N(),1),zF=l(w(),1),ap="__experimentalBorder",y_="shadow",Qse=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},sp=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=Qse(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=Qse(e,"color",o);return r||{color:o}};function QP(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function tae(e){if((0,FF.__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:Ne(r),borderColor:o}}function oae(e){return(0,FF.__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 TIe({label:e,children:t,resetAllFilter:o}){let r=(0,$b.useCallback)(n=>{let i=oae(n),s=o(i);return{...n,...tae(s)}},[o]);return(0,zF.jsx)(fe,{group:"border",resetAllFilter:r,label:e,children:t})}function rae({clientId:e,name:t,setAttributes:o,settings:r}){let n=NP(r),{style:i,borderColor:s}=(0,eae.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(_).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,$b.useMemo)(()=>oae({style:i,borderColor:s}),[i,s]),c=d=>{o(tae(d))};if(!n)return null;let u={...(0,v_.getBlockSupport)(t,[ap,"__experimentalDefaultControls"]),...(0,v_.getBlockSupport)(t,[y_,"__experimentalDefaultControls"])};return(0,zF.jsx)(MP,{as:TIe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function e2(e,t="any"){if($b.Platform.OS!=="web")return!1;let o=(0,v_.getBlockSupport)(e,ap);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function Ub({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=is(e),n=m_(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,JP.__)("Border & Shadow"):o?(0,JP.__)("Shadow"):(0,JP.__)("Border")}function IIe(e){return!e2(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function nae(e,t,o){if(!e2(t,"color")||He(t,ap,"color"))return e;let r=jF(o),n=V(e.className,r);return e.className=n||void 0,e}function jF(e){let{borderColor:t,style:o}=e,r=yi("border-color",t);return V({"has-border-color":t||o?.border?.color,[r]:!!r})}function PIe({name:e,borderColor:t,style:o}){let{colors:r}=yd();if(!e2(e,"color")||He(e,ap,"color"))return{};let{color:n}=sp({colors:r,namedColor:t}),{color:i}=sp({colors:r,namedColor:QP(o?.border?.top?.color)}),{color:s}=sp({colors:r,namedColor:QP(o?.border?.right?.color)}),{color:a}=sp({colors:r,namedColor:QP(o?.border?.bottom?.color)}),{color:c}=sp({colors:r,namedColor:QP(o?.border?.left?.color)});return nae({style:Ne({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var UF={useBlockProps:PIe,addSaveProps:nae,attributeKeys:["borderColor","style"],hasSupport(e){return e2(e,"color")}};(0,Jse.addFilter)("blocks.registerBlockType","core/border/addAttributes",IIe);var $F=l(rt(),1),wc=l($(),1),Ld=l(P(),1),hae=l(F(),1);var GF=l($(),1),iae=l(F(),1),sae=l(P(),1);var WF=l(w(),1),lp="background",HF={backgroundSize:"cover",backgroundPosition:"50% 50%"};function t2(e,t="any"){let o=(0,GF.getBlockSupport)(e,lp);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat:!!o?.[t]}function o2(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:HF.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:HF.backgroundPosition}),t}function RIe({name:e,style:t}){if(!t2(e)||!t?.background?.backgroundImage)return;let o=o2(t?.background);if(o)return{style:{...o}}}function aae(e){return ip(e)?"has-background":""}function OIe({children:e}){let t=(0,sae.useCallback)(o=>({...o,style:{...o.style,background:void 0}}),[]);return(0,WF.jsx)(fe,{group:"background",resetAllFilter:t,children:e})}function lae({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,inheritedValue:i}=(0,iae.useSelect)(u=>{let{getBlockAttributes:d,getSettings:f}=u(_),m=f();return{style:d(e)?.style,inheritedValue:m[Si]?.blocks?.[t]}},[e,t]);if(!k_(r)||!t2(t,"backgroundImage"))return null;let s=u=>{o({style:Ne(u)})},a={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&t2(t,"backgroundSize")}},c=(0,GF.getBlockSupport)(t,[lp,"defaultControls"]);return(0,WF.jsx)(XP,{inheritedValue:i,as:OIe,panelId:e,defaultValues:HF,settings:a,onChange:s,defaultControls:c,value:n})}var cae={useBlockProps:RIe,attributeKeys:["style"],hasSupport:t2};var S_=l(P(),1),dae=l(F(),1),fae=l($(),1);var mae=l(w(),1);function r2(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function uae(e,t){if(!e||!t)return{};let o=ei(t,"color.text",{fallback:!0}),r=ei(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=r2(n,"color"),c=s&&s.textContent?r2(s,"color"):void 0,u=i,d=r2(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=r2(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:c}}function AIe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function pae({clientId:e,name:t}){let o=mt(e),[r,n]=(0,S_.useReducer)(AIe,{}),i=(0,dae.useSelect)(s=>t?s(fae.store).getBlockType(t):void 0,[t]);return(0,S_.useLayoutEffect)(()=>{!o||!i||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>n(uae(o,i))))}),(0,S_.useLayoutEffect)(()=>{if(!o||!i)return;let s=new window.MutationObserver(()=>{n(uae(o,i))});return s.observe(o,{attributes:!0,attributeFilter:["class","style"]}),()=>{s.disconnect()}},[o,i]),(0,mae.jsx)(KT,{backgroundColor:r.backgroundColor,textColor:r.textColor,linkColor:r.linkColor,enableAlphaChecker:!0})}var n2=l(w(),1),nr="color",i2=e=>{let t=(0,wc.getBlockSupport)(e,nr);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},LIe=e=>{if(Ld.Platform.OS!=="web")return!1;let t=(0,wc.getBlockSupport)(e,nr);return t!==null&&typeof t=="object"&&!!t.link},KF=e=>{let t=(0,wc.getBlockSupport)(e,nr);return t!==null&&typeof t=="object"&&!!t.gradients},NIe=e=>{let t=(0,wc.getBlockSupport)(e,nr);return t&&t.background!==!1},MIe=e=>{let t=(0,wc.getBlockSupport)(e,nr);return t&&t.text!==!1};function DIe(e){return i2(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),KF(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function gae(e,t,o){if(!i2(t)||He(t,nr))return e;let r=KF(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!He(t,nr,g),u=c("text")?yi("color",i):void 0,d=c("gradients")?oh(s):void 0,f=c("background")?yi("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 bae(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:Ne(a),textColor:o,backgroundColor:n,gradient:s}}function kae(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 VIe({children:e,resetAllFilter:t}){let o=(0,Ld.useCallback)(r=>{let n=kae(r),i=t(n);return{...r,...bae(i)}},[t]);return(0,n2.jsx)(fe,{group:"color",resetAllFilter:o,children:e})}function s2({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=FP(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,hae.useSelect)(b=>{if(!a)return{};let{style:v,textColor:k,backgroundColor:y,gradient:S}=b(_).getBlockAttributes(e)||{};return{style:v,textColor:k,backgroundColor:y,gradient:S}},[e,a]),m=(0,Ld.useMemo)(()=>kae({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),h=b=>{o(bae(b))};if(!a)return null;s=s||(0,wc.getBlockSupport)(t,[nr,"__experimentalDefaultControls"]);let p=Ld.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,wc.getBlockSupport)(t,[nr,"enableContrastChecker"])!==!1;return(0,n2.jsx)(zP,{as:n||VIe,panelId:e,settings:r,value:m,onChange:h,defaultControls:s,label:i,enableContrastChecker:(0,wc.getBlockSupport)(t,[nr,"enableContrastChecker"])!==!1,children:p&&(0,n2.jsx)(pae,{clientId:e,name:t})})}function FIe({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=me("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,Ld.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!i2(e)||He(e,nr))return{};let u={};o&&!He(e,nr,"text")&&(u.color=ua(c,o)?.color),t&&!He(e,nr,"background")&&(u.backgroundColor=ua(c,t)?.color);let d=gae({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&&aae(n))}}var YF={useBlockProps:FIe,addSaveProps:gae,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:i2},zIe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function jIe(e,t,o,r){let n=e.name,i={linkColor:LIe(n),textColor:MIe(n),backgroundColor:NIe(n),gradient:KF(n)};return a2(i,zIe,e,t,o,r)}(0,$F.addFilter)("blocks.registerBlockType","core/color/addAttribute",DIe);(0,$F.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",jIe);var br=l(w(),1);function UIe({blockName:e,clientId:t,contentClientIds:o}){let r=is(e),{updateBlockAttributes:n}=(0,l2.useDispatch)(_),{hasButtons:i,hasHeading:s}=(0,l2.useSelect)(c=>{let u=c(_).getBlockNamesByClientId(o);return{hasButtons:u.includes("core/buttons"),hasHeading:u.includes("core/heading")}},[o]);return(0,br.jsx)(s2,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:NF,label:(0,Kb.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var HIe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=Ub({blockName:e});return(0,br.jsxs)(br.Fragment,{children:[o&&(0,br.jsx)(Yg,{clientId:t}),r&&(0,br.jsx)(UIe,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,br.jsxs)(br.Fragment,{children:[(0,br.jsx)(fe.Slot,{group:"color",label:(0,Kb.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,br.jsx)(fe.Slot,{group:"background",label:(0,Kb.__)("Background image")}),(0,br.jsx)(fe.Slot,{group:"filter"}),(0,br.jsx)(fe.Slot,{group:"typography",label:(0,Kb.__)("Typography")}),(0,br.jsx)(fe.Slot,{group:"dimensions",label:(0,Kb.__)("Dimensions")}),(0,br.jsx)(fe.Slot,{group:"border",label:i}),(0,br.jsx)(fe.Slot,{group:"styles"})]})]})},vae=HIe;var yae=l(A(),1),Sae=l(N(),1);var c2=l($(),1),u2=l(F(),1),ui=l(A(),1);var ss=l(w(),1);function d2({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,ss.jsx)(ui.__experimentalVStack,{spacing:1,children:e.map(n=>(0,ss.jsx)(GIe,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function GIe({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=Tt(e),{isSelected:i,childBlocks:s,hasListViewSupport:a,blockName:c}=(0,u2.useSelect)(p=>{let{isBlockSelected:g,hasSelectedInnerBlock:b,getBlockOrder:v,getBlockName:k}=p(_),y=k(e);return{isSelected:g(e)||b(e,!0),childBlocks:v(e),hasListViewSupport:y==="core/navigation"||(0,c2.hasBlockSupport)(y,"listView"),blockName:y}},[e]),d=(0,c2.getBlockType)(c)?.title||c,{selectBlock:f}=(0,u2.useDispatch)(_),h=s&&s.length>0&&r&&a;return(0,ss.jsx)(ui.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:i,onClick:async()=>{await f(e),h&&o&&o(e),t&&t(e)},children:(0,ss.jsxs)(ui.Flex,{children:[(0,ss.jsx)(ui.FlexItem,{children:(0,ss.jsx)(Oe,{icon:n?.icon})}),(0,ss.jsx)(ui.FlexBlock,{style:{textAlign:"left"},children:(0,ss.jsx)(ui.__experimentalTruncate,{children:d})}),h&&(0,ss.jsx)(ui.FlexItem,{children:(0,ss.jsx)(xe,{icon:Vo,size:24})})]})})}var Yb=l(w(),1),WIe=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,Yb.jsx)(Yb.Fragment,{children:!r&&(0,Yb.jsx)(yae.PanelBody,{title:(0,Sae.__)("Content"),children:(0,Yb.jsx)(d2,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},f2=WIe;var Wo=l(w(),1),{Tabs:Nd}=M(Zb.privateApis);function qF({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,ta.useRef)(null),a=(0,qb.useSelect)(S=>S(_ae.store).get("core","showIconLabels"),[]),{requestedTab:c}=(0,qb.useSelect)(S=>({requestedTab:M(S(_)).getRequestedInspectorTab()})),[u,d]=(0,ta.useState)(()=>c?.tabName??r[0]?.name),f=(0,ta.useRef)(!1),m=(0,ta.useRef)(!1),{__unstableSetOpenListViewPanel:h,__unstableIncrementListViewExpandRevision:p,__unstableSetAllListViewPanelsOpen:g}=(0,qb.useDispatch)(_),{clearRequestedInspectorTab:b}=M((0,qb.useDispatch)(_));(0,ta.useEffect)(()=>{f.current=!1},[t]),(0,ta.useEffect)(()=>{c&&(d(c.tabName),c.tabName===Sc.name&&c.options?.openPanel&&(h(c.options.openPanel),p()),m.current=!0,f.current=!0,b())},[c,h,p,b]),(0,ta.useEffect)(()=>{u===Sc.name&&!f.current&&(g(),p())},[t,u,g,p]),(0,ta.useEffect)(()=>{if(!r?.length||f.current&&r.some(x=>x.name===u))return;let S=r[0]?.name;u!==S&&d(S)},[r,u]);let v=S=>{d(S),f.current=!0,S===Sc.name&&!m.current&&(g(),p()),m.current=!1},k=r.some(S=>S.name===Sc.name),y=S=>{k&&(h(S),p(),m.current=!0,v(Sc.name))};return(0,Wo.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,Wo.jsxs)(Nd,{selectedTabId:u,onSelect:v,children:[(0,Wo.jsx)(Nd.TabList,{children:r.map(S=>a?(0,Wo.jsx)(Nd.Tab,{tabId:S.name,children:S.title},S.name):(0,Wo.jsx)(Zb.Tooltip,{text:S.title,children:(0,Wo.jsx)(Nd.Tab,{tabId:S.name,"aria-label":S.title,children:(0,Wo.jsx)(Zb.Icon,{icon:S.icon})})},S.name))}),(0,Wo.jsxs)(Nd.TabPanel,{tabId:bP.name,focusable:!1,children:[(0,Wo.jsx)(f2,{contentClientIds:i,onSwitchToListView:y,hasListViewTab:k}),(0,Wo.jsx)(fe.Slot,{group:"content"})]}),(0,Wo.jsxs)(Nd.TabPanel,{tabId:Sc.name,focusable:!1,children:[(0,Wo.jsx)(fe.Slot,{group:"list",ref:s}),(0,Wo.jsx)(XB,{listViewRef:s})]}),(0,Wo.jsx)(Nd.TabPanel,{tabId:hP.name,focusable:!1,children:(0,Wo.jsx)(qie,{showAdvancedControls:!!e})}),(0,Wo.jsx)(Nd.TabPanel,{tabId:gP.name,focusable:!1,children:(0,Wo.jsx)(vae,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var di=l(A(),1),xae=l(F(),1);var $Ie=[];function KIe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function wae(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}=Wi,b=(0,di.__experimentalUseSlotFills)(f.name),v=!!b&&b.length,k=(0,di.__experimentalUseSlotFills)(c.name),y=!!k&&k.length,x=[...(0,di.__experimentalUseSlotFills)(s.name)||[],...(0,di.__experimentalUseSlotFills)(a.name)||[],...(0,di.__experimentalUseSlotFills)(d.name)||[],...(0,di.__experimentalUseSlotFills)(h.name)||[],...(0,di.__experimentalUseSlotFills)(p.name)||[],...(0,di.__experimentalUseSlotFills)(g.name)||[]].length,C=[...(0,di.__experimentalUseSlotFills)(Ju.slotName)||[],...(0,di.__experimentalUseSlotFills)(i.name)||[]],B=[...(0,di.__experimentalUseSlotFills)(u.name)||[],...(0,di.__experimentalUseSlotFills)(m.name)||[],...v&&x>1?C:[]],I=window?.__experimentalContentOnlyInspectorFields,O=y||!I&&t?.length;O&&n.push(bP),v&&n.push(Sc),(B.length||C.length&&(O||v))&&n.push(hP),(r||x)&&n.push(gP);let E=(0,xae.useSelect)(T=>T(_).getSettings().blockInspectorTabs,[]);return KIe(e,E)?n:$Ie}var Cae=l(A(),1);var ZF=l(w(),1),{Fill:YIe,Slot:qIe}=(0,Cae.createSlotFill)(Symbol("InspectorControlsLastItem")),Bae=e=>Pe()[bs]?(0,ZF.jsx)(YIe,{...e}):null;Bae.Slot=function(t){return(0,ZF.jsx)(qIe,{...t})};var m2=Bae;var Eae=l(F(),1);function Tae(e){return(0,Eae.useSelect)(t=>{if(e){let o=t(_).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(_),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var _e=l(w(),1);function Rae({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=Ub({blockName:e});return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(fe.Slot,{}),(0,_e.jsx)(fe.Slot,{group:"color",label:(0,Xb.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,_e.jsx)(fe.Slot,{group:"background",label:(0,Xb.__)("Background image")}),(0,_e.jsx)(fe.Slot,{group:"typography",label:(0,Xb.__)("Typography")}),(0,_e.jsx)(fe.Slot,{group:"dimensions",label:(0,Xb.__)("Dimensions")}),(0,_e.jsx)(fe.Slot,{group:"border",label:n}),(0,_e.jsx)(fe.Slot,{group:"styles"}),o&&(0,_e.jsx)(yP,{}),r&&(0,_e.jsx)(fe.Slot,{group:"bindings"}),t&&(0,_e.jsx)("div",{children:(0,_e.jsx)(kP,{})})]})}function ZIe(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a}=(0,XF.useSelect)(g=>{let{getSelectedBlockClientId:b,getSelectedBlockClientIds:v,getSelectedBlockCount:k,getBlockName:y,getParentSectionBlock:S,isSectionBlock:x,getEditedContentOnlySection:C,isWithinEditedContentOnlySection:B}=M(g(_)),{getBlockStyles:I}=g(Md.store),O=b(),L=B(O)?O:S(O)||O,T=L&&y(L),R=T&&(0,Md.getBlockType)(T),j=v().some(H=>x(H)),G=T&&I(T),z=G&&G.length>0;return{selectedBlockCount:k(),renderedBlockClientId:L,renderedBlockName:T,blockType:R,isSectionBlockInSelection:j,isSectionBlock:x(L),hasBlockStyles:z,editedContentOnlySection:C()}},[]),c=(0,XF.useSelect)(g=>{if(!n||!o)return[];let{getClientIdsOfDescendants:b,getBlockName:v,getBlockEditingMode:k}=M(g(_)),y=b(o),S=new Set;return y.forEach(x=>{let C=v(x);(C==="core/navigation"||(0,Md.hasBlockSupport)(C,"listView"))&&b(x).forEach(I=>S.add(I))}),y.filter(x=>!S.has(x)&&k(x)==="contentOnly")},[n,o]),u=wae(r?.name,c,n,s),d=u?.length>1,f=Tae(r),m=e>1;if(m&&!i)return(0,_e.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,_e.jsx)(TF,{}),d?(0,_e.jsx)(qF,{tabs:u}):(0,_e.jsx)(Rae,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(m&&i)return(0,_e.jsx)("div",{className:"block-editor-block-inspector",children:(0,_e.jsx)(TF,{})});let h=t===(0,Md.getUnregisteredTypeHandlerName)();return!r||!o||h?(0,_e.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,Xb.__)("No block selected.")}):(0,_e.jsx)(XIe,{animate:f,wrapper:g=>(0,_e.jsx)(QIe,{blockInspectorAnimationSettings:f,renderedBlockClientId:o,children:g}),children:(0,_e.jsx)(JIe,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:u,contentClientIds:c,hasBlockStyles:s,editedContentOnlySection:a})})}var XIe=({animate:e,wrapper:t,children:o})=>e?t(o):o,QIe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,_e.jsx)(Iae.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},JIe=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s})=>{let a=(0,Pae.useRef)(null),c=r?.length>1,u=s&&s!==e,d=Tt(s),f=Tt(e),m=f.isSynced;return(0,_e.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,_e.jsx)(ky,{...d,className:d.isSynced&&"is-synced",parentClientId:s}),(0,_e.jsx)(ky,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),(0,_e.jsx)(e9,{clientId:e}),(0,_e.jsx)(zie,{clientId:e}),(0,_e.jsx)(zT,{blockClientId:e}),c&&(0,_e.jsx)(_e.Fragment,{children:(0,_e.jsx)(qF,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!c&&(0,_e.jsxs)(_e.Fragment,{children:[i&&(0,_e.jsx)(Yg,{clientId:e}),(0,_e.jsx)(f2,{contentClientIds:n}),(0,_e.jsx)(fe.Slot,{group:"content"}),(0,_e.jsx)(fe.Slot,{group:"list",ref:a}),(0,_e.jsx)(XB,{listViewRef:a}),!o&&(0,_e.jsx)(Rae,{blockName:t})]}),(0,_e.jsx)(m2.Slot,{}),(0,_e.jsx)(mP,{},"back")]})},Oae=ZIe;var QF=l(Re(),1);var Aae=l(w(),1),Lae=()=>((0,QF.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),Sy());function Nae(e){return(0,QF.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,Aae.jsx)("div",{...e,ref:Sy()})}var Mae=l(F(),1),JF=l(P(),1);var e4=l(w(),1),ePe=()=>{};function tPe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=ePe,shouldFocusBlock:f=!1,onClose:m},h){let{destinationRootClientId:p}=(0,Mae.useSelect)(g=>{let{getBlockRootClientId:b}=g(_);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,e4.jsx)(V5,{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 t4=(0,JF.forwardRef)(tPe);function oPe(e,t){return(0,e4.jsx)(t4,{...e,onPatternCategorySelection:void 0,ref:t})}var Dae=(0,JF.forwardRef)(oPe);var Vae=l(Re(),1);function Fae(){return(0,Vae.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var zae=l(Z(),1),__=l(Fe(),1),jae=l(F(),1),Dd=l(it(),1);var Uae=l(w(),1),rPe=window.navigator.userAgent.indexOf("Trident")!==-1,nPe=new Set([Dd.UP,Dd.DOWN,Dd.LEFT,Dd.RIGHT]),iPe=.75;function o4(){let e=(0,jae.useSelect)(t=>t(_).hasSelectedBlock(),[]);return(0,zae.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,__.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(nPe.has(g)){s=b;return}let v=b.top-s.top;if(v===0)return;let k=(0,__.getScrollContainer)(t);if(!k)return;let y=k===o.body||k===o.documentElement,S=y?r.scrollY:k.scrollTop,x=y?0:k.getBoundingClientRect().top,C=y?s.top/r.innerHeight:(s.top-x)/(r.innerHeight-x);if(S===0&&C<iPe&&p()){s=b;return}let B=y?r.innerHeight:k.clientHeight;if(s.top+s.height>x+B||s.top<x){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,__.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 sPe({children:e}){return(0,Uae.jsx)("div",{ref:o4(),className:"block-editor__typewriter",children:e})}var aPe=rPe?e=>e.children:sPe,Hae=aPe;var cp=l(P(),1),r4=l(Re(),1);var n4=l(w(),1),p2=(0,cp.createContext)({});p2.displayName="RenderedRefsContext";function lPe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function i4({children:e,uniqueId:t,blockName:o=""}){let r=(0,cp.useContext)(p2),{name:n}=Pe();o=o||n;let i=(0,cp.useMemo)(()=>lPe(r,o,t),[r,o,t]);return(0,n4.jsx)(p2.Provider,{value:i,children:e})}function s4(e,t=""){let o=(0,cp.useContext)(p2),{name:r}=Pe();return t=t||r,!!o[t]?.has(e)}var Gae=e=>((0,r4.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,n4.jsx)(i4,{...e})),Wae=(...e)=>((0,r4.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),s4(...e));var g2=l(A(),1),a4=l(N(),1),l4=l(P(),1),Kae=l(hc(),1);var fi=l(A(),1);var $ae=l(N(),1),Cc=l(w(),1);function h2({title:e,help:t,actions:o=[],onClose:r}){return(0,Cc.jsxs)(fi.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,Cc.jsxs)(fi.__experimentalHStack,{alignment:"center",children:[(0,Cc.jsx)(fi.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,Cc.jsx)(fi.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,Cc.jsx)(fi.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,Cc.jsx)(fi.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,$ae.__)("Close"),icon:Sf,onClick:r})]}),t&&(0,Cc.jsx)(fi.__experimentalText,{children:t})]})}var Qb=l(w(),1);function cPe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,Kae.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?g2.TimePicker:g2.DateTimePicker;return(0,Qb.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,Qb.jsx)(h2,{title:i||(0,a4.__)("Publish"),actions:o?[{label:(0,a4.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,Qb.jsx)(u,{...c})]})}var c4=(0,l4.forwardRef)(cPe);function uPe(e,t){return(0,Qb.jsx)(c4,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var Yae=(0,l4.forwardRef)(uPe);var b2=l(F(),1),qae=l(P(),1);function Mo(e){let t=Pe(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,b2.useDispatch)(_),i=(0,b2.useSelect)(s=>o?null:s(_).getBlockEditingMode(),[o]);return(0,qae.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[s0]:i}var Zae=l(Re(),1),Xae=l(P(),1);function dPe(){return(0,Zae.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var Qae=(0,Xae.forwardRef)(dPe);var w_=l(w(),1),Ne=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Ne(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function a2(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=yl(s,d);f&&(a={...a,attributes:pe(a.attributes,d,f)})})}),a}function He(e,t,o){let n=(0,Jae.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var Bc=new WeakMap;function Zn({id:e,css:t}){return oc({id:e,css:t})}function oc({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=M((0,k2.useDispatch)(_)),c=(0,k2.useRegistry)(),u=(0,as.useId)();(0,as.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return Bc.get(c)||Bc.set(c,[]),Bc.get(c).push([d,f]),window.queueMicrotask(()=>{Bc.get(c)?.length&&c.batch(()=>{Bc.get(c).forEach(m=>{s(...m)}),Bc.set(c,[])})}),()=>{Bc.get(c)?.find(([h])=>h===d)?Bc.set(c,Bc.get(c).filter(([h])=>h!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function is(e,t){let[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,y,S,x,C,B,I,O,E,L,T,R,D,j,G,z,H,W,te,ne,ae,X,ee,le,Q,J,q,U,K,se,ce,Se,he,we,De,ct,Jt,uo,Do,ot,sr,ze,wt,je,At]=me("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.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"),ar=(0,as.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r},color:{palette:{custom:J,theme:U,default:K},gradients:{custom:De,theme:ct,default:Jt},duotone:{custom:Se,theme:he,default:we},defaultGradients:uo,defaultPalette:se,defaultDuotone:ce,custom:Q,customGradient:Do,customDuotone:q,background:ot,link:sr,heading:wt,button:je,text:ze},typography:{fontFamilies:{custom:n,default:i,theme:s},fontSizes:{custom:c,default:u,theme:d},customFontSize:f,defaultFontSizes:a,fontStyle:m,fontWeight:h,lineHeight:p,textAlign:g,textColumns:b,textDecoration:v,textIndent:k,textTransform:S,letterSpacing:x,writingMode:y},spacing:{spacingSizes:{custom:L,default:T,theme:R},customSpacingSize:E,defaultSpacingSizes:O,padding:C,margin:B,blockGap:I,units:D},border:{color:ne,radius:ae,style:X,width:ee,radiusSizes:le},dimensions:{aspectRatio:j,height:G,minHeight:z,width:H,dimensionSizes:W},layout:te,parentLayout:t,shadow:At}),[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,S,x,y,C,B,I,O,E,L,T,R,D,j,G,z,H,W,te,t,ne,ae,X,ee,le,Q,J,q,U,K,se,ce,Se,he,we,De,ct,Jt,uo,Do,ot,sr,ze,wt,je,At]);return xP(ar,e)}function ele(e){e=e.map(o=>({...o,Edit:(0,as.memo)(o.edit)}));let t=(0,u4.createHigherOrderComponent)(o=>function(n){let i=Pe();return[...e.map((s,a)=>{let{Edit:c,hasSupport:u,attributeKeys:d=[],shareWithChildBlocks:f,supportsPatternEditing:m}=s;if(!(m&&i[$c]||i[bs]||i[Pp]&&f)||!u(n.name))return null;let p={};for(let g of d)n.attributes[g]&&(p[g]=n.attributes[g]);return(0,w_.jsx)(c,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...p},a)}),(0,w_.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,x_.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function fPe({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,as.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var mPe=(0,as.memo)(fPe);function tle(e){let t=(0,u4.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,as.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,w_.jsx)(mPe,{index:c,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...h},c)}),(0,w_.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,x_.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function ole(e){function t(o,r,n){return e.reduce((i,s)=>{let{hasSupport:a,attributeKeys:c=[],addSaveProps:u}=s,d={};for(let f of c)n[f]&&(d[f]=n[f]);return!Object.keys(d).length||!a(r)?i:u(i,r,d)},o)}(0,x_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,x_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var rle=l($(),1),nle=l(rt(),1);function pPe(e){let{apiVersion:t=1}=e;return t<2&&(0,rle.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,nle.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",pPe);var sle=l(rt(),1),ale=l(Z(),1),d4=l(w(),1);function ile(e){if(e.hasAttribute("crossorigin")||e.setAttribute("crossorigin","anonymous"),e.nodeName==="IFRAME"&&!e.hasAttribute("credentialless")){if(e.getAttribute("src")?.startsWith("blob:"))return;e.setAttribute("credentialless","");let t=e.getAttribute("src")||"";e.setAttribute("src",""),e.setAttribute("src",t)}}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})})};hPe=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;if(a.querySelectorAll){if(a.querySelectorAll("img,source,script,video,link,iframe").forEach(c=>{ile(c)}),a.nodeName==="IFRAME"){let c=a;c.classList.contains("components-sandbox")||c.addEventListener("load",()=>{try{c.contentDocument&&c.contentDocument.body&&t.observe(c.contentDocument,{childList:!0,attributes:!0,subtree:!0})}catch{}})}["IMG","SOURCE","SCRIPT","VIDEO","LINK","IFRAME"].includes(a.nodeName)&&ile(a)}})})})});e()}var hPe;if(window.crossOriginIsolated){let e="credentialless"in window.HTMLIFrameElement.prototype,t=(0,ale.createHigherOrderComponent)(o=>function(n){if(n.name!=="core/embed")return(0,d4.jsx)(o,{...n});let i=e&&!["facebook","smugmug"].includes(n.attributes.providerNameSlug);return(0,d4.jsx)(o,{...n,attributes:{...n.attributes,previewable:i}})},"withDisabledEmbedPreview");(0,sle.addFilter)("editor.BlockEdit","media-experiments/disable-embed-previews",t)}var lle=l(rt(),1),ls=l($(),1);var f4=l(w(),1),m4=["left","center","right","wide","full"],gPe=["wide","full"];function p4(e,t=!0,o=!0){let r;return Array.isArray(e)?r=m4.filter(n=>e.includes(n)):e===!0?r=[...m4]:r=[],!o||e===!0&&!t?r.filter(n=>!gPe.includes(n)):r}function bPe(e){return"type"in(e.attributes?.align??{})||(0,ls.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...m4,""]}}),e}function kPe({name:e,align:t,setAttributes:o}){let r=p4((0,ls.getBlockSupport)(e,"align"),(0,ls.hasBlockSupport)(e,"alignWide",!0)),n=jv(r).map(({name:a})=>a),i=Mo();return!n.length||i!=="default"?null:(0,f4.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,f4.jsx)(nC,{value:t,onChange:a=>{a||(0,ls.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var v2={shareWithChildBlocks:!0,edit:kPe,useBlockProps:vPe,addSaveProps:yPe,attributeKeys:["align"],hasSupport(e){return(0,ls.hasBlockSupport)(e,"align",!1)}};function vPe({name:e,align:t}){let o=p4((0,ls.getBlockSupport)(e,"align"),(0,ls.hasBlockSupport)(e,"alignWide",!0));return jv(o).some(n=>n.name===t)?{"data-align":t}:{}}function yPe(e,t,o){let{align:r}=o,n=(0,ls.getBlockSupport)(t,"align"),i=(0,ls.hasBlockSupport)(t,"alignWide",!0);return p4(n,i).includes(r)&&(e.className=V(`align${r}`,e.className)),e}(0,lle.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",bPe);var cle=l(rt(),1);function SPe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,cle.addFilter)("blocks.registerBlockType","core/lock/addAttribute",SPe);var v4=l(rt(),1),rk=l($(),1);var C_=l(A(),1),_2=l(N(),1),Sle=l(P(),1),_le=l(F(),1),x2=l($(),1);var In=l(A(),1),kle=l(P(),1),ok=l(N(),1),vle=l(F(),1);var b4=l($(),1),hle=l(F(),1),tk=l(A(),1),oa=l(N(),1),y2=l(P(),1),gle=l(Z(),1),ble=l(Zo(),1);var h4=l(P(),1),fle=l(Z(),1),mle=l(A(),1);var ule=l(A(),1);var Jb=l(w(),1);function _Pe({blockTypes:e,value:t,onItemChange:o}){return(0,Jb.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,Jb.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,Jb.jsx)(ule.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,Jb.jsx)(Oe,{icon:r.icon})]},r.name))})}var dle=_Pe;var ek=l(w(),1);function ple({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,fle.useInstanceId)(ple),i=(0,h4.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:h})=>h!==f.name))},[o,r]),s=(0,h4.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,ek.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,ek.jsx)(mle.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,ek.jsx)("span",{id:c,children:e})}),(0,ek.jsx)(dle,{blockTypes:t,value:a,onItemChange:i})]})}var g4=ple;var Ec=l(w(),1);function S2({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,gle.useDebounce)(ble.speak,500),[i,s]=(0,y2.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,hle.useSelect)(m=>({categories:m(b4.store).getCategories(),isMatchingSearchTerm:m(b4.store).isMatchingSearchTerm}),[]),u=e.filter(m=>!i||c(m,i)),d=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,y2.useEffect)(()=>{if(!i)return;let m=u.length,h=(0,oa.sprintf)((0,oa._n)("%d result found.","%d results found.",m),m);n(h)},[u?.length,i,n]),(0,Ec.jsxs)(tk.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,Ec.jsx)(tk.SearchControl,{label:(0,oa.__)("Search for a block"),placeholder:(0,oa.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,Ec.jsx)(tk.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,oa.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,Ec.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,oa.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,Ec.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,oa.__)("No blocks found.")}),a.map(m=>(0,Ec.jsx)(g4,{title:m.title,blockTypes:u.filter(h=>h.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,Ec.jsx)(g4,{title:(0,oa.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var ra=l(w(),1);function yle({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,kle.useState)(o),{updateBlockAttributes:s}=(0,vle.useDispatch)(_),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,ra.jsx)(In.Modal,{title:(0,ok._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,ra.jsxs)(In.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,ra.jsx)(In.__experimentalText,{children:(0,ok.__)("Select which blocks can be added inside this container.")}),(0,ra.jsx)(S2,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,ra.jsxs)(In.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ra.jsx)(In.FlexItem,{children:(0,ra.jsx)(In.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,ok.__)("Cancel")})}),(0,ra.jsx)(In.FlexItem,{children:(0,ra.jsx)(In.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,ok.__)("Apply")})})]})]})})}var up=l(w(),1);function xle({clientId:e}){let[t,o]=(0,Sle.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,_le.useSelect)(a=>{let{getBlockAttributes:c}=a(_);return{blockTypes:a(x2.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,x2.hasBlockSupport)(a,"inserter",!0)&&(!a.parent||a.parent.includes("core/post-content")));if(!i)return null;let s=n===void 0?i:i.filter(a=>n.includes(a.name));return(0,up.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,up.jsxs)(C_.BaseControl,{help:(0,_2.__)("Specify which blocks are allowed inside this container."),children:[(0,up.jsx)(C_.BaseControl.VisualLabel,{children:(0,_2.__)("Allowed Blocks")}),(0,up.jsx)(C_.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,_2.__)("Manage allowed blocks")})]}),t&&(0,up.jsx)(yle,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var k4=l(w(),1);function xPe({clientId:e}){return Mo()==="contentOnly"?null:(0,k4.jsx)(nS.Fill,{children:(0,k4.jsx)(xle,{clientId:e})})}var wle={edit:xPe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,rk.hasBlockSupport)(e,"allowedBlocks")}};function wPe(e){return e?.attributes?.allowedBlocks?.type||(0,rk.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,v4.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",wPe);function CPe(e,t,o,r){if(!(0,rk.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,rk.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,v4.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",CPe);var Cle=l(rt(),1),w2=l(A(),1),nk=l(N(),1),C2=l($(),1),Ble=l(P(),1);var Qa=l(w(),1),BPe=/[\s#]/g;function EPe(e){return"type"in(e.attributes?.anchor??{})||(0,C2.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function TPe({anchor:e,setAttributes:t}){if(Mo()!=="default")return null;let r=Ble.Platform.OS==="web";return(0,Qa.jsx)(fe,{group:"advanced",children:(0,Qa.jsx)(w2.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,nk.__)("HTML anchor"),help:(0,Qa.jsxs)(Qa.Fragment,{children:[(0,nk.__)("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,Qa.jsxs)(Qa.Fragment,{children:[" ",(0,Qa.jsx)(w2.ExternalLink,{href:(0,nk.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,nk.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,nk.__)("Add an anchor"),onChange:n=>{n=n.replace(BPe,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var y4={addSaveProps:IPe,edit:TPe,attributeKeys:["anchor"],hasSupport(e){return(0,C2.hasBlockSupport)(e,"anchor")}};function IPe(e,t,o){return(0,C2.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Cle.addFilter)("blocks.registerBlockType","core/anchor/attribute",EPe);var Ele=l(rt(),1),B2=l($(),1);function PPe(e){return e?.attributes?.ariaLabel?.type||(0,B2.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function RPe(e,t,o){return(0,B2.hasBlockSupport)(t,"ariaLabel")&&!He(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var Tle={addSaveProps:RPe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,B2.hasBlockSupport)(e,"ariaLabel")}};(0,Ele.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",PPe);var xk=l($(),1),CR=l(A(),1),Dde=l(F(),1);var Ple=l(zr(),1),Ile={};function S4(e,t){let o=Ple.useRef(Ile);return o.current===Ile&&(o.current=e(t)),o}function _4(e,...t){let o=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>o.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${o} for the full message.`}var E2=l(zr(),1);function x4(e,t,o,r){let n=S4(Ole).current;return OPe(n,e,t,o,r)&&Ale(n,[e,t,o,r]),n.callback}function Rle(e){let t=S4(Ole).current;return APe(t,e)&&Ale(t,e),t.callback}function Ole(){return{callback:null,cleanup:null,refs:[]}}function OPe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function APe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function Ale(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 Mle=l(zr(),1);var Lle=l(zr(),1),LPe=parseInt(Lle.version,10);function Nle(e){return LPe>=e}function w4(e){if(!Mle.isValidElement(e))return null;let t=e,o=t.props;return(Nle(19)?o?.ref:t.ref)??null}function B_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Dle(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 Vle(e,t){return typeof e=="function"?e(t):e}function Fle(e,t){return typeof e=="function"?e(t):e}var T_={};function ik(e,t,o,r,n){let i={...C4(e,T_)};return t&&(i=E_(i,t)),o&&(i=E_(i,o)),r&&(i=E_(i,r)),n&&(i=E_(i,n)),i}function zle(e){if(e.length===0)return T_;if(e.length===1)return C4(e[0],T_);let t={...C4(e[0],T_)};for(let o=1;o<e.length;o+=1)t=E_(t,e[o]);return t}function E_(e,t){return jle(t)?t(e):NPe(e,t)}function NPe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=B_(e.style,r);break}case"className":{e[o]=B4(e.className,r);break}default:MPe(o,r)?e[o]=DPe(e[o],r):e[o]=r}}return e}function MPe(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 jle(e){return typeof e=="function"}function C4(e,t){return jle(e)?e(t):e??T_}function DPe(e,t){return t?e?o=>{if(FPe(o)){let n=o;VPe(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let r=t(o);return e?.(o),r}:t:e}function VPe(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function B4(e,t){return t?e?t+" "+e:t:e}function FPe(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var zPe=Object.freeze([]),Vd=Object.freeze({});var E4=l(zr(),1);function Ule(e,t,o={}){let r=t.render,n=jPe(t,o);if(o.enabled===!1)return null;let i=o.state??Vd;return UPe(e,r,n,i)}function jPe(e,t={}){let{className:o,style:r,render:n}=e,{state:i=Vd,ref:s,props:a,stateAttributesMapping:c,enabled:u=!0}=t,d=u?Vle(o,i):void 0,f=u?Fle(r,i):void 0,m=u?Dle(i,c):Vd,h=u?B_(m,Array.isArray(a)?zle(a):a)??Vd:Vd;return typeof document<"u"&&(u?Array.isArray(s)?h.ref=Rle([h.ref,w4(n),...s]):h.ref=x4(h.ref,w4(n),s):x4(null,null)),u?(d!==void 0&&(h.className=B4(h.className,d)),f!==void 0&&(h.style=B_(h.style,f)),h):Vd}function UPe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=ik(o,t.props);return n.ref=o.ref,E2.cloneElement(t,n)}if(e&&typeof e=="string")return HPe(e,o);throw new Error(_4(8))}function HPe(e,t){return e==="button"?(0,E4.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,E4.createElement)("img",{alt:"",...t,key:t.key}):E2.createElement(e,t)}function T2(e){return Ule(e.defaultTagName??"div",e,e)}var Gle=l(P(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),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);font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-sm);font-weight:var(--wpds-font-weight-regular);line-height:var(--wpds-font-line-height-xs);padding-block:var(--wpds-dimension-padding-xs);padding-inline:var(--wpds-dimension-padding-sm)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error);color:var(--wpds-color-fg-content-error)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning);color:var(--wpds-color-fg-content-warning)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution);color:var(--wpds-color-fg-content-caution)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success);color:var(--wpds-color-fg-content-success)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info);color:var(--wpds-color-fg-content-info)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak);color:var(--wpds-color-fg-content-neutral)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral);color:var(--wpds-color-fg-content-neutral-weak)}}")),document.head.appendChild(e)}var Hle={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"},T4=(0,Gle.forwardRef)(function({children:t,intent:o="none",render:r,className:n,...i},s){return T2({render:r,defaultTagName:"span",ref:s,props:ik(i,{className:V(Hle.badge,Hle[`is-${o}-intent`],n),children:t})})});var Wle=l(P(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),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 GPe={stack:"_19ce0419607e1896__stack"},Me=(0,Wle.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},c){let u={gap:o&&`var(--wpds-dimension-gap-${o})`,alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return T2({render:s,ref:c,props:ik(a,{style:u,className:GPe.stack})})});var I4=l(N(),1);var Ut="isAny",Ht="isNone",Er="isAll",Tr="isNotAll",en="between",tn="inThePast",Pn="over",Xt="is",Qt="isNot",Fd="lessThan",zd="greaterThan",jd="lessThanOrEqual",Ud="greaterThanOrEqual",Hd="before",Gd="after",Wd="beforeInc",$d="afterInc",Ja="contains",el="notContains",tl="startsWith",Kd="on",Yd="notOn";var Rht={asc:(0,I4.__)("Sort ascending"),desc:(0,I4.__)("Sort descending")};var $le=l(bO(),1),{lock:Aht,unlock:_t}=(0,$le.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews");var I_=l(P(),1),WPe=[];function Rn({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:WPe,[r,n]=(0,I_.useState)(o),[i,s]=(0,I_.useState)(!1);return(0,I_.useEffect)(()=>{if(!t){n(o);return}let a=!1;return s(!0),t().then(c=>{if(!a){let u=Array.isArray(c)&&c.length>0?c:o;n(u)}}).catch(()=>{a||n(o)}).finally(()=>{a||s(!1)}),()=>{a=!0}},[t,o]),{elements:r,isLoading:i}}var $Pe=Math.pow(10,8)*24*60*60*1e3,Mht=-$Pe,I2=6048e5,Kle=864e5;var KPe=3600;var Yle=KPe*24,Dht=Yle*7,YPe=Yle*365.2425,qPe=YPe/12,Vht=qPe*3,P4=Symbol.for("constructDateFrom");function $o(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&P4 in e?e[P4](t):e instanceof Date?new e.constructor(t):new Date(t)}function lt(e,t){return $o(t||e,e)}function P2(e,t,o){let r=lt(e,o?.in);return isNaN(t)?$o(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function R2(e,t,o){let r=lt(e,o?.in);if(isNaN(t))return $o(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=$o(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 ZPe={};function qd(){return ZPe}function Tc(e,t){let o=qd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=lt(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 dp(e,t){return Tc(e,{...t,weekStartsOn:1})}function O2(e,t){let o=lt(e,t?.in),r=o.getFullYear(),n=$o(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=dp(n),s=$o(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=dp(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function R4(e){let t=lt(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 qle(e,...t){let o=$o.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function O4(e,t){let o=lt(e,t?.in);return o.setHours(0,0,0,0),o}function Zle(e,t,o){let[r,n]=qle(o?.in,e,t),i=O4(r),s=O4(n),a=+i-R4(i),c=+s-R4(s);return Math.round((a-c)/Kle)}function Xle(e,t){let o=O2(e,t),r=$o(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),dp(r)}function Qle(e,t,o){return P2(e,t*7,o)}function Jle(e,t,o){return R2(e,t*12,o)}function ece(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function sk(e){return!(!ece(e)&&typeof e!="number"||isNaN(+lt(e)))}function tce(e,t){let o=lt(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function A2(e,t){let o=lt(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var XPe={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"}},oce=(e,t,o)=>{let r,n=XPe[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 L2(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var QPe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},JPe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},e2e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},rce={date:L2({formats:QPe,defaultWidth:"full"}),time:L2({formats:JPe,defaultWidth:"full"}),dateTime:L2({formats:e2e,defaultWidth:"full"})};var t2e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nce=(e,t,o,r)=>t2e[e];function ak(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 o2e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},r2e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},n2e={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"]},i2e={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"]},s2e={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"}},a2e={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"}},l2e=(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"},ice={ordinalNumber:l2e,era:ak({values:o2e,defaultWidth:"wide"}),quarter:ak({values:r2e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ak({values:n2e,defaultWidth:"wide"}),day:ak({values:i2e,defaultWidth:"wide"}),dayPeriod:ak({values:s2e,defaultWidth:"wide",formattingValues:a2e,defaultFormattingWidth:"wide"})};function lk(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)?u2e(a,f=>f.test(s)):c2e(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 c2e(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function u2e(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function sce(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 d2e=/^(\d+)(th|st|nd|rd)?/i,f2e=/\d+/i,m2e={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},p2e={any:[/^b/i,/^(a|c)/i]},h2e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},g2e={any:[/1/i,/2/i,/3/i,/4/i]},b2e={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},k2e={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]},v2e={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},y2e={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]},S2e={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},_2e={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}},ace={ordinalNumber:sce({matchPattern:d2e,parsePattern:f2e,valueCallback:e=>parseInt(e,10)}),era:lk({matchPatterns:m2e,defaultMatchWidth:"wide",parsePatterns:p2e,defaultParseWidth:"any"}),quarter:lk({matchPatterns:h2e,defaultMatchWidth:"wide",parsePatterns:g2e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:lk({matchPatterns:b2e,defaultMatchWidth:"wide",parsePatterns:k2e,defaultParseWidth:"any"}),day:lk({matchPatterns:v2e,defaultMatchWidth:"wide",parsePatterns:y2e,defaultParseWidth:"any"}),dayPeriod:lk({matchPatterns:S2e,defaultMatchWidth:"any",parsePatterns:_2e,defaultParseWidth:"any"})};var A4={code:"en-US",formatDistance:oce,formatLong:rce,formatRelative:nce,localize:ice,match:ace,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lce(e,t){let o=lt(e,t?.in);return Zle(o,A2(o))+1}function cce(e,t){let o=lt(e,t?.in),r=+dp(o)-+Xle(o);return Math.round(r/I2)+1}function N2(e,t){let o=lt(e,t?.in),r=o.getFullYear(),n=qd(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=$o(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=Tc(s,t),c=$o(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=Tc(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function uce(e,t){let o=qd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=N2(e,t),i=$o(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),Tc(i,t)}function dce(e,t){let o=lt(e,t?.in),r=+Tc(o,t)-+uce(o,t);return Math.round(r/I2)+1}function Ke(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var Ic={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return Ke(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):Ke(o+1,2)},d(e,t){return Ke(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 Ke(e.getHours()%12||12,t.length)},H(e,t){return Ke(e.getHours(),t.length)},m(e,t){return Ke(e.getMinutes(),t.length)},s(e,t){return Ke(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return Ke(n,t.length)}};var ck={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},L4={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 Ic.y(e,t)},Y:function(e,t,o,r){let n=N2(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return Ke(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):Ke(i,t.length)},R:function(e,t){let o=O2(e);return Ke(o,t.length)},u:function(e,t){let o=e.getFullYear();return Ke(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 Ke(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 Ke(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 Ic.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 Ke(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=dce(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):Ke(n,t.length)},I:function(e,t,o){let r=cce(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):Ke(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):Ic.d(e,t)},D:function(e,t,o){let r=lce(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):Ke(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 Ke(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 Ke(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 Ke(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=ck.noon:r===0?n=ck.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=ck.evening:r>=12?n=ck.afternoon:r>=4?n=ck.morning:n=ck.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 Ic.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):Ic.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):Ke(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):Ke(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ic.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):Ic.s(e,t)},S:function(e,t){return Ic.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return mce(r);case"XXXX":case"XX":return fp(r);default:return fp(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return mce(r);case"xxxx":case"xx":return fp(r);default:return fp(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+fce(r,":");default:return"GMT"+fp(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+fce(r,":");default:return"GMT"+fp(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return Ke(r,t.length)},T:function(e,t,o){return Ke(+e,t.length)}};function fce(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+Ke(i,2)}function mce(e,t){return e%60===0?(e>0?"-":"+")+Ke(Math.abs(e)/60,2):fp(e,t)}function fp(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Ke(Math.trunc(r/60),2),i=Ke(r%60,2);return o+n+t+i}var pce=(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"})}},hce=(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"})}},x2e=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return pce(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}}",pce(r,t)).replace("{{time}}",hce(n,t))},gce={p:hce,P:x2e};var w2e=/^D+$/,C2e=/^Y+$/,B2e=["D","DD","YY","YYYY"];function bce(e){return w2e.test(e)}function kce(e){return C2e.test(e)}function vce(e,t,o){let r=E2e(e,t,o);if(console.warn(r),B2e.includes(e))throw new RangeError(r)}function E2e(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 T2e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,I2e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,P2e=/^'([^]*?)'?$/,R2e=/''/g,O2e=/[a-zA-Z]/;function P_(e,t,o){let r=qd(),n=o?.locale??r.locale??A4,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=lt(e,o?.in);if(!sk(a))throw new RangeError("Invalid time value");let c=t.match(I2e).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=gce[f];return m(d,n.formatLong)}return d}).join("").match(T2e).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:A2e(d)};if(L4[f])return{isToken:!0,value:d};if(f.match(O2e))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&&kce(f)||!o?.useAdditionalDayOfYearTokens&&bce(f))&&vce(f,t,String(e));let m=L4[f[0]];return m(a,f,n.localize,u)}).join("")}function A2e(e){let t=e.match(P2e);return t?t[1].replace(R2e,"'"):e}function mp(e,t,o){return P2(e,-t,o)}function M2(e,t,o){return R2(e,-t,o)}function yce(e,t,o){return Qle(e,-t,o)}function D2(e,t,o){return Jle(e,-t,o)}var de=l(N(),1),ao=l(P(),1),on=l(hc(),1);var N4=l(w(),1),xo={Name:(0,N4.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,N4.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Sce(e,t){switch(t){case"days":return mp(new Date,e);case"weeks":return yce(new Date,e);case"months":return M2(new Date,e);case"years":return D2(new Date,e);default:return new Date}}var _ce={label:(0,de.__)("Is none of"),filterText:(e,t)=>(0,ao.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(", ")),xo),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"},xce=[{name:Ut,label:(0,de.__)("Includes"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),xo),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:Ht,..._ce},{name:Er,label:(0,de.__)("Includes all"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),xo),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:Tr,..._ce},{name:en,label:(0,de.__)("Between (inc)"),filterText:(e,t)=>(0,ao.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]),xo),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:tn,label:(0,de.__)("In the past"),filterText:(e,t)=>(0,ao.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}`),xo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Sce(o.value,o.unit),n=(0,on.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Pn,label:(0,de.__)("Over"),filterText:(e,t)=>(0,ao.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}`),xo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Sce(o.value,o.unit);return(0,on.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:Xt,label:(0,de.__)("Is"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:Qt,label:(0,de.__)("Is not"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:Fd,label:(0,de.__)("Less than"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:zd,label:(0,de.__)("Greater than"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:jd,label:(0,de.__)("Less than or equal"),filterText:(e,t)=>(0,ao.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),xo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:Ud,label:(0,de.__)("Greater than or equal"),filterText:(e,t)=>(0,ao.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),xo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:Hd,label:(0,de.__)("Before"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o);return(0,on.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:Gd,label:(0,de.__)("After"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o);return(0,on.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:Wd,label:(0,de.__)("Before (inc)"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o);return(0,on.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:$d,label:(0,de.__)("After (inc)"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o);return(0,on.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:Ja,label:(0,de.__)("Contains"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),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:el,label:(0,de.__)("Doesn't contain"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),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:tl,label:(0,de.__)("Starts with"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),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:Kd,label:(0,de.__)("On"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o),n=(0,on.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:Yd,label:(0,de.__)("Not on"),filterText:(e,t)=>(0,ao.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),xo),filter(e,t,o){if(o===void 0)return!0;let r=(0,on.getDate)(o),n=(0,on.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],wce=e=>xce.find(t=>t.name===e),Cce=()=>xce.map(e=>e.name);var Bce=l(A(),1),Ece=l(P(),1);function ht(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 Tce=l(w(),1),{ValidatedCheckboxControl:L2e}=_t(Bce.privateApis);function Ice({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=(0,Ece.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,Tce.jsx)(L2e,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:ht(d,i),hidden:r,label:c,help:u,checked:s({item:o}),onChange:f})}var V2=l(A(),1),Pce=l(P(),1);var M4=l(w(),1),{ValidatedComboboxControl:N2e}=_t(V2.privateApis);function F2({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,Pce.useCallback)(g=>o(u({item:e,value:g??""})),[e,o,u]),{elements:h,isLoading:p}=Rn({elements:t.elements,getElements:t.getElements});return p?(0,M4.jsx)(V2.Spinner,{}):(0,M4.jsx)(N2e,{required:!!t.isValid?.required,customValidity:ht(d,n),label:i,value:f,help:s,placeholder:a,options:h,onChange:m,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var U2=l(A(),1),cs=l(P(),1),j2=l(N(),1),V4=l(hc(),1);var dk=l(A(),1),D4=l(P(),1),ol=l(N(),1);var uk=l(w(),1),M2e={[tn]:[{value:"days",label:(0,ol.__)("Days")},{value:"weeks",label:(0,ol.__)("Weeks")},{value:"months",label:(0,ol.__)("Months")},{value:"years",label:(0,ol.__)("Years")}],[Pn]:[{value:"days",label:(0,ol.__)("Days ago")},{value:"weeks",label:(0,ol.__)("Weeks ago")},{value:"months",label:(0,ol.__)("Months ago")},{value:"years",label:(0,ol.__)("Years ago")}]};function z2({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=M2e[i===tn?"inThePast":"over"],{id:a,label:c,getValue:u,setValue:d}=o,f=u({item:t}),{value:m="",unit:h=s[0].value}=f&&typeof f=="object"?f:{},p=(0,D4.useCallback)(b=>r(d({item:t,value:{value:Number(b),unit:h}})),[r,d,t,h]),g=(0,D4.useCallback)(b=>r(d({item:t,value:{value:m,unit:b}})),[r,d,t,m]);return(0,uk.jsx)(dk.BaseControl,{id:a,className:V(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,uk.jsxs)(Me,{direction:"row",gap:"sm",children:[(0,uk.jsx)(dk.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:p}),(0,uk.jsx)(dk.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,ol.__)("Unit"),value:h,options:s,onChange:g,hideLabelFromVision:!0})]})})}var Rce=l(hc(),1);function fk(e){if(!e)return null;let t=(0,Rce.getDate)(e);return t&&sk(t)?t:null}var Zd=l(w(),1),{DateCalendar:D2e,ValidatedInputControl:V2e}=_t(U2.privateApis),F2e=e=>e?typeof e=="string"?e:P_(e,"yyyy-MM-dd'T'HH:mm"):"";function z2e({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}=t,m=d({item:e}),h=typeof m=="string"?m:void 0,[p,g]=(0,cs.useState)(()=>fk(h)||new Date),b=(0,cs.useRef)(null),v=(0,cs.useRef)(void 0),k=(0,cs.useRef)(null),y=(0,cs.useCallback)(E=>o(u({item:e,value:E})),[e,o,u]);(0,cs.useEffect)(()=>()=>{v.current&&clearTimeout(v.current)},[]);let S=(0,cs.useCallback)(E=>{let L;if(E){let T=E;if(h){let R=fk(h);R&&(T=new Date(E),T.setHours(R.getHours()),T.setMinutes(R.getMinutes()))}L=T.toISOString(),y(L),v.current&&clearTimeout(v.current)}else y(void 0);k.current=b.current&&b.current.ownerDocument.activeElement,v.current=setTimeout(()=>{b.current&&(b.current.focus(),b.current.blur(),y(L),k.current&&k.current instanceof HTMLElement&&k.current.focus())},0)},[y,h]),x=(0,cs.useCallback)(E=>{if(E){let L=new Date(E);y(L.toISOString());let T=fk(L.toISOString());T&&g(T)}else y(void 0)},[y]),{format:C}=t,B=C.weekStartsOn??(0,V4.getSettings)().l10n.startOfWeek,{timezone:{string:I}}=(0,V4.getSettings)(),O=a;return f?.required&&!n&&!r?O=`${a} (${(0,j2.__)("Required")})`:!f?.required&&n&&!r&&(O=`${a} (${(0,j2.__)("Optional")})`),(0,Zd.jsx)(U2.BaseControl,{id:s,label:O,help:c,hideLabelFromVision:r,children:(0,Zd.jsxs)(Me,{direction:"column",gap:"lg",children:[(0,Zd.jsx)(D2e,{style:{width:"100%"},selected:h&&fk(h)||void 0,onSelect:S,month:p,onMonthChange:g,timeZone:I||void 0,weekStartsOn:B}),(0,Zd.jsx)(V2e,{ref:b,__next40pxDefaultSize:!0,required:!!f?.required,customValidity:ht(f,i),type:"datetime-local",label:(0,j2.__)("Date time"),hideLabelFromVision:!0,value:h?F2e(fk(h)||void 0):"",onChange:x})]})})}function Oce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===tn||i===Pn?(0,Zd.jsx)(z2,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,Zd.jsx)(z2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var Pr=l(A(),1),tt=l(P(),1),Ko=l(N(),1),Ir=l(hc(),1);var gt=l(w(),1),{DateCalendar:j2e,DateRangeCalendar:U2e}=_t(Pr.privateApis),H2e=[{id:"today",label:(0,Ko.__)("Today"),getValue:()=>(0,Ir.getDate)(null)},{id:"yesterday",label:(0,Ko.__)("Yesterday"),getValue:()=>{let e=(0,Ir.getDate)(null);return mp(e,1)}},{id:"past-week",label:(0,Ko.__)("Past week"),getValue:()=>{let e=(0,Ir.getDate)(null);return mp(e,7)}},{id:"past-month",label:(0,Ko.__)("Past month"),getValue:()=>{let e=(0,Ir.getDate)(null);return M2(e,1)}}],G2e=[{id:"last-7-days",label:(0,Ko.__)("Last 7 days"),getValue:()=>{let e=(0,Ir.getDate)(null);return[mp(e,7),e]}},{id:"last-30-days",label:(0,Ko.__)("Last 30 days"),getValue:()=>{let e=(0,Ir.getDate)(null);return[mp(e,30),e]}},{id:"month-to-date",label:(0,Ko.__)("Month to date"),getValue:()=>{let e=(0,Ir.getDate)(null);return[tce(e),e]}},{id:"last-year",label:(0,Ko.__)("Last year"),getValue:()=>{let e=(0,Ir.getDate)(null);return[D2(e,1),e]}},{id:"year-to-date",label:(0,Ko.__)("Year to date"),getValue:()=>{let e=(0,Ir.getDate)(null);return[A2(e),e]}}],mk=e=>{if(!e)return null;let t=(0,Ir.getDate)(e);return t&&sk(t)?t:null},F4=e=>e?typeof e=="string"?e:P_(e,"yyyy-MM-dd"):"";function Ace({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,tt.useState)(void 0),u=(0,tt.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,tt.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=t?ht(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,tt.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,tt.useEffect)(()=>{if(!r)return;let f=t?ht(s,t):void 0;f?c(f):u()},[r,s,t,u]),(0,gt.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,gt.jsx)("div",{"aria-live":"polite",children:a&&(0,gt.jsxs)("p",{className:V("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,gt.jsx)(Pr.Icon,{className:"components-validated-control__indicator-icon",icon:Ef,size:16,fill:"currentColor"}),a.message]})})]})}function W2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,setValue:c,getValue:u,isValid:d,format:f}=t,[m,h]=(0,tt.useState)(null),p=f.weekStartsOn??(0,Ir.getSettings)().l10n.startOfWeek,g=u({item:e}),b=typeof g=="string"?g:void 0,[v,k]=(0,tt.useState)(()=>mk(b)||new Date),[y,S]=(0,tt.useState)(!1),x=(0,tt.useRef)(null),C=(0,tt.useCallback)(T=>o(c({item:e,value:T})),[e,o,c]),B=(0,tt.useCallback)(T=>{let R=T?P_(T,"yyyy-MM-dd"):void 0;C(R),h(null),S(!0)},[C]),I=(0,tt.useCallback)(T=>{let R=T.getValue(),D=F4(R);k(R),C(D),h(T.id),S(!0)},[C]),O=(0,tt.useCallback)(T=>{if(C(T),T){let R=mk(T);R&&k(R)}h(null),S(!0)},[C]),{timezone:{string:E}}=(0,Ir.getSettings)(),L=a;return d?.required&&!n?L=`${a} (${(0,Ko.__)("Required")})`:!d?.required&&n&&(L=`${a} (${(0,Ko.__)("Optional")})`),(0,gt.jsx)(Ace,{field:t,validity:i,inputRefs:x,isTouched:y,setIsTouched:S,children:(0,gt.jsx)(Pr.BaseControl,{id:s,className:"dataviews-controls__date",label:L,hideLabelFromVision:r,children:(0,gt.jsxs)(Me,{direction:"column",gap:"lg",children:[(0,gt.jsxs)(Me,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[H2e.map(T=>{let R=m===T.id;return(0,gt.jsx)(Pr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:R,size:"small",onClick:()=>I(T),children:T.label},T.id)}),(0,gt.jsx)(Pr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!m,size:"small",disabled:!!m,accessibleWhenDisabled:!1,children:(0,Ko.__)("Custom")})]}),(0,gt.jsx)(Pr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:x,type:"date",label:(0,Ko.__)("Date"),hideLabelFromVision:!0,value:b,onChange:O,required:!!t.isValid?.required}),(0,gt.jsx)(j2e,{style:{width:"100%"},selected:b&&mk(b)||void 0,onSelect:B,month:v,onMonthChange:k,timeZone:E||void 0,weekStartsOn:p})]})})})}function $2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,getValue:c,setValue:u,format:d}=t,f,m=c({item:e});Array.isArray(m)&&m.length===2&&m.every(D=>typeof D=="string")&&(f=m);let h=d.weekStartsOn??(0,Ir.getSettings)().l10n.startOfWeek,p=(0,tt.useCallback)(D=>{o(u({item:e,value:D}))},[e,o,u]),[g,b]=(0,tt.useState)(null),v=(0,tt.useMemo)(()=>{if(!f)return{from:void 0,to:void 0};let[D,j]=f;return{from:mk(D)||void 0,to:mk(j)||void 0}},[f]),[k,y]=(0,tt.useState)(()=>v.from||new Date),[S,x]=(0,tt.useState)(!1),C=(0,tt.useRef)(null),B=(0,tt.useRef)(null),I=(0,tt.useCallback)((D,j)=>{D&&j?p([F4(D),F4(j)]):!D&&!j&&p(void 0)},[p]),O=(0,tt.useCallback)(D=>{I(D?.from,D?.to),b(null),x(!0)},[I]),E=(0,tt.useCallback)(D=>{let[j,G]=D.getValue();y(j),I(j,G),b(D.id),x(!0)},[I]),L=(0,tt.useCallback)((D,j)=>{let[G,z]=f||[void 0,void 0];if(I(D==="from"?j:G,D==="to"?j:z),j){let te=mk(j);te&&y(te)}b(null),x(!0)},[f,I]),{timezone:T}=(0,Ir.getSettings)(),R=a;return t.isValid?.required&&!n?R=`${a} (${(0,Ko.__)("Required")})`:!t.isValid?.required&&n&&(R=`${a} (${(0,Ko.__)("Optional")})`),(0,gt.jsx)(Ace,{field:t,validity:i,inputRefs:[C,B],isTouched:S,setIsTouched:x,children:(0,gt.jsx)(Pr.BaseControl,{id:s,className:"dataviews-controls__date",label:R,hideLabelFromVision:r,children:(0,gt.jsxs)(Me,{direction:"column",gap:"lg",children:[(0,gt.jsxs)(Me,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[G2e.map(D=>{let j=g===D.id;return(0,gt.jsx)(Pr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:j,size:"small",onClick:()=>E(D),children:D.label},D.id)}),(0,gt.jsx)(Pr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",accessibleWhenDisabled:!1,disabled:!!g,children:(0,Ko.__)("Custom")})]}),(0,gt.jsxs)(Me,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,gt.jsx)(Pr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:C,type:"date",label:(0,Ko.__)("From"),hideLabelFromVision:!0,value:f?.[0],onChange:D=>L("from",D),required:!!t.isValid?.required}),(0,gt.jsx)(Pr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:B,type:"date",label:(0,Ko.__)("To"),hideLabelFromVision:!0,value:f?.[1],onChange:D=>L("to",D),required:!!t.isValid?.required})]}),(0,gt.jsx)(U2e,{style:{width:"100%"},selected:v,onSelect:O,month:k,onMonthChange:y,timeZone:T.string||void 0,weekStartsOn:h})]})})})}function Lce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===tn||i===Pn?(0,gt.jsx)(z2,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===en?(0,gt.jsx)($2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,gt.jsx)(W2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var H2=l(A(),1),Nce=l(P(),1);var z4=l(w(),1),{ValidatedSelectControl:K2e}=_t(H2.privateApis);function G2({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=s==="array",h=u({item:e})??(m?[]:""),p=(0,Nce.useCallback)(v=>o(d({item:e,value:v})),[e,o,d]),{elements:g,isLoading:b}=Rn({elements:t.elements,getElements:t.getElements});return b?(0,z4.jsx)(H2.Spinner,{}):(0,z4.jsx)(K2e,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ht(f,i),label:a,value:h,help:c,options:g,onChange:p,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:m})}var j4=l(w(),1),Y2e=10;function Mce(e){let{field:t}=e,{elements:o}=Rn({elements:t.elements,getElements:t.getElements});return o.length>=Y2e?(0,j4.jsx)(F2,{...e}):(0,j4.jsx)(G2,{...e})}var $2=l(A(),1);var Dce=l(A(),1),Vce=l(P(),1);var Fce=l(w(),1),{ValidatedInputControl:q2e}=_t(Dce.privateApis);function rl({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=(0,Vce.useCallback)(v=>o(h({item:e,value:v})),[e,h,o]);return(0,Fce.jsx)(q2e,{required:!!p.required,markWhenOptional:n,customValidity:ht(p,c),label:u,placeholder:d,value:g??"",help:f,onChange:b,hideLabelFromVision:r,type:i,prefix:s,suffix:a,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 W2=l(w(),1);function zce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,W2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,W2.jsx)($2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,W2.jsx)($2.Icon,{icon:uA})})})}var Y2=l(A(),1);var K2=l(w(),1);function jce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,K2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,K2.jsx)(Y2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,K2.jsx)(Y2.Icon,{icon:av})})})}var Z2=l(A(),1);var q2=l(w(),1);function Uce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,q2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,q2.jsx)(Z2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,q2.jsx)(Z2.Icon,{icon:dn})})})}var Pc=l(A(),1),R_=l(P(),1),X2=l(N(),1);var Xd=l(w(),1),{ValidatedNumberControl:Z2e}=_t(Pc.privateApis);function Hce(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function X2e({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,R_.useCallback)(c=>t([Hce(c),i]),[t,i]),a=(0,R_.useCallback)(c=>t([n,Hce(c)]),[t,n]);return(0,Xd.jsx)(Pc.BaseControl,{help:(0,X2.__)("The max. value must be greater than the min. value."),children:(0,Xd.jsxs)(Pc.Flex,{direction:"row",gap:4,children:[(0,Xd.jsx)(Pc.__experimentalNumberControl,{label:(0,X2.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,Xd.jsx)(Pc.__experimentalNumberControl,{label:(0,X2.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function Q2({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=(0,R_.useCallback)(v=>{o(m({item:e,value:["",void 0].includes(v)?void 0:Number(v)}))},[e,o,m]),b=(0,R_.useCallback)(v=>{o(m({item:e,value:v}))},[e,o,m]);if(i===en){let v=["",""];return Array.isArray(p)&&p.length===2&&p.every(k=>typeof k=="number"||k==="")&&(v=p),(0,Xd.jsx)(X2e,{value:v,onChange:b,hideLabelFromVision:r,step:c})}return(0,Xd.jsx)(Z2e,{required:!!h.required,markWhenOptional:n,customValidity:ht(h,s),label:u,help:d,value:p,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0})}var Gce=l(w(),1);function Wce(e){return(0,Gce.jsx)(Q2,{...e})}var $ce=l(w(),1);function Kce(e){return(0,$ce.jsx)(Q2,{...e})}var J2=l(A(),1),Yce=l(P(),1);var U4=l(w(),1),{ValidatedRadioControl:Q2e}=_t(J2.privateApis);function qce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=t,{elements:f,isLoading:m}=Rn({elements:t.elements,getElements:t.getElements}),h=c({item:e}),p=(0,Yce.useCallback)(g=>o(u({item:e,value:g})),[e,o,u]);return m?(0,U4.jsx)(J2.Spinner,{}):(0,U4.jsx)(Q2e,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ht(d,i),label:s,help:a,onChange:p,options:f,selected:h,hideLabelFromVision:r})}var H4=l(P(),1);var Zce=l(w(),1);function Xce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:c}=i||{};return(0,Zce.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,H4.createElement)(a):void 0,suffix:c?(0,H4.createElement)(c):void 0})}var Qce=l(A(),1),Jce=l(P(),1);var eue=l(w(),1),{ValidatedToggleControl:J2e}=_t(Qce.privateApis);function tue({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=(0,Jce.useCallback)(()=>{t(u({item:o,value:!c({item:o})}))},[t,u,o,c]);return(0,eue.jsx)(J2e,{required:!!d.required,markWhenOptional:n,customValidity:ht(d,i),hidden:r,label:s,help:a,checked:c({item:o}),onChange:f})}var oue=l(A(),1),rue=l(P(),1);var nue=l(w(),1),{ValidatedTextareaControl:eRe}=_t(oue.privateApis);function iue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},{label:c,placeholder:u,description:d,setValue:f,isValid:m}=t,h=t.getValue({item:e}),p=(0,rue.useCallback)(g=>o(f({item:e,value:g})),[e,o,f]);return(0,nue.jsx)(eRe,{required:!!m.required,markWhenOptional:n,customValidity:ht(m,s),label:c,placeholder:u,value:h??"",help:d,onChange:p,rows:a,minLength:m.minLength?m.minLength.constraint:void 0,maxLength:m.maxLength?m.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var pk=l(A(),1),sue=l(P(),1);var eR=l(w(),1),{ValidatedToggleGroupControl:tRe}=_t(pk.privateApis);function aue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:c}=t,u=s({item:e}),d=(0,sue.useCallback)(p=>o(a({item:e,value:p})),[e,o,a]),{elements:f,isLoading:m}=Rn({elements:t.elements,getElements:t.getElements});if(m)return(0,eR.jsx)(pk.Spinner,{});if(f.length===0)return null;let h=f.find(p=>p.value===u);return(0,eR.jsx)(tRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ht(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:h?.description||t.description,onChange:d,value:u,hideLabelFromVision:r,children:f.map(p=>(0,eR.jsx)(pk.__experimentalToggleGroupControlOption,{label:p.label,value:p.value},p.value))})}var tR=l(A(),1),oR=l(P(),1);var O_=l(w(),1),{ValidatedFormTokenField:oRe}=_t(tR.privateApis);function lue({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}),{elements:m,isLoading:h}=Rn({elements:t.elements,getElements:t.getElements}),p=(0,oR.useMemo)(()=>Array.isArray(f)?f.map(b=>m?.find(k=>k.value===b)||{value:b,label:b}):[],[f,m]),g=(0,oR.useCallback)(b=>{let v=b.map(k=>typeof k=="object"&&"value"in k?k.value:k);o(u({item:e,value:v}))},[o,u,e]);return h?(0,O_.jsx)(tR.Spinner,{}):(0,O_.jsx)(oRe,{required:!!d?.required,markWhenOptional:n,customValidity:ht(d,i),label:r?void 0:s,value:p,onChange:g,placeholder:a,suggestions:m?.map(b=>b.value),__experimentalValidateInput:b=>t.isValid?.elements&&m?m.some(v=>v.value===b||v.label===b):!0,__experimentalExpandOnFocus:m&&m.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:b=>typeof b=="object"&&"label"in b?b.label:typeof b=="string"&&m&&m.find(k=>k.value===b)?.label||b,__experimentalRenderItem:({item:b})=>{if(typeof b=="string"&&m){let v=m.find(k=>k.value===b);return(0,O_.jsx)("span",{children:v?.label||b})}return(0,O_.jsx)("span",{children:b})}})}var On=l(A(),1),G4=l(P(),1),cue=l(N(),1);var Rc=l(w(),1),{ValidatedInputControl:rRe}=_t(On.privateApis),nRe=({color:e,onColorChange:t})=>{let o=e&&Bt(e).isValid()?e:"#ffffff";return(0,Rc.jsx)(On.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:r})=>(0,Rc.jsx)(On.Button,{onClick:r,"aria-label":(0,cue.__)("Open color picker"),size:"small",icon:()=>(0,Rc.jsx)(On.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,Rc.jsx)(On.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Rc.jsx)(On.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function uue({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.getValue({item:e})||"",m=(0,G4.useCallback)(p=>{o(u({item:e,value:p}))},[e,o,u]),h=(0,G4.useCallback)(p=>{o(u({item:e,value:p||""}))},[e,o,u]);return(0,Rc.jsx)(rRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ht(d,i),label:s,placeholder:a,value:f,help:c,onChange:h,hideLabelFromVision:r,type:"text",prefix:(0,Rc.jsx)(On.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Rc.jsx)(nRe,{color:f,onColorChange:m})})})}var nR=l(A(),1),iR=l(P(),1),W4=l(N(),1);var rR=l(w(),1);function due({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,iR.useState)(!1),c=(0,iR.useCallback)(()=>{a(u=>!u)},[]);return(0,rR.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,rR.jsx)(nR.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,rR.jsx)(nR.Button,{icon:s?vs:Pf,onClick:c,size:"small",label:s?(0,W4.__)("Hide password"):(0,W4.__)("Show password")})})})}function sR(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var mue=l(w(),1),fue={adaptiveSelect:Mce,array:lue,checkbox:Ice,color:uue,combobox:F2,datetime:Oce,date:Lce,email:zce,telephone:jce,url:Uce,integer:Wce,number:Kce,password:due,radio:qce,select:G2,text:Xce,toggle:tue,textarea:iue,toggleGroup:aue};function iRe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function sRe(e){let{control:t,...o}=e,r=aR(t);return r===null?null:function(i){return(0,mue.jsx)(r,{...i,config:o})}}function pue(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?aR(e.Edit):iRe(e.Edit)?sRe(e.Edit):sR(e)&&e.type!=="array"?aR("adaptiveSelect"):t===null?null:aR(t)}function aR(e){return Object.keys(fue).includes(e)?fue[e]:null}function aRe(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 hue=aRe;var lRe=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},gue=lRe;var cRe=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},bue=cRe;var vue=l(N(),1);function lR({item:e,field:t}){let{elements:o,isLoading:r}=Rn({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 kue=l(w(),1);function lo({item:e,field:t}){return t.hasElements?(0,kue.jsx)(lR,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var nl=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function co(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function il(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 sl(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 al(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 xt(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 uRe({item:e,field:t}){return t.getValue({item:e})}var rn=uRe;var dRe=/^[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 fRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!dRe.test(o)?(0,vue.__)("Value must be a valid email address."):null}var yue={type:"email",render:lo,Edit:"email",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ja,el,tl,Ut,Ht,Er,Tr],format:{},getValueFormatted:rn,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt,custom:fRe}};var Sue=l(N(),1);var hk=(e,t,o)=>o==="asc"?e-t:t-e;function cR(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 uR(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 _ue={separatorThousand:","};function mRe({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=_ue: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 pRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,Sue.__)("Value must be an integer."):null}var xue={type:"integer",render:lo,Edit:"integer",sort:hk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xt,Qt,Fd,zd,jd,Ud,en],validOperators:[Xt,Qt,Fd,zd,jd,Ud,en,Ut,Ht,Er,Tr],format:_ue,getValueFormatted:mRe,validate:{required:co,min:cR,max:uR,elements:xt,custom:pRe}};var wue=l(N(),1);var Cue={separatorThousand:",",separatorDecimal:".",decimals:2};function hRe({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=Cue: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 gRe(e){return e===""||e===void 0||e===null}function bRe(e,t){let o=t.getValue({item:e});return!gRe(o)&&!Number.isFinite(o)?(0,wue.__)("Value must be a number."):null}var Bue={type:"number",render:lo,Edit:"number",sort:hk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xt,Qt,Fd,zd,jd,Ud,en],validOperators:[Xt,Qt,Fd,zd,jd,Ud,en,Ut,Ht,Er,Tr],format:Cue,getValueFormatted:hRe,validate:{required:co,min:cR,max:uR,elements:xt,custom:bRe}};var Eue={type:"text",render:lo,Edit:"text",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ja,el,tl,Ut,Ht,Er,Tr],format:{},getValueFormatted:rn,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt}};var pp=l(hc(),1);var Tue={datetime:(0,pp.getSettings)().formats.datetime,weekStartsOn:(0,pp.getSettings)().l10n.startOfWeek};function kRe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=Tue:r=t.format,(0,pp.dateI18n)(r.datetime,(0,pp.getDate)(o))}var vRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Iue={type:"datetime",render:lo,Edit:"datetime",sort:vRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Kd,Yd,Hd,Gd,Wd,$d,tn,Pn],validOperators:[Kd,Yd,Hd,Gd,Wd,$d,tn,Pn],format:Tue,getValueFormatted:kRe,validate:{required:co,elements:xt}};var hp=l(hc(),1);var Pue={date:(0,hp.getSettings)().formats.date,weekStartsOn:(0,hp.getSettings)().l10n.startOfWeek};function yRe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=Pue:r=t.format,(0,hp.dateI18n)(r.date,(0,hp.getDate)(o))}var SRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Rue={type:"date",render:lo,Edit:"date",sort:SRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Kd,Yd,Hd,Gd,Wd,$d,tn,Pn,en],validOperators:[Kd,Yd,Hd,Gd,Wd,$d,tn,Pn,en],format:Pue,getValueFormatted:yRe,validate:{required:co,elements:xt}};var dR=l(N(),1);function Oue(e,t){return t.getValue({item:e})===!0}function _Re({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,dR.__)("True"):o===!1?(0,dR.__)("False"):""}function xRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,dR.__)("Value must be true, false, or undefined"):null}var wRe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},Aue={type:"boolean",render:lo,Edit:"checkbox",sort:wRe,validate:{required:Oue,elements:xt,custom:xRe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xt,Qt],validOperators:[Xt,Qt],format:{},getValueFormatted:_Re};var Lue={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:rn,validate:{}};var $4=l(N(),1);function Nue(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function Mue({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function CRe({item:e,field:t}){return Mue({item:e,field:t})}function BRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,$4.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,$4.__)("Every value must be a string.")}var ERe=(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)},Due={type:"array",render:CRe,Edit:"array",sort:ERe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Ut,Ht,Er,Tr],format:{},getValueFormatted:Mue,validate:{required:Nue,elements:xt,custom:BRe}};function TRe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Vue={type:"password",render:lo,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:TRe,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt}};var Fue={type:"telephone",render:lo,Edit:"telephone",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ja,el,tl,Ut,Ht,Er,Tr],format:{},getValueFormatted:rn,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt}};var zue=l(N(),1);var gk=l(w(),1);function IRe({item:e,field:t}){if(t.hasElements)return(0,gk.jsx)(lR,{item:e,field:t});let o=rn({item:e,field:t});return!o||!Bt(o).isValid()?o:(0,gk.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,gk.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,gk.jsx)("span",{children:o})]})}function PRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Bt(o).isValid()?(0,zue.__)("Value must be a valid color."):null}var RRe=(e,t,o)=>{let r=Bt(e),n=Bt(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},jue={type:"color",render:IRe,Edit:"color",sort:RRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ut,Ht],format:{},getValueFormatted:rn,validate:{required:co,elements:xt,custom:PRe}};var Uue={type:"url",render:lo,Edit:"url",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Xt,Qt,Ja,el,tl,Ut,Ht,Er,Tr],format:{},getValueFormatted:rn,validate:{required:co,pattern:al,minLength:il,maxLength:sl,elements:xt}};var ORe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?hk(e,t,o):nl(e,t,o),Hue={render:lo,Edit:null,sort:ORe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xt,Qt],validOperators:Cce(),format:{},getValueFormatted:rn,validate:{required:co,elements:xt}};function Gue(e,t){let o;e.isValid?.required===!0&&t.validate.required!==void 0&&(o={constraint:!0,validate:t.validate.required});let r;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(r={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let s;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(s={constraint:e.isValid.minLength,validate:t.validate.minLength});let a;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(a={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:o,elements:r,min:n,max:i,minLength:s,maxLength:a,pattern:c,custom:u}}function Wue(e){return e.validOperators.reduce((t,o)=>{let r=wce(o);return r?.filter&&(t[o]=r.filter),t},{})}function ARe(e,t){return{...t.format,...e.format}}var $ue=ARe;function LRe(e){let t=[yue,xue,Bue,Eue,Iue,Rue,Aue,Lue,Due,Vue,Fue,jue,Uue].find(o=>o?.type===e);return t||Hue}function A_(e){return e.map(t=>{let o=LRe(t.type),r=t.getValue||gue(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||bue(t.id),elements:t.elements,getElements:t.getElements,hasElements:sR(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:pue(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:Gue(t,o),filterBy:hue(t,o.defaultOperators,o.validOperators),filter:Wue(o),format:$ue(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var ez=l(P(),1);var Kue=l(P(),1),Yue=l(w(),1),K4=(0,Kue.createContext)({fields:[]});K4.displayName="DataFormContext";function que({fields:e,children:t}){return(0,Yue.jsx)(K4.Provider,{value:{fields:e},children:t})}var us=K4;var yR=l(P(),1);var mR=l(P(),1),L_=l(A(),1);var Rr={type:"regular",labelPosition:"top"},NRe=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 Zue(e){let t=Rr;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let o=e.summary??[],r=Array.isArray(o)?o:[o];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:r,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:NRe(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 Xue(e){let t=Zue(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?Zue(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:Xue({fields:r.children,layout:Rr}).fields}}});return{layout:t,fields:o}}var fR=Xue;var Gt=l(w(),1);function MRe({title:e}){return(0,Gt.jsx)(Me,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Gt.jsx)(Me,{direction:"row",align:"center",children:(0,Gt.jsx)(L_.__experimentalHeading,{level:2,size:13,children:e})})})}function Que({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,mR.useContext)(us),a=t.layout,c=(0,mR.useMemo)(()=>({layout:Rr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Gt.jsxs)(Gt.Fragment,{children:[!r&&t.label&&(0,Gt.jsx)(MRe,{title:t.label}),(0,Gt.jsx)(An,{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,Gt.jsxs)(Me,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Gt.jsx)("div",{className:V("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,Gt.jsx)(L_.BaseControl.VisualLabel,{children:d.label})}),(0,Gt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,Gt.jsx)(d.render,{item:e,field:d}):(0,Gt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,Gt.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[!r&&u!=="none"&&(0,Gt.jsx)(L_.BaseControl.VisualLabel,{children:d.label}),(0,Gt.jsx)(d.render,{item:e,field:d})]})}):(0,Gt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var q4=l(IV(),1),kp=l(A(),1),Z4=l(N(),1),na=l(P(),1),gR=l(Z(),1);var kk=l(A(),1),bk=l(N(),1);var rde=l(Z(),1),nde=l(P(),1);function DRe(e,t){return V("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var Jue=DRe;var bp=l(A(),1);var gp=l(w(),1);function VRe(e,t,o){return e?(0,gp.jsx)(bp.Tooltip,{text:t,placement:"top",children:(0,gp.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,gp.jsx)(bp.Icon,{icon:Ef,size:16}),(0,gp.jsx)(bp.BaseControl.VisualLabel,{children:o})]})}):(0,gp.jsx)(bp.BaseControl.VisualLabel,{children:o})}var ede=VRe;function tde(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=tde(o);if(r)return r}}var ode=tde;var mi=l(w(),1);function N_({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=ode(n),m=i&&!!f,h=Jue(u,m),p=ede(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,rde.useInstanceId)(N_,"dataforms-layouts-panel__field-control"),v=m?(0,bk.sprintf)((0,bk._x)("Edit %s (has errors)","field"),o||""):(0,bk.sprintf)((0,bk._x)("Edit %s","field"),o||""),k=(0,nde.useRef)(null);return(0,mi.jsxs)("div",{ref:k,className:g,onClick:s?void 0:()=>{let x=k.current?.ownerDocument.defaultView?.getSelection();x&&x.toString().length>0||a()},onKeyDown:s?void 0:x=>{x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),a())},children:[u!=="none"&&(0,mi.jsx)("span",{className:h,children:p}),u==="none"&&m&&(0,mi.jsx)(kk.Tooltip,{text:f,placement:"top",children:(0,mi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,mi.jsx)(kk.Icon,{icon:Ef,size:16})})}),(0,mi.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,mi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(x=>(0,mi.jsx)("span",{style:{width:"100%"},children:(0,mi.jsx)(x.render,{item:e,field:x})},x.id))}):r.map(x=>(0,mi.jsx)(x.render,{item:e,field:x},x.id))}),!s&&(0,mi.jsx)(kk.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:v,showTooltip:!1,icon:If,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var ide=l(IV(),1),Y4=l(bf(),1),ll=l(P(),1),nn=l(N(),1);function sde(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?sde(r):r.type!=="invalid"&&r.type!=="validating")):!0}function FRe(e,t){let o=fR(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]=A_([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]=A_([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function vk(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 ade(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 zRe(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=>vk(u,{elements:{type:"invalid",message:(0,nn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>vk(u,{elements:{type:"invalid",message:(0,nn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>ade(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,nn.__)("Unknown error when running elements validation asynchronously."),n(d=>vk(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function jRe(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=>ade(c,[...i,t.id],"custom"));return}if(typeof a=="string"){n(c=>vk(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>vk(c,{custom:{type:"invalid",message:(0,nn.__)("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,nn.__)("Unknown error when running custom validation asynchronously."),n(u=>vk(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function lde(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,nn.__)("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,nn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,nn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,nn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,nn.__)("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,nn.__)("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,ide.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,nn.__)("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"&&(zRe(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,nn.__)("Validating\u2026")}),r instanceof Promise&&(jRe(r,t,o),n.custom={type:"validating",message:(0,nn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=lde(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 cde(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>cde(n,t));return r?{value:o,children:r}:o}function URe(e,t,o){let[r,n]=(0,ll.useState)(),i=(0,ll.useRef)({}),s=(0,ll.useRef)({}),a=(0,ll.useRef)({}),c=(0,ll.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=FRe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let p=cde(h,e);if(a.current.hasOwnProperty(h.id)&&(0,Y4.default)(a.current[h.id],p)){m.push(h.id);return}a.current[h.id]=p;let g=lde(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,Y4.default)(h,p)?h:p})},[e,t,o]);return(0,ll.useEffect)(()=>{c()},[c]),{validity:r,isValid:sde(r)}}var ude=URe;var dde=l(P(),1);function Qd(e,t){(0,dde.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var fde=l(P(),1);function HRe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var pR=(e,t)=>Array.isArray(e)&&e.length>0?HRe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var GRe=(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 WRe(e){let{fields:t}=(0,fde.useContext)(us),o=e.layout,r=pR(o.summary,t),n=GRe(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 hR=WRe;var sn=l(w(),1);function $Re({data:e,field:t,onChange:o,fieldLabel:r,onClose:n,touched:i}){let{fields:s}=(0,na.useContext)(us),[a,c]=(0,na.useState)({}),u=(0,na.useMemo)(()=>(0,q4.default)(e,a,{arrayMerge:(k,y)=>y}),[e,a]),d=(0,na.useMemo)(()=>({layout:Rr,fields:t.children?t.children:[{id:t.id,layout:Rr}]}),[t]),f=s.map(k=>({...k,Edit:k.Edit===null?void 0:k.Edit,isValid:{required:k.isValid.required?.constraint,elements:k.isValid.elements?.constraint,min:k.isValid.min?.constraint,max:k.isValid.max?.constraint,pattern:k.isValid.pattern?.constraint,minLength:k.isValid.minLength?.constraint,maxLength:k.isValid.maxLength?.constraint}})),{validity:m}=ude(u,f,d),h=()=>{o(a),n()},p=k=>{c(y=>(0,q4.default)(y,k,{arrayMerge:(S,x)=>x}))},g=(0,gR.useFocusOnMount)("firstInputElement"),b=(0,na.useRef)(null),v=(0,gR.useMergeRefs)([g,b]);return Qd(b,i),(0,sn.jsxs)(kp.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,sn.jsx)("div",{ref:v,children:(0,sn.jsx)(An,{data:u,form:d,onChange:p,validity:m,children:(k,y,S,x)=>(0,sn.jsx)(k,{data:u,field:y,onChange:p,hideLabelFromVision:d.fields.length<2,markWhenOptional:x,validity:S},y.id)})}),(0,sn.jsxs)(Me,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,sn.jsx)(kp.__experimentalSpacer,{style:{flex:1}}),(0,sn.jsx)(kp.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,Z4.__)("Cancel")}),(0,sn.jsx)(kp.Button,{variant:"primary",onClick:h,__next40pxDefaultSize:!0,children:(0,Z4.__)("Apply")})]})]})}function KRe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,na.useState)(!1),[s,a]=(0,na.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=hR(t);if(!c)return null;let f=()=>{a(!1),i(!0)};return(0,sn.jsxs)(sn.Fragment,{children:[(0,sn.jsx)(N_,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:c.readOnly===!0,onClick:()=>a(!0),"aria-expanded":s}),s&&(0,sn.jsx)($Re,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var mde=KRe;var Jd=l(A(),1),pde=l(N(),1),Oc=l(P(),1);var hde=l(Z(),1);var Or=l(w(),1);function YRe({title:e,onClose:t}){return(0,Or.jsx)(Me,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Or.jsxs)(Me,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Or.jsx)(Jd.__experimentalHeading,{level:2,size:13,children:e}),(0,Or.jsx)(Jd.__experimentalSpacer,{style:{flex:1}}),t&&(0,Or.jsx)(Jd.Button,{label:(0,pde.__)("Close"),icon:Sf,onClick:t,size:"small"})]})})}function qRe({touched:e,children:t}){let o=(0,Oc.useRef)(null);return Qd(o,e),(0,Or.jsx)("div",{ref:o,children:t})}function ZRe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,Oc.useState)(!1),[s,a]=(0,Oc.useState)(null),c=(0,Oc.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,hde.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,Oc.useMemo)(()=>({layout:Rr,fields:t.children?t.children:[{id:t.id,layout:Rr}]}),[t]),m=(0,Oc.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:h,fieldLabel:p,summaryFields:g}=hR(t);return h?(0,Or.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Or.jsx)(Jd.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:v})=>(0,Or.jsx)(N_,{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,Or.jsx)(qRe,{touched:n,children:(0,Or.jsxs)("div",{ref:u,...d,children:[(0,Or.jsx)(YRe,{title:p,onClose:b}),(0,Or.jsx)(An,{data:e,form:f,onChange:o,validity:m,children:(v,k,y,S)=>(0,Or.jsx)(v,{data:e,field:k,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:S,validity:y},k.id)})]})})})}):null}var gde=ZRe;var X4=l(w(),1);function bde({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs==="modal"?(0,X4.jsx)(mde,{data:e,field:t,onChange:o,validity:r}):(0,X4.jsx)(gde,{data:e,field:t,onChange:o,validity:r})}var ef=l(A(),1),yde=l(Z(),1),Ln=l(P(),1),Q4=l(N(),1);var bR=l(N(),1),kde=l(w(),1);function vde(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+=vde(r);return t}function kR({validity:e}){let t=vde(e);return t===0?null:(0,kde.jsx)(T4,{intent:"high",children:(0,bR.sprintf)((0,bR._n)("%d field needs attention","%d fields need attention",t),t)})}var kr=l(w(),1);function XRe(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 J4({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,Ln.useContext)(us),a=t.layout,c=(0,Ln.useRef)(null),u=(0,yde.useInstanceId)(J4,"dataforms-layouts-card-card-body"),d=(0,Ln.useMemo)(()=>({layout:Rr,fields:t.children??[]}),[t]),{isOpened:f,isCollapsible:m}=a,[h,p]=(0,Ln.useState)(f),[g,b]=(0,Ln.useState)(!1);(0,Ln.useEffect)(()=>{p(f)},[f]);let v=(0,Ln.useCallback)(()=>{p(T=>(T&&b(!0),!T))},[]),k=m?h:!0,y=(0,Ln.useCallback)(()=>{b(!0)},[b]);Qd(c,k&&g);let x=pR(a.summary,s).filter(T=>XRe(T,a.summary,k)),C=g&&a.isCollapsible?(0,kr.jsx)(kR,{validity:i}):null,B={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"},I=t.label,O,E;if(t.children)O=!!I&&a.withHeader,E=(0,kr.jsxs)(kr.Fragment,{children:[t.description&&(0,kr.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,kr.jsx)(An,{data:e,form:d,onChange:o,validity:i?.children})]});else{let T=s.find(D=>D.id===t.id);if(!T||!T.Edit)return null;let R=vp("regular")?.component;if(!R)return null;I=T.label,O=!!I&&a.withHeader,E=(0,kr.jsx)(R,{data:e,field:t,onChange:o,hideLabelFromVision:r||O,markWhenOptional:n,validity:i})}let L={blockStart:O?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,kr.jsxs)(ef.Card,{className:"dataforms-layouts-card__field",size:B,children:[O&&(0,kr.jsxs)(ef.CardHeader,{className:"dataforms-layouts-card__field-header",onClick:m?v:void 0,style:{cursor:m?"pointer":void 0},isBorderless:!0,children:[(0,kr.jsxs)("div",{style:{height:m?void 0:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,kr.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:I}),C,x.length>0&&a.withHeader&&(0,kr.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:x.map(T=>(0,kr.jsx)(T.render,{item:e,field:T},T.id))})]}),m&&(0,kr.jsx)(ef.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:k?yf:Fn,"aria-expanded":k,"aria-controls":u,"aria-label":k?(0,Q4.__)("Collapse"):(0,Q4.__)("Expand")})]}),(k||!O)&&(0,kr.jsx)(ef.CardBody,{id:u,size:L,className:"dataforms-layouts-card__field-control",ref:c,onBlur:y,children:E})]})}var Sde=l(A(),1);var ir=l(w(),1);function QRe({title:e}){return(0,ir.jsx)(Me,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,ir.jsx)(Me,{direction:"row",align:"center",children:(0,ir.jsx)(Sde.__experimentalHeading,{level:2,size:13,children:e})})})}var JRe=({children:e})=>(0,ir.jsx)(ir.Fragment,{children:e});function _de({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:Rr,fields:t.children};return(0,ir.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,ir.jsx)(QRe,{title:t.label}),(0,ir.jsx)(Me,{direction:"row",align:s.alignment,gap:"lg",children:(0,ir.jsx)(An,{data:e,form:c,onChange:o,validity:i?.children,as:JRe,children:(u,d,f)=>(0,ir.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,ir.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=vp("regular")?.component;return a?(0,ir.jsx)(ir.Fragment,{children:(0,ir.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,ir.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var Nn=l(P(),1),xde=l(N(),1);var Ac=l(w(),1);function wde({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,Nn.useContext)(us),i=(0,Nn.useRef)(null),s=(0,Nn.useRef)(null),[a,c]=(0,Nn.useState)(!1),[u,d]=(0,Nn.useState)(!1),f=(0,Nn.useMemo)(()=>({layout:Rr,fields:t.children??[]}),[t]);(0,Nn.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)}},[]),Qd(s,u&&a);let m=(0,Nn.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,Ac.jsx)(p.render,{item:e,field:p}):g=t.label||(0,xde.__)("More details"),(0,Ac.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,Ac.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,Ac.jsxs)(Me,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[g,a&&(0,Ac.jsx)(kR,{validity:r})]})}),(0,Ac.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,Ac.jsx)(An,{data:e,form:f,onChange:o,validity:r?.children})})]})}var yp=l(w(),1),eOe=[{type:"regular",component:Que,wrapper:({children:e})=>(0,yp.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:bde,wrapper:({children:e})=>(0,yp.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:J4,wrapper:({children:e})=>(0,yp.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:_de,wrapper:({children:e,layout:t})=>(0,yp.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,yp.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,yp.jsx)(Me,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:wde}];function vp(e){return eOe.find(t=>t.type===e)}var vR=l(w(),1),tOe=({children:e})=>(0,vR.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function An({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,yR.useContext)(us),a=(0,yR.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??vp(t.layout.type)?.wrapper??tOe;return(0,vR.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=vp(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,vR.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var tz=l(w(),1);function M_({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,ez.useMemo)(()=>fR(t),[t]),s=(0,ez.useMemo)(()=>A_(o),[o]);return t.fields?(0,tz.jsx)(que,{fields:s,children:(0,tz.jsx)(An,{data:e,form:i,onChange:r,validity:n})}):null}var tf=l(P(),1),Vde=l(N(),1);var Sk=l(A(),1);var oz=l(N(),1);var Cde=l(Z(),1);function yk({isControl:e}={isControl:!1}){return(0,Cde.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var SR=l(w(),1);function Bde({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=yk();return!e||e.length===0?null:(0,SR.jsx)(Sk.DropdownMenu,{icon:ks,label:(0,oz.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,SR.jsx)(Sk.MenuGroup,{label:(0,oz.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,SR.jsx)(Sk.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?gl:null,children:i.label},i.id)})})})}var _R=l(A(),1),Ede=l(Z(),1),Tde=l(F(),1),Lc=l(P(),1),Ide=l(ur(),1);var ia=l(w(),1),{useRichText:oOe}=M(Ide.privateApis);function Pde({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Tde.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,[u,d]=(0,Lc.useState)({start:void 0,end:void 0}),[f,m]=(0,Lc.useState)(!1),h=(0,Lc.useRef)(),p=(0,Lc.useRef)(new Set),g=(0,Lc.useRef)(new Set),b=Sb({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function v(){h.current?.focus()}let{value:k,getValue:y,onChange:S,ref:x,formatTypes:C}=oOe({value:s,onChange(O){r(t.setValue({item:e,value:O}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(O,E)=>d({start:O,end:E}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,Lc.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:c}),[t.id,c])}),{baseControlProps:B,controlProps:I}=(0,_R.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,ia.jsxs)(ia.Fragment,{children:[f&&(0,ia.jsx)(Bb.Provider,{value:g,children:(0,ia.jsx)(Tb.Provider,{value:p,children:(0,ia.jsx)("div",{children:(0,ia.jsx)(JI,{value:k,onChange:S,onFocus:v,formatTypes:C,forwardedRef:h,isVisible:!1})})})}),(0,ia.jsx)(_R.BaseControl,{...B,children:(0,ia.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,Ede.useMergeRefs)([x,ZI({registry:i,getValue:y,onChange:S,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,...I})})]})}var Sp=l(A(),1),Rde=l(F(),1),_k=l(N(),1);var wo=l(w(),1);function rOe({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,wo.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,wo.jsx)("img",{alt:"",width:24,height:24,src:o.media_type==="image"?o.source_url:o.poster})});if(n.length===1){let a=t.getValue({item:e})?.url;if(n[0]==="image"&&a)return(0,wo.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,wo.jsx)("img",{alt:"",width:24,height:24,src:a})});let c;if(n[0]==="image"?c=rv:n[0]==="video"?c=AN:n[0]==="audio"?c=DO:c=Up,c)return(0,wo.jsx)(Sp.Icon,{icon:c,size:24})}return(0,wo.jsx)(Sp.Icon,{icon:Up,size:24})}function Ode({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=yk({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:c=!1}=r,u=i?.id,d=i?.url,f=(0,Rde.useSelect)(h=>{if(!u)return;let g=h(_).getSettings()[v0];if(g)return g(h,u)},[u]),m;if(s.length===1){let h=s[0];h==="image"?m=(0,_k.__)("Choose an image\u2026"):h==="video"?m=(0,_k.__)("Choose a video\u2026"):h==="application"?m=(0,_k.__)("Choose a file\u2026"):m=(0,_k.__)("Choose a media item\u2026")}else m=(0,_k.__)("Choose a media item\u2026");return(0,wo.jsx)(Ms,{children:(0,wo.jsx)(kb,{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:h=>{if(h.id&&h.url){let p={...h,mediaType:h.media_type};c&&(p.featuredImage=!1),o(t.setValue({item:e,value:p}))}},renderToggle:h=>(0,wo.jsx)(Sp.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...h,children:(0,wo.jsxs)(Sp.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,wo.jsxs)(wo.Fragment,{children:[(0,wo.jsx)(rOe,{attachment:f,field:t,data:e,config:r}),(0,wo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,wo.jsxs)(wo.Fragment,{children:[(0,wo.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"24px",height:"24px"}}),(0,wo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})})})}var Nc=l(A(),1),wR=l(P(),1),Ade=l(N(),1);var Lde=l(un(),1);var vr=l(w(),1),rz="noreferrer noopener",Nde="_blank",xR="nofollow";function nOe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=Nde,i=i?.includes(rz)?i:i+` ${rz}`;else{let s=new RegExp(`\\b${rz}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(xR)?i:(i+` ${xR}`).trim();else{let s=new RegExp(`\\b${xR}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,Lde.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function Mde({data:e,field:t,onChange:o}){let[r,n]=(0,wR.useState)(!1),{popoverProps:i}=yk({isControl:!0}),s=t.getValue({item:e}),a=s?.url,c=s?.rel||"",d=s?.linkTarget===Nde,f=c===xR,m=(0,wR.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsx)(Nc.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,vr.jsxs)(Nc.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsx)(Nc.Icon,{icon:dn,size:24}),(0,vr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsx)(Nc.Icon,{icon:dn,size:24,style:{opacity:.3}}),(0,vr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,Ade.__)("Link")})]})]})}),r&&(0,vr.jsx)(Nc.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,vr.jsx)(Bd,{value:m,onChange:h=>{let p=nOe({rel:c,...h});o(t.setValue({item:e,value:p}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var yr=l(w(),1),{fieldsKey:Fde,formKey:nz}=M(xk.privateApis);function iz(e,t={}){return function(r){return(0,yr.jsx)(e,{...r,config:t})}}function iOe({clientId:e,blockType:t,setAttributes:o,isCollapsed:r=!1}){let n=Fr({clientId:e,context:"list-view"}),i=Tt(e),s=t?.[Fde],a=(0,tf.useContext)(cn),c=(0,Dde.useSelect)(p=>{let g=p(_).getBlockAttributes(e);if(!g?.metadata?.bindings)return g;let{getBlockBindingsSource:b}=M(p(xk.store));return Object.entries(g.metadata.bindings).reduce((v,[k,y])=>{let S=b(y.source);if(!S)return v;let x=S.getValues({select:p,context:a,bindings:{[k]:y}});return{...v,...x}},g)},[a,e]),u=(0,tf.useMemo)(()=>r?{...t?.[nz],fields:[t?.[nz]?.fields?.[0]]}:t?.[nz],[t,r]),[d,f]=(0,tf.useState)(u),m=(0,tf.useMemo)(()=>s?.length?s.map(p=>{let g={...p};return typeof p.Edit=="string"&&p.Edit==="rich-text"?g.Edit=iz(Pde,{clientId:e}):typeof p.Edit=="string"&&p.Edit==="link"?g.Edit=iz(Mde):typeof p.Edit=="object"&&p.Edit.control==="media"&&(g.Edit=iz(Ode,{...p.Edit})),g}):[],[s,e]);if(!s?.length)return null;let h=p=>{f(g=>g.fields?.includes(p)?{...g,fields:g.fields.filter(b=>b!==p)}:{...g,fields:[...g.fields||[],p]})};return(0,yr.jsxs)("div",{className:"block-editor-block-fields__container",children:[(0,yr.jsx)("div",{className:"block-editor-block-fields__header",children:(0,yr.jsxs)(CR.__experimentalHStack,{spacing:1,children:[r&&(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(Oe,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,yr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,yr.jsx)(CR.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,yr.jsx)(Bde,{fields:m,visibleFields:d.fields,onToggleField:h})]}),!r&&(0,yr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Vde.__)("Content")})]})}),(0,yr.jsx)(M_,{data:c,fields:m,form:d,onChange:o})]})}function sOe(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,xk.getBlockType)(e)?.[Fde])}function aOe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,tf.useContext)(cr);return(0,yr.jsx)(vm,{group:"content",children:(0,yr.jsx)(iOe,{...e,blockType:t,isCollapsed:o})})}var zde={edit:aOe,hasSupport:sOe,attributeKeys:[],supportsPatternEditing:!0};var lz=l(rt(),1),jde=l(A(),1),sz=l(N(),1),D_=l($(),1);var az=l(w(),1);function lOe(e){return(0,D_.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function cOe({className:e,setAttributes:t}){return Mo()!=="default"?null:(0,az.jsx)(fe,{group:"advanced",children:(0,az.jsx)(jde.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,sz.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,sz.__)("Separate multiple classes with spaces.")})})}var cz={edit:cOe,addSaveProps:uOe,attributeKeys:["className"],hasSupport(e){return(0,D_.hasBlockSupport)(e,"customClassName",!0)}};function uOe(e,t,o){return(0,D_.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=V(e.className,o.className)),e}function dOe(e,t,o,r){if(!(0,D_.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,lz.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",lOe);(0,lz.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",dOe);var Ude=l(rt(),1),V_=l($(),1);function fOe(e,t){return(0,V_.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,V_.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,V_.getBlockDefaultClassName)(t.name)),e}(0,Ude.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",fOe);var yfe=l(P(),1),Sfe=l(rt(),1),sf=l($(),1),_fe=l(Z(),1),Ek=l(zv(),1);var bz=l($(),1),RR=l(P(),1),afe=l(F(),1);var mOe=l($(),1);var pOe=l(w(),1),Hde="typography.lineHeight";var Gde=l(rt(),1),BR=l($(),1),Wde=l(KE(),1),$de=l(A(),1);var F_="typography.__experimentalFontFamily",{kebabCase:hOe}=M($de.privateApis);function gOe(e){return(0,BR.hasBlockSupport)(e,F_)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function Kde(e,t,o){if(!(0,BR.hasBlockSupport)(t,F_)||He(t,ds,"fontFamily")||!o?.fontFamily)return e;let r=new Wde.default(e.className);r.add(`has-${hOe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function bOe({name:e,fontFamily:t}){return Kde({},e,{fontFamily:t})}var uz={useBlockProps:bOe,addSaveProps:Kde,attributeKeys:["fontFamily"],hasSupport(e){return(0,BR.hasBlockSupport)(e,F_)}};(0,Gde.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",gOe);var dz=l(rt(),1),wk=l($(),1),Yde=l(KE(),1);var kOe=l(w(),1),_p="typography.fontSize";function vOe(e){return(0,wk.hasBlockSupport)(e,_p)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function qde(e,t,o){if(!(0,wk.hasBlockSupport)(t,_p)||He(t,ds,"fontSize"))return e;let r=new Yde.default(e.className);r.add(fu(o.fontSize));let n=r.value;return e.className=n||void 0,e}function yOe({name:e,fontSize:t,style:o}){let[r,n,i]=me("typography.fontSizes","typography.fluid","layout");if(!(0,wk.hasBlockSupport)(e,_p)||He(e,ds,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:tc({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:rh(r,t,o?.typography?.fontSize).size}}),!!s)return qde(s,e,{fontSize:t})}var fz={useBlockProps:yOe,addSaveProps:qde,attributeKeys:["fontSize","style"],hasSupport(e){return(0,wk.hasBlockSupport)(e,_p)}},SOe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function _Oe(e,t,o,r){let n=e.name,i={fontSize:(0,wk.hasBlockSupport)(n,_p)};return a2(i,SOe,e,t,o,r)}(0,dz.addFilter)("blocks.registerBlockType","core/font/addAttribute",vOe);(0,dz.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",_Oe);var ER=l(N(),1),Ck=l($(),1);var mz=l(w(),1),Bk="typography.textAlign",xOe=[{icon:Qc,title:(0,ER.__)("Align text left"),align:"left"},{icon:kf,title:(0,ER.__)("Align text center"),align:"center"},{icon:Jc,title:(0,ER.__)("Align text right"),align:"right"}],Zde=["left","center","right"],wOe=[];function pz(e){return Array.isArray(e)?Zde.filter(t=>e.includes(t)):e===!0?Zde:wOe}function COe({style:e,name:t,setAttributes:o}){let n=is(t)?.typography?.textAlign,i=Mo();if(!n||i!=="default")return null;let s=pz((0,Ck.getBlockSupport)(t,Bk));if(!s.length)return null;let a=xOe.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:Ne(d)})};return(0,mz.jsx)(Mt,{group:"block",children:(0,mz.jsx)(jw,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var TR={edit:COe,useBlockProps:BOe,addSaveProps:EOe,attributeKeys:["style"],hasSupport(e){return(0,Ck.hasBlockSupport)(e,Bk,!1)}};function BOe({name:e,style:t}){if(!t?.typography?.textAlign||!pz((0,Ck.getBlockSupport)(e,Bk)).length||He(e,ds,"textAlign"))return null;let r=t.typography.textAlign;return{className:V({[`has-text-align-${r}`]:r})}}function EOe(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Ck.getBlockSupport)(t,Bk);return pz(n).includes(r)&&!He(t,ds,"textAlign")&&(e.className=V(`has-text-align-${r}`,e.className)),e}var gz=l(rt(),1),of=l($(),1),xp=l(P(),1),nfe=l(F(),1),z_=l(N(),1),IR=l(A(),1),ife=l(Z(),1);function TOe(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 Xde(e,t){if(!e)return;t(0);let o=TOe(e,t);return t(o),o}var Qde=l(P(),1),Jde=l(N(),1),efe=l(A(),1),tfe=l(Zo(),1),hz=l(w(),1);function ofe(){let e=(0,Jde.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,Qde.useEffect)(()=>{(0,tfe.speak)(e)},[e]),(0,hz.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,hz.jsx)(efe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var Mn=l(w(),1),IOe={},POe=12,Mc="typography.fitText";function ROe(e){return!(0,of.hasBlockSupport)(e,Mc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function OOe({fitText:e,name:t,clientId:o}){let[r,n]=(0,xp.useState)(null),i=(0,of.hasBlockSupport)(t,Mc),s=mt(o),{blockAttributes:a,parentId:c,blockMode:u}=(0,nfe.useSelect)(f=>{if(!o||!i||!e)return IOe;let m=f(_).getBlockMode(o);return m==="html"?{blockMode:m}:{blockAttributes:f(_).getBlockAttributes(o),parentId:f(_).getBlockRootClientId(o),blockMode:m}},[o,i,e]),d=(0,xp.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=Xde(s,b=>{b===0?m.textContent="":m.textContent=`${h} { font-size: ${b}px !important; }`});n(g)},[s,o,i,e]);return(0,xp.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,xp.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 rfe({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i,warning:s}){return(0,of.hasBlockSupport)(r,Mc)?(0,Mn.jsx)(fe,{group:"typography",children:(0,Mn.jsxs)(IR.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,z_.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:[(0,Mn.jsx)(IR.ToggleControl,{label:(0,z_.__)("Fit text"),checked:t,onChange:()=>{let a=!t||void 0,c={fitText:a};a&&(n&&(c.fontSize=void 0),i?.typography?.fontSize&&(c.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(c)},help:t?(0,z_.__)("Text will resize to fit its container."):(0,z_.__)("The text will resize to fit its container, resetting other font size settings.")}),s]})}):null}function AOe(e,t,o){if(!(0,of.hasBlockSupport)(t,Mc))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 LOe({name:e,fitText:t}){return t&&(0,of.hasBlockSupport)(e,Mc)?{className:"has-fit-text"}:{}}(0,gz.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",ROe);var NOe=e=>(0,of.hasBlockSupport)(e,Mc);function MOe({fitText:e,name:t,clientId:o,children:r}){let{fontSize:n}=OOe({fitText:e,name:t,clientId:o});return r(n)}var DOe=(0,ife.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:c}=n;return(0,of.hasBlockSupport)(r,Mc)?(0,Mn.jsxs)(Mn.Fragment,{children:[(0,Mn.jsx)(e,{...o}),c&&(0,Mn.jsx)(MOe,{fitText:c,name:r,clientId:i,children:d=>s&&(0,Mn.jsx)(rfe,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style,warning:d<POe&&(0,Mn.jsx)(ofe,{})})}),!c&&s&&(0,Mn.jsx)(rfe,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})]}):(0,Mn.jsx)(e,{...o})},"addFitTextControl");(0,gz.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",DOe);var PR={useBlockProps:LOe,addSaveProps:AOe,attributeKeys:["fitText","fontSize","style"],hasSupport:NOe,edit:()=>null};var kz=l(w(),1);function sfe(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var VOe="typography.__experimentalLetterSpacing",FOe="typography.__experimentalTextTransform",zOe="typography.__experimentalTextDecoration",jOe="typography.textIndent",UOe="typography.textColumns",HOe="typography.__experimentalFontStyle",GOe="typography.__experimentalFontWeight",WOe="typography.__experimentalWritingMode",ds="typography",lfe=[Hde,_p,HOe,GOe,F_,Bk,UOe,zOe,jOe,WOe,FOe,VOe,Mc];function cfe(e){let t={...sfe(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={...sfe(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:Ne(t),fontFamily:i,fontSize:n}}function ufe(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 $Oe({children:e,resetAllFilter:t}){let o=(0,RR.useCallback)(r=>{let n=ufe(r),i=t(n);return{...r,...cfe(i)}},[t]);return(0,kz.jsx)(fe,{group:"typography",resetAllFilter:o,children:e})}function dfe({clientId:e,name:t,setAttributes:o,settings:r}){let n=BP(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,afe.useSelect)(m=>{if(!n)return{};let{style:h,fontFamily:p,fontSize:g,fitText:b}=m(_).getBlockAttributes(e)||{};return{style:h,fontFamily:p,fontSize:g,fitText:b}},[e,n]),u=(0,RR.useMemo)(()=>ufe({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let h=cfe(m);(h.fontSize||h.style?.typography?.fontSize)&&c&&(h.fitText=void 0),o(h)};if(!n)return null;let f=(0,bz.getBlockSupport)(t,[ds,"__experimentalDefaultControls"]);return(0,kz.jsx)(EP,{as:$Oe,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var nf=l(P(),1),AR=l(F(),1),OR=l($(),1),gfe=l(Re(),1);var cl=l(P(),1),ffe=l(Xy(),1);var j_=l(w(),1);function mfe({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=mt(e),[i,s]=(0,cl.useReducer)(()=>o(n));(0,cl.useEffect)(()=>{n&&r&&s()},[n,r]),(0,cl.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,cl.useRef)(t),[c,u]=(0,cl.useState)(!1);return(0,cl.useEffect)(()=>{if((0,ffe.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,j_.jsx)(Hi,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,j_.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function rf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function pfe({clientId:e,value:t,forceShow:o}){return(0,j_.jsx)(mfe,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=rf(r,"margin-top"),i=rf(r,"margin-right"),s=rf(r,"margin-bottom"),a=rf(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 hfe({clientId:e,value:t,forceShow:o}){return(0,j_.jsx)(mfe,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:rf(r,"padding-top"),borderRightWidth:rf(r,"padding-right"),borderBottomWidth:rf(r,"padding-bottom"),borderLeftWidth:rf(r,"padding-left")}),forceShow:o})}var Dc=l(w(),1),ul="dimensions",U_="spacing";function KOe(){let[e,t]=(0,nf.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=M((0,AR.useDispatch)(_));return(0,nf.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function YOe({children:e,resetAllFilter:t}){let o=(0,nf.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,Dc.jsx)(fe,{group:"dimensions",resetAllFilter:o,children:e})}function bfe({clientId:e,name:t,setAttributes:o,settings:r}){let n=RP(r),i=(0,AR.useSelect)(m=>{if(n)return m(_).getBlockAttributes(e)?.style},[e,n]),[s,a]=KOe(),c=m=>{o({style:Ne(m)})};if(!n)return null;let u=(0,OR.getBlockSupport)(t,[ul,"__experimentalDefaultControls"]),d=(0,OR.getBlockSupport)(t,[U_,"__experimentalDefaultControls"]),f={...u,...d};return(0,Dc.jsxs)(Dc.Fragment,{children:[(0,Dc.jsx)(OP,{as:YOe,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,Dc.jsx)(hfe,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,Dc.jsx)(pfe,{forceShow:s==="margin",clientId:e,value:i})]})}function kfe(e,t="any"){if(nf.Platform.OS!=="web")return!1;let o=(0,OR.getBlockSupport)(e,ul);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width):!!o?.[t]}var vfe={useBlockProps:qOe,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return kfe(e)}};function qOe({name:e,height:t,minHeight:o,style:r}){if(!kfe(e,"aspectRatio")||He(e,ul,"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 vz(){(0,gfe.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var dl=l(w(),1),ZOe=[...lfe,ap,nr,ul,lp,U_,y_],Sz=e=>ZOe.some(t=>(0,sf.hasBlockSupport)(e,t));function pi(e={}){let t={};return(0,Ek.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function XOe(e){return Sz(e)&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}var xfe={[`${ap}.__experimentalSkipSerialization`]:["border"],[`${nr}.__experimentalSkipSerialization`]:[nr],[`${ds}.__experimentalSkipSerialization`]:[ds],[`${ul}.__experimentalSkipSerialization`]:[ul],[`${U_}.__experimentalSkipSerialization`]:[U_],[`${y_}.__experimentalSkipSerialization`]:[y_]},QOe={...xfe,[`${ul}.aspectRatio`]:[`${ul}.aspectRatio`],[`${lp}`]:[lp]},JOe={[`${ul}.aspectRatio`]:!0,[`${lp}`]:!0},eAe={gradients:"gradient"};function yz(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;yz(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function wfe(e,t,o,r=QOe){if(!Sz(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=JOe[i]||(0,sf.getBlockSupport)(t,i);a===!0&&(n=yz(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=eAe[c]||c;n=yz(n,[[...s,u]])})}),e.style={...pi(n),...e.style},e}function tAe({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=is(t,r),i=Mo(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,dl.jsxs)(dl.Fragment,{children:[(0,dl.jsx)(s2,{...s}),(0,dl.jsx)(lae,{...s}),(0,dl.jsx)(dfe,{...s}),(0,dl.jsx)(rae,{...s}),(0,dl.jsx)(bfe,{...s})]})}var LR={edit:tAe,hasSupport:Sz,addSaveProps:wfe,attributeKeys:["style"],useBlockProps:nAe},oAe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],rAe={};function nAe({name:e,style:t}){let o=(0,_fe.useInstanceId)(rAe,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,yfe.useMemo)(()=>{if(!n)return;let s=[];return oAe.forEach(({elementType:a,pseudo:c,elements:u})=>{if(He(e,nr,a))return;let f=n?.[a];if(f){let m=gg(r,sf.__EXPERIMENTAL_ELEMENTS[a]);s.push((0,Ek.compileCSS)(f,{selector:m})),c&&c.forEach(h=>{f[h]&&s.push((0,Ek.compileCSS)(f[h],{selector:gg(r,`${sf.__EXPERIMENTAL_ELEMENTS[a]}${h}`)}))})}u&&u.forEach(m=>{n[m]&&s.push((0,Ek.compileCSS)(n[m],{selector:gg(r,sf.__EXPERIMENTAL_ELEMENTS[m])}))})}),s.length>0?s.join(""):void 0},[r,n,e]);return Zn({css:i}),wfe({className:o},e,{style:t},xfe)}(0,Sfe.addFilter)("blocks.registerBlockType","core/style/addAttribute",XOe);var Cfe=l(rt(),1),Bfe=l($(),1),iAe=e=>(0,Bfe.hasBlockSupport)(e,"__experimentalSettings",!1);function sAe(e){return iAe(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,Cfe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",sAe);var af=l($(),1),Ife=l(Z(),1),Pfe=l(rt(),1),H_=l(P(),1);function aAe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=Bt(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 Efe(e){return`${e}{filter:none}`}function Tfe(e,t){return`${e}{filter:url(#${t})}`}function NR(e,t){let o=aAe(t);return`
<svg
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 0 0"
width="0"
height="0"
focusable="false"
role="none"
aria-hidden="true"
style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
<defs>
<filter id="${e}">
<!--
Use sRGB instead of linearRGB so transparency looks correct.
Use perceptual brightness to convert to grayscale.
-->
<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>
<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
<feComponentTransfer color-interpolation-filters="sRGB">
<feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR>
<feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG>
<feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB>
<feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA>
</feComponentTransfer>
<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
<feComposite in2="SourceGraphic" operator="in"></feComposite>
</filter>
</defs>
</svg>`}var Vc=l(w(),1),_z=[],lAe=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");Kc([Yc]);function xz({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=me(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,H_.useMemo)(()=>[...r||_z,...n||_z,...o&&i||_z],[o,r,n,i])}function Rfe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function cAe(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 uAe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=is(o),i=Mo(),s=xz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=xz({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=me("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:Rfe(r,s);return(0,Vc.jsxs)(Vc.Fragment,{children:[(0,Vc.jsx)(fe,{group:"filter",children:(0,Vc.jsx)(UP,{value:{filter:{duotone:m}},onChange:h=>{let p={...e,color:{...h?.filter}};t({style:Ne(p)})},settings:n})}),(0,Vc.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Vc.jsx)(qT,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:h=>{let p=cAe(h,s),g={...e,color:{...e?.color,duotone:p??h}};t({style:Ne(g)})},settings:n})})]})}var wz={shareWithChildBlocks:!0,edit:uAe,useBlockProps:pAe,attributeKeys:["style"],hasSupport(e){return(0,af.hasBlockSupport)(e,"filter.duotone")}};function dAe(e){return(0,af.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function fAe({clientId:e,id:t,selector:o,attribute:r}){let n=xz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:Rfe(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";oc(h?{css:u!=="unset"?Tfe(m,t):Efe(m),__unstableType:"presets"}:void 0),oc(h?{assets:u!=="unset"?NR(t,u):"",__unstableType:"svgs"}:void 0);let p=mt(e);(0,H_.useEffect)(()=>{if(h&&p&&lAe){let g=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",g)}},[h,p,u])}var mAe={};function pAe({clientId:e,name:t,style:o}){let r=(0,Ife.useInstanceId)(mAe),n=(0,H_.useMemo)(()=>{let c=(0,af.getBlockType)(t);if(c){if(!(0,af.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,af.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=ei(c);return typeof d=="string"?gg(f,d):f}return ei(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return fAe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,Pfe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",dAe);var Ofe=l(P(),1),Afe=l(F(),1),Lfe=l(Z(),1),G_=l($(),1),DR=l(N(),1);var MR=l(w(),1),hAe={},gAe={};function bAe({blockName:e,setAttributes:t,style:o}){let r=(0,G_.getBlockType)(e);function n(s){let a=s?.css?.trim()?s.css:void 0;t({style:Ne({...s,css:a})})}let i=(0,DR.sprintf)((0,DR.__)("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;."),r?.title);return(0,MR.jsx)(fe,{group:"advanced",children:(0,MR.jsx)(WP,{value:o,onChange:n,inheritedValue:o,help:i})})}function kAe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,Afe.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(_);return{style:s(e)?.style||gAe,canEditCSS:a().canEditCSS}},[e]);return n?(0,MR.jsx)(bAe,{blockName:t,setAttributes:o,style:r}):null}function vAe({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&GP(t),r=(0,Lfe.useInstanceId)(hAe,"wp-custom-css"),n=`.${r}`,i=(0,Ofe.useMemo)(()=>{if(o)return xS(t,n)},[t,n,o]);return Zn({css:i}),o?{className:`has-custom-css ${r}`}:{}}function yAe(e,t,o){if(!(0,G_.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 VR={edit:kAe,useBlockProps:vAe,addSaveProps:yAe,attributeKeys:["style"],hasSupport(e){return(0,G_.hasBlockSupport)(e,"customCSS",!0)}};var FR=l(Z(),1),Bz=l(rt(),1),Fc=l($(),1),zR=l(F(),1),fl=l(A(),1),Tk=l(N(),1);var Yo=l(w(),1),SAe="is-style-",Ez="layout",{kebabCase:Cz}=M(fl.privateApis);function Tz(e){return(0,Fc.hasBlockSupport)(e,"layout")||(0,Fc.hasBlockSupport)(e,"__experimentalLayout")}function jR(e={},t=""){let{layout:o}=e,{default:r}=(0,Fc.getBlockSupport)(t,Ez)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(jn[n?.type||"default"]?.className){let a=jn[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,zR.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(_).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${Cz(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${Cz(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function Iz(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=xs(i?.type||"default"),[a]=me("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function _Ae({layout:e,setAttributes:t,name:o,clientId:r}){let n=is(o),{layout:i}=n,{themeSupportsLayout:s}=(0,zR.useSelect)(T=>{let{getSettings:R}=T(_);return{themeSupportsLayout:R().supportsLayout}},[]);if(Mo()!=="default")return null;let c=(0,Fc.getBlockSupport)(o,Ez,{}),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:S=!1,contentSize:x=null}=y;if((v==="default"||v==="constrained")&&!s)return null;let C=xs(v),B=xs("constrained"),I=!y.type&&(x||S),O=!!S||!!x,E=T=>t({layout:{type:T}}),L=T=>t({layout:T});return(0,Yo.jsxs)(Yo.Fragment,{children:[(0,Yo.jsx)(fe,{children:(0,Yo.jsxs)(fl.PanelBody,{title:(0,Tk.__)("Layout"),children:[k&&(0,Yo.jsx)(Yo.Fragment,{children:(0,Yo.jsx)(fl.ToggleControl,{label:(0,Tk.__)("Inner blocks use content width"),checked:C?.name==="constrained"||O,onChange:()=>t({layout:{type:C?.name==="constrained"||O?"default":"constrained"}}),help:C?.name==="constrained"||O?(0,Tk.__)("Nested blocks use content width with options for full and wide widths."):(0,Tk.__)("Nested blocks will fill the width of this container.")})}),!S&&d&&(0,Yo.jsx)(xAe,{type:v,onChange:E}),C&&C.name!=="default"&&(0,Yo.jsx)(C.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r}),B&&I&&(0,Yo.jsx)(B.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r})]})}),!S&&C&&(0,Yo.jsx)(C.toolBarControls,{layout:y,onChange:L,layoutBlockSupport:c,name:o,clientId:r})]})}var Nfe={shareWithChildBlocks:!0,edit:_Ae,attributeKeys:["layout"],hasSupport(e){return Tz(e)}};function xAe({type:e,onChange:t}){return(0,Yo.jsx)(fl.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Tk.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:oH().map(({name:o,label:r})=>(0,Yo.jsx)(fl.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function wAe(e){return"type"in(e.attributes?.layout??{})||Tz(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function CAe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,layoutClasses:n}){let{name:i,attributes:s}=t,a=(0,FR.useInstanceId)(e),{layout:c}=s,{default:u}=(0,Fc.getBlockSupport)(i,Ez)||{},d=c?.inherit||c?.contentSize||c?.wideSize?{...c,type:"constrained"}:c||u||{},f=`wp-container-${Cz(i)}-is-layout-`,m=`.${f}${a}`,h=o!==null,g=xs(d?.type||"default")?.getLayoutStyle?.({blockName:i,selector:m,layout:d,style:s?.style,hasBlockGapSupport:h,globalBlockGapValue:r}),b=V({[`${f}${a}`]:!!g},n);return Zn({css:g}),(0,Yo.jsx)(e,{...t,__unstableLayoutClassNames:b})}var BAe=(0,FR.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=Tz(n),a=jR(i,n),c=(0,zR.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=M(u(_)),m=d(),{disableLayoutStyles:h}=m;if(h)return;let[p]=f(r,"spacing.blockGap"),g=m[Si],b,v=i?.className;if(v?.includes(SAe)){let{getBlockStyles:y}=u(Fc.store),S=y(n),x=LV(v,S);b=x?g?.blocks?.[n]?.variations?.[x]?.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,Yo.jsx)(CAe,{block:e,props:o,layoutClasses:a,...c}):(0,Yo.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,Bz.addFilter)("blocks.registerBlockType","core/layout/addAttribute",wAe);(0,Bz.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",BAe);var Hfe=l(Z(),1),Lz=l(F(),1),Gfe=l(P(),1);var fs=l(P(),1),lf=l(F(),1),Dfe=l(Z(),1);function $_(e,t){return Array.from({length:t},(o,r)=>e+r)}var sa=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 Co(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function W_(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 zc(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 EAe(e,t){let o=parseFloat(Co(e,"column-gap")),r=parseFloat(Co(e,"row-gap")),n=W_(Co(e,"grid-template-columns"),o),i=W_(Co(e,"grid-template-rows"),r),s=zc(n,t.left)+1,a=zc(i,t.top)+1,c=zc(n,t.right,"end")+1,u=zc(i,t.bottom,"end")+1;return new sa({columnStart:s,columnEnd:c,rowStart:a,rowEnd:u})}function Mfe(e){return EAe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function Pz(e){let t=Co(e,"grid-template-columns"),o=Co(e,"grid-template-rows"),r=Co(e,"border-top-width"),n=Co(e,"border-right-width"),i=Co(e,"border-bottom-width"),s=Co(e,"border-left-width"),a=Co(e,"padding-top"),c=Co(e,"padding-right"),u=Co(e,"padding-bottom"),d=Co(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,h=f*m;return{numColumns:f,numRows:m,numItems:h,currentColor:Co(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:Co(e,"gap"),inset:`
calc(${a} + ${r})
calc(${c} + ${n})
calc(${u} + ${i})
calc(${d} + ${s})
`}}}var hi=l(w(),1);function K_({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,lf.useSelect)(a=>a(_).getSettings().isDistractionFree,[]),i=mt(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,hi.jsx)(TAe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var TAe=(0,fs.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,fs.useState)(()=>Pz(t)),[a,c]=(0,fs.useState)(!1),u=mt(r),d=(0,fs.useMemo)(()=>u?Mfe(u):null,[u]);return(0,fs.useEffect)(()=>{let f=()=>s(Pz(t)),m=new window.ResizeObserver(f);m.observe(t,{box:"border-box"});let h=new window.ResizeObserver(f);return h.observe(t),()=>{m.disconnect(),h.disconnect()}},[t]),(0,fs.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,hi.jsx)(Hi,{className:V("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,hi.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,hi.jsx)(PAe,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,hi.jsx)(IAe,{gridInfo:i,childGridRect:d})})})});function IAe({gridInfo:e,childGridRect:t}){return $_(1,e.numRows).map(o=>$_(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,hi.jsx)(Vfe,{color:n},`${o}-${r}`)}))}function PAe({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,fs.useState)(null),i=(0,lf.useSelect)(a=>{let{getBlockOrder:c,getBlockStyles:u}=M(a(_)),d=c(e);return u(d)},[e]),s=(0,fs.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 sa({columnStart:u,rowStart:d,columnSpan:f,rowSpan:m}))}return a},[i]);return $_(1,t.numRows).map(a=>$_(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,hi.jsx)(Vfe,{color:d,className:m&&"is-highlighted",children:f&&!u?(0,hi.jsx)(RAe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,hi.jsx)(OAe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${c}`)}))}function Vfe({color:e,children:t,className:o}){return(0,hi.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 Ffe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,lf.useSelect)(_),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,lf.useDispatch)(_),m=op(o,r.numColumns);return AAe({validateDrag(h){let p=c(h);if(!a(p,o))return!1;let g=i(h),b=new sa({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new sa({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(h){let p=i(h);n(new sa({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 RAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,hi.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:Ffe(e,t,o,r,n)})}function OAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,lf.useDispatch)(_),c=op(o,r.numColumns);return(0,hi.jsx)(Yu,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:Ffe(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 AAe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,lf.useSelect)(_);return(0,Dfe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var zfe=l(A(),1),Y_=l(P(),1);var UR=l(w(),1);function Rz({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=mt(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,UR.jsx)(LAe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function LAe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,Y_.useState)(null),[c,u]=(0,Y_.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,Y_.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,UR.jsx)(Hi,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,UR.jsx)(zfe.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(Co(r,"column-gap")),v=parseFloat(Co(r,"row-gap")),k=W_(Co(r,"grid-template-columns"),b),y=W_(Co(r,"grid-template-rows"),v),S=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),x=zc(k,S.left)+1,C=zc(y,S.top)+1,B=zc(k,S.right,"end")+1,I=zc(y,S.bottom,"end")+1;n({columnSpan:B-x+1,rowSpan:I-C+1,columnStart:i?x:void 0,rowStart:i?C:void 0})}})})}var ms=l(N(),1),Ik=l(A(),1);var jfe=l(F(),1),Ufe=l(Z(),1);var Ar=l(w(),1);function Oz({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,jfe.useDispatch)(_),a=e?.columnStart??1,c=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,m=c+d-1,h=t?.columnCount,p=t?.rowCount,g=op(r,h);return(0,Ar.jsx)(Mt,{group:"parent",children:(0,Ar.jsxs)(Ik.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Ar.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Ar.jsx)(q_,{icon:(0,ms.isRTL)()?Vo:Nr,label:(0,ms.__)("Move left"),description:(0,ms.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,Ar.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Ar.jsx)(q_,{className:"is-up-button",icon:yf,label:(0,ms.__)("Move up"),description:(0,ms.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,Ar.jsx)(q_,{className:"is-down-button",icon:Fn,label:(0,ms.__)("Move down"),description:(0,ms.__)("Move down"),isDisabled:p&&m>=p,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,Ar.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Ar.jsx)(q_,{icon:(0,ms.isRTL)()?Nr:Vo,label:(0,ms.__)("Move right"),description:(0,ms.__)("Move right"),isDisabled:h&&f>=h,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function q_({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,Ufe.useInstanceId)(q_)}`;return(0,Ar.jsxs)(Ar.Fragment,{children:[(0,Ar.jsx)(Ik.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,Ar.jsx)(Ik.VisuallyHidden,{id:a,children:i})]})}var Z_=l(F(),1),GR=l(P(),1),HR=l(Z(),1);function Az({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,Z_.useSelect)(m=>{let{getBlockAttributes:h,getBlockOrder:p}=m(_),g=m(_).getSelectedBlock();return{gridLayout:h(e).layout??{},blockOrder:p(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,Z_.useSelect)(_),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Z_.useDispatch)(_),c=(0,GR.useMemo)(()=>r?new sa(r):null,[r]),u=(0,HR.usePrevious)(c),d=(0,HR.usePrevious)(t.isManualPlacement),f=(0,HR.usePrevious)(o);(0,GR.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 sa({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:S=1}=b.style?.layout??{};if(v&&k)continue;let[x,C]=NAe(h,t.columnCount,y,S,u?.columnEnd,u?.rowEnd);h.push(new sa({columnStart:x,rowStart:C,columnSpan:y,rowSpan:S})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:x,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:S,columnSpan:x,rowSpan:C,...B}=k.style?.layout??{};if(y||S||x||C){let I=Object.keys(B).length===0;m[g]=pe(k,["style","layout"],I?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]=pe(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 NAe(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 sa({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var jc=l(w(),1),MAe={};function DAe({style:e}){let t=(0,Lz.useSelect)(g=>!g(_).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=zf()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,Hfe.useInstanceId)(MAe),h=`.wp-container-content-${m}`,p="";if(t&&(r==="fixed"&&n?p=`${h} {
flex-basis: ${n};
box-sizing: border-box;
}`:r==="fill"?p=`${h} {
flex-grow: 1;
}`:i&&a?p=`${h} {
grid-column: ${i} / span ${a};
}`:i?p=`${h} {
grid-column: ${i};
}`:a&&(p=`${h} {
grid-column: span ${a};
}`),s&&c?p+=`${h} {
grid-row: ${s} / span ${c};
}`:s?p+=`${h} {
grid-row: ${s};
}`:c&&(p+=`${h} {
grid-row: span ${c};
}`),(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,S=g*2+k-1,x=a&&a>1?"1/-1":"auto";p+=`@container (max-width: ${Math.max(y,S)}${b}) {
${h} {
grid-column: ${x};
grid-row: auto;
}
}`}if(Zn({css:p}),!!p)return{className:`wp-container-content-${m}`}}function VAe({clientId:e,style:t,setAttributes:o}){let r=zf()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,jc.jsx)(FAe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function FAe({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,Lz.useSelect)(y=>{let{getBlockRootClientId:S,getBlockEditingMode:x,getTemplateLock:C,getBlockAttributes:B,getSettings:I}=y(_),O=S(e);if(C(O)||x(O)!=="default")return{rootClientId:O,isVisible:!1};let E=B(O),L=B(e),T=I();return{rootClientId:O,isVisible:!0,parentBlockVisibility:E?.metadata?.blockVisibility,blockBlockVisibility:L?.metadata?.blockVisibility,deviceType:T?.[_i]?.toLowerCase()||Et.desktop.value,isChildBlockAGrid:L?.layout?.type==="grid"}},[e]),{isBlockCurrentlyHidden:m}=Ni({blockVisibility:c,deviceType:d}),{isBlockCurrentlyHidden:h}=Ni({blockVisibility:u,deviceType:d}),[p,g]=(0,Gfe.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)(K_,{clientId:s,contentRef:g,parentLayout:i,childGridClientId:b}),v&&(0,jc.jsx)(Rz,{clientId:e,bounds:p,onChange:k,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,jc.jsx)(Oz,{layout:t?.layout,parentLayout:i,onChange:k,gridClientId:s,blockClientId:e})]})}var Nz={useBlockProps:DAe,edit:VAe,attributeKeys:["style"],hasSupport(){return!0}};var Dz=l(rt(),1),Mz=l($(),1),Wfe="metadata";function zAe(e){return e?.attributes?.[Wfe]?.type||(e.attributes={...e.attributes,[Wfe]:{type:"object"}}),e}function jAe(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,Mz.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,Mz.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,Dz.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",zAe);(0,Dz.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",jAe);var Vz=l(N(),1),WR=l(P(),1),$R=l(A(),1),KR=l($(),1),Pk=l(F(),1);var cf=l(w(),1),UAe={};function HAe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,Pk.useSelect)(h=>h(KR.store).getBlockTypes(),[]),n=(0,WR.useMemo)(()=>r?.filter(({name:h,blockHooks:p})=>p&&e in p||o.includes(h)),[r,e,o]),i=(0,Pk.useSelect)(h=>{let{getBlocks:p,getBlockRootClientId:g,getGlobalBlockCount:b}=h(_),v=g(t),k=n.reduce((y,S)=>{if(b(S.name)===0)return y;let x=S?.blockHooks?.[e],C;switch(x){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(I=>I.name===S.name);return B?{...y,[S.name]:B.clientId}:y},{});return Object.values(k).length>0?k:UAe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,Pk.useSelect)(_),{insertBlock:u,removeBlock:d}=(0,Pk.useDispatch)(_);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,cf.jsx)(fe,{children:(0,cf.jsxs)($R.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,Vz.__)("Plugins"),initialOpen:!0,children:[(0,cf.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,Vz.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(h=>(0,cf.jsxs)(WR.Fragment,{children:[(0,cf.jsx)("h3",{children:h}),f[h].map(p=>{let g=p.name in i;return(0,cf.jsx)($R.ToggleControl,{checked:g,label:p.title,onChange:()=>{if(!g){let b=p.blockHooks[e];m((0,KR.createBlock)(p.name),b);return}d(i[p.name],!1)}},p.title)})]},h))]})})}var $fe={edit:HAe,attributeKeys:["metadata"],hasSupport(){return!0}};var Fz=l(N(),1),Kfe=l($(),1),Rk=l(A(),1),Yfe=l(F(),1),qfe=l(P(),1),Zfe=l(Z(),1);var uf=l(w(),1),GAe=()=>(0,Zfe.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},WAe=({name:e,metadata:t})=>{let o=(0,qfe.useContext)(cn),{removeAllBlockBindings:r}=Tl(),n=GAe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,Yfe.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(_).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=M(c(Kfe.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,uf.jsx)(fe,{group:"bindings",children:(0,uf.jsxs)(Rk.__experimentalToolsPanel,{label:(0,Fz.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,uf.jsx)(Rk.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,uf.jsx)(Gv,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,uf.jsx)(Rk.__experimentalText,{as:"div",variant:"muted",children:(0,uf.jsx)("p",{children:(0,Fz.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},Xfe={edit:WAe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var Qfe=l(N(),1),Jfe=l(A(),1),ZR=l(F(),1),X_=l($(),1),eme=l(P(),1);var YR=l(F(),1);function qR(e){let{isOpened:t,expandRevision:o}=(0,YR.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=M(i(_));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,YR.useDispatch)(_);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var Ok=l(w(),1),$Ae="listView";function tme(e){return(0,X_.hasBlockSupport)(e,$Ae)}function KAe({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,eme.useContext)(cr),{isOpened:r,expandRevision:n,handleToggle:i}=qR(e),{openListViewContentPanel:s}=M((0,ZR.useDispatch)(_)),a=tme(t),{hasChildren:c,isNestedListView:u}=(0,ZR.useSelect)(h=>{let{getBlockCount:p,getBlockParents:g,getBlockName:b}=h(_),k=g(e,!1).find(y=>{let S=b(y);return S==="core/navigation"||(0,X_.hasBlockSupport)(S,"listView")});return{hasChildren:!!p(e),isNestedListView:k}},[e]),f=(0,X_.getBlockType)(t)?.title||t;return!a||u?null:(0,Ok.jsx)(vm,{group:"list",children:(0,Ok.jsxs)(Jfe.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!c&&(0,Ok.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,Qfe.__)("No items yet.")}),(0,Ok.jsx)(LS,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var ome={edit:KAe,hasSupport:tme,attributeKeys:[],supportsPatternEditing:!0};var rme=l(rt(),1),nme=l($(),1);function YAe(e){return e.__experimentalLabel||(0,nme.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,rme.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",YAe);var ime=l(Z(),1),sme=l(rt(),1),ame=l(F(),1);var ps=l(w(),1);function qAe(e){Az(e)}function ZAe({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n,isAnyAncestorHidden:i}=(0,ame.useSelect)(a=>{let{isBlockSelected:c,hasSelectedInnerBlock:u,isDraggingBlocks:d,getTemplateLock:f,getBlockEditingMode:m,getBlockAttributes:h,getSettings:p}=a(_);if(!d()&&!c(e)||f(e)||m(e)!=="default"||u(e))return{isVisible:!1};let{isBlockParentHiddenAtViewport:g}=M(a(_)),b=h(e),k=p()?.[_i]?.toLowerCase()||Et.desktop.value;return{isVisible:!0,blockVisibility:b?.metadata?.blockVisibility,deviceType:k,isAnyAncestorHidden:g(e,k)}},[e]),{isBlockCurrentlyHidden:s}=Ni({blockVisibility:r,deviceType:n});return(0,ps.jsxs)(ps.Fragment,{children:[(0,ps.jsx)(qAe,{clientId:e}),o&&!s&&!i&&(0,ps.jsx)(K_,{clientId:e,parentLayout:t})]})}var XAe=(0,ime.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,ps.jsx)(e,{...o},"edit"):(0,ps.jsxs)(ps.Fragment,{children:[(0,ps.jsx)(ZAe,{clientId:o.clientId,layout:o.attributes.layout}),(0,ps.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,sme.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",XAe);var zz=l($(),1),cme=l(A(),1),ume=l(F(),1);var dme=l(P(),1),fme=l(N(),1);function lme(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=QAe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function QAe(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 XR=l(w(),1);function JAe(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function eLe({name:e,clientId:t,setAttributes:o}){let r=Mo(),n=(0,ume.useSelect)(c=>c(_).getBlockAttributes(t),[t]),i=(0,zz.getBlockType)(e),{fields:s,form:a}=(0,dme.useMemo)(()=>i?.attributes?lme(i.attributes):{fields:[],form:{fields:[]}},[i?.attributes]);return r!=="default"||!s||s.length===0?null:(0,XR.jsx)(fe,{children:(0,XR.jsx)(cme.PanelBody,{title:(0,fme.__)("Settings"),children:(0,XR.jsx)(M_,{data:n,fields:s,form:a,onChange:o})})})}var mme={edit:eLe,attributeKeys:[],hasSupport(e){let t=(0,zz.getBlockType)(e);return JAe(t?.attributes)}};function jz(e){let{style:t}=e,o=t?.dimensions||{},r=pi({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function QR(e){let t=e.style?.border||{};return{className:jF(e)||void 0,style:pi({border:t})}}function Uz(e){let{colors:t}=yd(),o=QR(e),{borderColor:r}=e;if(r){let n=sp({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function Hz(e){let t=e.style?.shadow||"";return{style:pi({shadow:t})}}var Gz=l(P(),1);function JR(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=yi("background-color",t),s=yi("color",o),a=oh(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=pi({color:d});return{className:u||void 0,style:f}}function Wz(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=me("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,Gz.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,Gz.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=JR(e);if(t){let h=ua(d,t);m.style.backgroundColor=h.color}if(r&&(m.style.background=Fw(f,r)),o){let h=ua(d,o);m.style.color=h.color}return m}function $z(e){let{style:t}=e,o=t?.spacing||{};return{style:pi({spacing:o})}}var pme=l(A(),1);var{kebabCase:tLe}=M(pme.privateApis);function Kz(e,t){let o=e?.style?.typography||{};o={...o,fontSize:tc({size:e?.style?.typography?.fontSize},t)};let r=pi({typography:o}),n=e?.fontFamily?`has-${tLe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:V(n,i,fu(e?.fontSize)),style:r}}var eO=l(P(),1);function Yz(e){let[t,o]=(0,eO.useState)(e);return(0,eO.useEffect)(()=>{e&&o(e)},[e]),t}ele([v2,TR,y4,cz,LR,VR,wz,PR,rV,Nfe,$fe,Xfe,Nz,wle,zde,ome,mme].filter(Boolean));tle([v2,TR,cae,LR,YF,vfe,wz,uz,fz,PR,UF,VR,rV,jX,Nz]);ole([v2,TR,y4,Tle,cz,UF,VR,PR,YF,LR,uz,fz]);var hme={button:"wp-element-button",caption:"wp-element-caption"},oLe=e=>hme[e]?hme[e]:"";var gme=()=>"";var Ak=l(P(),1),Q_=l($(),1),Zz=l(ur(),1);var bme=l(w(),1);function Xz(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return qz(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case Ak.StrictMode:case Ak.Fragment:return qz(n.children,t,o);case Ak.RawHTML:return;case Jy.Content:return kme(t,o);case t_:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?qz(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return Xz(i,t,o)}}function qz(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)Xz(e[o],...t)}function kme(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,Q_.getSaveElement)(r,n,(0,bme.jsx)(Jy.Content,{}));Xz(s,e,i)}}function vme(e=[]){Q_.__unstableGetBlockProps.skipFilters=!0;let t=[];return kme(t,e),Q_.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof Zz.RichTextData?o:Zz.RichTextData.fromHTMLString(o))}var yme=l(A(),1);var Qz=l(w(),1);function Sme({clientId:e,resizableBoxProps:t,...o}){return(0,Qz.jsx)(Hi,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,Qz.jsx)(yme.ResizableBox,{...t})})}var e0=l(P(),1),tO=l(F(),1),aa=l(A(),1),J_=l(N(),1);var hs=l(w(),1);function _me({rules:e}){let[t,o]=(0,e0.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,tO.useSelect)(p=>M(p(_)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:c}=M((0,tO.useDispatch)(_));if((0,e0.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,e0.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,hs.jsx)(aa.Modal,{title:(0,J_.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,hs.jsxs)(aa.__experimentalVStack,{spacing:4,children:[(0,hs.jsxs)("div",{children:[(0,hs.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,hs.jsxs)("p",{children:[i.warning&&(0,hs.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,hs.jsx)(aa.CheckboxControl,{label:(0,J_.__)("I understand the consequences"),checked:t,onChange:o}),(0,hs.jsxs)(aa.__experimentalHStack,{justify:"right",children:[(0,hs.jsx)(aa.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,J_.__)("Cancel")}),(0,hs.jsx)(aa.Button,{variant:"primary",onClick:h,disabled:m,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,J_.__)("Delete")})]})]})})}var Jz=l(P(),1);var Lk=l(A(),1),wme=l(P(),1),Dn=l(N(),1),oO=l(w(),1),xme=[{value:"fill",label:(0,Dn._x)("Fill","Scale option for dimensions control"),help:(0,Dn.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,Dn._x)("Contain","Scale option for dimensions control"),help:(0,Dn.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,Dn._x)("Cover","Scale option for dimensions control"),help:(0,Dn.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,Dn._x)("None","Scale option for dimensions control"),help:(0,Dn.__)("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,Dn._x)("Scale down","Scale option for dimensions control"),help:(0,Dn.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function Cme({panelId:e,value:t,onChange:o,options:r=xme,defaultValue:n=xme[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,wme.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,oO.jsx)(Lk.__experimentalToolsPanelItem,{label:(0,Dn.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,oO.jsx)(Lk.__experimentalToggleGroupControl,{label:(0,Dn.__)("Scale"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,oO.jsx)(Lk.__experimentalToggleGroupControlOption,{...c},c.value))})})}var Nk=l(A(),1),wp=l(N(),1),Uc=l(w(),1);function Bme({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,Uc.jsxs)(Uc.Fragment,{children:[(0,Uc.jsx)(Nk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,wp.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,Uc.jsx)(Nk.__experimentalUnitControl,{label:(0,wp.__)("Width"),placeholder:(0,wp.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,Uc.jsx)(Nk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,wp.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,Uc.jsx)(Nk.__experimentalUnitControl,{label:(0,wp.__)("Height"),placeholder:(0,wp.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var df=l(w(),1);function rLe({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,Jz.useState)(m),[g,b]=(0,Jz.useState)(f),v=u&&d?"custom":g,k=f||u&&d;return(0,df.jsxs)(df.Fragment,{children:[c.includes("aspectRatio")&&(0,df.jsx)(PP,{panelId:e,options:r,defaultValue:n,value:v,onChange:y=>{let S={...t};y=y==="auto"?null:y,b(y),y?S.aspectRatio=y:delete S.aspectRatio,y?h?S.scale=h:(S.scale=s,p(s)):delete S.scale,y!=="custom"&&u&&d&&delete S.height,o(S)}}),c.includes("widthHeight")&&(0,df.jsx)(Bme,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:y,height:S})=>{let x={...t};y=y==="auto"?null:y,S=S==="auto"?null:S,y?x.width=y:delete x.width,S?x.height=S:delete x.height,y&&S?delete x.aspectRatio:g&&(x.aspectRatio=g),!g&&!!y!=!!S?delete x.scale:h?x.scale=h:(x.scale=s,p(s)),o(x)}}),c.includes("scale")&&k&&(0,df.jsx)(Cme,{panelId:e,options:i,defaultValue:s,value:h,onChange:y=>{let S={...t};y=y==="fill"?null:y,p(y),y?S.scale=y:delete S.scale,o(S)}})]})}var Eme=rLe;var rO=l(A(),1),Hc=l(N(),1),e6=l(w(),1),Tme=[{label:(0,Hc._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,Hc._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,Hc._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,Hc._x)("Full Size","Image size option for resolution control"),value:"full"}];function Ime({panelId:e,value:t,onChange:o,options:r=Tme,defaultValue:n=Tme[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,e6.jsx)(rO.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,Hc.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,e6.jsx)(rO.SelectControl,{label:(0,Hc.__)("Resolution"),value:a,options:r,onChange:o,help:(0,Hc.__)("Select the size of the source image."),size:"__unstable-large"})})}var Cp=l(N(),1),Mk=l(A(),1),Rme=l(F(),1);var la=l(N(),1),Pme={a:(0,la.__)("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,la.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,la.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,la.__)("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,la.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,la.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,la.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,la.__)("The <main> element should be used for the primary content of your document only."),nav:(0,la.__)("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,la.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var t0=l(w(),1);function Ome({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,Cp.__)("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,Rme.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:c,getBlockAttributes:u}=a(_);return c().some(d=>d===o?!1:u(d)?.tagName==="main")},[o,n]),s=r.map(a=>a.value==="main"&&i&&e!=="main"?{...a,disabled:!0,label:(0,Cp.sprintf)((0,Cp.__)("%s (Already in use)"),a.label)}:a);return(0,t0.jsxs)(Mk.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,t0.jsx)(Mk.SelectControl,{__next40pxDefaultSize:!0,label:(0,Cp.__)("HTML element"),options:s,value:e,onChange:t,help:Pme[e]}),e==="main"&&i&&(0,t0.jsx)(Mk.Notice,{status:"warning",isDismissible:!1,children:(0,Cp.__)("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 gs=l(A(),1),Dk=l(P(),1),nO=l(N(),1);var Vn=l(A(),1);var gi=l(w(),1),{Badge:nLe}=M(Vn.privateApis);function Ame({title:e,url:t,image:o,badges:r}){return(0,gi.jsxs)(Vn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,gi.jsx)(Vn.FlexItem,{className:"link-preview-button__content",children:(0,gi.jsxs)(Vn.__experimentalHStack,{alignment:"top",children:[o&&(0,gi.jsx)(Vn.FlexItem,{className:"link-preview-button__image-container",children:(0,gi.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,gi.jsxs)(Vn.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,gi.jsx)(Vn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:e}),t&&(0,gi.jsx)(Vn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,gi.jsx)(Vn.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,gi.jsx)(nLe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,gi.jsx)(xe,{icon:Fn,className:"link-preview-button__icon"})]})}var bi=l(w(),1);function t6({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,Dk.useState)(!1),a=(0,Dk.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,Dk.useRef)(null),{baseControlProps:f,controlProps:m}=(0,gs.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,bi.jsxs)(gs.BaseControl,{...f,children:[(0,bi.jsx)(gs.BaseControl.VisualLabel,{children:r}),(0,bi.jsxs)(gs.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,bi.jsxs)(gs.VisuallyHidden,{children:[r,":"]}),(0,bi.jsx)(Ame,{title:e.title||(0,nO.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,bi.jsx)(gs.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,bi.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,bi.jsxs)(gs.VisuallyHidden,{children:[(0,bi.jsx)("h2",{id:c,children:(0,nO.__)("Select a link")}),(0,bi.jsx)("p",{id:u,children:(0,nO.__)("Search for and add a link to the navigation item.")})]}),(0,bi.jsx)(Bd,{value:null,onChange:h,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var o6={};x6(o6,{...VF,ExperimentalBlockCanvas:ZV,BlockCanvasCover:kT,ExperimentalBlockEditorProvider:Ih,getDuotoneFilter:NR,getRichTextValues:vme,PrivateQuickInserter:CB,extractWords:Hw,getNormalizedSearchTerms:Dv,normalizeString:Mv,PrivateListView:LS,ResizableBoxPopover:Sme,InspectorControlsLastItem:m2,useHasBlockToolbar:WE,cleanEmptyObject:Ne,usePrivateStyleOverride:oc,BlockQuickNavigation:d2,LayoutStyle:nH,BlockManager:S2,BlockRemovalWarningModal:_me,useLayoutClasses:jR,useLayoutStyles:Iz,DimensionsTool:Eme,ResolutionTool:Ime,TabbedSidebar:SB,TextAlignmentControl:CP,usesContextKey:fF,useFlashEditableBlocks:QC,HTMLElementControl:Ome,useZoomOut:Uy,globalStylesDataKey:Si,globalStylesLinksDataKey:g0,selectBlockPatternsKey:qc,requiresWrapperOnCopy:RD,PrivateRichText:o_,PrivateInserterLibrary:t4,reusableBlocksSelectKey:b0,PrivateBlockPopover:fm,PrivatePublishDateTimePicker:c4,useSpacingSizes:aP,useBlockDisplayTitle:Fr,__unstableBlockStyleVariationOverridesWithConfig:NV,setBackgroundStyleDefaults:o2,sectionRootClientIdKey:Zc,CommentIconSlotFill:SE,CommentIconToolbarSlotFill:VE,mediaEditKey:k0,getMediaSelectKey:v0,deviceTypeKey:_i,isIsolatedEditorKey:Np,isNavigationOverlayContextKey:y0,useBlockElement:mt,useBlockElementRef:Gf,LinkPicker:t6,useRemoteUrlData:RI,PrivateBlockContext:cr,useListViewPanelState:qR,isHashLink:mf,isRelativePath:pf});return jme(iLe);})();
/*! Bundled license information:
autosize/dist/autosize.js:
(*!
autosize 4.0.2
license: MIT
http://www.jacklmoore.com/autosize
*)
normalize-wheel/src/isEventSupported.js:
(**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*)
*/
No other release has this exact content. See every version of this file.