PluginProbe
Gutenberg / 23.5.1
Gutenberg v23.5.1
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / scripts / block-editor / index.min.js

index.min.js in Gutenberg 23.5.1, at build/scripts/block-editor/index.min.js

271 lines 1.2 MB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";var wp;(wp||={}).blockEditor=(()=>{var Iwe=Object.create;var rC=Object.defineProperty;var Owe=Object.getOwnPropertyDescriptor;var Awe=Object.getOwnPropertyNames;var Lwe=Object.getPrototypeOf,Mwe=Object.prototype.hasOwnProperty;var ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xs=(e,t)=>{for(var o in t)rC(e,o,{get:t[o],enumerable:!0})},r9=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Awe(t))!Mwe.call(e,n)&&n!==o&&rC(e,n,{get:()=>t[n],enumerable:!(r=Owe(t,n))||r.enumerable});return e};var c=(e,t,o)=>(o=e!=null?Iwe(Lwe(e)):{},r9(t||!e||!e.__esModule?rC(o,"default",{value:e,enumerable:!0}):o,e)),Nwe=e=>r9(rC({},"__esModule",{value:!0}),e);var ee=ae((V7e,i9)=>{i9.exports=window.wp.blocks});var L=ae((F7e,s9)=>{s9.exports=window.wp.element});var W=ae((z7e,a9)=>{a9.exports=window.wp.data});var te=ae((j7e,l9)=>{l9.exports=window.wp.compose});var zt=ae((H7e,c9)=>{c9.exports=window.wp.hooks});var D=ae((K7e,k9)=>{k9.exports=window.wp.components});var cC=ae((Y7e,S9)=>{S9.exports=window.wp.privateApis});var Xe=ae((t9e,E9)=>{E9.exports=window.wp.deprecated});var C=ae((o9e,T9)=>{T9.exports=window.ReactJSXRuntime});var ji=ae((n9e,P9)=>{P9.exports=window.wp.url});var z=ae((h9e,M9)=>{M9.exports=window.wp.i18n});var hp=ae((g9e,N9)=>{"use strict";N9.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 ne=ae((E9e,Y9)=>{Y9.exports=window.wp.primitives});var Qr=ae((KKe,q9)=>{q9.exports=window.wp.richText});var X9=ae((YKe,Z9)=>{Z9.exports=window.wp.blockSerializationDefaultParser});var _r=ae((wYe,MG)=>{MG.exports=window.wp.a11y});var Wi=ae((CYe,zG)=>{zG.exports=window.wp.notices});var tb=ae((EYe,jG)=>{jG.exports=window.wp.preferences});var wW=ae((Cqe,WE)=>{var SW={\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"},_W=Object.keys(SW).join("|"),lBe=new RegExp(_W,"g"),cBe=new RegExp(_W,"");function uBe(e){return SW[e]}var xW=function(e){return e.replace(lBe,uBe)},dBe=function(e){return!!e.match(cBe)};WE.exports=xW;WE.exports.has=dBe;WE.exports.remove=xW});var f_=ae((gZe,QW)=>{QW.exports=window.wp.styleEngine});var Pt=ae((gXe,S$)=>{S$.exports=window.wp.keycodes});var at=ae((MXe,M$)=>{M$.exports=window.wp.dom});var pe=ae((eQe,q$)=>{q$.exports=window.React});var X$=ae((tQe,Z$)=>{"use strict";var iPe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Z$.exports=iPe});var tK=ae((oQe,eK)=>{"use strict";var sPe=X$();function Q$(){}function J$(){}J$.resetWarningCache=Q$;eK.exports=function(){function e(r,n,i,s,a,l){if(l!==sPe){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:J$,resetWarningCache:Q$};return o.PropTypes=o,o}});var rK=ae((iQe,oK)=>{oK.exports=tK()();var rQe,nQe});var iK=ae((kT,nK)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof kT<"u")t(nK,kT);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(kT,function(e,t){"use strict";var o=typeof Map=="function"?new Map:(function(){var l=[],u=[];return{has:function(f){return l.indexOf(f)>-1},get:function(f){return u[l.indexOf(f)]},set:function(f,m){l.indexOf(f)===-1&&(l.push(f),u.push(m))},delete:function(f){var m=l.indexOf(f);m>-1&&(l.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(l){if(!l||!l.nodeName||l.nodeName!=="TEXTAREA"||o.has(l))return;var u=null,d=null,f=null;function m(){var S=window.getComputedStyle(l,null);S.resize==="vertical"?l.style.resize="none":S.resize==="both"&&(l.style.resize="horizontal"),S.boxSizing==="content-box"?u=-(parseFloat(S.paddingTop)+parseFloat(S.paddingBottom)):u=parseFloat(S.borderTopWidth)+parseFloat(S.borderBottomWidth),isNaN(u)&&(u=0),b()}function h(S){{var k=l.style.width;l.style.width="0px",l.offsetWidth,l.style.width=k}l.style.overflowY=S}function p(S){for(var k=[];S&&S.parentNode&&S.parentNode instanceof Element;)S.parentNode.scrollTop&&k.push({node:S.parentNode,scrollTop:S.parentNode.scrollTop}),S=S.parentNode;return k}function g(){if(l.scrollHeight!==0){var S=p(l),k=document.documentElement&&document.documentElement.scrollTop;l.style.height="",l.style.height=l.scrollHeight+u+"px",d=l.clientWidth,S.forEach(function(_){_.node.scrollTop=_.scrollTop}),k&&(document.documentElement.scrollTop=k)}}function b(){g();var S=Math.round(parseFloat(l.style.height)),k=window.getComputedStyle(l,null),_=k.boxSizing==="content-box"?Math.round(parseFloat(k.height)):l.offsetHeight;if(_<S?k.overflowY==="hidden"&&(h("scroll"),g(),_=k.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(l,null).height)):l.offsetHeight):k.overflowY!=="hidden"&&(h("hidden"),g(),_=k.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(l,null).height)):l.offsetHeight),f!==_){f=_;var x=r("autosize:resized");try{l.dispatchEvent(x)}catch{}}}var v=function(){l.clientWidth!==d&&b()},y=function(S){window.removeEventListener("resize",v,!1),l.removeEventListener("input",b,!1),l.removeEventListener("keyup",b,!1),l.removeEventListener("autosize:destroy",y,!1),l.removeEventListener("autosize:update",b,!1),Object.keys(S).forEach(function(k){l.style[k]=S[k]}),o.delete(l)}.bind(l,{height:l.style.height,resize:l.style.resize,overflowY:l.style.overflowY,overflowX:l.style.overflowX,wordWrap:l.style.wordWrap});l.addEventListener("autosize:destroy",y,!1),"onpropertychange"in l&&"oninput"in l&&l.addEventListener("keyup",b,!1),window.addEventListener("resize",v,!1),l.addEventListener("input",b,!1),l.addEventListener("autosize:update",b,!1),l.style.overflowX="hidden",l.style.wordWrap="break-word",o.set(l,{destroy:y,update:b}),m()}function i(l){var u=o.get(l);u&&u.destroy()}function s(l){var u=o.get(l);u&&u.update()}var a=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(a=function(u){return u},a.destroy=function(l){return l},a.update=function(l){return l}):(a=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},a.destroy=function(l){return l&&Array.prototype.forEach.call(l.length?l:[l],i),l},a.update=function(l){return l&&Array.prototype.forEach.call(l.length?l:[l],s),l}),t.default=a,e.exports=t.default})});var aK=ae((sQe,sK)=>{var aPe=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};sK.exports=aPe});var cK=ae((aQe,lK)=>{var FF=aK();function lPe(e){var t=FF(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=FF(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="&nbsp;",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=FF(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i);var l=i.offsetHeight;o=l,a.removeChild(i)}return o}lK.exports=lPe});var dK=ae(Yc=>{"use strict";var cPe=Yc&&Yc.__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)}})(),zF=Yc&&Yc.__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},uPe=Yc&&Yc.__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};Yc.__esModule=!0;var _T=pe(),S_=rK(),ST=iK(),dPe=cK(),fPe=dPe,uK="autosize:resized",mPe=(function(e){cPe(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:fPe(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&&ST(o.textarea)}):this.textarea&&ST(this.textarea),this.textarea&&this.textarea.addEventListener(uK,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(uK,this.onResize),ST.destroy(this.textarea))},t.prototype.render=function(){var o=this,r=this,n=r.props,i=n.onResize,s=n.maxRows,a=n.onChange,l=n.style,u=n.innerRef,d=n.children,f=uPe(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,h=s&&m?m*s:null;return _T.createElement("textarea",zF({},f,{onChange:this.onChange,style:h?zF({},l,{maxHeight:h}):l,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&&ST.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:S_.number,maxRows:S_.number,onResize:S_.func,innerRef:S_.any,async:S_.bool},t})(_T.Component);Yc.TextareaAutosize=_T.forwardRef(function(e,t){return _T.createElement(mPe,zF({},e,{innerRef:t}))})});var jF=ae((cQe,fK)=>{"use strict";var pPe=dK();fK.exports=pPe.TextareaAutosize});var __=ae((fQe,gK)=>{gK.exports=window.wp.warning});var Zc=ae((RQe,fY)=>{fY.exports=window.ReactDOM});var Ma=ae((sJe,zY)=>{zY.exports=window.wp.keyboardShortcuts});var rq=ae((pet,oq)=>{oq.exports=window.wp.htmlEntities});var UZ=ae(HZ=>{"use strict";var Wb=pe();function VOe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FOe=typeof Object.is=="function"?Object.is:VOe,zOe=Wb.useState,jOe=Wb.useEffect,HOe=Wb.useLayoutEffect,UOe=Wb.useDebugValue;function GOe(e,t){var o=t(),r=zOe({inst:{value:o,getSnapshot:t}}),n=r[0].inst,i=r[1];return HOe(function(){n.value=o,n.getSnapshot=t,p4(n)&&i({inst:n})},[e,o,t]),jOe(function(){return p4(n)&&i({inst:n}),e(function(){p4(n)&&i({inst:n})})},[e]),UOe(o),o}function p4(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!FOe(e,o)}catch{return!0}}function WOe(e,t){return t()}var $Oe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?WOe:GOe;HZ.useSyncExternalStore=Wb.useSyncExternalStore!==void 0?Wb.useSyncExternalStore:$Oe});var h4=ae((Urt,GZ)=>{"use strict";GZ.exports=UZ()});var $Z=ae(WZ=>{"use strict";var DB=pe(),KOe=h4();function YOe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qOe=typeof Object.is=="function"?Object.is:YOe,ZOe=KOe.useSyncExternalStore,XOe=DB.useRef,QOe=DB.useEffect,JOe=DB.useMemo,e2e=DB.useDebugValue;WZ.useSyncExternalStoreWithSelector=function(e,t,o,r,n){var i=XOe(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=JOe(function(){function l(h){if(!u){if(u=!0,d=h,h=r(h),n!==void 0&&s.hasValue){var p=s.value;if(n(p,h))return f=p}return f=h}if(p=f,qOe(d,h))return p;var g=r(h);return n!==void 0&&n(p,g)?(d=h,p):(d=h,f=g)}var u=!1,d,f,m=o===void 0?null:o;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,o,r,n]);var a=ZOe(e,i[0],i[1]);return QOe(function(){s.hasValue=!0,s.value=a},[a]),e2e(a),a}});var YZ=ae((Wrt,KZ)=>{"use strict";KZ.exports=$Z()});var oJ=ae((Eut,tJ)=>{tJ.exports=window.wp.theme});var NJ=ae((Pdt,MJ)=>{MJ.exports=window.wp.uploadMedia});var IP=ae(()=>{});var OP=ae(()=>{});var Rz=ae(()=>{});var qee=ae((rmt,Yee)=>{var pLe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",hLe=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},gLe=(e=21)=>{let t="",o=e|0;for(;o--;)t+=pLe[Math.random()*64|0];return t};Yee.exports={nanoid:gLe,customAlphabet:hLe}});var Iz=ae(()=>{});var Xee=ae((smt,Oz)=>{var ze=String,Zee=function(){return{isColorSupported:!1,reset:ze,bold:ze,dim:ze,italic:ze,underline:ze,inverse:ze,hidden:ze,strikethrough:ze,black:ze,red:ze,green:ze,yellow:ze,blue:ze,magenta:ze,cyan:ze,white:ze,gray:ze,bgBlack:ze,bgRed:ze,bgGreen:ze,bgYellow:ze,bgBlue:ze,bgMagenta:ze,bgCyan:ze,bgWhite:ze,blackBright:ze,redBright:ze,greenBright:ze,yellowBright:ze,blueBright:ze,magentaBright:ze,cyanBright:ze,whiteBright:ze,bgBlackBright:ze,bgRedBright:ze,bgGreenBright:ze,bgYellowBright:ze,bgBlueBright:ze,bgMagentaBright:ze,bgCyanBright:ze,bgWhiteBright:ze}};Oz.exports=Zee();Oz.exports.createColors=Zee});var AP=ae((amt,ete)=>{"use strict";var Qee=Xee(),Jee=Iz(),vx=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=Qee.isColorSupported),Jee&&t&&(o=Jee(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,l;if(t){let{bold:u,gray:d,red:f}=Qee.createColors(!0);a=m=>u(f(m)),l=m=>d(m)}else a=l=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=l(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(m)+u+`
2 `+h+a("^")}return" "+l(m)+u}).join(`
3 `)}toString(){let t=this.showSourceCode();return t&&(t=`
4
5 `+t+`
6 `),this.name+": "+this.message+t}};ete.exports=vx;vx.default=vx});var tte=ae(()=>{});var ite=ae((umt,nte)=>{"use strict";var{SourceMapConsumer:ote,SourceMapGenerator:rte}=IP(),{existsSync:bLe,readFileSync:yLe}=tte(),{dirname:Az,join:vLe}=OP();function kLe(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var kx=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=Az(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new ote(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 kLe(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=Az(t),bLe(t))return this.mapFile=t,yLe(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 ote)return rte.fromSourceMap(o).toString();if(o instanceof rte)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=vLe(Az(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)}};nte.exports=kx;kx.default=kx});var Vz=ae((dmt,cte)=>{"use strict";var{SourceMapConsumer:SLe,SourceMapGenerator:_Le}=IP(),{fileURLToPath:ste,pathToFileURL:LP}=Rz(),{isAbsolute:Nz,resolve:Dz}=OP(),{nanoid:xLe}=qee(),Lz=Iz(),ate=AP(),wLe=ite(),Mz=Symbol("fromOffsetCache"),CLe=!!(SLe&&_Le),lte=!!(Dz&&Nz),py=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&&(!lte||/^\w+:\/\//.test(o.from)||Nz(o.from)?this.file=o.from:this.file=Dz(o.from)),lte&&CLe){let r=new wLe(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 "+xLe(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 l=this.origin(o,r,s,a);return l?i=new ate(t,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,n.plugin):i=new ate(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&&(LP&&(i.input.url=LP(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[Mz])r=this[Mz];else{let i=this.css.split(`
7 `);r=new Array(i.length);let s=0;for(let a=0,l=i.length;a<l;a++)r[a]=s,s+=i[a].length+1;this[Mz]=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:Dz(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 l;Nz(s.source)?l=LP(s.source):l=new URL(s.source,this.map.consumer().sourceRoot||LP(this.map.mapFile));let u={column:s.column,endColumn:a&&a.column,endLine:a&&a.line,line:s.line,url:l.toString()};if(l.protocol==="file:")if(ste)u.file=ste(l);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}};cte.exports=py;py.default=py;Lz&&Lz.registerInput&&Lz.registerInput(py)});var zz=ae((fmt,hte)=>{"use strict";var{SourceMapConsumer:dte,SourceMapGenerator:MP}=IP(),{dirname:NP,relative:fte,resolve:mte,sep:pte}=OP(),{pathToFileURL:ute}=Rz(),ELe=Vz(),TLe=!!(dte&&MP),BLe=!!(NP&&mte&&fte&&pte),Fz=class{constructor(t,o,r,n){this.stringify=t,this.mapOpts=r.map||{},this.root=o,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let o=`
8 `;this.css.includes(`\r
9 `)&&(o=`\r
10 `),this.css+=o+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let o=this.toUrl(this.path(t.file)),r=t.root||NP(t.file),n;this.mapOpts.sourcesContent===!1?(n=new dte(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(),BLe&&TLe&&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=MP.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new MP({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 MP({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,l,u)=>{if(this.css+=a,l&&u!=="end"&&(n.generated.line=t,n.generated.column=o-1,l.source&&l.source.start?(n.source=this.sourcePath(l),n.original.line=l.source.start.line,n.original.column=l.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=a.match(/\n/g),i?(t+=i.length,s=a.lastIndexOf(`
11 `),o=a.length-s):o+=a.length,l&&u!=="start"){let d=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(n.source=this.sourcePath(l),n.original.line=l.source.end.line,n.original.column=l.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?NP(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=NP(mte(r,this.mapOpts.annotation)));let n=fte(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 ELe(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(ute){let r=ute(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;pte==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};hte.exports=Fz});var jz=ae((mmt,bte)=>{"use strict";var gte={after:`
12 `,beforeClose:`
13 `,beforeComment:`
14 `,beforeDecl:`
15 `,beforeOpen:" ",beforeRule:`
16 `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function PLe(e){return e[0].toUpperCase()+e.slice(1)}var Sx=class{constructor(t){this.builder=t}atrule(t,o){let r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{let i=(t.raws.between||"")+(o?";":"");this.builder(r+n+i,t)}}beforeAfter(t,o){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):o==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let n=t.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
17 `)){let s=this.raw(t,null,"indent");if(s.length)for(let a=0;a<i;a++)r+=s}return r}block(t,o){let r=this.raw(t,"between","beforeOpen");this.builder(o+r+"{",t,"start");let n;t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let o=t.nodes.length-1;for(;o>0&&t.nodes[o].type==="comment";)o-=1;let r=this.raw(t,"semicolon");for(let n=0;n<t.nodes.length;n++){let i=t.nodes[n],s=this.raw(i,"before");s&&this.builder(s),this.stringify(i,o!==n||r)}}comment(t){let o=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+o+t.text+r+"*/",t)}decl(t,o){let r=this.raw(t,"between","colon"),n=t.prop+r+this.rawValue(t,"value");t.important&&(n+=t.raws.important||" !important"),o&&(n+=";"),this.builder(n,t)}document(t){this.body(t)}raw(t,o,r){let n;if(r||(r=o),o&&(n=t.raws[o],typeof n<"u"))return n;let i=t.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return gte[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"+PLe(r);this[a]?n=this[a](s,t):s.walk(l=>{if(n=l.raws[o],typeof n<"u")return!1})}return typeof n>"u"&&(n=gte[r]),s.rawCache[r]=n,n}rawBeforeClose(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return o=r.raws.after,o.includes(`
18 `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(t,o){let r;return t.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
19 `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,o){let r;return t.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
20 `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let o;return t.walk(r=>{if(r.type!=="decl"&&(o=r.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(t){let o;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return o=r.raws.before,o.includes(`
21 `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(t){let o;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return o=r.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(o=r.raws.after,typeof o<"u"))return!1}),o}rawIndent(t){if(t.raws.indent)return t.raws.indent;let o;return t.walk(r=>{let n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
22 `);return o=i[i.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(o=r.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(t,o){let r=t[o],n=t.raws[o];return n&&n.value===r?n.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,o){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,o)}};bte.exports=Sx;Sx.default=Sx});var DP=ae((pmt,yte)=>{"use strict";var RLe=jz();function Hz(e,t){new RLe(t).stringify(e)}yte.exports=Hz;Hz.default=Hz});var Uz=ae((hmt,kte)=>{"use strict";var vte={};kte.exports=function(t){vte[t]||(vte[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var VP=ae((gmt,Gz)=>{"use strict";Gz.exports.isClean=Symbol("isClean");Gz.exports.my=Symbol("my")});var zP=ae((bmt,Ste)=>{"use strict";var{isClean:FP,my:ILe}=VP(),OLe=AP(),ALe=jz(),LLe=DP();function Wz(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=>Wz(s,o)):(i==="object"&&n!==null&&(n=Wz(n)),o[r]=n)}return o}var _x=class{constructor(t={}){this.raws={},this[FP]=!1,this[ILe]=!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=Wz(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 OLe(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[FP]){this[FP]=!1;let t=this;for(;t=t.parent;)t[FP]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,o){let r=this.source.start;if(t.index)r=this.positionInside(t.index,o);else if(t.word){o=this.toString();let n=o.indexOf(t.word);n!==-1&&(r=this.positionInside(n,o))}return r}positionInside(t,o){let r=o||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let s=0;s<t;s++)r[s]===`
23 `?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let o={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:o.column+1,line:o.line};if(t.word){let n=this.toString(),i=n.indexOf(t.word);i!==-1&&(o=this.positionInside(i,n),r=this.positionInside(i+t.word.length,n))}else t.start?o={column:t.start.column,line:t.start.line}:t.index&&(o=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<o.line||r.line===o.line&&r.column<=o.column)&&(r={column:o.column+1,line:o.line}),{end:r,start:o}}raw(t,o){return new ALe().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(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,o):l);else if(typeof a=="object"&&a.toJSON)r[s]=a.toJSON(null,o);else if(s==="source"){let l=o.get(a.input);l==null&&(l=i,o.set(a.input,i),i++),r[s]={end:a.end,inputId:l,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=LLe){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}};Ste.exports=_x;_x.default=_x});var $z=ae((ymt,_te)=>{"use strict";var MLe=zP(),xx=class extends MLe{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]==="$"}};_te.exports=xx;xx.default=xx});var Kz=ae((vmt,xte)=>{"use strict";var NLe=zP(),wx=class extends NLe{constructor(t){super(t),this.type="comment"}};xte.exports=wx;wx.default=wx});var ch=ae((kmt,Ote)=>{"use strict";var{isClean:wte,my:Cte}=VP(),Ete=$z(),Tte=Kz(),DLe=zP(),Bte,Yz,qz,Pte;function Rte(e){return e.map(t=>(t.nodes&&(t.nodes=Rte(t.nodes)),delete t.source,t))}function Ite(e){if(e[wte]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Ite(t)}var Ka=class e extends DLe{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=Rte(Bte(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 Ete(t)]}else if(t.selector)t=[new Yz(t)];else if(t.name)t=[new qz(t)];else if(t.text)t=[new Tte(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[Cte]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[wte]&&Ite(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]}};Ka.registerParse=e=>{Bte=e};Ka.registerRule=e=>{Yz=e};Ka.registerAtRule=e=>{qz=e};Ka.registerRoot=e=>{Pte=e};Ote.exports=Ka;Ka.default=Ka;Ka.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,qz.prototype):e.type==="rule"?Object.setPrototypeOf(e,Yz.prototype):e.type==="decl"?Object.setPrototypeOf(e,Ete.prototype):e.type==="comment"?Object.setPrototypeOf(e,Tte.prototype):e.type==="root"&&Object.setPrototypeOf(e,Pte.prototype),e[Cte]=!0,e.nodes&&e.nodes.forEach(t=>{Ka.rebuild(t)})}});var Mte=ae((Smt,Lte)=>{"use strict";var jP=/[\t\n\f\r "#'()/;[\\\]{}]/g,HP=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,VLe=/.[\r\n"'(/\\]/,Ate=/[\da-f]/i;Lte.exports=function(t,o={}){let r=t.css.valueOf(),n=o.ignoreErrors,i,s,a,l,u,d,f,m,h,p,g=r.length,b=0,v=[],y=[];function S(){return b}function k(B){throw t.error("Unclosed "+B,b)}function _(){return y.length===0&&b>=g}function x(B){if(y.length)return y.pop();if(b>=g)return;let P=B?B.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 T=String.fromCharCode(i);p=[T,T,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||P){s=b;break}else k("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),l=r.slice(b,s+1),s===-1||VLe.test(l)?p=["(","(",b]:(p=["brackets",l,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||P){s=b+1;break}else k("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:{jP.lastIndex=b+1,jP.test(r),jP.lastIndex===0?s=r.length-1:s=jP.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,Ate.test(r.charAt(s)))){for(;Ate.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||P?s=r.length:k("comment")),p=["comment",r.slice(b,s+1),b,s],b=s):(HP.lastIndex=b+1,HP.test(r),HP.lastIndex===0?s=r.length-1:s=HP.lastIndex-2,p=["word",r.slice(b,s+1),b,s],v.push(p),b=s);break}}return b++,p}function E(B){y.push(B)}return{back:E,endOfFile:_,nextToken:x,position:S}}});var Vte=ae((_mt,Dte)=>{"use strict";var Nte=ch(),hy=class extends Nte{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)}};Dte.exports=hy;hy.default=hy;Nte.registerAtRule(hy)});var UP=ae((xmt,Hte)=>{"use strict";var Fte=ch(),zte,jte,Cf=class extends Fte{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 zte(new jte,this,t).stringify()}};Cf.registerLazyResult=e=>{zte=e};Cf.registerProcessor=e=>{jte=e};Hte.exports=Cf;Cf.default=Cf;Fte.registerRoot(Cf)});var Gte=ae((wmt,Ute)=>{"use strict";var Cx={comma(e){return Cx.split(e,[","],!0)},space(e){let t=[" ",`
24 `," "];return Cx.split(e,t)},split(e,t,o){let r=[],n="",i=!1,s=0,a=!1,l="",u=!1;for(let d of e)u?u=!1:d==="\\"?u=!0:a?d===l&&(a=!1):d==='"'||d==="'"?(a=!0,l=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}};Ute.exports=Cx;Cx.default=Cx});var Kte=ae((Cmt,$te)=>{"use strict";var Wte=ch(),FLe=Gte(),gy=class extends Wte{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return FLe.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)}};$te.exports=gy;gy.default=gy;Wte.registerRule(gy)});var Xte=ae((Emt,Zte)=>{"use strict";var zLe=$z(),jLe=Mte(),HLe=Kz(),ULe=Vte(),GLe=UP(),Yte=Kte(),qte={empty:!0,space:!0};function WLe(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var Zz=class{constructor(t){this.input=t,this.root=new GLe,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 ULe;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,l=[],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(l.length>0){for(i=l.length-1,n=l[i];n&&n[0]==="space";)n=l[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(t);break}else l.push(t);else l.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),s&&(t=l[l.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 HLe;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=jLe(this.input)}decl(t,o){let r=new zLe;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]||WLe(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 Yte;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("--"),l=[],u=t;for(;u;){if(r=u[0],l.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(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.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(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,l="",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",!qte[f]&&!qte[d]?l.slice(-1)===","?u=!1:l+=i[1]:u=!1):l+=i[1];if(!u){let m=r.reduce((h,p)=>h+p[1],"");t.raws[o]={raw:m,value:l}}t[o]=l}rule(t){t.pop();let o=new Yte;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})}};Zte.exports=Zz});var Xz=ae((Tmt,Qte)=>{"use strict";var $Le=ch(),KLe=Xte(),YLe=Vz();function GP(e,t){let o=new YLe(e,t),r=new KLe(o);try{r.parse()}catch(n){throw n}return r.root}Qte.exports=GP;GP.default=GP;$Le.registerParse(GP)});var eoe=ae((Bmt,Jte)=>{"use strict";var Ex=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}};Jte.exports=Ex;Ex.default=Ex});var Qz=ae((Pmt,toe)=>{"use strict";var qLe=eoe(),Tx=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 qLe(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};toe.exports=Tx;Tx.default=Tx});var roe=ae((Imt,ooe)=>{"use strict";var ZLe=zz(),XLe=DP(),Rmt=Uz(),QLe=Xz(),JLe=Qz(),Bx=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=XLe;this.result=new JLe(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new ZLe(i,n,this._opts,o);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),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=QLe;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"}};ooe.exports=Bx;Bx.default=Bx});var Jz=ae((Omt,soe)=>{"use strict";var eMe=ch(),noe,ioe,uh=class extends eMe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new noe(new ioe,this,t).stringify()}};uh.registerLazyResult=e=>{noe=e};uh.registerProcessor=e=>{ioe=e};soe.exports=uh;uh.default=uh});var doe=ae((Lmt,uoe)=>{"use strict";var{isClean:Kl,my:tMe}=VP(),oMe=zz(),rMe=DP(),nMe=ch(),iMe=Jz(),Amt=Uz(),aoe=Qz(),sMe=Xz(),aMe=UP(),lMe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},cMe={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},uMe={Once:!0,postcssPlugin:!0,prepare:!0},by=0;function Px(e){return typeof e=="object"&&typeof e.then=="function"}function coe(e){let t=!1,o=lMe[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,by,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,by,o+"Exit"]:[o,o+"Exit"]}function loe(e){let t;return e.type==="document"?t=["Document",by,"DocumentExit"]:e.type==="root"?t=["Root",by,"RootExit"]:t=coe(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function e6(e){return e[Kl]=!1,e.nodes&&e.nodes.forEach(t=>e6(t)),e}var t6={},Ef=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=e6(o);else if(o instanceof e||o instanceof aoe)n=e6(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=sMe;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[tMe]&&nMe.rebuild(n)}this.result=new aoe(t,n,r),this.helpers={...t6,postcss:t6,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(!cMe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uMe[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(Px(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Kl];){t[Kl]=!0;let o=[loe(t)];for(;o.length>0;){let r=this.visitTick(o);if(Px(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 Px(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=rMe;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new oMe(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(Px(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Kl];)t[Kl]=!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(Px(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(l){throw this.handleError(l,r)}}if(o.iterator!==0){let s=o.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Kl]){a[Kl]=!0,t.push(loe(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===by){r.nodes&&r.nodes.length&&(r[Kl]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[Kl]=!0;let o=coe(t);for(let r of o)if(r===by)t.nodes&&t.each(n=>{n[Kl]||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"}};Ef.registerPostcss=e=>{t6=e};uoe.exports=Ef;Ef.default=Ef;aMe.registerLazyResult(Ef);iMe.registerLazyResult(Ef)});var moe=ae((Mmt,foe)=>{"use strict";var dMe=roe(),fMe=doe(),mMe=Jz(),pMe=UP(),dh=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 dMe(this,t,o):new fMe(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};foe.exports=dh;dh.default=dh;pMe.registerProcessor(dh);mMe.registerProcessor(dh)});var goe=ae((Nmt,hoe)=>{hoe.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&&poe(s.source.input.file,n)||i.length&&s.source.input.file&&!poe(s.source.input.file,i)||s.walkRules(a=>{let l=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];a.parent&&l.includes(a.parent.name)||(a.selectors=a.selectors.map(u=>t.exclude&&hMe(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function poe(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function hMe(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var yoe=ae((Dmt,boe)=>{var o6=40,r6=41,WP=39,n6=34,i6=92,yy=47,s6=44,a6=58,$P=42,gMe=117,bMe=85,yMe=43,vMe=/^[a-f0-9?-]+$/i;boe.exports=function(e){for(var t=[],o=e,r,n,i,s,a,l,u,d,f=0,m=o.charCodeAt(f),h=o.length,p=[{nodes:t}],g=0,b,v="",y="",S="";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===r6&&g?S=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===s6||m===a6||m===yy&&o.charCodeAt(r+1)!==$P&&(!b||b&&b.type==="function"&&b.value!=="calc")?y=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(m===WP||m===n6){r=f,n=m===WP?"'":'"',s={type:"string",sourceIndex:f,quote:n};do if(a=!1,r=o.indexOf(n,r+1),~r)for(l=r;o.charCodeAt(l-1)===i6;)l-=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===yy&&o.charCodeAt(f+1)===$P)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===yy||m===$P)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-y.length,sourceEndIndex:f+s.length,value:s}),f+=1,m=o.charCodeAt(f);else if(m===yy||m===s6||m===a6)s=o[f],t.push({type:"div",sourceIndex:f-y.length,sourceEndIndex:f+s.length,value:s,before:y,after:""}),y="",f+=1,m=o.charCodeAt(f);else if(o6===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!==WP&&m!==n6){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(l=r;o.charCodeAt(l-1)===i6;)l-=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(r6===m&&g)f+=1,m=o.charCodeAt(f),b.after=S,b.sourceEndIndex+=S.length,S="",g-=1,p[p.length-1].sourceEndIndex=f,p.pop(),b=p[g],t=b.nodes;else{r=f;do m===i6&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<h&&!(m<=32||m===WP||m===n6||m===s6||m===a6||m===yy||m===o6||m===$P&&b&&b.type==="function"&&b.value==="calc"||m===yy&&b.type==="function"&&b.value==="calc"||m===r6&&g));s=o.slice(f,r),o6===m?v=s:(gMe===s.charCodeAt(0)||bMe===s.charCodeAt(0))&&yMe===s.charCodeAt(1)&&vMe.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 koe=ae((Vmt,voe)=>{voe.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 woe=ae((Fmt,xoe)=>{function Soe(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=_oe(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function _oe(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=Soe(e[r],t)+o;return o}return Soe(e,t)}xoe.exports=_oe});var Eoe=ae((zmt,Coe)=>{var KP=45,YP=43,l6=46,kMe=101,SMe=69;function _Me(e){var t=e.charCodeAt(0),o;if(t===YP||t===KP){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===l6&&r>=48&&r<=57}return t===l6?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}Coe.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!_Me(e))return!1;for(r=e.charCodeAt(t),(r===YP||r===KP)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===l6&&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===kMe||r===SMe)&&(n>=48&&n<=57||(n===YP||n===KP)&&i>=48&&i<=57))for(t+=n===YP||n===KP?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 Roe=ae((jmt,Poe)=>{var xMe=yoe(),Toe=koe(),Boe=woe();function Tf(e){return this instanceof Tf?(this.nodes=xMe(e),this):new Tf(e)}Tf.prototype.toString=function(){return Array.isArray(this.nodes)?Boe(this.nodes):""};Tf.prototype.walk=function(e,t){return Toe(this.nodes,e,t),this};Tf.unit=Eoe();Tf.walk=Toe;Tf.stringify=Boe;Poe.exports=Tf});var Ooe=ae((Hmt,c6)=>{var Ioe=Roe();c6.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=Ioe(r.value),i=!1;n.walk(s=>{if(s.type!=="function"||s.value!=="url")return;let a=s.nodes[0].value,l=new URL(a,e.rootUrl);return l.pathname===a&&o.skipHostRelativeUrls||(s.nodes[0].value=l.toString(),i=!0),!1}),i&&(r.value=Ioe.stringify(n))}}};c6.exports.postcss=!0});var Woe=ae((opt,Goe)=>{Goe.exports=window.wp.priorityQueue});var T6=ae((Zht,Wre)=>{Wre.exports=window.wp.blob});var Wx=ae((_yt,Jne)=>{Jne.exports=window.wp.isShallowEqual});var KI=ae((V_t,Yae)=>{Yae.exports=window.wp.tokenList});var QI=ae((X_t,cle)=>{"use strict";var c5e=function(t){return u5e(t)&&!d5e(t)};function u5e(e){return!!e&&typeof e=="object"}function d5e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||p5e(e)}var f5e=typeof Symbol=="function"&&Symbol.for,m5e=f5e?Symbol.for("react.element"):60103;function p5e(e){return e.$$typeof===m5e}function h5e(e){return Array.isArray(e)?[]:{}}function bw(e,t){return t.clone!==!1&&t.isMergeableObject(e)?uv(h5e(e),e,t):e}function g5e(e,t,o){return e.concat(t).map(function(r){return bw(r,o)})}function b5e(e,t){if(!t.customMerge)return uv;var o=t.customMerge(e);return typeof o=="function"?o:uv}function y5e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function ale(e){return Object.keys(e).concat(y5e(e))}function lle(e,t){try{return t in e}catch{return!1}}function v5e(e,t){return lle(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function k5e(e,t,o){var r={};return o.isMergeableObject(e)&&ale(e).forEach(function(n){r[n]=bw(e[n],o)}),ale(t).forEach(function(n){v5e(e,n)||(lle(e,n)&&o.isMergeableObject(t[n])?r[n]=b5e(n,o)(e[n],t[n],o):r[n]=bw(t[n],o))}),r}function uv(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||g5e,o.isMergeableObject=o.isMergeableObject||c5e,o.cloneUnlessOtherwiseSpecified=bw;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):k5e(e,t,o):bw(t,o)}uv.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return uv(r,n,o)},{})};var S5e=uv;cle.exports=S5e});var _ce=ae((D0t,Sce)=>{Sce.exports=window.wp.commands});var lc=ae((mTt,Dde)=>{Dde.exports=window.wp.date});var gfe=ae((tBt,hfe)=>{var ufe=!1,qh,wH,CH,h2,g2,dfe,b2,EH,TH,BH,ffe,PH,RH,mfe,pfe;function Ti(){if(!ufe){ufe=!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(PH=/\b(iPhone|iP[ao]d)/.exec(e),RH=/\b(iP[ao]d)/.exec(e),BH=/Android/i.exec(e),mfe=/FBAN\/\w+;/i.exec(e),pfe=/Mobile/i.exec(e),ffe=!!/Win64/.exec(e),t){qh=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,qh&&document&&document.documentMode&&(qh=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);dfe=r?parseFloat(r[1])+4:qh,wH=t[2]?parseFloat(t[2]):NaN,CH=t[3]?parseFloat(t[3]):NaN,h2=t[4]?parseFloat(t[4]):NaN,h2?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),g2=t&&t[1]?parseFloat(t[1]):NaN):g2=NaN}else qh=wH=CH=g2=h2=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);b2=n?parseFloat(n[1].replace("_",".")):!0}else b2=!1;EH=!!o[2],TH=!!o[3]}else b2=EH=TH=!1}}var IH={ie:function(){return Ti()||qh},ieCompatibilityMode:function(){return Ti()||dfe>qh},ie64:function(){return IH.ie()&&ffe},firefox:function(){return Ti()||wH},opera:function(){return Ti()||CH},webkit:function(){return Ti()||h2},safari:function(){return IH.webkit()},chrome:function(){return Ti()||g2},windows:function(){return Ti()||EH},osx:function(){return Ti()||b2},linux:function(){return Ti()||TH},iphone:function(){return Ti()||PH},mobile:function(){return Ti()||PH||RH||BH||pfe},nativeApp:function(){return Ti()||mfe},android:function(){return Ti()||BH},ipad:function(){return Ti()||RH}};hfe.exports=IH});var yfe=ae((oBt,bfe)=>{"use strict";var y2=!!(typeof window<"u"&&window.document&&window.document.createElement),g3e={canUseDOM:y2,canUseWorkers:typeof Worker<"u",canUseEventListeners:y2&&!!(window.addEventListener||window.attachEvent),canUseViewport:y2&&!!window.screen,isInWorker:!y2};bfe.exports=g3e});var _fe=ae((rBt,Sfe)=>{"use strict";var vfe=yfe(),kfe;vfe.canUseDOM&&(kfe=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function b3e(e,t){if(!vfe.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&&kfe&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}Sfe.exports=b3e});var Bfe=ae((nBt,Tfe)=>{"use strict";var y3e=gfe(),v3e=_fe(),xfe=10,wfe=40,Cfe=800;function Efe(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*xfe,n=o*xfe,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=wfe,n*=wfe):(r*=Cfe,n*=Cfe)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}Efe.getEventType=function(){return y3e.firefox()?"DOMMouseScroll":v3e("wheel")?"wheel":"mousewheel"};Tfe.exports=Efe});var Rfe=ae((iBt,Pfe)=>{Pfe.exports=Bfe()});var spe=ae((XPt,ipe)=>{"use strict";ipe.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 L7e={};xs(L7e,{AlignmentControl:()=>GE,AlignmentToolbar:()=>kW,Autocomplete:()=>FW,BlockAlignmentControl:()=>aT,BlockAlignmentToolbar:()=>c$,BlockBindingsAttributeControl:()=>g_,BlockBindingsSourceFieldsList:()=>h_,BlockBreadcrumb:()=>O$,BlockCanvas:()=>Tce,BlockColorsStyleSelector:()=>Ice,BlockContextProvider:()=>fC,BlockControls:()=>yo,BlockEdit:()=>DE,BlockEditorKeyboardShortcuts:()=>mP,BlockEditorProvider:()=>nee,BlockFormatControls:()=>sj,BlockIcon:()=>rt,BlockInspector:()=>nve,BlockList:()=>Sy,BlockMover:()=>pI,BlockNavigationDropdown:()=>zue,BlockPopover:()=>Mne,BlockPreview:()=>yi,BlockSelectionClearer:()=>Yne,BlockSettingsMenu:()=>zI,BlockSettingsMenuControls:()=>MI,BlockStyles:()=>Rv,BlockTitle:()=>y_,BlockToolbar:()=>lce,BlockTools:()=>Tw,BlockVerticalAlignmentControl:()=>rT,BlockVerticalAlignmentToolbar:()=>lde,ButtonBlockAppender:()=>Vf,ButtonBlockerAppender:()=>Cne,ColorPalette:()=>Rde,ColorPaletteControl:()=>Ade,ContrastChecker:()=>Nde,CopyHandler:()=>ave,DefaultBlockAppender:()=>jy,DimensionControl:()=>Yh,FontSizePicker:()=>pF,HeadingLevelDropdown:()=>que,HeightControl:()=>cfe,InnerBlocks:()=>Kx,Inserter:()=>$s,InspectorAdvancedControls:()=>Uf,InspectorControls:()=>me,JustifyContentControl:()=>fb,JustifyToolbar:()=>vme,LineHeightControl:()=>j2,LinkControl:()=>vm,MediaPlaceholder:()=>jpe,MediaReplaceFlow:()=>Zv,MediaUpload:()=>Mf,MediaUploadCheck:()=>Qa,MultiSelectScrollIntoView:()=>dve,NavigableToolbar:()=>sv,ObserveTyping:()=>vie,PanelColorSettings:()=>Upe,PlainText:()=>Qhe,RecursionProvider:()=>_U,RichText:()=>tk,RichTextShortcut:()=>m8,RichTextToolbarButton:()=>h8,SETTINGS_DEFAULTS:()=>dS,SkipToSelectedBlock:()=>hA,ToolSelector:()=>xve,Typewriter:()=>hve,URLInput:()=>bm,URLInputButton:()=>sge,URLPopover:()=>_m,Warning:()=>Hd,WritingFlow:()=>TP,__experimentalBlockAlignmentMatrixControl:()=>w$,__experimentalBlockFullHeightAligmentControl:()=>k$,__experimentalBlockPatternSetup:()=>ide,__experimentalBlockPatternsList:()=>ql,__experimentalBlockVariationPicker:()=>Zue,__experimentalBlockVariationTransforms:()=>GO,__experimentalBorderRadiusControl:()=>ZO,__experimentalColorGradientControl:()=>dm,__experimentalColorGradientSettingsDropdown:()=>d2,__experimentalDateFormatPicker:()=>Vde,__experimentalDuotoneControl:()=>JO,__experimentalFontAppearanceControl:()=>t2,__experimentalFontFamilyControl:()=>o2,__experimentalGetBorderClassesAndStyles:()=>pN,__experimentalGetColorClassesAndStyles:()=>hN,__experimentalGetDimensionsClassesAndStyles:()=>mN,__experimentalGetElementClassName:()=>I7e,__experimentalGetGapCSSValue:()=>On,__experimentalGetGradientClass:()=>sb,__experimentalGetGradientObjectByGradientValue:()=>uW,__experimentalGetShadowClassesAndStyles:()=>U7,__experimentalGetSpacingClassesAndStyles:()=>$7,__experimentalImageEditor:()=>fme,__experimentalImageSizeControl:()=>gme,__experimentalImageURLInputUI:()=>mge,__experimentalInspectorPopoverHeader:()=>BL,__experimentalLetterSpacingControl:()=>n2,__experimentalLibrary:()=>cve,__experimentalLinkControl:()=>z2,__experimentalLinkControlSearchInput:()=>Gme,__experimentalLinkControlSearchItem:()=>Ime,__experimentalLinkControlSearchResults:()=>Dme,__experimentalListView:()=>zO,__experimentalPanelColorGradientSettings:()=>m2,__experimentalPreviewOptions:()=>Pge,__experimentalPublishDateTimePicker:()=>kve,__experimentalRecursionProvider:()=>gve,__experimentalResponsiveBlockControl:()=>oge,__experimentalSpacingSizesControl:()=>dk,__experimentalTextDecorationControl:()=>s2,__experimentalTextTransformControl:()=>l2,__experimentalUnitControl:()=>nge,__experimentalUseBlockOverlayActive:()=>L$,__experimentalUseBlockPreview:()=>Zoe,__experimentalUseBorderProps:()=>H7,__experimentalUseColorProps:()=>W7,__experimentalUseCustomSides:()=>y7,__experimentalUseGradient:()=>qTe,__experimentalUseHasRecursion:()=>bve,__experimentalUseMultipleOriginColorsAndGradients:()=>mm,__experimentalUseResizeCanvas:()=>Ige,__experimentalWritingModeControl:()=>u2,__unstableBlockSettingsMenuFirstItem:()=>wI,__unstableBlockToolbarLastItem:()=>vI,__unstableEditorStyles:()=>au,__unstableIframe:()=>my,__unstableInserterMenuExtension:()=>vR,__unstableRichTextInputEvent:()=>g8,__unstableUseBlockSelectionClearer:()=>_h,__unstableUseClipboardHandler:()=>sve,__unstableUseMouseMoveTypingReset:()=>qx,__unstableUseTypewriter:()=>vU,__unstableUseTypingObserver:()=>Zx,createCustomColorsHOC:()=>lW,getColorClassName:()=>Cs,getColorObjectByAttributeValues:()=>Pl,getColorObjectByColorValue:()=>uC,getComputedFluidTypographyValue:()=>mW,getCustomValueFromPreset:()=>HW,getDimensionsClassesAndStyles:()=>mN,getFontSize:()=>ab,getFontSizeClass:()=>Ud,getFontSizeObjectByValue:()=>mF,getGradientSlugByValue:()=>dW,getGradientValueBySlug:()=>HE,getPxFromCssUnit:()=>uwe,getSpacingPresetCssVar:()=>Pa,getTypographyClassesAndStyles:()=>K7,isValueSpacingPreset:()=>oT,privateApis:()=>o9,store:()=>w,storeConfig:()=>rb,transformStyles:()=>vy,useBlockBindingsUtils:()=>Wc,useBlockCommands:()=>xO,useBlockDisplayInformation:()=>lo,useBlockEditContext:()=>Ze,useBlockEditingMode:()=>Go,useBlockProps:()=>j_,useCachedTruthy:()=>Y7,useHasRecursion:()=>xU,useInnerBlocksProps:()=>Th,useSetting:()=>nW,useSettings:()=>ke,useStyleOverride:()=>wi,withColorContext:()=>XO,withColors:()=>cW,withFontSizes:()=>yW});function n9(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=n9(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Dwe(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=n9(e))&&(r&&(r+=" "),r+=t);return r}var G=Dwe;var wve=c(ee(),1),ha=c(L(),1),RL=c(W(),1),TU=c(te(),1),w0=c(zt(),1);var nC=c(L(),1),xa=Symbol("mayDisplayControls"),Ag=Symbol("mayDisplayParentControls"),Sd=Symbol("mayDisplayPatternEditingControls"),iC=Symbol("blockEditingMode"),Lg=Symbol("blockBindings"),sC=Symbol("isPreviewMode"),aS=Symbol("isInListViewBlockSupportTree"),wN={name:"",isSelected:!1},CN=(0,nC.createContext)(wN);CN.displayName="BlockEditContext";var{Provider:aC}=CN;function Ze(){return(0,nC.useContext)(CN)}var Vwe={grad:.9,turn:360,rad:360/(2*Math.PI)},Lc=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Ir=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},ws=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},b9=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},u9=function(e){return{r:ws(e.r,0,255),g:ws(e.g,0,255),b:ws(e.b,0,255),a:ws(e.a)}},EN=function(e){return{r:Ir(e.r),g:Ir(e.g),b:Ir(e.b),a:Ir(e.a,3)}},Fwe=/^#([0-9a-f]{3,8})$/i,lC=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},y9=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}},v9=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),l=r*(1-(1-t+i)*o),u=i%6;return{r:255*[r,a,s,s,l,r][u],g:255*[l,r,r,a,s,s][u],b:255*[s,s,l,r,r,a][u],a:n}},d9=function(e){return{h:b9(e.h),s:ws(e.s,0,100),l:ws(e.l,0,100),a:ws(e.a)}},f9=function(e){return{h:Ir(e.h),s:Ir(e.s),l:Ir(e.l),a:Ir(e.a,3)}},m9=function(e){return v9((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},lS=function(e){return{h:(t=y9(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},zwe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jwe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Hwe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Uwe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,PN={string:[[function(e){var t=Fwe.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?Ir(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?Ir(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Hwe.exec(e)||Uwe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:u9({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=zwe.exec(e)||jwe.exec(e);if(!t)return null;var o,r,n=d9({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(Vwe[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return m9(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 Lc(t)&&Lc(o)&&Lc(r)?u9({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(!Lc(t)||!Lc(o)||!Lc(r))return null;var s=d9({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return m9(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!Lc(t)||!Lc(o)||!Lc(r))return null;var s=(function(a){return{h:b9(a.h),s:ws(a.s,0,100),v:ws(a.v,0,100),a:ws(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return v9(s)},"hsv"]]},p9=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]},Gwe=function(e){return typeof e=="string"?p9(e.trim(),PN.string):typeof e=="object"&&e!==null?p9(e,PN.object):[null,void 0]};var TN=function(e,t){var o=lS(e);return{h:o.h,s:ws(o.s+100*t,0,100),l:o.l,a:o.a}},BN=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},h9=function(e,t){var o=lS(e);return{h:o.h,s:o.s,l:ws(o.l+100*t,0,100),a:o.a}},RN=(function(){function e(t){this.parsed=Gwe(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 Ir(BN(this.rgba),2)},e.prototype.isDark=function(){return BN(this.rgba)<.5},e.prototype.isLight=function(){return BN(this.rgba)>=.5},e.prototype.toHex=function(){return t=EN(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?lC(Ir(255*i)):"","#"+lC(o)+lC(r)+lC(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return EN(this.rgba)},e.prototype.toRgbString=function(){return t=EN(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 f9(lS(this.rgba))},e.prototype.toHslString=function(){return t=f9(lS(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=y9(this.rgba),{h:Ir(t.h),s:Ir(t.s),v:Ir(t.v),a:Ir(t.a,3)};var t},e.prototype.invert=function(){return no({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),no(TN(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),no(TN(this.rgba,-t))},e.prototype.grayscale=function(){return no(TN(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),no(h9(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),no(h9(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"?no({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):Ir(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=lS(this.rgba);return typeof t=="number"?no({h:t,s:o.s,l:o.l,a:o.a}):Ir(o.h)},e.prototype.isEqual=function(t){return this.toHex()===no(t).toHex()},e})(),no=function(e){return e instanceof RN?e:new RN(e)},g9=[],_d=function(e){e.forEach(function(t){g9.indexOf(t)<0&&(t(RN,PN),g9.push(t))})};function xd(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,l,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,l=i[p],Math.pow(a.r-l.r,2)+Math.pow(a.g-l.g,2)+Math.pow(a.b-l.b,2));g<f&&(f=g,m=p)}return m}},t.string.push([function(s){var a=s.toLowerCase(),l=a==="transparent"?"#0000":o[a];return l?new e(l).toRgb():null},"name"])}var IN=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ON=function(e){return .2126*IN(e.r)+.7152*IN(e.g)+.0722*IN(e.b)};function Mg(e){e.prototype.luminance=function(){return t=ON(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,l,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),a=ON(i),l=ON(s),o=a>l?(a+.05)/(l+.05):(l+.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 w9=c(D(),1);var _9=c(cC(),1),{lock:x9,unlock:F}=(0,_9.__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");_d([xd,Mg]);var{kebabCase:Wwe}=F(w9.privateApis),Pl=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},uC=(e,t)=>e?.find(o=>o.color===t);function Cs(e,t){if(!(!e||!t))return`has-${Wwe(t)}-${e}`}function C9(e,t){let o=no(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var VE=c(L(),1),Np=c(te(),1),sW=c(D(),1);var oW=c(W(),1),rW=c(Xe(),1);var NE=c(L(),1),ME=c(ee(),1);var Mc=c(ee(),1),A9=c(D(),1),uS=c(W(),1),pp=c(L(),1);var Ng=c(L(),1),B9=c(C(),1),dC=(0,Ng.createContext)({});dC.displayName="BlockContext";function fC({value:e,children:t}){let o=(0,Ng.useContext)(dC),r=(0,Ng.useMemo)(()=>({...o,...e}),[o,e]);return(0,B9.jsx)(dC.Provider,{value:r,children:t})}var pn=dC;var Dg=c(ji(),1);function dp(e){return e?.startsWith("#")&&(0,Dg.isValidFragment)(e)}function fp(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function mp(e){if(e.includes(" "))return!1;let o=(0,Dg.getProtocol)(e),r=(0,Dg.isValidProtocol)(o),n=$we(e),i=e?.startsWith("www.");return r||i||dp(e)||n||fp(e)}function $we(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var Kwe="__default",R9="core/pattern-overrides";function cS(e){return e?.[Kwe]?.source===R9}function mC(e,t){if(!cS(e))return e;let o={};for(let r of t){let n=e[r]?e[r]:{source:R9};o[r]=n}return o}var I9=c(L(),1),qr=(0,I9.createContext)({});qr.displayName="PrivateBlockContext";var pC=c(C(),1),Ywe={},qwe=e=>{let{name:t}=e,o=(0,Mc.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,pC.jsx)(r,{...e})},O9=(0,A9.withFilters)("editor.BlockEdit")(qwe),Zwe=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,uS.useRegistry)(),s=(0,Mc.getBlockType)(t),a=(0,pp.useContext)(pn),l=(0,uS.useSelect)(v=>F(v(Mc.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,pp.useContext)(qr),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,pp.useMemo)(()=>{let v=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([y])=>s.usesContext.includes(y))):Ywe;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(y=>{l[y?.source]?.usesContext?.forEach(S=>{v[S]=a[S]})}),{blockBindings:mC(r?.metadata?.bindings,u),context:v,hasPatternOverrides:cS(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,l]),h=(0,uS.useSelect)(v=>{if(!d)return r;let y={},S=new Map;for(let[k,_]of Object.entries(d)){let{source:x,args:E}=_,B=l[x];!B||!u?.includes(k)||S.set(B,{...S.get(B),[k]:{args:E}})}if(S.size)for(let[k,_]of S){let x={};k.getValues?x=k.getValues({select:v,context:f,clientId:o,bindings:_}):Object.keys(_).forEach(E=>{x[E]=k.label});for(let[E,B]of Object.entries(x))E==="url"&&(!B||!mp(B))?y[E]=null:y[E]=B}return{...r,...y}},[r,u,d,o,f,l]),p=(0,pp.useCallback)(v=>{if(!d){n(v);return}i.batch(()=>{let y={...v},S=new Map;for(let[_,x]of Object.entries(y)){if(!d[_]||!u?.includes(_))continue;let E=d[_],B=l[E?.source];B?.setValues&&(S.set(B,{...S.get(B),[_]:{args:E.args,newValue:x}}),delete y[_])}if(S.size)for(let[_,x]of S)_.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:x});let k=!!f["pattern/overrides"];!(m&&k)&&Object.keys(y).length&&(m&&delete y.href,n(y))})},[u,d,o,f,m,n,l,i]);if(!s)return null;if(s.apiVersion>1)return(0,pC.jsx)(O9,{...e,attributes:h,context:f,setAttributes:p});let g=(0,Mc.hasBlockSupport)(s,"className",!0)?(0,Mc.getBlockDefaultClassName)(t):null,b=G(g,r?.className,e.className);return(0,pC.jsx)(O9,{...e,attributes:h,className:b,context:f,setAttributes:p})},L9=Zwe;var JG=c(ee(),1),fF=c(D(),1),eW=c(W(),1),LE=c(z(),1);var AE=c(W(),1);var pS=c(hp(),1),MN=c(te(),1),hS=c(W(),1),G9=c(Xe(),1),xC=c(ee(),1);var it=c(z(),1),D9={insertUsage:{}},dS={alignWide:!1,supportsLayout:!0,colors:[{name:(0,it.__)("Black"),slug:"black",color:"#000000"},{name:(0,it.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,it.__)("White"),slug:"white",color:"#ffffff"},{name:(0,it.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,it.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,it.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,it.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,it.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,it.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,it.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,it.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,it.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,it._x)("Small","font size name"),size:13,slug:"small"},{name:(0,it._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,it._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,it._x)("Large","font size name"),size:36,slug:"large"},{name:(0,it._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,it.__)("Thumbnail")},{slug:"medium",name:(0,it.__)("Medium")},{slug:"large",name:(0,it.__)("Large")},{slug:"full",name:(0,it.__)("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,it.__)("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,it.__)("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,it.__)("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,it.__)("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,it.__)("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,it.__)("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,it.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,it.__)("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,it.__)("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,it.__)("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,it.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,it.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function hC(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function gC(e,t,o,r=1){let n=[...e];return n.splice(t,r),hC(n,e.slice(t,t+r),o)}var ai=Symbol("globalStylesDataKey"),bC=Symbol("globalStylesLinks"),wd=Symbol("selectBlockPatternsKey"),yC=Symbol("reusableBlocksSelect"),Nc=Symbol("userPatternCategoriesSelect"),Cd=Symbol("sectionRootClientIdKey"),vC=Symbol("mediaEditKey"),kC=Symbol("getMediaSelect"),Hi=Symbol("isIsolatedEditor"),Es=Symbol("deviceTypeKey"),SC=Symbol("isNavigationOverlayContext"),V9=Symbol("isNavigationPostEditor"),fS=Symbol("mediaUploadOnSuccess"),F9=Symbol("openMediaEditorModal");var{isContentBlock:Xwe}=F(xC.privateApis),Qwe=e=>e;function _C(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),_C(s,i).forEach((a,l)=>{o.set(l,a)})}),o}function AN(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 W9(e,t=Qwe){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 NN(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function z9(e){return W9(e,t=>{let{attributes:o,...r}=t;return r})}function j9(e){return W9(e,t=>t.attributes)}function Jwe(e,t){return(0,pS.default)(Object.keys(e),Object.keys(t))}function e0e(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,pS.default)(e.clientIds,t.clientIds)&&Jwe(e.attributes,t.attributes)}function H9(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 Ed(e,t,o=!1){let r=e.tree,n=new Set([]),i=new Set;for(let s of t){let a=o?s:e.parents.get(s);do if(e.controlledInnerBlocks.has(a)){i.add(a);break}else n.add(a),a=e.parents.get(a);while(a!==void 0)}for(let s of n)r.set(s,{...r.get(s)});for(let s of n)r.get(s).innerBlocks=(e.order.get(s)||[]).map(a=>r.get(a));for(let s of i)r.set("controlled||"+s,{innerBlocks:(e.order.get(s)||[]).map(a=>r.get(a))})}var t0e=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),H9(r,o.blocks),Ed(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)}),Ed(r,[o.clientId],!1);break;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)})}),Ed(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=NN(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),H9(r,o.blocks),Ed(r,o.blocks.map(a=>a.clientId),!1);let s=[];for(let a of o.clientIds){let l=t.parents.get(a);l!==void 0&&(l===""||r.byClientId.get(l))&&s.push(l)}Ed(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)}),Ed(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),Ed(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),Ed(r,i,!0);break}}return r};function o0e(e){let t,o;return(r,n)=>{let i=e(r,n),s=o;o=n.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"?n.history??"merge":void 0;let a=n.type==="MARK_LAST_CHANGE_AS_PERSISTENT"||s;if(r===i&&!a)return r.isPersistentChange!==void 0?r:{...i,isPersistentChange:!0};let l=a?!s:!e0e(n,t);if(t=n,s==="ignore")return{...i,isPersistentChange:l,lastBlockChangeHistoryMode:"ignore"};let{lastBlockChangeHistoryMode:u,...d}=i;return{...d,isPersistentChange:l}}}function r0e(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 n0e=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)},i0e=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=e(void 0,{type:"INSERT_BLOCKS",rootClientId:"",blocks:o.blocks}),n=t?.controlledInnerBlocks??new Set;if(t?.order)for(let s of n){if(!r.byClientId.has(s))continue;r.controlledInnerBlocks.add(s);let a=t.order.get(s);if(!a?.length)continue;r.order.set(s,a);let l=(u,d)=>{let f=t.byClientId.get(u);if(!f)return;r.byClientId.set(u,f),r.attributes.set(u,t.attributes.get(u)),r.parents.set(u,d);let m=t.order.get(u)||[];r.order.set(u,m),m.forEach(h=>l(h,u))};a.forEach(u=>l(u,s))}for(let s of r.controlledInnerBlocks){let a=r.order.get(s);if(!a?.length)continue;let l=a.map(f=>t.tree.get(f)),u=r.tree.get(s);u&&(u.innerBlocks=l),r.tree.set("controlled||"+s,{innerBlocks:l});let d=f=>{let m=t.tree.get(f);if(!m)return;r.tree.set(f,m),(r.order.get(f)||[]).forEach(d)};a.forEach(d)}let i=t?.blockEditingModes??new Map;for(let[s,a]of i)r.tree.has(s)&&r.blockEditingModes.set(s,a);return r}return e(t,o)},s0e=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(t.controlledInnerBlocks.size){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...l}=s.shift();s.push(...a),t.controlledInnerBlocks.has(l.clientId)&&(r[l.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 l=`controlled||${a}`;t.tree.has(l)&&i.tree.set(l,t.tree.get(l))})}return i},a0e=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)},l0e=(0,MN.pipe)(hS.combineReducers,t0e,n0e,s0e,i0e,o0e,r0e,a0e)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return z9(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)}),z9(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 j9(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"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),l={};i.forEach(([u,d])=>{a[u]!==d&&(s=!0,l[u]=d)}),o=o||s,s&&r.set(n,{...a,...l})}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)}),j9(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=_C(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=_C(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,l)=>{s.set(l,a)}),s.set(o,hC(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 l=e.get(r).indexOf(n[0]);if(l===-1)return e;let u=new Map(e);return u.set(r,gC(e.get(r),l,i,n.length)),u}let s=new Map(e);return s.set(o,e.get(o)?.filter(a=>!n.includes(a))??[]),s.set(r,hC(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,gC(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),l=new Map(e);return l.set(r,gC(s,a,a+1,o.length)),l}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=_C(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((l,u)=>u===o[0]?[...l,...r.get("")]:(o.indexOf(u)===-1&&l.push(u),l),[]);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 AN(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return AN(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)}),AN(t.blocks,e.get(t.clientIds[0])).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},controlledInnerBlocks(e=new Set,{type:t,clientId:o,hasControlledInnerBlocks:r}){if(t==="SET_HAS_CONTROLLED_INNER_BLOCKS"){if(r)return e.has(o)?e:new Set(e).add(o);if(!e.has(o))return e;let n=new Set(e);return n.delete(o),n}return e},blockEditingModes(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;let o=new Map(e);return o.delete(t.clientId),o}}return e}});function c0e(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function u0e(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function d0e(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function f0e(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function m0e(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function U9(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 p0e(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 l=e?.selectionStart?.clientId,u=e?.selectionEnd?.clientId;if(!l&&!u)return e;if(!t.blocks.some(d=>d.clientId===l))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(d=>d.clientId===u))return{...e,selectionEnd:e.selectionStart}}let o=U9(e.selectionStart,t),r=U9(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function h0e(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function g0e(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function b0e(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function y0e(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 v0e(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function k0e(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 S0e(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 _0e(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,pS.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function x0e(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function w0e(e=dS,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...dS,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,G9.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function C0e(e=D9,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,l=(0,hS.select)(xC.store).getActiveBlockVariation(s,i);return l?.name&&(a+="/"+l.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 E0e=(e=new Map,t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let i=r.shift();o.add(i.clientId),r.push(...i.innerBlocks)}let n=new Map(e);for(let i of t.clientIds)o.has(i)||n.delete(i);return n}case"REMOVE_BLOCKS":{let o=new Map(e);for(let r of t.clientIds)o.delete(r);return o}case"UPDATE_BLOCK_LIST_SETTINGS":{let r=(typeof t.clientId=="string"?[[t.clientId,t.settings]]:Object.entries(t.clientId)).filter(([i,s])=>s?!(0,pS.default)(e.get(i),s):e.has(i));if(!r.length)return e;let n=new Map(e);for(let[i,s]of r)s?n.set(i,s):n.delete(i);return n}}return e};function T0e(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 B0e(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 P0e(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 R0e(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 I0e(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 O0e(e,t){if(t.type==="EDIT_CONTENT_ONLY_SECTION")return t.clientId;if(!e)return e;switch(t.type){case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":if(t.clientIds.includes(e))return;break;case"RESET_BLOCKS":if(!NN(t.blocks)[e])return;break}return e}function A0e(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 L0e(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function M0e(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function N0e(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function D0e(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function V0e(e={allOpen:!1,panels:{}},t){switch(t.type){case"SET_OPEN_LIST_VIEW_PANEL":return{allOpen:!1,panels:t.clientId?{[t.clientId]:!0}:{}};case"SET_ALL_LIST_VIEW_PANELS_OPEN":return{allOpen:!0,panels:{}};case"TOGGLE_LIST_VIEW_PANEL":return{allOpen:!1,panels:{...e.panels,[t.clientId]:t.isOpen}};case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":{if(!t.clientIds||t.clientIds.length===0)return e;let o={...e.panels},r=!1;return t.clientIds.forEach(n=>{n in o&&(delete o[n],r=!0)}),r?{...e,panels:o}:e}}return e}function F0e(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function z0e(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 j0e(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}function H0e(e=void 0,t){switch(t.type){case"SET_SELECTED_BLOCK_STYLE_STATE":{if(!t.clientId||!t.value)return;let o=e?.clientId===t.clientId?e.showStateOnCanvas??!0:!0,r=e?.clientId===t.clientId?e.value:{};return{clientId:t.clientId,showStateOnCanvas:o,value:{pseudo:"default",...r,...t.value}}}case"SET_SELECTED_BLOCK_STYLE_STATE_CANVAS_PREVIEW":{if(!t.clientId||typeof t.value!="boolean")return e;let o=e?.clientId===t.clientId?e.value:{};return{clientId:t.clientId,showStateOnCanvas:t.value,value:{pseudo:"default",...o}}}case"SELECT_BLOCK":case"SELECTION_CHANGE":{if(e?.clientId&&e.clientId!==t.clientId)return;break}case"RESET_SELECTION":{if(e?.clientId&&e.clientId!==t.selectionStart?.clientId)return;break}case"CLEAR_SELECTED_BLOCK":case"MULTI_SELECT":return;case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":{if(e?.clientId&&t.clientIds?.includes(e.clientId))return;break}case"RESET_BLOCKS":{if(e?.clientId&&!NN(t.blocks)[e.clientId])return;break}}return e}function U0e(e="default",t){return t.type==="SET_STYLE_STATE_VIEWPORT"?t.viewport??"default":e}function G0e(e=!1,t){return t.type==="SET_RESPONSIVE_EDITING"?t.enabled:e}var W0e=(0,hS.combineReducers)({blocks:l0e,isDragging:d0e,isTyping:u0e,isBlockInterfaceHidden:c0e,draggedBlocks:f0e,selection:p0e,isMultiSelecting:h0e,isSelectionEnabled:g0e,initialPosition:k0e,blocksMode:S0e,blockListSettings:E0e,insertionPoint:D0e,insertionCue:_0e,template:x0e,settings:w0e,preferences:C0e,lastBlockAttributesChange:T0e,lastFocus:M0e,expandedBlock:R0e,highlightedBlock:B0e,lastBlockInserted:I0e,editedContentOnlySection:O0e,blockVisibility:m0e,viewportModalClientIds:b0e,styleOverrides:A0e,removalPromptData:y0e,blockRemovalRules:v0e,registeredInserterMediaCategories:L0e,zoomLevel:N0e,hasBlockSpotlight:P0e,openedListViewPanels:V0e,listViewExpandRevision:F0e,listViewContentPanelOpen:z0e,requestedInspectorTab:j0e,selectedBlockStyleState:H0e,styleStateViewport:U0e,isResponsiveEditing:G0e});function $9(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks.has(t))return e.blocks.tree.get(t);let o=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:o?.innerBlocks}}function DN(e,t,o){let r=$9(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)DN(e,n.clientId,o)}function mS(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 $0e(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function LN(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[Cd],i=e.blocks.order.get(n),s=Array.from(e.blocks.blockEditingModes).some(([,g])=>g==="disabled"),a=[],l=[];e.blocks.controlledInnerBlocks.forEach(g=>{let b=e.blocks.byClientId?.get(g);b?.name==="core/template-part"&&a.push(g),b?.name==="core/block"&&l.push(g)});let u=Array.from(e.blockListSettings).flatMap(([g,b])=>b?.templateLock==="contentOnly"?[g]:[]),d=e.settings?.[Hi],f=e.settings?.disableContentOnlyForUnsyncedPatterns,m=d||f?[]:Array.from(e.blocks.attributes.keys()).filter(g=>e.blocks.attributes.get(g)?.metadata?.patternName),h=e.settings?.disableContentOnlyForTemplateParts,p=[...u,...m,...d||h?[]:a];return DN(e,t,g=>{let{clientId:b,name:v}=g,y=!!e.editedContentOnlySection,S=!1;if(y&&(S=b===e.editedContentOnlySection||!!mS(e,b,[e.editedContentOnlySection]),!S)){r.set(b,"disabled");return}if(!e.blocks.blockEditingModes.has(b)){if(s){let k,_=e.blocks.parents.get(b);for(;_!==void 0&&(e.blocks.blockEditingModes.has(_)&&(k=e.blocks.blockEditingModes.get(_)),!k);)_=e.blocks.parents.get(_);if(k==="disabled"){r.set(b,"disabled");return}}if(o){if(b===n){r.set(b,"contentOnly");return}if(!i?.length){r.set(b,"disabled");return}if(i.includes(b)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}if(l.length){if(l.includes(b)){if(mS(e,b,l)){r.set(b,"disabled");return}return}let k=mS(e,b,l);if(k){if(mS(e,k,l)){r.set(b,"disabled");return}if($0e(g)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}}if(y&&S){r.set(b,"default");return}p.length&&mS(e,b,p)&&(Xwe(v)?r.set(b,"contentOnly"):r.set(b,"disabled"))}}),r}function Td({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{DN(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=LN(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function K0e(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=Td({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=Td({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 l of o?.clientIds){let u=o.options?.uniqueByBlock?o.attributes[l]:o.attributes;if(!u)break;u.metadata?.patternName&&!t.blocks.attributes.get(l)?.metadata?.patternName?i.push(r.blocks.tree.get(l)):u.metadata&&!u.metadata?.patternName&&t.blocks.attributes.get(l)?.metadata?.patternName&&s.push(l)}if(!i?.length&&!s?.length)break;let a=Td({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 l in s){let u=t.blockListSettings.get(l)?.templateLock!=="contentOnly"&&r.blockListSettings.get(l)?.templateLock==="contentOnly",d=t.blockListSettings.get(l)?.templateLock==="contentOnly"&&r.blockListSettings.get(l)?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(l)):d&&i.push(l)}if(!n.length&&!i.length)break;let a=Td({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=$9(r,o.clientId);if(!n)break;let i=Td({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=Td({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=Td({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=Td({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[Cd]!==r?.settings?.[Cd]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns||!!t?.settings?.[Hi]!=!!r?.settings?.[Hi]||!!t?.settings?.disableContentOnlyForTemplateParts!=!!r?.settings?.disableContentOnlyForTemplateParts)return{...r,derivedBlockEditingModes:LN(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:LN(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function Y0e(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 K9=(0,MN.pipe)(K0e,Y0e)(W0e);var iF={};xs(iF,{__experimentalGetActiveBlockIdByBlockNames:()=>tEe,__experimentalGetAllowedBlocks:()=>V1e,__experimentalGetAllowedPatterns:()=>H1e,__experimentalGetBlockListSettingsForBlocks:()=>Y1e,__experimentalGetDirectInsertBlock:()=>F1e,__experimentalGetGlobalBlocksByName:()=>YCe,__experimentalGetLastBlockAttributeChanges:()=>X1e,__experimentalGetParsedPattern:()=>z1e,__experimentalGetPatternTransformItems:()=>W1e,__experimentalGetPatternsByBlockTypes:()=>G1e,__experimentalGetReusableBlockTitle:()=>q1e,__unstableGetBlockWithoutInnerBlocks:()=>UCe,__unstableGetClientIdWithClientIdsTree:()=>WCe,__unstableGetClientIdsTree:()=>$Ce,__unstableGetContentLockingParent:()=>cEe,__unstableGetLastBlockChangeHistoryMode:()=>K1e,__unstableGetSelectedBlocksWithPartialSelection:()=>g1e,__unstableGetTemporarilyEditingAsBlocks:()=>uEe,__unstableGetVisibleBlocks:()=>iEe,__unstableHasActiveBlockOverlayActive:()=>LG,__unstableIsFullySelected:()=>f1e,__unstableIsLastBlockChangeIgnored:()=>Z1e,__unstableIsSelectionCollapsed:()=>m1e,__unstableIsSelectionMergeable:()=>h1e,__unstableIsWithinBlockOverlay:()=>sEe,__unstableSelectionHasUnmergeableBlock:()=>p1e,areInnerBlocksControlled:()=>RE,canEditBlock:()=>IG,canInsertBlockType:()=>Ap,canInsertBlocks:()=>R1e,canLockBlockType:()=>O1e,canMoveBlock:()=>RG,canMoveBlocks:()=>I1e,canRemoveBlock:()=>rF,canRemoveBlocks:()=>PG,didAutomaticChange:()=>J1e,getAdjacentBlockClientId:()=>J5,getAllowedBlocks:()=>Z5,getBlock:()=>jc,getBlockAttributes:()=>Rs,getBlockCount:()=>ZCe,getBlockEditingMode:()=>Is,getBlockHierarchyRootClientId:()=>o1e,getBlockIndex:()=>wG,getBlockInsertionPoint:()=>E1e,getBlockListSettings:()=>Xg,getBlockMode:()=>S1e,getBlockName:()=>Nt,getBlockNamesByClientId:()=>qCe,getBlockOrder:()=>Jr,getBlockParents:()=>Ea,getBlockParentsByBlockName:()=>Q5,getBlockRootClientId:()=>dr,getBlockSelectionEnd:()=>QCe,getBlockSelectionStart:()=>XCe,getBlockTransformItems:()=>N1e,getBlocks:()=>GCe,getBlocksByClientId:()=>TE,getBlocksByName:()=>SG,getClientIdsOfDescendants:()=>kG,getClientIdsWithDescendants:()=>Zg,getDirectInsertBlock:()=>AG,getDraggedBlockClientIds:()=>x1e,getFirstMultiSelectedBlockClientId:()=>eF,getGlobalBlockCount:()=>KCe,getHoveredBlockClientId:()=>nEe,getInserterItems:()=>M1e,getLastMultiSelectedBlockClientId:()=>_G,getLowestCommonAncestorWithSelectedBlock:()=>r1e,getMultiSelectedBlockClientIds:()=>zd,getMultiSelectedBlocks:()=>a1e,getMultiSelectedBlocksEndClientId:()=>d1e,getMultiSelectedBlocksStartClientId:()=>u1e,getNextBlockClientId:()=>i1e,getPatternsByBlockTypes:()=>U1e,getPreviousBlockClientId:()=>n1e,getSelectedBlock:()=>t1e,getSelectedBlockClientId:()=>Jg,getSelectedBlockClientIds:()=>eb,getSelectedBlockCount:()=>JCe,getSelectedBlocksInitialCaretPosition:()=>s1e,getSelectionEnd:()=>o_,getSelectionStart:()=>t_,getSettings:()=>Md,getTemplate:()=>P1e,getTemplateLock:()=>Il,hasBlockMovingClientId:()=>Q1e,hasDraggedInnerBlock:()=>TG,hasInserterItems:()=>D1e,hasMultiSelection:()=>y1e,hasSelectedBlock:()=>e1e,hasSelectedInnerBlock:()=>EG,isAncestorBeingDragged:()=>w1e,isAncestorMultiSelected:()=>c1e,isBlockBeingDragged:()=>tF,isBlockHighlighted:()=>eEe,isBlockInsertionPointVisible:()=>T1e,isBlockMultiSelected:()=>xG,isBlockSelected:()=>CG,isBlockValid:()=>HCe,isBlockVisible:()=>rEe,isBlockWithinSelection:()=>b1e,isCaretWithinFormattedText:()=>C1e,isDraggingBlocks:()=>BG,isFirstMultiSelectedBlock:()=>l1e,isGroupable:()=>lEe,isLastBlockChangePersistent:()=>$1e,isMultiSelecting:()=>v1e,isSelectionEnabled:()=>k1e,isTyping:()=>_1e,isUngroupable:()=>aEe,isValidTemplate:()=>B1e,wasBlockJustInserted:()=>oEe});var Qe=c(ee(),1),yG=c(zt(),1);var wC=c(L(),1),Ue=(0,wC.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,wC.cloneElement)(e,{width:t,height:t,...o,ref:r}));var CC=c(ne(),1),VN=c(C(),1),gp=(0,VN.jsx)(CC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,VN.jsx)(CC.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var EC=c(ne(),1),FN=c(C(),1),zN=(0,FN.jsx)(EC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,FN.jsx)(EC.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var TC=c(ne(),1),jN=c(C(),1),Bd=(0,jN.jsx)(TC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,jN.jsx)(TC.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var BC=c(ne(),1),HN=c(C(),1),bp=(0,HN.jsx)(BC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,HN.jsx)(BC.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var PC=c(ne(),1),UN=c(C(),1),Pd=(0,UN.jsx)(PC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,UN.jsx)(PC.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var RC=c(ne(),1),GN=c(C(),1),WN=(0,GN.jsx)(RC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GN.jsx)(RC.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 IC=c(ne(),1),$N=c(C(),1),gS=(0,$N.jsx)(IC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$N.jsx)(IC.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var OC=c(ne(),1),KN=c(C(),1),bS=(0,KN.jsx)(OC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,KN.jsx)(OC.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 AC=c(ne(),1),YN=c(C(),1),qN=(0,YN.jsx)(AC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,YN.jsx)(AC.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 LC=c(ne(),1),ZN=c(C(),1),XN=(0,ZN.jsx)(LC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ZN.jsx)(LC.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 MC=c(ne(),1),QN=c(C(),1),yS=(0,QN.jsx)(MC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,QN.jsx)(MC.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 NC=c(ne(),1),JN=c(C(),1),eD=(0,JN.jsx)(NC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,JN.jsx)(NC.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 DC=c(ne(),1),tD=c(C(),1),oD=(0,tD.jsx)(DC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,tD.jsx)(DC.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 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})});var VC=c(ne(),1),rD=c(C(),1),Ts=(0,rD.jsx)(VC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,rD.jsx)(VC.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var FC=c(ne(),1),nD=c(C(),1),Zr=(0,nD.jsx)(FC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,nD.jsx)(FC.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var zC=c(ne(),1),iD=c(C(),1),vS=(0,iD.jsx)(zC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,iD.jsx)(zC.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var jC=c(ne(),1),sD=c(C(),1),In=(0,sD.jsx)(jC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,sD.jsx)(jC.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var HC=c(ne(),1),aD=c(C(),1),Rd=(0,aD.jsx)(HC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,aD.jsx)(HC.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 UC=c(ne(),1),lD=c(C(),1),Sr=(0,lD.jsx)(UC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lD.jsx)(UC.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var GC=c(ne(),1),cD=c(C(),1),yp=(0,cD.jsx)(GC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,cD.jsx)(GC.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var WC=c(ne(),1),uD=c(C(),1),vp=(0,uD.jsx)(WC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,uD.jsx)(WC.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 $C=c(ne(),1),dD=c(C(),1),fD=(0,dD.jsx)($C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,dD.jsx)($C.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 KC=c(ne(),1),mD=c(C(),1),pD=(0,mD.jsx)(KC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,mD.jsx)(KC.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 YC=c(ne(),1),hD=c(C(),1),kp=(0,hD.jsx)(YC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,hD.jsx)(YC.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 qC=c(ne(),1),gD=c(C(),1),bD=(0,gD.jsx)(qC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,gD.jsx)(qC.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 Sp=c(ne(),1),Vg=c(C(),1),yD=(0,Vg.jsxs)(Sp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Vg.jsx)(Sp.G,{opacity:".25",children:(0,Vg.jsx)(Sp.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,Vg.jsx)(Sp.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 _p=c(ne(),1),Fg=c(C(),1),vD=(0,Fg.jsxs)(_p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Fg.jsx)(_p.G,{opacity:".25",children:(0,Fg.jsx)(_p.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,Fg.jsx)(_p.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 xp=c(ne(),1),zg=c(C(),1),kD=(0,zg.jsxs)(xp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,zg.jsx)(xp.G,{opacity:".25",children:(0,zg.jsx)(xp.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,zg.jsx)(xp.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 wp=c(ne(),1),jg=c(C(),1),SD=(0,jg.jsxs)(wp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,jg.jsx)(wp.G,{opacity:".25",children:(0,jg.jsx)(wp.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,jg.jsx)(wp.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 ZC=c(ne(),1),_D=c(C(),1),xD=(0,_D.jsx)(ZC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_D.jsx)(ZC.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 XC=c(ne(),1),wD=c(C(),1),kS=(0,wD.jsx)(XC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,wD.jsx)(XC.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var QC=c(ne(),1),CD=c(C(),1),ED=(0,CD.jsx)(QC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,CD.jsx)(QC.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 JC=c(ne(),1),TD=c(C(),1),Cp=(0,TD.jsx)(JC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,TD.jsx)(JC.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 e1=c(ne(),1),BD=c(C(),1),PD=(0,BD.jsx)(e1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,BD.jsx)(e1.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 t1=c(ne(),1),RD=c(C(),1),ID=(0,RD.jsx)(t1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,RD.jsx)(t1.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 o1=c(ne(),1),OD=c(C(),1),AD=(0,OD.jsx)(o1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,OD.jsx)(o1.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var r1=c(ne(),1),LD=c(C(),1),MD=(0,LD.jsx)(r1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,LD.jsx)(r1.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 n1=c(ne(),1),ND=c(C(),1),DD=(0,ND.jsx)(n1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ND.jsx)(n1.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 i1=c(ne(),1),VD=c(C(),1),FD=(0,VD.jsx)(i1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,VD.jsx)(i1.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 s1=c(ne(),1),zD=c(C(),1),jD=(0,zD.jsx)(s1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,zD.jsx)(s1.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 a1=c(ne(),1),HD=c(C(),1),UD=(0,HD.jsx)(a1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,HD.jsx)(a1.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 l1=c(ne(),1),GD=c(C(),1),WD=(0,GD.jsx)(l1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GD.jsx)(l1.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 c1=c(ne(),1),$D=c(C(),1),u1=(0,$D.jsx)(c1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$D.jsx)(c1.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 d1=c(ne(),1),KD=c(C(),1),SS=(0,KD.jsx)(d1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,KD.jsx)(d1.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 f1=c(ne(),1),YD=c(C(),1),_S=(0,YD.jsx)(f1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,YD.jsx)(f1.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 m1=c(ne(),1),qD=c(C(),1),xS=(0,qD.jsx)(m1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,qD.jsx)(m1.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 p1=c(ne(),1),ZD=c(C(),1),XD=(0,ZD.jsx)(p1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ZD.jsx)(p1.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var h1=c(ne(),1),QD=c(C(),1),JD=(0,QD.jsx)(h1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,QD.jsx)(h1.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 g1=c(ne(),1),eV=c(C(),1),tV=(0,eV.jsx)(g1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,eV.jsx)(g1.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 b1=c(ne(),1),oV=c(C(),1),rV=(0,oV.jsx)(b1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,oV.jsx)(b1.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var y1=c(ne(),1),nV=c(C(),1),iV=(0,nV.jsx)(y1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,nV.jsx)(y1.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 v1=c(ne(),1),sV=c(C(),1),aV=(0,sV.jsx)(v1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,sV.jsx)(v1.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 k1=c(ne(),1),lV=c(C(),1),cV=(0,lV.jsx)(k1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lV.jsx)(k1.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var S1=c(ne(),1),uV=c(C(),1),wS=(0,uV.jsx)(S1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,uV.jsx)(S1.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 _1=c(ne(),1),dV=c(C(),1),fV=(0,dV.jsx)(_1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,dV.jsx)(_1.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 x1=c(ne(),1),mV=c(C(),1),CS=(0,mV.jsx)(x1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,mV.jsx)(x1.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var w1=c(ne(),1),pV=c(C(),1),ES=(0,pV.jsx)(w1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,pV.jsx)(w1.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var C1=c(ne(),1),hV=c(C(),1),Id=(0,hV.jsx)(C1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,hV.jsx)(C1.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var E1=c(ne(),1),gV=c(C(),1),Od=(0,gV.jsx)(E1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,gV.jsx)(E1.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var T1=c(ne(),1),bV=c(C(),1),Ad=(0,bV.jsx)(T1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,bV.jsx)(T1.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var B1=c(ne(),1),yV=c(C(),1),TS=(0,yV.jsx)(B1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,yV.jsx)(B1.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var P1=c(ne(),1),vV=c(C(),1),Hg=(0,vV.jsx)(P1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,vV.jsx)(P1.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var R1=c(ne(),1),kV=c(C(),1),BS=(0,kV.jsx)(R1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,kV.jsx)(R1.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var I1=c(ne(),1),SV=c(C(),1),Ug=(0,SV.jsx)(I1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,SV.jsx)(I1.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var O1=c(ne(),1),_V=c(C(),1),PS=(0,_V.jsx)(O1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_V.jsx)(O1.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var A1=c(ne(),1),xV=c(C(),1),Dc=(0,xV.jsx)(A1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,xV.jsx)(A1.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 L1=c(ne(),1),wV=c(C(),1),CV=(0,wV.jsx)(L1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,wV.jsx)(L1.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 M1=c(ne(),1),EV=c(C(),1),Bs=(0,EV.jsx)(M1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,EV.jsx)(M1.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 N1=c(ne(),1),TV=c(C(),1),li=(0,TV.jsx)(N1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,TV.jsx)(N1.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 D1=c(ne(),1),BV=c(C(),1),RS=(0,BV.jsx)(D1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,BV.jsx)(D1.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var V1=c(ne(),1),PV=c(C(),1),RV=(0,PV.jsx)(V1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,PV.jsx)(V1.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 F1=c(ne(),1),IV=c(C(),1),OV=(0,IV.jsx)(F1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,IV.jsx)(F1.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 z1=c(ne(),1),AV=c(C(),1),Ep=(0,AV.jsx)(z1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,AV.jsx)(z1.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 IS=c(ne(),1),OS=c(C(),1),Gg=(0,OS.jsxs)(IS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,OS.jsx)(IS.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,OS.jsx)(IS.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 j1=c(ne(),1),LV=c(C(),1),AS=(0,LV.jsx)(j1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,LV.jsx)(j1.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 H1=c(ne(),1),MV=c(C(),1),Ui=(0,MV.jsx)(H1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,MV.jsx)(H1.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var LS=c(ne(),1),MS=c(C(),1),Tp=(0,MS.jsxs)(LS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,MS.jsx)(LS.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,MS.jsx)(LS.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 U1=c(ne(),1),NV=c(C(),1),DV=(0,NV.jsx)(U1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,NV.jsx)(U1.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 G1=c(ne(),1),VV=c(C(),1),Bp=(0,VV.jsx)(G1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,VV.jsx)(G1.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var W1=c(ne(),1),FV=c(C(),1),zV=(0,FV.jsx)(W1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,FV.jsx)(W1.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 $1=c(ne(),1),jV=c(C(),1),Ps=(0,jV.jsx)($1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,jV.jsx)($1.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var K1=c(ne(),1),HV=c(C(),1),UV=(0,HV.jsx)(K1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,HV.jsx)(K1.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var Y1=c(ne(),1),GV=c(C(),1),WV=(0,GV.jsx)(Y1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GV.jsx)(Y1.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var q1=c(ne(),1),$V=c(C(),1),KV=(0,$V.jsx)(q1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$V.jsx)(q1.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Z1=c(ne(),1),YV=c(C(),1),qV=(0,YV.jsx)(Z1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,YV.jsx)(Z1.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 X1=c(ne(),1),ZV=c(C(),1),XV=(0,ZV.jsx)(X1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ZV.jsx)(X1.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 Q1=c(ne(),1),QV=c(C(),1),Xr=(0,QV.jsx)(Q1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,QV.jsx)(Q1.Path,{d:"M7 11.5h10V13H7z"})});var J1=c(ne(),1),JV=c(C(),1),e5=(0,JV.jsx)(J1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,JV.jsx)(J1.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 eE=c(ne(),1),t5=c(C(),1),o5=(0,t5.jsx)(eE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t5.jsx)(eE.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 tE=c(ne(),1),r5=c(C(),1),n5=(0,r5.jsx)(tE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r5.jsx)(tE.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 oE=c(ne(),1),i5=c(C(),1),Pp=(0,i5.jsx)(oE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,i5.jsx)(oE.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 NS=c(ne(),1),DS=c(C(),1),s5=(0,DS.jsxs)(NS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,DS.jsx)(NS.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,DS.jsx)(NS.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 rE=c(ne(),1),a5=c(C(),1),l5=(0,a5.jsx)(rE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a5.jsx)(rE.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 nE=c(ne(),1),c5=c(C(),1),iE=(0,c5.jsx)(nE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,c5.jsx)(nE.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var VS=c(ne(),1),FS=c(C(),1),u5=(0,FS.jsxs)(VS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,FS.jsx)(VS.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,FS.jsx)(VS.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var Wg=c(ne(),1),$g=c(C(),1),d5=(0,$g.jsxs)(Wg.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,$g.jsx)(Wg.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,$g.jsx)(Wg.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,$g.jsx)(Wg.Path,{d:"m18 7.5v9h1.5v-9z"})]});var zS=c(ne(),1),jS=c(C(),1),f5=(0,jS.jsxs)(zS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,jS.jsx)(zS.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,jS.jsx)(zS.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var HS=c(ne(),1),US=c(C(),1),m5=(0,US.jsxs)(HS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,US.jsx)(HS.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,US.jsx)(HS.Path,{d:"m18 16.5v-9h1.5v9z"})]});var GS=c(ne(),1),WS=c(C(),1),p5=(0,WS.jsxs)(GS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,WS.jsx)(GS.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,WS.jsx)(GS.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var Kg=c(ne(),1),Yg=c(C(),1),h5=(0,Yg.jsxs)(Kg.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Yg.jsx)(Kg.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,Yg.jsx)(Kg.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,Yg.jsx)(Kg.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var sE=c(ne(),1),g5=c(C(),1),b5=(0,g5.jsx)(sE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,g5.jsx)(sE.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 aE=c(ne(),1),y5=c(C(),1),$S=(0,y5.jsx)(aE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,y5.jsx)(aE.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var lE=c(ne(),1),v5=c(C(),1),Rp=(0,v5.jsx)(lE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,v5.jsx)(lE.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var cE=c(ne(),1),k5=c(C(),1),S5=(0,k5.jsx)(cE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k5.jsx)(cE.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 uE=c(ne(),1),_5=c(C(),1),Rl=(0,_5.jsx)(uE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_5.jsx)(uE.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 dE=c(ne(),1),x5=c(C(),1),w5=(0,x5.jsx)(dE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,x5.jsx)(dE.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 fE=c(ne(),1),C5=c(C(),1),E5=(0,C5.jsx)(fE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,C5.jsx)(fE.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 mE=c(ne(),1),T5=c(C(),1),B5=(0,T5.jsx)(mE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,T5.jsx)(mE.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 pE=c(ne(),1),P5=c(C(),1),R5=(0,P5.jsx)(pE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,P5.jsx)(pE.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 hE=c(ne(),1),I5=c(C(),1),O5=(0,I5.jsx)(hE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,I5.jsx)(hE.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 gE=c(ne(),1),A5=c(C(),1),L5=(0,A5.jsx)(gE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,A5.jsx)(gE.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 bE=c(ne(),1),M5=c(C(),1),Vc=(0,M5.jsx)(bE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,M5.jsx)(bE.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 yE=c(ne(),1),N5=c(C(),1),wa=(0,N5.jsx)(yE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,N5.jsx)(yE.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 vE=c(ne(),1),D5=c(C(),1),V5=(0,D5.jsx)(vE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,D5.jsx)(vE.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 kE=c(ne(),1),F5=c(C(),1),z5=(0,F5.jsx)(kE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,F5.jsx)(kE.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 SE=c(ne(),1),j5=c(C(),1),H5=(0,j5.jsx)(SE.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,j5.jsx)(SE.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 zc=c(Qr(),1),Gi=c(Xe(),1),Je=c(W(),1);var pG=c(ee(),1),hG=c(X9(),1);var Eo="core/block-editor";var wE={};xs(wE,{getAllPatterns:()=>fCe,getBlockRemovalRules:()=>sCe,getBlockSettings:()=>J9,getBlockStyles:()=>yCe,getBlockWithoutAttributes:()=>tCe,getClientIdWithClientIdsTree:()=>U5,getClientIdsTree:()=>G5,getClosestAllowedInsertionPoint:()=>iG,getClosestAllowedInsertionPointForPattern:()=>kCe,getContentLockingParent:()=>W5,getEditedContentOnlySection:()=>$5,getEnabledBlockParents:()=>nCe,getEnabledClientIdsTree:()=>rCe,getExpandedBlock:()=>bCe,getInserterMediaCategories:()=>cCe,getInsertionPoint:()=>SCe,getLastFocus:()=>hCe,getLastInsertedBlocksClientIds:()=>eCe,getListViewExpandRevision:()=>PCe,getParentSectionBlock:()=>Nd,getPatternBySlug:()=>dCe,getRegisteredInserterMediaCategories:()=>lCe,getRemovalPromptData:()=>iCe,getRequestedInspectorTab:()=>OCe,getReusableBlocks:()=>pCe,getSectionRootClientId:()=>Op,getSelectedBlockStyleState:()=>dG,getStyleOverrides:()=>aCe,getStyleStateViewport:()=>uG,getViewportModalClientIds:()=>ICe,getZoomLevel:()=>vCe,hasAllowedPatterns:()=>uCe,hasBlockSpotlight:()=>CCe,hasSelectedStyleState:()=>LCe,isBlockHiddenAnywhere:()=>_Ce,isBlockHiddenAtViewport:()=>sG,isBlockHiddenEverywhere:()=>q5,isBlockInterfaceHidden:()=>J0e,isBlockParentHiddenAtViewport:()=>wCe,isBlockParentHiddenEverywhere:()=>xCe,isBlockSubtreeDisabled:()=>oCe,isContainerInsertableToInContentOnlyMode:()=>YS,isDragging:()=>gCe,isEditLockedBlock:()=>aG,isListViewContentPanelOpen:()=>TCe,isListViewPanelOpened:()=>BCe,isLockedBlock:()=>ECe,isMoveLockedBlock:()=>lG,isRemoveLockedBlock:()=>cG,isResponsiveEditing:()=>ACe,isSectionBlock:()=>Dd,isSelectedBlockStyleStateShownOnCanvas:()=>MCe,isWithinEditedContentOnlySection:()=>K5,isZoomOut:()=>Y5,shouldRenderBlockListView:()=>RCe});var Or=c(W(),1),qg=c(ee(),1);var _E=c(z(),1);var io={desktop:{label:(0,_E.__)("Desktop"),icon:xD,key:"desktop"},tablet:{label:(0,_E.__)("Tablet"),icon:w5,key:"tablet"},mobile:{label:(0,_E.__)("Mobile"),icon:AS,key:"mobile"}},Ld=Object.entries(io);var xE=c(ee(),1),Q9=c(zt(),1);function he(e,t,o){let r=Array.isArray(t)?[...t]:[t],n=Array.isArray(e)?[...e]:{...e},i=r.pop(),s=n;for(let a of r){let l=s[a];s[a]=s=Array.isArray(l)?[...l]:{...l}}return s[i]=o,n}var Ca=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var q0e=["color","border","dimensions","typography","spacing"],Z0e={"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},X0e={"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"},Q0e=e=>X0e[e]||e;function J9(e,t,...o){let r=Nt(e,t),n=[];if(t){let i=t;do{let s=Nt(e,i);(0,xE.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(q0e.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,Q9.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=Q0e(i);for(let d of n){let f=Rs(e,d);if(s=Ca(f.settings?.blocks?.[r],a)??Ca(f.settings,a),s!==void 0)break}let l=Md(e);if(s===void 0&&r&&(s=Ca(l.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=Ca(l.__experimentalFeatures,a)),s!==void 0)return xE.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=Z0e[a]?.(l);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:eG}=F(qg.privateApis);function J0e(e){return e.isBlockInterfaceHidden}function eCe(e){return e?.lastBlockInserted?.clientIds}function tCe(e,t){return e.blocks.byClientId.get(t)}var oCe=(e,t)=>{let o=r=>Is(e,r)==="disabled"&&Jr(e,r).every(o);return Jr(e,t).every(o)};function YS(e,t,o){let r=eG(t),n=Nt(e,o),i=eG(n);return Op(e)===o||i&&r}function tG(e,t){return{clientId:t,innerBlocks:oG(e,t)}}function oG(e,t=""){return Jr(e,t).map(o=>tG(e,o))}var U5=(0,Or.createSelector)(tG,e=>[e.blocks.order]),G5=(0,Or.createSelector)(oG,e=>[e.blocks.order]);function rG(e,t){let o=Jr(e,t),r=[];for(let n of o){let i=rG(e,n);Is(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var rCe=(0,Or.createRegistrySelector)(()=>(0,Or.createSelector)(rG,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blocks.blockEditingModes])),nCe=(0,Or.createSelector)((e,t,o=!1)=>Ea(e,t,o).filter(r=>Is(e,r)!=="disabled"),e=>[e.blocks.parents,e.blocks.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function iCe(e){return e.removalPromptData}function sCe(e){return e.blockRemovalRules}var aCe=(0,Or.createSelector)(e=>{let o=Zg(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,l=o[s]??-1;return a-l})},e=>[e.blocks.order,e.styleOverrides]);function lCe(e){return e.registeredInserterMediaCategories}var cCe=(0,Or.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(l=>l.startsWith(`${a.mediaType}/`)))},e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories]),uCe=(0,Or.createRegistrySelector)(e=>(0,Or.createSelector)((t,o=null)=>{let{getAllPatterns:r}=F(e(Eo)),n=r(),{allowedBlockTypes:i}=Md(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let l=Ip(s);return ZS(l,i)&&l.every(({name:u})=>Ap(t,u,o))})},(t,o)=>[...XS(e)(t),...Vd(e)(t,o)])),dCe=(0,Or.createRegistrySelector)(e=>(0,Or.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=F(e(Eo)).getReusableBlocks().find(({id:i})=>i===r);return n?qS(n,t.settings[Nc]?.(e)??t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[wd]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[F(e(Eo)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[wd]?.(e)])),fCe=(0,Or.createRegistrySelector)(e=>(0,Or.createSelector)(t=>[...F(e(Eo)).getReusableBlocks().map(o=>qS(o,t.settings[Nc]?.(e)??t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[wd]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),XS(e))),mCe=[],pCe=(0,Or.createRegistrySelector)(e=>t=>{let o=t.settings[yC];return(o?o(e):t.settings.__experimentalReusableBlocks)??mCe});function hCe(e){return e.lastFocus}function gCe(e){return e.isDragging}function bCe(e){return e.expandedBlock}var W5=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)Il(e,o)==="contentOnly"&&(r=o);return r};function nG(e,t){let o=Nt(e,t);if(o==="core/block")return!0;let r=Rs(e,t),n=o==="core/template-part",i=e.settings?.[Hi],s=e.settings?.disableContentOnlyForUnsyncedPatterns,a=e.settings?.disableContentOnlyForTemplateParts;if((!s&&r?.metadata?.patternName||n&&!a)&&!i)return!0;let l=Il(e,t)==="contentOnly",u=dr(e,t),d=Il(e,u)==="contentOnly";return!!(l&&!d)}var Nd=(e,t)=>{if(K5(e,t))return;let o=t,r;for(;o=e.blocks.parents.get(o);)nG(e,o)&&(r=o);return r};function Dd(e,t){return K5(e,t)||Nd(e,t)?!1:nG(e,t)}function $5(e){return e.editedContentOnlySection}function K5(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 yCe=(0,Or.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 Op(e){return e.settings?.[Cd]}function Y5(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function vCe(e){return e.zoomLevel}function iG(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>Ap(e,a,s));if(!o){if(n(o))return o;let s=Op(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=dr(e,i);return i}function kCe(e,t,o){let{allowedBlockTypes:r}=Md(e);if(!ZS(Ip(t),r))return null;let i=Ip(t).map(({blockName:s})=>s);return iG(e,i,o)}function SCe(e){return e.insertionPoint}var _Ce=(e,t)=>{let o=Nt(e,t);if(!(0,qg.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(io).some(i=>n?.viewport?.[i.key]===!1):!1},q5=(e,t)=>{let o=Nt(e,t);return(0,qg.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},xCe=(e,t)=>Ea(e,t).some(r=>q5(e,r)),sG=(e,t,o)=>{if(q5(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},wCe=(e,t,o)=>Ea(e,t).some(n=>sG(e,n,o));function CCe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function aG(e,t){return!!Rs(e,t)?.lock?.edit}function lG(e,t){let o=Rs(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=dr(e,t);return Il(e,r)==="all"}function cG(e,t){let o=Rs(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=dr(e,t),n=Il(e,r);return n==="all"||n==="insert"}function ECe(e,t){return aG(e,t)||lG(e,t)||cG(e,t)}function TCe(e){return e.listViewContentPanelOpen}function BCe(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function PCe(e){return e.listViewExpandRevision||0}function RCe(e,t){let o=Nt(e,t);if(o==="core/navigation")return!0;if(!(0,qg.hasBlockSupport)(o,"listView"))return!1;let r=Xg(e,t)?.allowedBlocks;return!(Jr(e,t).length===0&&(r===!1||Array.isArray(r)&&r.length===0))}function ICe(e){return e.viewportModalClientIds}function OCe(e){return e.requestedInspectorTab}var KS={viewport:"default",pseudo:"default"};function uG(e){return e.styleStateViewport??KS.viewport}function ACe(e){return e.isResponsiveEditing}var dG=(0,Or.createSelector)((e,t)=>({...e.selectedBlockStyleState?.clientId===t?e.selectedBlockStyleState.value??KS:KS,viewport:uG(e)}),e=>[e.styleStateViewport,e.selectedBlockStyleState]);function LCe(e,t){let o=dG(e,t);return o.viewport!==KS.viewport||o.pseudo!==KS.pseudo}function MCe(e,t){return e.selectedBlockStyleState?.clientId!==t?!0:e.selectedBlockStyleState.showStateOnCanvas??!0}var JS=c(z(),1),bo={user:"user",theme:"theme",directory:"directory"},QS={full:"fully",unsynced:"unsynced"},Lp={name:"allPatterns",label:(0,JS._x)("All","patterns")},Fc={name:"myPatterns",label:(0,JS.__)("My patterns")},Qg={name:"core/starter-content",label:(0,JS.__)("Starter content")};function CE(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===bo.theme&&(r||n)||t===bo.directory&&(r||!n)||t===bo.user&&e.type!==bo.user||o===QS.full&&e.syncStatus!==""||o===QS.unsynced&&e.syncStatus!=="unsynced"&&r)}var Fd=Symbol("isFiltered"),fG=new WeakMap,mG=new WeakMap;function qS(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:bo.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 NCe(e){let t=(0,pG.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 EE(e){let t=fG.get(e);return t||(t=NCe(e),fG.set(e,t)),t}function Ip(e){let t=mG.get(e);return t||(t=(0,hG.parse)(e.content),t=t.filter(o=>o.blockName!==null),mG.set(e,t)),t}var Mp=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,ZS=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!Mp(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},XS=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings[Nc]?.(e)??t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[wd]?.(e),t.blockPatterns,F(e(Eo)).getReusableBlocks()],Vd=()=>(e,t)=>[e.blockListSettings.get(t),e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Is(e,t),Op(e),Dd(e,t),Nd(e,t)];function gG(e,t){return typeof e=="string"&&typeof t=="string"?e>t:Number(e)>Number(t)}var DCe=(e,t,o)=>(r,n)=>{let i,s;if(typeof e=="function"?(i=e(r),s=e(n)):(i=r[e],s=n[e]),gG(i,s))return o==="asc"?1:-1;if(gG(s,i))return o==="asc"?-1:1;let a=t.findIndex(u=>u===r),l=t.findIndex(u=>u===n);return a>l?1:l>a?-1:0};function Ol(e,t,o="asc"){return e.concat().sort(DCe(t,e,o))}var{isContentBlock:X5}=F(Qe.privateApis),VCe=3600*1e3,FCe=24*3600*1e3,zCe=168*3600*1e3,en=[],jCe=new Set,vG={[Fd]:!0};function Nt(e,t){let o=e.blocks.byClientId.get(t);return o?o.name:null}function HCe(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Rs(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function jc(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var UCe=(0,Je.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Rs(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function GCe(e,t){let o=!t||!RE(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||en}function WCe(e,t){return(0,Gi.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),U5(e,t)}function $Ce(e,t){return(0,Gi.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),G5(e,t)}var kG=(0,Je.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]),Zg=e=>kG(e,""),KCe=(0,Je.createSelector)((e,t)=>{let o=Zg(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]),SG=(0,Je.createSelector)((e,t)=>{if(!t)return en;let o=Array.isArray(t)?t:[t],n=Zg(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:en},e=>[e.blocks.order,e.blocks.byClientId]);function YCe(e,t){return(0,Gi.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),SG(e,t)}var TE=(0,Je.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>jc(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),qCe=(0,Je.createSelector)((e,t)=>TE(e,t).filter(Boolean).map(o=>o.name),(e,t)=>TE(e,t));function ZCe(e,t){return Jr(e,t).length}function t_(e){return e.selection.selectionStart}function o_(e){return e.selection.selectionEnd}function XCe(e){return e.selection.selectionStart.clientId}function QCe(e){return e.selection.selectionEnd.clientId}function JCe(e){let t=zd(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function e1e(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function Jg(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function t1e(e){let t=Jg(e);return t?jc(e,t):null}function dr(e,t){return e.blocks.parents.get(t)??null}var Ea=(0,Je.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():en},e=>[e.blocks.parents]),Q5=(0,Je.createSelector)((e,t,o,r=!1)=>{let n=Ea(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(Nt(e,s)))},e=>[e.blocks.parents]);function o1e(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function r1e(e,t){let o=Jg(e),r=[...Ea(e,t),t],n=[...Ea(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 J5(e,t,o=1){if(t===void 0&&(t=Jg(e)),t===void 0&&(o<0?t=eF(e):t=_G(e)),!t)return null;let r=dr(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 n1e(e,t){return J5(e,t,-1)}function i1e(e,t){return J5(e,t,1)}function s1e(e){return e.initialPosition}var eb=(0,Je.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return en;if(t.clientId===o.clientId)return[t.clientId];let r=dr(e,t.clientId);if(r===null)return en;let n=Jr(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 zd(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?en:eb(e)}var a1e=(0,Je.createSelector)(e=>{let t=zd(e);return t.length?t.map(o=>jc(e,o)):en},e=>[...eb.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function eF(e){return zd(e)[0]||null}function _G(e){let t=zd(e);return t[t.length-1]||null}function l1e(e,t){return eF(e)===t}function xG(e,t){return zd(e).indexOf(t)!==-1}var c1e=(0,Je.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=dr(e,o),r=xG(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function u1e(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function d1e(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function f1e(e){let t=t_(e),o=o_(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function m1e(e){let t=t_(e),o=o_(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function p1e(e){return eb(e).some(t=>{let o=Nt(e,t);return!(0,Qe.getBlockType)(o).merge})}function h1e(e,t){let o=t_(e),r=o_(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=dr(e,o.clientId),i=dr(e,r.clientId);if(n!==i)return!1;let s=Jr(e,n),a=s.indexOf(o.clientId),l=s.indexOf(r.clientId),u,d;a>l?(u=r,d=o):(u=o,d=r);let f=t?d.clientId:u.clientId,m=t?u.clientId:d.clientId,h=Nt(e,f);if(!(0,Qe.getBlockType)(h).merge)return!1;let g=jc(e,m);if(g.name===h)return!0;let b=(0,Qe.switchToBlockType)(g,h);return b&&b.length}var g1e=e=>{let t=t_(e),o=o_(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return en;let r=dr(e,t.clientId),n=dr(e,o.clientId);if(r!==n)return en;let i=Jr(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[l,u]=s>a?[o,t]:[t,o],d=jc(e,l.clientId),f=jc(e,u.clientId),m=d.attributes[l.attributeKey],h=f.attributes[u.attributeKey],p=(0,zc.create)({html:m}),g=(0,zc.create)({html:h});return p=(0,zc.remove)(p,0,l.offset),g=(0,zc.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[l.attributeKey]:(0,zc.toHTMLString)({value:p})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,zc.toHTMLString)({value:g})}}]};function Jr(e,t){return e.blocks.order.get(t||"")||en}function wG(e,t){let o=dr(e,t);return Jr(e,o).indexOf(t)}function CG(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function EG(e,t,o=!1){let r=eb(e);return r.length?o?r.some(n=>Ea(e,n,!0).includes(t)):r.some(n=>dr(e,n)===t):!1}function TG(e,t,o=!1){return Jr(e,t).some(r=>tF(e,r)||o&&TG(e,r,o))}function b1e(e,t){if(!t)return!1;let o=zd(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function y1e(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function v1e(e){return e.isMultiSelecting}function k1e(e){return e.isSelectionEnabled}function S1e(e,t){return e.blocksMode[t]||"visual"}function _1e(e){return e.isTyping}function BG(e){return!!e.draggedBlocks.length}function x1e(e){return e.draggedBlocks}function tF(e,t){return e.draggedBlocks.includes(t)}function w1e(e,t){return BG(e)?Ea(e,t).some(r=>tF(e,r)):!1}function C1e(){return(0,Gi.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var E1e=(0,Je.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=dr(e,i)||void 0,o=wG(e,n.clientId)+1):o=Jr(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function T1e(e){return e.insertionCue!==null}function B1e(e){return e.template.isValid}function P1e(e){return e.settings.template}function Il(e,t){if(!t)return e.settings.templateLock??!1;let o=Xg(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var oF=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Qe.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=Md(e);if(!Mp(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 l=o,u=!1;do{if(a.includes(Nt(e,l))){u=!0;break}l=e.blocks.parents.get(l)}while(l);return u}return!0},r_=(e,t,o=null)=>{if(e.settings.isPreviewMode||!oF(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Qe.getBlockType)(t);let n=Il(e,o);if(n&&n!=="contentOnly")return!1;let i=Is(e,o??""),s=!!Dd(e,o),a=s?o:Nd(e,o),l=!!a;if(i==="disabled"&&(!l||t!==(0,Qe.getDefaultBlockName)()))return!1;let u=Xg(e,o);if(o&&u===void 0)return!1;let d=X5(t);if(l&&!d||l&&Nt(e,a)==="core/block")return!1;if(l&&(s||i==="contentOnly"||i==="disabled")&&!YS(e,t,o)){let k=(0,Qe.getDefaultBlockName)();if(t===k){if(!Jr(e,o).some(E=>Nt(e,E)===k))return!1}else return!1}let f=Nt(e,o),h=(0,Qe.getBlockType)(f)?.allowedBlocks,p=Mp(h,t);if(p!==!1){let k=u?.allowedBlocks,_=Mp(k,t);_!==null&&(p=_)}let g=r.parent,b=Mp(g,f),v=!0,y=r.ancestor;y&&(v=[o,...Ea(e,o)].some(_=>Mp(y,Nt(e,_))));let S=v&&(p===null&&b===null||p===!0||b===!0);return S&&(0,yG.applyFilters)("blockEditor.__unstableCanInsertBlockType",S,r,o,{getBlock:jc.bind(null,e),getBlockParentsByBlockName:Q5.bind(null,e)})},Ap=(0,Je.createRegistrySelector)(e=>(0,Je.createSelector)(r_,(t,o,r)=>Vd(e)(t,r)));function R1e(e,t,o=null){return t.every(r=>Ap(e,Nt(e,r),o))}function rF(e,t){if(e.settings.isPreviewMode)return!1;let o=Rs(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=dr(e,t),n=Il(e,r);if(n&&n!=="contentOnly")return!1;let i=!!Dd(e,r),s=i?r:Nd(e,r),a=!!s,l=X5(Nt(e,t));if(a&&!l||a&&Nt(e,s)==="core/block")return!1;let u=Is(e,r),d=Nt(e,t),f=(0,Qe.getDefaultBlockName)();return a&&(i||d===f||u==="contentOnly")&&!YS(e,Nt(e,t),r)?d===f?Jr(e,r).filter(p=>Nt(e,p)===f).length>1:!1:u!=="disabled"}function PG(e,t){return t.every(o=>rF(e,o))}function RG(e,t){if(e.settings.isPreviewMode)return!1;let o=Rs(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=dr(e,t);if(Il(e,r)==="all")return!1;let i=!!Nd(e,t),s=X5(Nt(e,t));if(i&&!s)return!1;let a=!!Dd(e,r),l=Is(e,r);return i&&(a||l==="contentOnly")&&!YS(e,Nt(e,t),r)?!1:Is(e,r)!=="disabled"}function I1e(e,t){return t.every(o=>RG(e,o))}function IG(e,t){if(e.settings.isPreviewMode)return!1;let o=Rs(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function O1e(e,t){return e.settings.isPreviewMode||!(0,Qe.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function BE(e,t){return e.preferences.insertUsage?.[t]??null}var e_=(e,t,o)=>(0,Qe.hasBlockSupport)(t,"inserter",!0)?r_(e,t.name,o):!1,A1e=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=BE(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:PE(n,i),isSearchOnly:o.isSearchOnly}},PE=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<VCe:return t*4;case o<FCe:return t*2;case o<zCe:return t/2;default:return t/4}},OG=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Qe.hasBlockSupport)(o.name,"multiple",!0)||(n=TE(e,Zg(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=BE(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:PE(i,s)};if(t==="transform")return a;let l=(0,Qe.getBlockVariations)(o.name,"inserter"),u=(0,Qe.getBlockVariations)(o.name,"block"),d=[...l,...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}},L1e=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=BE(e,r)||{};return{...t,id:r,icon:o.icon||t.icon,title:o.title||t.title,frecency:PE(n,i),variationName:o.name}},M1e=(0,Je.createRegistrySelector)(e=>(0,Je.createSelector)((t,o=null,r=vG)=>{let n=h=>{let p=h.wp_pattern_sync_status?Rl:{src:Rl,foreground:"var(--wp-block-synced-color)"},g=qS(h),{time:b,count:v=0}=BE(t,g.name)||{},y=PE(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:y,content:g.content,get blocks(){return EE(g).blocks},syncStatus:g.syncStatus}},i=r_(t,"core/block",o)?F(e(Eo)).getReusableBlocks().map(n):[],s=OG(t,{buildScope:"inserter"}),a=(0,Qe.getBlockTypes)().filter(h=>(0,Qe.hasBlockSupport)(h,"inserter",!0)).map(s);if(r[Fd]!==!1)a=a.filter(h=>e_(t,h,o));else{let{getClosestAllowedInsertionPoint:h}=F(e(Eo));a=a.filter(p=>oF(t,p,o)&&h(p.name,o)!==null).map(p=>({...p,isAllowedInCurrentRoot:e_(t,p,o)}))}let l=a.reduce((h,p)=>{let{variations:g=[]}=p;if(g.some(({isDefault:b})=>b)||h.push(p),g.length){let b=A1e(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}=l.reduce(u,{core:[],noncore:[]});return[...[...d,...f],...i]},(t,o)=>[(0,Qe.getBlockTypes)(),F(e(Eo)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...Vd(e)(t,o)])),N1e=(0,Je.createRegistrySelector)(e=>(0,Je.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=OG(t,{buildScope:"transform"}),s=(0,Qe.getBlockTypes)().filter(u=>e_(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),l=(0,Qe.getPossibleBlockTransformations)(n).reduce((u,d)=>{let f=a[d?.name];if(!f)return u;let{variationName:m}=d;if(!m)return u.push(f),u;let h=(0,Qe.getBlockVariations)(f.name,"transform")?.find(({name:p})=>p===m);return h?(u.push(L1e(t,f)(h)),u):(u.push(f),u)},[]);return Ol(l,u=>u.frecency,"desc")},(t,o,r)=>[(0,Qe.getBlockTypes)(),t.preferences.insertUsage,...Vd(e)(t,r)])),D1e=(e,t=null)=>(0,Qe.getBlockTypes)().some(n=>e_(e,n,t))?!0:r_(e,"core/block",t),Z5=(0,Je.createRegistrySelector)(e=>(0,Je.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Qe.getBlockTypes)().filter(i=>e_(t,i,o));return r_(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Qe.getBlockTypes)(),...Vd(e)(t,o)])),V1e=(0,Je.createSelector)((e,t=null)=>((0,Gi.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),Z5(e,t)),(e,t)=>Z5.getDependants(e,t));function AG(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings.get(t)??{};if(!(!o||!r))return o}function F1e(e,t=null){return(0,Gi.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),AG(e,t)}var z1e=(0,Je.createRegistrySelector)(e=>(t,o)=>{let r=F(e(Eo)).getPatternBySlug(o);return r?EE(r):null}),nF=e=>(t,o)=>[...XS(e)(t),...Vd(e)(t,o)],bG=new WeakMap;function j1e(e){let t=bG.get(e);return t||(t={...e,get blocks(){return EE(e).blocks}},bG.set(e,t)),t}var H1e=(0,Je.createRegistrySelector)(e=>(0,Je.createSelector)((t,o=null,r=vG)=>{let{getAllPatterns:n}=F(e(Eo)),i=n(),{allowedBlockTypes:s}=Md(t);return i.filter(({inserter:d=!0})=>!!d).map(j1e).filter(d=>ZS(Ip(d),s)).filter(d=>Ip(d).every(({blockName:f})=>r[Fd]!==!1?Ap(t,f,o):oF(t,f,o)))},nF(e))),U1e=(0,Je.createRegistrySelector)(e=>(0,Je.createSelector)((t,o,r=null)=>{if(!o)return en;let n=e(Eo).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(l=>i.includes(l)));return s.length===0?en:s},(t,o,r)=>nF(e)(t,r))),G1e=(0,Je.createRegistrySelector)(e=>((0,Gi.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Eo).getPatternsByBlockTypes)),W1e=(0,Je.createRegistrySelector)(e=>(0,Je.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||RE(t,i)))return en;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Eo).getPatternsByBlockTypes(n,r)},(t,o,r)=>nF(e)(t,r)));function Xg(e,t){return e.blockListSettings.get(t)}function Md(e){return e.settings}function $1e(e){return e.blocks.isPersistentChange}function K1e(e){return e.blocks.lastBlockChangeHistoryMode?e.blocks.lastBlockChangeHistoryMode:e.blocks.isPersistentChange===!1?"merge":"persistent"}var Y1e=(0,Je.createSelector)((e,t=[])=>{let o={};for(let r of t){let n=Xg(e,r);n&&(o[r]=n)}return o},e=>[e.blockListSettings]),q1e=(0,Je.createRegistrySelector)(e=>(0,Je.createSelector)((t,o)=>{(0,Gi.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=F(e(Eo)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[F(e(Eo)).getReusableBlocks()]));function Z1e(e){return e.blocks.isIgnoredChange}function X1e(e){return e.lastBlockAttributesChange}function Q1e(){return(0,Gi.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function J1e(e){return!!e.automaticChangeStatus}function eEe(e,t){return e.highlightedBlock===t}function RE(e,t){return e.blocks.controlledInnerBlocks.has(t)}var tEe=(0,Je.createSelector)((e,t)=>{if(!t.length)return null;let o=Jg(e);if(t.includes(Nt(e,o)))return o;let r=zd(e),n=Q5(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function oEe(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function rEe(e,t){return e.blockVisibility?.[t]??!0}function nEe(){(0,Gi.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var iEe=(0,Je.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?jCe:t},e=>[e.blockVisibility]);function LG(e,t){if(Is(e,t)!=="default")return!1;if(!IG(e,t))return!0;if(Y5(e)){let n=Op(e);if(n){if(Jr(e,n)?.includes(t))return!0}else if(t&&!dr(e,t))return!0}return((0,Qe.hasBlockSupport)(Nt(e,t),"__experimentalDisableBlockOverlay",!1)?!1:RE(e,t))&&!CG(e,t)&&!EG(e,t,!0)}function sEe(e,t){let o=e.blocks.parents.get(t);for(;o;){if(LG(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Is(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blocks.blockEditingModes.has(t)?e.blocks.blockEditingModes.get(t):"default"}var aEe=(0,Je.createRegistrySelector)(e=>(t,o="")=>{let r=o||Jg(t);if(!r||Dd(t,r))return!1;let{getGroupingBlockName:n}=e(Qe.store),i=jc(t,r),s=n();return i&&(i.name===s||(0,Qe.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&rF(t,r)}),lEe=(0,Je.createRegistrySelector)(e=>(t,o=en)=>{let{getGroupingBlockName:r}=e(Qe.store),n=r(),i=o?.length?o:eb(t),s=i?.length?dr(t,i[0]):void 0;return Ap(t,n,s)&&i.length&&PG(t,i)}),cEe=(e,t)=>((0,Gi.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),W5(e,t));function uEe(e){return(0,Gi.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),$5(e)}var IE={};xs(IE,{__experimentalUpdateSettings:()=>sF,clearBlockRemovalPrompt:()=>gEe,clearRequestedInspectorTab:()=>LEe,closeListViewContentPanel:()=>REe,deleteStyleOverride:()=>vEe,editContentOnlySection:()=>lF,ensureDefaultBlock:()=>FG,expandBlock:()=>xEe,hideBlockInterface:()=>mEe,hideViewportModal:()=>OEe,openListViewContentPanel:()=>PEe,privateRemoveBlocks:()=>aF,requestInspectorTab:()=>AEe,resetZoomLevel:()=>TEe,setBlockRemovalRules:()=>bEe,setInsertionPoint:()=>wEe,setLastFocus:()=>kEe,setResponsiveEditing:()=>VEe,setSelectedBlockStyleState:()=>MEe,setSelectedBlockStyleStateCanvasPreview:()=>NEe,setStyleOverride:()=>yEe,setStyleStateViewport:()=>DEe,setZoomLevel:()=>EEe,showBlockInterface:()=>pEe,showViewportModal:()=>IEe,startDragging:()=>SEe,stopDragging:()=>_Ee,stopEditingContentOnlySection:()=>CEe,toggleBlockSpotlight:()=>BEe});var NG=c(Xe(),1),DG=c(_r(),1),VG=c(z(),1),dEe=e=>Array.isArray(e)?e:[e],fEe=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function sF(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,NG.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){n={};for(let i in r)fEe.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function mEe(){return{type:"HIDE_BLOCK_INTERFACE"}}function pEe(){return{type:"SHOW_BLOCK_INTERFACE"}}var aF=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=dEe(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 l=u;let d=e.map(r.getBlock),f=u(d),m;for(let h of a)if(m=h.callback(f),m){n(hEe(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(FG())})},FG=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function hEe(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function gEe(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function bEe(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function yEe(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function vEe(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function kEe(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function SEe(){return{type:"START_DRAGGING"}}function _Ee(){return{type:"STOP_DRAGGING"}}function xEe(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function wEe(e){return{type:"SET_INSERTION_POINT",value:e}}function lF(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function CEe(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var EEe=(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,DG.speak)((0,VG.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function TEe(){return{type:"RESET_ZOOM_LEVEL"}}function BEe(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function PEe(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function REe(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function IEe(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function OEe(){return{type:"HIDE_VIEWPORT_MODAL"}}function AEe(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function LEe(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}function MEe(e,t){return{type:"SET_SELECTED_BLOCK_STYLE_STATE",clientId:e,value:t}}function NEe(e,t){return{type:"SET_SELECTED_BLOCK_STYLE_STATE_CANVAS_PREVIEW",clientId:e,value:t}}function DEe(e){return{type:"SET_STYLE_STATE_VIEWPORT",viewport:e}}function VEe(e){return{type:"SET_RESPONSIVE_EDITING",enabled:e}}var dF={};xs(dF,{__unstableDeleteSelection:()=>lTe,__unstableExpandSelection:()=>uTe,__unstableIncrementListViewExpandRevision:()=>GTe,__unstableMarkAutomaticChange:()=>BTe,__unstableMarkLastChangeAsPersistent:()=>ETe,__unstableMarkNextChangeAsNotPersistent:()=>TTe,__unstableSaveReusableBlock:()=>CTe,__unstableSetAllListViewPanelsOpen:()=>HTe,__unstableSetEditorMode:()=>PTe,__unstableSetOpenListViewPanel:()=>jTe,__unstableSetTemporarilyEditingAsBlocks:()=>DTe,__unstableSplitSelection:()=>cTe,__unstableToggleListViewPanel:()=>UTe,clearSelectedBlock:()=>XEe,duplicateBlocks:()=>ITe,enterFormattedText:()=>vTe,exitFormattedText:()=>kTe,flashBlock:()=>LTe,hideInsertionPoint:()=>iTe,hoverBlock:()=>WEe,insertAfterBlock:()=>ATe,insertBeforeBlock:()=>OTe,insertBlock:()=>rTe,insertBlocks:()=>qG,insertDefaultBlock:()=>_Te,mergeBlocks:()=>dTe,moveBlockToPosition:()=>oTe,moveBlocksDown:()=>eTe,moveBlocksToPosition:()=>YG,moveBlocksUp:()=>tTe,multiSelect:()=>ZEe,receiveBlocks:()=>jEe,registerInserterMediaCategory:()=>VTe,removeBlock:()=>fTe,removeBlocks:()=>ZG,replaceBlock:()=>JEe,replaceBlocks:()=>$G,replaceInnerBlocks:()=>mTe,resetBlocks:()=>FEe,resetSelection:()=>zEe,selectBlock:()=>GEe,selectNextBlock:()=>KEe,selectPreviousBlock:()=>$Ee,selectionChange:()=>STe,setBlockEditingMode:()=>FTe,setBlockMovingClientId:()=>RTe,setBlockVisibility:()=>NTe,setHasControlledInnerBlocks:()=>MTe,setTemplateValidity:()=>sTe,showInsertionPoint:()=>nTe,startDraggingBlocks:()=>bTe,startMultiSelect:()=>YEe,startTyping:()=>hTe,stopDraggingBlocks:()=>yTe,stopMultiSelect:()=>qEe,stopTyping:()=>gTe,synchronizeTemplate:()=>aTe,toggleBlockHighlight:()=>uF,toggleBlockMode:()=>pTe,toggleSelection:()=>QEe,unsetBlockEditingMode:()=>zTe,updateBlock:()=>UEe,updateBlockAttributes:()=>HEe,updateBlockListSettings:()=>xTe,updateSettings:()=>wTe,validateBlocksToTemplate:()=>WG});var Te=c(ee(),1),OE=c(_r(),1),jd=c(z(),1),UG=c(Wi(),1),jt=c(Qr(),1),Uc=c(Xe(),1),GG=c(tb(),1);var HG=c(Qr(),1),Hc="\x86";function n_(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof HG.RichTextData)&&o.toString().indexOf(Hc)!==-1})}function cF(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var ob=e=>Array.isArray(e)?e:[e],FEe=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(WG(e))},WG=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,Te.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function zEe(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function jEe(e){return(0,Uc.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function HEe(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:ob(e),attributes:t,options:o}}function UEe(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function GEe(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function WEe(){return(0,Uc.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var $Ee=(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)}}},KEe=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function YEe(){return{type:"START_MULTI_SELECT"}}function qEe(){return{type:"STOP_MULTI_SELECT"}}var ZEe=(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,OE.speak)((0,jd.sprintf)((0,jd._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function XEe(){return{type:"CLEAR_SELECTED_BLOCK"}}function QEe(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var $G=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=ob(e),t=ob(t);let l=i.getBlockRootClientId(e[0]);for(let u=0;u<t.length;u++){let d=t[u];if(!i.canInsertBlockType(d.name,l))return}a.batch(()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:o,initialPosition:r,meta:n}),s.ensureDefaultBlock()})};function JEe(e,t){return $G(e,t)}var KG=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:ob(t),rootClientId:o})},eTe=KG("MOVE_BLOCKS_DOWN"),tTe=KG("MOVE_BLOCKS_UP"),YG=(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 oTe(e,t="",o="",r){return YG([e],t,o,r)}function rTe(e,t,o,r,n,i){return qG([e],t,o,r,n,i)}var qG=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,Uc.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=ob(e);let l=[];for(let u of e)s.canInsertBlockType(u.name,o)&&l.push(u);l.length&&a({type:"INSERT_BLOCKS",blocks:l,index:t,rootClientId:o,time:Date.now(),updateSelection:r,initialPosition:r?n:null,meta:i})};function nTe(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 iTe=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function sTe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var aTe=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,Te.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},lTe=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 l=o.getBlockOrder(s),u=l.indexOf(n.clientId),d=l.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,Te.getBlockType)(p.name);if(!g.merge)return;let b=f,v=m,y=o.getBlock(b.clientId),S=o.getBlock(v.clientId),k=y.attributes[b.attributeKey],_=S.attributes[v.attributeKey],x=(0,jt.create)({html:k}),E=(0,jt.create)({html:_});x=(0,jt.remove)(x,b.offset,x.text.length),E=(0,jt.insert)(E,Hc,0,v.offset);let B=(0,Te.cloneBlock)(y,{[b.attributeKey]:(0,jt.toHTMLString)({value:x})}),P=(0,Te.cloneBlock)(S,{[v.attributeKey]:(0,jt.toHTMLString)({value:E})}),T=e?B:P,A=y.name===S.name?[T]:(0,Te.switchToBlockType)(T,g.name);if(!A||!A.length)return;let I;if(e){let Y=A.pop();I=g.merge(Y.attributes,P.attributes)}else{let Y=A.shift();I=g.merge(B.attributes,Y.attributes)}let R=n_(I),V=I[R],N=(0,jt.create)({html:V}),U=N.text.indexOf(Hc),j=(0,jt.remove)(N,U,U+1),O=(0,jt.toHTMLString)({value:j});I[R]=O;let M=o.getSelectedBlockClientIds(),H=[...e?A:[],{...p,attributes:{...p.attributes,...I},innerBlocks:S.innerBlocks},...e?[]:A];t.batch(()=>{r.selectionChange(p.clientId,R,U,U),r.replaceBlocks(M,H,0,o.getSelectedBlocksInitialCaretPosition())})},cTe=(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 l=o.getBlockOrder(s),u=l.indexOf(n.clientId),d=l.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,Te.getBlockType)(g.name),y=(0,Te.getBlockType)(b.name),S=typeof h.attributeKey=="string"?h.attributeKey:cF(v),k=typeof p.attributeKey=="string"?p.attributeKey:cF(y),_=o.getBlockAttributes(h.clientId);if(_?.metadata?.bindings?.[S]){if(e.length){let{createWarningNotice:K}=t.dispatch(UG.store);K((0,jd.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(h.clientId);return}if(!S||!k||typeof n.offset>"u"||typeof i.offset>"u")return;if(h.clientId===p.clientId&&S===k&&h.offset===p.offset){if(e.length){if((0,Te.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([h.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(h.clientId).length){let K=function(){let q=(0,Te.getDefaultBlockName)();return o.canInsertBlockType(q,s)?(0,Te.createBlock)(q):(0,Te.createBlock)(o.getBlockName(h.clientId))};var E=K;let Z=_[S].length;if(h.offset===0&&Z){r.insertBlocks([K()],o.getBlockIndex(h.clientId),s,!1);return}if(h.offset===Z){r.insertBlocks([K()],o.getBlockIndex(h.clientId)+1,s);return}}}let B=g.attributes[S],P=b.attributes[k],T=(0,jt.create)({html:B}),A=(0,jt.create)({html:P});T=(0,jt.remove)(T,h.offset,T.text.length),A=(0,jt.remove)(A,0,p.offset);let I={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[S]:(0,jt.toHTMLString)({value:T})}},R={...b,clientId:g.clientId===b.clientId?(0,Te.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[k]:(0,jt.toHTMLString)({value:A})}},V=(0,Te.getDefaultBlockName)();if(g.clientId===b.clientId&&V&&R.name!==V&&o.canInsertBlockType(V,s)){let K=(0,Te.switchToBlockType)(R,V);K?.length===1&&(R=K[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[I,R]);return}let N,U=[],j=[...e],O=j.shift(),M=(0,Te.getBlockType)(I.name),H=M.merge&&O.name===M.name?[O]:(0,Te.switchToBlockType)(O,M.name);if(H?.length){let K=H.shift();I={...I,attributes:{...I.attributes,...M.merge(I.attributes,K.attributes)}},U.push(I),N={clientId:I.clientId,attributeKey:S,offset:(0,jt.create)({html:I.attributes[S]}).text.length},j.unshift(...H)}else(0,Te.isUnmodifiedBlock)(I)||U.push(I),U.push(O);let Y=j.pop(),oe=(0,Te.getBlockType)(R.name);if(j.length&&U.push(...j),Y){let K=oe.merge&&oe.name===Y.name?[Y]:(0,Te.switchToBlockType)(Y,oe.name);if(K?.length){let Z=K.pop();U.push({...R,attributes:{...R.attributes,...oe.merge(Z.attributes,R.attributes)}}),U.push(...K),N={clientId:R.clientId,attributeKey:k,offset:(0,jt.create)({html:Z.attributes[k]}).text.length}}else U.push(Y),(0,Te.isUnmodifiedBlock)(R)||U.push(R)}else(0,Te.isUnmodifiedBlock)(R)||U.push(R);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),U,U.length-1,0),N&&r.selectionChange(N.clientId,N.attributeKey,N.offset,N.offset)})},uTe=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},dTe=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),l=(0,Te.getBlockType)(a.name);if(!l||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!l.merge&&(0,Te.getBlockSupport)(a.name,"__experimentalOnMerge")){let _=(0,Te.switchToBlockType)(u,l.name);if(_?.length!==1){n.selectBlock(a.clientId);return}let[x]=_;if(x.innerBlocks.length<1){n.selectBlock(a.clientId);return}o.batch(()=>{n.insertBlocks(x.innerBlocks,void 0,i),n.removeBlock(s),n.selectBlock(x.innerBlocks[0].clientId);let E=r.getNextBlockClientId(i);if(E&&r.getBlockName(i)===r.getBlockName(E)){let B=r.getBlockAttributes(i),P=r.getBlockAttributes(E);Object.keys(B).every(T=>B[T]===P[T])&&(n.moveBlocksToPosition(r.getBlockOrder(E),E,i),n.removeBlock(E,!1))}});return}if((0,Te.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,Te.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!l.merge){(0,Te.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,Te.getBlockType)(u.name),{clientId:f,attributeKey:m,offset:h}=r.getSelectionStart(),g=(f===i?l: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,Te.cloneBlock)(a),y=(0,Te.cloneBlock)(u);if(b){let _=f===i?v:y,x=_.attributes[m],E=(0,jt.insert)((0,jt.create)({html:x}),Hc,h,h);_.attributes[m]=(0,jt.toHTMLString)({value:E})}let S=a.name===u.name?[y]:(0,Te.switchToBlockType)(y,a.name);if(!S||!S.length)return;let k=l.merge(v.attributes,S[0].attributes);if(b){let _=n_(k),x=k[_],E=(0,jt.create)({html:x}),B=E.text.indexOf(Hc),P=(0,jt.remove)(E,B,B+1),T=(0,jt.toHTMLString)({value:P});k[_]=T,n.selectionChange(a.clientId,_,B,B)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,...k}},...S.slice(1)],0)},ZG=(e,t=!0)=>aF(e,t);function fTe(e,t){return ZG([e],t)}function mTe(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 pTe(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function hTe(){return{type:"START_TYPING"}}function gTe(){return{type:"STOP_TYPING"}}function bTe(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function yTe(){return{type:"STOP_DRAGGING_BLOCKS"}}function vTe(){return(0,Uc.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function kTe(){return(0,Uc.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function STe(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var _Te=(e,t,o)=>({dispatch:r})=>{let n=(0,Te.getDefaultBlockName)();if(!n)return;let i=(0,Te.createBlock)(n,e);return r.insertBlock(i,o,t)};function xTe(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function wTe(e){return sF(e,{stripExperimentalSettings:!0})}function CTe(){return(0,Uc.default)('wp.data.dispatch( "core/block-editor" ).__unstableSaveReusableBlock',{since:"7.1"}),{type:"DO_NOTHING"}}function ETe(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function TTe({history:e="merge"}={}){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",history:e}}var BTe=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},PTe=e=>({registry:t})=>{t.dispatch(GG.store).set("core","editorTool",e),e==="navigation"?(0,OE.speak)((0,jd.__)("You are currently in Write mode.")):e==="edit"&&(0,OE.speak)((0,jd.__)("You are currently in Design mode."))};function RTe(){return(0,Uc.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var ITe=(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,Te.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=ob(e),l=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,Te.__experimentalCloneSanitizedBlock)(d));return r.insertBlocks(u,l+1,s,t),u.length>1&&t&&r.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map(d=>d.clientId)},OTe=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),{defaultBlock:i}=r?t.getBlockListSettings(r)??{}:{};if(!i)return o.insertDefaultBlock({},r,n);let s={};if(i.attributesToCopy){let l=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{l[u]&&(s[u]=l[u])})}let a=(0,Te.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n,r)},ATe=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),{defaultBlock:i}=r?t.getBlockListSettings(r)??{}:{};if(!i)return o.insertDefaultBlock({},r,n+1);let s={};if(i.attributesToCopy){let l=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{l[u]&&(s[u]=l[u])})}let a=(0,Te.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n+1,r)};function uF(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var LTe=(e,t=150)=>async({dispatch:o})=>{o(uF(e,!0)),await new Promise(r=>setTimeout(r,t)),o(uF(e,!1))};function MTe(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function NTe(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function DTe(e){return(0,Uc.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),lF(e)}var VTe=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 FTe(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function zTe(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function jTe(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function HTe(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function UTe(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function GTe(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var rb={reducer:K9,selectors:iF,actions:dF},w=(0,AE.createReduxStore)(Eo,{...rb,persist:["preferences"]}),XG=(0,AE.registerStore)(Eo,{...rb,persist:["preferences"]});F(XG).registerPrivateActions(IE);F(XG).registerPrivateSelectors(wE);F(w).registerPrivateActions(IE);F(w).registerPrivateSelectors(wE);var nb=c(D(),1),QG=c(z(),1);var Ta=c(C(),1);function WTe({className:e,actions:t,children:o,secondaryActions:r}){return(0,Ta.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Ta.jsx)("div",{className:G(e,"block-editor-warning"),children:(0,Ta.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Ta.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Ta.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Ta.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Ta.jsx)(nb.DropdownMenu,{className:"block-editor-warning__secondary",icon:Ui,label:(0,QG.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Ta.jsx)(nb.MenuGroup,{children:r.map((n,i)=>(0,Ta.jsx)(nb.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var Hd=WTe;var ib=c(C(),1);function tW({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,eW.useDispatch)(w),n=(0,JG.getBlockType)(t);return(0,ib.jsxs)(Hd,{actions:[(0,ib.jsx)(fF.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,LE.__)("Find original")},"find-original"),(0,ib.jsx)(fF.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,LE.__)("Remove")},"remove")],children:[(0,ib.jsxs)("strong",{children:[n?.title,": "]}),(0,LE.__)("This block can only be used once.")]})}var i_=c(C(),1);function DE({mayDisplayControls:e,mayDisplayParentControls:t,mayDisplayPatternEditingControls:o,blockEditingMode:r,isPreviewMode:n,...i}){let{name:s,isSelected:a,clientId:l,attributes:u={},__unstableLayoutClassNames:d}=i,{layout:f=null,metadata:m={}}=u,{bindings:h}=m,p=(0,ME.hasBlockSupport)(s,"layout",!1)||(0,ME.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!Ze()[aS]||(0,ME.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:v}=(0,NE.useContext)(qr);return(0,i_.jsxs)(aC,{value:(0,NE.useMemo)(()=>({name:s,isSelected:a,clientId:l,layout:p?f:null,__unstableLayoutClassNames:d,[xa]:e,[Ag]:t,[Sd]:o&&r!=="disabled",[iC]:r,[Lg]:h,[sC]:n,[aS]:b}),[s,a,l,p,f,d,e,t,o,r,h,n,b]),children:[(0,i_.jsx)(L9,{...i}),v&&(0,i_.jsx)(tW,{originalBlockClientId:v,name:s,onReplace:i.onReplace})]})}function ke(...e){let{clientId:t=null}=Ze();return(0,oW.useSelect)(o=>F(o(w)).getBlockSettings(t,...e),[t,...e])}function nW(e){(0,rW.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]=ke(e);return t}var FE=c(C(),1),{kebabCase:$Te}=F(sW.privateApis),iW=([e,...t])=>e.toUpperCase()+t.join(""),KTe=e=>(0,Np.createHigherOrderComponent)(t=>function(r){return(0,FE.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),YTe=()=>(0,Np.createHigherOrderComponent)(e=>function(o){let[r,n,i]=ke("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,VE.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,FE.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function aW(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:$Te(n)}:n}),{});return(0,Np.compose)([t,r=>class extends VE.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 C9(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=iW(s),l=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,l),i},{})}createSetColor(i,s){return a=>{let l=uC(this.props.colors,a);this.props.setAttributes({[i]:l&&l.slug?l.slug:void 0,[s]:l&&l.slug?void 0:a})}}static getDerivedStateFromProps({attributes:i,colors:s},a){return Object.entries(o).reduce((l,[u,d])=>{let f=Pl(s,i[u],i[`custom${iW(u)}`]),m=a[u];return m?.color===f.color&&m?l[u]=m:l[u]={...f,class:Cs(d,f.slug)},l},{})}render(){return(0,FE.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function lW(e){return(...t)=>{let o=KTe(e);return(0,Np.createHigherOrderComponent)(aW(t,o),"withCustomColors")}}function cW(...e){let t=YTe();return(0,Np.createHigherOrderComponent)(aW(e,t),"withColors")}var zE=c(L(),1),jE=c(W(),1);function sb(e){if(e)return`has-${e}-gradient-background`}function HE(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function uW(e,t){return e?.find(r=>r.gradient===t)}function dW(e,t){let o=uW(e,t);return o&&o.slug}function qTe({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Ze(),[r,n,i]=ke("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,zE.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:l}=(0,jE.useSelect)(h=>{let{getBlockAttributes:p}=h(w),g=p(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,jE.useDispatch)(w),d=(0,zE.useCallback)(h=>{let p=dW(s,h);if(p){u(o,{[e]:p,[t]:void 0});return}u(o,{[e]:void 0,[t]:h})},[s,o,u]),f=sb(a),m;return a?m=HE(s,a):m=l,{gradientClass:f,gradientValue:m,setGradient:d}}var fW=c(D(),1);var{kebabCase:ZTe}=F(fW.privateApis),ab=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function mF(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function Ud(e){if(e)return`has-${ZTe(e)}-font-size`}var XTe="1600px",QTe="320px",JTe=1,eBe=.25,tBe=.75,oBe="14px";function mW({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=QTe,maximumViewportWidth:n=XTe,scaleFactor:i=JTe,minimumFontSizeLimit:s}){if(s=Gd(s)?s:oBe,o){let S=Gd(o);if(!S?.unit)return null;let k=Gd(s,{coerceTo:S.unit});if(k?.value&&!e&&!t&&S?.value<=k?.value)return null;if(t||(t=`${S.value}${S.unit}`),!e){let _=S.unit==="px"?S.value:S.value*16,x=Math.min(Math.max(1-.075*Math.log2(_),eBe),tBe),E=s_(S.value*x,3);k?.value&&E<k?.value?e=`${k.value}${k.unit}`:e=`${E}${S.unit}`}}let a=Gd(e),l=a?.unit||"rem",u=Gd(t,{coerceTo:l});if(!a||!u)return null;let d=Gd(e,{coerceTo:"rem"}),f=Gd(n,{coerceTo:l}),m=Gd(r,{coerceTo:l});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=s_(m.value/100,3),g=s_(p,3)+l,b=100*((u.value-a.value)/h),v=s_((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${y}, ${t})`}function Gd(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[,l,u]=a,d=parseFloat(l);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:s_(d,3),unit:u}}function s_(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var pW=c(D(),1);var hW=c(C(),1);function rBe(e){let[t,o]=ke("typography.fontSizes","typography.customFontSize");return(0,hW.jsx)(pW.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var pF=rBe;var a_=c(te(),1),bW=c(L(),1);var hF=c(C(),1),nBe=[],gW=([e,...t])=>e.toUpperCase()+t.join(""),yW=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${gW(r)}`,o),{});return(0,a_.createHigherOrderComponent)((0,a_.compose)([(0,a_.createHigherOrderComponent)(o=>function(n){let[i]=ke("typography.fontSizes");return(0,hF.jsx)(o,{...n,fontSizes:i||nBe})},"withFontSizes"),o=>class extends bW.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=gW(i);return n[`set${a}`]=this.createSetFontSize(i,s),n},{})}createSetFontSize(n,i){return s=>{let a=this.props.fontSizes?.find(({size:l})=>l===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 l=Object.entries(t).filter(([u,d])=>a(d,u)).reduce((u,[d,f])=>{let m=n[d],h=ab(i,m,n[f]);return u[d]={...h,class:Ud(m)},u},{});return{...s,...l}}render(){return(0,hF.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var Wd=c(z(),1),UE=c(D(),1);var vW=c(C(),1),iBe=[{icon:Bd,title:(0,Wd.__)("Align text left"),align:"left"},{icon:gp,title:(0,Wd.__)("Align text center"),align:"center"},{icon:Pd,title:(0,Wd.__)("Align text right"),align:"right"}],sBe={placement:"bottom-start"};function aBe({value:e,onChange:t,alignmentControls:o=iBe,label:r=(0,Wd.__)("Align text"),description:n=(0,Wd.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function a(m){return()=>t(e===m?void 0:m)}let l=o.find(m=>m.align===e);function u(){return l?l.icon:(0,Wd.isRTL)()?Pd:Bd}let d=s?UE.ToolbarGroup:UE.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:sBe};return(0,vW.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 gF=aBe;var bF=c(C(),1),GE=e=>(0,bF.jsx)(gF,{...e,isToolbar:!1}),kW=e=>(0,bF.jsx)(gF,{...e,isToolbar:!0});var XE=c(zt(),1),QE=c(D(),1),MW=c(L(),1),JE=c(ee(),1);var AW=c(W(),1),Kd=c(ee(),1),_F=c(L(),1);var PW=c(wW(),1);var yF=function(e,t){return yF=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])},yF(e,t)};function CW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yF(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var xr=function(){return xr=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},xr.apply(this,arguments)};function EW(e){return e.toLowerCase()}var fBe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],mBe=/[^A-Z0-9]+/gi;function BW(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?fBe:o,n=t.stripRegexp,i=n===void 0?mBe:n,s=t.transform,a=s===void 0?EW:s,l=t.delimiter,u=l===void 0?" ":l,d=TW(TW(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 TW(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var pBe=e=>e.name||"",hBe=e=>e.title,gBe=e=>e.description||"",bBe=e=>e.keywords||[],yBe=e=>e.category,vBe=()=>null,kBe=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],SBe=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),vF=new Map,kF=new Map;function $E(e=""){if(vF.has(e))return vF.get(e);let t=BW(e,{splitRegexp:kBe,stripRegexp:SBe}).split(" ").filter(Boolean);return vF.set(e,t),t}function l_(e=""){if(kF.has(e))return kF.get(e);let t=(0,PW.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),kF.set(e,t),t}var c_=(e="")=>$E(l_(e)),_Be=(e,t)=>e.filter(o=>!c_(t).some(r=>r.includes(o))),KE=(e,t,o,r)=>c_(r).length===0?e:u_(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),u_=(e=[],t="",o={})=>{if(c_(t).length===0)return e;let n=e.map(i=>[i,xBe(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function xBe(e,t,o={}){let{getName:r=pBe,getTitle:n=hBe,getDescription:i=gBe,getKeywords:s=bBe,getCategory:a=yBe,getCollection:l=vBe}=o,u=r(e),d=n(e),f=i(e),m=s(e),h=a(e),p=l(e),g=l_(t),b=l_(d),v=0;if(g===b)v+=30;else if(b.startsWith(g))v+=20;else{let y=[u,d,f,...m,h,p].join(" "),S=$E(g);_Be(S,y).length===0&&(v+=10)}if(v!==0&&u.startsWith("core/")){let y=u!==e.id;v+=y?1:2}return v}var Al=c(ee(),1),lb=c(W(),1),YE=c(L(),1),RW=c(Wi(),1),qE=c(z(),1);var wBe=(e,t,o)=>{let r=(0,YE.useMemo)(()=>({[Fd]:!!o}),[o]),[n]=(0,lb.useSelect)(d=>[d(w).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=F((0,lb.useSelect)(w)),{createErrorNotice:s}=(0,lb.useDispatch)(RW.store),[a,l]=(0,lb.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(Al.store);return[f(),m()]},[]),u=(0,YE.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:h,content:p},g)=>{let b=i(d,e);if(b===null){let y=(0,Al.getBlockType)(d)?.title??d;s((0,qE.sprintf)((0,qE.__)(`Block "%s" can't be inserted.`),y),{type:"snackbar",id:"inserter-notice"});return}let v=h==="unsynced"?(0,Al.parse)(p,{__unstableSkipMigrationLogs:!0}):(0,Al.createBlock)(d,f,(0,Al.createBlocksFromInnerBlocksTemplate)(m));t(v,void 0,g,b)},[i,e,t,s]);return[n,a,l,u]},$d=wBe;var IW=c(D(),1);var OW=c(L(),1),SF=c(C(),1);function CBe({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:yS});let n=(0,SF.jsx)(IW.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,SF.jsx)("span",{style:i,className:G("block-editor-block-icon",o,{"has-colors":t}),children:n})}var rt=(0,OW.memo)(CBe);var ZE=(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 cb=c(C(),1),EBe=()=>{},TBe=9;function BBe(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,AW.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:h}=u(w),{getActiveBlockVariation:p}=u(Kd.store),g=d(),{name:b,attributes:v}=f(g),y=p(b,v),S=h(g);return{selectedBlockId:y?`${b}/${y.name}`:b,rootClientId:S,prioritizedBlocks:m(S)?.prioritizedInserterBlocks}},[]),[n,i,s]=$d(t,EBe,!0),a=(0,_F.useMemo)(()=>(e.trim()?KE(n,i,s,e):ZE(Ol(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,TBe),[e,o,n,i,s,r]);return[(0,_F.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,cb.jsxs)(cb.Fragment,{children:[(0,cb.jsx)(rt,{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,Kd.cloneBlock)(s)):(0,Kd.createBlock)(t,o,(0,Kd.createBlocksFromInnerBlocksTemplate)(r))}}}}var LW=BBe();var NW=c(C(),1),PBe=[];function DW({completers:e=PBe}){let{name:t}=Ze();return(0,MW.useMemo)(()=>{let o=[...e];return(t===(0,JE.getDefaultBlockName)()||(0,JE.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,LW]),(0,XE.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,XE.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function VW(e){return(0,QE.__unstableUseAutocompleteProps)({...e,completers:DW(e)})}function RBe(e){return(0,NW.jsx)(QE.Autocomplete,{...e,completers:DW(e)})}var FW=RBe;var TF=c(z(),1),Xd=c(D(),1);var a$=c(W(),1);var iT=c(L(),1);var To=c(z(),1);var Ar=c(D(),1);var ub=c(z(),1);var $i={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 ci(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function Yd(e,t=$i,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${ci(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function eT(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,ub.sprintf)((0,ub.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,ub.sprintf)((0,ub.__)("Max %s wide"),o)),n}var Ba=c(z(),1);var zW=8,qd=["top","bottom","left","right"],jW={top:void 0,right:void 0,bottom:void 0,left:void 0},tT={custom:iE,axial:iE,horizontal:d5,vertical:h5,top:p5,right:m5,bottom:u5,left:f5},Ll={default:(0,Ba.__)("Spacing control"),top:(0,Ba.__)("Top"),bottom:(0,Ba.__)("Bottom"),left:(0,Ba.__)("Left"),right:(0,Ba.__)("Right"),mixed:(0,Ba.__)("Mixed"),vertical:(0,Ba.__)("Vertical"),horizontal:(0,Ba.__)("Horizontal"),axial:(0,Ba.__)("Horizontal & vertical"),custom:(0,Ba.__)("Custom")},Gc={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function oT(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function HW(e,t){if(!oT(e))return e;let o=IBe(e);return t.find(n=>String(n.slug)===o)?.size}function db(e,t){if(!e||oT(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 Pa(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function IBe(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 xF(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 OBe(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 UW(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),l=!s.length&&OBe(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(xF(t)&&(a||l))return Gc.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]:Gc.custom}function d_(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function On(e,t="0"){let o=d_(e);if(!o)return null;let r=Pa(o?.top)||t,n=Pa(o?.left)||t;return r===n?r:`${r} ${n}`}var Ht=c(C(),1),ABe={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},GW={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},LBe={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},WW={horizontal:"center",vertical:"top"},MBe={top:{icon:PS,label:(0,To._x)("Align top","Block vertical alignment setting")},center:{icon:ES,label:(0,To._x)("Align middle","Block vertical alignment setting")},bottom:{icon:CS,label:(0,To._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:BS,label:(0,To._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:TS,label:(0,To._x)("Space between","Block vertical alignment setting")}},NBe=["wrap","nowrap"],YW={name:"flex",label:(0,To.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={},resetLayout:n={},clientId:i}){let{allowOrientation:s=!0,allowJustification:a=!0,allowVerticalAlignment:l=!0,allowWrap:u=!0}=r,d=(S,k)=>(t?.[S]??k)!==(n?.[S]??k),f=()=>d("justifyContent","left"),m=()=>d("verticalAlignment",qW(t)),h=()=>d("orientation","horizontal"),p=()=>d("flexWrap","wrap"),g=()=>o(ge({...t,justifyContent:n?.justifyContent})),b=()=>o(ge({...t,verticalAlignment:DBe(n?.verticalAlignment,t?.orientation)})),v=()=>{let{verticalAlignment:S,justifyContent:k}=t,_=n?.orientation,x=!_||_==="horizontal";o(ge({...t,orientation:_,verticalAlignment:n?.verticalAlignment??(x&&S==="space-between"?"center":S),justifyContent:n?.justifyContent??(x&&k==="stretch"?"left":k)}))},y=()=>o(ge({...t,flexWrap:n?.flexWrap}));return(0,Ht.jsxs)(Ht.Fragment,{children:[(a||s)&&(0,Ht.jsxs)(Ar.Flex,{align:"flex-start",className:"block-editor-hooks__flex-layout-controls",gap:4,justify:"flex-start",children:[a&&(0,Ht.jsx)(Ar.__experimentalToolsPanelItem,{label:(0,To.__)("Justification"),hasValue:f,onDeselect:g,isShownByDefault:!0,panelId:i,children:(0,Ht.jsx)(KW,{layout:t,onChange:o})}),s&&(0,Ht.jsx)(Ar.__experimentalToolsPanelItem,{label:(0,To.__)("Orientation"),hasValue:h,onDeselect:v,isShownByDefault:!0,panelId:i,children:(0,Ht.jsx)(jBe,{layout:t,onChange:o})})]}),l&&(0,Ht.jsx)(Ar.__experimentalToolsPanelItem,{label:(0,To.__)("Alignment"),hasValue:m,onDeselect:b,panelId:i,children:(0,Ht.jsx)($W,{layout:t,onChange:o})}),u&&(0,Ht.jsx)(Ar.__experimentalToolsPanelItem,{label:(0,To.__)("Wrapping"),hasValue:p,onDeselect:y,panelId:i,children:(0,Ht.jsx)(zBe,{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,Ht.jsxs)(yo,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,Ht.jsx)(KW,{layout:t,onChange:o,isToolbar:!0}),n&&(0,Ht.jsx)($W,{layout:t,onChange:o,isToolbar:!0})]})},getLayoutStyle:function({selector:t,layout:o={},viewportOverrides:r,style:n,blockName:i,hasBlockGapSupport:s,globalBlockGapValue:a,layoutDefinitions:l=$i}){let u=r!==void 0,d=u?{...o,...r}:o,f=T=>Object.hasOwn(r||{},T),{orientation:m="horizontal"}=d,h="0.5em";if(a){let T=d_(a);h=Pa(T?.left)||Pa(T?.top)||"0.5em"}let p=n?.spacing?.blockGap&&!bt(i,"spacing","blockGap")?On(n?.spacing?.blockGap,h):void 0,g=!u||Object.hasOwn(n?.spacing||{},"blockGap"),b=ABe[d.justifyContent],v=NBe.includes(d.flexWrap)?d.flexWrap:"wrap",y=LBe[d.verticalAlignment],S=GW[d.justifyContent]||GW.left,k="",_=[],x=!u||f("flexWrap"),E=!u||f("orientation"),B=!u||f("justifyContent")||f("orientation"),P=!u||f("verticalAlignment")||f("orientation");return x&&v&&v!=="wrap"&&_.push(`flex-wrap: ${v}`),m==="horizontal"?(P&&y&&_.push(`align-items: ${y}`),B&&b&&_.push(`justify-content: ${b}`)):(P&&y&&_.push(`justify-content: ${y}`),E&&_.push("flex-direction: column"),B&&_.push(`align-items: ${S}`)),_.length&&(k=`${ci(t)} {
25 ${_.join("; ")};
26 }`),s&&g&&p&&(k+=Yd(t,l,"flex",p)),k},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function qW({orientation:e="horizontal"}={}){return e==="horizontal"?WW.horizontal:WW.vertical}function DBe(e,t){if(!(t==="horizontal"&&e==="space-between"||t==="vertical"&&e==="stretch"))return e}function VBe(e){return e==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]}function $W({layout:e,onChange:t,isToolbar:o=!1}){let{orientation:r="horizontal"}=e,{verticalAlignment:n=qW(e)}=e,i=a=>{t({...e,verticalAlignment:a})},s=VBe(r);return o?(0,Ht.jsx)(rT,{onChange:i,value:n,controls:s}):(0,Ht.jsx)(Ar.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,To.__)("Alignment"),onChange:i,value:n,className:"block-editor-hooks__flex-layout-alignment-controls",children:s.map(a=>{let{icon:l,label:u}=MBe[a];return(0,Ht.jsx)(Ar.__experimentalToggleGroupControlOptionIcon,{value:a,icon:l,label:u},a)})})}var FBe={placement:"bottom-start"};function KW({layout:e,onChange:t,isToolbar:o=!1}){let{justifyContent:r="left",orientation:n="horizontal"}=e,i=l=>{t({...e,justifyContent:l})},s=["left","center","right"];if(n==="horizontal"?s.push("space-between"):s.push("stretch"),o)return(0,Ht.jsx)(fb,{allowedControls:s,value:r,onChange:i,popoverProps:FBe});let a=[{value:"left",icon:Od,label:(0,To.__)("Justify items left")},{value:"center",icon:Id,label:(0,To.__)("Justify items center")},{value:"right",icon:Ad,label:(0,To.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:Hg,label:(0,To.__)("Space between items")}):a.push({value:"stretch",icon:Ug,label:(0,To.__)("Stretch items")}),(0,Ht.jsx)(Ar.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,To.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:l,icon:u,label:d})=>(0,Ht.jsx)(Ar.__experimentalToggleGroupControlOptionIcon,{value:l,icon:u,label:d},l))})}function zBe({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,Ht.jsx)(Ar.ToggleControl,{label:(0,To.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function jBe({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,Ht.jsxs)(Ar.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,To.__)("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,Ht.jsx)(Ar.__experimentalToggleGroupControlOptionIcon,{icon:bS,value:"horizontal",label:(0,To.__)("Horizontal")}),(0,Ht.jsx)(Ar.__experimentalToggleGroupControlOptionIcon,{icon:WN,value:"vertical",label:(0,To.__)("Vertical")})]})}var ZW=c(z(),1);var XW={name:"default",label:(0,ZW.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=$i}){let s=On(o?.spacing?.blockGap),a="";bt(r,"spacing","blockGap")||(s?.top?a=On(s?.top):typeof s=="string"&&(a=On(s)));let l="";return n&&a&&(l+=Yd(t,i,"default",a)),l},getOrientation(){return"vertical"},getAlignments(e,t){let o=eT(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 hn=c(D(),1),Os=c(z(),1);var JW=c(f_(),1);var Lo=c(C(),1),e$={name:"constrained",label:(0,Os.__)("Constrained"),inspectorControls:function({layout:t,onChange:o,layoutBlockSupport:r={},resetLayout:n={},clientId:i}){let{wideSize:s,contentSize:a,justifyContent:l="center"}=t,{allowJustification:u=!0,allowCustomContentAndWideSize:d=!0}=r,f=x=>{o({...t,justifyContent:x})},m=[{value:"left",icon:Od,label:(0,Os.__)("Justify items left")},{value:"center",icon:Id,label:(0,Os.__)("Justify items center")},{value:"right",icon:Ad,label:(0,Os.__)("Justify items right")}],[h]=ke("spacing.units"),p=(0,hn.__experimentalUseCustomUnits)({availableUnits:h||["%","px","em","rem","vw"]}),g=(x,E)=>(t?.[x]??E)!==(n?.[x]??E),b=()=>o(ge({...t,contentSize:n?.contentSize})),v=()=>o(ge({...t,wideSize:n?.wideSize})),y=()=>o(ge({...t,justifyContent:n?.justifyContent})),S=()=>g("contentSize"),k=()=>g("wideSize"),_=()=>g("justifyContent","center");return(0,Lo.jsxs)(Lo.Fragment,{children:[d&&(0,Lo.jsxs)(Lo.Fragment,{children:[(0,Lo.jsx)(hn.__experimentalToolsPanelItem,{label:(0,Os.__)("Content width"),hasValue:S,onDeselect:b,panelId:i,children:(0,Lo.jsx)(hn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Os.__)("Content width"),labelPosition:"top",value:a||s||"",onChange:x=>{x=0>parseFloat(x)?"0":x,o(ge({...t,contentSize:x!==""?x:void 0}))},units:p,prefix:(0,Lo.jsx)(hn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Lo.jsx)(Ue,{icon:bp})})})}),(0,Lo.jsxs)(hn.__experimentalToolsPanelItem,{label:(0,Os.__)("Wide width"),hasValue:k,onDeselect:v,panelId:i,children:[(0,Lo.jsx)(hn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Os.__)("Wide width"),labelPosition:"top",value:s||a||"",onChange:x=>{x=0>parseFloat(x)?"0":x,o(ge({...t,wideSize:x!==""?x:void 0}))},units:p,prefix:(0,Lo.jsx)(hn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Lo.jsx)(Ue,{icon:Rp})})}),(0,Lo.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,Os.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]})]}),u&&(0,Lo.jsx)(hn.__experimentalToolsPanelItem,{label:(0,Os.__)("Justification"),hasValue:_,onDeselect:y,panelId:i,children:(0,Lo.jsx)(hn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Os.__)("Justification"),value:l,onChange:f,children:m.map(({value:x,icon:E,label:B})=>(0,Lo.jsx)(hn.__experimentalToggleGroupControlOptionIcon,{value:x,icon:E,label:B},x))})})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,Lo.jsx)(yo,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Lo.jsx)(UBe,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},viewportOverrides:r,style:n,blockName:i,hasBlockGapSupport:s,layoutDefinitions:a=$i}){let l=r!==void 0,u=l?{...o,...r}:o,d=B=>Object.hasOwn(r||{},B),{contentSize:f,wideSize:m,justifyContent:h}=u,p=On(n?.spacing?.blockGap),g=!l||Object.hasOwn(n?.spacing||{},"blockGap"),b=!l||Object.hasOwn(n?.spacing||{},"padding"),v="";bt(i,"spacing","blockGap")||(p?.top?v=On(p?.top):typeof p=="string"&&(v=On(p)));let y=h==="left"?"0 !important":"auto !important",S=h==="right"?"0 !important":"auto !important",k=l&&d("justifyContent"),_=!l||d("contentSize")||d("wideSize"),x=[`max-width: ${f??m}`];(!l||k)&&x.push(`margin-left: ${y}`,`margin-right: ${S}`);let E=_&&(f||m)?`
27 ${ci(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {
28 ${x.join("; ")};
29 }
30 ${ci(t,"> .alignwide")} {
31 max-width: ${m??f};
32 }
33 ${ci(t,"> .alignfull")} {
34 max-width: none;
35 }
36 `:"";return k&&!_?E+=`${ci(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
37 { margin-left: ${y}; margin-right: ${S}; }`:l||(h==="left"?E+=`${ci(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
38 { margin-left: ${y}; }`:h==="right"&&(E+=`${ci(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
39 { margin-right: ${S}; }`)),b&&n?.spacing?.padding&&(0,JW.getCSSRules)(n).forEach(P=>{if(P.key==="paddingRight"){let T=P.value==="0"?"0px":P.value;E+=`
40 ${ci(t,"> .alignfull")} {
41 margin-right: calc(${T} * -1);
42 }
43 `}else if(P.key==="paddingLeft"){let T=P.value==="0"?"0px":P.value;E+=`
44 ${ci(t,"> .alignfull")} {
45 margin-left: calc(${T} * -1);
46 }
47 `}}),s&&g&&v&&(E+=Yd(t,a,"constrained",v)),E},getOrientation(){return"vertical"},getAlignments(e){let t=eT(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}},HBe={placement:"bottom-start"};function UBe({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,Lo.jsx)(fb,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:HBe})}var Lr=c(z(),1),xt=c(D(),1),nT=c(L(),1);var mt=c(C(),1),GBe={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},WBe=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],t$={name:"grid",label:(0,Lr.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={},resetLayout:n={},clientId:i}){let{allowSizingOnChildren:s=!1}=r,a=!0,l=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity,u=t.isManualPlacement?3:void 0,d=(v,y)=>(t?.[v]??y)!==(n?.[v]??y),f=()=>d("isManualPlacement",!1),m=()=>d("columnCount",u)||d("rowCount"),h=()=>d("minimumColumnWidth"),p=()=>o(ge({...t,isManualPlacement:n?.isManualPlacement,rowCount:n?.rowCount,minimumColumnWidth:n?.minimumColumnWidth})),g=()=>o(ge({...t,columnCount:n?.columnCount??u,rowCount:n?.rowCount})),b=()=>o(ge({...t,minimumColumnWidth:n?.minimumColumnWidth}));return(0,mt.jsxs)(mt.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,mt.jsx)(xt.__experimentalToolsPanelItem,{label:(0,Lr.__)("Grid item position"),hasValue:f,onDeselect:p,isShownByDefault:!0,panelId:i,children:(0,mt.jsx)(YBe,{layout:t,onChange:o})}),a&&(0,mt.jsx)(xt.__experimentalToolsPanelItem,{label:(0,Lr.__)("Columns and rows"),hasValue:m,onDeselect:g,isShownByDefault:!0,panelId:i,children:(0,mt.jsx)(KBe,{layout:t,onChange:o,allowSizingOnChildren:s})}),l&&(0,mt.jsx)(xt.__experimentalToolsPanelItem,{label:(0,Lr.__)("Min. column width"),hasValue:h,onDeselect:b,isShownByDefault:!0,panelId:i,children:(0,mt.jsx)($Be,{layout:t,onChange:o})})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o={},viewportOverrides:r,style:n,blockName:i,hasBlockGapSupport:s,globalBlockGapValue:a,layoutDefinitions:l=$i}){let u=r!==void 0,d=u?{...o,...r}:o,f=x=>Object.hasOwn(r||{},x),{minimumColumnWidth:m=null,columnCount:h=null,rowCount:p=null}=d,g="1.2rem";if(a){let x=d_(a);g=Pa(x?.left)||Pa(x?.top)||"1.2rem"}let b=n?.spacing?.blockGap&&!bt(i,"spacing","blockGap")?On(n?.spacing?.blockGap,g):void 0,v=!u||Object.hasOwn(n?.spacing||{},"blockGap"),y="",S=[],k=!u||f("minimumColumnWidth")||f("columnCount")||v&&m&&h>0,_=(!u||f("rowCount"))&&h&&p;if(k&&m&&h>0){let x=b||g;(x==="0"||x===0)&&(x="0px");let E=`max(min( ${m}, 100%), ( 100% - (${x}*${h-1}) ) / ${h})`;S.push(`grid-template-columns: repeat(auto-fill, minmax(${E}, 1fr))`)}else k&&h?S.push(`grid-template-columns: repeat(${h}, minmax(0, 1fr))`):k&&S.push(`grid-template-columns: repeat(auto-fill, minmax(min(${m||"12rem"}, 100%), 1fr))`);if(k){let x=!o?.columnCount||o?.columnCount&&o?.minimumColumnWidth;(!h||m)&&(!u||!x)&&S.push("container-type: inline-size")}return _&&S.push(`grid-template-rows: repeat(${p}, minmax(1rem, auto))`),S.length&&(y=`${ci(t)} { ${S.join("; ")}; }`),s&&v&&b&&(y+=Yd(t,l,"grid",b)),y},getOrientation(){return"horizontal"},getAlignments(){return[]}};function $Be({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,l="rem"]=(0,xt.__experimentalParseQuantityAndUnitFromRawValue)(s),u=f=>{t({...e,minimumColumnWidth:[f,l].join("")})},d=f=>{let m;["em","rem"].includes(f)&&l==="px"?m=(a/16).toFixed(2)+f:["em","rem"].includes(l)&&f==="px"&&(m=Math.round(a*16)+f),t({...e,minimumColumnWidth:m})};return(0,mt.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,mt.jsx)(xt.BaseControl.VisualLabel,{as:"legend",children:(0,Lr.__)("Min. column width")}),(0,mt.jsxs)(xt.Flex,{gap:4,children:[(0,mt.jsx)(xt.FlexItem,{isBlock:!0,children:(0,mt.jsx)(xt.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:WBe,min:0,label:(0,Lr.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,mt.jsx)(xt.FlexItem,{isBlock:!0,children:(0,mt.jsx)(xt.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:GBe[l]||600,withInputField:!1,label:(0,Lr.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,mt.jsx)("p",{className:"components-base-control__help",children:(0,Lr.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function KBe({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,mt.jsx)(mt.Fragment,{children:(0,mt.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,mt.jsx)(xt.BaseControl.VisualLabel,{as:"legend",children:(0,Lr.__)("Max. columns")}),(0,mt.jsxs)(xt.Flex,{gap:4,children:[(0,mt.jsx)(xt.FlexItem,{isBlock:!0,children:(0,mt.jsx)(xt.__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,Lr.__)("Columns"),hideLabelFromVision:!s})}),(0,mt.jsx)(xt.FlexItem,{isBlock:!0,children:o&&s?(0,mt.jsx)(xt.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let l=a===""||a==="0"?1:parseInt(a,10);t({...e,rowCount:l})},value:i,min:1,label:(0,Lr.__)("Rows")}):(0,mt.jsx)(xt.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Lr.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function YBe({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,nT.useState)(o||3),[l,u]=(0,nT.useState)(r),[d,f]=(0,nT.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"?l:void 0,isManualPlacement:g==="manual"?!0:void 0,minimumColumnWidth:g==="auto"?d:null})},p=m==="manual"?(0,Lr.__)("Grid items can be manually placed in any position on the grid."):(0,Lr.__)("Grid items are placed automatically depending on their order.");return(0,mt.jsxs)(xt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Lr.__)("Grid item position"),value:m,onChange:h,isBlock:!0,help:p,children:[(0,mt.jsx)(xt.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Lr.__)("Auto")},"auto"),(0,mt.jsx)(xt.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Lr.__)("Manual")},"manual")]})}var o$=[XW,YW,e$,t$];function As(e="default"){return o$.find(t=>t.name===e)}function r$(){return o$}var wF=c(C(),1),CF={type:"default"},EF=(0,iT.createContext)(CF);EF.displayName="BlockLayoutContext";var n$=EF.Provider;function Dp(){return(0,iT.useContext)(EF)}function i$({layout:e={},css:t,...o}){let r=As(e.type),[n]=ke("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,wF.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,wF.jsx)("style",{children:s})}return null}var sT=[],s$=["none","left","center","right","wide","full"],qBe=["wide","full"];function m_(e=s$){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,a$.useSelect)(l=>{if(t)return[!1,!1,!1];let u=l(w).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=Dp();if(t)return sT;let s=As(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?sT:u}if(s.name!=="default"&&s.name!=="constrained")return sT;let a=e.filter(l=>i.alignments?i.alignments.includes(l):!o&&qBe.includes(l)?!1:s$.includes(l)).map(l=>({name:l}));return a.length===1&&a[0].name==="none"?sT:a}var Zd=c(z(),1);var p_={none:{icon:bp,title:(0,Zd._x)("None","Alignment option")},left:{icon:WV,title:(0,Zd.__)("Align left")},center:{icon:UV,title:(0,Zd.__)("Align center")},right:{icon:KV,title:(0,Zd.__)("Align right")},wide:{icon:Rp,title:(0,Zd.__)("Wide width")},full:{icon:$S,title:(0,Zd.__)("Full width")}},l$="none";var Vp=c(C(),1);function ZBe({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=m_(o);if(!!!i.length)return null;function a(h){t([e,"none"].includes(h)?void 0:h)}let l=p_[e],u=p_[l$],d=r?Xd.ToolbarGroup:Xd.ToolbarDropdownMenu,f={icon:l?l.icon:u.icon,label:(0,TF.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:h})=>({...p_[h],isActive:e===h||!e&&h==="none",role:n?"menuitemradio":void 0,onClick:()=>a(h)}))}:{toggleProps:{description:(0,TF.__)("Change alignment")},children:({onClose:h})=>(0,Vp.jsx)(Vp.Fragment,{children:(0,Vp.jsx)(Xd.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:p,info:g})=>{let{icon:b,title:v}=p_[p],y=p===e||!e&&p==="none";return(0,Vp.jsx)(Xd.MenuItem,{icon:b,iconPosition:"left",className:G("components-dropdown-menu__menu-item",{"is-active":y}),isSelected:y,onClick:()=>{a(p),h()},role:"menuitemradio",info:g,children:v},p)})})})};return(0,Vp.jsx)(d,{...f,...m})}var BF=ZBe;var PF=c(C(),1),aT=e=>(0,PF.jsx)(BF,{...e,isToolbar:!1}),c$=e=>(0,PF.jsx)(BF,{...e,isToolbar:!0});var p$=c(hp(),1),dT=c(z(),1),fT=c(ee(),1),Ia=c(D(),1),OF=c(W(),1),h$=c(L(),1),g$=c(te(),1);var IF=c(hp(),1),u$=c(ee(),1),d$=c(D(),1),f$=c(W(),1),cT=c(L(),1),m$=c(te(),1);var lT=c(W(),1);function RF(e){return!e||Object.keys(e).length===0}function Wc(e){let{clientId:t}=Ze(),o=e||t,{updateBlockAttributes:r}=(0,lT.useDispatch)(w),{getBlockAttributes:n}=(0,lT.useRegistry)().select(w);return{updateBlockBindings:a=>{let{metadata:{bindings:l,...u}={}}=n(o),d={...l};Object.entries(a).forEach(([m,h])=>{if(!h&&d[m]){delete d[m];return}d[m]=h});let f={...u,bindings:d};RF(f.bindings)&&delete f.bindings,r(o,{metadata:RF(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...l}={}}=n(o);r(o,{metadata:RF(l)?void 0:l})}}}var Ra=c(C(),1),{Menu:Qd}=F(d$.privateApis);function XBe({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,cT.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,cT.useContext)(pn),a=(0,f$.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:l}=Wc();return(0,Ra.jsxs)(Qd.CheckboxItem,{onChange:()=>{let u=(0,IF.default)(e,o.args)??o.key===e?.key;l(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,IF.default)(e,o.args)??o.key===e?.key,children:[(0,Ra.jsx)(Qd.ItemLabel,{children:o.label}),(0,Ra.jsx)(Qd.ItemHelpText,{children:a[t]})]})}function h_({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,m$.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,u$.getBlockBindingsSource)(o);return(0,Ra.jsxs)(Qd,{placement:n?"bottom-start":"left-start",children:[(0,Ra.jsx)(Qd.SubmenuTriggerItem,{children:(0,Ra.jsx)(Qd.ItemLabel,{children:i.label})}),(0,Ra.jsx)(Qd.Popover,{gutter:8,children:(0,Ra.jsx)(Qd.Group,{children:r.map(s=>(0,Ra.jsx)(XBe,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var Ls=c(C(),1),{Menu:uT}=F(Ia.privateApis);function g_({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=Wc(),n=(0,g$.useViewportMatch)("medium","<"),i=(0,h$.useContext)(pn),s=(0,OF.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:v,getBlockType:y}=F(g(fT.store)),S=y(o).attributes?.[e];if(S?.enum)return{};let k=S?.type==="rich-text"?"string":S?.type,_={};return Object.entries(b()).forEach(([x,E])=>{let B=v(E,i);if(!B?.length)return;let P=B.filter(T=>T.type===k);P.length&&(_[x]=P)}),_},[e,o,i]),{canUpdateBlockBindings:a}=(0,OF.useSelect)(g=>({canUpdateBlockBindings:g(w).getSettings().canUpdateBlockBindings})),l=Object.keys(s).length>0,u=!a||!l,{source:d,args:f}=t||{},m=(0,fT.getBlockBindingsSource)(d),h,p=!0;return t===void 0?(l?h=(0,dT.__)("Not connected"):h=(0,dT.__)("No sources available"),p=!0):m?h=s?.[d]?.find(g=>(0,p$.default)(g.args,f))?.label||m?.label||d:(p=!1,h=(0,dT.__)("Source not registered")),(0,Ls.jsx)(Ia.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!l&&(()=>{r({[e]:void 0})}),children:(0,Ls.jsxs)(uT,{placement:n?"bottom-start":"left-start",children:[(0,Ls.jsx)(uT.TriggerButton,{render:(0,Ls.jsx)(Ia.__experimentalItem,{}),disabled:!l,children:(0,Ls.jsxs)(Ia.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,Ls.jsx)(Ia.__experimentalText,{truncate:!0,children:e}),(0,Ls.jsx)(Ia.__experimentalText,{truncate:!0,variant:p?"muted":void 0,isDestructive:!p,children:h})]})}),!u&&(0,Ls.jsx)(uT.Popover,{gutter:n?8:36,children:(0,Ls.jsx)(uT,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,Ls.jsx)(h_,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var b$=c(z(),1),y$=c(D(),1);var v$=c(C(),1);function QBe({isActive:e,label:t=(0,b$.__)("Full height"),onToggle:o,isDisabled:r}){return(0,v$.jsx)(y$.ToolbarButton,{isActive:e,icon:WD,label:t,onClick:()=>o(!e),disabled:r})}var k$=QBe;var _$=c(z(),1),x$=c(Pt(),1),Fp=c(D(),1),b_=c(C(),1),JBe=()=>{};function ePe(e){let{label:t=(0,_$.__)("Change matrix alignment"),onChange:o=JBe,value:r="center",isDisabled:n}=e,i=(0,b_.jsx)(Fp.AlignmentMatrixControl.Icon,{value:r});return(0,b_.jsx)(Fp.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,b_.jsx)(Fp.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===x$.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,b_.jsx)(Fp.AlignmentMatrixControl,{onChange:o,value:r})})}var w$=ePe;var MF=c(D(),1),hT=c(W(),1),gT=c(z(),1);var I$=c(L(),1);var C$=c(W(),1),mT=c(ee(),1);function tn({clientId:e,maximumLength:t,context:o}){let r=(0,C$.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(w),{getBlockType:a,getActiveBlockVariation:l}=n(mT.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,mT.__experimentalGetBlockLabel)(d,f,o);return m!==d.title?m:l(u,f)?.title||d.title},[e,o]);return r?t&&t>0&&r.length>t?r.slice(0,t-3)+"...":r:null}function y_({clientId:e,maximumLength:t,context:o}){return tn({clientId:e,maximumLength:t,context:o})}var zp=c(L(),1),B$=c(te(),1);var pT=c(L(),1),AF=c(te(),1),E$=c(C(),1),v_=(0,pT.createContext)({refsMap:(0,AF.observableMap)()});v_.displayName="BlockRefsContext";function T$({children:e}){let t=(0,pT.useMemo)(()=>({refsMap:(0,AF.observableMap)()}),[]);return(0,E$.jsx)(v_.Provider,{value:t,children:e})}function P$(e){let{refsMap:t}=(0,zp.useContext)(v_);return(0,B$.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function LF(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function jp(e,t){let{refsMap:o}=(0,zp.useContext)(v_);(0,zp.useLayoutEffect)(()=>{LF(t,o.get(e));let r=o.subscribe(e,()=>LF(t,o.get(e)));return()=>{r(),LF(t,null)}},[o,e,t])}function dt(e){let[t,o]=(0,zp.useState)(null);return jp(e,o),t}function R$(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 Ki=c(C(),1);function tPe({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,hT.useDispatch)(w),{clientId:r,parents:n,hasSelection:i}=(0,hT.useSelect)(l=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=F(l(w)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,gT._x)("Document","noun, breadcrumb"),a=(0,I$.useRef)();return jp(r,a),(0,Ki.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,gT.__)("Block breadcrumb"),children:[(0,Ki.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,Ki.jsx)(MF.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let l=a.current?.closest(".editor-styles-wrapper");o(),R$(l)?.focus()},children:s}),!i&&(0,Ki.jsx)("span",{children:s}),!!r&&(0,Ki.jsx)(Ue,{icon:Rd,className:"block-editor-block-breadcrumb__separator"})]}),n.map(l=>(0,Ki.jsxs)("li",{children:[(0,Ki.jsx)(MF.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(l),children:(0,Ki.jsx)(y_,{clientId:l,maximumLength:35,context:"breadcrumb"})}),(0,Ki.jsx)(Ue,{icon:Rd,className:"block-editor-block-breadcrumb__separator"})]},l)),!!r&&(0,Ki.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,Ki.jsx)(y_,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var O$=tPe;var A$=c(W(),1);function L$(e){return(0,A$.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(w);return o(e)},[e])}var CO=c(te(),1),wce=c(L(),1),Cce=c(W(),1),Ece=c(D(),1);var Ys=c(W(),1),qR=c(te(),1),jf=c(L(),1),wie=c(ee(),1);var uf=c(L(),1),yt=c(ee(),1),JY=c(D(),1),lB=c(W(),1),cB=c(te(),1),eq=c(at(),1);var $c=c(z(),1),yT=c(D(),1),Hp=c(L(),1),pb=c(ee(),1),vT=c(W(),1);var k_=class{diff(t,o,r={}){let n;typeof r=="function"?(n=r,r={}):"callback"in r&&(n=r.callback);let i=this.castInput(t,r),s=this.castInput(o,r),a=this.removeEmpty(this.tokenize(i,r)),l=this.removeEmpty(this.tokenize(s,r));return this.diffWithOptionsObj(a,l,r,n)}diffWithOptionsObj(t,o,r,n){var i;let s=y=>{if(y=this.postProcess(y,r),n){setTimeout(function(){n(y)},0);return}else return y},a=o.length,l=t.length,u=1,d=a+l;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));let f=(i=r.timeout)!==null&&i!==void 0?i:1/0,m=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(h[0],o,t,0,r);if(h[0].oldPos+1>=l&&p+1>=a)return s(this.buildValues(h[0].lastComponent,o,t));let g=-1/0,b=1/0,v=()=>{for(let y=Math.max(g,-u);y<=Math.min(b,u);y+=2){let S,k=h[y-1],_=h[y+1];k&&(h[y-1]=void 0);let x=!1;if(_){let B=_.oldPos-y;x=_&&0<=B&&B<a}let E=k&&k.oldPos+1<l;if(!x&&!E){h[y]=void 0;continue}if(!E||x&&k.oldPos<_.oldPos?S=this.addToPath(_,!0,!1,0,r):S=this.addToPath(k,!1,!0,1,r),p=this.extractCommon(S,o,t,y,r),S.oldPos+1>=l&&p+1>=a)return s(this.buildValues(S.lastComponent,o,t))||!0;h[y]=S,S.oldPos+1>=l&&(b=Math.min(b,y-1)),p+1>=a&&(g=Math.max(g,y+1))}u++};if(n)(function y(){setTimeout(function(){if(u>d||Date.now()>m)return n(void 0);v()||y()},0)})();else for(;u<=d&&Date.now()<=m;){let y=v();if(y)return y}}addToPath(t,o,r,n,i){let s=t.lastComponent;return s&&!i.oneChangePerToken&&s.added===o&&s.removed===r?{oldPos:t.oldPos+n,lastComponent:{count:s.count+1,added:o,removed:r,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+n,lastComponent:{count:1,added:o,removed:r,previousComponent:s}}}extractCommon(t,o,r,n,i){let s=o.length,a=r.length,l=t.oldPos,u=l-n,d=0;for(;u+1<s&&l+1<a&&this.equals(r[l+1],o[u+1],i);)u++,l++,d++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!i.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=l,u}equals(t,o,r){return r.comparator?r.comparator(t,o):t===o||!!r.ignoreCase&&t.toLowerCase()===o.toLowerCase()}removeEmpty(t){let o=[];for(let r=0;r<t.length;r++)t[r]&&o.push(t[r]);return o}castInput(t,o){return t}tokenize(t,o){return Array.from(t)}join(t){return t.join("")}postProcess(t,o){return t}get useLongestToken(){return!1}buildValues(t,o,r){let n=[],i;for(;t;)n.push(t),i=t.previousComponent,delete t.previousComponent,t=i;n.reverse();let s=n.length,a=0,l=0,u=0;for(;a<s;a++){let d=n[a];if(d.removed)d.value=this.join(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let f=o.slice(l,l+d.count);f=f.map(function(m,h){let p=r[u+h];return p.length>m.length?p:m}),d.value=this.join(f)}else d.value=this.join(o.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}}return n}};var NF=class extends k_{},N$=new NF;function DF(e,t,o){return N$.diff(e,t,o)}var bT=c(z(),1),z$=c(ee(),1);var D$=c(D(),1),V$=c(L(),1),F$=c(at(),1),Ml=c(C(),1);function VF({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,Ml.jsxs)("div",{className:i,children:[(0,Ml.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,Ml.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,Ml.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,Ml.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,Ml.jsx)(V$.RawHTML,{children:(0,F$.safeHTML)(o)})})]}),(0,Ml.jsx)("div",{className:"block-editor-block-compare__action",children:(0,Ml.jsx)(D$.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var mb=c(C(),1);function oPe({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return DF(u,d).map((m,h)=>{let p=G({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,mb.jsx)("span",{className:p,children:m.value},h)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,z$.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),l=i(e.originalContent,a);return(0,mb.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,mb.jsx)(VF,{title:(0,bT.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,bT.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,mb.jsx)(VF,{title:(0,bT.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:l,renderedContent:a})]})}var j$=oPe;var Kc=c(C(),1),H$=e=>(0,pb.rawHandler)({HTML:e.originalContent});function U$({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,vT.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:h}=d(w),p=h(e);return{block:m(e),canInsertHTMLBlock:f("core/html",p),canInsertClassicBlock:f("core/freeform",p)}},[e]),{replaceBlock:n}=(0,vT.useDispatch)(w),[i,s]=(0,Hp.useState)(!1),a=(0,Hp.useCallback)(()=>s(!1),[]),l=(0,Hp.useMemo)(()=>({toClassic(){let d=(0,pb.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,pb.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=H$(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,pb.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,Hp.useMemo)(()=>[{title:(0,$c._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,$c.__)("Convert to HTML"),onClick:l.toHTML},r&&{title:(0,$c.__)("Convert to Classic Block"),onClick:l.toClassic}].filter(Boolean),[o,r,l]);return(0,Kc.jsxs)(Kc.Fragment,{children:[(0,Kc.jsx)(Hd,{actions:[(0,Kc.jsx)(yT.Button,{__next40pxDefaultSize:!0,onClick:l.toRecoveredBlock,variant:"primary",children:(0,$c.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,$c.__)("Block contains unexpected or invalid content.")}),i&&(0,Kc.jsx)(yT.Modal,{title:(0,$c.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,Kc.jsx)(j$,{block:t,onKeep:l.toHTML,onConvert:l.toBlocks,convertor:H$,convertButtonText:(0,$c.__)("Convert to Blocks")})})]})}var G$=c(z(),1);var W$=c(C(),1),rPe=(0,W$.jsx)(Hd,{className:"block-editor-block-list__block-crash-warning",children:(0,G$.__)("This block has encountered an error and cannot be previewed.")});function $$(){return rPe}var K$=c(L(),1),nPe=class extends K$.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},Y$=nPe;var mK=c(jF(),1),hb=c(L(),1),xT=c(W(),1),Nl=c(ee(),1);var pK=c(C(),1);function hPe({clientId:e}){let[t,o]=(0,hb.useState)(""),r=(0,xT.useSelect)(a=>a(w).getBlock(e),[e]),{updateBlock:n}=(0,xT.useDispatch)(w),i=(0,hb.useMemo)(()=>r?(0,Nl.getBlockContent)(r):"",[r]),s=()=>{let a=(0,Nl.getBlockType)(r.name);if(!a)return;let l=(0,Nl.getBlockAttributes)(a,t,r.attributes),u=t||(0,Nl.getSaveContent)(a,l),[d]=t?(0,Nl.validateBlock)({...r,attributes:l,originalContent:u}):[!0];n(e,{attributes:l,originalContent:u,isValid:d}),t||o(u)};return(0,hb.useEffect)(()=>{o(i)},[i]),(0,pK.jsx)(mK.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:s,onChange:a=>o(a.target.value)})}var hK=hPe;var ZY=c(L(),1),sB=c(z(),1),XY=c(ee(),1),Rb=c(te(),1),QY=c(__(),1);var UF=w_(),Ae=e=>x_(e,UF),GF=w_();Ae.write=e=>x_(e,GF);var wT=w_();Ae.onStart=e=>x_(e,wT);var WF=w_();Ae.onFrame=e=>x_(e,WF);var $F=w_();Ae.onFinish=e=>x_(e,$F);var gb=[];Ae.setTimeout=(e,t)=>{let o=Ae.now()+t,r=()=>{let i=gb.findIndex(s=>s.cancel==r);~i&&gb.splice(i,1),ef-=~i?1:0},n={time:o,handler:e,cancel:r};return gb.splice(bK(o),0,n),ef+=1,yK(),n};var bK=e=>~(~gb.findIndex(t=>t.time>e)||~gb.length);Ae.cancel=e=>{wT.delete(e),WF.delete(e),$F.delete(e),UF.delete(e),GF.delete(e)};Ae.sync=e=>{HF=!0,Ae.batchedUpdates(e),HF=!1};Ae.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,Ae.onStart(o)}return r.handler=e,r.cancel=()=>{wT.delete(o),t=null},r};var KF=typeof window<"u"?window.requestAnimationFrame:()=>{};Ae.use=e=>KF=e;Ae.now=typeof performance<"u"?()=>performance.now():Date.now;Ae.batchedUpdates=e=>e();Ae.catch=console.error;Ae.frameLoop="always";Ae.advance=()=>{Ae.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):kK()};var Jd=-1,ef=0,HF=!1;function x_(e,t){HF?(t.delete(e),e(0)):(t.add(e),yK())}function yK(){Jd<0&&(Jd=0,Ae.frameLoop!=="demand"&&KF(vK))}function gPe(){Jd=-1}function vK(){~Jd&&(KF(vK),Ae.batchedUpdates(kK))}function kK(){let e=Jd;Jd=Ae.now();let t=bK(Jd);if(t&&(SK(gb.splice(0,t),o=>o.handler()),ef-=t),!ef){gPe();return}wT.flush(),UF.flush(e?Math.min(64,Jd-e):16.667),WF.flush(),GF.flush(),$F.flush()}function w_(){let e=new Set,t=e;return{add(o){ef+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return ef-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,ef-=t.size,SK(t,r=>r(o)&&e.add(r)),ef+=e.size,t=e)}}}function SK(e,t){e.forEach(o=>{try{t(o)}catch(r){Ae.catch(r)}})}var Ns=c(pe());function PT(){}var TK=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),ue={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 Dl(e,t){if(ue.arr(e)){if(!ue.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 Ds(e,t,o){if(ue.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 ui=e=>ue.und(e)?[]:ue.arr(e)?e:[e];function kb(e,t){if(e.size){let o=Array.from(e);e.clear(),Kt(o,t)}}var Sb=(e,...t)=>kb(e,o=>o(...t)),JF=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),e3,BK,tf=null,PK=!1,t3=PT,bPe=e=>{e.to&&(BK=e.to),e.now&&(Ae.now=e.now),e.colors!==void 0&&(tf=e.colors),e.skipAnimation!=null&&(PK=e.skipAnimation),e.createStringInterpolator&&(e3=e.createStringInterpolator),e.requestAnimationFrame&&Ae.use(e.requestAnimationFrame),e.batchedUpdates&&(Ae.batchedUpdates=e.batchedUpdates),e.willAdvance&&(t3=e.willAdvance),e.frameLoop&&(Ae.frameLoop=e.frameLoop)},Yi=Object.freeze({__proto__:null,get createStringInterpolator(){return e3},get to(){return BK},get colors(){return tf},get skipAnimation(){return PK},get willAdvance(){return t3},assign:bPe}),C_=new Set,Ms=[],YF=[],TT=0,_b={get idle(){return!C_.size&&!Ms.length},start(e){TT>e.priority?(C_.add(e),Ae.onStart(yPe)):(RK(e),Ae(XF))},advance:XF,sort(e){if(TT)Ae.onFrame(()=>_b.sort(e));else{let t=Ms.indexOf(e);~t&&(Ms.splice(t,1),IK(e))}},clear(){Ms=[],C_.clear()}};function yPe(){C_.forEach(RK),C_.clear(),Ae(XF)}function RK(e){Ms.includes(e)||IK(e)}function IK(e){Ms.splice(vPe(Ms,t=>t.priority>e.priority),0,e)}function XF(e){let t=YF;for(let o=0;o<Ms.length;o++){let r=Ms[o];TT=r.priority,r.idle||(t3(r),r.advance(e),r.idle||t.push(r))}return TT=0,YF=Ms,YF.length=0,Ms=t,Ms.length>0}function vPe(e,t){let o=e.findIndex(t);return o<0?e.length:o}var OK={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},Oa="[-+]?\\d*\\.?\\d+",BT=Oa+"%";function RT(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var kPe=new RegExp("rgb"+RT(Oa,Oa,Oa)),SPe=new RegExp("rgba"+RT(Oa,Oa,Oa,Oa)),_Pe=new RegExp("hsl"+RT(Oa,BT,BT)),xPe=new RegExp("hsla"+RT(Oa,BT,BT,Oa)),wPe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,CPe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,EPe=/^#([0-9a-fA-F]{6})$/,TPe=/^#([0-9a-fA-F]{8})$/;function BPe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=EPe.exec(e))?parseInt(t[1]+"ff",16)>>>0:tf&&tf[e]!==void 0?tf[e]:(t=kPe.exec(e))?(bb(t[1])<<24|bb(t[2])<<16|bb(t[3])<<8|255)>>>0:(t=SPe.exec(e))?(bb(t[1])<<24|bb(t[2])<<16|bb(t[3])<<8|wK(t[4]))>>>0:(t=wPe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=TPe.exec(e))?parseInt(t[1],16)>>>0:(t=CPe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=_Pe.exec(e))?(_K(xK(t[1]),CT(t[2]),CT(t[3]))|255)>>>0:(t=xPe.exec(e))?(_K(xK(t[1]),CT(t[2]),CT(t[3]))|wK(t[4]))>>>0:null}function qF(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 _K(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=qF(n,r,e+1/3),s=qF(n,r,e),a=qF(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function bb(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function xK(e){return(parseFloat(e)%360+360)%360/360}function wK(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function CT(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function CK(e){let t=BPe(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 of=(e,t,o)=>{if(ue.fun(e))return e;if(ue.arr(e))return of({range:e,output:t,extrapolate:o});if(ue.str(e.output[0]))return e3(e);let r=e,n=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(u=>u);return u=>{let d=RPe(u,i);return PPe(u,i[d],i[d+1],n[d],n[d+1],l,s,a,r.map)}};function PPe(e,t,o,r,n,i,s,a,l){let u=l?l(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 RPe(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function QF(){return QF=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},QF.apply(this,arguments)}var yb=Symbol.for("FluidValue.get"),Up=Symbol.for("FluidValue.observers"),An=e=>!!(e&&e[yb]),on=e=>e&&e[yb]?e[yb]():e,o3=e=>e[Up]||null;function IPe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Gp(e,t){let o=e[Up];o&&o.forEach(r=>{IPe(r,t)})}var vb=class{constructor(t){if(this[yb]=void 0,this[Up]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");OPe(this,t)}},OPe=(e,t)=>AK(e,yb,t);function rf(e,t){if(e[yb]){let o=e[Up];o||AK(e,Up,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function nf(e,t){let o=e[Up];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[Up]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var AK=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),ET=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,APe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,EK=new RegExp(`(${ET.source})(%|[a-z]+)`,"i"),LPe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,IT=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,LK=e=>{let[t,o]=MPe(e);if(!t||JF())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&&IT.test(o))return LK(o);if(o)return o}return e},MPe=e=>{let t=IT.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},ZF,NPe=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,OT=e=>{ZF||(ZF=tf?new RegExp(`(${Object.keys(tf).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>on(i).replace(IT,LK).replace(APe,CK).replace(ZF,CK)),o=t.map(i=>i.match(ET).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=>of(QF({},e,{output:i})));return i=>{var s;let a=!EK.test(t[0])&&((s=t.find(u=>EK.test(u)))==null?void 0:s.replace(ET,"")),l=0;return t[0].replace(ET,()=>`${n[l++](i)}${a||""}`).replace(LPe,NPe)}},MK="react-spring: ",NK=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${MK}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},DPe=NK(console.warn);function DK(){DPe(`${MK}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var hQe=NK(console.warn);function xb(e){return ue.str(e)&&(e[0]=="#"||/\d/.test(e)||!JF()&&IT.test(e)||e in(tf||{}))}var E_=JF()?Ns.useEffect:Ns.useLayoutEffect,VPe=()=>{let e=(0,Ns.useRef)(!1);return E_(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function r3(){let e=(0,Ns.useState)()[1],t=VPe();return()=>{t.current&&e(Math.random())}}function VK(e,t){let[o]=(0,Ns.useState)(()=>({inputs:t,result:e()})),r=(0,Ns.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&FPe(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,Ns.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function FPe(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 n3=e=>(0,Ns.useEffect)(e,zPe),zPe=[];var N_=c(pe()),D_=c(pe());var HK=c(pe()),qc=c(pe()),T_=Symbol.for("Animated:node"),jPe=e=>!!e&&e[T_]===e,Aa=e=>e&&e[T_],NT=(e,t)=>TK(e,T_,t),B_=e=>e&&e[T_]&&e[T_].getPayload(),AT=class{constructor(){this.payload=void 0,NT(this,this)}getPayload(){return this.payload||[]}},Wp=class e extends AT{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,ue.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 ue.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,ue.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},$p=class e extends Wp{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=of({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(ue.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=of({output:[this.getValue(),t]})),this._value=0,super.reset()}},LT={dependencies:null},Kp=class extends AT{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Ds(this.source,(r,n)=>{jPe(r)?o[n]=r.getValue(t):An(r)?o[n]=on(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 Ds(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){LT.dependencies&&An(t)&&LT.dependencies.add(t);let o=B_(t);o&&Kt(o,r=>this.add(r))}},i3=class e extends Kp{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(HPe)),!0)}};function HPe(e){return(xb(e)?$p:Wp).create(e)}function DT(e){let t=Aa(e);return t?t.constructor:ue.arr(e)?i3:xb(e)?$p:Wp}function MT(){return MT=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},MT.apply(this,arguments)}var FK=(e,t)=>{let o=!ue.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,qc.forwardRef)((r,n)=>{let i=(0,qc.useRef)(null),s=o&&(0,qc.useCallback)(p=>{i.current=GPe(n,p)},[n]),[a,l]=UPe(r,t),u=r3(),d=()=>{let p=i.current;if(o&&!p)return;(p?t.applyAnimatedValues(p,a.getValue(!0)):!1)===!1&&u()},f=new s3(d,l),m=(0,qc.useRef)();E_(()=>(m.current=f,Kt(l,p=>rf(p,f)),()=>{m.current&&(Kt(m.current.deps,p=>nf(p,m.current)),Ae.cancel(m.current.update))})),(0,qc.useEffect)(d,[]),n3(()=>()=>{let p=m.current;Kt(p.deps,g=>nf(g,p))});let h=t.getComponentProps(a.getValue());return HK.createElement(e,MT({},h,{ref:s}))})},s3=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&Ae.write(this.update)}};function UPe(e,t){let o=new Set;return LT.dependencies=o,e.style&&(e=MT({},e,{style:t.createAnimatedStyle(e.style)})),e=new Kp(e),LT.dependencies=null,[e,o]}function GPe(e,t){return e&&(ue.fun(e)?e(t):e.current=t),t}var zK=Symbol.for("AnimatedComponent"),UK=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new Kp(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=jK(s)||"Anonymous";return ue.str(s)?s=i[s]||(i[s]=FK(s,n)):s=s[zK]||(s[zK]=FK(s,n)),s.displayName=`Animated(${a})`,s};return Ds(e,(s,a)=>{ue.arr(e)&&(a=jK(s)),i[a]=i(s)}),{animated:i}},jK=e=>ue.str(e)?e:e&&ue.str(e.displayName)?e.displayName:ue.fun(e)&&e.name||null;function Ln(){return Ln=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},Ln.apply(this,arguments)}function Yp(e,...t){return ue.fun(e)?e(...t):e}var O_=(e,t)=>e===!0||!!(t&&e&&(ue.fun(e)?e(t):ui(e).includes(t))),tY=(e,t)=>ue.obj(e)?t&&e[t]:e,oY=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,WPe=e=>e,rY=(e,t=WPe)=>{let o=$Pe;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);ue.und(i)||(r[n]=i)}return r},$Pe=["config","onProps","onStart","onChange","onPause","onResume","onRest"],KPe={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 YPe(e){let t={},o=0;if(Ds(e,(r,n)=>{KPe[n]||(t[n]=r,o++)}),o)return t}function nY(e){let t=YPe(e);if(t){let o={to:t};return Ds(e,(r,n)=>n in t||(o[n]=r)),o}return Ln({},e)}function A_(e){return e=on(e),ue.arr(e)?e.map(A_):xb(e)?Yi.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function c3(e){return ue.fun(e)||ue.arr(e)&&ue.obj(e[0])}var qPe={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}},zT=1.70158,VT=zT*1.525,GK=zT+1,WK=2*Math.PI/3,$K=2*Math.PI/4.5,FT=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,ZPe={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=>GK*e*e*e-zT*e*e,easeOutBack:e=>1+GK*Math.pow(e-1,3)+zT*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((VT+1)*2*e-VT)/2:(Math.pow(2*e-2,2)*((VT+1)*(e*2-2)+VT)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*WK),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*WK)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*$K))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*$K)/2+1,easeInBounce:e=>1-FT(1-e),easeOutBounce:FT,easeInOutBounce:e=>e<.5?(1-FT(1-2*e))/2:(1+FT(2*e-1))/2},u3=Ln({},qPe.default,{mass:1,damping:1,easing:ZPe.linear,clamp:!1}),d3=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,u3)}};function XPe(e,t,o){o&&(o=Ln({},o),KK(o,t),t=Ln({},o,t)),KK(e,t),Object.assign(e,t);for(let s in u3)e[s]==null&&(e[s]=u3[s]);let{mass:r,frequency:n,damping:i}=e;return ue.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 KK(e,t){if(!ue.und(t.decay))e.duration=void 0;else{let o=!ue.und(t.tension)||!ue.und(t.friction);(o||!ue.und(t.frequency)||!ue.und(t.damping)||!ue.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var YK=[],f3=class{constructor(){this.changed=!1,this.values=YK,this.toValues=null,this.fromValues=YK,this.to=void 0,this.from=void 0,this.config=new d3,this.immediate=!1}};function iY(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var l;let u,d,f=O_((l=o.cancel)!=null?l:r?.cancel,t);if(f)p();else{ue.und(o.pause)||(n.paused=O_(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||O_(g,t)),u=Yp(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-Ae.now()}function h(){u>0&&!Yi.skipAnimation?(n.delayed=!0,d=Ae.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(Ln({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var v3=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?wb(e.get()):t.every(o=>o.noop)?sY(e.get()):La(e.get(),t.every(o=>o.finished)),sY=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),La=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),wb=e=>({value:e,cancelled:!0,finished:!1});function aY(e,t,o,r){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:a,promise:l}=o;return!i&&e===a&&!t.reset?l:o.promise=(async()=>{o.asyncId=n,o.asyncTo=e;let u=rY(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)&&wb(r)||n!==o.asyncId&&La(r,!1);if(v)throw b.result=v,f(b),b},p=(b,v)=>{let y=new jT,S=new HT;return(async()=>{if(Yi.skipAnimation)throw L_(o),S.result=La(r,!1),f(S),S;h(y);let k=ue.obj(b)?Ln({},b):Ln({},v,{to:b});k.parentId=n,Ds(u,(x,E)=>{ue.und(k[E])&&(k[E]=x)});let _=await r.start(k);return h(y),o.paused&&await new Promise(x=>{o.resumeQueue.add(x)}),_})()},g;if(Yi.skipAnimation)return L_(o),La(r,!1);try{let b;ue.arr(e)?b=(async v=>{for(let y of v)await p(y)})(e):b=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([b.then(d),m]),g=La(r.get(),!0,!1)}catch(b){if(b instanceof jT)g=b.result;else if(b instanceof HT)g=b.result;else throw b}finally{n==o.asyncId&&(o.asyncId=i,o.asyncTo=i?a:void 0,o.promise=i?l:void 0)}return ue.fun(s)&&Ae.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function L_(e,t){kb(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var jT=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}},HT=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},m3=e=>e instanceof M_,QPe=1,M_=class extends vb{constructor(...t){super(...t),this.id=QPe++,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=Aa(this);return t&&t.getValue()}to(...t){return Yi.to(this,t)}interpolate(...t){return DK(),Yi.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){Gp(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||_b.sort(this),Gp(this,{type:"priority",parent:this,priority:t})}},qp=Symbol.for("SpringPhase"),lY=1,p3=2,h3=4,a3=e=>(e[qp]&lY)>0,sf=e=>(e[qp]&p3)>0,P_=e=>(e[qp]&h3)>0,qK=(e,t)=>t?e[qp]|=p3|lY:e[qp]&=~p3,ZK=(e,t)=>t?e[qp]|=h3:e[qp]&=~h3,g3=class extends M_{constructor(t,o){if(super(),this.key=void 0,this.animation=new f3,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,!ue.und(t)||!ue.und(o)){let r=ue.obj(t)?Ln({},t):Ln({},o,{from:t});ue.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(sf(this)||this._state.asyncTo)||P_(this)}get goal(){return on(this.animation.to)}get velocity(){let t=Aa(this);return t instanceof Wp?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return a3(this)}get isAnimating(){return sf(this)}get isPaused(){return P_(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=B_(n.to);!a&&An(n.to)&&(s=ui(on(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==$p?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=ue.arr(i.velocity)?i.velocity[f]:i.velocity,y,S=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(ue.und(i.duration))if(i.decay){let k=i.decay===!0?.998:i.decay,_=Math.exp(-(1-k)*g);p=b+v/(1-k)*(1-_),h=Math.abs(d.lastPosition-p)<=S,y=v*_}else{y=d.lastVelocity==null?v:d.lastVelocity;let k=i.restVelocity||S/10,_=i.clamp?0:i.bounce,x=!ue.und(_),E=b==m?d.v0>0:b<m,B,P=!1,T=1,A=Math.ceil(t/T);for(let I=0;I<A&&(B=Math.abs(y)>k,!(!B&&(h=Math.abs(m-p)<=S,h)));++I){x&&(P=p==m||p>m==E,P&&(y=-y*_,p=m));let R=-i.tension*1e-6*(p-m),V=-i.friction*.001*y,N=(R+V)/i.mass;y=y+N*T,p=p+y*T}}else{let k=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)),k=(i.progress||0)+g/this._memoizedDuration,k=k>1?1:k<0?0:k,d.durationProgress=k),p=b+i.easing(k)*(m-b),y=(p-d.lastPosition)/t,h=k==1}d.lastVelocity=y,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 l=Aa(this),u=l.getValue();if(o){let d=on(n.to);(u!==d||r)&&!i.decay?(l.setValue(d),this._onChange(d)):r&&i.decay&&this._onChange(u),this._stop()}else r&&this._onChange(u)}set(t){return Ae.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(sf(this)){let{to:t,config:o}=this.animation;Ae.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 ue.und(t)?(r=this.queue||[],this.queue=[]):r=[ue.obj(t)?t:Ln({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>v3(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),L_(this._state,t&&this._lastCallId),Ae.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=ue.obj(r)?r[o]:r,(r==null||c3(r))&&(r=void 0),n=ue.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return a3(this)||(t.reverse&&([r,n]=[n,r]),n=on(n),ue.und(n)?Aa(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Ln({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,rY(r,(l,u)=>/^on/.test(u)?tY(l,n):l)),QK(this,r,"onProps"),I_(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 iY(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{P_(this)||(ZK(this,!0),Sb(a.pauseQueue),I_(this,"onPause",La(this,R_(this,this.animation.to)),this))},resume:()=>{P_(this)&&(ZK(this,!1),sf(this)&&this._resume(),Sb(a.resumeQueue),I_(this,"onResume",La(this,R_(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(l=>{if(r.loop&&l.finished&&!(o&&l.noop)){let u=cY(r);if(u)return this._update(u,!0)}return l})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(wb(this));let n=!ue.und(t.to),i=!ue.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(wb(this));let{key:s,defaultProps:a,animation:l}=this,{to:u,from:d}=l,{to:f=u,from:m=d}=t;i&&!n&&(!o.default||ue.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let h=!Dl(m,d);h&&(l.from=m),m=on(m);let p=!Dl(f,u);p&&this._focus(f);let g=c3(o.to),{config:b}=l,{decay:v,velocity:y}=b;(n||i)&&(b.velocity=0),o.config&&!g&&XPe(b,Yp(o.config,s),o.config!==a.config?Yp(a.config,s):void 0);let S=Aa(this);if(!S||ue.und(f))return r(La(this,!0));let k=ue.und(o.reset)?i&&!o.default:!ue.und(m)&&O_(o.reset,s),_=k?m:this.get(),x=A_(f),E=ue.num(x)||ue.arr(x)||xb(x),B=!g&&(!E||O_(a.immediate||o.immediate,s));if(p){let I=DT(f);if(I!==S.constructor)if(B)S=this._set(x);else throw Error(`Cannot animate between ${S.constructor.name} and ${I.name}, as the "to" prop suggests`)}let P=S.constructor,T=An(f),A=!1;if(!T){let I=k||!a3(this)&&h;(p||I)&&(A=Dl(A_(_),x),T=!A),(!Dl(l.immediate,B)&&!B||!Dl(b.decay,v)||!Dl(b.velocity,y))&&(T=!0)}if(A&&sf(this)&&(l.changed&&!k?T=!0:T||this._stop(u)),!g&&((T||An(u))&&(l.values=S.getPayload(),l.toValues=An(f)?null:P==$p?[1]:ui(x)),l.immediate!=B&&(l.immediate=B,!B&&!k&&this._set(u)),T)){let{onRest:I}=l;Kt(JPe,V=>QK(this,o,V));let R=La(this,R_(this,u));Sb(this._pendingCalls,R),this._pendingCalls.add(r),l.changed&&Ae.batchedUpdates(()=>{l.changed=!k,I?.(R,this),k?Yp(a.onRest,R):l.onStart==null||l.onStart(R,this)})}k&&this._set(_),g?r(aY(o.to,o,this._state,this)):T?this._start():sf(this)&&!p?this._pendingCalls.add(r):r(sY(_))}_focus(t){let o=this.animation;t!==o.to&&(o3(this)&&this._detach(),o.to=t,o3(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;An(o)&&(rf(o,this),m3(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;An(t)&&nf(t,this)}_set(t,o=!0){let r=on(t);if(!ue.und(r)){let n=Aa(this);if(!n||!Dl(r,n.getValue())){let i=DT(r);!n||n.constructor!=i?NT(this,i.create(r)):n.setValue(r),n&&Ae.batchedUpdates(()=>{this._onChange(r,o)})}}return Aa(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,I_(this,"onStart",La(this,R_(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),Yp(this.animation.onChange,t,this)),Yp(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Aa(this).reset(on(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),sf(this)||(qK(this,!0),P_(this)||this._resume())}_resume(){Yi.skipAnimation?this.finish():_b.start(this)}_stop(t,o){if(sf(this)){qK(this,!1);let r=this.animation;Kt(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Gp(this,{type:"idle",parent:this});let n=o?wb(this.get()):La(this.get(),R_(this,t??r.to));Sb(this._pendingCalls,n),r.changed&&(r.changed=!1,I_(this,"onRest",n,this))}}};function R_(e,t){let o=A_(t),r=A_(e.get());return Dl(r,o)}function cY(e,t=e.loop,o=e.to){let r=Yp(t);if(r){let n=r!==!0&&nY(r),i=(n||e).reverse,s=!n||n.reset;return b3(Ln({},e,{loop:t,default:!1,pause:void 0,to:!i||c3(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function b3(e){let{to:t,from:o}=e=nY(e),r=new Set;return ue.obj(t)&&XK(t,r),ue.obj(o)&&XK(o,r),e.keys=r.size?Array.from(r):null,e}function XK(e,t){Ds(e,(o,r)=>o!=null&&t.add(r))}var JPe=["onStart","onRest","onChange","onPause","onResume"];function QK(e,t,o){e.animation[o]=t[o]!==oY(t,o)?tY(t[o],e.key):void 0}function I_(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 eRe=["onStart","onChange","onRest"],tRe=1,UT=class{constructor(t,o){this.id=tRe++,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(Ln({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];ue.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(b3(t)),this}start(t){let{queue:o}=this;return t?o=ui(t).map(b3):this.queue=[],this._flush?this._flush(this,o):(dY(this,o),oRe(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;Kt(ui(o),n=>r[n].stop(!!t))}else L_(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ue.und(t))this.start({pause:!0});else{let o=this.springs;Kt(ui(t),r=>o[r].pause())}return this}resume(t){if(ue.und(t))this.start({pause:!1});else{let o=this.springs;Kt(ui(t),r=>o[r].resume())}return this}each(t){Ds(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,kb(t,([l,u])=>{u.value=this.get(),l(u,this,this._item)}));let s=!n&&this._started,a=i||s&&r.size?this.get():null;i&&o.size&&kb(o,([l,u])=>{u.value=a,l(u,this,this._item)}),s&&(this._started=!1,kb(r,([l,u])=>{u.value=a,l(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;Ae.onFrame(this._onFrame)}};function oRe(e,t){return Promise.all(t.map(o=>uY(e,o))).then(o=>v3(e,o))}async function uY(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:l}=t,u=ue.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ue.arr(n)||ue.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Kt(eRe,g=>{let b=t[g];if(ue.fun(b)){let v=e._events[g];t[g]=({finished:y,cancelled:S})=>{let k=v.get(b);k?(y||(k.finished=!1),S&&(k.cancelled=!0)):v.set(b,{value:null,finished:y||!1,cancelled:S||!1})},u&&(u[g]=t[g])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,Sb(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||oY(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(iY(++e._lastAsyncId,{props:t,state:f,actions:{pause:PT,resume:PT,start(g,b){h?(L_(f,e._lastAsyncId),b(wb(e))):(g.onRest=a,b(aY(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let p=v3(e,await Promise.all(m));if(s&&p.finished&&!(o&&p.noop)){let g=cY(t,s,n);if(g)return dY(e,[g]),uY(e,g,!0)}return l&&Ae.batchedUpdates(()=>l(p,e,e.item)),p}function rRe(e,t){let o=new g3;return o.key=e,t&&rf(o,t),o}function nRe(e,t,o){t.keys&&Kt(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function dY(e,t){Kt(t,o=>{nRe(e.springs,o,r=>rRe(r,e))})}function iRe(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 sRe=["children"],k3=e=>{let{children:t}=e,o=iRe(e,sRe),r=(0,D_.useContext)(GT),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=VK(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=GT;return N_.createElement(s,{value:o},t)},GT=aRe(k3,{});k3.Provider=GT.Provider;k3.Consumer=GT.Consumer;function aRe(e,t){return Object.assign(e,N_.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var JK;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(JK||(JK={}));var y3=class extends M_{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=of(...o);let r=this._get(),n=DT(r);NT(this,n.create(r))}advance(t){let o=this._get(),r=this.get();Dl(o,r)||(Aa(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&eY(this._active)&&l3(this)}_get(){let t=ue.arr(this.source)?this.source.map(on):ui(on(this.source));return this.calc(...t)}_start(){this.idle&&!eY(this._active)&&(this.idle=!1,Kt(B_(this),t=>{t.done=!1}),Yi.skipAnimation?(Ae.batchedUpdates(()=>this.advance()),l3(this)):_b.start(this))}_attach(){let t=1;Kt(ui(this.source),o=>{An(o)&&rf(o,this),m3(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){Kt(ui(this.source),t=>{An(t)&&nf(t,this)}),this._active.clear(),l3(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=ui(this.source).reduce((o,r)=>Math.max(o,(m3(r)?r.priority:0)+1),0))}};function lRe(e){return e.idle!==!1}function eY(e){return!e.size||Array.from(e).every(lRe)}function l3(e){e.idle||(e.idle=!0,Kt(B_(e),t=>{t.done=!0}),Gp(e,{type:"idle",parent:e}))}Yi.assign({createStringInterpolator:OT,to:(e,t)=>new y3(e,t)});var CQe=_b.advance;var pY=c(Zc());function w3(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 cRe=["style","children","scrollTop","scrollLeft"],hY=/^--/;function uRe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!hY.test(e)&&!(V_.hasOwnProperty(e)&&V_[e])?t+"px":(""+t).trim()}var mY={};function dRe(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,l=w3(r,cRe),u=Object.values(l),d=Object.keys(l).map(f=>o||e.hasAttribute(f)?f:mY[f]||(mY[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=uRe(f,n[f]);hY.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 V_={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},fRe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),mRe=["Webkit","Ms","Moz","O"];V_=Object.keys(V_).reduce((e,t)=>(mRe.forEach(o=>e[fRe(o,t)]=e[t]),e),V_);var pRe=["x","y","z"],hRe=/^(matrix|translate|scale|rotate|skew)/,gRe=/^(translate)/,bRe=/^(rotate|skew)/,S3=(e,t)=>ue.num(e)&&e!==0?e+t:e,WT=(e,t)=>ue.arr(e)?e.every(o=>WT(o,t)):ue.num(e)?e===t:parseFloat(e)===t,_3=class extends Kp{constructor(t){let{x:o,y:r,z:n}=t,i=w3(t,pRe),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(l=>[`translate3d(${l.map(u=>S3(u,"px")).join(",")})`,WT(l,0)])),Ds(i,(l,u)=>{if(u==="transform")s.push([l||""]),a.push(d=>[d,d===""]);else if(hRe.test(u)){if(delete i[u],ue.und(l))return;let d=gRe.test(u)?"px":bRe.test(u)?"deg":"";s.push(ui(l)),a.push(u==="rotate3d"?([f,m,h,p])=>[`rotate3d(${f},${m},${h},${S3(p,d)})`,WT(p,0)]:f=>[`${u}(${f.map(m=>S3(m,d)).join(",")})`,WT(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new x3(s,a)),super(i)}},x3=class extends vb{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=on(r[0]),[s,a]=this.transforms[n](ue.arr(i)?i:r.map(on));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&Kt(this.inputs,o=>Kt(o,r=>An(r)&&rf(r,this)))}observerRemoved(t){t==0&&Kt(this.inputs,o=>Kt(o,r=>An(r)&&nf(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Gp(this,t)}},yRe=["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"],vRe=["scrollTop","scrollLeft"];Yi.assign({batchedUpdates:pY.unstable_batchedUpdates,createStringInterpolator:OT,colors:OK});var kRe=UK(yRe,{applyAnimatedValues:dRe,createAnimatedStyle:e=>new _3(e),getComponentProps:e=>w3(e,vRe)}),gY=kRe.animated;var Cb=c(L(),1),yY=c(at(),1),vY=c(W(),1);var SRe=200;function bY(e){return{top:e.offsetTop,left:e.offsetLeft}}function _Re({triggerAnimationOnChange:e,clientId:t}){let o=(0,Cb.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:l,isDraggingBlocks:u}=(0,vY.useSelect)(w),{previous:d,prevRect:f}=(0,Cb.useMemo)(()=>({previous:o.current&&bY(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,Cb.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,yY.getScrollContainer)(o.current),h=i(t),p=h||s(t),g=u();function b(){if(!g&&p&&f){let P=o.current.getBoundingClientRect().top-f.top;P&&(m.scrollTop+=P)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>SRe){b();return}let y=h||a(t)||l(t);if(y&&g)return;let S=y?"1":"",k=new UT({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:B}){if(!o.current)return;let{x:P,y:T}=B;P=Math.round(P),T=Math.round(T);let A=P===0&&T===0;o.current.style.transformOrigin="center center",o.current.style.transform=A?null:`translate3d(${P}px,${T}px,0)`,o.current.style.zIndex=S,b()}});o.current.style.transform=void 0;let _=bY(o.current),x=Math.round(d.left-_.left),E=Math.round(d.top-_.top);return k.start({x:0,y:0,from:{x,y:E}}),()=>{k.stop(),k.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,l,u]),o}var $T=_Re;var YT=c(L(),1),Xc=c(at(),1),SY=c(W(),1);var KT=".block-editor-block-list__block",xRe=".block-list-appender",wRe=".block-editor-button-block-appender";function kY(e,t){return e.closest(KT)===t.closest(KT)}function Vl(e,t){return t.closest([KT,xRe,wRe].join(","))===e}function Vs(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(KT);if(o)return o.id.slice(6)}function C3(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 CRe(e){let t=e.ownerDocument.defaultView;if(!t||e.hasAttribute("data-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 ERe(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var TRe=["core/navigation"];function Eb(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&TRe.includes(r)){let s=[e],a;for(;a=s.pop();)if(!ERe(a)){for(let l of a.children)if(CRe(l)){let u=l.getBoundingClientRect();o=C3(o,u),s.push(l)}}}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 _Y({clientId:e,initialPosition:t}){let o=(0,YT.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=F((0,SY.useSelect)(w));return(0,YT.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(Vl(o.current,s.activeElement))return;let a=Xc.focus.tabbable.find(o.current).filter(d=>(0,Xc.isTextField)(d)),l=t===-1,u=a[l?a.length-1:0]||o.current;if(!Vl(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=Xc.focus.tabbable.findNext(o.current);if(d&&Vl(o.current,d)&&(0,Xc.isFormElement)(d)){d.focus();return}}(0,Xc.placeCaretAtHorizontalEdge)(u,l)},[t,e]),o}var qT=c(te(),1);var{subscribeDelegatedListener:xY}=F(qT.privateApis);function wY({isEnabled:e=!0}={}){return(0,qT.useRefEffect)(t=>{if(!e)return;function o(i){i.defaultPrevented||(i.preventDefault(),t.classList.toggle("is-hovered",i.type==="mouseover"))}let r=xY(t,"mouseout",o),n=xY(t,"mouseover",o);return()=>{r(),n(),t.classList.remove("is-hovered")}},[e])}var ZT=c(W(),1),XT=c(te(),1);var{subscribeDelegatedListener:BRe}=F(XT.privateApis);function CY(e){let{isBlockSelected:t}=(0,ZT.useSelect)(w),{selectBlock:o,selectionChange:r}=(0,ZT.useDispatch)(w);return(0,XT.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}Vl(n,s.target)&&o(e)}}return BRe(n,"focusin",i)},[t,o])}var Tb=c(ee(),1),TY=c(at(),1),af=c(Pt(),1),QT=c(W(),1),BY=c(te(),1);function EY(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function PY({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=F((0,QT.useSelect)(w)),{insertAfterBlock:l,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:m,editContentOnlySection:h}=F((0,QT.useDispatch)(w));return(0,BY.useRefEffect)(p=>{if(!t)return;function g(y){let{keyCode:S,target:k}=y;S!==af.ENTER&&S!==af.BACKSPACE&&S!==af.DELETE||k!==p||(0,TY.isTextField)(k)||(y.preventDefault(),S===af.ENTER&&r()?d():S===af.ENTER?l(e):u(e))}function b(y){if(p!==y.target||p.isContentEditable||p.ownerDocument.activeElement!==p||n()){y.preventDefault();return}let S=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});y.dataTransfer.effectAllowed="move",y.dataTransfer.clearData(),y.dataTransfer.setData("wp-blocks",S);let{ownerDocument:k}=p,{defaultView:_}=k;_.getSelection().removeAllRanges();let E=k.createElement("div");E.style.width="1px",E.style.height="1px",E.style.position="fixed",E.style.visibility="hidden",k.body.appendChild(E),y.dataTransfer.setDragImage(E,0,0);let B=p.getBoundingClientRect(),P=p.id,T=p.cloneNode();T.style.display="none",p.id=null,p.after(T);let A=1;{let Q=p;for(;Q=Q.parentElement;){let{scale:X}=_.getComputedStyle(Q);if(X&&X!=="none"){A=parseFloat(X);break}}}let I=1/A,R={};for(let Q of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])R[Q]=p.style[Q];let V=_.scrollY,N=_.scrollX,U=y.clientX,j=y.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let O=y.clientX-B.left,M=y.clientY-B.top,H=B.height>200?200/B.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${O*I}px ${M*I}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${H})`,p.style.opacity="0.9",EY(_.getComputedStyle(p).backgroundColor)){let Q="transparent",X=p;for(;X=X.parentElement;){let{backgroundColor:J}=_.getComputedStyle(X);if(!EY(J)){Q=J;break}}p.style.backgroundColor=Q}let Y=!1,oe=U,K=j;function Z(Q){Q.clientX===oe&&Q.clientY===K||(oe=Q.clientX,K=Q.clientY,q())}function q(){Y||(Y=!0,p.style.pointerEvents="none");let Q=K-j,X=oe-U,J=_.scrollY,ie=_.scrollX,se=J-V,re=ie-N,le=Q+se,ye=X+re;p.style.top=`${le*I}px`,p.style.left=`${ye*I}px`}function $(){k.removeEventListener("dragover",Z),k.removeEventListener("dragend",$),k.removeEventListener("drop",$),k.removeEventListener("scroll",q);for(let[Q,X]of Object.entries(R))p.style[Q]=X;T.remove(),p.id=P,E.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),k.documentElement.classList.remove("is-dragging")}k.addEventListener("dragover",Z),k.addEventListener("dragend",$),k.addEventListener("drop",$),k.addEventListener("scroll",q),f([e]),document.body.classList.add("is-dragging-components-draggable"),k.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",g),p.addEventListener("dragstart",b);function v(y){let S=i(e),k=a(e),_=(0,Tb.isReusableBlock)(k),x=(0,Tb.isTemplatePart)(k);!S||s===e||_||x||(y.preventDefault(),h(e))}return p.addEventListener("dblclick",v),()=>{p.removeEventListener("keydown",g),p.removeEventListener("dragstart",b),p.removeEventListener("dblclick",v)}},[e,t,o,a,Tb.isReusableBlock,Tb.isTemplatePart,l,u,r,d,n,f,m,i,s,h])}var RY=c(te(),1),IY=c(L(),1);function OY(){let e=(0,IY.useContext)(JT);return(0,RY.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var eB=c(te(),1);function AY({isSelected:e}){let t=(0,eB.useReducedMotion)();return(0,eB.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 LY=c(te(),1),MY=c(W(),1);function tB({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=F((0,MY.useSelect)(w));return(0,LY.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 NY=c(te(),1),F_=new Map;function PRe(e,t){let o=F_.get(e);o||(o=new Set,F_.set(e,o),e.addEventListener("pointerdown",VY)),o.add(t)}function RRe(e,t){let o=F_.get(e);o&&(o.delete(t),DY(t),o.size===0&&(F_.delete(e),e.removeEventListener("pointerdown",VY)))}function DY(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function VY(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=F_.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)DY(a)}function FY(){return(0,NY.useRefEffect)(e=>(PRe(e.ownerDocument,e),()=>{RRe(e.ownerDocument,e)}),[])}var Zo=c(z(),1),di=c(L(),1),Mn=c(D(),1),Bb=c(W(),1),UY=c(Ma(),1),GY=c(Wi(),1);var z_=c(z(),1);function IRe(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"||!Ld.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function jY(e,t){if(!e?.length)return!1;let o=e.filter(r=>IRe(r,t)).length;return o===0?!1:o===e.length?!0:null}function HY(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 E3(e){if(!e&&e!==!1)return null;if(e===!1)return(0,z_.__)("Block is hidden");if(e?.viewport){let t=Ld.filter(([o])=>e.viewport?.[o]===!1).map(([,o])=>o.label);if(t.length>0)return(0,z_.sprintf)((0,z_.__)("Block is hidden on %s"),t.join(", "))}return null}var Mo=c(C(),1),ORe={[io.mobile.key]:!1,[io.tablet.key]:!1,[io.desktop.key]:!1},ARe=[];function T3({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,Bb.useDispatch)(GY.store),{updateBlockAttributes:r}=(0,Bb.useDispatch)(w),n=(0,Bb.useSelect)(y=>y(w).getBlocksByClientId(e)??ARe,[e]),i=(0,Bb.useSelect)(y=>y(UY.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,di.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let y={};return Ld.forEach(([,{key:S}])=>{y[S]=jY(n,S)}),{hideEverywhere:HY(n),viewportChecked:y}},[n]),[a,l]=(0,di.useState)(s?.viewportChecked??{}),[u,d]=(0,di.useState)(s?.hideEverywhere??!1),f=(0,di.useCallback)((y,S)=>{l({...a,[y]:S})},[a]),m=(0,di.useMemo)(()=>{if(!u)return(0,Zo.sprintf)((0,Zo.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let y=n?.length>1?(0,Zo.__)("Blocks hidden. You can access them via the List View (%s)."):(0,Zo.__)("Block hidden. You can access it via the List View (%s).");return(0,Zo.sprintf)(y,i)},[u,n?.length,i]),h=(0,di.useMemo)(()=>Object.values(a).some(y=>y===!0||y===null),[a]),p=(0,di.useMemo)(()=>u!==s.hideEverywhere?!0:Ld.some(([,{key:y}])=>a[y]!==s.viewportChecked[y]),[u,a,s]),g=(0,di.useMemo)(()=>u===null?!0:Object.values(a).some(y=>y===null),[u,a]),b=(0,di.useCallback)(y=>{y.preventDefault();let S=u?!1:{viewport:Ld.reduce((_,[,{key:x}])=>(a[x]&&(_[x]=!1),_),{})},k=Object.fromEntries(n.map(({clientId:_,attributes:x})=>[_,{metadata:ge({...x?.metadata,blockVisibility:S})}]));r(e,k,{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,Mo.jsx)(Mn.Modal,{title:e?.length>1?(0,Zo.__)("Hide blocks"):(0,Zo.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,Mo.jsxs)("form",{onSubmit:b,children:[(0,Mo.jsxs)("fieldset",{children:[(0,Mo.jsx)("legend",{children:v?(0,Zo.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,Zo.__)("Select the viewport size for which you want to hide the block.")}),(0,Mo.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,Mo.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,Mo.jsx)(Mn.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,Zo.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:y=>{d(y),l(ORe)}}),u!==!0&&(0,Mo.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:Ld.map(([,{label:y,icon:S,key:k}])=>(0,Mo.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,Mo.jsx)(Mn.CheckboxControl,{label:(0,Zo.sprintf)((0,Zo.__)("Hide on %s"),y),checked:a[k]??!1,indeterminate:a[k]===null,onChange:_=>f(k,_)}),(0,Mo.jsx)(Mn.Icon,{icon:S,className:G({"block-editor-block-visibility-modal__options-icon--checked":a[k]})})]},k))})]})}),v&&g&&(0,Mo.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,Zo.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!v&&u===!0&&(0,Mo.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,Zo.sprintf)((0,Zo.__)("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,Mo.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,di.createInterpolateElement)((0,Zo.sprintf)((0,Zo.__)("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,Mo.jsx)("strong",{})})})]}),(0,Mo.jsxs)(Mn.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Mo.jsx)(Mn.FlexItem,{children:(0,Mo.jsx)(Mn.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Zo.__)("Cancel")})}),(0,Mo.jsx)(Mn.FlexItem,{children:(0,Mo.jsx)(Mn.Button,{variant:"primary",type:"submit",disabled:!p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Zo.__)("Apply")})})]})]})})}var B3=c(te(),1);function Fs(e={}){let{blockVisibility:t=void 0,deviceType:o=io.desktop.key,view:r=window}=e,n=(0,B3.useViewportMatch)("mobile",">=",r),i=(0,B3.useViewportMatch)("medium",">=",r),s;return o===io.mobile.key?s=io.mobile.key:o===io.tablet.key?s=io.tablet.key:n?n&&!i?s=io.tablet.key:s=io.desktop.key:s=io.mobile.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[s]===!1,currentViewport:s}}var P3=c(z(),1),oB=c(D(),1),rB=c(L(),1);var WY=c(ee(),1),nB=c(W(),1);var R3=c(C(),1);function I3({clientIds:e}){let t=(0,rB.useRef)(!1),{canToggleBlockVisibility:o,areBlocksHiddenAnywhere:r}=(0,nB.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:l,isBlockHiddenAnywhere:u}=F(s(w));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,WY.hasBlockSupport)(l(f),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(f=>u(f))}},[e]),n=(0,nB.useDispatch)(w);if((0,rB.useEffect)(()=>{r&&(t.current=!0)},[r]),!r&&!t.current)return null;let{showViewportModal:i}=F(n);return(0,R3.jsx)(oB.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,R3.jsx)(oB.ToolbarButton,{disabled:!o,icon:r?wa:Pp,label:r?(0,P3.__)("Hidden"):(0,P3.__)("Visible"),onClick:()=>i(e),"aria-haspopup":"dialog"})})}var O3=c(z(),1),$Y=c(D(),1),iB=c(W(),1),KY=c(Ma(),1);var YY=c(C(),1);function A3({clientIds:e}){let{areBlocksHiddenAnywhere:t,shortcut:o}=(0,iB.useSelect)(n=>{let{isBlockHiddenAnywhere:i}=F(n(w));return{areBlocksHiddenAnywhere:e?.every(s=>i(s)),shortcut:n(KY.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),{showViewportModal:r}=F((0,iB.useDispatch)(w));return(0,YY.jsx)($Y.MenuItem,{onClick:()=>r(e),shortcut:o,children:t?(0,O3.__)("Show"):(0,O3.__)("Hide")})}var cf=c(D(),1),L3=c(W(),1),lf=c(z(),1);var Pb=c(C(),1),{Badge:LRe}=F(cf.privateApis),MRe={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:io.desktop.key};function qY({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,hasParentHiddenEverywhere:r}=(0,L3.useSelect)(f=>{if(!e)return MRe;let{getBlockAttributes:m,isBlockParentHiddenEverywhere:h,getSettings:p}=F(f(w));return{currentBlockVisibility:m(e)?.metadata?.blockVisibility,selectedDeviceType:p()?.[Es]?.toLowerCase()||io.desktop.key,hasParentHiddenEverywhere:h(e)}},[e]),i=dt(e)?.ownerDocument?.defaultView,s=i===null?void 0:i,{isBlockCurrentlyHidden:a,currentViewport:l}=Fs({blockVisibility:t,deviceType:o,view:s}),u=(0,L3.useSelect)(f=>!e||!l?!1:F(f(w)).isBlockParentHiddenAtViewport(e,l),[e,l]);if(!(a||r||u))return null;let d;if(a)if(t===!1)d=(0,lf.__)("Block is hidden");else{let f=io[l]?.label||l;d=(0,lf.sprintf)((0,lf.__)("Block is hidden on %s"),f)}if(r)d=(0,lf.__)("Parent block is hidden");else if(u){let f=io[l]?.label||l;d=(0,lf.sprintf)((0,lf.__)("Parent block is hidden on %s"),f)}return(0,Pb.jsx)(LRe,{className:"block-editor-block-visibility-info",children:(0,Pb.jsxs)(cf.__experimentalHStack,{spacing:2,justify:"start",children:[(0,Pb.jsx)(cf.Icon,{icon:wa}),(0,Pb.jsx)(cf.__experimentalText,{children:d})]})})}function j_(e={},{__unstableIsHtml:t}={}){let{clientId:o,className:r,wrapperProps:n={},isAligned:i,index:s,mode:a,name:l,blockApiVersion:u,blockTitle:d,isSelected:f,isSubtreeDisabled:m,hasOverlay:h,initialPosition:p,blockEditingMode:g,isHighlighted:b,isMultiSelected:v,isPartiallySelected:y,isReusable:S,isDragging:k,hasChildSelected:_,isEditingDisabled:x,hasEditableOutline:E,isEditingContentOnlySection:B,defaultClassName:P,isSectionBlock:T,isWithinSectionBlock:A,canMove:I,blockVisibility:R,deviceType:V}=(0,ZY.useContext)(qr),N=(0,Rb.useRefEffect)($=>{if($){let{ownerDocument:Q}=$,{defaultView:X}=Q;N.current=X}},[]),U=(0,sB.sprintf)((0,sB.__)("Block: %s"),d),j=a==="html"&&!t?"-visual":"",O=FY(),M=!A,H=(0,Rb.useMergeRefs)([e.ref,N,_Y({clientId:o,initialPosition:p}),P$(o),CY(o),PY({clientId:o,isSelected:f}),wY({isEnabled:M}),OY(),$T({triggerAnimationOnChange:s,clientId:o}),(0,Rb.useDisabled)({isDisabled:!h}),tB({clientId:o,isEnabled:T}),AY({isSelected:f}),I?O:void 0]),Y=Ze(),K=!!Y[Lg]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:Z}=Fs({blockVisibility:R,deviceType:V,view:N.current});u<2&&o===Y.clientId&&(0,QY.default)(`Block type "${l}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let q=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(q=!0),{tabIndex:g==="disabled"?-1:0,draggable:I&&!_?!0:void 0,...n,...e,ref:H,id:`block-${o}${j}`,role:"document","aria-label":U,"data-block":o,"data-type":l,"data-title":d,inert:m?"true":void 0,className:G("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":y,"is-reusable":S,"is-dragging":k,"has-child-selected":_,"is-editing-disabled":x,"has-editable-outline":E,"has-negative-margin":q,"is-editing-content-only-section":B,"is-block-hidden":Z},r,e.className,n.className,P),style:{...n.style,...e.style,...K}}}j_.save=XY.__unstableGetBlockProps;var Xo=c(C(),1);function NRe(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=G(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function aB({children:e,isHtml:t,...o}){return(0,Xo.jsx)("div",{...j_(o,{__unstableIsHtml:t}),children:e})}function M3({block:{__unstableBlockSource:e},mode:t,isLocked:o,canRemove:r,clientId:n,isSelected:i,isSelectionEnabled:s,className:a,__unstableLayoutClassNames:l,name:u,isValid:d,attributes:f,wrapperProps:m,setAttributes:h,onReplace:p,onRemove:g,onInsertBlocksAfter:b,onMerge:v,toggleSelection:y}){let{mayDisplayControls:S,mayDisplayParentControls:k,isSelectionWithinCurrentSection:_,themeSupportsLayout:x,...E}=(0,uf.useContext)(qr),B=Dp()||{},P=(0,Xo.jsx)(DE,{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:y,__unstableLayoutClassNames:l,__unstableParentLayout:Object.keys(B).length?B:void 0,mayDisplayControls:S,mayDisplayParentControls:k,mayDisplayPatternEditingControls:_,blockEditingMode:E.blockEditingMode,isPreviewMode:E.isPreviewMode}),T=(0,yt.getBlockType)(u);T?.getEditWrapperProps&&(m=NRe(m,T.getEditWrapperProps(f)));let A=m&&!!m["data-align"]&&!x,I=a?.includes("is-position-sticky");A&&(P=(0,Xo.jsx)("div",{className:G("wp-block",I&&a),"data-align":m["data-align"],children:P}));let R;if(d)t==="html"?R=(0,Xo.jsxs)(Xo.Fragment,{children:[(0,Xo.jsx)("div",{style:{display:"none"},children:P}),(0,Xo.jsx)(aB,{isHtml:!0,children:(0,Xo.jsx)(hK,{clientId:n})})]}):T?.apiVersion>1?R=P:R=(0,Xo.jsx)(aB,{children:P});else{let j=e?(0,yt.serializeRawBlock)(e):(0,yt.getSaveContent)(T,f);R=(0,Xo.jsxs)(aB,{className:"has-warning",children:[(0,Xo.jsx)(U$,{clientId:n}),(0,Xo.jsx)(uf.RawHTML,{children:(0,eq.safeHTML)(j)})]})}let{"data-align":V,...N}=m??{},U={...N,className:G(N.className,V&&x&&`align${V}`,!(V&&I)&&a)};return(0,Xo.jsx)(qr.Provider,{value:{wrapperProps:U,isAligned:A,isSelectionWithinCurrentSection:_,...E},children:(0,Xo.jsx)(Y$,{fallback:(0,Xo.jsx)(aB,{className:"has-warning",children:(0,Xo.jsx)($$,{})}),children:R})})}var DRe=(0,lB.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:l,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(w);return{setAttributes(m){let{getMultiSelectedBlockClientIds:h}=o.select(w),p=h(),{clientId:g,attributes:b}=t,v=p.length?p:[g],y=typeof m=="function"?m(b):m;r(v,y)},onInsertBlocks(m,h){let{rootClientId:p}=t;n(m,h,p)},onInsertBlocksAfter(m){let{clientId:h,rootClientId:p}=t,{getBlockIndex:g}=o.select(w),b=g(h);n(m,b+1,p)},onMerge(m){let{clientId:h,rootClientId:p}=t,{getPreviousBlockClientId:g,getNextBlockClientId:b,getBlock:v,getBlockAttributes:y,getBlockName:S,getBlockOrder:k,getBlockIndex:_,getBlockRootClientId:x,canInsertBlockType:E}=o.select(w);function B(){let T=v(h),A=(0,yt.getDefaultBlockName)(),I=(0,yt.getBlockType)(A);if(S(h)!==A){let R=(0,yt.switchToBlockType)(T,A);R&&R.length&&s(h,R)}else if((0,yt.isUnmodifiedDefaultBlock)(T)){let R=b(h);R&&o.batch(()=>{d(h),f(R)})}else if(I.merge){let R=I.merge({},T.attributes);s([h],[(0,yt.createBlock)(A,R)])}}function P(T,A=!0){let I=S(T),V=(0,yt.getBlockType)(I).category==="text",N=x(T),U=k(T),[j]=U;U.length===1&&(0,yt.isUnmodifiedBlock)(v(j))?d(T):V?o.batch(()=>{if(E(S(j),N))u([j],T,N,_(T));else{let O=(0,yt.switchToBlockType)(v(j),(0,yt.getDefaultBlockName)());O&&O.length&&O.every(M=>E(M.name,N))?(n(O,_(T),N,A),d(j,!1)):B()}!k(T).length&&(0,yt.isUnmodifiedBlock)(v(T))&&d(T,!1)}):B()}if(m){if(p){let A=b(p);if(A)if(S(p)===S(A)){let I=y(p),R=y(A);if(Object.keys(I).every(V=>I[V]===R[V])){o.batch(()=>{u(k(A),A,p),d(A,!1)});return}}else{i(p,A);return}}let T=b(h);if(!T)return;k(T).length?P(T,!1):i(h,T)}else{let T=g(h);if(T)i(T,h);else if(p){let A=g(p);if(A&&S(p)===S(A)){let I=y(p),R=y(A);if(Object.keys(I).every(V=>I[V]===R[V])){o.batch(()=>{u(k(p),p,A),d(p,!1)});return}}P(p)}else B()}},onReplace(m,h,p){m.length&&!(0,yt.isUnmodifiedDefaultBlock)(m[m.length-1])&&l();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)}}});M3=(0,cB.compose)(DRe,(0,JY.withFilters)("editor.BlockListBlock"))(M3);function VRe(e){let{clientId:t,rootClientId:o}=e,r=(0,lB.useSelect)(se=>{let{isBlockSelected:re,getBlockMode:le,isSelectionEnabled:ye,getTemplateLock:Re,isSectionBlock:Ve,getParentSectionBlock:tt,getBlockWithoutAttributes:Ye,getBlockAttributes:Ie,canRemoveBlock:ut,canMoveBlock:Ne,getSettings:Ft,getEditedContentOnlySection:qe,getBlockEditingMode:eo,getBlockName:ce,isFirstMultiSelectedBlock:fe,getMultiSelectedBlockClientIds:et,hasSelectedInnerBlock:De,getBlocksByName:At,getBlockIndex:ur,isBlockMultiSelected:Fe,isBlockSubtreeDisabled:Ge,isBlockHighlighted:We,__unstableIsFullySelected:$e,__unstableSelectionHasUnmergeableBlock:ht,isBlockBeingDragged:to,isDragging:Ao,__unstableHasActiveBlockOverlayActive:_e,getSelectedBlocksInitialCaretPosition:Ce}=F(se(w)),ot=Ye(t);if(!ot)return;let{hasBlockSupport:He,getActiveBlockVariation:gt}=se(yt.store),oo=Ie(t),{name:_t,isValid:Yr}=ot,yr=(0,yt.getBlockType)(_t),Rr=Ft(),{supportsLayout:Se,isPreviewMode:go,__experimentalBlockBindingsSupportedAttributes:_s}=Rr,up=_s?.[_t],Oe=oo?.metadata?.blockVisibility,qo=Rr?.[Es]?.toLowerCase()||"desktop",vr=yr?.apiVersion>1,si=Fe(t),de=eo(t),Lt={isPreviewMode:go,blockWithoutAttributes:ot,name:_t,attributes:oo,isValid:Yr,themeSupportsLayout:Se,index:ur(t),isReusable:(0,yt.isReusableBlock)(yr),className:vr?oo.className:void 0,defaultClassName:vr?(0,yt.getBlockDefaultClassName)(_t):void 0,blockTitle:yr?.title,bindableAttributes:up,blockVisibility:Oe,deviceType:qo,isMultiSelected:si,blockEditingMode:de,isEditingDisabled:de==="disabled"};if(go)return Lt;let Ee=re(t),Mt=ut(t),ro=Ne(t),kr=gt(_t,oo),kd=!0,SN=De(t,kd),_N=Ve(t)?t:tt(t),xN=(0,yt.hasBlockSupport)(_t,"multiple",!0)?[]:At(_t),Pwe=xN.length&&xN[0]!==t;return{...Lt,mode:le(t),isSelectionEnabled:ye(),isLocked:!!Re(o),isSectionBlock:Ve(t),isWithinSectionBlock:!!_N,isSelectionWithinCurrentSection:re(_N)||De(_N,kd),blockType:yr,canRemove:Mt,canMove:ro,isSelected:Ee,isEditingContentOnlySection:qe()===t,blockEditingMode:de,mayDisplayControls:Ee||fe(t)&&et().every(Rwe=>ce(Rwe)===_t),mayDisplayParentControls:He(ce(t),"__experimentalExposeControlsToChildren",!1)&&De(t),blockApiVersion:yr?.apiVersion||1,blockTitle:kr?.title||yr?.title,isSubtreeDisabled:de==="disabled"&&Ge(t),hasOverlay:_e(t)&&!Ao(),initialPosition:Ee?Ce():void 0,isHighlighted:We(t),isMultiSelected:si,isPartiallySelected:si&&!$e()&&!ht(),isDragging:to(t),hasChildSelected:SN,isEditingDisabled:de==="disabled",hasEditableOutline:de!=="disabled"&&eo(o)==="disabled",originalBlockClientId:Pwe?xN[0]:!1,blockVisibility:Oe,deviceType:qo}},[t,o]),n=(0,cB.useRefEffect)(se=>{if(se){let{ownerDocument:re}=se,{defaultView:le}=re;n.current=le}},[]),{isBlockCurrentlyHidden:i}=Fs({blockVisibility:r?.blockVisibility,deviceType:r?.deviceType,view:n.current}),s=(0,uf.useMemo)(()=>({...r?.blockWithoutAttributes,attributes:r?.attributes}),[r?.blockWithoutAttributes,r?.attributes]);if(!r)return null;let{isPreviewMode:a,mode:l="visual",isSelectionEnabled:u=!1,isLocked:d=!1,canRemove:f=!1,canMove:m=!1,name:h,attributes:p,isValid:g,isSelected:b=!1,themeSupportsLayout:v,isEditingContentOnlySection:y,blockEditingMode:S,mayDisplayControls:k,mayDisplayParentControls:_,index:x,blockApiVersion:E,blockType:B,blockTitle:P,isSubtreeDisabled:T,hasOverlay:A,initialPosition:I,isHighlighted:R,isMultiSelected:V,isPartiallySelected:N,isReusable:U,isDragging:j,hasChildSelected:O,isSectionBlock:M,isWithinSectionBlock:H,isSelectionWithinCurrentSection:Y,isEditingDisabled:oe,hasEditableOutline:K,className:Z,defaultClassName:q,originalBlockClientId:$,bindableAttributes:Q,blockVisibility:X,deviceType:J}=r,ie={isPreviewMode:a,clientId:t,className:Z,index:x,mode:l,name:h,blockApiVersion:E,blockType:B,blockTitle:P,isSelected:b,isSubtreeDisabled:T,hasOverlay:A,initialPosition:I,blockEditingMode:S,isHighlighted:R,isMultiSelected:V,isPartiallySelected:N,isReusable:U,isDragging:j,hasChildSelected:O,isSectionBlock:M,isWithinSectionBlock:H,isSelectionWithinCurrentSection:Y,isEditingDisabled:oe,hasEditableOutline:K,isEditingContentOnlySection:y,defaultClassName:q,mayDisplayControls:k,mayDisplayParentControls:_,originalBlockClientId:$,themeSupportsLayout:v,canMove:m,isBlockCurrentlyHidden:i,bindableAttributes:Q,blockVisibility:X,deviceType:J};return i&&!b&&!V&&!O?null:(0,Xo.jsx)(qr.Provider,{value:ie,children:(0,Xo.jsx)(M3,{...e,mode:l,isSelectionEnabled:u,isLocked:d,canRemove:f,canMove:m,block:s,name:h,attributes:p,isValid:g,isSelected:b})})}var tq=(0,uf.memo)(VRe);var N6=c(W(),1),Ene=c(ee(),1);var L6=c(z(),1),Sne=c(rq(),1),IR=c(W(),1),OR=c(Pt(),1);var kne=c(_r(),1),hu=c(z(),1),RR=c(D(),1),zy=c(W(),1),vh=c(ee(),1),A6=c(L(),1);var Ct=c(L(),1),ER=c(D(),1);var vQ=c(L(),1);var Zp=c(pe(),1);function nq({controlled:e,default:t,name:o,state:r="value"}){let{current:n}=Zp.useRef(e!==void 0),[i,s]=Zp.useState(t),a=n?e:i,l=Zp.useCallback(u=>{n||s(u)},[]);return[a,l]}var FRe=c(pe(),1),H_={...FRe};var sq=c(pe(),1),iq={};function rn(e,t){let o=sq.useRef(iq);return o.current===iq&&(o.current=e(t)),o}var N3=H_.useInsertionEffect,zRe=N3&&N3!==H_.useLayoutEffect?N3:e=>e();function xe(e){let t=rn(jRe).current;return t.next=e,zRe(t.effect),t.trampoline}function jRe(){let e={next:void 0,callback:HRe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function HRe(){}var aq=c(pe(),1),URe=()=>{},we=typeof document<"u"?aq.useLayoutEffect:URe;var uB=c(pe(),1),GRe=uB.createContext(void 0);function Ib(){return uB.useContext(GRe)?.direction??"ltr"}function WRe(e,t){return function(r,...n){let i=new URL(e);return i.searchParams.set("code",r.toString()),n.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${r}; visit ${i} for the full message.`}}var $Re=WRe("https://base-ui.com/production-error","Base UI"),Mr=$Re;var Xp=c(pe(),1);function U_(e,t,o,r){let n=rn(cq).current;return KRe(n,e,t,o,r)&&uq(n,[e,t,o,r]),n.callback}function lq(e){let t=rn(cq).current;return YRe(t,e)&&uq(t,e),t.callback}function cq(){return{callback:null,cleanup:null,refs:[]}}function KRe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function YRe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function uq(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 fq=c(pe(),1);var dq=c(pe(),1),qRe=parseInt(dq.version,10);function Ob(e){return qRe>=e}function D3(e){if(!fq.isValidElement(e))return null;let t=e,o=t.props;return(Ob(19)?o?.ref:t.ref)??null}function G_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Qc(){}var Iet=Object.freeze([]),No=Object.freeze({});function mq(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 pq(e,t){return typeof e=="function"?e(t):e}function dB(e,t){return typeof e=="function"?e(t):e}var V3={};function so(e,t,o,r,n){if(!o&&!r&&!n&&!e)return fB(t);let i=fB(e);return t&&(i=W_(i,t)),o&&(i=W_(i,o)),r&&(i=W_(i,r)),n&&(i=W_(i,n)),i}function hq(e){if(e.length===0)return V3;if(e.length===1)return fB(e[0]);let t=fB(e[0]);for(let o=1;o<e.length;o+=1)t=W_(t,e[o]);return t}function fB(e){return F3(e)?{...bq(e,V3)}:ZRe(e)}function W_(e,t){return F3(t)?bq(t,e):XRe(e,t)}function ZRe(e){let t={...e};for(let o in t){let r=t[o];gq(o,r)&&(t[o]=yq(r))}return t}function XRe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=G_(e.style,r);break}case"className":{e[o]=z3(e.className,r);break}default:gq(o,r)?e[o]=QRe(e[o],r):e[o]=r}}return e}function gq(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 F3(e){return typeof e=="function"}function bq(e,t){return F3(e)?e(t):e??V3}function QRe(e,t){return t?e?(...o)=>{let r=o[0];if(vq(r)){let i=r;$_(i);let s=t(...o);return i.baseUIHandlerPrevented||e?.(...o),s}let n=t(...o);return e?.(...o),n}:yq(t):e}function yq(e){return e&&((...t)=>{let o=t[0];return vq(o)&&$_(o),e(...t)})}function $_(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function z3(e,t){return t?e?t+" "+e:t:e}function vq(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var j3=c(pe(),1);function fr(e,t,o={}){let r=t.render,n=JRe(t,o);if(o.enabled===!1)return null;let i=o.state??No;return oIe(e,r,n,i)}function JRe(e,t={}){let{className:o,style:r,render:n}=e,{state:i=No,ref:s,props:a,stateAttributesMapping:l,enabled:u=!0}=t,d=u?pq(o,i):void 0,f=u?dB(r,i):void 0,m=u?mq(i,l):No,h=u&&a?eIe(a):void 0,p=u?G_(m,h)??{}:No;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=lq([p.ref,D3(n),...s]):p.ref=U_(p.ref,D3(n),s):U_(null,null)),u?(d!==void 0&&(p.className=z3(p.className,d)),f!==void 0&&(p.style=G_(p.style,f)),p):No}function eIe(e){return Array.isArray(e)?hq(e):so(void 0,e)}var tIe=Symbol.for("react.lazy");function oIe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=so(o,t.props);n.ref=o.ref;let i=t;return i?.$$typeof===tIe&&(i=Xp.Children.toArray(t)[0]),Xp.cloneElement(i,n)}if(e&&typeof e=="string")return rIe(e,o);throw new Error(Mr(8))}function rIe(e,t){return e==="button"?(0,j3.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,j3.createElement)("img",{alt:"",...t,key:t.key}):Xp.createElement(e,t)}var Le={};xs(Le,{cancelOpen:()=>IIe,chipRemovePress:()=>mIe,clearPress:()=>fIe,closePress:()=>uIe,closeWatcher:()=>wIe,decrementPress:()=>gIe,disabled:()=>AIe,drag:()=>BIe,escapeKey:()=>xIe,focusOut:()=>_Ie,imperativeAction:()=>NIe,incrementPress:()=>hIe,initial:()=>MIe,inputBlur:()=>vIe,inputChange:()=>bIe,inputClear:()=>yIe,inputPaste:()=>kIe,inputPress:()=>SIe,itemPress:()=>cIe,keyboard:()=>EIe,linkPress:()=>dIe,listNavigation:()=>CIe,missing:()=>LIe,none:()=>nIe,outsidePress:()=>lIe,pointer:()=>TIe,scrub:()=>RIe,siblingOpen:()=>OIe,swipe:()=>DIe,trackPress:()=>pIe,triggerFocus:()=>aIe,triggerHover:()=>sIe,triggerPress:()=>iIe,wheel:()=>PIe,windowResize:()=>VIe});var nIe="none",iIe="trigger-press",sIe="trigger-hover",aIe="trigger-focus",lIe="outside-press",cIe="item-press",uIe="close-press",dIe="link-press",fIe="clear-press",mIe="chip-remove-press",pIe="track-press",hIe="increment-press",gIe="decrement-press",bIe="input-change",yIe="input-clear",vIe="input-blur",kIe="input-paste",SIe="input-press",_Ie="focus-out",xIe="escape-key",wIe="close-watcher",CIe="list-navigation",EIe="keyboard",TIe="pointer",BIe="drag",PIe="wheel",RIe="scrub",IIe="cancel-open",OIe="sibling-open",AIe="disabled",LIe="missing",MIe="initial",NIe="imperative-action",DIe="swipe",VIe="window-resize";function st(e,t,o,r){let n=!1,i=!1,s=r??No;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){i=!0},get isCanceled(){return n},get isPropagationAllowed(){return i},trigger:o,...s}}var mB=c(pe(),1);var kq=0;function FIe(e,t="mui"){let[o,r]=mB.useState(e),n=e||o;return mB.useEffect(()=>{o==null&&(kq+=1,r(`${t}-${kq}`))},[o,t]),n}var Sq=H_.useId;function df(e,t){if(Sq!==void 0){let o=Sq();return e??(t?`${t}-${o}`:o)}return FIe(e,t)}function pB(e){return df(e,"base-ui")}var yB=c(pe(),1);var U3=c(pe(),1);var _q=c(pe(),1),zIe=[];function Ab(e){_q.useEffect(e,zIe)}var hB=null,ntt=globalThis.requestAnimationFrame,H3=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let n=0;n<o.length;n+=1)o[n]?.(t)};request(t){let o=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),o}cancel(t){let o=t-this.startId;o<0||o>=this.callbacks.length||(this.callbacks[o]=null,this.callbacksCount-=1)}},gB=new H3,Nn=class e{static create(){return new e}static request(t){return gB.request(t)}static cancel(t){return gB.cancel(t)}currentId=hB;request(t){this.cancel(),this.currentId=gB.request(()=>{this.currentId=hB,t()})}cancel=()=>{this.currentId!==hB&&(gB.cancel(this.currentId),this.currentId=hB)};disposeEffect=()=>this.cancel};function Lb(){let e=rn(Nn.create).current;return Ab(e.disposeEffect),e}function bB(e,t=!1,o=!1){let[r,n]=U3.useState(e&&t?"idle":void 0),[i,s]=U3.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&r!=="ending"&&!o&&n("ending"),!e&&!i&&r==="ending"&&n(void 0),we(()=>{if(!e&&i&&r!=="ending"&&o){let a=Nn.request(()=>{n("ending")});return()=>{Nn.cancel(a)}}},[e,i,r,o]),we(()=>{if(!e||t)return;let a=Nn.request(()=>{n(void 0)});return()=>{Nn.cancel(a)}},[t,e]),we(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&n("starting");let a=Nn.request(()=>{n("idle")});return()=>{Nn.cancel(a)}},[t,e,i,r]),{mounted:i,setMounted:s,transitionStatus:r}}function xq(e){let{open:t,defaultOpen:o,onOpenChange:r,disabled:n}=e,[i,s]=nq({controlled:t,default:o,name:"Collapsible",state:"open"}),{mounted:a,setMounted:l,transitionStatus:u}=bB(i,!0,!0),d=pB(),[f,m]=yB.useState(),h=f??d,p=xe(g=>{let b=!i,v=st(Le.triggerPress,g.nativeEvent);r(b,v),!v.isCanceled&&s(b)});return yB.useMemo(()=>({disabled:n,handleTrigger:p,mounted:a,open:i,panelId:h,setMounted:l,setOpen:s,setPanelIdState:m,transitionStatus:u}),[n,p,a,i,h,l,s,m,u])}var vB=c(pe(),1),G3=vB.createContext(void 0);function kB(){let e=vB.useContext(G3);if(e===void 0)throw new Error(Mr(15));return e}var Fl=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),jIe={[Fl.startingStyle]:""},HIe={[Fl.endingStyle]:""},Mb={transitionStatus(e){return e==="starting"?jIe:e==="ending"?HIe:null}};var K_=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fl.startingStyle]="startingStyle",e[e.endingStyle=Fl.endingStyle]="endingStyle",e})({});var wq=(function(e){return e.panelOpen="data-panel-open",e})({});var UIe={[K_.open]:""},GIe={[K_.closed]:""},Cq={open(e){return e?{[wq.panelOpen]:""}:null}},Eq={open(e){return e?UIe:GIe}};var Fb=c(pe(),1);function SB(){return typeof window<"u"}function Jp(e){return _B(e)?(e.nodeName||"").toLowerCase():"#document"}function ao(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Da(e){var t;return(t=(_B(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _B(e){return SB()?e instanceof Node||e instanceof ao(e).Node:!1}function Be(e){return SB()?e instanceof Element||e instanceof ao(e).Element:!1}function mr(e){return SB()?e instanceof HTMLElement||e instanceof ao(e).HTMLElement:!1}function Nb(e){return!SB()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ao(e).ShadowRoot}function Db(e){let{overflow:t,overflowX:o,overflowY:r,display:n}=gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function Tq(e){return/^(table|td|th)$/.test(Jp(e))}function Y_(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var WIe=/transform|translate|scale|rotate|perspective|filter/,$Ie=/paint|layout|strict|content/,Qp=e=>!!e&&e!=="none",W3;function xB(e){let t=Be(e)?gn(e):e;return Qp(t.transform)||Qp(t.translate)||Qp(t.scale)||Qp(t.rotate)||Qp(t.perspective)||!Vb()&&(Qp(t.backdropFilter)||Qp(t.filter))||WIe.test(t.willChange||"")||$Ie.test(t.contain||"")}function Bq(e){let t=Na(e);for(;mr(t)&&!Va(t);){if(xB(t))return t;if(Y_(t))return null;t=Na(t)}return null}function Vb(){return W3==null&&(W3=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),W3}function Va(e){return/^(html|body|#document)$/.test(Jp(e))}function gn(e){return ao(e).getComputedStyle(e)}function q_(e){return Be(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Na(e){if(Jp(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Nb(e)&&e.host||Da(e);return Nb(t)?t.host:t}function Pq(e){let t=Na(e);return Va(t)?e.ownerDocument?e.ownerDocument.body:e.body:mr(t)&&Db(t)?t:Pq(t)}function ff(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let n=Pq(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),s=ao(n);if(i){let a=wB(s);return t.concat(s,s.visualViewport||[],Db(n)?n:[],a&&o?ff(a):[])}else return t.concat(n,ff(n,[],o))}function wB(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var CB=c(pe(),1),KIe=CB.createContext(void 0);function Rq(e=!1){let t=CB.useContext(KIe);if(t===void 0&&!e)throw new Error(Mr(16));return t}var Iq=c(pe(),1);function Oq(e){let{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:n=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:Iq.useMemo(()=>{let u={onKeyDown(d){o&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(u.tabIndex=n,!i&&o&&(u.tabIndex=t?n:-1)),(i&&(t||s)||!i&&o)&&(u["aria-disabled"]=o),i&&(!t||a)&&(u.disabled=o),u},[r,o,t,s,a,i,n])}}function K3(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:n=!0,composite:i}=e,s=Fb.useRef(null),a=Rq(!0),l=i??a!==void 0,{props:u}=Oq({focusableWhenDisabled:o,disabled:t,composite:l,tabIndex:r,isNativeButton:n}),d=Fb.useCallback(()=>{let h=s.current;$3(h)&&l&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,l]);we(d,[d]);let f=Fb.useCallback((h={})=>{let{onClick:p,onMouseDown:g,onKeyUp:b,onKeyDown:v,onPointerDown:y,...S}=h;return so({onClick(k){if(t){k.preventDefault();return}p?.(k)},onMouseDown(k){t||g?.(k)},onKeyDown(k){if(t||($_(k),v?.(k),k.baseUIHandlerPrevented))return;let _=k.target===k.currentTarget,x=k.currentTarget,E=$3(x),B=!n&&YIe(x),P=_&&(n?E:!B),T=k.key==="Enter",A=k.key===" ",I=x.getAttribute("role"),R=I?.startsWith("menuitem")||I==="option"||I==="gridcell";if(_&&l&&A){if(k.defaultPrevented&&R)return;k.preventDefault(),B||n&&E?(x.click(),k.preventBaseUIHandler()):P&&(p?.(k),k.preventBaseUIHandler());return}P&&(!n&&(A||T)&&k.preventDefault(),!n&&T&&p?.(k))},onKeyUp(k){if(!t){if($_(k),b?.(k),k.target===k.currentTarget&&n&&l&&$3(k.currentTarget)&&k.key===" "){k.preventDefault();return}k.baseUIHandlerPrevented||k.target===k.currentTarget&&!n&&!l&&k.key===" "&&p?.(k)}},onPointerDown(k){if(t){k.preventDefault();return}y?.(k)}},n?{type:"button"}:{role:"button"},u,S)},[t,u,l,n]),m=xe(h=>{s.current=h,d()});return{getButtonProps:f,buttonRef:m}}function $3(e){return mr(e)&&e.tagName==="BUTTON"}function YIe(e){return!!(e?.tagName==="A"&&e?.href)}var mf=typeof navigator<"u",Y3=qIe(),Aq=XIe(),EB=ZIe(),Vtt=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Ftt=Y3.platform==="MacIntel"&&Y3.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Y3.platform),ztt=mf&&/firefox/i.test(EB),Lq=mf&&/apple/i.test(navigator.vendor),jtt=mf&&/Edg/i.test(EB),Htt=mf&&/android/i.test(Aq)||/android/i.test(EB),Mq=mf&&Aq.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Nq=EB.includes("jsdom/");function qIe(){if(!mf)return{platform:"",maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function ZIe(){if(!mf)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:o})=>`${t}/${o}`).join(" "):navigator.userAgent}function XIe(){if(!mf)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}var q3="data-base-ui-focusable";var Z3="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function TB(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Rt(e,t){if(!e||!t)return!1;let o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&Nb(o)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Dn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function pf(e,t){if(!Be(e))return!1;let o=e;if(t.hasElement(o))return!o.hasAttribute("data-trigger-disabled");for(let[,r]of t.entries())if(Rt(r,o))return!r.hasAttribute("data-trigger-disabled");return!1}function BB(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let o=e;return o.target!=null&&t.contains(o.target)}function Dq(e){return e.matches("html,body")}function Vq(e){return mr(e)&&e.matches(Z3)}function X3(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Z3}`)!=null}function Fq(e){if(!e||Nq)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Jc(e,t,o=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!o||n.context?.open?[n]:[],...Jc(e,n.id,o)])}function zq(e){return"nativeEvent"in e}function eu(e,t){let o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function jq(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var Gq=["top","right","bottom","left"];var hf=Math.min,Vn=Math.max,gf=Math.round,X_=Math.floor,Fa=e=>({x:e,y:e}),QIe={left:"right",right:"left",bottom:"top",top:"bottom"};function Q_(e,t,o){return Vn(e,hf(t,o))}function za(e,t){return typeof e=="function"?e(t):e}function nn(e){return e.split("-")[0]}function ja(e){return e.split("-")[1]}function RB(e){return e==="x"?"y":"x"}function J_(e){return e==="y"?"height":"width"}function fi(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function ex(e){return RB(fi(e))}function Wq(e,t,o){o===void 0&&(o=!1);let r=ja(e),n=ex(e),i=J_(n),s=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Z_(s)),[s,Z_(s)]}function $q(e){let t=Z_(e);return[PB(e),t,PB(t)]}function PB(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Hq=["left","right"],Uq=["right","left"],JIe=["top","bottom"],eOe=["bottom","top"];function tOe(e,t,o){switch(e){case"top":case"bottom":return o?t?Uq:Hq:t?Hq:Uq;case"left":case"right":return t?JIe:eOe;default:return[]}}function Kq(e,t,o,r){let n=ja(e),i=tOe(nn(e),o==="start",r);return n&&(i=i.map(s=>s+"-"+n),t&&(i=i.concat(i.map(PB)))),i}function Z_(e){let t=nn(e);return QIe[t]+e.slice(t.length)}function oOe(e){return{top:0,right:0,bottom:0,left:0,...e}}function IB(e){return typeof e!="number"?oOe(e):{top:e,right:e,bottom:e,left:e}}function eh(e){let{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function Nr(e){return e?.ownerDocument||document}var Fn=c(pe(),1);function pt(e,t,o,r){return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o,r)}}function bn(e){let t=rn(rOe,e).current;return t.next=e,we(t.effect),t}function rOe(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Zq=c(pe(),1);var qq=c(Zc(),1);function Yq(e){return e==null?e:"current"in e?e.current:e}function bf(e,t=!1,o=!0){let r=Lb();return xe((n,i=null)=>{r.cancel();let s=Yq(e);if(s==null)return;let a=s,l=()=>{qq.flushSync(n)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function u(){Promise.all(a.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||l()}).catch(()=>{if(o){i?.aborted||l();return}let d=a.getAnimations();!i?.aborted&&d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})}if(t){let d=Fl.startingStyle;if(!a.hasAttribute(d)){r.request(u);return}let f=new MutationObserver(()=>{a.hasAttribute(d)||(f.disconnect(),u())});f.observe(a,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}r.request(u)})}function zb(e){let{enabled:t=!0,open:o,ref:r,onComplete:n}=e,i=xe(n),s=bf(r,o,!1);Zq.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,o,i,s])}var tx={height:void 0,width:void 0};function Qq(e){let{externalRef:t,hiddenUntilFound:o,id:r,keepMounted:n,mounted:i,onOpenChange:s,open:a,setMounted:l,setOpen:u,transitionStatus:d}=e,f=Fn.useRef(null),m=Fn.useRef(null),[h,p]=Fn.useState(tx),g=Fn.useRef(tx),b=Fn.useRef(!1),v=Fn.useRef(a),y=Fn.useRef(!1),[S,k]=Fn.useState(!1),_=Fn.useRef(null),x=U_(t,f),E=bn({mounted:i,open:a}),B=bf(f,!1,!1),P=!a&&!i,T=S?"idle":d,A=a&&(v.current||y.current),I=!a&&i&&m.current==="css-animation"&&h.height===void 0&&h.width===void 0?g.current:h,R=o&&P&&m.current!=="css-animation",V=xe((M,H=!0)=>{H&&(g.current=M),p(M)}),N=xe(()=>{_.current?.(),_.current=null}),U=xe(M=>{N(),_.current=()=>{_.current=null,M()}}),j=xe(()=>{a&&i&&m.current==="css-animation"&&(y.current=!0)});we(()=>{!S||d==="starting"||k(!1)},[S,d]),Fn.useEffect(()=>()=>{j(),N()},[j,N]),we(()=>{let M=f.current;if(!M)return;!a&&_.current&&N();let H=nOe(M,A);if(m.current=H,a&&d==="idle"&&v.current&&H==="css-animation"){g.current=jb(M);return}if(a&&d==="starting"){let K=b.current;if(b.current=!1,H==="none"){V(jb(M)),k(!0);return}if(H==="css-transition"){let Z=iOe(M);if(V(jb(M)),!K)return Z;let q=ox(M,"transition-duration","0s");return U(q),k(!0),Z}if(H==="css-animation"){if(V(jb(M)),!K){ox(M,"animation-name","none")();return}let Z=ox(M,"animation-name","none"),q=ox(M,"animation-duration","0s");Z(),U(q),k(!0);return}}if(!a&&i&&(d==="idle"||d==="starting")){if(H==="none"){V(tx,!1),l(!1);return}H==="css-animation"&&(v.current=!1,y.current=!1),V(jb(M));return}if(d!=="ending")return;if(H==="none"){l(!1);return}let Y=jb(M);if(!((Y.height??0)>0||(Y.width??0)>0)){l(!1);return}V(Y),H==="css-animation"&&ox(M,"animation-name","none")()},[i,a,N,V,l,U,A,d]),zb({enabled:a&&i&&T==="idle",open:!0,ref:f,onComplete(){a&&V(tx,!1)}}),Fn.useEffect(()=>{if(a||!i||T!=="ending"||!f.current)return;let H=new AbortController,Y=-1;function oe(){E.current.open||(l(!1),V(tx,!1))}return Y=Nn.request(()=>{H.signal.aborted||B(oe,H.signal)}),()=>{Nn.cancel(Y),H.abort()}},[E,i,a,T,B,V,l]),we(()=>{let M=f.current;!M||!o||!P||M.setAttribute("hidden","until-found")},[P,o]),Fn.useEffect(function(){let H=f.current;if(!H)return;function Y(oe){b.current=!0,u(!0),s(!0,st(Le.none,oe))}return pt(H,"beforematch",Y)},[s,u]);let O=n||o||i||a;return{height:I.height,props:{...R?{[K_.startingStyle]:""}:void 0,hidden:P,id:r},ref:x,shouldPreventOpenAnimation:A,shouldRender:O,transitionStatus:T,width:I.width}}function jb(e){return{height:e.scrollHeight,width:e.scrollWidth}}function nOe(e,t=!1){let o=ao(e).getComputedStyle(e),r=(o.animationName.split(",").map(i=>i.trim()).some(i=>i!==""&&i!=="none")||t)&&Xq(o.animationDuration),n=Xq(o.transitionDuration);return r&&n||n?"css-transition":r?"css-animation":"none"}function Xq(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function ox(e,t,o){let r=e.style.getPropertyValue(t),n=e.style.getPropertyPriority(t);return e.style.setProperty(t,o),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,n)}}function iOe(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(n=>{e.style.setProperty(n,"initial","important")});function o(){Object.entries(t).forEach(([n,i])=>{if(i===""){e.style.removeProperty(n);return}e.style.setProperty(n,i)})}let r=Nn.request(o);return()=>{Nn.cancel(r),o()}}var Jq=c(pe(),1);function eZ(e){let t=Jq.useRef(!0);t.current&&(t.current=!1,e())}var rx=0,qi=class e{static create(){return new e}currentId=rx;start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=rx,o()},t)}isStarted(){return this.currentId!==rx}clear=()=>{this.currentId!==rx&&(clearTimeout(this.currentId),this.currentId=rx)};disposeEffect=()=>this.clear};function Ha(){let e=rn(qi.create).current;return Ab(e.disposeEffect),e}var mi=c(pe(),1);function sOe(e,t){return t!=null&&!eu(t)?0:typeof e=="function"?e():e}function th(e,t,o){let r=sOe(e,o);return typeof r=="number"?r:r?.[t]}function Q3(e){return typeof e=="function"?e():e}function OB(e,t){return t||e==="click"||e==="mousedown"}function tZ(e){return e?.includes("mouse")&&e!=="mousedown"}var oZ=c(C(),1),rZ=mi.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new qi,currentIdRef:{current:null},currentContextRef:{current:null}});function J3(e){let{children:t,delay:o,timeoutMs:r=0}=e,n=mi.useRef(o),i=mi.useRef(o),s=mi.useRef(null),a=mi.useRef(null),l=Ha();return(0,oZ.jsx)(rZ.Provider,{value:mi.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:i,currentIdRef:s,timeoutMs:r,currentContextRef:a,timeout:l}),[r,l]),children:t})}function e4(e,t={open:!1}){let{open:o}=t,r="rootStore"in e?e.rootStore:e,n=r.useState("floatingId"),i=mi.useContext(rZ),{currentIdRef:s,delayRef:a,timeoutMs:l,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:m}=i,[h,p]=mi.useState(!1);return we(()=>{function g(){p(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,a.current=u.current}if(s.current&&!o&&s.current===n){if(p(!1),l){let b=n;return m.start(l,()=>{r.select("open")||s.current&&s.current!==b||g()}),()=>{m.clear()}}g()}},[o,n,s,a,l,u,d,m,r]),we(()=>{if(!o)return;let g=d.current,b=s.current;m.clear(),d.current={onOpenChange:r.setOpen,setIsInstantPhase:p},s.current=n,a.current={open:0,close:th(u.current,"close")},b!==null&&b!==n?(p(!0),g?.setIsInstantPhase(!0),g?.onOpenChange(!1,st(Le.none))):(p(!1),g?.setIsInstantPhase(!1))},[o,n,r,s,a,u,d,m]),we(()=>()=>{d.current=null},[d]),mi.useMemo(()=>({hasProvider:f,delayRef:a,isInstantPhase:h}),[f,a,h])}function Ua(...e){return()=>{for(let t=0;t<e.length;t+=1){let o=e[t];o&&o()}}}function Hb(e){return`data-base-ui-${e}`}var Zi=c(pe(),1),sZ=c(Zc(),1);var nZ={style:{transition:"none"}};var aOe="data-base-ui-swipe-ignore",lOe="data-swipe-ignore",Got=`[${aOe}]`,Wot=`[${lOe}]`;var iZ={fallbackAxisSide:"end"};var aZ=c(C(),1),cOe=Zi.createContext(null),uOe=()=>Zi.useContext(cOe),dOe=Hb("portal");function t4(e={}){let{ref:t,container:o,componentProps:r=No,elementProps:n}=e,i=df(),a=uOe()?.portalNode,[l,u]=Zi.useState(null),[d,f]=Zi.useState(null),m=xe(b=>{b!==null&&f(b)}),h=Zi.useRef(null);we(()=>{if(o===null){h.current&&(h.current=null,f(null),u(null));return}if(i==null)return;let b=(o&&(_B(o)?o:o.current))??a??document.body;if(b==null){h.current&&(h.current=null,f(null),u(null));return}h.current!==b&&(h.current=b,f(null),u(b))},[o,a,i]);let p=fr("div",r,{ref:[t,m],props:[{id:i,[dOe]:""},n]});return{portalNode:d,portalSubtree:l&&p?sZ.createPortal(p,l):null}}var oh=c(pe(),1);function lZ(){let e=new Map;return{emit(t,o){e.get(t)?.forEach(r=>r(o))},on(t,o){e.has(t)||e.set(t,new Set),e.get(t).add(o)},off(t,o){e.get(t)?.delete(o)}}}var fOe=c(C(),1),mOe=oh.createContext(null),pOe=oh.createContext(null),Ub=()=>oh.useContext(mOe)?.id||null,yf=e=>{let t=oh.useContext(pOe);return e??t};var pi=c(pe(),1);function hOe(e,t){let o=null,r=null,n=!1;return{contextElement:e||void 0,getBoundingClientRect(){let i=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",u=i.width,d=i.height,f=i.x,m=i.y;return o==null&&t.x&&s&&(o=i.x-t.x),r==null&&t.y&&a&&(r=i.y-t.y),f-=o||0,m-=r||0,u=0,d=0,!n||l?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=s&&t.x!=null?t.x:f,m=a&&t.y!=null?t.y:m):n&&!l&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),n=!0,{width:u,height:d,x:f,y:m,top:m,right:f+u,bottom:m+d,left:f}}}}function cZ(e){return e!=null&&e.clientX!=null}function o4(e,t={}){let{enabled:o=!0,axis:r="both"}=t,n="rootStore"in e?e.rootStore:e,i=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,u=pi.useRef(!1),d=pi.useRef(null),[f,m]=pi.useState(),[h,p]=pi.useState([]),g=xe(k=>{n.set("positionReference",k)}),b=xe((k,_,x)=>{u.current||l.current.openEvent&&!cZ(l.current.openEvent)||n.set("positionReference",hOe(x??a,{x:k,y:_,axis:r,dataRef:l,pointerType:f}))}),v=xe(k=>{i?d.current||(b(k.clientX,k.clientY,k.currentTarget),p([])):b(k.clientX,k.clientY,k.currentTarget)}),y=eu(f)?s:i;pi.useEffect(()=>{if(!o){g(a);return}if(!y)return;function k(){d.current?.(),d.current=null}let _=ao(s);function x(E){let B=Dn(E);Rt(s,B)?k():b(E.clientX,E.clientY)}return!l.current.openEvent||cZ(l.current.openEvent)?d.current=pt(_,"mousemove",x):g(a),k},[y,o,s,l,a,n,b,g,h]),pi.useEffect(()=>()=>{n.set("positionReference",null)},[n]),pi.useEffect(()=>{o&&!s&&(u.current=!1)},[o,s]),pi.useEffect(()=>{!o&&i&&(u.current=!0)},[o,i]);let S=pi.useMemo(()=>{function k(_){m(_.pointerType)}return{onPointerDown:k,onPointerEnter:k,onMouseMove:v,onMouseEnter:v}},[v]);return pi.useMemo(()=>o?{reference:S,trigger:S}:{},[o,S])}var hi=c(pe(),1);var gOe={intentional:"onClick",sloppy:"onPointerDown"};function bOe(){return!1}function yOe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function r4(e,t={}){let{enabled:o=!0,escapeKey:r=!0,outsidePress:n=!0,outsidePressEvent:i="sloppy",referencePress:s=bOe,referencePressEvent:a="sloppy",bubbles:l,externalTree:u}=t,d="rootStore"in e?e.rootStore:e,f=d.useState("open"),m=d.useState("floatingElement"),{dataRef:h}=d.context,p=yf(u),g=xe(typeof n=="function"?n:()=>!1),b=typeof n=="function"?g:n,v=b!==!1,y=xe(()=>i),{escapeKey:S,outsidePress:k}=yOe(l),_=hi.useRef(!1),x=hi.useRef(!1),E=hi.useRef(!1),B=hi.useRef(!1),P=hi.useRef(""),T=hi.useRef(null),A=Ha(),I=Ha(),R=xe(()=>{I.clear(),h.current.insideReactTree=!1}),V=xe(K=>{let Z=h.current.floatingContext?.nodeId;return(p?Jc(p.nodesRef.current,Z):[]).some($=>$.context?.open&&!$.context.dataRef.current[K])}),N=xe(K=>BB(K,d.select("floatingElement"))||BB(K,d.select("domReferenceElement"))),U=xe(K=>{s()&&d.setOpen(!1,st(Le.triggerPress,K.nativeEvent))}),j=xe(K=>{if(!f||!o||!r||K.key!=="Escape"||B.current||!S&&V("__escapeKeyBubbles"))return;let Z=zq(K)?K.nativeEvent:K,q=st(Le.escapeKey,Z);d.setOpen(!1,q),q.isCanceled||K.preventDefault(),!S&&!q.isPropagationAllowed&&K.stopPropagation()}),O=xe(()=>{h.current.insideReactTree=!0,I.start(0,R)}),M=xe(K=>{if(!f||!o||K.button!==0)return;let Z=Dn(K.nativeEvent);Rt(d.select("floatingElement"),Z)&&(_.current||(_.current=!0,x.current=!1))}),H=xe(K=>{!f||!o||(K.defaultPrevented||K.nativeEvent.defaultPrevented)&&_.current&&(x.current=!0)});hi.useEffect(()=>{if(!f||!o)return;h.current.__escapeKeyBubbles=S,h.current.__outsidePressBubbles=k;let K=new qi,Z=new qi;function q(){K.clear(),B.current=!0}function $(){K.start(Vb()?5:0,()=>{B.current=!1})}function Q(){E.current=!0,Z.start(0,()=>{E.current=!1})}function X(){_.current=!1,x.current=!1}function J(){let ce=P.current,fe=ce==="pen"||!ce?"mouse":ce,et=y(),De=typeof et=="function"?et():et;return typeof De=="string"?De:De[fe]}function ie(ce){let fe=J();return fe==="intentional"&&ce.type!=="click"||fe==="sloppy"&&ce.type==="click"}function se(ce){let fe=h.current.floatingContext?.nodeId,et=p&&Jc(p.nodesRef.current,fe).some(De=>BB(ce,De.context?.elements.floating));return N(ce)||et}function re(ce){if(ie(ce)){ce.type!=="click"&&!N(ce)&&(Z.clear(),E.current=!1),R();return}if(h.current.insideReactTree){R();return}let fe=Dn(ce),et=`[${Hb("inert")}]`,De=Be(fe)?fe.getRootNode():null,At=Array.from((Nb(De)?De:Nr(d.select("floatingElement"))).querySelectorAll(et)),ur=d.context.triggerElements;if(fe&&(ur.hasElement(fe)||ur.hasMatchingElement(Ge=>Rt(Ge,fe))))return;let Fe=Be(fe)?fe:null;for(;Fe&&!Va(Fe);){let Ge=Na(Fe);if(Va(Ge)||!Be(Ge))break;Fe=Ge}if(!(At.length&&Be(fe)&&!Dq(fe)&&!Rt(fe,d.select("floatingElement"))&&At.every(Ge=>!Rt(Fe,Ge)))){if(mr(fe)&&!("touches"in ce)){let Ge=Va(fe),We=gn(fe),$e=/auto|scroll/,ht=Ge||$e.test(We.overflowX),to=Ge||$e.test(We.overflowY),Ao=ht&&fe.clientWidth>0&&fe.scrollWidth>fe.clientWidth,_e=to&&fe.clientHeight>0&&fe.scrollHeight>fe.clientHeight,Ce=We.direction==="rtl",ot=_e&&(Ce?ce.offsetX<=fe.offsetWidth-fe.clientWidth:ce.offsetX>fe.clientWidth),He=Ao&&ce.offsetY>fe.clientHeight;if(ot||He)return}if(!se(ce)){if(J()==="intentional"&&E.current){Z.clear(),E.current=!1;return}typeof b=="function"&&!b(ce)||V("__outsidePressBubbles")||(d.setOpen(!1,st(Le.outsidePress,ce)),R())}}}function le(ce){J()!=="sloppy"||ce.pointerType==="touch"||!d.select("open")||!o||N(ce)||re(ce)}function ye(ce){if(J()!=="sloppy"||!d.select("open")||!o||N(ce))return;let fe=ce.touches[0];fe&&(T.current={startTime:Date.now(),startX:fe.clientX,startY:fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function Re(ce,fe){let et=Dn(ce);if(!et)return;let De=pt(et,ce.type,()=>{fe(ce),De()})}function Ve(ce){P.current="touch",Re(ce,ye)}function tt(ce){A.clear(),ce.type==="pointerdown"&&(P.current=ce.pointerType),!(ce.type==="mousedown"&&T.current&&!T.current.dismissOnMouseDown)&&Re(ce,fe=>{fe.type==="pointerdown"?le(fe):re(fe)})}function Ye(ce){if(!_.current)return;let fe=x.current;if(X(),J()==="intentional"){if(ce.type==="pointercancel"){fe&&Q();return}if(!se(ce)){if(fe){Q();return}typeof b=="function"&&!b(ce)||(Z.clear(),E.current=!0,R())}}}function Ie(ce){if(J()!=="sloppy"||!T.current||N(ce))return;let fe=ce.touches[0];if(!fe)return;let et=Math.abs(fe.clientX-T.current.startX),De=Math.abs(fe.clientY-T.current.startY),At=Math.sqrt(et*et+De*De);At>5&&(T.current.dismissOnTouchEnd=!0),At>10&&(re(ce),A.clear(),T.current=null)}function ut(ce){Re(ce,Ie)}function Ne(ce){J()!=="sloppy"||!T.current||N(ce)||(T.current.dismissOnTouchEnd&&re(ce),A.clear(),T.current=null)}function Ft(ce){Re(ce,Ne)}let qe=Nr(m),eo=Ua(r&&Ua(pt(qe,"keydown",j),pt(qe,"compositionstart",q),pt(qe,"compositionend",$)),v&&Ua(pt(qe,"click",tt,!0),pt(qe,"pointerdown",tt,!0),pt(qe,"pointerup",Ye,!0),pt(qe,"pointercancel",Ye,!0),pt(qe,"mousedown",tt,!0),pt(qe,"mouseup",Ye,!0),pt(qe,"touchstart",Ve,!0),pt(qe,"touchmove",ut,!0),pt(qe,"touchend",Ft,!0)));return()=>{eo(),K.clear(),Z.clear(),X(),E.current=!1}},[h,m,r,v,b,f,o,S,k,j,R,y,V,N,p,d,A]),hi.useEffect(R,[b,R]);let Y=hi.useMemo(()=>({onKeyDown:j,[gOe[a]]:U,...a!=="intentional"&&{onClick:U}}),[j,U,a]),oe=hi.useMemo(()=>({onKeyDown:j,onPointerDown:H,onMouseDown:H,onClickCapture:O,onMouseDownCapture(K){O(),M(K)},onPointerDownCapture(K){O(),M(K)},onMouseUpCapture:O,onTouchEndCapture:O,onTouchMoveCapture:O}),[j,O,M,H]);return hi.useMemo(()=>o?{reference:Y,floating:oe,trigger:Y}:{},[o,Y,oe])}var yn=c(pe(),1);function uZ(e,t,o){let{reference:r,floating:n}=e,i=fi(t),s=ex(t),a=J_(s),l=nn(t),u=i==="y",d=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,m=r[a]/2-n[a]/2,h;switch(l){case"top":h={x:d,y:r.y-n.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-n.width,y:f};break;default:h={x:r.x,y:r.y}}switch(ja(t)){case"start":h[s]-=m*(o&&u?-1:1);break;case"end":h[s]+=m*(o&&u?-1:1);break}return h}async function mZ(e,t){var o;t===void 0&&(t={});let{x:r,y:n,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=za(t,e),p=IB(h),b=a[m?f==="floating"?"reference":"floating":f],v=eh(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(b)))==null||o?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),y=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),k=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},_=eh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:S,strategy:l}):y);return{top:(v.top-_.top+p.top)/k.y,bottom:(_.bottom-v.bottom+p.bottom)/k.y,left:(v.left-_.left+p.left)/k.x,right:(_.right-v.right+p.right)/k.x}}var vOe=50,pZ=async(e,t,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:i=[],platform:s}=o,a=s.detectOverflow?s:{...s,detectOverflow:mZ},l=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:f}=uZ(u,r,l),m=r,h=0,p={};for(let g=0;g<i.length;g++){let b=i[g];if(!b)continue;let{name:v,fn:y}=b,{x:S,y:k,data:_,reset:x}=await y({x:d,y:f,initialPlacement:r,placement:m,strategy:n,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});d=S??d,f=k??f,p[v]={...p[v],..._},x&&h<vOe&&(h++,typeof x=="object"&&(x.placement&&(m=x.placement),x.rects&&(u=x.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):x.rects),{x:d,y:f}=uZ(u,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:n,middlewareData:p}};var hZ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:n,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...b}=za(e,t);if((o=i.arrow)!=null&&o.alignmentOffset)return{};let v=nn(n),y=fi(a),S=nn(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=m||(S||!g?[Z_(a)]:$q(a)),x=p!=="none";!m&&x&&_.push(...Kq(a,g,p,k));let E=[a,..._],B=await l.detectOverflow(t,b),P=[],T=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(B[v]),f){let V=Wq(n,s,k);P.push(B[V[0]],B[V[1]])}if(T=[...T,{placement:n,overflows:P}],!P.every(V=>V<=0)){var A,I;let V=(((A=i.flip)==null?void 0:A.index)||0)+1,N=E[V];if(N&&(!(f==="alignment"?y!==fi(N):!1)||T.every(O=>fi(O.placement)===y?O.overflows[0]>0:!0)))return{data:{index:V,overflows:T},reset:{placement:N}};let U=(I=T.filter(j=>j.overflows[0]<=0).sort((j,O)=>j.overflows[1]-O.overflows[1])[0])==null?void 0:I.placement;if(!U)switch(h){case"bestFit":{var R;let j=(R=T.filter(O=>{if(x){let M=fi(O.placement);return M===y||M==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(M=>M>0).reduce((M,H)=>M+H,0)]).sort((O,M)=>O[1]-M[1])[0])==null?void 0:R[0];j&&(U=j);break}case"initialPlacement":U=a;break}if(n!==U)return{reset:{placement:U}}}return{}}}};function dZ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fZ(e){return Gq.some(t=>e[t]>=0)}var gZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o,platform:r}=t,{strategy:n="referenceHidden",...i}=za(e,t);switch(n){case"referenceHidden":{let s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=dZ(s,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:fZ(a)}}}case"escaped":{let s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=dZ(s,o.floating);return{data:{escapedOffsets:a,escaped:fZ(a)}}}default:return{}}}}};var bZ=new Set(["left","top"]);async function kOe(e,t){let{placement:o,platform:r,elements:n}=e,i=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=nn(o),a=ja(o),l=fi(o)==="y",u=bZ.has(s)?-1:1,d=i&&l?-1:1,f=za(t,e),{mainAxis:m,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*d,y:m*u}:{x:m*u,y:h*d}}var yZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:n,y:i,placement:s,middlewareData:a}=t,l=await kOe(t,e);return s===((o=a.offset)==null?void 0:o.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:i+l.y,data:{...l,placement:s}}}}},vZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:n,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:y,y:S}=v;return{x:y,y:S}}},...u}=za(e,t),d={x:o,y:r},f=await i.detectOverflow(t,u),m=fi(nn(n)),h=RB(m),p=d[h],g=d[m];if(s){let v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",S=p+f[v],k=p-f[y];p=Q_(S,p,k)}if(a){let v=m==="y"?"top":"left",y=m==="y"?"bottom":"right",S=g+f[v],k=g-f[y];g=Q_(S,g,k)}let b=l.fn({...t,[h]:p,[m]:g});return{...b,data:{x:b.x-o,y:b.y-r,enabled:{[h]:s,[m]:a}}}}}},kZ=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:r,placement:n,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=za(e,t),d={x:o,y:r},f=fi(n),m=RB(f),h=d[m],p=d[f],g=za(a,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){let S=m==="y"?"height":"width",k=i.reference[m]-i.floating[S]+b.mainAxis,_=i.reference[m]+i.reference[S]-b.mainAxis;h<k?h=k:h>_&&(h=_)}if(u){var v,y;let S=m==="y"?"width":"height",k=bZ.has(nn(n)),_=i.reference[f]-i.floating[S]+(k&&((v=s.offset)==null?void 0:v[f])||0)+(k?0:b.crossAxis),x=i.reference[f]+i.reference[S]+(k?0:((y=s.offset)==null?void 0:y[f])||0)-(k?b.crossAxis:0);p<_?p=_:p>x&&(p=x)}return{[m]:h,[f]:p}}}},SZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;let{placement:n,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=za(e,t),d=await s.detectOverflow(t,u),f=nn(n),m=ja(n),h=fi(n)==="y",{width:p,height:g}=i.floating,b,v;f==="top"||f==="bottom"?(b=f,v=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,b=m==="end"?"top":"bottom");let y=g-d.top-d.bottom,S=p-d.left-d.right,k=hf(g-d[b],y),_=hf(p-d[v],S),x=!t.middlewareData.shift,E=k,B=_;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(B=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),x&&!m){let T=Vn(d.left,0),A=Vn(d.right,0),I=Vn(d.top,0),R=Vn(d.bottom,0);h?B=p-2*(T!==0||A!==0?T+A:Vn(d.left,d.right)):E=g-2*(I!==0||R!==0?I+R:Vn(d.top,d.bottom))}await l({...t,availableWidth:B,availableHeight:E});let P=await s.getDimensions(a.floating);return p!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function CZ(e){let t=gn(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=mr(e),i=n?e.offsetWidth:o,s=n?e.offsetHeight:r,a=gf(o)!==i||gf(r)!==s;return a&&(o=i,r=s),{width:o,height:r,$:a}}function i4(e){return Be(e)?e:e.contextElement}function Gb(e){let t=i4(e);if(!mr(t))return Fa(1);let o=t.getBoundingClientRect(),{width:r,height:n,$:i}=CZ(t),s=(i?gf(o.width):o.width)/r,a=(i?gf(o.height):o.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var SOe=Fa(0);function EZ(e){let t=ao(e);return!Vb()||!t.visualViewport?SOe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _Oe(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ao(e)?!1:t}function rh(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let n=e.getBoundingClientRect(),i=i4(e),s=Fa(1);t&&(r?Be(r)&&(s=Gb(r)):s=Gb(e));let a=_Oe(i,o,r)?EZ(i):Fa(0),l=(n.left+a.x)/s.x,u=(n.top+a.y)/s.y,d=n.width/s.x,f=n.height/s.y;if(i){let m=ao(i),h=r&&Be(r)?ao(r):r,p=m,g=wB(p);for(;g&&r&&h!==p;){let b=Gb(g),v=g.getBoundingClientRect(),y=gn(g),S=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*b.x,k=v.top+(g.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,f*=b.y,l+=S,u+=k,p=ao(g),g=wB(p)}}return eh({width:d,height:f,x:l,y:u})}function AB(e,t){let o=q_(e).scrollLeft;return t?t.left+o:rh(Da(e)).left+o}function TZ(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-AB(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function xOe(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e,i=n==="fixed",s=Da(r),a=t?Y_(t.floating):!1;if(r===s||a&&i)return o;let l={scrollLeft:0,scrollTop:0},u=Fa(1),d=Fa(0),f=mr(r);if((f||!f&&!i)&&((Jp(r)!=="body"||Db(s))&&(l=q_(r)),f)){let h=rh(r);u=Gb(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}let m=s&&!f&&!i?TZ(s,l):Fa(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:o.y*u.y-l.scrollTop*u.y+d.y+m.y}}function wOe(e){return Array.from(e.getClientRects())}function COe(e){let t=Da(e),o=q_(e),r=e.ownerDocument.body,n=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-o.scrollLeft+AB(e),a=-o.scrollTop;return gn(r).direction==="rtl"&&(s+=Vn(t.clientWidth,r.clientWidth)-n),{width:n,height:i,x:s,y:a}}var _Z=25;function EOe(e,t){let o=ao(e),r=Da(e),n=o.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(n){i=n.width,s=n.height;let d=Vb();(!d||d&&t==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}let u=AB(r);if(u<=0){let d=r.ownerDocument,f=d.body,m=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(r.clientWidth-f.clientWidth-h);p<=_Z&&(i-=p)}else u<=_Z&&(i+=u);return{width:i,height:s,x:a,y:l}}function TOe(e,t){let o=rh(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,i=mr(e)?Gb(e):Fa(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=n*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function xZ(e,t,o){let r;if(t==="viewport")r=EOe(e,o);else if(t==="document")r=COe(Da(e));else if(Be(t))r=TOe(t,o);else{let n=EZ(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return eh(r)}function BZ(e,t){let o=Na(e);return o===t||!Be(o)||Va(o)?!1:gn(o).position==="fixed"||BZ(o,t)}function BOe(e,t){let o=t.get(e);if(o)return o;let r=ff(e,[],!1).filter(a=>Be(a)&&Jp(a)!=="body"),n=null,i=gn(e).position==="fixed",s=i?Na(e):e;for(;Be(s)&&!Va(s);){let a=gn(s),l=xB(s);!l&&a.position==="fixed"&&(n=null),(i?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Db(s)&&!l&&BZ(e,s))?r=r.filter(d=>d!==s):n=a,s=Na(s)}return t.set(e,r),r}function POe(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e,s=[...o==="clippingAncestors"?Y_(t)?[]:BOe(t,this._c):[].concat(o),r],a=xZ(t,s[0],n),l=a.top,u=a.right,d=a.bottom,f=a.left;for(let m=1;m<s.length;m++){let h=xZ(t,s[m],n);l=Vn(h.top,l),u=hf(h.right,u),d=hf(h.bottom,d),f=Vn(h.left,f)}return{width:u-f,height:d-l,x:f,y:l}}function ROe(e){let{width:t,height:o}=CZ(e);return{width:t,height:o}}function IOe(e,t,o){let r=mr(t),n=Da(t),i=o==="fixed",s=rh(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=Fa(0);function u(){l.x=AB(n)}if(r||!r&&!i)if((Jp(t)!=="body"||Db(n))&&(a=q_(t)),r){let h=rh(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else n&&u();i&&!r&&n&&u();let d=n&&!r&&!i?TZ(n,a):Fa(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function n4(e){return gn(e).position==="static"}function wZ(e,t){if(!mr(e)||gn(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Da(e)===o&&(o=o.ownerDocument.body),o}function PZ(e,t){let o=ao(e);if(Y_(e))return o;if(!mr(e)){let n=Na(e);for(;n&&!Va(n);){if(Be(n)&&!n4(n))return n;n=Na(n)}return o}let r=wZ(e,t);for(;r&&Tq(r)&&n4(r);)r=wZ(r,t);return r&&Va(r)&&n4(r)&&!xB(r)?o:r||Bq(e)||o}var OOe=async function(e){let t=this.getOffsetParent||PZ,o=this.getDimensions,r=await o(e.floating);return{reference:IOe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function AOe(e){return gn(e).direction==="rtl"}var s4={convertOffsetParentRelativeRectToViewportRelativeRect:xOe,getDocumentElement:Da,getClippingRect:POe,getOffsetParent:PZ,getElementRects:OOe,getClientRects:wOe,getDimensions:ROe,getScale:Gb,isElement:Be,isRTL:AOe};function RZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function LOe(e,t){let o=null,r,n=Da(e);function i(){var a;clearTimeout(r),(a=o)==null||a.disconnect(),o=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();let u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:h}=u;if(a||t(),!m||!h)return;let p=X_(f),g=X_(n.clientWidth-(d+m)),b=X_(n.clientHeight-(f+h)),v=X_(d),S={rootMargin:-p+"px "+-g+"px "+-b+"px "+-v+"px",threshold:Vn(0,hf(1,l))||1},k=!0;function _(x){let E=x[0].intersectionRatio;if(E!==l){if(!k)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!RZ(u,e.getBoundingClientRect())&&s(),k=!1}try{o=new IntersectionObserver(_,{...S,root:n.ownerDocument})}catch{o=new IntersectionObserver(_,S)}o.observe(e)}return s(!0),i}function nx(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=i4(e),d=n||i?[...u?ff(u):[],...t?ff(t):[]]:[];d.forEach(v=>{n&&v.addEventListener("scroll",o,{passive:!0}),i&&v.addEventListener("resize",o)});let f=u&&a?LOe(u,o):null,m=-1,h=null;s&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),o()}),u&&!l&&h.observe(u),t&&h.observe(t));let p,g=l?rh(e):null;l&&b();function b(){let v=rh(e);g&&!RZ(g,v)&&o(),g=v,p=requestAnimationFrame(b)}return o(),()=>{var v;d.forEach(y=>{n&&y.removeEventListener("scroll",o),i&&y.removeEventListener("resize",o)}),f?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}var IZ=yZ;var OZ=vZ,AZ=hZ,LZ=SZ,MZ=gZ;var NZ=kZ,LB=(e,t,o)=>{let r=new Map,n={platform:s4,...o},i={...n.platform,_c:r};return pZ(e,t,{...n,platform:i})};var pr=c(pe(),1),VZ=c(pe(),1),FZ=c(Zc(),1),NOe=typeof document<"u",DOe=function(){},MB=NOe?VZ.useLayoutEffect:DOe;function NB(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!NB(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){let i=n[r];if(!(i==="_owner"&&e.$$typeof)&&!NB(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function zZ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function DZ(e,t){let o=zZ(e);return Math.round(t*o)/o}function a4(e){let t=pr.useRef(e);return MB(()=>{t.current=e}),t}function jZ(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=pr.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=pr.useState(r);NB(m,r)||h(r);let[p,g]=pr.useState(null),[b,v]=pr.useState(null),y=pr.useCallback(O=>{O!==x.current&&(x.current=O,g(O))},[]),S=pr.useCallback(O=>{O!==E.current&&(E.current=O,v(O))},[]),k=i||p,_=s||b,x=pr.useRef(null),E=pr.useRef(null),B=pr.useRef(d),P=l!=null,T=a4(l),A=a4(n),I=a4(u),R=pr.useCallback(()=>{if(!x.current||!E.current)return;let O={placement:t,strategy:o,middleware:m};A.current&&(O.platform=A.current),LB(x.current,E.current,O).then(M=>{let H={...M,isPositioned:I.current!==!1};V.current&&!NB(B.current,H)&&(B.current=H,FZ.flushSync(()=>{f(H)}))})},[m,t,o,A,I]);MB(()=>{u===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[u]);let V=pr.useRef(!1);MB(()=>(V.current=!0,()=>{V.current=!1}),[]),MB(()=>{if(k&&(x.current=k),_&&(E.current=_),k&&_){if(T.current)return T.current(k,_,R);R()}},[k,_,R,T,P]);let N=pr.useMemo(()=>({reference:x,floating:E,setReference:y,setFloating:S}),[y,S]),U=pr.useMemo(()=>({reference:k,floating:_}),[k,_]),j=pr.useMemo(()=>{let O={position:o,left:0,top:0};if(!U.floating)return O;let M=DZ(U.floating,d.x),H=DZ(U.floating,d.y);return a?{...O,transform:"translate("+M+"px, "+H+"px)",...zZ(U.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:M,top:H}},[o,a,U.floating,d.x,d.y]);return pr.useMemo(()=>({...d,update:R,refs:N,elements:U,floatingStyles:j}),[d,R,N,U,j])}var l4=(e,t)=>{let o=IZ(e);return{name:o.name,fn:o.fn,options:[e,t]}},c4=(e,t)=>{let o=OZ(e);return{name:o.name,fn:o.fn,options:[e,t]}},u4=(e,t)=>({fn:NZ(e).fn,options:[e,t]}),d4=(e,t)=>{let o=AZ(e);return{name:o.name,fn:o.fn,options:[e,t]}},f4=(e,t)=>{let o=LZ(e);return{name:o.name,fn:o.fn,options:[e,t]}};var m4=(e,t)=>{let o=MZ(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Kb=c(pe(),1);var tX=c(pe(),1);var nt=(e,t,o,r,n,i,...s)=>{if(s.length>0)throw new Error(Mr(1));let a;if(e&&t&&o&&r&&n&&i)a=(l,u,d,f)=>{let m=e(l,u,d,f),h=t(l,u,d,f),p=o(l,u,d,f),g=r(l,u,d,f),b=n(l,u,d,f);return i(m,h,p,g,b,u,d,f)};else if(e&&t&&o&&r&&n)a=(l,u,d,f)=>{let m=e(l,u,d,f),h=t(l,u,d,f),p=o(l,u,d,f),g=r(l,u,d,f);return n(m,h,p,g,u,d,f)};else if(e&&t&&o&&r)a=(l,u,d,f)=>{let m=e(l,u,d,f),h=t(l,u,d,f),p=o(l,u,d,f);return r(m,h,p,u,d,f)};else if(e&&t&&o)a=(l,u,d,f)=>{let m=e(l,u,d,f),h=t(l,u,d,f);return o(m,h,u,d,f)};else if(e&&t)a=(l,u,d,f)=>{let m=e(l,u,d,f);return t(m,u,d,f)};else if(e)a=e;else throw new Error("Missing arguments");return a};var JZ=c(pe(),1),v4=c(h4(),1),eX=c(YZ(),1);var qZ=c(pe(),1);var g4=[],b4;function ZZ(){return b4}function XZ(e){g4.push(e)}function y4(e){let t=(o,r)=>{let n=rn(t2e).current,i;try{b4=n;for(let s of g4)s.before(n);i=e(o,r);for(let s of g4)s.after(n);n.didInitialize=!0}finally{b4=void 0}return i};return t.displayName=e.displayName||e.name,t}function QZ(e){return qZ.forwardRef(y4(e))}function t2e(){return{didInitialize:!1}}var o2e=Ob(19),r2e=o2e?i2e:s2e;function VB(e,t,o,r,n){return r2e(e,t,o,r,n)}function n2e(e,t,o,r,n){let i=JZ.useCallback(()=>t(e.getSnapshot(),o,r,n),[e,t,o,r,n]);return(0,v4.useSyncExternalStore)(e.subscribe,i,i)}XZ({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let o=0;o<e.syncHooks.length;o+=1){let r=e.syncHooks[o],n=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,n))&&(t=!0,r.value=n,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let o=new Set;for(let n of e.syncHooks)o.add(n.store);let r=[];for(let n of o)r.push(n.subscribe(t));return()=>{for(let n of r)n()}}),(0,v4.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function i2e(e,t,o,r,n){let i=ZZ();if(!i)return n2e(e,t,o,r,n);let s=i.syncIndex;i.syncIndex+=1;let a;return i.didInitialize?(a=i.syncHooks[s],(a.store!==e||a.selector!==t||!Object.is(a.a1,o)||!Object.is(a.a2,r)||!Object.is(a.a3,n))&&(a.store!==e&&(i.didChangeStore=!0),a.store=e,a.selector=t,a.a1=o,a.a2=r,a.a3=n,a.didChange=!0)):(a={store:e,selector:t,a1:o,a2:r,a3:n,value:t(e.getSnapshot(),o,r,n),didChange:!1},i.syncHooks.push(a)),a.value}function s2e(e,t,o,r,n){return(0,eX.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,o,r,n))}var FB=class{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let o=this.updateTick;for(let r of this.listeners){if(o!==this.updateTick)return;r(t)}}update(t){for(let o in t)if(!Object.is(this.state[o],t[o])){this.setState({...this.state,...t});return}}set(t,o){Object.is(this.state[t],o)||this.setState({...this.state,[t]:o})}notifyAll(){let t={...this.state};this.setState(t)}use(t,o,r,n){return VB(this,t,o,r,n)}};var nh=c(pe(),1);var $b=class extends FB{constructor(t,o={},r){super(t),this.context=o,this.selectors=r}useSyncedValue(t,o){nh.useDebugValue(t);let r=this;we(()=>{r.state[t]!==o&&r.set(t,o)},[r,t,o])}useSyncedValueWithCleanup(t,o){let r=this;we(()=>(r.state[t]!==o&&r.set(t,o),()=>{r.set(t,void 0)}),[r,t,o])}useSyncedValues(t){let o=this,r=Object.values(t);we(()=>{o.update(t)},[o,...r])}useControlledProp(t,o){nh.useDebugValue(t);let r=this,n=o!==void 0;we(()=>{n&&!Object.is(r.state[t],o)&&r.setState({...r.state,[t]:o})},[r,t,o,n])}select(t,o,r,n){let i=this.selectors[t];return i(this.state,o,r,n)}useState(t,o,r,n){return nh.useDebugValue(t),VB(this,this.selectors[t],o,r,n)}useContextCallback(t,o){nh.useDebugValue(t);let r=xe(o??Qc);this.context[t]=r}useStateSetter(t){let o=nh.useRef(void 0);return o.current===void 0&&(o.current=r=>{this.set(t,r)}),o.current}observe(t,o){let r;typeof t=="function"?r=t:r=this.selectors[t];let n=r(this.state);return o(n,n,this),this.subscribe(i=>{let s=r(i);if(!Object.is(n,s)){let a=n;n=s,o(s,a,this)}})}};var a2e={open:nt(e=>e.open),transitionStatus:nt(e=>e.transitionStatus),domReferenceElement:nt(e=>e.domReferenceElement),referenceElement:nt(e=>e.positionReference??e.referenceElement),floatingElement:nt(e=>e.floatingElement),floatingId:nt(e=>e.floatingId)},zl=class extends $b{constructor(t){let{syncOnly:o,nested:r,onOpenChange:n,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:n,dataRef:{current:{}},events:lZ(),nested:r,triggerElements:i},a2e),this.syncOnly=o}syncOpenEvent=(t,o)=>{(!t||!this.state.open||o!=null&&jq(o))&&(this.context.dataRef.current.openEvent=t?o:void 0)};dispatchOpenChange=(t,o)=>{this.syncOpenEvent(t,o.event);let r={open:t,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",r)};setOpen=(t,o)=>{if(this.syncOnly){this.context.onOpenChange?.(t,o);return}this.dispatchOpenChange(t,o),this.context.onOpenChange?.(t,o)}};function oX(e){let{popupStore:t,treatPopupAsFloatingElement:o=!1,floatingRootContext:r,floatingId:n,nested:i,onOpenChange:s}=e,a=t.useState("open"),l=t.useState("activeTriggerElement"),u=t.useState(o?"popupElement":"positionerElement"),d=t.context.triggerElements,f=s,m=tX.useRef(null);r===void 0&&m.current===null&&(m.current=new zl({open:a,transitionStatus:void 0,referenceElement:l,floatingElement:u,triggerElements:d,onOpenChange:f,floatingId:n,syncOnly:!0,nested:i}));let h=r??m.current;return t.useSyncedValue("floatingId",n),we(()=>{let p={open:a,floatingId:n,referenceElement:l,floatingElement:u};Be(l)&&(p.domReferenceElement=l),h.state.positionReference===h.state.referenceElement&&(p.positionReference=l),h.update(p)},[a,n,l,u,h]),h.context.onOpenChange=f,h.context.nested=i,h}var rX={tabIndex:-1,[q3]:""};function nX(e,t,o=!1){let r=df(),n=Ub()!=null,i=Kb.useRef(null);e===void 0&&i.current===null&&(i.current=t(r,n));let s=e??i.current;return oX({popupStore:s,treatPopupAsFloatingElement:o,floatingRootContext:s.state.floatingRootContext,floatingId:r,nested:n,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function l2e(e,t){let o=Kb.useRef(null),r=Kb.useRef(null);return Kb.useCallback(n=>{if(e===void 0)return;let i=!1;if(o.current!==null){let s=o.current,a=r.current,l=t.context.triggerElements.getById(s);a&&l===a&&(t.context.triggerElements.delete(s),i=!0),o.current=null,r.current=null}if(n!==null&&(o.current=e,r.current=n,t.context.triggerElements.add(e,n),i=!0),i){let s=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==s&&t.set("triggerCount",s)}},[t,e])}function iX(e,t,o){let r=o?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=o??null)}function sX(e,t,o,r){let n=o.useState("isMountedByTrigger",e),i=l2e(e,o),s=xe(a=>{if(i(a),!a)return;let l=o.select("open"),u=o.select("activeTriggerId");if(u===e){o.update({activeTriggerElement:a,...l?r:null});return}u==null&&l&&o.update({activeTriggerId:e,activeTriggerElement:a,...r})});return we(()=>{n&&o.update({activeTriggerElement:t.current,...r})},[n,o,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:n}}function aX(e){let t=e.useState("open"),o=e.useState("triggerCount");we(()=>{if(!t){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let r=e.context.triggerElements.size,n={};if(e.state.triggerCount!==r&&(n.triggerCount=r),!e.select("activeTriggerId")&&r===1){let i=e.context.triggerElements.entries().next();if(!i.done){let[s,a]=i.value;n.activeTriggerId=s,n.activeTriggerElement=a}}(n.triggerCount!==void 0||n.activeTriggerId!==void 0)&&e.update(n)},[t,e,o])}function lX(e,t,o){let{mounted:r,setMounted:n,transitionStatus:i}=bB(e);t.useSyncedValues({mounted:r,transitionStatus:i});let s=xe(()=>{n(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),o?.(),t.context.onOpenChangeComplete?.(!1)}),a=t.useState("preventUnmountingOnClose");return zb({enabled:r&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||s()}}),{forceUnmount:s,transitionStatus:i}}function cX(e,t){e.useSyncedValues(t),we(()=>()=>{e.update({activeTriggerProps:No,inactiveTriggerProps:No,popupProps:No})},[e])}var vf=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,o){let r=this.idMap.get(t);r!==o&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(o),this.idMap.set(t,o))}delete(t){let o=this.idMap.get(t);o&&(this.elementsSet.delete(o),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let o of this.elementsSet)if(t(o))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function uX(){return new zl({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new vf,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function fX(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:uX(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:No,inactiveTriggerProps:No,popupProps:No}}function mX(e,t,o=!1){return new zl({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0})}var ix=nt(e=>e.triggerIdProp??e.activeTriggerId),k4=nt(e=>e.openProp??e.open),dX=nt(e=>(e.popupElement?.id??e.floatingId)||void 0);function pX(e,t){return t!==void 0&&k4(e)&&ix(e)===t}function c2e(e,t){return pX(e,t)?!0:t!==void 0&&k4(e)&&ix(e)==null&&e.triggerCount===1}var hX={open:k4,mounted:nt(e=>e.mounted),transitionStatus:nt(e=>e.transitionStatus),floatingRootContext:nt(e=>e.floatingRootContext),triggerCount:nt(e=>e.triggerCount),preventUnmountingOnClose:nt(e=>e.preventUnmountingOnClose),payload:nt(e=>e.payload),activeTriggerId:ix,activeTriggerElement:nt(e=>e.mounted?e.activeTriggerElement:null),popupId:dX,isTriggerActive:nt((e,t)=>t!==void 0&&ix(e)===t),isOpenedByTrigger:nt((e,t)=>pX(e,t)),isMountedByTrigger:nt((e,t)=>t!==void 0&&ix(e)===t&&e.mounted),triggerProps:nt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:nt((e,t)=>c2e(e,t)?dX(e):void 0),popupProps:nt(e=>e.popupProps),popupElement:nt(e=>e.popupElement),positionerElement:nt(e=>e.positionerElement)};function gX(e){let{open:t=!1,onOpenChange:o,elements:r={}}=e,n=df(),i=Ub()!=null,s=rn(()=>new zl({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new vf,floatingId:n,syncOnly:!1,nested:i})).current;return we(()=>{let a={open:t,floatingId:n};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=Be(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),s.update(a)},[t,n,r.reference,r.floating,s]),s.context.onOpenChange=o,s.context.nested=i,s}function S4(e={}){let{nodeId:t,externalTree:o}=e,r=gX(e),n=e.rootContext||r,i=n.useState("referenceElement"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.useState("open"),u=n.useState("floatingId"),[d,f]=yn.useState(null),[m,h]=yn.useState(void 0),[p,g]=yn.useState(void 0),b=yn.useRef(null),v=yf(o),y=yn.useMemo(()=>({reference:i,floating:s,domReference:a}),[i,s,a]),S=jZ({...e,elements:{...y,...d&&{reference:d}}}),k=Be(m)?m:null,_=p===void 0?n.state.floatingElement:p;n.useSyncedValue("referenceElement",m??null),n.useSyncedValue("domReferenceElement",m===void 0?a:k),n.useSyncedValue("floatingElement",_);let x=yn.useCallback(I=>{let R=Be(I)?{getBoundingClientRect:()=>I.getBoundingClientRect(),getClientRects:()=>I.getClientRects(),contextElement:I}:I;f(R),S.refs.setReference(R)},[S.refs]),E=yn.useCallback(I=>{(Be(I)||I===null)&&(b.current=I,h(I)),(Be(S.refs.reference.current)||S.refs.reference.current===null||I!==null&&!Be(I))&&S.refs.setReference(I)},[S.refs,h]),B=yn.useCallback(I=>{g(I),S.refs.setFloating(I)},[S.refs]),P=yn.useMemo(()=>({...S.refs,setReference:E,setFloating:B,setPositionReference:x,domReference:b}),[S.refs,E,B,x]),T=yn.useMemo(()=>({...S.elements,domReference:a}),[S.elements,a]),A=yn.useMemo(()=>({...S,dataRef:n.context.dataRef,open:l,onOpenChange:n.setOpen,events:n.context.events,floatingId:u,refs:P,elements:T,nodeId:t,rootStore:n}),[S,P,T,t,n,l,u]);return we(()=>{a&&(b.current=a)},[a]),we(()=>{n.context.dataRef.current.floatingContext=A;let I=v?.nodesRef.current.find(R=>R.id===t);I&&(I.context=A)}),yn.useMemo(()=>({...S,context:A,refs:P,elements:T,rootStore:n}),[S,P,T,A,n])}var jl=c(pe(),1);var _4=Mq&&Lq;function x4(e,t={}){let{enabled:o=!0,delay:r}=t,n="rootStore"in e?e.rootStore:e,{events:i,dataRef:s}=n.context,a=jl.useRef(!1),l=jl.useRef(null),u=jl.useRef(!0),d=Ha();jl.useEffect(()=>{let m=n.select("domReferenceElement");if(!o)return;let h=ao(m);function p(){let v=n.select("domReferenceElement");!n.select("open")&&mr(v)&&v===TB(Nr(v))&&(a.current=!0)}function g(){u.current=!0}function b(){u.current=!1}return Ua(pt(h,"blur",p),_4&&pt(h,"keydown",g,!0),_4&&pt(h,"pointerdown",b,!0))},[n,o]),jl.useEffect(()=>{if(!o)return;function m(h){if(h.reason===Le.triggerPress||h.reason===Le.escapeKey){let p=n.select("domReferenceElement");Be(p)&&(l.current=p,a.current=!0)}}return i.on("openchange",m),()=>{i.off("openchange",m)}},[i,o,n]);let f=jl.useMemo(()=>{function m(){a.current=!1,l.current=null}return{onMouseLeave(){m()},onFocus(h){let p=h.currentTarget;if(a.current){if(l.current===p)return;m()}let g=Dn(h.nativeEvent);if(Be(g)){if(_4&&!h.relatedTarget){if(!u.current&&!Vq(g))return}else if(!Fq(g))return}let b=pf(h.relatedTarget,n.context.triggerElements),{nativeEvent:v,currentTarget:y}=h,S=typeof r=="function"?r():r;if(n.select("open")&&b||S===0||S===void 0){n.setOpen(!0,st(Le.triggerFocus,v,y));return}d.start(S,()=>{a.current||n.setOpen(!0,st(Le.triggerFocus,v,y))})},onBlur(h){m();let p=h.relatedTarget,g=h.nativeEvent,b=Be(p)&&p.hasAttribute(Hb("focus-guard"))&&p.getAttribute("data-type")==="outside";d.start(0,()=>{let v=n.select("domReferenceElement"),y=TB(Nr(v));!p&&y===v||Rt(s.current.floatingContext?.refs.floating.current,y)||Rt(v,y)||b||pf(p??y,n.context.triggerElements)||n.setOpen(!1,st(Le.triggerFocus,g))})}}},[s,r,n,d]);return jl.useMemo(()=>o?{reference:f,trigger:f}:{},[o,f])}var C4=c(pe(),1);var w4=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new qi,this.restTimeout=new qi,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},zB=new WeakMap;function Yb(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&zB.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),zB.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function jB(e,t){let{scopeElement:o,referenceElement:r,floatingElement:n}=t,i=zB.get(o);i&&i!==e&&Yb(i),Yb(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=n,zB.set(o,e),o.style.pointerEvents="none",r.style.pointerEvents="auto",n.style.pointerEvents="auto"}function qb(e){let t=e.context.dataRef.current,o=rn(()=>t.hoverInteractionState??w4.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=o),Ab(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function E4(e,t={}){let{enabled:o=!0,closeDelay:r=0,nodeId:n}=t,i="rootStore"in e?e.rootStore:e,s=i.useState("open"),a=i.useState("floatingElement"),l=i.useState("domReferenceElement"),{dataRef:u}=i.context,d=yf(),f=Ub(),m=qb(i),h=Ha(),p=xe(()=>OB(u.current.openEvent?.type,m.interactedInside)),g=xe(()=>tZ(u.current.openEvent?.type)),b=xe(()=>{Yb(m)});we(()=>{s||(m.pointerType=void 0,m.restTimeoutPending=!1,m.interactedInside=!1,b())},[s,m,b]),C4.useEffect(()=>b,[b]),we(()=>{if(o&&s&&m.handleCloseOptions?.blockPointerEvents&&g()&&Be(l)&&a){let v=l,y=a,S=Nr(a),k=d?.nodesRef.current.find(B=>B.id===f)?.context?.elements.floating;k&&(k.style.pointerEvents="");let _=m.pointerEventsScopeElement!==y?m.pointerEventsScopeElement:null,x=k!==y?k:null,E=m.handleCloseOptions?.getScope?.()??_??x??v.closest("[data-rootownerid]")??S.body;return jB(m,{scopeElement:E,referenceElement:v,floatingElement:y}),()=>{b()}}},[o,s,l,a,m,g,d,f,b]),C4.useEffect(()=>{if(!o)return;function v(){return!!(d&&f&&Jc(d.nodesRef.current,f).length>0)}function y(B){let P=th(r,"close",m.pointerType),T=()=>{i.setOpen(!1,st(Le.triggerHover,B)),d?.events.emit("floating.closed",B)};P?m.openChangeTimeout.start(P,T):(m.openChangeTimeout.clear(),T())}function S(B){let P=Dn(B);if(!X3(P)){m.interactedInside=!1;return}m.interactedInside=P?.closest("[aria-haspopup]")!=null}function k(){m.openChangeTimeout.clear(),h.clear(),d?.events.off("floating.closed",x),b()}function _(B){if(v()&&d){d.events.on("floating.closed",x);return}if(pf(B.relatedTarget,i.context.triggerElements))return;let P=u.current.floatingContext?.nodeId??n,T=B.relatedTarget;if(!(d&&P&&Be(T)&&Jc(d.nodesRef.current,P,!1).some(I=>Rt(I.context?.elements.floating,T)))){if(m.handler){m.handler(B);return}b(),p()||y(B)}}function x(B){!d||!f||v()||h.start(0,()=>{d.events.off("floating.closed",x),i.setOpen(!1,st(Le.triggerHover,B)),d.events.emit("floating.closed",B)})}let E=a;return Ua(E&&pt(E,"mouseenter",k),E&&pt(E,"mouseleave",_),E&&pt(E,"pointerdown",S,!0),()=>{d?.events.off("floating.closed",x)})},[o,a,i,u,r,n,p,b,m,d,f,h])}var kf=c(pe(),1),bX=c(Zc(),1);var u2e={current:null};function T4(e,t={}){let{enabled:o=!0,delay:r=0,handleClose:n=null,mouseOnly:i=!1,restMs:s=0,move:a=!0,triggerElementRef:l=u2e,externalTree:u,isActiveTrigger:d=!0,getHandleCloseContext:f,isClosing:m,shouldOpen:h}=t,p="rootStore"in e?e.rootStore:e,{dataRef:g,events:b}=p.context,v=yf(u),y=qb(p),S=kf.useRef(!1),k=bn(n),_=bn(r),x=bn(s),E=bn(o),B=bn(h),P=bn(m),T=xe(()=>OB(g.current.openEvent?.type,y.interactedInside)),A=xe(()=>B.current?.()!==!1),I=xe((N,U,j)=>{let O=p.context.triggerElements;if(O.hasElement(U))return!N||!Rt(N,U);if(!Be(j))return!1;let M=j;return O.hasMatchingElement(H=>Rt(H,M))&&(!N||!Rt(N,M))}),R=xe(()=>{if(!y.handler)return;Nr(p.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0}),V=xe(()=>{Yb(y)});return d&&(y.handleCloseOptions=k.current?.__options),kf.useEffect(()=>R,[R]),kf.useEffect(()=>{if(!o)return;function N(U){U.open?S.current=!1:(S.current=U.reason===Le.triggerHover,R(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return b.on("openchange",N),()=>{b.off("openchange",N)}},[o,b,y,R]),kf.useEffect(()=>{if(!o)return;function N(M,H=!0){let Y=th(_.current,"close",y.pointerType);Y?y.openChangeTimeout.start(Y,()=>{p.setOpen(!1,st(Le.triggerHover,M)),v?.events.emit("floating.closed",M)}):H&&(y.openChangeTimeout.clear(),p.setOpen(!1,st(Le.triggerHover,M)),v?.events.emit("floating.closed",M))}let U=l.current??(d?p.select("domReferenceElement"):null);if(!Be(U))return;function j(M){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,i&&!eu(y.pointerType))return;let H=Q3(x.current),Y=th(_.current,"open",y.pointerType),oe=Dn(M),K=M.currentTarget??null,Z=p.select("domReferenceElement"),q=K;if(Be(oe)&&!p.context.triggerElements.hasElement(oe)){for(let ye of p.context.triggerElements.elements())if(Rt(ye,oe)){q=ye;break}}Be(K)&&Be(Z)&&!p.context.triggerElements.hasElement(K)&&Rt(K,Z)&&(q=Z);let $=q==null?!1:I(Z,q,oe),Q=p.select("open"),X=P.current?.()??p.select("transitionStatus")==="ending",J=!Q&&X&&S.current,ie=!$&&Be(q)&&Be(Z)&&Rt(Z,q)&&J,se=H>0&&!Y,re=$&&(Q||J)||ie,le=!Q||$;if(re){A()&&p.setOpen(!0,st(Le.triggerHover,M,q));return}se||(Y?y.openChangeTimeout.start(Y,()=>{le&&A()&&p.setOpen(!0,st(Le.triggerHover,M,q))}):le&&A()&&p.setOpen(!0,st(Le.triggerHover,M,q)))}function O(M){if(T()){V();return}R();let H=p.select("domReferenceElement"),Y=Nr(H);y.restTimeout.clear(),y.restTimeoutPending=!1;let oe=g.current.floatingContext??f?.();if(pf(M.relatedTarget,p.context.triggerElements))return;if(k.current&&oe){p.select("open")||y.openChangeTimeout.clear();let Z=l.current;y.handler=k.current({...oe,tree:v,x:M.clientX,y:M.clientY,onClose(){V(),R(),E.current&&!T()&&Z===p.select("domReferenceElement")&&N(M,!0)}}),Y.addEventListener("mousemove",y.handler),y.handler(M);return}(y.pointerType!=="touch"||!Rt(p.select("floatingElement"),M.relatedTarget))&&N(M)}return a?Ua(pt(U,"mousemove",j,{once:!0}),pt(U,"mouseenter",j),pt(U,"mouseleave",O)):Ua(pt(U,"mouseenter",j),pt(U,"mouseleave",O))},[R,V,g,_,p,o,k,y,d,I,T,i,a,x,l,v,E,f,P,A]),kf.useMemo(()=>{if(!o)return;function N(U){y.pointerType=U.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(U){let{nativeEvent:j}=U,O=U.currentTarget,M=p.select("domReferenceElement"),H=p.select("open"),Y=I(M,O,U.target);if(i&&!eu(y.pointerType))return;if(H&&Y&&y.handleCloseOptions?.blockPointerEvents){let Z=p.select("floatingElement");if(Z){let q=y.handleCloseOptions?.getScope?.()??O.ownerDocument.body;jB(y,{scopeElement:q,referenceElement:O,floatingElement:Z})}}let oe=Q3(x.current);if(H&&!Y||oe===0||!Y&&y.restTimeoutPending&&U.movementX**2+U.movementY**2<2)return;y.restTimeout.clear();function K(){if(y.restTimeoutPending=!1,T())return;let Z=p.select("open");!y.blockMouseMove&&(!Z||Y)&&A()&&p.setOpen(!0,st(Le.triggerHover,j,O))}y.pointerType==="touch"?bX.flushSync(()=>{K()}):Y&&H?K():(y.restTimeoutPending=!0,y.restTimeout.start(oe,K))}}},[o,y,T,I,i,p,x,A])}var yX=.1,d2e=yX*yX,Dt=.5;function HB(e,t,o,r,n,i){return r>=t!=i>=t&&e<=(n-o)*(t-r)/(i-r)+o}function UB(e,t,o,r,n,i,s,a,l,u){let d=!1;return HB(e,t,o,r,n,i)&&(d=!d),HB(e,t,n,i,s,a)&&(d=!d),HB(e,t,s,a,l,u)&&(d=!d),HB(e,t,l,u,o,r)&&(d=!d),d}function f2e(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}function GB(e,t,o,r,n,i){let s=Math.min(o,n),a=Math.max(o,n),l=Math.min(r,i),u=Math.max(r,i);return e>=s&&e<=a&&t>=l&&t<=u}function B4(e={}){let{blockPointerEvents:t=!1}=e,o=new qi,r=({x:n,y:i,placement:s,elements:a,onClose:l,nodeId:u,tree:d})=>{let f=s?.split("-")[0],m=!1,h=null,p=null,g=typeof performance<"u"?performance.now():0;function b(y,S){let k=performance.now(),_=k-g;if(h===null||p===null||_===0)return h=y,p=S,g=k,!1;let x=y-h,E=S-p,B=x*x+E*E,P=_*_*d2e;return h=y,p=S,g=k,B<P}function v(){o.clear(),l()}return function(S){o.clear();let k=a.domReference,_=a.floating;if(!k||!_||f==null||n==null||i==null)return;let{clientX:x,clientY:E}=S,B=Dn(S),P=S.type==="mouseleave",T=Rt(_,B),A=Rt(k,B);if(T&&(m=!0,!P))return;if(A&&(m=!1,!P)){m=!0;return}if(P&&Be(S.relatedTarget)&&Rt(_,S.relatedTarget))return;function I(){return!!(d&&Jc(d.nodesRef.current,u).length>0)}function R(){I()||v()}if(I())return;let V=k.getBoundingClientRect(),N=_.getBoundingClientRect(),U=n>N.right-N.width/2,j=i>N.bottom-N.height/2,O=N.width>V.width,M=N.height>V.height,H=(O?V:N).left,Y=(O?V:N).right,oe=(M?V:N).top,K=(M?V:N).bottom;if(f==="top"&&i>=V.bottom-1||f==="bottom"&&i<=V.top+1||f==="left"&&n>=V.right-1||f==="right"&&n<=V.left+1){R();return}let Z=!1;switch(f){case"top":Z=GB(x,E,H,V.top+1,Y,N.bottom-1);break;case"bottom":Z=GB(x,E,H,N.top+1,Y,V.bottom-1);break;case"left":Z=GB(x,E,N.right-1,K,V.left+1,oe);break;case"right":Z=GB(x,E,V.right-1,K,N.left+1,oe);break;default:}if(Z)return;if(m&&!f2e(x,E,V)){R();return}if(!P&&b(x,E)){R();return}let q=!1;switch(f){case"top":{let $=O?Dt/2:Dt*4,Q=O||U?n+$:n-$,X=O?n-$:U?n+$:n-$,J=i+Dt+1,ie=U||O?N.bottom-Dt:N.top,se=U?O?N.bottom-Dt:N.top:N.bottom-Dt;q=UB(x,E,Q,J,X,J,N.left,ie,N.right,se);break}case"bottom":{let $=O?Dt/2:Dt*4,Q=O||U?n+$:n-$,X=O?n-$:U?n+$:n-$,J=i-Dt,ie=U||O?N.top+Dt:N.bottom,se=U?O?N.top+Dt:N.bottom:N.top+Dt;q=UB(x,E,Q,J,X,J,N.left,ie,N.right,se);break}case"left":{let $=M?Dt/2:Dt*4,Q=M||j?i+$:i-$,X=M?i-$:j?i+$:i-$,J=n+Dt+1,ie=j||M?N.right-Dt:N.left,se=j?M?N.right-Dt:N.left:N.right-Dt;q=UB(x,E,ie,N.top,se,N.bottom,J,Q,J,X);break}case"right":{let $=M?Dt/2:Dt*4,Q=M||j?i+$:i-$,X=M?i-$:j?i+$:i-$,J=n-Dt,ie=j||M?N.left+Dt:N.right,se=j?M?N.left+Dt:N.right:N.left+Dt;q=UB(x,E,J,Q,J,X,ie,N.top,se,N.bottom);break}default:}q?m||o.start(40,R):R()}};return r.__options={...e,blockPointerEvents:t},r}var P4=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fl.startingStyle]="startingStyle",e[e.endingStyle=Fl.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),sx=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),m2e={[sx.popupOpen]:""},nst={[sx.popupOpen]:"",[sx.pressed]:""},p2e={[P4.open]:""},h2e={[P4.closed]:""},g2e={[P4.anchorHidden]:""},vX={open(e){return e?m2e:null}};var Zb={open(e){return e?p2e:h2e},anchorHidden(e){return e?g2e:null}};function kX(e){return Ob(19)?e:e?"true":void 0}var Xi=c(pe(),1);var b2e=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:n,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0,offsetParent:f="real"}=za(e,t)||{};if(u==null)return{};let m=IB(d),h={x:o,y:r},p=ex(n),g=J_(p),b=await s.getDimensions(u),v=p==="y",y=v?"top":"left",S=v?"bottom":"right",k=v?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[p]-h[p]-i.floating[g],x=h[p]-i.reference[p],E=f==="real"?await s.getOffsetParent?.(u):a.floating,B=a.floating[k]||i.floating[g];(!B||!await s.isElement?.(E))&&(B=a.floating[k]||i.floating[g]);let P=_/2-x/2,T=B/2-b[g]/2-1,A=Math.min(m[y],T),I=Math.min(m[S],T),R=A,V=B-b[g]-I,N=B/2-b[g]/2+P,U=Q_(R,N,V),j=!l.arrow&&ja(n)!=null&&N!==U&&i.reference[g]/2-(N<R?A:I)-b[g]/2<0,O=j?N<R?N-R:N-V:0;return{[p]:h[p]+O,data:{[p]:U,centerOffset:N-U-O,...j&&{alignmentOffset:O}},reset:j}}}),SX=(e,t)=>({...b2e(e),options:[e,t]});var _X={name:"hide",async fn(e){let{width:t,height:o,x:r,y:n}=e.rects.reference,i=t===0&&o===0&&r===0&&n===0;return{data:{referenceHidden:(await m4().fn(e)).data?.referenceHidden||i}}}};var ax={sideX:"left",sideY:"top"},xX={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:n},platform:i,strategy:s,placement:a}=e,l=ao(n),u=l.getComputedStyle(n);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:o,data:ax};let f=await i.getOffsetParent?.(n),m={width:0,height:0};if(s==="fixed"&&l?.visualViewport)m={width:l.visualViewport.width,height:l.visualViewport.height};else if(f===l){let y=Nr(n);m={width:y.documentElement.clientWidth,height:y.documentElement.clientHeight}}else await i.isElement?.(f)&&(m=await i.getDimensions(f));let h=nn(a),p=t,g=o;h==="left"&&(p=m.width-(t+r.width)),h==="top"&&(g=m.height-(o+r.height));let b=h==="left"?"right":ax.sideX,v=h==="top"?"bottom":ax.sideY;return{x:p,y:g,data:{sideX:b,sideY:v}}}};function EX(e,t,o){let r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?o?"inline-start":"inline-end":"right",bottom:"bottom",left:r?o?"inline-end":"inline-start":"left"}[t]}function wX(e,t,o){let{rects:r,placement:n}=e;return{side:EX(t,nn(n),o),align:ja(n)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function TX(e){let{anchor:t,positionMethod:o="absolute",side:r="bottom",sideOffset:n=0,align:i="center",alignOffset:s=0,collisionBoundary:a,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:m,keepMounted:h=!1,floatingRootContext:p,mounted:g,collisionAvoidance:b,shiftCrossAxis:v=!1,nodeId:y,adaptiveOrigin:S,lazyFlip:k=!1,externalTree:_}=e,[x,E]=Xi.useState(null);!g&&x!==null&&E(null);let B=b.side||"flip",P=b.align||"flip",T=b.fallbackAxisSide||"end",A=typeof t=="function"?t:void 0,I=xe(A),R=A?I:t,V=bn(t),N=bn(g),j=Ib()==="rtl",O=x||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":j?"left":"right","inline-start":j?"right":"left"}[r],M=i==="center"?O:`${O}-${i}`,H=l,Y=1,oe=r==="bottom"?Y:0,K=r==="top"?Y:0,Z=r==="right"?Y:0,q=r==="left"?Y:0;typeof H=="number"?H={top:H+oe,right:H+q,bottom:H+K,left:H+Z}:H&&(H={top:(H.top||0)+oe,right:(H.right||0)+q,bottom:(H.bottom||0)+K,left:(H.left||0)+Z});let $={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:H},Q=Xi.useRef(null),X=bn(n),J=bn(s),ie=typeof n!="function"?n:0,se=typeof s!="function"?s:0,re=[];m&&re.push(m),re.push(l4(Ce=>{let ot=wX(Ce,r,j),He=typeof X.current=="function"?X.current(ot):X.current,gt=typeof J.current=="function"?J.current(ot):J.current;return{mainAxis:He,crossAxis:gt,alignmentAxis:gt}},[ie,se,j,r]));let le=P==="none"&&B!=="shift",ye=!le&&(u||v||B==="shift"),Re=B==="none"?null:d4({...$,padding:{top:H.top+Y,right:H.right+Y,bottom:H.bottom+Y,left:H.left+Y},mainAxis:!v&&B==="flip",crossAxis:P==="flip"?"alignment":!1,fallbackAxisSideDirection:T}),Ve=le?null:c4(Ce=>{let ot=Nr(Ce.elements.floating).documentElement;return{...$,rootBoundary:v?{x:0,y:0,width:ot.clientWidth,height:ot.clientHeight}:void 0,mainAxis:P!=="none",crossAxis:ye,limiter:u||v?void 0:u4(He=>{if(!Q.current)return{};let{width:gt,height:oo}=Q.current.getBoundingClientRect(),_t=fi(nn(He.placement)),Yr=_t==="y"?gt:oo,yr=_t==="y"?H.left+H.right:H.top+H.bottom;return{offset:Yr/2+yr/2}})}},[$,u,v,H,P]);B==="shift"||P==="shift"||i==="center"?re.push(Ve,Re):re.push(Re,Ve),re.push(f4({...$,apply({elements:{floating:Ce},availableWidth:ot,availableHeight:He,rects:gt}){if(!N.current)return;let oo=Ce.style;oo.setProperty("--available-width",`${ot}px`),oo.setProperty("--available-height",`${He}px`);let _t=ao(Ce).devicePixelRatio||1,{x:Yr,y:yr,width:Rr,height:Se}=gt.reference,go=(Math.round((Yr+Rr)*_t)-Math.round(Yr*_t))/_t,_s=(Math.round((yr+Se)*_t)-Math.round(yr*_t))/_t;oo.setProperty("--anchor-width",`${go}px`),oo.setProperty("--anchor-height",`${_s}px`)}}),SX(Ce=>({element:Q.current||Nr(Ce.elements.floating).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(Ce){let{elements:ot,middlewareData:He,placement:gt,rects:oo,y:_t}=Ce,Yr=nn(gt),yr=fi(Yr),Rr=Q.current,Se=He.arrow?.x||0,go=He.arrow?.y||0,_s=Rr?.clientWidth||0,up=Rr?.clientHeight||0,Oe=Se+_s/2,qo=go+up/2,vr=Math.abs(He.shift?.y||0),si=oo.reference.height/2,de=typeof n=="function"?n(wX(Ce,r,j)):n,Lt=vr>de,Ee={top:`${Oe}px calc(100% + ${de}px)`,bottom:`${Oe}px ${-de}px`,left:`calc(100% + ${de}px) ${qo}px`,right:`${-de}px ${qo}px`}[Yr],Mt=`${Oe}px ${oo.reference.y+si-_t}px`;return ot.floating.style.setProperty("--transform-origin",ye&&yr==="y"&&Lt?Mt:Ee),{}}},_X,S),we(()=>{!g&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,p]);let tt=Xi.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:Ye,elements:Ie,x:ut,y:Ne,middlewareData:Ft,update:qe,placement:eo,context:ce,isPositioned:fe,floatingStyles:et}=S4({rootContext:p,open:h?g:void 0,placement:M,middleware:re,strategy:o,whileElementsMounted:h?void 0:(...Ce)=>nx(...Ce,tt),nodeId:y,externalTree:_}),{sideX:De,sideY:At}=Ft.adaptiveOrigin||ax,ur=fe?o:"fixed",Fe=Xi.useMemo(()=>{let Ce=S?{position:ur,[De]:ut,[At]:Ne}:{position:ur,...et};return fe||(Ce.opacity=0),Ce},[S,ur,De,ut,At,Ne,et,fe]),Ge=Xi.useRef(null);we(()=>{if(!g)return;let Ce=V.current,ot=typeof Ce=="function"?Ce():Ce,gt=(CX(ot)?ot.current:ot)||null||null;gt!==Ge.current&&(Ye.setPositionReference(gt),Ge.current=gt)},[g,Ye,R,V]),Xi.useEffect(()=>{if(!g)return;let Ce=V.current;typeof Ce!="function"&&CX(Ce)&&Ce.current!==Ge.current&&(Ye.setPositionReference(Ce.current),Ge.current=Ce.current)},[g,Ye,R,V]),Xi.useEffect(()=>{if(h&&g&&Ie.domReference&&Ie.floating)return nx(Ie.domReference,Ie.floating,qe,tt)},[h,g,Ie,qe,tt]);let We=nn(eo),$e=EX(r,We,j),ht=ja(eo)||"center",to=!!Ft.hide?.referenceHidden;we(()=>{k&&g&&fe&&E(We)},[k,g,fe,We]);let Ao=Xi.useMemo(()=>({position:"absolute",top:Ft.arrow?.y,left:Ft.arrow?.x}),[Ft.arrow]),_e=Ft.arrow?.centerOffset!==0;return Xi.useMemo(()=>({positionerStyles:Fe,arrowStyles:Ao,arrowRef:Q,arrowUncentered:_e,side:$e,align:ht,physicalSide:We,anchorHidden:to,refs:Ye,context:ce,isPositioned:fe,update:qe}),[Fe,Ao,Q,_e,$e,ht,We,to,Ye,ce,fe,qe])}function CX(e){return e!=null&&"current"in e}function WB(e){return e==="starting"?nZ:No}function BX(e,t,{styles:o,transitionStatus:r,props:n,refs:i,hidden:s,inert:a=!1}){let l={...o};return a&&(l.pointerEvents="none"),fr("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:l},WB(r),n],stateAttributesMapping:Zb})}var Sf={};xs(Sf,{Panel:()=>LX,Root:()=>RX,Trigger:()=>OX});var lx=c(pe(),1);var $B={...Eq,...Mb};var PX=c(C(),1),RX=lx.forwardRef(function(t,o){let{render:r,className:n,defaultOpen:i=!1,disabled:s=!1,onOpenChange:a,open:l,style:u,...d}=t,f=xe(a),m=xq({open:l,defaultOpen:i,onOpenChange:f,disabled:s}),h=lx.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),p=lx.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),g=fr("div",t,{state:h,ref:o,props:d,stateAttributesMapping:$B});return(0,PX.jsx)(G3.Provider,{value:p,children:g})});var IX=c(pe(),1);var y2e={...Cq,...Mb},OX=IX.forwardRef(function(t,o){let{panelId:r,open:n,handleTrigger:i,state:s,disabled:a}=kB(),{className:l,disabled:u=a,id:d,render:f,nativeButton:m=!0,style:h,...p}=t,{getButtonProps:g,buttonRef:b}=K3({disabled:u,focusableWhenDisabled:!0,native:m});return fr("button",t,{state:s,ref:[o,b],props:[{"aria-controls":n?r:void 0,"aria-expanded":n,onClick:i},p,g],stateAttributesMapping:y2e})});var AX=c(pe(),1);var R4=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var LX=AX.forwardRef(function(t,o){let{className:r,hiddenUntilFound:n,keepMounted:i,render:s,id:a,style:l,...u}=t,{mounted:d,onOpenChange:f,open:m,panelId:h,setMounted:p,setPanelIdState:g,setOpen:b,state:v,transitionStatus:y}=kB(),S=n??!1,k=i??!1;we(()=>{if(a)return g(a),()=>{g(void 0)}},[a,g]);let{height:_,props:x,ref:E,shouldPreventOpenAnimation:B,shouldRender:P,transitionStatus:T,width:A}=Qq({externalRef:o,hiddenUntilFound:S,id:h,keepMounted:k,mounted:d,onOpenChange:f,open:m,setMounted:p,setOpen:b,transitionStatus:y}),I={...v,transitionStatus:T},R=dB(l,I),V=fr("div",{...t,style:void 0},{state:I,ref:E,props:[x,{style:{[R4.collapsiblePanelHeight]:_===void 0?"auto":`${_}px`,[R4.collapsiblePanelWidth]:A===void 0?"auto":`${A}px`}},u,R?{style:R}:void 0,B?{style:{animationName:"none"}}:void 0],stateAttributesMapping:$B});return P?V:null});var vn=c(pe(),1),zX=c(Zc(),1);var MX=c(pe(),1);function NX(e){let[t,o]=MX.useState({current:e,previous:null});return e!==t.current&&o({current:e,previous:t.current}),t.previous}var ih=c(pe(),1);function I4(e){let t=gn(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=mr(e),i=n?e.offsetWidth:o,s=n?e.offsetHeight:r;return(gf(o)!==i||gf(r)!==s)&&(o=i,r=s),{width:o,height:r}}var v2e=()=>!0;function VX(e){let{popupElement:t,positionerElement:o,content:r,mounted:n,enabled:i=v2e,onMeasureLayout:s,onMeasureLayoutComplete:a,side:l,direction:u}=e,d=bf(t,!0,!1),f=Lb(),m=ih.useRef(null),h=ih.useRef(null),p=ih.useRef(!0),g=ih.useRef(Qc),b=xe(s),v=xe(a),y=ih.useMemo(()=>{let S=l==="top",k=l==="left";return u==="rtl"?(S=S||l==="inline-end",k=k||l==="inline-end"):(S=S||l==="inline-start",k=k||l==="inline-start"),S?{position:"absolute",[l==="top"?"bottom":"top"]:"0",[k?"right":"left"]:"0"}:No},[l,u]);we(()=>{if(!n||!i()||typeof ResizeObserver!="function"){g.current=Qc,p.current=!0,m.current=null,h.current=null;return}if(!t||!o)return;g.current=DX(t,y);let S=new ResizeObserver(R=>{let V=R[0];V&&(h.current={width:Math.ceil(V.borderBoxSize[0].inlineSize),height:Math.ceil(V.borderBoxSize[0].blockSize)})});S.observe(t),KB(t,"auto");let k=YB(t,"position","static"),_=YB(t,"transform","none"),x=YB(t,"scale","1"),E=DX(o,{"--available-width":"max-content","--available-height":"max-content"});function B(){k(),_(),E()}function P(){B(),x()}if(b?.(),p.current||m.current===null){cx(o,"max-content");let R=I4(t);return m.current=R,cx(o,R),P(),v?.(null,R),p.current=!1,()=>{S.disconnect(),g.current(),g.current=Qc}}KB(t,"auto"),cx(o,"max-content");let T=m.current??h.current,A=I4(t);if(m.current=A,!T)return cx(o,A),P(),v?.(null,A),()=>{S.disconnect(),f.cancel(),g.current(),g.current=Qc};KB(t,T),P(),v?.(T,A),cx(o,A);let I=new AbortController;return f.request(()=>{KB(t,A),d(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},I.signal)}),()=>{S.disconnect(),I.abort(),f.cancel(),g.current(),g.current=Qc}},[r,t,o,d,f,i,n,b,v,y])}function YB(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}function DX(e,t){let o=[];for(let[r,n]of Object.entries(t))o.push(YB(e,r,n));return o.length?()=>{o.forEach(r=>r())}:Qc}function KB(e,t){let o=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty("--popup-width",o),e.style.setProperty("--popup-height",r)}function cx(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",o),e.style.setProperty("--positioner-height",r)}var Xb=c(C(),1);function jX(e){let{store:t,side:o,cssVars:r,children:n}=e,i=Ib(),s=t.useState("activeTriggerElement"),a=t.useState("activeTriggerId"),l=t.useState("open"),u=t.useState("payload"),d=t.useState("mounted"),f=t.useState("popupElement"),m=t.useState("positionerElement"),h=NX(l?s:null),p=_2e(a,u),g=vn.useRef(null),[b,v]=vn.useState(null),[y,S]=vn.useState(null),k=vn.useRef(null),_=vn.useRef(null),x=bf(k,!0,!1),E=Lb(),[B,P]=vn.useState(null),[T,A]=vn.useState(!1);we(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let I=xe(()=>{k.current?.style.setProperty("animation","none"),k.current?.style.setProperty("transition","none"),_.current?.style.setProperty("display","none")}),R=xe(O=>{k.current?.style.removeProperty("animation"),k.current?.style.removeProperty("transition"),_.current?.style.removeProperty("display"),O&&P(O)}),V=vn.useRef(null);we(()=>{if(s&&h&&s!==h&&V.current!==s&&g.current){v(g.current),A(!0);let O=S2e(h,s);S(O),E.request(()=>{zX.flushSync(()=>{A(!1)}),x(()=>{v(null),P(null),g.current=null})}),V.current=s}},[s,h,b,x,E]),we(()=>{let O=k.current;if(!O)return;let M=Nr(O).createElement("div");for(let H of Array.from(O.childNodes))M.appendChild(H.cloneNode(!0));g.current=M});let N=b!=null,U;N?U=(0,Xb.jsxs)(vn.Fragment,{children:[(0,Xb.jsx)("div",{"data-previous":!0,inert:kX(!0),ref:_,style:{...B?{[r.popupWidth]:`${B.width}px`,[r.popupHeight]:`${B.height}px`}:null,position:"absolute"},"data-ending-style":T?void 0:""},"previous"),(0,Xb.jsx)("div",{"data-current":!0,ref:k,"data-starting-style":T?"":void 0,children:n},p)]}):U=(0,Xb.jsx)("div",{"data-current":!0,ref:k,children:n},p),we(()=>{let O=_.current;!O||!b||O.replaceChildren(...Array.from(b.childNodes))},[b]),VX({popupElement:f,positionerElement:m,mounted:d,content:u,onMeasureLayout:I,onMeasureLayoutComplete:R,side:o,direction:i});let j={activationDirection:k2e(y),transitioning:N};return{children:U,state:j}}function k2e(e){if(e)return`${FX(e.horizontal,5,"right","left")} ${FX(e.vertical,5,"down","up")}`}function FX(e,t,o,r){return e>t?o:e<-t?r:""}function S2e(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),n={x:o.left+o.width/2,y:o.top+o.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-n.x,vertical:i.y-n.y}}function _2e(e,t){let[o,r]=vn.useState(0),n=vn.useRef(e),i=vn.useRef(t),s=vn.useRef(!1);return we(()=>{let a=n.current,l=i.current,u=e!==a,d=t!==l;u?(r(f=>f+1),s.current=!d):s.current&&d&&(r(f=>f+1),s.current=!1),n.current=e,i.current=t},[e,t]),`${e??"current"}-${o}`}var qB=c(pe(),1),HX=c(Zc(),1);var UX=c(C(),1),GX=qB.forwardRef(function(t,o){let{children:r,container:n,className:i,render:s,style:a,...l}=t,{portalNode:u,portalSubtree:d}=t4({container:n,ref:o,componentProps:t,elementProps:l});return!d&&!u?null:(0,UX.jsxs)(qB.Fragment,{children:[d,u&&HX.createPortal(r,u)]})});var gi={};xs(gi,{Arrow:()=>aQ,Handle:()=>ux,Popup:()=>iQ,Portal:()=>tQ,Positioner:()=>rQ,Provider:()=>lQ,Root:()=>KX,Trigger:()=>QX,Viewport:()=>dQ,createHandle:()=>fQ});var Hl=c(pe(),1);var ZB=c(pe(),1),O4=ZB.createContext(void 0);function zs(e){let t=ZB.useContext(O4);if(t===void 0&&!e)throw new Error(Mr(72));return t}var WX=c(pe(),1),$X=c(Zc(),1);var x2e={...hX,disabled:nt(e=>e.disabled),instantType:nt(e=>e.instantType),isInstantPhase:nt(e=>e.isInstantPhase),trackCursorAxis:nt(e=>e.trackCursorAxis),disableHoverablePopup:nt(e=>e.disableHoverablePopup),lastOpenChangeReason:nt(e=>e.openChangeReason),closeOnClick:nt(e=>e.closeOnClick),closeDelay:nt(e=>e.closeDelay),hasViewport:nt(e=>e.hasViewport)},Qb=class e extends $b{constructor(t,o,r=!1){let n=new vf,i={...w2e(),...t};i.floatingRootContext=mX(n,o,r),super(i,{popupRef:WX.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},x2e)}setOpen=(t,o)=>{let r=o.reason,n=r===Le.triggerHover,i=t&&r===Le.triggerFocus,s=!t&&(r===Le.triggerPress||r===Le.escapeKey);if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,o);let a=()=>{let l={open:t,openChangeReason:r};i?l.instantType="focus":s?l.instantType="dismiss":r===Le.triggerHover&&(l.instantType=void 0),iX(l,t,o.trigger),this.update(l)};n?$X.flushSync(a):a()};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,st(Le.triggerPress,t))}static useStore(t,o){return nX(t,(n,i)=>new e(o,n,i)).store}};function w2e(){return{...fX(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var XB=c(C(),1),KX=y4(function(t){let{disabled:o=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:i=!1,trackCursorAxis:s="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:u,handle:d,triggerId:f,defaultTriggerId:m=null,children:h}=t,p=Qb.useStore(d?.store,{open:r,openProp:n,activeTriggerId:m,triggerIdProp:f});eZ(()=>{n===void 0&&p.state.open===!1&&r===!0&&p.update({open:!0,activeTriggerId:m})}),p.useControlledProp("openProp",n),p.useControlledProp("triggerIdProp",f),p.useContextCallback("onOpenChange",l),p.useContextCallback("onOpenChangeComplete",u);let g=p.useState("open"),b=!o&&g,v=p.useState("activeTriggerId"),y=p.useState("mounted"),S=p.useState("payload");p.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:i}),p.useSyncedValue("disabled",o),aX(p);let{forceUnmount:k,transitionStatus:_}=lX(b,p),x=p.useState("isInstantPhase"),E=p.useState("instantType"),B=p.useState("lastOpenChangeReason"),P=Hl.useRef(null);we(()=>{g&&o&&p.setOpen(!1,st(Le.disabled))},[g,o,p]),we(()=>{_==="ending"&&B===Le.none||_!=="ending"&&x?(E!=="delay"&&(P.current=E),p.set("instantType","delay")):P.current!==null&&(p.set("instantType",P.current),P.current=null)},[_,x,B,E,p]),we(()=>{b&&v==null&&p.set("payload",void 0)},[p,v,b]);let T=Hl.useCallback(()=>{p.setOpen(!1,st(Le.imperativeAction))},[p]);Hl.useImperativeHandle(a,()=>({unmount:k,close:T}),[k,T]);let A=b||y||!o&&s!=="none";return(0,XB.jsxs)(O4.Provider,{value:p,children:[A&&(0,XB.jsx)(C2e,{store:p,disabled:o,trackCursorAxis:s}),typeof h=="function"?h({payload:S}):h]})});function C2e({store:e,disabled:t,trackCursorAxis:o}){let r=e.useState("floatingRootContext"),n=r4(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),i=o4(r,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),s=Hl.useMemo(()=>so(i.reference,n.reference),[i.reference,n.reference]),a=Hl.useMemo(()=>so(i.trigger,n.trigger),[i.trigger,n.trigger]),l=Hl.useMemo(()=>so(rX,i.floating,n.floating),[i.floating,n.floating]);return cX(e,{activeTriggerProps:s,inactiveTriggerProps:a,popupProps:l}),null}var JB=c(pe(),1);var QB=c(pe(),1),A4=QB.createContext(void 0);function YX(){return QB.useContext(A4)}var qX=(function(e){return e[e.popupOpen=sx.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var XX="data-base-ui-tooltip-trigger";function ZX(e){if("composedPath"in e){let o=e.composedPath();for(let r=0;r<o.length;r+=1){let n=o[r];if(Be(n))return n}}let t=e.target;return Be(t)?t:null}function E2e(e){let t=e;for(;t;){if(t.hasAttribute(XX))return t;let o=t.parentElement;if(o){t=o;continue}let r=t.getRootNode();t="host"in r&&Be(r.host)?r.host:null}return null}var QX=QZ(function(t,o){let{render:r,className:n,style:i,handle:s,payload:a,disabled:l,delay:u,closeOnClick:d=!0,closeDelay:f,id:m,...h}=t,p=zs(!0),g=s?.store??p;if(!g)throw new Error(Mr(82));let b=pB(m),v=g.useState("isTriggerActive",b),y=g.useState("isOpenedByTrigger",b),S=g.useState("floatingRootContext"),k=JB.useRef(null),_=u??600,x=f??0,{registerTrigger:E,isMountedByThisTrigger:B}=sX(b,k,g,{payload:a,closeOnClick:d,closeDelay:x}),P=YX(),{delayRef:T,isInstantPhase:A,hasProvider:I}=e4(S,{open:y}),R=qb(S);g.useSyncedValue("isInstantPhase",A);let V=g.useState("disabled"),N=l??V,U=bn(N),j=g.useState("trackCursorAxis"),O=g.useState("disableHoverablePopup"),M=JB.useRef(!1),H=Ha(),Y=JB.useRef(void 0);function oe(){let re=P?.delay,le=typeof T.current=="object"?T.current.open:void 0,ye=_;return I&&(le!==0?ye=u??re??_:ye=0),ye}function K(re){let le=k.current;if(!le||!re)return!1;let ye=E2e(re);return ye!==null&&ye!==le&&Rt(le,ye)}function Z(re){let le=K(re);return M.current=le,le&&(R.openChangeTimeout.clear(),R.restTimeout.clear(),R.restTimeoutPending=!1,H.clear()),le}let q=T4(S,{enabled:!N,mouseOnly:!0,move:!1,handleClose:!O&&j!=="both"?B4():null,restMs:oe,delay(){let re=typeof T.current=="object"?T.current.close:void 0,le=x;return f==null&&I&&(le=re),{close:le}},triggerElementRef:k,isActiveTrigger:v,isClosing:()=>g.select("transitionStatus")==="ending",shouldOpen(){return!M.current}}),$=x4(S,{enabled:!N}).reference,Q=re=>{let le=M.current,ye=ZX(re),Re=Z(ye),Ve=k.current,tt=Ve&&ye&&Rt(Ve,ye);if(Re&&g.select("open")&&g.select("lastOpenChangeReason")===Le.triggerHover){g.setOpen(!1,st(Le.triggerHover,re));return}if(le&&!Re&&tt&&!U.current&&!g.select("open")&&Ve&&eu(Y.current)){let Ye=()=>{!M.current&&!U.current&&!g.select("open")&&g.setOpen(!0,st(Le.triggerHover,re,Ve))},Ie=oe();Ie===0?(H.clear(),Ye()):H.start(Ie,Ye)}},X=g.useState("triggerProps",B);return fr("button",t,{state:{open:y},ref:[o,E,k],props:[q,$,B||j!=="none"?X:void 0,{onMouseOver(re){Q(re.nativeEvent)},onFocus(re){K(ZX(re.nativeEvent))&&re.preventBaseUIHandler()},onMouseLeave(){M.current=!1,H.clear(),Y.current=void 0},onPointerEnter(re){Y.current=re.pointerType},onPointerDown(re){Y.current=re.pointerType,g.set("closeOnClick",d),d&&!g.select("open")&&g.cancelPendingOpen(re.nativeEvent)},onClick(re){d&&!g.select("open")&&g.cancelPendingOpen(re.nativeEvent)},id:b,[qX.triggerDisabled]:N?"":void 0,[XX]:N?void 0:""},h],stateAttributesMapping:vX})});var eQ=c(pe(),1);var eP=c(pe(),1),L4=eP.createContext(void 0);function JX(){let e=eP.useContext(L4);if(e===void 0)throw new Error(Mr(70));return e}var M4=c(C(),1),tQ=eQ.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t;return zs().useState("mounted")||r?(0,M4.jsx)(L4.Provider,{value:r,children:(0,M4.jsx)(GX,{ref:o,...n})}):null});var oP=c(pe(),1);var tP=c(pe(),1),N4=tP.createContext(void 0);function Jb(){let e=tP.useContext(N4);if(e===void 0)throw new Error(Mr(71));return e}var oQ=c(C(),1),rQ=oP.forwardRef(function(t,o){let{render:r,className:n,anchor:i,positionMethod:s="absolute",side:a="top",align:l="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:p=!1,disableAnchorTracking:g=!1,collisionAvoidance:b=iZ,style:v,...y}=t,S=zs(),k=JX(),_=S.useState("open"),x=S.useState("mounted"),E=S.useState("trackCursorAxis"),B=S.useState("disableHoverablePopup"),P=S.useState("floatingRootContext"),T=S.useState("instantType"),A=S.useState("transitionStatus"),I=S.useState("hasViewport"),R=TX({anchor:i,positionMethod:s,floatingRootContext:P,mounted:x,side:a,sideOffset:u,align:l,alignOffset:d,collisionBoundary:f,collisionPadding:m,sticky:p,arrowPadding:h,disableAnchorTracking:g,keepMounted:k,collisionAvoidance:b,adaptiveOrigin:I?xX:void 0}),V=oP.useMemo(()=>({open:_,side:R.side,align:R.align,anchorHidden:R.anchorHidden,instant:E!=="none"?"tracking-cursor":T}),[_,R.side,R.align,R.anchorHidden,E,T]),N=BX(t,V,{styles:R.positionerStyles,transitionStatus:A,props:y,refs:[o,S.useStateSetter("positionerElement")],hidden:!x,inert:!_||E==="both"||B});return(0,oQ.jsx)(N4.Provider,{value:R,children:N})});var nQ=c(pe(),1);var T2e={...Zb,...Mb},iQ=nQ.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,a=zs(),{side:l,align:u}=Jb(),d=a.useState("open"),f=a.useState("instantType"),m=a.useState("transitionStatus"),h=a.useState("popupProps"),p=a.useState("floatingRootContext"),g=a.useState("disabled"),b=a.useState("closeDelay");zb({open:d,ref:a.context.popupRef,onComplete(){d&&a.context.onOpenChangeComplete?.(!0)}}),E4(p,{enabled:!g,closeDelay:b});let v=a.useStateSetter("popupElement");return fr("div",t,{state:{open:d,side:l,align:u,instant:f,transitionStatus:m},ref:[o,a.context.popupRef,v],props:[h,WB(m),s],stateAttributesMapping:T2e})});var sQ=c(pe(),1);var aQ=sQ.forwardRef(function(t,o){let{render:r,className:n,style:i,...s}=t,a=zs(),{arrowRef:l,side:u,align:d,arrowUncentered:f,arrowStyles:m}=Jb(),h=a.useState("open"),p=a.useState("instantType");return fr("div",t,{state:{open:h,side:u,align:d,uncentered:f,instant:p},ref:[o,l],props:[{style:m,"aria-hidden":!0},s],stateAttributesMapping:Zb})});var D4=c(pe(),1);var V4=c(C(),1),lQ=function(t){let{delay:o,closeDelay:r,timeout:n=400}=t,i=D4.useMemo(()=>({delay:o,closeDelay:r}),[o,r]),s=D4.useMemo(()=>({open:o,close:r}),[o,r]);return(0,V4.jsx)(A4.Provider,{value:i,children:(0,V4.jsx)(J3,{delay:s,timeoutMs:n,children:t.children})})};var uQ=c(pe(),1);var cQ=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var B2e={activationDirection:e=>e?{"data-activation-direction":e}:null},dQ=uQ.forwardRef(function(t,o){let{render:r,className:n,style:i,children:s,...a}=t,l=zs(),u=Jb(),d=l.useState("instantType"),{children:f,state:m}=jX({store:l,side:u.side,cssVars:cQ,children:s}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:d};return fr("div",t,{state:h,ref:o,props:[a,{children:f}],stateAttributesMapping:B2e})});var ux=class{constructor(){this.store=new Qb}open(t){let o=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!o)throw new Error(Mr(81,t));this.store.setOpen(!0,st(Le.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,st(Le.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function fQ(){return new ux}function kn(e){return fr(e.defaultTagName??"div",e,e)}var hQ=c(L(),1),F4="data-wp-hash";function z4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&R2e(document)),e.__wpStyleRuntime}function P2e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${F4}]`))if(o.getAttribute(F4)===t)return!0;return!1}function gQ(e,t,o){if(!e.head)return;let r=z4(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(P2e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(F4,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function R2e(e){let t=z4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)gQ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function bQ(e,t){let o=z4();o.styles.set(e,t);for(let r of o.documents.keys())gQ(r,e,t)}typeof process>"u",bQ("0c5702ddca",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var mQ={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",bQ("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var pQ={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},tu=(0,hQ.forwardRef)(function({variant:t="body-md",render:o,className:r,...n},i){return kn({render:o,defaultTagName:"span",ref:i,props:so(n,{className:G(mQ.text,pQ.heading,pQ.p,mQ[t],r)})})});var SQ=c(C(),1),j4="data-wp-hash";function H4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&O2e(document)),e.__wpStyleRuntime}function I2e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${j4}]`))if(o.getAttribute(j4)===t)return!0;return!1}function kQ(e,t,o){if(!e.head)return;let r=H4(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(I2e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(j4,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function O2e(e){let t=H4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)kQ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function A2e(e,t){let o=H4();o.styles.set(e,t);for(let r of o.documents.keys())kQ(r,e,t)}typeof process>"u",A2e("9db2873e7f","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-background-surface-error,#f6e6e3);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fde6be);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#fee995);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#c6f7cd);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#deebfa);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}}");var yQ={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"},U4=(0,vQ.forwardRef)(function({intent:t="none",className:o,...r},n){return(0,SQ.jsx)(tu,{ref:n,className:G(yQ.badge,yQ[`is-${t}-intent`],o),...r,variant:"body-sm"})});var _Q=c(L(),1),xQ=c(ne(),1),wQ=c(C(),1),G4=(0,_Q.forwardRef)(function({icon:t,size:o=24,...r},n){return(0,wQ.jsx)(xQ.SVG,{ref:n,...t.props,...r,width:o,height:o})});var Ul={};xs(Ul,{Content:()=>iP,FullBleed:()=>LQ,Header:()=>nP,Root:()=>rP,Title:()=>NQ});var CQ=c(L(),1),W4="data-wp-hash";function $4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&M2e(document)),e.__wpStyleRuntime}function L2e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${W4}]`))if(o.getAttribute(W4)===t)return!0;return!1}function EQ(e,t,o){if(!e.head)return;let r=$4(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(L2e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(W4,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function M2e(e){let t=$4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)EQ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function TQ(e,t){let o=$4();o.styles.set(e,t);for(let r of o.documents.keys())EQ(r,e,t)}typeof process>"u",TQ("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var N2e={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",TQ("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var D2e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},rP=(0,CQ.forwardRef)(function({render:t,...o},r){let n=G(D2e.root,N2e["box-sizing"]);return kn({defaultTagName:"div",render:t,ref:r,props:so({className:n},o)})});var BQ=c(L(),1),K4="data-wp-hash";function Y4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&F2e(document)),e.__wpStyleRuntime}function V2e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${K4}]`))if(o.getAttribute(K4)===t)return!0;return!1}function PQ(e,t,o){if(!e.head)return;let r=Y4(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(V2e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(K4,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function F2e(e){let t=Y4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)PQ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function z2e(e,t){let o=Y4();o.styles.set(e,t);for(let r of o.documents.keys())PQ(r,e,t)}typeof process>"u",z2e("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var j2e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},nP=(0,BQ.forwardRef)(function({render:t,...o},r){return kn({defaultTagName:"div",render:t,ref:r,props:so({className:j2e.header},o)})});var RQ=c(L(),1),q4="data-wp-hash";function Z4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&U2e(document)),e.__wpStyleRuntime}function H2e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${q4}]`))if(o.getAttribute(q4)===t)return!0;return!1}function IQ(e,t,o){if(!e.head)return;let r=Z4(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(H2e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(q4,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function U2e(e){let t=Z4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)IQ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function G2e(e,t){let o=Z4();o.styles.set(e,t);for(let r of o.documents.keys())IQ(r,e,t)}typeof process>"u",G2e("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var W2e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},iP=(0,RQ.forwardRef)(function({render:t,...o},r){return kn({defaultTagName:"div",render:t,ref:r,props:so({className:W2e.content},o)})});var OQ=c(L(),1),X4="data-wp-hash";function Q4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&K2e(document)),e.__wpStyleRuntime}function $2e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${X4}]`))if(o.getAttribute(X4)===t)return!0;return!1}function AQ(e,t,o){if(!e.head)return;let r=Q4(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if($2e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(X4,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function K2e(e){let t=Q4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)AQ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Y2e(e,t){let o=Q4();o.styles.set(e,t);for(let r of o.documents.keys())AQ(r,e,t)}typeof process>"u",Y2e("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var q2e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},LQ=(0,OQ.forwardRef)(function({render:t,...o},r){return kn({defaultTagName:"div",render:t,ref:r,props:so({className:q2e.fullbleed},o)})});var MQ=c(L(),1);var J4=c(C(),1),Z2e=(0,J4.jsx)("div",{}),NQ=(0,MQ.forwardRef)(function({render:t=Z2e,children:o,...r},n){return(0,J4.jsx)(tu,{ref:n,variant:"heading-lg",render:t,...r,children:o})});var DQ=c(L(),1),VQ=c(C(),1),ez=(0,DQ.forwardRef)(function(t,o){return(0,VQ.jsx)(Sf.Panel,{ref:o,...t})});var FQ=c(L(),1),zQ=c(C(),1),tz=(0,FQ.forwardRef)(function(t,o){return(0,zQ.jsx)(Sf.Root,{ref:o,...t})});var jQ=c(L(),1),HQ=c(C(),1),oz=(0,jQ.forwardRef)(function(t,o){return(0,HQ.jsx)(Sf.Trigger,{ref:o,...t})});var sh={};xs(sh,{Content:()=>JQ,Header:()=>YQ,HeaderDescription:()=>ZQ,Root:()=>GQ});var UQ=c(L(),1);var nz=c(C(),1),GQ=(0,UQ.forwardRef)(function({render:t,...o},r){return(0,nz.jsx)(tz,{ref:r,render:(0,nz.jsx)(rP,{render:t}),...o})});var ty=c(L(),1);var WQ=c(L(),1),sP=(0,WQ.createContext)({setDescriptionId:()=>{}});var ou=c(C(),1),iz="data-wp-hash";function sz(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Q2e(document)),e.__wpStyleRuntime}function X2e(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${iz}]`))if(o.getAttribute(iz)===t)return!0;return!1}function KQ(e,t,o){if(!e.head)return;let r=sz(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(X2e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(iz,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function Q2e(e){let t=sz();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)KQ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function az(e,t){let o=sz();o.styles.set(e,t);for(let r of o.documents.keys())KQ(r,e,t)}typeof process>"u",az("ee46794e90","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");var ey={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"};typeof process>"u",az("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var $Q={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",az("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var J2e={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"},YQ=(0,ty.forwardRef)(function({children:t,className:o,render:r,...n},i){let[s,a]=(0,ty.useState)(),l=(0,ty.useMemo)(()=>({setDescriptionId:a}),[a]);return kn({defaultTagName:"div",render:r,ref:i,props:so(n,{className:G($Q.heading,ey["heading-wrapper"],o),children:(0,ou.jsx)(sP.Provider,{value:l,children:(0,ou.jsxs)(oz,{className:ey.header,render:(0,ou.jsx)(nP,{}),nativeButton:!1,"aria-describedby":s,children:[(0,ou.jsx)("div",{className:ey["header-content"],children:t}),(0,ou.jsx)("div",{className:G(ey["header-trigger-positioner"]),children:(0,ou.jsx)("div",{className:G(ey["header-trigger-wrapper"],$Q.div,J2e["outset-ring--focus-parent-visible"]),children:(0,ou.jsx)(G4,{icon:Zr,className:ey["header-trigger"]})})})]})})})})});var _f=c(L(),1);var qQ=c(C(),1),ZQ=(0,_f.forwardRef)(function({children:t,className:o,...r},n){let i=(0,_f.useId)(),{setDescriptionId:s}=(0,_f.useContext)(sP);return(0,_f.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,qQ.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:o,...r,children:t})});var XQ=c(L(),1);var uz=c(C(),1),cz="data-wp-hash";function dz(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&tAe(document)),e.__wpStyleRuntime}function eAe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${cz}]`))if(o.getAttribute(cz)===t)return!0;return!1}function QQ(e,t,o){if(!e.head)return;let r=dz(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(eAe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(cz,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function tAe(e){let t=dz();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)QQ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function oAe(e,t){let o=dz();o.styles.set(e,t);for(let r of o.documents.keys())QQ(r,e,t)}typeof process>"u",oAe("ee46794e90","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");var lz={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"},JQ=(0,XQ.forwardRef)(function({className:t,render:o,children:r,hiddenUntilFound:n=!0,...i},s){return(0,uz.jsx)(ez,{ref:s,className:a=>G(lz.content,a.open&&a.transitionStatus==="idle"&&lz.overflowVisible,t),hiddenUntilFound:n,...i,children:(0,uz.jsx)(iP,{className:lz["content-inner"],render:o,children:r})})});var eJ=c(L(),1);function fz(e,t,o){return(0,eJ.cloneElement)(e??t,{children:o})}var rAe=c(oJ(),1);var rJ=c(cC(),1),{lock:Tut,unlock:nJ}=(0,rJ.__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/ui");function nAe(){let e=rAe;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return nJ(e.privateApis).ThemeProvider}var iJ=nAe();var sJ=c(L(),1),mz="data-wp-hash";function pz(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&sAe(document)),e.__wpStyleRuntime}function iAe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${mz}]`))if(o.getAttribute(mz)===t)return!0;return!1}function aJ(e,t,o){if(!e.head)return;let r=pz(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(iAe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(mz,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function sAe(e){let t=pz();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)aJ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function aAe(e,t){let o=pz();o.styles.set(e,t);for(let r of o.documents.keys())aJ(r,e,t)}typeof process>"u",aAe("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var lAe={stack:"_19ce0419607e1896__stack"},cAe={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Me=(0,sJ.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},l){let u={gap:o&&cAe[o],alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return kn({render:s,ref:l,props:so(a,{style:u,className:lAe.stack})})});var lt={};xs(lt,{Popup:()=>kJ,Portal:()=>aP,Positioner:()=>lP,Provider:()=>TJ,Root:()=>CJ,Trigger:()=>xJ});var yJ=c(L(),1);var fJ=c(L(),1);var hz="data-wp-hash";function gz(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&dAe(document)),e.__wpStyleRuntime}function uAe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${hz}]`))if(o.getAttribute(hz)===t)return!0;return!1}function cJ(e,t,o){if(!e.head)return;let r=gz(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(uAe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(hz,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function dAe(e){let t=gz();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)cJ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function fAe(e,t){let o=gz();o.styles.set(e,t);for(let r of o.documents.keys())cJ(r,e,t)}typeof process>"u",fAe("be37f31c1e","._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");var lJ={slot:"_11fc52b637ff8a7e__slot"},uJ="data-wp-compat-overlay-slot";function mAe(){return typeof document>"u"?null:document}function pAe(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var ru=null;function hAe(e){let t=e.createElement("div");return t.setAttribute(uJ,""),lJ.slot&&t.classList.add(lJ.slot),e.body.appendChild(t),t}function dJ(){if(typeof window>"u"||!pAe()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=mAe();if(!e||!e.body)return;if(ru&&ru.ownerDocument===e&&ru.isConnected)return ru;let t=e.querySelector(`[${uJ}]`);return t instanceof HTMLDivElement?(ru=t,t):(ru?.isConnected&&ru.remove(),ru=hAe(e),ru)}var mJ=c(C(),1),aP=(0,fJ.forwardRef)(function({container:t,...o},r){return(0,mJ.jsx)(gi.Portal,{container:t??dJ(),...o,ref:r})});var pJ=c(L(),1),bJ=c(C(),1),bz="data-wp-hash";function yz(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&bAe(document)),e.__wpStyleRuntime}function gAe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${bz}]`))if(o.getAttribute(bz)===t)return!0;return!1}function hJ(e,t,o){if(!e.head)return;let r=yz(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(gAe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(bz,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function bAe(e){let t=yz();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)hJ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function gJ(e,t){let o=yz();o.styles.set(e,t);for(let r of o.documents.keys())hJ(r,e,t)}typeof process>"u",gJ("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var yAe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",gJ("789467362f",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-sm,0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var vAe={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},lP=(0,pJ.forwardRef)(function({align:t="center",className:o,side:r="top",sideOffset:n=4,...i},s){return(0,bJ.jsx)(gi.Positioner,{ref:s,align:t,side:r,sideOffset:n,...i,className:G(yAe["box-sizing"],vAe.positioner,o)})});var dx=c(C(),1),vz="data-wp-hash";function kz(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&SAe(document)),e.__wpStyleRuntime}function kAe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${vz}]`))if(o.getAttribute(vz)===t)return!0;return!1}function vJ(e,t,o){if(!e.head)return;let r=kz(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(kAe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(vz,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function SAe(e){let t=kz();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)vJ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function _Ae(e,t){let o=kz();o.styles.set(e,t);for(let r of o.documents.keys())vJ(r,e,t)}typeof process>"u",_Ae("789467362f",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-sm,0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var xAe={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},wAe={background:"#1e1e1e"},kJ=(0,yJ.forwardRef)(function({portal:t,positioner:o,children:r,className:n,...i},s){let a=(0,dx.jsx)(iJ,{color:wAe,children:(0,dx.jsx)(gi.Popup,{ref:s,className:G(xAe.popup,n),...i,children:r})}),l=fz(o,(0,dx.jsx)(lP,{}),a);return fz(t,(0,dx.jsx)(aP,{}),l)});var SJ=c(L(),1),_J=c(C(),1),xJ=(0,SJ.forwardRef)(function(t,o){return(0,_J.jsx)(gi.Trigger,{ref:o,...t})});var wJ=c(C(),1);function CJ(e){return(0,wJ.jsx)(gi.Root,{...e})}var EJ=c(C(),1);function TJ({...e}){return(0,EJ.jsx)(gi.Provider,{...e})}var BJ=c(L(),1),Sz="data-wp-hash";function _z(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&EAe(document)),e.__wpStyleRuntime}function CAe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Sz}]`))if(o.getAttribute(Sz)===t)return!0;return!1}function PJ(e,t,o){if(!e.head)return;let r=_z(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(CAe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(Sz,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function EAe(e){let t=_z();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)PJ(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function TAe(e,t){let o=_z();o.styles.set(e,t);for(let r of o.documents.keys())PJ(r,e,t)}typeof process>"u",TAe("fa606a57ae","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}}");var BAe={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},ct=(0,BJ.forwardRef)(function({render:t,...o},r){return kn({render:t,ref:r,props:so({className:BAe["visually-hidden"]},o,{"data-visually-hidden":""})})});var Df=c(z(),1),Fx=c(te(),1),hne=c(W(),1);var oy=c(z(),1),ry=c(L(),1),IJ=c(D(),1),fx=c(C(),1),RJ=[(0,ry.createInterpolateElement)((0,oy.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,fx.jsx)("kbd",{})}),(0,ry.createInterpolateElement)((0,oy.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,fx.jsx)("kbd",{})}),(0,ry.createInterpolateElement)((0,oy.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,fx.jsx)("kbd",{})}),(0,oy.__)("Drag files into the editor to automatically insert media blocks."),(0,oy.__)("Change a block's type by pressing the block icon on the toolbar.")];function PAe(){let[e]=(0,ry.useState)(()=>Math.floor(Math.random()*RJ.length));return(0,fx.jsx)(IJ.Tip,{children:RJ[e]})}var OJ=PAe;var xy=c(ee(),1),Xoe=c(L(),1),Qoe=c(z(),1);var ah=c(D(),1);var cP=c(W(),1),AJ=c(Xe(),1),xf=c(z(),1);var LJ=c(ee(),1);var sn=c(C(),1),{Badge:RAe}=F(ah.privateApis);function IAe({children:e,onClick:t}){return t?(0,sn.jsx)(ah.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function OAe({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:l,children:u,clientId:d,controls:f}){r&&((0,AJ.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:o}=r);let{parentBlockClientId:m,parentBlockName:h}=(0,cP.useSelect)(b=>{if(a||l||!s)return{};let{getBlockParents:v,getBlockName:y,shouldRenderBlockListView:S}=F(b(w)),_=v(d,!1).find(x=>S(x));return{parentBlockClientId:_,parentBlockName:_?y(_):null}},[d,s,l,a]),{selectBlock:p}=(0,cP.useDispatch)(w),g=a?"div":"h2";return(0,sn.jsx)("div",{className:G("block-editor-block-card",{"is-parent":a,"is-child":l},n),children:(0,sn.jsxs)(Me,{direction:"column",gap:"sm",children:[(0,sn.jsxs)(Me,{direction:"row",align:"center",justify:"space-between",children:[(0,sn.jsxs)(Me,{direction:"row",align:"center",justify:"flex-start",children:[m&&(0,sn.jsx)(ah.Button,{onClick:()=>p(m),label:h?(0,xf.sprintf)((0,xf.__)('Go to "%s" block'),(0,LJ.getBlockType)(h)?.title):(0,xf.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,xf.isRTL)()?Sr:In,size:"small"}),l&&(0,sn.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,sn.jsx)(ah.Icon,{icon:(0,xf.isRTL)()?gS:bS})}),(0,sn.jsxs)(IAe,{onClick:a?()=>{p(a)}:void 0,children:[(0,sn.jsx)(rt,{icon:t,showColors:!0}),(0,sn.jsxs)(Me,{direction:"column",gap:"xs",children:[(0,sn.jsxs)(g,{className:"block-editor-block-card__title",children:[(0,sn.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!l&&!!i?.length&&(0,sn.jsx)(RAe,{children:e})]}),u]})]})]}),f]}),!a&&!l&&o&&(0,sn.jsx)(tu,{className:"block-editor-block-card__description",children:o})]})})}var mx=OAe;var ZP=c(te(),1),f6=c(W(),1),fh=c(L(),1),d6=c(Xe(),1);var tee=c(W(),1),wf=c(L(),1),oee=c(D(),1),Ga=c(NJ(),1);var DJ=c(L(),1),ny=c(W(),1),VJ=c(te(),1);var uP=c(C(),1);function AAe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,ny.createRegistry)({},t),r.registerStore(Eo,rb),e.set(t,r)),r}var LAe=(0,VJ.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,ny.useRegistry)(),[i]=(0,DJ.useState)(()=>new WeakMap),s=AAe(i,n,o);return s===n?(0,uP.jsx)(e,{registry:n,...r}):(0,uP.jsx)(ny.RegistryProvider,{value:s,children:(0,uP.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),FJ=LAe;var zn=c(L(),1),UJ=c(W(),1),GJ=c(ee(),1);var zJ=c(L(),1),MAe=()=>{},dP=(0,zJ.createContext)({getSelection:()=>{},onChangeSelection:MAe});var jJ=()=>{};function WJ(e,t){let o=(0,GJ.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=>WJ(r,t))),o}function $J(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:$J(o.innerBlocks,t)}})}function HJ(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 fP({clientId:e=null,value:t,onChange:o=jJ,onInput:r=jJ}){let n=(0,UJ.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,zn.useContext)(dP),{resetBlocks:a,resetSelection:l,replaceInnerBlocks:u,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(w),{getBlockName:m,getBlocks:h,getSelectionStart:p,getSelectionEnd:g}=n.select(w),b=(0,zn.useRef)({incoming:null,outgoing:[]}),v=(0,zn.useRef)(!1),y=(0,zn.useRef)({externalToInternal:new Map,internalToExternal:new Map}),S=(0,zn.useRef)(null),k=(0,zn.useRef)(!1),_=()=>{let T=i();if(!T?.selectionStart?.clientId||T===S.current)return;let A=T.selectionStart.clientId;if(e?y.current.externalToInternal.has(A):!!m(A)){S.current=T;let R=V=>!V?.clientId||!e?V:{...V,clientId:y.current.externalToInternal.get(V.clientId)??V.clientId};k.current=!0,l(R(T.selectionStart),R(T.selectionEnd),T.initialPosition),k.current=!1}},x=()=>{t&&(e?n.batch(()=>{y.current.externalToInternal.clear(),y.current.internalToExternal.clear();let T=t.map(A=>WJ(A,y.current));f(),d(e,!0),v.current&&(b.current.incoming=T),f(),u(e,T),S.current=null}):(v.current&&(b.current.incoming=t),f(),a(t)))},E=()=>{e?(f(),d(e,!1),f(),u(e,[])):(f(),a([]))},B=(0,zn.useRef)(r),P=(0,zn.useRef)(o);(0,zn.useEffect)(()=>{B.current=r,P.current=o},[r,o]),(0,zn.useEffect)(()=>{let T=b.current.outgoing.includes(t),A=h(e)===t;T?b.current.outgoing[b.current.outgoing.length-1]===t&&(b.current.outgoing=[]):A||(b.current.outgoing=[],x(),_())},[t,e]),(0,zn.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:T,isLastBlockChangePersistent:A,__unstableGetLastBlockChangeHistoryMode:I,__unstableIsLastBlockChangeIgnored:R,areInnerBlocksControlled:V,getBlockParents:N}=n.select(w),U=h(e),j=A(),O=I(),M=!1,H=p(),Y=g();v.current=!0;let oe=n.subscribe(()=>{if(e!==null&&m(e)===null)return;let K=A(),Z=I(),q=h(e),$=q!==U;if(U=q,$&&(b.current.incoming||R())){b.current.incoming=null,j=K,O=Z;return}let X=$||M&&!$&&K&&!j,J=p(),ie=g(),se=J!==H||ie!==Y;se&&(H=J,Y=ie),(X||se)&&n.batch(()=>{if(X){j=K,O=Z;let re=e?$J(U,y.current):U,le={selectionStart:J,selectionEnd:ie,initialPosition:T()},ye=e?HJ(le,y.current):le;b.current.outgoing.push(re);let Re=j?P.current:B.current,Ve={selection:ye};O==="ignore"&&(Ve.undoIgnore=!0),Re(re,Ve)}if(se&&!X&&J?.clientId&&!k.current&&(e?y.current.internalToExternal.has(J.clientId):!N(J.clientId).some(le=>V(le)))){let le={selectionStart:J,selectionEnd:ie,initialPosition:T()};s(e?HJ(le,y.current):le)}}),M=$},w);return()=>{v.current=!1,oe()}},[n,e]),(0,zn.useEffect)(()=>()=>{E()},[])}var KJ=c(L(),1),YJ=c(W(),1),qJ=c(Ma(),1),Qo=c(z(),1);function ZJ(){return null}function NAe(){let{registerShortcut:e}=(0,YJ.useDispatch)(qJ.store);return(0,KJ.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,Qo.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,Qo.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,Qo.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,Qo.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,Qo.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,Qo.__)("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,Qo.__)("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,Qo.__)("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,Qo.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,Qo.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,Qo.__)("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,Qo.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,Qo.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,Qo.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,Qo.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,Qo.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,Qo.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,Qo.__)("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,Qo.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,Qo.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e]),null}ZJ.Register=NAe;var mP=ZJ;var XJ=c(L(),1);function DAe(e={}){return(0,XJ.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,mediaFinalize:e.mediaFinalize,mediaDelete:e.mediaDelete,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var QJ=DAe;var nu=c(C(),1),pP=()=>{},JJ=!1,iy=null,sy=null,eee=["image/heic","image/heif"];function ree(){if(iy!==null)return iy;if(!window.__clientSideMediaProcessing||typeof Ga.detectClientSideMediaSupport!="function")return iy=!1,!1;let e=(0,Ga.detectClientSideMediaSupport)();return!e||!e.supported?(JJ||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),JJ=!0),iy=!1,!1):(iy=!0,!0)}function VAe(){return sy!==null?sy:ree()||!window.__heicUploadSupport||typeof Ga.isHeicCanvasSupported!="function"||!(0,Ga.isHeicCanvasSupported)()?(sy=!1,!1):(sy=!0,!0)}function FAe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=pP,onFileChange:s,onSuccess:a,onBatchSuccess:l}){e.dispatch(Ga.store).addItems({files:Array.from(n),onChange:s,onSuccess:u=>{t?.[fS]?.(u),a?.(u)},onBatchSuccess:l,onError:u=>i(typeof u=="string"?u:u?.message??""),additionalData:r,allowedTypes:o})}function zAe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=pP,onFileChange:s,onSuccess:a,onBatchSuccess:l}){let u=Array.from(n),d=u.filter(g=>eee.includes(g.type)),f=u.filter(g=>!eee.includes(g.type)),m=d.length>0&&f.length>0&&t?.mediaUpload,h=m?2:1,p=m?()=>{h--,h<=0&&l?.()}:l;d.length>0&&e.dispatch(Ga.store).addItems({files:d,onChange:s,onSuccess:g=>{t?.[fS]?.(g),a?.(g)},onBatchSuccess:p,onError:g=>i(typeof g=="string"?g:g?.message??""),additionalData:r,allowedTypes:o}),f.length>0&&t?.mediaUpload&&t.mediaUpload({allowedTypes:o,additionalData:r,filesList:f,onError:i,onFileChange:s,onSuccess:a,onBatchSuccess:p})}function jAe(e){return fP(e),null}var ay=FJ(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=QJ(t),i=ree(),s=VAe(),a=i||s,l=!!t?.mediaUpload?.__isMediaUploadInterceptor,u=(0,wf.useMemo)(()=>{if(a&&t?.mediaUpload&&!l){let v=(i?FAe:zAe).bind(null,o,t);return v.__isMediaUploadInterceptor=!0,{...t,mediaUpload:v}}return t},[t,o,a,i,l]),{__experimentalUpdateSettings:d}=F((0,tee.useDispatch)(w));(0,wf.useEffect)(()=>{d({...u,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[u,r,d]);let f=(0,wf.useRef)(e.selection);f.current=e.selection;let m=(0,wf.useRef)(e.onChangeSelection??pP);m.current=e.onChangeSelection??pP;let h=(0,wf.useMemo)(()=>({getSelection:()=>f.current,onChangeSelection:(...b)=>m.current(...b)}),[]),p=(0,nu.jsxs)(oee.SlotFillProvider,{passthrough:!0,children:[!u?.isPreviewMode&&(0,nu.jsx)(mP.Register,{}),(0,nu.jsx)(T$,{children:e.children})]}),g=(0,nu.jsxs)(dP.Provider,{value:h,children:[(0,nu.jsx)(jAe,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),p]});return a&&!l?(0,nu.jsx)(Ga.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:g}):g}),HAe=e=>(0,nu.jsx)(ay,{...e,stripExperimentalSettings:!0,children:e.children}),nee=HAe;var Rx=c(te(),1),joe=c(W(),1),qP=c(L(),1),Hoe=c(D(),1);var Uee=c(pe(),1),lh=c(L(),1),Gee=c(z(),1),su=c(te(),1),Wee=c(D(),1),Bz=c(W(),1);var Nee=c(W(),1),Dee=c(z(),1),bx=c(te(),1),Vee=c(L(),1);var iee=c(te(),1),see=c(W(),1);function UAe(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(w);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function aee(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,see.useSelect)(UAe,[]);return(0,iee.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:l}=a;if(e==null||!r||t)return;let{length:u}=o;u<2||i&&(s.contentEditable=!0,s.focus(),l.getSelection().removeAllRanges())},[r,t,o,n,e,i])}var ly=c(at(),1),xz=c(Pt(),1),hP=c(W(),1),gP=c(te(),1),px=c(L(),1);var wz=c(C(),1);function lee(){let e=(0,px.useRef)(),t=(0,px.useRef)(),o=(0,px.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:l,isZoomOut:u}=F((0,hP.useSelect)(w)),{setLastFocus:d}=F((0,hP.useDispatch)(w)),f=(0,px.useRef)();function m(v){let y=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 S=l(),k=s(S);k.length?e.current.querySelector(`[data-block="${k[0]}"]`).focus():S?e.current.querySelector(`[data-block="${S}"]`).focus():y.focus()}else{let S=v.target.compareDocumentPosition(y)&v.target.DOCUMENT_POSITION_FOLLOWING,k=ly.focus.tabbable.find(e.current);k.length&&(S?k[0]:k[k.length-1]).focus()}}let h=(0,wz.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),p=(0,wz.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,gP.useRefEffect)(v=>{function y(E){if(E.defaultPrevented||E.keyCode!==xz.TAB||!o.current||!t.current)return;let{target:B,shiftKey:P}=E,T=P?"findPrevious":"findNext",A=ly.focus.tabbable[T](B),I=B.closest("[data-block]"),R=I&&A&&(kY(I,A)||Vl(I,A));if((0,ly.isFormElement)(A)&&R)return;let V=P?t:o;f.current=!0,V.current.focus({preventScroll:!0})}function S(E){d({...a(),current:E.target});let{ownerDocument:B}=v;!E.relatedTarget&&E.target.hasAttribute("data-block")&&B.activeElement===B.body&&i()===0&&v.focus()}function k(E){if(E.keyCode!==xz.TAB||E.target?.getAttribute("role")==="region"||e.current===E.target)return;let P=E.shiftKey?"findPrevious":"findNext",T=ly.focus.tabbable[P](E.target);(T===t.current||T===o.current)&&(E.preventDefault(),T.focus({preventScroll:!0}))}let{ownerDocument:_}=v,{defaultView:x}=_;return x.addEventListener("keydown",k),v.addEventListener("keydown",y),v.addEventListener("focusout",S),()=>{x.removeEventListener("keydown",k),v.removeEventListener("keydown",y),v.removeEventListener("focusout",S)}},[]),b=(0,gP.useMergeRefs)([e,g]);return[h,b,p]}var Jo=c(at(),1),Gl=c(Pt(),1),bP=c(W(),1),cee=c(te(),1);function GAe(e,t,o){let r=t===Gl.UP||t===Gl.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 Cz(e,t,o,r){let n=Jo.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(a.contentEditable!=="true"&&Vs(a)&&Jo.focus.focusable.find(a).filter(l=>!(0,Jo.isFormElement)(l)).length!==0||!Jo.focus.tabbable.isTabbableIndex(a)||a.isContentEditable&&a.contentEditable!=="true")return!1;if(r){let l=a.getBoundingClientRect();if(l.left>=i.right||l.right<=i.left)return!1}return!0}return n.find(s)}function uee(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,bP.useSelect)(w),{selectBlock:i}=(0,bP.useDispatch)(w);return(0,cee.useRefEffect)(s=>{let a;function l(){a=null}function u(f,m){let h=Cz(f,m,s);return h&&Vs(h)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:h,shiftKey:p,ctrlKey:g,altKey:b,metaKey:v}=f,y=m===Gl.UP,S=m===Gl.DOWN,k=m===Gl.LEFT,_=m===Gl.RIGHT,x=y||k,E=k||_,B=y||S,P=E||B,T=p||g||b||v,A=B?Jo.isVerticalEdge:Jo.isHorizontalEdge,{ownerDocument:I}=s,{defaultView:R}=I;if(!P||o().isPreviewMode)return;if(r()){if(p||!n())return;f.preventDefault(),x?i(e()):i(t(),-1);return}if(!GAe(h,m,T))return;B?a||(a=(0,Jo.computeCaretRect)(R)):a=null;let V=(0,Jo.isRTL)(h)?!x:x,{keepCaretInsideBlock:N}=o();if(p)u(h,x)&&A(h,x)&&(s.contentEditable=!0,s.focus());else if(B&&(0,Jo.isVerticalEdge)(h,x)&&(!b||(0,Jo.isHorizontalEdge)(h,V))&&!N){let U=Cz(h,x,s,!0);U&&((0,Jo.placeCaretAtVerticalEdge)(U,b?!x:x,b?void 0:a),f.preventDefault())}else if(E&&R.getSelection().isCollapsed&&(0,Jo.isHorizontalEdge)(h,V)&&!N){let U=Cz(h,V,s);(0,Jo.placeCaretAtHorizontalEdge)(U,x),f.preventDefault()}}return s.addEventListener("mousedown",l),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",l),s.removeEventListener("keydown",d)}},[])}var dee=c(te(),1),fee=c(W(),1),Wl=c(Pt(),1);function mee(){let e=(0,fee.useSelect)(t=>t(w).getSettings().isPreviewMode,[]);return(0,dee.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===Wl.TAB,l=n===Wl.UP,u=n===Wl.DOWN,d=n===Wl.LEFT;if(!a&&!(l||u||d||n===Wl.RIGHT))return;let h=a?i:l||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 pee=c(at(),1),yP=c(W(),1),hee=c(Ma(),1),gee=c(te(),1);function bee(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,yP.useSelect)(w),{multiSelect:r,selectBlock:n}=(0,yP.useDispatch)(w),i=(0,hee.__unstableUseShortcutEventMatch)();return(0,gee.useRefEffect)(s=>{function a(l){if(!i("core/block-editor/select-all",l))return;let u=t();if(u.length<2&&!(0,pee.isEntirelySelected)(l.target))return;l.preventDefault();let{ownerDocument:d}=l.target,[f]=u,m=Vs(d.activeElement);if(m&&m!==f&&!Vl(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 vP=c(W(),1),vee=c(te(),1);function yee(e,t){e.contentEditable=t,t&&e.focus()}function kee(){let{startMultiSelect:e,stopMultiSelect:t}=(0,vP.useDispatch)(w),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,vP.useSelect)(w);return(0,vee.useRefEffect)(a=>{let{ownerDocument:l}=a,{defaultView:u}=l,d,f;function m(){t(),u.removeEventListener("mouseup",m),f=u.requestAnimationFrame(()=>{if(!n())return;yee(a,!1);let b=u.getSelection();if(b.rangeCount){let v=b.getRangeAt(0),{commonAncestorContainer:y}=v,S=v.cloneRange();d.contains(y)&&(d.focus(),b.removeAllRanges(),b.addRange(S))}})}let h;function p({target:b}){h=b}function g({buttons:b,target:v,relatedTarget:y}){v.contains(h)&&(v.contains(y)||i()||b===1&&(s()||a!==v&&(v.getAttribute("contenteditable")!=="true"&&!o().isPreviewMode||r()&&(d=v,e(),u.addEventListener("mouseup",m),yee(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 _P=c(W(),1),_ee=c(te(),1),SP=c(Qr(),1),xee=c(at(),1);function WAe(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function $Ae(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,xee.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function KAe(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function See(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function kP(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function wee(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,_P.useDispatch)(w),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,_P.useSelect)(w);return(0,_ee.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:l}=a;function u(d){let f=l.getSelection();if(!f.rangeCount)return;let m=WAe(f),h=$Ae(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()){See(s,!1);let y=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;y=y?.closest("[contenteditable]"),y?.focus()}return}let g=Vs(m),b=Vs(h);if(p){let y=n(),S=Vs(d.target),k=S!==b;(g===b&&f.isCollapsed||!b||k)&&(b=S),g!==y&&(g=y)}if(g===void 0&&b===void 0){See(s,!1);return}if(d.type==="mouseup"&&!d.shiftKey&&!i()&&g===b){let y=Vs(d.target);if(y&&y!==g){f.removeAllRanges();return}}if(g===b)if(i())e(g,g);else{let y=!f.isCollapsed&&(kP(m)||kP(h));if(y&&a.activeElement!==y){let S=f.getRangeAt(0),k=(0,SP.create)({element:y,range:S,__unstableIsEditableTree:!0});o({start:{clientId:g,attributeKey:y.dataset.wpBlockAttributeKey,offset:k.start??0},end:{clientId:g,attributeKey:y.dataset.wpBlockAttributeKey,offset:k.end}})}else t(g)}else{let y=[...r(g),g],S=[...r(b),b],k=KAe(y,S);if(y[k]!==g||S[k]!==b){e(y[k],S[k]);return}let _=kP(m),x=kP(h);if(_&&x){let E=f.getRangeAt(0),B=(0,SP.create)({element:_,range:E,__unstableIsEditableTree:!0}),P=(0,SP.create)({element:x,range:E,__unstableIsEditableTree:!0}),T=B.start??B.end,A=P.start??P.end;o({start:{clientId:g,attributeKey:_.dataset.wpBlockAttributeKey,offset:T},end:{clientId:b,attributeKey:x.dataset.wpBlockAttributeKey,offset:A}})}else e(g,b)}}return a.addEventListener("selectionchange",u),l.addEventListener("mouseup",u),()=>{a.removeEventListener("selectionchange",u),l.removeEventListener("mouseup",u)}},[e,t,o,r])}var xP=c(W(),1),Cee=c(te(),1);function Eee(){let{selectBlock:e}=(0,xP.useDispatch)(w),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,xP.useSelect)(w);return(0,Cee.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),l=Vs(s.target);s.shiftKey?a&&a!==l&&(n.contentEditable=!0,n.focus()):r()&&e(l)}return n.addEventListener("mousedown",i),()=>{n.removeEventListener("mousedown",i)}},[e,t,o,r])}var wP=c(W(),1),Tee=c(te(),1),iu=c(Pt(),1),Wa=c(ee(),1);function Bee(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:l,getSelectionEnd:u,getBlockAttributes:d}=(0,wP.useSelect)(w),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:h,__unstableDeleteSelection:p,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,wP.useDispatch)(w);return(0,Tee.useRefEffect)(v=>{function y(_){v.contentEditable==="true"&&_.preventDefault()}function S(_){if(!_.defaultPrevented){if(!n()){if(_.keyCode===iu.ENTER){if(_.shiftKey||e())return;let x=o(),E=i(x),B=l(),P=u();if(B.attributeKey===P.attributeKey){let T=d(x)[B.attributeKey],A=(0,Wa.getBlockTransforms)("from").filter(({type:R})=>R==="enter"),I=(0,Wa.findTransform)(A,R=>R.regExp.test(T));if(I){f(x,I.transform({content:T})),b();return}}if(!(0,Wa.hasBlockSupport)(E,"splitting",!1)&&!_.__deprecatedOnSplit)return;(s((0,Wa.getDefaultBlockName)(),a(x))||s(E,a(x)))&&(m(),_.preventDefault())}return}_.keyCode===iu.ENTER?(v.contentEditable=!1,_.preventDefault(),e()?f(t(),(0,Wa.createBlock)((0,Wa.getDefaultBlockName)())):m()):_.keyCode===iu.BACKSPACE||_.keyCode===iu.DELETE?(v.contentEditable=!1,_.preventDefault(),e()?h(t()):r()?p(_.keyCode===iu.DELETE):g()):_.key.length===1&&!(_.metaKey||_.ctrlKey)&&(v.contentEditable=!1,r()?p(_.keyCode===iu.DELETE):(_.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function k(_){n()&&(v.contentEditable=!1,r()?p():(_.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}return v.addEventListener("beforeinput",y),v.addEventListener("keydown",S),v.addEventListener("compositionstart",k),()=>{v.removeEventListener("beforeinput",y),v.removeEventListener("keydown",S),v.removeEventListener("compositionstart",k)}},[])}var $l=c(ee(),1),EP=c(at(),1),dy=c(W(),1),Mee=c(te(),1);var Pee=c(L(),1),Ree=c(ee(),1),hx=c(W(),1),js=c(z(),1),Iee=c(Wi(),1);function cy(){let{getBlockName:e}=(0,hx.useSelect)(w),{getBlockType:t}=(0,hx.useSelect)(Ree.store),{createSuccessNotice:o}=(0,hx.useDispatch)(Iee.store);return(0,Pee.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,js.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,js.sprintf)((0,js.__)('Copied "%s" to clipboard.'),a):i=(0,js.sprintf)((0,js.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,js.sprintf)((0,js._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,js.sprintf)((0,js._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var Aee=c(at(),1),Hs=c(ee(),1);var Oee=c(at(),1);function YAe(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 qAe(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function uy({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=YAe(o),o=qAe(o);let r=(0,Oee.getFilesFromDataTransfer)(e);return r.length&&!ZAe(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function ZAe(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 Ez=Symbol("requiresWrapperOnCopy");function CP(e,t,o){let r=t,[n]=t;if(n&&o.select(Hs.store).getBlockType(n.name)[Ez]){let{getBlockRootClientId:a,getBlockName:l,getBlockAttributes:u}=o.select(w),d=a(n.clientId),f=l(d);f&&(r=(0,Hs.createBlock)(f,u(d),r))}let i=(0,Hs.serialize)(r);e.clipboardData.setData("text/plain",XAe(i)),e.clipboardData.setData("text/html",i)}function Lee(e,t){let{plainText:o,html:r,files:n}=uy(e),i=[];if(n.length){let s=(0,Hs.getBlockTransforms)("from");i=n.reduce((a,l)=>{let u=(0,Hs.findTransform)(s,d=>d.type==="files"&&d.isMatch([l]));return u&&a.push(u.transform([l])),a},[]).flat()}else i=(0,Hs.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function XAe(e){return e=e.replace(/<br>/g,`
48 `),(0,Aee.__unstableStripHTML)(e).trim().replace(/\n\n+/g,`
49
50 `)}function gx(){let e=(0,dy.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,dy.useSelect)(w),{flashBlock:m,removeBlocks:h,replaceBlocks:p,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:v}=(0,dy.useDispatch)(w),y=cy();return(0,Mee.useRefEffect)(S=>{function k(_){if(_.defaultPrevented)return;let x=o();if(x.length===0)return;if(!r()){let{target:A}=_,{ownerDocument:I}=A;if(_.type==="copy"||_.type==="cut"?(0,EP.documentHasUncollapsedSelection)(I):(0,EP.documentHasSelection)(I)&&!I.activeElement.isContentEditable)return}let{activeElement:E}=_.target.ownerDocument;if(!S.contains(E))return;let B=l(),P=a()||s(),T=!P&&!B;if(_.type==="copy"||_.type==="cut")if(_.preventDefault(),x.length===1&&m(x[0]),T)b();else{y(_.type,x);let A;if(P)A=t(x);else{let[I,R]=u(),V=t(x.slice(1,x.length-1));A=[I,...V,R]}CP(_,A,e)}if(_.type==="cut")P&&!T?h(x):(_.target.ownerDocument.activeElement.contentEditable=!1,g());else if(_.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:A,mediaUpload:I}=n();if(_.clipboardData.getData("rich-text")==="true")return;let{plainText:V,html:N,files:U}=uy(_),j=s(),O=[];if(U.length){if(!I){_.preventDefault();return}let oe=(0,$l.getBlockTransforms)("from");O=U.reduce((K,Z)=>{let q=(0,$l.findTransform)(oe,$=>$.type==="files"&&$.isMatch([Z]));return q&&K.push(q.transform([Z])),K},[]).flat()}else O=(0,$l.pasteHandler)({HTML:N,plainText:V,mode:j?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:A});if(typeof O=="string")return;if(j){p(x,O,O.length-1,-1),_.preventDefault();return}if(!r()&&!(0,$l.hasBlockSupport)(i(x[0]),"splitting",!1)&&!_.__deprecatedOnSplit)return;let[M]=x,H=f(M),Y=[];for(let oe of O)if(d(oe.name,H))Y.push(oe);else{let K=i(H),Z=oe.name!==K?(0,$l.switchToBlockType)(oe,K):[oe];if(!Z)return;for(let q of Z)for(let $ of q.innerBlocks)Y.push($)}v(Y),_.preventDefault()}}return S.ownerDocument.addEventListener("copy",k),S.ownerDocument.addEventListener("cut",k),S.ownerDocument.addEventListener("paste",k),()=>{S.ownerDocument.removeEventListener("copy",k),S.ownerDocument.removeEventListener("cut",k),S.ownerDocument.removeEventListener("paste",k)}},[])}var fy=c(C(),1);function Tz(){let[e,t,o]=lee(),r=(0,Nee.useSelect)(n=>n(w).hasMultiSelection(),[]);return[e,(0,bx.useMergeRefs)([t,gx(),Bee(),kee(),wee(),Eee(),aee(),bee(),uee(),mee(),(0,bx.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,Dee.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function QAe({children:e,...t},o){let[r,n,i]=Tz();return(0,fy.jsxs)(fy.Fragment,{children:[r,(0,fy.jsx)("div",{...t,ref:(0,bx.useMergeRefs)([n,o]),className:G(t.className,"block-editor-writing-flow"),children:e}),i]})}var TP=(0,Vee.forwardRef)(QAe);var BP=null;function Fee(){return BP||(BP=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:l})=>a?n(l):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},[]),BP)}var bi=c(L(),1),yx=c(te(),1);function zee({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function JAe(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function eLe(e,t){let{containerHeight:o,frameSize:r,scaleValue:n,scrollTop:i}=e,{containerHeight:s,frameSize:a,scaleValue:l,scrollHeight:u}=t,d=i;d=(d+o/2-r)/n-o/2,d=(d+s/2)*l+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 tLe(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 jee({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,yx.useResizeObserver)(),[s,{width:a,height:l}]=(0,yx.useResizeObserver)(),u=(0,bi.useRef)(0),d=r!==1,f=(0,yx.useReducedMotion)(),m=r==="auto-scaled",h=(0,bi.useRef)(!1),p=(0,bi.useRef)(null);(0,bi.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?zee({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,v=(0,bi.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,bi.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),S=(0,bi.useCallback)(()=>{let{scrollTop:x}=v.current,{scrollTop:E}=y.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${x}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${E}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(tLe(v.current,y.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),k=(0,bi.useCallback)(()=>{h.current=!1,p.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",y.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${y.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=y.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),v.current=y.current},[t]),_=(0,bi.useRef)(!1);return(0,bi.useEffect)(()=>{if(!t)return;let x=_.current!==d;if(_.current=d,!!x&&(h.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),(0,bi.useEffect)(()=>{if(t&&(m&&v.current.scaleValue!==1&&(v.current.scaleValue=zee({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",`${l}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 x=v.current,E=y.current;v.current=E,y.current=x}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=l,y.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},y.current.scrollHeight=JAe(v.current,y.current),y.current.scrollTop=eLe(v.current,y.current),p.current=S(),f?k():p.current.onfinish=k},[S,k,f,m,b,e,t,i,a,l,o,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:n,containerResizeListener:s}}var $a=c(C(),1);function $ee(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 oLe(e){return(0,su.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];$ee(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var Hee=new WeakMap,rLe=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function nLe(e){let t=Hee.get(e);if(t)return t;let o="";Uee.version.split(".")[0]==="18"&&(o="<body><script>document.currentScript.parentElement.remove()<\/script></body>");let r=`<!doctype html>
51 <html>
52 <head>
53 <meta charset="utf-8">
54 <base href="${window.location.href}">
55 <style>
56 html{
57 height: auto !important;
58 min-height: 100%;
59 }
60 /* Lowest specificity to not override global styles */
61 :where(body) {
62 margin: 0;
63 /* Default background color in case zoom out mode background
64 colors the html element */
65 background-color: white;
66 }
67 </style>
68 ${e.styles??""}
69 ${e.scripts??""}
70 </head>
71 ${o}
72 </html>`;return t=URL.createObjectURL(new Blob([r],{type:"text/html"})),Hee.set(e,t),rLe?.register(e,t),t}function iLe({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,Gee.__)("Editor canvas"),...l}){let{resolvedAssets:u,isPreviewMode:d}=(0,Bz.useSelect)(R=>{let V=R(w).getSettings();return{resolvedAssets:V.__unstableResolvedAssets,isPreviewMode:V.isPreviewMode}},[]),[f,m]=(0,lh.useState)(),[h,p]=(0,lh.useState)([]),[g,b,v]=Tz(),y=(0,su.useRefEffect)(R=>{let V;function N(M){M.preventDefault()}function U(M){M.target.tagName==="A"&&M.target.getAttribute("href")?.startsWith("#")&&(M.preventDefault(),V.defaultView.location.hash=M.target.getAttribute("href").slice(1))}let{ownerDocument:j}=R;p(Array.from(j.body.classList).filter(M=>M.startsWith("admin-color-")||M.startsWith("post-type-")||M==="wp-embed-responsive"));function O(){let{contentDocument:M}=R,{documentElement:H}=M;V=M,m(M),H.classList.add("block-editor-iframe__html"),M.dir=j.dir;for(let Y of Fee())M.getElementById(Y.id)||(M.head.appendChild(Y.cloneNode(!0)),d||console.warn(`${Y.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,Y));V.addEventListener("dragover",N,!1),V.addEventListener("drop",N,!1),V.addEventListener("click",U)}return R.addEventListener("load",O),()=>{m(void 0),R.removeEventListener("load",O),V?.removeEventListener("dragover",N),V?.removeEventListener("drop",N),V?.removeEventListener("click",U)}},[]),{contentResizeListener:S,containerResizeListener:k,isZoomedOut:_,scaleContainerWidth:x}=jee({scale:r,frameSize:parseInt(n),iframeDocument:f}),E=(0,su.useDisabled)({isDisabled:!i}),B=(0,su.useMergeRefs)([oLe(f),e,b,E]),P=(0,su.useRefEffect)(R=>R.ownerDocument.defaultView?(B(R),()=>B(null)):()=>{},[B]),T=nLe(u),A=o>=0&&!d,I=(0,$a.jsxs)($a.Fragment,{children:[A&&g,(0,$a.jsx)("iframe",{...l,style:{...l.style,height:l.style?.height,border:0},ref:(0,su.useMergeRefs)([s,y]),tabIndex:o,src:T,title:a,onKeyDown:R=>{if(l.onKeyDown&&l.onKeyDown(R),R.currentTarget.ownerDocument!==R.target.ownerDocument){let{stopPropagation:V}=R.nativeEvent;R.nativeEvent.stopPropagation=()=>{},R.stopPropagation(),R.nativeEvent.stopPropagation=V,$ee(R,window.KeyboardEvent,R.currentTarget)}},children:f&&(0,lh.createPortal)((0,$a.jsxs)("body",{ref:P,className:G("block-editor-iframe__body","editor-styles-wrapper",...h),children:[S,(0,$a.jsx)(Wee.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),A&&v]});return(0,$a.jsxs)("div",{className:"block-editor-iframe__container",children:[k,(0,$a.jsx)("div",{className:G("block-editor-iframe__scale-container",_&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":_&&`${x}px`},children:I})]})}function sLe(e,t){return(0,Bz.useSelect)(r=>r(w).getSettings().__internalIsInitialized,[])?(0,$a.jsx)(iLe,{...e,forwardedRef:t}):null}var my=(0,lh.forwardRef)(sLe);var Foe=c(D(),1),ky=c(L(),1),zoe=c(W(),1);var RP={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},aLe=new Set(["combinator","comma"]);var lLe=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(RP[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return RP[e]}};function cLe(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 uLe(e,t=RP){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 l=i.exec(a);if(!l)continue;let u=l.index-1,d=[],f=l[0],m=a.slice(0,u+1);m&&d.push(m),d.push({...l.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],aLe.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var dLe=/(['"])([^\\\n]+?)\1/g,fLe=/\\./g;function Pz(e,t=RP){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(fLe,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(dLe,(i,s,a,l)=>(o.push({value:i,offset:l}),`${s}${"\uE001".repeat(a.length)}${s}`));{let i=0,s;for(;(s=e.indexOf("(",i))>-1;){let a=cLe(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=uLe(e,t),n=new Set;for(let i of o.reverse())for(let s of r){let{offset:a,value:l}=i;if(!(s.pos[0]<=a&&a+l.length<=s.pos[1]))continue;let{content:u}=s,d=a-s.pos[0];s.content=u.slice(0,d)+l+u.slice(d+l.length),s.content!==u&&n.add(s)}for(let i of n){let s=lLe(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*PP(e,t){switch(e.type){case"list":for(let o of e.list)yield*PP(o,e);break;case"complex":yield*PP(e.left,e),yield*PP(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function Kee(e){let t;return Array.isArray(e)?t=e:t=[...PP(e)].map(([o])=>o),t.map(o=>o.content).join("")}var Loe=c(moe(),1),Moe=c(AP(),1),Noe=c(goe(),1),Doe=c(Ooe(),1),Aoe=new Map,Voe=[{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 wMe(e,t){let o=Pz(t),r=o.findLastIndex(({content:s,type:a})=>Voe.some(l=>s===l.content&&a===l.type)),n=-1;for(let s=r+1;s<o.length;s++)if(o[s].type==="combinator"){n=s;break}let i=Pz(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" ",pos:[0,0]},...i),Kee(o)}function CMe({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new Loe.default([r&&(0,Noe.default)({prefix:r,transform(s,a,l){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:Voe.some(d=>a.startsWith(d.content))?wMe(s,a):l}}),o&&(0,Doe.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof Moe.default?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i.message+`
73 `+i.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i),null}}var EMe=(e,t="",o)=>{let r=Aoe.get(t);return r||(r=new WeakMap,Aoe.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=CMe(n,t,o),r.set(n,i)),i})},vy=EMe;var Bf=c(C(),1);_d([xd,Mg]);function TMe(e,t){return(0,ky.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 l=no(a);l.luminance()>.5||l.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function BMe({styles:e,scope:t,transformOptions:o}){let r=(0,zoe.useSelect)(s=>F(s(w)).getStyleOverrides(),[]),[n,i]=(0,ky.useMemo)(()=>{let s=Object.values(e??[]);for(let[a,l]of r){let u=s.findIndex(({id:f})=>a===f),d={...l,id:a};u===-1?s.push(d):s[u]=d}return[vy(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,Bf.jsxs)(Bf.Fragment,{children:[(0,Bf.jsx)("style",{ref:TMe(n,t)}),n.map((s,a)=>(0,Bf.jsx)("style",{children:s},a)),(0,Bf.jsx)(Foe.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 au=(0,ky.memo)(BMe);var Us=c(C(),1),PMe=(0,qP.memo)(Sy),u6=2e3,RMe=[];function IMe({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=RMe}){e||(e=t);let[n,{height:i}]=(0,Rx.useResizeObserver)(),{styles:s}=(0,joe.useSelect)(d=>({styles:d(w).getSettings().styles}),[]),a=(0,qP.useMemo)(()=>s&&[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...r],[s,r]),l=t/e,u=i?t/(i*l):0;return(0,Us.jsx)(Hoe.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${l})`,aspectRatio:u,maxHeight:i>u6?u6*l:void 0,minHeight:o},children:(0,Us.jsxs)(my,{contentRef:(0,Rx.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:u6,minHeight:l!==0&&l<1&&o?o/l:o},children:[(0,Us.jsx)(au,{styles:a}),n,(0,Us.jsx)(PMe,{renderAppender:!1})]})})}function Uoe(e){let[t,{width:o}]=(0,Rx.useResizeObserver)();return(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Us.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Us.jsx)(IMe,{...e,containerWidth:o})})]})}var _y=c(L(),1),Koe=c(Woe(),1),$oe=(0,Koe.createQueue)();function Yoe({children:e,placeholder:t}){let[o,r]=(0,_y.useState)(!1);return(0,_y.useEffect)(()=>{let n={};return $oe.add(n,()=>{(0,_y.flushSync)(()=>{r(!0)})}),()=>{$oe.cancel(n)}},[]),o?e:t}var mh=c(C(),1),OMe=[];function AMe({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=OMe,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,d6.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,d6.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,f6.useSelect)(u=>u(w).getSettings(),[]),a=(0,fh.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),l=(0,fh.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,mh.jsx)(ay,{value:l,settings:a,children:(0,mh.jsx)(Uoe,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var qoe=(0,fh.memo)(AMe);qoe.Async=Yoe;var yi=qoe;function Zoe({blocks:e,props:t={},layout:o}){let r=(0,f6.useSelect)(u=>u(w).getSettings(),[]),n=(0,fh.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,ZP.useDisabled)(),s=(0,ZP.useMergeRefs)([t.ref,i]),a=(0,fh.useMemo)(()=>Array.isArray(e)?e:[e],[e]),l=(0,mh.jsxs)(ay,{value:a,settings:n,children:[(0,mh.jsx)(au,{}),(0,mh.jsx)(Ix,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:G(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?l:null}}var Pf=c(C(),1);function LMe({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,xy.isReusableBlock)(e),l=(0,Xoe.useMemo)(()=>s?(0,xy.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,xy.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,Pf.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,Pf.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,Pf.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,Pf.jsx)(yi,{blocks:l,viewportWidth:f,minHeight:u,additionalStyles:[{css:`
74 body {
75 padding: 24px;
76 min-height:${Math.round(h)}px;
77 display:flex;
78 align-items:center;
79 }
80 .is-root-container { width: 100%; }
81 `}]})}):(0,Pf.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,Qoe.__)("No preview available.")})}),!a&&(0,Pf.jsx)(mx,{title:o,icon:r,description:n})]})}var Joe=LMe;var Ry=c(z(),1),uu=c(L(),1),v6=c(te(),1);var mre=c(ee(),1),pre=c(te(),1);var Py=c(L(),1),Rf=c(ee(),1),dre=c(D(),1),Ox=c(Pt(),1);var are=c(D(),1),lre=c(L(),1);var wy=c(L(),1),ere=c(z(),1),tre=c(_r(),1),ore=c(C(),1);function MMe(e,t){let[o,r]=(0,wy.useState)(!1);return(0,wy.useEffect)(()=>{o&&(0,tre.speak)((0,ere.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,ore.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var m6=(0,wy.forwardRef)(MMe);var rre=c(L(),1),nre=c(D(),1),ire=c(C(),1);function NMe(e,t){return(0,ire.jsx)(nre.Composite.Group,{role:"presentation",ref:t,...e})}var p6=(0,rre.forwardRef)(NMe);var QP=c(D(),1),sre=c(L(),1),XP=c(C(),1);function DMe({isFirst:e,as:t,children:o,...r},n){return(0,XP.jsx)(QP.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,XP.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,XP.jsx)(QP.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var h6=(0,sre.forwardRef)(DMe);var g6=c(C(),1);function VMe({key:e,children:t}){return(0,g6.jsx)(lre.Fragment,{children:t},e)}function FMe({children:e}){return(0,g6.jsx)(are.Composite,{focusShift:!0,focusWrap:"horizontal",render:VMe,children:e})}var Cy=FMe;var cre=c(D(),1),eR=c(ee(),1),tR=c(W(),1),ure=c(L(),1);var Ty=c(z(),1),Ey=c(D(),1);var Ya=c(C(),1);function JP({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,Ty.__)("Pattern");return(0,Ya.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,Ya.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,Ya.jsxs)(Ey.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,Ya.jsx)(Ey.FlexItem,{children:t?(0,Ya.jsx)(rt,{icon:t}):n||(0,Ty.sprintf)((0,Ty._n)("%d block","%d blocks",e),e)}),(0,Ya.jsx)(Ey.FlexItem,{children:(0,Ya.jsx)(rt,{icon:kS})}),r&&(0,Ya.jsx)(Ey.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,Ya.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var b6=c(C(),1),zMe=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,tR.useSelect)(f=>i&&f(eR.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:l}=F((0,tR.useDispatch)(w)),u=(0,ure.useMemo)(()=>n?.type===bo.user&&n?.syncStatus!=="unsynced"?[(0,eR.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,b6.jsx)(cre.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:()=>{l()},__experimentalDragComponent:(0,b6.jsx)(JP,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},By=zMe;var lu=c(C(),1);function jMe({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,Py.useRef)(!1),l=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,Py.useMemo)(()=>[(0,Rf.createBlock)(o.name,o.initialAttributes,(0,Rf.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,Rf.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,Rf.isTemplatePart)(o);return(0,lu.jsx)(By,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:h})=>(0,lu.jsx)("div",{className:G("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,lu.jsxs)(h6,{isFirst:t,className:G("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:p=>{p.preventDefault(),r(o,(0,Ox.isAppleOS)()?p.metaKey:p.ctrlKey),n(null)},onKeyDown:p=>{let{keyCode:g}=p;g===Ox.ENTER&&(p.preventDefault(),r(o,(0,Ox.isAppleOS)()?p.metaKey:p.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,lu.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:l,children:(0,lu.jsx)(rt,{icon:o.icon,showColors:!0})}),(0,lu.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,lu.jsx)(dre.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var fre=(0,Py.memo)(jMe);var Ax=c(C(),1);function HMe(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 hre({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,pre.useInstanceId)(hre,s);return(0,Ax.jsxs)(m6,{className:s,"aria-label":n,children:[HMe(e,3).map((l,u)=>(0,Ax.jsx)(p6,{children:l.map((d,f)=>(0,Ax.jsx)(fre,{item:d,className:(0,mre.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var ph=hre;var gre=c(D(),1),cu=c(C(),1);function UMe({title:e,icon:t,children:o}){return(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,cu.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,cu.jsx)(gre.Icon,{icon:t})]}),(0,cu.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var If=UMe;var bre=c(z(),1),y6=c(C(),1);function GMe(){return(0,y6.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,y6.jsx)("p",{children:(0,bre.__)("No results found.")})})}var qa=GMe;var wr=c(C(),1),WMe=e=>e.name.split("/")[0],$Me=6,KMe=[];function yre({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,uu.useMemo)(()=>Ol(e,"frecency","desc").slice(0,$Me),[e]),l=(0,uu.useMemo)(()=>e.filter(p=>!p.category),[e]),u=(0,uu.useMemo)(()=>{let p={...t};return Object.keys(t).forEach(g=>{p[g]=e.filter(b=>WMe(b)===g),p[g].length===0&&delete p[g]}),p},[e,t]);(0,uu.useEffect)(()=>()=>n(null),[]);let d=(0,v6.useAsyncList)(o),f=o.length===d.length,m=(0,uu.useMemo)(()=>Object.entries(t),[t]),h=(0,v6.useAsyncList)(f?m:KMe);return(0,wr.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,wr.jsx)(If,{title:(0,Ry._x)("Most used","blocks"),children:(0,wr.jsx)(ph,{items:a,onSelect:r,onHover:n,label:(0,Ry._x)("Most used","blocks")})}),d.map(p=>{let g=e.filter(b=>b.category===p.slug);return!g||!g.length?null:(0,wr.jsx)(If,{title:p.title,icon:p.icon,children:(0,wr.jsx)(ph,{items:g,onSelect:r,onHover:n,label:p.title})},p.slug)}),f&&l.length>0&&(0,wr.jsx)(If,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Ry.__)("Uncategorized"),children:(0,wr.jsx)(ph,{items:l,onSelect:r,onHover:n,label:(0,Ry.__)("Uncategorized")})}),h.map(([p,g])=>{let b=u[p];return!b||!b.length?null:(0,wr.jsx)(If,{title:g.title,icon:g.icon,children:(0,wr.jsx)(ph,{items:b,onSelect:r,onHover:n,label:g.title})},p)})]})}function YMe({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,l]=$d(e,t);if(!i.length)return(0,wr.jsx)(qa,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,wr.jsx)(Cy,{children:(0,wr.jsxs)("div",{ref:n,children:[!!u.length&&(0,wr.jsx)(wr.Fragment,{children:(0,wr.jsx)(yre,{items:u,categories:s,collections:a,onSelectItem:l,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,wr.jsx)(yre,{items:d,categories:s,collections:a,onSelectItem:l,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var vre=(0,uu.forwardRef)(YMe);var zre=c(L(),1),jre=c(te(),1),Hre=c(D(),1),Ure=c(z(),1);var Lre=c(D(),1),C6=c(L(),1),Mre=c(z(),1);var oR=c(D(),1),k6=c(z(),1),du=c(C(),1);function qMe({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,du.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,du.jsx)(oR.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function ZMe({searchValue:e,setSearchValue:t}){return(0,du.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,du.jsx)(oR.SearchControl,{onChange:t,value:e,label:(0,k6.__)("Search"),placeholder:(0,k6.__)("Search")})})}function XMe({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,du.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,du.jsx)(ZMe,{searchValue:r,setSearchValue:n}),!r&&(0,du.jsx)(qMe,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var kre=XMe;var fu=c(L(),1),Ly=c(z(),1),Pre=c(te(),1),Rre=c(D(),1),Ire=c(_r(),1);var Sre=c(ee(),1),Yl=c(L(),1),Lx=c(D(),1);var _re=c(te(),1),xre=c(z(),1);var vi=c(D(),1),Gs=c(z(),1),Sn=c(C(),1);function rR({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,Sn.jsxs)(vi.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,Sn.jsx)(vi.__experimentalText,{variant:"muted",children:(0,Gs.sprintf)((0,Gs._n)("%s item","%s items",r),r)}),t>1&&(0,Sn.jsxs)(vi.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,Sn.jsxs)(vi.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,Sn.jsx)(vi.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,Gs.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Sn.jsx)("span",{children:"\xAB"})}),(0,Sn.jsx)(vi.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,Gs.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Sn.jsx)("span",{children:"\u2039"})})]}),(0,Sn.jsx)(vi.__experimentalText,{variant:"muted",children:(0,Gs.sprintf)((0,Gs._x)("%1$s of %2$s","paging"),e,t)}),(0,Sn.jsxs)(vi.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,Sn.jsx)(vi.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,Gs.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Sn.jsx)("span",{children:"\u203A"})}),(0,Sn.jsx)(vi.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,Gs.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Sn.jsx)("span",{children:"\xBB"})})]})]})]})}var Yt=c(C(),1),QMe=({showTooltip:e,title:t,children:o})=>e?(0,Yt.jsxs)(lt.Root,{children:[(0,Yt.jsx)(lt.Trigger,{render:o}),(0,Yt.jsx)(lt.Popup,{children:t})]}):(0,Yt.jsx)(Yt.Fragment,{children:o});function wre({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[l,u]=(0,Yl.useState)(!1),{blocks:d,viewportWidth:f}=o,h=`block-editor-block-patterns-list__item-description-${(0,_re.useInstanceId)(wre)}`,p=o.type===bo.user,g=(0,Yl.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let v=(0,Sre.cloneBlock)(b);return v.attributes.metadata?.categories?.includes(s)&&(v.attributes.metadata.categories=[s]),v}),[d,t,s]);return(0,Yt.jsx)(By,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:v,onDragEnd:y})=>(0,Yt.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:S=>{u(!0),v&&(n?.(null),v(S))},onDragEnd:S=>{u(!1),y&&y(S)},children:(0,Yt.jsx)(QMe,{showTooltip:i&&!p,title:o.title,children:(0,Yt.jsxs)(Lx.Composite.Item,{render:(0,Yt.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?h:void 0,className:G("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===bo.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{l||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,Yt.jsx)(yi.Async,{placeholder:(0,Yt.jsx)(JMe,{}),children:(0,Yt.jsx)(yi,{blocks:d,viewportWidth:f})}),(!i||p)&&(0,Yt.jsxs)(Lx.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[p&&!o.syncStatus&&(0,Yt.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,Yt.jsx)(Ue,{className:"block-editor-patterns__pattern-icon",icon:Rl})}),(0,Yt.jsx)(tu,{render:(0,Yt.jsx)("div",{}),className:"block-editor-block-patterns-list__item-title",variant:"body-sm",children:o.title})]}),!!o.description&&(0,Yt.jsx)(ct,{id:h,children:o.description})]})})})})}function JMe(){return(0,Yt.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function eNe({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,category:i,label:s=(0,xre.__)("Patterns"),showTitlesAsTooltip:a,pagingProps:l},u){let[d,f]=(0,Yl.useState)(void 0),[m,h]=(0,Yl.useState)(null);(0,Yl.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let p=(g,b)=>{h(g.name),r(g,b)};return(0,Yt.jsxs)(Lx.Composite,{orientation:n,activeId:d,setActiveId:f,role:"listbox",className:"block-editor-block-patterns-list","aria-label":s,ref:u,children:[t.map(g=>(0,Yt.jsx)(wre,{id:g.name,pattern:g,onClick:p,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:i,isSelected:!!m&&m===g.name},g.name)),l&&(0,Yt.jsx)(rR,{...l})]})}var ql=(0,Yl.forwardRef)(eNe);var hh=c(W(),1),Ere=c(ee(),1),nR=c(z(),1),Tre=c(_r(),1),S6=c(L(),1);function Cre({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(w).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(w).getBlockIndex(n[i+1])+1:r.select(w).getBlockOrder(o).length}function tNe({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,hh.useRegistry)(),{getSelectedBlock:l,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=F((0,hh.useSelect)(w)),{destinationRootClientId:f,destinationIndex:m}=(0,hh.useSelect)(k=>{let{getSelectedBlockClientId:_,getBlockRootClientId:x,getBlockIndex:E,getBlockOrder:B,getInsertionPoint:P}=F(k(w)),T=_(),A=e,I,R=P();return t!==void 0?I=t:R&&R.hasOwnProperty("index")?(A=R?.rootClientId?R.rootClientId:e,I=R.index):o?I=E(o):!r&&T?(A=x(T),I=E(T)+1):I=B(A).length,{destinationRootClientId:A,destinationIndex:I}},[e,t,o,r]),{replaceBlocks:h,insertBlocks:p,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:v}=F((0,hh.useDispatch)(w)),y=(0,S6.useCallback)((k,_,x=!1,E)=>{(x||i||s)&&v(null);let B=l();!r&&B&&(0,Ere.isUnmodifiedDefaultBlock)(B,"content")?h(B.clientId,k,null,i||x?0:null,_):p(k,r||E===void 0?m:Cre({destinationRootClientId:f,destinationIndex:m,rootClientId:E,registry:a}),r||E===void 0?f:E,s,i||x?0:null,_);let P=Array.isArray(k)?k.length:1,T=(0,nR.sprintf)((0,nR._n)("%d block added.","%d blocks added.",P),P);(0,Tre.speak)(T),n&&n(k)},[r,l,h,p,f,m,n,i,s,v,a]),S=(0,S6.useCallback)(k=>{if(k&&!d()){let _=u(k.name,f);_!==null&&g(_,Cre({destinationRootClientId:f,destinationIndex:m,rootClientId:_,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,y,S]}var Of=tNe;var Iy=c(L(),1),iR=c(ee(),1),Oy=c(W(),1),sR=c(z(),1),Bre=c(Wi(),1);var oNe=(e,t,o,r)=>{let n=(0,Iy.useMemo)(()=>({[Fd]:!!r}),[r]),i=(0,Oy.useSelect)(p=>{let{getSettings:g}=F(p(w));return g()[SC]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:l}=(0,Oy.useSelect)(p=>{let{getSettings:g,__experimentalGetAllowedPatterns:b}=F(p(w)),v=g(),y=v[Nc];return{patterns:b(t,n),userPatternCategories:y?y(p):v.__experimentalUserPatternCategories,patternCategories:v.__experimentalBlockPatternCategories}},[t,n]),u=(0,Iy.useMemo)(()=>a.filter(p=>!(p.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=F((0,Oy.useSelect)(w)),f=(0,Iy.useMemo)(()=>{let p=[...s];return l?.forEach(g=>{p.find(b=>b.name===g.name)||p.push(g)}),p},[s,l]),{createSuccessNotice:m}=(0,Oy.useDispatch)(Bre.store),h=(0,Iy.useCallback)((p,g)=>{let b=r?t:d(p,t);if(b===null)return;let v=p.type===bo.user&&p.syncStatus!=="unsynced"?[(0,iR.createBlock)("core/block",{ref:p.id})]:g;e((v??[]).map(y=>{let S=(0,iR.cloneBlock)(y);return S.attributes.metadata?.categories?.includes(o)&&(S.attributes.metadata.categories=[o]),S}),p.name,!1,b),m((0,sR.sprintf)((0,sR.__)('Pattern "%s" inserted.'),p.title),{type:"snackbar",id:"inserter-notice"})},[m,e,o,t,d,r]);return[u,f,h]},Af=oNe;var Ay=c(L(),1),_6=c(te(),1),x6=c(at(),1),aR=20;function lR(e,t,o,r=""){let[n,i]=(0,Ay.useState)(1),s=(0,_6.usePrevious)(t),a=(0,_6.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let l=e.length,u=n-1,d=(0,Ay.useMemo)(()=>e.slice(u*aR,u*aR+aR),[u,e]),f=Math.ceil(e.length/aR),m=h=>{(0,x6.getScrollContainer)(o?.current)?.scrollTo(0,0),i(h)};return(0,Ay.useEffect)(function(){(0,x6.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:l,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var Za=c(C(),1);function rNe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,Za.jsx)(Rre.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,Ly.sprintf)((0,Ly._n)("%d pattern found","%d patterns found",t),t)}):null}function nNe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,fu.useRef)(),s=(0,Pre.useDebounce)(Ire.speak,500),[a,l]=Of({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=Af(l,a,t),f=(0,fu.useMemo)(()=>o.map(v=>v.name),[o]),m=(0,fu.useMemo)(()=>{let v=u.filter(y=>{if(t===Lp.name||t===Fc.name&&y.type===bo.user||t===Qg.name&&y.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let S=y.categories?.some(k=>f.includes(k))??!1;return!y.categories?.length||!S}return y.categories?.includes(t)});return e?u_(v,e):v},[e,u,t,f]);(0,fu.useEffect)(()=>{if(!e)return;let v=m.length,y=(0,Ly.sprintf)((0,Ly._n)("%d result found.","%d results found.",v),v);s(y)},[e,s,m.length]);let h=lR(m,t,i),[p,g]=(0,fu.useState)(e);e!==p&&(g(e),h.changePage(1));let b=!!m?.length;return(0,Za.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,Za.jsx)(rNe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,Za.jsx)(Cy,{children:b&&(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsx)(ql,{blockPatterns:h.categoryPatterns,onClickPattern:(v,y)=>{d(v,y),n()},isDraggable:!1}),(0,Za.jsx)(rR,{...h})]})})]})}var Ore=nNe;var w6=c(L(),1),My=c(z(),1),Are=c(_r(),1);function iNe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function Ny(e,t="all"){let[o,r]=Af(void 0,e),n=(0,w6.useMemo)(()=>t==="all"?o:o.filter(s=>!CE(s,t)),[t,o]);return(0,w6.useMemo)(()=>{let s=r.filter(a=>n.some(l=>l.categories?.includes(a.name))).sort((a,l)=>a.label.localeCompare(l.label));return n.some(a=>!iNe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,My._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(Qg),n.some(a=>a.type===bo.user)&&s.unshift(Fc),n.length>0&&s.unshift({name:Lp.name,label:Lp.label}),(0,Are.speak)((0,My.sprintf)((0,My._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var gh=c(C(),1);function sNe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,C6.useState)(""),[i,s]=(0,C6.useState)(e?.name),a=Ny(t);return(0,gh.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,gh.jsx)(kre,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,gh.jsx)(Ore,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function aNe({onModalClose:e,...t}){return(0,gh.jsx)(Lre.Modal,{title:(0,Mre.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,gh.jsx)(sNe,{onModalClose:e,...t})})}var Nre=aNe;var Dy=c(z(),1),vo=c(D(),1);var Dr=c(C(),1);function lNe({title:e}){return(0,Dr.jsx)(vo.__experimentalVStack,{spacing:0,children:(0,Dr.jsx)(vo.__experimentalView,{children:(0,Dr.jsx)(vo.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Dr.jsxs)(vo.__experimentalHStack,{spacing:2,children:[(0,Dr.jsx)(vo.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,Dy.isRTL)()?Sr:In,size:"small",label:(0,Dy.__)("Back")}),(0,Dr.jsx)(vo.__experimentalSpacer,{children:(0,Dr.jsx)(vo.__experimentalHeading,{level:5,children:e})})]})})})})}function cR({categories:e,children:t}){return(0,Dr.jsxs)(vo.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,Dr.jsx)(vo.Navigator.Screen,{path:"/",children:(0,Dr.jsx)(vo.__experimentalItemGroup,{children:e.map(o=>(0,Dr.jsx)(vo.Navigator.Button,{path:`/category/${o.name}`,as:vo.__experimentalItem,isAction:!0,children:(0,Dr.jsxs)(vo.__experimentalHStack,{children:[(0,Dr.jsx)(vo.FlexBlock,{children:o.label}),(0,Dr.jsx)(Ue,{icon:(0,Dy.isRTL)()?In:Sr})]})},o.name))})}),e.map(o=>(0,Dr.jsxs)(vo.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,Dr.jsx)(lNe,{title:(0,Dy.__)("Back")}),t(o)]},o.name))]})}var Ws=c(L(),1),E6=c(z(),1),Xa=c(D(),1);var Si=c(D(),1),ki=c(z(),1);var uR=c(L(),1);var an=c(C(),1),Dre=e=>e!=="all"&&e!=="user",cNe=e=>e.name===Fc.name,uNe=[{value:"all",label:(0,ki._x)("All","patterns")},{value:bo.directory,label:(0,ki.__)("Pattern Directory")},{value:bo.theme,label:(0,ki.__)("Theme & Plugins")},{value:bo.user,label:(0,ki.__)("User")}];function Vre({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===Fc.name?bo.user:r,a=Dre(s),l=cNe(i),u=(0,uR.useMemo)(()=>[{value:"all",label:(0,ki._x)("All","patterns")},{value:QS.full,label:(0,ki._x)("Synced","patterns"),disabled:a},{value:QS.unsynced,label:(0,ki._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),Dre(f)&&e("all")}return(0,an.jsx)(an.Fragment,{children:(0,an.jsx)(Si.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,ki.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,an.jsx)(Ue,{icon:(0,an.jsx)(Si.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,an.jsx)(Si.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,an.jsxs)(an.Fragment,{children:[!l&&(0,an.jsx)(Si.MenuGroup,{label:(0,ki.__)("Source"),children:(0,an.jsx)(Si.MenuItemsChoice,{choices:uNe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,an.jsx)(Si.MenuGroup,{label:(0,ki.__)("Type"),children:(0,an.jsx)(Si.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,an.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,uR.createInterpolateElement)((0,ki.__)("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,an.jsx)(Si.ExternalLink,{href:(0,ki.__)("https://wordpress.org/patterns/")})})})]})})})}var jn=c(C(),1),dNe=()=>{};function dR({rootClientId:e,onInsert:t,onHover:o=dNe,category:r,showTitlesAsTooltip:n}){let[i,,s]=Af(t,e,r?.name),[a,l]=(0,Ws.useState)("all"),[u,d]=(0,Ws.useState)("all"),f=Ny(e,u),m=(0,Ws.useRef)(),h=(0,Ws.useMemo)(()=>i.filter(y=>CE(y,u,a)?!1:r.name===Lp.name||r.name===Fc.name&&y.type===bo.user||r.name===Qg.name&&y.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?y.categories?!y.categories.some(S=>f.some(k=>k.name===S)):!0:y.categories?.includes(r.name)),[i,f,r.name,u,a]),p=lR(h,r,m),{changePage:g}=p;(0,Ws.useEffect)(()=>()=>o(null),[]);let b=(0,Ws.useCallback)(y=>{l(y),g(1)},[l,g]),v=(0,Ws.useCallback)(y=>{d(y),g(1)},[d,g]);return(0,jn.jsxs)(jn.Fragment,{children:[(0,jn.jsxs)(Xa.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,jn.jsxs)(Xa.__experimentalHStack,{children:[(0,jn.jsx)(Xa.FlexBlock,{children:(0,jn.jsx)(Xa.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,jn.jsx)(Vre,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:v,scrollContainerRef:m,category:r})]}),!h.length&&(0,jn.jsx)(Xa.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,E6.__)("No results found")})]}),h.length>0&&(0,jn.jsxs)(jn.Fragment,{children:[(0,jn.jsx)(Xa.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,E6.__)("Drag and drop patterns into the canvas.")}),(0,jn.jsx)(ql,{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 mR=c(te(),1),pR=c(D(),1),Fre=c(L(),1);var bh=c(C(),1),{Tabs:fR}=F(pR.privateApis);function fNe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,mR.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,mR.usePrevious)(t),l=t?t.name:null,[u,d]=(0,Fre.useState)(),f=e?.[0]?.name;return l===null&&!u&&f&&d(f),(0,bh.jsxs)(fR,{selectOnMove:!1,selectedTabId:l,orientation:"vertical",onSelect:m=>{o(e.find(h=>h.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,bh.jsx)(fR.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,bh.jsx)(fR.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,bh.jsx)(fR.TabPanel,{tabId:m.name,focusable:!1,children:(0,bh.jsx)(pR.__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 hR=fNe;var Qi=c(C(),1);function mNe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,zre.useState)(!1),a=Ny(r),l=(0,jre.useViewportMatch)("medium","<");return a.length?(0,Qi.jsxs)(Qi.Fragment,{children:[!l&&(0,Qi.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,Qi.jsx)(hR,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,Qi.jsx)(Hre.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,Ure.__)("Explore all patterns")})]}),l&&(0,Qi.jsx)(cR,{categories:a,children:u=>(0,Qi.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,Qi.jsx)(dR,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,Qi.jsx)(Nre,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,Qi.jsx)(qa,{})}var Gre=mNe;var ane=c(z(),1),lne=c(te(),1),cne=c(D(),1),yR=c(L(),1);var bR=c(D(),1),rne=c(z(),1),nne=c(te(),1);var Qre=c(D(),1),Jre=c(z(),1);var Do=c(D(),1),Ji=c(z(),1),Zl=c(L(),1),B6=c(ee(),1);var Mx=c(W(),1),Yre=c(Wi(),1),qre=c(T6(),1),Zre=c(ji(),1);var $re=c(ee(),1),Kre=c(C(),1),pNe={image:"img",video:"video",audio:"audio"};function gR(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=pNe[t],s=(0,Kre.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,$re.createBlock)(`core/${t}`,o),s]}var wt=c(C(),1),hNe=["image"],gNe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function bNe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,wt.jsx)(Do.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,Ji.__)("Options"),popoverProps:gNe,icon:Ui,children:()=>(0,wt.jsx)(Do.MenuGroup,{children:(0,wt.jsx)(Do.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:PD,children:(0,Ji.sprintf)((0,Ji.__)("Report %s"),e.mediaType)})})})}function yNe({onClose:e,onSubmit:t}){return(0,wt.jsxs)(Do.Modal,{title:(0,Ji.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,wt.jsxs)(Do.__experimentalVStack,{spacing:3,children:[(0,wt.jsx)("p",{children:(0,Ji.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,wt.jsx)("p",{children:(0,Ji.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,wt.jsxs)(Do.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,wt.jsx)(Do.FlexItem,{children:(0,wt.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,Ji.__)("Cancel")})}),(0,wt.jsx)(Do.FlexItem,{children:(0,wt.jsx)(Do.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,Ji.__)("Insert")})})]})]})}function Xre({media:e,onClick:t,category:o}){let[r,n]=(0,Zl.useState)(!1),[i,s]=(0,Zl.useState)(!1),[a,l]=(0,Zl.useState)(!1),[u,d]=(0,Zl.useMemo)(()=>gR(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,Mx.useDispatch)(Yre.store),{getSettings:h,getBlock:p}=(0,Mx.useSelect)(w),{updateBlockAttributes:g}=(0,Mx.useDispatch)(w),b=(0,Zl.useCallback)(k=>{if(a)return;let _=h(),x=(0,B6.cloneBlock)(k),{id:E,url:B,caption:P}=x.attributes;if(!E&&!_.mediaUpload){n(!0);return}if(E){t(x);return}l(!0),window.fetch(B).then(T=>T.blob()).then(T=>{let A=(0,Zre.getFilename)(B)||"image.jpg",I=new File([T],A,{type:T.type});_.mediaUpload({filesList:[I],additionalData:{caption:P},onFileChange([R]){(0,qre.isBlobURL)(R.url)||(p(x.clientId)?g(x.clientId,{...x.attributes,id:R.id,url:R.url}):(t({...x,attributes:{...x.attributes,id:R.id,url:R.url}}),m((0,Ji.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),l(!1))},allowedTypes:hNe,onError(R){f(R,{type:"snackbar",id:"inserter-notice"}),l(!1)}})}).catch(()=>{n(!0),l(!1)})},[a,h,t,m,g,f,p]),v=typeof e.title=="string"?e.title:e.title?.rendered||(0,Ji.__)("no title"),y=(0,Zl.useCallback)(()=>s(!0),[]),S=(0,Zl.useCallback)(()=>s(!1),[]);return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(By,{isEnabled:!0,blocks:[u],children:({draggable:k,onDragStart:_,onDragEnd:x})=>(0,wt.jsx)("div",{className:G("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:k,onDragStart:_,onDragEnd:x,children:(0,wt.jsxs)("div",{onMouseEnter:y,onMouseLeave:S,children:[(0,wt.jsxs)(lt.Root,{children:[(0,wt.jsx)(lt.Trigger,{render:(0,wt.jsx)(Do.Composite.Item,{render:(0,wt.jsx)("div",{"aria-label":v,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,wt.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,wt.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,wt.jsx)(Do.Spinner,{})})]})})}),(0,wt.jsx)(lt.Popup,{children:v})]}),!a&&(0,wt.jsx)(bNe,{category:o,media:e})]})})}),r&&(0,wt.jsx)(yNe,{onClose:()=>n(!1),onSubmit:()=>{t((0,B6.cloneBlock)(u)),m((0,Ji.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var P6=c(C(),1);function vNe({mediaList:e,category:t,onClick:o,label:r=(0,Jre.__)("Media List")}){return(0,P6.jsx)(Qre.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,P6.jsx)(Xre,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var ene=vNe;var mu=c(L(),1),R6=c(W(),1);function tne(e,t={}){let[o,r]=(0,mu.useState)(),[n,i]=(0,mu.useState)(!1),s=(0,mu.useRef)();return(0,mu.useEffect)(()=>{(async()=>{let a=JSON.stringify({category:e.name,...t});s.current=a,i(!0),r([]);let l=await e.fetch?.(t);a===s.current&&(r(l),i(!1))})()},[e.name,...Object.values(t)]),{mediaList:o,isLoading:n}}function one(e){let[t,o]=(0,mu.useState)([]),r=(0,R6.useSelect)(a=>F(a(w)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,R6.useSelect)(a=>{let{canInsertBlockType:l}=a(w);return{canInsertImage:l("core/image",e),canInsertVideo:l("core/video",e),canInsertAudio:l("core/audio",e)}},[e]);return(0,mu.useEffect)(()=>{(async()=>{let a=[];if(!r)return;let l=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]&&l.get(d.name)&&a.push(d)}),a.length&&o(a)})()},[n,i,s,r]),t}var Lf=c(C(),1),kNe=10;function Nx({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,nne.useDebouncedInput)(),{mediaList:s,isLoading:a}=tne(o,{per_page:i?20:kNe,search:i}),l="block-editor-inserter__media-panel",u=o.labels.search_items||(0,rne.__)("Search");return(0,Lf.jsxs)("div",{className:l,children:[(0,Lf.jsx)(bR.SearchControl,{className:`${l}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,Lf.jsx)("div",{className:`${l}-spinner`,children:(0,Lf.jsx)(bR.Spinner,{})}),!a&&!s?.length&&(0,Lf.jsx)(qa,{}),!a&&!!s?.length&&(0,Lf.jsx)(ene,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var ine=c(W(),1);function SNe({fallback:e=null,children:t}){return(0,ine.useSelect)(r=>{let{getSettings:n}=r(w);return!!n().mediaUpload},[])?t:e}var Qa=SNe;var sne=c(D(),1),_Ne=()=>null,Mf=(0,sne.withFilters)("editor.MediaUpload")(_Ne);var es=c(C(),1),xNe=["image","video","audio"];function wNe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=one(e),s=(0,lne.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",l=(0,yR.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=gR(d,f);r(m)},[r]),u=(0,yR.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,es.jsxs)(es.Fragment,{children:[!s&&(0,es.jsxs)("div",{className:`${a}-container`,children:[(0,es.jsx)(hR,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,es.jsx)(Qa,{children:(0,es.jsx)(Mf,{multiple:!1,onSelect:l,allowedTypes:xNe,render:({open:d})=>(0,es.jsx)(cne.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,ane.__)("Open Media Library")})})})]}),s&&(0,es.jsx)(cR,{categories:u,children:d=>(0,es.jsx)(Nx,{onInsert:r,rootClientId:e,category:d})})]}):(0,es.jsx)(qa,{})}var I6=wNe;var Dx=c(L(),1),Nf=c(z(),1);var kR=c(te(),1),fne=c(_r(),1),mne=c(W(),1);var une=c(D(),1),{Fill:dne,Slot:CNe}=(0,une.createSlotFill)("__unstableInserterMenuExtension");dne.Slot=CNe;var vR=dne;var _i=c(C(),1),ENe=9,TNe=[];function BNe({filterValue:e,onSelect:t,onHover:o,onHoverPattern:r,rootClientId:n,clientId:i,isAppender:s,__experimentalInsertionIndex:a,maxBlockPatterns:l,maxBlockTypes:u,showBlockDirectory:d=!1,isDraggable:f=!0,shouldFocusBlock:m=!0,prioritizePatterns:h,selectBlockOnInsert:p,isQuick:g}){let b=(0,kR.useDebounce)(fne.speak,500),{prioritizedBlocks:v}=(0,mne.useSelect)(j=>({prioritizedBlocks:j(w).getBlockListSettings(n)?.prioritizedInserterBlocks||TNe}),[n]),[y,S]=Of({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:p}),[k,_,x,E]=$d(y,S,g),[B,,P]=Af(S,y,void 0,g),T=(0,Dx.useMemo)(()=>{if(l===0)return[];let j=u_(B,e);return l!==void 0?j.slice(0,l):j},[e,B,l]),A=u;h&&T.length>2&&(A=0);let I=(0,Dx.useMemo)(()=>{if(A===0)return[];let j=k.filter(H=>H.name!=="core/block"),O=Ol(j,"frecency","desc");!e&&v.length&&(O=ZE(O,v));let M=KE(O,_,x,e);return A!==void 0?M.slice(0,A):M},[e,k,_,x,A,v]);(0,Dx.useEffect)(()=>{if(!e)return;let j=I.length+T.length,O=(0,Nf.sprintf)((0,Nf._n)("%d result found.","%d results found.",j),j);b(O)},[e,b,I,T]);let R=(0,kR.useAsyncList)(I,{step:ENe}),V=I.length>0||T.length>0,N=!!I.length&&(0,_i.jsx)(If,{title:(0,_i.jsx)(ct,{children:(0,Nf.__)("Blocks")}),children:(0,_i.jsx)(ph,{items:R,onSelect:E,onHover:o,label:(0,Nf.__)("Blocks"),isDraggable:f})}),U=!!T.length&&(0,_i.jsx)(If,{title:(0,_i.jsx)(ct,{children:(0,Nf.__)("Patterns")}),children:(0,_i.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,_i.jsx)(ql,{blockPatterns:T,onClickPattern:P,onHover:r,isDraggable:f})})});return(0,_i.jsxs)(Cy,{children:[!d&&!V&&(0,_i.jsx)(qa,{}),h?U:N,!!I.length&&!!T.length&&(0,_i.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?N:U,d&&(0,_i.jsx)(vR.Slot,{fillProps:{onSelect:E,onHover:o,filterValue:e,hasItems:V,rootClientId:y},children:j=>j.length?j:V?null:(0,_i.jsx)(qa,{})})]})}var SR=BNe;var xR=c(D(),1),pne=c(L(),1);var pu=c(C(),1),{Tabs:_R}=F(xR.privateApis);function PNe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,pu.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,pu.jsxs)(_R,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,pu.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,pu.jsx)(xR.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:vp,label:i,onClick:()=>t(),size:"compact"}),(0,pu.jsx)(_R.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,pu.jsx)(_R.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,pu.jsx)(_R.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var wR=(0,pne.forwardRef)(PNe);var CR=c(W(),1),Vy=c(L(),1);function Vx(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=F((0,CR.useDispatch)(w)),{isZoomedOut:r,isZoomOut:n}=(0,CR.useSelect)(a=>{let{isZoomOut:l}=F(a(w));return{isZoomedOut:l(),isZoomOut:l}},[]),i=(0,Vy.useRef)(!1),s=(0,Vy.useRef)(e);(0,Vy.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,Vy.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var vt=c(C(),1),gne=()=>{};function RNe({rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,onSelect:n,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:a="",shouldFocusBlock:l=!0,onPatternCategorySelection:u,onClose:d,__experimentalInitialTab:f,__experimentalInitialCategory:m},h){let{isZoomOutMode:p,hasSectionRootClientId:g}=(0,hne.useSelect)(Ie=>{let{isZoomOut:ut,getSectionRootClientId:Ne}=F(Ie(w));return{isZoomOutMode:ut(),hasSectionRootClientId:!!Ne()}},[]),[b,v,y]=(0,Fx.useDebouncedInput)(a),[S,k]=(0,Ct.useState)(null),[_,x]=(0,Ct.useState)(m),[E,B]=(0,Ct.useState)("all"),[P,T]=(0,Ct.useState)(null),A=(0,Fx.useViewportMatch)("large"),R=(0,Fx.useViewportMatch)("medium","<")?d:gne;function V(){return f||(p?"patterns":"blocks")}let[N,U]=(0,Ct.useState)(V());Vx(g&&(N==="patterns"||N==="media")&&A);let[O,M,H]=Of({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:l}),Y=(0,Ct.useRef)(),oe=(0,Ct.useCallback)((Ie,ut,Ne,Ft)=>{M(Ie,ut,Ne,Ft),n(Ie),R(),window.requestAnimationFrame(()=>{!l&&!Y.current?.contains(h.current.ownerDocument.activeElement)&&Y.current?.querySelector("button").focus()})},[M,R,n,h,l]),K=(0,Ct.useCallback)((Ie,ut,...Ne)=>{H(!1),M(Ie,{patternName:ut},...Ne),n(),R()},[M,R,n,H]),Z=(0,Ct.useCallback)(Ie=>{H(Ie),k(Ie)},[H,k]),q=(0,Ct.useCallback)((Ie,ut)=>{x(Ie),B(ut),u?.()},[x,u]),$=N==="patterns"&&!y&&!!_,Q=N==="media"&&!!P,[X,J]=(0,Ct.useState)(!1),ie=(0,Ct.useRef)(null),se=(0,Ct.useRef)(null),re=(0,Ct.useRef)(null);(0,Ct.useEffect)(()=>{let Ie=Ne=>{J(Ne.currentTarget.scrollTop>0)},ut=[ie.current,se.current,re.current].filter(Boolean);return ut.forEach(Ne=>Ne.addEventListener("scroll",Ie)),()=>{ut.forEach(Ne=>Ne.removeEventListener("scroll",Ie))}},[]);let le=(0,Ct.useMemo)(()=>N==="media"?null:(0,vt.jsxs)(vt.Fragment,{children:[(0,vt.jsx)(ER.SearchControl,{className:G("block-editor-inserter__search",{"is-scrolled":X}),onChange:Ie=>{S&&k(null),v(Ie)},value:b,label:(0,Df.__)("Search"),placeholder:(0,Df.__)("Search")}),!!y&&(0,vt.jsx)(SR,{filterValue:y,onSelect:n,onHover:Z,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:l,prioritizePatterns:N==="patterns"})]}),[N,S,k,v,b,y,n,Z,l,t,e,r,o,X]),ye=(0,Ct.useMemo)(()=>(0,vt.jsxs)(vt.Fragment,{children:[(0,vt.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,vt.jsx)(vre,{ref:Y,rootClientId:O,onInsert:oe,onHover:Z,showMostUsedBlocks:s})}),i&&(0,vt.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,vt.jsx)(ct,{render:(0,vt.jsx)("h2",{}),children:(0,Df.__)("A tip for using the block editor")}),(0,vt.jsx)(OJ,{})]})]}),[O,oe,Z,s,i]),Re=(0,Ct.useMemo)(()=>(0,vt.jsx)(Gre,{rootClientId:O,onInsert:K,onSelectCategory:q,selectedCategory:_,children:$&&(0,vt.jsx)(dR,{rootClientId:O,onInsert:K,category:_,patternFilter:E,showTitlesAsTooltip:!0})}),[O,K,q,E,_,$]),Ve=(0,Ct.useMemo)(()=>(0,vt.jsx)(I6,{rootClientId:O,selectedCategory:P,onSelectCategory:T,onInsert:oe,children:Q&&(0,vt.jsx)(Nx,{rootClientId:O,onInsert:oe,category:P})}),[O,oe,P,T,Q]),tt=Ie=>{Ie!=="patterns"&&x(null),U(Ie)},Ye=(0,Ct.useRef)();return(0,Ct.useLayoutEffect)(()=>{Ye.current&&window.requestAnimationFrame(()=>{Ye.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,vt.jsxs)("div",{className:G("block-editor-inserter__menu",{"show-panel":$||Q,"is-zoom-out":p}),ref:h,children:[(0,vt.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,vt.jsx)(wR,{ref:Ye,onSelect:tt,onClose:d,selectedTab:N,closeButtonLabel:(0,Df.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,Df.__)("Blocks"),panelRef:ie,panel:(0,vt.jsxs)(vt.Fragment,{children:[le,N==="blocks"&&!y&&ye]})},{name:"patterns",title:(0,Df.__)("Patterns"),panelRef:se,panel:(0,vt.jsxs)(vt.Fragment,{children:[le,N==="patterns"&&!y&&Re]})},{name:"media",title:(0,Df.__)("Media"),panelRef:re,panel:(0,vt.jsxs)(vt.Fragment,{children:[le,Ve]})}]})}),i&&S&&(0,vt.jsx)(ER.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,vt.jsx)(Joe,{item:S})})]})}var O6=(0,Ct.forwardRef)(RNe);function INe(e,t){return(0,vt.jsx)(O6,{...e,onPatternCategorySelection:gne,ref:t})}var bne=(0,Ct.forwardRef)(INe);var TR=c(L(),1),zx=c(z(),1),BR=c(D(),1),yne=c(W(),1);var yh=c(C(),1),ONe=6,ANe=6,LNe=2;function PR({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,TR.useState)(""),[l,u]=Of({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=$d(l,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,yne.useSelect)(g=>{let{getSettings:b,getBlockIndex:v,getBlockCount:y}=g(w),S=b(),k=v(o),_=y();return{setInserterIsOpened:S.__experimentalSetIsInserterOpened,insertionIndex:k===-1?_:k}},[o]),h=i&&d.length>ONe;(0,TR.useEffect)(()=>{f&&f(!1)},[f]);let p=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,yh.jsxs)("div",{className:G("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":f}),children:[h&&(0,yh.jsx)(BR.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,zx.__)("Search"),placeholder:(0,zx.__)("Search")}),(0,yh.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,yh.jsx)(SR,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?LNe:0,maxBlockTypes:ANe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,yh.jsx)(BR.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:p,"aria-label":(0,zx.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,zx.__)("Browse all")})]})}var MNe=50;function vne(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<MNe&&o.length>0?o:null}var Fy=c(C(),1),NNe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}},a)=>{let{as:l=RR.Button,label:u,onClick:d,...f}=s,m=u;!m&&i?m=i:!m&&n?m=(0,hu.sprintf)((0,hu._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):m||(m=(0,hu._x)("Add block","Generic label for block inserter button"));function h(p){e&&e(p),d&&d(p)}return(0,Fy.jsx)(l,{ref:a,__next40pxDefaultSize:s.as?void 0:!0,icon:Ps,label:m,tooltipPosition:"bottom",onClick:h,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,isPressed:!n&&o,disabled:t,...f})},DNe=(0,A6.forwardRef)(NNe),VNe=({clientId:e,rootClientId:t,disabled:o,isAppender:r,position:n,selectBlockOnInsert:i,shouldDirectInsert:s=!0,showInserterHelpPanel:a,__experimentalIsQuick:l,onSelectOrClose:u,onToggle:d,renderToggle:f,toggleProps:m},h)=>{let{hasItems:p,hasSingleBlockType:g,blockTitle:b,allowedBlockType:v,blockToInsert:y,appenderLabel:S,targetRootClientId:k}=(0,zy.useSelect)(j=>{let{getBlockRootClientId:O,hasInserterItems:M,getAllowedBlocks:H,getDirectInsertBlock:Y,getBlockListSettings:oe}=j(w),{getBlockVariations:K,getBlockType:Z}=j(vh.store),q=t||O(e)||void 0,$=H(q),Q=s&&Y(q),{defaultBlock:X}=oe(q)??{},J=$?.length===1&&K($[0].name,"inserter")?.length===0,ie=J?$[0]:null,se=Q||null;!se&&J&&X?.name===ie.name&&(se=X);let re=Q?Z(Q.name):null;return{hasItems:M(q),hasSingleBlockType:J,blockTitle:ie?ie.title:"",allowedBlockType:ie,blockToInsert:se,appenderLabel:vne(Q,re),targetRootClientId:q}},[t,e,s]),{insertBlock:_}=(0,zy.useDispatch)(w),{getBlock:x,getBlockIndex:E,getBlockOrder:B,getBlockRootClientId:P,getBlockSelectionEnd:T,getPreviousBlockClientId:A}=(0,zy.useSelect)(w),{getActiveBlockVariation:I,getBlockType:R}=(0,zy.useSelect)(vh.store);if(!p&&(r||k||e))return null;function V(){let j=y?.name??v.name;function O(Z){if(!Z?.length)return{};let q;if(e){let $=x(e),Q=x(A(e));$?.name===Q?.name&&(q=Q?.attributes)}else if(k){let $=x(k)?.innerBlocks?.at(-1);$?.name===j&&(q=$.attributes)}return q?Object.fromEntries(Z.filter($=>$ in q).map($=>[$,q[$]])):{}}function M(){if(e)return E(e);let Z=T();return!r&&Z&&P(Z)===k?E(Z)+1:B(k).length}let H=O(y?.attributesToCopy),Y=(0,vh.createBlock)(j,{...y?.attributes,...H});_(Y,M(),k,i),u?.(Y);let oe=R(j),K;if(oe&&(K=(0,vh.__experimentalGetBlockLabel)(oe,Y.attributes),K===oe.title&&(K=I(j,Y.attributes)?.title||K)),K){let Z=(0,hu.sprintf)((0,hu.__)("%s block added"),K);(0,kne.speak)(Z)}}function N({onToggle:j,isOpen:O}){let M={onToggle:j,isOpen:O,disabled:o||!p,blockTitle:b,hasSingleBlockType:g,appenderLabel:S,toggleProps:m};return f?f(M):(0,Fy.jsx)(DNe,{ref:h,...M})}function U({onClose:j}){return l?(0,Fy.jsx)(PR,{onSelect:O=>{let M=Array.isArray(O)&&O?.length?O[0]:O;u&&typeof u=="function"&&u(M),j()},rootClientId:k,clientId:e,isAppender:r,selectBlockOnInsert:i}):(0,Fy.jsx)(bne,{onSelect:()=>{j()},onClose:j,rootClientId:k,clientId:e,isAppender:r,showInserterHelpPanel:a})}return g||y?N({onToggle:V}):(0,Fy.jsx)(RR.Dropdown,{className:"block-editor-inserter",contentClassName:G("block-editor-inserter__popover",{"is-quick":l}),popoverProps:{position:n,shift:!0},onToggle:d,expandOnMobile:!0,headerTitle:(0,hu.__)("Add a block"),renderToggle:N,renderContent:U,onClose:u})},FNe=(0,A6.forwardRef)(VNe),$s=FNe;var jx=c(C(),1),zNe="\uFEFF";function jy({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,IR.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:h}=u(w),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,IR.useDispatch)(w);if(o||n)return null;let a=(0,Sne.decodeEntities)(r)||(0,L6.__)("Type / to choose a block"),l=()=>{i(void 0,e),s()};return(0,jx.jsxs)("div",{"data-root-client-id":e||"",className:G("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,jx.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,L6.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(OR.ENTER===u.keyCode||OR.SPACE===u.keyCode)&&l()},onClick:()=>l(),onFocus:()=>{t&&l()},children:t?a:zNe}),(0,jx.jsx)($s,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var _ne=c(D(),1),M6=c(L(),1),Hx=c(z(),1);var xne=c(Xe(),1);var AR=c(C(),1);function wne({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,AR.jsx)($s,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...s)=>{n&&typeof n=="function"&&n(...s)},renderToggle:({onToggle:s,disabled:a,isOpen:l,blockTitle:u,hasSingleBlockType:d,appenderLabel:f})=>{let m=!d,h;return f?h=f:d?h=(0,Hx.sprintf)((0,Hx._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):h=(0,Hx._x)("Add block","Generic label for block inserter button"),(0,AR.jsx)(_ne.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:G(t,"block-editor-button-block-appender"),onClick:s,"aria-haspopup":m?"true":void 0,"aria-expanded":m?l:void 0,disabled:a,label:h,showTooltip:!0,children:(0,AR.jsx)(Ue,{icon:Ps})})},isAppender:!0})}var Cne=(0,M6.forwardRef)((e,t)=>((0,xne.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),wne(e,t))),Vf=(0,M6.forwardRef)(wne);var Hy=c(C(),1);function jNe({rootClientId:e}){return(0,N6.useSelect)(o=>o(w).canInsertBlockType((0,Ene.getDefaultBlockName)(),e))?(0,Hy.jsx)(jy,{rootClientId:e}):(0,Hy.jsx)(Vf,{rootClientId:e,className:"block-list-appender__toggle"})}function Tne({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,N6.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:l}=i(w),u=s();return a()&&e===u?.rootClientId&&l(e)===0},[e]);return(0,Hy.jsx)(r,{tabIndex:-1,className:G("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,Hy.jsx)(t,{}):(0,Hy.jsx)(jNe,{rootClientId:e})})}var Hne=c(te(),1),Gx=c(W(),1),Une=c(L(),1),Gne=c(z(),1);var Uy=c(W(),1),zf=c(L(),1),NR=c(D(),1),zne=c(te(),1);var Rne=c(W(),1),Ff=c(L(),1),Ine=c(D(),1),One=c(z(),1);var Pne=c(te(),1),D6=c(at(),1),Bne=new WeakMap;function HNe(e){let t=(0,Pne.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:l}=i,u=e.current,d=Bne.get(u);d||(d=(0,D6.getScrollContainer)(u),Bne.set(u,d));let f=(0,D6.getScrollContainer)(l);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 kh=HNe;var V6=c(C(),1),UNe=Number.MAX_SAFE_INTEGER;function GNe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[l,u]=(0,Ff.useReducer)(y=>(y+1)%UNe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,Rne.useSelect)(y=>{let{getBlockListSettings:S,getBlockRootClientId:k,isBlockVisible:_}=y(w),x=k(e??t);return{orientation:S(x)?.orientation||"vertical",rootClientId:x,isVisible:_(e)&&_(t)}},[e,t]),h=dt(e),p=dt(t),g=d==="vertical",b=(0,Ff.useMemo)(()=>l<0||!h&&!p||!m?void 0:{contextElement:i==="group"?p||h:h||p,getBoundingClientRect(){let S=h?h.getBoundingClientRect():null,k=p?p.getBoundingClientRect():null,_=0,x=0,E=0,B=0;if(i==="group"){let P=k||S;x=P.top,E=0,B=P.bottom-P.top,_=s==="left"?P.left-2:P.right-2}else g?(x=S?S.bottom:k.top,E=S?S.width:k.width,B=k&&S?k.top-S.bottom:0,_=S?S.left:k.left):(x=S?S.top:k.top,B=S?S.height:k.height,(0,One.isRTL)()?(_=k?k.right:S.left,E=S&&k?S.left-k.right:0):(_=S?S.right:k.left,E=S&&k?k.left-S.right:0),E=Math.max(E,0));return new window.DOMRect(_,x,E,B)}},[h,p,l,g,m,i,s]),v=kh(n);return(0,Ff.useLayoutEffect)(()=>{if(!h)return;let y=new window.MutationObserver(u);return y.observe(h,{attributes:!0}),()=>{y.disconnect()}},[h]),(0,Ff.useLayoutEffect)(()=>{if(!p)return;let y=new window.MutationObserver(u);return y.observe(p,{attributes:!0}),()=>{y.disconnect()}},[p]),(0,Ff.useLayoutEffect)(()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",u),()=>{h.ownerDocument.defaultView?.removeEventListener("resize",u)}},[h]),!h&&!p||!m?null:(0,V6.jsx)(Ine.Popover,{ref:v,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:G("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,V6.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var LR=GNe;var Nne=c(W(),1),Dne=c(te(),1),Vne=c(D(),1);var bu=c(L(),1);var Ane=c(te(),1),Lne=c(D(),1),gu=c(L(),1);var F6=c(C(),1),WNe=Number.MAX_SAFE_INTEGER;function $Ne({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let l=dt(e),u=dt(t??e),d=(0,Ane.useMergeRefs)([a,kh(n)]),[f,m]=(0,gu.useReducer)(p=>(p+1)%WNe,0);(0,gu.useLayoutEffect)(()=>{if(!l)return;let p,g=new window.MutationObserver(()=>{p||(p=window.requestAnimationFrame(()=>{p=null,m()}))});return g.observe(l,{attributes:!0}),()=>{g.disconnect(),p&&window.cancelAnimationFrame(p)}},[l]);let h=(0,gu.useMemo)(()=>{if(!(f<0||!l||t&&!u))return{getBoundingClientRect(){return u?C3(Eb(l),Eb(u)):Eb(l)},contextElement:l}},[f,l,t,u]);return!l||t&&!u?null:(0,F6.jsx)(Lne.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:h,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:G("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var Sh=(0,gu.forwardRef)($Ne),KNe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,F6.jsx)(Sh,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),Mne=(0,gu.forwardRef)(KNe);var MR=c(C(),1);function YNe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=dt(e);return(0,MR.jsx)(Sh,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,MR.jsx)(qNe,{selectedElement:a,additionalStyles:n,children:o}):o})}function qNe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,bu.useState)(e.offsetWidth),[i,s]=(0,bu.useState)(e.offsetHeight);(0,bu.useEffect)(()=>{let l=new window.ResizeObserver(()=>{n(e.offsetWidth),s(e.offsetHeight)});return l.observe(e,{box:"border-box"}),()=>l.disconnect()},[e]);let a=(0,bu.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,MR.jsx)("div",{style:a,children:o})}var Ks=(0,bu.forwardRef)(YNe);var z6=c(C(),1),Ux={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function ZNe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,Nne.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(w),a=s(),l=i(a.rootClientId);return l.length?{clientId:l[a.index]}:{}},[]),r=(0,Dne.useReducedMotion)();return(0,z6.jsx)(Ks,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,z6.jsx)(Vne.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?Ux.show:Ux.hide,animate:Ux.show,exit:r?Ux.show:Ux.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var Fne=ZNe;var yu=c(C(),1),Gy=(0,zf.createContext)();Gy.displayName="InsertionPointOpenRefContext";function XNe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,Uy.useDispatch)(w),s=(0,zf.useContext)(Gy),a=(0,zf.useRef)(),{orientation:l,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:h,isZoomOutMode:p}=(0,Uy.useSelect)(P=>{let{getBlockOrder:T,getBlockListSettings:A,getBlockInsertionPoint:I,isBlockBeingDragged:R,getPreviousBlockClientId:V,getNextBlockClientId:N,getSettings:U,isZoomOut:j}=F(P(w)),O=I(),M=T(O.rootClientId);if(!M.length)return{};let H=M[O.index-1],Y=M[O.index];for(;R(H);)H=V(H);for(;R(Y);)Y=N(Y);let oe=U();return{previousClientId:H,nextClientId:Y,orientation:A(O.rootClientId)?.orientation||"vertical",rootClientId:O.rootClientId,isDistractionFree:oe.isDistractionFree,isInserterShown:O?.__unstableWithInserter,isZoomOutMode:j()}},[]),{getBlockEditingMode:g}=(0,Uy.useSelect)(w),b=(0,zne.useReducedMotion)();function v(P){P.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function y(P){P.target===a.current&&!s.current&&i()}function S(P){P.target!==a.current&&(s.current=!0)}let k=(0,zf.useCallback)(P=>{!P&&s.current&&(s.current=!1)},[s]),_={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},x={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(h||p&&o!=="insert")return null;let B=G("block-editor-block-list__insertion-point",l==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,yu.jsx)(LR,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,yu.jsxs)(NR.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:v,onFocus:S,className:G(B,{"is-with-inserter":m}),onHoverEnd:y,children:[(0,yu.jsx)(NR.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,yu.jsx)(NR.__unstableMotion.div,{variants:x,className:G("block-editor-block-list__insertion-point-inserter"),children:(0,yu.jsx)($s,{ref:k,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:P=>{s.current=P},onSelectOrClose:()=>{s.current=!1}})})]})})}function jne(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,Uy.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(w),l=i();return{insertionPoint:l,isVisible:s(),isBlockListEmpty:a(l?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,yu.jsx)(Fne,{...e},`${t.rootClientId}-${t.index}`):(0,yu.jsx)(XNe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function Wne(){let e=(0,Une.useContext)(Gy),t=(0,Gx.useSelect)(g=>{let b=g(w).getSettings();return b.isDistractionFree||b.isPreviewMode||F(g(w)).isZoomOut()},[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:l,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:m}=F((0,Gx.useSelect)(w)),{showInsertionPoint:h,hideInsertionPoint:p}=(0,Gx.useDispatch)(w);return(0,Hne.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 y;if(v.target.classList.contains("is-root-container")||(y=(v.target.getAttribute("data-block")?v.target:v.target.closest("[data-block]")).getAttribute("data-block")),a(y)||u(y)==="disabled"||d(y)==="core/block"||y&&f(y).layout?.isManualPlacement)return;let S=o(y),k=S?.orientation||"vertical",_=!!S?.__experimentalCaptureToolbars,x=v.clientY,E=v.clientX,P=Array.from(v.target.children).find(R=>{let V=R.getBoundingClientRect();return R.classList.contains("wp-block")&&k==="vertical"&&V.top>x||R.classList.contains("wp-block")&&k==="horizontal"&&((0,Gne.isRTL)()?V.right<E:V.left>E)});if(!P){p();return}if(!P.id&&(P=P.firstElementChild,!P)){p();return}let T=P.id.slice(6);if(!T||l(T)||m(T)||i().includes(T)&&k==="vertical"&&!_&&!s().hasFixedToolbar)return;let A=P.getBoundingClientRect();if(k==="horizontal"&&(v.clientY>A.bottom||v.clientY<A.top)||k==="vertical"&&(v.clientX>A.right||v.clientX<A.left)){p();return}let I=r(T);if(I===0){p();return}h(y,I,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,h,p,i,t])}var DR=c(W(),1),$ne=c(te(),1);var Kne=c(C(),1);function _h(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,DR.useSelect)(w),{clearSelectedBlock:r}=(0,DR.useDispatch)(w),{clearBlockSelection:n}=e();return(0,$ne.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 Yne(e){return(0,Kne.jsx)("div",{ref:_h(),...e})}var hie=c(te(),1),$y=c(L(),1),gie=c(W(),1),Eh=c(ee(),1);var qne=c(C(),1);function Zne({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Ze();return(0,qne.jsx)(Vf,{className:G({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var Xne=c(C(),1);function Qne(){let{clientId:e}=Ze();return(0,Xne.jsx)(jy,{rootClientId:e})}var FR=c(L(),1),tie=c(W(),1),VR=c(Xe(),1),oie=c(Wx(),1);var $x=new WeakMap;function QNe(){let e;return t=>((e===void 0||!(0,oie.isShallowEqual)(e,t))&&(e=t),e)}function eie(e){let[t]=(0,FR.useState)(QNe);return t(e)}function rie(e,t,o,r,n,i,s,a,l,u,d,f){let m=(0,tie.useRegistry)(),h=eie(o),p=eie(r),g=l===void 0||t==="contentOnly"?t:l;(0,FR.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=As(f?.type);b.orientation=v.getOrientation(f)}s!==void 0&&((0,VR.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,VR.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,VR.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),$x.get(m)||$x.set(m,{}),$x.get(m)[e]=b,window.queueMicrotask(()=>{let v=$x.get(m);if(Object.keys(v).length){let{updateBlockListSettings:y}=m.dispatch(w);y(v),$x.set(m,{})}})},[e,h,p,g,n,i,s,a,u,d,f,m])}var j6=c(hp(),1),zR=c(L(),1),nie=c(W(),1),iie=c(ee(),1);function sie(e,t,o,r){let n=(0,nie.useRegistry)(),i=(0,zR.useRef)(null);(0,zR.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:l,isBlockSelected:u}=n.select(w),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(w);return window.queueMicrotask(()=>{if(s)return;let m=a(e),h=m.length===0||o==="all"||o==="contentOnly",p=!(0,j6.default)(t,i.current);if(!h||!p)return;i.current=t;let g=(0,iie.synchronizeBlocksWithTemplate)(m,t);(0,j6.default)(g,m)||(f({history:"ignore"}),d(e,g,m.length===0&&r&&g.length!==0&&u(e),l()))}),()=>{s=!0}},[t,o,e,n,r])}var aie=c(ee(),1),lie=c(W(),1);function cie(e){return(0,lie.useSelect)(t=>{let o=t(w).getBlock(e);if(!o)return;let r=t(aie.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 Ch=c(W(),1),UR=c(L(),1),GR=c(te(),1),mie=c(z(),1),Wy=c(ee(),1);var H6=c(L(),1),ts=c(ee(),1),xh=c(W(),1),uie=c(at(),1);function U6(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 JNe(e,t,o,r,n,i,s,a,l){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:h}=U6(u);if(m==="inserter"){s();let p=h.map(g=>(0,ts.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(y=>y===e))return;if(a==="group"){let y=f.map(S=>l(S));i(y,!0,null,f);return}let g=d===e,b=f.length,v=g&&p<t?t-b:t;n(f,d,v)}}}function eDe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,ts.findTransform)((0,ts.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function tDe(e){return t=>{let o=(0,ts.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function jR(e,t,o={}){let{operation:r="insert",nearestSide:n="right"}=o,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:a,getBlockOrder:l,getBlocksByClientId:u,getSettings:d,getBlock:f}=(0,xh.useSelect)(w),{getGroupingBlockName:m}=(0,xh.useSelect)(ts.store),{insertBlocks:h,moveBlocksToPosition:p,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:v,removeBlocks:y}=(0,xh.useDispatch)(w),S=(0,xh.useRegistry)(),k=(0,H6.useCallback)((P,T=!0,A=0,I=[])=>{Array.isArray(P)||(P=[P]);let V=l(e)[t];if(r==="replace")v(V,P,void 0,A);else if(r==="group"){let N=f(V);n==="left"?P.push(N):P.unshift(N);let U=P.map(H=>(0,ts.createBlock)(H.name,H.attributes,H.innerBlocks)),j=P.every(H=>H.name==="core/image"),O=i("core/gallery",e),M=(0,ts.createBlock)(j&&O?"core/gallery":m(),{layout:{type:"flex",flexWrap:j&&O?null:"nowrap"}},U);v([V,...I],M,void 0,A)}else h(P,t,e,T,A)},[l,e,t,r,v,f,n,i,m,h]),_=(0,H6.useCallback)((P,T,A)=>{if(r==="replace"){let I=u(P),V=l(e)[t];S.batch(()=>{y(P,!1),v(V,I,void 0,0)})}else p(P,T,e,A)},[r,l,u,p,S,y,v,t,e]),x=JNe(e,t,s,a,_,k,b,r,f),E=eDe(e,d,g,i,k),B=tDe(k);return P=>{let T=(0,uie.getFilesFromDataTransfer)(P.dataTransfer),A=P.dataTransfer.getData("text/html");A?B(A):T.length?E(T):x(P)}}function oDe(e,t,o){let r=o==="top"||o==="bottom",{x:n,y:i}=e,s=r?n:i,a=r?i:n,l=r?t.left:t.top,u=r?t.right:t.bottom,d=t[o],f;return s>=l&&s<=u?f=s:s<u?f=l:f=u,Math.sqrt((s-f)**2+(a-d)**2)}function wh(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=oDe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function HR(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function die(e,t){return t.top<=e.y&&t.bottom>=e.y}var G6=30,rDe=120,nDe=120;function iDe(e,t,o="vertical",r={}){let n=o==="horizontal"?["left","right"]:["top","bottom"],i=0,s="before",a=1/0,l=null,u="right",{dropZoneElement:d,parentBlockOrientation:f,rootBlockIndex:m=0}=r;if(d&&f!=="horizontal"){let v=d.getBoundingClientRect(),[y,S]=wh(t,v,["top","bottom"]);if(v.height>rDe&&y<G6){if(S==="top")return[m,"before"];if(S==="bottom")return[m+1,"after"]}}let h=(0,mie.isRTL)();if(d&&f==="horizontal"){let v=d.getBoundingClientRect(),[y,S]=wh(t,v,["left","right"]);if(v.width>nDe&&y<G6){if(h&&S==="right"||!h&&S==="left")return[m,"before"];if(h&&S==="left"||!h&&S==="right")return[m+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:v,getBoundingClientRect:y,blockIndex:S,blockOrientation:k})=>{let _=y();if(!_)return;let[x,E]=wh(t,_,n),[B,P]=wh(t,_,["left","right"]),T=HR(t,_);v&&T?x=0:o==="vertical"&&k!=="horizontal"&&(T&&B<G6||!T&&die(t,_))&&(l=S,u=P),x<a&&(s=E==="bottom"||!h&&E==="right"||h&&E==="left"?"after":"before",a=x,i=S)});let p=i+(s==="after"?1:-1),g=!!e[i]?.isUnmodifiedDefaultBlock,b=!!e[p]?.isUnmodifiedDefaultBlock;return l!==null?[l,"group",u]:!g&&!b?[s==="after"?i+1:i,"insert"]:[g?i:p,"replace"]}function WR(e,t,o,r){let n=!0;if(t){let a=t?.map(({name:l})=>l);n=o.every(l=>a?.includes(l))}let s=o.map(a=>e(a)).every(a=>{let[l]=a?.parent||[];return l?l===r:!0});return n&&s}function fie(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function pie({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,Ch.useRegistry)(),[i,s]=(0,UR.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:l,getGroupingBlockName:u}=(0,Ch.useSelect)(Wy.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:p,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:v,isGroupable:y,isZoomOut:S,getSectionRootClientId:k,getBlockParents:_}=F((0,Ch.useSelect)(w)),{showInsertionPoint:x,hideInsertionPoint:E,startDragging:B,stopDragging:P}=F((0,Ch.useDispatch)(w)),T=jR(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),A=(0,GR.useThrottle)((0,UR.useCallback)((I,R)=>{v()||B();let V=p(),N=[t,..._(t,!0)];if(V.some(J=>N.includes(J)))return;let j=b(t),O=g([t])[0],M=g(V);if(!WR(a,j,M,O))return;let Y=k();if(S()&&Y!==t)return;let oe=m(t).filter(J=>!((0,Wy.hasBlockSupport)(J.name,"visibility",!0)&&J.attributes?.metadata?.blockVisibility===!1));if(oe.length===0){n.batch(()=>{s({index:0,operation:"insert"}),x(t,0,{operation:"insert"})});return}let K=oe.map(J=>{let ie=J.clientId;return{isUnmodifiedDefaultBlock:(0,Wy.isUnmodifiedDefaultBlock)(J),getBoundingClientRect:()=>{let se=R.getElementById(`block-${ie}`);return se?se.getBoundingClientRect():null},blockIndex:h(ie),blockOrientation:f(ie)?.orientation}}),Z=iDe(K,{x:I.clientX,y:I.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:h(t)}),[q,$,Q]=Z,X=K[q]?.isUnmodifiedDefaultBlock;if(!(S()&&!X&&$!=="insert")){if($==="group"){let J=oe[q],ie=[J.name,...M].every(Re=>Re==="core/image"),se=d("core/gallery",t),re=y([J.clientId,p()]),le=l(u(),"block"),ye=le&&le.find(({name:Re})=>Re==="group-row");if(ie&&!se&&(!re||!ye)||!ie&&(!re||!ye))return}n.batch(()=>{s({index:q,operation:$,nearestSide:Q});let J=["before","after"].includes($)?o:t;x(J,q,{operation:$,nearestSide:Q})})}},[v,b,t,g,p,a,k,S,m,f,e,o,h,n,B,x,d,y,l,u]),200);return(0,GR.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:T,onDragOver(I){A(I,I.currentTarget.ownerDocument)},onDragLeave(I){let{ownerDocument:R}=I.currentTarget;fie(I.relatedTarget,R)||fie(I.target,R)||(A.cancel(),E())},onDragEnd(){A.cancel(),P(),E()}})}var vu=c(C(),1),sDe={};function aDe({children:e,clientId:t}){let o=cie(t);return(0,vu.jsx)(fC,{value:o,children:e})}var lDe=(0,$y.memo)(Ix);function bie(e){let{clientId:t,allowedBlocks:o,prioritizedInserterBlocks:r,defaultBlock:n,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:a,template:l,templateLock:u,wrapperRef:d,templateInsertUpdatesSelection:f,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:h,renderAppender:p,orientation:g,placeholder:b,layout:v,name:y,blockType:S,parentLock:k,defaultLayout:_}=e;rie(t,k,o,r,n,i,s,a,u,m,g,v),sie(t,l,u,f);let x=(0,Eh.getBlockSupport)(y,"layout")||(0,Eh.getBlockSupport)(y,"__experimentalLayout")||sDe,{allowSizingOnChildren:E=!1}=x,B=v||x,P=(0,$y.useMemo)(()=>({..._,...B,...E&&{allowSizingOnChildren:!0}}),[_,B,E]),T=(0,vu.jsx)(lDe,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:h,layout:P,wrapperRef:d,placeholder:b});return!S?.providesContext||Object.keys(S.providesContext).length===0?T:(0,vu.jsx)(aDe,{clientId:t,children:T})}function cDe(e){return fP(e),(0,vu.jsx)(bie,{...e})}var $R=(0,$y.forwardRef)((e,t)=>{let o=Th({ref:t},e);return(0,vu.jsx)("div",{className:"block-editor-inner-blocks",children:(0,vu.jsx)("div",{...o})})});function Th(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Ze(),l=(0,gie.useSelect)(k=>{let{getBlockName:_,isZoomOut:x,getTemplateLock:E,getBlockRootClientId:B,getBlockEditingMode:P,getBlockSettings:T,getSectionRootClientId:A}=F(k(w));if(!i){let M=A();return{isDropZoneDisabled:x()&&M!==""}}let{hasBlockSupport:I,getBlockType:R}=k(Eh.store),V=_(i),N=P(i),U=B(i),[j]=T(i,"layout"),O=N==="disabled";if(x()){let M=A();O=i!==M}return{__experimentalCaptureToolbars:I(V,"__experimentalExposeControlsToChildren",!1),name:V,blockType:R(V),parentLock:E(U),parentClientId:U,isDropZoneDisabled:O,defaultLayout:j}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:h,isDropZoneDisabled:p,defaultLayout:g}=l,b=pie({dropZoneElement:n,rootClientId:i,parentClientId:h}),v=(0,hie.useMergeRefs)([e.ref,r||p||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),y={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:m,defaultLayout:g,...t},S=y.value&&y.onChange?cDe:bie;return{...e,ref:v,className:G(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,vu.jsx)(S,{...y,clientId:i}):(0,vu.jsx)(Ix,{...t})}}Th.save=Eh.__unstableGetInnerBlocksProps;$R.DefaultBlockAppender=Qne;$R.ButtonBlockAppender=Zne;$R.Content=()=>Th.save().children;var Kx=$R;var Yx=c(te(),1),Ky=c(W(),1),W6=c(at(),1),_n=c(Pt(),1);var yie=c(C(),1),uDe=new Set([_n.UP,_n.RIGHT,_n.DOWN,_n.LEFT,_n.ENTER,_n.BACKSPACE]);function dDe(e){let{keyCode:t,shiftKey:o}=e;return!o&&uDe.has(t)}function qx(){let e=(0,Ky.useSelect)(o=>o(w).isTyping(),[]),{stopTyping:t}=(0,Ky.useDispatch)(w);return(0,Yx.useRefEffect)(o=>{if(!e)return;let{ownerDocument:r}=o,n,i;function s(a){let{clientX:l,clientY:u}=a;n&&i&&(n!==l||i!==u)&&t(),n=l,i=u}return r.addEventListener("mousemove",s),()=>{r.removeEventListener("mousemove",s)}},[e,t])}function Zx(){let e=(0,Ky.useSelect)(i=>i(w).isTyping(),[]),{startTyping:t,stopTyping:o}=(0,Ky.useDispatch)(w),r=qx(),n=(0,Yx.useRefEffect)(i=>{if(e){let d=function(p){let{target:g}=p;h=i.ownerDocument.defaultView.setTimeout(()=>{(0,W6.isTextField)(g)||o()})},f=function(p){let{keyCode:g}=p;(g===_n.ESCAPE||g===_n.TAB)&&o()},m=function(){i.ownerDocument.defaultView.getSelection().isCollapsed||o()};var s=d,a=f,l=m;let h;return i.addEventListener("focus",d),i.addEventListener("keydown",f),i.ownerDocument.addEventListener("selectionchange",m),()=>{i.ownerDocument.defaultView.clearTimeout(h),i.removeEventListener("focus",d),i.removeEventListener("keydown",f),i.ownerDocument.removeEventListener("selectionchange",m)}}function u(d){let{type:f,target:m}=d;!(0,W6.isTextField)(m)||!i.contains(m)||f==="keydown"&&!dDe(d)||t()}return i.addEventListener("keypress",u),i.addEventListener("keydown",u),()=>{i.removeEventListener("keypress",u),i.removeEventListener("keydown",u)}},[e,t,o]);return(0,Yx.useMergeRefs)([r,n])}function fDe({children:e}){return(0,yie.jsx)("div",{ref:Zx(),children:e})}var vie=fDe;var Xx=c(D(),1),kie=c(te(),1),Sie=c(W(),1),_ie=c(L(),1),xie=c(z(),1);var KR=c(C(),1);function $6({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,_ie.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:l,blockInsertionPoint:u,blocksBeingDragged:d}=(0,Sie.useSelect)(_=>{let{getInsertionPoint:x,getBlockOrder:E,getSectionRootClientId:B,isBlockInsertionPointVisible:P,getBlockInsertionPoint:T,getDraggedBlockClientIds:A}=F(_(w)),I=B(),R=E(I);return{sectionRootClientId:I,sectionClientIds:R,insertionPoint:x(),blockInsertionPoint:T(),blockInsertionPointVisible:P(),blocksBeingDragged:A()}},[]),f=(0,kie.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||l&&u.index===0&&e===s[u.index]),o==="bottom"&&(m=g||l&&e===s[u.index-1]);let b=d[0],v=d.includes(e),y=s.indexOf(b),k=(y>0?s[y-1]:null)===e;return(v||k)&&(m=!1),(0,KR.jsx)(Xx.__unstableAnimatePresence,{children:m&&(0,KR.jsx)(Xx.__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:G("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,KR.jsx)(Xx.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,xie.__)("Drop pattern.")})})})}var Hn=c(C(),1),JT=(0,jf.createContext)();JT.displayName="IntersectionObserverContext";var YR=new WeakMap,mDe={trailing:!0};function pDe({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,Ys.useSelect)(f=>{let{getSettings:m,isTyping:h,hasBlockSpotlight:p,getEditedContentOnlySection:g}=F(f(w)),{outlineMode:b,focusMode:v,isPreviewMode:y}=m();return{isOutlineMode:b&&!h(),isFocusMode:v||p(),isPreviewMode:y,editedContentOnlySection:g()}},[]),s=(0,Ys.useRegistry)(),{setBlockVisibility:a}=(0,Ys.useDispatch)(w),l=(0,qR.useDebounce)((0,jf.useCallback)(()=>{let f={};YR.get(s).forEach(([m,h])=>{f[m]=h}),a(f)},[s]),300,mDe),u=(0,jf.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(m=>{YR.get(s)||YR.set(s,[]);for(let h of m){let p=h.target.getAttribute("data-block");YR.get(s).push([p,h.isIntersecting])}l()})},[]),d=Th({ref:(0,qR.useMergeRefs)([_h(),Wne(),Zx()]),className:G("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,Hn.jsxs)(JT.Provider,{value:u,children:[(0,Hn.jsx)("div",{...d}),!!i&&(0,Hn.jsx)(hDe,{clientId:i})]})}function hDe({clientId:e}){let{stopEditingContentOnlySection:t}=F((0,Ys.useDispatch)(w)),o=(0,Ys.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(w);return!s()||n(e)||i(e,!0)},[e]);return(0,jf.useEffect)(()=>{o||t()},[o,t]),null}function Sy(e){return(0,Hn.jsx)(aC,{value:wN,children:(0,Hn.jsx)(pDe,{...e})})}var gDe=[],bDe=new Set;function yDe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=CF}){let i=o!==!1,s=!!o,{order:a,isZoomOut:l,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,Ys.useSelect)(m=>{let{getSettings:h,getBlockOrder:p,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:v,getBlockEditingMode:y,isSectionBlock:S,isContainerInsertableToInContentOnlyMode:k,getBlockName:_,isZoomOut:x,canInsertBlockType:E}=F(m(w)),B=p(t);if(h().isPreviewMode)return{order:B,selectedBlocks:gDe,visibleBlocks:bDe};let P=g(),T=P[0],A=!t&&!T&&(!B.length||!E((0,wie.getDefaultBlockName)(),t)),I=!!(t&&T&&t===T),R=v(t);return{order:B,selectedBlocks:P,visibleBlocks:b(),isZoomOut:x(),shouldRenderAppender:(!S(t)||k(_(T),t))&&y(t)!=="disabled"&&(!R||R==="contentOnly")&&i&&!x()&&(s||I||A)}},[t,i,s]);return(0,Hn.jsxs)(n$,{value:n,children:[a.map(m=>(0,Hn.jsxs)(Ys.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[l&&(0,Hn.jsx)($6,{clientId:m,rootClientId:t,position:"top"}),(0,Hn.jsx)(tq,{rootClientId:t,clientId:m}),l&&(0,Hn.jsx)($6,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,Hn.jsx)(Tne,{tagName:r,rootClientId:t,CustomAppender:o})]})}function Ix(e){return(0,Hn.jsx)(Ys.AsyncModeProvider,{value:!1,children:(0,Hn.jsx)(yDe,{...e})})}var vv=c(W(),1),zj=c(at(),1),jj=c(D(),1),kce=c(Ma(),1),_O=c(L(),1),kv=c(ee(),1),Hj=c(_r(),1),Sv=c(z(),1);var rse=c(te(),1),nse=c(W(),1),ise=c(at(),1),Xl=c(L(),1);var os=c(z(),1),Ph=c(ee(),1),nI=c(D(),1),Zie=c(te(),1),Xie=c(W(),1),Qie=c(L(),1);var ew=c(D(),1),Aie=c(__(),1),Lie=c(Xe(),1),qy=c(L(),1);var Vr=c(D(),1),Cie=(0,Vr.createSlotFill)("InspectorControls"),vDe=(0,Vr.createSlotFill)("InspectorAdvancedControls"),kDe=(0,Vr.createSlotFill)("InspectorControlsBindings"),SDe=(0,Vr.createSlotFill)("InspectorControlsBackground"),_De=(0,Vr.createSlotFill)("InspectorControlsBorder"),xDe=(0,Vr.createSlotFill)("InspectorControlsColor"),wDe=(0,Vr.createSlotFill)("InspectorControlsFilter"),CDe=(0,Vr.createSlotFill)("InspectorControlsDimensions"),EDe=(0,Vr.createSlotFill)("InspectorControlsLayout"),TDe=(0,Vr.createSlotFill)("InspectorControlsElements"),BDe=(0,Vr.createSlotFill)("InspectorControlsPosition"),PDe=(0,Vr.createSlotFill)("InspectorControlsTypography"),RDe=(0,Vr.createSlotFill)("InspectorControlsListView"),IDe=(0,Vr.createSlotFill)("InspectorControlsStyles"),ODe=(0,Vr.createSlotFill)("InspectorControlsEffects"),ADe=(0,Vr.createSlotFill)("InspectorControlsContent"),LDe={default:Cie,advanced:vDe,background:SDe,bindings:kDe,border:_De,color:xDe,content:ADe,dimensions:CDe,effects:ODe,elements:TDe,filter:wDe,layout:EDe,list:RDe,position:BDe,settings:Cie,styles:IDe,typography:PDe},Ja=LDe,Qx=(0,Vr.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var ZR=c(L(),1);var Jx="default",xi={viewport:Jx,pseudo:Jx},Eie=(0,ZR.createContext)(xi),Tie=Eie.Provider;function qs(){return(0,ZR.useContext)(Eie)}function ku(e){return!!e?.viewport&&e.viewport!==Jx}function el(e){return!!e?.pseudo&&e.pseudo!==Jx}function Fr(e){return!ku(e)&&!el(e)}function Bie(e){return Fr(e)?[]:[e.viewport,e.pseudo].filter(t=>t&&t!==Jx)}function Bo(e,t){let o=Bie(t);return o.length?Ca(e,o):e}function xn(e,t,o){let r=Bie(t);return r.length?ge(he(e,r,o)):ge(o)}function Pie(e,t){return!t||Fr(e)?t:o=>{let r=Bo(o?.style,e)||{},n=t({style:r}),i=n&&typeof n=="object"&&!Array.isArray(n)&&Object.prototype.hasOwnProperty.call(n,"style")?n.style:n;return{style:xn(o?.style,e,i)}}}var Yy=c(D(),1),QR=c(L(),1),Rie=c(te(),1),JR=c(W(),1);var XR=c(C(),1),Iie=Symbol("ListViewContentPopover"),{Fill:Oie,Slot:MDe}=(0,Yy.createSlotFill)(Iie);function NDe(){return(0,Rie.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function eI({listViewRef:e}){let{popoverProps:t}=NDe(),o=(0,Yy.__experimentalUseSlotFills)(Iie),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,JR.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(w),f=F(u(w));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,QR.useState)(null);(0,QR.useLayoutEffect)(()=>{if(!n||!e?.current){a(null);return}let u=e.current.querySelector(`[data-block="${n}"]`);a(u)},[n,e]);let{closeListViewContentPanel:l}=F((0,JR.useDispatch)(w));return!i||!r||!s?null:(0,XR.jsx)(Yy.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:l,children:(0,XR.jsx)("div",{style:{width:"280px"},children:(0,XR.jsx)(MDe,{})})})}var Hf=c(C(),1),DDe=["content","list"];function Bh({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,Lie.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Ze(),i=Ja[t]?.Fill;if(!i)return(0,Aie.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[Sd]){let s=n.name==="core/template-part",a=DDe.includes(t);if(!(s||a))return null}return!n[Sd]&&!n[xa]?null:t==="content"&&n[aS]&&n[Sd]?n[xa]?(0,Hf.jsx)(ew.__experimentalStyleProvider,{document,children:(0,Hf.jsx)(Oie,{children:e})}):null:(0,Hf.jsx)(ew.__experimentalStyleProvider,{document,children:(0,Hf.jsx)(i,{children:s=>(0,Hf.jsx)(FDe,{fillProps:s,children:e,resetAllFilter:r})})})}function VDe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,qy.useContext)(ew.__experimentalToolsPanelContext),n=qs(),i=(0,qy.useMemo)(()=>Pie(n,e),[e,n]);return(0,qy.useEffect)(()=>{if(i&&o&&r)return o(i),()=>{r(i)}},[i,o,r]),t}function FDe({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,Hf.jsx)(VDe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,Hf.jsx)(s,{...a,children:i}),n)}var Hie=c(D(),1),Uie=c(L(),1),Gie=c(__(),1),Wie=c(Xe(),1);var Nie=c(D(),1),tI=c(W(),1),Die=c(L(),1);var Mie=c(te(),1);function Vo(){return(0,Mie.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function Zy(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 Vie=c(C(),1);function Fie({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,tI.useDispatch)(w),{getBlockAttributes:n,getBlockName:i,getMultiSelectedBlockClientIds:s,getSelectedBlockClientId:a,hasMultiSelection:l}=(0,tI.useSelect)(w),u=Vo(),d=a(),f=(0,Die.useCallback)((m=[])=>{let h={},p=l()?s():[d];p.forEach(g=>{let b=n(g)||{},{style:v}=b,y={style:v},S={attributes:b,clientId:g,name:i(g)};m.forEach(k=>{y={...y,...k(y,S)}}),y={...y,style:ge(y.style)},h[g]=y}),r(p,h,!0)},[n,i,s,l,d,r]);return(0,Vie.jsx)(Nie.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:o,resetAll:f,panelId:d,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:u,children:e},d)}var K6=c(D(),1),oI=c(L(),1),zie=c(C(),1);function jie({Slot:e,fillProps:t,...o}){let r=(0,oI.useContext)(K6.__experimentalToolsPanelContext),n=(0,oI.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[K6.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,zie.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var rI=c(C(),1);function zDe({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,Wie.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=Ja[t],a=(0,Hie.__experimentalUseSlotFills)(s?.name);if(!s)return(0,Gie.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:l}=s;return o?(0,rI.jsx)(Fie,{group:t,label:o,children:(0,rI.jsx)(jie,{...n,fillProps:r,Slot:l})}):(0,rI.jsx)(l,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var Y6=(0,Uie.forwardRef)(zDe);var q6=c(C(),1),$ie=Bh;$ie.Slot=Y6;var Uf=e=>(0,q6.jsx)(Bh,{...e,group:"advanced"});Uf.Slot=function(t){return(0,q6.jsx)(Y6,{...t,group:"advanced"})};Uf.slotName="InspectorAdvancedControls";var me=$ie;var Yie=c(W(),1),Gf=c(ee(),1),tw=c(z(),1);function Kie(e){let t=e?.style?.position?.type;return t==="sticky"?(0,tw.__)("Sticky"):t==="fixed"?(0,tw.__)("Fixed"):null}function lo(e){return(0,Yie.useSelect)(t=>{if(!e)return null;let o=t(w),{getBlockName:r,getBlockAttributes:n,__experimentalGetParsedPattern:i,getSettings:s}=o,{getBlockType:a,getActiveBlockVariation:l}=t(Gf.store),u=r(e),d=a(u);if(!d)return null;let f=n(e),{isWithinEditedContentOnlySection:m}=F(o),h=!!s()?.[Hi],p=f?.metadata?.patternName,g=m(e);if(p&&!g&&!h){let x=i(p),E=Kie(f);return{isSynced:!1,title:(0,tw.__)("Pattern"),icon:Rl,description:x?.description||(0,tw.__)("A block pattern."),anchor:f?.anchor,positionLabel:E,positionType:f?.style?.position?.type,name:x?.title||f?.metadata?.name}}let b=l(u,f),v=(0,Gf.isReusableBlock)(d)||(0,Gf.isTemplatePart)(d),S=(v?(0,Gf.__experimentalGetBlockLabel)(d,f):void 0)||d.title,k=Kie(f),_={isSynced:v,title:S,icon:d.icon,description:d.description,anchor:f?.anchor,positionLabel:k,positionType:f?.style?.position?.type,name:f?.metadata?.name};return b?{isSynced:v,title:b.title||d.title,icon:b.icon||d.icon,description:b.description||d.description,anchor:f?.anchor,positionLabel:k,positionType:f?.style?.position?.type,name:f?.metadata?.name}:_},[e])}var ow=c(C(),1),rw="position",Z6={key:"default",value:"",name:(0,os.__)("Default")},X6={key:"sticky",value:"sticky",name:(0,os._x)("Sticky","Name for the value of the CSS position property"),hint:(0,os.__)("The block will stick to the top of the window instead of scrolling.")},qie={key:"fixed",value:"fixed",name:(0,os._x)("Fixed","Name for the value of the CSS position property"),hint:(0,os.__)("The block will not move when the page is scrolled.")},jDe=["top","right","bottom","left"],HDe=["sticky","fixed"];function UDe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return HDe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,jDe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function GDe(e){let t=(0,Ph.getBlockSupport)(e,rw);return!!(t===!0||t?.sticky)}function WDe(e){let t=(0,Ph.getBlockSupport)(e,rw);return!!(t===!0||t?.fixed)}function $De(e){return!!(0,Ph.getBlockSupport)(e,rw)}function Jie(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function ese({name:e}={}){let[t,o]=ke("position.fixed","position.sticky"),r=!t&&!o;return!$De(e)||r}function KDe({style:e={},clientId:t,name:o,setAttributes:r}){let n=WDe(o),i=GDe(o),s=e?.position?.type,{firstParentClientId:a}=(0,Xie.useSelect)(h=>{let{getBlockParents:p}=h(w),g=p(t);return{firstParentClientId:g[g.length-1]}},[t]),l=lo(a),u=i&&s===X6.value&&l?(0,os.sprintf)((0,os.__)("The block will stick to the scrollable area of the parent %s block."),l.title):null,d=(0,Qie.useMemo)(()=>{let h=[Z6];return(i||s===X6.value)&&h.push(X6),(n||s===qie.value)&&h.push(qie),h},[n,i,s]),f=h=>{let g={...e,position:{...e?.position,type:h,top:h==="sticky"||h==="fixed"?"0px":void 0}};r({style:ge(g)})},m=s&&d.find(h=>h.value===s)||Z6;return d.length>1?(0,ow.jsx)(me,{group:"position",children:(0,ow.jsx)(nI.BaseControl,{help:u,children:(0,ow.jsx)(nI.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,os.__)("Position"),hideLabelFromVision:!0,describedBy:(0,os.sprintf)((0,os.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:h})=>{f(h.value)},size:"__unstable-large"})})}):null}var Q6={edit:function(t){return ese(t)?null:(0,ow.jsx)(KDe,{...t})},useBlockProps:qDe,attributeKeys:["style"],hasSupport(e){return(0,Ph.hasBlockSupport)(e,rw)}},YDe={};function qDe({name:e,style:t}){let o=(0,Ph.hasBlockSupport)(e,rw),r=ese({name:e}),n=o&&!r,i=(0,Zie.useInstanceId)(YDe),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=UDe({selector:s,style:t})||"");let l=G({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return wi({css:a}),{className:l}}var sse={placement:"top-start"},tse={...sse,flip:!1,shift:!0},ZDe={...sse,flip:!0,shift:!1};function ose(e,t,o,r,n){if(!e||!t)return tse;let i=o?.scrollTop||0,s=Eb(t),a=e.getBoundingClientRect(),l=i+a.top,u=e.ownerDocument.documentElement.clientHeight,d=l+r,f=s.top>d,m=s.height>u-r;return!n&&(f||m)?tse:ZDe}function iI({contentElement:e,clientId:t}){let o=dt(t),[r,n]=(0,Xl.useState)(0),{blockIndex:i,isSticky:s}=(0,nse.useSelect)(m=>{let{getBlockIndex:h,getBlockAttributes:p}=m(w);return{blockIndex:h(t),isSticky:Jie(p(t))}},[t]),a=(0,Xl.useMemo)(()=>{if(e)return(0,ise.getScrollContainer)(e)},[e]),[l,u]=(0,Xl.useState)(()=>ose(e,o,a,r,s)),d=(0,rse.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,Xl.useCallback)(()=>u(ose(e,o,a,r,s)),[e,o,a,r,s]);return(0,Xl.useLayoutEffect)(f,[i,f]),(0,Xl.useLayoutEffect)(()=>{if(!e||!o)return;let m=e?.ownerDocument?.defaultView;m?.addEventListener?.("resize",f);let h,p=o?.ownerDocument?.defaultView;return p?.ResizeObserver&&(h=new p.ResizeObserver(f),h.observe(o)),()=>{m?.removeEventListener?.("resize",f),h&&h.disconnect()}},[f,e,o]),{...l,ref:d}}var ase=c(W(),1);function sI(e){return(0,ase.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:l,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(w),f=n(e),m=i(f),h=f.find(g=>m[g]?.__experimentalCaptureToolbars),p=!1;if(s()){let g=a();p=l(g.rootClientId)[g.index]===e}return{capturingClientId:h,isInsertionPointVisible:p,lastClientId:u()?d():null,rootClientId:r(e)}},[e])}var aI=c(C(),1);function lse({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=sI(e),s=iI({contentElement:t?.current,clientId:e});return(0,aI.jsx)(Ks,{clientId:o||e,bottomClientId:n,className:G("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,aI.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,aI.jsx)($s,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var cce=c(W(),1),yv=c(L(),1),uce=c(Ma(),1);var nce=c(z(),1),ice=c(W(),1),Nj=c(L(),1),sce=c(te(),1),Ou=c(ee(),1),ace=c(D(),1);var Rh=c(D(),1),vse=c(W(),1),kse=c(z(),1);var mse=c(ee(),1),pse=c(D(),1),nw=c(W(),1),iw=c(L(),1),hse=c(te(),1);var use=c(at(),1),Ql=c(L(),1),lI=50,dse=25,XDe=1e3,cse=XDe*(dse/1e3);function fse(){let e=(0,Ql.useRef)(null),t=(0,Ql.useRef)(null),o=(0,Ql.useRef)(null),r=(0,Ql.useRef)(null);(0,Ql.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Ql.useCallback)(a=>{e.current=a.clientY,o.current=(0,use.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let l=o.current.scrollTop+t.current;o.current.scroll({top:l})}},dse)},[]),i=(0,Ql.useCallback)(a=>{if(!o.current)return;let l=o.current.offsetHeight,u=e.current-o.current.offsetTop,d=a.clientY-o.current.offsetTop;if(a.clientY>u){let f=Math.max(l-u-lI,0),m=Math.max(d-u-lI,0),h=f===0||m===0?0:m/f;t.current=cse*h}else if(a.clientY<u){let f=Math.max(u-lI,0),m=Math.max(u-d-lI,0),h=f===0||m===0?0:m/f;t.current=-cse*h}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var J6=c(C(),1),QDe=({appendToOwnerDocument:e,children:t,clientIds:o,cloneClassname:r,elementId:n,onDragStart:i,onDragEnd:s,fadeWhenDisabled:a=!1,dragComponent:l})=>{let{srcRootClientId:u,isDraggable:d,icon:f,visibleInserter:m,getBlockType:h}=(0,nw.useSelect)(T=>{let{canMoveBlocks:A,getBlockRootClientId:I,getBlockName:R,getBlockAttributes:V,isBlockInsertionPointVisible:N}=T(w),{getBlockType:U,getActiveBlockVariation:j}=T(mse.store),O=I(o[0]),M=R(o[0]),H=j(M,V(o[0]));return{srcRootClientId:O,isDraggable:A(o),icon:H?.icon||U(M)?.icon,visibleInserter:N(),getBlockType:U}},[o]),p=(0,iw.useRef)(!1),[g,b,v]=fse(),{getAllowedBlocks:y,getBlockNamesByClientId:S,getBlockRootClientId:k}=(0,nw.useSelect)(w),{startDraggingBlocks:_,stopDraggingBlocks:x}=(0,nw.useDispatch)(w);(0,iw.useEffect)(()=>()=>{p.current&&x()},[]);let B=dt(o[0])?.closest("body");return(0,iw.useEffect)(()=>{if(!B||!a)return;let A=(0,hse.throttle)(I=>{if(!I.target.closest("[data-block]"))return;let R=S(o),V=I.target.closest("[data-block]").getAttribute("data-block"),N=y(V),U=S([V])[0],j;if(N?.length===0){let O=k(V),M=S([O])[0],H=y(O);j=WR(h,H,R,M)}else j=WR(h,N,R,U);!j&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return B.addEventListener("dragover",A),()=>{B.removeEventListener("dragover",A)}},[o,B,a,y,S,k,h,m]),d?(0,J6.jsx)(pse.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:T=>{window.requestAnimationFrame(()=>{_(o),p.current=!0,g(T),i&&i()})},onDragOver:b,onDragEnd:()=>{x(),p.current=!1,v(),s&&s()},__experimentalDragComponent:l!==void 0?l:(0,J6.jsx)(JP,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:T,onDraggableEnd:A})=>t({draggable:!0,onDragStart:T,onDragEnd:A})}):t({draggable:!1})},cI=QDe;var bse=c(ee(),1),yse=c(D(),1);var uI=c(te(),1),dI=c(W(),1),Xy=c(L(),1),Zs=c(z(),1),ej=c(Pt(),1);var Pe=c(z(),1),Wf=(e,t)=>e==="up"?t==="horizontal"?(0,Pe.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,Pe.isRTL)()?"left":"right":"down":null;function gse(e,t,o,r,n,i,s){let a=o+1;if(e>1)return JDe(e,o,r,n,i,s);if(r&&n)return(0,Pe.sprintf)((0,Pe.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let l=Wf("down",s);if(l==="down")return(0,Pe.sprintf)((0,Pe.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(l==="left")return(0,Pe.sprintf)((0,Pe.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(l==="right")return(0,Pe.sprintf)((0,Pe.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let l=Wf("down",s);if(l==="down")return(0,Pe.sprintf)((0,Pe.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(l==="left")return(0,Pe.sprintf)((0,Pe.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(l==="right")return(0,Pe.sprintf)((0,Pe.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let l=Wf("up",s);if(l==="up")return(0,Pe.sprintf)((0,Pe.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(l==="left")return(0,Pe.sprintf)((0,Pe.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(l==="right")return(0,Pe.sprintf)((0,Pe.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let l=Wf("up",s);if(l==="up")return(0,Pe.sprintf)((0,Pe.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(l==="left")return(0,Pe.sprintf)((0,Pe.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(l==="right")return(0,Pe.sprintf)((0,Pe.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function JDe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,Pe.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=Wf("down",i);if(a==="down")return(0,Pe.sprintf)((0,Pe.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,Pe.sprintf)((0,Pe.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,Pe.sprintf)((0,Pe.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=Wf("down",i);if(a==="down")return(0,Pe.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,Pe.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,Pe.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=Wf("up",i);if(a==="up")return(0,Pe.sprintf)((0,Pe.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,Pe.sprintf)((0,Pe.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,Pe.sprintf)((0,Pe.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=Wf("up",i);if(a==="up")return(0,Pe.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,Pe.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,Pe.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var Su=c(C(),1),eVe=(e,t)=>e==="up"?t==="horizontal"?(0,Zs.isRTL)()?Sr:In:yp:e==="down"?t==="horizontal"?(0,Zs.isRTL)()?In:Sr:Zr:null,tVe=(e,t)=>e==="up"?t==="horizontal"?(0,Zs.isRTL)()?(0,Zs.__)("Move right"):(0,Zs.__)("Move left"):(0,Zs.__)("Move up"):e==="down"?t==="horizontal"?(0,Zs.isRTL)()?(0,Zs.__)("Move left"):(0,Zs.__)("Move right"):(0,Zs.__)("Move down"):null,tj=(0,Xy.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,uI.useInstanceId)(tj),s=(0,Xy.useMemo)(()=>Array.isArray(e)?e:[e],[e]),a=s.length,l=(0,uI.useViewportMatch)("small","<"),{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:h,firstIndex:p,orientation:g="vertical"}=(0,dI.useSelect)(_=>{let{getBlockIndex:x,getBlockRootClientId:E,getBlockOrder:B,getBlock:P,getBlockListSettings:T}=_(w),A=s[0],I=E(A),R=x(A),V=x(s[s.length-1]),N=B(I),U=P(A),j=R===0,O=V===N.length-1,{orientation:M}=T(I)||{};return{blockType:U?(0,bse.getBlockType)(U.name):null,isDisabled:t==="up"?j:O,rootClientId:I,firstIndex:R,isFirst:j,isLast:O,orientation:o||M}},[t,o,s]),{moveBlocksDown:b,moveBlocksUp:v}=(0,dI.useDispatch)(w),y=t==="up"?v:b,S=_=>{y(e,f),r.onClick&&r.onClick(_)},k=`block-editor-block-mover-button__description-${i}`;return(0,Su.jsxs)(Su.Fragment,{children:[(0,Su.jsx)(yse.Button,{__next40pxDefaultSize:!0,ref:n,className:G("block-editor-block-mover-button",`is-${t}-button`),icon:eVe(t,g),label:tVe(t,g),tooltipPosition:!l&&t==="down"&&g==="vertical"?"bottom":"top","aria-describedby":k,...r,onClick:d?null:S,disabled:d,accessibleWhenDisabled:!0,shortcut:t==="up"?ej.displayShortcut.secondary("t"):ej.displayShortcut.secondary("y")}),(0,Su.jsx)(ct,{id:k,children:gse(a,u&&u.title,p,m,h,t==="up"?-1:1,g)})]})}),fI=(0,Xy.forwardRef)((e,t)=>(0,Su.jsx)(tj,{direction:"up",ref:t,...e})),mI=(0,Xy.forwardRef)((e,t)=>(0,Su.jsx)(tj,{direction:"down",ref:t,...e}));var Jl=c(C(),1);function oVe({clientIds:e,hideDragHandle:t}){let{canMove:o,rootClientId:r,isFirst:n,isLast:i,orientation:s,isManualGrid:a}=(0,vse.useSelect)(l=>{let{getBlockIndex:u,getBlockListSettings:d,canMoveBlocks:f,getBlockOrder:m,getBlockRootClientId:h,getBlockAttributes:p}=l(w),g=Array.isArray(e)?e:[e],b=g[0],v=h(b),y=u(b),S=u(g[g.length-1]),k=m(v),{layout:_={}}=p(v)??{};return{canMove:f(e),rootClientId:v,isFirst:y===0,isLast:S===k.length-1,orientation:d(v)?.orientation,isManualGrid:_.type==="grid"&&_.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!o||n&&i&&!r||t&&a?null:(0,Jl.jsxs)(Rh.ToolbarGroup,{className:G("block-editor-block-mover",{"is-horizontal":s==="horizontal"}),children:[!t&&(0,Jl.jsx)(cI,{clientIds:e,fadeWhenDisabled:!0,children:l=>(0,Jl.jsx)(Rh.Button,{__next40pxDefaultSize:!0,icon:kS,className:"block-editor-block-mover__drag-handle",label:(0,kse.__)("Drag"),tabIndex:"-1",...l})}),!a&&(0,Jl.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Jl.jsx)(Rh.ToolbarItem,{children:l=>(0,Jl.jsx)(fI,{clientIds:e,...l})}),(0,Jl.jsx)(Rh.ToolbarItem,{children:l=>(0,Jl.jsx)(mI,{clientIds:e,...l})})]})]})}var pI=oVe;var xse=c(D(),1),gI=c(W(),1),bI=c(z(),1),wse=c(L(),1);var sw=c(W(),1),$f=c(L(),1);var{clearTimeout:Sse,setTimeout:rVe}=window,_se=200;function nVe({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=_se}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,sw.useSelect)(w),{toggleBlockHighlight:s}=(0,sw.useDispatch)(w),a=(0,$f.useRef)(),l=(0,sw.useSelect)(g=>g(w).getSettings().isDistractionFree,[]),u=g=>{if(g&&l)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&&Sse&&Sse(g)},h=g=>{g&&g.stopPropagation(),m(),u(!0)},p=g=>{g&&g.stopPropagation(),m(),a.current=rVe(()=>{f()&&u(!1)},r)};return(0,$f.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:h,debouncedHideGestures:p}}function Qy({ref:e,highlightParent:t=!1,debounceTimeout:o=_se}){let[r,n]=(0,$f.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=nVe({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,$f.useRef)(!1),l=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,$f.useEffect)(()=>{let u=e.current,d=()=>{l()&&(n(!0),i())},f=()=>{l()||(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 hI=c(C(),1);function Cse(){let{selectBlock:e}=(0,gI.useDispatch)(w),{parentClientId:t}=(0,gI.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:l}=F(i(w)),u=a(),d=l(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=lo(t),r=(0,wse.useRef)(),n=Qy({ref:r,highlightParent:!0});return(0,hI.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,hI.jsx)(xse.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,bI.sprintf)((0,bI.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,hI.jsx)(rt,{icon:o?.icon})})},t)}var yI=c(D(),1);var Jy=c(D(),1),iVe=(0,Jy.createSlotFill)("BlockControls"),sVe=(0,Jy.createSlotFill)("BlockControlsBlock"),aVe=(0,Jy.createSlotFill)("BlockFormatControls"),lVe=(0,Jy.createSlotFill)("BlockControlsOther"),cVe=(0,Jy.createSlotFill)("BlockControlsParent"),uVe={default:iVe,block:sVe,inline:aVe,other:lVe,parent:cVe},aw=uVe;function Ese(e,t){let o=Ze();return o[xa]?aw[e]?.Fill:o[Ag]&&t?aw.parent.Fill:null}var _u=c(C(),1);function oj({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=Ese(e,r);if(!n)return null;let i=(0,_u.jsxs)(_u.Fragment,{children:[e==="default"&&(0,_u.jsx)(yI.ToolbarGroup,{controls:t}),o]});return(0,_u.jsx)(yI.__experimentalStyleProvider,{document,children:(0,_u.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((l,[u,d])=>(0,_u.jsx)(u,{...d,children:l}),i)}})})}var lw=c(L(),1),xu=c(D(),1),Bse=c(__(),1);var rj=c(C(),1),{ComponentsContext:Tse}=F(xu.privateApis);function nj({group:e="default",...t}){let o=(0,lw.useContext)(xu.__experimentalToolbarContext),r=(0,lw.useContext)(Tse),n=(0,lw.useMemo)(()=>({forwardedContext:[[xu.__experimentalToolbarContext.Provider,{value:o}],[Tse.Provider,{value:r}]]}),[o,r]),i=aw[e],s=(0,xu.__experimentalUseSlotFills)(i.name);if(!i)return(0,Bse.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,l=(0,rj.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?l:(0,rj.jsx)(xu.ToolbarGroup,{children:l})}var ij=c(C(),1),Pse=oj;Pse.Slot=nj;var sj=e=>(0,ij.jsx)(oj,{group:"inline",...e});sj.Slot=function(t){return(0,ij.jsx)(nj,{group:"inline",...t})};var yo=Pse;var Rse=c(D(),1),{Fill:Ise,Slot:dVe}=(0,Rse.createSlotFill)("__unstableBlockToolbarLastItem");Ise.Slot=dVe;var vI=Ise;var FI=c(D(),1);var nv=c(ee(),1),Un=c(D(),1),qf=c(W(),1);var DI=c(L(),1),Qs=c(z(),1),Oae=c(Ma(),1),Eu=c(te(),1);var tv=c(W(),1),Kf=c(ee(),1);var Kse=c(L(),1),uw=c(ee(),1),cw=c(W(),1),Yse=c(Wi(),1),wu=c(z(),1);var rs=c(ee(),1),fVe="align";var Ose="__experimentalBorder",kI="color",mVe="customClassName",Ase="typography.__experimentalFontFamily",Lse="typography.fontSize",pVe="typography.lineHeight",hVe="typography.__experimentalFontStyle",gVe="typography.__experimentalFontWeight",Mse="typography.textAlign",bVe="typography.textColumns",yVe="typography.__experimentalTextDecoration",vVe="typography.__experimentalWritingMode",kVe="typography.__experimentalTextTransform",SVe="typography.__experimentalLetterSpacing",_Ve="layout",xVe=[pVe,Lse,hVe,gVe,Ase,Mse,bVe,yVe,kVe,vVe,SVe],wVe=["shadow"],CVe="spacing",EVe=[...wVe,...xVe,Ose,kI,CVe],Nse=e=>(0,rs.hasBlockSupport)(e,fVe);function Dse(e,t="any"){let o=(0,rs.getBlockSupport)(e,Ose);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var Vse=e=>{let t=(0,rs.getBlockSupport)(e,kI);return t!==null&&typeof t=="object"&&!!t.gradients},Fse=e=>{let t=(0,rs.getBlockSupport)(e,kI);return t&&t.background!==!1},zse=e=>(0,rs.hasBlockSupport)(e,Mse);var jse=e=>{let t=(0,rs.getBlockSupport)(e,kI);return t&&t.text!==!1};var Hse=e=>(0,rs.hasBlockSupport)(e,mVe,!0);var Use=e=>(0,rs.hasBlockSupport)(e,Ase);var Gse=e=>(0,rs.hasBlockSupport)(e,Lse);var Wse=e=>(0,rs.hasBlockSupport)(e,_Ve);var $se=e=>EVe.some(t=>(0,rs.hasBlockSupport)(e,t));function TVe(e){try{let t=(0,uw.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var BVe={align:Nse,borderColor:e=>Dse(e,"color"),backgroundColor:Fse,textAlign:zse,textColor:jse,gradient:Vse,className:Hse,fontFamily:Use,fontSize:Gse,layout:Wse,style:$se};function PVe(e,t){return Object.entries(BVe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function aj(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,PVe(t[r],e[r])),aj(e[r].innerBlocks,t[r].innerBlocks,o)}function ev(){let e=(0,cw.useRegistry)(),{updateBlockAttributes:t}=(0,cw.useDispatch)(w),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,cw.useDispatch)(Yse.store);return(0,Kse.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,wu.__)("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,wu.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!TVe(s)){r((0,wu.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,uw.parse)(s);if(a.length===1?e.batch(()=>{aj(i,i.map(()=>a[0]),t)}):e.batch(()=>{aj(i,a,t)}),i.length===1){let l=(0,uw.getBlockType)(i[0].name)?.title;o((0,wu.sprintf)((0,wu.__)("Pasted styles to %s."),l),{type:"snackbar"})}else o((0,wu.sprintf)((0,wu.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function qse({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,tv.useSelect)(Kf.store),i=(0,tv.useSelect)(S=>{let{canInsertBlockType:k,getBlockRootClientId:_,getBlocksByClientId:x,getDirectInsertBlock:E,canRemoveBlocks:B}=S(w),P=x(e),T=_(e[0]),A=k(r(),T),I=T?E(T):null;return{canRemove:B(e),canInsertBlock:P.every(R=>(A||!!I)&&k(R.name,T)),canCopyStyles:P.every(R=>!!R&&((0,Kf.hasBlockSupport)(R.name,"color")||(0,Kf.hasBlockSupport)(R.name,"typography"))),canDuplicate:P.every(R=>!!R&&(0,Kf.hasBlockSupport)(R.name,"multiple",!0)&&k(R.name,T))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,tv.useSelect)(w),{canRemove:l,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:h,duplicateBlocks:p,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:v}=(0,tv.useDispatch)(w),y=ev();return t({canCopyStyles:d,canDuplicate:f,canInsertBlock:u,canRemove:l,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 S=n(),k=(0,Kf.switchToBlockType)(s(e),S);k&&h(e,k)},onUngroup(){if(!e.length)return;let S=a(e[0]);S.length&&h(e,S)},onCopy(){e.length===1&&v(e[0])},async onPasteStyles(){await y(s(e))}})}var Zse=c(D(),1),RVe=(0,Zse.createSlotFill)(Symbol("NoteIconSlotFill")),SI=RVe;var Xse=c(z(),1),Qse=c(D(),1),_I=c(ee(),1),xI=c(W(),1);var Jse=c(C(),1);function IVe({clientId:e}){let t=(0,xI.useSelect)(r=>r(w).getBlock(e),[e]),{replaceBlocks:o}=(0,xI.useDispatch)(w);return!t||t.name!=="core/html"?null:(0,Jse.jsx)(Qse.MenuItem,{onClick:()=>o(e,(0,_I.rawHandler)({HTML:(0,_I.getBlockContent)(t)})),children:(0,Xse.__)("Convert to Blocks")})}var eae=IVe;var tae=c(D(),1),{Fill:oae,Slot:OVe}=(0,tae.createSlotFill)("__unstableBlockSettingsMenuFirstItem");oae.Slot=OVe;var wI=oae;var rv=c(D(),1),wae=c(ee(),1),Cae=c(W(),1);var cj=c(D(),1),uj=c(z(),1),iae=c(ee(),1),TI=c(W(),1),sae=c(Pt(),1);var rae=c(ee(),1),nae=c(W(),1);function dw(e){return(0,nae.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(w),{getGroupingBlockName:s,getBlockType:a}=t(rae.store),l=e?.length?e:r(),u=o(l),[d]=u,f=l.length===1&&n(l[0]);return{clientIds:l,isGroupable:i(l),isUngroupable:f,blocksSelection:u,groupingBlockName:s(),onUngroup:f&&a(d.name)?.transforms?.ungroup}},[e])}var CI=c(W(),1),EI=c(ee(),1),Ih=c(D(),1);var fw=c(z(),1);var Oh=c(C(),1),AVe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function LVe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=dw(),{replaceBlocks:n}=(0,CI.useDispatch)(w),{canRemove:i,variations:s}=(0,CI.useSelect)(p=>{let{canRemoveBlocks:g}=p(w),{getBlockVariations:b}=p(EI.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=p=>{let g=(0,EI.switchToBlockType)(e,o);typeof p!="string"&&(p="group"),g&&g.length>0&&(g[0].attributes.layout=AVe[p],n(t,g))},l=()=>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,Oh.jsxs)(Ih.ToolbarGroup,{children:[(0,Oh.jsx)(Ih.ToolbarButton,{icon:xS,label:(0,fw._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,Oh.jsx)(Ih.ToolbarButton,{icon:o5,label:(0,fw._x)("Row","action: convert blocks to row"),onClick:l}),m&&(0,Oh.jsx)(Ih.ToolbarButton,{icon:b5,label:(0,fw._x)("Stack","action: convert blocks to stack"),onClick:u}),h&&(0,Oh.jsx)(Ih.ToolbarButton,{icon:_S,label:(0,fw._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var lj=LVe;var Ah=c(C(),1);function aae({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,TI.useSelect)(w),{replaceBlocks:l}=(0,TI.useDispatch)(w),u=()=>{let m=(0,iae.switchToBlockType)(n,i);m&&l(e,m)},d=()=>{let m=n[0].innerBlocks;m.length&&(r&&(m=r(n[0].attributes,n[0].innerBlocks)),l(e,m))};if(!t&&!o)return null;let f=a();return(0,Ah.jsxs)(Ah.Fragment,{children:[t&&(0,Ah.jsx)(cj.MenuItem,{shortcut:f.length>1?sae.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,uj._x)("Group","verb")}),o&&(0,Ah.jsx)(cj.MenuItem,{onClick:()=>{d(),s()},children:(0,uj._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var dj=c(z(),1),uae=c(L(),1),dae=c(D(),1);var lae=c(W(),1);function ns(e){return(0,lae.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=F(t(w));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var Xs=c(z(),1),mw=c(L(),1),er=c(D(),1);var BI=c(W(),1),cae=c(ee(),1);var co=c(C(),1),MVe=["core/navigation"];function NVe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function PI({clientId:e,onClose:t}){let[o,r]=(0,mw.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=ns(e),{allowsEditLocking:a,templateLock:l,hasTemplateLock:u}=(0,BI.useSelect)(v=>{let{getBlockName:y,getBlockAttributes:S}=v(w),k=y(e),_=(0,cae.getBlockType)(k);return{allowsEditLocking:MVe.includes(k),templateLock:S(e)?.templateLock,hasTemplateLock:!!_?.attributes?.templateLock}},[e]),[d,f]=(0,mw.useState)(!!l),{updateBlockAttributes:m}=(0,BI.useDispatch)(w),h=lo(e);(0,mw.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!==!!l;return(0,co.jsx)(er.Modal,{title:(0,Xs.sprintf)((0,Xs.__)("Lock %s"),h.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,co.jsxs)("form",{onSubmit:v=>{v.preventDefault(),b&&(m([e],{lock:o,templateLock:d?NVe(o):void 0}),t())},children:[(0,co.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,co.jsx)("legend",{children:(0,Xs.__)("Select the features you want to lock")}),(0,co.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,co.jsxs)("li",{children:[(0,co.jsx)(er.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,Xs.__)("Lock all"),checked:p,indeterminate:g,onChange:v=>r({move:v,remove:v,...a?{edit:v}:{}})}),(0,co.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,co.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,co.jsx)(er.CheckboxControl,{label:(0,Xs.__)("Lock editing"),checked:!!o.edit,onChange:v=>r(y=>({...y,edit:v}))}),(0,co.jsx)(er.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Ep:Vc})]}),(0,co.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,co.jsx)(er.CheckboxControl,{label:(0,Xs.__)("Lock movement"),checked:o.move,onChange:v=>r(y=>({...y,move:v}))}),(0,co.jsx)(er.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Ep:Vc})]}),(0,co.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,co.jsx)(er.CheckboxControl,{label:(0,Xs.__)("Lock removal"),checked:o.remove,onChange:v=>r(y=>({...y,remove:v}))}),(0,co.jsx)(er.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Ep:Vc})]})]})]})}),u&&(0,co.jsx)(er.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,Xs.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,co.jsxs)(er.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,co.jsx)(er.FlexItem,{children:(0,co.jsx)(er.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Xs.__)("Cancel")})}),(0,co.jsx)(er.FlexItem,{children:(0,co.jsx)(er.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Xs.__)("Apply")})})]})]})})}var Lh=c(C(),1);function fj({clientId:e}){let{canLock:t,isLocked:o}=ns(e),[r,n]=(0,uae.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,dj.__)("Unlock"):(0,dj.__)("Lock");return(0,Lh.jsxs)(Lh.Fragment,{children:[(0,Lh.jsx)(dae.MenuItem,{icon:o?Vc:RV,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,Lh.jsx)(PI,{clientId:e,onClose:n})]})}var RI=c(z(),1),II=c(D(),1),ov=c(L(),1);var Yf=c(C(),1);function mj({clientId:e}){let{canLock:t,isLocked:o}=ns(e),[r,n]=(0,ov.useReducer)(a=>!a,!1),i=(0,ov.useRef)(!1);if((0,ov.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,RI.__)("Unlock"):(0,RI.__)("Lock");return!t&&o&&(s=(0,RI.__)("Locked")),(0,Yf.jsxs)(Yf.Fragment,{children:[(0,Yf.jsx)(II.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,Yf.jsx)(II.ToolbarButton,{disabled:!t,icon:o?Ep:Vc,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,Yf.jsx)(PI,{clientId:e,onClose:n})]})}var pj=c(z(),1),fae=c(D(),1),OI=c(ee(),1),AI=c(W(),1);var mae=c(C(),1),DVe=()=>{};function pae({clientId:e,onToggle:t=DVe}){let{blockType:o,mode:r,enabled:n}=(0,AI.useSelect)(a=>{let{getBlock:l,getBlockMode:u,getSettings:d}=a(w),f=l(e);return{mode:u(e),blockType:f?(0,OI.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,AI.useDispatch)(w);if(!o||!(0,OI.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,pj.__)("Edit as HTML"):(0,pj.__)("Edit visually");return(0,mae.jsx)(fae.MenuItem,{onClick:()=>{i(e),t()},children:s})}var yae=c(D(),1),vae=c(z(),1),kae=c(L(),1),Sae=c(W(),1),_ae=c(Ma(),1);var ol=c(D(),1),tl=c(z(),1),gae=c(L(),1),bae=c(_r(),1),LI=c(W(),1);function hae(e){return e?.trim()?.length===0}var Cu=c(C(),1);function Mh({clientId:e,onClose:t}){let[o,r]=(0,gae.useState)(),n=lo(e),{metadata:i}=(0,LI.useSelect)(b=>{let{getBlockAttributes:v}=b(w);return{metadata:v(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,LI.useDispatch)(w),a=i?.name||"",l=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===l,m=hae(o),h=d||f,p=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,v=f||m?(0,tl.sprintf)((0,tl.__)('Block name reset to: "%s".'),o):(0,tl.sprintf)((0,tl.__)('Block name changed to: "%s".'),o);(0,bae.speak)(v,"assertive"),s([e],{metadata:ge({...i,name:b})}),t()};return(0,Cu.jsx)(ol.Modal,{title:(0,tl.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,Cu.jsx)("form",{onSubmit:b=>{b.preventDefault(),h&&g()},children:(0,Cu.jsxs)(ol.__experimentalVStack,{spacing:"3",children:[(0,Cu.jsx)(ol.TextControl,{value:o??a,label:(0,tl.__)("Name"),help:u?(0,tl.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:l,onChange:r,onFocus:p}),(0,Cu.jsxs)(ol.__experimentalHStack,{justify:"right",children:[(0,Cu.jsx)(ol.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,tl.__)("Cancel")}),(0,Cu.jsx)(ol.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!h,variant:"primary",type:"submit",children:(0,tl.__)("Save")})]})]})})})}var Nh=c(C(),1);function hj({clientId:e}){let[t,o]=(0,kae.useState)(!1),r=(0,Sae.useSelect)(n=>n(_ae.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,Nh.jsxs)(Nh.Fragment,{children:[(0,Nh.jsx)(yae.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,vae.__)("Rename")}),t&&(0,Nh.jsx)(Mh,{clientId:e,onClose:()=>o(!1)})]})}var xae=c(ee(),1);function Dh(e){return{canRename:!!e&&(0,xae.getBlockSupport)(e,"renaming",!0)}}var rl=c(C(),1),{Fill:VVe,Slot:FVe}=(0,rv.createSlotFill)("BlockSettingsMenuControls"),zVe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,Cae.useSelect)(b=>{let{getBlocksByClientId:v,getBlockNamesByClientId:y,getSelectedBlockClientIds:S,getBlockEditingMode:k,canEditBlock:_}=b(w),x=t!==null?t:S();return{selectedBlocks:y(x),selectedClientIds:x,isContentOnly:k(x[0])==="contentOnly",canToggleSelectedBlocksVisibility:v(x).every(E=>(0,wae.hasBlockSupport)(E.name,"visibility",!0)),canEdit:_(x[0])}},[t]),{canLock:a}=ns(r[0]),{canRename:l}=Dh(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&l&&!n,f=i&&!n,m=dw(r),{isGroupable:h,isUngroupable:p}=m,g=(h||p)&&!n;return(0,rl.jsx)(FVe,{fillProps:{...e,canEdit:s,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!g&&!u?null:(0,rl.jsxs)(rv.MenuGroup,{children:[g&&(0,rl.jsx)(aae,{...m,onClose:e?.onClose}),s&&u&&(0,rl.jsx)(fj,{clientId:r[0]}),s&&d&&(0,rl.jsx)(hj,{clientId:r[0]}),s&&f&&(0,rl.jsx)(A3,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,rl.jsx)(pae,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function Eae({...e}){return(0,rl.jsx)(rv.__experimentalStyleProvider,{document,children:(0,rl.jsx)(VVe,{...e})})}Eae.Slot=zVe;var MI=Eae;var Tae=c(L(),1),Bae=c(D(),1),Pae=c(te(),1),Rae=c(W(),1),NI=c(z(),1);var gj=c(C(),1);function Iae({parentClientId:e,parentBlockType:t}){let o=(0,Pae.useViewportMatch)("medium","<"),{selectBlock:r}=(0,Rae.useDispatch)(w),n=(0,Tae.useRef)(),i=Qy({ref:n,highlightParent:!0});return o?(0,gj.jsx)(Bae.MenuItem,{...i,ref:n,icon:(0,gj.jsx)(rt,{icon:t.icon}),onClick:()=>r(e),children:(0,NI.sprintf)((0,NI.__)("Select parent block (%s)"),t.title)}):null}var Et=c(C(),1),jVe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function bj({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,qf.useSelect)(w),{removeBlocks:a}=(0,qf.useDispatch)(w),l=cy(),u=(0,Eu.useCopyToClipboard)(()=>(0,nv.serialize)(s(e)),()=>{switch(n){case"copy":case"copyStyles":t(),l(n,e);break;case"cut":l(n,e),a(e,i);break;default:break}}),d=o||(0,Qs.__)("Copy");return(0,Et.jsx)(Un.MenuItem,{ref:u,shortcut:r,children:d})}function yj({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,isContentOnlyListView:n,...i}){let s=t.length,a=t[0],{firstParentClientId:l,parentBlockType:u,previousBlockClientId:d,selectedBlockClientIds:f,isContentOnly:m,isZoomOut:h,canEdit:p,canMove:g,isFirst:b,isLast:v}=(0,qf.useSelect)(I=>{let{getBlockName:R,getBlockRootClientId:V,getPreviousBlockClientId:N,getSelectedBlockClientIds:U,getBlockAttributes:j,getBlockEditingMode:O,isZoomOut:M,canEditBlock:H,canMoveBlocks:Y,getBlockIndex:oe,getBlockCount:K}=F(I(w)),{getActiveBlockVariation:Z}=I(nv.store),q=V(a),$=q&&R(q);return{firstParentClientId:q,parentBlockType:q&&(Z($,j(q))||(0,nv.getBlockType)($)),previousBlockClientId:N(a),selectedBlockClientIds:U(),isContentOnly:O(a)==="contentOnly",isZoomOut:M(),canEdit:H(a),canMove:Y(t),isFirst:oe(a)===0,isLast:oe(a)===K(q)-1}},[a,t]),{getBlockOrder:y,getSelectedBlockClientIds:S}=(0,qf.useSelect)(w),{moveBlocksDown:k,moveBlocksUp:_}=(0,qf.useDispatch)(w),x=(0,qf.useSelect)(I=>{let{getShortcutRepresentation:R}=I(Oae.store);return{copy:R("core/block-editor/copy"),cut:R("core/block-editor/cut"),duplicate:R("core/block-editor/duplicate"),remove:R("core/block-editor/remove"),insertAfter:R("core/block-editor/insert-after"),insertBefore:R("core/block-editor/insert-before")}},[]),E=f.length>0;async function B(I){if(!r)return;let R=await I;R&&R[0]&&r(R[0],!1)}function P(){if(!r)return;let I=d||l;I||(I=y()[0]);let R=E&&S().length===0;r(I,R)}let A=!f?.includes(l)&&!!l;return(0,Et.jsx)(qse,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:I,canDuplicate:R,canInsertBlock:V,canRemove:N,onDuplicate:U,onInsertAfter:j,onInsertBefore:O,onRemove:M,onCopy:H,onPasteStyles:Y})=>!N&&!R&&!V&&m?null:(0,Et.jsx)(Un.DropdownMenu,{icon:Ui,label:(0,Qs.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:jVe,noIcons:!0,...i,children:({onClose:K})=>(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsxs)(Un.MenuGroup,{children:[(0,Et.jsx)(wI.Slot,{fillProps:{onClose:K}}),A&&(0,Et.jsx)(Iae,{parentClientId:l,parentBlockType:u}),g&&n&&(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)(Un.MenuItem,{icon:yp,disabled:b,accessibleWhenDisabled:!0,onClick:(0,Eu.pipe)(K,()=>{_(t,l)}),children:(0,Qs.__)("Move up")}),(0,Et.jsx)(Un.MenuItem,{icon:Zr,disabled:v,accessibleWhenDisabled:!0,onClick:(0,Eu.pipe)(K,()=>{k(t,l)}),children:(0,Qs.__)("Move down")})]}),p&&s===1&&(0,Et.jsx)(eae,{clientId:a}),!m&&(0,Et.jsx)(bj,{clientIds:t,onCopy:H,shortcut:x.copy}),N&&!m&&(0,Et.jsx)(bj,{clientIds:t,label:(0,Qs.__)("Cut"),eventType:"cut",shortcut:x.cut,__experimentalUpdateSelection:!r}),R&&(0,Et.jsx)(Un.MenuItem,{onClick:(0,Eu.pipe)(K,U,B),shortcut:x.duplicate,children:(0,Qs.__)("Duplicate")}),V&&!h&&(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)(Un.MenuItem,{onClick:(0,Eu.pipe)(K,O),shortcut:x.insertBefore,children:(0,Qs.__)("Add before")}),(0,Et.jsx)(Un.MenuItem,{onClick:(0,Eu.pipe)(K,j),shortcut:x.insertAfter,children:(0,Qs.__)("Add after")})]}),p&&s===1&&(0,Et.jsx)(SI.Slot,{fillProps:{clientId:a,onClose:K}})]}),I&&!m&&(0,Et.jsxs)(Un.MenuGroup,{children:[(0,Et.jsx)(bj,{clientIds:t,onCopy:H,label:(0,Qs.__)("Copy styles"),eventType:"copyStyles"}),p&&(0,Et.jsx)(Un.MenuItem,{onClick:Y,children:(0,Qs.__)("Paste styles")})]}),!m&&(0,Et.jsx)(MI.Slot,{fillProps:{onClose:K,count:s,firstBlockClientId:a},clientIds:t}),typeof o=="function"?o({onClose:K}):DI.Children.map(Z=>(0,DI.cloneElement)(Z,{onClose:K})),N&&(0,Et.jsx)(Un.MenuGroup,{children:(0,Et.jsx)(Un.MenuItem,{onClick:(0,Eu.pipe)(K,M,P),shortcut:x.remove,children:(0,Qs.__)("Delete")})})]})})})}var Aae=yj;var Lae=c(D(),1),HVe=(0,Lae.createSlotFill)(Symbol("NoteIconToolbarSlotFill")),VI=HVe;var iv=c(C(),1);function UVe({clientIds:e,...t}){return(0,iv.jsxs)(FI.ToolbarGroup,{children:[(0,iv.jsx)(VI.Slot,{}),(0,iv.jsx)(FI.ToolbarItem,{children:o=>(0,iv.jsx)(Aae,{clientIds:e,toggleProps:o,...t})})]})}var zI=UVe;var jI=c(D(),1),Mae=c(z(),1),HI=c(W(),1);var vj=c(C(),1);function Nae({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,HI.useSelect)(n=>!!t&&n(w).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,HI.useDispatch)(w);return o?(0,vj.jsx)(jI.ToolbarGroup,{children:(0,vj.jsx)(jI.ToolbarButton,{onClick:()=>{r(t)},children:(0,Mae.__)("Edit visually")})}):null}var UI=c(D(),1),Gn=c(L(),1),Fae=c(W(),1),zae=c(Xe(),1),Sj=c(at(),1),jae=c(Ma(),1),Hae=c(Pt(),1);var kj=c(C(),1);function GVe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function Dae(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function Vae(e){return e.contains(e.ownerDocument.activeElement)}function WVe(e){let[t]=Sj.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function $Ve(e){let[o,r]=(0,Gn.useState)(!0),n=(0,Gn.useCallback)(()=>{let i=Sj.focus.tabbable.find(e.current),s=GVe(i);s||(0,zae.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,Gn.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function KVe({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,Gn.useState)(t),[l]=(0,Gn.useState)(r),u=(0,Gn.useCallback)(()=>{WVe(e.current)},[e]);(0,jae.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,Gn.useEffect)(()=>{a&&u()},[o,a,u]),(0,Gn.useEffect)(()=>{let m=e.current,h=0;return!a&&!Vae(m)&&(h=window.requestAnimationFrame(()=>{let p=Dae(m),g=l||0;p[g]&&Vae(m)&&p[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(h),!n||!m)return;let g=Dae(m).findIndex(b=>b.tabIndex===0);n(g)}},[l,a,n,e]);let{getLastFocus:f}=F((0,Fae.useSelect)(w));(0,Gn.useEffect)(()=>{let m=e.current;if(s){let h=p=>{let g=f();p.keyCode===Hae.ESCAPE&&g?.current&&(p.preventDefault(),g.current.focus())};return m.addEventListener("keydown",h),()=>{m.removeEventListener("keydown",h)}}},[s,f,e])}function sv({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let l=(0,Gn.useRef)(),u=$Ve(l);return KVe({toolbarRef:l,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,kj.jsx)(UI.Toolbar,{label:a["aria-label"],ref:l,orientation:s,...a,children:e}):(0,kj.jsx)(UI.NavigableMenu,{orientation:s,role:"toolbar",ref:l,...a,children:e})}var Uae=c(W(),1),GI=c(ee(),1);function WI(){return(0,Uae.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(w),i=n(),s=i&&(0,GI.getBlockType)(r(i));return s&&(0,GI.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var Zf=c(D(),1),Gae=c(z(),1),Wae=c(ee(),1),$ae=c(L(),1),$I=c(W(),1);var av=c(C(),1),_j=[],YVe=6,qVe={placement:"bottom-start"};function Kae({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,$I.useSelect)(a=>{let{getBlockAttributes:l,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(w),f=l(e),m=f?.metadata?.categories||_j,h=u(e),p=m.length>0?d(h):_j;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:p}},[e]),{replaceBlocks:n}=(0,$I.useDispatch)(w),i=(0,$ae.useMemo)(()=>t.length===0||!r||r.length===0?_j:r.filter(a=>{let l=a.source==="core"||a.source?.startsWith("pattern-directory")&&a.source!=="pattern-directory/theme";return a.blocks.length===1&&!l&&o!==a.name&&a.categories?.some(u=>t.includes(u))&&(a.syncStatus==="unsynced"||!a.id)}).slice(0,YVe),[t,o,r]);if(i.length<2)return null;let s=a=>{let l=(a.blocks??[]).map(u=>(0,Wae.cloneBlock)(u));l[0].attributes.metadata={...l[0].attributes.metadata,categories:t},n(e,l)};return(0,av.jsx)(Zf.Dropdown,{popoverProps:qVe,renderToggle:({onToggle:a,isOpen:l})=>(0,av.jsx)(Zf.ToolbarGroup,{children:(0,av.jsx)(Zf.ToolbarButton,{onClick:()=>a(!l),"aria-expanded":l,children:(0,Gae.__)("Change design")})}),renderContent:()=>(0,av.jsx)(Zf.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,av.jsx)(ql,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var il=c(D(),1),xle=c(z(),1),sO=c(W(),1);var qI=c(W(),1),Qf=c(ee(),1),Qae=c(L(),1);var xj=c(KI(),1),qae=c(z(),1);function Zae(e,t){for(let o of new xj.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 YI(e)}function Xf(e,t,o){let r=new xj.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function Xae(e){return!e||e.length===0?[]:YI(e)?e:[{name:"default",label:(0,qae._x)("Default","block style"),isDefault:!0},...e]}function YI(e){return e?.find(t=>t.isDefault)}function ZVe(e,t){return(0,Qae.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,Qf.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,Qf.cloneBlock)(e)},[e,t?.example,t?.name])}function lv({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:h}=m(w),p=h(e);if(!p)return{};let g=(0,Qf.getBlockType)(p.name),{getBlockStyles:b}=m(Qf.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,qI.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,qI.useDispatch)(w),l=Xae(r),u=Zae(l,s),d=ZVe(n,i);return{onSelect:m=>{let h=Xf(s,u,m);a(e,{className:h}),t()},stylesToRender:l,activeStyle:u,genericPreviewBlock:d,className:s}}var Sw=c(ee(),1),vw=c(W(),1),iO=c(L(),1);function Jae(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 hr=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var tle=c(f_(),1);var XVe="1600px",QVe="320px",JVe=1,e5e=.25,t5e=.75,o5e="14px";function ele({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=QVe,maximumViewportWidth:n=XVe,scaleFactor:i=JVe,minimumFontSizeLimit:s}){if(s=ec(s)?s:o5e,o){let S=ec(o);if(!S?.unit||!S?.value)return null;let k=ec(s,{coerceTo:S.unit});if(k?.value&&!e&&!t&&S?.value<=k?.value)return null;if(t||(t=`${S.value}${S.unit}`),!e){let _=S.unit==="px"?S.value:S.value*16,x=Math.min(Math.max(1-.075*Math.log2(_),e5e),t5e),E=pw(S.value*x,3);k?.value&&E<k?.value?e=`${k.value}${k.unit}`:e=`${E}${S.unit}`}}let a=ec(e),l=a?.unit||"rem",u=ec(t,{coerceTo:l});if(!a||!u)return null;let d=ec(e,{coerceTo:"rem"}),f=ec(n,{coerceTo:l}),m=ec(r,{coerceTo:l});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=pw(m.value/100,3),g=pw(p,3)+l,b=100*((u.value-a.value)/h),v=pw((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${y}, ${t})`}function ec(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[,l,u]=a,d=parseFloat(l);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:pw(d,3),unit:u}:null}function pw(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function wj(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function r5e(e){let t=e?.typography??{},o=e?.layout,r=ec(o?.wideSize)?o?.wideSize:null;return wj(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function Tu(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!wj(t?.typography)&&!wj(e))return o;let r=r5e(t)?.fluid??{},n=ele({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 oc="body",hw=":root";function tc(e){if(!e.includes(","))return[e];let t=[],o="",r=0;for(let n of e){if(n==="(")r++;else if(n===")"&&r>0)r--;else if(n===","&&r===0){t.push(o),o="";continue}o+=n}return t.push(o),t}var ZI=[{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)=>Tu(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 nl(e,t){if(!e||!t)return t;let o=tc(e),r=tc(t),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function ole(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=nl(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=nl(e,s)}))}),o}function XI(e,t){return e.includes(",")?tc(e).map(n=>n+t).join(","):e+t}function Cj(e,t){let o=`.is-style-${e}`;if(!t)return o;let r=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,a,l)=>a+l+o;return tc(t).map(s=>s.replace(r,n)).join(",")}function rle(e,t){let o=`.is-style-${e}`,r=tc(t).map(n=>{let i=n.trim(),s=`${o} `;return i.startsWith(s)?i.slice(s.length):i});return Cj(e,r.join(","))}function n5e(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,tle.getCSSValueFromRawStyle)(hr(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function i5e(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 cv(e,t){if(!e||!t)return e;let o=n5e(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=i5e(o.url,t?._links?.["wp:theme-file"])),o}function nle(e,t,o=[],r="slug",n){let i=[t?hr(e,["blocks",t,...o]):void 0,hr(e,o)].filter(Boolean);for(let s of i)if(s){let a=["custom","theme","default"];for(let l of a){let u=s[l];if(u){let d=u.find(f=>f[r]===n);if(d)return r==="slug"||nle(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function s5e(e,t,o,[r,n]=[]){let i=ZI.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=nle(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,l=s[a];return Js(e,t,l)}return o}function a5e(e,t,o,r=[]){let n=(t?hr(e?.settings??{},["blocks",t,"custom",...r]):void 0)??hr(e?.settings??{},["custom",...r]);return n?Js(e,t,n):o}function Js(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=hr(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,...l]=s;return a==="preset"?s5e(e,t,o,l):a==="custom"?a5e(e,t,o,l):o}var l5e={"@mobile":"mobile","@tablet":"tablet","-current":"@current"};function ile(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function sle(e){if(!ile(e))return e;let t=e;return Object.entries(l5e).forEach(([o,r])=>{Object.hasOwn(e,r)&&(t===e&&(t={...e}),Object.hasOwn(e,o)||(t[o]=e[r]),delete t[r])}),Object.entries(t).forEach(([o,r])=>{if(!ile(r))return;let n=sle(r);n!==r&&(t===e&&(t={...e}),t[o]=n)}),t}function gw(e){if(!e?.styles)return e;let t=sle(e.styles);return t===e.styles?e:{...e,styles:t}}var fle=c(QI(),1);function ule(e){return Object.prototype.toString.call(e)==="[object Object]"}function dle(e){var t,o;return ule(e)===!1?!1:(t=e.constructor,t===void 0?!0:(o=t.prototype,!(ule(o)===!1||o.hasOwnProperty("isPrototypeOf")===!1)))}function JI(e,t){return(0,fle.default)(gw(e),gw(t),{isMergeableObject:dle,customMerge:o=>{if(o==="backgroundImage")return(r,n)=>n??r}})}var Wn=c(ee(),1),yw=c(f_(),1),ble=c(W(),1);function is(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,l=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("/","-"),l==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=r?u:null;if(a)return hr(i,`${l}.root`,null)||hr(i,l,null)||m;let h=s?hr(s,`${l}.__experimentalSelector`,null):void 0;return h?nl(u,h):m}let f;return a&&(f=hr(i,l,null)),f||(r?is(e,d[0],o):null)}function dv(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 Ej(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function _5e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function Tj(e,t="0"){let o=_5e(e);if(!o)return null;let r=Ej(o?.top)||t,n=Ej(o?.left)||t;return r===n?r:`${r} ${n}`}var mle={backgroundSize:"cover",backgroundPosition:"50% 50%"};function ple(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:mle.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:mle.backgroundPosition}),t}var hle={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 x5e={button:"wp-element-button",caption:"wp-element-caption"},w5e={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},yle={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},C5e={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]},vle={"@mobile":"@media (width <= 480px)","@tablet":"@media (480px < width <= 782px)"};function E5e(e="*",t={}){return ZI.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=hr(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:l})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${dv(l)}-${u}`,m=e.split(",").map(p=>`${p}${f}`).join(","),h=`var(--wp--preset--${n}--${dv(l)})`;o+=`${m}{${d}: ${h} !important;}`})})}),o},"")}var T5e=(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],l={...e};return delete l[i],l[s]=a,l}return e},B5e=(e,t)=>{let o=".wp-block-button";if(!(o in e))return e;let r={...e};return r[o]=r[o].map(n=>{let i=n.match(/^width:\s*(.+)$/);if(!i)return n;let s=i[1],a=null;s.endsWith("%")&&(a=parseFloat(s));let l="var(--wp--preset--dimension--";if(a===null&&s.startsWith(l)&&s.endsWith(")")){let u=s.slice(l.length,-1),d={...t?.dimensions?.dimensionSizes??{},...t?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(let f of Object.values(d))if(Array.isArray(f)){for(let m of f)if(m.slug===u&&typeof m.size=="string"&&m.size.endsWith("%")){a=parseFloat(m.size);break}if(a!==null)break}}return a===null||isNaN(a)?n:`width: calc(${a} * 1% - (var(--wp--style--block-gap, 0.5em) * (1 - ${a} / 100)))`}),r},P5e=(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 l={[r]:{[s]:t[r][s]}},u=tO(l);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]},l=tO(a);o[s]=[...o[s]||[],...l],delete t[r]}}),o};function tO(e={},t="",o,r={},n=!1){let i=oc===t,s=Object.entries(Wn.__EXPERIMENTAL_STYLE_PROPERTY).reduce((l,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return l;let p=d;if(p[0]==="elements"||m)return l;let g=hr(e,p);if(u==="--wp--style--root--padding"&&(typeof g=="string"||!o))return l;if(f&&typeof g!="string")Object.entries(f).forEach(b=>{let[v,y]=b;if(!hr(g,[y],!1))return;let S=v.startsWith("--")?v:dv(v);l.push(`${S}: ${(0,yw.getCSSValueFromRawStyle)(hr(g,[y]))}`)});else if(hr(e,p,!1)){let b=u.startsWith("--")?u:dv(u);l.push(`${b}: ${(0,yw.getCSSValueFromRawStyle)(hr(e,p))}`)}return l},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=cv(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...ple(e.background)}})),(0,yw.getCSSRules)(e).forEach(l=>{if(i&&(o||n)&&l.key.startsWith("padding"))return;let u=l.key.startsWith("--")?l.key:dv(l.key),d=cv(l.value,r);u==="font-size"&&(d=Tu({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function kle({layoutDefinitions:e=hle,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?Tj(t?.spacing?.blockGap):"";if(n&&(o===oc?a=a||"0.5em":!r&&i&&(a=i)),a&&e&&(Object.values(e).forEach(({className:l,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===oc?`:root :where(.${l})${f?.selector||""}`:`:root :where(${o}-${l})${f?.selector||""}`:h=o===oc?`:where(.${l}${f?.selector||""})`:`:where(${o}.${l}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),o===oc&&r&&(s+=`${hw} { --wp--style--block-gap: ${a}; }`)),o===oc&&e){let l=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&l.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 R5e=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function I5e(e){return eO(e)}function eO(e,t){if(!e)return{};let o=Object.entries(e),r=t?yle[t]??[]:[],i=o.filter(([s])=>R5e.includes(s)||r.includes(s)||vle[s]).map(([s,a])=>[s,JSON.parse(JSON.stringify(a))]);return Object.fromEntries(i)}function gle(e){let{styles:t,selector:o,featureSelectors:r,name:n,elementName:i,mediaQuery:s,variationName:a}=e,l=n?yle[n]??[]:C5e[i??""]??[];return l.length?l.flatMap(u=>{let d=t?.[u];return!d||typeof d!="object"?[]:[{styles:JSON.parse(JSON.stringify(d)),selector:o,selectorSuffix:u,mediaQuery:s,featureSelectors:r&&typeof r!="string"?r:void 0,name:n,elementName:i,variationName:a}]}):[]}function O5e(e){let{styles:t,selector:o,featureSelectors:r,name:n,elementName:i,isStyleVariation:s,variationName:a}=e;return!n&&!i?[]:Object.entries(vle).flatMap(([l,u])=>{let d=t?.[l];return!d||typeof d!="object"?[]:[{styles:JSON.parse(JSON.stringify(d)),selector:o,mediaQuery:u,featureSelectors:r&&typeof r!="string"?r:void 0,name:n,elementName:i,isStyleVariation:s,variationName:a}]})}var A5e=(e,t)=>{let o=[];if(!e?.styles)return o;let r=I5e(e.styles);return r&&o.push({styles:r,selector:oc,skipSelectorWrapper:!0}),Object.entries(Wn.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,elementName:n,skipSelectorWrapper:!x5e[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=eO(i,n),a=i,l=[],u=[];a?.variations&&Object.entries(a.variations).forEach(([d,f])=>{let m=f,h=eO(m,n);m?.css&&(h.css=m.css);let p=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;if(p&&typeof t!="string"){let g=t[n];u.push({styles:h,selector:p,featureSelectors:g?.featureSelectors,fallbackGapValue:g?.fallbackGapValue,hasLayoutSupport:g?.hasLayoutSupport,isStyleVariation:!0,variationName:d,layoutSelector:p+g.selector,layoutHasBlockGapSupport:!0,name:n})}Object.entries(m?.elements??{}).forEach(([g,b])=>{b&&Wn.__EXPERIMENTAL_ELEMENTS[g]&&l.push({styles:b,selector:nl(p,Wn.__EXPERIMENTAL_ELEMENTS[g]),elementName:g,isStyleVariation:!0})}),Object.entries(m?.blocks??{}).forEach(([g,b])=>{let v=typeof t!="string"?nl(p,t[g]?.selector):void 0,y=typeof t!="string"?nl(p,t[g]?.duotoneSelector):void 0,S=typeof t!="string"?ole(p,t[g]?.featureSelectors??{}):void 0,k=eO(b,g);b?.css&&(k.css=b.css),!(!v||typeof t=="string")&&(l.push({selector:v,name:g,isStyleVariation:!0,duotoneSelector:y,featureSelectors:S,fallbackGapValue:t[g]?.fallbackGapValue,hasLayoutSupport:t[g]?.hasLayoutSupport,styles:k}),Object.entries(b.elements??{}).forEach(([_,x])=>{x&&Wn.__EXPERIMENTAL_ELEMENTS[_]&&l.push({styles:x,selector:nl(v,Wn.__EXPERIMENTAL_ELEMENTS[_]),elementName:_,isStyleVariation:!0})}))})}),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,name:n}),o.push(...u),Object.entries(a?.elements??{}).forEach(([d,f])=>{typeof t!="string"&&f&&t?.[n]&&Wn.__EXPERIMENTAL_ELEMENTS[d]&&o.push({styles:f,selector:t[n]?.selector.split(",").map(m=>Wn.__EXPERIMENTAL_ELEMENTS[d].split(",").map(p=>m+" "+p)).join(","),elementName:d})}),o.push(...l)}),o},L5e=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return ZI.forEach(({path:l})=>{let u=hr(s,l,!1);u!==!1&&(a=Jae(a,l,u))}),a},n=r(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&o.push({presets:n,custom:i,selector:hw}),Object.entries(e.settings?.blocks??{}).forEach(([s,a])=>{let l=a.custom;if(typeof t=="string"||!t[s])return;let u=r(a);(Object.keys(u).length>0||l)&&o.push({presets:u,custom:l,selector:t[s]?.selector,featureSelectors:t[s]?.featureSelectors})}),o};function M5e(e,{tree:t,useRootPaddingAlign:o,disableLayoutStyles:r,hasBlockGapSupport:n,hasFallbackGapSupport:i,disableRootPadding:s}){let{selector:a,selectorSuffix:l,mediaQuery:u,duotoneSelector:d,styles:f,fallbackGapValue:m,hasLayoutSupport:h,featureSelectors:p,layoutSelector:g,layoutHasBlockGapSupport:b,skipSelectorWrapper:v,name:y,variationName:S}=e,k="",_=l?XI(a,l):a;if(p&&typeof p!="string"){let P=P5e(p,f);P=T5e(P,t.settings,y),P=B5e(P,t.settings),Object.entries(P).forEach(([T,A])=>{if(A.length){let I=S?rle(S,T):T;I=l?XI(I,l):I;let R=A.join(";");k+=`:root :where(${I}){${R};}`}})}if(d){let P={};f?.filter&&(P.filter=f.filter,delete f.filter);let T=tO(P);T.length&&(k+=`${d}{${T.join(";")};}`)}let x=g??_;!r&&(oc===x||h)&&(k+=kle({style:f,selector:x,hasBlockGapSupport:b??n,hasFallbackGapSupport:i,fallbackGapValue:m}));let B=tO(f,_,o,t,s);if(B?.length){let P=v?_:`:root :where(${_})`;k+=`${P}{${B.join(";")};}`}return f?.css&&(k+=nO(f.css,`:root :where(${_})`)),u&&k?`${u}{${k}}`:k}var oO=(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},l=gw(e),u=A5e(l,t),d=L5e(l,t),f=l?.settings?.useRootPaddingAwareAlignments,{contentSize:m,wideSize:h}=l?.settings?.layout||{},p=a.marginReset||a.rootPadding||a.layoutStyles,g="";if(a.presets&&(m||h)&&(g+=`${hw} {`,g=m?g+` --wp--style--global--content-size: ${m};`:g,g=h?g+` --wp--style--global--wide-size: ${h};`:g,g+="}"),p&&(g+=":where(body) {margin: 0;",a.rootPadding&&f&&(g+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
82 .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
83 .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
84 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
85 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
86 `),g+="}"),a.blockStyles&&u.forEach(b=>{if(b.isStyleVariation&&!a.variationStyles)return;let v=O5e(b);[b,...v,...gle(b),...v.flatMap(gle)].forEach(y=>{g+=M5e(y,{tree:l,useRootPaddingAlign:f,disableLayoutStyles:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,disableRootPadding:i})})}),a.layoutStyles&&(g=g+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g=g+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g=g+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let b=Tj(l?.styles?.spacing?.blockGap)||"0.5em";g=g+`:root :where(.wp-site-blocks) > * { margin-block-start: ${b}; margin-block-end: 0; }`,g=g+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g=g+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&d.forEach(({selector:b,presets:v})=>{(oc===b||hw===b)&&(b="");let y=E5e(b,v);y.length>0&&(g+=y)}),g};var N5e=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(w5e).forEach(([r,n])=>{let i=is(e,r);i&&(o[n]=i)}),o},rO=(e,t)=>{let{getBlockStyles:o}=(0,ble.select)(Wn.store),r={};return e.forEach(n=>{let i=n.name,s=is(n);if(!s)return;let a=is(n,"filter.duotone");if(!a){let h=is(n),p=(0,Wn.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof p=="string"&&h&&(a=nl(h,p))}let l=!!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=Cj(g,s);f[g]=b});let m=N5e(n,s);r[i]={duotoneSelector:a??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:l,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),r};function nO(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,l]=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(" ")?nl(t,f):XI(t,f),o+=`:root :where(${m})${d}{${l.trim()}}`}}),o}var kw=c(C(),1),Bj="is-style-";function Sle(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(Bj)){let r=o.slice(Bj.length);r!=="default"&&t.push(r)}return t},[]):[]}function Pj(e,t=[]){let o=Sle(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function D5e({override:e}){Bu(e)}function Rj({config:e}){let{overrides:t}=(0,vw.useSelect)(n=>({overrides:F(n(w)).getStyleOverrides()}),[]),{getBlockName:o}=(0,vw.useSelect)(w),r=(0,iO.useMemo)(()=>{if(!t?.length)return;let n=[],i=[];for(let[,s]of t)if(s?.variation&&s?.clientId&&!i.includes(s.clientId)){let a=o(s.clientId),l=e?.styles?.blocks?.[a]?.variations?.[s.variation];if(l){let u={settings:e?.settings,styles:{blocks:{[a]:{variations:{[`${s.variation}-${s.clientId}`]:l}}}}},d=rO((0,Sw.getBlockTypes)(),s.clientId),g=oO(u,d,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});n.push({id:`${s.variation}-${s.clientId}`,css:g,__unstableType:"variation",variation:s.variation,clientId:s.clientId}),i.push(s.clientId)}}return n},[e,t,o]);return!r||!r.length?null:(0,kw.jsx)(kw.Fragment,{children:r.map(n=>(0,kw.jsx)(D5e,{override:n},n.id))})}function Ij(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 l=Ca(e,a.ref);l?i[s]=l: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 V5e(e,t,o){let{globalSettings:r,globalStyles:n}=(0,vw.useSelect)(i=>{let s=i(w).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[ai]}},[]);return(0,iO.useMemo)(()=>{let i=Ij({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function F5e({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,vw.useSelect)(Sw.store),n=r(e),i=Pj(t,n),s=`${Bj}${i}-${o}`,{settings:a,styles:l}=V5e(e,i,o),u=(0,iO.useMemo)(()=>{if(!i)return;let d={settings:a,styles:l},f=rO((0,Sw.getBlockTypes)(),o);return oO(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})},[i,a,l,o]);return Bu({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var _le={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>Sle(e).length>0,useBlockProps:F5e};var Jf=c(C(),1),z5e=(0,Jf.jsxs)(il.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,Jf.jsx)(il.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,Jf.jsx)(il.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 j5e({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=lv({clientId:e}),{updateBlockAttributes:n}=(0,sO.useDispatch)(w),{globalSettings:i,globalStyles:s,blockName:a}=(0,sO.useSelect)(d=>{let f=d(w).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[ai],blockName:d(w).getBlockName(e)}},[e]),l=o?.name?Ij({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,Jf.jsx)(il.ToolbarGroup,{children:(0,Jf.jsx)(il.ToolbarButton,{onClick:()=>{let f=(t.findIndex(p=>p.name===o.name)+1)%t.length,m=t[f],h=Xf(r,o,m);n(e,{className:h})},label:(0,xle.__)("Shuffle styles"),children:(0,Jf.jsx)(il.Icon,{icon:z5e,style:{fill:l||"transparent"}})})})}var wle=j5e;var cO=c(D(),1),Oj=c(z(),1),Cle=c(W(),1),uO=c(ee(),1);var aO=c(W(),1);function lO(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,aO.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:h}=F(u(w)),p=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:h(e),isEditingContentOnlySection:p===e,editedContentOnlySection:p}},[e]),s=(0,aO.useDispatch)(w),{editContentOnlySection:a,stopEditingContentOnlySection:l}=F(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:l}}var Aj=c(C(),1);function Ele({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=lO(e),i=(0,Cle.useSelect)(l=>{if(!e)return null;let{getBlockName:u}=l(w),d=u(e);return d?{name:d}:null},[e]);if(!e||!t&&!o||(0,uO.isReusableBlock)(i)||(0,uO.isTemplatePart)(i))return null;let s=o;return(0,Aj.jsx)(cO.ToolbarGroup,{children:(0,Aj.jsx)(cO.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,Oj.__)("Exit pattern"):(0,Oj.__)("Edit pattern")})})}var Jle=c(D(),1),ece=c(z(),1),tce=c(W(),1);var Ew=c(ee(),1),oce=c(tb(),1);var rc=c(z(),1),nc=c(D(),1),tm=c(ee(),1),yO=c(W(),1);var Ale=c(z(),1),xw=c(D(),1),fO=c(ee(),1),mO=c(L(),1);var Tle=c(D(),1),Ble=c(te(),1);var _w=c(C(),1);function em({blocks:e,placement:t="right-start",offset:o=16,anchor:r}){return(0,Ble.useViewportMatch)("medium","<")?null:(0,_w.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,_w.jsx)(Tle.Popover,{className:"block-editor-block-switcher__popover-preview",placement:t,focusOnMount:!1,offset:o,anchor:r,children:(0,_w.jsx)("div",{className:"block-editor-block-switcher__preview",children:(0,_w.jsx)(yi,{viewportWidth:601,blocks:e})})})})}var Ple=c(D(),1),fv=c(ee(),1),Rle=c(W(),1),dO=c(L(),1);var Pu=c(C(),1),H5e={};function Ile({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,Rle.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(w),{getActiveBlockVariation:l,getBlockVariations:u}=i(fv.store),d=a(e);if(t.length!==1||!d)return H5e;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:l(f.name,s(f.clientId))}},[e,t]);return(0,dO.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var U5e=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,dO.useState)();return(0,Pu.jsxs)(Pu.Fragment,{children:[r&&(0,Pu.jsx)(em,{blocks:(0,fv.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,Pu.jsx)(G5e,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function G5e({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,Pu.jsxs)(Ple.MenuItem,{className:(0,fv.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,Pu.jsx)(rt,{icon:n,showColors:!0}),i]})}var Ole=U5e;var Ci=c(C(),1);function W5e(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,mO.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 $5e=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,mO.useState)(),{priorityTextTransformations:l,restTransformations:u}=W5e(t),d=l.length&&u.length,f=!!u.length&&(0,Ci.jsx)(K5e,{restTransformations:u,onSelect:r,setHoveredTransformItem:a});return(0,Ci.jsxs)(Ci.Fragment,{children:[(0,Ci.jsxs)(xw.MenuGroup,{label:(0,Ale.__)("Transform to"),className:e,children:[s&&(0,Ci.jsx)(em,{blocks:(0,fO.switchToBlockType)(i,s.name,s.variationName)}),!!o?.length&&(0,Ci.jsx)(Ole,{transformations:o,blocks:i,onSelect:n}),l.map(m=>(0,Ci.jsx)(Lle,{item:m,onSelect:r,setHoveredTransformItem:a},m.id||m.name)),!d&&f]}),!!d&&(0,Ci.jsx)(xw.MenuGroup,{className:e,children:f})]})};function K5e({restTransformations:e,onSelect:t,setHoveredTransformItem:o}){return e.map(r=>(0,Ci.jsx)(Lle,{item:r,onSelect:t,setHoveredTransformItem:o},r.id||r.name))}function Lle({item:e,onSelect:t,setHoveredTransformItem:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,Ci.jsxs)(xw.MenuItem,{className:(0,fO.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r,e.variationName)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(e),onFocus:()=>o(e),onBlur:()=>o(null),children:[(0,Ci.jsx)(rt,{icon:n,showColors:!0}),i]})}var Mle=$5e;var Vle=c(z(),1),Fle=c(D(),1),hO=c(L(),1);var pO=c(D(),1);var mv=c(C(),1),Nle=()=>{};function Dle({stylesToRender:e,activeStyle:t,onSelect:o=Nle,onHoverStyle:r=Nle}){return!e||e.length===0?null:(0,mv.jsx)(mv.Fragment,{children:e.map(n=>{let i=n.label||n.name;return(0,mv.jsx)(pO.MenuItem,{icon:t.name===n.name?Ts:null,onClick:()=>o(n),onFocus:()=>r(n),onBlur:()=>r(null),onMouseEnter:()=>r(n),onMouseLeave:()=>r(null),children:(0,mv.jsx)(pO.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:i})},n.name)})})}var ww=c(C(),1);function gO({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e,[r,n]=(0,hO.useState)(null),{onSelect:i,stylesToRender:s,activeStyle:a,genericPreviewBlock:l,className:u}=lv({clientId:o,onSwitch:t}),d=(0,hO.useMemo)(()=>{if(!r||!l)return null;let f=Xf(u,a,r);return[{...l,attributes:{...l.attributes||{},className:f}}]},[r,l,u,a]);return!s||s.length===0?null:(0,ww.jsxs)(Fle.MenuGroup,{label:(0,Vle.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:[d&&(0,ww.jsx)(em,{blocks:d}),(0,ww.jsx)(Dle,{stylesToRender:s,activeStyle:a,onSelect:i,onHoverStyle:n})]})}var Mj=c(z(),1),Wle=c(L(),1),bO=c(te(),1);var Ru=c(D(),1);var Hle=c(L(),1),Ule=c(ee(),1);var zle=c(ee(),1),Lj=(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=Lj(s,t,o);if(a)return a}}},jle=(e,t)=>{let o=(0,zle.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var Y5e=(e,t)=>{let o=jle(t.name,t.attributes);e.attributes={...e.attributes,...o}},q5e=(e,t)=>{let o=t.map(n=>(0,Ule.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=Lj(s,n.name,r);if(a){i=!0,r.add(a.clientId),Y5e(a,n);break}}if(!i)return}return o},Z5e=(e,t)=>(0,Hle.useMemo)(()=>e.reduce((o,r)=>{let n=q5e(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),Gle=Z5e;var ln=c(C(),1);function X5e({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,Wle.useState)(!1),i=Gle(t,e);return i.length?(0,ln.jsxs)(Ru.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,ln.jsx)(Q5e,{patterns:i,onSelect:o}),(0,ln.jsx)(Ru.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Sr,children:(0,Mj.__)("Patterns")})]}):null}function Q5e({patterns:e,onSelect:t}){let o=(0,bO.useViewportMatch)("medium","<");return(0,ln.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,ln.jsx)(Ru.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,ln.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,ln.jsx)(J5e,{patterns:e,onSelect:t})})})})}function J5e({patterns:e,onSelect:t}){return(0,ln.jsx)(Ru.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,Mj.__)("Patterns list"),children:e.map(o=>(0,ln.jsx)($le,{pattern:o,onSelect:t},o.name))})}function $le({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,bO.useInstanceId)($le,`${o}-list__item-description`);return(0,ln.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,ln.jsxs)(Ru.Composite.Item,{render:(0,ln.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,ln.jsx)(yi,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,ln.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,ln.jsx)(ct,{id:r,children:e.description})]})}var Kle=X5e;var ss=c(C(),1);function eFe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,yO.useDispatch)(w),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:l,canRemove:u,hasBlockStyles:d}=(0,yO.useSelect)(B=>{let{getBlockAttributes:P,getBlocksByClientId:T,getBlockRootClientId:A,getBlockTransformItems:I,__experimentalGetPatternTransformItems:R,canRemoveBlocks:V,getBlockName:N}=B(w),{getBlockStyles:U}=B(tm.store),j=A(t[0]),O=T(t),M=t.length===1,H=M&&N(t[0]),Y=M&&!!U(H)?.length;return{blocks:O,possibleBlockTransformations:I(O,j),patterns:R(O,j),isUsingBindings:t.every(oe=>!!P(oe)?.metadata?.bindings),canRemove:V(t),hasBlockStyles:Y}},[t]),f=Ile({clientIds:t,blocks:a});function m(B){B.length>1&&r(B[0].clientId,B[B.length-1].clientId)}function h(B,P){let T=(0,tm.switchToBlockType)(a,B,P);o(t,T),m(T)}function p(B){n(a[0].clientId,{...f.find(({name:P})=>P===B).attributes})}function g(B){o(t,B),m(B)}let b=a.length===1,v=b&&((0,tm.isTemplatePart)(a[0])||(0,tm.isReusableBlock)(a[0])),y=!!i?.length&&u&&!v,S=!!f?.length,k=!!s?.length&&u,_=y||S;if(!(d||_||k))return(0,ss.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,rc.__)("No transforms.")});let E=b?(0,rc._x)("This block is connected.","block toolbar button label and description"):(0,rc._x)("These blocks are connected.","block toolbar button label and description");return(0,ss.jsxs)("div",{className:"block-editor-block-switcher__container",children:[k&&(0,ss.jsx)(Kle,{blocks:a,patterns:s,onSelect:B=>{g(B),e()}}),_&&(0,ss.jsx)(Mle,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:(B,P)=>{h(B,P),e()},onSelectVariation:B=>{p(B),e()}}),d&&(0,ss.jsx)(gO,{hoveredBlock:a[0],onSwitch:e}),l&&(0,ss.jsx)(nc.MenuGroup,{children:(0,ss.jsx)(nc.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:E})})]})}var tFe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,rc.__)("Change block type or style"):(0,rc.sprintf)((0,rc._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,ss.jsx)(nc.ToolbarGroup,{children:(0,ss.jsx)(nc.ToolbarItem,{children:s=>(0,ss.jsx)(nc.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,ss.jsx)(eFe,{onClose:a,clientIds:t})})})})},Yle=tFe;var qle=c(z(),1),hv=c(D(),1);var pv=c(C(),1);function Zle({clientIds:e,children:t,label:o,text:r}){return(0,pv.jsx)(hv.ToolbarGroup,{children:(0,pv.jsx)(hv.ToolbarItem,{children:n=>(0,pv.jsx)(hv.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:t,text:r,toggleProps:{description:(0,qle.__)("Change block style"),...n},menuProps:{orientation:"both"},children:({onClose:i})=>(0,pv.jsx)("div",{className:"block-editor-block-switcher__container",children:(0,pv.jsx)(gO,{hoveredBlock:{clientId:e[0]},onSwitch:i})})})})})}var gv=c(D(),1),Cw=c(z(),1),vO=c(L(),1),Xle=c(W(),1);var Iu=c(C(),1);function oFe({clientIds:e,blockTitle:t}){let o=(0,Xle.useSelect)(i=>{let{getBlockAttributes:s}=i(w);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,Cw.sprintf)((0,Cw.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,Cw.__)("These blocks are editable using overrides."),(0,Iu.jsx)(gv.__experimentalText,{children:n})}function Qle({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,vO.useState)(!1),s=(0,vO.useRef)();return(0,Iu.jsxs)(Iu.Fragment,{children:[(0,Iu.jsx)(gv.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,Iu.jsx)(gv.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,Iu.jsx)(oFe,{clientIds:t,blockTitle:o})})]})}var bv=c(C(),1);function rFe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:l,isWithinEditedContentOnlySection:u,getSettings:d}=F(e(w)),{getBlockStyles:f}=e(Ew.store),m=!!d()?.[Hi],h=t.some(I=>s(I)==="contentOnly"),p=t.length===1,g=p&&o(t[0]),b=p&&!!f(g)?.length,v=t.some(I=>!!r(I)?.metadata?.patternName&&!u(I)&&!m),y=t.every(I=>cS(r(I)?.metadata?.bindings)),S=t.every(I=>n(I,"core/block",!0).length>0),k=i(t),_=t.every(I=>l(I)),x=a(t[0]),E=x==="default",B=x==="contentOnly",T=!v&&E&&(b||k)&&!h&&_,A=y&&S;return T?"switcher":B&&b&&!y&&_?"styles-only":A?"pattern-overrides":"default"}function nFe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,isWithinEditedContentOnlySection:n,getSettings:i}=F(e(w)),s=!!i()?.[Hi],a=t.length===1,l=t[0],u=r(l);if(a&&u?.metadata?.patternName&&!n(l)&&!s)return Rl;let d=o(l),f=(0,Ew.getBlockType)(d);if(a){let{getActiveBlockVariation:p}=e(Ew.store);return p(d,u)?.icon||f?.icon}let m=t.map(p=>o(p));return new Set(m).size===1?f?.icon:kp}function rce({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,tce.useSelect)(f=>({icon:nFe({select:f,clientIds:e}),showIconLabels:f(oce.store).get("core","showIconLabels"),variant:rFe({select:f,clientIds:e})}),[e]),i=tn({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,l=s?i:(0,ece.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,bv.jsx)(rt,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,bv.jsx)(Yle,{clientIds:e,label:l,text:u,children:d}):n==="styles-only"?(0,bv.jsx)(Zle,{clientIds:e,label:l,text:u,children:d}):n==="pattern-overrides"?(0,bv.jsx)(Qle,{icon:d,clientIds:e,blockTitle:i,label:l}):(0,bv.jsx)(Jle.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:l,icon:d,text:u})}var It=c(C(),1);function Dj({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,variant:n="unstyled"}){let{blockClientId:i,blockClientIds:s,isDefaultEditingMode:a,blockType:l,toolbarKey:u,shouldShowVisualToolbar:d,showParentSelector:f,isUsingBindings:m,isSectionContainer:h,hasContentOnlyLocking:p,showShuffleButton:g,showSlots:b,showGroupButtons:v,showLockButtons:y,showBlockVisibilityButton:S,showSwitchSectionStyleButton:k,areSelectedBlocksHiddenOnViewport:_,canEdit:x}=(0,ice.useSelect)(U=>{let{canEditBlock:j}=U(w),{getBlockName:O,getBlockMode:M,getBlockParents:H,getSelectedBlockClientIds:Y,isBlockValid:oe,getBlockEditingMode:K,getBlockAttributes:Z,getSettings:q,getTemplateLock:$,getParentSectionBlock:Q,isZoomOut:X,isSectionBlock:J,isBlockHiddenAtViewport:ie}=F(U(w)),se=Y(),re=se[0],le=H(re),Re=Q(re)??le[le.length-1],Ve=O(Re),tt=(0,Ou.getBlockType)(Ve),Ye=K(re),Ie=Ye==="default",ut=O(re),Ne=se.every(Fe=>oe(Fe)),Ft=se.every(Fe=>M(Fe)==="visual"),qe=se.every(Fe=>!!Z(Fe)?.metadata?.bindings),eo=se.some(Fe=>$(Fe)==="contentOnly"),ce=X(),fe=J(re),et=j(re),De=et&&(ce||fe),At=q()?.[Es]?.toLowerCase()||"desktop",ur=se.length>0&&se.every(Fe=>ie(Fe,At));return{blockClientId:re,blockClientIds:se,isDefaultEditingMode:Ie,blockType:re&&(0,Ou.getBlockType)(ut),shouldShowVisualToolbar:Ne&&Ft,toolbarKey:`${re}${Re}`,showParentSelector:!ce&&tt&&Ye!=="contentOnly"&&K(Re)!=="disabled"&&(0,Ou.hasBlockSupport)(tt,"__experimentalParentSelector",!0)&&se.length===1,isUsingBindings:qe,isSectionContainer:fe,hasContentOnlyLocking:eo,showShuffleButton:ce,showSlots:!ce,showGroupButtons:!ce,showLockButtons:!ce,showBlockVisibilityButton:!ce,showSwitchSectionStyleButton:De,areSelectedBlocksHiddenOnViewport:ur,canEdit:et}},[]),E=(0,Nj.useRef)(null),B=(0,Nj.useRef)(),P=Qy({ref:B}),T=!(0,sce.useViewportMatch)("medium","<");if(!WI())return null;let I=s.length>1,R=(0,Ou.isReusableBlock)(l)||(0,Ou.isTemplatePart)(l),V=G("block-editor-block-contextual-toolbar",{"has-parent":f}),N=G("block-editor-block-toolbar",{"is-synced":R,"is-connected":m});return(0,It.jsx)(sv,{focusEditorOnEscape:!0,className:V,"aria-label":(0,nce.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,It.jsxs)("div",{ref:E,className:N,children:[f&&!I&&T&&(0,It.jsx)(Cse,{}),(d||I)&&(0,It.jsx)("div",{ref:B,...P,children:(0,It.jsxs)(ace.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,It.jsx)(rce,{clientIds:s,isSynced:R}),a&&S&&(0,It.jsx)(I3,{clientIds:s}),!I&&a&&y&&(0,It.jsx)(mj,{clientId:i}),(0,It.jsx)(pI,{clientIds:s,hideDragHandle:e})]})}),!_&&!p&&d&&I&&v&&(0,It.jsx)(lj,{}),!I&&x&&(0,It.jsx)(Ele,{clientId:s[0]}),!_&&g&&(0,It.jsx)(Kae,{clientId:s[0]}),!_&&k&&(0,It.jsx)(wle,{clientId:s[0]}),!_&&d&&b&&(0,It.jsxs)(It.Fragment,{children:[!h&&(0,It.jsxs)(It.Fragment,{children:[(0,It.jsx)(yo.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,It.jsx)(yo.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,It.jsx)(yo.Slot,{className:"block-editor-block-toolbar__slot"}),(0,It.jsx)(yo.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,It.jsx)(yo.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,It.jsx)(vI.Slot,{})]}),(0,It.jsx)(Nae,{clientIds:s}),(0,It.jsx)(zI,{clientIds:s})]})},u)}function lce({hideDragHandle:e,variant:t}){return(0,It.jsx)(Dj,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var Vj=c(C(),1);function dce({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=sI(e),s=(0,yv.useRef)();(0,yv.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,cce.useDispatch)(w),l=(0,yv.useRef)(!1);(0,uce.useShortcut)("core/block-editor/focus-toolbar",()=>{l.current=!0,a(!0)}),(0,yv.useEffect)(()=>{l.current=!1});let u=r||e,d=iI({contentElement:o?.current,clientId:u});return!t&&(0,Vj.jsx)(Sh,{clientId:u,bottomClientId:i,className:G("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,Vj.jsx)(Dj,{focusOnMount:l.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var kO=c(W(),1),SO=c(L(),1);var fce=c(D(),1);var mce=c(z(),1),pce=c(C(),1);function iFe({onClick:e}){return(0,pce.jsx)(fce.Button,{variant:"primary",icon:Ps,size:"compact",className:G("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,mce._x)("Add pattern","Generic label for pattern inserter button")})}var hce=iFe;var Fj=c(C(),1);function sFe(){let[e,t]=(0,SO.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:l}=(0,kO.useSelect)(p=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:v,getSelectedBlockClientId:y,getSectionRootClientId:S,getBlockInsertionPoint:k,isBlockInsertionPointVisible:_}=F(p(w)),x=S();return{hasSelection:!!v().clientId,blockOrder:b(x),sectionRootClientId:x,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:y(),blockInsertionPoint:k(),insertionPointVisible:_()}},[]),{showInsertionPoint:u}=F((0,kO.useDispatch)(w));if((0,SO.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 l&&a?.index===m?null:(0,Fj.jsx)(LR,{previousClientId:d,nextClientId:h,children:(0,Fj.jsx)(hce,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var gce=sFe;var bce=c(W(),1),yce=c(ee(),1);function vce(){return(0,bce.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=F(e(w)),l=t()||o(),u=r(l),d=!!l&&!!u,f=d&&(0,yce.isUnmodifiedDefaultBlock)(u,"content")&&n(l)!=="html",m=l&&!s()&&f,h=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:h}},[])}var ea=c(C(),1);function aFe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=F(e(w));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a()}}function Tw({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:l}=(0,vv.useSelect)(aFe,[]),u=(0,kce.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:f,getBlockRootClientId:m,getBlockEditingMode:h,getBlockName:p,isGroupable:g,getEditedContentOnlySection:b,canEditBlock:v}=F((0,vv.useSelect)(w)),{getGroupingBlockName:y}=(0,vv.useSelect)(kv.store),{showEmptyBlockSideInserter:S,showBlockToolbarPopover:k}=vce(),_=ev(),[x,E]=(0,_O.useState)(null),{canRename:B}=Dh(p(f()[0])),{duplicateBlocks:P,removeBlocks:T,replaceBlocks:A,insertAfterBlock:I,insertBeforeBlock:R,selectBlock:V,moveBlocksUp:N,moveBlocksDown:U,expandBlock:j,stopEditingContentOnlySection:O,showViewportModal:M,hideViewportModal:H}=F((0,vv.useDispatch)(w));function Y(Z){if(!Z.defaultPrevented){if(u("core/block-editor/move-up",Z)||u("core/block-editor/move-down",Z)){let q=f();if(q.length){Z.preventDefault();let $=m(q[0]);(u("core/block-editor/move-up",Z)?"up":"down")==="up"?N(q,$):U(q,$);let X=Array.isArray(q)?q.length:1,J=(0,Sv.sprintf)((0,Sv._n)("%d block moved.","%d blocks moved.",q.length),X);(0,Hj.speak)(J)}}else if(u("core/block-editor/duplicate",Z)){let q=f();q.length&&(Z.preventDefault(),P(q))}else if(u("core/block-editor/remove",Z)){let q=f();q.length&&(Z.preventDefault(),T(q))}else if(u("core/block-editor/paste-styles",Z)){let q=f();if(q.length){Z.preventDefault();let $=d(q);_($)}}else if(u("core/block-editor/insert-after",Z)){let q=f();q.length&&(Z.preventDefault(),I(q[q.length-1]))}else if(u("core/block-editor/insert-before",Z)){let q=f();q.length&&(Z.preventDefault(),R(q[0]))}else if(u("core/block-editor/unselect",Z)){if(Z.target.closest("[role=toolbar]"))return;let q=f();q.length>1&&(Z.preventDefault(),V(q[0]))}else if(u("core/block-editor/collapse-list-view",Z)){if((0,zj.isTextField)(Z.target)||(0,zj.isTextField)(Z.target?.contentWindow?.document?.activeElement))return;Z.preventDefault(),j(r)}else if(u("core/block-editor/group",Z)){let q=f();if(q.length>1&&g(q)){Z.preventDefault();let $=d(q),Q=y(),X=(0,kv.switchToBlockType)($,Q);A(q,X),(0,Hj.speak)((0,Sv.__)("Selected blocks are grouped."))}}else if(u("core/block-editor/rename",Z)){let q=f();if(q.length===1){let $=h(q[0])==="contentOnly";B&&!$&&v(q[0])&&(Z.preventDefault(),E(q[0]))}}else if(u("core/block-editor/toggle-block-visibility",Z)){let q=f();if(q.length){if(Z.preventDefault(),!d(q).every(X=>(0,kv.hasBlockSupport)(X.name,"visibility",!0))||q.some(X=>h(X)!=="default"||!v(X)))return;M(q)}}u("core/block-editor/stop-editing-as-blocks",Z)&&b()&&O()}}let oe=kh(t),K=kh(t);return(0,ea.jsxs)("div",{...o,onKeyDown:Y,className:G(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,ea.jsxs)(Gy.Provider,{value:(0,_O.useRef)(!1),children:[!i&&!s&&(0,ea.jsx)(jne,{__unstableContentRef:t}),S&&(0,ea.jsx)(lse,{__unstableContentRef:t,clientId:r}),k&&(0,ea.jsx)(dce,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,ea.jsx)(jj.Popover.Slot,{name:"block-toolbar",ref:oe}),e,(0,ea.jsx)(jj.Popover.Slot,{name:"__unstable-block-tools-after",ref:K}),s&&!a&&(0,ea.jsx)(gce,{__unstableContentRef:t})]}),x&&(0,ea.jsx)(Mh,{clientId:x,onClose:()=>E(null)}),l&&(0,ea.jsx)(T3,{clientIds:l,onClose:H})]})}var ta=c(z(),1),ic=c(ee(),1),Au=c(W(),1),Uj=c(_ce(),1);var lFe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,Au.useDispatch)(w),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,Au.useSelect)(h=>{let{getBlockRootClientId:p,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:v,canRemoveBlocks:y}=h(w),S=b(),k=v(S);if(k.filter(x=>!x).length>0)return{invalidSelection:!0};let _=p(S[0]);return{blocks:k,clientIds:S,possibleBlockTransformations:g(k,_),canRemove:y(S),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let l=r.length===1&&(0,ic.isTemplatePart)(r[0]);function u(h){h.length>1&&o(h[0].clientId,h[h.length-1].clientId)}function d(h,p){let g=(0,ic.switchToBlockType)(r,h,p);t(n,g),u(g)}let f=!!s.length&&i&&!l;return!n||n.length<1||!f?{isLoading:!1,commands:[]}:{isLoading:!1,commands:s.map(h=>{let{id:p,name:g,title:b,icon:v,variationName:y}=h,S=!v?.src||v?.src==="block-default"?{src:yS}:v;return{name:"core/block-editor/transform-to-"+(p||g).replace(/\//g,"-"),label:(0,ta.sprintf)((0,ta.__)("Transform to %s"),b),icon:S?.src,category:"command",callback:({close:k})=>{d(g,y),k()}}})}},cFe=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,Au.useSelect)(R=>{let{getSelectedBlockClientIds:V,isUngroupable:N,isGroupable:U}=R(w);return{clientIds:V(),isUngroupable:N(),isGroupable:U()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,isBlockHiddenAnywhere:l}=F((0,Au.useSelect)(w)),{getBlockEditingMode:u}=(0,Au.useSelect)(w),{getDefaultBlockName:d,getGroupingBlockName:f}=(0,Au.useSelect)(ic.store),m=s(t),h=(0,Au.useDispatch)(w),{removeBlocks:p,replaceBlocks:g,duplicateBlocks:b,insertAfterBlock:v,insertBeforeBlock:y}=h,S=()=>{if(!m.length)return;let R=f(),V=(0,ic.switchToBlockType)(m,R);V&&g(t,V)},k=()=>{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:_}=F(h),x=i(t[0]),E=n(d(),x),B=m.every(R=>!!R&&(0,ic.hasBlockSupport)(R.name,"multiple",!0)&&n(R.name,x)),P=a(t),T=[];B&&T.push({name:"duplicate",label:(0,ta.__)("Duplicate"),callback:()=>b(t,!0),icon:kp}),E&&T.push({name:"add-before",label:(0,ta.__)("Add before"),callback:()=>{let R=Array.isArray(t)?t[0]:R;y(R)},icon:Ps},{name:"add-after",label:(0,ta.__)("Add after"),callback:()=>{let R=Array.isArray(t)?t[t.length-1]:R;v(R)},icon:Ps}),r&&T.push({name:"Group",label:(0,ta.__)("Group"),callback:S,icon:xS}),o&&T.push({name:"ungroup",label:(0,ta.__)("Ungroup"),callback:k,icon:L5}),P&&T.push({name:"remove",label:(0,ta.__)("Delete"),callback:()=>p(t,!0),icon:O5});let A=m.every(R=>!!R&&(0,ic.hasBlockSupport)(R.name,"visibility",!0)),I=t.every(R=>u(R)==="default");if(A&&I){let R=t.some(V=>l(V));T.push({name:"toggle-visibility",label:R?(0,ta.__)("Show"):(0,ta.__)("Hide"),callback:()=>_(t),icon:R?Pp:wa})}return{isLoading:!1,commands:T.map(R=>({...R,name:"core/block-editor/action-"+R.name,category:"command",callback:({close:V})=>{R.callback(),V()}}))}},xO=()=>{(0,Uj.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:lFe()}),(0,Uj.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:cFe(),context:"block-selection-edit"})};var $n=c(C(),1),wO=(0,Ece.createSlotFill)(Symbol("BlockCanvasCover"));function xce({children:e}){return(0,$n.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var uFe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function Gj({shouldIframe:e=!0,height:t="300px",children:o=(0,$n.jsx)(Sy,{}),styles:r,contentRef:n,iframeProps:i}){xO();let s=(0,CO.useViewportMatch)("medium","<"),a=qx(),l=_h(),u=(0,wce.useRef)(),d=(0,CO.useMergeRefs)([n,l,u]),f=(0,Cce.useSelect)(h=>F(h(w)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,$n.jsx)(Tw,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,$n.jsxs)(my,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,$n.jsx)(wO.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,$n.jsx)(xce,{children:p},g))}),(0,$n.jsx)(au,{styles:r}),o]})}):(0,$n.jsxs)(Tw,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,$n.jsx)(wO.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,$n.jsx)(xce,{children:p},g))}),(0,$n.jsx)(au,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:uFe}),(0,$n.jsx)(TP,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function dFe({children:e,height:t,styles:o}){return(0,$n.jsx)(Gj,{height:t,styles:o,children:e})}var Tce=dFe;var sc=c(D(),1),Bce=c(z(),1),Pce=c(Pt(),1),Rce=c(Xe(),1),oa=c(C(),1),fFe=()=>(0,oa.jsx)(sc.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,oa.jsx)(sc.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"})}),mFe=({style:e,className:t})=>(0,oa.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,oa.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,oa.jsx)(fFe,{})})}),pFe=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===Pce.DOWN&&(s.preventDefault(),r())};return(0,oa.jsx)(sc.ToolbarGroup,{children:(0,oa.jsx)(sc.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,Bce.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,oa.jsx)(t,{children:(0,oa.jsx)(e,{children:(0,oa.jsx)(mFe,{})})})})})},hFe=({children:e,...t})=>((0,Rce.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,oa.jsx)(sc.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:pFe(t),renderContent:()=>e})),Ice=hFe;var Due=c(Xe(),1),jO=c(D(),1),Zj=c(z(),1),Vue=c(W(),1),Fue=c(L(),1);var Pv=c(te(),1),Lue=c(D(),1);var Rw=c(W(),1),Mue=c(Xe(),1),rr=c(L(),1),qj=c(z(),1);var MO=c(D(),1),NO=c(L(),1),DO=c(W(),1);var Ace=c(te(),1),Lce=c(_r(),1),Mce=c(W(),1),RO=c(L(),1),_v=c(z(),1);var EO=c(L(),1),TO=(0,EO.createContext)({});TO.displayName="ListViewContext";var om=()=>(0,EO.useContext)(TO);var BO=c(L(),1),Oce=c(C(),1);function PO({children:e,...t}){let o=(0,BO.useRef)();return(0,BO.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,Oce.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var Bw=c(C(),1),Wj=(0,RO.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=om(),a=(0,Ace.useInstanceId)(Wj),{directInsert:l,hideInserter:u}=(0,Mce.useSelect)(p=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:v}=F(p(w)),S=g(o)?.directInsert||!1,k=!!b(o)||v();return{directInsert:S,hideInserter:k}},[o]),d=tn({clientId:o,context:"list-view"}),f=tn({clientId:i?.clientId,context:"list-view"});if((0,RO.useEffect)(()=>{f?.length&&(0,Lce.speak)((0,_v.sprintf)((0,_v.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,h=(0,_v.sprintf)((0,_v.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,Bw.jsxs)("div",{className:"list-view-appender",children:[(0,Bw.jsx)($s,{ref:n,rootClientId:o,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:l,__experimentalIsQuick:!0,...r,toggleProps:{"aria-describedby":m},onSelectOrClose:p=>{p?.clientId&&s(p)}}),(0,Bw.jsx)(PO,{id:m,children:h})]})});var nm=c(ee(),1),Fh=c(D(),1),AO=c(te(),1);var or=c(L(),1),Cv=c(W(),1),Kj=c(z(),1),LO=c(Pt(),1),iue=c(Wx(),1),sue=c(Ma(),1),aue=c(_r(),1);var Nce=c(D(),1),Dce=c(te(),1),Vce=c(L(),1);var Fce=c(C(),1),gFe=gY(Nce.__experimentalTreeGridRow),bFe=(0,Vce.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...l},u)=>{let d=$T({clientId:l["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,Dce.useMergeRefs)([u,d]);return(0,Fce.jsx)(gFe,{ref:f,className:G("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...l,children:i})}),zce=bFe;var jce=c(at(),1),Hce=c(L(),1);function Uce({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,Hce.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,jce.getScrollContainer)(o.current),{ownerDocument:i}=o.current;if(n===i.body||n===i.documentElement||!n)return;let a=o.current.getBoundingClientRect(),l=n.getBoundingClientRect();(a.top<l.top||a.bottom>l.bottom)&&o.current.scrollIntoView()},[e,r,o])}var Xce=c(L(),1);var xv=c(D(),1),qce=c(L(),1);var OO=c(Pt(),1);var Gce=c(z(),1),$j=c(C(),1);function IO({onClick:e}){return(0,$j.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,$j.jsx)(Ue,{icon:(0,Gce.isRTL)()?vS:Rd})})}var Wce=c(L(),1),$ce=c(W(),1);var yFe=3,Kce={"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?Kce[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>=yFe)return t}return t}};function vFe(e,t){let o=Kce[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function Yce({clientId:e,isExpanded:t}){let{block:o}=(0,$ce.useSelect)(n=>({block:n(w).getBlock(e)}),[e]);return(0,Wce.useMemo)(()=>vFe(o,t),[o,t])}var tr=c(C(),1),{Badge:kFe}=F(xv.privateApis);function SFe({className:e,block:{clientId:t},onClick:o,onContextMenu:r,onMouseDown:n,onToggleExpanded:i,tabIndex:s,onFocus:a,onDragStart:l,onDragEnd:u,draggable:d,isExpanded:f,ariaDescribedBy:m,visibilityLabel:h},p){let g=lo(t),b=tn({clientId:t,context:"list-view"}),{isLocked:v}=ns(t),y=v,S=g?.positionType==="sticky",k=Yce({clientId:t,isExpanded:f}),_=E=>{E.dataTransfer.clearData(),l?.(E)};function x(E){(E.keyCode===OO.ENTER||E.keyCode===OO.SPACE)&&o(E)}return(0,tr.jsxs)("a",{className:G("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:x,onMouseDown:n,ref:p,tabIndex:s,onFocus:a,onDragStart:_,onDragEnd:u,draggable:d,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":f,children:[(0,tr.jsx)(IO,{onClick:i}),(0,tr.jsx)(rt,{icon:g?.icon,showColors:!0,context:"list-view"}),(0,tr.jsxs)(xv.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,tr.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,tr.jsx)(xv.__experimentalTruncate,{ellipsizeMode:"auto",children:b})}),g?.anchor&&(0,tr.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,tr.jsx)(kFe,{className:"block-editor-list-view-block-select-button__anchor",children:g.anchor})}),S&&(0,tr.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,tr.jsx)(Ue,{icon:zV})}),k.length?(0,tr.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:k.map((E,B)=>(0,tr.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${E.url})`,zIndex:k.length-B}},E.clientId))}):null,!!h&&(0,tr.jsxs)(lt.Root,{children:[(0,tr.jsx)(lt.Trigger,{render:(0,tr.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,tr.jsx)(Ue,{icon:wa})})}),(0,tr.jsx)(lt.Popup,{children:h})]}),y&&(0,tr.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,tr.jsx)(Ue,{icon:OV})})]})]})}var Zce=(0,qce.forwardRef)(SFe);var rm=c(C(),1),_Fe=(0,Xce.forwardRef)(({onClick:e,onToggleExpanded:t,block:o,isSelected:r,position:n,siblingBlockCount:i,level:s,isExpanded:a,selectedClientIds:l,...u},d)=>{let{clientId:f}=o,{AdditionalBlockContent:m,insertedBlock:h,setInsertedBlock:p}=om(),g=l.includes(f)?l:[f];return(0,rm.jsxs)(rm.Fragment,{children:[m&&(0,rm.jsx)(m,{block:o,insertedBlock:h,setInsertedBlock:p}),(0,rm.jsx)(cI,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:v,onDragEnd:y})=>(0,rm.jsx)(Zce,{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:y,isExpanded:a,...u})})]})}),Qce=_Fe;var Vh=c(z(),1),Jce=c(at(),1),eue=(e,t,o)=>(0,Vh.sprintf)((0,Vh.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),tue=(e,t)=>[e?.positionLabel?`${(0,Vh.sprintf)((0,Vh.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,Vh.__)("This block is locked."):void 0].filter(Boolean).join(" "),oue=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function rue(e,t,o,r){let n=[...o,e],i=[...r,t],s=Math.min(n.length,i.length)-1,a=n[s],l=i[s];return{start:a,end:l}}function wv(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&&Jce.focus.focusable.find(r)?.[0]?.focus()})}function nue({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:o,clientId:r,firstDraggedBlockIndex:n,isDragged:i}){let s,a,l;if(!i){a=!1;let u=e[r];l=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:l}}var zr=c(C(),1);function lue({block:{clientId:e},displacement:t,isAfterDraggedBlocks:o,isDragged:r,isNesting:n,isSelected:i,isBranchSelected:s,selectBlock:a,position:l,level:u,rowCount:d,siblingBlockCount:f,showBlockMovers:m,path:h,isExpanded:p,selectedClientIds:g,isSyncedBranch:b}){let v=(0,or.useRef)(null),y=(0,or.useRef)(null),S=(0,or.useRef)(null),[k,_]=(0,or.useState)(!1),[x,E]=(0,or.useState)(),[B,P]=(0,or.useState)(!1),{isLocked:T}=ns(e),A=i&&g[0]===e,I=i&&g[g.length-1]===e,{toggleBlockHighlight:R,duplicateBlocks:V,multiSelect:N,replaceBlocks:U,removeBlocks:j,insertAfterBlock:O,insertBeforeBlock:M,showViewportModal:H}=F((0,Cv.useDispatch)(w)),Y=(0,AO.useDebounce)(R,50),{canInsertBlockType:oe,getSelectedBlockClientIds:K,getPreviousBlockClientId:Z,getBlockRootClientId:q,getBlockOrder:$,getBlockParents:Q,getBlockEditingMode:X,getBlocksByClientId:J,canEditBlock:ie,canMoveBlock:se,canRemoveBlocks:re,isGroupable:le}=(0,Cv.useSelect)(w),{getGroupingBlockName:ye}=(0,Cv.useSelect)(nm.store),Re=lo(e),Ve=ev(),{block:tt,blockName:Ye,allowRightClickOverrides:Ie}=(0,Cv.useSelect)(de=>{let{getBlock:Lt,getBlockName:Ee,getSettings:Mt}=F(de(w));return{block:Lt(e),blockName:Ee(e),allowRightClickOverrides:Mt().allowRightClickOverrides}},[e]),{canRename:ut}=Dh(Ye),Ne=(0,nm.hasBlockSupport)(Ye,"__experimentalToolbar",!0),qe=`list-view-block-select-button__description-${(0,AO.useInstanceId)(lue)}`,{expand:eo,collapse:ce,collapseAll:fe,BlockSettingsMenu:et,listViewInstanceId:De,expandedState:At,setInsertedBlock:ur,treeGridElementRef:Fe,rootClientId:Ge}=om(),We=(0,sue.__unstableUseShortcutEventMatch)();function $e(){let de=K(),Lt=de.includes(e),Ee=Lt?de[0]:e,Mt=q(Ee);return{blocksToUpdate:Lt?de:[e],firstBlockClientId:Ee,firstBlockRootClientId:Mt,selectedBlockClientIds:de}}async function ht(de){if(de.defaultPrevented||de.target.closest("[role=dialog]"))return;let Lt=[LO.BACKSPACE,LO.DELETE].includes(de.keyCode);if(We("core/block-editor/unselect",de)&&g.length>0)de.stopPropagation(),de.preventDefault(),a(de,void 0);else if(Lt||We("core/block-editor/remove",de)){let{blocksToUpdate:Ee,firstBlockClientId:Mt,firstBlockRootClientId:ro,selectedBlockClientIds:kr}=$e();if(!re(Ee))return;let kd=Z(Mt)??ro;j(Ee,!1);let SN=kr.length>0&&K().length===0;kd||(kd=$()[0]),Ce(kd,SN)}else if(We("core/block-editor/paste-styles",de)){de.preventDefault();let{blocksToUpdate:Ee}=$e(),Mt=J(Ee);Ve(Mt)}else if(We("core/block-editor/duplicate",de)){de.preventDefault();let{blocksToUpdate:Ee,firstBlockRootClientId:Mt}=$e();if(J(Ee).every(kr=>!!kr&&(0,nm.hasBlockSupport)(kr.name,"multiple",!0)&&oe(kr.name,Mt))){let kr=await V(Ee,!1);kr?.length&&Ce(kr[0],!1)}}else if(We("core/block-editor/insert-before",de)){de.preventDefault();let{blocksToUpdate:Ee}=$e();await M(Ee[0]);let Mt=K();Ce(Mt[0],!1)}else if(We("core/block-editor/insert-after",de)){de.preventDefault();let{blocksToUpdate:Ee}=$e();await O(Ee.at(-1));let Mt=K();Ce(Mt[0],!1)}else if(We("core/block-editor/select-all",de)){de.preventDefault();let{firstBlockRootClientId:Ee,selectedBlockClientIds:Mt}=$e(),ro=$(Ee);if(!ro.length)return;if((0,iue.isShallowEqual)(Mt,ro)&&Ee&&Ee!==Ge){Ce(Ee,!0);return}N(ro[0],ro[ro.length-1],null)}else if(We("core/block-editor/collapse-list-view",de)){de.preventDefault();let{firstBlockClientId:Ee}=$e(),Mt=Q(Ee,!1);fe(),eo(Mt)}else if(We("core/block-editor/group",de)){let{blocksToUpdate:Ee}=$e();if(Ee.length>1&&le(Ee)){de.preventDefault();let Mt=J(Ee),ro=ye(),kr=(0,nm.switchToBlockType)(Mt,ro);U(Ee,kr),(0,aue.speak)((0,Kj.__)("Selected blocks are grouped."));let kd=K();Ce(kd[0],!1)}}else if(We("core/block-editor/toggle-block-visibility",de)){de.preventDefault();let{blocksToUpdate:Ee}=$e();if(!J(Ee).every(kr=>(0,nm.hasBlockSupport)(kr.name,"visibility",!0))||Ee.some(kr=>X(kr)!=="default"))return;H(Ee)}else if(We("core/block-editor/rename",de)){let{blocksToUpdate:Ee}=$e(),Mt=X(Ee[0])==="contentOnly";Ee.length===1&&ut&&!Mt&&(de.preventDefault(),P(!0))}}let to=(0,or.useCallback)(()=>{_(!0),Y(e,!0)},[e,_,Y]),Ao=(0,or.useCallback)(()=>{_(!1),Y(e,!1)},[e,_,Y]),_e=(0,or.useCallback)(de=>{let Lt=de?.detail===0;a(de,e,Lt?-1:null),de.preventDefault()},[e,a]),Ce=(0,or.useCallback)((de,Lt)=>{Lt&&a(void 0,de,null,null),wv(de,Fe?.current)},[a,Fe]),ot=(0,or.useCallback)(de=>{de.preventDefault(),de.stopPropagation(),p===!0?ce(e):p===!1&&eo(e)},[e,eo,ce,p]),He=(0,or.useCallback)(de=>{let{ownerDocument:Lt}=S?.current||{};!Lt||!Lt.hasFocus()||Ne&&Ie&&(S.current?.click(),E(new window.DOMRect(de.clientX,de.clientY,0,0)),de.preventDefault())},[Ie,S,Ne]),gt=(0,or.useCallback)(de=>{Ie&&de.button===2&&de.preventDefault()},[Ie]),oo=(0,or.useMemo)(()=>{let{ownerDocument:de}=y?.current||{};if(!(!x||!de))return{ownerDocument:de,getBoundingClientRect(){return x}}},[x]),_t=(0,or.useCallback)(()=>{E(void 0)},[E]);if(Uce({isSelected:i,rowItemRef:y,selectedClientIds:g}),!tt)return null;let Yr=eue(l,f,u),yr=tue(Re,T),Rr=E3(tt?.attributes?.metadata?.blockVisibility),Se=f>0,go=m&&Se,_s=G("block-editor-list-view-block__mover-cell",{"is-visible":k||i}),up=G("block-editor-list-view-block__menu-cell",{"is-visible":k||A}),Oe;go?Oe=2:Ne||(Oe=3);let qo=G({"is-selected":i,"is-first-selected":A,"is-last-selected":I,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!Ne,"is-synced":Re?.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}),vr=g.includes(e)?g:[e],si=i&&g.length===1;return(0,zr.jsxs)(zce,{className:qo,isDragged:r,onKeyDown:ht,onMouseEnter:to,onMouseLeave:Ao,onFocus:to,onBlur:Ao,level:u,position:l,rowCount:d,path:h,id:`list-view-${De}-block-${e}`,"data-block":e,"data-expanded":ie?p:void 0,ref:y,children:[(0,zr.jsx)(Fh.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Oe,ref:v,"aria-selected":!!i,children:({ref:de,tabIndex:Lt,onFocus:Ee})=>(0,zr.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,zr.jsx)(Qce,{block:tt,onClick:_e,onContextMenu:He,onMouseDown:gt,onToggleExpanded:ot,isSelected:i,position:l,siblingBlockCount:f,level:u,ref:de,tabIndex:si?0:Lt,onFocus:Ee,isExpanded:ie?p:void 0,selectedClientIds:g,ariaDescribedBy:qe,visibilityLabel:Rr}),(0,zr.jsx)(PO,{id:qe,children:[Yr,yr,Rr].filter(Boolean).join(" ")})]})}),go&&(0,zr.jsx)(zr.Fragment,{children:(0,zr.jsxs)(Fh.__experimentalTreeGridCell,{className:_s,withoutGridItem:!0,children:[(0,zr.jsx)(Fh.__experimentalTreeGridItem,{children:({ref:de,tabIndex:Lt,onFocus:Ee})=>(0,zr.jsx)(fI,{orientation:"vertical",clientIds:[e],ref:de,tabIndex:Lt,onFocus:Ee})}),(0,zr.jsx)(Fh.__experimentalTreeGridItem,{children:({ref:de,tabIndex:Lt,onFocus:Ee})=>(0,zr.jsx)(mI,{orientation:"vertical",clientIds:[e],ref:de,tabIndex:Lt,onFocus:Ee})})]})}),Ne&&et&&(0,zr.jsx)(Fh.__experimentalTreeGridCell,{className:up,"aria-selected":!!i,ref:S,children:({ref:de,tabIndex:Lt,onFocus:Ee})=>(0,zr.jsx)(et,{clientIds:vr,block:tt,icon:Ui,label:(0,Kj.__)("Options"),popoverProps:{anchor:oo},toggleProps:{ref:de,className:"block-editor-list-view-block__menu",tabIndex:Lt,onClick:_t,onFocus:Ee,size:"small"},disableOpenOnArrowDown:!0,expand:eo,expandedState:At,setInsertedBlock:ur,__experimentalSelectBlock:Ce,isContentOnlyListView:!!Ge&&X(Ge)==="contentOnly"})}),B&&(0,zr.jsx)(Mh,{clientId:e,onClose:()=>P(!1)})]})}var cue=(0,or.memo)(lue);var as=c(C(),1);function uue(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(xFe(t,o,r),0):1}var xFe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+uue(n,e,t,o):r+1,wFe=()=>{};function due(e){let{blocks:t,selectBlock:o=wFe,showBlockMovers:r,selectedClientIds:n,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:l=0,fixedListWindow:u,isExpanded:d,parentId:f,shouldShowInnerBlocks:m=!0,isSyncedBranch:h=!1,showAppender:p=!0}=e,g=lo(f),b=h||!!g?.isSynced,v=(0,DO.useSelect)(R=>f?R(w).canEditBlock(f):!0,[f]),{blockDropPosition:y,blockDropTargetIndex:S,firstDraggedBlockIndex:k,blockIndexes:_,expandedState:x,draggedClientIds:E}=om(),B=(0,NO.useRef)();if(!v)return null;let P=p&&i===1,T=t.filter(Boolean),A=T.length,I=P?A+1:A;return B.current=l,(0,as.jsxs)(as.Fragment,{children:[T.map((R,V)=>{let{clientId:N,innerBlocks:U}=R;V>0&&(B.current+=uue(T[V-1],x,E,d));let j=!!E?.includes(N),{displacement:O,isAfterDraggedBlocks:M,isNesting:H}=nue({blockIndexes:_,blockDropTargetIndex:S,blockDropPosition:y,clientId:N,firstDraggedBlockIndex:k,isDragged:j}),{itemInView:Y}=u,oe=Y(B.current),K=V+1,Z=s.length>0?`${s}_${K}`:`${K}`,q=!!U?.length,$=q&&m?x[N]??d:void 0,Q=oue(N,n),X=a||Q&&q,J=j||oe||Q&&N===n[0]||V===0||V===A-1;return(0,as.jsxs)(DO.AsyncModeProvider,{value:!Q,children:[J&&(0,as.jsx)(cue,{block:R,selectBlock:o,isSelected:Q,isBranchSelected:X,isDragged:j,level:i,position:K,rowCount:I,siblingBlockCount:A,showBlockMovers:r,path:Z,isExpanded:j?!1:$,listPosition:B.current,selectedClientIds:n,isSyncedBranch:b,displacement:O,isAfterDraggedBlocks:M,isNesting:H}),!J&&(0,as.jsx)("tr",{children:(0,as.jsx)("td",{className:"block-editor-list-view-placeholder"})}),q&&$&&!j&&(0,as.jsx)(due,{parentId:N,blocks:U,selectBlock:o,showBlockMovers:r,level:i+1,path:Z,listPosition:B.current+1,fixedListWindow:u,isBranchSelected:X,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},N)}),P&&(0,as.jsx)(MO.__experimentalTreeGridRow,{level:i,setSize:I,positionInSet:I,isExpanded:!0,children:(0,as.jsx)(MO.__experimentalTreeGridCell,{children:R=>(0,as.jsx)(Wj,{clientId:f,nestingLevel:i,blockCount:A,...R})})})]})}var fue=(0,NO.memo)(due);var Ev=c(D(),1),VO=c(at(),1),Lu=c(L(),1),Yj=c(z(),1);var ra=c(C(),1);function mue({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=lo(e),n=tn({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[l,u]=(0,Lu.useMemo)(()=>{if(!t.current)return[];let y=i?t.current.querySelector(`[data-block="${i}"]`):void 0,S=s?t.current.querySelector(`[data-block="${s}"]`):void 0;return[y,S]},[t,i,s]),d=u||l,f=(0,Yj.isRTL)(),m=(0,Lu.useCallback)((y,S)=>{if(!d)return 0;let k=d.offsetWidth,_=(0,VO.getScrollContainer)(d,"horizontal"),x=d.ownerDocument,E=_===x.body||_===x.documentElement;if(_&&!E){let B=_.getBoundingClientRect(),P=(0,Yj.isRTL)()?B.right-y.right:y.left-B.left,T=_.clientWidth;if(T<k+P&&(k=T-P),!f&&y.left+S<B.left)return k-=B.left-y.left,k;if(f&&y.right-S>B.right)return k-=y.right-B.right,k}return k-S},[f,d]),h=(0,Lu.useMemo)(()=>{if(!d)return{};let y=d.getBoundingClientRect();return{width:m(y,0)}},[m,d]),p=(0,Lu.useMemo)(()=>{if(!d)return{};let y=(0,VO.getScrollContainer)(d),S=d.ownerDocument,k=y===S.body||y===S.documentElement;if(y&&!k){let _=y.getBoundingClientRect(),x=d.getBoundingClientRect(),E=f?_.right-x.right:x.left-_.left;if(!f&&_.left>x.left)return{transform:`translateX( ${E}px )`};if(f&&_.right<x.right)return{transform:`translateX( ${E*-1}px )`}}return{}},[f,d]),g=(0,Lu.useMemo)(()=>{if(!l)return 1;let y=parseInt(l.getAttribute("aria-level"),10);return y?y+1:1},[l]),b=(0,Lu.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),v=(0,Lu.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let S=d.getBoundingClientRect(),k=S.left,_=0,x=(0,VO.getScrollContainer)(d,"horizontal"),E=d.ownerDocument,B=x===E.body||x===E.documentElement;if(x&&!B){let A=x.getBoundingClientRect(),I=f?x.offsetWidth-x.clientWidth:0;k<A.left+I&&(k=A.left+I)}a==="top"?_=S.top-S.height*2:_=S.top;let P=m(S,0),T=S.height;return new window.DOMRect(k,_,P,T)}}},[d,a,m,f]);return d?(0,ra.jsx)(Ev.Popover,{animate:!1,anchor:v,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,ra.jsx)("div",{style:h,className:G("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,ra.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,ra.jsxs)("div",{className:G("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:p,children:[(0,ra.jsx)(IO,{onClick:()=>{}}),(0,ra.jsx)(rt,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,ra.jsx)(Ev.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,ra.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,ra.jsx)(Ev.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,ra.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var pue=c(_r(),1),Tv=c(z(),1),Pw=c(W(),1),hue=c(L(),1),ls=c(Pt(),1),gue=c(ee(),1);function bue(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,Pw.useDispatch)(w),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:l}=(0,Pw.useSelect)(w),{getBlockType:u}=(0,Pw.useSelect)(gue.store);return{updateBlockSelection:(0,hue.useCallback)(async(f,m,h,p)=>{if(!f?.shiftKey&&f?.keyCode!==ls.ESCAPE){o(m,p);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===ls.ESCAPE,b=f.type==="keydown"&&(f.keyCode===ls.UP||f.keyCode===ls.DOWN||f.keyCode===ls.HOME||f.keyCode===ls.END);if(!b&&!l()&&!a()){o(m,null);return}let v=s(),y=[...n(m),m];if((g||b&&!v.some(x=>y.includes(x)))&&await e(),!g){let x=i(),E=m;b&&(!l()&&!a()&&(x=m),h&&(E=h));let B=n(x),P=n(E),{start:T,end:A}=rue(x,E,B,P);await t(T,A,null)}let S=s();if((f.keyCode===ls.HOME||f.keyCode===ls.END)&&S.length>1)return;let k=v.filter(x=>!S.includes(x)),_;if(k.length===1){let x=u(r(k[0]))?.title;x&&(_=(0,Tv.sprintf)((0,Tv.__)("%s deselected."),x))}else k.length>1&&(_=(0,Tv.sprintf)((0,Tv.__)("%s blocks deselected."),k.length));_&&(0,pue.speak)(_,"assertive")},[e,r,u,n,i,s,a,l,t,o])}}var yue=c(L(),1);function vue(e){return(0,yue.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 kue=c(W(),1);function Sue({blocks:e,rootClientId:t}){return(0,kue.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=F(o(w));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var _ue=c(L(),1),xue=c(W(),1);function wue({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,xue.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=F(n(w));return{expandedBlock:s(),getBlockParents:i}},[]);(0,_ue.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var Cue=c(W(),1),zh=c(L(),1),jh=c(te(),1),Eue=c(z(),1);var Mu=24;function CFe(e,t,o=1,r=!1){let n=r?t.right-o*Mu:t.left+o*Mu;return r?e.x>n:e.x<n}function EFe(e,t,o=1,r=!1){let n=r?t.right-o*Mu:t.left+o*Mu,i=r?n-e.x:e.x-n,s=Math.round(i/Mu);return Math.abs(s)}function TFe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function Tue(e,t){let o=e[t+1];return o&&o.isDraggedBlock?Tue(e,t+1):o}function BFe(e,t,o=1,r=!1){let n=r?t.right-o*Mu:t.left+o*Mu;return(r?e.x<n-Mu:e.x>n+Mu)&&e.y<t.bottom}var PFe=["top","bottom"];function RFe(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]=wh(t,h,PFe),b=HR(t,h);if(i===void 0||p<i||b){i=p;let v=e.indexOf(m),y=e[v-1];if(g==="top"&&y&&y.rootClientId===m.rootClientId&&!y.isDraggedBlock?(n=y,r="bottom",s=y.element.getBoundingClientRect(),a=v-1):(n=m,r=g,s=h,a=v),b)break}}if(!n)return;let l=TFe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||BFe(t,s,l.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&&CFe(t,s,l.length,o)){let f=Tue(e,a),m=n.nestingLevel,h=f?f.nestingLevel:1;if(m&&h){let p=EFe(t,s,l.length,o),g=Math.max(Math.min(p,m-h),0);if(l[g]){let b=n.blockIndex;if(l[g].nestingLevel===f?.nestingLevel)b=f?.blockIndex;else for(let v=a;v>=0;v--){let y=e[v];if(y.rootClientId===l[g].rootClientId){b=y.blockIndex+1;break}}return{rootClientId:l[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 IFe={leading:!1,trailing:!0};function Bue({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,Cue.useSelect)(w),[l,u]=(0,zh.useState)(),{rootClientId:d,blockIndex:f}=l||{},m=jR(d,f),h=(0,Eue.isRTL)(),p=(0,jh.usePrevious)(d),g=(0,zh.useCallback)((k,_)=>{let{rootClientId:x}=_||{};x&&_?.dropPosition==="inside"&&!k[x]&&o({type:"expand",clientIds:[x]})},[o]),b=(0,jh.useThrottle)(g,500,IFe);(0,zh.useEffect)(()=>{if(l?.dropPosition!=="inside"||p!==l?.rootClientId){b.cancel();return}b(t,l)},[t,p,l,b]);let v=s(),y=(0,jh.useThrottle)((0,zh.useCallback)((k,_)=>{let x={x:k.clientX,y:k.clientY},E=!!v?.length,P=Array.from(_.querySelectorAll("[data-block]")).map(A=>{let I=A.dataset.block,R=A.dataset.expanded==="true",V=A.classList.contains("is-dragging"),N=parseInt(A.getAttribute("aria-level"),10),U=r(I);return{clientId:I,isExpanded:R,rootClientId:U,blockIndex:n(I),element:A,nestingLevel:N||void 0,isDraggedBlock:E?V:!1,innerBlockCount:i(I),canInsertDraggedBlocksAsSibling:E?a(v,U):!0,canInsertDraggedBlocksAsChild:E?a(v,I):!0}}),T=RFe(P,x,h);T&&u(T)},[a,v,i,n,r,h]),50);return{ref:(0,jh.__experimentalUseDropZone)({dropZoneElement:e,onDrop(k){y.cancel(),l&&m(k),u(void 0)},onDragLeave(){y.cancel(),u(null)},onDragOver(k){y(k,k.currentTarget)},onDragEnd(){y.cancel(),u(void 0)}}),target:l}}var FO=c(L(),1),Pue=c(W(),1);function Rue({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,FO.useState)(null),{selectedBlockParentClientIds:n}=(0,Pue.useSelect)(i=>{let{getBlockParents:s}=i(w);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,FO.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var Bv=c(W(),1),Iue=c(te(),1);function Oue({selectBlock:e}){let t=(0,Bv.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:l,canRemoveBlocks:u}=(0,Bv.useSelect)(w),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:h}=(0,Bv.useDispatch)(w),p=cy();return(0,Iue.useRefEffect)(g=>{function b(S,k){k&&e(void 0,S,null,null),wv(S,g)}function v(S){let k=s(),_=k.includes(S),x=_?k[0]:S,E=r(x);return{blocksToUpdate:_?k:[S],firstBlockClientId:x,firstBlockRootClientId:E,originallySelectedBlockClientIds:k}}function y(S){if(S.defaultPrevented||!g.contains(S.target.ownerDocument.activeElement))return;let _=S.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!_)return;let{blocksToUpdate:x,firstBlockClientId:E,firstBlockRootClientId:B,originallySelectedBlockClientIds:P}=v(_);if(x.length!==0){if(S.preventDefault(),S.type==="copy"||S.type==="cut"){x.length===1&&d(x[0]),p(S.type,x);let T=n(x);CP(S,T,t)}if(S.type==="cut"){if(!u(x))return;let T=i(E)??B;f(x,!1);let A=P.length>0&&s().length===0;T||(T=o()[0]),b(T,A)}else if(S.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:T}=a(),A=Lee(S,T);if(x.length===1){let[I]=x;if(A.every(R=>l(R.name,I))){h(A,void 0,I),b(A[0]?.clientId,!1);return}}m(x,A,A.length-1,-1),b(A[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",y),g.ownerDocument.addEventListener("cut",y),g.ownerDocument.addEventListener("paste",y),()=>{g.ownerDocument.removeEventListener("copy",y),g.ownerDocument.removeEventListener("cut",y),g.ownerDocument.removeEventListener("paste",y)}},[])}var Nu=c(C(),1),OFe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,Aue=32;function Nue({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=yj,rootClientId:a,description:l,onSelect:u,additionalBlockContent:d},f){t&&(0,Mue.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,Pv.useInstanceId)(Nue),{clientIdsTree:h,draggedClientIds:p,selectedClientIds:g}=Sue({blocks:t,rootClientId:a}),b=vue(h),{getBlock:v,getSelectedBlockClientIds:y}=(0,Rw.useSelect)(w),{visibleBlockCount:S}=(0,Rw.useSelect)(ie=>{let{getGlobalBlockCount:se,getClientIdsOfDescendants:re}=ie(w),le=p?.length>0?re(p).length+1:0;return{visibleBlockCount:se()-le}},[p]),{updateBlockSelection:k}=bue(),[_,x]=(0,rr.useReducer)(OFe,{}),[E,B]=(0,rr.useState)(null),{setSelectedTreeId:P}=Rue({firstSelectedBlockClientId:g[0],setExpandedState:x}),T=(0,rr.useCallback)((ie,se,re)=>{k(ie,se,null,re),P(se),u&&u(v(se))},[P,k,u,v]),{ref:A,target:I}=Bue({dropZoneElement:o,expandedState:_,setExpandedState:x}),R=(0,rr.useRef)(),V=Oue({selectBlock:T}),N=(0,rr.useCallback)(ie=>{let[se]=y();se&&ie&&wv(se,ie)},[y]),U=(0,Pv.useMergeRefs)([V,N,R,A,f]),j=(0,rr.useCallback)(ie=>{if(!ie)return;let se=Array.isArray(ie)?ie:[ie];x({type:"expand",clientIds:se})},[x]),O=(0,rr.useCallback)(ie=>{ie&&x({type:"collapse",clientIds:[ie]})},[x]),M=(0,rr.useCallback)(()=>{x({type:"clear"})},[x]),H=(0,rr.useCallback)(ie=>{j(ie?.dataset?.block)},[j]),Y=(0,rr.useCallback)(ie=>{O(ie?.dataset?.block)},[O]),oe=(0,rr.useCallback)((ie,se,re)=>{ie.shiftKey&&k(ie,se?.dataset?.block,re?.dataset?.block)},[k]);wue({collapseAll:M,expand:j});let K=p?.[0],{blockDropTargetIndex:Z,blockDropPosition:q,firstDraggedBlockIndex:$}=(0,rr.useMemo)(()=>{let ie,se;if(I?.clientId){let re=b[I.clientId];ie=re===void 0||I?.dropPosition==="top"?re:re+1}else I===null&&(ie=null);if(K){let re=b[K];se=re===void 0||I?.dropPosition==="top"?re:re+1}return{blockDropTargetIndex:ie,blockDropPosition:I?.dropPosition,firstDraggedBlockIndex:se}},[I,b,K]),Q=(0,rr.useMemo)(()=>({blockDropPosition:q,blockDropTargetIndex:Z,blockIndexes:b,draggedClientIds:p,expandedState:_,expand:j,firstDraggedBlockIndex:$,collapse:O,collapseAll:M,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:E,setInsertedBlock:B,treeGridElementRef:R,rootClientId:a}),[q,Z,b,p,_,j,$,O,M,s,m,d,E,B,a]),[X]=(0,Pv.__experimentalUseFixedWindowList)(R,Aue,S,{expandedState:_,useWindowing:!0,windowOverscan:40});if(!h.length&&!i)return null;let J=l&&`block-editor-list-view-description-${m}`;return(0,Nu.jsxs)(Rw.AsyncModeProvider,{value:!0,children:[(0,Nu.jsx)(mue,{draggedBlockClientId:K,listViewRef:R,blockDropTarget:I}),l&&(0,Nu.jsx)(ct,{id:J,children:l}),(0,Nu.jsx)(Lue.__experimentalTreeGrid,{id:e,className:G("block-editor-list-view-tree",{"is-dragging":p?.length>0&&Z!==void 0}),"aria-label":(0,qj.__)("Block navigation structure"),ref:U,onCollapseRow:Y,onExpandRow:H,onFocusRow:oe,applicationAriaLabel:(0,qj.__)("Block navigation structure"),"aria-describedby":J,style:{"--wp-admin--list-view-dragged-items-height":p?.length?`${Aue*(p.length-1)}px`:null},children:(0,Nu.jsx)(TO.Provider,{value:Q,children:(0,Nu.jsx)(fue,{blocks:h,parentId:a,selectBlock:T,showBlockMovers:r,fixedListWindow:X,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var Iw=(0,rr.forwardRef)(Nue),zO=(0,rr.forwardRef)((e,t)=>(0,Nu.jsx)(Iw,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var im=c(C(),1);function AFe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,im.jsx)(jO.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:RS,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,Zj.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function LFe({isDisabled:e,...t},o){(0,Due.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,Vue.useSelect)(i=>!!i(w).getBlockCount(),[])&&!e;return(0,im.jsx)(jO.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,im.jsx)(AFe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,im.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,im.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,Zj.__)("List view")}),(0,im.jsx)(zO,{})]})})}var zue=(0,Fue.forwardRef)(LFe);var Ow=c(L(),1),Hue=c(W(),1),Uue=c(te(),1),sm=c(D(),1),Xj=c(z(),1);var Du=c(C(),1),jue=()=>{};function MFe({clientId:e,onSwitch:t=jue,onHoverClassName:o=jue}){let r=(0,Hue.useSelect)(_=>_(w).canEditBlock(e),[e]),{onSelect:n,stylesToRender:i,activeStyle:s,genericPreviewBlock:a,className:l}=lv({clientId:e,onSwitch:t}),[u,d]=(0,Ow.useState)(null),[f,m]=(0,Ow.useState)(null),h=Vo(),p=(0,Ow.useMemo)(()=>{if(!u||!a)return null;let _=Xf(l,s,u);return[{...a,attributes:{...a.attributes||{},className:_}}]},[u,a,l,s]);if(!r||!i||i.length===0)return null;let g=(0,Uue.debounce)(d,250),b=_=>{n(_),o(null),d(null),g.cancel()},v=_=>{if(u===_){g.cancel();return}g(_),o(_?.name??null)},y=YI(i),S=()=>s?.name!==y?.name,k=()=>{b(y)};return(0,Du.jsx)(sm.__experimentalToolsPanel,{label:(0,Xj.__)("Styles"),resetAll:k,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:h,children:(0,Du.jsx)(sm.__experimentalToolsPanelItem,{hasValue:S,label:(0,Xj.__)("Variation"),onDeselect:k,isShownByDefault:!0,panelId:e,children:(0,Du.jsxs)("div",{ref:m,className:"block-editor-block-styles",children:[(0,Du.jsx)("div",{className:"block-editor-block-styles__variants",children:i.map(_=>{let x=_.label||_.name;return(0,Du.jsx)(sm.Button,{__next40pxDefaultSize:!0,className:G("block-editor-block-styles__item",{"is-active":s.name===_.name}),variant:"secondary",label:x,onMouseEnter:()=>v(_),onFocus:()=>v(_),onMouseLeave:()=>v(null),onBlur:()=>v(null),onClick:()=>b(_),"aria-current":s.name===_.name,children:(0,Du.jsx)(sm.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:x})},_.name)})}),p&&(0,Du.jsx)(em,{blocks:p,placement:"left-start",offset:34,anchor:f})]})})})}var Rv=MFe;var Yue=c(D(),1),Iv=c(z(),1);var Wue=c(D(),1),$ue=c(C(),1),Gue={0:DV,1:XD,2:JD,3:tV,4:rV,5:iV,6:aV};function Qj({level:e}){return Gue[e]?(0,$ue.jsx)(Wue.Icon,{icon:Gue[e]}):null}var HO=c(C(),1),Kue=[1,2,3,4,5,6],NFe={className:"block-library-heading-level-dropdown"};function que({options:e=Kue,value:t,onChange:o}){let r=e.filter(n=>n===0||Kue.includes(n)).sort((n,i)=>n-i);return(0,HO.jsx)(Yue.ToolbarDropdownMenu,{popoverProps:NFe,icon:(0,HO.jsx)(Qj,{level:t}),label:(0,Iv.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,HO.jsx)(Qj,{level:n}),title:n===0?(0,Iv.__)("Paragraph"):(0,Iv.sprintf)((0,Iv.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var Aw=c(z(),1),Lw=c(D(),1);var Vu=c(C(),1);function DFe({icon:e=CV,label:t=(0,Aw.__)("Choose variation"),instructions:o=(0,Aw.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=G("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,Vu.jsxs)(Lw.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,Vu.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,Aw.__)("Block variations"),children:r.map(a=>(0,Vu.jsxs)("li",{children:[(0,Vu.jsx)(Lw.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,Vu.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,Vu.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,Vu.jsx)(Lw.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,Aw.__)("Skip")})})]})}var Zue=DFe;var ede=c(W(),1),tde=c(ee(),1),eH=c(D(),1);var Jj=c(L(),1),tH=c(te(),1),ode=c(z(),1);var Fu=c(z(),1),Ov=c(D(),1);var am={carousel:"carousel",grid:"grid"};var cs=c(C(),1),VFe=({onBlockPatternSelect:e})=>(0,cs.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,cs.jsx)(Ov.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,Fu.__)("Choose")})}),FFe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,cs.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,cs.jsx)(Ov.Button,{size:"compact",icon:(0,Fu.isRTL)()?Sr:In,label:(0,Fu.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,cs.jsx)(Ov.Button,{size:"compact",icon:(0,Fu.isRTL)()?In:Sr,label:(0,Fu.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),zFe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===am.carousel,l=(0,cs.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,cs.jsx)(Ov.Button,{size:"compact",icon:$S,label:(0,Fu.__)("Carousel view"),onClick:()=>t(am.carousel),isPressed:a}),(0,cs.jsx)(Ov.Button,{size:"compact",icon:_S,label:(0,Fu.__)("Grid view"),onClick:()=>t(am.grid),isPressed:e===am.grid})]});return(0,cs.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,cs.jsx)(FFe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),l,a&&(0,cs.jsx)(VFe,{onBlockPatternSelect:s})]})},Xue=zFe;var Que=c(W(),1);function jFe(e,t,o){return(0,Que.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(w),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var Jue=jFe;var ko=c(C(),1),HFe=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===am.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,ko.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,ko.jsx)("div",{className:i,children:(0,ko.jsx)("div",{className:"carousel-container",children:o.map((a,l)=>(0,ko.jsx)(nde,{active:l===t,className:s.get(l)||"",pattern:a},a.name))})})})}return(0,ko.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,ko.jsx)(eH.Composite,{role:"listbox",className:i,"aria-label":(0,ode.__)("Patterns list"),children:o.map(s=>(0,ko.jsx)(rde,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function rde({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,tH.useInstanceId)(rde,`${r}__item-description`);return(0,ko.jsx)("div",{className:`${r}__list-item`,children:(0,ko.jsxs)(eH.Composite.Item,{render:(0,ko.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,ko.jsx)(yi,{blocks:n,viewportWidth:s}),o&&(0,ko.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,ko.jsx)(ct,{id:a,children:i})]})})}function nde({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,tH.useInstanceId)(nde,"block-editor-block-pattern-setup-list__item-description");return(0,ko.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,ko.jsx)(yi,{blocks:n,minHeight:r}),!!s&&(0,ko.jsx)(ct,{id:a,children:s})]})}var UFe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=am.carousel,showTitles:i=!1})=>{let[s,a]=(0,Jj.useState)(n),[l,u]=(0,Jj.useState)(0),{replaceBlock:d}=(0,ede.useDispatch)(w),f=Jue(e,t,o);if(!f?.length)return null;let h=r||(p=>{let g=p.map(b=>(0,tde.cloneBlock)(b));d(e,g)});return(0,ko.jsx)(ko.Fragment,{children:(0,ko.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,ko.jsx)(HFe,{viewMode:s,activeSlide:l,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,ko.jsx)(Xue,{viewMode:s,setViewMode:a,activeSlide:l,totalSlides:f.length,handleNext:()=>{u(p=>Math.min(p+1,f.length-1))},handlePrevious:()=>{u(p=>Math.max(p-1,0))},onBlockPatternSelect:()=>{h(f[l].blocks)}})]})})},ide=UFe;var oH=c(ee(),1),zu=c(z(),1),ju=c(D(),1);var UO=c(W(),1),sde=c(L(),1);var nr=c(C(),1),{Menu:Hh}=F(ju.privateApis);function GFe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,nr.jsxs)("fieldset",{className:e,children:[(0,nr.jsx)(ct,{render:(0,nr.jsx)("legend",{}),children:(0,zu.__)("Transform to variation")}),r.map(n=>(0,nr.jsx)(ju.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,nr.jsx)(rt,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,zu.sprintf)((0,zu.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function WFe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,nr.jsx)("div",{className:e,children:(0,nr.jsxs)(Hh,{children:[(0,nr.jsx)(Hh.TriggerButton,{render:(0,nr.jsx)(ju.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,zu.__)("Transform to variation")})}),(0,nr.jsx)(Hh.Popover,{position:"bottom",children:(0,nr.jsx)(Hh.Group,{children:r.map(n=>(0,nr.jsxs)(Hh.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,nr.jsx)(Hh.ItemLabel,{children:n.title}),n.description&&(0,nr.jsx)(Hh.ItemHelpText,{children:n.description})]},n.name))})})]})})}function $Fe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,nr.jsx)("div",{className:e,children:(0,nr.jsx)(ju.__experimentalToggleGroupControl,{label:(0,zu.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,nr.jsx)(ju.__experimentalToggleGroupControlOptionIcon,{icon:(0,nr.jsx)(rt,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,zu.sprintf)((0,zu.__)("Transform to %s"),n.title)},n.name))})})}function KFe({blockClientId:e}){let{updateBlockAttributes:t}=(0,UO.useDispatch)(w),{activeBlockVariation:o,variations:r,canEdit:n,isContentOnly:i,isSection:s}=(0,UO.useSelect)(p=>{let{getActiveBlockVariation:g,getBlockVariations:b}=p(oH.store),{getBlockName:v,getBlockAttributes:y,getBlockEditingMode:S,isSectionBlock:k}=F(p(w)),{canEditBlock:_}=p(w),x=e&&v(e),{hasContentRoleAttribute:E}=F(p(oH.store)),B=E(x);return{activeBlockVariation:g(x,y(e),"transform"),variations:x&&b(x,"transform"),canEdit:_(e),isContentOnly:S(e)==="contentOnly"&&!B,isSection:k(e)}},[e]),a=o?.name,l=(0,sde.useMemo)(()=>{let p=new Set;return r?(r.forEach(g=>{g.icon&&p.add(g.icon?.src||g.icon)}),p.size===r.length):!1},[r]),u=p=>{t(e,{...r.find(({name:g})=>g===p).attributes})};if(!r?.length||!n||i||s)return null;let d="block-editor-block-variation-transforms",m=r.length>6?GFe:$Fe;return(0,nr.jsx)(l?m:WFe,{className:d,onSelectVariation:u,selectedValue:a,variations:r})}var GO=KFe;var Uh=c(z(),1),WO=c(D(),1);var ade=c(C(),1),rH={top:{icon:PS,title:(0,Uh._x)("Align top","Block vertical alignment setting")},center:{icon:ES,title:(0,Uh._x)("Align middle","Block vertical alignment setting")},bottom:{icon:CS,title:(0,Uh._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:BS,title:(0,Uh._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:TS,title:(0,Uh._x)("Space between","Block vertical alignment setting")}},YFe=["top","center","bottom"],qFe="top";function ZFe({value:e,onChange:t,controls:o=YFe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=rH[e],a=rH[qFe],l=n?WO.ToolbarGroup:WO.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,ade.jsx)(l,{icon:s?s.icon:a.icon,label:(0,Uh._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...rH[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var nH=ZFe;var iH=c(C(),1),rT=e=>(0,iH.jsx)(nH,{...e,isToolbar:!1}),lde=e=>(0,iH.jsx)(nH,{...e,isToolbar:!0});var Ei=c(D(),1),Mw=c(L(),1),qO=c(z(),1);var cde=c(D(),1);var sH=c(z(),1),ude=c(C(),1);function dde({isLinked:e,...t}){let o=e?(0,sH.__)("Unlink radii"):(0,sH.__)("Link radii");return(0,ude.jsx)(cde.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?li:Bs,iconSize:24,label:o})}var fde=c(D(),1);function XFe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function mde(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let l=(0,fde.__experimentalParseQuantityAndUnitFromRawValue)(a);return typeof a=="string"&&l[0]===void 0?[a,""]:l}),o=t.map(a=>a[0]??""),r=t.map(a=>a[1]),n=o.every(a=>a===o[0])?o[0]:"",i=XFe(r);return n===0||n?`${n}${i||""}`:void 0}function pde(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 hde(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var na=c(D(),1),Sde=c(te(),1),cm=c(z(),1);var Gh=c(L(),1);var aH=24,gde=8,$O={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 lm=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function bde(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 yde(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":bde(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function lH(e,t,o){if(!lm(e,o))return e;let r=parseFloat(e,10)===0?"0":bde(e,o);return t.find(i=>String(i.slug)===r)?.size}function vde(e,t,o){if(!e||lm(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 KO=c(D(),1);var sl=c(C(),1);function kde({allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:o,minValue:r,parsedQuantity:n,computedUnit:i,units:s,isMixed:a,step:l,max:u,showTooltip:d,value:f,minimumCustomValue:m,onCustomValueChange:h,onCustomValueSliderChange:p,onUnitChange:g,onMouseOut:b,onMouseOver:v,setMinValue:y}){let S=(0,sl.jsx)(KO.__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)==="-"&&y(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&y(0)},onDragEnd:()=>{e&&y(m)}}),k=d?(0,sl.jsxs)(lt.Root,{children:[(0,sl.jsx)(lt.Trigger,{render:(0,sl.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:S})}),(0,sl.jsx)(lt.Popup,{children:t})]}):S;return(0,sl.jsxs)(sl.Fragment,{children:[k,(0,sl.jsx)(KO.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:l,value:n,withInputField:!1,__next40pxDefaultSize:!0})]})}var um=c(C(),1);function Wh({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=$O,disableCustomValues:n,icon:i,isMixed:s,value:a,minimumCustomValue:l,onChange:u,onMouseOut:d,onMouseOver:f,onUnitChange:m,presets:h=[],presetType:p,selectedUnit:g,showTooltip:b,units:v}){let y=(0,Gh.useMemo)(()=>vde(a,h,p),[a,h,p]),S=o??"preset-input-control",k=h.slice(1,h.length-1).map((X,J)=>({value:J+1,label:void 0})),_=k.length>0,x=h.length<=gde,E=s?(0,cm.__)("Mixed"):null,[B,P]=(0,Gh.useState)(l),[T,A]=(0,Gh.useState)(!n&&y!==void 0&&!lm(y,p)),I=null,R=(0,Sde.usePrevious)(y);(0,Gh.useEffect)(()=>{y&&R!==y&&!lm(y,p)&&T!==!0&&A(!0)},[y,R,p,T]);let V=!x&&!T&&y!==void 0&&(!lm(y,p)||lm(y,p)&&s),N=h;V?(N=[...h,{name:s?(0,cm.__)("Mixed"):(0,cm.sprintf)((0,cm.__)("Custom (%s)"),y),slug:"custom",size:y}],I=N.length-1):s||(I=T?lH(y,h,p):yde(y,h,p));let U=N.map((X,J)=>({key:J,name:X.name})),j=lm(y,p)?lH(y,h,p):y,[O,M]=(0,na.__experimentalParseQuantityAndUnitFromRawValue)(j),H=M||g||"px",Y=v?.find(X=>X.value===H),oe=Y?.step??r[H]?.steps??.1,K=Y?.max??r[H]?.max??10,Z=X=>{if(X===void 0||X===""){u(void 0);return}isNaN(parseFloat(X))||u(X)},q=X=>{u([X,H].join(""))},$=X=>y===void 0?void 0:h[X]?.name,Q=(X,J)=>{let ie=parseInt(X,10);if(J==="selectList"){if(ie===0&&h[0]?.slug==="0")return"0";if(ie===0)return}else if(ie===0)return"0";return`var:preset|${p}|${h[X]?.slug}`};return(0,um.jsxs)(na.__experimentalHStack,{className:`preset-input-control__wrapper ${S}__wrapper`,children:[i&&(0,um.jsx)(na.Icon,{className:"preset-input-control__icon",icon:i,size:aH}),(!_||T)&&(0,um.jsx)(kde,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:E,minValue:B,parsedQuantity:O,computedUnit:H,units:v,isMixed:s,step:oe,max:K,showTooltip:b,value:y,minimumCustomValue:l,onCustomValueChange:Z,onCustomValueSliderChange:q,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:P}),_&&x&&!T&&(0,um.jsx)(na.RangeControl,{"aria-valuenow":I,"aria-valuetext":h[I]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:h.length-1,marks:k,min:0,onBlur:d,onChange:X=>u(Q(X)),onFocus:f,onMouseDown:X=>{X?.nativeEvent?.offsetX<35&&y===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:$,step:1,value:I,withInputField:!1,__next40pxDefaultSize:!0}),_&&!x&&!T&&(0,um.jsx)(na.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:X=>{V&&X.selectedItem.key===U.length-1?A(!0):u(Q(X.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:U,size:"__unstable-large",value:U.find(X=>X.key===I)||""}),_&&!n&&(0,um.jsx)(na.Button,{className:"preset-input-control__custom-toggle",icon:s5,iconSize:aH,isPressed:T,label:T?(0,cm.__)("Use preset"):(0,cm.__)("Set custom value"),onClick:()=>{A(!T)},size:"small"})]})}var Av=c(z(),1);var _de=8,YO=[],cH={all:(0,Av.__)("Border radius"),topLeft:(0,Av.__)("Top left"),topRight:(0,Av.__)("Top right"),bottomLeft:(0,Av.__)("Bottom left"),bottomRight:(0,Av.__)("Bottom right")},uH={all:bD,topLeft:kD,topRight:SD,bottomLeft:yD,bottomRight:vD},dH=0;var Hu=c(C(),1);function QFe(e){let t=e?.default??YO,o=e?.custom??YO,r=e?.theme??YO;return(0,Mw.useMemo)(()=>{let n=[{name:(0,qO.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>_de?[{name:(0,qO.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function xde(e,t){return t==="all"?mde(e):typeof e=="string"?e:e?.[t]}function wde(e,t){return t==="all"?e.flat:e[t]}function Cde(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 Ede(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 ZO({onChange:e,values:t,presets:o}){let[r,n]=(0,Mw.useState)(!hde(t)||!pde(t)),i=QFe(o),[s,a]=(0,Mw.useState)({flat:typeof t=="string"?(0,Ei.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,Ei.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,Ei.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,Ei.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,Ei.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[l]=ke("spacing.units"),u=(0,Ei.__experimentalUseCustomUnits)({availableUnits:l||["px","em","rem"]}),d=()=>n(!r);return(0,Hu.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,Hu.jsxs)(Ei.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,Hu.jsx)(Ei.BaseControl.VisualLabel,{as:"legend",children:(0,qO.__)("Radius")}),(0,Hu.jsx)(dde,{onClick:d,isLinked:r})]}),r?(0,Hu.jsx)(Wh,{ariaLabel:cH.all,className:"components-border-radius-control",icon:uH.all,minimumCustomValue:dH,onChange:Cde("all",t,e),onUnitChange:Ede("all",s,a),presets:i,presetType:"border-radius",selectedUnit:wde(s,"all"),showTooltip:!0,units:u,value:xde(t,"all")}):(0,Hu.jsx)(Ei.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,Hu.jsx)(Wh,{ariaLabel:cH[f],className:"components-border-radius-control",icon:uH[f],minimumCustomValue:dH,onChange:Cde(f,t,e),onUnitChange:Ede(f,s,a),presets:i,presetType:"border-radius",selectedUnit:wde(s,f),showTooltip:!0,units:u,value:xde(t,f)},f))})]})}var Pde=c(D(),1);var Tde=c(te(),1);var Bde=c(C(),1),XO=(0,Tde.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=ke("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),l=a?[...n||[],...r||[],...i||[]]:[...n||[],...i||[]],{colors:u=l,disableCustomColors:d=!s}=o,f=u&&u.length>0||!d;return(0,Bde.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var Rde=XO(Pde.ColorPalette);var fH=c(z(),1),us=c(D(),1);var uo=c(C(),1),{Tabs:Lv}=F(us.privateApis),JFe=["colors","disableCustomColors","gradients","disableCustomGradients"],ac={color:"color",gradient:"gradient"};function Ide({colors:e,gradients:t,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,className:i,label:s,onColorChange:a,onGradientChange:l,colorValue:u,colorSlug:d,gradientValue:f,clearable:m,showTitle:h=!0,enableAlpha:p,headingLevel:g,noticeProps:b}){let v=a&&(e&&e.length>0||!o),y=l&&(t&&t.length>0||!r);if(!v&&!y)return null;let k=(0,uo.jsx)(us.ColorPalette,{value:u,selectedSlug:d,onChange:y?(E,B,P)=>{a(E,P),l()}:(E,B,P)=>a(E,P),colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:m,enableAlpha:p,headingLevel:g}),_={[ac.color]:(0,uo.jsxs)(uo.Fragment,{children:[b&&(0,uo.jsx)(us.Notice,{isDismissible:!1,...b}),k]}),[ac.gradient]:(0,uo.jsx)(us.GradientPicker,{value:f,onChange:v?E=>{l(E),a()}:l,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:m,headingLevel:g})},x=E=>(0,uo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:_[E]});return(0,uo.jsx)(us.BaseControl,{className:G("block-editor-color-gradient-control",i),children:(0,uo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,uo.jsxs)(us.__experimentalVStack,{spacing:1,children:[h&&(0,uo.jsx)("legend",{children:(0,uo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,uo.jsx)(us.BaseControl.VisualLabel,{children:s})})}),v&&y&&(0,uo.jsx)("div",{children:(0,uo.jsxs)(Lv,{defaultTabId:f?ac.gradient:!!v&&ac.color,children:[(0,uo.jsxs)(Lv.TabList,{children:[(0,uo.jsx)(Lv.Tab,{tabId:ac.color,children:(0,fH.__)("Color")}),(0,uo.jsx)(Lv.Tab,{tabId:ac.gradient,children:(0,fH.__)("Gradient")})]}),(0,uo.jsx)(Lv.TabPanel,{tabId:ac.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:_.color}),(0,uo.jsx)(Lv.TabPanel,{tabId:ac.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:_.gradient})]})}),!y&&x(ac.color),!v&&x(ac.gradient)]})})})}function e3e(e){let[t,o,r,n]=ke("color.palette","color.gradients","color.custom","color.customGradient");return(0,uo.jsx)(Ide,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function t3e(e){return JFe.every(t=>e.hasOwnProperty(t))?(0,uo.jsx)(Ide,{...e}):(0,uo.jsx)(e3e,{...e})}var dm=t3e;var Ode=c(C(),1);function Ade({onChange:e,value:t,...o}){return(0,Ode.jsx)(dm,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var al=c(z(),1),Lde=c(D(),1),Mde=c(_r(),1),mH=c(C(),1);_d([xd,Mg]);function pH({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:o,fallbackLinkColor:r,fontSize:n,isLargeText:i,textColor:s,linkColor:a,messageOverride:l,enableAlphaChecker:u=!1}){let d=e||t;if(!d)return null;let f=s||o,m=a||r;if(!f&&!m)return null;let h=[{color:f,description:(0,al.__)("text color")},{color:m,description:(0,al.__)("link color")}],p=no(d),g=p.alpha()<1,b=p.brightness(),v={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},y="",S="";for(let k of h){if(!k.color)continue;let _=no(k.color),x=_.isReadable(p,v),E=_.alpha()<1;if(!x){if(g||E)continue;if(l){y=l,S=l;break}y=b<_.brightness()?(0,al.sprintf)((0,al.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),k.description):(0,al.sprintf)((0,al.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),k.description),S=(0,al.__)("This color combination may be hard for people to read.");break}E&&u&&(y=(0,al.__)("Transparent text may be hard for people to read."),S=(0,al.__)("Transparent text may be hard for people to read."))}return y?{message:y,speakMessage:S}:null}function o3e(e){let t=pH(e);return t?((0,Mde.speak)(t.speakMessage),(0,mH.jsx)("div",{className:"block-editor-contrast-checker",children:(0,mH.jsx)(Lde.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:t.message})})):null}var Nde=o3e;var cn=c(z(),1),Nw=c(lc(),1),QO=c(L(),1),cl=c(D(),1);var ll=c(C(),1),fm=new Date;fm.setDate(20);fm.setMonth(fm.getMonth()-3);fm.getMonth()===4&&fm.setMonth(3);function Vde({format:e,defaultFormat:t,onChange:o}){return(0,ll.jsxs)(cl.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,ll.jsx)(ct,{render:(0,ll.jsx)("legend",{}),children:(0,cn.__)("Date format")}),(0,ll.jsx)(cl.ToggleControl,{label:(0,cn.__)("Default format"),help:`${(0,cn.__)("Example:")} ${(0,Nw.dateI18n)(t,fm)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,ll.jsx)(r3e,{format:e,onChange:o})]})}function r3e({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,cn._x)("n/j/Y","short date format"),(0,cn._x)("n/j/Y g:i A","short date format with time"),(0,cn._x)("M j, Y","medium date format"),(0,cn._x)("M j, Y g:i A","medium date format with time"),(0,cn._x)("F j, Y","long date format"),(0,cn._x)("M j","short date format without the year")])].map((a,l)=>({key:`suggested-${l}`,name:(0,Nw.dateI18n)(a,fm),format:a})),{key:"human-diff",name:(0,Nw.humanTimeDiff)(fm),format:"human-diff"}],n={key:"custom",name:(0,cn.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,cn.__)("Enter your own date format")},[i,s]=(0,QO.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,ll.jsxs)(cl.__experimentalVStack,{children:[(0,ll.jsx)(cl.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,cn.__)("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,ll.jsx)(cl.TextControl,{label:(0,cn.__)("Custom format"),hideLabelFromVision:!0,help:(0,QO.createInterpolateElement)((0,cn.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,ll.jsx)(cl.ExternalLink,{href:(0,cn.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var ia=c(D(),1),Dw=c(z(),1),Fde=c(Pt(),1);var zde=c(te(),1),cc=c(C(),1);function jde({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,cc.jsx)(ia.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,cc.jsx)(ia.DuotoneSwatch,{values:i}):a=(0,cc.jsx)(Ue,{icon:AD});let l=(0,Dw.__)("Apply duotone filter"),d=`${(0,zde.useInstanceId)(jde,"duotone-control",e)}__description`;return(0,cc.jsx)(ia.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,Dw.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,cc.jsx)(ia.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:p=>{!f&&p.keyCode===Fde.DOWN&&(p.preventDefault(),m())},label:l,icon:a}),renderContent:()=>(0,cc.jsxs)(ia.MenuGroup,{label:(0,Dw.__)("Duotone"),children:[(0,cc.jsx)("p",{children:(0,Dw.__)("Create a two-tone color effect without losing your original image.")}),(0,cc.jsx)(ia.DuotonePicker,{"aria-label":l,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var JO=jde;var Wde=c(D(),1),$de=c(Xe(),1),Kde=c(L(),1),ds=c(z(),1);var jr=c(z(),1);var e2=c(z(),1);function Hde(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,e2._x)("Regular","font style");break;case"italic":t=(0,e2._x)("Italic","font style");break;case"oblique":t=(0,e2._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var ul=c(z(),1);function hH(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,ul._x)("Regular","font weight");break;case"bold":case"700":t=(0,ul._x)("Bold","font weight");break;case"100":t=(0,ul._x)("Thin","font weight");break;case"200":t=(0,ul._x)("Extra Light","font weight");break;case"300":t=(0,ul._x)("Light","font weight");break;case"500":t=(0,ul._x)("Medium","font weight");break;case"600":t=(0,ul._x)("Semi Bold","font weight");break;case"800":t=(0,ul._x)("Extra Bold","font weight");break;case"900":t=(0,ul._x)("Black","font weight");break;case"1000":t=(0,ul._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var Ude=[{name:(0,jr._x)("Regular","font style"),value:"normal"},{name:(0,jr._x)("Italic","font style"),value:"italic"}],Gde=[{name:(0,jr._x)("Thin","font weight"),value:"100"},{name:(0,jr._x)("Extra Light","font weight"),value:"200"},{name:(0,jr._x)("Light","font weight"),value:"300"},{name:(0,jr._x)("Regular","font weight"),value:"400"},{name:(0,jr._x)("Medium","font weight"),value:"500"},{name:(0,jr._x)("Semi Bold","font weight"),value:"600"},{name:(0,jr._x)("Bold","font weight"),value:"700"},{name:(0,jr._x)("Extra Bold","font weight"),value:"800"},{name:(0,jr._x)("Black","font weight"),value:"900"},{name:(0,jr._x)("Extra Black","font weight"),value:"1000"}];function Mv(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(" "),f=parseInt(u.slice(0,1)),m=d==="1000"?10:parseInt(d.slice(0,1));for(let h=f;h<=m;h++){let p=`${h.toString()}00`;o.some(g=>g.value===p)||o.push(hH(p))}}let a=hH(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),l=Hde(s.fontStyle);l&&Object.keys(l).length&&(t.some(u=>u.value===l.value)||t.push(l)),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,jr._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,jr._x)("Italic","font style"),value:"italic"}),n&&(t=Ude,o=Gde),t=t.length===0?Ude:t,o=o.length===0?Gde:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:l,value:u})=>{let d=a==="normal"?l:(0,jr.sprintf)((0,jr._x)("%1$s %2$s","font"),l??"",s??"");r.push({key:`${a}-${u}`,name:d??"",style:{fontStyle:a,fontWeight:u}})})}),{fontStyles:t,fontWeights:o,combinedStyleAndWeightOptions:r,isSystemFont:n,isVariableFont:i}}var Yde=c(C(),1),n3e=(e,t)=>e?t?(0,ds.__)("Appearance"):(0,ds.__)("Font style"):(0,ds.__)("Font weight");function t2(e){let{__next40pxDefaultSize:t=!1,onChange:o,hasFontStyles:r=!0,hasFontWeights:n=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:a},...l}=e,u=r||n,d=n3e(r,n),f={key:"default",name:(0,ds.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:h,combinedStyleAndWeightOptions:p}=Mv(i),g=()=>{let _=[f];return p&&_.push(...p),_},b=()=>{let _=[f];return m.forEach(({name:x,value:E})=>{_.push({key:E,name:x,style:{fontStyle:E,fontWeight:void 0}})}),_},v=()=>{let _=[f];return h.forEach(({name:x,value:E})=>{_.push({key:E,name:x,style:{fontStyle:void 0,fontWeight:E}})}),_},y=(0,Kde.useMemo)(()=>r&&n?g():r?b():v(),[e.options,m,h,p]),S=y.find(_=>_.style.fontStyle===s&&_.style.fontWeight===a)||y[0],k=()=>S?r?n?(0,ds.sprintf)((0,ds.__)("Currently selected font appearance: %s"),S.name):(0,ds.sprintf)((0,ds.__)("Currently selected font style: %s"),S.name):(0,ds.sprintf)((0,ds.__)("Currently selected font weight: %s"),S.name):(0,ds.__)("No selected font appearance");return!t&&(l.size===void 0||l.size==="default")&&(0,$de.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,Yde.jsx)(Wde.CustomSelectControl,{...l,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:k(),options:y,value:S,onChange:({selectedItem:_})=>o(_.style)})}var qde=c(D(),1),Zde=c(Xe(),1),gH=c(z(),1);var Xde=c(C(),1);function o2({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=ke("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,gH.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,Zde.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 l=a.find(u=>u.key===t)??"";return(0,Xde.jsx)(qde.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,gH.__)("Font"),value:l,onChange:({selectedItem:u})=>o(u.key),options:a,className:G("block-editor-font-family-control",n),...i})}var r2=c(D(),1),Qde=c(Xe(),1),Jde=c(z(),1);var efe=c(C(),1);function n2({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=ke("spacing.units"),s=(0,r2.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,Qde.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,efe.jsx)(r2.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,Jde.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var Vw=c(z(),1),i2=c(D(),1),bH=c(C(),1),i3e=[{label:(0,Vw.__)("None"),value:"none",icon:Xr},{label:(0,Vw.__)("Underline"),value:"underline",icon:jD},{label:(0,Vw.__)("Strikethrough"),value:"line-through",icon:FD}];function s2({value:e,onChange:t,className:o}){return(0,bH.jsx)(i2.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Vw.__)("Decoration"),className:G("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:i3e.map(r=>(0,bH.jsx)(i2.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Nv=c(z(),1);var a2=c(D(),1),yH=c(C(),1),s3e=[{label:(0,Nv.__)("None"),value:"none",icon:Xr},{label:(0,Nv.__)("Uppercase"),value:"uppercase",icon:UD},{label:(0,Nv.__)("Lowercase"),value:"lowercase",icon:DD},{label:(0,Nv.__)("Capitalize"),value:"capitalize",icon:MD}];function l2({className:e,value:t,onChange:o}){return(0,yH.jsx)(a2.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Nv.__)("Letter case"),className:G("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:s3e.map(r=>(0,yH.jsx)(a2.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Dv=c(z(),1);var c2=c(D(),1),vH=c(C(),1),a3e=[{label:(0,Dv.__)("Horizontal"),value:"horizontal-tb",icon:B5},{label:(0,Dv.__)("Vertical"),value:(0,Dv.isRTL)()?"vertical-lr":"vertical-rl",icon:R5}];function u2({className:e,value:t,onChange:o}){return(0,vH.jsx)(c2.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Dv.__)("Orientation"),className:G("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:a3e.map(r=>(0,vH.jsx)(c2.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Kn=c(D(),1),tfe=c(L(),1),ofe=c(z(),1);var Cr=c(C(),1),l3e=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,Cr.jsx)(Kn.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:n,isShownByDefault:e.isShownByDefault!==void 0?e.isShownByDefault:!0,...r,className:G("block-editor-color-gradient-item","block-editor-tools-panel-color-gradient-settings__item"),panelId:o,resetAllFilter:e.resetAllFilter,children:t})},c3e=({colorValue:e,label:t})=>(0,Cr.jsxs)(Kn.__experimentalHStack,{justify:"flex-start",children:[(0,Cr.jsx)(Kn.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,Cr.jsx)(Kn.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),u3e=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:l,label:u}=e,d=(0,tfe.useRef)(void 0),f={onClick:o,className:G("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r,ref:d},m=()=>{i?a():s&&l()},h=i??s;return(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsx)(Kn.Button,{__next40pxDefaultSize:!0,...f,children:(0,Cr.jsx)(c3e,{colorValue:h,label:u})}),n&&h&&(0,Cr.jsx)(Kn.Button,{__next40pxDefaultSize:!0,label:(0,ofe.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Xr,onClick:()=>{m(),r&&o(),d.current?.focus()}})]})};function d2({colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradients:n,settings:i,__experimentalIsRenderedInSidebar:s,...a}){let l;return s&&(l={placement:"left-start",offset:36,shift:!0}),(0,Cr.jsx)(Cr.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,Cr.jsx)(l3e,{setting:u,...a,children:(0,Cr.jsx)(Kn.Dropdown,{popoverProps:l,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:u3e(m),renderContent:()=>(0,Cr.jsx)(Kn.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Cr.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,Cr.jsx)(dm,{...f})})})})},d)})})}var f2=c(D(),1),rfe=c(W(),1),nfe=c(te(),1);var kH=c(L(),1),$h=c(z(),1);function mm(){let[e,t,o,r,n,i,s,a,l,u]=ke("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,kH.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,$h._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,$h._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,$h._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,kH.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,$h._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&l&&l.length&&f.push({name:(0,$h._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:l}),s&&s.length&&f.push({name:(0,$h._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),f},[s,a,l,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}var dl=c(C(),1),d3e=["colors","disableCustomColors","gradients","disableCustomGradients"],SH=({className:e,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,children:i,settings:s,title:a,showTitle:l=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:d})=>{let f=(0,nfe.useInstanceId)(SH),{batch:m}=(0,rfe.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,dl.jsxs)(f2.__experimentalToolsPanel,{className:G("block-editor-panel-color-gradient-settings",e),label:l?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,dl.jsx)(d2,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,dl.jsxs)(dl.Fragment,{children:[(0,dl.jsx)(f2.__experimentalSpacer,{marginY:4})," ",i]})]})},f3e=e=>{let t=mm();return(0,dl.jsx)(SH,{...t,...e})},m3e=e=>d3e.every(t=>e.hasOwnProperty(t))?(0,dl.jsx)(SH,{...e}):(0,dl.jsx)(f3e,{...e}),m2=m3e;var p2=c(L(),1),Kh=c(D(),1),xH=c(z(),1);var Fw=c(C(),1),_H=[],p3e={...$O,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function h3e(e){let t=e?.default??_H,o=e?.custom??_H,r=e?.theme??_H;return(0,p2.useMemo)(()=>[{name:(0,xH.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function Yh({label:e=(0,xH.__)("Dimension"),onChange:t,value:o,dimensionSizes:r}){let[n,i]=ke("dimensions.dimensionSizes","spacing.units"),s=r??n,a=(0,Kh.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vh","vw"]}),l=h3e(s),[u,d]=(0,p2.useState)(()=>{let[,m]=(0,Kh.__experimentalParseQuantityAndUnitFromRawValue)(o);return m||a[0]?.value||"px"}),f=m=>{let[h,p]=(0,Kh.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(m)&&p==="px"?t((h/16).toFixed(2)+m):["em","rem"].includes(p)&&m==="px"?t(Math.round(h*16)+m):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(m)&&h>100&&t(100+m),d(m)};return(0,Fw.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,Fw.jsx)(Kh.BaseControl.VisualLabel,{as:"legend",children:e}),(0,Fw.jsx)(Wh,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:p3e,minimumCustomValue:0,onChange:t,onUnitChange:f,presets:l,presetType:"dimension",selectedUnit:u,showTooltip:!0,units:a,value:o})]})}var sfe=c(L(),1),Hr=c(D(),1),afe=c(z(),1),lfe=c(Xe(),1);var uc=c(C(),1),ife={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 cfe({label:e=(0,afe.__)("Height"),onChange:t,value:o}){(0,lfe.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=ke("spacing.units"),i=(0,Hr.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,sfe.useMemo)(()=>(0,Hr.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},l=u=>{let[d,f]=(0,Hr.__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,uc.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,uc.jsx)(Hr.BaseControl.VisualLabel,{as:"legend",children:e}),(0,uc.jsxs)(Hr.Flex,{children:[(0,uc.jsx)(Hr.FlexItem,{isBlock:!0,children:(0,uc.jsx)(Hr.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:l,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,uc.jsx)(Hr.FlexItem,{isBlock:!0,children:(0,uc.jsx)(Hr.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,uc.jsx)(Hr.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:ife[s]?.max??100,step:ife[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var Uw=c(D(),1);var sa=c(pe()),Mfe=c(Rfe());function k3e(e,t,o,r,n,i){i===void 0&&(i=0);var s=Vv(e,t,i),a=s.width,l=s.height,u=Math.min(a,o),d=Math.min(l,r);return u>d*n?{width:d*n,height:d}:{width:u,height:u/n}}function S3e(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function zw(e,t,o,r,n){n===void 0&&(n=0);var i=Vv(t.width,t.height,n),s=i.width,a=i.height;return{x:Ife(e.x,s,o.width,r),y:Ife(e.y,a,o.height,r)}}function Ife(e,t,o,r){var n=t*r/2-o/2;return k2(e,-n,n)}function Ofe(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Afe(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function _3e(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?x3e:w3e,l=Vv(t.width,t.height,i),u=Vv(t.naturalWidth,t.naturalHeight,i),d={x:a(100,((l.width-o.width/n)/2-e.x/n)/l.width*100),y:a(100,((l.height-o.height/n)/2-e.y/n)/l.height*100),width:a(100,o.width/l.width*100/n),height:a(100,o.height/l.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=xr(xr({},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 x3e(e,t){return Math.min(e,Math.max(0,t))}function w3e(e,t){return t}function C3e(e,t,o,r,n,i){var s=Vv(t.width,t.height,o),a=k2(r.width/s.width*(100/e.width),n,i),l={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:l,zoom:a}}function E3e(e,t,o){var r=S3e(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function T3e(e,t,o,r,n,i){o===void 0&&(o=0);var s=Vv(t.naturalWidth,t.naturalHeight,o),a=k2(E3e(e,t,r),n,i),l=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((s.width-e.width)/2-e.x)*l,y:((s.height-e.height)/2-e.y)*l};return{crop:u,zoom:a}}function Lfe(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function B3e(e){return e*Math.PI/180}function Vv(e,t,o){var r=B3e(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 k2(e,t,o){return Math.min(Math.max(e,t),o)}function v2(){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 P3e=`.reactEasyCrop_Container {
87 position: absolute;
88 top: 0;
89 left: 0;
90 right: 0;
91 bottom: 0;
92 overflow: hidden;
93 user-select: none;
94 touch-action: none;
95 cursor: move;
96 display: flex;
97 justify-content: center;
98 align-items: center;
99 }
100
101 .reactEasyCrop_Image,
102 .reactEasyCrop_Video {
103 will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
104 }
105
106 .reactEasyCrop_Contain {
107 max-width: 100%;
108 max-height: 100%;
109 margin: auto;
110 position: absolute;
111 top: 0;
112 bottom: 0;
113 left: 0;
114 right: 0;
115 }
116 .reactEasyCrop_Cover_Horizontal {
117 width: 100%;
118 height: auto;
119 }
120 .reactEasyCrop_Cover_Vertical {
121 width: auto;
122 height: 100%;
123 }
124
125 .reactEasyCrop_CropArea {
126 position: absolute;
127 left: 50%;
128 top: 50%;
129 transform: translate(-50%, -50%);
130 border: 1px solid rgba(255, 255, 255, 0.5);
131 box-sizing: border-box;
132 box-shadow: 0 0 0 9999em;
133 color: rgba(0, 0, 0, 0.5);
134 overflow: hidden;
135 }
136
137 .reactEasyCrop_CropAreaRound {
138 border-radius: 50%;
139 }
140
141 .reactEasyCrop_CropAreaGrid::before {
142 content: ' ';
143 box-sizing: border-box;
144 position: absolute;
145 border: 1px solid rgba(255, 255, 255, 0.5);
146 top: 0;
147 bottom: 0;
148 left: 33.33%;
149 right: 33.33%;
150 border-top: 0;
151 border-bottom: 0;
152 }
153
154 .reactEasyCrop_CropAreaGrid::after {
155 content: ' ';
156 box-sizing: border-box;
157 position: absolute;
158 border: 1px solid rgba(255, 255, 255, 0.5);
159 top: 33.33%;
160 bottom: 33.33%;
161 left: 0;
162 right: 0;
163 border-left: 0;
164 border-right: 0;
165 }
166 `,R3e=1,I3e=3,O3e=1,Nfe=(function(e){CW(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=sa.createRef(),o.imageRef=sa.createRef(),o.videoRef=sa.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=C3e(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=T3e(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,l,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=xr(xr({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:k3e(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||((l=o.state.cropSize)===null||l===void 0?void 0:l.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=xr({},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,l={x:o.dragStartCrop.x+s,y:o.dragStartCrop.y+a},u=o.props.restrictPosition?zw(l,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):l;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,Mfe.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,l;return(l=(a=o.props).onInteractionStart)===null||l===void 0?void 0:l.call(a)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var a,l;return(l=(a=o.props).onInteractionEnd)===null||l===void 0?void 0:l.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,l=s.zoom;return{x:(n+a.x)/l,y:(i+a.y)/l}},o.setNewZoom=function(r,n,i){var s=i===void 0?{}:i,a=s.shouldUpdatePosition,l=a===void 0?!0:a;if(!(!o.state.cropSize||!o.props.onZoomChange)){var u=k2(r,o.props.minZoom,o.props.maxZoom);if(l){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?zw(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?zw(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return _3e(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?zw(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,l=s.onCropChange,u=s.keyboardStep,d=s.zoom,f=s.rotation,m=u;if(o.state.cropSize){r.shiftKey&&(m*=.2);var h=xr({},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=zw(h,o.mediaSize,o.state.cropSize,d,f)),r.repeat||(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n),l(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=P3e,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,l,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)!==((l=this.props.crop)===null||l===void 0?void 0:l.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,l=((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=l/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=Ofe(r,n),this.lastPinchRotation=Afe(r,n),this.onDragStart(Lfe(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=Lfe(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=Ofe(n,i),l=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(l,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=Afe(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,l=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,y=n.style,S=y.containerStyle,k=y.cropAreaStyle,_=y.mediaStyle,x=n.classes,E=x.containerClassName,B=x.cropAreaClassName,P=x.mediaClassName,T=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return sa.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(I){return o.containerRef=I},"data-testid":"container",style:S,className:v2("reactEasyCrop_Container",E)},i?sa.createElement("img",xr({alt:"",className:v2("reactEasyCrop_Image",T==="contain"&&"reactEasyCrop_Contain",T==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",T==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",P)},a,{src:i,ref:this.imageRef,style:xr(xr({},_),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):s&&sa.createElement("video",xr({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:v2("reactEasyCrop_Video",T==="contain"&&"reactEasyCrop_Contain",T==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",T==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",P)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:xr(xr({},_),{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(A){return sa.createElement("source",xr({key:A.src},A))})),this.state.cropSize&&sa.createElement("div",xr({ref:this.cropperRef,style:xr(xr({},k),{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:v2("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",B)},l)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:I3e,minZoom:R3e,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:O3e},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})(sa.Component);var Wfe=c(L(),1);var zv=c(L(),1);var Dfe=Object.prototype.hasOwnProperty;function Vfe(e,t,o){for(o of e.keys())if(Zh(o,t))return o}function Zh(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--&&Zh(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=Vfe(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=Vfe(t,n),!n)||!Zh(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(Dfe.call(e,o)&&++r&&!Dfe.call(t,o)||!(o in t)||!Zh(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var fl=c(L(),1);var Fv=1,Ffe=5;var S2=e=>e>=0?e%360:(360+e%360)%360,A3e=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 zfe(e){return e*Math.PI/180}function L3e(e,t,o){let r=zfe(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 jfe(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await A3e(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=zfe(o),{width:l,height:u}=L3e(n.width,n.height,o);i.width=l,i.height=u,s.translate(l/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 Xh={crop:{x:0,y:0,width:100,height:100},zoom:Fv,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},M3e={x:0,y:0},OH={crop:M3e,croppedArea:Xh.crop,croppedAreaPixels:null,zoom:Xh.zoom,rotation:Xh.rotation,flip:Xh.flip,aspectRatio:Xh.aspectRatio,mediaSize:null};function Hfe(){let[e,t]=(0,fl.useState)(OH),[o,r]=(0,fl.useState)(null),n=(0,fl.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=S2(m.rotation)),{...d,...m}})},[]),i=(0,fl.useCallback)((u=null)=>{if(!u){r(null),n(OH);return}if(typeof u=="object"){let d={...Xh,...u};r(d),n(d)}},[n,r]),s=(0,fl.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({...OH})},[o,n]),a=(0,fl.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:S2(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Zh(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:S2(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Zh(u,Xh)===!1},[e,o]),l=(0,fl.useCallback)(async u=>e.croppedAreaPixels?jfe(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,fl.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:l}),[e,n,o,i,a,s,l])}var Ufe=c(C(),1),Gfe=(0,zv.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:Fv,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function AH({children:e}){let t=Hfe(),o=(0,zv.useMemo)(()=>({...t}),[t]);return(0,Ufe.jsx)(Gfe.Provider,{value:o,children:e})}var jw=()=>{let e=(0,zv.useContext)(Gfe);if(!e)throw new Error("Missing ImageCropperContext");return e};var $fe=c(C(),1);function LH({src:e,onLoad:t,minZoom:o=Fv,maxZoom:r=Ffe,...n}){let{cropperState:i,setCropperState:s}=jw(),{crop:a,zoom:l,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,Wfe.useCallback)((v,y)=>{s({croppedArea:v,croppedAreaPixels:y})},[s]);return(0,$fe.jsx)(Nfe,{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:l,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(${l})`].join(" "),...n})}var Uv=c(D(),1),Hv=c(z(),1);var Kfe=100,Yfe=300,_2={placement:"bottom-start"};var jv=c(L(),1);var x2=c(W(),1),Qh=c(L(),1),Uu=c(z(),1),qfe=c(Wi(),1),Zfe=c(at(),1);var N3e={crop:(0,Uu.__)("Image cropped."),rotate:(0,Uu.__)("Image rotated."),cropAndRotate:(0,Uu.__)("Image cropped and rotated.")};function Xfe({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,x2.useDispatch)(qfe.store),[l,u]=(0,Qh.useState)(!1),{editMediaEntity:d}=(0,x2.useSelect)(h=>({editMediaEntity:h(w).getSettings()?.[vC]}),[]),f=(0,Qh.useCallback)(()=>{u(!1),i()},[i]),m=(0,Qh.useCallback)(async()=>{if(!d){i(),s((0,Uu.__)("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(N3e[p],{type:"snackbar",actions:[{label:(0,Uu.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,Uu.sprintf)((0,Uu.__)("Could not edit image. %s"),(0,Zfe.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,Qh.useMemo)(()=>({isInProgress:l,apply:m,cancel:f}),[l,m,f])}var ml=c(L(),1),Qfe=c(zt(),1);function Jfe({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,ml.useState)(),{cropperState:i,setCropperState:s}=jw(),{zoom:a,aspectRatio:l,crop:u,croppedArea:d}=i,f=(0,ml.useCallback)(y=>{s({zoom:y})},[s]),m=(0,ml.useCallback)(y=>{s({aspectRatio:y})},[s]),h=t/o,p=o/t;(0,ml.useEffect)(()=>{m(h)},[]);let[g,b]=(0,ml.useState)(0),v=(0,ml.useCallback)(()=>{let y=(g+90)%360,S=h,_=a!==1||!(h===l||p===l);if(g%180===90&&(S=1/h),y===0){n(),b(y),s({aspectRatio:_?l:h,crop:{x:-(u.y*S),y:u.x*S}});return}function x(P){let T=document.createElement("canvas"),A=0,I=0;y%180?(T.width=P.target.height,T.height=P.target.width):(T.width=P.target.width,T.height=P.target.height),(y===90||y===180)&&(A=T.width),(y===270||y===180)&&(I=T.height);let R=T.getContext("2d");R.translate(A,I),R.rotate(y*Math.PI/180),R.drawImage(P.target,0,0),T.toBlob(V=>{n(URL.createObjectURL(V)),b(y);let N=_?l:T.width/T.height;s({aspectRatio:N,crop:{x:-(u.y*S),y:u.x*S}})})}let E=new window.Image;E.src=e,E.onload=x;let B=(0,Qfe.applyFilters)("media.crossOrigin",void 0,e);typeof B=="string"&&(E.crossOrigin=B)},[g,h,e,s,u,a,l,p,b]);return(0,ml.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:g,rotateClockwise:v,aspect:l,setAspect:m,defaultAspect:h}),[r,d,a,f,g,v,l,m,h])}var eme=c(C(),1),MH=(0,jv.createContext)({});MH.displayName="ImageEditingContext";var dc=()=>(0,jv.useContext)(MH);function tme({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=Jfe({url:t,naturalWidth:o,naturalHeight:r}),l=Xfe({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,jv.useMemo)(()=>({...a,...l}),[a,l]);return(0,eme.jsx)(MH.Provider,{value:u,children:s})}var aa=c(C(),1);function w2({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,aa.jsx)(Uv.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,aa.jsx)(Uv.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?Ts:void 0,children:i},s))})}function D3e(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 NH({ratio:e,...t}){return{ratio:D3e(e),...t}}function ome({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=dc(),[i,s,a]=ke("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,aa.jsx)(Uv.DropdownMenu,{icon:qN,label:(0,Hv.__)("Aspect Ratio"),popoverProps:_2,toggleProps:e,children:({onClose:l})=>(0,aa.jsxs)(aa.Fragment,{children:[(0,aa.jsx)(w2,{isDisabled:t,onClick:u=>{r(u),l()},value:o,aspectRatios:[{slug:"original",name:(0,Hv.__)("Original"),ratio:n},...a?i.map(NH).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,aa.jsx)(w2,{label:(0,Hv.__)("Theme"),isDisabled:t,onClick:u=>{r(u),l()},value:o,aspectRatios:s}),a&&(0,aa.jsx)(w2,{label:(0,Hv.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),l()},value:o,aspectRatios:i.map(NH).filter(({ratio:u})=>u>1)}),a&&(0,aa.jsx)(w2,{label:(0,Hv.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),l()},value:o,aspectRatios:i.map(NH).filter(({ratio:u})=>u<1)})]})})}var rme=c(D(),1),nme=c(te(),1);var pm=c(C(),1);function ime({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:l}=dc(),[u,{width:d}]=(0,nme.useResizeObserver)(),f=o||d*r/n;l%180===90&&(f=d*n/r);let m=(0,pm.jsxs)("div",{className:G("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,pm.jsx)(LH,{src:a||e}),s&&(0,pm.jsx)(rme.Spinner,{})]});return(0,pm.jsxs)(pm.Fragment,{children:[u,m]})}var hm=c(D(),1),DH=c(z(),1);var Hw=c(C(),1);function sme(){let{isInProgress:e,zoom:t,setZoom:o}=dc();return(0,Hw.jsx)(hm.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:_2,renderToggle:({isOpen:r,onToggle:n})=>(0,Hw.jsx)(hm.ToolbarButton,{icon:n5,label:(0,DH.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,Hw.jsx)(hm.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Hw.jsx)(hm.RangeControl,{__next40pxDefaultSize:!0,label:(0,DH.__)("Zoom"),min:Kfe,max:Yfe,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var ame=c(D(),1),lme=c(z(),1);var cme=c(C(),1);function ume(){let{isInProgress:e,rotateClockwise:t}=dc();return(0,cme.jsx)(ame.ToolbarButton,{icon:e5,label:(0,lme.__)("Rotate"),onClick:t,disabled:e})}var VH=c(D(),1),FH=c(z(),1);var Jh=c(C(),1);function dme(){let{isInProgress:e,apply:t,cancel:o}=dc();return(0,Jh.jsxs)(Jh.Fragment,{children:[(0,Jh.jsx)(VH.ToolbarButton,{onClick:t,disabled:e,children:(0,FH.__)("Apply")}),(0,Jh.jsx)(VH.ToolbarButton,{onClick:o,children:(0,FH.__)("Cancel")})]})}var fs=c(C(),1);function fme({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:l}){return(0,fs.jsx)(AH,{children:(0,fs.jsxs)(tme,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,fs.jsx)(ime,{borderProps:l,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,fs.jsxs)(yo,{children:[(0,fs.jsxs)(Uw.ToolbarGroup,{children:[(0,fs.jsx)(sme,{}),(0,fs.jsx)(Uw.ToolbarItem,{children:u=>(0,fs.jsx)(ome,{toggleProps:u})}),(0,fs.jsx)(ume,{})]}),(0,fs.jsx)(Uw.ToolbarGroup,{children:(0,fs.jsx)(dme,{})})]})]})})}var ms=c(D(),1),gm=c(z(),1);var Gv=c(L(),1);function mme(e,t,o,r,n){let[i,s]=(0,Gv.useState)(t??r??""),[a,l]=(0,Gv.useState)(e??o??"");return(0,Gv.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&l(o)},[r,o]),(0,Gv.useEffect)(()=>{t!==void 0&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),e!==void 0&&Number.parseInt(e)!==Number.parseInt(a)&&l(e)},[t,e]),{currentHeight:a,currentWidth:i,updateDimension:(f,m)=>{let h=m===""?void 0:parseInt(m,10);f==="width"?s(h):l(h),n({[f]:h})},updateDimensions:(f,m)=>{l(f??o),s(m??r),n({height:f,width:m})}}}var la=c(C(),1),pme=[25,50,75,100],V3e=()=>{};function hme(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function gme({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:l,onChangeImage:u=V3e}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:h}=mme(a,s,o,t,l),p=b=>{if(b===void 0){h();return}let{scaledWidth:v,scaledHeight:y}=hme(b,t,o);h(y,v)},g=pme.find(b=>{let{scaledWidth:v,scaledHeight:y}=hme(b,t,o);return f===v&&d===y});return(0,la.jsxs)(ms.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,la.jsx)(ms.SelectControl,{label:(0,gm.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,la.jsxs)(la.Fragment,{children:[(0,la.jsxs)(ms.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,la.jsx)(ms.__experimentalNumberControl,{label:(0,gm.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,la.jsx)(ms.__experimentalNumberControl,{label:(0,gm.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,la.jsx)(ms.__experimentalToggleGroupControl,{label:(0,gm.__)("Image size presets"),hideLabelFromVision:!0,onChange:p,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:pme.map(b=>(0,la.jsx)(ms.__experimentalToggleGroupControlOption,{value:b,label:(0,gm.sprintf)((0,gm.__)("%d%%"),b)},b))})]})]})}var C2=c(D(),1);var eg=c(z(),1),yme=c(C(),1),bme={left:Od,center:Id,right:Ad,"space-between":Hg,stretch:Ug};function F3e({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?bme[r]:bme.left,l=[{name:"left",icon:Od,title:(0,eg.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:Id,title:(0,eg.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:Ad,title:(0,eg.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:Hg,title:(0,eg.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:Ug,title:(0,eg.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?C2.ToolbarGroup:C2.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,yme.jsx)(u,{icon:a,popoverProps:n,label:(0,eg.__)("Change items justification"),controls:l.filter(f=>e.includes(f.name)),...d})}var zH=F3e;var jH=c(C(),1),fb=e=>(0,jH.jsx)(zH,{...e,isToolbar:!1}),vme=e=>(0,jH.jsx)(zH,{...e,isToolbar:!0});var Yn=c(D(),1),pl=c(z(),1),Fo=c(L(),1),dpe=c(te(),1),fpe=c(at(),1),mpe=c(Pt(),1),ppe=c(Wx(),1),V2=c(W(),1),ZH=c(tb(),1);var hpe=c(Xe(),1),F2=c(ji(),1);var Wv=c(D(),1);var E2=c(te(),1),T2=c(z(),1),kme=c(L(),1),Gu=c(C(),1);function Sme({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,E2.useReducedMotion)(),n=r?kme.Fragment:Wv.__unstableAnimatePresence,i=r?"div":Wv.__unstableMotion.div,a=`link-control-settings-drawer-${(0,E2.useInstanceId)(Sme)}`;return(0,Gu.jsxs)(Gu.Fragment,{children:[(0,Gu.jsx)(Wv.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,T2.isRTL)()?vS:Rd,"aria-controls":a,children:(0,T2._x)("Advanced","Additional link settings")}),(0,Gu.jsx)(n,{children:t&&(0,Gu.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,Gu.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var _me=Sme;var A2=c(L(),1),YH=c(z(),1),jme=c(Xe(),1);var Gw=c(z(),1),Ame=c(D(),1);var B2=c(z(),1),xme=c(D(),1),wme=c(L(),1);var HH=c(C(),1),z3e=({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,wme.createInterpolateElement)((0,B2.sprintf)((0,B2.__)("Create: <mark>%s</mark>"),e),{mark:(0,HH.jsx)("mark",{})}),(0,HH.jsx)(xme.MenuItem,{...o,iconPosition:"left",icon:Ps,className:"block-editor-link-control__search-item",onClick:t,children:n})},Cme=z3e;var Wu=c(z(),1),R2=c(D(),1);var Eme=c(at(),1),Kv=c(ji(),1),Tme=c(te(),1),Bme=c(Xe(),1),$v=c(C(),1),P2={post:{icon:XV,label:(0,Wu.__)("Post")},page:{icon:Tp,label:(0,Wu.__)("Page")},post_tag:{icon:E5,label:(0,Wu.__)("Tag")},category:{icon:eD,label:(0,Wu.__)("Category")},attachment:{icon:ID,label:(0,Wu.__)("Attachment")}};function j3e({isURL:e,suggestion:t}){let o=null;return e?o=SS:t.type in P2&&(o=P2[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=cV),t.isBlogHome&&(o=z5))),o?(0,$v.jsx)(Ue,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function H3e(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function U3e(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var G3e=(e,...t)=>(...o)=>e(...o,...t),W3e=e=>t=>t==null||t!==t?e:t;function $3e(e){return e&&(0,Tme.pipe)(Kv.safeDecodeURI,Kv.getPath,W3e(""),G3e(Kv.filterURLForDisplay,24),U3e,H3e)(e)}var Pme=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,Wu.__)("Press ENTER to add this link"):$3e(t.url);return(0,$v.jsx)(R2.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,$v.jsx)(j3e,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&K3e(t),className:"block-editor-link-control__search-item",children:(0,$v.jsx)(R2.TextHighlight,{text:(0,Eme.__unstableStripHTML)(t.title),highlight:o})})};function K3e(e){return e.isFrontPage?(0,Wu.__)("Front page"):e.isBlogHome?(0,Wu.__)("Blog home"):e.type in P2?P2[e.type].label:e.type}var Rme=Pme,Ime=e=>((0,Bme.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,$v.jsx)(Pme,{...e}));var Ome=c(z(),1),tg="__CREATE__",UH="tel",I2="link",GH="mailto",WH="internal",Yv=[I2,GH,UH,WH],$H=[{id:"opensInNewTab",title:(0,Ome.__)("Open in new tab")}];var Lme=c(Xe(),1),og=c(C(),1);function Mme({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:l,createSuggestionButtonText:u,suggestionsQuery:d}){let f=G("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&Yv.includes(i[0].type),h=e&&!m&&!l,p=!d?.type,g=l?(0,Gw.__)("Suggestions"):(0,Gw.sprintf)((0,Gw.__)('Search results for "%s"'),t);return(0,og.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,og.jsx)("div",{...r,className:f,"aria-label":g,children:(0,og.jsx)(Ame.MenuGroup,{children:i.map((b,v)=>h&&tg===b.type?(0,og.jsx)(Cme,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,v),isSelected:v===s},b.type):tg===b.type?null:(0,og.jsx)(Rme,{itemProps:n(b,v),suggestion:b,index:v,onClick:()=>{o(b)},isSelected:v===s,isURL:Yv.includes(b.type),searchTerm:t,shouldShowType:p,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var Nme=Mme,Dme=e=>((0,Lme.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,og.jsx)(Mme,{...e}));var Vme=c(L(),1),Fme=c(W(),1);var O2=c(ji(),1);function Ww(e){let t=e?.trim();if(!t)return{url:t,type:I2};let o=I2,r=(0,O2.getProtocol)(t)||"";return r.includes("mailto")?o=GH:r.includes("tel")?o=UH:t?.startsWith("#")&&(o=WH),dp(t)||fp(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,O2.prependHTTPS)(t),type:o}}var Y3e=()=>Promise.resolve([]),q3e=e=>{let{url:t,type:o}=Ww(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},Z3e=async(e,t,o,r,n,i)=>{let{isInitialSuggestions:s}=t,a=await o(e,t);return a.map(l=>Number(l.id)===n?(l.isFrontPage=!0,l):(Number(l.id)===i&&(l.isBlogHome=!0),l)),s||mp(e)||!r?a:a.concat({title:e,url:e,type:tg})};function zme(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,Fme.useSelect)(a=>{let{getSettings:l}=a(w);return{pageOnFront:l().pageOnFront,pageForPosts:l().pageForPosts,fetchSearchSuggestions:l().__experimentalFetchLinkSuggestions}},[]),s=t?q3e:Y3e;return(0,Vme.useCallback)((a,{isInitialSuggestions:l})=>mp(a)?s(a,{isInitialSuggestions:l}):Z3e(a,{...e,isInitialSuggestions:l},r,o,n,i),[s,r,n,i,e,o])}var qv=c(C(),1),X3e=()=>Promise.resolve([]),KH=()=>{},Hme=(0,A2.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=KH,onChange:a=KH,onSelect:l=KH,showSuggestions:u=!0,renderSuggestions:d=x=>(0,qv.jsx)(Nme,{...x}),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:h=!1,suggestionsQuery:p={},withURLSuggestion:g=!0,createSuggestionButtonText:b,hideLabelFromVision:v=!1,suffix:y,isEntity:S=!1,customValidity:k},_)=>{let x=zme(p,m,i,g),E=u?f||x:X3e,[B,P]=(0,A2.useState)(),T=(N,U)=>{a(N),P(U)},A=N=>d({...N,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:p,handleSuggestionClick:U=>{N.handleSuggestionClick&&N.handleSuggestionClick(U),I(U)}}),I=async N=>{let U=N;if(tg===N.type){try{U=await s(N.title),U?.url&&l(U)}catch{}return}if(m||U&&Object.keys(U).length>=1){let{id:j,url:O,kind:M,type:H,...Y}=o??{};l({...Y,...U},U)}},R=n??(0,YH.__)("Search or type URL"),V=v&&n!==""?R:(0,YH.__)("Link");return(0,qv.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,qv.jsx)(bm,{disableSuggestions:o?.url===e,label:V,hideLabelFromVision:v,className:r,value:e,onChange:T,placeholder:R,__experimentalRenderSuggestions:u?A:null,__experimentalFetchLinkSuggestions:E,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,customValidity:k,required:!1,onSubmit:(N,U)=>{let j=N||B;!j&&!e?.trim()?.length?U.preventDefault():I(j||{url:e})},inputRef:_,suffix:y,disabled:S}),t]})}),Ume=Hme,Gme=e=>((0,jme.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,qv.jsx)(Hme,{...e}));var ym=c(z(),1),gr=c(D(),1),qme=c(te(),1),N2=c(ji(),1);var Zme=c(at(),1),D2=c(W(),1),Xme=c(Wi(),1),Qme=c(tb(),1);var Wme=c(D(),1),{Slot:$me,Fill:Kme}=(0,Wme.createSlotFill)("BlockEditorLinkControlViewer");var Yme=c(W(),1),L2=c(L(),1);function Q3e(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 J3e(e){let[t,o]=(0,L2.useReducer)(Q3e,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,Yme.useSelect)(n=>{let{getSettings:i}=n(w);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,L2.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 M2=J3e;var qt=c(C(),1),{Badge:e4e}=F(gr.privateApis);function Jme({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,D2.useSelect)(b=>b(Qme.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:l}=M2(s),u=a&&Object.keys(a).length,d=e&&(0,N2.filterURLForDisplay)((0,N2.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,Zme.__unstableStripHTML)(e?.entityTitle||a?.title||e?.title||d),h;a?.icon?h=(0,qt.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,qt.jsx)(Ue,{icon:fV,size:32}):h=(0,qt.jsx)(Ue,{icon:SS});let{createNotice:p}=(0,D2.useDispatch)(Xme.store),g=(0,qme.useCopyToClipboard)(e.url,()=>{p("info",(0,ym.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,qt.jsx)(gr.Flex,{role:"group","aria-label":(0,ym.__)("Manage link"),className:G("block-editor-link-control__preview",{"is-current":!0,"is-rich":u,"is-fetching":!!l,"is-preview":!0,"is-error":f,"is-url-title":m===d}),children:(0,qt.jsxs)(gr.Flex,{gap:0,align:"flex-start",children:[(0,qt.jsxs)(gr.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,ym.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,qt.jsx)(gr.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,qt.jsx)("img",{src:e?.image,alt:""})}):(0,qt.jsx)(gr.Flex,{className:G("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,qt.jsx)(gr.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,qt.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,ym.__)("Link is empty")}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(gr.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,qt.jsx)(gr.__experimentalTruncate,{numberOfLines:1,children:m})}),(0,qt.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,qt.jsx)(gr.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,qt.jsx)(gr.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,v)=>(0,qt.jsx)(e4e,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${v}`))})]})})]}),(0,qt.jsx)(gr.Button,{icon:Bp,label:(0,ym.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,qt.jsx)(gr.Button,{icon:Bs,label:(0,ym.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,qt.jsx)(gr.Button,{icon:pD,label:(0,ym.__)("Copy link"),ref:g,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,qt.jsx)($me,{fillProps:e})]})})}var epe=c(z(),1),tpe=c(D(),1);var rg=c(C(),1),t4e=()=>{},o4e=({value:e,onChange:t=t4e,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,rg.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,rg.jsx)(tpe.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,rg.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,rg.jsx)(ct,{render:(0,rg.jsx)("legend",{}),children:(0,epe.__)("Currently selected link settings")}),n]})},ope=o4e;var rpe=c(z(),1),ng=c(L(),1);function npe(e){let t=(0,ng.useRef)(),[o,r]=(0,ng.useState)(!1),[n,i]=(0,ng.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=r4e(Promise.resolve(e(a))),await t.current.promise}catch(l){if(l&&l.isCanceled)return;throw i(l.message||(0,rpe.__)("An unknown error occurred during creation. Please try again.")),l}finally{r(!1)}};return(0,ng.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var r4e=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 qH=c(L(),1),ape=c(spe(),1);function lpe(e){let[t,o]=(0,qH.useState)(e||{}),[r,n]=(0,qH.useState)(e);return(0,ape.default)(e,r)||(n(e),o(e)),[t,o,l=>{o({...t,url:l})},l=>{o({...t,title:l})},l=>u=>{let d=Object.keys(u).reduce((f,m)=>(l.includes(m)&&(f[m]=u[m]),f),{});o({...t,...d})}]}var fo=c(C(),1),XH=()=>{},cpe="core/block-editor",upe="linkControlSettingsDrawer";function ig({searchInputPlaceholder:e,value:t,settings:o=$H,onChange:r=XH,onInputChange:n,onRemove:i,onCancel:s,noDirectEntry:a=!1,showSuggestions:l=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:f,withCreateSuggestion:m,inputValue:h="",suggestionsQuery:p={},noURLSuggestion:g=!1,createSuggestionButtonText:b,hasRichPreviews:v=!1,hasTextControl:y=!1,renderControlBottom:S=null,handleEntities:k=!1}){m===void 0&&f&&(m=!0);let[_,x]=(0,Fo.useState)(!1),[E,B]=(0,Fo.useState)(void 0),{advancedSettingsPreference:P}=(0,V2.useSelect)(_e=>({advancedSettingsPreference:_e(ZH.store).get(cpe,upe)??!1}),[]),{set:T}=(0,V2.useDispatch)(ZH.store),A=_e=>{T&&T(cpe,upe,_e),x(_e)},I=P||_,R=(0,Fo.useRef)(!0),V=(0,Fo.useRef)(),N=(0,Fo.useRef)(),U=(0,Fo.useRef)(),j=(0,Fo.useRef)(),O=o.map(({id:_e})=>_e),[M,H,Y,oe,K]=lpe(t),Z=_e=>{Y(_e),n?.(_e)},q=k&&!!M?.id,$=(0,dpe.useInstanceId)(ig,"link-control"),Q=q?`${$}__help`:null,X=t&&!(0,ppe.isShallowEqualObjects)(M,t),[J,ie]=(0,Fo.useState)(d!==void 0?d:!t||!t.url),{createPage:se,isCreatingPage:re,errorMessage:le}=npe(f);(0,Fo.useEffect)(()=>{d!==void 0&&ie(d)},[d]),(0,Fo.useEffect)(()=>{if(R.current)return;(fpe.focus.focusable.find(V.current)[0]||V.current).focus()},[J,re]),(0,Fo.useEffect)(()=>(R.current=!1,()=>{R.current=!0}),[]);let ye=(0,Fo.useRef)();(0,Fo.useEffect)(()=>{if(ye.current===void 0){ye.current=h;return}ye.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."),ye.current=h)},[h]),(0,Fo.useEffect)(()=>{if(E?.type==="invalid"){let _e=U.current;_e&&typeof _e.reportValidity=="function"&&_e.reportValidity()}},[E]);let Re=t?.url?.trim()?.length>0,Ve=()=>{ie(!1)},tt=_e=>{let Ce={type:"invalid",message:(0,pl.__)("Please enter a valid URL.")},ot={type:"valid"},He=_e?.trim();if(!He?.length||!mp(He))return Ce;if(dp(He)||fp(He))return ot;let gt=(0,F2.prependHTTPS)(He);return(0,F2.isURL)(gt)?ot:Ce},Ye=_e=>{if(!(_e&&_e.id&&_e.type&&!Yv.includes(_e.type))){let He=_e?.url||De,gt=tt(He);if(gt.type==="invalid"){B(gt);return}let{url:oo}=Ww(He);_e={..._e,url:oo}}_e?.kind==="taxonomy"&&_e?.url&&(j.current=_e.url);let ot=Object.keys(_e).reduce((He,gt)=>(O.includes(gt)||(He[gt]=_e[gt]),He),{});r({...M,...ot,title:M?.title||_e?.title}),B(void 0),Ve()},Ie=()=>{if(At)return!1;let _e=De.trim(),Ce=M&&M.id&&M.type&&!Yv.includes(M.type),ot=t?.url===_e;if(Ce&&ot)return B(void 0),!0;let He=tt(De);return He.type==="invalid"?(B(He),!1):(B(void 0),!0)},ut=()=>{X&&r({...t,...M,url:Ww(De).url}),Ve(),B(void 0)},Ne=()=>{Ie()&&ut()},Ft=_e=>{let{keyCode:Ce}=_e;Ce===mpe.ENTER&&!At&&(_e.preventDefault(),Ne())},qe=()=>{H(t)},eo=_e=>{_e.preventDefault(),_e.stopPropagation(),qe(),B(void 0),Re?Ve():i?.(),s?.()},[ce,fe]=(0,Fo.useState)(!1),et=()=>{let{id:_e,kind:Ce,type:ot,...He}=M;H({...He,id:void 0,kind:void 0,type:void 0,url:void 0}),fe(!0)};(0,Fo.useEffect)(()=>{ce&&(U.current?.focus(),fe(!1))},[ce]);let De=M?.url!==void 0?M.url:h||"",At=!De?.trim()?.length;(0,Fo.useEffect)(()=>{B(void 0)},[De]);let ur=!E,Fe=i&&t&&!J&&!re,Ge=J&&Re,We=Re&&y,$e=(J||!t)&&!re,ht=At||!ur||t&&!X,to=!!o?.length&&J&&Re,Ao=(0,Fo.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&j.current?{...t,url:j.current}:t,[t]);return(0,fo.jsxs)("div",{tabIndex:-1,ref:V,className:"block-editor-link-control",children:[re&&(0,fo.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,fo.jsx)(Yn.Spinner,{})," ",(0,pl.__)("Creating"),"\u2026"]}),$e&&(0,fo.jsxs)(fo.Fragment,{children:[(0,fo.jsxs)("div",{className:G({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":We,"has-actions":Ge}),children:[We&&(0,fo.jsx)(Yn.TextControl,{ref:N,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,pl.__)("Text"),value:M?.title,onChange:oe,onKeyDown:Ft}),(0,fo.jsx)(Ume,{ref:U,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:De,withCreateSuggestion:m,onCreateSuggestion:se,onChange:Z,onSelect:Ye,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:l,suggestionsQuery:p,withURLSuggestion:!g,createSuggestionButtonText:b,hideLabelFromVision:!We,isEntity:q,customValidity:E,suffix:(0,fo.jsx)(n4e,{isEntity:q,showActions:Ge,isDisabled:ht,onUnlink:et,onSubmit:Ne,helpTextId:Q})}),q&&Q&&(0,fo.jsx)("p",{id:Q,className:"block-editor-link-control__help",children:(0,pl.sprintf)((0,pl.__)("Synced with the selected %s."),M?.type||"item")})]}),le&&(0,fo.jsx)(Yn.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:le})]}),t&&!J&&!re&&(0,fo.jsx)(Jme,{value:Ao,onEditClick:()=>ie(!0),hasRichPreviews:v,hasUnlinkControl:Fe,onRemove:()=>{i(),ie(!0)}},Ao?.url),to&&(0,fo.jsx)("div",{className:"block-editor-link-control__tools",children:!At&&(0,fo.jsx)(_me,{settingsOpen:I,setSettingsOpen:A,children:(0,fo.jsx)(ope,{value:M,settings:o,onChange:K(O)})})}),Ge&&(0,fo.jsxs)(Yn.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,fo.jsx)(Yn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:eo,children:(0,pl.__)("Cancel")}),(0,fo.jsx)(Yn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:ht?XH:Ne,className:"block-editor-link-control__search-submit","aria-disabled":ht,children:(0,pl.__)("Apply")})]}),!re&&S&&S()]})}function n4e({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,fo.jsx)(Yn.Button,{icon:Bs,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,pl.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,fo.jsx)(Yn.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,fo.jsx)(Yn.Button,{onClick:o?XH:n,label:(0,pl.__)("Submit"),icon:Dc,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}ig.ViewerFill=Kme;ig.DEFAULT_LINK_SETTINGS=$H;var z2=e=>((0,hpe.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,fo.jsx)(ig,{...e}));z2.ViewerFill=ig.ViewerFill;z2.DEFAULT_LINK_SETTINGS=ig.DEFAULT_LINK_SETTINGS;var vm=ig;var bpe=c(z(),1),ype=c(D(),1),vpe=c(Xe(),1);var $w=1.5,QH=.01,JH=10,e8="";function gpe(e){return e!==void 0&&e!==e8}var t8=c(C(),1),i4e=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=gpe(t),s=(d,f)=>{if(i)return d;let m=QH*JH;switch(`${d}`){case`${m}`:return $w+m;case"0":return f?d:$w-m;case"":return $w;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}},l=i?t:e8,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,vpe.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,t8.jsx)("div",{className:"block-editor-line-height-control",children:(0,t8.jsx)(ype.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,bpe.__)("Line height"),placeholder:$w,step:QH,spinFactor:JH,value:l,min:0,spinControls:"custom"})})},j2=i4e;var fc=c(z(),1),kpe=c(_r(),1),qn=c(D(),1),U2=c(W(),1),Spe=c(Pt(),1);var _pe=c(te(),1),xpe=c(at(),1),wpe=c(Wi(),1),Cpe=c(L(),1);function H2(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 Ur=c(C(),1),s4e=()=>{},a4e=0,l4e=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:l,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=s4e,name:m=(0,fc.__)("Replace"),createNotice:h,removeNotice:p,children:g,multiple:b=!1,addToGallery:v,handleUpload:y=!0,variant:S,popoverProps:k,renderToggle:_,className:x})=>{let{mediaUpload:E,allowedMimeTypes:B}=(0,U2.useSelect)(O=>{let{getSettings:M}=O(w),H=M();return{mediaUpload:H.mediaUpload,allowedMimeTypes:H.allowedMimeTypes}},[]),P=`block-editor/media-replace-flow/error-notice/${++a4e}`,T=(0,Cpe.useMemo)(()=>H2(r,B,n),[r,B,n]),A=O=>{let M=(0,xpe.__unstableStripHTML)(O);if(i){i(M);return}setTimeout(()=>{h("error",M,{speak:!0,id:P,isDismissible:!0})},1e3)},I=(O,M)=>{d&&u&&u(),M(),s(O),(0,kpe.speak)((0,fc.__)("The media file has been replaced")),p(P)},R=(O,M)=>{let H=O.target.files;if(!y)return M(),s(H);f(H),E({allowedTypes:r,filesList:H,onFileChange:([Y])=>{I(Y,M)},onError:A})},V=O=>{O.keyCode===Spe.DOWN&&(O.preventDefault(),O.target.click())},U=b&&(!r||r.length===0?!1:r.every(O=>O==="image"||O.startsWith("image/"))),j={...k,variant:S};return(0,Ur.jsx)(qn.Dropdown,{popoverProps:j,className:x,contentClassName:G("block-editor-media-replace-flow__options",S&&`is-variant-${S}`),renderToggle:({isOpen:O,onToggle:M})=>_?_({"aria-expanded":O,"aria-haspopup":"true",onClick:M,onKeyDown:V,children:m}):(0,Ur.jsx)(qn.ToolbarButton,{"aria-expanded":O,"aria-haspopup":"true",onClick:M,onKeyDown:V,children:m}),renderContent:({onClose:O})=>(0,Ur.jsxs)(Ur.Fragment,{children:[(0,Ur.jsxs)(qn.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,Ur.jsxs)(Qa,{children:[(0,Ur.jsx)(Mf,{gallery:U,addToGallery:v,multiple:b,value:b?o:t,onSelect:M=>I(M,O),allowedTypes:r,render:({open:M})=>(0,Ur.jsx)(qn.MenuItem,{icon:Gg,onClick:M,children:(0,fc.__)("Open Media Library")})}),(0,Ur.jsx)(qn.FormFileUpload,{onChange:M=>{R(M,O)},accept:T,multiple:!!b,render:({openFileDialog:M})=>(0,Ur.jsx)(qn.MenuItem,{icon:V5,onClick:()=>{M()},children:(0,fc._x)("Upload","verb")})})]}),u&&(0,Ur.jsx)(qn.MenuItem,{icon:qV,onClick:u,isPressed:d,children:(0,fc.__)("Use featured image")}),typeof g=="function"?g({onClose:O}):g,e&&l&&(0,Ur.jsx)(qn.MenuItem,{onClick:()=>{l(),O()},children:(0,fc.__)("Reset")})]}),a&&(0,Ur.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,Ur.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,fc.__)("Current media URL:")}),(0,Ur.jsx)(vm,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:M})=>{a(M)},searchInputPlaceholder:(0,fc.__)("Paste or type URL")})]})]})})},Zv=(0,_pe.compose)([(0,U2.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(wpe.store);return{createNotice:t,removeNotice:o}}),(0,qn.withFilters)("editor.MediaReplaceFlow")])(l4e);var sr=c(D(),1),ir=c(z(),1),xm=c(L(),1),Fpe=c(W(),1);var zpe=c(Xe(),1);var r8=c(z(),1),W2=c(L(),1),Xv=c(D(),1);var Vpe=c(Xe(),1);var Bpe=c(z(),1),Ppe=c(D(),1);var Epe=c(D(),1),G2=c(ji(),1),o8=c(C(),1);function Tpe({url:e,urlLabel:t,className:o}){let r=G(o,"block-editor-url-popover__link-viewer-url");return e?(0,o8.jsx)(Epe.ExternalLink,{className:r,href:e,children:t||(0,G2.filterURLForDisplay)((0,G2.safeDecodeURI)(e))}):(0,o8.jsx)("span",{className:r})}var Kw=c(C(),1);function Rpe({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,Kw.jsxs)("div",{className:G("block-editor-url-popover__link-viewer",e),...i,children:[(0,Kw.jsx)(Tpe,{url:r,urlLabel:n,className:t}),o&&(0,Kw.jsx)(Ppe.Button,{icon:Bp,label:(0,Bpe.__)("Edit"),onClick:o,size:"compact"})]})}var Mpe=c(z(),1),Npe=c(D(),1);var $u=c(z(),1),Yw=c(L(),1),hl=c(Pt(),1),Bi=c(D(),1),km=c(te(),1),Ipe=c(W(),1),Ope=c(ji(),1);var mc=c(C(),1),Ape=c(pe(),1),{ValidatedInputControl:c4e}=F(Bi.privateApis);function Lpe(e){return typeof e=="function"}var u4e=class extends Yw.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,Yw.createRef)(),this.inputRef=e.inputRef||(0,Yw.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,km.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,Ope.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,$u.sprintf)((0,$u._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,$u.__)("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 hl.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case hl.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case hl.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 hl.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case hl.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case hl.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,$u.__)("Link selected.")));break}case hl.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,mc.jsxs)(mc.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,$u.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:a=!1,help:l=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}`,y={id:v,label:e,className:G("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},S={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,$u.__)("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:l},k={customValidity:d,...f!==void 0&&{markWhenOptional:f}};if(i)return i(y,S,m);d!==void 0&&(this.hasRenderedValidation.current=!0);let _=this.hasRenderedValidation.current?c4e:Bi.__experimentalInputControl;return(0,mc.jsxs)(Bi.BaseControl,{...y,children:[(0,mc.jsx)(_,{...S,...this.hasRenderedValidation.current?k:{},__next40pxDefaultSize:!0}),m&&(0,mc.jsx)(Bi.Spinner,{})]})}renderSuggestions(){let{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:o,suggestions:r,suggestionsValue:n,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:a,loading:l}=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 Lpe(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:l,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,mc.jsx)(Bi.Popover,{placement:"bottom",focusOnMount:!1,children:(0,mc.jsx)("div",{...u,className:G("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,Ape.createElement)(Bi.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:G("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},bm=(0,km.compose)(km.withSafeTimeout,Bi.withSpokenMessages,km.withInstanceId,(0,Ipe.withSelect)((e,t)=>{if(Lpe(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(w);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(u4e);var qw=c(C(),1);function Dpe({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,qw.jsxs)("form",{className:G("block-editor-url-popover__link-editor",t),...n,children:[(0,qw.jsx)(bm,{value:r,onChange:o,autocompleteRef:e}),(0,qw.jsx)(Npe.Button,{icon:Dc,label:(0,Mpe.__)("Apply"),type:"submit",size:"compact"})]})}var Sm=c(C(),1),{__experimentalPopoverLegacyPositionToPlacement:d4e}=F(Xv.privateApis),f4e="bottom",n8=(0,W2.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,Vpe.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let l;r!==void 0?l=r:i!==void 0&&(l=d4e(i)),l=l||f4e;let[u,d]=(0,W2.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,Sm.jsxs)(Xv.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,r8.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:l,shift:!0,variant:"toolbar",...s,children:[(0,Sm.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,Sm.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,Sm.jsx)(Xv.Button,{className:"block-editor-url-popover__settings-toggle",icon:Zr,label:(0,r8.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,Sm.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,Sm.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});n8.LinkEditor=Dpe;n8.LinkViewer=Rpe;var _m=n8;var kt=c(C(),1),m4e=()=>{},p4e=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,kt.jsx)(_m,{anchor:n,onClose:r,children:(0,kt.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,kt.jsx)(sr.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,ir.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,ir.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,kt.jsx)(sr.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,kt.jsx)(sr.Button,{size:"small",icon:Dc,label:(0,ir.__)("Apply"),type:"submit"})})})})}),h4e=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,xm.useState)(null),[i,s]=(0,xm.useState)(!1),a=()=>{s(!0)},l=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),l())};return(0,kt.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,kt.jsx)(sr.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,ir.__)("Insert from URL")}),i&&(0,kt.jsx)(p4e,{src:e,onChange:t,onSubmit:u,onClose:l,popoverAnchor:r})]})};function g4e({value:e={},allowedTypes:t,className:o,icon:r,labels:n={},mediaPreview:i,notices:s,isAppender:a,accept:l,addToGallery:u,multiple:d=!1,handleUpload:f=!0,disableDropZone:m,disableMediaButtons:h,onError:p,onSelect:g,onCancel:b,onSelectURL:v,onToggleFeaturedImage:y,onDoubleClick:S,onFilesPreUpload:k=m4e,onHTMLDrop:_,children:x,mediaLibraryButton:E,placeholder:B,style:P}){_&&(0,zpe.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:T,allowedMimeTypes:A}=(0,Fpe.useSelect)($=>{let{getSettings:Q}=$(w),X=Q();return{mediaUpload:X.mediaUpload,allowedMimeTypes:X.allowedMimeTypes}},[]),[I,R]=(0,xm.useState)("");(0,xm.useEffect)(()=>{R(e?.src??"")},[e?.src]);let V=(0,xm.useMemo)(()=>H2(t,A,l),[t,A,l]),N=()=>!t||t.length===0?!1:t.every($=>$==="image"||$.startsWith("image/")),U=$=>{if(!f||typeof f=="function"&&!f($))return g($);k($);let Q;if(d)if(u){let X=[];Q=J=>{let ie=(e??[]).filter(se=>se.id?!X.some(({id:re})=>Number(re)===Number(se.id)):!X.some(({urlSlug:re})=>se.url.includes(re)));g(ie.concat(J)),X=J.map(se=>{let re=se.url.lastIndexOf("."),le=se.url.slice(0,re);return{id:se.id,urlSlug:le}})}}else Q=g;else Q=([X])=>g(X);T({allowedTypes:t,filesList:$,onFileChange:Q,onError:p,multiple:d})};async function j($){let{blocks:Q}=U6($);if(!Q?.length)return;let X=await Promise.all(Q.map(J=>{let ie=J.name.split("/")[1];return J.attributes.id?(J.attributes.type=ie,J.attributes):new Promise((se,re)=>{window.fetch(J.attributes.url).then(le=>le.blob()).then(le=>T({filesList:[le],additionalData:{title:J.attributes.title,alt_text:J.attributes.alt,caption:J.attributes.caption,type:ie},onFileChange:([ye])=>{ye.id&&se(ye)},allowedTypes:t,onError:re})).catch(()=>se(J.attributes.url))})})).catch(J=>p(J));X?.length&&g(d?X:X[0])}let O=$=>{U($.target.files)},H=B??($=>{let{instructions:Q,title:X}=n;if(!T&&!v&&(Q=(0,ir.__)("To edit this block, you need permission to upload media.")),Q===void 0||X===void 0){let ie=t??[],[se]=ie,re=ie.length===1,le=re&&se==="audio",ye=re&&se==="image",Re=re&&se==="video";Q===void 0&&T&&(Q=(0,ir.__)("Drag and drop an image or video, upload, or choose from your library."),le?Q=(0,ir.__)("Drag and drop an audio file, upload, or choose from your library."):ye?Q=(0,ir.__)("Drag and drop an image, upload, or choose from your library."):Re&&(Q=(0,ir.__)("Drag and drop a video, upload, or choose from your library."))),X===void 0&&(X=(0,ir.__)("Media"),le?X=(0,ir.__)("Audio"):ye?X=(0,ir.__)("Image"):Re&&(X=(0,ir.__)("Video")))}let J=G("block-editor-media-placeholder",o,{"is-appender":a});return(0,kt.jsxs)(sr.Placeholder,{icon:r,label:X,instructions:Q,className:J,notices:s,onDoubleClick:S,preview:i,style:P,children:[$,x]})}),Y=()=>m?null:(0,kt.jsx)(sr.DropZone,{onFilesDrop:U,onDrop:j,isEligible:$=>{let Q="wp-block:core/",X=[];for(let J of $.types)J.startsWith(Q)&&X.push(J.slice(Q.length));return X.every(J=>t.includes(J))&&(d?!0:X.length===1)}}),oe=()=>b&&(0,kt.jsx)(sr.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,ir.__)("Cancel"),variant:"link",onClick:b,children:(0,ir.__)("Cancel")}),K=()=>v&&(0,kt.jsx)(h4e,{src:I,onChangeSrc:R,onSelectURL:v}),Z=()=>y&&(0,kt.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,kt.jsx)(sr.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:y,variant:"secondary",children:(0,ir.__)("Use featured image")})}),q=()=>{let Q=E??(({open:J})=>(0,kt.jsx)(sr.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{J()},children:(0,ir.__)("Media Library")})),X=(0,kt.jsx)(Mf,{addToGallery:u,gallery:d&&N(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:J})=>J):e.id,render:Q});if(T&&a)return(0,kt.jsxs)(kt.Fragment,{children:[Y(),(0,kt.jsx)(sr.FormFileUpload,{onChange:O,accept:V,multiple:!!d,render:({openFileDialog:J})=>{let ie=(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(sr.Button,{__next40pxDefaultSize:!0,variant:"primary",className:G("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:J,children:(0,ir._x)("Upload","verb")}),X,K(),Z(),oe()]});return H(ie)}})]});if(T){let J=(0,kt.jsxs)(kt.Fragment,{children:[Y(),(0,kt.jsx)(sr.FormFileUpload,{render:({openFileDialog:ie})=>(0,kt.jsx)(sr.Button,{__next40pxDefaultSize:!0,onClick:ie,variant:"primary",className:G("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,ir._x)("Upload","verb")}),onChange:O,accept:V,multiple:!!d}),X,K(),Z(),oe()]});return H(J)}return H(X)};return h?(0,kt.jsx)(Qa,{children:Y()}):(0,kt.jsx)(Qa,{fallback:H(K()),children:q()})}var jpe=(0,sr.withFilters)("editor.MediaPlaceholder")(g4e);var Hpe=c(C(),1),b4e=({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,Hpe.jsx)(m2,{settings:o,gradients:[],disableCustomGradients:!0,...t})},Upe=b4e;var Zhe=c(jF(),1);var Xhe=c(L(),1);var Khe=c(L(),1);var Hhe=c(hp(),1),Gr=c(L(),1),Cm=c(W(),1),sA=c(te(),1),Uhe=c(Qr(),1),Ghe=c(D(),1),Whe=c(ee(),1),$he=c(Xe(),1),ak=c(z(),1);var Gpe=c(z(),1),$2=c(D(),1);var i8=c(z(),1),sg=c(D(),1);var Ku=c(C(),1),y4e={placement:"bottom-start"},v4e=()=>(0,Ku.jsxs)(Ku.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,Ku.jsx)(sg.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,Ku.jsx)(sg.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,Ku.jsx)(sg.ToolbarItem,{children:r=>(0,Ku.jsx)(sg.DropdownMenu,{icon:Zr,label:(0,i8.__)("More"),toggleProps:{...r,className:G(r.className,{"is-pressed":o}),description:(0,i8.__)("Displays more block tools")},controls:Ol(e.map(([{props:n}])=>n),"title"),popoverProps:y4e})})}})]}),s8=v4e;var wm=c(C(),1);function k4e({popoverAnchor:e}){return(0,wm.jsx)($2.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,wm.jsx)(sv,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,Gpe.__)("Format tools"),children:(0,wm.jsx)($2.ToolbarGroup,{children:(0,wm.jsx)(s8,{})})})})}var S4e=({inline:e,editableContentElement:t})=>e?(0,wm.jsx)(k4e,{popoverAnchor:t}):(0,wm.jsx)(yo,{group:"inline",children:(0,wm.jsx)(s8,{})}),Wpe=S4e;var K2=c(L(),1),$pe=c(W(),1);function Kpe({html:e,value:t}){let o=(0,K2.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,$pe.useDispatch)(w);(0,K2.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 ek=c(L(),1),whe=c(te(),1);var Zw=c(Qr(),1),Ype=c(zt(),1),qpe=c(te(),1);var{subscribeDelegatedListener:_4e}=F(qpe.privateApis),x4e=["`",'"',"'","\u201C\u201D","\u2018\u2019"],Zpe=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:l}=e.current;if(n!=="insertText"||(0,Zw.isCollapsed)(s))return;let u=(0,Ype.applyFilters)("blockEditor.wrapSelectionSettings",x4e).find(([_,x])=>_===i||x===i);if(!u)return;let[d,f=d]=u,m=s.start,h=s.end+d.length,p=(0,Zw.insert)(s,d,m,m);p=(0,Zw.insert)(p,f,h,h);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=l.dispatch(w);g(),a(p),b();let v={};for(let _ in r)v[_]=r[_];v.data=f;let{ownerDocument:y}=t,{defaultView:S}=y,k=new S.InputEvent("input",v);window.queueMicrotask(()=>{r.target.dispatchEvent(k)}),r.preventDefault()}return _4e(t,"beforeinput",o,!0)};var Y2=c(Qr(),1),Qv=c(ee(),1),ehe=c(te(),1);var Xpe=c(Qr(),1);function Qpe(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,Xpe.insert)(e,o)}var{subscribeDelegatedListener:Jpe}=F(ehe.privateApis);function the(e){let t=e.length;for(;t--;){let o=n_(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(Hc,""),[e[t].clientId,o,0,0];let r=the(e[t].innerBlocks);if(r)return r}return[]}var ohe=e=>t=>{function o(){let{getValue:s,onReplace:a,selectionChange:l,registry:u}=e.current;if(!a)return;let d=s(),{start:f,text:m}=d;if(m.slice(f-1,f)!==" ")return;let p=m.slice(0,f).trim(),g=(0,Qv.getBlockTransforms)("from").filter(({type:S})=>S==="prefix"),b=(0,Qv.findTransform)(g,({prefix:S})=>p===S);if(!b)return;let v=(0,Y2.toHTMLString)({value:(0,Y2.insert)(d,Hc,0,f)}),y=b.transform(v);return l(...the([y])),a([y]),u.dispatch(w).__unstableMarkAutomaticChange(),!0}function r(s){let{inputType:a,type:l}=s,{getValue:u,onChange:d,__unstableAllowPrefixTransformations:f,formatTypes:m,registry:h,onReplace:p}=e.current;if(a!=="insertText"&&l!=="compositionend"||f&&o())return;let g=u(),b=(0,Qv.getBlockTransforms)("from").filter(_=>_.type==="input"),v=(0,Qv.findTransform)(b,_=>_.regExp.test(g.text));if(v){p(v.transform()),h.dispatch(w).__unstableMarkAutomaticChange();return}let y=m.reduce((_,{__unstableInputRule:x})=>(x&&(_=x(_)),_),Qpe(g)),{__unstableMarkLastChangeAsPersistent:S,__unstableMarkAutomaticChange:k}=h.dispatch(w);y!==g&&(S(),d({...y,activeFormats:g.activeFormats}),k())}let n=Jpe(t,"input",r,!0),i=Jpe(t,"compositionend",r,!0);return()=>{n(),i()}};var rhe=c(te(),1);var{subscribeDelegatedListener:w4e}=F(rhe.privateApis),nhe=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(w).__unstableMarkLastChangeAsPersistent()}return w4e(t,"beforeinput",o)};var q2=c(Pt(),1),ihe=c(te(),1);var{subscribeDelegatedListener:C4e}=F(ihe.privateApis),she=()=>e=>{function t(o){(q2.isKeyboardEvent.primary(o,"z")||q2.isKeyboardEvent.primary(o,"y")||q2.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return C4e(e,"keydown",t,!0)};var ahe=c(te(),1);var{subscribeDelegatedListener:E4e}=F(ahe.privateApis),lhe=e=>t=>{let{keyboardShortcuts:o}=e.current;function r(n){for(let i of o.current)i(n)}return E4e(t,"keydown",r,!0)};var che=c(te(),1);var{subscribeDelegatedListener:T4e}=F(che.privateApis),uhe=e=>t=>{let{inputEvents:o}=e.current;function r(n){for(let i of o.current)i(n)}return T4e(t,"input",r)};var Z2=c(Pt(),1),dhe=c(te(),1);var{subscribeDelegatedListener:B4e}=F(dhe.privateApis),fhe=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==Z2.BACKSPACE&&n!==Z2.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(w),{__experimentalUndo:l}=a();l&&s()&&(r.preventDefault(),l())}return B4e(t,"keydown",o)};var phe=c(ee(),1),pc=c(Qr(),1),hhe=c(ji(),1),ghe=c(te(),1);var P4e=c(L(),1),R4e=c(ee(),1),I4e=c(C(),1);function mhe(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function X2(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Jv({allowedFormats:e,disableFormats:t}){return t?Jv.EMPTY_ARRAY:e}Jv.EMPTY_ARRAY=[];var{subscribeDelegatedListener:O4e}=F(ghe.privateApis),bhe=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:l,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:h,registry:p}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:g,html:b}=uy(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText):
167
168 `,b),window.console.log(`Received plain text (RichText):
169
170 `,g),i){s((0,pc.insert)(a,g));return}let v=n.clipboardData.getData("rich-text")==="true";function y(x){let E=l.reduce((B,{__unstablePasteRule:P})=>(P&&B===a&&(B=P(a,{html:b,plainText:g})),B),a);if(E!==a)s(E);else{let B=(0,pc.create)({html:x});mhe(B,a.activeFormats),s((0,pc.insert)(a,B))}}if(v){y(b);return}if(h){s((0,pc.insert)(a,(0,pc.create)({text:g})));return}let S="INLINE",k=g.trim();f&&(0,pc.isEmpty)(a)&&(0,hhe.isURL)(k)&&/^https?:/.test(k)&&(S="BLOCKS");let _=(0,phe.pasteHandler)({HTML:b,plainText:g,mode:S,tagName:u,preserveWhiteSpace:m});if(typeof _=="string"){y(_);return}!_.length||!d||!(0,pc.isEmpty)(a)||(S==="BLOCKS"&&(y(b),p.dispatch(w).__unstableMarkLastChangeAsPersistent()),d(_,_.length-1,-1))}let{defaultView:r}=t.ownerDocument;return O4e(r,"paste",o)};var Xw=c(Pt(),1),Q2=c(Qr(),1),yhe=c(te(),1);var{subscribeDelegatedListener:A4e}=F(yhe.privateApis),vhe=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===Xw.DELETE||n===Xw.BACKSPACE){let{start:l,end:u,text:d}=i,f=n===Xw.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,Q2.isCollapsed)(i)||m||f&&l!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,Q2.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return A4e(t,"keydown",o)};var a8=c(Pt(),1),Qw=c(Qr(),1),She=c(te(),1);var{subscribeDelegatedListener:khe}=F(She.privateApis),_he=e=>t=>{function o(a){if(a.keyCode!==a8.ENTER)return;let{onReplace:l,onSplit:u}=e.current;l&&u&&(a.__deprecatedOnSplit=!0)}function r(a){if(a.defaultPrevented||a.target!==t||a.keyCode!==a8.ENTER)return;let{value:l,onChange:u,disableLineBreaks:d,onSplitAtEnd:f,onSplitAtDoubleLineEnd:m,registry:h}=e.current;a.preventDefault();let{text:p,start:g,end:b}=l;a.shiftKey?d||u((0,Qw.insert)(l,`
171 `)):f&&g===b&&b===p.length?f():m&&g===b&&b===p.length&&p.slice(-2)===`
172
173 `?h.batch(()=>{let v={...l};v.start=v.end-2,u((0,Qw.remove)(v)),m()}):d||u((0,Qw.insert)(l,`
174 `))}let{defaultView:n}=t.ownerDocument,i=khe(n,"keydown",r),s=khe(t,"keydown",o,!0);return()=>{i(),s()}};var xhe=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(w).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var L4e=[Zpe,ohe,nhe,she,lhe,uhe,fhe,bhe,vhe,_he,xhe];function J2(e){let t=(0,ek.useRef)(e);(0,ek.useInsertionEffect)(()=>{t.current=e});let o=(0,ek.useMemo)(()=>L4e.map(r=>r(t)),[t]);return(0,whe.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var eA=c(Qr(),1),tA=c(L(),1);var Che=c(C(),1),Ehe=c(pe(),1),M4e={},l8=Symbol("usesContext");function N4e({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[l8]:l}=n,u=(0,tA.useContext)(pn),d=(0,tA.useMemo)(()=>l?Object.fromEntries(Object.entries(u).filter(([g])=>l.includes(g))):M4e,[l,u]);if(!a)return null;let f=(0,eA.getActiveFormat)(o,s),m=f!==void 0,h=(0,eA.getActiveObject)(o),p=h!==void 0&&h.type===s;return(0,Che.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 oA({formatTypes:e,...t}){return e.map(o=>(0,Ehe.createElement)(N4e,{settings:o,...t,key:o.name}))}var The=c(L(),1),Bhe=c(ee(),1),Phe=c(Xe(),1);var c8=c(C(),1);function u8(e,t){if(tk.isEmpty(e)){let o=X2(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,Phe.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/"}),Bhe.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function Jw({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,c8.jsx)(The.RawHTML,{children:u8(e,o)}),t?(0,c8.jsx)(t,{...n,children:e}):e}var Lhe=c(L(),1),f8=c(ee(),1),Mhe=c(Qr(),1),Nhe=c(Xe(),1);var Rhe=c(L(),1),Ihe=c(Xe(),1),rA=c(W(),1),Ohe=c(Pt(),1),ok=c(Qr(),1);var d8=c(C(),1);function D4e({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,Ihe.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:l}=Ze(),{getSelectionStart:u,getSelectionEnd:d}=(0,rA.useSelect)(w),{selectionChange:f}=(0,rA.useDispatch)(w),m=X2(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,d8.jsx)(o,{ref:a,children:p.map((b,v)=>(0,d8.jsx)(nA,{identifier:`${t}-${v}`,tagName:m,value:b,onChange:y=>{let S=p.slice();S[v]=y,g(S)},isSelected:void 0,onKeyDown:y=>{if(y.keyCode!==Ohe.ENTER)return;y.preventDefault();let{offset:S}=u(),{offset:k}=d();if(typeof S!="number"||typeof k!="number")return;let _=(0,ok.create)({html:b});_.start=S,_.end=k;let x=(0,ok.split)(_).map(B=>(0,ok.toHTMLString)({value:B})),E=p.slice();E.splice(v,1,...x),g(E),f(l,`${t}-${v+1}`,0,0)},onMerge:y=>{let S=p.slice(),k=0;if(y){if(!S[v+1])return;S.splice(v,2,S[v]+S[v+1]),k=S[v].length-1}else{if(!S[v-1])return;S.splice(v-1,2,S[v-1]+S[v]),k=S[v-1].length-1}g(S),f(l,`${t}-${v-(y?0:1)}`,k,k)},...s},v))})}var Ahe=(0,Rhe.forwardRef)(D4e);var Dhe=c(C(),1);function Vhe(e){return(0,Lhe.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,Nhe.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=f8.children.toHTML(t.value),n=s=>t.onChange(f8.children.fromDOM((0,Mhe.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?Ahe:e;return(0,Dhe.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var Fhe=c(Pt(),1),rk=c(L(),1);function m8({character:e,type:t,onUse:o}){let r=(0,rk.useContext)(nk),n=(0,rk.useRef)();return n.current=o,(0,rk.useEffect)(()=>{function i(s){Fhe.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var iA=c(D(),1),zhe=c(Pt(),1),p8=c(C(),1);function h8({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=zhe.displayShortcut[t](o)),(0,p8.jsx)(iA.Fill,{name:i,children:(0,p8.jsx)(iA.ToolbarButton,{...r,shortcut:n})})}var ik=c(L(),1);function g8({inputType:e,onInput:t}){let o=(0,ik.useContext)(sk),r=(0,ik.useRef)();return r.current=t,(0,ik.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var ps=c(C(),1),{useRichText:V4e}=F(Uhe.privateApis),nk=(0,Gr.createContext)();nk.displayName="keyboardShortcutContext";var sk=(0,Gr.createContext)();sk.displayName="inputEventContext";var jhe=Symbol("instanceId");function nA({children:e,tagName:t="div",value:o="",onChange:r,isSelected:n,multiline:i,inlineToolbar:s,wrapperClassName:a,autocompleters:l,onReplace:u,placeholder:d,allowedFormats:f,withoutInteractiveFormatting:m,onRemove:h,onMerge:p,onSplit:g,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:v,identifier:y,preserveWhiteSpace:S,__unstablePastePlainText:k,__unstableEmbedURLOnPaste:_,__unstableDisableFormats:x,disableLineBreaks:E,__unstableAllowPrefixTransformations:B,readOnly:P,...T},A){g&&(0,$he.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let I=(0,sA.useInstanceId)(nA),R=(0,Gr.useRef)(),[V,N]=(0,Gr.useState)(null),U=Ze(),{clientId:j,isSelected:O,name:M}=U,H=U[Lg],Y=(0,Gr.useContext)(pn),oe=(0,Cm.useRegistry)(),K=Fe=>{if(!O)return{isSelected:!1};let{getSelectionStart:Ge,getSelectionEnd:We}=Fe(w),$e=Ge(),ht=We(),to;return n===void 0?to=$e.clientId===j&&ht.clientId===j&&(y?$e.attributeKey===y:$e[jhe]===I):n&&(to=$e.clientId===j),{selectionStart:to?$e.offset:void 0,selectionEnd:to?ht.offset:void 0,isSelected:to}},{selectionStart:Z,selectionEnd:q,isSelected:$}=(0,Cm.useSelect)(K,[j,y,I,n,O]),{disableBoundBlock:Q,bindingsPlaceholder:X,bindingsLabel:J}=(0,Cm.useSelect)(Fe=>{if(!H?.[y])return{};let{__experimentalBlockBindingsSupportedAttributes:Ge}=Fe(w).getSettings();if(!Ge?.[M])return{};let $e=H[y],ht=(0,Whe.getBlockBindingsSource)($e.source),to={};if(ht?.usesContext?.length)for(let _t of ht.usesContext)to[_t]=Y[_t];let Ao=!ht?.canUserEditValue?.({select:Fe,context:to,args:$e.args});if(o.length>0)return{disableBoundBlock:Ao,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:_e}=Fe(w),Ce=_e(j),ot=null;ht?.getFieldsList&&(ot=ht.getFieldsList({select:Fe,context:to})?.find(Yr=>(0,Hhe.default)(Yr.args,$e?.args))?.label);let He=ot??ht?.label,gt=Ao?He:(0,ak.sprintf)((0,ak.__)("Add %s"),He),oo=Ao?$e?.args?.key||ht?.label:(0,ak.sprintf)((0,ak.__)("Empty %s; start writing to edit its value"),$e?.args?.key||ht?.label);return{disableBoundBlock:Ao,bindingsPlaceholder:Ce?.placeholder||gt,bindingsLabel:oo}},[H,y,M,o,j,Y]),ie=!!Y?.["pattern/overrides"],se=H?.__default?.source==="core/pattern-overrides",le=P||Q||ie&&!se,{getSelectionStart:ye,getSelectionEnd:Re,getBlockRootClientId:Ve}=(0,Cm.useSelect)(w),{selectionChange:tt}=(0,Cm.useDispatch)(w),Ye=Jv({allowedFormats:f,disableFormats:x}),Ie=!Ye||Ye.length>0,ut=(0,Gr.useCallback)((Fe,Ge)=>{let We={},$e=Fe===void 0&&Ge===void 0,ht={clientId:j,[y?"attributeKey":jhe]:y||I};if(typeof Fe=="number"||$e){if(Ge===void 0&&Ve(j)!==Ve(Re().clientId))return;We.start={...ht,offset:Fe}}if(typeof Ge=="number"||$e){if(Fe===void 0&&Ve(j)!==Ve(ye().clientId))return;We.end={...ht,offset:Ge}}tt(We)},[j,Ve,Re,ye,y,I,tt]),{value:Ne,getValue:Ft,onChange:qe,ref:eo,formatTypes:ce}=V4e({value:o,onChange:r,selectionStart:Z,selectionEnd:q,onSelectionChange:ut,placeholder:X||d,__unstableIsSelected:$,__unstableDisableFormats:x,preserveWhiteSpace:S,__unstableDependencies:[t],allowedFormats:Ye,withoutInteractiveFormatting:m,__unstableFormatTypeHandlerContext:(0,Gr.useMemo)(()=>({richTextIdentifier:y,blockClientId:j}),[y,j])}),fe=VW({onReplace:u,completers:l,record:Ne,onChange:qe});Kpe({html:o,value:Ne});let et=(0,Gr.useRef)(new Set),De=(0,Gr.useRef)(new Set);function At(){R.current?.focus()}let ur=t;return(0,ps.jsxs)(ps.Fragment,{children:[$&&(0,ps.jsx)(nk.Provider,{value:et,children:(0,ps.jsx)(sk.Provider,{value:De,children:(0,ps.jsxs)(Ghe.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:Ne,onChange:qe,onFocus:At}),(0,ps.jsx)(oA,{value:Ne,onChange:qe,onFocus:At,formatTypes:ce,forwardedRef:R})]})})}),$&&Ie&&(0,ps.jsx)(Wpe,{inline:s,editableContentElement:V}),(0,ps.jsx)(ur,{role:"textbox","aria-multiline":!E,"aria-readonly":le,...T,draggable:void 0,"aria-label":J||T["aria-label"]||d,...fe,ref:(0,sA.useMergeRefs)([eo,A,fe.ref,T.ref,J2({registry:oe,getValue:Ft,onChange:qe,__unstableAllowPrefixTransformations:B,formatTypes:ce,onReplace:u,selectionChange:tt,isSelected:$,disableFormats:x,value:Ne,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:_,pastePlainText:k,onMerge:p,onRemove:h,disableLineBreaks:E,onSplitAtEnd:b,onSplitAtDoubleLineEnd:v,keyboardShortcuts:et,inputEvents:De}),R,N]),contentEditable:!le,suppressContentEditableWarning:!0,className:G("block-editor-rich-text__editable",T.className,"rich-text"),tabIndex:T.tabIndex===0&&!le?null:T.tabIndex,"data-wp-block-attribute-key":y})]})}var e0=Vhe((0,Gr.forwardRef)(nA));e0.Content=Jw;e0.isEmpty=e=>!e||e.length===0;var b8=(0,Gr.forwardRef)((e,t)=>{if(Ze()[sC]){let{children:n,tagName:i="div",value:s,onChange:a,isSelected:l,multiline:u,inlineToolbar:d,wrapperClassName:f,autocompleters:m,onReplace:h,placeholder:p,allowedFormats:g,withoutInteractiveFormatting:b,onRemove:v,onMerge:y,onSplit:S,__unstableOnSplitAtEnd:k,__unstableOnSplitAtDoubleLineEnd:_,identifier:x,preserveWhiteSpace:E,__unstablePastePlainText:B,__unstableEmbedURLOnPaste:P,__unstableDisableFormats:T,disableLineBreaks:A,__unstableAllowPrefixTransformations:I,readOnly:R,...V}=e;return(0,ps.jsx)(i,{ref:t,...V,dangerouslySetInnerHTML:{__html:u8(s,u)||"<br>"}})}return(0,ps.jsx)(e0,{ref:t,...e,readOnly:!1})});b8.Content=Jw;b8.isEmpty=e=>!e||e.length===0;var tk=b8;var y8=c(C(),1),Yhe=(0,Khe.forwardRef)((e,t)=>(0,y8.jsx)(tk,{ref:t,...e,__unstableDisableFormats:!0}));Yhe.Content=function({value:t="",tagName:o="div",...r}){return(0,y8.jsx)(o,{...r,children:t})};var qhe=Yhe;var v8=c(C(),1),F4e=(0,Xhe.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,v8.jsx)(qhe,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,v8.jsx)(Zhe.default,{ref:o,className:G("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),Qhe=F4e;var hc=c(z(),1),ege=c(L(),1),tge=c(D(),1);var Jhe=c(te(),1);var aA=c(z(),1),Em=c(C(),1);function lA({property:e,viewport:t,desc:o}){let r=(0,Jhe.useInstanceId)(lA),n=o||(0,aA.sprintf)((0,aA._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,Em.jsxs)(Em.Fragment,{children:[(0,Em.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,Em.jsx)(ct,{id:`rbc-desc-${r}`,render:(0,Em.jsx)("span",{}),children:n})]})}var gc=c(C(),1);function z4e(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:l={id:"all",label:(0,hc._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,hc.__)("Small screens")},{id:"medium",label:(0,hc.__)("Medium screens")},{id:"large",label:(0,hc.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,hc.sprintf)((0,hc.__)("Use the same %s on all screen sizes."),o),f=(0,hc.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,gc.jsx)(lA,{property:o,viewport:l}),l),h=()=>u.map(p=>(0,gc.jsx)(ege.Fragment,{children:i((0,gc.jsx)(lA,{property:o,viewport:p}),p)},p.id));return(0,gc.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,gc.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,gc.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,gc.jsx)(tge.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,gc.jsxs)("div",{className:G("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):h())]})]})]})}var oge=z4e;var cA=c(D(),1);var rge=c(C(),1);function nge({units:e,...t}){let[o]=ke("spacing.units"),r=(0,cA.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,rge.jsx)(cA.__experimentalUnitControl,{units:r,...t})}var t0=c(z(),1),ige=c(L(),1),lk=c(D(),1);var bc=c(C(),1);function j4e({url:e,onChange:t}){let[o,r]=(0,ige.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,bc.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,bc.jsx)(lk.Button,{size:"compact",icon:li,label:e?(0,t0.__)("Edit link"):(0,t0.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,bc.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,bc.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,bc.jsx)(lk.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:gS,label:(0,t0.__)("Close"),onClick:r}),(0,bc.jsx)(bm,{value:e||"",onChange:t,suffix:(0,bc.jsx)(lk.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,bc.jsx)(lk.Button,{size:"small",icon:Dc,label:(0,t0.__)("Submit"),type:"submit"})})})]})})]})}var sge=j4e;var Pi=c(z(),1),ca=c(L(),1),dge=c(at(),1),Er=c(D(),1);var fge=c(ji(),1);var Zt=c(C(),1),k8="none",age="custom",lge="media",cge="attachment",uge=["noopener"],mge=({linkDestination:e,onChangeUrl:t,url:o,mediaType:r="image",mediaUrl:n,mediaLink:i,linkTarget:s,linkClass:a,rel:l,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:f,resetLightbox:m})=>{let[h,p]=(0,ca.useState)(!1),[g,b]=(0,ca.useState)(null),v=()=>{p(!0)},[y,S]=(0,ca.useState)(!1),[k,_]=(0,ca.useState)(null),x=(0,ca.useRef)(null),E=(0,ca.useRef)();(0,ca.useEffect)(()=>{if(!E.current)return;(dge.focus.focusable.find(E.current)[0]||E.current).focus()},[y,o,d]);let B=()=>{(e===lge||e===cge)&&_(""),S(!0)},P=()=>{S(!1)},T=()=>{_(null),P(),p(!1)},A=$=>{let Q=$?"_blank":void 0,X;if(Q){let J=(l??"").split(" ");uge.forEach(ie=>{J.includes(ie)||J.push(ie)}),X=J.join(" ")}else{let J=(l??"").split(" ").filter(ie=>uge.includes(ie)===!1);X=J.length?J.join(" "):void 0}return{linkTarget:Q,rel:X}},I=()=>$=>{let Q=x.current;Q&&Q.contains($.target)||(p(!1),_(null),P())},R=()=>$=>{if(k){let Q=N().find(X=>X.url===k)?.linkDestination||age;t({href:(0,fge.prependHTTPS)(k),linkDestination:Q,lightbox:{enabled:!1}})}P(),_(null),$.preventDefault()},V=()=>{t({linkDestination:k8,href:""})},N=()=>{let $=[{linkDestination:lge,title:(0,Pi.__)("Link to image file"),url:r==="image"?n:void 0,icon:wS}];return r==="image"&&i&&$.push({linkDestination:cge,title:(0,Pi.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:Tp}),$},U=$=>{let Q=N(),X;$?X=(Q.find(J=>J.url===$)||{linkDestination:age}).linkDestination:X=k8,t({linkDestination:X,href:$})},j=$=>{let Q=A($);t(Q)},O=$=>{t({rel:$})},M=$=>{t({linkClass:$})},H=(0,Zt.jsxs)(Er.__experimentalVStack,{spacing:"3",children:[(0,Zt.jsx)(Er.ToggleControl,{label:(0,Pi.__)("Open in new tab"),onChange:j,checked:s==="_blank"}),(0,Zt.jsx)(Er.TextControl,{label:(0,Pi.__)("Link relation"),value:l??"",onChange:O,help:(0,ca.createInterpolateElement)((0,Pi.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,Zt.jsx)(Er.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,Zt.jsx)(Er.TextControl,{label:(0,Pi.__)("Link CSS class"),value:a||"",onChange:M})]}),Y=k!==null?k:o,oe=!d||d&&!u,K=!Y&&oe,Z=(N().find($=>$.linkDestination===e)||{}).title,q=()=>{if(d&&u&&!o&&!y)return(0,Zt.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,Zt.jsx)(Ue,{icon:u1}),(0,Zt.jsxs)("div",{className:"text",children:[(0,Zt.jsx)("p",{children:(0,Pi.__)("Enlarge on click")}),(0,Zt.jsx)("p",{className:"description",children:(0,Pi.__)("Scales the image with a lightbox effect")})]}),(0,Zt.jsx)(Er.Button,{icon:Bs,label:(0,Pi.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||y)return(0,Zt.jsx)(_m.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:Y,onChangeInputValue:_,onSubmit:R(),autocompleteRef:x});if(o&&!y)return(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(_m.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:B,urlLabel:Z}),(0,Zt.jsx)(Er.Button,{icon:Bs,label:(0,Pi.__)("Remove link"),onClick:()=>{V(),m?.()},size:"compact"})]})};return(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(Er.ToolbarButton,{icon:li,className:"components-toolbar__control",label:(0,Pi.__)("Link"),"aria-expanded":h,onClick:v,ref:b,isActive:!!o||d&&u}),h&&(0,Zt.jsx)(_m,{ref:E,anchor:g,onFocusOutside:I(),onClose:T,renderSettings:oe?()=>H:null,additionalControls:K&&(0,Zt.jsxs)(Er.NavigableMenu,{children:[N().map($=>(0,Zt.jsx)(Er.MenuItem,{icon:$.icon,iconPosition:"left",onClick:()=>{_(null),U($.url),P()},children:$.title},$.linkDestination)),u&&(0,Zt.jsx)(Er.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:u1,info:(0,Pi.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{_(null),t({linkDestination:k8,href:""}),f?.(!0),P()},children:(0,Pi.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:q()})]})};var uk=c(D(),1),Tge=c(L(),1),fA=c(z(),1);var pge=c(L(),1),_8=c(z(),1);var S8=[],H4e=new Intl.Collator("und",{numeric:!0}).compare;function uA(){let[e,t,o,r]=ke("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??S8,i=t??S8,s=o&&r!==!1?o:S8;return(0,pge.useMemo)(()=>{let a=[{name:(0,_8.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:l})=>/^[0-9]/.test(l))&&a.sort((l,u)=>H4e(l.slug,u.slug)),a.length>zW?[{name:(0,_8.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var hge=c(L(),1),gge=c(W(),1),dA=c(z(),1),bge=c(D(),1);var yge=c(C(),1),U4e={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 ck({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:l,type:u,value:d,...f}){let m=(0,gge.useSelect)(k=>k(w).getSettings()?.disableCustomSpacingSizes),[h]=ke("spacing.units"),p=(0,bge.__experimentalUseCustomUnits)({availableUnits:h||["px","em","rem"]}),g=(0,hge.useMemo)(()=>l?.map(k=>({name:k.name,slug:k.slug,size:k.size}))||[],[l]),b=(qd.includes(a)||["vertical","horizontal"].includes(a))&&s?Ll[a]:"",v=s?u?.toLowerCase():u,y=(0,dA.sprintf)((0,dA._x)("%1$s %2$s","spacing"),b,v).trim(),S=p[0]?.value||"px";return(0,yge.jsx)(Wh,{allowNegativeOnDrag:o<0,ariaLabel:y,className:"spacing-sizes-control",customValueSettings:U4e,disableCustomValues:m,icon:e,isMixed:t,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,presets:g,presetType:"spacing",selectedUnit:S,units:p,value:d,...f})}var o0=c(C(),1),vge=["vertical","horizontal"];function kge({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let l=d=>f=>{if(!t)return;let m={...Object.keys(a).reduce((h,p)=>(h[p]=db(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?vge.filter(d=>xF(n,d)):vge;return(0,o0.jsx)(o0.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,o0.jsx)(ck,{icon:tT[d],label:Ll[d],minimumCustomValue:e,onChange:l(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:f,withInputField:!1},`spacing-sizes-control-${d}`)})})}var r0=c(C(),1);function Sge({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let l=n?.length?qd.filter(d=>n.includes(d)):qd,u=d=>f=>{let m={...Object.keys(a).reduce((h,p)=>(h[p]=db(a[p],i),h),{})};m[d]=f,t(m)};return(0,r0.jsx)(r0.Fragment,{children:l.map(d=>(0,r0.jsx)(ck,{icon:tT[d],label:Ll[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 _ge=c(C(),1);function xge({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,values:l}){let u=d=>f=>{let m={...Object.keys(l).reduce((h,p)=>(h[p]=db(l[p],s),h),{})};m[d]=f,t(m)};return(0,_ge.jsx)(ck,{label:Ll[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:l[i],withInputField:!1})}var wge=c(D(),1);var x8=c(z(),1),Cge=c(C(),1);function Ege({isLinked:e,...t}){let o=e?(0,x8.__)("Unlink sides"):(0,x8.__)("Link sides");return(0,Cge.jsx)(wge.Button,{...t,size:"small",icon:e?li:Bs,iconSize:24,label:o})}var yc=c(C(),1);function dk({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=qd,useSelect:l,values:u}){let d=uA(),f=u||jW,m=a?.length===1,h=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[p,g]=(0,Tge.useState)(UW(f,a)),b=()=>{g(p===Gc.axial?Gc.custom:Gc.axial)},y={...e,minimumCustomValue:o,onChange:x=>{let E={...u,...x};r(E)},onMouseOut:n,onMouseOver:i,sides:a,spacingSizes:d,type:t,useSelect:l,values:f},S=()=>p===Gc.axial?(0,yc.jsx)(kge,{...y}):p===Gc.custom?(0,yc.jsx)(Sge,{...y}):(0,yc.jsx)(xge,{side:p,...y,showSideInLabel:s}),k=qd.includes(p)&&s?Ll[p]:"",_=(0,fA.sprintf)((0,fA._x)("%1$s %2$s","spacing"),t,k).trim();return(0,yc.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,yc.jsxs)(uk.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,yc.jsx)(uk.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:_}),!m&&!h&&(0,yc.jsx)(Ege,{label:t,onClick:b,isLinked:p===Gc.axial})]}),(0,yc.jsx)(uk.__experimentalVStack,{spacing:.5,children:S()})]})}var Bge=c(Xe(),1);function Pge(){return(0,Bge.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var Rge=c(Xe(),1);function Ige(){(0,Rge.default)("wp.blockEditor.useResizeCanvas",{since:"7.1",hint:"Device preview is now handled by the editor canvas. This hook no longer does anything."})}var Qn=c(z(),1),Ik=c(ee(),1),Ok=c(D(),1),_0=c(W(),1),ove=c(L(),1);var fk=c(D(),1),mA=c(z(),1),Oge=c(W(),1),pA=c(ee(),1);var ag=c(C(),1);function G4e({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,ag.jsx)(fk.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,ag.jsx)(fk.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,l=s&&a?`${s}//${a}`:null;l&&t({postId:l,postType:"wp_template_part"})}},children:(0,mA.__)("Edit original")})})}function W4e({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,ag.jsx)(fk.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,ag.jsx)(fk.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,mA.__)("Exit pattern"):(0,mA.__)("Edit pattern")})})}function Age({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=lO(e),{block:s,onNavigateToEntityRecord:a,canEdit:l}=(0,Oge.useSelect)(m=>{let{getBlock:h,getSettings:p,canEditBlock:g}=m(w);return{block:h(e),onNavigateToEntityRecord:p().onNavigateToEntityRecord,canEdit:g(e)}},[e]);if(!l||!t&&!o)return null;let u=(0,pA.isReusableBlock)(s),d=(0,pA.isTemplatePart)(s);return(u||d)&&a?(0,ag.jsx)(G4e,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:u,isTemplatePartBlock:d}):(0,ag.jsx)(W4e,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var Lge=c(W(),1),Mge=c(z(),1),Nge=c(D(),1),Dge=c(L(),1);var Vge=c(C(),1);function hA(){let e=(0,Lge.useSelect)(r=>r(w).getBlockSelectionStart(),[]),t=(0,Dge.useRef)();return jp(e,t),e?(0,Vge.jsx)(Nge.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,Mge.__)("Skip to the selected block")}):null}var gA=c(z(),1),Fge=c(W(),1);var zge=c(D(),1);var n0=c(C(),1);function w8(){let e=(0,Fge.useSelect)(t=>t(w).getSelectedBlockCount(),[]);return(0,n0.jsxs)(zge.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,n0.jsx)(rt,{icon:kp,showColors:!0}),(0,n0.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,gA.sprintf)((0,gA._n)("%d Block","%d Blocks",e),e)})]})}var jge=c(D(),1),$4e=Symbol("BlockInspectorPreTabs"),{Fill:F2t,Slot:Hge}=(0,jge.createSlotFill)($4e);var wL=c(D(),1),yl=c(L(),1),Wye=c(tb(),1),Rk=c(W(),1);var i0=c(z(),1),bA={name:"settings",title:(0,i0.__)("Settings"),value:"settings",icon:fD},yA={name:"styles",title:(0,i0.__)("Styles"),value:"styles",icon:S5},vA={name:"content",title:(0,i0.__)("Content"),value:"content",icon:Tp},Yu={name:"list",title:(0,i0.__)("List View"),value:"list-view",icon:RS};var C8=c(D(),1);var s0=c(D(),1),Uge=c(z(),1);var a0=c(C(),1),K4e=({initialOpen:e=!1})=>{let t=(0,s0.__experimentalUseSlotFills)(Uf.slotName),o=(0,s0.__experimentalUseSlotFills)(Qx.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,a0.jsxs)(s0.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,Uge.__)("Advanced"),initialOpen:e,children:[(0,a0.jsx)(me.Slot,{group:"advanced"}),(0,a0.jsx)(Qx.Slot,{})]})},kA=K4e;var qu=c(C(),1),Y4e=({showAdvancedControls:e=!1})=>{let t=(0,C8.__experimentalUseSlotFills)(Ja.default.name),o=(0,C8.__experimentalUseSlotFills)(Ja.bindings.name),r=!!t?.length||!!o?.length;return(0,qu.jsxs)(qu.Fragment,{children:[(0,qu.jsx)(me.Slot,{}),(0,qu.jsx)(me.Slot,{group:"bindings"}),e&&(0,qu.jsx)("div",{children:(0,qu.jsx)(kA,{initialOpen:!r})})]})},Gge=Y4e;var Im=c(z(),1),kL=c(W(),1),uU=c(L(),1);var mk=c(D(),1),SA=c(W(),1),E8=c(z(),1);var l0=c(C(),1),q4e=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,SA.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:l}=s(w),u=l(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,SA.useDispatch)(w),n=Vo();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:l})=>[a,{style:ge({...l?.style,position:{...l?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}]));r(e,s,!0)}return(0,l0.jsx)(mk.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,E8.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,l0.jsx)(mk.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,E8.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,l0.jsx)(me.Slot,{group:"position"})})})},Z4e=()=>{let e=(0,mk.__experimentalUseSlotFills)(Ja.position.name);return!(e&&e.length)?null:(0,l0.jsx)(q4e,{})},_A=Z4e;var g0=c(ee(),1),G8=c(D(),1),rL=c(L(),1),tye=c(zt(),1),oye=c(W(),1),oL=c(z(),1);var U8={};xs(U8,{AdvancedPanel:()=>$A,BackgroundPanel:()=>QA,BorderPanel:()=>jA,ColorPanel:()=>PA,DimensionsPanel:()=>DA,FiltersPanel:()=>UA,ImageSettingsPanel:()=>jbe,StateControl:()=>JA,StateControlBadges:()=>eL,TypographyPanel:()=>IA,useHasBackgroundPanel:()=>XA,useHasBorderPanel:()=>zA,useHasBorderPanelControls:()=>f0,useHasColorPanel:()=>BA,useHasDimensionsPanel:()=>NA,useHasFiltersPanel:()=>Vbe,useHasImageSettingsPanel:()=>zbe,useHasTypographyPanel:()=>RA,useSettingsForBlockElement:()=>xA});var c0=c(L(),1),Wge=c(W(),1),T8=c(ee(),1),lg=c(z(),1);function xA(e,t,o){let{supportedStyles:r,supports:n}=(0,Wge.useSelect)(i=>({supportedStyles:F(i(T8.store)).getSupportedStyles(t,o),supports:i(T8.store).getBlockType(t)?.supports}),[t,o]);return(0,c0.useMemo)(()=>{let i={...e};return r.includes("fontSize")||(i.typography={...i.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),r.includes("fontFamily")||(i.typography={...i.typography,fontFamilies:{}}),i.color={...i.color,text:i.color?.text&&r.includes("color"),background:i.color?.background&&(r.includes("background")||r.includes("backgroundColor")),button:i.color?.button&&r.includes("buttonColor"),heading:i.color?.heading&&r.includes("headingColor"),link:i.color?.link&&r.includes("linkColor"),caption:i.color?.caption&&r.includes("captionColor")},!r.includes("background")&&!r.includes("backgroundGradient")&&(i.color.gradients=[],i.color.customGradient=!1),r.includes("filter")||(i.color.defaultDuotone=!1,i.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","textIndent","writingMode"].forEach(s=>{r.includes(s)||(i.typography={...i.typography,[s]:!1})}),r.includes("textIndent")&&(i.typography={...i.typography,textIndent:i.typography?.textIndent??"subsequent"}),r.includes("columnCount")||(i.typography={...i.typography,textColumns:!1}),["contentSize","wideSize"].forEach(s=>{r.includes(s)||(i.layout={...i.layout,[s]:!1})}),["padding","margin","blockGap"].forEach(s=>{r.includes(s)||(i.spacing={...i.spacing,[s]:!1});let a=Array.isArray(n?.spacing?.[s])?n?.spacing?.[s]:n?.spacing?.[s]?.sides;a?.length&&i.spacing?.[s]&&(i.spacing={...i.spacing,[s]:{...i.spacing?.[s],sides:a}})}),["aspectRatio","height","minHeight","minWidth","width"].forEach(s=>{r.includes(s)||(i.dimensions={...i.dimensions,[s]:!1})}),["radius","color","style","width"].forEach(s=>{r.includes("border"+s.charAt(0).toUpperCase()+s.slice(1))||(i.border={...i.border,[s]:!1})}),[["backgroundImage","backgroundImage"],["backgroundSize","backgroundSize"],["backgroundGradient","gradient"]].forEach(([s,a])=>{r.includes(s)||(i.background={...i.background,[a]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function vc(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,c0.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,lg._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,lg._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,lg._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function u0(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,c0.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,lg._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,lg._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,lg._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}function pk(e){let t=vc(e),o=u0(e),r=e?.color?.custom,n=e?.color?.customGradient,i=(0,c0.useMemo)(()=>t.flatMap(({colors:l})=>l),[t]),s=l=>Js({settings:e},"",l),a=l=>{let d=o.flatMap(({gradients:f})=>f).find(({gradient:f})=>f===l);return d?"var:preset|gradient|"+d.slug:l};return{colors:t,gradients:o,allColors:i,areCustomSolidsEnabled:r,areCustomGradientsEnabled:n,hasSolidColors:t.length>0||r,hasGradientColors:o.length>0||n,decodeValue:s,encodeGradientValue:a}}var Ho=c(D(),1),jo=c(z(),1),bk=c(L(),1);var hk=c(z(),1);var $ge=c(L(),1),wA=c(D(),1),B8=c(C(),1),X4e=[{label:(0,hk.__)("Align text left"),value:"left",icon:Bd},{label:(0,hk.__)("Align text center"),value:"center",icon:gp},{label:(0,hk.__)("Align text right"),value:"right",icon:Pd},{label:(0,hk.__)("Justify text"),value:"justify",icon:zN}],Q4e=["left","center","right"];function CA({className:e,value:t,onChange:o,options:r=Q4e}){let n=(0,$ge.useMemo)(()=>X4e.filter(i=>r.includes(i.value)),[r]);return n.length?(0,B8.jsx)(wA.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,hk.__)("Text alignment"),className:G("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,B8.jsx)(wA.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var br=c(D(),1),d0=c(z(),1);var ua=c(C(),1);function Kge({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",withSlider:n=!1,hasBottomMargin:i=!1,help:s,...a}){let[l]=ke("spacing.units"),u=(0,br.__experimentalUseCustomUnits)({availableUnits:l||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[d,f]=(0,br.__experimentalParseQuantityAndUnitFromRawValue)(t,u),m=!!f&&["em","rem","%","ch","vw","vh"].includes(f);return n?(0,ua.jsxs)(br.__experimentalView,{style:i?{marginBottom:12}:void 0,children:[(0,ua.jsx)(br.BaseControl.VisualLabel,{children:(0,d0.__)("Line indent")}),(0,ua.jsxs)(br.Flex,{children:[(0,ua.jsx)(br.FlexItem,{isBlock:!0,children:(0,ua.jsx)(br.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,d0.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:t,onChange:o,size:a.size,units:u,__unstableInputWidth:r,min:0})}),n&&(0,ua.jsx)(br.FlexItem,{isBlock:!0,children:(0,ua.jsx)(br.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ua.jsx)(br.RangeControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,d0.__)("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,ua.jsx)("p",{className:"components-base-control__help",children:s})]}):(0,ua.jsx)(br.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...a,label:(0,d0.__)("Line indent"),value:t,__unstableInputWidth:r,units:u,onChange:o,help:s})}var zo=c(D(),1),qge=c(L(),1),P8=c(z(),1);var Xt=c(C(),1),{Tabs:EA}=F(zo.privateApis);function J4e({tabs:e,colorGradientControlSettings:t,contrastWarning:o}){let{key:r,...n}=e[0]??{},i=e.find(s=>s.userValue!==void 0)?.key;return(0,Xt.jsx)(zo.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Xt.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[e.length===1&&(0,Xt.jsx)(Yge,{...n,colorGradientControlSettings:t,contrastWarning:o},r),e.length>1&&(0,Xt.jsxs)(EA,{defaultTabId:i,children:[(0,Xt.jsx)(EA.TabList,{children:e.map(s=>(0,Xt.jsx)(EA.Tab,{tabId:s.key,children:s.label},s.key))}),e.map(s=>{let{key:a,...l}=s;return(0,Xt.jsx)(EA.TabPanel,{tabId:a,focusable:!1,children:(0,Xt.jsx)(Yge,{...l,colorGradientControlSettings:t,contrastWarning:o},a)},a)})]})]})})}var eze={placement:"left-start",offset:36,shift:!0},tze=({indicators:e,label:t})=>(0,Xt.jsxs)(zo.__experimentalHStack,{justify:"flex-start",children:[(0,Xt.jsx)(zo.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,Xt.jsx)(zo.Flex,{expanded:!1,children:(0,Xt.jsx)(zo.ColorIndicator,{colorValue:o})},r))}),(0,Xt.jsx)(zo.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Yge({isGradient:e,inheritedValue:t,inheritedSlug:o,userValue:r,setValue:n,colorGradientControlSettings:i,contrastWarning:s}){return(0,Xt.jsx)(dm,{...i,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,colorSlug:e?void 0:o,gradientValue:e?t:void 0,onColorChange:e?void 0:n,onGradientChange:e?n:void 0,clearable:t===r,headingLevel:3,noticeProps:!e&&s?{children:s,status:"warning",spokenMessage:null,className:"block-editor-panel-color-gradient-settings__contrast-notice"}:void 0})}function Tm({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a,contrastWarning:l,className:u="block-editor-tools-panel-color-gradient-settings__item"}){let d=(0,qge.useRef)(void 0);return(0,Xt.jsx)(zo.__experimentalToolsPanelItem,{className:G("block-editor-color-gradient-item",u),hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,Xt.jsx)(zo.Dropdown,{popoverProps:eze,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:f,isOpen:m})=>{let h={onClick:f,className:G("block-editor-panel-color-gradient-settings__dropdown",{"is-open":m,"has-contrast-warning":!!l}),"aria-expanded":m,ref:d};return(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)(zo.Button,{...h,__next40pxDefaultSize:!0,children:(0,Xt.jsx)(tze,{indicators:n,label:e})}),t()&&(0,Xt.jsx)(zo.Button,{__next40pxDefaultSize:!0,label:(0,P8.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Xr,onClick:()=>{o(),m&&f(),d.current?.focus()}}),l&&(0,Xt.jsx)(zo.Button,{__next40pxDefaultSize:!0,size:"small",icon:oD,label:(0,P8.__)("Low contrast"),className:"block-editor-panel-color-gradient-settings__contrast-warning","aria-expanded":m,onClick:f})]})},renderContent:()=>(0,Xt.jsx)(J4e,{tabs:i,colorGradientControlSettings:s,contrastWarning:l})})})}var Zge=c(D(),1),TA=c(L(),1),un=c(z(),1);function Zn(e,t){if(typeof e!="string")return;let o=`var:preset|${t}|`;if(e.startsWith(o))return e.slice(o.length);let r=`--wp--preset--${t}--`;return e.match(new RegExp(`^var\\(${r}([^)]+)\\)$`))?.[1]}function Zu(e,t,o){if(o)return"var:preset|color|"+o;let r=e.find(({color:n})=>n===t);return r?"var:preset|color|"+r.slug:t}var gk=c(C(),1);function BA(e){let t=Xge(e),o=Jge(e),r=ebe(e),n=Qge(e);return t||o||r||n}function R8(e){let t=vc(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Xge(e){let t=vc(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Qge(e){let t=vc(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function Jge(e){let t=vc(e),o=u0(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function ebe(e){let t=vc(e),o=u0(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function I8(e){let t=vc(e),o=u0(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function O8({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Vo(),a=()=>{let l=e(o);t(l)};return(0,gk.jsx)(Zge.__experimentalToolsPanel,{label:i||(0,un.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,gk.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var oze={link:!0,heading:!0,button:!0,caption:!0};function PA({as:e=O8,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=oze,label:a,children:l,contrastWarning:u}){let{colors:d,gradients:f,areCustomSolidsEnabled:m,areCustomGradientsEnabled:h,hasSolidColors:p,hasGradientColors:g,allColors:b,decodeValue:v,encodeGradientValue:y}=pk(n),S=Xge(n),k=v(r?.elements?.link?.color?.text),_=v(t?.elements?.link?.color?.text),x=(O,M)=>{o(he(t,["elements","link","color","text"],Zu(b,O,M)))},E=v(r?.elements?.link?.[":hover"]?.color?.text),B=v(t?.elements?.link?.[":hover"]?.color?.text),P=(O,M)=>{o(he(t,["elements","link",":hover","color","text"],Zu(b,O,M)))},T=()=>!!_||!!B,A=()=>{let O=he(t,["elements","link",":hover","color","text"],void 0);O=he(O,["elements","link","color","text"],void 0),o(O)},I=Qge(n),R=ebe(n),V=Jge(n),N=(0,TA.useMemo)(()=>[{name:"caption",label:(0,un.__)("Captions"),showPanel:I},{name:"button",label:(0,un.__)("Button"),showPanel:R},{name:"heading",label:(0,un.__)("Heading"),showPanel:V},{name:"h1",label:(0,un.__)("H1"),showPanel:V},{name:"h2",label:(0,un.__)("H2"),showPanel:V},{name:"h3",label:(0,un.__)("H3"),showPanel:V},{name:"h4",label:(0,un.__)("H4"),showPanel:V},{name:"h5",label:(0,un.__)("H5"),showPanel:V},{name:"h6",label:(0,un.__)("H6"),showPanel:V}],[I,R,V]),U=(0,TA.useCallback)(O=>({...O,elements:{...O?.elements,link:{...O?.elements?.link,color:void 0,":hover":{color:void 0}},...N.reduce((M,H)=>({...M,[H.name]:{...O?.elements?.[H.name],color:void 0}}),{})}}),[N]),j=[S&&{key:"link",label:(0,un.__)("Link"),hasValue:T,resetValue:A,isShownByDefault:s.link,indicators:[k,E],contrastWarning:u,tabs:[{key:"link",label:(0,un.__)("Default"),inheritedValue:k,inheritedSlug:Zn(r?.elements?.link?.color?.text,"color"),setValue:x,userValue:_},{key:"hover",label:(0,un.__)("Hover"),inheritedValue:E,inheritedSlug:Zn(r?.elements?.link?.[":hover"]?.color?.text,"color"),setValue:P,userValue:B}]}].filter(Boolean);return N.forEach(({name:O,label:M,showPanel:H})=>{if(!H)return;let Y=v(r?.elements?.[O]?.color?.background),oe=v(r?.elements?.[O]?.color?.gradient),K=v(r?.elements?.[O]?.color?.text),Z=v(t?.elements?.[O]?.color?.background),q=v(t?.elements?.[O]?.color?.gradient),$=v(t?.elements?.[O]?.color?.text),Q=()=>!!($||Z||q),X=()=>{let le=he(t,["elements",O,"color","background"],void 0);le.elements[O].color.gradient=void 0,le.elements[O].color.text=void 0,o(le)},J=(le,ye)=>{o(he(t,["elements",O,"color","text"],Zu(b,le,ye)))},ie=(le,ye)=>{let Re=he(t,["elements",O,"color","background"],Zu(b,le,ye));Re.elements[O].color.gradient=void 0,o(Re)},se=le=>{let ye=he(t,["elements",O,"color","gradient"],y(le));ye.elements[O].color.background=void 0,o(ye)},re=O!=="caption";j.push({key:O,label:M,hasValue:Q,resetValue:X,isShownByDefault:s[O],indicators:re?[K,oe??Y]:[K],tabs:[p&&{key:"text",label:(0,un.__)("Text"),inheritedValue:K,inheritedSlug:Zn(r?.elements?.[O]?.color?.text,"color"),setValue:J,userValue:$},p&&re&&{key:"background",label:(0,un.__)("Background"),inheritedValue:Y,inheritedSlug:Zn(r?.elements?.[O]?.color?.background,"color"),setValue:ie,userValue:Z},g&&re&&{key:"gradient",label:(0,un.__)("Gradient"),inheritedValue:oe,setValue:se,userValue:q,isGradient:!0}].filter(Boolean)})}),(0,gk.jsxs)(e,{resetAllFilter:U,value:t,onChange:o,panelId:i,label:a,children:[j.map(O=>{let{key:M,...H}=O;return(0,gk.jsx)(Tm,{...H,colorGradientControlSettings:{colors:d,disableCustomColors:!m,gradients:f,disableCustomGradients:!h},panelId:i},M)}),l]})}function obe(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 tbe(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 rze(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 rbe(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=Mv(e),l=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return l||(r=t?rze(i,t):a?.find(d=>d.style.fontWeight===tbe(s,o))?.style?.fontStyle),u||(n=o?tbe(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var Tt=c(C(),1),nze=1,ize=6;function RA(e){let t=ibe(e),o=sbe(e),r=abe(e),n=lbe(e),i=ube(e),s=cbe(e),a=dbe(e),l=pbe(e),u=fbe(e),d=mbe(e),f=nbe(e),m=R8(e);return t||o||r||n||i||s||f||a||l||u||d||m}function nbe(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 ibe(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function sbe(e){return e?.typography?.lineHeight}function abe(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function sze(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,jo.__)("Appearance"):(0,jo.__)("Font style"):(0,jo.__)("Font weight")}function lbe(e){return e?.typography?.letterSpacing}function cbe(e){return e?.typography?.textTransform}function ube(e){return e?.typography?.textAlign}function dbe(e){return e?.typography?.textDecoration}function fbe(e){return e?.typography?.writingMode}function mbe(e){return e?.typography?.textColumns}function pbe(e){return e?.typography?.textIndent}function aze(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function A8({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Vo(),s=()=>{let a=e(o);t(a)};return(0,Tt.jsx)(Ho.__experimentalToolsPanel,{label:(0,jo.__)("Typography"),resetAll:s,panelId:r,__experimentalFirstVisibleItemClass:"first",dropdownMenuProps:i,children:n})}var lze={textColor:!0,fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function IA({as:e=A8,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=lze,isGlobalStyles:a=!1,contrastWarning:l}){let{colors:u,allColors:d,areCustomSolidsEnabled:f,decodeValue:m}=pk(n),h=R8(n),p=m(r?.color?.text),g=m(t?.color?.text),b=()=>!!t?.color?.text,v=(Oe,qo)=>{let vr=Zu(d,Oe,qo),si=he(t,["color","text"],vr);r?.color?.text===r?.elements?.link?.color?.text&&(si=he(si,["elements","link","color","text"],vr)),o(si)},y=()=>v(void 0),S=ibe(n),k=m(r?.typography?.fontFamily),{fontFamilies:_,fontFamilyFaces:x}=(0,bk.useMemo)(()=>obe(n,k),[n,k]),E=Oe=>{let qo=_?.find(({fontFamily:ro})=>ro===Oe)?.slug,vr=he(t,["typography","fontFamily"],qo?`var:preset|font-family|${qo}`:Oe||void 0),si=_?.find(({fontFamily:ro})=>ro===Oe)?.fontFace??[],{fontStyles:de,fontWeights:Lt}=Mv(si),Ee=de?.some(({value:ro})=>ro===oe),Mt=Lt?.some(({value:ro})=>ro?.toString()===K?.toString());if(!Ee||!Mt){let{nearestFontStyle:ro,nearestFontWeight:kr}=rbe(si,oe,K);ro||kr?vr={...vr,typography:{...vr?.typography,fontStyle:ro||void 0,fontWeight:kr||void 0}}:(oe||K)&&(vr={...vr,typography:{...vr?.typography,fontStyle:void 0,fontWeight:void 0}})}o(vr)},B=()=>!!t?.typography?.fontFamily,P=()=>E(void 0),T=nbe(n),A=!n?.typography?.customFontSize,I=aze(n),R=m(r?.typography?.fontSize),V=(()=>{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 qo=Oe.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(qo)return qo[1]})(),N=(Oe,qo)=>{let vr=qo?.slug?`var:preset|font-size|${qo?.slug}`:Oe;o(he(t,["typography","fontSize"],vr||void 0))},U=()=>!!t?.typography?.fontSize,j=()=>N(void 0),O=abe(n),M=sze(n),H=n?.typography?.fontStyle,Y=n?.typography?.fontWeight,oe=m(r?.typography?.fontStyle),K=m(r?.typography?.fontWeight),Z=(0,bk.useCallback)(({fontStyle:Oe,fontWeight:qo})=>{(Oe!==oe||qo!==K)&&o({...t,typography:{...t?.typography,fontStyle:Oe||void 0,fontWeight:qo||void 0}})},[oe,K,o,t]),q=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,$=(0,bk.useCallback)(()=>{Z({})},[Z]),Q=sbe(n),X=m(r?.typography?.lineHeight),J=Oe=>{o(he(t,["typography","lineHeight"],Oe||void 0))},ie=()=>t?.typography?.lineHeight!==void 0,se=()=>J(void 0),re=lbe(n),le=m(r?.typography?.letterSpacing),ye=Oe=>{o(he(t,["typography","letterSpacing"],Oe||void 0))},Re=()=>!!t?.typography?.letterSpacing,Ve=()=>ye(void 0),tt=pbe(n),Ye=m(r?.typography?.textIndent),ut=(n?.typography?.textIndent??"subsequent")==="all",Ne=Oe=>{o(he(t,["typography","textIndent"],Oe||void 0))},Ft=Oe=>{o({...t,settings:{typography:{textIndent:Oe?"all":"subsequent"}}})},qe=()=>!!t?.typography?.textIndent,eo=()=>{o(he(t,["typography","textIndent"],void 0))},ce=ut?(0,jo.__)("Indents the first line of all paragraphs."):(0,jo.__)("Indents the first line of each paragraph after the first one."),fe=mbe(n),et=m(r?.typography?.textColumns),De=Oe=>{o(he(t,["typography","textColumns"],Oe||void 0))},At=()=>!!t?.typography?.textColumns,ur=()=>De(void 0),Fe=cbe(n),Ge=m(r?.typography?.textTransform),We=Oe=>{o(he(t,["typography","textTransform"],Oe||void 0))},$e=()=>!!t?.typography?.textTransform,ht=()=>We(void 0),to=dbe(n),Ao=m(r?.typography?.textDecoration),_e=Oe=>{o(he(t,["typography","textDecoration"],Oe||void 0))},Ce=()=>!!t?.typography?.textDecoration,ot=()=>_e(void 0),He=fbe(n),gt=m(r?.typography?.writingMode),oo=Oe=>{o(he(t,["typography","writingMode"],Oe||void 0))},_t=()=>!!t?.typography?.writingMode,Yr=()=>oo(void 0),yr=ube(n),Rr=m(r?.typography?.textAlign),Se=Oe=>{o(he(t,["typography","textAlign"],Oe||void 0))},go=()=>!!t?.typography?.textAlign,_s=()=>Se(void 0),up=(0,bk.useCallback)(Oe=>h?{...Oe,typography:{},color:{...Oe?.color,text:void 0}}:{...Oe,typography:{}},[h]);return(0,Tt.jsxs)(e,{resetAllFilter:up,value:t,onChange:o,panelId:i,children:[h&&(0,Tt.jsx)(Tm,{label:(0,jo.__)("Color"),hasValue:b,resetValue:y,isShownByDefault:s.textColor,indicators:[p],contrastWarning:l,tabs:[{key:"text",label:(0,jo.__)("Color"),inheritedValue:p,inheritedSlug:Zn(r?.color?.text,"color"),setValue:v,userValue:g}],colorGradientControlSettings:{colors:u,disableCustomColors:!f},panelId:i}),S&&(0,Tt.jsx)(Ho.__experimentalToolsPanelItem,{label:(0,jo.__)("Font"),hasValue:B,onDeselect:P,isShownByDefault:s.fontFamily,panelId:i,children:(0,Tt.jsx)(o2,{fontFamilies:_,value:k,onChange:E,size:"__unstable-large"})}),T&&(0,Tt.jsx)(Ho.__experimentalToolsPanelItem,{label:(0,jo.__)("Size"),hasValue:U,onDeselect:j,isShownByDefault:s.fontSize,panelId:i,children:(0,Tt.jsx)(Ho.FontSizePicker,{value:V||R,valueMode:V?"slug":"literal",onChange:N,fontSizes:I,disableCustomFontSizes:A,withReset:!1,withSlider:!0,size:"__unstable-large"})}),O&&(0,Tt.jsx)(Ho.__experimentalToolsPanelItem,{label:M,hasValue:q,onDeselect:$,isShownByDefault:s.fontAppearance,panelId:i,children:(0,Tt.jsx)(t2,{value:{fontStyle:oe,fontWeight:K},onChange:Z,hasFontStyles:H,hasFontWeights:Y,fontFamilyFaces:x,size:"__unstable-large"})}),Q&&(0,Tt.jsx)(Ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,jo.__)("Line height"),hasValue:ie,onDeselect:se,isShownByDefault:s.lineHeight,panelId:i,children:(0,Tt.jsx)(j2,{__unstableInputWidth:"auto",value:X,onChange:J,size:"__unstable-large"})}),re&&(0,Tt.jsx)(Ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,jo.__)("Letter spacing"),hasValue:Re,onDeselect:Ve,isShownByDefault:s.letterSpacing,panelId:i,children:(0,Tt.jsx)(n2,{value:le,onChange:ye,size:"__unstable-large",__unstableInputWidth:"auto"})}),tt&&(0,Tt.jsxs)(Ho.__experimentalToolsPanelItem,{label:(0,jo.__)("Line indent"),hasValue:qe,onDeselect:eo,isShownByDefault:s.textIndent,panelId:i,children:[(0,Tt.jsx)(Kge,{value:Ye,onChange:Ne,size:"__unstable-large",__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,Tt.jsx)(Ho.ToggleControl,{label:(0,jo.__)("Indent all paragraphs"),checked:ut,onChange:Ft,help:ce})]}),fe&&(0,Tt.jsx)(Ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,jo.__)("Columns"),hasValue:At,onDeselect:ur,isShownByDefault:s.textColumns,panelId:i,children:(0,Tt.jsx)(Ho.__experimentalNumberControl,{label:(0,jo.__)("Columns"),max:ize,min:nze,onChange:De,size:"__unstable-large",spinControls:"custom",value:et,initialPosition:1})}),to&&(0,Tt.jsx)(Ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,jo.__)("Decoration"),hasValue:Ce,onDeselect:ot,isShownByDefault:s.textDecoration,panelId:i,children:(0,Tt.jsx)(s2,{value:Ao,onChange:_e,size:"__unstable-large",__unstableInputWidth:"auto"})}),He&&(0,Tt.jsx)(Ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,jo.__)("Orientation"),hasValue:_t,onDeselect:Yr,isShownByDefault:s.writingMode,panelId:i,children:(0,Tt.jsx)(u2,{value:gt,onChange:oo,size:"__unstable-large"})}),Fe&&(0,Tt.jsx)(Ho.__experimentalToolsPanelItem,{label:(0,jo.__)("Letter case"),hasValue:$e,onDeselect:ht,isShownByDefault:s.textTransform,panelId:i,children:(0,Tt.jsx)(l2,{value:Ge,onChange:We,showNone:!0,isBlock:!0,size:"__unstable-large"})}),yr&&(0,Tt.jsxs)(Ho.__experimentalToolsPanelItem,{label:(0,jo.__)("Text alignment"),hasValue:go,onDeselect:_s,isShownByDefault:s.textAlign,panelId:i,children:[(0,Tt.jsx)(CA,{value:Rr,onChange:Se,options:["left","center","right","justify"],size:"__unstable-large"}),Rr==="justify"&&(0,Tt.jsx)("div",{children:(0,Tt.jsx)(Ho.Notice,{status:"warning",isDismissible:!1,children:(0,jo.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var mo=c(z(),1),po=c(D(),1);var MA=c(L(),1);var Bt=c(D(),1),Po=c(z(),1),gbe=c(L(),1),OA=c(W(),1);var hbe=c(W(),1);function cg(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,hbe.useSelect)(w);return(i,s)=>{let a=(s-1)*t+i-1,l=0;for(let u of o(e)){let{columnStart:d,rowStart:f}=r(u).style?.layout??{};(f-1)*t+d-1<a&&l++}return l}}var So=c(C(),1),dn={fit:"fit",grow:"fill",max:"fixed",fixed:"fixedNoShrink"},cze=[dn.max,dn.fixed];function L8(e){return cze.includes(e)}function uze(e){let{orientation:t="horizontal"}=e??{};return t==="horizontal"?(0,Po._x)("Max","Block with maximum width in flex layout"):(0,Po._x)("Max","Block with maximum height in flex layout")}function dze(e,t){let{orientation:o="horizontal"}=t??{};return e===dn.grow?(0,Po.__)("Stretch to fill available space."):e===dn.max&&o==="horizontal"?(0,Po.__)("Specify a maximum width."):e===dn.max?(0,Po.__)("Specify a maximum height."):e===dn.fixed&&o==="horizontal"?(0,Po.__)("Specify a fixed width."):e===dn.fixed?(0,Po.__)("Specify a fixed height."):(0,Po.__)("Fit contents.")}function bbe({value:e={},onChange:t,parentLayout:o,isShownByDefault:r,panelId:n,showGridSpanDefaults:i=!0}){let{type:s,default:{type:a="default"}={}}=o??{},l=s||a;return l==="flex"?(0,So.jsx)(fze,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):l==="grid"?(0,So.jsx)(pze,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n,showGridSpanDefaults:i}):null}function fze({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{selfStretch:i,flexSize:s}=e,{orientation:a="horizontal"}=o??{},l=i||dn.fit,u=L8(l),d=()=>!!i,f=a==="horizontal"?(0,Po.__)("Width"):(0,Po.__)("Height"),[m]=ke("spacing.units"),h=(0,Bt.__experimentalUseCustomUnits)({availableUnits:m||["%","px","em","rem","vh","vw"]}),p=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,gbe.useEffect)(()=>{L8(i)&&!s&&t({...e,selfStretch:dn.fit})},[]),(0,So.jsxs)(Bt.__experimentalVStack,{as:Bt.__experimentalToolsPanelItem,spacing:2,hasValue:d,label:f,onDeselect:p,isShownByDefault:r,panelId:n,children:[(0,So.jsxs)(Bt.__experimentalToggleGroupControl,{size:"__unstable-large",label:mze(o),value:l,help:dze(l,o),onChange:g=>{let b=L8(g)?s:null;t({selfStretch:g,flexSize:b})},isBlock:!0,children:[(0,So.jsx)(Bt.__experimentalToggleGroupControlOption,{value:dn.fit,label:(0,Po._x)("Fit","Intrinsic block width in flex layout")},dn.fit),(0,So.jsx)(Bt.__experimentalToggleGroupControlOption,{value:dn.grow,label:(0,Po._x)("Grow","Block with expanding width in flex layout")},dn.grow),(0,So.jsx)(Bt.__experimentalToggleGroupControlOption,{value:dn.max,label:uze(o)},dn.max),(0,So.jsx)(Bt.__experimentalToggleGroupControlOption,{value:dn.fixed,label:(0,Po._x)("Fixed","Block with fixed width in flex layout")},dn.fixed)]}),u&&(0,So.jsx)(Bt.__experimentalUnitControl,{size:"__unstable-large",units:h,onChange:g=>{t({selfStretch:l,flexSize:g})},value:s,min:0,label:f,hideLabelFromVision:!0})]})}function mze(e){let{orientation:t="horizontal"}=e??{};return t==="horizontal"?(0,Po.__)("Width"):(0,Po.__)("Height")}function pze({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n,showGridSpanDefaults:i}){let{columnStart:s,rowStart:a,columnSpan:l,rowSpan:u}=e,{columnCount:d,rowCount:f}=o??{},m=(0,OA.useSelect)(B=>B(w).getBlockRootClientId(n)),{moveBlocksToPosition:h,__unstableMarkNextChangeAsNotPersistent:p}=(0,OA.useDispatch)(w),g=cg(m,d||3),b=()=>!!s||!!a,v=()=>!!l||!!u,y=()=>{t({columnStart:void 0,rowStart:void 0})},S=()=>{t({columnSpan:void 0,rowSpan:void 0})},k=d?d-(s??1)+1:void 0,_=window.__experimentalEnableGridInteractivity&&f?f-(a??1)+1:void 0,x=l??(i?1:void 0),E=u??(i?1:void 0);return(0,So.jsxs)(So.Fragment,{children:[(0,So.jsxs)(Bt.Flex,{as:Bt.__experimentalToolsPanelItem,hasValue:v,label:(0,Po.__)("Grid span"),onDeselect:S,isShownByDefault:r,panelId:n,children:[(0,So.jsx)(Bt.FlexItem,{style:{width:"50%"},children:(0,So.jsx)(Bt.__experimentalInputControl,{size:"__unstable-large",label:(0,Po.__)("Column span"),type:"number",onChange:B=>{let P=B===""?1:parseInt(B,10),T=k?Math.min(P,k):P;t({columnStart:s,rowStart:a,rowSpan:u,columnSpan:T})},value:x,min:1,max:k})}),(0,So.jsx)(Bt.FlexItem,{style:{width:"50%"},children:(0,So.jsx)(Bt.__experimentalInputControl,{size:"__unstable-large",label:(0,Po.__)("Row span"),type:"number",onChange:B=>{let P=B===""?1:parseInt(B,10),T=_?Math.min(P,_):P;t({columnStart:s,rowStart:a,columnSpan:l,rowSpan:T})},value:E,min:1,max:_})})]}),window.__experimentalEnableGridInteractivity&&(0,So.jsxs)(Bt.Flex,{as:Bt.__experimentalToolsPanelItem,hasValue:b,label:(0,Po.__)("Grid placement"),onDeselect:y,isShownByDefault:!1,panelId:n,children:[(0,So.jsx)(Bt.FlexItem,{style:{width:"50%"},children:(0,So.jsx)(Bt.__experimentalInputControl,{size:"__unstable-large",label:(0,Po.__)("Column"),type:"number",onChange:B=>{let P=B===""?1:parseInt(B,10);t({columnStart:P,rowStart:a,columnSpan:l,rowSpan:u}),p(),h([n],m,m,g(P,a))},value:s??1,min:1,max:d?d-(l??1)+1:void 0})}),(0,So.jsx)(Bt.FlexItem,{style:{width:"50%"},children:(0,So.jsx)(Bt.__experimentalInputControl,{size:"__unstable-large",label:(0,Po.__)("Row"),type:"number",onChange:B=>{let P=B===""?1:parseInt(B,10);t({columnStart:s,rowStart:P,columnSpan:l,rowSpan:u}),p(),h([n],m,m,g(s,P))},value:a??1,min:1,max:f?f-(u??1)+1:void 0})})]})]})}var AA=c(D(),1),yk=c(z(),1);var M8=c(C(),1);function LA({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[l,u,d]=ke("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.map(({name:p,ratio:g})=>({label:p,value:g})),m=l?.map(({name:p,ratio:g})=>({label:p,value:g})),h=[{label:(0,yk._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,yk._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,M8.jsx)(AA.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,yk.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,M8.jsx)(AA.SelectControl,{label:(0,yk.__)("Aspect ratio"),value:a,options:r??h,onChange:o,size:"__unstable-large"})})}var ft=c(C(),1),N8=["horizontal","vertical"];function NA(e,t=xi){return kbe(e)||Sbe(e)||_be(e)||xbe(e)||wbe(e)||Cbe(e)||Ebe(e)||Tbe(e)||Bbe(e)||Pbe(e,t)||Rbe(e,t)}function kbe(e){return e?.layout?.contentSize}function Sbe(e){return e?.layout?.wideSize}function _be(e){return e?.spacing?.padding}function xbe(e){return e?.spacing?.margin}function wbe(e){return e?.spacing?.blockGap}function Cbe(e){return e?.dimensions?.height}function Ebe(e){return e?.dimensions?.minHeight}function Tbe(e){return e?.dimensions?.minWidth}function Bbe(e){return e?.dimensions?.width}function Pbe(e,t=xi){return!el(t)&&e?.dimensions?.aspectRatio}function Rbe(e,t=xi){if(el(t))return!1;let{type:o="default",default:{type:r="default"}={},allowSizingOnChildren:n=!1}=e?.parentLayout??{},i=(r==="flex"||o==="flex"||r==="grid"||o==="grid")&&n;return!!e?.layout&&i}function hze(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function ybe(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 vbe(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function gze(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 bze({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Vo(),s=()=>{let a=e(o);t(a)};return(0,ft.jsx)(po.__experimentalToolsPanel,{label:(0,mo.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var da={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,aspectRatio:!0,childLayout:!0};function DA({as:e=bze,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=da,onVisualize:a=()=>{},includeLayoutControls:l=!1,styleState:u=xi}){let{dimensions:d,spacing:f}=n,m=Se=>Se&&typeof Se=="object"?Object.keys(Se).reduce((go,_s)=>(go[_s]=Js({settings:{dimensions:d,spacing:f}},"",Se[_s]),go),{}):Js({settings:{dimensions:d,spacing:f}},"",Se),h=hze(n),p=(0,po.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),g=-1/0,[b,v]=(0,MA.useState)(g),y=(0,MA.useCallback)(Se=>({...Se,layout:ge({...Se?.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:{...Se?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...Se?.dimensions,height:void 0,minHeight:void 0,minWidth:void 0,aspectRatio:void 0,width:void 0}}),[]),S=kbe(n)&&l,k=m(r?.layout?.contentSize),_=Se=>{o(he(t,["layout","contentSize"],Se||void 0))},x=()=>!!t?.layout?.contentSize,E=()=>_(void 0),B=Sbe(n)&&l,P=m(r?.layout?.wideSize),T=Se=>{o(he(t,["layout","wideSize"],Se||void 0))},A=()=>!!t?.layout?.wideSize,I=()=>T(void 0),R=_be(n),V=m(r?.spacing?.padding),N=vbe(V),U=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,j=U&&U.some(Se=>N8.includes(Se)),O=Se=>{let go=ybe(Se,U);o(he(t,["spacing","padding"],go))},M=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,H=()=>O(void 0),Y=()=>a("padding"),oe=xbe(n),K=m(r?.spacing?.margin),Z=vbe(K),q=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,$=q&&q.some(Se=>N8.includes(Se)),Q=Se=>{let go=ybe(Se,q);o(he(t,["spacing","margin"],go))},X=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,J=()=>Q(void 0),ie=()=>a("margin"),se=wbe(n),re=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,le=re&&re.some(Se=>N8.includes(Se)),ye=m(r?.spacing?.blockGap),Re=gze(ye,le),Ve=Se=>{o(he(t,["spacing","blockGap"],Se))},tt=Se=>{Se||Ve(null),!le&&Se?.hasOwnProperty("top")?Ve(Se.top):Ve({top:Se?.top,left:Se?.left})},Ye=()=>Ve(void 0),Ie=()=>!!t?.spacing?.blockGap,ut=Ebe(n),Ne=m(r?.dimensions?.minHeight),Ft=Se=>{let go=he(t,["dimensions","minHeight"],Se);o(he(go,["dimensions","aspectRatio"],void 0))},qe=()=>{Ft(void 0)},eo=()=>!!t?.dimensions?.minHeight,ce=Cbe(n),fe=m(r?.dimensions?.height),et=Se=>{let go=he(t,["dimensions","height"],Se);o(he(go,["dimensions","aspectRatio"],void 0))},De=()=>{et(void 0)},At=()=>!!t?.dimensions?.height,ur=Tbe(n),Fe=m(r?.dimensions?.minWidth),Ge=Se=>{o(he(t,["dimensions","minWidth"],Se))},We=()=>{Ge(void 0)},$e=()=>!!t?.dimensions?.minWidth,ht=Bbe(n),to=m(r?.dimensions?.width),Ao=Se=>{o(he(t,["dimensions","width"],Se))},_e=()=>{Ao(void 0)},Ce=()=>!!t?.dimensions?.width,ot=Pbe(n,u),He=m(r?.dimensions?.aspectRatio),gt=Se=>{let go=he(t,["dimensions","aspectRatio"],Se);o(he(go,["dimensions","minHeight"],void 0))},oo=()=>!!t?.dimensions?.aspectRatio,_t=Rbe(n,u),Yr=r?.layout,yr=Se=>{o({...t,layout:{...t?.layout,...Se}})},Rr=()=>a(!1);return(0,ft.jsxs)(e,{resetAllFilter:y,value:t,onChange:o,panelId:i,children:[(S||B)&&(0,ft.jsx)("span",{className:"span-columns",children:(0,mo.__)("Set the width of the main content area.")}),S&&(0,ft.jsx)(po.__experimentalToolsPanelItem,{label:(0,mo.__)("Content width"),hasValue:x,onDeselect:E,isShownByDefault:s.contentSize??da.contentSize,panelId:i,children:(0,ft.jsx)(po.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,mo.__)("Content width"),labelPosition:"top",value:k||"",onChange:Se=>{_(Se)},units:p,prefix:(0,ft.jsx)(po.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ft.jsx)(Ue,{icon:bp})})})}),B&&(0,ft.jsx)(po.__experimentalToolsPanelItem,{label:(0,mo.__)("Wide width"),hasValue:A,onDeselect:I,isShownByDefault:s.wideSize??da.wideSize,panelId:i,children:(0,ft.jsx)(po.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,mo.__)("Wide width"),labelPosition:"top",value:P||"",onChange:Se=>{T(Se)},units:p,prefix:(0,ft.jsx)(po.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ft.jsx)(Ue,{icon:Rp})})})}),R&&(0,ft.jsxs)(po.__experimentalToolsPanelItem,{hasValue:M,label:(0,mo.__)("Padding"),onDeselect:H,isShownByDefault:s.padding??da.padding,className:G({"tools-panel-item-spacing":h}),panelId:i,children:[!h&&(0,ft.jsx)(po.BoxControl,{values:N,onChange:O,label:(0,mo.__)("Padding"),sides:U,units:p,allowReset:!1,splitOnAxis:j,inputProps:{onMouseOver:Y,onMouseOut:Rr}}),h&&(0,ft.jsx)(dk,{values:N,onChange:O,label:(0,mo.__)("Padding"),sides:U,units:p,allowReset:!1,onMouseOver:Y,onMouseOut:Rr})]}),oe&&(0,ft.jsxs)(po.__experimentalToolsPanelItem,{hasValue:X,label:(0,mo.__)("Margin"),onDeselect:J,isShownByDefault:s.margin??da.margin,className:G({"tools-panel-item-spacing":h}),panelId:i,children:[!h&&(0,ft.jsx)(po.BoxControl,{values:Z,onChange:Q,inputProps:{min:b,onDragStart:()=>{v(0)},onDragEnd:()=>{v(g)},onMouseOver:ie,onMouseOut:Rr},label:(0,mo.__)("Margin"),sides:q,units:p,allowReset:!1,splitOnAxis:$}),h&&(0,ft.jsx)(dk,{values:Z,onChange:Q,minimumCustomValue:-1/0,label:(0,mo.__)("Margin"),sides:q,units:p,allowReset:!1,onMouseOver:ie,onMouseOut:Rr})]}),se&&(0,ft.jsxs)(po.__experimentalToolsPanelItem,{hasValue:Ie,label:(0,mo.__)("Block spacing"),onDeselect:Ye,isShownByDefault:s.blockGap??da.blockGap,className:G({"tools-panel-item-spacing":h,"single-column":!h&&!le}),panelId:i,children:[!h&&(le?(0,ft.jsx)(po.BoxControl,{label:(0,mo.__)("Block spacing"),min:0,onChange:tt,units:p,sides:re,values:Re,allowReset:!1,splitOnAxis:le}):(0,ft.jsx)(po.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,mo.__)("Block spacing"),min:0,onChange:Ve,units:p,value:ye})),h&&(0,ft.jsx)(dk,{label:(0,mo.__)("Block spacing"),min:0,onChange:tt,showSideInLabel:!1,sides:le?re:["top"],values:Re,allowReset:!1})]}),_t&&(0,ft.jsx)(bbe,{value:Yr,onChange:yr,parentLayout:n?.parentLayout,panelId:i,showGridSpanDefaults:!ku(u),isShownByDefault:s.childLayout??da.childLayout}),ut&&(0,ft.jsx)(po.__experimentalToolsPanelItem,{hasValue:eo,label:(0,mo.__)("Minimum height"),onDeselect:qe,isShownByDefault:s.minHeight??da.minHeight,panelId:i,children:(0,ft.jsx)(Yh,{label:(0,mo.__)("Minimum height"),value:Ne,onChange:Ft,dimensionSizes:d?.dimensionSizes})}),ur&&(0,ft.jsx)(po.__experimentalToolsPanelItem,{hasValue:$e,label:(0,mo.__)("Minimum width"),onDeselect:We,isShownByDefault:s.minWidth??da.minWidth,panelId:i,children:(0,ft.jsx)(Yh,{label:(0,mo.__)("Minimum width"),value:Fe,onChange:Ge,dimensionSizes:d?.dimensionSizes})}),ce&&(0,ft.jsx)(po.__experimentalToolsPanelItem,{hasValue:At,label:(0,mo.__)("Height"),onDeselect:De,isShownByDefault:s.height??da.height,panelId:i,children:(0,ft.jsx)(Yh,{label:(0,mo.__)("Height"),value:fe,onChange:et,dimensionSizes:d?.dimensionSizes})}),ht&&(0,ft.jsx)(po.__experimentalToolsPanelItem,{hasValue:Ce,label:(0,mo.__)("Width"),onDeselect:_e,isShownByDefault:s.width??da.width,panelId:i,children:(0,ft.jsx)(Yh,{label:(0,mo.__)("Width"),value:to,onChange:Ao,dimensionSizes:d?.dimensionSizes})}),ot&&(0,ft.jsx)(LA,{hasValue:oo,value:He,onChange:gt,panelId:i,isShownByDefault:s.aspectRatio??da.aspectRatio})]})}var Xn=c(D(),1),kk=c(L(),1),vk=c(z(),1);var ug=c(z(),1),Tr=c(D(),1),FA=c(L(),1);var Ut=c(C(),1),VA=[];function yze({shadow:e,onShadowChange:t,settings:o}){let r=D8(o);return(0,Ut.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Ut.jsxs)(Tr.__experimentalVStack,{spacing:4,children:[(0,Ut.jsx)(Tr.__experimentalHeading,{level:5,children:(0,ug.__)("Drop shadow")}),(0,Ut.jsx)(vze,{presets:r,activeShadow:e,onSelect:t}),(0,Ut.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Ut.jsx)(Tr.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,ug.__)("Clear")})})]})})}function vze({presets:e,activeShadow:t,onSelect:o}){return e?(0,Ut.jsx)(Tr.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,ug.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,Ut.jsx)(kze,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function kze({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Ut.jsxs)(lt.Root,{children:[(0,Ut.jsx)(lt.Trigger,{render:(0,Ut.jsx)(Tr.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:G("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Ut.jsx)("button",{className:G("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Ut.jsx)(Ue,{icon:Ts})})})}),(0,Ut.jsx)(lt.Popup,{children:t})]})}function Ibe({shadow:e,onShadowChange:t,settings:o}){return(0,Ut.jsx)(Tr.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:Sze(e,t),renderContent:()=>(0,Ut.jsx)(Tr.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Ut.jsx)(yze,{shadow:e,onShadowChange:t,settings:o})})})}function Sze(e,t){return function({onToggle:r,isOpen:n}){let i=(0,FA.useRef)(void 0),s={onClick:r,className:G("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:G("block-editor-global-styles__shadow-editor__remove-button",{"is-open":n}),label:(0,ug.__)("Remove")};return(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)(Tr.Button,{__next40pxDefaultSize:!0,...s,children:(0,Ut.jsxs)(Tr.__experimentalHStack,{justify:"flex-start",children:[(0,Ut.jsx)(Ue,{className:"block-editor-global-styles__toggle-icon",icon:l5,size:24}),(0,Ut.jsx)(Tr.FlexItem,{children:(0,ug.__)("Drop shadow")})]})}),!!e&&(0,Ut.jsx)(Tr.Button,{__next40pxDefaultSize:!0,size:"small",icon:Xr,...a})]})}}function D8(e){return(0,FA.useMemo)(()=>{if(!e?.shadow)return VA;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,ug.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||VA,...r||VA,...n||VA];return s.length&&s.unshift(i),s},[e])}var gl=c(C(),1);function zA(e){return Object.values(f0(e)).some(Boolean)}function f0(e){return{hasBorderColor:Obe(e),hasBorderRadius:Abe(e),hasBorderStyle:Lbe(e),hasBorderWidth:Mbe(e),hasShadow:Nbe(e)}}function Obe(e){return e?.border?.color}function Abe(e){return e?.border?.radius}function Lbe(e){return e?.border?.style}function Mbe(e){return e?.border?.width}function Nbe(e){let t=D8(e);return!!e?.shadow&&t.length>0}function _ze({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Vo();return(0,gl.jsx)(Xn.__experimentalToolsPanel,{label:i,resetAll:()=>{let l=e(o);t(l)},panelId:r,dropdownMenuProps:s,children:n})}var xze={radius:!0,color:!0,width:!0,shadow:!0};function jA({as:e=_ze,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=xze}){let l=vc(n),u=n?.color?.custom,d=(0,kk.useCallback)(O=>Js({settings:n},"",O),[n]),f=O=>{let H=l.flatMap(({colors:Y})=>Y).find(({color:Y})=>Y===O);return H?"var:preset|color|"+H.slug:O},m=(0,kk.useMemo)(()=>{if((0,Xn.__experimentalHasSplitBorders)(r?.border)){let O={...r?.border};return["top","right","bottom","left"].forEach(M=>{O[M]={...O[M],color:d(O[M]?.color)}}),O}return{...r?.border,color:r?.border?.color?d(r?.border?.color):void 0}},[r?.border,d]),h=O=>o({...t,border:O}),p=Obe(n),g=Lbe(n),b=Mbe(n),v=Abe(n),y=(0,kk.useMemo)(()=>typeof r?.border?.radius!="object"?d(r?.border?.radius):{topLeft:d(r?.border?.radius?.topLeft),topRight:d(r?.border?.radius?.topRight),bottomLeft:d(r?.border?.radius?.bottomLeft),bottomRight:d(r?.border?.radius?.bottomRight)},[r?.border?.radius,d]),S=O=>h({...m,radius:O}),k=()=>{let O=t?.border?.radius;return typeof O=="object"?Object.entries(O).some(Boolean):!!O},_=Nbe(n),x=d(r?.shadow),E=n?.shadow?.presets??{},B=E.custom??E.theme??E.default??[],P=O=>{let M=B?.find(({shadow:H})=>H===O)?.slug;o(he(t,["shadow"],M?`var:preset|shadow|${M}`:O||void 0))},T=()=>!!t?.shadow,A=()=>P(void 0),I=()=>{if(k())return h({radius:t?.border?.radius});h(void 0)},R=O=>{let M={...O};(0,Xn.__experimentalHasSplitBorders)(M)?["top","right","bottom","left"].forEach(H=>{M[H]&&(M[H]={...M[H],color:f(M[H]?.color)})}):M&&(M.color=f(M.color)),h({radius:m?.radius,...M})},V=(0,kk.useCallback)(O=>({...O,border:void 0,shadow:void 0}),[]),N=a?.color||a?.width,U=p||g||b||v,j=dg({blockName:s,hasShadowControl:_,hasBorderControl:U});return(0,gl.jsxs)(e,{resetAllFilter:V,value:t,onChange:o,panelId:i,label:j,children:[(b||p)&&(0,gl.jsx)(Xn.__experimentalToolsPanelItem,{hasValue:()=>(0,Xn.__experimentalIsDefinedBorder)(t?.border),label:(0,vk.__)("Border"),onDeselect:()=>I(),isShownByDefault:N,panelId:i,children:(0,gl.jsx)(Xn.BorderBoxControl,{colors:l,disableCustomColors:!u,enableAlpha:!0,enableStyle:g,onChange:R,popoverOffset:40,popoverPlacement:"left-start",value:m,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!_,label:(0,vk.__)("Border")})}),v&&(0,gl.jsx)(Xn.__experimentalToolsPanelItem,{hasValue:k,label:(0,vk.__)("Radius"),onDeselect:()=>S(void 0),isShownByDefault:a.radius,panelId:i,children:(0,gl.jsx)(ZO,{presets:n?.border?.radiusSizes,values:y,onChange:O=>{S(O||void 0)}})}),_&&(0,gl.jsxs)(Xn.__experimentalToolsPanelItem,{label:(0,vk.__)("Shadow"),hasValue:T,onDeselect:A,isShownByDefault:a.shadow,panelId:i,children:[U?(0,gl.jsx)(Xn.BaseControl.VisualLabel,{as:"legend",children:(0,vk.__)("Shadow")}):null,(0,gl.jsx)(Ibe,{shadow:x,onShadowChange:P,settings:n})]})]})}var Gt=c(D(),1),Xu=c(z(),1),Sk=c(L(),1);var Uo=c(C(),1),HA=[];function Dbe(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||HA,i=e?.color?.[t]?.theme||HA,s=e?.color?.[t]?.default||HA;return(0,Sk.useMemo)(()=>[...n,...i,...r?HA:s],[r,n,i,s])}function Vbe(e){return Fbe(e)}function Fbe(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function wze({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Vo(),s=()=>{let a=e(o);t(a)};return(0,Uo.jsx)(Gt.__experimentalToolsPanel,{label:(0,Xu._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var Cze={duotone:!0},Eze={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,Xu.__)("Duotone")},Tze=({indicator:e,label:t})=>(0,Uo.jsxs)(Gt.__experimentalHStack,{justify:"flex-start",children:[(0,Uo.jsx)(Gt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,Uo.jsx)(Gt.Flex,{expanded:!1,children:e==="unset"||!e?(0,Uo.jsx)(Gt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,Uo.jsx)(Gt.DuotoneSwatch,{values:e})})}),(0,Uo.jsx)(Gt.FlexItem,{title:t,children:t})]}),Bze=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,Sk.useRef)(void 0),s={onClick:r,className:G("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,Xu.__)("Reset")};return(0,Uo.jsxs)(Uo.Fragment,{children:[(0,Uo.jsx)(Gt.Button,{__next40pxDefaultSize:!0,...s,children:(0,Uo.jsx)(Tze,{indicator:e,label:(0,Xu.__)("Duotone")})}),e&&(0,Uo.jsx)(Gt.Button,{size:"small",icon:Xr,...a})]})};function UA({as:e=wze,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=Cze}){let a=b=>Js({settings:n},"",b),l=Fbe(n),u=Dbe(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=Dbe(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),m=b=>{let v=u.find(({colors:S})=>S===b),y=v?`var:preset|duotone|${v.slug}`:b;o(he(t,["filter","duotone"],y))},h=()=>!!t?.filter?.duotone,p=()=>m(void 0),g=(0,Sk.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,Uo.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:l&&(0,Uo.jsx)(Gt.__experimentalToolsPanelItem,{label:(0,Xu.__)("Duotone"),hasValue:h,onDeselect:p,isShownByDefault:s.duotone,panelId:i,children:(0,Uo.jsx)(Gt.Dropdown,{popoverProps:Eze,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:Bze(f,p),renderContent:()=>(0,Uo.jsx)(Gt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,Uo.jsxs)(Gt.MenuGroup,{label:(0,Xu.__)("Duotone"),children:[(0,Uo.jsx)("p",{children:(0,Xu.__)("Create a two-tone color effect without losing your original image.")}),(0,Uo.jsx)(Gt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var _k=c(D(),1),m0=c(z(),1);var fg=c(C(),1);function zbe(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function jbe({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=Vo(),i=()=>{e(void 0)},s=l=>{e({enabled:l})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,fg.jsx)(fg.Fragment,{children:(0,fg.jsx)(_k.__experimentalToolsPanel,{label:(0,m0._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,fg.jsx)(_k.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,m0.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,fg.jsx)(_k.ToggleControl,{label:(0,m0.__)("Enlarge on click"),checked:a,onChange:s})})})})}var GA=c(D(),1);var Ube=c(L(),1),WA=c(z(),1);var p0=c(C(),1);function V8(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function Gbe(e){return V8(e)?null:(0,WA.__)("The custom CSS is invalid. Do not use <> markup.")}function Hbe(e){if(!e)return null;let t=Gbe(e);if(t)return t;let[o]=vy([{css:e}],".for-validation-only");return o===null?(0,WA.__)("There is an error with your CSS structure."):null}function $A({value:e,onChange:t,inheritedValue:o=e,help:r}){let n=o?.css,[i,s]=(0,Ube.useState)(()=>Hbe(n));function a(u){t({...e,css:u}),s(Gbe(u))}function l(u){s(Hbe(u?.target?.value))}return(0,p0.jsxs)(Me,{direction:"column",gap:"md",className:"block-editor-global-styles-advanced-panel",children:[i&&(0,p0.jsx)(GA.Notice,{status:"error",onRemove:()=>s(null),children:i}),(0,p0.jsx)(GA.TextareaControl,{label:(0,WA.__)("Additional CSS"),value:n,onChange:u=>a(u),onBlur:l,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1,help:r})]})}var ZA=c(D(),1),Qbe=c(L(),1),Ju=c(z(),1);var Ke=c(D(),1);var ho=c(z(),1),$be=c(Wi(),1),F8=c(ji(),1),Qu=c(L(),1),h0=c(W(),1),Kbe=c(at(),1),Ybe=c(T6(),1);var je=c(C(),1),KA="image",Pze={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},qA=()=>{},YA=e=>{window.requestAnimationFrame(()=>{let[t]=Kbe.focus.tabbable.find(e?.current);t&&t.focus()})};function Rze(e){return e==="cover"||e===void 0?(0,ho.__)("Image covers the space evenly."):e==="contain"?(0,ho.__)("Image is contained without distortion."):(0,ho.__)("Image has a fixed width.")}var Ize=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}%`},Oze=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 qbe({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=qA}){let{isOpen:s,...a}=o;(0,Qu.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let l=()=>(0,je.jsxs)(Ke.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,je.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,je.jsxs)(Ke.FlexBlock,{children:[(0,je.jsx)(Ke.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,je.jsx)(ct,{render:(0,je.jsx)("span",{}),children:t?(0,ho.sprintf)((0,ho.__)("Background image: %s"),r||n):(0,ho.__)("No background image selected")})]})]});return e==="button"?(0,je.jsx)(Ke.Button,{__next40pxDefaultSize:!0,...a,children:l()}):l()}function Aze({label:e,filename:t,url:o,children:r,onToggle:n=qA,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let l=e||(0,F8.getFilename)(o)||(0,ho.__)("Image");return(0,je.jsx)(Ke.Dropdown,{popoverProps:Pze,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,ho.__)("Background size, position and repeat options."),isOpen:d};return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(qbe,{imgUrl:o,filename:t,label:l,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,je.jsx)(Ke.Button,{__next40pxDefaultSize:!0,label:(0,ho.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Xr,onClick:()=>{s(),d&&u(),YA(a)}})]})},renderContent:()=>(0,je.jsx)(Ke.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function Lze(){return(0,je.jsx)(Ke.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,je.jsx)(Ke.Spinner,{})})}function Wbe({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=qA,onResetImage:n=qA,displayInPanel:i,defaultValues:s,containerRef:a}){let[l,u]=(0,Qu.useState)(!1),{getSettings:d}=(0,h0.useSelect)(w),{id:f,title:m,url:h}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:p}=(0,h0.useDispatch)($be.store),g=E=>{p(E,{type:"snackbar"}),u(!1)},b=()=>e(he(t,["background","backgroundImage"],void 0)),v=E=>{if(!E||!E.url){b(),u(!1);return}if((0,Ybe.isBlobURL)(E.url)){u(!0);return}if(E.media_type&&E.media_type!==KA||!E.media_type&&E.type&&E.type!==KA){g((0,ho.__)("Only images can be used as a background image."));return}let B=t?.background?.backgroundSize||s?.backgroundSize,P=t?.background?.backgroundPosition;e(he(t,["background"],{...t?.background,backgroundImage:{url:E.url,id:E.id,source:"file",title:E.title||void 0},backgroundPosition:!P&&(B==="auto"||!B)?"50% 0":P,backgroundSize:B})),u(!1),YA(a)},y=E=>{d().mediaUpload({allowedTypes:[KA],filesList:E,onFileChange([B]){v(B)},onError:g,multiple:!1})},S=Bm(t),k=()=>e(he(t,["background"],{backgroundImage:"none"})),_=!S&&Bm(o),x=m||(0,F8.getFilename)(h)||(0,ho.__)("Image");return(0,je.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[l&&(0,je.jsx)(Lze,{}),(0,je.jsx)(Zv,{mediaId:f,mediaURL:h,allowedTypes:[KA],accept:"image/*",onSelect:v,popoverProps:{className:G({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,je.jsx)(qbe,{imgUrl:h,filename:m,label:x}),renderToggle:E=>(0,je.jsx)(Ke.Button,{...E,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{YA(a),n()},children:_&&(0,je.jsx)(Ke.MenuItem,{onClick:()=>{YA(a),k(),r()},children:(0,ho.__)("Remove")})}),(0,je.jsx)(Ke.DropZone,{onFilesDrop:y,label:(0,ho.__)("Drop to upload")})]})}function Mze({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,l=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 y=i,S=l;v==="contain"&&(y="no-repeat",S=void 0),v==="cover"&&(y=void 0,S=void 0),(d==="cover"||d==="contain")&&v==="auto"&&(y=void 0,t?.background?.backgroundImage?.id&&(S="50% 0")),!v&&d==="auto"&&(v="auto"),e(he(t,["background"],{...t?.background,backgroundPosition:S,backgroundRepeat:y,backgroundSize:v}))},h=v=>{e(he(t,["background","backgroundPosition"],Ize(v)))},p=()=>e(he(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(he(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!l&&a&&n==="contain"?r?.backgroundPosition:l;return(0,je.jsxs)(Ke.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,je.jsx)(Ke.FocalPointPicker,{label:(0,ho.__)("Focal point"),url:s,value:Oze(b),onChange:h}),(0,je.jsx)(Ke.ToggleControl,{label:(0,ho.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,je.jsxs)(Ke.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,ho.__)("Size"),value:d,onChange:m,isBlock:!0,help:Rze(n||r?.backgroundSize),children:[(0,je.jsx)(Ke.__experimentalToggleGroupControlOption,{value:"cover",label:(0,ho._x)("Cover","Size option for background image control")},"cover"),(0,je.jsx)(Ke.__experimentalToggleGroupControlOption,{value:"contain",label:(0,ho._x)("Contain","Size option for background image control")},"contain"),(0,je.jsx)(Ke.__experimentalToggleGroupControlOption,{value:"auto",label:(0,ho._x)("Tile","Size option for background image control")},"tile")]}),(0,je.jsxs)(Ke.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,je.jsx)(Ke.__experimentalUnitControl,{"aria-label":(0,ho.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,ho.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,je.jsx)(Ke.ToggleControl,{label:(0,ho.__)("Repeat"),checked:f,onChange:p,disabled:d==="cover"})]})]})}function Zbe({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,h0.useSelect)(v=>{let{getSettings:y}=v(w),S=y();return{globalStyles:S[ai],_links:S[bC]}},[]),a=(0,Qu.useMemo)(()=>{let v={background:{}};return o?.background?(Object.entries(o?.background).forEach(([y,S])=>{v.background[y]=cv(S,{styles:i,_links:s})}),v):o},[i,s,o]),l=()=>t(he(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=Bm(e)||Bm(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,h=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[p,g]=(0,Qu.useState)(!1),b=(0,Qu.useRef)();return(0,je.jsx)("div",{ref:b,className:G("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":p}),children:h?(0,je.jsx)(Aze,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:l,containerRef:b,children:(0,je.jsxs)(Ke.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,je.jsx)(Wbe,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),l()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,je.jsx)(Mze,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,je.jsx)(Wbe,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),l()},onRemoveImage:()=>g(!1),containerRef:b})})}var kc=c(C(),1),Nze={backgroundImage:!0,backgroundColor:!0,gradient:!0};function Xbe(e,t){return e?.background?.[t]}function XA(e){let t=I8(e),{backgroundImage:o,gradient:r}=e?.background||{};return o||r||t}function Bm(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function z8(e){return typeof e?.background?.gradient=="string"&&e?.background?.gradient!==""}function Dze(e){return!!e?.color?.background}function Vze(e){return!!e?.color?.gradient}function j8({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=Vo();return(0,kc.jsx)(ZA.__experimentalToolsPanel,{label:i,resetAll:()=>{let l=e(o);t(l)},panelId:r,hasInnerWrapper:!0,className:"background-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,kc.jsx)("div",{className:"background-block-support-panel__inner-wrapper",children:n})})}function QA({as:e=j8,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=Nze,defaultValues:a={},headerLabel:l=(0,Ju.__)("Background"),contrastWarning:u}){let{colors:d,gradients:f,allColors:m,areCustomSolidsEnabled:h,areCustomGradientsEnabled:p,hasSolidColors:g,hasGradientColors:b,decodeValue:v,encodeGradientValue:y}=pk(n),S=Xbe(n,"gradient"),k=I8(n),_=k&&g,x=b&&S,E=k&&b&&!S,B=Xbe(n,"backgroundImage"),P=(0,Qbe.useCallback)(K=>{let Z=_,q=S||E;return!Z&&!q?{...K,background:{}}:{...K,background:{},color:{...K?.color,...Z&&{background:void 0},...q&&{gradient:void 0}}}},[S,_,E]);if(!B&&!_&&!x&&!E)return null;let T=()=>o(he(t,["background","backgroundImage"],void 0)),A=()=>{let K=he(t,["background","gradient"],void 0);K=he(K,["color","gradient"],void 0),o(K)},I=v(r?.color?.background),R=v(t?.color?.background),V=(K,Z)=>{let q=he(t,["color","background"],Zu(m,K,Z));E&&(q.color.gradient=void 0),o(q)},N=()=>{let K=he(t,["color","background"],void 0);E&&(K.color.gradient=void 0),o(K)},U=v(r?.color?.gradient),j=v(t?.color?.gradient),O=K=>{let Z=he(t,["color","gradient"],y(K));Z.color.background=void 0,o(Z)},M=()=>o(he(t,["color","gradient"],void 0)),H=v(t?.background?.gradient??t?.color?.gradient),Y=v(r?.background?.gradient??r?.color?.gradient),oe=K=>{let Z=he(t,["background","gradient"],y(K));Z=he(Z,["color","gradient"],void 0),o(Z)};return(0,kc.jsxs)(e,{resetAllFilter:P,value:t,onChange:o,panelId:i,headerLabel:l,children:[B&&(0,kc.jsx)(ZA.__experimentalToolsPanelItem,{className:"block-editor-color-gradient-item",hasValue:()=>Bm(t),label:(0,Ju.__)("Image"),onDeselect:T,isShownByDefault:s.backgroundImage,panelId:i,children:(0,kc.jsx)(Zbe,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})}),_&&(0,kc.jsx)(Tm,{label:(0,Ju.__)("Color"),hasValue:()=>Dze(t),resetValue:N,isShownByDefault:s.backgroundColor,indicators:[R??I],contrastWarning:u,tabs:[{key:"background",label:(0,Ju.__)("Color"),inheritedValue:R??I,inheritedSlug:Zn(t?.color?.background,"color")??Zn(r?.color?.background,"color"),setValue:V,userValue:R}],colorGradientControlSettings:{colors:d,disableCustomColors:!h},panelId:i}),x&&(0,kc.jsx)(Tm,{label:(0,Ju.__)("Gradient"),hasValue:()=>z8(t),resetValue:A,isShownByDefault:s.gradient,indicators:[H],tabs:[{key:"gradient",label:(0,Ju.__)("Gradient"),inheritedValue:H??Y,setValue:oe,userValue:H,isGradient:!0}],colorGradientControlSettings:{gradients:f,disableCustomGradients:!p},panelId:i}),E&&(0,kc.jsx)(Tm,{label:(0,Ju.__)("Gradient"),hasValue:()=>Vze(t),resetValue:M,isShownByDefault:s.gradient,indicators:[j??U],tabs:[{key:"gradient",label:(0,Ju.__)("Gradient"),inheritedValue:j??U,setValue:O,userValue:j,isGradient:!0}],colorGradientControlSettings:{gradients:f,disableCustomGradients:!p},panelId:i})]})}var Sc=c(z(),1);var Pm=c(D(),1);var bl=c(C(),1);function JA({viewportStates:e=[],pseudoStates:t=[],viewportValue:o="default",pseudoStateValue:r="default",onChangeViewport:n,onChangePseudoState:i,showText:s=!0,popoverProps:a={}}){if(!e.length&&!t.length)return null;let l=[{label:(0,Sc.__)("Default"),value:"default"},...e.map(v=>({label:v.label,value:v.value}))],u=[{label:(0,Sc.__)("Default"),value:"default"},...t.map(v=>({label:v.label,value:v.value}))],d=e.length>0,f=t.length>0,m=(0,Sc.__)("States"),h=[];if(d&&o!=="default"){let v=l.find(y=>y.value===o);v&&h.push({key:`viewport-${v.value}`,label:v.label})}if(f&&r!=="default"){let v=u.find(y=>y.value===r);v&&h.push({key:`pseudo-${v.value}`,label:v.label})}let p=h.length?h.map(v=>v.label).join(", "):(0,Sc.__)("Default"),g=s?Zr:Ui,b=s?{size:"compact",variant:"tertiary",iconPosition:"right"}:{size:"compact",variant:"tertiary"};return(0,bl.jsx)(Me,{direction:"column",gap:"sm",align:"flex-end",className:"block-editor-global-styles-state-control",children:(0,bl.jsx)(Pm.DropdownMenu,{icon:g,label:s?m:(0,Sc.sprintf)((0,Sc.__)("State: %s"),p),popoverProps:{placement:"right-start",...a},text:s?m:void 0,toggleProps:b,children:({onClose:v})=>(0,bl.jsxs)(bl.Fragment,{children:[d&&(0,bl.jsx)(Pm.MenuGroup,{label:(0,Sc.__)("Viewport"),children:l.map(y=>(0,bl.jsx)(Pm.MenuItem,{onClick:()=>{n?.(y.value),f||v()},icon:o===y.value?Ts:null,children:y.label},`viewport-${y.value}`))}),f&&(0,bl.jsx)(Pm.MenuGroup,{label:(0,Sc.__)("Pseudo state"),children:u.map(y=>(0,bl.jsx)(Pm.MenuItem,{onClick:()=>{i?.(y.value),d||v()},icon:r===y.value?Ts:null,children:y.label},`pseudo-${y.value}`))})]})})})}var Jbe=c(D(),1);var H8=c(C(),1),{Badge:Fze}=F(Jbe.privateApis);function eL({viewportStates:e=[],pseudoStates:t=[],viewportValue:o="default",pseudoStateValue:r="default",className:n="block-editor-global-styles-state-control__badges"}){let i=[],s=e.find(l=>l.value===o),a=t.find(l=>l.value===r);return s&&i.push({key:`viewport-${s.value}`,label:s.label}),a&&i.push({key:`pseudo-${a.value}`,label:a.label}),(0,H8.jsx)(Me,{className:n,direction:"row",justify:"flex-start",gap:"xs",wrap:"wrap",children:i.map(l=>(0,H8.jsx)(Fze,{intent:"info",children:l.label},l.key))})}var W8=c(C(),1),pg="__experimentalBorder",b0="shadow",eye=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},mg=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=eye(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=eye(e,"color",o);return r||{color:o}};function tL(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function rye(e){if((0,G8.__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:ge(r),borderColor:o}}function nye(e){return(0,G8.__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 zze({label:e,children:t,resetAllFilter:o}){let r=(0,rL.useCallback)(n=>{let i=nye(n),s=o(i);return{...n,...rye(s)}},[o]);return(0,W8.jsx)(me,{group:"border",resetAllFilter:r,label:e,children:t})}function iye({clientId:e,name:t,setAttributes:o,settings:r}){let n=qs(),i=zA(r),{style:s,borderColor:a}=(0,oye.useSelect)(m=>{if(!i)return{};let{style:h,borderColor:p}=m(w).getBlockAttributes(e)||{};return{style:h,borderColor:p}},[e,i]),l=!Fr(n),u=(0,rL.useMemo)(()=>l?Bo(s,n):nye({style:s,borderColor:a}),[l,n,s,a]),d=l?m=>{o({style:xn(s,n,m)})}:m=>{o(rye(m))};if(!i)return null;let f={...(0,g0.getBlockSupport)(t,[pg,"__experimentalDefaultControls"]),...(0,g0.getBlockSupport)(t,[b0,"__experimentalDefaultControls"])};return(0,W8.jsx)(jA,{as:zze,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}function nL(e,t="any"){let o=(0,g0.getBlockSupport)(e,pg);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function dg({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=fa(e),n=f0(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,oL.__)("Border & Shadow"):o?(0,oL.__)("Shadow"):(0,oL.__)("Border")}function jze(e){return!nL(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function sye(e,t,o){if(!nL(t,"color")||bt(t,pg,"color"))return e;let r=$8(o),n=G(e.className,r);return e.className=n||void 0,e}function $8(e){let{borderColor:t,style:o}=e,r=Cs("border-color",t);return G({"has-border-color":t||o?.border?.color,[r]:!!r})}function Hze({name:e,borderColor:t,style:o}){let{colors:r}=mm();if(!nL(e,"color")||bt(e,pg,"color"))return{};let{color:n}=mg({colors:r,namedColor:t}),{color:i}=mg({colors:r,namedColor:tL(o?.border?.top?.color)}),{color:s}=mg({colors:r,namedColor:tL(o?.border?.right?.color)}),{color:a}=mg({colors:r,namedColor:tL(o?.border?.bottom?.color)}),{color:l}=mg({colors:r,namedColor:tL(o?.border?.left?.color)});return sye({style:ge({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:l||n})||{}},e,{borderColor:t,style:o})}var K8={useBlockProps:Hze,addSaveProps:sye,attributeKeys:["borderColor","style"],hasSupport(e){return nL(e,"color")}};(0,tye.addFilter)("blocks.registerBlockType","core/border/addAttributes",jze);var J8=c(ee(),1),uL=c(L(),1),bye=c(W(),1),yye=c(z(),1);var Z8=c(zt(),1),Ck=c(ee(),1),hye=c(L(),1);var wk=c(ee(),1),dye=c(W(),1),fye=c(z(),1);var hg=c(L(),1),lye=c(W(),1),cye=c(ee(),1);var uye=c(_r(),1);function iL(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function aye(e,t){if(!e||!t)return{};let o=is(t,"color.text",{fallback:!0}),r=is(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=iL(n,"color"),l=s&&s.textContent?iL(s,"color"):void 0,u=i,d=iL(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=iL(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:l}}function Uze(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function xk({clientId:e,name:t,enabled:o=!0,checkTextColor:r=!0,checkLinkColor:n=!0,messageOverride:i}){let s=dt(e),[a,l]=(0,hg.useReducer)(Uze,{}),u=(0,lye.useSelect)(m=>t&&o?m(cye.store).getBlockType(t):void 0,[t,o]);(0,hg.useLayoutEffect)(()=>{!o||!s||!u||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>l(aye(s,u))))}),(0,hg.useLayoutEffect)(()=>{if(!o||!s||!u)return;let m=new window.MutationObserver(()=>{l(aye(s,u))});return m.observe(s,{attributes:!0,attributeFilter:["class","style"],subtree:!0}),()=>{m.disconnect()}},[o,s,u]);let d=o?pH({backgroundColor:a.backgroundColor,textColor:r?a.textColor:void 0,linkColor:n?a.linkColor:void 0,messageOverride:i,enableAlphaChecker:!0}):null,f=d?.speakMessage;return(0,hg.useEffect)(()=>{f&&(0,uye.speak)(f)},[f]),d?.message}var q8=c(C(),1),gg="background",Y8={backgroundSize:"cover",backgroundPosition:"50% 50%"};function y0(e,t="any"){let o=(0,wk.getBlockSupport)(e,gg);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat||!!o?.gradient:!!o?.[t]}function sL(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:Y8.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:Y8.backgroundPosition}),t}function Gze({name:e,style:t}){if(!y0(e)||!t?.background?.backgroundImage)return;let o=sL(t?.background);if(o)return{style:{...o}}}function mye(e){return Bm(e)||z8(e)?"has-background":""}function Wze(e){let t=e.className?.includes("has-background")?e.className.split(" ").filter(o=>o!=="has-background").join(" ")||void 0:e.className;return{...e,className:t,backgroundColor:void 0,gradient:void 0,style:ge({...e.style,background:void 0,color:{...e.style?.color,background:void 0,gradient:void 0}})}}function $ze({children:e}){return(0,q8.jsx)(me,{group:"background",resetAllFilter:Wze,children:e})}function aL({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n}){let i=qs(),{style:s,className:a,backgroundColor:l,gradient:u,inheritedValue:d}=(0,dye.useSelect)(P=>{let{getBlockAttributes:T,getSettings:A}=P(w),I=A(),R=T(e);return{style:R?.style,className:R?.className,backgroundColor:R?.backgroundColor,gradient:R?.gradient,inheritedValue:I[ai]?.blocks?.[t]}},[e,t]),f=y0(t,"gradient"),m=(0,wk.getBlockSupport)(t,"color"),h=m&&m.background!==!1,p=!!m?.gradients,g=!Fr(i),b={...s,color:{...s?.color,background:l?"var:preset|color|"+l:s?.color?.background,gradient:!f&&u?"var:preset|gradient|"+u:s?.color?.gradient},...f&&{background:{...s?.background,gradient:u?"var:preset|gradient|"+u:s?.background?.gradient??s?.color?.gradient}}},v=!g&&!b?.color?.gradient&&!b?.background?.gradient&&!!b?.color?.background&&(r?.color?.text||r?.color?.link)&&(0,wk.getBlockSupport)(t,["color","enableContrastChecker"])!==!1,y=xk({clientId:e,name:t,enabled:!!v,messageOverride:(0,fye.__)("This color combination has poor contrast. Consider increasing contrast between background and foreground.")});if(!XA(r)||!y0(t)&&!h&&!p)return null;let S=P=>{if(g){o({style:xn(s,i,P)});return}let T=P?.color?.background,A=Zn(T,"color"),I=f?P?.background?.gradient:P?.color?.gradient,R=Zn(I,"gradient"),V=R?void 0:P?.color?.gradient,N={...P,color:{...P?.color,background:A?void 0:T,gradient:f?void 0:V}};f&&(N.background={...N.background,gradient:P?.background?.gradient});let U=f&&!!s?.color?.gradient,j={style:ge(N),backgroundColor:A,gradient:f?void 0:R},O=!!R||!!I;U&&O?j.className=G(a,"has-background"):!O&&a?.includes("has-background")&&(j.className=a.split(" ").filter(M=>M!=="has-background").join(" ")||void 0),o(j)},k={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&y0(t,"backgroundSize")}},_=(0,wk.getBlockSupport)(t,[gg,"__experimentalDefaultControls"]),x=(0,wk.getBlockSupport)(t,["color","__experimentalDefaultControls"]),E={..._,backgroundColor:x?.background,gradient:_?.gradient??x?.background};return(0,q8.jsx)(QA,{inheritedValue:d,as:n||$ze,panelId:e,defaultValues:Y8,settings:k,onChange:S,defaultControls:E,value:g?Bo(s,i):b,contrastWarning:y})}var pye={useBlockProps:Gze,attributeKeys:["style"],hasSupport:y0};var Wr="color",lL=e=>{let t=(0,Ck.getBlockSupport)(e,Wr);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},Kze=e=>{let t=(0,Ck.getBlockSupport)(e,Wr);return t!==null&&typeof t=="object"&&!!t.link},X8=e=>{let t=(0,Ck.getBlockSupport)(e,Wr);return t!==null&&typeof t=="object"&&!!t.gradients},Yze=e=>{let t=(0,Ck.getBlockSupport)(e,Wr);return t&&t.background!==!1},qze=e=>{let t=(0,Ck.getBlockSupport)(e,Wr);return t&&t.text!==!1};function Zze(e){return lL(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),X8(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function gye(e,t,o){if(!lL(t)||bt(t,Wr))return e;let r=X8(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,l=g=>!bt(t,Wr,g),u=l("text")?Cs("color",i):void 0,d=l("gradients")?sb(s):void 0,f=l("background")?Cs("background-color",n):void 0,m=l("background")||l("gradients"),h=n||a?.color?.background||r&&(s||a?.color?.gradient),p=G(e.className,u,d,{[f]:(!r||!a?.color?.gradient)&&!!f,"has-text-color":l("text")&&(i||a?.color?.text),"has-background":m&&h,"has-link-color":l("link")&&a?.elements?.link?.color});return e.className=p||void 0,e}function Xze({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=ke("color.palette.custom","color.palette.theme","color.palette.default"),l=(0,hye.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!lL(e)||bt(e,Wr))return{};let u={};o&&!bt(e,Wr,"text")&&(u.color=Pl(l,o)?.color),t&&!bt(e,Wr,"background")&&(u.backgroundColor=Pl(l,t)?.color);let d=gye({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:G(d.className,!f&&mye(n))}}var Q8={useBlockProps:Xze,addSaveProps:gye,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:lL},Qze={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Jze(e,t,o,r){let n=e.name,i={linkColor:Kze(n),textColor:qze(n),backgroundColor:Yze(n),gradient:X8(n)};return cL(i,Qze,e,t,o,r)}(0,Z8.addFilter)("blocks.registerBlockType","core/color/addAttribute",Zze);(0,Z8.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",Jze);var eU=c(C(),1);function e6e({children:e,resetAllFilter:t}){let o=(0,uL.useCallback)(r=>{let n=t(r.style);return{...r,style:ge(n)}},[t]);return(0,eU.jsx)(me,{group:"elements",resetAllFilter:o,children:e})}function dL({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=qs(),l=BA(r),u=(0,bye.useSelect)(b=>l?b(w).getBlockAttributes(e)?.style:void 0,[e,l]),d=!Fr(a),f=(0,uL.useMemo)(()=>d?Bo(u,a):u,[d,a,u]),m=d?b=>{o({style:xn(u,a,b)})}:b=>{o({style:ge(b)})},h=!d&&!!f?.elements?.link?.color?.text&&r?.color?.link&&(0,J8.getBlockSupport)(t,[Wr,"enableContrastChecker"])!==!1,p=xk({clientId:e,name:t,enabled:!!h,checkTextColor:!1,messageOverride:(0,yye.__)("This link color has poor contrast against the background. Consider increasing contrast.")});return l?(s=s||(0,J8.getBlockSupport)(t,[Wr,"__experimentalDefaultControls"]),(0,eU.jsx)(PA,{as:n||e6e,panelId:e,settings:r,value:f,onChange:m,defaultControls:s,label:i,contrastWarning:p})):null}var S0=c(ee(),1),yL=c(L(),1),Nye=c(W(),1),Dye=c(z(),1);var t6e=c(ee(),1);var o6e=c(C(),1),vye="typography.lineHeight";var kye=c(zt(),1),fL=c(ee(),1),Sye=c(KI(),1),_ye=c(D(),1);var v0="typography.__experimentalFontFamily",{kebabCase:r6e}=F(_ye.privateApis);function n6e(e){return(0,fL.hasBlockSupport)(e,v0)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function xye(e,t,o){if(!(0,fL.hasBlockSupport)(t,v0)||bt(t,ma,"fontFamily")||!o?.fontFamily)return e;let r=new Sye.default(e.className);r.add(`has-${r6e(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function i6e({name:e,fontFamily:t}){return xye({},e,{fontFamily:t})}var tU={useBlockProps:i6e,addSaveProps:xye,attributeKeys:["fontFamily"],hasSupport(e){return(0,fL.hasBlockSupport)(e,v0)}};(0,kye.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",n6e);var oU=c(zt(),1),Ek=c(ee(),1),wye=c(KI(),1);var s6e=c(C(),1),bg="typography.fontSize";function a6e(e){return(0,Ek.hasBlockSupport)(e,bg)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function Cye(e,t,o){if(!(0,Ek.hasBlockSupport)(t,bg)||bt(t,ma,"fontSize"))return e;let r=new wye.default(e.className);r.add(Ud(o.fontSize));let n=r.value;return e.className=n||void 0,e}function l6e({name:e,fontSize:t,style:o}){let[r,n,i]=ke("typography.fontSizes","typography.fluid","layout");if(!(0,Ek.hasBlockSupport)(e,bg)||bt(e,ma,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:Tu({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:ab(r,t,o?.typography?.fontSize).size}}),!!s)return Cye(s,e,{fontSize:t})}var rU={useBlockProps:l6e,addSaveProps:Cye,attributeKeys:["fontSize","style"],hasSupport(e){return(0,Ek.hasBlockSupport)(e,bg)}},c6e={fontSize:[["fontSize"],["style","typography","fontSize"]]};function u6e(e,t,o,r){let n=e.name,i={fontSize:(0,Ek.hasBlockSupport)(n,bg)};return cL(i,c6e,e,t,o,r)}(0,oU.addFilter)("blocks.registerBlockType","core/font/addAttribute",a6e);(0,oU.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",u6e);var pL=c(z(),1),Tk=c(ee(),1);var mL=c(W(),1),Eye=c(L(),1);function Go(e){let t=Ze(),{clientId:o=""}=t,r=(0,mL.useRegistry)(),n=(0,mL.useSelect)(i=>o?null:i(w).getBlockEditingMode(),[o]);return(0,Eye.useEffect)(()=>{if(!e)return;let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:a}=r.dispatch(w);return a(),i(o,e),()=>{a(),s(o)}},[r,o,e]),o?t[iC]:n}var nU=c(C(),1),Bk="typography.textAlign",d6e=[{icon:Bd,title:(0,pL.__)("Align text left"),align:"left"},{icon:gp,title:(0,pL.__)("Align text center"),align:"center"},{icon:Pd,title:(0,pL.__)("Align text right"),align:"right"}],Tye=["left","center","right"],f6e=[];function iU(e){return Array.isArray(e)?Tye.filter(t=>e.includes(t)):e===!0?Tye:f6e}function m6e({style:e,name:t,setAttributes:o}){let n=fa(t)?.typography?.textAlign,i=Go();if(!n||i!=="default")return null;let s=iU((0,Tk.getBlockSupport)(t,Bk));if(!s.length)return null;let a=d6e.filter(u=>s.includes(u.align)),l=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:ge(d)})};return(0,nU.jsx)(yo,{group:"block",children:(0,nU.jsx)(GE,{value:e?.typography?.textAlign,onChange:l,alignmentControls:a})})}var hL={edit:m6e,useBlockProps:p6e,addSaveProps:h6e,attributeKeys:["style"],hasSupport(e){return(0,Tk.hasBlockSupport)(e,Bk,!1)}};function p6e({name:e,style:t}){if(!t?.typography?.textAlign||!iU((0,Tk.getBlockSupport)(e,Bk)).length||bt(e,ma,"textAlign"))return null;let r=t.typography.textAlign;return{className:G({[`has-text-align-${r}`]:r})}}function h6e(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Tk.getBlockSupport)(t,Bk);return iU(n).includes(r)&&!bt(t,ma,"textAlign")&&(e.className=G(`has-text-align-${r}`,e.className)),e}var aU=c(zt(),1),Rm=c(ee(),1),yg=c(L(),1),lU=c(W(),1),k0=c(z(),1),gL=c(D(),1),Lye=c(te(),1);function g6e(e,t){let o=e.scrollHeight>e.clientHeight,r=0,n=2400,i=r,s=window.getComputedStyle(e),a=parseFloat(s.paddingLeft)||0,l=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,l+=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-l,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 Bye(e,t){if(!e)return;t(0);let o=g6e(e,t);return t(o),o}var Pye=c(L(),1),Rye=c(z(),1),Iye=c(D(),1),Oye=c(_r(),1),sU=c(C(),1);function Aye(){let e=(0,Rye.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,Pye.useEffect)(()=>{(0,Oye.speak)(e)},[e]),(0,sU.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,sU.jsx)(Iye.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var Ri=c(C(),1),b6e={},y6e=12,ed="typography.fitText";function v6e(e){return!(0,Rm.hasBlockSupport)(e,ed)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function k6e({fitText:e,name:t,clientId:o}){let[r,n]=(0,yg.useState)(null),i=(0,Rm.hasBlockSupport)(t,ed),s=dt(o),{blockAttributes:a,parentId:l,blockMode:u}=(0,lU.useSelect)(f=>{if(!o||!i||!e)return b6e;let m=f(w).getBlockMode(o);return m==="html"?{blockMode:m}:{blockAttributes:f(w).getBlockAttributes(o),parentId:f(w).getBlockRootClientId(o),blockMode:m}},[o,i,e]),d=(0,yg.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=Bye(s,b=>{b===0?m.textContent="":m.textContent=`${h} { font-size: ${b}px !important; }`});n(g)},[s,o,i,e]);return(0,yg.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}`,y=f.ownerDocument.getElementById(v);y&&y.remove()}},[e,o,l,d,s,i,u]),(0,yg.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 S6e({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i}){let s=(0,lU.useSelect)(a=>{let{hasSelectedStyleState:l}=F(a(w));return l(e)},[e]);return!(0,Rm.hasBlockSupport)(r,ed)||s?null:(0,Ri.jsx)(gL.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,k0.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:(0,Ri.jsx)(gL.ToggleControl,{label:(0,k0.__)("Fit text"),checked:t,onChange:()=>{let a=!t||void 0,l={fitText:a};a&&(n&&(l.fontSize=void 0),i?.typography?.fontSize&&(l.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(l)},help:t?(0,k0.__)("Text will resize to fit its container."):(0,k0.__)("The text will resize to fit its container, resetting other font size settings.")})})}function _6e(e,t,o){if(!(0,Rm.hasBlockSupport)(t,ed))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 x6e({name:e,fitText:t}){return t&&(0,Rm.hasBlockSupport)(e,ed)?{className:"has-fit-text"}:{}}(0,aU.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",v6e);var w6e=e=>(0,Rm.hasBlockSupport)(e,ed);function C6e({fitText:e,name:t,clientId:o,isSelected:r}){let{fontSize:n}=k6e({fitText:e,name:t,clientId:o});return r&&n&&n<y6e?(0,Ri.jsx)(me,{group:"typography",children:(0,Ri.jsx)(Aye,{})}):null}var E6e=(0,Lye.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:l}=n;return(0,Rm.hasBlockSupport)(r,ed)?(0,Ri.jsxs)(Ri.Fragment,{children:[(0,Ri.jsx)(e,{...o}),(0,Ri.jsx)(me,{group:"typography",children:(0,Ri.jsx)(S6e,{clientId:i,fitText:l,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})}),l&&(0,Ri.jsx)(C6e,{fitText:l,name:r,clientId:i,isSelected:s})]}):(0,Ri.jsx)(e,{...o})},"addFitTextControl");(0,aU.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",E6e);var bL={useBlockProps:x6e,addSaveProps:_6e,attributeKeys:["fitText","fontSize","style"],hasSupport:w6e,edit:()=>null};var cU=c(C(),1);function Mye(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var T6e="typography.__experimentalLetterSpacing",B6e="typography.__experimentalTextTransform",P6e="typography.__experimentalTextDecoration",R6e="typography.textIndent",I6e="typography.textColumns",O6e="typography.__experimentalFontStyle",A6e="typography.__experimentalFontWeight",L6e="typography.__experimentalWritingMode",ma="typography",Vye=[vye,bg,O6e,A6e,v0,Bk,I6e,P6e,R6e,L6e,B6e,T6e,ed];function Fye(e){let t={...Mye(e,["fontFamily"])},o=e?.typography?.fontSize,r=e?.typography?.fontFamily,n=e?.color?.text,i=typeof o=="string"&&o?.startsWith("var:preset|font-size|")?o.substring(21):void 0,s=r?.startsWith("var:preset|font-family|")?r.substring(23):void 0,a=Zn(n,"color");return t.typography={...Mye(t.typography,["fontFamily"]),fontSize:i?void 0:o},t.color={...t.color,text:a?void 0:n},{style:ge(t),fontFamily:s,fontSize:i,textColor:a}}function zye(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},color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text}}}function M6e({children:e,resetAllFilter:t}){let o=(0,yL.useCallback)(r=>{let n=zye(r),i=t(n);return{...r,...Fye(i)}},[t]);return(0,cU.jsx)(me,{group:"typography",resetAllFilter:o,children:e})}function vL({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n}){let i=qs(),s=RA(r),{style:a,fontFamily:l,fontSize:u,fitText:d,textColor:f}=(0,Nye.useSelect)(_=>{if(!s)return{};let{style:x,fontFamily:E,fontSize:B,fitText:P,textColor:T}=_(w).getBlockAttributes(e)||{};return{style:x,fontFamily:E,fontSize:B,fitText:P,textColor:T}},[e,s]),m=!Fr(i),h=(0,yL.useMemo)(()=>m?Bo(a,i):zye({style:a,fontFamily:l,fontSize:u,textColor:f}),[m,i,a,u,l,f]),p=m?_=>{o({style:xn(a,i,_)})}:_=>{let x=Fye(_);(x.fontSize||x.style?.typography?.fontSize)&&d&&(x.fitText=void 0),o(x)},g=!m&&!h?.color?.gradient&&!!h?.color?.text&&r?.color?.text&&(0,S0.getBlockSupport)(t,["color","enableContrastChecker"])!==!1,b=xk({clientId:e,name:t,enabled:!!g,checkLinkColor:!1,messageOverride:(0,Dye.__)("This color has poor contrast against the background. Consider increasing contrast.")});if(!s)return null;let v=(0,S0.getBlockSupport)(t,[ma,"__experimentalDefaultControls"]),y=(0,S0.getBlockSupport)(t,["color","__experimentalDefaultControls"]),S={...v,textColor:y?.text};return(0,cU.jsx)(IA,{as:n||M6e,panelId:e,settings:r,value:h,onChange:p,defaultControls:S,contrastWarning:b})}var _o=c(C(),1);function N6e({blockName:e,clientId:t,contentClientIds:o}){let r=fa(e),{updateBlockAttributes:n}=(0,kL.useDispatch)(w),{hasButtons:i,hasHeading:s}=(0,kL.useSelect)(d=>{let f=d(w).getBlockNamesByClientId(o);return{hasButtons:f.includes("core/buttons"),hasHeading:f.includes("core/heading")}},[o]),a=d=>{n(t,d)},l=(0,uU.useMemo)(()=>({...r,typography:{}}),[r]),u=(0,uU.useMemo)(()=>({...r,background:{...r.background,backgroundImage:!1,backgroundSize:!1}}),[r]);return(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(vL,{clientId:t,name:e,settings:l,setAttributes:a,asWrapper:A8}),(0,_o.jsx)(aL,{clientId:t,name:e,settings:u,setAttributes:a,asWrapper:j8}),(0,_o.jsx)(dL,{clientId:t,name:e,settings:r,setAttributes:a,asWrapper:O8,label:(0,Im.__)("Elements"),defaultControls:{button:i,heading:s}})]})}var D6e=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=dg({blockName:e});return(0,_o.jsxs)(_o.Fragment,{children:[o&&(0,_o.jsx)(Rv,{clientId:t}),r&&e!=="core/template-part"&&(0,_o.jsx)(N6e,{blockName:e,clientId:t,contentClientIds:n}),(!r||e==="core/template-part")&&(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(me.Slot,{group:"typography",label:(0,Im.__)("Typography")}),(0,_o.jsx)(me.Slot,{group:"color",label:(0,Im.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,_o.jsx)(me.Slot,{group:"background",label:(0,Im.__)("Background"),className:"background-block-support-panel__inner-wrapper"}),(0,_o.jsx)(me.Slot,{group:"filter"}),(0,_o.jsx)(me.Slot,{group:"layout",label:(0,Im.__)("Layout")}),(0,_o.jsx)(me.Slot,{group:"dimensions",label:(0,Im.__)("Dimensions")}),(0,_o.jsx)(me.Slot,{group:"border",label:i}),(0,_o.jsx)(me.Slot,{group:"elements",label:(0,Im.__)("Elements"),className:"elements-block-support-panel__inner-wrapper"}),(0,_o.jsx)(_A,{}),(0,_o.jsx)(me.Slot,{group:"styles"})]})]})},jye=D6e;var Uye=c(D(),1),Gye=c(z(),1);var Hye=c(ee(),1),SL=c(W(),1),hs=c(D(),1);var pa=c(C(),1);function _L({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,pa.jsx)(hs.__experimentalVStack,{spacing:1,children:e.map(n=>(0,pa.jsx)(V6e,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function V6e({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=lo(e),{isSelected:i,childBlocks:s,shouldRenderListView:a,blockName:l}=(0,SL.useSelect)(g=>{let{isBlockSelected:b,hasSelectedInnerBlock:v,getBlockOrder:y,getBlockName:S,shouldRenderBlockListView:k}=F(g(w)),_=S(e);return{isSelected:b(e)||v(e,!0),childBlocks:y(e),shouldRenderListView:k(e),blockName:_}},[e]),u=(0,Hye.getBlockType)(l),f=tn({clientId:e,context:"list-view"})||u?.title||l,{selectBlock:m}=(0,SL.useDispatch)(w),p=s&&s.length>0&&r&&a;return(0,pa.jsx)(hs.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:i,onClick:async()=>{await m(e),p&&o&&o(e),t&&t(e)},children:(0,pa.jsxs)(hs.Flex,{children:[(0,pa.jsx)(hs.FlexItem,{children:(0,pa.jsx)(rt,{icon:n?.icon})}),(0,pa.jsx)(hs.FlexBlock,{style:{textAlign:"left"},children:(0,pa.jsx)(hs.__experimentalTruncate,{children:f})}),p&&(0,pa.jsx)(hs.FlexItem,{children:(0,pa.jsx)(Ue,{icon:Sr,size:24})})]})})}var Pk=c(C(),1),F6e=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,Pk.jsx)(Pk.Fragment,{children:!r&&(0,Pk.jsx)(Uye.PanelBody,{title:(0,Gye.__)("Content"),children:(0,Pk.jsx)(_L,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},xL=F6e;var ar=c(C(),1),{Tabs:Om}=F(wL.privateApis);function dU({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,yl.useRef)(null),a=(0,Rk.useSelect)(k=>k(Wye.store).get("core","showIconLabels"),[]),{requestedTab:l}=(0,Rk.useSelect)(k=>({requestedTab:F(k(w)).getRequestedInspectorTab()})),[u,d]=(0,yl.useState)(()=>l?.tabName??r[0]?.name),f=(0,yl.useRef)(!1),m=(0,yl.useRef)(!1),{__unstableSetOpenListViewPanel:h,__unstableIncrementListViewExpandRevision:p,__unstableSetAllListViewPanelsOpen:g}=(0,Rk.useDispatch)(w),{clearRequestedInspectorTab:b}=F((0,Rk.useDispatch)(w));(0,yl.useEffect)(()=>{f.current=!1},[t]),(0,yl.useEffect)(()=>{l&&(d(l.tabName),l.tabName===Yu.name&&l.options?.openPanel&&(h(l.options.openPanel),p()),m.current=!0,f.current=!0,b())},[l,h,p,b]),(0,yl.useEffect)(()=>{u===Yu.name&&!f.current&&(g(),p())},[t,u,g,p]),(0,yl.useEffect)(()=>{if(!r?.length||f.current&&r.some(_=>_.name===u))return;let k=r[0]?.name;u!==k&&d(k)},[r,u]);let v=k=>{d(k),f.current=!0,k===Yu.name&&!m.current&&(g(),p()),m.current=!1},y=r.some(k=>k.name===Yu.name),S=k=>{y&&(h(k),p(),m.current=!0,v(Yu.name))};return(0,ar.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,ar.jsxs)(Om,{selectedTabId:u,onSelect:v,children:[(0,ar.jsx)(Om.TabList,{children:r.map(k=>a?(0,ar.jsx)(Om.Tab,{tabId:k.name,children:k.title},k.name):(0,ar.jsxs)(lt.Root,{children:[(0,ar.jsx)(Om.Tab,{tabId:k.name,"aria-label":k.title,render:(0,ar.jsx)(lt.Trigger,{}),children:(0,ar.jsx)(wL.Icon,{icon:k.icon})}),(0,ar.jsx)(lt.Popup,{children:k.title})]},k.name))}),(0,ar.jsxs)(Om.TabPanel,{tabId:vA.name,focusable:!1,children:[(0,ar.jsx)(xL,{contentClientIds:i,onSwitchToListView:S,hasListViewTab:y}),(0,ar.jsx)(me.Slot,{group:"content"})]}),(0,ar.jsxs)(Om.TabPanel,{tabId:Yu.name,focusable:!1,children:[(0,ar.jsx)(me.Slot,{group:"list",ref:s}),(0,ar.jsx)(eI,{listViewRef:s})]}),(0,ar.jsx)(Om.TabPanel,{tabId:bA.name,focusable:!1,children:(0,ar.jsx)(Gge,{showAdvancedControls:!!e})}),(0,ar.jsx)(Om.TabPanel,{tabId:yA.name,focusable:!1,children:(0,ar.jsx)(jye,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var Ii=c(D(),1),$ye=c(W(),1);var z6e=[];function j6e(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function Kye(e,t,o,r){let n=[],{bindings:i,border:s,color:a,content:l,default:u,layout:d,dimensions:f,list:m,position:h,styles:p,typography:g,effects:b}=Ja,v=(0,Ii.__experimentalUseSlotFills)(m.name),y=!!v&&v.length,S=(0,Ii.__experimentalUseSlotFills)(l.name),k=!!S&&S.length,x=[...(0,Ii.__experimentalUseSlotFills)(s.name)||[],...(0,Ii.__experimentalUseSlotFills)(a.name)||[],...(0,Ii.__experimentalUseSlotFills)(d.name)||[],...(0,Ii.__experimentalUseSlotFills)(h.name)||[],...(0,Ii.__experimentalUseSlotFills)(f.name)||[],...(0,Ii.__experimentalUseSlotFills)(p.name)||[],...(0,Ii.__experimentalUseSlotFills)(g.name)||[],...(0,Ii.__experimentalUseSlotFills)(b.name)||[]].length,E=[...(0,Ii.__experimentalUseSlotFills)(Uf.slotName)||[],...(0,Ii.__experimentalUseSlotFills)(i.name)||[]],B=[...(0,Ii.__experimentalUseSlotFills)(u.name)||[],...y&&x>1?E:[]],P=window?.__experimentalContentOnlyInspectorFields,T=k||!P&&t?.length;T&&n.push(vA),y&&n.push(Yu),(B.length||E.length&&(T||y))&&n.push(bA);let{tabSettings:A,isPreviewMode:I}=(0,$ye.useSelect)(V=>{let N=V(w).getSettings();return{tabSettings:N.blockInspectorTabs,isPreviewMode:N.isPreviewMode}},[]);return!I&&(r||x)&&n.push(yA),j6e(e,A)?n:z6e}var Yye=c(D(),1);var fU=c(C(),1),{Fill:H6e,Slot:U6e}=(0,Yye.createSlotFill)(Symbol("InspectorControlsLastItem")),qye=e=>Ze()[xa]?(0,fU.jsx)(H6e,{...e}):null;qye.Slot=function(t){return(0,fU.jsx)(U6e,{...t})};var CL=qye;var Zye=c(W(),1);function Xye(e){return(0,Zye.useSelect)(t=>{if(e){let o=t(w).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(w),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var Am=c(z(),1);var pU=c(C(),1),Qye={":hover":(0,Am.__)("Hover"),":focus":(0,Am.__)("Focus"),":focus-visible":(0,Am.__)("Focus-visible"),":active":(0,Am.__)("Active")},G6e={"@tablet":(0,Am.__)("Tablet"),"@mobile":(0,Am.__)("Mobile")},W6e=[{value:"default",label:(0,Am.__)("Desktop")},...Object.entries(G6e).map(([e,t])=>({value:e,label:t}))],EL={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]};function Jye(e){return(EL[e]??[]).filter(o=>Qye[o]).map(o=>({value:o,label:Qye[o]}))}var mU="default";function eve({name:e,value:t,onChange:o}){let r=Jye(e),n=Vo();return r.length?(0,pU.jsx)(JA,{pseudoStates:r,pseudoStateValue:t?.pseudo??mU,onChangePseudoState:i=>o({pseudo:i}),popoverProps:n.popoverProps,showText:!1}):null}function tve({name:e,value:t,isResponsiveEditing:o}){let r=Jye(e);return!r.length&&!o?null:(0,pU.jsx)(eL,{viewportStates:o?W6e:[],pseudoStates:r,viewportValue:t?.viewport??mU,pseudoStateValue:t?.pseudo??mU})}var ve=c(C(),1);function rve({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=dg({blockName:e});return(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)(me.Slot,{}),(0,ve.jsx)(me.Slot,{group:"typography",label:(0,Qn.__)("Typography")}),(0,ve.jsx)(me.Slot,{group:"color",label:(0,Qn.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,ve.jsx)(me.Slot,{group:"background",label:(0,Qn.__)("Background"),className:"background-block-support-panel__inner-wrapper"}),(0,ve.jsx)(me.Slot,{group:"layout",label:(0,Qn.__)("Layout")}),(0,ve.jsx)(me.Slot,{group:"dimensions",label:(0,Qn.__)("Dimensions")}),(0,ve.jsx)(me.Slot,{group:"border",label:n}),(0,ve.jsx)(me.Slot,{group:"elements",label:(0,Qn.__)("Elements"),className:"elements-block-support-panel__inner-wrapper"}),o&&(0,ve.jsx)(_A,{}),(0,ve.jsx)(me.Slot,{group:"styles"}),r&&(0,ve.jsx)(me.Slot,{group:"bindings"}),t&&(0,ve.jsx)("div",{children:(0,ve.jsx)(kA,{})})]})}function $6e({blockName:e,selectedBlockStyleState:t}){let o=dg({blockName:e}),r=ku(t)&&!el(t);return(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)(me.Slot,{group:"typography",label:(0,Qn.__)("Typography")}),(0,ve.jsx)(me.Slot,{group:"color",label:(0,Qn.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,ve.jsx)(me.Slot,{group:"background",label:(0,Qn.__)("Background"),className:"background-block-support-panel__inner-wrapper"}),r&&(0,ve.jsx)(me.Slot,{group:"layout",label:(0,Qn.__)("Layout")}),(0,ve.jsx)(me.Slot,{group:"dimensions",label:(0,Qn.__)("Dimensions")}),(0,ve.jsx)(me.Slot,{group:"border",label:o}),(0,ve.jsx)(me.Slot,{group:"elements",label:(0,Qn.__)("Elements"),className:"elements-block-support-panel__inner-wrapper"})]})}function K6e(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a,blockEditingMode:l,selectedBlockStyleState:u,showStateOnCanvas:d,isResponsiveEditing:f}=(0,_0.useSelect)(k=>{let{getSelectedBlockClientId:_,getSelectedBlockClientIds:x,getSelectedBlockCount:E,getBlockName:B,getParentSectionBlock:P,isSectionBlock:T,getEditedContentOnlySection:A,isWithinEditedContentOnlySection:I,getBlockEditingMode:R,getSelectedBlockStyleState:V,isSelectedBlockStyleStateShownOnCanvas:N,isResponsiveEditing:U}=F(k(w)),{getBlockStyles:j}=k(Ik.store),O=_(),H=I(O)?O:P(O)||O,Y=H&&B(H),oe=Y&&(0,Ik.getBlockType)(Y),Z=x().some(Q=>T(Q)),q=Y&&j(Y),$=q&&q.length>0;return{selectedBlockCount:E(),renderedBlockClientId:H,renderedBlockName:Y,blockType:oe,isSectionBlockInSelection:Z,isSectionBlock:T(H),hasBlockStyles:$,editedContentOnlySection:A(),blockEditingMode:R(H),selectedBlockStyleState:V(H),showStateOnCanvas:N(H),isResponsiveEditing:U()}},[]),m=(0,_0.useSelect)(k=>{if(!n||!o)return[];let{getClientIdsOfDescendants:_,getBlockEditingMode:x,shouldRenderBlockListView:E}=F(k(w)),B=_(o),P=new Set;return B.forEach(T=>{E(T)&&_(T).forEach(I=>P.add(I))}),B.filter(T=>!P.has(T)&&x(T)==="contentOnly")},[n,o]),h=Kye(r?.name,m,n,s),p=h?.length>1,g=Xye(r),b=e>1,v=!Fr(u);if(b&&!i)return(0,ve.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,ve.jsx)(w8,{}),p?(0,ve.jsx)(dU,{tabs:h}):(0,ve.jsx)(rve,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(b&&i)return(0,ve.jsx)("div",{className:"block-editor-block-inspector",children:(0,ve.jsx)(w8,{})});let y=t===(0,Ik.getUnregisteredTypeHandlerName)();return!r||!o||y?(0,ve.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,Qn.__)("No block selected.")}):(0,ve.jsx)(Y6e,{animate:g,wrapper:k=>(0,ve.jsx)(q6e,{blockInspectorAnimationSettings:g,renderedBlockClientId:o,children:k}),children:(0,ve.jsx)(Z6e,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:h,contentClientIds:m,hasBlockStyles:s,editedContentOnlySection:a,blockEditingMode:l,selectedBlockStyleState:u,showStateOnCanvas:d,isResponsiveEditing:f,isBlockStyleStateSelected:v})})}var Y6e=({animate:e,wrapper:t,children:o})=>e?t(o):o,q6e=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,ve.jsx)(Ok.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},Z6e=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s,blockEditingMode:a,selectedBlockStyleState:l,showStateOnCanvas:u,isResponsiveEditing:d,isBlockStyleStateSelected:f})=>{let m=(0,ove.useRef)(null),h=r?.length>1,p=el(l),g=f||d,b=s&&s!==e,v=lo(s),y=lo(e),S=y.isSynced,{setSelectedBlockStyleState:k,setSelectedBlockStyleStateCanvasPreview:_}=F((0,_0.useDispatch)(w)),x=B=>{k(e,B)},E=B=>{_(e,B)};return(0,ve.jsxs)("div",{className:"block-editor-block-inspector",children:[b&&(0,ve.jsx)(mx,{...v,className:v?.isSynced&&"is-synced",parentClientId:s}),(0,ve.jsx)(mx,{...y,allowParentNavigation:!0,className:S&&"is-synced",isChild:b,clientId:e,controls:a==="default"&&(0,ve.jsx)(eve,{name:t,value:l,onChange:x})}),a==="default"&&g&&(0,ve.jsxs)(Ok.__experimentalSpacer,{paddingX:4,paddingY:2,children:[p&&(0,ve.jsx)(Ok.ToggleControl,{label:(0,Qn.__)("Show state on canvas"),checked:u,onChange:E}),(0,ve.jsx)(tve,{name:t,value:l,isResponsiveEditing:d})]}),(0,ve.jsx)(qY,{clientId:e}),(0,ve.jsx)(Age,{clientId:e}),!g&&(0,ve.jsx)(GO,{blockClientId:e}),(0,ve.jsx)(Hge,{}),g&&!o&&(0,ve.jsx)($6e,{blockName:t,selectedBlockStyleState:l}),!g&&h&&(0,ve.jsx)(ve.Fragment,{children:(0,ve.jsx)(dU,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!g&&!h&&(0,ve.jsxs)(ve.Fragment,{children:[i&&(0,ve.jsx)(Rv,{clientId:e}),(0,ve.jsx)(xL,{contentClientIds:n}),(0,ve.jsx)(me.Slot,{group:"content"}),(0,ve.jsx)(me.Slot,{group:"list",ref:m}),(0,ve.jsx)(eI,{listViewRef:m}),!o&&(0,ve.jsx)(rve,{blockName:t})]}),!g&&(0,ve.jsx)(CL.Slot,{}),(0,ve.jsx)(hA,{},"back")]})},nve=K6e;var hU=c(Xe(),1);var ive=c(C(),1),sve=()=>((0,hU.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),gx());function ave(e){return(0,hU.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,ive.jsx)("div",{...e,ref:gx()})}var lve=c(W(),1),gU=c(L(),1);var bU=c(C(),1),X6e=()=>{};function Q6e({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:l,onPatternCategorySelection:u,onSelect:d=X6e,shouldFocusBlock:f=!1,onClose:m},h){let{destinationRootClientId:p}=(0,lve.useSelect)(g=>{let{getBlockRootClientId:b}=g(w);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,bU.jsx)(O6,{onSelect:d,rootClientId:p,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n,__experimentalInsertionIndex:i,__experimentalFilterValue:l,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:a,shouldFocusBlock:f,ref:h,onClose:m})}var yU=(0,gU.forwardRef)(Q6e);function J6e(e,t){return(0,bU.jsx)(yU,{...e,onPatternCategorySelection:void 0,ref:t})}var cve=(0,gU.forwardRef)(J6e);var uve=c(Xe(),1);function dve(){return(0,uve.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var fve=c(te(),1),x0=c(at(),1),mve=c(W(),1),Lm=c(Pt(),1);var pve=c(C(),1),eje=window.navigator.userAgent.indexOf("Trident")!==-1,tje=new Set([Lm.UP,Lm.DOWN,Lm.LEFT,Lm.RIGHT]),oje=.75;function vU(){let e=(0,mve.useSelect)(t=>t(w).hasSelectedBlock(),[]);return(0,fve.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 l(g){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame(()=>{u(g),i=null})}function u({keyCode:g}){if(!h())return;let b=(0,x0.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(tje.has(g)){s=b;return}let v=b.top-s.top;if(v===0)return;let y=(0,x0.getScrollContainer)(t);if(!y)return;let S=y===o.body||y===o.documentElement,k=S?r.scrollY:y.scrollTop,_=S?0:y.getBoundingClientRect().top,x=S?s.top/r.innerHeight:(s.top-_)/(r.innerHeight-_);if(k===0&&x<oje&&p()){s=b;return}let E=S?r.innerHeight:y.clientHeight;if(s.top+s.height>_+E||s.top<_){s=b;return}S?r.scrollBy(0,v):y.scrollTop+=v}function d(){o.addEventListener("selectionchange",f)}function f(){o.removeEventListener("selectionchange",f),m()}function m(){h()&&(s=(0,x0.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",l),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",l),t.removeEventListener("keyup",u),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",d),o.removeEventListener("selectionchange",f),r.cancelAnimationFrame(n),r.cancelAnimationFrame(i)}},[e])}function rje({children:e}){return(0,pve.jsx)("div",{ref:vU(),className:"block-editor__typewriter",children:e})}var nje=eje?e=>e.children:rje,hve=nje;var vg=c(L(),1),kU=c(Xe(),1);var SU=c(C(),1),TL=(0,vg.createContext)({});TL.displayName="RenderedRefsContext";function ije(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function _U({children:e,uniqueId:t,blockName:o=""}){let r=(0,vg.useContext)(TL),{name:n}=Ze();o=o||n;let i=(0,vg.useMemo)(()=>ije(r,o,t),[r,o,t]);return(0,SU.jsx)(TL.Provider,{value:i,children:e})}function xU(e,t=""){let o=(0,vg.useContext)(TL),{name:r}=Ze();return t=t||r,!!o[t]?.has(e)}var gve=e=>((0,kU.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,SU.jsx)(_U,{...e})),bve=(...e)=>((0,kU.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),xU(...e));var PL=c(D(),1),wU=c(z(),1),CU=c(L(),1),vve=c(lc(),1);var gs=c(D(),1);var yve=c(z(),1),td=c(C(),1);function BL({title:e,help:t,actions:o=[],onClose:r}){return(0,td.jsxs)(gs.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,td.jsxs)(gs.__experimentalHStack,{alignment:"center",children:[(0,td.jsx)(gs.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,td.jsx)(gs.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,td.jsx)(gs.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,td.jsx)(gs.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,yve.__)("Close"),icon:vp,onClick:r})]}),t&&(0,td.jsx)(gs.__experimentalText,{children:t})]})}var Ak=c(C(),1);function sje({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let l={startOfWeek:(0,vve.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?PL.TimePicker:PL.DateTimePicker;return(0,Ak.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,Ak.jsx)(BL,{title:i||(0,wU.__)("Publish"),actions:o?[{label:(0,wU.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,Ak.jsx)(u,{...l})]})}var EU=(0,CU.forwardRef)(sje);function aje(e,t){return(0,Ak.jsx)(EU,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var kve=(0,CU.forwardRef)(aje);var Sve=c(Xe(),1),_ve=c(L(),1);function lje(){return(0,Sve.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var xve=(0,_ve.forwardRef)(lje);var C0=c(C(),1),ge=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,ge(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function cL(e,t,o,r,n,i){if(Object.values(e??{}).every(l=>!l)||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(([l,u])=>{u&&t[l].forEach(d=>{let f=Ca(s,d);f&&(a={...a,attributes:he(a.attributes,d,f)})})}),a}function bt(e,t,o){let n=(0,wve.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var od=new WeakMap;function wi({id:e,css:t}){return Bu({id:e,css:t})}function Bu({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=F((0,RL.useDispatch)(w)),l=(0,RL.useRegistry)(),u=(0,ha.useId)();(0,ha.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return od.get(l)||od.set(l,[]),od.get(l).push([d,f]),window.queueMicrotask(()=>{od.get(l)?.length&&l.batch(()=>{od.get(l).forEach(m=>{s(...m)}),od.set(l,[])})}),()=>{od.get(l)?.find(([h])=>h===d)?od.set(l,od.get(l).filter(([h])=>h!==d)):a(d)}},[e,t,i,o,r,u,s,a,l,n])}function fa(e,t){let[o,r,n,i,s,a,l,u,d,f,m,h,p,g,b,v,y,S,k,_,x,E,B,P,T,A,I,R,V,N,U,j,O,M,H,Y,oe,K,Z,q,$,Q,X,J,ie,se,re,le,ye,Re,Ve,tt,Ye,Ie,ut,Ne,Ft,qe,eo,ce,fe,et,De]=ke("background.backgroundImage","background.backgroundSize","background.gradient","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.minWidth","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"),At=(0,ha.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r,gradient:n},color:{palette:{custom:J,theme:se,default:re},gradients:{custom:Ye,theme:Ie,default:ut},duotone:{custom:Re,theme:Ve,default:tt},defaultGradients:Ne,defaultPalette:le,defaultDuotone:ye,custom:X,customGradient:Ft,customDuotone:ie,background:qe,link:eo,heading:fe,button:et,text:ce},typography:{fontFamilies:{custom:i,default:s,theme:a},fontSizes:{custom:u,default:d,theme:f},customFontSize:m,defaultFontSizes:l,fontStyle:h,fontWeight:p,lineHeight:g,textAlign:b,textColumns:v,textDecoration:y,textIndent:S,textTransform:_,letterSpacing:x,writingMode:k},spacing:{spacingSizes:{custom:I,default:R,theme:V},customSpacingSize:A,defaultSpacingSizes:T,padding:E,margin:B,blockGap:P,units:N},border:{color:K,radius:Z,style:q,width:$,radiusSizes:Q},dimensions:{aspectRatio:U,height:j,minHeight:O,minWidth:M,width:H,dimensionSizes:Y},layout:oe,parentLayout:t,shadow:De}),[o,r,n,i,s,a,l,u,d,f,m,h,p,g,b,v,y,S,_,x,k,E,B,P,T,A,I,R,V,N,U,j,O,M,H,Y,oe,t,K,Z,q,$,Q,X,J,ie,se,re,le,ye,Re,Ve,tt,Ye,Ie,ut,Ne,Ft,qe,eo,ce,fe,et,De]);return xA(At,e)}function Cve(e){e=e.map(o=>({...o,Edit:(0,ha.memo)(o.edit)}));let t=(0,TU.createHigherOrderComponent)(o=>function(n){let i=Ze();return[...e.map((s,a)=>{let{Edit:l,hasSupport:u,attributeKeys:d=[],shareWithChildBlocks:f,supportsPatternEditing:m}=s;if(!(m&&i[Sd]||i[xa]||i[Ag]&&f)||!u(n.name))return null;let p={};for(let g of d)n.attributes[g]&&(p[g]=n.attributes[g]);return(0,C0.jsx)(l,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...p},a)}),(0,C0.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,w0.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function cje({index:e,useBlockProps:t,setAllWrapperProps:o,...r}){let n=t(r),i=s=>o(a=>{let l=[...a];return l[e]=s,l});return(0,ha.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var uje=(0,ha.memo)(cje);function Eve(e){let t=(0,TU.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,ha.useState)(Array(e.length).fill(void 0));return[...e.map((a,l)=>{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,C0.jsx)(uje,{index:l,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...h},l)}),(0,C0.jsx)(o,{...n,wrapperProps:i.filter(Boolean).reduce((a,l)=>({...a,...l,className:G(a.className,l.className),style:{...a.style,...l.style}}),n.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,w0.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function Tve(e){function t(o,r,n){return e.reduce((i,s)=>{let{hasSupport:a,attributeKeys:l=[],addSaveProps:u}=s,d={};for(let f of l)n[f]&&(d[f]=n[f]);return!Object.keys(d).length||!a(r)?i:u(i,r,d)},o)}(0,w0.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,w0.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var Bve=c(ee(),1),Pve=c(zt(),1);function dje(e){let{apiVersion:t=1}=e;return t<2&&(0,Bve.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,Pve.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",dje);function Rve(e){e.hasAttribute("crossorigin")||e.setAttribute("crossorigin","anonymous")}if(window.crossOriginIsolated){let e=function(){document.body?t.observe(document.body,{childList:!0,attributes:!0,subtree:!0}):document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",()=>{document.body&&t.observe(document.body,{childList:!0,attributes:!0,subtree:!0})})};fje=e;let t=new window.MutationObserver(o=>{o.forEach(r=>{[r.addedNodes,r.target].forEach(n=>{(n instanceof window.NodeList?n:[n]).forEach(s=>{let a=s;a.querySelectorAll&&(a.querySelectorAll("source,script,video,link").forEach(l=>{Rve(l)}),["SOURCE","SCRIPT","VIDEO","LINK"].includes(a.nodeName)&&Rve(a))})})})});e()}var fje;var Ive=c(zt(),1),ga=c(ee(),1);var BU=c(C(),1),PU=["left","center","right","wide","full"],mje=["wide","full"];function RU(e,t=!0,o=!0){let r;return Array.isArray(e)?r=PU.filter(n=>e.includes(n)):e===!0?r=[...PU]:r=[],!o||e===!0&&!t?r.filter(n=>!mje.includes(n)):r}function pje(e){return"type"in(e.attributes?.align??{})||(0,ga.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...PU,""]}}),e}function hje({name:e,align:t,setAttributes:o}){let r=RU((0,ga.getBlockSupport)(e,"align"),(0,ga.hasBlockSupport)(e,"alignWide",!0)),n=m_(r).map(({name:a})=>a),i=Go();return!n.length||i!=="default"?null:(0,BU.jsx)(yo,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,BU.jsx)(aT,{value:t,onChange:a=>{a||(0,ga.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var IL={shareWithChildBlocks:!0,edit:hje,useBlockProps:gje,addSaveProps:bje,attributeKeys:["align"],hasSupport(e){return(0,ga.hasBlockSupport)(e,"align",!1)}};function gje({name:e,align:t}){let o=RU((0,ga.getBlockSupport)(e,"align"),(0,ga.hasBlockSupport)(e,"alignWide",!0));return m_(o).some(n=>n.name===t)?{"data-align":t}:{}}function bje(e,t,o){let{align:r}=o,n=(0,ga.getBlockSupport)(t,"align"),i=(0,ga.hasBlockSupport)(t,"alignWide",!0);return RU(n,i).includes(r)&&(e.className=G(`align${r}`,e.className)),e}(0,Ive.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",pje);var Ove=c(zt(),1);function yje(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,Ove.addFilter)("blocks.registerBlockType","core/lock/addAttribute",yje);var MU=c(zt(),1),Vk=c(ee(),1);var E0=c(D(),1),LL=c(z(),1),Gve=c(L(),1),Wve=c(W(),1),ML=c(ee(),1);var Oi=c(D(),1),jve=c(L(),1),Dk=c(z(),1),Hve=c(W(),1);var AU=c(ee(),1),Vve=c(W(),1),Nk=c(D(),1),vl=c(z(),1),OL=c(L(),1),Fve=c(te(),1),zve=c(_r(),1);var IU=c(L(),1),Mve=c(te(),1),Nve=c(D(),1);var Ave=c(D(),1);var Lk=c(C(),1);function vje({blockTypes:e,value:t,onItemChange:o}){return(0,Lk.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,Lk.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,Lk.jsx)(Ave.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,Lk.jsx)(rt,{icon:r.icon})]},r.name))})}var Lve=vje;var Mk=c(C(),1);function Dve({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,Mve.useInstanceId)(Dve),i=(0,IU.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:h})=>h!==f.name))},[o,r]),s=(0,IU.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)),l="block-editor-block-manager__category-title-"+n,u=a.length===t.length,d=!u&&a.length>0;return(0,Mk.jsxs)("div",{role:"group","aria-labelledby":l,className:"block-editor-block-manager__category",children:[(0,Mk.jsx)(Nve.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,Mk.jsx)("span",{id:l,children:e})}),(0,Mk.jsx)(Lve,{blockTypes:t,value:a,onItemChange:i})]})}var OU=Dve;var rd=c(C(),1);function AL({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,Fve.useDebounce)(zve.speak,500),[i,s]=(0,OL.useState)(""),{categories:a,isMatchingSearchTerm:l}=(0,Vve.useSelect)(m=>({categories:m(AU.store).getCategories(),isMatchingSearchTerm:m(AU.store).isMatchingSearchTerm}),[]),u=e.filter(m=>!i||l(m,i)),d=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,OL.useEffect)(()=>{if(!i)return;let m=u.length,h=(0,vl.sprintf)((0,vl._n)("%d result found.","%d results found.",m),m);n(h)},[u?.length,i,n]),(0,rd.jsxs)(Nk.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,rd.jsx)(Nk.SearchControl,{label:(0,vl.__)("Search for a block"),placeholder:(0,vl.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,rd.jsx)(Nk.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,vl.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,rd.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,vl.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,rd.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,vl.__)("No blocks found.")}),a.map(m=>(0,rd.jsx)(OU,{title:m.title,blockTypes:u.filter(h=>h.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,rd.jsx)(OU,{title:(0,vl.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var kl=c(C(),1);function Uve({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,jve.useState)(o),{updateBlockAttributes:s}=(0,Hve.useDispatch)(w),a=()=>{let l=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:l?void 0:u}),r()};return(0,kl.jsx)(Oi.Modal,{title:(0,Dk._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,kl.jsxs)(Oi.__experimentalVStack,{as:"form",onSubmit:l=>{l.preventDefault(),a()},spacing:"4",children:[(0,kl.jsx)(Oi.__experimentalText,{children:(0,Dk.__)("Select which blocks can be added inside this container.")}),(0,kl.jsx)(AL,{blockTypes:t,selectedBlockTypes:n,onChange:l=>{i(l)}}),(0,kl.jsxs)(Oi.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,kl.jsx)(Oi.FlexItem,{children:(0,kl.jsx)(Oi.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,Dk.__)("Cancel")})}),(0,kl.jsx)(Oi.FlexItem,{children:(0,kl.jsx)(Oi.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,Dk.__)("Apply")})})]})]})})}var kg=c(C(),1);function $ve({clientId:e}){let[t,o]=(0,Gve.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,Wve.useSelect)(a=>{let{getBlockAttributes:l}=a(w);return{blockTypes:a(ML.store).getBlockTypes(),selectedBlockNames:l(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,ML.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,kg.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,kg.jsxs)(E0.BaseControl,{help:(0,LL.__)("Specify which blocks are allowed inside this container."),children:[(0,kg.jsx)(E0.BaseControl.VisualLabel,{children:(0,LL.__)("Allowed Blocks")}),(0,kg.jsx)(E0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,LL.__)("Manage allowed blocks")})]}),t&&(0,kg.jsx)(Uve,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var LU=c(C(),1);function kje({clientId:e}){return Go()==="contentOnly"?null:(0,LU.jsx)(Qx.Fill,{children:(0,LU.jsx)($ve,{clientId:e})})}var Kve={edit:kje,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,Vk.hasBlockSupport)(e,"allowedBlocks")}};function Sje(e){return e?.attributes?.allowedBlocks?.type||(0,Vk.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,MU.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",Sje);function _je(e,t,o,r){if(!(0,Vk.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,Vk.getBlockType)(e.name)?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:n}};let a=n.filter(l=>s.includes(l));return{...e,attributes:{...e.attributes,allowedBlocks:a}}}(0,MU.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",_je);var Yve=c(zt(),1),NL=c(D(),1),T0=c(z(),1),DL=c(ee(),1);var Mm=c(C(),1),xje=/[\s#]/g;function wje(e){return"type"in(e.attributes?.anchor??{})||(0,DL.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function Cje({anchor:e,setAttributes:t}){return Go()!=="default"?null:(0,Mm.jsx)(me,{group:"advanced",children:(0,Mm.jsx)(NL.TextControl,{className:"html-anchor-control",label:(0,T0.__)("HTML anchor"),help:(0,Mm.jsxs)(Mm.Fragment,{children:[(0,T0.__)("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.")," ",(0,Mm.jsx)(NL.ExternalLink,{href:(0,T0.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,T0.__)("Learn more about anchors")})]}),value:e||"",placeholder:null,onChange:r=>{r=r.replace(xje,"-"),t({anchor:r!==""?r:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var NU={addSaveProps:Eje,edit:Cje,attributeKeys:["anchor"],hasSupport(e){return(0,DL.hasBlockSupport)(e,"anchor")}};function Eje(e,t,o){return(0,DL.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Yve.addFilter)("blocks.registerBlockType","core/anchor/attribute",wje);var qve=c(zt(),1),VL=c(ee(),1);function Tje(e){return e?.attributes?.ariaLabel?.type||(0,VL.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function Bje(e,t,o){return(0,VL.hasBlockSupport)(t,"ariaLabel")&&!bt(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var Zve={addSaveProps:Bje,attributeKeys:["ariaLabel"],hasSupport(e){return(0,VL.hasBlockSupport)(e,"ariaLabel")}};(0,qve.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",Tje);var Xk=c(ee(),1),q_e=c(te(),1),VM=c(D(),1),FM=c(W(),1);var DU=c(z(),1);var xo="isAny",wo="isNone",wn="isAll",Cn="isNotAll",Jn="between",ei="inThePast",Ai="over",Ro="is",Io="isNot",Nm="lessThan",Dm="greaterThan",Vm="lessThanOrEqual",Fm="greaterThanOrEqual",zm="before",jm="after",Hm="beforeInc",Um="afterInc",_c="contains",xc="notContains",wc="startsWith",Gm="on",Wm="notOn";var t3t={asc:(0,DU.__)("Sort ascending"),desc:(0,DU.__)("Sort descending")};var Xve=c(cC(),1),{lock:r3t,unlock:Qt}=(0,Xve.__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 B0=c(L(),1),Pje=[];function Li({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:Pje,[r,n]=(0,B0.useState)(o),[i,s]=(0,B0.useState)(!1);return(0,B0.useEffect)(()=>{if(!t){n(o);return}let a=!1;return s(!0),t().then(l=>{if(!a){let u=Array.isArray(l)&&l.length>0?l:o;n(u)}}).catch(()=>{a||n(o)}).finally(()=>{a||s(!1)}),()=>{a=!0}},[t,o]),{elements:r,isLoading:i}}var Rje=Math.pow(10,8)*24*60*60*1e3,s3t=-Rje,FL=6048e5,Qve=864e5;var Ije=3600;var Jve=Ije*24,a3t=Jve*7,Oje=Jve*365.2425,Aje=Oje/12,l3t=Aje*3,VU=Symbol.for("constructDateFrom");function Br(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&VU in e?e[VU](t):e instanceof Date?new e.constructor(t):new Date(t)}function Vt(e,t){return Br(t||e,e)}function zL(e,t,o){let r=Vt(e,o?.in);return isNaN(t)?Br(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function jL(e,t,o){let r=Vt(e,o?.in);if(isNaN(t))return Br(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=Br(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 Lje={};function $m(){return Lje}function nd(e,t){let o=$m(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=Vt(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 Sg(e,t){return nd(e,{...t,weekStartsOn:1})}function HL(e,t){let o=Vt(e,t?.in),r=o.getFullYear(),n=Br(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Sg(n),s=Br(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=Sg(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function FU(e){let t=Vt(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 eke(e,...t){let o=Br.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function zU(e,t){let o=Vt(e,t?.in);return o.setHours(0,0,0,0),o}function tke(e,t,o){let[r,n]=eke(o?.in,e,t),i=zU(r),s=zU(n),a=+i-FU(i),l=+s-FU(s);return Math.round((a-l)/Qve)}function oke(e,t){let o=HL(e,t),r=Br(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Sg(r)}function rke(e,t,o){return zL(e,t*7,o)}function nke(e,t,o){return jL(e,t*12,o)}function ike(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function id(e){return!(!ike(e)&&typeof e!="number"||isNaN(+Vt(e)))}function ske(e,t){let o=Vt(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function UL(e,t){let o=Vt(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var Mje={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"}},ake=(e,t,o)=>{let r,n=Mje[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 GL(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var Nje={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Dje={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vje={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lke={date:GL({formats:Nje,defaultWidth:"full"}),time:GL({formats:Dje,defaultWidth:"full"}),dateTime:GL({formats:Vje,defaultWidth:"full"})};var Fje={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cke=(e,t,o,r)=>Fje[e];function Fk(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 zje={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},jje={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hje={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"]},Uje={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"]},Gje={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"}},Wje={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"}},$je=(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"},uke={ordinalNumber:$je,era:Fk({values:zje,defaultWidth:"wide"}),quarter:Fk({values:jje,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fk({values:Hje,defaultWidth:"wide"}),day:Fk({values:Uje,defaultWidth:"wide"}),dayPeriod:Fk({values:Gje,defaultWidth:"wide",formattingValues:Wje,defaultFormattingWidth:"wide"})};function zk(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],l=Array.isArray(a)?Yje(a,f=>f.test(s)):Kje(a,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(l):l,u=o.valueCallback?o.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function Kje(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function Yje(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function dke(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 qje=/^(\d+)(th|st|nd|rd)?/i,Zje=/\d+/i,Xje={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},Qje={any:[/^b/i,/^(a|c)/i]},Jje={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},eHe={any:[/1/i,/2/i,/3/i,/4/i]},tHe={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},oHe={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]},rHe={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},nHe={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]},iHe={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},sHe={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}},fke={ordinalNumber:dke({matchPattern:qje,parsePattern:Zje,valueCallback:e=>parseInt(e,10)}),era:zk({matchPatterns:Xje,defaultMatchWidth:"wide",parsePatterns:Qje,defaultParseWidth:"any"}),quarter:zk({matchPatterns:Jje,defaultMatchWidth:"wide",parsePatterns:eHe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zk({matchPatterns:tHe,defaultMatchWidth:"wide",parsePatterns:oHe,defaultParseWidth:"any"}),day:zk({matchPatterns:rHe,defaultMatchWidth:"wide",parsePatterns:nHe,defaultParseWidth:"any"}),dayPeriod:zk({matchPatterns:iHe,defaultMatchWidth:"any",parsePatterns:sHe,defaultParseWidth:"any"})};var jU={code:"en-US",formatDistance:ake,formatLong:lke,formatRelative:cke,localize:uke,match:fke,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mke(e,t){let o=Vt(e,t?.in);return tke(o,UL(o))+1}function pke(e,t){let o=Vt(e,t?.in),r=+Sg(o)-+oke(o);return Math.round(r/FL)+1}function WL(e,t){let o=Vt(e,t?.in),r=o.getFullYear(),n=$m(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Br(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=nd(s,t),l=Br(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);let u=nd(l,t);return+o>=+a?r+1:+o>=+u?r:r-1}function hke(e,t){let o=$m(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=WL(e,t),i=Br(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),nd(i,t)}function gke(e,t){let o=Vt(e,t?.in),r=+nd(o,t)-+hke(o,t);return Math.round(r/FL)+1}function St(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var sd={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return St(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):St(o+1,2)},d(e,t){return St(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 St(e.getHours()%12||12,t.length)},H(e,t){return St(e.getHours(),t.length)},m(e,t){return St(e.getMinutes(),t.length)},s(e,t){return St(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return St(n,t.length)}};var jk={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},HU={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 sd.y(e,t)},Y:function(e,t,o,r){let n=WL(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return St(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):St(i,t.length)},R:function(e,t){let o=HL(e);return St(o,t.length)},u:function(e,t){let o=e.getFullYear();return St(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 St(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 St(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 sd.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 St(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=gke(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):St(n,t.length)},I:function(e,t,o){let r=pke(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):St(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):sd.d(e,t)},D:function(e,t,o){let r=mke(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):St(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 St(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 St(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 St(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=jk.noon:r===0?n=jk.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=jk.evening:r>=12?n=jk.afternoon:r>=4?n=jk.morning:n=jk.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 sd.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):sd.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):St(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):St(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):sd.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):sd.s(e,t)},S:function(e,t){return sd.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return yke(r);case"XXXX":case"XX":return _g(r);default:return _g(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return yke(r);case"xxxx":case"xx":return _g(r);default:return _g(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bke(r,":");default:return"GMT"+_g(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bke(r,":");default:return"GMT"+_g(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return St(r,t.length)},T:function(e,t,o){return St(+e,t.length)}};function bke(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+St(i,2)}function yke(e,t){return e%60===0?(e>0?"-":"+")+St(Math.abs(e)/60,2):_g(e,t)}function _g(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=St(Math.trunc(r/60),2),i=St(r%60,2);return o+n+t+i}var vke=(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"})}},kke=(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"})}},aHe=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return vke(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}}",vke(r,t)).replace("{{time}}",kke(n,t))},Ske={p:kke,P:aHe};var lHe=/^D+$/,cHe=/^Y+$/,uHe=["D","DD","YY","YYYY"];function _ke(e){return lHe.test(e)}function xke(e){return cHe.test(e)}function wke(e,t,o){let r=dHe(e,t,o);if(console.warn(r),uHe.includes(e))throw new RangeError(r)}function dHe(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 fHe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mHe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pHe=/^'([^]*?)'?$/,hHe=/''/g,gHe=/[a-zA-Z]/;function UU(e,t,o){let r=$m(),n=o?.locale??r.locale??jU,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=Vt(e,o?.in);if(!id(a))throw new RangeError("Invalid time value");let l=t.match(mHe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Ske[f];return m(d,n.formatLong)}return d}).join("").match(fHe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:bHe(d)};if(HU[f])return{isToken:!0,value:d};if(f.match(gHe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(l=n.localize.preprocessor(a,l));let u={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return l.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!o?.useAdditionalWeekYearTokens&&xke(f)||!o?.useAdditionalDayOfYearTokens&&_ke(f))&&wke(f,t,String(e));let m=HU[f[0]];return m(a,f,n.localize,u)}).join("")}function bHe(e){let t=e.match(pHe);return t?t[1].replace(hHe,"'"):e}function xg(e,t,o){return zL(e,-t,o)}function $L(e,t,o){return jL(e,-t,o)}function Cke(e,t,o){return rke(e,-t,o)}function KL(e,t,o){return nke(e,-t,o)}var be=c(z(),1),Wo=c(L(),1),ti=c(lc(),1);var GU=c(C(),1),lr={Name:(0,GU.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,GU.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Eke(e,t){switch(t){case"days":return xg(new Date,e);case"weeks":return Cke(new Date,e);case"months":return $L(new Date,e);case"years":return KL(new Date,e);default:return new Date}}var Tke={label:(0,be.__)("Is none of"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),lr),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"},Bke=[{name:xo,label:(0,be.__)("Includes"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),lr),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:wo,...Tke},{name:wn,label:(0,be.__)("Includes all"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),lr),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:Cn,...Tke},{name:Jn,label:(0,be.__)("Between (inc)"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),lr),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:ei,label:(0,be.__)("In the past"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),lr),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Eke(o.value,o.unit),n=(0,ti.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Ai,label:(0,be.__)("Over"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),lr),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Eke(o.value,o.unit);return(0,ti.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:Ro,label:(0,be.__)("Is"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:Io,label:(0,be.__)("Is not"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:Nm,label:(0,be.__)("Less than"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:Dm,label:(0,be.__)("Greater than"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:Vm,label:(0,be.__)("Less than or equal"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:Fm,label:(0,be.__)("Greater than or equal"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:zm,label:(0,be.__)("Before"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){if(o===void 0)return!0;let r=(0,ti.getDate)(o);return(0,ti.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:jm,label:(0,be.__)("After"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){if(o===void 0)return!0;let r=(0,ti.getDate)(o);return(0,ti.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:Hm,label:(0,be.__)("Before (inc)"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){if(o===void 0)return!0;let r=(0,ti.getDate)(o);return(0,ti.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:Um,label:(0,be.__)("After (inc)"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){if(o===void 0)return!0;let r=(0,ti.getDate)(o);return(0,ti.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:_c,label:(0,be.__)("Contains"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),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:xc,label:(0,be.__)("Doesn't contain"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),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:wc,label:(0,be.__)("Starts with"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),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:Gm,label:(0,be.__)("On"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){if(o===void 0)return!0;let r=(0,ti.getDate)(o),n=(0,ti.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:Wm,label:(0,be.__)("Not on"),filterText:(e,t)=>(0,Wo.createInterpolateElement)((0,be.sprintf)((0,be.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),lr),filter(e,t,o){if(o===void 0)return!0;let r=(0,ti.getDate)(o),n=(0,ti.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],Pke=e=>Bke.find(t=>t.name===e),Rke=()=>Bke.map(e=>e.name);var Ike=c(D(),1),Oke=c(L(),1);function Wt(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 Ake=c(C(),1),{ValidatedCheckboxControl:yHe}=Qt(Ike.privateApis);function Lke({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,label:l,description:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),m=(0,Oke.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,Ake.jsx)(yHe,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:Wt(d,i),hidden:r,label:l,help:u,checked:s({item:o}),onChange:m,disabled:f})}var YL=c(D(),1),Mke=c(L(),1);var WU=c(C(),1),{ValidatedComboboxControl:vHe}=Qt(YL.privateApis);function qL({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,placeholder:a,getValue:l,setValue:u,isValid:d}=t,f=l({item:e})??"",m=(0,Mke.useCallback)(g=>o(u({item:e,value:g??""})),[e,o,u]),{elements:h,isLoading:p}=Li({elements:t.elements,getElements:t.getElements});return p?(0,WU.jsx)(YL.Spinner,{}):(0,WU.jsx)(vHe,{required:!!t.isValid?.required,customValidity:Wt(d,n),label:i,value:f,help:s,placeholder:a,options:h,onChange:m,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var QL=c(D(),1),ba=c(L(),1),XL=c(z(),1),bs=c(lc(),1);var Uk=c(D(),1),$U=c(L(),1),Cc=c(z(),1);var Hk=c(C(),1),kHe={[ei]:[{value:"days",label:(0,Cc.__)("Days")},{value:"weeks",label:(0,Cc.__)("Weeks")},{value:"months",label:(0,Cc.__)("Months")},{value:"years",label:(0,Cc.__)("Years")}],[Ai]:[{value:"days",label:(0,Cc.__)("Days ago")},{value:"weeks",label:(0,Cc.__)("Weeks ago")},{value:"months",label:(0,Cc.__)("Months ago")},{value:"years",label:(0,Cc.__)("Years ago")}]};function ZL({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=kHe[i===ei?"inThePast":"over"],{id:a,label:l,description:u,getValue:d,setValue:f}=o,m=o.isDisabled({item:t,field:o}),h=d({item:t}),{value:p="",unit:g=s[0].value}=h&&typeof h=="object"?h:{},b=(0,$U.useCallback)(y=>r(f({item:t,value:{value:Number(y),unit:g}})),[r,f,t,g]),v=(0,$U.useCallback)(y=>r(f({item:t,value:{value:p,unit:y}})),[r,f,t,p]);return(0,Hk.jsx)(Uk.BaseControl,{id:a,className:G(e,"dataviews-controls__relative-date"),label:l,hideLabelFromVision:n,help:u,children:(0,Hk.jsxs)(Me,{direction:"row",gap:"sm",children:[(0,Hk.jsx)(Uk.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:p,onChange:b,disabled:m}),(0,Hk.jsx)(Uk.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,Cc.__)("Unit"),value:g,options:s,onChange:v,hideLabelFromVision:!0,disabled:m})]})})}var Nke=c(L(),1);function P0(e,t){let o=typeof e.min?.constraint=="string"?e.min.constraint:void 0,r=typeof e.max?.constraint=="string"?e.max.constraint:void 0,n=(0,Nke.useMemo)(()=>{let i=[];if(o){let s=t(o);s&&i.push({before:s})}if(r){let s=t(r);s&&i.push({after:s})}return i.length>0?i:void 0},[o,r,t]);return{minConstraint:o,maxConstraint:r,disabledMatchers:n}}var Dke=c(lc(),1);function R0(e){if(!e)return null;let t=(0,Dke.getDate)(e);return t&&id(t)?t:null}var Km=c(C(),1),{DateCalendar:SHe,ValidatedInputControl:_He}=Qt(QL.privateApis),KU=e=>e?(0,bs.dateI18n)("Y-m-d\\TH:i",(0,bs.getDate)(e)):"";function xHe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,config:s}){let{compact:a}=s||{},{id:l,label:u,description:d,setValue:f,getValue:m,isValid:h}=t,p=t.isDisabled({item:e,field:t}),g=m({item:e}),b=typeof g=="string"?g:void 0,[v,y]=(0,ba.useState)(()=>R0(b)||new Date),S=(0,ba.useRef)(null),k=(0,ba.useRef)(void 0),_=(0,ba.useRef)(null),{minConstraint:x,maxConstraint:E,disabledMatchers:B}=P0(h,R0),P=(0,ba.useCallback)(U=>o(f({item:e,value:U})),[e,o,f]);(0,ba.useEffect)(()=>()=>{k.current&&clearTimeout(k.current)},[]);let T=(0,ba.useCallback)(U=>{let j;if(U){let O=(0,bs.dateI18n)("Y-m-d",U),M;b?M=(0,bs.dateI18n)("H:i",(0,bs.getDate)(b)):M=(0,bs.dateI18n)("H:i",U),j=(0,bs.getDate)(`${O}T${M}`).toISOString(),P(j),k.current&&clearTimeout(k.current)}else P(void 0);_.current=S.current&&S.current.ownerDocument.activeElement,k.current=setTimeout(()=>{S.current&&(S.current.focus(),S.current.blur(),P(j),_.current&&_.current instanceof HTMLElement&&_.current.focus())},0)},[P,b]),A=(0,ba.useCallback)(U=>{if(U){let j=(0,bs.getDate)(U);P(j.toISOString());let O=R0(j.toISOString());O&&y(O)}else P(void 0)},[P]),{format:I}=t,R=I.weekStartsOn??(0,bs.getSettings)().l10n.startOfWeek,{timezone:{string:V}}=(0,bs.getSettings)(),N=u;return h?.required&&!n&&!r?N=`${u} (${(0,XL.__)("Required")})`:!h?.required&&n&&!r&&(N=`${u} (${(0,XL.__)("Optional")})`),(0,Km.jsx)(QL.BaseControl,{id:l,label:N,help:d,hideLabelFromVision:r,children:(0,Km.jsxs)(Me,{direction:"column",gap:"lg",children:[(0,Km.jsx)(_He,{ref:S,__next40pxDefaultSize:!0,required:!!h?.required,customValidity:Wt(h,i),type:"datetime-local",label:(0,XL.__)("Date time"),hideLabelFromVision:!0,value:KU(b),onChange:A,disabled:p,min:x?KU(x):void 0,max:E?KU(E):void 0}),!a&&(0,Km.jsx)(SHe,{style:{width:"100%"},selected:b&&R0(b)||void 0,onSelect:T,month:v,onMonthChange:y,timeZone:V||void 0,weekStartsOn:R,disabled:p||B})]})})}function Vke({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s,config:a}){return i===ei||i===Ai?(0,Km.jsx)(ZL,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,Km.jsx)(xHe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,config:a})}var Tn=c(D(),1),Ot=c(L(),1),Pr=c(z(),1),En=c(lc(),1);var $t=c(C(),1),{DateCalendar:wHe,DateRangeCalendar:CHe}=Qt(Tn.privateApis),EHe=[{id:"today",label:(0,Pr.__)("Today"),getValue:()=>(0,En.getDate)(null)},{id:"yesterday",label:(0,Pr.__)("Yesterday"),getValue:()=>{let e=(0,En.getDate)(null);return xg(e,1)}},{id:"past-week",label:(0,Pr.__)("Past week"),getValue:()=>{let e=(0,En.getDate)(null);return xg(e,7)}},{id:"past-month",label:(0,Pr.__)("Past month"),getValue:()=>{let e=(0,En.getDate)(null);return $L(e,1)}}],THe=[{id:"last-7-days",label:(0,Pr.__)("Last 7 days"),getValue:()=>{let e=(0,En.getDate)(null);return[xg(e,7),e]}},{id:"last-30-days",label:(0,Pr.__)("Last 30 days"),getValue:()=>{let e=(0,En.getDate)(null);return[xg(e,30),e]}},{id:"month-to-date",label:(0,Pr.__)("Month to date"),getValue:()=>{let e=(0,En.getDate)(null);return[ske(e),e]}},{id:"last-year",label:(0,Pr.__)("Last year"),getValue:()=>{let e=(0,En.getDate)(null);return[KL(e,1),e]}},{id:"year-to-date",label:(0,Pr.__)("Year to date"),getValue:()=>{let e=(0,En.getDate)(null);return[UL(e),e]}}],Ym=e=>{if(!e)return null;let t=(0,En.getDate)(e);return t&&id(t)?t:null},YU=e=>e?typeof e=="string"?e:UU(e,"yyyy-MM-dd"):"";function Fke({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,l]=(0,Ot.useState)(void 0),u=(0,Ot.useCallback)(()=>{let f=Array.isArray(o)?o:[o];for(let m of f){let h=m.current;if(h&&!h.validity.valid){l({type:"invalid",message:h.validationMessage});return}}l(void 0)},[o]);return(0,Ot.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=t?Wt(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,Ot.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,Ot.useEffect)(()=>{if(!r)return;let f=t?Wt(s,t):void 0;f?l(f):u()},[r,s,t,u]),(0,$t.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,$t.jsx)("div",{"aria-live":"polite",children:a&&(0,$t.jsxs)("p",{className:G("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,$t.jsx)(Tn.Icon,{className:"components-validated-control__indicator-icon",icon:Cp,size:16,fill:"currentColor"}),a.message]})})]})}function BHe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:l,setValue:u,getValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),[p,g]=(0,Ot.useState)(null),b=m.weekStartsOn??(0,En.getSettings)().l10n.startOfWeek,v=d({item:e}),y=typeof v=="string"?v:void 0,[S,k]=(0,Ot.useState)(()=>Ym(y)||new Date),[_,x]=(0,Ot.useState)(!1),E=(0,Ot.useRef)(null),{minConstraint:B,maxConstraint:P,disabledMatchers:T}=P0(f,Ym),A=(0,Ot.useCallback)(j=>o(u({item:e,value:j})),[e,o,u]),I=(0,Ot.useCallback)(j=>{let O=j?UU(j,"yyyy-MM-dd"):void 0;A(O),g(null),x(!0)},[A]),R=(0,Ot.useCallback)(j=>{let O=j.getValue(),M=YU(O);k(O),A(M),g(j.id),x(!0)},[A]),V=(0,Ot.useCallback)(j=>{if(A(j),j){let O=Ym(j);O&&k(O)}g(null),x(!0)},[A]),{timezone:{string:N}}=(0,En.getSettings)(),U=a;return f?.required&&!n?U=`${a} (${(0,Pr.__)("Required")})`:!f?.required&&n&&(U=`${a} (${(0,Pr.__)("Optional")})`),(0,$t.jsx)(Fke,{field:t,validity:i,inputRefs:E,isTouched:_,setIsTouched:x,children:(0,$t.jsx)(Tn.BaseControl,{id:s,className:"dataviews-controls__date",label:U,help:l,hideLabelFromVision:r,children:(0,$t.jsxs)(Me,{direction:"column",gap:"lg",children:[(0,$t.jsxs)(Me,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[EHe.map(j=>{let O=p===j.id;return(0,$t.jsx)(Tn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:O,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>R(j),children:j.label},j.id)}),(0,$t.jsx)(Tn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!p,size:"small",disabled:!!p||h,accessibleWhenDisabled:!0,children:(0,Pr.__)("Custom")})]}),(0,$t.jsx)(Tn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:E,type:"date",label:(0,Pr.__)("Date"),hideLabelFromVision:!0,value:y,onChange:V,required:!!t.isValid?.required,disabled:h,min:B,max:P}),(0,$t.jsx)(wHe,{style:{width:"100%"},selected:y&&Ym(y)||void 0,onSelect:I,month:S,onMonthChange:k,timeZone:N||void 0,weekStartsOn:b,disabled:h||T,disableNavigation:h})]})})})}function PHe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:l,getValue:u,setValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),p,g=u({item:e});Array.isArray(g)&&g.length===2&&g.every(H=>typeof H=="string")&&(p=g);let b=m.weekStartsOn??(0,En.getSettings)().l10n.startOfWeek,{minConstraint:v,maxConstraint:y,disabledMatchers:S}=P0(f,Ym),k=(0,Ot.useCallback)(H=>{o(d({item:e,value:H}))},[e,o,d]),[_,x]=(0,Ot.useState)(null),E=(0,Ot.useMemo)(()=>{if(!p)return{from:void 0,to:void 0};let[H,Y]=p;return{from:Ym(H)||void 0,to:Ym(Y)||void 0}},[p]),[B,P]=(0,Ot.useState)(()=>E.from||new Date),[T,A]=(0,Ot.useState)(!1),I=(0,Ot.useRef)(null),R=(0,Ot.useRef)(null),V=(0,Ot.useCallback)((H,Y)=>{H&&Y?k([YU(H),YU(Y)]):!H&&!Y&&k(void 0)},[k]),N=(0,Ot.useCallback)(H=>{V(H?.from,H?.to),x(null),A(!0)},[V]),U=(0,Ot.useCallback)(H=>{let[Y,oe]=H.getValue();P(Y),V(Y,oe),x(H.id),A(!0)},[V]),j=(0,Ot.useCallback)((H,Y)=>{let[oe,K]=p||[void 0,void 0];if(V(H==="from"?Y:oe,H==="to"?Y:K),Y){let $=Ym(Y);$&&P($)}x(null),A(!0)},[p,V]),{timezone:O}=(0,En.getSettings)(),M=a;return t.isValid?.required&&!n?M=`${a} (${(0,Pr.__)("Required")})`:!t.isValid?.required&&n&&(M=`${a} (${(0,Pr.__)("Optional")})`),(0,$t.jsx)(Fke,{field:t,validity:i,inputRefs:[I,R],isTouched:T,setIsTouched:A,children:(0,$t.jsx)(Tn.BaseControl,{id:s,className:"dataviews-controls__date",label:M,help:l,hideLabelFromVision:r,children:(0,$t.jsxs)(Me,{direction:"column",gap:"lg",children:[(0,$t.jsxs)(Me,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[THe.map(H=>{let Y=_===H.id;return(0,$t.jsx)(Tn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:Y,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>U(H),children:H.label},H.id)}),(0,$t.jsx)(Tn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!_,size:"small",accessibleWhenDisabled:!0,disabled:!!_||h,children:(0,Pr.__)("Custom")})]}),(0,$t.jsxs)(Me,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,$t.jsx)(Tn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:I,type:"date",label:(0,Pr.__)("From"),hideLabelFromVision:!0,value:p?.[0],onChange:H=>j("from",H),required:!!t.isValid?.required,disabled:h,min:v,max:y}),(0,$t.jsx)(Tn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:R,type:"date",label:(0,Pr.__)("To"),hideLabelFromVision:!0,value:p?.[1],onChange:H=>j("to",H),required:!!t.isValid?.required,disabled:h,min:v,max:y})]}),(0,$t.jsx)(CHe,{style:{width:"100%"},selected:E,onSelect:N,month:B,onMonthChange:P,timeZone:O.string||void 0,weekStartsOn:b,disabled:h||S})]})})})}function zke({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===ei||i===Ai?(0,$t.jsx)(ZL,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===Jn?(0,$t.jsx)(PHe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,$t.jsx)(BHe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var JL=c(D(),1),jke=c(L(),1);var qU=c(C(),1),{ValidatedSelectControl:RHe}=Qt(JL.privateApis);function eM({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{type:s,label:a,description:l,getValue:u,setValue:d,isValid:f}=t,m=t.isDisabled({item:e,field:t}),h=s==="array",p=u({item:e})??(h?[]:""),g=(0,jke.useCallback)(y=>o(d({item:e,value:y})),[e,o,d]),{elements:b,isLoading:v}=Li({elements:t.elements,getElements:t.getElements});return v?(0,qU.jsx)(JL.Spinner,{}):(0,qU.jsx)(RHe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Wt(f,i),label:a,value:p,help:l,options:b,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:h,disabled:m})}var ZU=c(C(),1),IHe=10;function Hke(e){let{field:t}=e,{elements:o}=Li({elements:t.elements,getElements:t.getElements});return o.length>=IHe?(0,ZU.jsx)(qL,{...e}):(0,ZU.jsx)(eM,{...e})}var oM=c(D(),1);var Uke=c(D(),1),Gke=c(L(),1);var Wke=c(C(),1),{ValidatedInputControl:OHe}=Qt(Uke.privateApis);function Ec({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,type:i,prefix:s,suffix:a,validity:l}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:p}=t,g=m({item:e}),b=t.isDisabled({item:e,field:t}),v=(0,Gke.useCallback)(y=>o(h({item:e,value:y})),[e,h,o]);return(0,Wke.jsx)(OHe,{required:!!p.required,markWhenOptional:n,customValidity:Wt(p,l),label:u,placeholder:d,value:g??"",help:f,onChange:v,hideLabelFromVision:r,type:i,prefix:s,suffix:a,disabled:b,pattern:p.pattern?p.pattern.constraint:void 0,minLength:p.minLength?p.minLength.constraint:void 0,maxLength:p.maxLength?p.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var tM=c(C(),1);function $ke({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,tM.jsx)(Ec,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,tM.jsx)(oM.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,tM.jsx)(oM.Icon,{icon:ED})})})}var nM=c(D(),1);var rM=c(C(),1);function Kke({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,rM.jsx)(Ec,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,rM.jsx)(nM.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,rM.jsx)(nM.Icon,{icon:AS})})})}var sM=c(D(),1);var iM=c(C(),1);function Yke({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,iM.jsx)(Ec,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,iM.jsx)(sM.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,iM.jsx)(sM.Icon,{icon:li})})})}var ad=c(D(),1),I0=c(L(),1),aM=c(z(),1);var qm=c(C(),1),{ValidatedNumberControl:AHe}=Qt(ad.privateApis);function qke(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function LHe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,I0.useCallback)(l=>t([qke(l),i]),[t,i]),a=(0,I0.useCallback)(l=>t([n,qke(l)]),[t,n]);return(0,qm.jsx)(ad.BaseControl,{help:(0,aM.__)("The max. value must be greater than the min. value."),children:(0,qm.jsxs)(ad.Flex,{direction:"row",gap:4,children:[(0,qm.jsx)(ad.__experimentalNumberControl,{label:(0,aM.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,qm.jsx)(ad.__experimentalNumberControl,{label:(0,aM.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function lM({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){let a=t.format?.decimals??0,l=Math.pow(10,Math.abs(a)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,p=f({item:e})??"",g=t.isDisabled({item:e,field:t}),b=(0,I0.useCallback)(y=>{o(m({item:e,value:["",void 0].includes(y)?void 0:Number(y)}))},[e,o,m]),v=(0,I0.useCallback)(y=>{o(m({item:e,value:y}))},[e,o,m]);if(i===Jn){let y=["",""];return Array.isArray(p)&&p.length===2&&p.every(S=>typeof S=="number"||S==="")&&(y=p),(0,qm.jsx)(LHe,{value:y,onChange:v,hideLabelFromVision:r,step:l})}return(0,qm.jsx)(AHe,{required:!!h.required,markWhenOptional:n,customValidity:Wt(h,s),label:u,help:d,value:p,onChange:b,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:l,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0,disabled:g})}var Zke=c(C(),1);function Xke(e){return(0,Zke.jsx)(lM,{...e})}var Qke=c(C(),1);function Jke(e){return(0,Qke.jsx)(lM,{...e})}var cM=c(D(),1),eSe=c(L(),1);var XU=c(C(),1),{ValidatedRadioControl:MHe}=Qt(cM.privateApis);function tSe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:l,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),{elements:m,isLoading:h}=Li({elements:t.elements,getElements:t.getElements}),p=l({item:e}),g=(0,eSe.useCallback)(b=>o(u({item:e,value:b})),[e,o,u]);return h?(0,XU.jsx)(cM.Spinner,{}):(0,XU.jsx)(MHe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Wt(d,i),label:s,help:a,onChange:g,options:m,selected:p,hideLabelFromVision:r,disabled:f})}var QU=c(L(),1);var oSe=c(C(),1);function rSe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:l}=i||{};return(0,oSe.jsx)(Ec,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,QU.createElement)(a):void 0,suffix:l?(0,QU.createElement)(l):void 0})}var nSe=c(D(),1),iSe=c(L(),1);var sSe=c(C(),1),{ValidatedToggleControl:NHe}=Qt(nSe.privateApis);function aSe({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:l,setValue:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),m=(0,iSe.useCallback)(()=>{t(u({item:o,value:!l({item:o})}))},[t,u,o,l]);return(0,sSe.jsx)(NHe,{required:!!d.required,markWhenOptional:n,customValidity:Wt(d,i),hidden:r,label:s,help:a,checked:l({item:o}),onChange:m,disabled:f})}var lSe=c(D(),1),cSe=c(L(),1);var uSe=c(C(),1),{ValidatedTextareaControl:DHe}=Qt(lSe.privateApis);function dSe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},l=t.isDisabled({item:e,field:t}),{label:u,placeholder:d,description:f,setValue:m,isValid:h}=t,p=t.getValue({item:e}),g=(0,cSe.useCallback)(b=>o(m({item:e,value:b})),[e,o,m]);return(0,uSe.jsx)(DHe,{required:!!h.required,markWhenOptional:n,customValidity:Wt(h,s),label:u,placeholder:d,value:p??"",help:f,onChange:g,rows:a,disabled:l,minLength:h.minLength?h.minLength.constraint:void 0,maxLength:h.maxLength?h.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var Gk=c(D(),1),fSe=c(L(),1);var uM=c(C(),1),{ValidatedToggleGroupControl:VHe}=Qt(Gk.privateApis);function mSe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:l}=t,u=t.isDisabled({item:e,field:t}),d=s({item:e}),f=(0,fSe.useCallback)(g=>o(a({item:e,value:g})),[e,o,a]),{elements:m,isLoading:h}=Li({elements:t.elements,getElements:t.getElements});if(h)return(0,uM.jsx)(Gk.Spinner,{});if(m.length===0)return null;let p=m.find(g=>g.value===d);return(0,uM.jsx)(VHe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Wt(l,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:p?.description||t.description,onChange:f,value:d,hideLabelFromVision:r,children:m.map(g=>(0,uM.jsx)(Gk.__experimentalToggleGroupControlOption,{label:g.label,value:g.value,disabled:u},g.value))})}var dM=c(D(),1),fM=c(L(),1);var O0=c(C(),1),{ValidatedFormTokenField:FHe}=Qt(dM.privateApis);function pSe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:l,getValue:u,setValue:d,isValid:f}=t,m=u({item:e}),h=t.isDisabled({item:e,field:t}),{elements:p,isLoading:g}=Li({elements:t.elements,getElements:t.getElements}),b=(0,fM.useMemo)(()=>Array.isArray(m)?m.map(y=>p?.find(k=>k.value===y)||{value:y,label:y}):[],[m,p]),v=(0,fM.useCallback)(y=>{let S=y.map(k=>typeof k=="object"&&"value"in k?k.value:k);o(d({item:e,value:S}))},[o,d,e]);return g?(0,O0.jsx)(dM.Spinner,{}):(0,O0.jsx)(FHe,{required:!!f?.required,markWhenOptional:n,customValidity:Wt(f,i),label:r?void 0:s,value:b,onChange:v,placeholder:a,suggestions:p?.map(y=>y.value),disabled:h,__experimentalValidateInput:y=>t.isValid?.elements&&p?p.some(S=>S.value===y||S.label===y):!0,__experimentalExpandOnFocus:p&&p.length>0,help:l??(t.isValid?.elements?"":void 0),displayTransform:y=>typeof y=="object"&&"label"in y?y.label:typeof y=="string"&&p&&p.find(k=>k.value===y)?.label||y,__experimentalRenderItem:({item:y})=>{if(typeof y=="string"&&p){let S=p.find(k=>k.value===y);return(0,O0.jsx)("span",{children:S?.label||y})}return(0,O0.jsx)("span",{children:y})}})}var Mi=c(D(),1),JU=c(L(),1),hSe=c(z(),1);var ld=c(C(),1),{ValidatedInputControl:zHe}=Qt(Mi.privateApis),jHe=({color:e,onColorChange:t,disabled:o})=>{let r=e&&no(e).isValid()?e:"#ffffff";return(0,ld.jsx)(Mi.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,ld.jsx)(Mi.Button,{onClick:n,"aria-label":(0,hSe.__)("Open color picker"),size:"small",disabled:o,accessibleWhenDisabled:!0,icon:()=>(0,ld.jsx)(Mi.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,ld.jsx)(Mi.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,ld.jsx)(Mi.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function gSe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:l,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),m=t.getValue({item:e})||"",h=(0,JU.useCallback)(g=>{o(u({item:e,value:g}))},[e,o,u]),p=(0,JU.useCallback)(g=>{o(u({item:e,value:g||""}))},[e,o,u]);return(0,ld.jsx)(zHe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Wt(d,i),label:s,placeholder:a,value:m,help:l,onChange:p,hideLabelFromVision:r,type:"text",disabled:f,prefix:(0,ld.jsx)(Mi.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,ld.jsx)(jHe,{color:m,onColorChange:h,disabled:f})})})}var pM=c(D(),1),hM=c(L(),1),e7=c(z(),1);var mM=c(C(),1);function bSe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,hM.useState)(!1),l=t.isDisabled({item:e,field:t}),u=(0,hM.useCallback)(()=>{a(d=>!d)},[]);return(0,mM.jsx)(Ec,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,mM.jsx)(pM.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,mM.jsx)(pM.Button,{icon:s?wa:Pp,onClick:u,size:"small",label:s?(0,e7.__)("Hide password"):(0,e7.__)("Show password"),disabled:l,accessibleWhenDisabled:!0})})})}function gM(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var vSe=c(C(),1),ySe={adaptiveSelect:Hke,array:pSe,checkbox:Lke,color:gSe,combobox:qL,datetime:Vke,date:zke,email:$ke,telephone:Kke,url:Yke,integer:Xke,number:Jke,password:bSe,radio:tSe,select:eM,text:rSe,toggle:aSe,textarea:dSe,toggleGroup:mSe};function HHe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function UHe(e){let{control:t,...o}=e,r=bM(t);return r===null?null:function(i){return(0,vSe.jsx)(r,{...i,config:o})}}function kSe(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?bM(e.Edit):HHe(e.Edit)?UHe(e.Edit):gM(e)&&e.type!=="array"?bM("adaptiveSelect"):t===null?null:bM(t)}function bM(e){return Object.keys(ySe).includes(e)?ySe[e]:null}function GHe(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 SSe=GHe;var WHe=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},_Se=WHe;var $He=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},xSe=$He;var CSe=c(z(),1);function yM({item:e,field:t}){let{elements:o,isLoading:r}=Li({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 wSe=c(C(),1);function $o({item:e,field:t}){return t.hasElements?(0,wSe.jsx)(yM,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var Tc=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function Ko(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function Bc(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 Pc(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 Rc(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 Jt(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 KHe({item:e,field:t}){return t.getValue({item:e})}var oi=KHe;var YHe=/^[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 qHe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!YHe.test(o)?(0,CSe.__)("Value must be a valid email address."):null}var ESe={type:"email",render:$o,Edit:"email",sort:Tc,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xo,wo],validOperators:[Ro,Io,_c,xc,wc,xo,wo,wn,Cn],format:{},getValueFormatted:oi,validate:{required:Ko,pattern:Rc,minLength:Bc,maxLength:Pc,elements:Jt,custom:qHe}};var TSe=c(z(),1);var Wk=(e,t,o)=>o==="asc"?e-t:t-e;function vM(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 kM(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 BSe={separatorThousand:","};function ZHe({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=BSe: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 XHe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,TSe.__)("Value must be an integer."):null}var PSe={type:"integer",render:$o,Edit:"integer",sort:Wk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ro,Io,Nm,Dm,Vm,Fm,Jn],validOperators:[Ro,Io,Nm,Dm,Vm,Fm,Jn,xo,wo,wn,Cn],format:BSe,getValueFormatted:ZHe,validate:{required:Ko,min:vM,max:kM,elements:Jt,custom:XHe}};var RSe=c(z(),1);var ISe={separatorThousand:",",separatorDecimal:".",decimals:2};function QHe({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=ISe:r=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=r,a=o.toFixed(s),[l,u]=a.split("."),d=n?l.replace(/\B(?=(\d{3})+(?!\d))/g,n):l;return s===0?d:d+i+u}function JHe(e){return e===""||e===void 0||e===null}function e8e(e,t){let o=t.getValue({item:e});return!JHe(o)&&!Number.isFinite(o)?(0,RSe.__)("Value must be a number."):null}var OSe={type:"number",render:$o,Edit:"number",sort:Wk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ro,Io,Nm,Dm,Vm,Fm,Jn],validOperators:[Ro,Io,Nm,Dm,Vm,Fm,Jn,xo,wo,wn,Cn],format:ISe,getValueFormatted:QHe,validate:{required:Ko,min:vM,max:kM,elements:Jt,custom:e8e}};var ASe={type:"text",render:$o,Edit:"text",sort:Tc,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xo,wo],validOperators:[Ro,Io,_c,xc,wc,xo,wo,wn,Cn],format:{},getValueFormatted:oi,validate:{required:Ko,pattern:Rc,minLength:Bc,maxLength:Pc,elements:Jt}};var wg=c(lc(),1);var MSe=c(lc(),1);function LSe(e){if(!e||!id(new Date(e)))return null;let t=(0,MSe.getDate)(e);return t&&id(t)?t:null}function NSe(e,t,o){let r=t.isValid[o]?.constraint;if(typeof r!="string")return!1;let n=t.getValue({item:e}),i=Array.isArray(n)?n[o==="min"?0:n.length-1]:n;if(i==null||i==="")return!0;let s=LSe(r),a=LSe(String(i));return!!s&&!!a&&(o==="min"?a.getTime()>=s.getTime():a.getTime()<=s.getTime())}function SM(e,t){return NSe(e,t,"min")}function _M(e,t){return NSe(e,t,"max")}var DSe={datetime:(0,wg.getSettings)().formats.datetime,weekStartsOn:(0,wg.getSettings)().l10n.startOfWeek};function t8e({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=DSe:r=t.format,(0,wg.dateI18n)(r.datetime,(0,wg.getDate)(o))}var o8e=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},VSe={type:"datetime",render:$o,Edit:"datetime",sort:o8e,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Gm,Wm,zm,jm,Hm,Um,ei,Ai],validOperators:[Gm,Wm,zm,jm,Hm,Um,ei,Ai],format:DSe,getValueFormatted:t8e,validate:{required:Ko,elements:Jt,min:SM,max:_M}};var Cg=c(lc(),1);var FSe={date:(0,Cg.getSettings)().formats.date,weekStartsOn:(0,Cg.getSettings)().l10n.startOfWeek};function r8e({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=FSe:r=t.format,(0,Cg.dateI18n)(r.date,(0,Cg.getDate)(o))}var n8e=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},zSe={type:"date",render:$o,Edit:"date",sort:n8e,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Gm,Wm,zm,jm,Hm,Um,ei,Ai,Jn],validOperators:[Gm,Wm,zm,jm,Hm,Um,ei,Ai,Jn],format:FSe,getValueFormatted:r8e,validate:{required:Ko,elements:Jt,min:SM,max:_M}};var xM=c(z(),1);function jSe(e,t){return t.getValue({item:e})===!0}function i8e({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,xM.__)("True"):o===!1?(0,xM.__)("False"):""}function s8e(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,xM.__)("Value must be true, false, or undefined"):null}var a8e=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},HSe={type:"boolean",render:$o,Edit:"checkbox",sort:a8e,validate:{required:jSe,elements:Jt,custom:s8e},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ro,Io],validOperators:[Ro,Io],format:{},getValueFormatted:i8e};var USe={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:oi,validate:{}};var t7=c(z(),1);function GSe(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function WSe({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function l8e({item:e,field:t}){return WSe({item:e,field:t})}function c8e(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,t7.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,t7.__)("Every value must be a string.")}var u8e=(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)},$Se={type:"array",render:l8e,Edit:"array",sort:u8e,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xo,wo],validOperators:[xo,wo,wn,Cn],format:{},getValueFormatted:WSe,validate:{required:GSe,elements:Jt,custom:c8e}};function d8e({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var KSe={type:"password",render:$o,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:d8e,validate:{required:Ko,pattern:Rc,minLength:Bc,maxLength:Pc,elements:Jt}};var YSe={type:"telephone",render:$o,Edit:"telephone",sort:Tc,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xo,wo],validOperators:[Ro,Io,_c,xc,wc,xo,wo,wn,Cn],format:{},getValueFormatted:oi,validate:{required:Ko,pattern:Rc,minLength:Bc,maxLength:Pc,elements:Jt}};var qSe=c(z(),1);var $k=c(C(),1);function f8e({item:e,field:t}){if(t.hasElements)return(0,$k.jsx)(yM,{item:e,field:t});let o=oi({item:e,field:t});return!o||!no(o).isValid()?o:(0,$k.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,$k.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,$k.jsx)("span",{children:o})]})}function m8e(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!no(o).isValid()?(0,qSe.__)("Value must be a valid color."):null}var p8e=(e,t,o)=>{let r=no(e),n=no(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},ZSe={type:"color",render:f8e,Edit:"color",sort:p8e,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xo,wo],validOperators:[Ro,Io,xo,wo],format:{},getValueFormatted:oi,validate:{required:Ko,elements:Jt,custom:m8e}};var XSe={type:"url",render:$o,Edit:"url",sort:Tc,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xo,wo],validOperators:[Ro,Io,_c,xc,wc,xo,wo,wn,Cn],format:{},getValueFormatted:oi,validate:{required:Ko,pattern:Rc,minLength:Bc,maxLength:Pc,elements:Jt}};var h8e=(e,t,o)=>typeof e=="number"&&typeof t=="number"?Wk(e,t,o):Tc(e,t,o),QSe={render:$o,Edit:null,sort:h8e,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ro,Io],validOperators:Rke(),format:{},getValueFormatted:oi,validate:{required:Ko,elements:Jt}};function g8e(e){return e==="integer"||e==="number"}function b8e(e){return e==="date"||e==="datetime"}function JSe(e,t,o){let r=t.validate[o];if(r&&(typeof e=="number"&&g8e(t.type)||typeof e=="string"&&b8e(t.type)))return{constraint:e,validate:r}}function e_e(e,t){let o=e.isValid,r;o?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let n;(o?.elements===!0||o?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(n={constraint:!0,validate:t.validate.elements});let i=JSe(o?.min,t,"min"),s=JSe(o?.max,t,"max"),a=o?.minLength,l;typeof a=="number"&&t.validate.minLength!==void 0&&(l={constraint:a,validate:t.validate.minLength});let u=o?.maxLength,d;typeof u=="number"&&t.validate.maxLength!==void 0&&(d={constraint:u,validate:t.validate.maxLength});let f=o?.pattern,m;f!==void 0&&t.validate.pattern!==void 0&&(m={constraint:f,validate:t.validate.pattern});let h=o?.custom??t.validate.custom;return{required:r,elements:n,min:i,max:s,minLength:l,maxLength:d,pattern:m,custom:h}}function t_e(e){return e.validOperators.reduce((t,o)=>{let r=Pke(o);return r?.filter&&(t[o]=r.filter),t},{})}function y8e(e,t){return{...t.format,...e.format}}var o_e=y8e;function v8e(e){let t=[ESe,PSe,OSe,ASe,VSe,zSe,HSe,USe,$Se,KSe,YSe,ZSe,XSe].find(o=>o?.type===e);return t||QSe}function A0(e){return e.map(t=>{let o=v8e(t.type),r=t.getValue||_Se(t.id),n=function(i,s,a){let l=r({item:i}),u=r({item:s});return t.sort?t.sort(l,u,a):o.sort(l,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||xSe(t.id),elements:t.elements,getElements:t.getElements,hasElements:gM(t),isVisible:t.isVisible,isDisabled:typeof t.isDisabled=="function"?t.isDisabled:()=>!!t.isDisabled,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:kSe(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:e_e(t,o),filterBy:SSe(t,o.defaultOperators,o.validOperators),filter:t_e(o),format:o_e(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var a7=c(L(),1);var r_e=c(L(),1),n_e=c(C(),1),o7=(0,r_e.createContext)({fields:[]});o7.displayName="DataFormContext";function i_e({fields:e,children:t}){return(0,n_e.jsx)(o7.Provider,{value:{fields:e},children:t})}var ya=o7;var AM=c(L(),1);var CM=c(L(),1),M0=c(D(),1);var L0=c(z(),1),Bn={type:"regular",labelPosition:"top"},k8e=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 s_e(e){let t=Bn;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let o=e.summary??[],r=Array.isArray(o)?o:[o],n=e?.openAs,i;typeof n=="object"&&n.type==="modal"?i={type:"modal",applyLabel:n.applyLabel?.trim()||(0,L0.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,L0.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,L0.__)("Apply"),cancelLabel:(0,L0.__)("Cancel")}:i={type:"dropdown"},t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:i,summary:r,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let o=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:k8e(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 a_e(e){let t=s_e(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?s_e(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:a_e({fields:r.children,layout:Bn}).fields}}});return{layout:t,fields:o}}var wM=a_e;var Co=c(C(),1);function S8e({title:e}){return(0,Co.jsx)(Me,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Co.jsx)(Me,{direction:"row",align:"center",children:(0,Co.jsx)(M0.__experimentalHeading,{level:2,size:13,children:e})})})}function l_e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,CM.useContext)(ya),a=t.layout,l=(0,CM.useMemo)(()=>({layout:Bn,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Co.jsxs)(Co.Fragment,{children:[!r&&t.label&&(0,Co.jsx)(S8e,{title:t.label}),(0,Co.jsx)(Ni,{data:e,form:l,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,Co.jsxs)(Me,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Co.jsx)("div",{className:G("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,Co.jsx)(M0.BaseControl.VisualLabel,{children:d.label})}),(0,Co.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,Co.jsx)(d.render,{item:e,field:d}):(0,Co.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,Co.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,Co.jsx)(Co.Fragment,{children:(0,Co.jsxs)(Co.Fragment,{children:[!r&&u!=="none"&&(0,Co.jsx)(M0.BaseControl.VisualLabel,{children:d.label}),(0,Co.jsx)(d.render,{item:e,field:d})]})}):(0,Co.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var i7=c(QI(),1),Eg=c(D(),1),Sl=c(L(),1),PM=c(te(),1);var EM=c(D(),1),Kk=c(z(),1);var p_e=c(te(),1);var r7=c(L(),1);function _8e(e,t){return G("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var c_e=_8e;var u_e=c(D(),1);var Zm=c(C(),1);function x8e(e,t,o){return e?(0,Zm.jsxs)(lt.Root,{children:[(0,Zm.jsx)(lt.Trigger,{render:(0,Zm.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,Zm.jsx)(u_e.Icon,{icon:Cp,size:16}),(0,Zm.jsxs)(ct,{children:[t,": "]}),o]})}),(0,Zm.jsx)(lt.Popup,{children:t})]}):o}var d_e=x8e;function f_e(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=f_e(o);if(r)return r}}var m_e=f_e;var ri=c(C(),1);function N0({data:e,field:t,fieldLabel:o,summaryFields:r,validity:n,touched:i,disabled:s,isOpen:a,onClick:l}){let{labelPosition:u,editVisibility:d}=t.layout,f=m_e(n),m=i&&!!f,h=c_e(u,m),p=d_e(m,f,o),g=G("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,p_e.useInstanceId)(N0,"dataforms-layouts-panel__field-control"),v=m?(0,Kk.sprintf)((0,Kk._x)("Edit %s (has errors)","field"),o||""):(0,Kk.sprintf)((0,Kk._x)("Edit %s","field"),o||""),y=(0,r7.useRef)(null),S=(0,r7.useRef)(null);return(0,ri.jsxs)("div",{ref:y,className:g,onClick:s?void 0:x=>{!a&&x.detail<2&&!S.current?.contains(x.target)&&y.current?.ownerDocument.defaultView?.getSelection()?.toString()||l()},onKeyDown:s?void 0:x=>{x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),l())},children:[u!=="none"&&(0,ri.jsx)("span",{className:h,children:p}),u==="none"&&m&&(0,ri.jsxs)(lt.Root,{children:[(0,ri.jsx)(lt.Trigger,{render:(0,ri.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",role:"img","aria-label":f,children:(0,ri.jsx)(EM.Icon,{icon:Cp,size:16})})}),(0,ri.jsx)(lt.Popup,{children:f})]}),(0,ri.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,ri.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(x=>(0,ri.jsx)("span",{style:{width:"100%"},children:(0,ri.jsx)(x.render,{item:e,field:x})},x.id))}):r.map(x=>(0,ri.jsx)(x.render,{item:e,field:x},x.id))}),!s&&(0,ri.jsx)(EM.Button,{ref:S,className:"dataforms-layouts-panel__field-trigger-icon",label:v,icon:Bp,size:"small","aria-expanded":a,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var h_e=c(QI(),1),n7=c(hp(),1),Ic=c(L(),1),ni=c(z(),1);function g_e(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?g_e(r):r.type!=="invalid"&&r.type!=="validating")):!0}function w8e(e,t){let o=wM(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]=A0([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[l]=A0([a]);return{id:s.id,children:[],field:l}}return o.fields.map(n).filter(s=>s!==null)}function Yk(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 b_e(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 l=t[a];if(!n[l])return e;n[l]={...n[l]},n=n[l]}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 C8e(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(l=>{if(a===r.current[t.id]){if(!Array.isArray(l)){n(u=>Yk(u,{elements:{type:"invalid",message:(0,ni.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:l})?n(u=>Yk(u,{elements:{type:"invalid",message:(0,ni.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>b_e(u,[...i,t.id],"elements"))}}).catch(l=>{if(a!==r.current[t.id])return;let u;l instanceof Error?u=l.message:u=String(l)||(0,ni.__)("Unknown error when running elements validation asynchronously."),n(d=>Yk(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function E8e(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(l=>b_e(l,[...i,t.id],"custom"));return}if(typeof a=="string"){n(l=>Yk(l,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(l=>Yk(l,{custom:{type:"invalid",message:(0,ni.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(a=>{if(s!==r.current[t.id])return;let l;a instanceof Error?l=a.message:l=String(a)||(0,ni.__)("Unknown error when running custom validation asynchronously."),n(u=>Yk(u,{custom:{type:"invalid",message:l}},[...i,t.id]))})}function y_e(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,ni.__)("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,ni.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,ni.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,ni.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,ni.__)("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,ni.__)("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,h_e.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,ni.__)("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"&&(C8e(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,ni.__)("Validating\u2026")}),r instanceof Promise&&(E8e(r,t,o),n.custom={type:"validating",message:(0,ni.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=y_e(e,a,{...o,path:[...o.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([a,l])=>{l!==void 0&&(s[a]=l)}),Object.keys(s).length===0?void 0:{children:s}}}function v_e(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>v_e(n,t));return r?{value:o,children:r}:o}function T8e(e,t,o){let[r,n]=(0,Ic.useState)(),i=(0,Ic.useRef)({}),s=(0,Ic.useRef)({}),a=(0,Ic.useRef)({}),l=(0,Ic.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=w8e(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let p=v_e(h,e);if(a.current.hasOwnProperty(h.id)&&(0,n7.default)(a.current[h.id],p)){m.push(h.id);return}a.current[h.id]=p;let g=y_e(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,n7.default)(h,p)?h:p})},[e,t,o]);return(0,Ic.useEffect)(()=>{l()},[l]),{validity:r,isValid:g_e(r)}}var k_e=T8e;var S_e=c(L(),1);function Xm(e,t){(0,S_e.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var __e=c(L(),1);function B8e(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var TM=(e,t)=>Array.isArray(e)&&e.length>0?B8e(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var P8e=(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 R8e(e){let{fields:t}=(0,__e.useContext)(ya),o=e.layout,r=TM(o.summary,t),n=P8e(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 BM=R8e;var ii=c(C(),1);function I8e({data:e,field:t,onChange:o,fieldLabel:r,onClose:n,touched:i}){let{openAs:s}=t.layout,{applyLabel:a,cancelLabel:l}=s,{fields:u}=(0,Sl.useContext)(ya),[d,f]=(0,Sl.useState)({}),m=(0,Sl.useMemo)(()=>(0,i7.default)(e,d,{arrayMerge:(_,x)=>x}),[e,d]),h=(0,Sl.useMemo)(()=>({layout:Bn,fields:t.children?t.children:[{id:t.id,layout:Bn}]}),[t]),p=u.map(_=>({..._,Edit:_.Edit===null?void 0:_.Edit,isValid:{required:_.isValid.required?.constraint,elements:_.isValid.elements?.constraint,min:_.isValid.min?.constraint,max:_.isValid.max?.constraint,pattern:_.isValid.pattern?.constraint,minLength:_.isValid.minLength?.constraint,maxLength:_.isValid.maxLength?.constraint}})),{validity:g}=k_e(m,p,h),b=()=>{o(d),n()},v=_=>{f(x=>(0,i7.default)(x,_,{arrayMerge:(E,B)=>B}))},y=(0,PM.useFocusOnMount)("firstInputElement"),S=(0,Sl.useRef)(null),k=(0,PM.useMergeRefs)([y,S]);return Xm(S,i),(0,ii.jsxs)(Eg.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,ii.jsx)("div",{ref:k,children:(0,ii.jsx)(Ni,{data:m,form:h,onChange:v,validity:g,children:(_,x,E,B)=>(0,ii.jsx)(_,{data:m,field:x,onChange:v,hideLabelFromVision:h.fields.length<2,markWhenOptional:B,validity:E},x.id)})}),(0,ii.jsxs)(Me,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,ii.jsx)(Eg.__experimentalSpacer,{style:{flex:1}}),(0,ii.jsx)(Eg.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:l}),(0,ii.jsx)(Eg.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:a})]})]})}function O8e({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,Sl.useState)(!1),[s,a]=(0,Sl.useState)(!1),{fieldDefinition:l,fieldLabel:u,summaryFields:d}=BM(t);if(!l)return null;let f=()=>{a(!1),i(!0)};return(0,ii.jsxs)(ii.Fragment,{children:[(0,ii.jsx)(N0,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:l.readOnly===!0,onClick:()=>a(!0),isOpen:s}),s&&(0,ii.jsx)(I8e,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var x_e=O8e;var Qm=c(D(),1),w_e=c(z(),1),cd=c(L(),1);var C_e=c(te(),1);var Pn=c(C(),1);function A8e({title:e,onClose:t}){return(0,Pn.jsx)(Me,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Pn.jsxs)(Me,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Pn.jsx)(Qm.__experimentalHeading,{level:2,size:13,children:e}),(0,Pn.jsx)(Qm.__experimentalSpacer,{style:{flex:1}}),t&&(0,Pn.jsx)(Qm.Button,{label:(0,w_e.__)("Close"),icon:vp,onClick:t,size:"small"})]})})}function L8e({touched:e,children:t}){let o=(0,cd.useRef)(null);return Xm(o,e),(0,Pn.jsx)("div",{ref:o,children:t})}function M8e({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,cd.useState)(!1),[s,a]=(0,cd.useState)(null),l=(0,cd.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,C_e.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,cd.useMemo)(()=>({layout:Bn,fields:t.children?t.children:[{id:t.id,layout:Bn}]}),[t]),m=(0,cd.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:h,fieldLabel:p,summaryFields:g}=BM(t);return h?(0,Pn.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Pn.jsx)(Qm.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:l,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:v})=>(0,Pn.jsx)(N0,{data:e,field:t,fieldLabel:p,summaryFields:g,validity:r,touched:n,disabled:h.readOnly===!0,isOpen:b,onClick:v}),renderContent:({onClose:b})=>(0,Pn.jsx)(L8e,{touched:n,children:(0,Pn.jsxs)("div",{ref:u,...d,children:[(0,Pn.jsx)(A8e,{title:p,onClose:b}),(0,Pn.jsx)(Ni,{data:e,form:f,onChange:o,validity:m,children:(v,y,S,k)=>(0,Pn.jsx)(v,{data:e,field:y,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:k,validity:S},y.id)})]})})})}):null}var E_e=M8e;var s7=c(C(),1);function T_e({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs.type==="modal"?(0,s7.jsx)(x_e,{data:e,field:t,onChange:o,validity:r}):(0,s7.jsx)(E_e,{data:e,field:t,onChange:o,validity:r})}var Di=c(L(),1);var RM=c(z(),1),B_e=c(C(),1);function P_e(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+=P_e(r);return t}function IM({validity:e}){let t=P_e(e);return t===0?null:(0,B_e.jsx)(U4,{intent:"high",children:(0,RM.sprintf)((0,RM._n)("%d field needs attention","%d fields need attention",t),t)})}var Yo=c(C(),1);function N8e(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 D8e({data:e,fields:t,label:o,layout:r,isOpen:n,touched:i,validity:s}){let l=TM(r.summary,t).filter(f=>N8e(f,r.summary,n)),u=i&&r.isCollapsible,d=l.length>0&&r.withHeader;return(0,Yo.jsxs)(Me,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,Yo.jsx)(Ul.Title,{children:o}),(u||d)&&(0,Yo.jsxs)(sh.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,Yo.jsx)(IM,{validity:s}),d&&(0,Yo.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:l.map(f=>(0,Yo.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function V8e({data:e,field:t,form:o,onChange:r,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:a}){if(t.children)return(0,Yo.jsxs)(Yo.Fragment,{children:[t.description&&(0,Yo.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,Yo.jsx)(Ni,{data:e,form:o,onChange:r,validity:s?.children})]});let l=Tg("regular")?.component;return l?(0,Yo.jsx)(l,{data:e,field:t,onChange:r,hideLabelFromVision:n||a,markWhenOptional:i,validity:s}):null}function R_e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,Di.useContext)(ya),a=t.layout,l=(0,Di.useRef)(null),u=(0,Di.useMemo)(()=>({layout:Bn,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=a,[m,h]=(0,Di.useState)(d),[p,g]=(0,Di.useState)(!1);(0,Di.useEffect)(()=>{h(d)},[d]);let b=(0,Di.useCallback)(x=>{x||g(!0),h(x)},[]),v=(0,Di.useCallback)(()=>{g(!0)},[]);Xm(l,(f?m:!0)&&p);let y=t.label,S;if(t.children)S=!!y&&a.withHeader;else{let x=s.find(E=>E.id===t.id);if(!x||!x.Edit)return null;y=x.label,S=!!y&&a.withHeader}let k=(0,Yo.jsx)(V8e,{data:e,field:t,form:u,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,withHeader:S}),_=(0,Yo.jsx)(D8e,{data:e,fields:s,label:y,layout:a,isOpen:f?!!m:!0,touched:p,validity:i});return S&&f?(0,Yo.jsxs)(sh.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:b,children:[(0,Yo.jsx)(sh.Header,{children:_}),(0,Yo.jsx)(sh.Content,{ref:l,onBlur:v,children:k})]}):(0,Yo.jsxs)(Ul.Root,{className:"dataforms-layouts-card__field",children:[S&&(0,Yo.jsx)(Ul.Header,{children:_}),(0,Yo.jsx)(Ul.Content,{ref:l,onBlur:v,children:k})]})}var I_e=c(D(),1);var $r=c(C(),1);function F8e({title:e}){return(0,$r.jsx)(Me,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,$r.jsx)(Me,{direction:"row",align:"center",children:(0,$r.jsx)(I_e.__experimentalHeading,{level:2,size:13,children:e})})})}var z8e=({children:e})=>(0,$r.jsx)($r.Fragment,{children:e});function O_e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let l={layout:Bn,fields:t.children};return(0,$r.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,$r.jsx)(F8e,{title:t.label}),(0,$r.jsx)(Me,{direction:"row",align:s.alignment,gap:"lg",children:(0,$r.jsx)(Ni,{data:e,form:l,onChange:o,validity:i?.children,as:z8e,children:(u,d,f)=>(0,$r.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,$r.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=Tg("regular")?.component;return a?(0,$r.jsx)($r.Fragment,{children:(0,$r.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,$r.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var Vi=c(L(),1),A_e=c(z(),1);var ud=c(C(),1);function L_e({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,Vi.useContext)(ya),i=(0,Vi.useRef)(null),s=(0,Vi.useRef)(null),[a,l]=(0,Vi.useState)(!1),[u,d]=(0,Vi.useState)(!1),f=(0,Vi.useMemo)(()=>({layout:Bn,fields:t.children??[]}),[t]);(0,Vi.useEffect)(()=>{let b=i.current;if(!b)return;let v=()=>{let y=b.open;y||l(!0),d(y)};return b.addEventListener("toggle",v),()=>{b.removeEventListener("toggle",v)}},[]),Xm(s,u&&a);let m=(0,Vi.useCallback)(()=>{l(!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,ud.jsx)(p.render,{item:e,field:p}):g=t.label||(0,A_e.__)("More details"),(0,ud.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,ud.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,ud.jsxs)(Me,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[g,a&&(0,ud.jsx)(IM,{validity:r})]})}),(0,ud.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,ud.jsx)(Ni,{data:e,form:f,onChange:o,validity:r?.children})})]})}var Bg=c(C(),1),j8e=[{type:"regular",component:l_e,wrapper:({children:e})=>(0,Bg.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:T_e,wrapper:({children:e})=>(0,Bg.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:R_e,wrapper:({children:e})=>(0,Bg.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:O_e,wrapper:({children:e,layout:t})=>(0,Bg.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Bg.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Bg.jsx)(Me,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:L_e}];function Tg(e){return j8e.find(t=>t.type===e)}var OM=c(C(),1),H8e=({children:e})=>(0,OM.jsx)(Me,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function Ni({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,AM.useContext)(ya),a=(0,AM.useMemo)(()=>{let d=s.filter(m=>!!m.isValid?.required).length,f=s.length-d;return d>f},[s]);function l(d){return s.find(f=>f.id===d.id)}let u=i??Tg(t.layout.type)?.wrapper??H8e;return(0,OM.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=Tg(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:l(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,r?.[d.id],a):(0,OM.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var l7=c(C(),1);function D0({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,a7.useMemo)(()=>wM(t),[t]),s=(0,a7.useMemo)(()=>A0(o),[o]);return t.fields?(0,l7.jsx)(i_e,{fields:s,children:(0,l7.jsx)(Ni,{data:e,form:i,onChange:r,validity:n})}):null}var ep=c(L(),1),Z_e=c(z(),1);var Zk=c(D(),1);var c7=c(z(),1);var M_e=c(te(),1);function qk({isControl:e}={isControl:!1}){return(0,M_e.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var LM=c(C(),1);function N_e({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=qk();return!e||e.length===0?null:(0,LM.jsx)(Zk.DropdownMenu,{icon:Ui,label:(0,c7.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,LM.jsx)(Zk.MenuGroup,{label:(0,c7.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,LM.jsx)(Zk.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?Ts:null,children:i.label},i.id)})})})}var MM=c(D(),1),D_e=c(te(),1),V_e=c(W(),1),dd=c(L(),1),F_e=c(Qr(),1);var _l=c(C(),1),{useRichText:U8e}=F(F_e.privateApis);function z_e({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,V_e.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:l}=n,[u,d]=(0,dd.useState)({start:void 0,end:void 0}),[f,m]=(0,dd.useState)(!1),h=(0,dd.useRef)(),p=(0,dd.useRef)(new Set),g=(0,dd.useRef)(new Set),b=Jv({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function v(){h.current?.focus()}let{value:y,getValue:S,onChange:k,ref:_,formatTypes:x}=U8e({value:s,onChange(P){r(t.setValue({item:e,value:P}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(P,T)=>d({start:P,end:T}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,dd.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:l}),[t.id,l])}),{baseControlProps:E,controlProps:B}=(0,MM.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,_l.jsxs)(_l.Fragment,{children:[f&&(0,_l.jsx)(nk.Provider,{value:g,children:(0,_l.jsx)(sk.Provider,{value:p,children:(0,_l.jsx)("div",{children:(0,_l.jsx)(oA,{value:y,onChange:k,onFocus:v,formatTypes:x,forwardedRef:h,isVisible:!1})})})}),(0,_l.jsx)(MM.BaseControl,{...E,children:(0,_l.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,D_e.useMergeRefs)([_,J2({registry:i,getValue:S,onChange:k,formatTypes:x,selectionChange:d,isSelected:f,disableFormats:a?.disableFormats,value:y,tagName:"div",disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:g,inputEvents:p}),h]),onFocus:()=>m(!0),onBlur:()=>m(!1),contentEditable:!0,...B})})]})}var Jm=c(D(),1),j_e=c(W(),1),H_e=c(at(),1),U_e=c(L(),1),Pg=c(z(),1);var Oo=c(C(),1),G8e=e=>{window.requestAnimationFrame(()=>{let[t]=H_e.focus.tabbable.find(e?.current);t&&t.focus()})};function W8e({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,Oo.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,Oo.jsx)("img",{alt:"",width:20,height:20,src:o.media_type==="image"?o.source_url:o.poster})});if(n.length===1){let a=t.getValue({item:e})?.url;if(n[0]==="image"&&a)return(0,Oo.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,Oo.jsx)("img",{alt:"",width:20,height:20,src:a})});let l;if(n[0]==="image"?l=wS:n[0]==="video"?l=H5:n[0]==="audio"?l=XN:l=Gg,l)return(0,Oo.jsx)(Jm.Icon,{icon:l,size:20})}return(0,Oo.jsx)(Jm.Icon,{icon:Gg,size:20})}function G_e({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=qk({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:l=!1}=r,u=i?.id,d=i?.url,f=(0,j_e.useSelect)(p=>{if(!u)return;let b=p(w).getSettings()[kC];if(b)return b(p,u)},[u]),m;if(s.length===1){let p=s[0];p==="image"?m=(0,Pg.__)("Image"):p==="video"?m=(0,Pg.__)("Video"):p==="application"?m=(0,Pg.__)("File"):m=(0,Pg.__)("Media")}else m=(0,Pg.__)("Media");let h=(0,U_e.useRef)();return(0,Oo.jsx)(Qa,{children:(0,Oo.jsxs)("div",{ref:h,className:"block-editor-content-only-controls",children:[(0,Oo.jsx)(Zv,{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:{}}))},...l&&{useFeaturedImage:!!i?.featuredImage,onToggleFeaturedImage:()=>{o(t.setValue({item:e,value:{featuredImage:!i?.featuredImage}}))}},onSelect:p=>{if(p.id&&p.url){let g={...p,mediaType:p.media_type};l&&(g.featuredImage=!1),o(t.setValue({item:e,value:g}))}},renderToggle:p=>(0,Oo.jsx)(Jm.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...p,children:(0,Oo.jsxs)(Jm.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"20px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)(W8e,{attachment:f,field:t,data:e,config:r}),(0,Oo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"20px",height:"20px"}}),(0,Oo.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})}),d&&(0,Oo.jsx)(Jm.Button,{label:(0,Pg.__)("Reset"),className:"block-editor-content-only-controls__media-reset",size:"small",icon:Xr,onClick:()=>{o(t.setValue({item:e,value:{}})),G8e(h)}})]})})}var fd=c(D(),1),DM=c(L(),1),W_e=c(z(),1);var $_e=c(ji(),1);var fn=c(C(),1),u7="noopener",K_e="_blank",NM="nofollow";function $8e({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=K_e,i=i?.includes(u7)?i:i+` ${u7}`;else{let s=new RegExp(`\\b${u7}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(NM)?i:(i+` ${NM}`).trim();else{let s=new RegExp(`\\b${NM}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,$_e.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function Y_e({data:e,field:t,onChange:o}){let[r,n]=(0,DM.useState)(!1),{popoverProps:i}=qk({isControl:!0}),s=t.getValue({item:e}),a=s?.url,l=s?.rel||"",d=s?.linkTarget===K_e,f=l===NM,m=(0,DM.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsx)(fd.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,fn.jsxs)(fd.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsx)(fd.Icon,{icon:li,size:24}),(0,fn.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsx)(fd.Icon,{icon:li,size:24,style:{opacity:.3}}),(0,fn.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,W_e.__)("Link")})]})]})}),r&&(0,fn.jsx)(fd.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,fn.jsx)(vm,{value:m,onChange:h=>{let p=$8e({rel:l,...h});o(t.setValue({item:e,value:p}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var mn=c(C(),1),{fieldsKey:X_e,formKey:d7}=F(Xk.privateApis);function f7(e,t={}){return function(r){return(0,mn.jsx)(e,{...r,config:t})}}function K8e({clientId:e,blockType:t,setAttributes:o,isMultiBlock:r=!1}){let n=tn({clientId:e,context:"list-view"}),i=lo(e),s=t?.[X_e],a=(0,ep.useContext)(pn),l=(0,FM.useSelect)(v=>{let y=v(w).getBlockAttributes(e);if(!y?.metadata?.bindings)return y;let{__experimentalBlockBindingsSupportedAttributes:S}=v(w).getSettings(),k=S?.[t?.name],_=k?mC(y.metadata.bindings,k):y.metadata.bindings,{getBlockBindingsSource:x}=F(v(Xk.store));return Object.entries(_).reduce((E,[B,P])=>{if(B==="__default")return E;let T=x(P.source);if(!T)return E;let A=T.getValues({select:v,clientId:e,context:a,bindings:{[B]:P}});return{...E,...A}},y)},[a,e,t?.name]),{selectBlock:u,toggleBlockHighlight:d}=(0,FM.useDispatch)(w),f=(0,q_e.useDebounce)(d,50),m=(0,ep.useMemo)(()=>r?{...t?.[d7],fields:[t?.[d7]?.fields?.[0]]}:t?.[d7],[t,r]),[h,p]=(0,ep.useState)(m),g=(0,ep.useMemo)(()=>s?.length?s.map(v=>{let y={...v};return typeof v.Edit=="string"&&v.Edit==="rich-text"?y.Edit=f7(z_e,{clientId:e}):typeof v.Edit=="string"&&v.Edit==="link"?y.Edit=f7(Y_e):typeof v.Edit=="object"&&v.Edit.control==="media"&&(y.Edit=f7(G_e,{...v.Edit})),y}):[],[s,e]);if(!s?.length)return null;let b=v=>{p(y=>y.fields?.includes(v)?{...y,fields:y.fields.filter(S=>S!==v)}:{...y,fields:[...y.fields||[],v]})};return(0,mn.jsxs)("div",{className:"block-editor-block-fields__container",onMouseEnter:r?()=>f(e,!0):void 0,onMouseLeave:()=>r?f(e,!1):void 0,onFocus:r?()=>{u(e,null)}:void 0,children:[(0,mn.jsx)("div",{className:"block-editor-block-fields__header",children:(0,mn.jsxs)(VM.__experimentalHStack,{spacing:1,children:[r&&(0,mn.jsxs)(mn.Fragment,{children:[(0,mn.jsx)(rt,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,mn.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,mn.jsx)(VM.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,mn.jsx)(N_e,{fields:g,visibleFields:h.fields,onToggleField:b})]}),!r&&(0,mn.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Z_e.__)("Content")})]})}),(0,mn.jsx)(D0,{data:l,fields:g,form:h,onChange:o})]})}function Y8e(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,Xk.getBlockType)(e)?.[X_e])}function q8e(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,ep.useContext)(qr);return(0,mn.jsx)(Bh,{group:"content",children:(0,mn.jsx)(K8e,{...e,blockType:t,isMultiBlock:o})})}var Q_e={edit:q8e,hasSupport:Y8e,attributeKeys:[],supportsPatternEditing:!0};var h7=c(zt(),1),J_e=c(D(),1),m7=c(z(),1),V0=c(ee(),1);var p7=c(C(),1);function Z8e(e){return(0,V0.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function X8e({className:e,setAttributes:t}){return Go()!=="default"?null:(0,p7.jsx)(me,{group:"advanced",children:(0,p7.jsx)(J_e.TextControl,{autoComplete:"off",label:(0,m7.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,m7.__)("Separate multiple classes with spaces.")})})}var g7={edit:X8e,addSaveProps:Q8e,attributeKeys:["className"],hasSupport(e){return(0,V0.hasBlockSupport)(e,"customClassName",!0)}};function Q8e(e,t,o){return(0,V0.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=G(e.className,o.className)),e}function J8e(e,t,o,r){if(!(0,V0.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,h7.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",Z8e);(0,h7.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",J8e);var exe=c(zt(),1),F0=c(ee(),1);function eUe(e,t){return(0,F0.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,F0.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,F0.getBlockDefaultClassName)(t.name)),e}(0,exe.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",eUe);var k7=c(L(),1),dxe=c(zt(),1),fxe=c(W(),1);var xl=c(ee(),1),mxe=c(te(),1),rp=c(f_(),1);var Qk=c(L(),1),jM=c(W(),1),zM=c(ee(),1),ixe=c(Xe(),1);var Oc=c(L(),1),txe=c(Wx(),1);var z0=c(C(),1);function oxe({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=dt(e),[i,s]=(0,Oc.useReducer)(()=>o(n));(0,Oc.useEffect)(()=>{n&&r&&s()},[n,r]),(0,Oc.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,Oc.useRef)(t),[l,u]=(0,Oc.useState)(!1);return(0,Oc.useEffect)(()=>{if((0,txe.isShallowEqual)(t,a.current)||r)return;u(!0),a.current=t;let d=setTimeout(()=>{u(!1)},400);return()=>{u(!1),clearTimeout(d)}},[t,r]),!l&&!r?null:(0,z0.jsx)(Ks,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,z0.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function tp(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function rxe({clientId:e,value:t,forceShow:o}){return(0,z0.jsx)(oxe,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=tp(r,"margin-top"),i=tp(r,"margin-right"),s=tp(r,"margin-bottom"),a=tp(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 nxe({clientId:e,value:t,forceShow:o}){return(0,z0.jsx)(oxe,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:tp(r,"padding-top"),borderRightWidth:tp(r,"padding-right"),borderBottomWidth:tp(r,"padding-bottom"),borderLeftWidth:tp(r,"padding-left")}),forceShow:o})}var md=c(C(),1),Ac="dimensions",j0="spacing";function tUe(){let[e,t]=(0,Qk.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=F((0,jM.useDispatch)(w));return(0,Qk.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function oUe({children:e,resetAllFilter:t}){let o=(0,Qk.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,md.jsx)(me,{group:"dimensions",resetAllFilter:o,children:e})}function sxe({clientId:e,name:t,setAttributes:o,settings:r}){let n=qs(),i=!Fr(n),s=NA(r,n),a=(0,jM.useSelect)(g=>{if(s)return g(w).getBlockAttributes(e)?.style},[e,s]),[l,u]=tUe(),d=i?Bo(a,n):a,f=i?g=>{o({style:xn(a,n,g)})}:g=>{o({style:ge(g)})};if(!s)return null;let m=(0,zM.getBlockSupport)(t,[Ac,"__experimentalDefaultControls"]),h=(0,zM.getBlockSupport)(t,[j0,"__experimentalDefaultControls"]),p={minHeight:!1,minWidth:!1,...m,...h};return(0,md.jsxs)(md.Fragment,{children:[(0,md.jsx)(DA,{as:oUe,panelId:e,settings:r,value:d,onChange:f,defaultControls:p,styleState:n,onVisualize:i?void 0:u}),!i&&!!r?.spacing?.padding&&l==="padding"&&(0,md.jsx)(nxe,{forceShow:l==="padding",clientId:e,value:d}),!i&&!!r?.spacing?.margin&&l==="margin"&&(0,md.jsx)(rxe,{forceShow:l==="margin",clientId:e,value:d})]})}function axe(e,t="any"){let o=(0,zM.getBlockSupport)(e,Ac);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width||o?.minWidth):!!o?.[t]}function b7(e){return e?`${e}`.trim().toLowerCase()!=="auto":!1}var lxe={useBlockProps:rUe,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return axe(e)}};function rUe({name:e,height:t,minHeight:o,style:r}){if(!axe(e,"aspectRatio")||bt(e,Ac,"aspectRatio"))return{};let n=b7(r?.dimensions?.aspectRatio),i=G({"has-aspect-ratio":n}),s={};return n?(s.minHeight="unset",s.height="unset"):(o||r?.dimensions?.minHeight||t||r?.dimensions?.height)&&(s.aspectRatio="unset"),{className:i,style:s}}function y7(){(0,ixe.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var nUe=c(ee(),1);function cxe(e,t,o=""){if(typeof t!="string"||!t)return tc(e).map(i=>`${i.trim()}${o}`).join(", ");let r=tc(e).filter(i=>i.trim()),n=tc(t).filter(i=>i.trim());return n.length?n.map(i=>{i=i.trim();let s=i.match(/^([.#]?[-_a-zA-Z0-9]+|\[[^\]]+\])/);return s?r.map(a=>`${a.trim()}${i.slice(s[0].length)}${o}`).join(", "):r.map(a=>`${a.trim()}${o}`).join(", ")}).join(", "):r.map(i=>`${i.trim()}${o}`).join(", ")}var op=c(C(),1),iUe=["Top","Right","Bottom","Left"],sUe={"@mobile":"@media (width <= 480px)","@tablet":"@media (480px < width <= 782px)"},aUe=[...Vye,pg,Wr,Ac,gg,j0,b0],S7=e=>aUe.some(t=>(0,xl.hasBlockSupport)(e,t));function ys(e={}){let t={};return(0,rp.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function lUe(e){let t=e?.border;if(!t)return;let o=!!t.style,r=!!t.color,n=!!t.width,i={};return!o&&(r||n)&&(i.style="solid"),iUe.forEach(s=>{let a=s.toLowerCase(),l=t[a],u=!!l?.style,d=!!l?.color,f=!!l?.width;!o&&!u&&(d||f)&&(i[a]={style:"solid"})}),ge({border:ge(i)})}function cUe(e,t){if(!!!e?.color?.background)return;let r=!!e?.color?.gradient,n=!!e?.background?.gradient||!!e?.background?.backgroundImage;if(r||n)return;let i="background-image: unset !important";return t?`${t} { ${i}; }`:`${i};`}function uUe(e){let t=e?.dimensions;if(t){if(b7(t.aspectRatio))return{dimensions:{minHeight:"unset",height:"unset"}};if(t.minHeight||t.height)return{dimensions:{aspectRatio:"unset"}}}}function dUe(e,t){let o=uUe(e),r=o?_7(e,o):e,n=(0,rp.compileCSS)(r,{selector:t}),i=n?n.replace(/;/g," !important;"):void 0,s=lUe(e),a=s?(0,rp.compileCSS)(s,{selector:t}):void 0,l=cUe(e,t);return[i,a,l].filter(Boolean).join(`
175 `)}function UM(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function _7(e={},t={}){let o={...e};return Object.entries(t).forEach(([r,n])=>{o[r]=UM(n)&&UM(o[r])?_7(o[r],n):n}),o}function HM(e,t,o){let r=t||"",n=e.get(r)||{selector:t,style:{}};e.set(r,{selector:t,style:_7(n.style,o)})}function fUe(e,t){let o=(0,xl.getBlockType)(t)?.selectors||{},r=new Map;return Object.entries(e||{}).forEach(([n,i])=>{let s=o[n];if(typeof s=="string"){HM(r,s,{[n]:i});return}if(UM(s)&&UM(i)){let a={...i};Object.entries(s).forEach(([l,u])=>{l==="root"||typeof u!="string"||!Object.hasOwn(i,l)||(HM(r,u,{[n]:{[l]:i[l]}}),delete a[l])}),Object.keys(a).length&&HM(r,s.root||o.root,{[n]:a});return}HM(r,o.root,{[n]:i})}),Array.from(r.values())}function x7(e,t){let{name:o,baseSelector:r,state:n=""}=t,i=fUe(e,o).map(({selector:s,style:a})=>dUe(a,cxe(r,s,n))).filter(Boolean);return i.length?i.join(`
176 `):void 0}function mUe(e,t){if(!e)return e;let o={...e};return t.forEach(r=>{delete o[r]}),o}function pxe(e,t,o){let r=EL[t];if(!r)return[];let n=[];return r.forEach(i=>{let s=e?.[i];if(s){let a=x7(s,{name:t,baseSelector:o,state:i});a&&n.push(a)}}),n}function pUe(e,t,o){let r=[],i=["elements",...EL[t]??[]];return Object.entries(sUe).forEach(([s,a])=>{let l=Bo(e,{viewport:s,pseudo:xi.pseudo});if(!l)return;let u=[],d=x7(mUe(l,i),{name:t,baseSelector:o});d&&u.push(d);let f=bxe(l.elements,t,o);f&&u.push(f),u.push(...pxe(l,t,o)),u.length&&r.push(`${a}{${u.join("")}}`)}),r}function uxe(e,t){let o=Bo(e,t);if(!ku(t))return o;let r={...t,viewport:xi.viewport},n=Bo(e,r);return n&&o?JI(n,o):o||n}function hUe(e){return!S7(e)&&!(0,xl.hasBlockSupport)(e,"customCSS",!0)||e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e}var hxe={[`${pg}.__experimentalSkipSerialization`]:["border"],[`${Wr}.__experimentalSkipSerialization`]:[Wr],[`${ma}.__experimentalSkipSerialization`]:[ma],[`${Ac}.__experimentalSkipSerialization`]:[Ac],[`${j0}.__experimentalSkipSerialization`]:[j0],[`${b0}.__experimentalSkipSerialization`]:[b0]},gUe={...hxe,[`${Ac}.aspectRatio`]:[`${Ac}.aspectRatio`],[`${gg}`]:[gg]},bUe={[`${Ac}.aspectRatio`]:!0,[`${gg}`]:!0},yUe={gradients:"gradient"};function v7(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;v7(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function gxe(e,t,o,r=gUe){if(!S7(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=bUe[i]||(0,xl.getBlockSupport)(t,i);a===!0&&(n=v7(n,s)),Array.isArray(a)&&a.forEach(l=>{let u=yUe[l]||l;n=v7(n,[[...s,u]])})}),e.style={...ys(n),...e.style},e}function vUe({clientId:e,name:t,setAttributes:o,style:r,__unstableParentLayout:n}){let i=fa(t,n),s=Go(),{globalBlockStyles:a,selectedState:l,showStateOnCanvas:u}=(0,fxe.useSelect)(p=>{let g=p(w),{getSelectedBlockStyleState:b,isSelectedBlockStyleStateShownOnCanvas:v}=F(g);return{globalBlockStyles:g.getSettings()?.[ai]?.blocks?.[t],selectedState:b(e),showStateOnCanvas:v(e)}},[e,t]),d=el(l),f=(0,k7.useMemo)(()=>{if(!u||!d)return;let p=uxe(a,l),g=uxe(r,l),b;if(p&&g)b=JI(p,g);else if(g)b=g;else if(p)b=p;else return;return x7(b,{name:t,baseSelector:`[data-block="${e}"]`})},[u,d,a,r,l,e,t]);if(wi({css:f}),s!=="default")return null;let m={...i,typography:{...i.typography,textAlign:!1}},h={clientId:e,name:t,setAttributes:o,settings:m};return(0,op.jsxs)(Tie,{value:l,children:[(0,op.jsx)(dL,{...h}),(0,op.jsx)(aL,{...h}),(0,op.jsx)(vL,{...h}),(0,op.jsx)(iye,{...h}),(0,op.jsx)(sxe,{...h})]})}var GM={edit:vUe,hasSupport:S7,addSaveProps:gxe,attributeKeys:["style"],useBlockProps:_Ue},kUe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],SUe={};function bxe(e,t,o){if(!e)return;let r=[];return kUe.forEach(({elementType:n,pseudo:i,elements:s})=>{if(bt(t,Wr,n))return;let l=e?.[n];if(l){let u=Zy(o,xl.__EXPERIMENTAL_ELEMENTS[n]);r.push((0,rp.compileCSS)(l,{selector:u})),i&&i.forEach(d=>{l[d]&&r.push((0,rp.compileCSS)(l[d],{selector:Zy(o,`${xl.__EXPERIMENTAL_ELEMENTS[n]}${d}`)}))})}s&&s.forEach(u=>{e[u]&&r.push((0,rp.compileCSS)(e[u],{selector:Zy(o,xl.__EXPERIMENTAL_ELEMENTS[u])}))})}),r.length>0?r.join(""):void 0}function _Ue({name:e,style:t}){let o=(0,mxe.useInstanceId)(SUe,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,k7.useMemo)(()=>{let s=[],a=bxe(n,e,r);return a&&s.push(a),s.push(...pxe(t,e,r)),s.push(...pUe(t,e,r)),s.length>0?s.join(""):void 0},[r,n,e,t]);return wi({css:i}),gxe({className:o},e,{style:t},hxe)}(0,dxe.addFilter)("blocks.registerBlockType","core/style/addAttribute",hUe);var yxe=c(zt(),1),vxe=c(ee(),1),xUe=e=>(0,vxe.hasBlockSupport)(e,"__experimentalSettings",!1);function wUe(e){return xUe(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,yxe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",wUe);var np=c(ee(),1),_xe=c(te(),1),xxe=c(zt(),1),H0=c(L(),1);function CUe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=no(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 kxe(e){return`${e}{filter:none}`}function Sxe(e,t){return`${e}{filter:url(#${t})}`}function WM(e,t){let o=CUe(t);return`
177 <svg
178 xmlns:xlink="http://www.w3.org/1999/xlink"
179 viewBox="0 0 0 0"
180 width="0"
181 height="0"
182 focusable="false"
183 role="none"
184 aria-hidden="true"
185 style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
186 >
187 <defs>
188 <filter id="${e}">
189 <!--
190 Use sRGB instead of linearRGB so transparency looks correct.
191 Use perceptual brightness to convert to grayscale.
192 -->
193 <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>
194 <!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
195 <feComponentTransfer color-interpolation-filters="sRGB">
196 <feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR>
197 <feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG>
198 <feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB>
199 <feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA>
200 </feComponentTransfer>
201 <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
202 <feComposite in2="SourceGraphic" operator="in"></feComposite>
203 </filter>
204 </defs>
205 </svg>`}var pd=c(C(),1),w7=[],EUe=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");_d([xd]);function C7({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=ke(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,H0.useMemo)(()=>[...r||w7,...n||w7,...o&&i||w7],[o,r,n,i])}function wxe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function TUe(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 BUe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=fa(o),i=Go(),s=C7({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=C7({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[l,u]=ke("color.custom","color.customDuotone"),d=!l,f=!u||a?.length===0&&d;if(s?.length===0&&f||i!=="default")return null;let m=r==="unset"||Array.isArray(r)?r:wxe(r,s);return(0,pd.jsxs)(pd.Fragment,{children:[(0,pd.jsx)(me,{group:"filter",children:(0,pd.jsx)(UA,{value:{filter:{duotone:m}},onChange:h=>{let p={...e,color:{...h?.filter}};t({style:ge(p)})},settings:n})}),(0,pd.jsx)(yo,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,pd.jsx)(JO,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:h=>{let p=TUe(h,s),g={...e,color:{...e?.color,duotone:p??h}};t({style:ge(g)})},settings:n})})]})}var E7={shareWithChildBlocks:!0,edit:BUe,useBlockProps:OUe,attributeKeys:["style"],hasSupport(e){return(0,np.hasBlockSupport)(e,"filter.duotone")}};function PUe(e){return(0,np.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function RUe({clientId:e,id:t,selector:o,attribute:r}){let n=C7({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:wxe(r,n),a=typeof r=="string"&&s,l=typeof r=="string"&&!a,u=null;a?u=s:(l||i)&&(u=r);let m=o.split(",").map(g=>`.${t}${g.trim()}`).join(", "),h=Array.isArray(u)||u==="unset";Bu(h?{css:u!=="unset"?Sxe(m,t):kxe(m),__unstableType:"presets"}:void 0),Bu(h?{assets:u!=="unset"?WM(t,u):"",__unstableType:"svgs"}:void 0);let p=dt(e);(0,H0.useEffect)(()=>{if(h&&p&&EUe){let g=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",g)}},[h,p,u])}var IUe={};function OUe({clientId:e,name:t,style:o}){let r=(0,_xe.useInstanceId)(IUe),n=(0,H0.useMemo)(()=>{let l=(0,np.getBlockType)(t);if(l){if(!(0,np.getBlockSupport)(l,"filter.duotone",!1))return null;let d=(0,np.getBlockSupport)(l,"color.__experimentalDuotone",!1);if(d){let f=is(l);return typeof d=="string"?Zy(f,d):f}return is(l,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return RUe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,xxe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",PUe);var KM=c(L(),1),U0=c(W(),1),Cxe=c(te(),1),G0=c(ee(),1),W0=c(z(),1);var Exe=c(Wi(),1);var $M=c(C(),1),AUe={},LUe={};function MUe({blockName:e,setAttributes:t,style:o}){if(Go()!=="default")return null;let n=(0,G0.getBlockType)(e);function i(a){let l=a?.css?.trim()?a.css:void 0;t({style:ge({...a,css:l})})}let s=(0,W0.sprintf)((0,W0.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value, e.g. color: red;."),n?.title);return(0,$M.jsx)(me,{group:"advanced",children:(0,$M.jsx)($A,{value:o,onChange:i,inheritedValue:o,help:s})})}var NUe="custom-css-edit-warning";function DUe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,U0.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(w);return{style:s(e)?.style||LUe,canEditCSS:a().canEditCSS}},[e]);return n?(0,$M.jsx)(MUe,{blockName:t,setAttributes:o,style:r}):null}function VUe({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&V8(t),r=(0,U0.useSelect)(u=>u(w).getSettings().canEditCSS,[]),{createWarningNotice:n}=(0,U0.useDispatch)(Exe.store),i=!!t?.trim();(0,KM.useEffect)(()=>{!r&&i&&n((0,W0.__)("This post contains blocks with custom CSS. You do not have permission to edit CSS. If you save this post, the custom CSS will be removed."),{id:NUe,isDismissible:!0})},[r,i,n]);let s=(0,Cxe.useInstanceId)(AUe,"wp-custom-css"),a=`.${s}`,l=(0,KM.useMemo)(()=>{if(o)return nO(t,a)},[t,a,o]);return wi({css:l}),o?{className:`has-custom-css ${s}`}:{}}function FUe(e,t,o){if(!(0,G0.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 YM={edit:DUe,useBlockProps:VUe,addSaveProps:FUe,attributeKeys:["style"],hasSupport(e){return(0,G0.hasBlockSupport)(e,"customCSS",!0)}};var ZM=c(te(),1),P7=c(zt(),1),Bxe=c(L(),1),wl=c(ee(),1),XM=c(W(),1),Cl=c(D(),1),Rg=c(z(),1);var Kr=c(C(),1),zUe="is-style-",qM="layout",jUe={"@mobile":"@media (width <= 480px)","@tablet":"@media (480px < width <= 782px)"},T7=["selfStretch","flexSize","columnStart","columnSpan","rowStart","rowSpan"],{kebabCase:B7}=F(Cl.privateApis);function HUe(e={},t){let o=e?.default;return t?.attributes?.layout??o}function Txe(e={},t){return ge({...HUe(e,t)})}function UUe(e={},t={},o={}){let r={},n=Object.fromEntries(T7.filter(i=>Object.hasOwn(o||{},i)).map(i=>[i,o[i]]));return Object.entries(e||{}).forEach(([i,s])=>{!T7.includes(i)&&s!==t?.[i]&&(r[i]=s)}),ge({...n,...r})}function GUe(e={}){return Object.fromEntries(Object.entries(e||{}).filter(([t])=>!T7.includes(t)))}function R7(e){return(0,wl.hasBlockSupport)(e,"layout")||(0,wl.hasBlockSupport)(e,"__experimentalLayout")}function QM(e={},t=""){let{layout:o}=e,{default:r}=(0,wl.getBlockSupport)(t,qM)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if($i[n?.type||"default"]?.className){let a=$i[n?.type||"default"]?.className,l=t.split("/"),d=`wp-block-${l[0]==="core"?l.pop():l.join("-")}-${a}`;i.push(a,d)}return(0,XM.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(w).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${B7(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${B7(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function I7(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=As(i?.type||"default"),[a]=ke("spacing.blockGap"),l=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:l})}function WUe({attributes:e={},blockName:t,selector:o,layout:r={},hasBlockGapSupport:n,globalBlockGapValue:i}){return Object.entries(jUe).map(([s,a])=>{let l=Bo(e?.style,{viewport:s,pseudo:xi.pseudo}),u=GUe(l?.layout),d=Object.keys(u).length>0,f=l?.spacing&&Object.hasOwn(l.spacing,"blockGap"),m=l?.spacing&&Object.hasOwn(l.spacing,"padding");if(!d&&!f&&!m)return"";let p=As(r?.type||"default")?.getLayoutStyle?.({blockName:t,selector:o,layout:r,viewportOverrides:u,style:l,hasBlockGapSupport:n,globalBlockGapValue:i});return p?`${a}{${p}}`:""}).filter(Boolean).join("")}function $Ue({layout:e,style:t,setAttributes:o,name:r,clientId:n}){let i=fa(r),{layout:s}=i,{themeSupportsLayout:a,activeBlockVariation:l,selectedState:u}=(0,XM.useSelect)(Q=>{let X=Q(w),{getBlockAttributes:J,getSettings:ie}=X,{getSelectedBlockStyleState:se}=F(X);return{activeBlockVariation:Q(wl.store).getActiveBlockVariation(r,J(n)||{},"block"),themeSupportsLayout:ie().supportsLayout,selectedState:se?.(n)??xi}},[r,n]),d=Go(),f=ku(u)&&!el(u),m=(0,Bxe.useCallback)((...Q)=>{let X=Q[0]||{},J=Q[1]||{};if(f){let re=Bo(X.style??t,u)||{},le=ge({...re,layout:void 0});return{style:xn(X.style??t,u,le)}}let ie=J.name||r,se=(0,wl.getBlockSupport)(ie,qM,{});return{layout:Txe(se,l)}},[r,l,f,u,t]);if(d!=="default")return null;let h=(0,wl.getBlockSupport)(r,qM,{}),p={...s,...h},{allowSwitching:g,allowEditing:b=!0,allowInheriting:v=!0,default:y}=p;if(!b)return null;let S=e||y||{},k=f?Bo(t,u):void 0,_=k?.layout,x=f?ge({...S,..._})||{}:S,E=f?S:Txe(h,l),B={...h,...x},{type:P,default:{type:T="default"}={}}=B,A=P||T,I=!!(v&&(!A||A==="default"||A==="constrained"||B.inherit)),{inherit:R=!1,contentSize:V=null}=x;if((A==="default"||A==="constrained")&&!a)return null;let N=As(A),U=As("constrained"),j=!x.type&&(V||R),O=!!R||!!V,M=Fr(u)&&!R&&g,H=Q=>{if(f){let X=ge({...k,layout:UUe(ge(Q),S,k?.layout)});o({style:xn(t,u,X)});return}o({layout:ge(Q)})},Y=Q=>H({type:Q}),oe=()=>H(E),K=()=>H({type:"default"}),Z=()=>N?.name==="constrained"||O,q=()=>f?(x?.type??"default")!==(E?.type??"default"):e?.type==="constrained",$=()=>(x?.type??"default")!==(E?.type??"default");return(0,Kr.jsxs)(Kr.Fragment,{children:[(0,Kr.jsxs)(me,{group:"layout",resetAllFilter:m,children:[I&&(0,Kr.jsx)(Cl.__experimentalToolsPanelItem,{label:(0,Rg.__)("Use content width"),hasValue:q,onDeselect:K,isShownByDefault:!0,panelId:n,children:(0,Kr.jsx)(Cl.ToggleControl,{label:(0,Rg.__)("Inner blocks use content width"),checked:Z(),onChange:()=>H({type:Z()?"default":"constrained"}),help:Z()?(0,Rg.__)("Nested blocks use content width with options for full and wide widths."):(0,Rg.__)("Nested blocks will fill the width of this container.")})}),M&&(0,Kr.jsx)(Cl.__experimentalToolsPanelItem,{label:(0,Rg.__)("Layout type"),hasValue:$,onDeselect:oe,isShownByDefault:!0,panelId:n,children:(0,Kr.jsx)(KUe,{type:A,onChange:Y})}),N&&N.name!=="default"&&(0,Kr.jsx)(N.inspectorControls,{layout:x,value:e,onChange:H,layoutBlockSupport:p,resetLayout:E,name:r,clientId:n}),U&&j&&(0,Kr.jsx)(U.inspectorControls,{layout:x,value:e,onChange:H,layoutBlockSupport:p,resetLayout:E,name:r,clientId:n})]}),!R&&N&&(0,Kr.jsx)(N.toolBarControls,{layout:x,onChange:H,layoutBlockSupport:h,name:r,clientId:n})]})}var Pxe={shareWithChildBlocks:!0,edit:$Ue,attributeKeys:["layout","style"],hasSupport(e){return R7(e)}};function KUe({type:e,onChange:t}){return(0,Kr.jsx)(Cl.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Rg.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:r$().map(({name:o,label:r})=>(0,Kr.jsx)(Cl.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function YUe(e){return"type"in(e.attributes?.layout??{})||R7(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function qUe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,layoutClasses:n}){let{name:i,attributes:s}=t,a=(0,ZM.useInstanceId)(e),{layout:l}=s,{default:u}=(0,wl.getBlockSupport)(i,qM)||{},d=l?.inherit||l?.contentSize||l?.wideSize?{...l,type:"constrained"}:l||u||{},f=`wp-container-${B7(i)}-is-layout-`,m=`.${f}${a}`,h=o!==null,g=As(d?.type||"default")?.getLayoutStyle?.({blockName:i,selector:m,layout:d,style:s?.style,hasBlockGapSupport:h,globalBlockGapValue:r}),b=WUe({attributes:s,blockName:i,selector:m,layout:d,hasBlockGapSupport:h,globalBlockGapValue:r}),v=[g,b].filter(Boolean).join(""),y=G({[`${f}${a}`]:!!v},n);return wi({css:v}),(0,Kr.jsx)(e,{...t,__unstableLayoutClassNames:y})}var ZUe=(0,ZM.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=R7(n),a=QM(i,n),l=(0,XM.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=F(u(w)),m=d(),{disableLayoutStyles:h}=m;if(h)return;let[p]=f(r,"spacing.blockGap"),g=m[ai],b,v=i?.className;if(v?.includes(zUe)){let{getBlockStyles:S}=u(wl.store),k=S(n),_=Pj(v,k);b=_?g?.blocks?.[n]?.variations?.[_]?.spacing?.blockGap:void 0}let y=b??g?.blocks?.[n]?.spacing?.blockGap??g?.spacing?.blockGap;return{blockGapSupport:p,globalBlockGapValue:y}},[s,r,i?.className,n]);return l?(0,Kr.jsx)(qUe,{block:e,props:o,layoutClasses:a,...l}):(0,Kr.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,P7.addFilter)("blocks.registerBlockType","core/layout/addAttribute",YUe);(0,P7.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",ZUe);var Vxe=c(te(),1),rN=c(W(),1),Fxe=c(L(),1);var va=c(L(),1),ip=c(W(),1),Ixe=c(te(),1);function K0(e,t){return Array.from({length:t},(o,r)=>e+r)}var El=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 cr(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function $0(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 hd(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 XUe(e,t){let o=parseFloat(cr(e,"column-gap")),r=parseFloat(cr(e,"row-gap")),n=$0(cr(e,"grid-template-columns"),o),i=$0(cr(e,"grid-template-rows"),r),s=hd(n,t.left)+1,a=hd(i,t.top)+1,l=hd(n,t.right,"end")+1,u=hd(i,t.bottom,"end")+1;return new El({columnStart:s,columnEnd:l,rowStart:a,rowEnd:u})}function Rxe(e){return XUe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function O7(e){let t=cr(e,"grid-template-columns"),o=cr(e,"grid-template-rows"),r=cr(e,"border-top-width"),n=cr(e,"border-right-width"),i=cr(e,"border-bottom-width"),s=cr(e,"border-left-width"),a=cr(e,"padding-top"),l=cr(e,"padding-right"),u=cr(e,"padding-bottom"),d=cr(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,h=f*m;return{numColumns:f,numRows:m,numItems:h,currentColor:cr(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:cr(e,"gap"),inset:`
206 calc(${a} + ${r})
207 calc(${l} + ${n})
208 calc(${u} + ${i})
209 calc(${d} + ${s})
210 `}}}var vs=c(C(),1);function Y0({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,ip.useSelect)(a=>a(w).getSettings().isDistractionFree,[]),i=dt(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,vs.jsx)(QUe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var QUe=(0,va.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,va.useState)(()=>O7(t)),[a,l]=(0,va.useState)(!1),u=dt(r),d=(0,va.useMemo)(()=>u?Rxe(u):null,[u]);return(0,va.useEffect)(()=>{let f=()=>s(O7(t)),m=new window.ResizeObserver(f);m.observe(t,{box:"border-box"});let h=new window.ResizeObserver(f);h.observe(t);for(let p of t.children)h.observe(p);return()=>{m.disconnect(),h.disconnect()}},[t]),(0,va.useEffect)(()=>{function f(){l(!0)}function m(){l(!1)}return document.addEventListener("drag",f),document.addEventListener("dragend",m),()=>{document.removeEventListener("drag",f),document.removeEventListener("dragend",m)}},[]),(0,vs.jsx)(Ks,{className:G("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,vs.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,vs.jsx)(e7e,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,vs.jsx)(JUe,{gridInfo:i,childGridRect:d})})})});function JUe({gridInfo:e,childGridRect:t}){return K0(1,e.numRows).map(o=>K0(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,vs.jsx)(Oxe,{color:n},`${o}-${r}`)}))}function e7e({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,va.useState)(null),i=(0,ip.useSelect)(a=>{let{getBlockOrder:l,getBlockStyles:u}=F(a(w)),d=l(e);return u(d)},[e]),s=(0,va.useMemo)(()=>{let a=[];for(let l of Object.values(i)){let{columnStart:u,rowStart:d,columnSpan:f=1,rowSpan:m=1}=l?.layout??{};!u||!d||a.push(new El({columnStart:u,rowStart:d,columnSpan:f,rowSpan:m}))}return a},[i]);return K0(1,t.numRows).map(a=>K0(1,t.numColumns).map(l=>{let u=o?.contains(l,a),d=t.currentColor;u&&(d="transparent");let f=s.some(h=>h.contains(l,a)),m=r?.contains(l,a)??!1;return(0,vs.jsx)(Oxe,{color:d,className:m&&"is-highlighted",children:f&&!u?(0,vs.jsx)(t7e,{column:l,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,vs.jsx)(o7e,{column:l,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${l}`)}))}function Oxe({color:e,children:t,className:o}){return(0,vs.jsx)("div",{className:G("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 Axe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:l}=(0,ip.useSelect)(w),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,ip.useDispatch)(w),m=cg(o,r.numColumns);return r7e({validateDrag(h){let p=l(h);if(!a(p,o))return!1;let g=i(h),b=new El({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new El({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(h){let p=i(h);n(new El({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 t7e({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,vs.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:Axe(e,t,o,r,n)})}function o7e({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,ip.useDispatch)(w),l=cg(o,r.numColumns);return(0,vs.jsx)(Vf,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:Axe(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,l(e,t)))}})}function r7e({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,ip.useSelect)(w);return(0,Ixe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var Lxe=c(D(),1),q0=c(L(),1);var JM=c(C(),1);function A7({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=dt(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,JM.jsx)(n7e,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function n7e({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,q0.useState)(null),[l,u]=(0,q0.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,q0.useEffect)(()=>{let h=new window.ResizeObserver(()=>{let p=o.getBoundingClientRect(),g=r.getBoundingClientRect(),b=p.top>g.top,v=p.bottom<g.bottom,y=p.left>g.left,S=p.right<g.right;u({top:(i||!v)&&b,bottom:v,left:(i||!S)&&y,right:S})});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,JM.jsx)(Ks,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,JM.jsx)(Lxe.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:l.bottom,bottomLeft:!1,bottomRight:!1,left:l.left,right:l.right,top:l.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(cr(r,"column-gap")),v=parseFloat(cr(r,"row-gap")),y=$0(cr(r,"grid-template-columns"),b),S=$0(cr(r,"grid-template-rows"),v),k=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),_=hd(y,k.left)+1,x=hd(S,k.top)+1,E=hd(y,k.right,"end")+1,B=hd(S,k.bottom,"end")+1;n({columnSpan:E-_+1,rowSpan:B-x+1,columnStart:i?_:void 0,rowStart:i?x:void 0})}})})}var ka=c(z(),1),eN=c(D(),1);var Mxe=c(W(),1),Nxe=c(te(),1);var Rn=c(C(),1);function L7({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,Mxe.useDispatch)(w),a=e?.columnStart??1,l=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,m=l+d-1,h=t?.columnCount,p=t?.rowCount,g=cg(r,h);return(0,Rn.jsx)(yo,{group:"parent",children:(0,Rn.jsxs)(eN.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Rn.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Rn.jsx)(Z0,{icon:(0,ka.isRTL)()?Sr:In,label:(0,ka.__)("Move left"),description:(0,ka.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,l))}})}),(0,Rn.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Rn.jsx)(Z0,{className:"is-up-button",icon:yp,label:(0,ka.__)("Move up"),description:(0,ka.__)("Move up"),isDisabled:l<=1,onClick:()=>{o({rowStart:l-1}),s(),i([n],r,r,g(a,l-1))}}),(0,Rn.jsx)(Z0,{className:"is-down-button",icon:Zr,label:(0,ka.__)("Move down"),description:(0,ka.__)("Move down"),isDisabled:p&&m>=p,onClick:()=>{o({rowStart:l+1}),s(),i([n],r,r,g(a,l+1))}})]}),(0,Rn.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Rn.jsx)(Z0,{icon:(0,ka.isRTL)()?In:Sr,label:(0,ka.__)("Move right"),description:(0,ka.__)("Move right"),isDisabled:h&&f>=h,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,l))}})})]})})}function Z0({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,Nxe.useInstanceId)(Z0)}`;return(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)(eN.ToolbarButton,{className:G("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,Rn.jsx)(ct,{id:a,children:i})]})}var X0=c(W(),1),oN=c(L(),1),tN=c(te(),1);function M7({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,X0.useSelect)(m=>{let{getBlockAttributes:h,getBlockOrder:p}=m(w),g=m(w).getSelectedBlock();return{gridLayout:h(e).layout??{},blockOrder:p(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,X0.useSelect)(w),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,X0.useDispatch)(w),l=(0,oN.useMemo)(()=>r?new El(r):null,[r]),u=(0,tN.usePrevious)(l),d=(0,tN.usePrevious)(t.isManualPlacement),f=(0,tN.usePrevious)(o);(0,oN.useEffect)(()=>{let m={};if(t.isManualPlacement){let h=[];for(let g of o){let{columnStart:b,rowStart:v,columnSpan:y=1,rowSpan:S=1}=n(g).style?.layout??{};!b||!v||h.push(new El({columnStart:b,rowStart:v,columnSpan:y,rowSpan:S}))}for(let g of o){let b=n(g),{columnStart:v,rowStart:y,columnSpan:S=1,rowSpan:k=1}=b.style?.layout??{};if(v&&y)continue;let[_,x]=i7e(h,t.columnCount,S,k,u?.columnEnd,u?.rowEnd);h.push(new El({columnStart:_,rowStart:x,columnSpan:S,rowSpan:k})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:_,rowStart:x}}}}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 y=n(g),{columnStart:S,rowStart:k,columnSpan:_,rowSpan:x,...E}=y.style?.layout??{};if(S||k||_||x){let B=Object.keys(E).length===0;m[g]=he(y,["style","layout"],B?void 0:E)}}}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 y=Object.keys(v).length===0;m[h]=he(p,["style","layout"],y?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 i7e(e,t,o,r,n=1,i=1){for(let s=i;;s++)for(let a=s===i?n:1;a<=t;a++){let l=new El({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(l)))return[a,s]}}var gd=c(C(),1),s7e={},a7e={"@mobile":"@media (width <= 480px)","@tablet":"@media (480px < width <= 782px)"},sp={fit:"fit",grow:"fill",max:"fixed",fixed:"fixedNoShrink"},l7e=[sp.max,sp.fixed];function Dxe(e){return l7e.includes(e)}function zxe({selector:e,declarations:t}){return`${e} {
211 ${Object.entries(t).map(([o,r])=>`${o}: ${r}`).join("; ")};
212 }`}function jxe({selector:e,layout:t={},viewportOverrides:o,parentLayout:r={},includeContainerQuery:n=!0}){let i=o!==void 0,s=i?{...t,...o}:t,a=S=>Object.hasOwn(o||{},S),{selfStretch:l,flexSize:u,columnStart:d,rowStart:f,columnSpan:m,rowSpan:h}=s,p=t.selfStretch,{columnCount:g,minimumColumnWidth:b}=r,v=[],y={};if((!i||a("selfStretch")||a("flexSize"))&&(i&&(l===sp.fit||l===sp.grow)&&Dxe(p)&&t.flexSize&&(y["flex-basis"]="unset",p===sp.fixed&&(y["flex-shrink"]="unset")),Dxe(l)&&u?(y["flex-basis"]=u,l===sp.fixed?y["flex-shrink"]="0":i&&p===sp.fixed&&(y["flex-shrink"]="unset"),y["box-sizing"]="border-box"):l===sp.grow&&(y["flex-grow"]="1")),(!i||a("columnStart")||a("columnSpan"))&&(d&&m?y["grid-column"]=`${d} / span ${m}`:d?y["grid-column"]=`${d}`:m&&(y["grid-column"]=`span ${m}`)),(!i||a("rowStart")||a("rowSpan"))&&(f&&h?y["grid-row"]=`${f} / span ${h}`:f?y["grid-row"]=`${f}`:h&&(y["grid-row"]=`span ${h}`)),Object.keys(y).length&&v.push({selector:e,declarations:y}),n&&!i&&(m||d)&&(b||!g)){let S=parseFloat(b);isNaN(S)&&(S=12);let k=b?.replace(S,"");["px","rem","em"].includes(k)||(k="rem");let _=2;m&&d?_=m+d-1:m?_=m:_=d;let x=k==="px"?24:1.5,E=_*S+(_-1)*x,B=S*2+x-1,P=m&&m>1?"1/-1":"auto";v.push({rulesGroup:`@container (max-width: ${Math.max(E,B)}${k})`,selector:e,declarations:{"grid-column":P,"grid-row":"auto"}})}return v}function c7e({selector:e,layout:t={},parentLayout:o={},includeContainerQuery:r=!0}){return jxe({selector:e,layout:t,parentLayout:o,includeContainerQuery:r}).map(n=>{let i=zxe(n);return n.rulesGroup?`${n.rulesGroup} {
213 ${i}
214 }`:i}).join("")}function u7e({style:e={},selector:t,parentLayout:o={}}){let r=e?.layout??{};return Object.entries(a7e).map(([n,i])=>{let s=Bo(e,{viewport:n,pseudo:xi.pseudo})?.layout;if(!s||!Object.keys(s).length)return"";let l=jxe({selector:t,layout:r,viewportOverrides:s,parentLayout:o,includeContainerQuery:!1}).map(zxe).join("");return l?`${i}{${l}}`:""}).filter(Boolean).join("")}function d7e({style:e}){let t=(0,rN.useSelect)(f=>!f(w).getSettings().disableLayoutStyles),o=e?.layout??{},{columnStart:r,rowStart:n,columnSpan:i,rowSpan:s}=o,a=Dp()||{},l=(0,Vxe.useInstanceId)(s7e),u=`.wp-container-content-${l}`,d="";if(t&&(d=[c7e({selector:u,layout:o,parentLayout:a}),u7e({style:e,selector:u,parentLayout:a})].join("")),wi({css:d}),!!d)return{className:`wp-container-content-${l}`}}function f7e({clientId:e,style:t,setAttributes:o}){let r=Dp()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,gd.jsx)(m7e,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function m7e({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a,parentBlockVisibility:l,blockBlockVisibility:u,deviceType:d,isChildBlockAGrid:f}=(0,rN.useSelect)(B=>{let{getBlockRootClientId:P,getBlockEditingMode:T,getTemplateLock:A,getBlockAttributes:I,getSettings:R}=B(w),V=P(e);if(A(V)||T(V)!=="default")return{rootClientId:V,isVisible:!1};let N=I(V),U=I(e),O=R()?.[Es]?.toLowerCase()||io.desktop.key;return{rootClientId:V,isVisible:!0,parentBlockVisibility:N?.metadata?.blockVisibility,blockBlockVisibility:U?.metadata?.blockVisibility,deviceType:O,isChildBlockAGrid:U?.layout?.type==="grid"}},[e]),h=dt(e)?.ownerDocument?.defaultView,p=h===null?void 0:h,{isBlockCurrentlyHidden:g,currentViewport:b}=Fs({blockVisibility:l,deviceType:d,view:p}),v=(0,rN.useSelect)(B=>{if(!s)return!1;let{isBlockParentHiddenAtViewport:P}=F(B(w));return P(s,b)},[s,b]),{isBlockCurrentlyHidden:y}=Fs({blockVisibility:u,deviceType:d,view:p}),[S,k]=(0,Fxe.useState)(),_=f?e:void 0;if(!a||g||v)return null;let x=r&&!y;function E(B){o({style:{...t,layout:{...t?.layout,...B}}})}return(0,gd.jsxs)(gd.Fragment,{children:[(0,gd.jsx)(Y0,{clientId:s,contentRef:k,parentLayout:i,childGridClientId:_}),x&&(0,gd.jsx)(A7,{clientId:e,bounds:S,onChange:E,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,gd.jsx)(L7,{layout:t?.layout,parentLayout:i,onChange:E,gridClientId:s,blockClientId:e})]})}var N7={useBlockProps:d7e,edit:f7e,attributeKeys:["style"],hasSupport(){return!0}};var V7=c(zt(),1),D7=c(ee(),1),Hxe="metadata";function p7e(e){return e?.attributes?.[Hxe]?.type||(e.attributes={...e.attributes,[Hxe]:{type:"object"}}),e}function h7e(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,D7.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,D7.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,V7.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",p7e);(0,V7.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",h7e);var F7=c(z(),1),nN=c(L(),1),iN=c(D(),1),sN=c(ee(),1),Jk=c(W(),1);var ap=c(C(),1),g7e={};function b7e({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,Jk.useSelect)(h=>h(sN.store).getBlockTypes(),[]),n=(0,nN.useMemo)(()=>r?.filter(({name:h,blockHooks:p})=>p&&e in p||o.includes(h)),[r,e,o]),i=(0,Jk.useSelect)(h=>{let{getBlocks:p,getBlockRootClientId:g,getGlobalBlockCount:b}=h(w),v=g(t),y=n.reduce((S,k)=>{if(b(k.name)===0)return S;let _=k?.blockHooks?.[e],x;switch(_){case"before":case"after":x=p(v);break;case"first_child":case"last_child":x=p(t);break;case void 0:x=[...p(v),...p(t)];break}let E=x?.find(B=>B.name===k.name);return E?{...S,[k.name]:E.clientId}:S},{});return Object.values(y).length>0?y:g7e},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:l}=(0,Jk.useSelect)(w),{insertBlock:u,removeBlock:d}=(0,Jk.useDispatch)(w);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=l(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,ap.jsx)(me,{children:(0,ap.jsxs)(iN.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,F7.__)("Plugins"),initialOpen:!0,children:[(0,ap.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,F7.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(h=>(0,ap.jsxs)(nN.Fragment,{children:[(0,ap.jsx)("h3",{children:h}),f[h].map(p=>{let g=p.name in i;return(0,ap.jsx)(iN.ToggleControl,{checked:g,label:p.title,onChange:()=>{if(!g){let b=p.blockHooks[e];m((0,sN.createBlock)(p.name),b);return}d(i[p.name],!1)}},p.title)})]},h))]})})}var Uxe={edit:b7e,attributeKeys:["metadata"],hasSupport(){return!0}};var z7=c(z(),1),Gxe=c(ee(),1),eS=c(D(),1),Wxe=c(W(),1),$xe=c(L(),1),Kxe=c(te(),1);var lp=c(C(),1),y7e=()=>(0,Kxe.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},v7e=({name:e,metadata:t})=>{let o=(0,$xe.useContext)(pn),{removeAllBlockBindings:r}=Wc(),n=y7e(),{bindableAttributes:i,hasCompatibleFields:s}=(0,Wxe.useSelect)(l=>{let{__experimentalBlockBindingsSupportedAttributes:u}=l(w).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=F(l(Gxe.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,lp.jsx)(me,{group:"bindings",children:(0,lp.jsxs)(eS.__experimentalToolsPanel,{label:(0,z7.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,lp.jsx)(eS.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(l=>(0,lp.jsx)(g_,{attribute:l,blockName:e,binding:a?.[l]},l))}),(0,lp.jsx)(eS.__experimentalText,{as:"div",variant:"muted",children:(0,lp.jsx)("p",{children:(0,z7.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},Yxe={edit:v7e,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var qxe=c(z(),1),Zxe=c(D(),1),cN=c(W(),1),uN=c(ee(),1),Xxe=c(L(),1);var aN=c(W(),1);function lN(e){let{isOpened:t,expandRevision:o}=(0,aN.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=F(i(w));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,aN.useDispatch)(w);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var tS=c(C(),1),k7e="listView";function S7e(e){return(0,uN.hasBlockSupport)(e,k7e)}function _7e({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,Xxe.useContext)(qr),{isOpened:r,expandRevision:n,handleToggle:i}=lN(e),{openListViewContentPanel:s}=F((0,cN.useDispatch)(w)),{isEnabled:a,hasChildren:l,isNestedListView:u}=(0,cN.useSelect)(h=>{let{getBlockCount:p,getBlockParents:g,shouldRenderBlockListView:b}=F(h(w)),y=g(e,!1).find(S=>b(S));return{isEnabled:b(e),hasChildren:!!p(e),isNestedListView:y}},[e]),f=(0,uN.getBlockType)(t)?.title||t;return!a||u?null:(0,tS.jsx)(Bh,{group:"list",children:(0,tS.jsxs)(Zxe.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!l&&(0,tS.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,qxe.__)("No items yet.")}),(0,tS.jsx)(Iw,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var Qxe={edit:_7e,hasSupport:S7e,attributeKeys:[],supportsPatternEditing:!0};var Jxe=c(zt(),1),ewe=c(ee(),1);function x7e(e){return e.__experimentalLabel||(0,ewe.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,Jxe.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",x7e);var twe=c(te(),1),owe=c(zt(),1),j7=c(W(),1);var Sa=c(C(),1);function w7e(e){M7(e)}function C7e({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n}=(0,j7.useSelect)(f=>{let{isBlockSelected:m,hasSelectedInnerBlock:h,isDraggingBlocks:p,getTemplateLock:g,getBlockEditingMode:b,getBlockAttributes:v,getSettings:y}=f(w);if(!p()&&!m(e)||g(e)||b(e)!=="default"||h(e))return{isVisible:!1};let S=v(e),_=y()?.[Es]?.toLowerCase()||io.desktop.key;return{isVisible:!0,blockVisibility:S?.metadata?.blockVisibility,deviceType:_}},[e]),s=dt(e)?.ownerDocument?.defaultView,a=s===null?void 0:s,{isBlockCurrentlyHidden:l,currentViewport:u}=Fs({blockVisibility:r,deviceType:n,view:a}),d=(0,j7.useSelect)(f=>{if(!o)return!1;let{isBlockParentHiddenAtViewport:m}=F(f(w));return m(e,u)},[e,u,o]);return(0,Sa.jsxs)(Sa.Fragment,{children:[(0,Sa.jsx)(w7e,{clientId:e}),o&&!l&&!d&&(0,Sa.jsx)(Y0,{clientId:e,parentLayout:t})]})}var E7e=(0,twe.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,Sa.jsx)(e,{...o},"edit"):(0,Sa.jsxs)(Sa.Fragment,{children:[(0,Sa.jsx)(C7e,{clientId:o.clientId,layout:o.attributes.layout}),(0,Sa.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,owe.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",E7e);var Q0=c(ee(),1),nwe=c(D(),1),iwe=c(W(),1);var fN=c(L(),1),swe=c(z(),1);function rwe(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=T7e(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function T7e(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 dN=c(C(),1);function B7e(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function P7e({name:e,clientId:t,setAttributes:o}){let r=Go(),n=(0,fN.useContext)(pn),i=(0,iwe.useSelect)(u=>{let d=u(w).getBlockAttributes(t);if(!d?.metadata?.bindings)return d;let{getBlockBindingsSource:f}=F(u(Q0.store));return Object.entries(d.metadata.bindings).reduce((m,[h,p])=>{let g=f(p.source);if(!g)return m;let b=g.getValues({select:u,context:n,bindings:{[h]:p}});return{...m,...b}},d)},[n,t]),s=(0,Q0.getBlockType)(e),{fields:a,form:l}=(0,fN.useMemo)(()=>s?.attributes?rwe(s.attributes):{fields:[],form:{fields:[]}},[s?.attributes]);return r!=="default"||!a||a.length===0?null:(0,dN.jsx)(me,{children:(0,dN.jsx)(nwe.PanelBody,{title:(0,swe.__)("Settings"),children:(0,dN.jsx)(D0,{data:i,fields:a,form:l,onChange:o})})})}var awe={edit:P7e,attributeKeys:[],hasSupport(e){let t=(0,Q0.getBlockType)(e);return B7e(t?.attributes)}};function mN(e){let{style:t}=e,o=t?.dimensions||{},r=ys({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function pN(e){let t=e.style?.border||{};return{className:$8(e)||void 0,style:ys({border:t})}}function H7(e){let{colors:t}=mm(),o=pN(e),{borderColor:r}=e;if(r){let n=mg({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function U7(e){let t=e.style?.shadow||"";return{style:ys({shadow:t})}}var G7=c(L(),1);function hN(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=Cs("background-color",t),s=Cs("color",o),a=sb(r),l=a||n?.color?.gradient,u=G(s,a,{[i]:!l&&!!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=ys({color:d});return{className:u||void 0,style:f}}function W7(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,l,u]=ke("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,G7.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,G7.useMemo)(()=>[...a||[],...l||[],...u||[]],[a,l,u]),m=hN(e);if(t){let h=Pl(d,t);m.style.backgroundColor=h.color}if(r&&(m.style.background=HE(f,r)),o){let h=Pl(d,o);m.style.color=h.color}return m}function $7(e){let{style:t}=e,o=t?.spacing||{};return{style:ys({spacing:o})}}var lwe=c(D(),1);var{kebabCase:R7e}=F(lwe.privateApis);function K7(e,t){let o=e?.style?.typography||{};o={...o,fontSize:Tu({size:e?.style?.typography?.fontSize},t)};let r=ys({typography:o}),n=e?.fontFamily?`has-${R7e(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:G(n,i,Ud(e?.fontSize)),style:r}}var gN=c(L(),1);function Y7(e){let[t,o]=(0,gN.useState)(e);return(0,gN.useEffect)(()=>{e&&o(e)},[e]),t}Cve([IL,hL,NU,g7,GM,YM,E7,bL,Q6,Pxe,Uxe,Yxe,N7,Kve,Q_e,Qxe,awe].filter(Boolean));Eve([IL,hL,pye,GM,Q8,lxe,E7,tU,rU,bL,K8,YM,Q6,_le,N7]);Tve([IL,hL,NU,Zve,g7,K8,YM,bL,Q8,GM,tU,rU]);var cwe={button:"wp-element-button",caption:"wp-element-caption"},I7e=e=>cwe[e]?cwe[e]:"";var uwe=()=>"";var oS=c(L(),1),J0=c(ee(),1),Z7=c(Qr(),1);var dwe=c(C(),1);function X7(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return q7(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case oS.StrictMode:case oS.Fragment:return q7(n.children,t,o);case oS.RawHTML:return;case Kx.Content:return fwe(t,o);case Jw:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?q7(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return X7(i,t,o)}}function q7(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)X7(e[o],...t)}function fwe(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,J0.getSaveElement)(r,n,(0,dwe.jsx)(Kx.Content,{}));X7(s,e,i)}}function mwe(e=[]){J0.__unstableGetBlockProps.skipFilters=!0;let t=[];return fwe(t,e),J0.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof Z7.RichTextData?o:Z7.RichTextData.fromHTMLString(o))}var pwe=c(D(),1);var Q7=c(C(),1);function hwe({clientId:e,resizableBoxProps:t,...o}){return(0,Q7.jsx)(Ks,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,Q7.jsx)(pwe.ResizableBox,{...t})})}var tC=c(L(),1),bN=c(W(),1),Tl=c(D(),1),eC=c(z(),1);var _a=c(C(),1);function gwe({rules:e}){let[t,o]=(0,tC.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,bN.useSelect)(p=>F(p(w)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:l}=F((0,bN.useDispatch)(w));if((0,tC.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,tC.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=()=>{l(r,n,!0),s()};return(0,_a.jsx)(Tl.Modal,{title:(0,eC.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,_a.jsxs)(Tl.__experimentalVStack,{spacing:4,children:[(0,_a.jsxs)("div",{children:[(0,_a.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,_a.jsxs)("p",{children:[i.warning&&(0,_a.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,_a.jsx)(Tl.CheckboxControl,{label:(0,eC.__)("I understand the consequences"),checked:t,onChange:o}),(0,_a.jsxs)(Tl.__experimentalHStack,{justify:"right",children:[(0,_a.jsx)(Tl.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,eC.__)("Cancel")}),(0,_a.jsx)(Tl.Button,{variant:"primary",onClick:h,disabled:m,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,eC.__)("Delete")})]})]})})}var J7=c(L(),1);var rS=c(D(),1),ywe=c(L(),1),Fi=c(z(),1),yN=c(C(),1),bwe=[{value:"fill",label:(0,Fi._x)("Fill","Scale option for dimensions control"),help:(0,Fi.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,Fi._x)("Contain","Scale option for dimensions control"),help:(0,Fi.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,Fi._x)("Cover","Scale option for dimensions control"),help:(0,Fi.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,Fi._x)("None","Scale option for dimensions control"),help:(0,Fi.__)("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,Fi._x)("Scale down","Scale option for dimensions control"),help:(0,Fi.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function vwe({panelId:e,value:t,onChange:o,options:r=bwe,defaultValue:n=bwe[0].value,isShownByDefault:i=!0}){let s=t??n,a=(0,ywe.useMemo)(()=>r.reduce((l,u)=>(l[u.value]=u.help,l),{}),[r]);return(0,yN.jsx)(rS.__experimentalToolsPanelItem,{label:(0,Fi._x)("Scale","Image scaling options"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,yN.jsx)(rS.__experimentalToggleGroupControl,{label:(0,Fi._x)("Scale","Image scaling options"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(l=>(0,yN.jsx)(rS.__experimentalToggleGroupControlOption,{...l},l.value))})})}var nS=c(D(),1),Ig=c(z(),1),bd=c(C(),1);function kwe({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=l=>u=>{let d={...t};u?d[l]=u:delete d[l],o(d)};return(0,bd.jsxs)(bd.Fragment,{children:[(0,bd.jsx)(nS.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Ig.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,bd.jsx)(nS.__experimentalUnitControl,{label:(0,Ig.__)("Width"),placeholder:(0,Ig.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,bd.jsx)(nS.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Ig.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,bd.jsx)(nS.__experimentalUnitControl,{label:(0,Ig.__)("Height"),placeholder:(0,Ig.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var cp=c(C(),1);function O7e({panelId:e,value:t={},onChange:o=()=>{},aspectRatioOptions:r,defaultAspectRatio:n="auto",scaleOptions:i,defaultScale:s="cover",unitsOptions:a,tools:l=["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?null:t.scale,[h,p]=(0,J7.useState)(m),[g,b]=(0,J7.useState)(f),y=!!(u&&d)?"custom":f,S=f||u&&d;return(0,cp.jsxs)(cp.Fragment,{children:[l.includes("aspectRatio")&&(0,cp.jsx)(LA,{panelId:e,options:r,defaultValue:n,value:y,onChange:k=>{let _={...t};k=k==="auto"?null:k,b(k),k?_.aspectRatio=k:delete _.aspectRatio,k?h?_.scale=h:(_.scale=s,p(s)):delete _.scale,k!=="custom"&&u&&d&&delete _.height,o(_)}}),l.includes("widthHeight")&&(0,cp.jsx)(kwe,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:k,height:_})=>{let x={...t};k=k==="auto"?null:k,_=_==="auto"?null:_,k?x.width=k:delete x.width,_?x.height=_:delete x.height,k&&_?delete x.aspectRatio:g&&(x.aspectRatio=g),!g&&!!k!=!!_?delete x.scale:h?x.scale=h:(x.scale=s,p(s)),o(x)}}),l.includes("scale")&&S&&(0,cp.jsx)(vwe,{panelId:e,options:i,defaultValue:s,value:h,onChange:k=>{let _={...t};p(k),k?_.scale=k:delete _.scale,o(_)}})]})}var Swe=O7e;var vN=c(D(),1),yd=c(z(),1),e9=c(C(),1),_we=[{label:(0,yd._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,yd._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,yd._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,yd._x)("Full Size","Image size option for resolution control"),value:"full"}];function xwe({panelId:e,value:t,onChange:o,options:r=_we,defaultValue:n=_we[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,e9.jsx)(vN.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,yd.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,e9.jsx)(vN.SelectControl,{label:(0,yd.__)("Resolution"),value:a,options:r,onChange:o,help:(0,yd.__)("Select the size of the source image."),size:"__unstable-large"})})}var Og=c(z(),1),iS=c(D(),1),Cwe=c(W(),1);var Bl=c(z(),1),wwe={a:(0,Bl.__)("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,Bl.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,Bl.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,Bl.__)("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,Bl.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,Bl.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,Bl.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,Bl.__)("The <main> element should be used for the primary content of your document only."),nav:(0,Bl.__)("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,Bl.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var oC=c(C(),1);function Ewe({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,Og.__)("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,Cwe.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:l,getBlockAttributes:u}=a(w);return l().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,Og.sprintf)((0,Og.__)("%s (Already in use)"),a.label)}:a);return(0,oC.jsxs)(iS.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,oC.jsx)(iS.SelectControl,{__next40pxDefaultSize:!0,label:(0,Og.__)("HTML element"),options:s,value:e,onChange:t,help:wwe[e]}),e==="main"&&i&&(0,oC.jsx)(iS.Notice,{status:"warning",isDismissible:!1,children:(0,Og.__)("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 vd=c(D(),1);var sS=c(L(),1),kN=c(z(),1);var zi=c(D(),1);var Twe=c(at(),1);var ks=c(C(),1),{Badge:A7e}=F(zi.privateApis);function Bwe({title:e,url:t,image:o,badges:r}){return(0,ks.jsxs)(zi.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,ks.jsx)(zi.FlexItem,{className:"link-preview-button__content",children:(0,ks.jsxs)(zi.__experimentalHStack,{alignment:"top",children:[o&&(0,ks.jsx)(zi.FlexItem,{className:"link-preview-button__image-container",children:(0,ks.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,ks.jsxs)(zi.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,ks.jsx)(zi.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:(0,Twe.__unstableStripHTML)(e)}),t&&(0,ks.jsx)(zi.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,ks.jsx)(zi.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,ks.jsx)(A7e,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,ks.jsx)(Ue,{icon:Zr,className:"link-preview-button__icon"})]})}var Ss=c(C(),1);function t9({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,sS.useState)(!1),a=(0,sS.useId)(),l=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,sS.useRef)(null),{baseControlProps:f,controlProps:m}=(0,vd.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,Ss.jsxs)(vd.BaseControl,{...f,children:[(0,Ss.jsx)(vd.BaseControl.VisualLabel,{children:r}),(0,Ss.jsxs)(vd.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,Ss.jsxs)(ct,{children:[r,":"]}),(0,Ss.jsx)(Bwe,{title:e.title||(0,kN.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,Ss.jsx)(vd.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,Ss.jsxs)("div",{role:"dialog","aria-labelledby":l,"aria-describedby":u,children:[(0,Ss.jsxs)(ct,{children:[(0,Ss.jsx)("h2",{id:l,children:(0,kN.__)("Select a link")}),(0,Ss.jsx)("p",{id:u,children:(0,kN.__)("Search for and add a link to the navigation item.")})]}),(0,Ss.jsx)(vm,{value:null,onChange:h,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var o9={};x9(o9,{...U8,ExperimentalBlockCanvas:Gj,BlockCanvasCover:wO,ExperimentalBlockEditorProvider:ay,getDuotoneFilter:WM,getRichTextValues:mwe,PrivateQuickInserter:PR,extractWords:$E,getNormalizedSearchTerms:c_,normalizeString:l_,PrivateListView:Iw,ResizableBoxPopover:hwe,InspectorControlsLastItem:CL,useHasBlockToolbar:WI,cleanEmptyObject:ge,getStyleForState:Bo,isDefaultBlockStyleState:Fr,setStyleForState:xn,usePrivateStyleOverride:Bu,BlockQuickNavigation:_L,LayoutStyle:i$,BlockManager:AL,BlockRemovalWarningModal:gwe,useLayoutClasses:QM,useLayoutStyles:I7,DimensionsTool:Swe,ResolutionTool:xwe,TabbedSidebar:wR,TextAlignmentControl:CA,usesContextKey:l8,useFlashEditableBlocks:tB,HTMLElementControl:Ewe,useZoomOut:Vx,globalStylesDataKey:ai,globalStylesLinksDataKey:bC,selectBlockPatternsKey:wd,requiresWrapperOnCopy:Ez,PrivateRichText:e0,PrivateInserterLibrary:yU,reusableBlocksSelectKey:yC,userPatternCategoriesSelectKey:Nc,PrivateBlockPopover:Sh,PrivatePublishDateTimePicker:EU,useSpacingSizes:uA,useBlockDisplayTitle:tn,BlockStyleVariationOverridesWithConfig:Rj,setBackgroundStyleDefaults:sL,sectionRootClientIdKey:Cd,NoteIconSlotFill:SI,NoteIconToolbarSlotFill:VI,mediaEditKey:vC,getMediaSelectKey:kC,deviceTypeKey:Es,isIsolatedEditorKey:Hi,isNavigationOverlayContextKey:SC,isNavigationPostEditorKey:V9,mediaUploadOnSuccessKey:fS,openMediaEditorModalKey:F9,useBlockElement:dt,useBlockElementRef:jp,LinkPicker:t9,useRemoteUrlData:M2,PrivateBlockContext:qr,useListViewPanelState:lN,isHashLink:dp,isRelativePath:fp});return Nwe(L7e);})();
215 /*! Bundled license information:
216
217 autosize/dist/autosize.js:
218 (*!
219 autosize 4.0.2
220 license: MIT
221 http://www.jacklmoore.com/autosize
222 *)
223
224 use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
225 (**
226 * @license React
227 * use-sync-external-store-shim.production.js
228 *
229 * Copyright (c) Meta Platforms, Inc. and affiliates.
230 *
231 * This source code is licensed under the MIT license found in the
232 * LICENSE file in the root directory of this source tree.
233 *)
234
235 use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
236 (**
237 * @license React
238 * use-sync-external-store-shim/with-selector.production.js
239 *
240 * Copyright (c) Meta Platforms, Inc. and affiliates.
241 *
242 * This source code is licensed under the MIT license found in the
243 * LICENSE file in the root directory of this source tree.
244 *)
245
246 normalize-wheel/src/isEventSupported.js:
247 (**
248 * Checks if an event is supported in the current execution environment.
249 *
250 * NOTE: This will not work correctly for non-generic events such as `change`,
251 * `reset`, `load`, `error`, and `select`.
252 *
253 * Borrows from Modernizr.
254 *
255 * @param {string} eventNameSuffix Event name, e.g. "click".
256 * @param {?boolean} capture Check if the capture phase is supported.
257 * @return {boolean} True if the event is supported.
258 * @internal
259 * @license Modernizr 3.0.0pre (Custom Build) | MIT
260 *)
261
262 is-plain-object/dist/is-plain-object.mjs:
263 (*!
264 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
265 *
266 * Copyright (c) 2014-2017, Jon Schlinkert.
267 * Released under the MIT License.
268 *)
269 */
270 //# sourceMappingURL=index.min.js.map
271